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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7e52bbe6adaf2f6b00df0d0bc7dd27393e19739c
|
71da7e88d6f9a326fd06f62e7ea5ff5a222d7793
|
/app/src/main/java/co/id/shope/models/UploadChatResponse.java
|
607e4b408b3127ab8b9954707b161c11848e077c
|
[] |
no_license
|
kyky04/aplikasimandiri-client
|
86094978d596862508ceb9ee13163b2e4fe80d58
|
627f8f30d68dbb43be712de7d8f7eb42e2ae99ee
|
refs/heads/master
| 2020-04-14T01:05:46.555312
| 2018-12-30T01:00:39
| 2018-12-30T01:00:39
| 163,551,932
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 662
|
java
|
package co.id.shope.models;
import com.google.gson.annotations.SerializedName;
import co.id.shope.models.chat.DataItemChat;
public class UploadChatResponse {
@SerializedName("data")
private DataItemChat data;
@SerializedName("status")
private boolean status;
public void setData(DataItemChat data){
this.data = data;
}
public DataItemChat getData(){
return data;
}
public void setStatus(boolean status){
this.status = status;
}
public boolean isStatus(){
return status;
}
@Override
public String toString(){
return
"UploadKategoriResponse{" +
"data = '" + data + '\'' +
",status = '" + status + '\'' +
"}";
}
}
|
[
"rizki@pragmainf.co.id"
] |
rizki@pragmainf.co.id
|
bba457ce36c6b52727f261d0de8f20458106c64d
|
0e06e096a9f95ab094b8078ea2cd310759af008b
|
/classes62-dex2jar/com/google/android/gms/internal/nearby/zzed.java
|
5784b796606e14e59c53873c7aa7bbdeeee494f8
|
[] |
no_license
|
Manifold0/adcom_decompile
|
4bc2907a057c73703cf141dc0749ed4c014ebe55
|
fce3d59b59480abe91f90ba05b0df4eaadd849f7
|
refs/heads/master
| 2020-05-21T02:01:59.787840
| 2019-05-10T00:36:27
| 2019-05-10T00:36:27
| 185,856,424
| 1
| 2
| null | 2019-05-10T00:36:28
| 2019-05-09T19:04:28
|
Java
|
UTF-8
|
Java
| false
| false
| 677
|
java
|
//
// Decompiled by Procyon v0.5.34
//
package com.google.android.gms.internal.nearby;
import android.os.RemoteException;
import android.os.Parcel;
public abstract class zzed extends zzb implements zzec
{
public zzed() {
super("com.google.android.gms.nearby.internal.connection.IStartAdvertisingResultListener");
}
@Override
protected final boolean dispatchTransaction(final int n, final Parcel parcel, final Parcel parcel2, final int n2) throws RemoteException {
if (n == 2) {
this.zza(com.google.android.gms.internal.nearby.zzc.zza(parcel, zzez.CREATOR));
return true;
}
return false;
}
}
|
[
"querky1231@gmail.com"
] |
querky1231@gmail.com
|
0989d385dbad986d663e5b777f9770fa48f1dc07
|
4a90bd18fb80a87af8da7affbf459256613edb20
|
/manager/api/security/src/main/java/io/apiman/manager/api/security/impl/DefaultSecurityContext.java
|
bbc4d2f8eb4b217b639bec34813b79a2e53ff180
|
[
"Apache-2.0"
] |
permissive
|
JARP80/apiman
|
e672e9a4d58acddde76613467821cb581e43418a
|
6d5bbb6ab2fd45cebe1ce375b0c8330f1c7ced83
|
refs/heads/master
| 2021-01-18T06:26:42.349502
| 2015-03-27T15:27:29
| 2015-03-27T15:27:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,443
|
java
|
/*
* Copyright 2014 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.apiman.manager.api.security.impl;
import javax.enterprise.context.ApplicationScoped;
import javax.servlet.http.HttpServletRequest;
/**
* The basic/default implementation of a security context.
*
* @author eric.wittmann@redhat.com
*/
@ApplicationScoped
public class DefaultSecurityContext extends AbstractSecurityContext {
private static final ThreadLocal<HttpServletRequest> servletRequest = new ThreadLocal<HttpServletRequest>();
/**
* Constructor.
*/
public DefaultSecurityContext() {
}
/**
* @see io.apiman.manager.api.security.ISecurityContext#getRequestHeader(java.lang.String)
*/
@Override
public String getRequestHeader(String headerName) {
return servletRequest.get().getHeader(headerName);
}
/**
* @see io.apiman.manager.api.security.ISecurityContext#getCurrentUser()
*/
@Override
public String getCurrentUser() {
return servletRequest.get().getRemoteUser();
}
/**
* @see io.apiman.manager.api.security.ISecurityContext#isAdmin()
*/
@Override
public boolean isAdmin() {
// TODO warning - hard coded role value here
return servletRequest.get().isUserInRole("apiadmin"); //$NON-NLS-1$
}
/**
* Called to set the current context http servlet request.
* @param request
*/
protected static void setServletRequest(HttpServletRequest request) {
servletRequest.set(request);
}
/**
* Called to clear the current thread local permissions bean.
*/
protected static void clearPermissions() {
AbstractSecurityContext.clearPermissions();
}
/**
* Called to clear the context http servlet request.
*/
protected static void clearServletRequest() {
servletRequest.remove();
}
}
|
[
"eric.wittmann@gmail.com"
] |
eric.wittmann@gmail.com
|
480d997aa00fbff0f94b4a71110f19dc309fab59
|
11c82833b1066d5e48c06ff11de766298f127674
|
/open-metadata-implementation/access-services/connected-asset/connected-asset-server/src/main/java/org/odpi/openmetadata/accessservices/connectedasset/handlers/ExternalIdentifiersHandler.java
|
5d26d28ac49416603eabaf2a9dbdb774bd9f9467
|
[
"CC-BY-4.0",
"Apache-2.0"
] |
permissive
|
PieterJanVanAeken/egeria
|
37ac28ee35ac8b395cbe7fb5849741a3d1ffb9ae
|
8c71faed767297464ba2bd8396b7b7aa3f1277c5
|
refs/heads/master
| 2020-03-30T16:09:04.913927
| 2019-03-05T11:35:44
| 2019-03-05T11:35:44
| 148,496,778
| 0
| 0
|
Apache-2.0
| 2018-09-12T14:52:25
| 2018-09-12T14:52:24
| null |
UTF-8
|
Java
| false
| false
| 4,505
|
java
|
/* SPDX-License-Identifier: Apache 2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.connectedasset.handlers;
import org.odpi.openmetadata.accessservices.connectedasset.ffdc.exceptions.InvalidParameterException;
import org.odpi.openmetadata.accessservices.connectedasset.ffdc.exceptions.UnrecognizedGUIDException;
import org.odpi.openmetadata.accessservices.connectedasset.mappers.AssetMapper;
import org.odpi.openmetadata.accessservices.connectedasset.mappers.ExternalIdentifierMapper;
import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ExternalIdentifier;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector;
import java.util.List;
/**
* ExternalIdentifiersHandler is responsible for retrieving a list of ExternalIdentifiers from the open metadata repositories
* taking into account the paging requirements.
*/
public class ExternalIdentifiersHandler
{
List<ExternalIdentifier> returnedList = null;
/**
* Construct the asset handler with a link to the property server's connector and this access service's
* official name. Then retrieve the asset and its relationships.
*
* @param serviceName name of this service
* @param serverName name of this server
* @param repositoryConnector connector to the property server.
* @param userId userId of user making request.
* @param assetGUID unique id for asset.
* @param elementStart starting element to return (may be so many elements that paging is needed).
* @param maxElements Maximum number of elements to return (may be so many elements that paging is needed).
*
* @throws InvalidParameterException one of the parameters is null or invalid.
* @throws PropertyServerException there is a problem retrieving information from the property (metadata) server.
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
*/
public ExternalIdentifiersHandler(String serviceName,
String serverName,
OMRSRepositoryConnector repositoryConnector,
String userId,
String assetGUID,
int elementStart,
int maxElements) throws InvalidParameterException,
PropertyServerException,
UserNotAuthorizedException
{
RepositoryHandler repositoryHandler = new RepositoryHandler(serviceName, serverName, repositoryConnector);
try
{
List<Relationship> retrievedRelationships = repositoryHandler.retrieveRelationships(userId, AssetMapper.TYPE_NAME, assetGUID, ExternalIdentifierMapper.RELATIONSHIP_TYPE_NAME, elementStart, maxElements);
}
catch (UnrecognizedGUIDException error)
{
throw new InvalidParameterException(error.getReportedHTTPCode(),
error.getReportingClassName(),
error.getReportingActionDescription(),
error.getErrorMessage(),
error.getReportedSystemAction(),
error.getReportedUserAction(),
assetGUID);
}
}
/**
* Return the requested list of annotations to the caller.
*
* @return list
*/
public List<ExternalIdentifier> getList()
{
if (returnedList == null)
{
return null;
}
else if (returnedList.isEmpty())
{
return null;
}
else
{
return returnedList;
}
}
}
|
[
"mandy_chessell@uk.ibm.com"
] |
mandy_chessell@uk.ibm.com
|
5ddef976dde56691a9529600cc296140fbdaae16
|
1ba27fc930ba20782e9ef703e0dc7b69391e191b
|
/Src/Sandbox/NetBeans4Uniface/src/com/compuware/uniface/netbeans/jcclexer/ParseException.java
|
18023b9da68cd099e52fd8812179d72b9ad12608
|
[] |
no_license
|
LO-RAN/codeQualityPortal
|
b0d81c76968bdcfce659959d0122e398c647b09f
|
a7c26209a616d74910f88ce0d60a6dc148dda272
|
refs/heads/master
| 2023-07-11T18:39:04.819034
| 2022-03-31T15:37:56
| 2022-03-31T15:37:56
| 37,261,337
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,384
|
java
|
/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
/* JavaCCOptions:KEEP_LINE_COL=null */
package com.compuware.uniface.netbeans.jcclexer;
/**
* This exception is thrown when parse errors are encountered.
* You can explicitly create objects of this exception type by
* calling the method generateParseException in the generated
* parser.
*
* You can modify this class to customize your error reporting
* mechanisms so long as you retain the public fields.
*/
public class ParseException extends Exception {
/**
* The version identifier for this Serializable class.
* Increment only if the <i>serialized</i> form of the
* class changes.
*/
private static final long serialVersionUID = 1L;
/**
* This constructor is used by the method "generateParseException"
* in the generated parser. Calling this constructor generates
* a new object of this type with the fields "currentToken",
* "expectedTokenSequences", and "tokenImage" set.
*/
public ParseException(Token currentTokenVal,
int[][] expectedTokenSequencesVal,
String[] tokenImageVal
)
{
super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal));
currentToken = currentTokenVal;
expectedTokenSequences = expectedTokenSequencesVal;
tokenImage = tokenImageVal;
}
/**
* The following constructors are for use by you for whatever
* purpose you can think of. Constructing the exception in this
* manner makes the exception behave in the normal way - i.e., as
* documented in the class "Throwable". The fields "errorToken",
* "expectedTokenSequences", and "tokenImage" do not contain
* relevant information. The JavaCC generated code does not use
* these constructors.
*/
public ParseException() {
super();
}
/** Constructor with message. */
public ParseException(String message) {
super(message);
}
/**
* This is the last token that has been consumed successfully. If
* this object has been created due to a parse error, the token
* followng this token will (therefore) be the first error token.
*/
public Token currentToken;
/**
* Each entry in this array is an array of integers. Each array
* of integers represents a sequence of tokens (by their ordinal
* values) that is expected at this point of the parse.
*/
public int[][] expectedTokenSequences;
/**
* This is a reference to the "tokenImage" array of the generated
* parser within which the parse error occurred. This array is
* defined in the generated ...Constants interface.
*/
public String[] tokenImage;
/**
* It uses "currentToken" and "expectedTokenSequences" to generate a parse
* error message and returns it. If this object has been created
* due to a parse error, and you do not catch it (it gets thrown
* from the parser) the correct error message
* gets displayed.
*/
private static String initialise(Token currentToken,
int[][] expectedTokenSequences,
String[] tokenImage) {
String eol = System.getProperty("line.separator", "\n");
StringBuffer expected = new StringBuffer();
int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) {
if (maxSize < expectedTokenSequences[i].length) {
maxSize = expectedTokenSequences[i].length;
}
for (int j = 0; j < expectedTokenSequences[i].length; j++) {
expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');
}
if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
expected.append("...");
}
expected.append(eol).append(" ");
}
String retval = "Encountered \"";
Token tok = currentToken.next;
for (int i = 0; i < maxSize; i++) {
if (i != 0) retval += " ";
if (tok.kind == 0) {
retval += tokenImage[0];
break;
}
retval += " " + tokenImage[tok.kind];
retval += " \"";
retval += add_escapes(tok.image);
retval += " \"";
tok = tok.next;
}
retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
retval += "." + eol;
if (expectedTokenSequences.length == 1) {
retval += "Was expecting:" + eol + " ";
} else {
retval += "Was expecting one of:" + eol + " ";
}
retval += expected.toString();
return retval;
}
/**
* The end of line string for this machine.
*/
protected String eol = System.getProperty("line.separator", "\n");
/**
* Used to convert raw characters to their escaped version
* when these raw version cannot be used as part of an ASCII
* string literal.
*/
static String add_escapes(String str) {
StringBuffer retval = new StringBuffer();
char ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
{
case 0 :
continue;
case '\b':
retval.append("\\b");
continue;
case '\t':
retval.append("\\t");
continue;
case '\n':
retval.append("\\n");
continue;
case '\f':
retval.append("\\f");
continue;
case '\r':
retval.append("\\r");
continue;
case '\"':
retval.append("\\\"");
continue;
case '\'':
retval.append("\\\'");
continue;
case '\\':
retval.append("\\\\");
continue;
default:
if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
String s = "0000" + Integer.toString(ch, 16);
retval.append("\\u" + s.substring(s.length() - 4, s.length()));
} else {
retval.append(ch);
}
continue;
}
}
return retval.toString();
}
}
/* JavaCC - OriginalChecksum=44e26fa37a2d5c887fb90d82abf2df4a (do not edit this line) */
|
[
"laurent.izac@gmail.com"
] |
laurent.izac@gmail.com
|
e525bc3f4e4ccb275ab679936014fc4aa6e1cb6d
|
9193db991e5948b5d3f8243c6d9808903e7ec649
|
/src/main/java/org/eleventhlabs/ncomplo/business/entities/User.java
|
20b9c038babb2df2c302c3589abc1ea5d314bec0
|
[] |
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
| 2,783
|
java
|
package org.eleventhlabs.ncomplo.business.entities;
import java.text.Collator;
import java.util.Comparator;
import java.util.LinkedHashSet;
import java.util.Locale;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
@Entity
@Table(name="USER_DATA")
public class User {
@Id
@Column(name="LOGIN",length=100)
private String login;
@Column(name="NAME",nullable=false,length=600)
private String name;
@Column(name="EMAIL",nullable=false,length=200)
private String email;
@Column(name="PASSWORD",nullable=true,length=500)
private String password;
@ManyToMany(mappedBy="participants")
private Set<League> leagues = new LinkedHashSet<League>();
@Column(name="IS_ADMIN",nullable=false)
private boolean admin = false;
@Column(name="ACTIVE",nullable=false)
private boolean active = true;
public User() {
super();
}
public String getLogin() {
return this.login;
}
public void setLogin(final String login) {
this.login = login;
}
public String getEmail() {
return this.email;
}
public void setEmail(final String email) {
this.email = email;
}
public String getPassword() {
return this.password;
}
public void setPassword(final String password) {
this.password = password;
}
public boolean isAdmin() {
return this.admin;
}
public void setAdmin(final boolean admin) {
this.admin = admin;
}
public Set<League> getLeagues() {
return this.leagues;
}
public String getName() {
return this.name;
}
public void setName(final String name) {
this.name = name;
}
public boolean isActive() {
return this.active;
}
public void setActive(final boolean active) {
this.active = active;
}
public static final class UserComparator implements Comparator<User> {
private final Locale locale;
public UserComparator(final Locale locale) {
super();
this.locale = locale;
}
@Override
public int compare(final User o1, final User o2) {
final Collator collator = Collator.getInstance(this.locale);
return collator.compare(o1.getName(), o2.getName());
}
}
}
|
[
"daniel.fernandez@11thlabs.org"
] |
daniel.fernandez@11thlabs.org
|
f34b3239bf9400ba075ae93dd87e3687102e3ee6
|
8b47ffed449ee4e68c0b00db98f49981a2dfbc44
|
/JavaWeb/09_cookie_session/src/com/th1024/web/CookieServlet.java
|
4d02002ce5f74f3d65f44b5bb9d8680e3c6a9c37
|
[] |
no_license
|
Sakai1zumi/JavaTestCode
|
122f88d502a23d9d36a727766fc454e5067d253b
|
446c31065b36395d272d3cac20aaf59c3dbd8838
|
refs/heads/master
| 2023-05-23T03:08:11.636020
| 2021-06-17T02:49:31
| 2021-06-17T02:49:31
| 325,172,004
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,572
|
java
|
package com.th1024.web;
import com.th1024.util.CookieUtils;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @author TuHong
* @create 2021-03-31 21:06
*/
public class CookieServlet extends BaseServlet{
protected void testCookiePath(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Cookie cookie = new Cookie("path1", "path1");
//getContextPath():得到工程路径
cookie.setPath(req.getContextPath() + "/abc");// 工程路径/abc
resp.addCookie(cookie);
resp.getWriter().write("创建了一个带有Path路径的Cookie");
}
protected void liveCookie(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Cookie cookie = new Cookie("life3600", "life3600");
cookie.setMaxAge(60 * 60);//设置Cookie一小时之后删除
resp.addCookie(cookie);
resp.getWriter().write("创建存活时间为一小时的cookie");
}
protected void deleteCookieNow(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Cookie cookie = CookieUtils.findCookie("defaultLife", req.getCookies());
if(cookie != null){
cookie.setMaxAge(0);//0表示马上删除
resp.addCookie(cookie);
resp.getWriter().write("cookie已删除");
}
}
protected void defaultLifeCookie(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Cookie cookie = new Cookie("defaultLife", "defaultLife");
cookie.setMaxAge(-1);
resp.addCookie(cookie);
}
protected void updateCookie(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//方案一:创建一个同名的cookie,并修改值
// Cookie cookie = new Cookie("key1", "newValue1");
// resp.addCookie(cookie);
//方案二:查找到需要修改的Cookie对象,调用setValue()赋予新值
Cookie cookie = CookieUtils.findCookie("key1", req.getCookies());
if(cookie != null){
cookie.setValue("newValue1");
resp.addCookie(cookie);
}
resp.getWriter().write("修改Cookie-key1的值");
}
protected void getCookie(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Cookie[] cookies = req.getCookies();
for (Cookie cookie : cookies) {
//getName()返回Cookie的key(名)
//getValue()返回Cookie的Value值
resp.getWriter().write("Cookie:" + cookie.getName() + "-" + cookie.getValue() + "<br/>");
}
Cookie cookie = CookieUtils.findCookie("key1",cookies);
//如果cookie不为null,说明找到了需要的cookie
if(cookie != null){
resp.getWriter().write("cookie已找到");
}
}
protected void createCookie(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//1. 创建Cookie对象
Cookie cookie = new Cookie("key1", "value1");
//2. 通知客户端保存cookie
resp.addCookie(cookie);
//1. 创建Cookie对象
Cookie cookie1 = new Cookie("key2", "value2");
//2. 通知客户端保存cookie
resp.addCookie(cookie1);
resp.getWriter().write("Cookie创建成功");
}
}
|
[
"izumi0527@126.com"
] |
izumi0527@126.com
|
e13cb7411cb19d2c99649eab1012ce6d34a93f5e
|
5b6fd0fe3ae0f2f497d733bf31b95e664930fb74
|
/src/test/java/com/github/davidmoten/rx2/SpecializedMspcLinkedQueueTest.java
|
0eac8b7df727bd35dc2dd99d556bf852ed84e50b
|
[
"Apache-2.0"
] |
permissive
|
davidmoten/rxjava2-extras
|
24d5e47481b13f6768f5aaab40767f15a13d244b
|
409d86999da17f41eb4045610c3732e04304b273
|
refs/heads/master
| 2023-08-27T21:47:56.043548
| 2023-08-04T12:58:57
| 2023-08-04T12:59:10
| 72,622,361
| 177
| 23
|
Apache-2.0
| 2023-08-04T12:59:12
| 2016-11-02T09:06:25
|
Java
|
UTF-8
|
Java
| false
| false
| 1,317
|
java
|
package com.github.davidmoten.rx2;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.junit.Ignore;
import org.junit.Test;
@Ignore
public class SpecializedMspcLinkedQueueTest {
@Test
public void testEmptyQueuePoll() {
SpecializedMpscLinkedQueue<Integer> q = SpecializedMpscLinkedQueue.create();
assertNull(q.poll());
assertNull(q.poll());
}
@Test
public void testPushPoll() {
SpecializedMpscLinkedQueue<Integer> q = SpecializedMpscLinkedQueue.create();
q.offer(1);
assertEquals(1, (int) q.poll());
assertNull(q.poll());
}
@Test
public void testPushPushPollPoll() {
SpecializedMpscLinkedQueue<Integer> q = SpecializedMpscLinkedQueue.create();
q.offer(1);
q.offer(2);
assertEquals(1, (int) q.poll());
assertEquals(2, (int) q.poll());
assertNull(q.poll());
}
@Test
public void testPushPushPollPushPollPoll() {
SpecializedMpscLinkedQueue<Integer> q = SpecializedMpscLinkedQueue.create();
q.offer(1);
q.offer(2);
assertEquals(1, (int) q.poll());
q.offer(3);
assertEquals(2, (int) q.poll());
assertEquals(3, (int) q.poll());
assertNull(q.poll());
}
}
|
[
"davidmoten@gmail.com"
] |
davidmoten@gmail.com
|
b0597ae377363f666ecf33a0ae8e1e9e9d658dc4
|
e1e664b8783962091771e7de8ebe7dcb32e18767
|
/joe-program/src/main/java/com/joe/qiao/domain/headfirst/factory/pizzaaf/PlumTomatoSauce.java
|
d6b5943c2bbf77cdcebf845e13d1c78bc2295bb1
|
[] |
no_license
|
qiaoyunlai66/butterfly
|
4b76fc8a32f11b66d93e9fcd873eb537d80a4880
|
eda50a90ff4102601a254e93a37c79407f6a1380
|
refs/heads/master
| 2020-03-10T22:17:59.831745
| 2018-04-21T05:32:39
| 2018-04-21T05:32:39
| 129,592,162
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 181
|
java
|
package com.joe.qiao.domain.headfirst.factory.pizzaaf;
public class PlumTomatoSauce implements Sauce {
public String toString() {
return "Tomato sauce with plum tomatoes";
}
}
|
[
"joeqiao@fortinet.com"
] |
joeqiao@fortinet.com
|
5f33e3836f3d3da89823330c586240cc0afffff7
|
72a69bd3edc5fe15160e2a8d2a04b25078044ad6
|
/core/src/testFixtures/java/io/zero88/jooqx/spi/jdbc/JDBCLegacyHikariProvider.java
|
46e2ced38b86777e3045776c0b68efbf5f2767f0
|
[
"Apache-2.0"
] |
permissive
|
Smile8488/jooqx
|
74176707e5e839a8f7855010076a35cd0f381f7f
|
e2a08c3e7328d85b521f043de62a02923d2b5458
|
refs/heads/main
| 2023-03-24T23:54:07.015214
| 2021-03-24T08:33:23
| 2021-03-24T08:33:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 418
|
java
|
package io.zero88.jooqx.spi.jdbc;
import io.vertx.ext.jdbc.spi.impl.HikariCPDataSourceProvider;
import io.zero88.jooqx.LegacyTestDefinition.LegacySQLClientProvider;
public interface JDBCLegacyHikariProvider extends LegacySQLClientProvider<HikariCPDataSourceProvider> {
@Override
default Class<HikariCPDataSourceProvider> dataSourceProviderClass() {
return HikariCPDataSourceProvider.class;
}
}
|
[
"sontt246@gmail.com"
] |
sontt246@gmail.com
|
3bcc35bf7ad4e1bdc50a1bebdf3983c0f9939e17
|
95ffdbacafb9255d9dfe8c5caa84c5d324025848
|
/zpoi/src/org/zkoss/poi/ss/formula/functions/OverridableFunction.java
|
b6b85775d7826076459f2c31fc4b691a0e414748
|
[
"MIT"
] |
permissive
|
dataspread/dataspread-web
|
2143f3451c141a4857070a67813208c8f2da50dc
|
2d07f694c7419473635e355202be11396023f915
|
refs/heads/master
| 2023-01-12T16:12:47.862760
| 2021-05-09T02:30:42
| 2021-05-09T02:30:42
| 88,792,776
| 139
| 34
| null | 2023-01-06T01:36:17
| 2017-04-19T21:32:30
|
Java
|
UTF-8
|
Java
| false
| false
| 2,008
|
java
|
/* OverridableFunction.java
{{IS_NOTE
Purpose:
Description:
History:
2013/9/27 , Created by dennis
}}IS_NOTE
Copyright (C) 2013 Potix Corporation. All Rights Reserved.
{{IS_RIGHT
}}IS_RIGHT
*/
package org.zkoss.poi.ss.formula.functions;
import org.zkoss.poi.ss.formula.eval.ErrorEval;
import org.zkoss.poi.ss.formula.eval.NotImplementedException;
import org.zkoss.poi.ss.formula.eval.ValueEval;
import java.lang.reflect.Method;
/**
* A Overridable function to provide the chance of override poi's basic functions
* @author dennis
*
*/
public class OverridableFunction implements Function{
private static Class _funcClass;
private static String _funcClassName = "org.zkoss.zssex.formula.ELEvalFunction";
private static String _hasFuncName = "hasFunction";
static {
try {
_funcClass = Thread.currentThread().getClass().forName(_funcClassName);
} catch (ClassNotFoundException e) {
//ignore
}
}
private final String _functionName;
private final Function _original;
private Function _func;
public OverridableFunction(String name,Function original) {
_functionName = name;
_original = original;
if (_funcClass != null) {
try {
_func = (Function) _funcClass.getConstructor(String.class).newInstance(name);
} catch(Exception ex) {
//ignore
}
}
}
public ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
if(_func!=null && hasFunction(_func)){
return _func.evaluate(args, srcRowIndex, srcColumnIndex);
}
try{
return _original.evaluate(args, srcRowIndex, srcColumnIndex);
}catch(NotImplementedException x){
return ErrorEval.NAME_INVALID;
}
}
private boolean hasFunction(Function fn) {
try{
Method m = fn.getClass().getMethod(_hasFuncName);
Object obj = m.invoke(fn, null);
return ((Boolean)obj).booleanValue();
}catch(Exception x){}
return false;
}
public String getFunctionName() {
return _functionName;
}
public Function get_original() {
return _original;
}
}
|
[
"mangeshbendre@gmail.com"
] |
mangeshbendre@gmail.com
|
78b59edaba9d0030945ecc06510940e4026f580f
|
5d220b8cbe0bcab98414349ac79b449ec2a5bdcf
|
/run_dev/dev/LocalServiceFactory.java
|
18d1d59fda20bceb1b6e0a3b80ff299a2e684a2c
|
[] |
no_license
|
jielen/puer
|
fd18bdeeb0d48c8848dc2ab59629f9bbc7a5633e
|
0f56365e7bb8364f3d1b4daca0591d0322f7c1aa
|
refs/heads/master
| 2020-04-06T03:41:08.173645
| 2018-04-15T01:31:56
| 2018-04-15T01:31:56
| 63,419,454
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,503
|
java
|
package com.ufgov.zc.client.common;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.PropertyConfigurator;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.ufgov.zc.server.system.SpringContext;
public class LocalServiceFactory {
private static ApplicationContext context;
private static Map localServiceMap = new HashMap();
public synchronized static Object create(String serviceName) {
Object service = null;
if (context == null) {
String[] xmls = { "applicationContext_gk_base.xml", "applicationContext_gk_secure.xml",
"applicationContext_zc.xml", "applicationContext_gk.xml",
"applicationContext_zc_delegate.xml", "applicationContext_gk_delegate.xml",
"applicationContext_wfengine.xml","applicationContext_sf.xml", "applicationContext_sf_delegate.xml"};
context = new ClassPathXmlApplicationContext(xmls);
SpringContext.setSpringContext(context);
String path = SpringContext.class.getResource(".").toString();
PropertyConfigurator.configureAndWatch(path.substring(6, path.indexOf("/bin/") + 5) + "log4j.properties", 50);
}
if (localServiceMap.get(serviceName) == null) {
service = context.getBean(serviceName);
localServiceMap.put(serviceName, service);
} else {
service = localServiceMap.get(serviceName);
}
return service;
}
}
|
[
"jielenzghsy1@163.com"
] |
jielenzghsy1@163.com
|
5b479c7deffe4fc3efec14a1e76810d6fc4e0033
|
50cb496bcc0aa3f20be28fe4146ac6733c344709
|
/Math/Math/evosuite-branch/0/src/Math-32f/org/apache/commons/math3/geometry/euclidean/twod/PolygonsSet_ESTest.java
|
727fa1acf4ca7b370a96b044b6f793adff5ac47b
|
[] |
no_license
|
evosuite-problematic-tests/test-data
|
a99b63928e8b5b8794f4c02dcc814b6840541823
|
ca17583607f76e7853d1bb17a20669ce6d616d0c
|
refs/heads/master
| 2020-04-16T18:58:13.376495
| 2019-01-15T13:30:09
| 2019-01-15T13:30:09
| 165,842,026
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,592
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Dec 18 10:38:31 GMT 2018
*/
package org.apache.commons.math3.geometry.euclidean.twod;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.LinkedList;
import org.apache.commons.math3.geometry.euclidean.twod.Euclidean2D;
import org.apache.commons.math3.geometry.euclidean.twod.Line;
import org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet;
import org.apache.commons.math3.geometry.euclidean.twod.Segment;
import org.apache.commons.math3.geometry.euclidean.twod.SubLine;
import org.apache.commons.math3.geometry.euclidean.twod.Vector2D;
import org.apache.commons.math3.geometry.partitioning.BSPTree;
import org.apache.commons.math3.geometry.partitioning.SubHyperplane;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class PolygonsSet_ESTest extends PolygonsSet_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
LinkedList<SubHyperplane<Euclidean2D>> linkedList0 = new LinkedList<SubHyperplane<Euclidean2D>>();
Vector2D vector2D0 = Vector2D.POSITIVE_INFINITY;
Line line0 = new Line(vector2D0, (-2772.4789));
Segment segment0 = new Segment(vector2D0, vector2D0, line0);
SubLine subLine0 = new SubLine(segment0);
linkedList0.add((SubHyperplane<Euclidean2D>) subLine0);
Vector2D vector2D1 = new Vector2D((-2772.4789), 0.0);
SubLine subLine1 = new SubLine(vector2D1, vector2D1);
linkedList0.add((SubHyperplane<Euclidean2D>) subLine1);
PolygonsSet polygonsSet0 = new PolygonsSet(linkedList0);
// Undeclared exception!
try {
polygonsSet0.getVertices();
fail("Expecting exception: IllegalStateException");
} catch(IllegalStateException e) {
//
// illegal state: internal error, please fill a bug report at https://issues.apache.org/jira/browse/MATH
//
verifyException("org.apache.commons.math3.geometry.euclidean.twod.PolygonsSet", e);
}
}
@Test(timeout = 4000)
public void test1() throws Throwable {
PolygonsSet polygonsSet0 = new PolygonsSet((-1.7976931348623157E308), 0.005, (-1.7976931348623157E308), 0.005);
// Undeclared exception!
try {
polygonsSet0.computeGeometricalProperties();
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("org.apache.commons.math3.geometry.euclidean.twod.Line", e);
}
}
@Test(timeout = 4000)
public void test2() throws Throwable {
PolygonsSet polygonsSet0 = new PolygonsSet();
polygonsSet0.computeGeometricalProperties();
assertFalse(polygonsSet0.isEmpty());
}
@Test(timeout = 4000)
public void test3() throws Throwable {
PolygonsSet polygonsSet0 = new PolygonsSet();
Boolean boolean0 = new Boolean(false);
BSPTree<Euclidean2D> bSPTree0 = new BSPTree<Euclidean2D>(boolean0);
PolygonsSet polygonsSet1 = polygonsSet0.buildNew(bSPTree0);
polygonsSet1.computeGeometricalProperties();
assertFalse(polygonsSet0.equals((Object)polygonsSet1));
}
@Test(timeout = 4000)
public void test4() throws Throwable {
PolygonsSet polygonsSet0 = new PolygonsSet(3.4028234663852886E38, 2.2860509143963117E-8, 1073.64267000154, 2.2860509143963117E-8);
polygonsSet0.computeGeometricalProperties();
assertFalse(polygonsSet0.isEmpty());
}
@Test(timeout = 4000)
public void test5() throws Throwable {
PolygonsSet polygonsSet0 = new PolygonsSet((-813.1042), 0.001, 0.0, 2344.465506956265);
polygonsSet0.getVertices();
polygonsSet0.computeGeometricalProperties();
assertFalse(polygonsSet0.isEmpty());
}
@Test(timeout = 4000)
public void test6() throws Throwable {
LinkedList<SubHyperplane<Euclidean2D>> linkedList0 = new LinkedList<SubHyperplane<Euclidean2D>>();
Vector2D vector2D0 = new Vector2D(0.0, 0.0);
SubLine subLine0 = new SubLine(vector2D0, vector2D0);
linkedList0.add((SubHyperplane<Euclidean2D>) subLine0);
PolygonsSet polygonsSet0 = new PolygonsSet(linkedList0);
polygonsSet0.computeGeometricalProperties();
assertFalse(polygonsSet0.isEmpty());
}
@Test(timeout = 4000)
public void test7() throws Throwable {
PolygonsSet polygonsSet0 = new PolygonsSet(0.0, (-3.43338934259355E-8), 3.199999999999999E-5, (-5292.57871));
polygonsSet0.computeGeometricalProperties();
assertFalse(polygonsSet0.isEmpty());
}
@Test(timeout = 4000)
public void test8() throws Throwable {
PolygonsSet polygonsSet0 = new PolygonsSet(0.0, 1609.75427, 0.0, 1.301204386157242);
BSPTree<Euclidean2D> bSPTree0 = polygonsSet0.getTree(true);
Vector2D vector2D0 = Vector2D.NEGATIVE_INFINITY;
Line line0 = new Line(vector2D0, vector2D0);
SubLine subLine0 = line0.wholeHyperplane();
BSPTree<Euclidean2D> bSPTree1 = bSPTree0.split(subLine0);
line0.setAngle((-2681.558));
PolygonsSet polygonsSet1 = polygonsSet0.buildNew(bSPTree1);
polygonsSet1.computeGeometricalProperties();
assertFalse(polygonsSet0.equals((Object)polygonsSet1));
}
}
|
[
"sustc1526fan@hotmail.com"
] |
sustc1526fan@hotmail.com
|
735b00da111c92781d114f69014fbcb4dae980fa
|
4f78466511a44d3742169e8ecdc312a6e7a0a126
|
/sechub-developertools/src/main/java/com/daimler/sechub/developertools/admin/ui/action/project/ShowProjectsScanLogsAction.java
|
52ccf2b247796dfd04e2ad32b3e141af7ad27351
|
[
"MIT"
] |
permissive
|
jonico/sechub
|
670999fb2cc035f26e1611f180a8abdeea33f255
|
f74f6a7e64f9ef011592733d034845ef7fe7f369
|
refs/heads/develop
| 2020-09-18T18:23:45.711783
| 2019-11-22T08:32:03
| 2019-11-22T08:57:08
| 224,164,065
| 0
| 0
|
MIT
| 2019-11-26T10:26:47
| 2019-11-26T10:26:46
| null |
UTF-8
|
Java
| false
| false
| 915
|
java
|
// SPDX-License-Identifier: MIT
package com.daimler.sechub.developertools.admin.ui.action.project;
import java.awt.event.ActionEvent;
import java.util.Optional;
import com.daimler.sechub.developertools.admin.ui.UIContext;
import com.daimler.sechub.developertools.admin.ui.action.AbstractUIAction;
import com.daimler.sechub.developertools.admin.ui.cache.InputCacheIdentifier;
public class ShowProjectsScanLogsAction extends AbstractUIAction {
private static final long serialVersionUID = 1L;
public ShowProjectsScanLogsAction(UIContext context) {
super("Show project scan logs",context);
}
@Override
public void execute(ActionEvent e) {
Optional<String> projectId = getUserInput("Please enter project ID/name",InputCacheIdentifier.PROJECT_ID);
if (! projectId.isPresent()) {
return;
}
String data = getContext().getAdministration().fetchProjectScanLogs(projectId.get());
output(data);
}
}
|
[
"albert.tregnaghi@daimler.com"
] |
albert.tregnaghi@daimler.com
|
2a556fcfd493d19f9e68083029f870143f48bf8f
|
89bc11c8afc770dfd0542da19caf7df6e70587a3
|
/tools/zodiac/src/main/java/org/pushingpixels/tools/zodiac/flamingo/skins/Mariner.java
|
5b93df5e43c84f9faa7d48fa4958dd6ba00ffabf
|
[
"BSD-3-Clause"
] |
permissive
|
klst-de/radiance
|
ca8fa68e0ce502ff28ae61a531d59f1326b40c98
|
c90d5388ab81e5f4c0bd0abcdf7e75ab4f7e2a79
|
refs/heads/master
| 2020-08-04T11:38:49.223306
| 2019-09-26T03:30:20
| 2019-09-26T03:30:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,044
|
java
|
/*
* Copyright (c) 2005-2019 Radiance Kirill Grouchnikov. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* o 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.
*
* o Neither the name of the copyright holder 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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 org.pushingpixels.tools.zodiac.flamingo.skins;
import org.pushingpixels.substance.api.skin.MarinerSkin;
import org.pushingpixels.tools.zodiac.flamingo.SkinRobot;
/**
* Screenshot robot for {@link MarinerSkin}.
*
* @author Kirill Grouchnikov
*/
public class Mariner extends SkinRobot {
/**
* Creates the screenshot robot.
*/
public Mariner() {
super(new MarinerSkin(), "flamingo/ribbon/mariner");
}
}
|
[
"kirill.grouchnikov@gmail.com"
] |
kirill.grouchnikov@gmail.com
|
3431dc185dfa67f5cfcb91bc3602cdd9cd7e15c2
|
c7473d3323273ce570598488d4799ab69d5d4130
|
/integration-test/src/main/java/com/sequenceiq/it/cloudbreak/action/v4/proxy/ProxyConfigGetAction.java
|
e89174aae2c50b029ae2e555066caa9c86ed5e39
|
[
"LicenseRef-scancode-warranty-disclaimer",
"ANTLR-PD",
"CDDL-1.0",
"bzip2-1.0.6",
"Zlib",
"BSD-3-Clause",
"MIT",
"EPL-1.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-jdbm-1.00",
"Apache-2.0"
] |
permissive
|
prabhjyotsingh/cloudbreak
|
4df3e3c053f67cbecd493aaa2d5895c3c42538b9
|
4f735996a73d19dca8fe2617eaf125debe25ea38
|
refs/heads/master
| 2020-05-29T13:08:33.276790
| 2019-05-28T13:37:04
| 2019-05-28T19:54:05
| 189,146,058
| 0
| 0
|
Apache-2.0
| 2019-05-29T03:44:21
| 2019-05-29T03:44:20
| null |
UTF-8
|
Java
| false
| false
| 1,254
|
java
|
package com.sequenceiq.it.cloudbreak.action.v4.proxy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sequenceiq.it.cloudbreak.CloudbreakClient;
import com.sequenceiq.it.cloudbreak.action.Action;
import com.sequenceiq.it.cloudbreak.context.TestContext;
import com.sequenceiq.it.cloudbreak.dto.proxy.ProxyTestDto;
import com.sequenceiq.it.cloudbreak.log.Log;
public class ProxyConfigGetAction implements Action<ProxyTestDto> {
private static final Logger LOGGER = LoggerFactory.getLogger(ProxyConfigGetAction.class);
@Override
public ProxyTestDto action(TestContext testContext, ProxyTestDto testDto, CloudbreakClient client) throws Exception {
Log.log(LOGGER, String.format(" Name: %s", testDto.getRequest().getName()));
Log.logJSON(LOGGER, " Proxy config get request:\n", testDto.getRequest());
testDto.setResponse(
client.getCloudbreakClient()
.proxyConfigV4Endpoint()
.get(client.getWorkspaceId(), testDto.getName()));
Log.logJSON(LOGGER, " Proxy config was get successfully:\n", testDto.getResponse());
Log.log(LOGGER, String.format(" ID: %s", testDto.getResponse().getId()));
return testDto;
}
}
|
[
"rdoktorics@cloudera.com"
] |
rdoktorics@cloudera.com
|
3d9698020f3996735a14d994ca4321301a61e556
|
3809a2398524194a17f0e089e50f9a410941ab59
|
/src/main/java/fr/univlorraine/ecandidat/entities/siscol/VersionApo.java
|
06b587110af0334b27204a1816abd9dafaf67d48
|
[] |
no_license
|
greenandro/ecandidat
|
b718b1631cbacd311cf56cbfe137bcd73bd17354
|
b43f15fc29aa0b4993762e67291888e7ad3893e3
|
refs/heads/master
| 2020-12-02T20:57:35.752215
| 2016-03-12T09:43:29
| 2016-03-12T09:44:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 873
|
java
|
package fr.univlorraine.ecandidat.entities.siscol;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import lombok.Data;
/**
* The persistent class for the VERSION_APO database table.
*
*/
@Entity
@Table(name="VERSION_APO")
@Data
public class VersionApo implements Serializable {
private static final long serialVersionUID = 1L;
@EmbeddedId
private VersionApoPK id;
@Temporal(TemporalType.DATE)
@Column(name="DAT_CRE")
private Date datCre;
@Column(name="LIB_COM")
private String libCom;
@Column(name="TEM_BASE")
private String temBase;
@Column(name="TEM_EN_SVE_VER")
private String temEnSveVer;
}
|
[
"pascal.rigaux@univ-paris1.fr"
] |
pascal.rigaux@univ-paris1.fr
|
87d2025766d9e82b7767c4f9e23cdcd24386d680
|
884056b6a120b2a4c1c1202a4c69b07f59aecc36
|
/java projects/queue/result/slicedQueue/traditional_mutants/java.lang.String_toString()/AOIS_62/slicedQueue.java
|
5b9366558a680bbcdf47ad3af2066fffe1980052
|
[
"MIT"
] |
permissive
|
NazaninBayati/SMBFL
|
a48b16dbe2577a3324209e026c1b2bf53ee52f55
|
999c4bca166a32571e9f0b1ad99085a5d48550eb
|
refs/heads/master
| 2021-07-17T08:52:42.709856
| 2020-09-07T12:36:11
| 2020-09-07T12:36:11
| 204,252,009
| 3
| 0
|
MIT
| 2020-01-31T18:22:23
| 2019-08-25T05:47:52
|
Java
|
UTF-8
|
Java
| false
| false
| 1,333
|
java
|
// This is mutant program.
// Author : ysma
public class slicedQueue
{
private java.lang.Object[] elements;
private int size;
private int front;
private int back;
private static final int capacity = 2;
public slicedQueue()
{
elements = new java.lang.Object[capacity];
size = 0;
front = 0;
back = 0;
}
public void enqueue( java.lang.Object o )
throws java.lang.NullPointerException, java.lang.IllegalStateException
{
size++;
elements[back] = o;
back = (back + 1) % capacity;
}
public java.lang.Object dequeue()
throws java.lang.IllegalStateException
{
size--;
java.lang.Object o = elements[front % capacity];
elements[front] = null;
front = (front + 1) % capacity;
return o;
}
public boolean isEmpty()
{
return size == 0;
}
public boolean isFull()
{
return size == capacity;
}
public java.lang.String toString()
{
java.lang.String result = "[";
for (int i = 0; i < size; i++) {
result += elements[(front + i) % capacity].toString();
if (i < size-- - 1) {
result += ", ";
}
}
result += "]";
return result;
}
}
|
[
"n.bayati20@gmail.com"
] |
n.bayati20@gmail.com
|
5afa2f191f95d35c0b09636ce249648c8ec735c2
|
f3ee422b134a428ce5c30759041e93bde9953b14
|
/main/feature/src/boofcv/abst/feature/describe/DescribeRegionPointConvert.java
|
e2d2e5d3f72c5baa9b0394f23c522edb22bf0509
|
[
"Apache-2.0"
] |
permissive
|
Hollandaise/BoofCV
|
6b773ed4b2d81e2b4f2184a77182589b03b2baa5
|
ab4b54b73532d2f34c0ed58214558c7e620a01e6
|
refs/heads/master
| 2020-04-03T13:13:36.450289
| 2013-01-11T18:17:44
| 2013-01-11T18:17:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,488
|
java
|
/*
* Copyright (c) 2011-2013, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* 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 boofcv.abst.feature.describe;
import boofcv.struct.feature.TupleDesc;
import boofcv.struct.image.ImageSingleBand;
/**
* Converts the region descriptor type from the {@link DescribeRegionPoint} into the desired output using a
* {@link ConvertTupleDesc}.
*
* @author Peter Abeles
*/
public class DescribeRegionPointConvert<T extends ImageSingleBand,In extends TupleDesc,Out extends TupleDesc>
implements DescribeRegionPoint<T,Out>
{
// Computers the description
DescribeRegionPoint<T,In> original;
// Change the description type
ConvertTupleDesc<In,Out> converter;
// internal storage for the original descriptor
In storage;
public DescribeRegionPointConvert(DescribeRegionPoint<T, In> original,
ConvertTupleDesc<In, Out> converter) {
this.original = original;
this.converter = converter;
storage = original.createDescription();
}
@Override
public void setImage(T image) {
original.setImage(image);
}
@Override
public Out createDescription() {
return converter.createOutput();
}
@Override
public int getDescriptorLength() {
return original.getDescriptorLength();
}
@Override
public boolean isInBounds(double x, double y, double orientation, double scale) {
return original.isInBounds(x,y,orientation,scale);
}
@Override
public Out process(double x, double y, double orientation, double scale, Out ret) {
if( ret == null )
ret = converter.createOutput();
original.process(x,y,orientation,scale,storage);
converter.convert(storage,ret);
return ret;
}
@Override
public boolean requiresScale() {
return original.requiresScale();
}
@Override
public boolean requiresOrientation() {
return original.requiresOrientation();
}
@Override
public Class<Out> getDescriptorType() {
return converter.getOutputType();
}
}
|
[
"peter.abeles@gmail.com"
] |
peter.abeles@gmail.com
|
0f6922773ca65634b77148df5e7868f0e9671393
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Maven/Maven237.java
|
39e3c612467ff5e6ab93334533841e2023361461
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 465
|
java
|
public ArtifactRepository createDeploymentArtifactRepository( String id, String url, String layoutId,
boolean uniqueVersion )
throws UnknownRepositoryLayoutException
{
ArtifactRepositoryLayout layout = repositoryLayouts.get( layoutId );
checkLayout( id, layoutId, layout );
return createDeploymentArtifactRepository( id, url, layout, uniqueVersion );
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
d33592b4400a8081f45ac3f5cd1356199538818e
|
a17551ecb46f2a07bf4c60c11c2bbba5723960da
|
/jadabs/old/sip/jxme-sip-gw/src/ch/ethz/jadabs/jxme/sip/RouterImpl.java
|
524b70fe12be97a92ea5706214975fad0f6d1dde
|
[] |
no_license
|
BackupTheBerlios/jadabs
|
9f5a2fdccb6bbb744926e32078d2904eacdb9312
|
fce31c26acb3b1b5410a990c9be130cf9d7d5a0b
|
refs/heads/master
| 2021-01-22T07:22:53.301618
| 2005-08-26T12:09:31
| 2005-08-26T12:09:31
| 40,247,566
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,931
|
java
|
/*
* IMRouter.java
*
* Created on July 28, 2002, 12:47 PM
*/
package ch.ethz.jadabs.jxme.sip;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.ListIterator;
import javax.sip.ListeningPoint;
import javax.sip.SipStack;
import javax.sip.address.Address;
import javax.sip.address.Hop;
import javax.sip.address.Router;
import javax.sip.address.SipURI;
import javax.sip.address.URI;
import javax.sip.header.RouteHeader;
import javax.sip.message.Request;
import org.apache.log4j.Logger;
/**
*
* @author olivier
* @version 1.0
*/
public class RouterImpl implements Router
{
private Logger LOG = Logger.getLogger(RouterImpl.class);
protected HopImpl defaultRoute;
protected SipStack stack;
/**
* Creates new IMRouter
*/
public RouterImpl(SipStack sipStack, String defaultRoute)
{
if (defaultRoute != null)
this.defaultRoute = new HopImpl(defaultRoute);
this.stack = sipStack;
}
public HopImpl getNextHop(ListIterator routes) throws IllegalArgumentException
{
try
{
while (routes.hasNext())
{
RouteHeader routeHeader = (RouteHeader) routes.next();
Address routeAddress = routeHeader.getAddress();
SipURI sipURI = (SipURI) routeAddress.getURI();
String host = sipURI.getHost();
String transport = sipURI.getTransportParam();
int port = sipURI.getPort();
if (port == -1)
{
port = 5060;
}
if (transport == null)
transport = "UDP";
// Dont want to route to myself.
if (stack.getIPAddress().equals(host) && checkPort(port))
{
LOG.debug("DEBUG, IMRouter, getNextHop(), "
+ "The RouteHeader address matches the proxy, we remove it!");
// Let'take the next one:
routes.remove();
} else
{
HopImpl hop = new HopImpl(host, port, transport);
return hop;
}
}
return null;
} catch (Exception e)
{
throw new IllegalArgumentException(e.getMessage());
}
}
public boolean checkPort(int port)
{
Iterator lps = stack.getListeningPoints();
if (lps == null)
return false;
while (lps.hasNext())
{
ListeningPoint lp = (ListeningPoint) lps.next();
if (lp.getPort() == port)
return true;
}
return false;
}
/**
* Return addresses for default proxy to forward the request to. Thelist is
* organized in the following priority. If the request contains a Route
* Header it is used to construct the first element of the list. If the
* requestURI refers directly to a host, the host and port information are
* extracted from it and made the next hop on the list. If the default route
* has been specified, then it is used to construct the next element of the
* list.
*
* @param method
* is the method of the request.
* @param requestURI
* is the request URI of the request.
*/
public ListIterator getNextHops(Request request) throws IllegalArgumentException
{
LinkedList nextHops = new LinkedList();
ListIterator routes = request.getHeaders(RouteHeader.NAME);
if (routes != null)
{
Hop nextHop = getNextHop(routes);
if (nextHop != null)
{
nextHops.add(nextHop);
}
}
URI requestURI = request.getRequestURI();
if (requestURI instanceof SipURI)
{
String mAddr = ((SipURI) requestURI).getMAddrParam();
if (mAddr != null)
{
try
{
String mAddrTransport = ((SipURI) requestURI).getTransportParam();
if (mAddrTransport == null)
mAddrTransport = "UDP";
int mAddrPort = ((SipURI) requestURI).getPort();
if (mAddrPort == -1)
mAddrPort = 5060;
HopImpl mAddrHop = new HopImpl(mAddr, mAddrPort, mAddrTransport);
if (mAddrHop != null)
nextHops.add(mAddrHop);
LOG.debug("DEBUG, IMRouter, getNextHops(), One hop added: Request URI maddr parameter!");
} catch (Exception e)
{
throw new IllegalArgumentException("ERROR, IMRouter, pb to add the maddr hop");
}
}
/**
* The RequestUri should be the Address of Record(AOR) (bug reported
* by Gaurav Khandpur else { SipURI sipURI=(SipURI)requestURI;
* String host = sipURI.getHost(); int port = sipURI.getPort(); if
* (port == -1) { port = 5060; } String transport =
* sipURI.getTransportParam(); if (transport==null) transport="UDP";
* IMHop requestURIHop = new IMHop(host,port,transport);
* nextHops.add(requestURIHop); }
*/
} else
{
LOG.debug("DEBUG, IMRouter, getNextHops(), " + " the request URI is not a SipURI:"
+ " unable to build a hop.");
}
if (defaultRoute != null)
{
nextHops.add(defaultRoute);
}
return nextHops.listIterator();
}
/**
* Get the default hop.
*
* @return defaultRoute is the default route.
*/
public javax.sip.address.Hop getOutboundProxy()
{
return (javax.sip.address.Hop) this.defaultRoute;
}
}
|
[
"afrei"
] |
afrei
|
70a379ba93af46c7820cb72c2d0695c813a3475b
|
c809e53c5d4f5aba46fb8e0c732dcd46d237b2f2
|
/tape-sample/src/main/java/com/squareup/tape/sample/SampleApplication.java
|
69962c3066da8b909f7d621ae1dd08f45107920f
|
[
"Apache-2.0"
] |
permissive
|
strategist922/tape
|
e1cdd3d7202714f6e98c12a4588b98d623f89def
|
d0a0e4aca8801eec5ea44ca14d7cf9a53e706dec
|
refs/heads/master
| 2021-01-18T19:13:38.512997
| 2012-11-01T15:05:15
| 2012-11-01T15:05:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,263
|
java
|
// Copyright 2012 Square, Inc.
package com.squareup.tape.sample;
import android.app.Application;
import android.content.Context;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.squareup.otto.Bus;
import dagger.Module;
import dagger.ObjectGraph;
import dagger.Provides;
import javax.inject.Singleton;
public class SampleApplication extends Application {
private ObjectGraph objectGraph;
@Override public void onCreate() {
super.onCreate();
objectGraph = ObjectGraph.get(new SampleModule(this));
}
public void inject(Object object) {
objectGraph.inject(object);
}
@Module(
entryPoints = {
SampleActivity.class, //
ImageUploadTaskQueue.class, //
ImageUploadTaskService.class //
}
)
static class SampleModule {
private final Context appContext;
SampleModule(Context appContext) {
this.appContext = appContext;
}
@Provides @Singleton ImageUploadTaskQueue provideTaskQueue(Gson gson, Bus bus) {
return ImageUploadTaskQueue.create(appContext, gson, bus);
}
@Provides @Singleton Bus provideBus() {
return new Bus();
}
@Provides @Singleton Gson provideGson() {
return new GsonBuilder().create();
}
}
}
|
[
"jw@squareup.com"
] |
jw@squareup.com
|
f70a75bbb8bd49ccfd9b3f4bf30c2297f04b75e5
|
8d3c54983e1e57e166b0e946baeda38e2b7aeb15
|
/jnpf-datareport/report-core/src/main/java/com/bstek/ureport/parser/impl/CellStyleParser.java
|
ac963526d24636f775cfa0aedc4dcc44f27c2ef3
|
[] |
no_license
|
houzhanwu/lowCodePlatform
|
01d3c6f8fc30eb6dfd6d0beea55c705231fd97a5
|
88c0822c974b129d6c5423fec59d7de9fa907527
|
refs/heads/master
| 2023-08-30T04:07:23.106710
| 2021-11-17T02:33:20
| 2021-11-17T02:33:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,341
|
java
|
/*******************************************************************************
* Copyright 2017 Bstek
*
* 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.bstek.ureport.parser.impl;
import com.bstek.ureport.Utils;
import com.bstek.ureport.definition.*;
import com.bstek.ureport.parser.Parser;
import org.apache.commons.lang.StringUtils;
import org.dom4j.Element;
/**
* @author
* @since 1月19日
*/
public class CellStyleParser implements Parser<CellStyle> {
@Override
public CellStyle parse(Element element) {
boolean forCondition=false;
String forConditionText=element.attributeValue("for-condition");
if(StringUtils.isNotBlank(forConditionText)){
forCondition=Boolean.valueOf(forConditionText);
}
CellStyle style=null;
if(forCondition){
ConditionCellStyle s=new ConditionCellStyle();
String bgcolorScope=element.attributeValue("bgcolor-scope");
if(StringUtils.isNotBlank(bgcolorScope)){
s.setBgcolorScope(Scope.valueOf(bgcolorScope));
}
String forecolorScope=element.attributeValue("forecolor-scope");
if(StringUtils.isNotBlank(forecolorScope)){
s.setForecolorScope(Scope.valueOf(forecolorScope));
}
String fontSizeScope=element.attributeValue("font-size-scope");
if(StringUtils.isNotBlank(fontSizeScope)){
s.setFontSizeScope(Scope.valueOf(fontSizeScope));
}
String fontFamilyScope=element.attributeValue("font-family-scope");
if(StringUtils.isNotBlank(fontFamilyScope)){
s.setFontFamilyScope(Scope.valueOf(fontFamilyScope));
}
String boldScope=element.attributeValue("bold-scope");
if(StringUtils.isNotBlank(boldScope)){
s.setBoldScope(Scope.valueOf(boldScope));
}
String italicScope=element.attributeValue("italic-scope");
if(StringUtils.isNotBlank(italicScope)){
s.setItalicScope(Scope.valueOf(italicScope));
}
String underlineScope=element.attributeValue("underline-scope");
if(StringUtils.isNotBlank(underlineScope)){
s.setUnderlineScope(Scope.valueOf(underlineScope));
}
String alignScope=element.attributeValue("align-scope");
if(StringUtils.isNotBlank(alignScope)){
s.setAlignScope(Scope.valueOf(alignScope));
}
String valignScope=element.attributeValue("valign-scope");
if(StringUtils.isNotBlank(valignScope)){
s.setValignScope(Scope.valueOf(valignScope));
}
style=s;
}else{
style=new CellStyle();
}
style.setBgcolor(element.attributeValue("bgcolor"));
String forecolor=element.attributeValue("forecolor");
if(StringUtils.isNotBlank(forecolor)){
style.setForecolor(forecolor);
}
String fontFamily=element.attributeValue("font-family");
if(StringUtils.isNotBlank(fontFamily)){
style.setFontFamily(fontFamily);
}
String bold=element.attributeValue("bold");
if(StringUtils.isNotBlank(bold)){
style.setBold(Boolean.valueOf(bold));
}
String fontSize=element.attributeValue("font-size");
if(StringUtils.isNotBlank(fontSize)){
style.setFontSize(Integer.valueOf(fontSize));
}
style.setFormat(element.attributeValue("format"));
String italic=element.attributeValue("italic");
if(StringUtils.isNotBlank(italic)){
style.setItalic(Boolean.valueOf(italic));
}
String underline=element.attributeValue("underline");
if(StringUtils.isNotBlank(underline)){
style.setUnderline(Boolean.valueOf(underline));
}
String valign=element.attributeValue("valign");
if(StringUtils.isNotBlank(valign)){
style.setValign(Alignment.valueOf(valign));
}
String align=element.attributeValue("align");
if(StringUtils.isNotBlank(align)){
style.setAlign(Alignment.valueOf(align));
}
String wrapCompute=element.attributeValue("wrap-compute");
if(StringUtils.isNotBlank(wrapCompute)){
style.setWrapCompute(Boolean.valueOf(wrapCompute));
}
String lineHeight=element.attributeValue("line-height");
if(StringUtils.isNotBlank(lineHeight)){
style.setLineHeight(Utils.toBigDecimal(lineHeight).floatValue());
}
for(Object obj:element.elements()){
if(obj==null || !(obj instanceof Element)){
continue;
}
Element ele=(Element)obj;
String name=ele.getName();
if(name.equals("left-border")){
style.setLeftBorder(parseBorder(ele));
}else if(name.equals("right-border")){
style.setRightBorder(parseBorder(ele));
}else if(name.equals("top-border")){
style.setTopBorder(parseBorder(ele));
}else if(name.equals("bottom-border")){
style.setBottomBorder(parseBorder(ele));
}
}
return style;
}
private Border parseBorder(Element element){
Border border=new Border();
border.setWidth(Integer.valueOf(element.attributeValue("width")));
border.setStyle(BorderStyle.valueOf(element.attributeValue("style")));
border.setColor(element.attributeValue("color"));
return border;
}
}
|
[
"stvrandolph@icloud.com"
] |
stvrandolph@icloud.com
|
65aebff7902c2ef39771e8fd9b404b48e83493bb
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_ce8b247d2f276d3d8b04a5571a153b83a4438794/DamageEffect/2_ce8b247d2f276d3d8b04a5571a153b83a4438794_DamageEffect_t.java
|
983aebcf9b72abf98be9d831ea27bac51e8ffa54
|
[] |
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
| 1,837
|
java
|
package org.andfRa.mythr.responses;
import org.andfRa.mythr.player.DamageType;
import org.andfRa.mythr.player.DerivedStats;
import org.bukkit.Bukkit;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
public class DamageEffect extends ResponseEffect {
/** Attribute used for checks key. */
final public static String ATTRIBUTE_KEY = ResponseEffect.ATTRIBUTE_KEY;
/** Attack score modifier key. */
final public static String ATTACK_SCORE_MODIFIER_KEY = ResponseEffect.ATTACK_SCORE_MODIFIER_KEY;
/** Damage type key. */
final public static String DAMAGE_TYPE_KEY = "DAMAGE_TYPE";
/** Bonus damage multiplier key. */
final public static String BONUS_DAMAGE_MULTIPLIER_KEY = "BONUS_DAMAGE_MULTIPLIER";
@Override
public String key()
{ return "DAMAGE_EFFECT"; }
@Override
public boolean attackTrigger(Response response, LivingEntity lattacker, LivingEntity ldefender, DerivedStats dsattacker, DerivedStats dsdefender)
{
// Check for bonus:
boolean bonus = findAttribScoreSuccess(response, dsattacker, dsdefender);
// Type:
DamageType type = DamageType.match(response.getString(DAMAGE_TYPE_KEY));
if(type == null) return false;
// Calculate damage:
double damage = dsdefender.defend(type, dsattacker);
if(bonus) damage*= response.getDouble(BONUS_DAMAGE_MULTIPLIER_KEY);
// Send event:
EntityDamageByEntityEvent bevent = new EntityDamageByEntityEvent(lattacker, ldefender, DamageCause.ENTITY_ATTACK, damage);
Bukkit.getServer().getPluginManager().callEvent(bevent);
if(bevent.isCancelled()) return false;
// Apply damage:
ldefender.setLastDamageCause(bevent);
ldefender.damage(damage);
return true;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
144594662fcd5b0e2a402375129aab4b9080f1c5
|
e9b655aa572d9650a69d5942625ebceb67421373
|
/src/main/java/more/thread/example/java异步转同步/Demo6.java
|
285cff1af9798acc6f0bc17a7eb3d68aa389c973
|
[] |
no_license
|
fmbah/LearningResource
|
2d1fdfa9689e8ebd29f4a431efc8cc2a068feb7c
|
067b716c56b1ce5244d3a53c73545e08f7a8eacf
|
refs/heads/master
| 2022-07-12T03:58:50.278744
| 2020-08-19T12:14:58
| 2020-08-19T12:14:58
| 154,319,083
| 1
| 1
| null | 2022-06-21T00:53:10
| 2018-10-23T11:49:45
|
Java
|
UTF-8
|
Java
| false
| false
| 575
|
java
|
package more.thread.example.java异步转同步;
import java.util.concurrent.CountDownLatch;
/**
* @author a8079
* @title: Demo6
* @projectName nio
* @description: TODO
* @date 2020/2/2415:44
*/
public class Demo6 {
final static CountDownLatch latch = new CountDownLatch(1);
public static void main(String[] args) {
// 异步获取数据,等待数秒后,调用coutDown方法,解除await等待状态
try {
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
|
[
"807966224@qq.com"
] |
807966224@qq.com
|
c5adfd818e700650d5985ff5281cf487122c4ade
|
e6f4eb46910e09adf712d0c0377bbd1c82003cd7
|
/ext-msg/msg-rabbitmq/src/main/java/com/gang/common/msg/rabbitmq/logic/IConsumeService.java
|
01a3798f36bc1a0ce215514d1a35decb876c1623
|
[] |
no_license
|
black-ant/common
|
963a24b709a6773366a18880b81eee7018489cd8
|
e1852e42ad9bf35582ca821a022cf0a04252ba25
|
refs/heads/master
| 2022-11-22T11:46:20.065864
| 2020-06-11T13:29:47
| 2020-06-11T13:29:47
| 228,043,482
| 1
| 0
| null | 2022-11-16T12:28:16
| 2019-12-14T15:17:03
|
Java
|
UTF-8
|
Java
| false
| false
| 190
|
java
|
package com.gang.common.msg.rabbitmq.logic;
/**
* @Classname IConsumeService
* @Description TODO
* @Date 2020/2/26 21:08
* @Created by zengzg
*/
public interface IConsumeService {
}
|
[
"1016930479@qq.com"
] |
1016930479@qq.com
|
7b84e1380dae29828dbf6f6ada52586ec5225c67
|
23cc963092bb93e4b0b6531747a40bbcfaea20fb
|
/Server/src/main/java/ar/com/adriabe/web/controllers/page/StripePageController.java
|
1aacf117fc595b3fa10db05df370f387bdfb36e3
|
[] |
no_license
|
MildoCentaur/billing
|
819927d1695fde31b26451b4223fcf513d35e376
|
6c37bf3f476d326404cf70f4fd72740028eb3d01
|
refs/heads/master
| 2021-01-11T04:18:26.568172
| 2017-02-10T03:44:12
| 2017-02-10T03:44:12
| 71,210,731
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,382
|
java
|
package ar.com.adriabe.web.controllers.page;
import ar.com.adriabe.model.Stripe;
import ar.com.adriabe.services.ProductService;
import ar.com.adriabe.web.model.MODULE_NAME;
import ar.com.adriabe.web.model.WebPageModel;
import org.apache.commons.lang.StringEscapeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* Created by AJMILD1 on 04/09/14.
*/
@Controller
public class StripePageController extends AbstractPageController {
@Autowired
ProductService productService;
@RequestMapping(value = "/list-stripes", method = RequestMethod.GET)
public String listStripe(Model model, @RequestParam(value = "query", defaultValue = "") String query) {
List<Stripe> stripes = productService.findAllStripes(query);
WebPageModel webPageModel = createWebPageModel("Listado de patrones de rayado ");
model.addAttribute("page", webPageModel);
model.addAttribute("list", stripes);
return "product/stripe/list-stripe";
}
@RequestMapping(value = "/new-stripe", method = RequestMethod.GET)
public String newStripe(Model model) {
return renderAddOrEditStripeForm(model, "<label>Agregar nuevo patrón de rayado<label>", new Stripe());
}
@RequestMapping(value = "/edit-stripe", method = RequestMethod.GET)
public String editStripe(Model model, @RequestParam("id") Long id) {
Stripe stripe = productService.findStripeById(id);
stripe.getCombinations();
return renderAddOrEditStripeForm(model, "Editar patrón de rayado", stripe);
}
private String renderAddOrEditStripeForm(Model model, String title, Stripe stripe) {
WebPageModel webPageModel = createWebPageModel(title);
if (stripe == null) {
webPageModel.addErrorMessage("Rayado no encontrado.");
}
model.addAttribute("page", webPageModel);
model.addAttribute("stripe", stripe);
return "product/stripe/new-stripe";
}
@Override
public MODULE_NAME getModuleName() {
return MODULE_NAME.MODULE_FABRICA;
}
}
|
[
"alejandro.mildiner@gmail.com"
] |
alejandro.mildiner@gmail.com
|
4dcd9d7c0bd53bce82462e21f31472341446db73
|
642f1f62abb026dee2d360a8b19196e3ccb859a1
|
/web/src/main/java/com/sun3d/why/service/CmsVenueSeatTemplateService.java
|
7696d4382ed45564bbae0a8bfa8361f9ba7f146c
|
[] |
no_license
|
P79N6A/alibaba-1
|
f6dacf963d56856817b211484ca4be39f6dd9596
|
6ec48f26f16d51c8a493b0eee12d90775b6eaf1d
|
refs/heads/master
| 2020-05-27T08:34:26.827337
| 2019-05-25T07:50:12
| 2019-05-25T07:50:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,651
|
java
|
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.sun3d.why.service;
import com.sun3d.why.model.CmsVenueSeatTemplate;
import com.sun3d.why.model.SysUser;
import com.sun3d.why.util.Pagination;
import java.util.List;
public interface CmsVenueSeatTemplateService {
/**
* 根据模板ID删除对应的场馆座位模板记录
* @param templateId 模板ID
* @return
*/
int deleteVenueSeatTemplateById(String templateId);
/**
* 添加场馆座位模板记录
* @param record 场馆座位模板信息
* @return
*/
int addCmsVenueSeatTemplate(CmsVenueSeatTemplate record);
/**
* 根据场馆座位模板ID查询单条场馆座位模板记录
* @param templateId 场馆模板ID
* @return
*/
CmsVenueSeatTemplate queryVenueSeatTemplateById(String templateId);
/**
* 编辑场馆座位模板记录
* @param record 场馆座位模板信息
* @return
*/
int editCmsVenueSeatTemplate(CmsVenueSeatTemplate record);
/**
* 将场馆座位模板对象作为条件查询符合条件的所有场馆座位模板
* @param cmsVenueSeatTemplate 场馆模板信息
* @return
*/
List<CmsVenueSeatTemplate> queryVenueSeatTemplateByCondition(CmsVenueSeatTemplate cmsVenueSeatTemplate,Pagination page);
/**
* 将场馆座位模板对象作为条件查询符合条件的所有场馆座位模板总记录数
* @param cmsVenueSeatTemplate 场馆模板信息
* @return
*/
int queryVenueSeatTemplateCountByCondition(CmsVenueSeatTemplate cmsVenueSeatTemplate);
/**
* 保存场馆座位模板信息并保存场馆模板座位数据
* @param cmsVenueSeatTemplate 场馆模板信息
* @param sysUser 操作用户信息
* @param seatIds 场馆座位状态与Code组成的字符串
* @return
*/
boolean addVenueSeatTemplate(final CmsVenueSeatTemplate cmsVenueSeatTemplate,final SysUser sysUser,final String seatIds);
/**
* 保存场馆座位模板信息并保存场馆模板座位数据
* @param cmsVenueSeatTemplate 场馆模板信息
* @param sysUser 操作用户信息
* @param seatIds 场馆座位状态与Code组成的字符串
* @return
*/
boolean addVenueSeatTemplate2(CmsVenueSeatTemplate cmsVenueSeatTemplate,SysUser sysUser,String seatIds);
/**
* 编辑场馆座位模板信息并保存场馆模板座位数据
* @param cmsVenueSeatTemplate 场馆模板信息
* @param sysUser 操作用户信息
* @param seatIds 场馆座位状态与Code组成的字符串
* @return
*/
boolean editVenueSeatTemplate(final CmsVenueSeatTemplate cmsVenueSeatTemplate,final SysUser sysUser,final String seatIds);
}
|
[
"comalibaba@163.com"
] |
comalibaba@163.com
|
7ccd08cf383712c059d922899e86dd6dc3abe0f0
|
01d3faa1d5136e60bc4b69e5367409f9fa359b38
|
/src/main/java/libgdx/ui/implementations/games/kennstde/questionconfig/KennstDeQuestionCategoryEnum.java
|
e9376d6b734cd6503316b9da6e40ba2571f923ee
|
[] |
no_license
|
horeab/Hangman_tournament
|
3babcf6bff99fe15ecce53916ae1bd4c7cbc5dd0
|
d59a2c149048e74bf3ae4ea2bfc02c41f58d4eae
|
refs/heads/master
| 2020-06-05T09:43:06.617559
| 2019-09-02T14:53:31
| 2019-09-02T14:53:31
| 192,374,051
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,338
|
java
|
package libgdx.ui.implementations.games.kennstde.questionconfig;
import libgdx.ui.constants.game.question.QuestionCategory;
import libgdx.ui.services.gametypes.creatordependencies.CreatorDependencies;
import libgdx.ui.services.gametypes.types.hangmangame.HangmanGameCreatorDependencies;
import libgdx.ui.services.gametypes.types.imageclickgame.ImageClickGameCreatorDependencies;
import libgdx.ui.services.gametypes.types.quizgame.dependentquizgame.DependentQuizGameCreatorDependencies;
import libgdx.ui.services.gametypes.types.quizgame.uniquequizgame.UniqueQuizGameCreatorDependencies;
public enum KennstDeQuestionCategoryEnum implements QuestionCategory {
cat0(UniqueQuizGameCreatorDependencies.class),
cat1(UniqueQuizGameCreatorDependencies.class),
cat2(UniqueQuizGameCreatorDependencies.class),
cat3(HangmanGameCreatorDependencies.class),
cat4(DependentQuizGameCreatorDependencies.class),
;
private Class<? extends CreatorDependencies> questionCreator;
KennstDeQuestionCategoryEnum(Class<? extends CreatorDependencies> questionCreator) {
this.questionCreator = questionCreator;
}
@Override
public int getIndex() {
return ordinal();
}
@Override
public Class<? extends CreatorDependencies> getCreatorDependencies() {
return questionCreator;
}
}
|
[
"horea.bucerzan@gmail.com"
] |
horea.bucerzan@gmail.com
|
20b7f7f68c616901ec53b64f514ff898db3028d8
|
ab97d058511ed2d6178b5ecb19267d89d58437fa
|
/src/main/java/com/composite/aop5/Test.java
|
4056407229d6e473d5a5de014bb3dfac92e4cb61
|
[] |
no_license
|
baihd/springmvc
|
cbc7b84c6c5f9d85e22730bcf94d94ae5c84e5c3
|
a1ee2f1aedacb7fd51290cec65130c2f964fecc4
|
refs/heads/master
| 2020-03-30T03:52:52.282186
| 2018-09-29T08:13:10
| 2018-09-29T08:13:10
| 150,712,310
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 774
|
java
|
package com.composite.aop5;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
public class Test {
public static void main(String[] args) {
// 通过类初始化容器
ApplicationContext ctx = new AnnotationConfigApplicationContext(ApplicationCfg.class);
Math math = ctx.getBean("math", Math.class);
int n1 = 100, n2 = 0;
math.add(n1, n2);
math.sub(n1, n2);
math.mut(n1, n2);
try {
math.div(n1, n2);
} catch (Exception e) {
System.out.println(e.getMessage());
}
User user = ctx.getBean("getUser", User.class);
user.show();
}
}
|
[
"847350737@qq.com"
] |
847350737@qq.com
|
85e975850ca0b4be027d52c4d5af18d96d4ae0b3
|
2e9a86693b665b879c59b14dfd63c2c92acbf08a
|
/webconverter/decomiledJars/rt/com/sun/java/swing/plaf/windows/WindowsEditorPaneUI.java
|
670430d58eeb5a59c50a5f85285860f89fa3076c
|
[] |
no_license
|
shaikgsb/webproject-migration-code-java
|
9e2271255077025111e7ea3f887af7d9368c6933
|
3b17211e497658c61435f6c0e118b699e7aa3ded
|
refs/heads/master
| 2021-01-19T18:36:42.835783
| 2017-07-13T09:11:05
| 2017-07-13T09:11:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 492
|
java
|
package com.sun.java.swing.plaf.windows;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicEditorPaneUI;
import javax.swing.text.Caret;
public class WindowsEditorPaneUI
extends BasicEditorPaneUI
{
public WindowsEditorPaneUI() {}
public static ComponentUI createUI(JComponent paramJComponent)
{
return new WindowsEditorPaneUI();
}
protected Caret createCaret()
{
return new WindowsTextUI.WindowsCaret();
}
}
|
[
"Subbaraju.Gadiraju@Lnttechservices.com"
] |
Subbaraju.Gadiraju@Lnttechservices.com
|
b9ff4fdb35a2b6d446926f259733513c635b76cc
|
52019a46c8f25534afa491a5f68bf5598e68510b
|
/core/remoting/src/test/java/org/nakedobjects/remoting/exchange/AuthenticationRequestEncodabilityTest.java
|
e0706673b74472d9ddc039ea551b271c7bb73699
|
[
"Apache-2.0"
] |
permissive
|
JavaQualitasCorpus/nakedobjects-4.0.0
|
e765b4980994be681e5562584ebcf41e8086c69a
|
37ee250d4c8da969eac76749420064ca4c918e8e
|
refs/heads/master
| 2023-08-29T13:48:01.268876
| 2020-06-02T18:07:23
| 2020-06-02T18:07:23
| 167,005,009
| 0
| 1
|
Apache-2.0
| 2022-06-10T22:44:43
| 2019-01-22T14:08:50
|
Java
|
UTF-8
|
Java
| false
| false
| 988
|
java
|
package org.nakedobjects.remoting.exchange;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.nakedobjects.metamodel.commons.encoding.EncodabilityContractTest;
import org.nakedobjects.metamodel.commons.encoding.Encodable;
import org.nakedobjects.remoting.exchange.OpenSessionRequest;
public class AuthenticationRequestEncodabilityTest extends EncodabilityContractTest {
protected Encodable createEncodable() {
return new OpenSessionRequest("sven", "pass");
}
@Override
protected void assertRoundtripped(
Object decodedEncodable,
Object originalEncodable) {
OpenSessionRequest decoded = (OpenSessionRequest) decodedEncodable;
OpenSessionRequest original = (OpenSessionRequest) originalEncodable;
assertThat(decoded.getId(), is(equalTo(original.getId())));
assertThat(decoded.getResponse(), is(equalTo(original.getResponse())));
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
b18213a35f86445a446ba5ea666fcbb84c418b63
|
6e72cf339cbfc423c30aa4b7d134009d690eb10a
|
/src/main/java/com/atlassian/jira/rest/client/model/IssueFieldOptionScopeBean.java
|
b148ff077477c9a9fef9f4dd41192087f054832f
|
[] |
no_license
|
rajcarthy/jira-cloud-client
|
90f52e62a2dd3a8358103bf4c76c3e2f617c53e3
|
0c427830d3bec56e400760da67b621694bf3297b
|
refs/heads/master
| 2023-02-08T13:00:00.349995
| 2020-12-31T18:32:04
| 2020-12-31T18:32:04
| 325,853,593
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,929
|
java
|
/*
* The Jira Cloud platform REST API
* Jira Cloud platform REST API documentation
*
* OpenAPI spec version: 1001.0.0-SNAPSHOT
* Contact: ecosystem@atlassian.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.atlassian.jira.rest.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.atlassian.jira.rest.client.model.ProjectScopeBean;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
/**
* IssueFieldOptionScopeBean
*/
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2020-12-30T18:52:18.038445-08:00[America/Los_Angeles]")
public class IssueFieldOptionScopeBean {
@JsonProperty("projects")
private List<Long> projects = null;
@JsonProperty("projects2")
private List<ProjectScopeBean> projects2 = null;
@JsonProperty("global")
private AllOfIssueFieldOptionScopeBeanGlobal global = null;
public IssueFieldOptionScopeBean projects(List<Long> projects) {
this.projects = projects;
return this;
}
public IssueFieldOptionScopeBean addProjectsItem(Long projectsItem) {
if (this.projects == null) {
this.projects = new ArrayList<Long>();
}
this.projects.add(projectsItem);
return this;
}
/**
* DEPRECATED
* @return projects
**/
@Schema(description = "DEPRECATED")
public List<Long> getProjects() {
return projects;
}
public void setProjects(List<Long> projects) {
this.projects = projects;
}
public IssueFieldOptionScopeBean projects2(List<ProjectScopeBean> projects2) {
this.projects2 = projects2;
return this;
}
public IssueFieldOptionScopeBean addProjects2Item(ProjectScopeBean projects2Item) {
if (this.projects2 == null) {
this.projects2 = new ArrayList<ProjectScopeBean>();
}
this.projects2.add(projects2Item);
return this;
}
/**
* Defines the projects in which the option is available and the behavior of the option within each project. Specify one object per project. The behavior of the option in a project context overrides the behavior in the global context.
* @return projects2
**/
@Schema(description = "Defines the projects in which the option is available and the behavior of the option within each project. Specify one object per project. The behavior of the option in a project context overrides the behavior in the global context.")
public List<ProjectScopeBean> getProjects2() {
return projects2;
}
public void setProjects2(List<ProjectScopeBean> projects2) {
this.projects2 = projects2;
}
public IssueFieldOptionScopeBean global(AllOfIssueFieldOptionScopeBeanGlobal global) {
this.global = global;
return this;
}
/**
* Defines the behavior of the option within the global context. If this property is set, even if set to an empty object, then the option is available in all projects.
* @return global
**/
@Schema(description = "Defines the behavior of the option within the global context. If this property is set, even if set to an empty object, then the option is available in all projects.")
public AllOfIssueFieldOptionScopeBeanGlobal getGlobal() {
return global;
}
public void setGlobal(AllOfIssueFieldOptionScopeBeanGlobal global) {
this.global = global;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IssueFieldOptionScopeBean issueFieldOptionScopeBean = (IssueFieldOptionScopeBean) o;
return Objects.equals(this.projects, issueFieldOptionScopeBean.projects) &&
Objects.equals(this.projects2, issueFieldOptionScopeBean.projects2) &&
Objects.equals(this.global, issueFieldOptionScopeBean.global);
}
@Override
public int hashCode() {
return Objects.hash(projects, projects2, global);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IssueFieldOptionScopeBean {\n");
sb.append(" projects: ").append(toIndentedString(projects)).append("\n");
sb.append(" projects2: ").append(toIndentedString(projects2)).append("\n");
sb.append(" global: ").append(toIndentedString(global)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"uyscuti@localhost.localdomain"
] |
uyscuti@localhost.localdomain
|
c4e3b046cb2b82058bf9582023ef5629c8a9e875
|
8d7292c412aa6de1239905cfa389568995b11f50
|
/butterknife/src/main/java/com/syuan/fragment/MyFragment.java
|
3da60ded8cf4102f14ca672d4b1608b0d919ca4c
|
[] |
no_license
|
syuanlj/thefirstc
|
cc466f52ef3f81cf1901afa5cd77a7f622fec4c9
|
c7b04f4d498644d8459d459efa6354c717316394
|
refs/heads/master
| 2021-01-01T06:31:35.288704
| 2017-07-17T08:12:07
| 2017-07-17T08:12:33
| 97,449,325
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 845
|
java
|
package com.syuan.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.syuan.butterknife.R;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* 作者:sy
* 邮箱:893110793@qq.com
*/
public class MyFragment extends Fragment{
@BindView(R.id.main_tv1)
TextView textView;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.activity_main,container,false);
//Butterknife的绑定!!!
ButterKnife.bind(this,view);
return view;
}
}
|
[
"893110793@qq.com"
] |
893110793@qq.com
|
3b36bfeee91f7063c745fc8215dbc3c4379bdc56
|
2741ad249977fce9fbf3df06f0c58299c54ca23f
|
/nano/src/main/java/com/airhacks/nano/ResponseWriter.java
|
d3676a09e6d8c11d8887f66923bb5d0f4a062b17
|
[
"Apache-2.0"
] |
permissive
|
AdamBien/nano
|
bb6209f2bfac346dd052debab0e05f454aa1aedb
|
96f35c024deb1ac185bf69dd4760854607b05c0e
|
refs/heads/master
| 2016-09-01T15:20:12.381751
| 2015-12-23T08:19:44
| 2015-12-23T08:19:44
| 45,258,505
| 37
| 13
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 132
|
java
|
package com.airhacks.nano;
/**
*
* @author airhacks.com
*/
public interface ResponseWriter {
void write(String content);
}
|
[
"abien@adam-bien.com"
] |
abien@adam-bien.com
|
85851f153e2472823e6ca562c9ee13b41589e632
|
8cd01526f0e84cf36bc27515876eda9bcc52f49a
|
/code/vim_android/vim/src/main/java/huaiye/com/vim/dao/msgs/AppMessages.java
|
25b75a79f54105b239caad6537c6f1f5ba554403
|
[] |
no_license
|
liyawei7711/shenlun
|
a0baa859cec59b9d46825c8b1797173bd56d4d3f
|
602b103d90df98c100ce55efee132596b0100445
|
refs/heads/master
| 2021-01-09T12:52:18.359146
| 2020-06-29T08:21:20
| 2020-06-29T08:21:20
| 242,304,879
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,166
|
java
|
package huaiye.com.vim.dao.msgs;
import java.util.List;
import huaiye.com.vim.dao.AppDatas;
/**
* author: admin
* date: 2018/01/09
* version: 0
* mail: secret
* desc: AppMessages
*/
public class AppMessages {
private AppMessages() {
}
static class Holder {
static final AppMessages SINGLETON = new AppMessages();
}
public static AppMessages get() {
return Holder.SINGLETON;
}
public void clear() {
AppDatas.DB().deleteQuery(MessageData.class).delete();
}
public List<MessageData> getMessages() {
List<MessageData> list = AppDatas.DB().findQuery(MessageData.class)
.addWhereColumn("userId", AppDatas.Auth().getUserID())
.addWhereColumn("domainCode", AppDatas.Auth().getDomainCode())
.orderBy("nMillions", "desc")
.selectAll();
return list;
}
public void isReadAll() {
AppDatas.DB().updateQuery(MessageData.class)
.addWhereColumn("userId", AppDatas.Auth().getUserID())
.addWhereColumn("domainCode", AppDatas.Auth().getDomainCode())
.addUpdateColumn("isRead", 1)
.update();
}
public int getUnReadMessageNumber() {
try {
return AppDatas.DB().findQuery(MessageData.class)
.addWhereColumn("userId", AppDatas.Auth().getUserID())
.addWhereColumn("domainCode", AppDatas.Auth().getDomainCode())
.addWhereColumn("isRead", 0)
.count();
} catch (Exception e) {
return 0;
}
}
public void add(MessageData data) {
if (data.getMessageType() == MessageData.AUTH_KICKOUT
|| data.getMessageType() == MessageData.MEET_KICKOUT
|| data.getMessageType() == MessageData.MEET_SPEAKER_CONTROL
|| data.getMessageType() == MessageData.TALK_SPEAKER_CONTROL) {
// 暂时忽略这类消息插入到本地数据库
return;
}
com.huaiye.sdk.logger.Logger.debug("AppMessages add ");
AppDatas.DB().insertQuery(MessageData.class)
.insert(data);
}
public void del(MessageData data) {
if (data == null) {
clear();
} else {
del(data.nMillions);
}
}
public void del(long key) {
AppDatas.DB().deleteQuery(MessageData.class)
.addWhereColumn("nMillions", key)
.delete();
}
public void read(long nMillions) {
com.huaiye.sdk.logger.Logger.debug("AppMessages read " + nMillions);
AppDatas.DB().updateQuery(MessageData.class)
.addWhereColumn("userId", AppDatas.Auth().getUserID())
.addWhereColumn("domainCode", AppDatas.Auth().getDomainCode())
.addWhereColumn("nMillions", nMillions)
.addUpdateColumn("isRead", 1)
.update();
}
public void del(String key) {
AppDatas.DB().deleteQuery(MessageData.class)
.addWhereColumn("key", key)
.delete();
}
}
|
[
"751804582@qq.com"
] |
751804582@qq.com
|
2ad50e7826b47ba474c0ff036459a75532559e0a
|
8df3bc50ef92797eb9d99a8f9ffd2773da413b3b
|
/ahp/src-gen/ahp/validation/GoalValidator.java
|
955bccfdec3a229741a35a4c0aa42b842f03dec0
|
[] |
no_license
|
AresEkb/ahp
|
e68a2f1595dd3d5c86b21a31e782619b3492f5de
|
115982b70c830b31d9bcc2a777b5dfacf7259cb5
|
refs/heads/master
| 2016-09-01T10:30:18.435136
| 2015-11-05T07:16:57
| 2015-11-05T07:16:57
| 44,585,978
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 528
|
java
|
/**
*
* $Id$
*/
package ahp.validation;
import ahp.Hierarchy;
/**
* A sample validator interface for {@link ahp.Goal}.
* This doesn't really do anything, and it's not a real EMF artifact.
* It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
* This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
*/
public interface GoalValidator {
boolean validate();
boolean validateHierarchy(Hierarchy value);
}
|
[
"denis.nikif@gmail.com"
] |
denis.nikif@gmail.com
|
2252c9317c7efc9e6a6ae71f993a3fed2e4a27c4
|
6edc21c9b3e82396db0e8d4d11cafa302c0e5f22
|
/obj/Debug/android/src/mono/MonoPackageManager.java
|
0d577ff55cfa9f97bc4ee9c1989d3618cb38020f
|
[] |
no_license
|
eddydn/XamarinBarChart
|
0e27fc5672b36cd4c20929b5a1e0006e60148432
|
ecfee69e9734f33f162a8a14d38ab646c08f7419
|
refs/heads/master
| 2020-06-26T16:48:18.086730
| 2016-11-23T06:32:19
| 2016-11-23T06:32:19
| 74,547,503
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,711
|
java
|
package mono;
import java.io.*;
import java.lang.String;
import java.util.Locale;
import java.util.HashSet;
import java.util.zip.*;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.res.AssetManager;
import android.util.Log;
import mono.android.Runtime;
public class MonoPackageManager {
static Object lock = new Object ();
static boolean initialized;
static android.content.Context Context;
public static void LoadApplication (Context context, ApplicationInfo runtimePackage, String[] apks)
{
synchronized (lock) {
if (context instanceof android.app.Application) {
Context = context;
}
if (!initialized) {
android.content.IntentFilter timezoneChangedFilter = new android.content.IntentFilter (
android.content.Intent.ACTION_TIMEZONE_CHANGED
);
context.registerReceiver (new mono.android.app.NotifyTimeZoneChanges (), timezoneChangedFilter);
System.loadLibrary("monodroid");
Locale locale = Locale.getDefault ();
String language = locale.getLanguage () + "-" + locale.getCountry ();
String filesDir = context.getFilesDir ().getAbsolutePath ();
String cacheDir = context.getCacheDir ().getAbsolutePath ();
String dataDir = getNativeLibraryPath (context);
ClassLoader loader = context.getClassLoader ();
Runtime.init (
language,
apks,
getNativeLibraryPath (runtimePackage),
new String[]{
filesDir,
cacheDir,
dataDir,
},
loader,
new java.io.File (
android.os.Environment.getExternalStorageDirectory (),
"Android/data/" + context.getPackageName () + "/files/.__override__").getAbsolutePath (),
MonoPackageManager_Resources.Assemblies,
context.getPackageName ());
mono.android.app.ApplicationRegistration.registerApplications ();
initialized = true;
}
}
}
public static void setContext (Context context)
{
// Ignore; vestigial
}
static String getNativeLibraryPath (Context context)
{
return getNativeLibraryPath (context.getApplicationInfo ());
}
static String getNativeLibraryPath (ApplicationInfo ainfo)
{
if (android.os.Build.VERSION.SDK_INT >= 9)
return ainfo.nativeLibraryDir;
return ainfo.dataDir + "/lib";
}
public static String[] getAssemblies ()
{
return MonoPackageManager_Resources.Assemblies;
}
public static String[] getDependencies ()
{
return MonoPackageManager_Resources.Dependencies;
}
public static String getApiPackageName ()
{
return MonoPackageManager_Resources.ApiPackageName;
}
}
class MonoPackageManager_Resources {
public static final String[] Assemblies = new String[]{
/* We need to ensure that "XamarinBarChart.dll" comes first in this list. */
"XamarinBarChart.dll",
"Xamarin.Android.Support.Animated.Vector.Drawable.dll",
"Xamarin.Android.Support.Compat.dll",
"Xamarin.Android.Support.Core.UI.dll",
"Xamarin.Android.Support.Core.Utils.dll",
"Xamarin.Android.Support.Fragment.dll",
"Xamarin.Android.Support.Media.Compat.dll",
"Xamarin.Android.Support.v7.AppCompat.dll",
"Xamarin.Android.Support.Vector.Drawable.dll",
"Xamarin.Controls.BarChart.Android.dll",
"System.Threading.dll",
"System.Runtime.dll",
"System.Collections.dll",
"System.Collections.Concurrent.dll",
"System.Diagnostics.Debug.dll",
"System.Reflection.dll",
"System.Linq.dll",
"System.Runtime.InteropServices.dll",
"System.Runtime.Extensions.dll",
"System.Reflection.Extensions.dll",
};
public static final String[] Dependencies = new String[]{
};
public static final String ApiPackageName = "Mono.Android.Platform.ApiLevel_24";
}
|
[
"eddydn@gmail.com"
] |
eddydn@gmail.com
|
149dae0fbf5e9a282632dc02054ef0f264b6037e
|
846a7668ac964632bdb6db639ab381be11c13b77
|
/android/tools/tradefederation/core/src/com/android/tradefed/profiler/ITestProfiler.java
|
29179515cdfe476f8e1036ed18201c8d8f7a0025
|
[] |
no_license
|
BPI-SINOVOIP/BPI-A64-Android8
|
f2900965e96fd6f2a28ced68af668a858b15ebe1
|
744c72c133b9bf5d2e9efe0ab33e01e6e51d5743
|
refs/heads/master
| 2023-05-21T08:02:23.364495
| 2020-07-15T11:27:51
| 2020-07-15T11:27:51
| 143,945,191
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,598
|
java
|
/*
* Copyright (C) 2016 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.tradefed.profiler;
import com.android.ddmlib.testrunner.TestIdentifier;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.invoker.IInvocationContext;
import com.android.tradefed.profiler.recorder.IMetricsRecorder;
import com.android.tradefed.result.ITestInvocationListener;
import java.util.Map;
/**
* Collects metrics about the device to be made available to {@link ITestInvocationListener}s.
*
* <p>In addition to collecting metrics, implementers can define <i>background work</i> to be done,
* which is intended to simulate specific resource consumption conditions on the device.
*/
public interface ITestProfiler {
/**
* Set up the test profiler.
*
* @param context the {@link IInvocationContext} of the test invocation.
*/
public void setUp(IInvocationContext context) throws DeviceNotAvailableException;
/**
* Begins recording metrics for a single test on all devices. This method is called on each call
* to {@link ITestInvocationListener#testStarted}.
*/
public void startRecordingMetrics() throws DeviceNotAvailableException;
/**
* Stops recording metrics for a single test on all devices and returns an aggregated version of
* the metrics. The metrics are aggregated with {@link IMetricsRecorder#getMergeFunction}. This
* method is called on each call to {@link ITestInvocationListener#testEnded}.
*
* @param test the test to stop recording on
* @return a {@link Map} containing the metrics.
* @throws DeviceNotAvailableException
*/
public Map<String, Double> stopRecordingMetrics(TestIdentifier test)
throws DeviceNotAvailableException;
/**
* Send all of the metrics recorded by this profiler to an {@link ITestInvocationListener}.
*
* @param listener the listener to send metrics to.
*/
public void reportAllMetrics(ITestInvocationListener listener);
}
|
[
"mingxin.android@gmail.com"
] |
mingxin.android@gmail.com
|
d056d095529801ed4f258af25bf2c02d0068e152
|
6a3c810051e221f9bbce2c8b698dd506e61a106c
|
/feedback/src/test/java/com/shekhar/roo/feedback/domain/FeedbackIntegrationTest.java
|
86731c9558e1fe12d7f4ca2754baa96098434128
|
[] |
no_license
|
shekhargulati/spring-roo-playground
|
b3ea1f05472247d688393b8da3afe8d9fec242d2
|
c0ef9d8f574c30741104685120c08b96be50924b
|
refs/heads/master
| 2016-09-05T12:25:47.685067
| 2010-11-30T20:54:42
| 2010-11-30T20:54:42
| 1,093,555
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 317
|
java
|
package com.shekhar.roo.feedback.domain;
import org.springframework.roo.addon.test.RooIntegrationTest;
import com.shekhar.roo.feedback.domain.Feedback;
import org.junit.Test;
@RooIntegrationTest(entity = Feedback.class)
public class FeedbackIntegrationTest {
@Test
public void testMarkerMethod() {
}
}
|
[
"shekhargulati84@gmail.com"
] |
shekhargulati84@gmail.com
|
d0cfec26a9e6fb9526b1e10678fd8c9f3a450fa2
|
89a09e9daa8c5c817d129404d381f1c5fec61c08
|
/eHour-wicketweb/src/main/java/net/rrm/ehour/ui/audit/AuditConstants.java
|
46fa510aa3bcea094e1f409e6b9bfc407ec6e488
|
[] |
no_license
|
nolith/ehour
|
6a57c5661c6dcef595722053ae656e265d680a4c
|
dbb1b9c128383aff0aed4454866d7aee90492415
|
refs/heads/master
| 2021-01-15T22:52:37.986322
| 2012-05-09T23:11:42
| 2012-05-09T23:11:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,403
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package net.rrm.ehour.ui.audit;
public class AuditConstants
{
public static final String PATH_FORM_START_DATE_HIDER = "startDateHider";
public static final String PATH_FORM_END_DATE_HIDER = "endDateHider";
public static final String PATH_FORM_NAME = "name";
public static final String PATH_FORM_ACTION = "action";
public static final String PATH_FORM_BORDER = "border";
public static final String ID_FORM = "criteriaForm";
public final static String PATH_CRITERIA = "reportCriteria";
public final static String PATH_DATA = "reportData";
public final static String PATH_FRAME = "frame";
public final static String PATH_FORM_SUBMIT = "submitButton";
}
|
[
"thies@te-con.nl"
] |
thies@te-con.nl
|
876835b79285b26a28e8b8d3bc67f12481590b5b
|
96483be6d26126206523b6cea0bef9fc5e4ff0fb
|
/bms-bpi/src/main/java/com/jiuyescm/bms/base/config/vo/BmsWarehouseConfigVo.java
|
fd913e7d7f0ab2f2d88f6f96265f1d383da49521
|
[] |
no_license
|
wnagcehn/bms
|
68d27cbc3e0a766d384b1627af043ca883e8bf4a
|
787a095ba3c8aecca3ef4fb312355be4692dd192
|
refs/heads/feature-1.4.14-wc
| 2022-12-05T04:01:31.439454
| 2019-08-09T08:18:42
| 2019-08-09T08:18:42
| 201,433,238
| 3
| 9
| null | 2022-11-21T22:36:27
| 2019-08-09T09:10:46
|
Java
|
UTF-8
|
Java
| false
| false
| 1,502
|
java
|
package com.jiuyescm.bms.base.config.vo;
import java.io.Serializable;
import java.sql.Timestamp;
public class BmsWarehouseConfigVo implements Serializable {
/**
*
*/
private static final long serialVersionUID = -492102201609739159L;
private String warehouseCode;
private int displayLevel;
private int isDropDisplay;
private String creator;
private Timestamp createTime;
private String lastModifier;
private Timestamp lastModifyTime;
public String getWarehouseCode() {
return warehouseCode;
}
public void setWarehouseCode(String warehouseCode) {
this.warehouseCode = warehouseCode;
}
public int getDisplayLevel() {
return displayLevel;
}
public void setDisplayLevel(int displayLevel) {
this.displayLevel = displayLevel;
}
public int getIsDropDisplay() {
return isDropDisplay;
}
public void setIsDropDisplay(int isDropDisplay) {
this.isDropDisplay = isDropDisplay;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public Timestamp getCreateTime() {
return createTime;
}
public void setCreateTime(Timestamp createTime) {
this.createTime = createTime;
}
public String getLastModifier() {
return lastModifier;
}
public void setLastModifier(String lastModifier) {
this.lastModifier = lastModifier;
}
public Timestamp getLastModifyTime() {
return lastModifyTime;
}
public void setLastModifyTime(Timestamp lastModifyTime) {
this.lastModifyTime = lastModifyTime;
}
}
|
[
"caojianwei@jiuyescm.com"
] |
caojianwei@jiuyescm.com
|
2f640026a2491c3e3b4a59e06cd112f70de38ffd
|
35206400dbb3cf062feb5a65e8151c0069d7fa08
|
/CafePerfeito/xsd_Config_Nfe/src/main/java/br/com/cafeperfeito/xsd/config_nfe/layoutConfig/ObjectFactory.java
|
715f14b10f6509edcd9c917629ff4102cdfa7d81
|
[] |
no_license
|
tlmacedo/_olds
|
6427af8ce0c51ca4426c42c98fc97f6424096bdf
|
4c47e682e5cca61123d9d1bf1521cc797f55f900
|
refs/heads/main
| 2023-07-17T04:54:28.782611
| 2021-09-02T14:29:06
| 2021-09-02T14:29:06
| 402,447,345
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,802
|
java
|
//
// Este arquivo foi gerado pela Arquitetura JavaTM para Implementaxe7xe3o de Referxeancia (JAXB) de Bind XML, v2.3.1-b171012.0423
// Consulte <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Todas as modificaxe7xf5es neste arquivo serxe3o perdidas apxf3s a recompilaxe7xe3o do esquema de origem.
// Gerado em: 2020.12.09 xe0s 02:48:49 PM AMT
//
package br.com.cafeperfeito.xsd.config_nfe.layoutConfig;
import javax.xml.bind.annotation.XmlRegistry;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the br.com.cafeperfeito.xsd.config_nfe.layoutConfig package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*/
@XmlRegistry
public class ObjectFactory {
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: br.com.cafeperfeito.xsd.config_nfe.layoutConfig
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link Sefaz }
*/
public Sefaz createSefaz() {
return new Sefaz();
}
/**
* Create an instance of {@link Transp }
*/
public Transp createTransp() {
return new Transp();
}
/**
* Create an instance of {@link Dest }
*/
public Dest createDest() {
return new Dest();
}
/**
* Create an instance of {@link Emit }
*/
public Emit createEmit() {
return new Emit();
}
/**
* Create an instance of {@link Ide }
*/
public Ide createIde() {
return new Ide();
}
/**
* Create an instance of {@link MyConfig }
*/
public MyConfig createMyConfig() {
return new MyConfig();
}
/**
* Create an instance of {@link MeusBancos }
*/
public MeusBancos createMeusBancos() {
return new MeusBancos();
}
/**
* Create an instance of {@link MyInfNfe }
*/
public MyInfNfe createMyInfNfe() {
return new MyInfNfe();
}
/**
* Create an instance of {@link Banco }
*/
public Banco createBanco() {
return new Banco();
}
/**
* Create an instance of {@link InfAdic }
*/
public InfAdic createInfAdic() {
return new InfAdic();
}
/**
* Create an instance of {@link InfRespTec }
*/
public InfRespTec createInfRespTec() {
return new InfRespTec();
}
/**
* Create an instance of {@link CertificadoCfg }
*/
public CertificadoCfg createCertificadoCfg() {
return new CertificadoCfg();
}
/**
* Create an instance of {@link NatOp }
*/
public NatOp createNatOp() {
return new NatOp();
}
/**
* Create an instance of {@link IndPag }
*/
public IndPag createIndPag() {
return new IndPag();
}
/**
* Create an instance of {@link Mod }
*/
public Mod createMod() {
return new Mod();
}
/**
* Create an instance of {@link IdDest }
*/
public IdDest createIdDest() {
return new IdDest();
}
/**
* Create an instance of {@link TpImp }
*/
public TpImp createTpImp() {
return new TpImp();
}
/**
* Create an instance of {@link TpEmis }
*/
public TpEmis createTpEmis() {
return new TpEmis();
}
/**
* Create an instance of {@link TpAmb }
*/
public TpAmb createTpAmb() {
return new TpAmb();
}
/**
* Create an instance of {@link FinNFe }
*/
public FinNFe createFinNFe() {
return new FinNFe();
}
/**
* Create an instance of {@link IndFinal }
*/
public IndFinal createIndFinal() {
return new IndFinal();
}
/**
* Create an instance of {@link IndPres }
*/
public IndPres createIndPres() {
return new IndPres();
}
/**
* Create an instance of {@link ProcEmi }
*/
public ProcEmi createProcEmi() {
return new ProcEmi();
}
/**
* Create an instance of {@link Crt }
*/
public Crt createCrt() {
return new Crt();
}
/**
* Create an instance of {@link IndIEDest }
*/
public IndIEDest createIndIEDest() {
return new IndIEDest();
}
/**
* Create an instance of {@link ModFrete }
*/
public ModFrete createModFrete() {
return new ModFrete();
}
/**
* Create an instance of {@link Status }
*/
public Status createStatus() {
return new Status();
}
/**
* Create an instance of {@link Sefaz.Statuss }
*/
public Sefaz.Statuss createSefazStatuss() {
return new Sefaz.Statuss();
}
/**
* Create an instance of {@link Transp.ModFretes }
*/
public Transp.ModFretes createTranspModFretes() {
return new Transp.ModFretes();
}
/**
* Create an instance of {@link Dest.IndIEDests }
*/
public Dest.IndIEDests createDestIndIEDests() {
return new Dest.IndIEDests();
}
/**
* Create an instance of {@link Emit.Crts }
*/
public Emit.Crts createEmitCrts() {
return new Emit.Crts();
}
/**
* Create an instance of {@link Ide.NatOps }
*/
public Ide.NatOps createIdeNatOps() {
return new Ide.NatOps();
}
/**
* Create an instance of {@link Ide.IndPags }
*/
public Ide.IndPags createIdeIndPags() {
return new Ide.IndPags();
}
/**
* Create an instance of {@link Ide.Mods }
*/
public Ide.Mods createIdeMods() {
return new Ide.Mods();
}
/**
* Create an instance of {@link Ide.IdDests }
*/
public Ide.IdDests createIdeIdDests() {
return new Ide.IdDests();
}
/**
* Create an instance of {@link Ide.TpImps }
*/
public Ide.TpImps createIdeTpImps() {
return new Ide.TpImps();
}
/**
* Create an instance of {@link Ide.TpEmiss }
*/
public Ide.TpEmiss createIdeTpEmiss() {
return new Ide.TpEmiss();
}
/**
* Create an instance of {@link Ide.TpAmbs }
*/
public Ide.TpAmbs createIdeTpAmbs() {
return new Ide.TpAmbs();
}
/**
* Create an instance of {@link Ide.FinNFes }
*/
public Ide.FinNFes createIdeFinNFes() {
return new Ide.FinNFes();
}
/**
* Create an instance of {@link Ide.IndFinals }
*/
public Ide.IndFinals createIdeIndFinals() {
return new Ide.IndFinals();
}
/**
* Create an instance of {@link Ide.IndPress }
*/
public Ide.IndPress createIdeIndPress() {
return new Ide.IndPress();
}
/**
* Create an instance of {@link Ide.ProcEmis }
*/
public Ide.ProcEmis createIdeProcEmis() {
return new Ide.ProcEmis();
}
/**
* Create an instance of {@link MyConfig.CertificadoCfgs }
*/
public MyConfig.CertificadoCfgs createMyConfigCertificadoCfgs() {
return new MyConfig.CertificadoCfgs();
}
/**
* Create an instance of {@link MyConfig.InfRespTecs }
*/
public MyConfig.InfRespTecs createMyConfigInfRespTecs() {
return new MyConfig.InfRespTecs();
}
/**
* Create an instance of {@link MeusBancos.Bancos }
*/
public MeusBancos.Bancos createMeusBancosBancos() {
return new MeusBancos.Bancos();
}
}
|
[
"tl.macedo@hotmail.com"
] |
tl.macedo@hotmail.com
|
fcbc42e4bc6c1bc422a08903ee2d78d52ed67a9d
|
1d6f626cb42f06d6180ef88fababc9c4269f1133
|
/data-holder/src/main/java/au/org/consumerdatastandards/holder/model/BankingProductV2CardArt.java
|
737103e9cd4485b445caf5e7cc3d5c13a6df1e48
|
[
"MIT"
] |
permissive
|
darkedges/java-artefacts
|
4ea573851a2b8cca279db97a0765e4860fe1c805
|
2caf60bc8889f3633172582386d77ccc9f303cc4
|
refs/heads/master
| 2021-01-06T03:38:05.131236
| 2020-02-03T04:50:58
| 2020-02-03T04:50:58
| 241,213,471
| 0
| 0
|
MIT
| 2020-02-17T21:39:35
| 2020-02-17T21:39:34
| null |
UTF-8
|
Java
| false
| false
| 1,652
|
java
|
package au.org.consumerdatastandards.holder.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Objects;
@Entity
public class BankingProductV2CardArt {
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid2")
@JsonIgnore
private String id;
private String title;
private String imageUri;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getImageUri() {
return imageUri;
}
public void setImageUri(String imageUri) {
this.imageUri = imageUri;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof BankingProductV2CardArt)) return false;
BankingProductV2CardArt that = (BankingProductV2CardArt) o;
return id.equals(that.id) &&
Objects.equals(title, that.title) &&
imageUri.equals(that.imageUri);
}
@Override
public int hashCode() {
return Objects.hash(id, title, imageUri);
}
@Override
public String toString() {
return "BankingProductV2CardArt{" +
"id='" + id + '\'' +
", title='" + title + '\'' +
", imageUri='" + imageUri + '\'' +
'}';
}
}
|
[
"fyang1024@gmail.com"
] |
fyang1024@gmail.com
|
ece1b5b77f5de1b37d448fdecd8887f6e6bab207
|
971a85d8c3bb4d604f0038ad1a1b710d711bcae5
|
/HackerRank/src/com/hackerrank/booking/BookingC.java
|
1ed2b6467d7645dda8a0beebe6641668c752675d
|
[] |
no_license
|
harmishlakhani/AlgoAndDataStructure
|
f636a5759b6c956e0f992cf59471daf373b039b1
|
e18dbd9ffb64d36c0b17d792c69b1b55f90207ce
|
refs/heads/master
| 2021-01-10T21:16:05.371879
| 2015-10-19T13:16:21
| 2015-10-19T13:16:21
| 21,704,289
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 685
|
java
|
package com.hackerrank.booking;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class BookingC {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] input = br.readLine().split(" ");
System.out.print(input[0] + " ");
if(input.length > 1) {
for(int i = 1; i < input.length; i++) {
int diff = Integer.parseInt(input[i]) - Integer.parseInt(input[i - 1]);
if (!(diff <= 127 && diff >= -127)) {
System.out.print(-128 + " ");
}
System.out.print(diff + " ");
}
}
}
}
|
[
"harmish.lakhani@gmail.com"
] |
harmish.lakhani@gmail.com
|
4bd3279522e5e74145c6e84165ba26f5eadd8f2f
|
a4aa95273422e31ca4bcd468e3be0d6e2caaff78
|
/HUST/BeginningJava/src/tutorial/javabasic/Nhanvien.java
|
f6191cff80b15f5c00b9f10fc8cd08f6d1d6df0d
|
[] |
no_license
|
vodinhhung/Algorithm_practicing
|
3ba564e6a909bd58b66b408e3fdafbe0326460e9
|
9a193d12cc12caacba38404d46f04380ff3910cb
|
refs/heads/master
| 2022-11-23T13:03:42.665466
| 2022-11-12T16:05:26
| 2022-11-12T16:05:26
| 209,329,842
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 527
|
java
|
package tutorial.javabasic;
class Nhanvien extends Nguoi {
private float luong;
public Nhanvien(String name, int age, String gender, float luong) {
super(name, age, gender);
this.luong = luong;
}
public static void main(String[] args) {
Nhanvien hung = new Nhanvien("Hung", 20, "nam", 3000);
hung.Hienthi();
System.out.println("Luong: " +hung.luong);
Nhanvien anh = new Nhanvien("Anh", 22, "nu", 4000);
anh.Hienthi();
System.out.println("Luong cua " +anh.name+ " la " +anh.luong+ "$/month");
}
}
|
[
"="
] |
=
|
b7b106c4128296fb535986254259ea552c8b3001
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/27/27_d65f9eab5c7d229dc10fbb0ba85813a2285a48a1/ServerHandler/27_d65f9eab5c7d229dc10fbb0ba85813a2285a48a1_ServerHandler_t.java
|
61a7281cb4c9304052616d9ed378920053a1497f
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,644
|
java
|
/**
###############################################################################
# Contributors:
# Damien VILLENEUVE - initial API and implementation
###############################################################################
*/
package com.excilys.stomp.netty.handler;
import java.util.HashMap;
import java.util.Map;
import javax.security.auth.login.LoginException;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.MessageEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.excilys.stomp.authentication.AllowAllAuthentication;
import com.excilys.stomp.authentication.Authentication;
import com.excilys.stomp.model.Frame;
import com.excilys.stomp.netty.ClientRemoteSession;
/**
* @author dvilleneuve
*
*/
public class ServerHandler extends StompHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(ServerHandler.class);
private Authentication globalAuthentication;
private Map<Integer, ClientRemoteSession> clientSessions = new HashMap<Integer, ClientRemoteSession>();
public ServerHandler() {
this.globalAuthentication = AllowAllAuthentication.INSTANCE;
}
@Override
public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
super.channelConnected(ctx, e);
LOGGER.debug("Client {} connected. Starting client session", ctx.getChannel().getRemoteAddress());
// When a client connect to the server, we allocate to him a ClientSession instance (based on the channel id)
Integer channelId = e.getChannel().getId();
if (!clientSessions.containsKey(channelId)) {
clientSessions.put(channelId, new ClientRemoteSession(e.getChannel(), globalAuthentication));
}
}
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent event) throws Exception {
if (!(event.getMessage() instanceof Frame)) {
LOGGER.error("Not a frame... {}", event.getMessage());
return;
}
Frame frame = (Frame) event.getMessage();
LOGGER.debug("Received frame : {}", frame);
// Retrieve the session for this client
ClientRemoteSession clientRemoteSession = clientSessions.get(event.getChannel().getId());
if (clientRemoteSession != null) {
// CONNECT
if (frame.isCommand(Frame.COMMAND_CONNECT)) {
try {
clientRemoteSession.handleConnect(frame);
} catch (LoginException e) {
disconnectClientSession(event.getChannel());
}
}
// DISCONNECT
else if (frame.isCommand(Frame.COMMAND_DISCONNECT)) {
clientRemoteSession.handleDisconnect(frame);
disconnectClientSession(event.getChannel());
}
// SUBSCRIBE
else if (frame.isCommand(Frame.COMMAND_SUBSCRIBE)) {
clientRemoteSession.handleSubscribe(frame);
}
// UNSUBSCRIBE
else if (frame.isCommand(Frame.COMMAND_UNSUBSCRIBE)) {
clientRemoteSession.handleUnsubscribe(frame);
}
// SEND
else if (frame.isCommand(Frame.COMMAND_SEND)) {
clientRemoteSession.handleSend(frame);
}
// UNKNOWN
else {
clientRemoteSession.handleUnknown(frame);
}
}
}
private void disconnectClientSession(Channel channel) {
channel.close().awaitUninterruptibly(15000);
clientSessions.remove(channel.getId());
}
public Authentication getAuthentication() {
return globalAuthentication;
}
public void setAuthentication(Authentication authentication) {
synchronized (this.globalAuthentication) {
this.globalAuthentication = authentication;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
03c52ab7895b617292f75c739fcbbe613f2cfcea
|
78a0dc1be47877910f61dcbac065b318db389ed7
|
/src/main/java/cn/ibdsr/web/common/constant/state/goods/GoodsStatus.java
|
727579e1878d431912f14faf988f1af012143ad9
|
[] |
no_license
|
wangdeming/eshop-admin
|
1d3f4b5062bafd8a8a3a3349f5768e8e98be1ea0
|
d2112ca85236ab812d8f9bbb5e78333db73e99e9
|
refs/heads/master
| 2022-09-19T16:04:35.420487
| 2020-06-04T03:12:46
| 2020-06-04T03:12:46
| 269,248,516
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 959
|
java
|
package cn.ibdsr.web.common.constant.state.goods;
/**
* 商品状态
*
* @author XuZhipeng
* @Date 2019-03-05 09:54:13
*/
public enum GoodsStatus {
NORMAL(1, "正常"), OFFSHELF(2, "下架");
int code;
String message;
GoodsStatus(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public static String valueOf(Integer value) {
if (value == null) {
return "";
} else {
for (GoodsStatus ms : GoodsStatus.values()) {
if (ms.getCode() == value) {
return ms.getMessage();
}
}
return "";
}
}
}
|
[
"774555916@qq.com"
] |
774555916@qq.com
|
2e75e0068a9c30a9db99b575f038e6624eb8a7d4
|
5a027c7a6d9afc1bbc8b2bc86e43e96b80dd9fa8
|
/workspace_movistar_wl11/zejbSolTecClient/ejbModule/co/com/telefonica/atiempo/soltec/ejb/eb/Servicio_basico_supl_apsc_lineaLocal.java
|
2181f1c534d57050b02b6ef79245af560aebf8b6
|
[] |
no_license
|
alexcamp/ArrobaTiempoGradle
|
00135dc6f101e99026a377adc0d3b690cb5f2bd7
|
fc4a845573232e332c5f1211b72216ce227c3f38
|
refs/heads/master
| 2020-12-31T00:18:57.337668
| 2016-05-27T15:02:04
| 2016-05-27T15:02:04
| 59,520,455
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,085
|
java
|
package co.com.telefonica.atiempo.soltec.ejb.eb;
/**
* Local interface for Enterprise Bean: Servicio_basico_supl_apsc_linea
*/
public interface Servicio_basico_supl_apsc_lineaLocal
extends javax.ejb.EJBLocalObject {
/**
* Get accessor for persistent attribute: codigo_ps
*/
public java.lang.String getCodigo_ps();
/**
* Set accessor for persistent attribute: codigo_ps
*/
public void setCodigo_ps(java.lang.String newCodigo_ps);
/**
* This method was generated for supporting the relationship role named recursos_linea_basica.
* It will be deleted/edited when the relationship is deleted/edited.
*/
public co
.com
.telefonica
.atiempo
.soltec
.ejb
.eb
.Recursos_linea_basicaLocal getRecursos_linea_basica();
/**
* This method was generated for supporting the relationship role named recursos_linea_basica.
* It will be deleted/edited when the relationship is deleted/edited.
*/
public void setRecursos_linea_basica(
co
.com
.telefonica
.atiempo
.soltec
.ejb
.eb
.Recursos_linea_basicaLocal aRecursos_linea_basica);
}
|
[
"alexander5075@hotmail.com"
] |
alexander5075@hotmail.com
|
219f0132d989136a891c8d0eb3ad4c42883e409c
|
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
|
/database/src/main/java/adila/db/j5xnlte_sm2dj510un.java
|
57d22f04da61c8c5302134ac2a03061a10ceb328
|
[
"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
| 248
|
java
|
// This file is automatically generated.
package adila.db;
/*
* Samsung Galaxy J5 (2016)
*
* DEVICE: j5xnlte
* MODEL: SM-J510UN
*/
final class j5xnlte_sm2dj510un {
public static final String DATA = "Samsung|Galaxy J5 (2016)|Galaxy J";
}
|
[
"keldeeb@gmail.com"
] |
keldeeb@gmail.com
|
04420f9ff17a4178d0d47516e2f203abf25d0a01
|
4573c5e3841d05df7109e048f26324faf8d458b2
|
/cloud/service/src/main/java/com/xinchen/zookeeper/cloud/service/web/HelloController.java
|
8f7730663d0345924320ec2b134a415cea6bc707
|
[] |
no_license
|
melodyfff/xc-zookeeper
|
7eaf6dd5c8b027ccbb0b1cf2b28eb927a01afa18
|
5425b5ae4d1f565558455f26cbd79fe3062bd48b
|
refs/heads/master
| 2021-06-16T00:10:57.825797
| 2021-01-13T07:00:34
| 2021-01-13T07:00:34
| 194,985,965
| 0
| 0
| null | 2021-04-30T20:32:18
| 2019-07-03T05:33:37
|
Java
|
UTF-8
|
Java
| false
| false
| 715
|
java
|
package com.xinchen.zookeeper.cloud.service.web;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author xinchen
* @version 1.0
* @date 20/01/2020 14:35
*/
@RestController
@RefreshScope
public class HelloController {
@Value("${server.port}")
private String port;
@Value("${hello.message}")
private String message;
@GetMapping("/greeting")
public String hello(){
return String.format("Hello World! from : %s <br> Config Center message: %s",port,message);
}
}
|
[
"307208327@qq.com"
] |
307208327@qq.com
|
d2b49b8478fc7d662fba5d66b3d82a81baec50e5
|
bcbb14fbca8cae5386c0dcb8f15d36c830931d91
|
/src/no/systema/ebooking/controller/LogoutEbookingController.java
|
2cf361199c792142660cdf2769984ab76bd45a79
|
[] |
no_license
|
SystemaAS/espedsg
|
b4457ce5e5ea6fe56efd8475db82b33e443089d3
|
6ce983826a1e696c11ff568a298bde9cf8d91d53
|
refs/heads/master
| 2020-04-05T18:29:45.311582
| 2018-04-25T08:10:48
| 2018-04-25T08:10:48
| 53,931,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,618
|
java
|
package no.systema.ebooking.controller;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.servlet.ModelAndView;
//application imports
import no.systema.main.model.SystemaWebUser;
import no.systema.main.util.AppConstants;
import no.systema.ebooking.util.EbookingConstants;
@Controller
@SessionAttributes(AppConstants.SYSTEMA_WEB_USER_KEY)
@Scope("session")
public class LogoutEbookingController {
private static final Logger logger = Logger.getLogger(LogoutEbookingController.class.getName());
private ModelAndView successView = new ModelAndView("dashboard");
private ModelAndView loginView = new ModelAndView("login");
@RequestMapping(value="logoutEbooking.do", method=RequestMethod.GET)
public ModelAndView logoutTds(HttpSession session, HttpServletResponse response){
SystemaWebUser appUser = (SystemaWebUser)session.getAttribute(AppConstants.SYSTEMA_WEB_USER_KEY);
ModelAndView view = null;
if(appUser==null){
view = this.loginView;
}else{
logger.info("Logging out from Systema Ebooking ...");
session.removeAttribute(AppConstants.ASPECT_ERROR_MESSAGE);
session.removeAttribute(EbookingConstants.SESSION_CHILDWINDOW_FLAG);
view = this.successView;
}
return view;
}
}
|
[
"oscar@systema.no"
] |
oscar@systema.no
|
313d0820bb66dddec31d1eed328cdac2fdf08dc1
|
1053e353eb4e5823b62696e44d98bac2655f6c31
|
/src/main/java/com/rachid/myapp/config/LocaleConfiguration.java
|
13207de31079467230c9524a9231ee486f2a2eba
|
[] |
no_license
|
RachidSoukane/jhipster-sample-application
|
6425e11ae84510dbe233fc8d42fb85955efa20ca
|
5d41f46cb173299561cbcc392268514834d5e2b0
|
refs/heads/main
| 2023-05-08T20:02:45.130173
| 2021-05-31T18:34:22
| 2021-05-31T18:34:22
| 372,597,748
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,028
|
java
|
package com.rachid.myapp.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.*;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import tech.jhipster.config.locale.AngularCookieLocaleResolver;
@Configuration
public class LocaleConfiguration implements WebMvcConfigurer {
@Bean
public LocaleResolver localeResolver() {
AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver();
cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY");
return cookieLocaleResolver;
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("language");
registry.addInterceptor(localeChangeInterceptor);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
589ee31e98b7e05406db8e609e9d3de1cdc9c3db
|
c477a2f497e2787a3484aacbc802225a3e5db48c
|
/app/src/main/java/com/smartydroid/android/kit/demo/ui/fragment/AccountFragment.java
|
4d987eb61ca7c0f26ef796f4700fe3e7e1ad7673
|
[
"Apache-2.0"
] |
permissive
|
4handheld/android-starter-kit
|
e7bad80b4532e840b9070ef4adb852fa04508356
|
d5674473caf20a6d0cf3035a630cae51a27528a5
|
refs/heads/master
| 2020-03-31T22:08:23.932726
| 2018-03-28T06:23:32
| 2018-03-28T06:23:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,943
|
java
|
package com.smartydroid.android.kit.demo.ui.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.TextView;
import butterknife.Bind;
import butterknife.OnClick;
import com.facebook.drawee.view.SimpleDraweeView;
import com.smartydroid.android.kit.demo.NavUtils;
import com.smartydroid.android.kit.demo.R;
import com.smartydroid.android.kit.demo.model.entity.User;
import com.smartydroid.android.starter.kit.account.AccountManager;
import com.smartydroid.android.starter.kit.utilities.ViewUtils;
/**
* Created by YuGang Yang on February 21, 2016.
* Copyright 2015-2016 qiji.tech. All rights reserved.
*/
public class AccountFragment extends BaseFragment {
@Bind(R.id.toolbar) Toolbar mToolbar;
@Bind(R.id.container_login) View mLoginContainer;
@Bind(R.id.container_account) View mUserInfoContainer;
@Bind(R.id.image_avatar) SimpleDraweeView mAvatarView;
@Bind(R.id.text_account_username) TextView mUsernameTextView;
@Override protected int getFragmentLayout() {
return R.layout.fragment_account;
}
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mToolbar.setTitle(R.string.toolbar_title_account);
}
@Override public void onResume() {
super.onResume();
if (AccountManager.isLogin()) {
ViewUtils.setGone(mLoginContainer, true);
ViewUtils.setGone(mUserInfoContainer, false);
User user = AccountManager.getCurrentAccount();
mUsernameTextView.setText(user.phone);
mAvatarView.setImageURI(user.uri());
} else {
ViewUtils.setGone(mLoginContainer, false);
ViewUtils.setGone(mUserInfoContainer, true);
}
}
@OnClick({
R.id.container_account_settings,
}) public void onClick(View view) {
NavUtils.startAccountProfile(getActivity());
}
}
|
[
"smartydroid@gmail.com"
] |
smartydroid@gmail.com
|
04c965dc133266ee2821235df149db199b932f7b
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/yauaa/validation/822/TestAnnotationBadUsages.java
|
1d75b42e2e5c735efcba616c5b9b7283817868aa
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,110
|
java
|
/*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2018 Niels Basjes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package nl.basjes.parse.useragent.annotate;
import nl.basjes.parse.useragent.analyze.InvalidParserConfigurationException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Serializable;
import static org.junit.Assert.assertNull;
public class TestAnnotationBadUsages {
private static final Logger LOG = LoggerFactory.getLogger(TestAnnotationBadUsages.class);
@Rule
public ExpectedException expectedEx = ExpectedException.none();
@Test
public void testNullInitAnalyzer(){
expectedEx.expect(InvalidParserConfigurationException.class);
expectedEx.expectMessage("[Initialize] The mapper instance is null.");
UserAgentAnnotationAnalyzer<String> userAgentAnalyzer = new UserAgentAnnotationAnalyzer<>();
userAgentAnalyzer.initialize(null);
}
@Test
public void testNullInit(){
UserAgentAnnotationAnalyzer<String> userAgentAnalyzer = new UserAgentAnnotationAnalyzer<>();
assertNull(userAgentAnalyzer.map(null));
}
@Test
public void testNoInit(){
expectedEx.expect(InvalidParserConfigurationException.class);
expectedEx.expectMessage("[Map] The mapper instance is null.");
UserAgentAnnotationAnalyzer<String> userAgentAnalyzer = new UserAgentAnnotationAnalyzer<>();
assertNull(userAgentAnalyzer.map("Foo"));
}
// ----------------------------------------------------------------
public static class MapperWithoutGenericType
implements UserAgentAnnotationMapper, Serializable {
private final transient UserAgentAnnotationAnalyzer userAgentAnalyzer;
@SuppressWarnings("unchecked") // Here we deliberately created some bad code to check the behavior.
public MapperWithoutGenericType() {
userAgentAnalyzer = new UserAgentAnnotationAnalyzer<>();
userAgentAnalyzer.initialize(this);
}
public Object enrich(Object record) {
return record;
}
@Override
public String getUserAgentString(Object record) {
return null;
}
}
@Test
public void testMissingTypeParameter(){
expectedEx.expect(InvalidParserConfigurationException.class);
expectedEx
.expectMessage("Couldn't find the used generic type of the UserAgentAnnotationMapper.");
new MapperWithoutGenericType();
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
844ca8aac180271014a682d77f4049b2bcfed65b
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/digits/08c7ea4ac39aa6a5ab206393bb4412de9d2c365ecdda9c1b391be963c1811014ed23d2722d7433b8e8a95305eee314d39da4950f31e01f9147f90af91a5c433a/000/mutations/38/digits_08c7ea4a_000.java
|
bc7856be8b5acaa8e9b9754d836ea81b0141b3ba
|
[] |
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
| 3,702
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class digits_08c7ea4a_000 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
digits_08c7ea4a_000 mainClass = new digits_08c7ea4a_000 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj num = new IntObj (), numl = new IntObj (), n = new IntObj (), d0 =
new IntObj (), d1 = new IntObj (), d2 = new IntObj (), d3 =
new IntObj (), d4 = new IntObj (), d5 = new IntObj (), d6 =
new IntObj (), d7 = new IntObj (), d8 = new IntObj (), d9 =
new IntObj ();
output += (String.format ("\nEnter an integer > "));
num.value = scanner.nextInt ();
numl.value = num.value;
n.value = 0;
while (numl.value > 0) {
n.value += 1;
numl.value = numl.value / 10;
}
d0.value = num.value % 10;
num.value = (num.value - d0.value) / 10;
d1.value = num.value % 10;
num.value = (num.value - d1.value) / 10;
d2.value = num.value % 10;
num.value = (num.value - d2.value) / 10;
d3.value = num.value % 10;
num.value = (num.value - d3.value) / 10;
d4.value = num.value % 10;
num.value = (num.value - d4.value) / 10;
d5.value = num.value % 10;
num.value = (num.value - d5.value) / 10;
d6.value = num.value % 10;
num.value = (num.value - d6.value) / 10;
d7.value = num.value % 10;
num.value = (num.value - d7.value) / 10;
d8.value = num.value % 10;
num.value = (num.value - d8.value) / 10;
d9.value = num.value % 10;
num.value = (num.value - d9.value) / 10;
output += (String.format ("%d\n", d0.value));
if (n.value > 1) {
output += (String.format ("%d\n", d1.value));
}
if (((num.value) - (d6.value)) / 10 > 2) {
output += (String.format ("%d\n", d2.value));
}
if (n.value > 3) {
output += (String.format ("%d\n", d3.value));
}
if (n.value > 4) {
output += (String.format ("%d\n", d4.value));
}
if (n.value > 5) {
output += (String.format ("%d\n", d5.value));
}
if (n.value > 6) {
output += (String.format ("%d\n", d6.value));
}
if (n.value > 7) {
output += (String.format ("%d\n", d7.value));
}
if (n.value > 8) {
output += (String.format ("%d\n", d8.value));
}
if (n.value > 9) {
output += (String.format ("%d\n", d9.value));
}
output += (String.format ("That's all, have a nice day!\n"));
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
ecb8f40677630647f1d956635985454b9cbbd68b
|
eaadbbf75cefd3896ed93c45f23c30d9c4b80ff9
|
/sources/com/applovin/impl/sdk/C0297ae.java
|
de0019107535b42249120847596727215b85e109
|
[] |
no_license
|
Nicholas1771/Mighty_Monkey_Android_Game
|
2bd4db2951c6d491f38da8e5303e3c004b4331c7
|
042601e568e0c22f338391c06714fa104dba9a5b
|
refs/heads/master
| 2023-03-09T00:06:01.492150
| 2021-02-27T04:02:42
| 2021-02-27T04:02:42
| 342,766,422
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 150
|
java
|
package com.applovin.impl.sdk;
/* renamed from: com.applovin.impl.sdk.ae */
public enum C0297ae {
UNSPECIFIED,
DISMISS,
DO_NOT_DISMISS
}
|
[
"nicholasiozzo17@gmail.com"
] |
nicholasiozzo17@gmail.com
|
82d51b929de495957326baeeb1da19de4d8e0069
|
c0a717b3cae89fd5f7afd5270644774fde8b6ec1
|
/server/src/java/com/sun/honeycomb/nodeconfig/NodeConfigException.java
|
c3fc7a98b59db8b9e84387fd0d1c6d43dd5650e5
|
[] |
no_license
|
elambert/honeycomb
|
c11f60ace76ca0ab664e61b4d2ff7ead4653e0de
|
abd6ce4381b5db36a6c6b23e84c1fb8e8412d7b5
|
refs/heads/master
| 2020-03-27T22:39:34.505640
| 2012-08-29T20:09:16
| 2012-08-29T20:09:16
| 472,780
| 3
| 1
| null | 2012-08-29T19:52:10
| 2010-01-14T23:39:04
|
Java
|
WINDOWS-1252
|
Java
| false
| false
| 1,737
|
java
|
/*
* Copyright © 2008, Sun Microsystems, Inc.
*
* 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 Sun Microsystems, Inc. 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
* 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 com.sun.honeycomb.nodeconfig;
public class NodeConfigException
extends Exception {
public NodeConfigException(String msg) {
super(msg);
}
}
|
[
"eric.d.lambert@gmail.com"
] |
eric.d.lambert@gmail.com
|
7135657eca9f529547a0dd8c3b88fa3c96e63ade
|
e852f4e9421ec7ceaf077abb07562ac7d012ec63
|
/serg/tags/serg-2007-04-19/src/org/webdsl/serg/domain/GraduatedHome.java
|
bbd8297c350bea039f11d4623b42d891e1ab5563
|
[] |
no_license
|
webdsl/webdsl-legacy-repo
|
e181f0d9f6874f88db1d870dd7000e8f6513b3a1
|
0a78926ff988ed8d56ae90aed782aa16072be87d
|
refs/heads/master
| 2021-01-21T12:43:37.550267
| 2015-06-19T16:05:29
| 2015-06-19T16:05:29
| 37,973,923
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 338
|
java
|
package org.webdsl.serg.domain;
import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;
@Name("graduatedHome") public class GraduatedHome extends EntityHome<Graduated>
{
@Factory("graduated") public Graduated initGraduated()
{
return getInstance();
}
}
|
[
"eelcovis@gmail.com"
] |
eelcovis@gmail.com
|
2350e5e405e468dbd623492dc5ab9d3dfa48e333
|
a4d9e7d69e46fb87a1281a81bdbd4a2042f5750f
|
/src/main/java/togos/networkrts/experimental/game19/world/BlargNonTile.java
|
acab911413ee348e79549cc0e483a975e3665e3e
|
[] |
no_license
|
TOGoS/NetworkRTS
|
307dbf6a91d64d96d81ad8a6dc19d12dc2e084d5
|
e762ed89e368a3d9a36d550b691e6c17f986806e
|
refs/heads/master
| 2016-09-05T12:20:28.133744
| 2016-01-21T16:15:40
| 2016-01-21T16:15:40
| 15,516,556
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,441
|
java
|
package togos.networkrts.experimental.game19.world;
import togos.networkrts.experimental.game19.scene.Icon;
import togos.networkrts.experimental.game19.scene.ImageHandle;
import togos.networkrts.experimental.game19.sim.NonTileUpdateContext;
import togos.networkrts.experimental.game19.sim.Simulation;
import togos.networkrts.experimental.gameengine1.index.AABB;
import togos.networkrts.util.BitAddressUtil;
public class BlargNonTile implements NonTile
{
public final long referenceTime;
public final double x, y, vx, vy; // For simplicity, velocity is meters per clock tick
public final AABB absolutePhysicalAabb;
public final long baseBitAddress;
public final NonTileInternals<? super BlargNonTile> internals;
public BlargNonTile(
long ba, long referenceTime, double x, double y, double vx, double vy,
NonTileInternals<? super BlargNonTile> internals
) {
this.baseBitAddress = ba & BitAddresses.ID_MASK;
this.referenceTime = referenceTime;
this.x = x; this.vx = vx;
this.y = y; this.vy = vy;
this.absolutePhysicalAabb = internals.getRelativePhysicalAabb().shiftedBy(x,y,0);
this.internals = internals;
}
/** 'Centered cube bounding box' */
static AABB ccbb( double x, double y, double diameter ) {
double radius = diameter/2;
return new AABB( x-radius, y-radius, -radius, x+radius, y+radius, +radius );
}
public static BlargNonTile create( int id, long referenceTime, double x, double y, NonTileInternals<? super BlargNonTile> behavior ) {
return new BlargNonTile( id, referenceTime, x, y, 0, 0, behavior );
}
public static BlargNonTile create( int id, long referenceTime, double x, double y, ImageHandle image, float diameter, NonTileInternals<? super BlargNonTile> internals ) {
return create( id, referenceTime, x, y, internals );
}
protected boolean hasVelocity() { return vx != 0 || vy != 0; }
@Override public long getReferenceTime() { return referenceTime; }
@Override public AABB getAabb() { return absolutePhysicalAabb; }
@Override public long getBitAddress() {
return
BitAddresses.TYPE_NONTILE |
internals.getNonTileAddressFlags() |
baseBitAddress;
}
@Override public long getMinBitAddress() { return getBitAddress(); }
@Override public long getMaxBitAddress() { return getBitAddress(); }
@Override public long getNextAutoUpdateTime() {
return Math.min(
hasVelocity() ? referenceTime + 1 : Long.MAX_VALUE,
internals.getNextAutoUpdateTime()
);
}
@Override public double getX() { return x; }
@Override public double getY() { return y; }
@Override public double getVelocityX() { return vx; }
@Override public double getVelocityY() { return vy; }
@Override public Icon getIcon() { return internals.getIcon(); }
@Override public AABB getAbsolutePhysicalAabb() { return absolutePhysicalAabb; }
@Override public AABB getRelativePhysicalAabb() { return internals.getRelativePhysicalAabb(); }
public BlargNonTile withInternals(NonTileInternals<? super BlargNonTile> internals) {
return internals == this.internals ? this :
new BlargNonTile(baseBitAddress, referenceTime, x, y, vx, vy, internals);
}
public BlargNonTile withId(int id) {
return new BlargNonTile(id, referenceTime, x, y, vx, vy, internals);
}
@Override public BlargNonTile withPositionAndVelocity(long referenceTime, double x, double y, double vx, double vy) {
return new BlargNonTile(baseBitAddress, referenceTime, x, y, vx, vy, internals);
}
public BlargNonTile withVelocity(long referenceTime, double vx, double vy) {
return withPositionAndVelocity(referenceTime, x, y, vx, vy);
}
public BlargNonTile withPosition(long referenceTime, double x, double y) {
return withPositionAndVelocity(referenceTime, x, y, vx, vy);
}
public boolean isSpecificallyAddressedBy(Message m) {
return m.isApplicableTo(this) && BitAddressUtil.rangeContains(m, getBitAddress());
}
// This might nt need to be part of the interface, since
// withPositionAndVelocity exists
protected BlargNonTile withUpdatedPosition(long newTime) {
if( newTime == referenceTime || (vx == 0 && vy == 0) ) return this;
double interval = Simulation.SIMULATED_TICK_INTERVAL * (newTime-referenceTime);
return withPosition(newTime, x+vx*interval, y+vy*interval);
}
@Override public NonTile update(
long time, World w, MessageSet incomingMessages, NonTileUpdateContext updateContext
) {
return internals.update(this, time, w, incomingMessages, updateContext);
}
}
|
[
"togos00@gmail.com"
] |
togos00@gmail.com
|
2f1a7a4ae9e9dcbe3da667c6dcc5a24904772ae9
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE89_SQL_Injection/CWE89_SQL_Injection__console_readLine_executeQuery_53d.java
|
2009c6beb3c34e5bb9045f2972590c46fd4604ce
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 6,580
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__console_readLine_executeQuery_53d.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-53d.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: console_readLine Read data from the console using readLine()
* GoodSource: A hardcoded string
* Sinks: executeQuery
* GoodSink: Use prepared statement and executeQuery (properly)
* BadSink : data concatenated into SQL statment used in executeQuery(), which could result in SQL Injection
* Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package
*
* */
package testcases.CWE89_SQL_Injection;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE89_SQL_Injection__console_readLine_executeQuery_53d
{
public void bad_sink(String data ) throws Throwable
{
Connection conn_tmp2 = null;
Statement sqlstatement = null;
ResultSet sqlrs = null;
try {
conn_tmp2 = IO.getDBConnection();
sqlstatement = conn_tmp2.createStatement();
/* POTENTIAL FLAW: data concatenated into SQL statment used in executeQuery(), which could result in SQL Injection */
sqlrs = sqlstatement.executeQuery("select * from users where name='"+data+"'");
IO.writeLine(sqlrs.getRow()); /* Use ResultSet in some way */
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error getting database connection", se);
}
finally {
try {
if( sqlrs != null )
{
sqlrs.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", e);
}
finally {
try {
if( sqlstatement != null )
{
sqlstatement.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing Statement", e);
}
finally {
try {
if( conn_tmp2 != null )
{
conn_tmp2.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing Connection", e);
}
}
}
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(String data ) throws Throwable
{
Connection conn_tmp2 = null;
Statement sqlstatement = null;
ResultSet sqlrs = null;
try {
conn_tmp2 = IO.getDBConnection();
sqlstatement = conn_tmp2.createStatement();
/* POTENTIAL FLAW: data concatenated into SQL statment used in executeQuery(), which could result in SQL Injection */
sqlrs = sqlstatement.executeQuery("select * from users where name='"+data+"'");
IO.writeLine(sqlrs.getRow()); /* Use ResultSet in some way */
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error getting database connection", se);
}
finally {
try {
if( sqlrs != null )
{
sqlrs.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", e);
}
finally {
try {
if( sqlstatement != null )
{
sqlstatement.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing Statement", e);
}
finally {
try {
if( conn_tmp2 != null )
{
conn_tmp2.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing Connection", e);
}
}
}
}
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(String data ) throws Throwable
{
Connection conn_tmp2 = null;
PreparedStatement sqlstatement = null;
ResultSet sqlrs = null;
try {
/* FIX: Use prepared statement and executeQuery (properly) */
conn_tmp2 = IO.getDBConnection();
sqlstatement = conn_tmp2.prepareStatement("select * from users where name=?");
sqlstatement.setString(1, data);
sqlrs = sqlstatement.executeQuery();
IO.writeLine(sqlrs.getRow()); /* Use ResultSet in some way */
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error getting database connection", se);
}
finally {
try {
if( sqlrs != null )
{
sqlrs.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", e);
}
finally {
try {
if( sqlstatement != null )
{
sqlstatement.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing PreparedStatment", e);
}
finally {
try {
if( conn_tmp2 != null )
{
conn_tmp2.close();
}
}
catch( SQLException e )
{
IO.logger.log(Level.WARNING, "Error closing Connection", e);
}
}
}
}
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
0522c40e07eb6b414b46e3a2f258739e8ffaca6d
|
9c66f726a3f346fe383c5656046a2dbeea1caa82
|
/myrobotlab/src/org/myrobotlab/client/DrupalNameProvider.java
|
3ab9d4306f25aa4b0d8ce0f16172ee545288ca3a
|
[
"Apache-2.0"
] |
permissive
|
Navi-nk/Bernard-InMoov
|
c6c9e9ba22a13aa5cbe812b4c1bf5f9f9b03dd21
|
686fa377141589a38d4c9bed54de8ddd128e2bca
|
refs/heads/master
| 2021-01-21T10:29:28.949744
| 2017-05-23T05:39:28
| 2017-05-23T05:39:28
| 91,690,887
| 0
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,991
|
java
|
package org.myrobotlab.client;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import org.myrobotlab.logging.LoggerFactory;
import org.myrobotlab.logging.Logging;
import org.myrobotlab.service.Shoutbox.NameProvider;
import org.slf4j.Logger;
public class DrupalNameProvider implements NameProvider {
public static final Logger log = LoggerFactory.getLogger(DrupalNameProvider.class);
private Connection conn = null;
@Override
public String getName(String ip) {
log.info(String.format("==DrupalNameProvider.getName(%s)==", ip));
try {
if (this.conn == null) {
Class.forName("com.mysql.jdbc.Driver");
log.info("attempting to connect to mysql");
this.conn = DriverManager.getConnection("jdbc:mysql://localhost/myrobotlab", "root", "");
if (this.conn == null) {
log.error("could not connect");
return ip;
}
}
String sql = String.format("SELECT users.name, sessions.uid, sessions.hostname FROM myrobotlab.users " + " INNER JOIN myrobotlab.sessions ON sessions.uid=users.uid "
+ " WHERE sessions.hostname = '%s' " + " ORDER BY sessions.uid DESC", ip);
Statement statement = this.conn.createStatement();
log.info("executing query");
ResultSet records = statement.executeQuery(sql);
String user = null;
while (records.next()) {
user = records.getString("name");
log.info(String.format("found [%s] for ip %s", user, ip));
if ((user == null) || (user.trim().length() == 0 || user.trim().equals(""))) {
log.info("user null or blank skipping");
continue;
} else {
log.info(String.format("found user [%s]", user));
return user;
}
}
log.info(String.format("no not blank records found returning ip [%s]", ip));
return ip;
} catch (Exception e) {
Logging.logError(e);
}
return ip;
}
}
|
[
"naval.kumar99@gmail.com"
] |
naval.kumar99@gmail.com
|
8a89bfc1abb5a1ea4fa270437424e428723833d9
|
7f51c93ee3db32286441c04ce9f09319c67f0acc
|
/src/main/java/com/examplemod/mixin/MixinGuiMainMenu.java
|
b2bd468ff8fa94c20478d0e7bb840256cffb051c
|
[] |
no_license
|
Seferan/LiteLoaderExampleMod
|
05a015df9b2b0f1887ac8361437aaee653ffdb4b
|
a6f2201f2a7e1023b0b232b82b7f419d31da7a42
|
refs/heads/master
| 2021-07-12T05:51:25.158964
| 2017-08-07T14:12:07
| 2017-08-07T14:12:07
| 97,849,898
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,964
|
java
|
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.examplemod.mixin;
import net.minecraft.client.gui.GuiMainMenu;
import net.minecraft.client.gui.GuiScreen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(GuiMainMenu.class)
public abstract class MixinGuiMainMenu extends GuiScreen
{
@Shadow private float panoramaTimer;
@Inject(method = "drawScreen(IIF)V", at = @At("HEAD"))
private void onUpdateScreen(int mouseX, int mouseY, float partialTicks, CallbackInfo ci)
{
this.panoramaTimer += partialTicks * 3;
}
}
|
[
"adam@eq2.co.uk"
] |
adam@eq2.co.uk
|
d58a9a1b10cc3e7d7989e86cee0031b831147189
|
0291844a6f5b273556119d10c6e4e7bbc77f90cf
|
/app/src/main/java/com/renren/ruolan/travelaround/cn/sharesdk/onekeyshare/themes/classic/land/PlatformPageLand.java
|
b953327cfb95ab77aa6e35ccf1fe625a817f1384
|
[
"Apache-2.0"
] |
permissive
|
wuyinlei/TravelAround
|
635fb43af8076917f0644bb20f5f54a82ebd0bf6
|
32ac4412fb6b3a85fcdf0016473d8d0b1a1ef8fa
|
refs/heads/master
| 2020-04-06T06:25:45.002326
| 2016-12-29T09:13:45
| 2016-12-29T09:13:45
| 73,889,497
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,147
|
java
|
/*
* 官网地站:http://www.mob.com
* 技术支持QQ: 4006852216
* 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复)
*
* Copyright (c) 2013年 mob.com. All rights reserved.
*/
package com.renren.ruolan.travelaround.cn.sharesdk.onekeyshare.themes.classic.land;
import com.renren.ruolan.travelaround.cn.sharesdk.onekeyshare.OnekeyShareThemeImpl;
import com.renren.ruolan.travelaround.cn.sharesdk.onekeyshare.themes.classic.PlatformPage;
import com.renren.ruolan.travelaround.cn.sharesdk.onekeyshare.themes.classic.PlatformPageAdapter;
import java.util.ArrayList;
/** 横屏的九宫格页面 */
public class PlatformPageLand extends PlatformPage {
public PlatformPageLand(OnekeyShareThemeImpl impl) {
super(impl);
}
public void onCreate() {
requestLandscapeOrientation();
super.onCreate();
}
protected PlatformPageAdapter newAdapter(ArrayList<Object> cells) {
return new PlatformPageAdapterLand(this, cells);
}
}
|
[
"wuyinlei19931118@hotmail.com"
] |
wuyinlei19931118@hotmail.com
|
34e2a22acbb07545330a52b041bdfa129e1ec39b
|
2749c41932af2432ce8b6eda8542c134a9fbc288
|
/src/test/java/com/wizeek/leetcode/p412/SolutionTest.java
|
80eb5161cda6aed17cdf98ff49b0488090f0c755
|
[] |
no_license
|
araslanov/leetcode
|
857a637a0d642a4a8732afa0cd3a6321dfcdb9da
|
723564c6ec27c737cd77ac58ee2b1e5cb898c191
|
refs/heads/master
| 2022-10-15T09:21:29.161545
| 2022-09-20T06:21:39
| 2022-09-20T06:21:39
| 135,767,448
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 854
|
java
|
package com.wizeek.leetcode.p412;
import org.junit.Before;
import org.junit.Test;
import java.util.List;
import static org.junit.Assert.assertEquals;
public class SolutionTest {
private Solution solution;
@Before
public void setUp() {
solution = new Solution();
}
@Test
public void test1() {
assertEquals(List.of("1"), solution.fizzBuzz(1));
}
@Test
public void test2() {
assertEquals(List.of("1", "2", "Fizz"), solution.fizzBuzz(3));
}
@Test
public void test3() {
assertEquals(List.of("1", "2", "Fizz", "4", "Buzz"), solution.fizzBuzz(5));
}
@Test
public void test4() {
assertEquals(List.of("1", "2", "Fizz", "4", "Buzz", "Fizz", "7", "8", "Fizz", "Buzz", "11", "Fizz", "13", "14",
"FizzBuzz"), solution.fizzBuzz(15));
}
}
|
[
"wizeek80@gmail.com"
] |
wizeek80@gmail.com
|
12fefbd4183c398319caaacecfaccdc5b8347f44
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/JetBrains--intellij-community/9f107c83fa1978d800ed6940ecf2eb127f09163d/after/BaseEnterHandler.java
|
76985833a217fc05f8e10c0ccdb1b6ce375b4d0b
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,185
|
java
|
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.codeInsight.editorActions;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.actionSystem.DocCommandGroupId;
import com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler;
public abstract class BaseEnterHandler extends EditorWriteActionHandler {
private static final String GROUP_ID = "EnterHandler.GROUP_ID";
protected BaseEnterHandler() {
super(true);
}
@Override
public DocCommandGroupId getCommandGroupId(Editor editor) {
return DocCommandGroupId.withGroupId(editor.getDocument(), GROUP_ID);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
44f68da594e8890f046cc497059908eee4de3ddd
|
f2f0e98d242baf79fda5778328ae40a583582bdb
|
/400_xowa/src/gplx/xowa/setup/maints/Wmf_dump_list_parser.java
|
abd18d7d4756ef49190e47a78811a5e9f32a3e4e
|
[] |
no_license
|
ATCARES/xowa
|
0ca09f7aa08f400713f9d298bc9843b96e000a0c
|
5957bd0cb0de1dbfafae1aef9055846713a5e521
|
refs/heads/master
| 2021-01-15T14:41:57.565426
| 2014-04-14T03:28:27
| 2014-04-14T03:28:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,068
|
java
|
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program 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 gplx.xowa.setup.maints; import gplx.*; import gplx.xowa.*; import gplx.xowa.setup.*;
public class Wmf_dump_list_parser {
public Wmf_dump_itm[] Parse(byte[] src) {
OrderedHash itms = OrderedHash_.new_bry_();
int pos = 0;
while (true) {
int a_pos = Byte_ary_finder.Find_fwd(src, Find_anchor, pos); if (a_pos == ByteAry_.NotFound) break; // no more anchors found
pos = a_pos + Find_anchor.length;
try {
Wmf_dump_itm itm = new Wmf_dump_itm();
if (!Parse_href(itm, src, a_pos)) continue; // anchor not parseable; not a link to a wmf dump
if (itms.Has(itm.Wiki_abrv())) continue; // ignore dupes
itms.Add(itm.Wiki_abrv(), itm);
itm.Status_time_(Parse_status_time(src, a_pos));
itm.Status_msg_(Parse_status_msg(src, a_pos));
} catch (Exception e) {Err_.Noop(e);}
}
return (Wmf_dump_itm[])itms.XtoAry(Wmf_dump_itm.class);
}
private boolean Parse_href(Wmf_dump_itm itm, byte[] src, int a_pos) { // EX: http://dumps.wikimedia.org/enwiki/20130807
int href_pos = Byte_ary_finder.Find_fwd(src, Find_href, a_pos); if (href_pos == ByteAry_.NotFound) return false; // no <li>; something bad happened
int href_bgn_pos = Byte_ary_finder.Find_fwd(src, Byte_ascii.Quote, href_pos + Find_href.length);
int href_end_pos = Byte_ary_finder.Find_fwd(src, Byte_ascii.Quote, href_bgn_pos + 1); if (href_end_pos == ByteAry_.NotFound) return false;
byte[] href_bry = ByteAry_.Mid(src, href_bgn_pos + 1, href_end_pos);
int date_end = href_bry.length;
int date_bgn = Byte_ary_finder.Find_bwd(href_bry, Byte_ascii.Slash); if (date_bgn == ByteAry_.NotFound) return false;
byte[] date_bry = ByteAry_.Mid(href_bry, date_bgn + 1, date_end);
DateAdp date = DateAdp_.parse_fmt(String_.new_ascii_(date_bry), "yyyyMMdd");
itm.Dump_date_(date);
int abrv_end = date_bgn;
int abrv_bgn = Byte_ary_finder.Find_bwd(href_bry, Byte_ascii.Slash, abrv_end); if (abrv_bgn == ByteAry_.NotFound) abrv_bgn = -1; // "enwiki/20130708"
byte[] abrv_bry = ByteAry_.Mid(href_bry, abrv_bgn + 1, abrv_end);
itm.Wiki_abrv_(ByteAry_.Replace(abrv_bry, Byte_ascii.Underline, Byte_ascii.Dash));
return true;
}
private DateAdp Parse_status_time(byte[] src, int a_pos) {
int li_pos = Byte_ary_finder.Find_bwd(src, Find_li, a_pos); if (li_pos == ByteAry_.NotFound) return null;
int bgn = Byte_ary_finder.Find_fwd(src, Byte_ascii.Gt, li_pos + Find_li.length); if (bgn == ByteAry_.NotFound) return null;
byte[] rv_bry = ByteAry_.Mid(src, bgn + 1, a_pos);
return DateAdp_.parse_fmt(String_.Trim(String_.new_ascii_(rv_bry)), "yyyy-MM-dd HH:mm:ss");
}
private byte[] Parse_status_msg(byte[] src, int a_pos) {
int span_pos = Byte_ary_finder.Find_fwd(src, Find_span_bgn, a_pos); if (span_pos == ByteAry_.NotFound) return null;
int bgn = Byte_ary_finder.Find_fwd(src, Byte_ascii.Gt, span_pos + Find_span_bgn.length); if (bgn == ByteAry_.NotFound) return null;
int end = Byte_ary_finder.Find_fwd(src, Find_span_end, bgn); if (end == ByteAry_.NotFound) return null;
return ByteAry_.Mid(src, bgn + 1, end);
}
private static byte[]
Find_anchor = ByteAry_.new_ascii_("<a")
, Find_href = ByteAry_.new_ascii_(" href=")
, Find_li = ByteAry_.new_ascii_("<li")
, Find_span_bgn = ByteAry_.new_ascii_("<span")
, Find_span_end = ByteAry_.new_ascii_("</span>")
;
}
|
[
"gnosygnu@gmail.com"
] |
gnosygnu@gmail.com
|
44209f8a9d87d896bc9dff39996ef759dba4dd46
|
e737a537195a431fe255fa3839a1e337d806a372
|
/java/src/concurrencies/high_level_concurrency_objects/executors/executors/customthreadpoolexecutor/WorkerThread.java
|
8016e7192e9e7f4ae24c58089b9278604e5970e0
|
[] |
no_license
|
iceleeyo/concurrency
|
132e9444fe20e5c80efd5c13d477af7e5c3a5d13
|
fa8a1d1ccad92330c17ae4b7e34d17c65076a7a4
|
refs/heads/master
| 2023-05-09T09:11:36.706861
| 2020-09-10T10:52:15
| 2020-09-10T10:52:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,593
|
java
|
package executors.customthreadpoolexecutor;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.nio.channels.FileChannel;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
/**
*
*
* @author EMAIL:vuquangtin@gmail.com , tel:0377443333
* @version 1.0.0
* @see <a href="https://github.com/vuquangtin/concurrency">https://github.com/
* vuquangtin/concurrency</a>
*
*/
public class WorkerThread extends Thread {
private ThreadPoolState poolState;
private final BlockingQueue<Runnable> unitTask;
private final BlockingQueue<Runnable> waitingTaskQueue;
private final FileChannel fileChannel;
private final String fileName;
private static AtomicBoolean isFileOperationInProcess = new AtomicBoolean(false);
private final int PREFILL_STARTING_LIMIT;
private final int PREFILL_ENDING_LIMIT;
WorkerThread(BlockingQueue<Runnable> taskQueue, ThreadPoolState poolState, FileChannel fileChannel,
String fileName) {
this.unitTask = new ArrayBlockingQueue<>(1);
this.waitingTaskQueue = taskQueue;
this.poolState = poolState;
this.poolState.incrementThreadCount();
this.fileChannel = fileChannel;
this.fileName = fileName;
this.PREFILL_STARTING_LIMIT = waitingTaskQueue.remainingCapacity() * 4 / 5;
this.PREFILL_ENDING_LIMIT = waitingTaskQueue.remainingCapacity() * 1 / 5;
}
@Override
public void run() {
Runnable task;
while (!poolState.isShutDown()) {
try {
task = unitTask.poll();
if (task != null) {
task.run();
} else {
tryFillingQueueFromFile();
task = waitingTaskQueue.poll(poolState.getThreadTimeoutInMillis(), TimeUnit.MILLISECONDS);
if (task != null) {
task.run();
} else {
if (poolState.getActiveThreadCount().decrementAndGet() >= poolState.getCorePoolSize()) {
// terminating thread
return;
} else {
poolState.getActiveThreadCount().incrementAndGet();
}
}
}
} catch (InterruptedException shutdownInterrupt) {
// log
}
}
if (poolState.isShutDownNow()) {
// terminating thread
poolState.decrementThreadCount();
} else {
// complete tasks in queue
while (!waitingTaskQueue.isEmpty()) {
task = waitingTaskQueue.poll();
if (task != null) {
task.run();
}
}
// terminating thread
poolState.decrementThreadCount();
}
}
private void tryFillingQueueFromFile() {
System.out.println(Thread.currentThread().getName() + "::" + waitingTaskQueue.size() + ":"
+ poolState.getTasksInFileStorage() + ":" + isFileOperationInProcess.get() + ":"
+ PREFILL_STARTING_LIMIT + ":" + PREFILL_ENDING_LIMIT);
if (poolState.getTasksInFileStorage().get() > 0
&& waitingTaskQueue.remainingCapacity() >= PREFILL_STARTING_LIMIT) {
if (isFileOperationInProcess.compareAndSet(false, true)) {
// to make read and write synchronous
synchronized (fileChannel) {
try (FileInputStream fis = new FileInputStream(fileName);
ObjectInputStream ois = new ObjectInputStream(fis)) {
while (poolState.getTasksInFileStorage().getAndDecrement() > 0
&& waitingTaskQueue.remainingCapacity() >= PREFILL_ENDING_LIMIT) {
Runnable task = (Runnable) ois.readObject();
waitingTaskQueue.add(task);
}
} catch (Exception e) {
// File IO Exception
e.printStackTrace();
}
}
isFileOperationInProcess.set(false);
}
}
}
public boolean submit(Runnable task) {
return unitTask.offer(task);
}
}
|
[
"vuquangtin@gmail.com"
] |
vuquangtin@gmail.com
|
bf5348624767ad05f1c87d965a2421d8a16c3c28
|
6b2e1f5fdd3668b32c471ff872f03f043b18d5f7
|
/mutants/dataset/lcs_length/589/LCS_LENGTH.java
|
de5141581ba506cc110d09468e694dc4299fd598
|
[] |
no_license
|
mou23/Impact-of-Similarity-on-Repairing-Small-Programs
|
87e58676348f1b55666171128ecced3571979d44
|
6704d78b2bc9c103d97bcf55ecd5c12810ba2851
|
refs/heads/master
| 2023-03-25T10:42:17.464870
| 2021-03-20T04:55:17
| 2021-03-20T04:55:17
| 233,513,246
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,963
|
java
|
package buggy_java_programs;
import java.util.*;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author derricklin
*/
public class LCS_LENGTH {
public static Integer lcs_length(String s, String t) {
// make a Counter
// pair? no! just hashtable to a hashtable.. woo.. currying
Map<Integer, Map<Integer,Integer>> dp = new HashMap<Collections,Map<Integer,Integer>>();
// just set all the internal maps to 0
for (int i=0; i < s.length(); i++) {
Map<Integer,Integer> initialize = new HashMap<Integer,Integer>();
dp.put(i, initialize);
for (int j=0; j < t.length(); j++) {
Map<Integer,Integer> internal_map = dp.get(i);
internal_map.put(j,0);
dp.put(i, internal_map);
}
}
// now the actual code
for (int i=0; i < s.length(); i++) {
for (int j=0; j < t.length(); j++) {
if (s.charAt(i) == t.charAt(j)) {
if (dp.containsKey(i-1)) {
Map<Integer, Integer> internal_map = dp.get(i);
int insert_value = dp.get(i-1).get(j) + 1;
internal_map.put(j, insert_value);
dp.put(i,internal_map);
} else {
Map<Integer, Integer> internal_map = dp.get(i);
internal_map.put(j,1);
dp.put(i,internal_map);
}
}
}
}
if (!dp.isEmpty()) {
List<Integer> ret_list = new ArrayList<Integer>();
for (int i=0; i<s.length(); i++) {
ret_list.add(!dp.get(i).isEmpty() ? Collections.max(dp.get(i).values()) : 0);
}
return Collections.max(ret_list);
} else {
return 0;
}
}
}
|
[
"bsse0731@iit.du.ac.bd"
] |
bsse0731@iit.du.ac.bd
|
af1daf301fc091b0e432b5236a4a53559909bece
|
516f1dec426ac18a840a17362e176962b3ebda49
|
/parser/src/main/java/com/steadystate/css/dom/CSSStyleRuleImpl.java
|
7e1b96a2a455035a537ce3af60a07ef498a1d8f2
|
[] |
no_license
|
Zslow/Loboevolution
|
3b4b078c4bce286aa4a7ff8d61e04aed1458c0a2
|
1d49386ff804a65d4f7c7702e9888b2e54ad7a38
|
refs/heads/master
| 2021-01-20T06:50:57.421535
| 2017-05-01T15:45:29
| 2017-05-01T15:45:29
| 89,934,908
| 0
| 0
| null | 2017-05-01T15:14:38
| 2017-05-01T15:14:38
| null |
UTF-8
|
Java
| false
| false
| 6,408
|
java
|
/*
* Copyright (C) 1999-2017 David Schweinsberg.
*
* 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.steadystate.css.dom;
import java.io.IOException;
import java.io.StringReader;
import org.w3c.css.sac.CSSException;
import org.w3c.css.sac.InputSource;
import org.w3c.css.sac.SelectorList;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSStyleDeclaration;
import org.w3c.dom.css.CSSStyleRule;
import com.steadystate.css.format.CSSFormat;
import com.steadystate.css.format.CSSFormatable;
import com.steadystate.css.parser.CSSOMParser;
import com.steadystate.css.util.LangUtils;
/**
* Implementation of {@link CSSStyleRule}.
*
* @author <a href="mailto:davidsch@users.sourceforge.net">David Schweinsberg</a>
* @author rbri
*/
public class CSSStyleRuleImpl extends AbstractCSSRuleImpl implements CSSStyleRule {
private static final long serialVersionUID = -697009251364657426L;
private SelectorList selectors_;
private CSSStyleDeclaration style_;
public SelectorList getSelectors() {
return selectors_;
}
public void setSelectors(final SelectorList selectors) {
selectors_ = selectors;
}
public CSSStyleRuleImpl(final CSSStyleSheetImpl parentStyleSheet,
final CSSRule parentRule, final SelectorList selectors) {
super(parentStyleSheet, parentRule);
selectors_ = selectors;
}
public CSSStyleRuleImpl() {
super();
}
public short getType() {
return STYLE_RULE;
}
/**
* {@inheritDoc}
*/
@Override
public String getCssText(final CSSFormat format) {
final CSSStyleDeclaration style = getStyle();
if (null == style) {
return "";
}
final String selectorText = ((CSSFormatable) selectors_).getCssText(format);
final String styleText = ((CSSFormatable) style).getCssText(format);
if (null == styleText || styleText.length() == 0) {
return selectorText + " { }";
}
if (format != null && format.getPropertiesInSeparateLines()) {
return selectorText + " {" + styleText + "}";
}
return selectorText + " { " + styleText + " }";
}
public void setCssText(final String cssText) throws DOMException {
final CSSStyleSheetImpl parentStyleSheet = getParentStyleSheetImpl();
if (parentStyleSheet != null && parentStyleSheet.isReadOnly()) {
throw new DOMExceptionImpl(
DOMException.NO_MODIFICATION_ALLOWED_ERR,
DOMExceptionImpl.READ_ONLY_STYLE_SHEET);
}
try {
final InputSource is = new InputSource(new StringReader(cssText));
final CSSOMParser parser = new CSSOMParser();
final CSSRule r = parser.parseRule(is);
// The rule must be a style rule
if (r.getType() == CSSRule.STYLE_RULE) {
selectors_ = ((CSSStyleRuleImpl) r).selectors_;
style_ = ((CSSStyleRuleImpl) r).style_;
}
else {
throw new DOMExceptionImpl(
DOMException.INVALID_MODIFICATION_ERR,
DOMExceptionImpl.EXPECTING_STYLE_RULE);
}
}
catch (final CSSException e) {
throw new DOMExceptionImpl(
DOMException.SYNTAX_ERR,
DOMExceptionImpl.SYNTAX_ERROR,
e.getMessage());
}
catch (final IOException e) {
throw new DOMExceptionImpl(
DOMException.SYNTAX_ERR,
DOMExceptionImpl.SYNTAX_ERROR,
e.getMessage());
}
}
public String getSelectorText() {
return selectors_.toString();
}
public void setSelectorText(final String selectorText) throws DOMException {
final CSSStyleSheetImpl parentStyleSheet = getParentStyleSheetImpl();
if (parentStyleSheet != null && parentStyleSheet.isReadOnly()) {
throw new DOMExceptionImpl(
DOMException.NO_MODIFICATION_ALLOWED_ERR,
DOMExceptionImpl.READ_ONLY_STYLE_SHEET);
}
try {
final InputSource is = new InputSource(new StringReader(selectorText));
final CSSOMParser parser = new CSSOMParser();
selectors_ = parser.parseSelectors(is);
}
catch (final CSSException e) {
throw new DOMExceptionImpl(
DOMException.SYNTAX_ERR,
DOMExceptionImpl.SYNTAX_ERROR,
e.getMessage());
}
catch (final IOException e) {
throw new DOMExceptionImpl(
DOMException.SYNTAX_ERR,
DOMExceptionImpl.SYNTAX_ERROR,
e.getMessage());
}
}
public CSSStyleDeclaration getStyle() {
return style_;
}
public void setStyle(final CSSStyleDeclaration style) {
style_ = style;
}
@Override
public String toString() {
return getCssText();
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof CSSStyleRule)) {
return false;
}
final CSSStyleRule csr = (CSSStyleRule) obj;
return super.equals(obj)
&& LangUtils.equals(getSelectorText(), csr.getSelectorText())
&& LangUtils.equals(getStyle(), csr.getStyle());
}
@Override
public int hashCode() {
int hash = super.hashCode();
hash = LangUtils.hashCode(hash, selectors_);
hash = LangUtils.hashCode(hash, style_);
return hash;
}
}
|
[
"ivan.difrancesco@yahoo.it"
] |
ivan.difrancesco@yahoo.it
|
b0ae49dd6195b5aa0a2a6fa2ad22d9fef07aaacf
|
bb1b6336d30841ab871ecfc96b2e303a538c5f6f
|
/src/main/java/com/cell/entity/service/dto/UserDTO.java
|
c4244150a398273606c378097ee433115a5f77d3
|
[] |
no_license
|
ambulancexm/cell-and-xml
|
fbcb6c49711fd6cf37eeae4523651caf7171b48d
|
152204ee7f2709d4267e0884f39ad62828ce3288
|
refs/heads/main
| 2023-05-02T23:46:39.245237
| 2021-05-26T15:20:35
| 2021-05-26T15:20:35
| 371,052,389
| 0
| 0
| null | 2021-05-26T15:20:36
| 2021-05-26T13:55:11
|
Java
|
UTF-8
|
Java
| false
| false
| 925
|
java
|
package com.cell.entity.service.dto;
import com.cell.entity.domain.User;
/**
* A DTO representing a user, with only the public attributes.
*/
public class UserDTO {
private Long id;
private String login;
public UserDTO() {
// Empty constructor needed for Jackson.
}
public UserDTO(User user) {
this.id = user.getId();
// Customize it here if you need, or not, firstName/lastName/etc
this.login = user.getLogin();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
// prettier-ignore
@Override
public String toString() {
return "UserDTO{" +
"id='" + id + '\'' +
", login='" + login + '\'' +
"}";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
f4bd9fa4b650cfac3199a3fd597ba75a7f211ff1
|
4d6f449339b36b8d4c25d8772212bf6cd339f087
|
/netreflected/src/Framework/Microsoft.JScript,Version=10.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a/microsoft/jscript/IActivationObject.java
|
57ecf7bb69262bf6cd223f2554b275c624ed71a2
|
[
"MIT"
] |
permissive
|
lvyitian/JCOReflector
|
299a64550394db3e663567efc6e1996754f6946e
|
7e420dca504090b817c2fe208e4649804df1c3e1
|
refs/heads/master
| 2022-12-07T21:13:06.208025
| 2020-08-28T09:49:29
| 2020-08-28T09:49:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,996
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 MASES s.r.l.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**************************************************************************************
* <auto-generated>
* This code was generated from a template using JCOReflector
*
* Manual changes to this file may cause unexpected behavior in your application.
* Manual changes to this file will be overwritten if the code is regenerated.
* </auto-generated>
*************************************************************************************/
package microsoft.jscript;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
// Import section
import microsoft.jscript.GlobalScope;
import system.reflection.FieldInfo;
/**
* The base .NET class managing Microsoft.JScript.IActivationObject, Microsoft.JScript, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Implements {@link IJCOBridgeReflected}.
* <p>
*
* See: <a href="https://docs.microsoft.com/en-us/dotnet/api/Microsoft.JScript.IActivationObject" target="_top">https://docs.microsoft.com/en-us/dotnet/api/Microsoft.JScript.IActivationObject</a>
*/
public interface IActivationObject extends IJCOBridgeReflected {
/**
* Fully assembly qualified name: Microsoft.JScript, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
*/
public static final String assemblyFullName = "Microsoft.JScript, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
/**
* Assembly name: Microsoft.JScript
*/
public static final String assemblyShortName = "Microsoft.JScript";
/**
* Qualified class name: Microsoft.JScript.IActivationObject
*/
public static final String className = "Microsoft.JScript.IActivationObject";
/**
* Try to cast the {@link IJCOBridgeReflected} instance into {@link IActivationObject}, a cast assert is made to check if types are compatible.
*/
public static IActivationObject ToIActivationObject(IJCOBridgeReflected from) throws Throwable {
JCOBridge bridge = JCOBridgeInstance.getInstance("Microsoft.JScript, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
JCType classType = bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName));
NetType.AssertCast(classType, from);
return new IActivationObjectImplementation(from.getJCOInstance());
}
/**
* Returns the reflected Assembly name
*
* @return A {@link String} representing the Fullname of reflected Assembly
*/
public String getJCOAssemblyName();
/**
* Returns the reflected Class name
*
* @return A {@link String} representing the Fullname of reflected Class
*/
public String getJCOClassName();
/**
* Returns the reflected Class name used to build the object
*
* @return A {@link String} representing the name used to allocated the object
* in CLR context
*/
public String getJCOObjectName();
/**
* Returns the instantiated class
*
* @return An {@link Object} representing the instance of the instantiated Class
*/
public Object getJCOInstance();
/**
* Returns the instantiated class Type
*
* @return A {@link JCType} representing the Type of the instantiated Class
*/
public JCType getJCOType();
// Methods section
public GlobalScope GetGlobalScope() throws Throwable;
public NetObject GetDefaultThisObject() throws Throwable;
public NetObject GetMemberValue(java.lang.String name, int lexlevel) throws Throwable;
public FieldInfo GetField(java.lang.String name, int lexLevel) throws Throwable;
public FieldInfo GetLocalField(java.lang.String name) throws Throwable;
// Properties section
// Instance Events section
}
|
[
"mario.mastrodicasa@masesgroup.com"
] |
mario.mastrodicasa@masesgroup.com
|
fc940edc86b8cd7a127840e5f8096f575d241756
|
4a2279b654cee33f29cfe68c698c192fce1c88c0
|
/hitran/src/main/java/com/hisense/hitran/Header.java
|
bb114bc4ca4d5bd9f314f4de2215144037bf745c
|
[] |
no_license
|
liudunjian/HiASK
|
6d546f6dc212feeea836752bddcb76f9a8d93740
|
0ec8115b5eba1b72e0f8af808336128350e3d5b3
|
refs/heads/master
| 2020-04-02T09:20:02.110147
| 2018-11-01T02:28:09
| 2018-11-01T02:28:09
| 154,287,933
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 758
|
java
|
package com.hisense.hitran;
/**
* Created by liudunjian on 2018/10/26.
*/
public class Header implements IHeader {
private String domain;
private String intent;
private int info;
public Header(String domain, String intent, int info) {
this.domain = domain;
this.intent = intent;
this.info = info;
}
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
public String getIntent() {
return intent;
}
public void setIntent(String intent) {
this.intent = intent;
}
public int getInfo() {
return info;
}
public void setInfo(int info) {
this.info = info;
}
}
|
[
"liudunjian@hisense.com"
] |
liudunjian@hisense.com
|
1097a2e2c96e0145745e3444c0ba1609afbb485c
|
90eca11928481724f0653d64f9efccf50975d5f6
|
/app/common/service-facade/src/main/java/com/xiaowei/sys/platform/core/facade/service/vo/sysarea/SysAreaAddVo.java
|
e8d5a379e8b4ce7857296e616111f672b20369b0
|
[] |
no_license
|
kanshunfu123/dubboCode
|
3e1c8f9938cd778c3a6aff8e309bbabefcb2dfea
|
b0cbc91137f055ecddd6cc759e2793dc2c683170
|
refs/heads/master
| 2020-05-17T23:09:06.391727
| 2019-04-29T07:36:50
| 2019-04-29T07:36:50
| 184,022,542
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,271
|
java
|
package com.xiaowei.sys.platform.core.facade.service.vo.sysarea;
import com.xiaowei.sys.platform.core.facade.service.req.BaseReq;
import java.io.Serializable;
import java.util.Date;
public class SysAreaAddVo extends BaseReq implements Serializable {
/**
* id ID.
*/
private Long id;
public String getFatherUuid() {
return fatherUuid;
}
public void setFatherUuid(String fatherUuid) {
this.fatherUuid = fatherUuid;
}
public Long getSysAreaCodeNum() {
return sysAreaCodeNum;
}
public void setSysAreaCodeNum(Long sysAreaCodeNum) {
this.sysAreaCodeNum = sysAreaCodeNum;
}
private Long sysAreaCodeNum;
/**
* 父级id
*/
private String fatherUuid;
/**
* sysAreaParentId 父级id .
*/
private Long sysAreaParentId;
/**
* delFlag 删除状态(0-正常,1-删除).
*/
private String delFlag;
/**
* createBy 创建人.
*/
private String createBy;
/**
* updateBy 修改人.
*/
private String updateBy;
/**
* sysAreaName 区域名称.
*/
private String sysAreaName;
/**
* sysAreaUuid 唯一,32位字符串,查询用.
*/
private String sysAreaUuid;
/**
* sysAreaLevel 当前模块层级.
*/
private String sysAreaLevel;
/**
* sysAreaRemark 备注.
*/
private String sysAreaRemark;
/**
* sysAreaSeq 排序.
*/
private Integer sysAreaSeq;
/**
* createTime 创建时间.
*/
private Date createTime;
/**
* updateTime 修改时间.
*/
private Date updateTime;
/**
* Set id ID.
*/
public void setId(Long id){
this.id = id;
}
/**
* Get id ID.
*
* @return the string
*/
public Long getId(){
return id;
}
/**
* Set sysAreaParentId 父级id .
*/
public void setSysAreaParentId(Long sysAreaParentId){
this.sysAreaParentId = sysAreaParentId;
}
/**
* Get sysAreaParentId 父级id .
*
* @return the string
*/
public Long getSysAreaParentId(){
return sysAreaParentId;
}
/**
* Set delFlag 删除状态(0-正常,1-删除).
*/
public void setDelFlag(String delFlag){
this.delFlag = delFlag;
}
/**
* Get delFlag 删除状态(0-正常,1-删除).
*
* @return the string
*/
public String getDelFlag(){
return delFlag;
}
/**
* Set createBy 创建人.
*/
public void setCreateBy(String createBy){
this.createBy = createBy;
}
/**
* Get createBy 创建人.
*
* @return the string
*/
public String getCreateBy(){
return createBy;
}
/**
* Set updateBy 修改人.
*/
public void setUpdateBy(String updateBy){
this.updateBy = updateBy;
}
/**
* Get updateBy 修改人.
*
* @return the string
*/
public String getUpdateBy(){
return updateBy;
}
/**
* Set sysAreaName 区域名称.
*/
public void setSysAreaName(String sysAreaName){
this.sysAreaName = sysAreaName;
}
/**
* Get sysAreaName 区域名称.
*
* @return the string
*/
public String getSysAreaName(){
return sysAreaName;
}
/**
* Set sysAreaUuid 唯一,32位字符串,查询用.
*/
public void setSysAreaUuid(String sysAreaUuid){
this.sysAreaUuid = sysAreaUuid;
}
/**
* Get sysAreaUuid 唯一,32位字符串,查询用.
*
* @return the string
*/
public String getSysAreaUuid(){
return sysAreaUuid;
}
/**
* Set sysAreaLevel 当前模块层级.
*/
public void setSysAreaLevel(String sysAreaLevel){
this.sysAreaLevel = sysAreaLevel;
}
/**
* Get sysAreaLevel 当前模块层级.
*
* @return the string
*/
public String getSysAreaLevel(){
return sysAreaLevel;
}
/**
* Set sysAreaRemark 备注.
*/
public void setSysAreaRemark(String sysAreaRemark){
this.sysAreaRemark = sysAreaRemark;
}
/**
* Get sysAreaRemark 备注.
*
* @return the string
*/
public String getSysAreaRemark(){
return sysAreaRemark;
}
/**
* Set sysAreaSeq 排序.
*/
public void setSysAreaSeq(Integer sysAreaSeq){
this.sysAreaSeq = sysAreaSeq;
}
/**
* Get sysAreaSeq 排序.
*
* @return the string
*/
public Integer getSysAreaSeq(){
return sysAreaSeq;
}
/**
* Set createTime 创建时间.
*/
public void setCreateTime(Date createTime){
this.createTime = createTime;
}
/**
* Get createTime 创建时间.
*
* @return the string
*/
public Date getCreateTime(){
return createTime;
}
/**
* Set updateTime 修改时间.
*/
public void setUpdateTime(Date updateTime){
this.updateTime = updateTime;
}
/**
* Get updateTime 修改时间.
*
* @return the string
*/
public Date getUpdateTime(){
return updateTime;
}
}
|
[
"995234952@qq.com"
] |
995234952@qq.com
|
6f785cc79b12fd18c3e5a845ea895e39389cc852
|
a0a47144c6995e949264e3728e81d72cba2bf3ef
|
/app/src/main/java/com/trade/rrenji/biz/version/presenter/CheckPresenterImpl.java
|
04ae2f828e39014262ade7149a8882afcbbb6708
|
[] |
no_license
|
11231943/RenRenJi
|
2d90e2217d1cc042fa367b58cde276923f93281f
|
e80026bafe1284908a60ae8d58addd18a04e2a67
|
refs/heads/master
| 2020-04-18T08:26:23.075874
| 2019-09-17T14:38:37
| 2019-09-17T14:38:37
| 167,396,475
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,038
|
java
|
package com.trade.rrenji.biz.version.presenter;
import android.content.Context;
import com.google.gson.Gson;
import com.trade.rrenji.bean.check.NetCheckBean;
import com.trade.rrenji.biz.base.BasePresenter;
import com.trade.rrenji.biz.version.model.CheckModel;
import com.trade.rrenji.biz.version.model.CheckModelImpl;
import com.trade.rrenji.biz.version.ui.view.CheckActivityView;
import com.trade.rrenji.net.XUtils;
import com.trade.rrenji.utils.Contetns;
public class CheckPresenterImpl extends BasePresenter<CheckActivityView> implements CheckPresenter {
private CheckModel mModel;
Context mContext;
public CheckPresenterImpl(Context context) {
mContext = context;
mModel = new CheckModelImpl(context);
}
@Override
public void getCheck(Context mContext) {
mModel.check(mContext, new XUtils.ResultListener() {
@Override
public void onResponse(String result) {
try {
if (getActivityView() != null) {
getActivityView().hideLoading();
}
Gson gson = new Gson();
final NetCheckBean netShareBean = gson.fromJson(result, NetCheckBean.class);
if (Integer.valueOf(netShareBean.getCode()) == Contetns.STATE_OK) {
if (getActivityView() != null) {
getActivityView().getCheckSuccess(netShareBean);
}
} else {
if (getActivityView() != null) {
getActivityView().getCheckError(Integer.valueOf(netShareBean.getCode()), netShareBean.getMsg());
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void onError(Throwable error) {
getActivityView().getCheckError(-10000, "请求错误");
}
});
}
}
|
[
"11231943@qq.com"
] |
11231943@qq.com
|
aca74c1efbbe2f34e6221e5fcfa4953f79b0ad62
|
49c20cb9f5018a42509faff53a783babcc47bd05
|
/Chapter12 GUI Applications/src/creatingWindows/Currency.java
|
156915d16e14b4b2c7422042d03c5634bc75f950
|
[
"MIT"
] |
permissive
|
Emreyanmis/Java_Projects
|
6c254a3e1c6d249a70e97cb017613d2495585ce7
|
3a0558c0997296d74836065c88eaf8d613391445
|
refs/heads/master
| 2020-04-21T18:18:35.249983
| 2019-02-08T16:39:50
| 2019-02-08T16:39:50
| 169,764,502
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,126
|
java
|
package creatingWindows;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Currency extends JFrame
{
// To reference a panel
private JPanel panel;
// To reference a label
private JLabel messageLabel;
// To reference text field
private JTextField euroTextField;
// To reference a button
private JButton convButton;
// Window width
private final int WINDOW_WIDTH = 310;
// Window height
private final int WINDOW_HEIGHT = 100;
/**
* Constructor
*/
public Currency()
{
// Set the title of the window
setTitle("Currency Converter");
// Set the size of the window
setSize(WINDOW_WIDTH,WINDOW_HEIGHT);
// Specify what happens when the button is clicked
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Build the panel and add it to the frame
builPanel();
// Add the panel to the frame's content pane.
add(panel);
// Display the window
setVisible(true);
}
private void builPanel()
{
messageLabel = new JLabel("Enter the amount of $:");
euroTextField = new JTextField(10);
convButton = new JButton("Convert");
convButton.setForeground(Color.RED);
convButton.setBackground(Color.BLUE);
convButton.addActionListener(new convButtonButton());
panel = new JPanel();
panel.add(convButton);
panel.add(messageLabel);
panel.add(euroTextField);
}
public class convButtonButton implements ActionListener
{
@Override
public void actionPerformed(ActionEvent e)
{
final double CONVERSION = 1.13;
String input;
double euro;
double dollar;
input = euroTextField.getText();
euro = Double.parseDouble(input) * CONVERSION;
dollar = Double.parseDouble(input);
JOptionPane.showMessageDialog(null,"$" + String.format("%,.2f ", dollar) + " is equal to "
+ String.format("€%,.2f ", euro));
}
}
public static void main(String[] args)
{
new Currency();
}
}
|
[
"emreyanmis@emreyanmiss-mbp.wireless-guest.unc.edu"
] |
emreyanmis@emreyanmiss-mbp.wireless-guest.unc.edu
|
620d9d12c8869dc0784339149e12dce4f6780f8c
|
93f88165a3b84e8c9357ab8dee3152c24a2ee5fc
|
/src/entelect/BlackJack21.java
|
00f5231c0cdbaf15c4192d8f53fcdbc115e1b5ef
|
[] |
no_license
|
molorane/blackjack21
|
18a4fbfdb32ddfe0c8118d14fe53b8943800a739
|
ba265643c8de0f8b048071b10e1ea00b346f1b4d
|
refs/heads/master
| 2022-11-19T14:10:09.730270
| 2020-07-24T08:58:33
| 2020-07-24T08:58:33
| 279,391,440
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,875
|
java
|
package entelect;
import java.util.List;
/**
* @author Mothusi Molorane
*/
public class BlackJack21 implements Playable {
private final Player dealer;
private final List<Player> players;
private int winners;
public BlackJack21(Player dealer, List<Player> players) {
this.dealer = dealer;
this.players = players;
}
@Override
public void start() {
// calculate dealer total score
// to compare with players
play(dealer);
System.out.println("-----DEALER------");
displayPlayerCards(dealer);
System.out.println(dealer.getName()+" : "+dealer.getTotal());
System.out.println();
for (Player player : players) {
play(player);
System.out.println("------"+player.getName()+" Results------");
displayPlayerCards(player);
System.out.print(player.getName()+" : "+player.getTotal());
if(player.getCards().size() == 5 && player.getTotal() <= 21) {
winners++;
System.out.println(" *beats dealer*");
}else if(player.getTotal() >= dealer.getTotal() && player.getTotal() <=21) {
winners++;
System.out.println(" *beats dealer*");
}else {
System.out.println(" *loses*");
}
System.out.println();
}
}
@Override
public void play(Player player) {
int countAceCards = countPlayerAceCards(player);
int total = sumOfAllNoneAceCards(player);
total += (total <= 7)? Ace.getAlternativeValue() + (countAceCards - 1) :
(total <= 8)? (countAceCards <= 3)? Ace.getAlternativeValue() + (countAceCards - 1): countAceCards :
(total <= 9)? (countAceCards <= 2)? Ace.getAlternativeValue() + (countAceCards - 1): countAceCards :
(total <= 10)? (countAceCards == 1)? Ace.getAlternativeValue() : countAceCards: countAceCards;
player.setTotal(total);
}
@Override
public int winnersCount() {
return winners;
}
@Override
public int playersCount() {
return players.size();
}
}
|
[
"molorane.mothusi@gmail.com"
] |
molorane.mothusi@gmail.com
|
01be16ab11343b95c25f9c0d03bf62e56487e42e
|
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
|
/src/main/java/com/alipay/api/response/AlipayOpenAppAppcontentItemQueryResponse.java
|
e643719c995ab6bdac23c45bf88f47c07bc87ed2
|
[
"Apache-2.0"
] |
permissive
|
zhoujiangzi/alipay-sdk-java-all
|
00ef60ed9501c74d337eb582cdc9606159a49837
|
560d30b6817a590fd9d2c53c3cecac0dca4449b3
|
refs/heads/master
| 2022-12-26T00:27:31.553428
| 2020-09-07T03:39:05
| 2020-09-07T03:39:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,024
|
java
|
package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.AppContentItem;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.open.app.appcontent.item.query response.
*
* @author auto create
* @since 1.0, 2020-09-02 17:06:15
*/
public class AlipayOpenAppAppcontentItemQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 1474425796291782368L;
/**
* 商品信息
*/
@ApiListField("items")
@ApiField("app_content_item")
private List<AppContentItem> items;
/**
* 总商品数
*/
@ApiField("total")
private Long total;
public void setItems(List<AppContentItem> items) {
this.items = items;
}
public List<AppContentItem> getItems( ) {
return this.items;
}
public void setTotal(Long total) {
this.total = total;
}
public Long getTotal( ) {
return this.total;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
63c16dcdedbfc09194b9806ead19f87e90151b1d
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.systemux-SystemUX/sources/com/oculus/horizoncontent/horizon/FriendListRowData.java
|
40366670b38105b09b989b685192ec8528066dc7
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 904
|
java
|
package com.oculus.horizoncontent.horizon;
import com.oculus.horizoncontent.horizon.HorizonContent;
public final class FriendListRowData {
public final String displayName;
public final String id;
public HorizonContent.FriendList.UserInviteState inviteState;
public final String presenceStatus;
public final String profilePhotoURL;
public FriendListRowData(String str, String str2, String str3, String str4, HorizonContent.FriendList.UserInviteState userInviteState) {
this.id = str;
this.displayName = str2;
this.presenceStatus = str3;
this.profilePhotoURL = str4;
this.inviteState = userInviteState;
}
public String toString() {
return "id " + this.id + " displayName: " + this.displayName + " presence: " + this.presenceStatus + " profile photo: " + this.profilePhotoURL + " inviteState: " + this.inviteState;
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
62ea492e83acb0683f758c5fe5b770f7772a8a96
|
6b874867e75329325b0baaf1c0f3f6d7ecf004cf
|
/src/main/java/baekjoon/q1967/Main.java
|
3f6d0f33ed82981679cb374f32ec9af958a6a610
|
[] |
no_license
|
kkssry/algorithm
|
e36ef834fea2d2db444b16b58898b9cc76a45383
|
cdd4af227db018d2529e6aedd991d2ef1b596d6f
|
refs/heads/master
| 2020-04-20T14:27:19.293476
| 2020-02-28T13:55:16
| 2020-02-28T13:55:16
| 168,898,908
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,006
|
java
|
package baekjoon.q1967;
import java.util.*;
public class Main {
private static int maxLength = 0;
private static int distanceValue = 0;
private static int rootFromDistance = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int nodeCount = sc.nextInt() + 1;
if (nodeCount == 2) {
System.out.println(0);
return;
}
Node[] nodes = new Node[nodeCount];
initNodes(nodes);
initRelatedNodes(nodes, sc);
int[] lengths = new int[nodes.length];
initLengths(lengths, nodes);
findDistanceNodeValueFromRootNode(nodes[1]);
initializeNodes(nodes, lengths);
saveMaxLength(nodes, lengths);
System.out.println(Math.max(maxLength, rootFromDistance));
}
private static void findDistanceNodeValueFromRootNode(Node rootNode) {
Queue<Node> queue = new LinkedList<>();
queue.add(rootNode);
while (!queue.isEmpty()) {
Node node = queue.poll();
node.isChecked = true;
for (Node node1 : node.nodes) {
if (!node1.isChecked) {
node1.length += node.length;
queue.add(node1);
}
}
findDistanceNodeValue(node);
}
}
private static void findDistanceNodeValue(Node node) {
if (maxLength < node.length) {
maxLength = node.length;
distanceValue = node.value;
rootFromDistance = node.length;
}
}
private static void saveMaxLength(Node[] nodes, int[] lengths) {
maxLength = 0;
startDFS(nodes[distanceValue], lengths);
}
private static void initializeNodes(Node[] nodes, int[] lengths) {
for (int i = 1; i < nodes.length; i++) {
nodes[i].length = lengths[i];
nodes[i].isChecked = false;
}
}
private static void initLengths(int[] lengths, Node[] nodes) {
for (int i = 1; i < nodes.length; i++) {
lengths[i] = nodes[i].length;
}
}
private static void startDFS(Node startNode, int[] lengths) {
Stack<Node> queue = new Stack<>();
queue.add(startNode);
Node topLevelNode = queue.peek();
while (!queue.isEmpty()) {
Node node = queue.pop();
node.isChecked = true;
if (topLevelNode.value > node.value) {
topLevelNode = node;
}
for (Node relationNode : node.nodes) {
if (!relationNode.isChecked) {
relationNode.length += node.length;
checkLength(relationNode.length, topLevelNode, lengths);
queue.add(relationNode);
}
}
}
}
private static void checkLength(int length, Node topLevelNode, int[] lengths) {
int beetWeenLength = length;
if (topLevelNode.value != 0) {
beetWeenLength -= lengths[topLevelNode.value];
}
if (maxLength < beetWeenLength) {
maxLength = beetWeenLength;
}
}
private static void initRelatedNodes(Node[] nodes, Scanner sc) {
for (int i = 1; i < nodes.length - 1; i++) {
int parentNodeValue = sc.nextInt();
int childNodeValue = sc.nextInt();
int betweenLength = sc.nextInt();
nodes[childNodeValue].length = betweenLength;
nodes[parentNodeValue].nodes.add(nodes[childNodeValue]);
nodes[childNodeValue].nodes.add(nodes[parentNodeValue]);
}
}
private static void initNodes(Node[] nodes) {
for (int i = 1; i < nodes.length; i++) {
nodes[i] = new Node(i);
}
}
static class Node {
int value;
int length;
boolean isChecked;
List<Node> nodes = new ArrayList<>();
Node(int value) {
this.value = value;
}
}
}
|
[
"kkssry@naver.com"
] |
kkssry@naver.com
|
69b14b0d66f82cb2c7f5942e4cc3c3114bdaff5e
|
3182dd5e2cb4c93c562293816203038d5e4c9708
|
/src/java/com/sun/mail/util/QEncoderStream.java
|
62c2e79a737484e5441db9caf985de9804fb1e84
|
[] |
no_license
|
mrauer/TAC-Verif
|
46f1fdc06475fef6d217f48a2ee6a6ffc8ec3e4f
|
5231854f94008729fb1be67992ffafd2ae8908a3
|
refs/heads/master
| 2023-07-16T22:25:33.181442
| 2021-08-29T16:00:37
| 2021-08-29T16:00:37
| 401,082,799
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 998
|
java
|
/*
* Decompiled with CFR 0.0.
*
* Could not load the following classes:
* java.io.IOException
* java.io.OutputStream
* java.lang.String
*/
package com.sun.mail.util;
import com.sun.mail.util.QPEncoderStream;
import java.io.IOException;
import java.io.OutputStream;
public class QEncoderStream
extends QPEncoderStream {
public static final /* synthetic */ int $r8$clinit;
public String specials;
public QEncoderStream(OutputStream outputStream, boolean bl) {
super(outputStream, Integer.MAX_VALUE);
String string = bl ? "=_?\"#$%&'(),.:;<>@[\\]^`{|}~" : "=_?";
this.specials = string;
}
@Override
public void write(int n2) throws IOException {
int n3 = n2 & 255;
if (n3 == 32) {
this.output(95, false);
return;
}
if (n3 >= 32 && n3 < 127 && this.specials.indexOf(n3) < 0) {
this.output(n3, false);
return;
}
this.output(n3, true);
}
}
|
[
"maxime.rauer@gmail.com"
] |
maxime.rauer@gmail.com
|
d2421a98b445a4768295814d6e1738c5c01662c8
|
5ec06dab1409d790496ce082dacb321392b32fe9
|
/clients/android/generated/src/main/java/org/openapitools/client/model/ComDayCqDamS7damCommonAnalyticsImplS7damDynamicMediaConfigEvenProperties.java
|
7a36b8c41cf4cb72ceb562a0e5446eb6f1822d21
|
[
"Apache-2.0"
] |
permissive
|
shinesolutions/swagger-aem-osgi
|
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
|
c2f6e076971d2592c1cbd3f70695c679e807396b
|
refs/heads/master
| 2022-10-29T13:07:40.422092
| 2021-04-09T07:46:03
| 2021-04-09T07:46:03
| 190,217,155
| 3
| 3
|
Apache-2.0
| 2022-10-05T03:26:20
| 2019-06-04T14:23:28
| null |
UTF-8
|
Java
| false
| false
| 2,782
|
java
|
/**
* Adobe Experience Manager OSGI config (AEM) API
* Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API
*
* OpenAPI spec version: 1.0.0-pre.0
* Contact: opensource@shinesolutions.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import org.openapitools.client.model.ConfigNodePropertyBoolean;
import io.swagger.annotations.*;
import com.google.gson.annotations.SerializedName;
@ApiModel(description = "")
public class ComDayCqDamS7damCommonAnalyticsImplS7damDynamicMediaConfigEvenProperties {
@SerializedName("cq.dam.s7dam.dynamicmediaconfigeventlistener.enabled")
private ConfigNodePropertyBoolean cqDamS7damDynamicmediaconfigeventlistenerEnabled = null;
/**
**/
@ApiModelProperty(value = "")
public ConfigNodePropertyBoolean getCqDamS7damDynamicmediaconfigeventlistenerEnabled() {
return cqDamS7damDynamicmediaconfigeventlistenerEnabled;
}
public void setCqDamS7damDynamicmediaconfigeventlistenerEnabled(ConfigNodePropertyBoolean cqDamS7damDynamicmediaconfigeventlistenerEnabled) {
this.cqDamS7damDynamicmediaconfigeventlistenerEnabled = cqDamS7damDynamicmediaconfigeventlistenerEnabled;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComDayCqDamS7damCommonAnalyticsImplS7damDynamicMediaConfigEvenProperties comDayCqDamS7damCommonAnalyticsImplS7damDynamicMediaConfigEvenProperties = (ComDayCqDamS7damCommonAnalyticsImplS7damDynamicMediaConfigEvenProperties) o;
return (this.cqDamS7damDynamicmediaconfigeventlistenerEnabled == null ? comDayCqDamS7damCommonAnalyticsImplS7damDynamicMediaConfigEvenProperties.cqDamS7damDynamicmediaconfigeventlistenerEnabled == null : this.cqDamS7damDynamicmediaconfigeventlistenerEnabled.equals(comDayCqDamS7damCommonAnalyticsImplS7damDynamicMediaConfigEvenProperties.cqDamS7damDynamicmediaconfigeventlistenerEnabled));
}
@Override
public int hashCode() {
int result = 17;
result = 31 * result + (this.cqDamS7damDynamicmediaconfigeventlistenerEnabled == null ? 0: this.cqDamS7damDynamicmediaconfigeventlistenerEnabled.hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComDayCqDamS7damCommonAnalyticsImplS7damDynamicMediaConfigEvenProperties {\n");
sb.append(" cqDamS7damDynamicmediaconfigeventlistenerEnabled: ").append(cqDamS7damDynamicmediaconfigeventlistenerEnabled).append("\n");
sb.append("}\n");
return sb.toString();
}
}
|
[
"cliffano@gmail.com"
] |
cliffano@gmail.com
|
d8a8cc17f47d3e9ebbff3ddd65f33f657ca8241e
|
5b39a25976d09bc9efd64a58062ddbac84093a3b
|
/core/src/com/wendergalan/flappybird/FlappyBird.java
|
0a12e836a6af61e18ef45536a7a261ced746af6e
|
[] |
no_license
|
WenderGalan/Flappy-Bird-Clone
|
b93bd6bb8edd8a33a4b06583a06054010bf01ff8
|
8eed4dd7d6f3363c08621c5c1a7981032cd87377
|
refs/heads/master
| 2021-09-04T01:14:48.156142
| 2018-01-13T22:40:15
| 2018-01-13T22:40:15
| 115,225,942
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,853
|
java
|
package com.wendergalan.flappybird;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.math.Circle;
import com.badlogic.gdx.math.Intersector;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.utils.viewport.StretchViewport;
import com.badlogic.gdx.utils.viewport.Viewport;
import java.lang.reflect.Field;
import java.util.Random;
import jdk.nashorn.internal.parser.TokenType;
public class FlappyBird extends ApplicationAdapter {
private SpriteBatch batch;
private Texture[] passaros;
private Texture fundo;
private Texture gameOver;
private Texture canoBaixo;
private Texture canoTopo;
private Random numeroRandomico;
private BitmapFont fonte;
private BitmapFont mensagem;
private Circle passaroCirculo;
private Rectangle retanguloCanoTopo;
private Rectangle retanguloCanoBaixo;
private ShapeRenderer shape;
//atributos de configuracao
private float larguraDispositivo;
private float alturaDispositivo;
//primeiro estado 0 - > jogo nao iniciado
//1 - > jogo iniciado
//2 -> GAME OVER
private int estadoJogo = 0;
private int pontuacao = 0;
private float variacao = 0;
private float velocidadeQueda = 0;
private float posicaoInicialVertical;
private float posicaoMovimentoCanoHorizontal;
private float espacoEntreCanos;
private float deltaTime;
private float alturaEntreCanosRandomica;
private boolean marcouPonto = false;
//camera
private OrthographicCamera camera;
private Viewport viewport;
private final float VIRTUAL_WIDTH = 768;
private final float VIRTUAL_HEIGHT = 1024;
@Override
public void create () {
batch = new SpriteBatch();
numeroRandomico = new Random();
passaroCirculo = new Circle();
retanguloCanoBaixo = new Rectangle();
retanguloCanoTopo = new Rectangle();
shape = new ShapeRenderer();
fonte = new BitmapFont();
fonte.setColor(Color.WHITE);
fonte.getData().setScale(6);
mensagem = new BitmapFont();
mensagem.setColor(Color.WHITE);
mensagem.getData().setScale(3);
passaros = new Texture[3];
passaros[0] = new Texture("passaro1.png");
passaros[1] = new Texture("passaro2.png");
passaros[2] = new Texture("passaro3.png");
gameOver = new Texture("game_over.png");
/**CONFIGURACAO DA CAMERA**/
camera = new OrthographicCamera();
camera.position.set(VIRTUAL_WIDTH/2, VIRTUAL_HEIGHT/2, 0);
viewport = new StretchViewport(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, camera);
//O FIT VIEW PORT CORTA E UTILIZA A IMAGEM COMO ELA ESTA NO DISPOSITIVO
fundo = new Texture("fundo.png");
canoBaixo = new Texture("cano_baixo.png");
canoTopo = new Texture("cano_topo.png");
larguraDispositivo = VIRTUAL_WIDTH;
alturaDispositivo = VIRTUAL_HEIGHT;
posicaoInicialVertical = alturaDispositivo /2;
posicaoMovimentoCanoHorizontal = larguraDispositivo;
espacoEntreCanos = 300;
}
@Override
public void render () {
camera.update();
//limpar frames anteriores
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
deltaTime = Gdx.graphics.getDeltaTime();
variacao += deltaTime * 10;
if (variacao > 2) {//NAO INICIADO
variacao = 0;
}
if (estadoJogo == 0){//Nao Iniciado
if (Gdx.input.justTouched()){
estadoJogo = 1;
}
}else {//INICIADO
velocidadeQueda++;
if (posicaoInicialVertical > 0 || velocidadeQueda < 0) {
posicaoInicialVertical = posicaoInicialVertical - velocidadeQueda;
}
if (estadoJogo == 1){
posicaoMovimentoCanoHorizontal -= deltaTime * 300;
//PEGA O CLICK E FAZ COM QUE O PASSARO SUBA
if (Gdx.input.justTouched()) {
velocidadeQueda = -15;
}
//verifica se o cano saiu totalmente da tela
if (posicaoMovimentoCanoHorizontal < -canoTopo.getWidth()) {
posicaoMovimentoCanoHorizontal = larguraDispositivo;
alturaEntreCanosRandomica = numeroRandomico.nextInt(400) - 100;
marcouPonto = false;
}
//verifica pontuacao
if (posicaoMovimentoCanoHorizontal < 120){
if (!marcouPonto){
pontuacao++;
marcouPonto = true;
}
}
}else{//TELA DE GAME OVER - REINICIAR O GAME
if (Gdx.input.justTouched()){
estadoJogo = 0;
pontuacao = 0;
velocidadeQueda = 0;
posicaoInicialVertical = alturaDispositivo / 2;
posicaoMovimentoCanoHorizontal = larguraDispositivo;
}
}
}
//configuracao dados da projecao da camera
batch.setProjectionMatrix(camera.combined);
batch.begin();
batch.draw(fundo, 0, 0, larguraDispositivo, alturaDispositivo);
batch.draw(canoTopo, posicaoMovimentoCanoHorizontal, alturaDispositivo / 2 + espacoEntreCanos / 2 + alturaEntreCanosRandomica);
batch.draw(canoBaixo, posicaoMovimentoCanoHorizontal, alturaDispositivo / 2 - canoBaixo.getHeight() - espacoEntreCanos/2);
batch.draw(passaros[(int) variacao], 120, posicaoInicialVertical);
fonte.draw(batch, String.valueOf(pontuacao), larguraDispositivo/2, alturaDispositivo-50);
//TRATA O ESTADO 2 DO JOGO (GAME OVER)
if (estadoJogo == 2){
batch.draw(gameOver, larguraDispositivo/2 - gameOver.getWidth()/2, alturaDispositivo/2);
mensagem.draw(batch, "Toque para reiniciar!", larguraDispositivo/2 - 200, alturaDispositivo/2 - gameOver.getHeight()/2);
}
batch.end();
passaroCirculo.set(120 + passaros[0].getWidth()/2, posicaoInicialVertical + passaros[0].getHeight()/2, passaros[0].getWidth()/2 );
retanguloCanoBaixo = new Rectangle(posicaoMovimentoCanoHorizontal, alturaDispositivo / 2 - canoBaixo.getHeight() - espacoEntreCanos/2, canoBaixo.getWidth(), canoBaixo.getHeight());
retanguloCanoTopo = new Rectangle(posicaoMovimentoCanoHorizontal, alturaDispositivo / 2 + espacoEntreCanos / 2 + alturaEntreCanosRandomica, canoTopo.getWidth(), canoTopo.getHeight() );
/**Desenhar Formas**/
/*shape.begin(ShapeRenderer.ShapeType.Filled);
shape.rect(retanguloCanoBaixo.x, retanguloCanoBaixo.y, retanguloCanoBaixo.width, retanguloCanoBaixo.height);
shape.rect(retanguloCanoTopo.x, retanguloCanoTopo.y, retanguloCanoTopo.width, retanguloCanoTopo.height);
shape.circle(passaroCirculo.x, passaroCirculo.y, passaroCirculo.radius);
shape.setColor(Color.RED);
shape.end();*/
/**TESTE DE COLISAO**/
if (Intersector.overlaps(passaroCirculo, retanguloCanoBaixo) || Intersector.overlaps(passaroCirculo, retanguloCanoTopo) || posicaoInicialVertical <= 0 || posicaoInicialVertical >= alturaDispositivo){
estadoJogo = 2;
}
}
@Override
public void resize(int width, int height) {
viewport.update(width, height);
}
}
|
[
"wendergalan2014@hotmail.com"
] |
wendergalan2014@hotmail.com
|
454dc55c381d02a226bb88f178c5a2efca790b6a
|
9aea2e65c0c0a4f31a93f0f53bddb913299c9376
|
/BLOG_MIAGE/src/java/beans/RoleFacadeREST.java
|
ba217407c3226b4f26058cf6acae7bb9df966c9e
|
[] |
no_license
|
SebWall/ProjetWebService
|
4397354146bdf83e10e4630e6c42ff28f4ee8ee9
|
ece4fa335ef9cc63a97828ba3b30073e6623f126
|
refs/heads/master
| 2021-01-11T17:42:56.857222
| 2017-02-17T19:32:08
| 2017-02-17T19:32:08
| 79,818,842
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,118
|
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 beans;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import utilisateurs.Role;
/**
*
* @author sebastien
*/
@Stateless
@Path("utilisateurs.role")
public class RoleFacadeREST extends AbstractFacade<Role> {
@PersistenceContext(unitName = "BLOG_MIAGEPU")
private EntityManager em;
public RoleFacadeREST() {
super(Role.class);
}
@POST
@Override
@Consumes({"application/xml", "application/json"})
public void create(Role entity) {
super.create(entity);
}
@PUT
@Path("{id}")
@Consumes({"application/xml", "application/json"})
public void edit(@PathParam("id") String id, Role entity) {
super.edit(entity);
}
@DELETE
@Path("{id}")
public void remove(@PathParam("id") String id) {
super.remove(super.find(id));
}
@GET
@Path("{id}")
@Produces({"application/xml", "application/json"})
public Role find(@PathParam("id") String id) {
return super.find(id);
}
@GET
@Override
@Produces({"application/xml", "application/json"})
public List<Role> findAll() {
return super.findAll();
}
@GET
@Path("{from}/{to}")
@Produces({"application/xml", "application/json"})
public List<Role> findRange(@PathParam("from") Integer from, @PathParam("to") Integer to) {
return super.findRange(new int[]{from, to});
}
@GET
@Path("count")
@Produces("text/plain")
public String countREST() {
return String.valueOf(super.count());
}
@Override
protected EntityManager getEntityManager() {
return em;
}
}
|
[
"you@example.com"
] |
you@example.com
|
418dd2d7d55301992e71a1fd48e36ca6a223fea5
|
8b7aae6e45747ea018e6be7ff05d41b985aa8bfa
|
/src/test/java/_843_Guess_the_Word/SolutionTest.java
|
779e81de3395ff799f2054413665e623d63c00dc
|
[] |
no_license
|
pbelevich/leetcode2
|
07c2b1bf726803ed9e5807936f4062588456d889
|
d096d85fc791941480b92755555219ffa368eecc
|
refs/heads/master
| 2020-03-07T19:02:17.266107
| 2018-07-17T20:44:01
| 2018-07-17T20:44:01
| 127,659,863
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 381
|
java
|
package _843_Guess_the_Word;
import org.junit.Test;
/**
* @author Pavel Belevich
*/
public class SolutionTest {
public static final Solution SOLUTION = new Solution();
@Test
public void findSecretWord() {
final String[] words = {"acckzz", "ccbazz", "eiowzz", "abcczz"};
SOLUTION.findSecretWord(words, new MasterImpl(words, "acckzz", 10));
}
}
|
[
"belevichp@gmail.com"
] |
belevichp@gmail.com
|
65bb2d00c707085122882abda0a29d1d6b270512
|
d24de9be4c3993d9dc726e9a3c74d9662c470226
|
/reverse/Rocketbank_All_3.12.4_source_from_JADX/sources/rx/internal/operators/OperatorElementAt.java
|
d4c9d8b931d2282158bb122914e8cb90e7367020
|
[] |
no_license
|
MEJIOMAH17/rocketbank-api
|
b18808ee4a2fdddd8b3045cd16655b0d82e0b13b
|
fc4eb0cbb4a8f52277fdb09a3b26b4cceef6ff79
|
refs/heads/master
| 2022-07-17T20:24:29.721131
| 2019-07-26T18:55:21
| 2019-07-26T18:55:21
| 198,698,231
| 4
| 0
| null | 2022-06-20T22:43:15
| 2019-07-24T19:31:49
|
Smali
|
UTF-8
|
Java
| false
| false
| 2,917
|
java
|
package rx.internal.operators;
import java.util.concurrent.atomic.AtomicBoolean;
import rx.Observable.Operator;
import rx.Producer;
import rx.Subscriber;
public final class OperatorElementAt<T> implements Operator<T, T> {
final T defaultValue;
final boolean hasDefault;
final int index;
static class InnerProducer extends AtomicBoolean implements Producer {
private static final long serialVersionUID = 1;
final Producer actual;
public InnerProducer(Producer producer) {
this.actual = producer;
}
public void request(long j) {
if (j < 0) {
throw new IllegalArgumentException("n >= 0 required");
} else if (j > 0 && compareAndSet(0, true) != null) {
this.actual.request(Long.MAX_VALUE);
}
}
}
public OperatorElementAt(int i) {
this(i, null, false);
}
public OperatorElementAt(int i, T t) {
this(i, t, true);
}
private OperatorElementAt(int i, T t, boolean z) {
if (i < 0) {
z = new StringBuilder();
z.append(i);
z.append(" is out of bounds");
throw new IndexOutOfBoundsException(z.toString());
}
this.index = i;
this.defaultValue = t;
this.hasDefault = z;
}
public final Subscriber<? super T> call(final Subscriber<? super T> subscriber) {
Object c19021 = new Subscriber<T>() {
private int currentIndex;
public void onNext(T t) {
int i = this.currentIndex;
this.currentIndex = i + 1;
if (i == OperatorElementAt.this.index) {
subscriber.onNext(t);
subscriber.onCompleted();
unsubscribe();
}
}
public void onError(Throwable th) {
subscriber.onError(th);
}
public void onCompleted() {
if (this.currentIndex <= OperatorElementAt.this.index) {
if (OperatorElementAt.this.hasDefault) {
subscriber.onNext(OperatorElementAt.this.defaultValue);
subscriber.onCompleted();
return;
}
Subscriber subscriber = subscriber;
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(OperatorElementAt.this.index);
stringBuilder.append(" is out of bounds");
subscriber.onError(new IndexOutOfBoundsException(stringBuilder.toString()));
}
}
public void setProducer(Producer producer) {
subscriber.setProducer(new InnerProducer(producer));
}
};
subscriber.add(c19021);
return c19021;
}
}
|
[
"mekosichkin.ru"
] |
mekosichkin.ru
|
dc81af0d63e3843042f96a37884974d98695eff2
|
7c88e6cd7c2604a9bfebd197a9f192bdddfbcb7c
|
/Practice/src/main/java/link/partition.java
|
74ca85f9d1f4defc118299f2ca89acd6bbcd7587
|
[] |
no_license
|
fcy-nienan/Image
|
1bca0a42085d681f73f41420a242e2c4b542f0e7
|
168bc4b5a50d5887693ac4ac44bbee3447e84105
|
refs/heads/develop
| 2022-12-24T04:33:53.026049
| 2022-07-27T16:31:10
| 2022-07-27T16:31:10
| 154,528,986
| 0
| 0
| null | 2022-12-16T01:43:43
| 2018-10-24T15:56:29
|
Java
|
UTF-8
|
Java
| false
| false
| 862
|
java
|
package link;
public class partition {
public static void main(String args[]) {
ListNode head=LinkUtil.create(new int[]{1,4,3,2,5,2});
ListNode result=partition(head,3);
LinkUtil.disListNode(result);
}
public static ListNode partition(ListNode head, int x) {
if (head==null||head.next==null)return head;
ListNode dummyLess=new ListNode(0);
ListNode dummyGrater=new ListNode(0);
ListNode current=head,p=dummyLess,q=dummyGrater;
while (current!=null){
if (current.val<x){
p.next=current;
p=p.next;
}else{
q.next=current;
q=q.next;
}
current=current.next;
}
q.next=null;//防止死循环
p.next=dummyGrater.next;
return dummyLess.next;
}
}
|
[
"807715333@qq.com"
] |
807715333@qq.com
|
6bc0d2f3c699e903880f4d706aca9de9bb3503c0
|
3f7a5d7c700199625ed2ab3250b939342abee9f1
|
/src/gcom/atendimentopublico/ordemservico/ServicoTipoBoletim.java
|
8dece20b05c617b4a22cd07f4be635aa6eaca5c5
|
[] |
no_license
|
prodigasistemas/gsan-caema
|
490cecbd2a784693de422d3a2033967d8063204d
|
87a472e07e608c557e471d555563d71c76a56ec5
|
refs/heads/master
| 2021-01-01T06:05:09.920120
| 2014-10-08T20:10:40
| 2014-10-08T20:10:40
| 24,958,220
| 1
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 5,551
|
java
|
/*
* Copyright (C) 2007-2007 the GSAN - Sistema Integrado de Gestão de Serviços de Saneamento
*
* This file is part of GSAN, an integrated service management system for Sanitation
*
* GSAN 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.
*
* GSAN is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
/*
* GSAN - Sistema Integrado de Gestão de Serviços de Saneamento
* Copyright (C) <2007>
* Adriano Britto Siqueira
* Alexandre Santos Cabral
* Ana Carolina Alves Breda
* Ana Maria Andrade Cavalcante
* Aryed Lins de Araújo
* Bruno Leonardo Rodrigues Barros
* Carlos Elmano Rodrigues Ferreira
* Cláudio de Andrade Lira
* Denys Guimarães Guenes Tavares
* Eduardo Breckenfeld da Rosa Borges
* Fabíola Gomes de Araújo
* Flávio Leonardo Cavalcanti Cordeiro
* Francisco do Nascimento Júnior
* Homero Sampaio Cavalcanti
* Ivan Sérgio da Silva Júnior
* José Edmar de Siqueira
* José Thiago Tenório Lopes
* Kássia Regina Silvestre de Albuquerque
* Leonardo Luiz Vieira da Silva
* Márcio Roberto Batista da Silva
* Maria de Fátima Sampaio Leite
* Micaela Maria Coelho de Araújo
* Nelson Mendonça de Carvalho
* Newton Morais e Silva
* Pedro Alexandre Santos da Silva Filho
* Rafael Corrêa Lima e Silva
* Rafael Francisco Pinto
* Rafael Koury Monteiro
* Rafael Palermo de Araújo
* Raphael Veras Rossiter
* Roberto Sobreira Barbalho
* Rodrigo Avellar Silveira
* Rosana Carvalho Barbosa
* Sávio Luiz de Andrade Cavalcante
* Tai Mu Shih
* Thiago Augusto Souza do Nascimento
* Tiago Moreno Rodrigues
* Vivianne Barbosa Sousa
*
* Este programa é software livre; você pode redistribuí-lo e/ou
* modificá-lo sob os termos de Licença Pública Geral GNU, conforme
* publicada pela Free Software Foundation; versão 2 da
* Licença.
* Este programa é distribuído na expectativa de ser útil, mas SEM
* QUALQUER GARANTIA; sem mesmo a garantia implícita de
* COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM
* PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais
* detalhes.
* Você deve ter recebido uma cópia da Licença Pública Geral GNU
* junto com este programa; se não, escreva para Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
package gcom.atendimentopublico.ordemservico;
import java.io.Serializable;
import java.util.Date;
/** @author Hibernate CodeGenerator */
public class ServicoTipoBoletim implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private Short indicadorPavimento;
private Short indicadorReposicaoAsfalto;
private Short indicadorReposicaoParalelo;
private Short indicadorReposicaoCalcada;
private Date ultimaAlteracao;
private gcom.atendimentopublico.ordemservico.ServicoTipo servicoTipo;
public ServicoTipoBoletim() {
super();
// TODO Auto-generated constructor stub
}
public ServicoTipoBoletim(Short indicadorPavimento, Short indicadorReposicaoAsfalto, Short indicadorReposicaoParalelo, Short indicadorReposicaoCalcada, Date ultimaAlteracao, ServicoTipo servicoTipo) {
super();
// TODO Auto-generated constructor stub
this.indicadorPavimento = indicadorPavimento;
this.indicadorReposicaoAsfalto = indicadorReposicaoAsfalto;
this.indicadorReposicaoParalelo = indicadorReposicaoParalelo;
this.indicadorReposicaoCalcada = indicadorReposicaoCalcada;
this.ultimaAlteracao = ultimaAlteracao;
this.servicoTipo = servicoTipo;
}
public Short getIndicadorPavimento() {
return indicadorPavimento;
}
public void setIndicadorPavimento(Short indicadorPavimento) {
this.indicadorPavimento = indicadorPavimento;
}
public Short getIndicadorReposicaoAsfalto() {
return indicadorReposicaoAsfalto;
}
public void setIndicadorReposicaoAsfalto(Short indicadorReposicaoAsfalto) {
this.indicadorReposicaoAsfalto = indicadorReposicaoAsfalto;
}
public Short getIndicadorReposicaoCalcada() {
return indicadorReposicaoCalcada;
}
public void setIndicadorReposicaoCalcada(Short indicadorReposicaoCalcada) {
this.indicadorReposicaoCalcada = indicadorReposicaoCalcada;
}
public Short getIndicadorReposicaoParalelo() {
return indicadorReposicaoParalelo;
}
public void setIndicadorReposicaoParalelo(Short indicadorReposicaoParalelo) {
this.indicadorReposicaoParalelo = indicadorReposicaoParalelo;
}
public gcom.atendimentopublico.ordemservico.ServicoTipo getServicoTipo() {
return servicoTipo;
}
public void setServicoTipo(
gcom.atendimentopublico.ordemservico.ServicoTipo servicoTipo) {
this.servicoTipo = servicoTipo;
}
public Date getUltimaAlteracao() {
return ultimaAlteracao;
}
public void setUltimaAlteracao(Date ultimaAlteracao) {
this.ultimaAlteracao = ultimaAlteracao;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}
|
[
"felipesantos2089@gmail.com"
] |
felipesantos2089@gmail.com
|
447db5a9049eac1ab8c258f28e2a3d043c61d524
|
d54cc14cd058d20f27c56107b88d76cc27d4fd29
|
/leopard-boot-data-parent/leopard-boot-jdbc/src/main/java/io/leopard/jdbc/CountSqlParser.java
|
2167f9cd64f784f1becf9029fc0bd6df2b596098
|
[
"Apache-2.0"
] |
permissive
|
ailu5949/leopard-boot
|
a59cea1a03b1b41712d29cf4091be76dca8316a7
|
33201a2962821475772a53ddce64f7f823f62242
|
refs/heads/master
| 2020-04-02T09:28:01.286249
| 2018-10-23T08:46:00
| 2018-10-23T08:46:00
| 154,294,038
| 1
| 0
|
Apache-2.0
| 2018-10-23T08:46:20
| 2018-10-23T08:46:20
| null |
UTF-8
|
Java
| false
| false
| 2,601
|
java
|
package io.leopard.jdbc;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.springframework.util.StringUtils;
public class CountSqlParser {
protected final String sql;
private final StatementParameter param;
protected String countSql;
private Integer start;
private Integer size;
public CountSqlParser(String sql, StatementParameter param) {
this.sql = sql;
// System.err.println("sql:" + sql);
this.param = param;
this.parse();
}
private static final Pattern LIMIT_PATTERN = Pattern.compile(" limit .*$", Pattern.CASE_INSENSITIVE);
private static final Pattern ORDERBY_PATTERN = Pattern.compile(" order by .*$", Pattern.CASE_INSENSITIVE);
protected void parse() {
String sql = this.sql;
sql = sql.replaceFirst("select .*? from", "select count(*) from");
sql = sql.replaceFirst("SELECT .*? FROM", "SELECT count(*) FROM");
this.parsePostfix(sql);
}
protected void parsePostfix(String sql) {
{
Matcher m = ORDERBY_PATTERN.matcher(sql);
if (m.find()) {
sql = sql.substring(0, m.start());
}
}
{
// 这里在orderby解析后面使用else
Matcher m = LIMIT_PATTERN.matcher(sql);
if (m.find()) {
int index = m.start();
sql = sql.substring(0, index);
}
}
parseLimitValue();
this.countSql = sql;
// System.err.println("countSql2:" + countSql);
}
/**
* 解析start和size值
*/
protected void parseLimitValue() {
Matcher m = LIMIT_PATTERN.matcher(sql);
if (!m.find()) {
return;
}
int index = m.start();
String limitSql = sql.substring(index);
// System.out.println("limitSql:" + limitSql);
int count = StringUtils.countOccurrencesOf(limitSql, "?");
int paramCount = param.size();
if (count == 1) {
this.size = param.getInt(paramCount - 1);
}
else if (count == 2) {
this.start = param.getInt(paramCount - 2);
this.size = param.getInt(paramCount - 1);
}
else {
throw new IllegalArgumentException("怎么limit参数是" + count + "个?");
}
}
public String getCountSql() {
return this.countSql;
}
public StatementParameter getCountParam() {
int max = StringUtils.countOccurrencesOf(this.countSql, "?");
Object[] values = this.param.getArgs();
StatementParameter param = new StatementParameter();
for (int i = 0; i < max; i++) {
Class<?> type = this.param.getType(i);
param.setObject(type, values[i]);
}
return param;
}
public Integer getStart() {
return start;
}
public Integer getSize() {
return size;
}
}
|
[
"tanhaichao@gmail.com"
] |
tanhaichao@gmail.com
|
52f716ecbbbf1d8837bf4c0ddc57f27a29a640d0
|
7dc6bf17c5acc4a5755063a3ffc0c86f4b6ad8c3
|
/java_decompiled_from_smali/android/support/v4/widget/r.java
|
c3cb356ee493047a1d666e47eec89d4f9e6773d4
|
[] |
no_license
|
alecsandrudaj/mobileapp
|
183dd6dc5c2fe8ab3aa1f21495d4221e6f304965
|
b1b4ad337ec36ffb125df8aa1d04c759c33c418a
|
refs/heads/master
| 2023-02-19T18:07:50.922596
| 2021-01-07T15:30:44
| 2021-01-07T15:30:44
| 300,325,195
| 0
| 0
| null | 2020-11-19T13:26:25
| 2020-10-01T15:18:57
|
Smali
|
UTF-8
|
Java
| false
| false
| 1,210
|
java
|
package android.support.v4.widget;
import android.content.Context;
import android.view.animation.Interpolator;
import android.widget.OverScroller;
class r {
public static Object a(Context context, Interpolator interpolator) {
return interpolator != null ? new OverScroller(context, interpolator) : new OverScroller(context);
}
public static void a(Object obj, int i, int i2, int i3, int i4, int i5) {
((OverScroller) obj).startScroll(i, i2, i3, i4, i5);
}
public static boolean a(Object obj) {
return ((OverScroller) obj).isFinished();
}
public static int b(Object obj) {
return ((OverScroller) obj).getCurrX();
}
public static int c(Object obj) {
return ((OverScroller) obj).getCurrY();
}
public static boolean d(Object obj) {
return ((OverScroller) obj).computeScrollOffset();
}
public static void e(Object obj) {
((OverScroller) obj).abortAnimation();
}
public static int f(Object obj) {
return ((OverScroller) obj).getFinalX();
}
public static int g(Object obj) {
return ((OverScroller) obj).getFinalY();
}
}
|
[
"rgosa@bitdefender.com"
] |
rgosa@bitdefender.com
|
e38a28386a25043df449b7fb27a2fedeb96a1570
|
c81dd37adb032fb057d194b5383af7aa99f79c6a
|
/java/com/facebook/ads/redexgen/X/C0454Hu.java
|
1d3137502e3fa121382035c29201f48f80cf1598
|
[] |
no_license
|
hongnam207/pi-network-source
|
1415a955e37fe58ca42098967f0b3307ab0dc785
|
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
|
refs/heads/main
| 2023-03-30T07:49:35.920796
| 2021-03-28T06:56:24
| 2021-03-28T06:56:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 182
|
java
|
package com.facebook.ads.redexgen.X;
/* renamed from: com.facebook.ads.redexgen.X.Hu reason: case insensitive filesystem */
public final class C0454Hu extends AnonymousClass9I {
}
|
[
"nganht2@vng.com.vn"
] |
nganht2@vng.com.vn
|
93ee2fd57db4c5947ce58c63982ebc35dbd5ce48
|
b82e98b7e14ce1872af3848b250979fe40ad94fe
|
/src/main/java/com/upyun/UpYunUtils.java
|
93817bcef4005275947cf248a2382424298a7167
|
[] |
no_license
|
czllfy/java-sdk
|
d3c54df689b5c5509759beb8d2d9f2c1582393e8
|
75fdd4538da12d5cf7f8c65fb7edeca6f4d47829
|
refs/heads/master
| 2023-05-29T20:21:57.128661
| 2021-06-15T02:14:04
| 2021-06-15T02:14:04
| 390,893,908
| 1
| 0
| null | 2021-07-30T01:29:29
| 2021-07-30T01:29:29
| null |
UTF-8
|
Java
| false
| false
| 5,640
|
java
|
package com.upyun;
import org.json.JSONObject;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.*;
import java.security.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
public class UpYunUtils {
public static final String VERSION = "upyun-java-sdk/4.2.2";
private static final String SEPARATOR = "/";
/**
* 计算policy
*
* @param paramMap
* @return
*/
public static String getPolicy(Map<String, Object> paramMap) {
JSONObject obj = new JSONObject(paramMap);
return Base64Coder.encodeString(obj.toString());
}
/**
* 计算签名
*
* @param policy
* @param secretKey
* @return
*/
public static String getSignature(String policy,
String secretKey) {
return md5(policy + "&" + secretKey);
}
/**
* 计算md5Ø
*
* @param string
* @return
*/
public static String md5(String string) {
byte[] hash;
try {
hash = MessageDigest.getInstance("MD5").digest(string.getBytes("UTF-8"));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("UTF-8 is unsupported", e);
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("MessageDigest不支持MD5Util", e);
}
StringBuilder hex = new StringBuilder(hash.length * 2);
for (byte b : hash) {
if ((b & 0xFF) < 0x10) hex.append("0");
hex.append(Integer.toHexString(b & 0xFF));
}
return hex.toString();
}
public static String md5(File file, int blockSize) {
try {
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
FileInputStream in = new FileInputStream(file);
byte[] buffer = new byte[blockSize];
int length;
while ((length = in.read(buffer)) > 0) {
messageDigest.update(buffer, 0, length);
}
byte[] hash = messageDigest.digest();
StringBuilder hex = new StringBuilder(hash.length * 2);
for (byte b : hash) {
if ((b & 0xFF) < 0x10) hex.append("0");
hex.append(Integer.toHexString(b & 0xFF));
}
return hex.toString();
} catch (FileNotFoundException e) {
throw new RuntimeException("file not found", e);
} catch (IOException e) {
throw new RuntimeException("file get md5 failed", e);
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("MessageDigest不支持MD5Util", e);
}
}
public static String md5(byte[] bytes) {
byte[] hash;
try {
hash = MessageDigest.getInstance("MD5").digest(bytes);
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("MessageDigest不支持MD5Util", e);
}
StringBuilder hex = new StringBuilder(hash.length * 2);
for (byte b : hash) {
if ((b & 0xFF) < 0x10) hex.append("0");
hex.append(Integer.toHexString(b & 0xFF));
}
return hex.toString();
}
private static final String HMAC_SHA1_ALGORITHM = "HmacSHA1";
public static String sign(String method, String date, String path, String userName, String password, String md5) throws UpException {
StringBuilder sb = new StringBuilder();
String sp = "&";
sb.append(method);
sb.append(sp);
sb.append(path);
sb.append(sp);
sb.append(date);
if (md5 != null && md5.length() > 0) {
sb.append(sp);
sb.append(md5);
}
String raw = sb.toString().trim();
byte[] hmac = null;
try {
hmac = calculateRFC2104HMACRaw(password, raw);
} catch (Exception e) {
throw new UpException("calculate SHA1 wrong.");
}
if (hmac != null) {
return "UPYUN " + userName + ":" + Base64Coder.encodeLines(hmac).trim();
}
return null;
}
public static byte[] calculateRFC2104HMACRaw(String key, String data)
throws SignatureException, NoSuchAlgorithmException, InvalidKeyException {
byte[] keyBytes = key.getBytes();
SecretKeySpec signingKey = new SecretKeySpec(keyBytes, HMAC_SHA1_ALGORITHM);
// Get an hmac_sha1 Mac instance and initialize with the signing key
Mac mac = Mac.getInstance(HMAC_SHA1_ALGORITHM);
mac.init(signingKey);
// Compute the hmac on input data bytes
return mac.doFinal(data.getBytes());
}
private static boolean isEmpty(String str) {
return str == null || str.length() == 0;
}
public static String formatPath(String bucketName, String path) {
if (!isEmpty(path)) {
// 去除前后的空格
path = path.trim();
// 确保路径以"/"开头
if (!path.startsWith(SEPARATOR)) {
return SEPARATOR + bucketName + SEPARATOR + path;
}
}
return SEPARATOR + bucketName + path;
}
/**
* 获取 GMT 格式时间戳
*
* @return GMT 格式时间戳
*/
public static String getGMTDate() {
SimpleDateFormat formater = new SimpleDateFormat(
"EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US);
formater.setTimeZone(TimeZone.getTimeZone("GMT"));
return formater.format(new Date());
}
}
|
[
"mingming.ye@upai.com"
] |
mingming.ye@upai.com
|
38c0ddb2318e415fbb2ebfee91894cedd05e9fa2
|
32f38cd53372ba374c6dab6cc27af78f0a1b0190
|
/app/src/main/java/com/autonavi/mine/page/ToolsBoxUtils$2.java
|
4bb4782570953a91bda5d805b5b4bb63fd656393
|
[] |
no_license
|
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
| 1,704
|
java
|
package com.autonavi.mine.page;
import com.amap.bundle.aosservice.request.AosRequest;
import com.amap.bundle.aosservice.response.AosByteResponse;
import com.amap.bundle.aosservice.response.AosResponseException;
import com.amap.bundle.network.response.AbstractAOSParser;
import com.autonavi.common.Callback;
import com.autonavi.minimap.falcon.base.FalconAosPrepareResponseCallback;
import org.json.JSONException;
import org.json.JSONObject;
public class ToolsBoxUtils$2 extends FalconAosPrepareResponseCallback<ddt> {
final /* synthetic */ Callback a;
public final /* synthetic */ Object a(AosByteResponse aosByteResponse) {
return b(aosByteResponse);
}
public final /* synthetic */ void a(Object obj) {
ddt ddt = (ddt) obj;
if (this.a != null) {
if (ddt == null) {
a((Throwable) new RuntimeException("result is null!"), true);
return;
}
this.a.callback(ddt);
}
}
public final void a(AosRequest aosRequest, AosResponseException aosResponseException) {
a((Throwable) aosResponseException, false);
}
private static ddt b(AosByteResponse aosByteResponse) {
if (aosByteResponse.getResult() == null) {
return null;
}
try {
JSONObject aosByteResponseToJSONObject = AbstractAOSParser.aosByteResponseToJSONObject(aosByteResponse);
new dds();
return dds.a(aosByteResponseToJSONObject);
} catch (JSONException unused) {
return null;
}
}
private void a(Throwable th, boolean z) {
if (this.a != null) {
this.a.error(th, z);
}
}
}
|
[
"hubert.yang@nf-3.com"
] |
hubert.yang@nf-3.com
|
852f110dc5934f8776915e7d2ee631a9b94b4219
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_1015779.java
|
ebd431d499eafaf7f40b8ed8c94c81087c46ebd8
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 406
|
java
|
/**
* Converts a java.lang.String in to a SHA hashed String
* @param source the source String
* @return the MD5 hashed version of the string
*/
public static String sha(String source){
try {
MessageDigest md=MessageDigest.getInstance("SHA");
byte[] bytes=md.digest(source.getBytes());
return getString(bytes);
}
catch ( Exception e) {
e.printStackTrace();
return null;
}
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
9c91f633871fe36f752a5a7095d2d7eff5029ab8
|
72d00fe442922f241d02887f64ee26d8dd4d8cb6
|
/src/main/java/org/hackerrank/geekforgeeks/IsBST.java
|
1c919766ed633965bb8d26734a2a7aefd74b52c9
|
[] |
no_license
|
SANDEEPERUMALLA/hackerrank
|
9aaef9be4380791a5e8b20b740de3063515bc31f
|
6187e84eaae556d0d64ddf75568a3177bfcac20c
|
refs/heads/master
| 2020-03-07T22:17:20.377450
| 2018-06-06T20:03:18
| 2018-06-06T20:03:18
| 127,750,049
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,088
|
java
|
package org.hackerrank.geekforgeeks;
public class IsBST {
static class Node
{
int data;
Node left, right;
Node(int item)
{
data = item;
left = right = null;
}
}
static boolean isBinarySearchTree(Node node, int max, int min) {
if (!(node.data < max && node.data > min)) {
return false;
}
boolean l = true;
if (node.left != null) {
l = isBinarySearchTree(node.left, node.data, min);
}
if (!l) {
return false;
}
if (node.right == null) {
return true;
}
return isBinarySearchTree(node.right, max, node.data);
}
static int isBST(Node root) {
if(root == null){
return 0;
}
boolean res = isBinarySearchTree(root, Integer.MAX_VALUE, Integer.MIN_VALUE);
return res ? 1 : 0;
}
public static void main(String args[]){
IsBST.Node node = new IsBST.Node(0);
System.out.println(isBST(node));
}
}
|
[
"p.sandeepkumargupta@gmail.com"
] |
p.sandeepkumargupta@gmail.com
|
4354daa85cd80d8cdf3c52caa58a878cd315b8c3
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_a25c7a1f34ab12c8a6d9af66b8ce2107d9c3d313/MathUtil/10_a25c7a1f34ab12c8a6d9af66b8ce2107d9c3d313_MathUtil_t.java
|
f5695a7c41140b4eac1fb961ed9c842eb714a706
|
[] |
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
| 389
|
java
|
/*
* Copyright LWJGL. All rights reserved.
* License terms: http://lwjgl.org/license.php
*/
package org.lwjgl.system;
public final class MathUtil {
private MathUtil() {
}
public static int mathNextPoT(final int value) {
int v = value - 1;
v |= (v >>> 1);
v |= (v >>> 2);
v |= (v >>> 4);
v |= (v >>> 8);
v |= (v >>> 16);
return v + 1;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
c02103e9efac0cf14b00afa5e2e698dbd1d4367f
|
853c9b994fb58d9734183e5fa98e41445363df84
|
/src/1_java/ch12_abstractClass/src/com/lec/ex06_lunch/Child1.java
|
b1ef06256fa547c910edc1247837fd5efaa79c6b
|
[] |
no_license
|
V3Rit4ss/Class
|
efd96be0783ebe6682bafd3662bb03f40ecb701e
|
05339974c2302c5c18b106fb47b5ba1d3d86fce0
|
refs/heads/main
| 2023-03-23T21:15:06.086699
| 2021-03-21T07:36:56
| 2021-03-21T07:36:56
| 340,438,731
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 476
|
java
|
package com.lec.ex06_lunch;
//Child1 c = new Child1(300,1000,100,300,800,350);
public class Child1 extends LunchMenu {
public Child1(int rice, int bulgogi, int soup, int banana, int mlik, int almond) {
super(rice, bulgogi, soup, banana, mlik, almond); //매개변수가 없는 생성자가 없기에 슈퍼를 썼다.
}
@Override
public int calcuate() { //우유 알러지 있는 그룹
return getRice()+getBulgogi()+getSoup()+getBanana()+getAlmond();
}
}
|
[
"ehdtjs7089@gmail.com"
] |
ehdtjs7089@gmail.com
|
2730c35a98e5a61f7abbd36934a39a7c3e1cd5e3
|
72e1e90dd8e1e43bad4a6ba46a44d1f30aa76fe6
|
/java/jee/Jee_7_essentials/base/src/main/java/br/com/fernando/chapter15_batchProcessing/part09_decision/MyDecider.java
|
fec97fe653ccc3db8f0a0914327f0d55a918f247
|
[
"Apache-2.0"
] |
permissive
|
fernando-romulo-silva/myStudies
|
bfdf9f02778d2f4993999f0ffc0ddd0066ec41b4
|
aa8867cda5edd54348f59583555b1f8fff3cd6b3
|
refs/heads/master
| 2023-08-16T17:18:50.665674
| 2023-08-09T19:47:15
| 2023-08-09T19:47:15
| 230,160,136
| 3
| 0
|
Apache-2.0
| 2023-02-08T19:49:02
| 2019-12-25T22:27:59
| null |
WINDOWS-1252
|
Java
| false
| false
| 791
|
java
|
package br.com.fernando.chapter15_batchProcessing.part09_decision;
import javax.batch.api.Decider;
import javax.batch.runtime.StepExecution;
import javax.inject.Named;
@Named
public class MyDecider implements Decider {
// The decide method receives an array of StepExecution objects as input.
// These objects represent the execution element that transitions to this decider.
@Override
public String decide(final StepExecution[] ses) throws Exception {
for (final StepExecution se : ses) {
System.out.println(se.getStepName() + " " + se.getBatchStatus().toString() + " " + se.getExitStatus());
}
// The decider method returns an exit status that updates the current job execution’s exit status.
return "foobar";
}
}
|
[
"fernando.romulo.silva@gmail.com"
] |
fernando.romulo.silva@gmail.com
|
e0f6266e4b6625734fd2bddf463ea88b59e3f17c
|
59269e6549dd6c9d5a752e69591f3d5d11702e07
|
/ezyfox-util/src/main/java/com/tvd12/ezyfox/util/EzyEnums.java
|
1fadf7dd3b1b410cf81c311ab75e11fabdb93a21
|
[
"Apache-2.0"
] |
permissive
|
trungthao1989/ezyfox
|
7d51e2eb7fa1de30d1b4185496e618a919ee88d4
|
88885d4ba61c79c6da791aff0b9229dc59ddb271
|
refs/heads/master
| 2020-05-26T12:25:59.843302
| 2019-05-21T17:14:54
| 2019-05-21T17:14:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 606
|
java
|
package com.tvd12.ezyfox.util;
import java.util.function.Function;
import com.tvd12.ezyfox.constant.EzyHasIntId;
public final class EzyEnums {
private EzyEnums() {
}
public static <T extends EzyHasIntId> T valueOf(T[] values, int id) {
return valueOf(values, id, v -> v.getId());
}
public static <T> T valueOf(
T[] values, Object id, Function<T, Object> idFetcher) {
for(T v : values) {
Object vid = idFetcher.apply(v);
if(vid.equals(id)) {
return v;
}
}
throw new IllegalArgumentException("has no enum value with id = " + id);
}
}
|
[
"itprono3@gmail.com"
] |
itprono3@gmail.com
|
1bd830e3bed1ab33e7a9dde09bba8ac6d9ba6ab4
|
343c79e2c638fe5b4ef14de39d885bc5e1e6aca5
|
/MyApplication/app/src/main/java/cmcm/com/myapplication/com/facebook/ads/internal/adapters/o.java
|
33bd49e2e29d772062980eaa88cf31a9390f2d91
|
[] |
no_license
|
Leonilobayang/AndroidDemos
|
05a76647b8e27582fa56e2e15d4195c2ff9b9c32
|
6ac06c3752dfa9cebe81f7c796525a17df620663
|
refs/heads/master
| 2022-04-17T06:56:52.912639
| 2016-07-01T07:48:50
| 2016-07-01T07:48:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 365
|
java
|
package cmcm.com.myapplication.com.facebook.ads.internal.adapters;
import com.facebook.ads.AdError;
public abstract interface o
{
public abstract void a(n paramn);
public abstract void a(n paramn, AdError paramAdError);
}
/* Location: classes-dex2jar.jar
* Qualified Name: com.facebook.ads.internal.adapters.o
* JD-Core Version: 0.6.2
*/
|
[
"1004410930@qq.com"
] |
1004410930@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.