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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b0b0a7b993aa500cc6f93220aaa3b9febbfd474b
|
58ea72a5a4171878ffbc59d95921e4e911a840a7
|
/src/test/java/org/greencheek/web/filter/memcached/util/SplittingCharSeparatedValueSorterTest.java
|
ef52fba240079eb9b8adff6a033d5f04512b42bd
|
[
"Apache-2.0"
] |
permissive
|
helpying/tomcat-memcached-response-filter
|
559fe5d5e681559b30164af9355f5b25fdef7e17
|
02294944b25cdc9a9cfa6e7faa3cc14bf516c2b3
|
refs/heads/master
| 2021-01-21T08:43:21.348240
| 2014-06-16T06:10:17
| 2014-06-16T06:10:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,160
|
java
|
package org.greencheek.web.filter.memcached.util;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
public class SplittingCharSeparatedValueSorterTest {
private CharSeparatedValueSorter sorter;
@Before
public void setUp() {
sorter = new SplittingCharSeparatedValueSorter(new CustomSplitByChar(),new CustomJoinByChar());
}
@Test
public void testSortEmptyString() {
assertEquals("",sorter.sort("",','));
}
@Test
public void testSortNullString() {
assertEquals("",sorter.sort(null,','));
}
@Test
public void testSortString() {
assertEquals("a,b",sorter.sort("b,a",','));
}
@Test
public void testSortStringDifferentChar() {
assertEquals("a;b",sorter.sort("b;a",';'));
}
@Test
public void testSortStringWrongChar() {
assertEquals("b,a",sorter.sort("b,a",';'));
}
@Test
public void testStringNoChar() {
assertEquals("a",sorter.sort("a",','));
}
@Test
public void testStringWithMultipleItems() {
assertEquals("a,a,b,c,f,z",sorter.sort("a,c,f,b,a,z",','));
}
}
|
[
"dominic.tootell@gmail.com"
] |
dominic.tootell@gmail.com
|
17b750362b1c8cec42ed74cbf0bc9ba18c6a8bb2
|
1a8137ee60dad3e6130040524db50ce51b31dbff
|
/modules/HarvesterModule/src/main/java/gg/steve/mc/tp/modules/harvester/HarvesterModule.java
|
82f91d52f488fccb1b82c94af093a478684ceb78
|
[] |
no_license
|
nbdSteve/ToolsPlus-development
|
d7d249a52ae521b51ba229fb4b84c5bfd99f97a5
|
d387e0bc78479f341d9e5e340aa1ce3216b645c2
|
refs/heads/master
| 2023-06-25T16:36:30.668935
| 2021-07-25T04:52:47
| 2021-07-25T04:52:47
| 179,775,260
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,752
|
java
|
package gg.steve.mc.tp.modules.harvester;
import gg.steve.mc.tp.framework.yml.PluginFile;
import gg.steve.mc.tp.module.ToolsPlusModule;
import gg.steve.mc.tp.framework.nbt.NBTItem;
import gg.steve.mc.tp.modules.harvester.tool.HarvesterHoe;
import gg.steve.mc.tp.modules.harvester.tool.HarvesterHoeData;
import gg.steve.mc.tp.tool.AbstractTool;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.event.Listener;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class HarvesterModule extends ToolsPlusModule {
public static String moduleId = "HARVESTER";
public static String moduleConfigId = "HARVESTER_CONFIG";
public HarvesterModule() {
super(moduleId);
setNiceName("Harvester Hoe");
}
@Override
public String getVersion() {
return "2.0.0-PR1";
}
@Override
public String getAuthor() {
return "stevegoodhill";
}
@Override
public List<Listener> getListeners() {
return new ArrayList<>();
}
@Override
public PlaceholderExpansion getPlaceholderExpansion() {
return null;
}
@Override
public AbstractTool loadTool(NBTItem nbtItem, PluginFile pluginFile) {
return new HarvesterHoe(nbtItem, pluginFile);
}
@Override
public Map<String, String> getModuleFiles() {
Map<String, String> files = new HashMap<>();
files.put(moduleConfigId, "configs" + File.separator + "harvester.yml");
return files;
}
@Override
public void onLoad() {
HarvesterHoeData.initialise();
}
@Override
public void onShutdown() {
HarvesterHoeData.shutdown();
}
}
|
[
"s.goodhill@protonmail.com"
] |
s.goodhill@protonmail.com
|
d92a86437160c4033d97bc12118ac5c8875dadfb
|
ae87226f7c1b901566995c38e13eabfe1153dba4
|
/blog-service/src/main/java/com/chumbok/blog/Application.java
|
d9577440dd995a2ce3a7e36bab820794570ac5fb
|
[
"MIT"
] |
permissive
|
imran110219/production-ready-microservices-starter
|
828f610cc893974d745888b9a8286eef0ac22d98
|
a8cf1e71870b673192241d5eef06e7cc58de7c27
|
refs/heads/master
| 2023-03-29T07:09:39.521041
| 2021-04-06T16:59:12
| 2021-04-06T16:59:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 820
|
java
|
package com.chumbok.blog;
import com.chumbok.multitenancy.annotation.EnableMultitenantJpaRepositories;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration;
import javax.annotation.PostConstruct;
import java.util.TimeZone;
@SpringBootApplication
@EnableMultitenantJpaRepositories
@EnableAutoConfiguration(exclude = ErrorMvcAutoConfiguration.class)
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@PostConstruct
void init() {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
}
}
|
[
"mmahmood.ict.bd@gmail.com"
] |
mmahmood.ict.bd@gmail.com
|
25813ddbfda4d4d08688ef08b9c727df051ba07c
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/eclipsejdt_cluster/14705/tar_0.java
|
9c7f590c945e15ec87acdadba8a528719bbabb27
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,225
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.lookup.*;
public class Argument extends LocalDeclaration {
// prefix for setter method (to recognize special hiding argument)
private final static char[] SET = "set".toCharArray(); //$NON-NLS-1$
public Argument(char[] name, long posNom, TypeReference tr, int modifiers) {
super(name, (int) (posNom >>> 32), (int) posNom);
this.declarationSourceEnd = (int) posNom;
this.modifiers = modifiers;
type = tr;
this.bits |= IsLocalDeclarationReachable;
}
public void bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
// record the resolved type into the type reference
int modifierFlag = this.modifiers;
Binding existingVariable = scope.getBinding(name, Binding.VARIABLE, this, false /*do not resolve hidden field*/);
if (existingVariable != null && existingVariable.isValidBinding()){
if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) {
scope.problemReporter().redefineArgument(this);
return;
}
boolean isSpecialArgument = false;
if (existingVariable instanceof FieldBinding) {
if (scope.isInsideConstructor()) {
isSpecialArgument = true; // constructor argument
} else {
AbstractMethodDeclaration methodDecl = scope.referenceMethod();
if (methodDecl != null && CharOperation.prefixEquals(SET, methodDecl.selector)) {
isSpecialArgument = true; // setter argument
}
}
}
scope.problemReporter().localVariableHiding(this, existingVariable, isSpecialArgument);
}
scope.addLocalVariable(
this.binding =
new LocalVariableBinding(this, typeBinding, modifierFlag, true));
resolveAnnotations(scope, this.annotations, this.binding);
//true stand for argument instead of just local
this.binding.declaration = this;
this.binding.useFlag = used ? LocalVariableBinding.USED : LocalVariableBinding.UNUSED;
}
/**
* @see org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration#getKind()
*/
public int getKind() {
return PARAMETER;
}
public boolean isVarArgs() {
return this.type != null && (this.type.bits & IsVarArgs) != 0;
}
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output);
printModifiers(this.modifiers, output);
if (this.annotations != null) printAnnotations(this.annotations, output);
if (type == null) {
output.append("<no type> "); //$NON-NLS-1$
} else {
type.print(0, output).append(' ');
}
return output.append(this.name);
}
public StringBuffer printStatement(int indent, StringBuffer output) {
return print(indent, output).append(';');
}
public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding exceptionType = this.type.resolveType(scope, true /* check bounds*/);
if (exceptionType == null) return null;
if (exceptionType.isBoundParameterizedType()) {
scope.problemReporter().invalidParameterizedExceptionType(exceptionType, this);
return null;
}
if (exceptionType.isTypeVariable()) {
scope.problemReporter().invalidTypeVariableAsException(exceptionType, this);
return null;
}
TypeBinding throwable = scope.getJavaLangThrowable();
if (!exceptionType.isCompatibleWith(throwable)) {
scope.problemReporter().typeMismatchError(exceptionType, throwable, this);
return null;
}
Binding existingVariable = scope.getBinding(name, Binding.VARIABLE, this, false /*do not resolve hidden field*/);
if (existingVariable != null && existingVariable.isValidBinding()){
if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) {
scope.problemReporter().redefineArgument(this);
return null;
}
scope.problemReporter().localVariableHiding(this, existingVariable, false);
}
this.binding = new LocalVariableBinding(this, exceptionType, modifiers, false); // argument decl, but local var (where isArgument = false)
resolveAnnotations(scope, this.annotations, this.binding);
scope.addLocalVariable(binding);
binding.setConstant(NotAConstant);
return exceptionType;
}
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (type != null)
type.traverse(visitor, scope);
if (initialization != null)
initialization.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
22e23b1c1061fd3f18d7bc779a8ed59bf3d1b85d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_ed2cac43a53bcca9d76af6ad3c26a1bbcc92d1f9/AbstractFileRegionTest/1_ed2cac43a53bcca9d76af6ad3c26a1bbcc92d1f9_AbstractFileRegionTest_s.java
|
9ddaaa41aa0cf2c04805a6febc06fb679556f3fc
|
[] |
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
| 4,409
|
java
|
package org.apache.mina.transport;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.util.concurrent.CountDownLatch;
import junit.framework.TestCase;
import org.apache.mina.common.ConnectFuture;
import org.apache.mina.common.IoAcceptor;
import org.apache.mina.common.IoBuffer;
import org.apache.mina.common.IoConnector;
import org.apache.mina.common.IoHandlerAdapter;
import org.apache.mina.common.IoSession;
import org.apache.mina.common.WriteFuture;
import org.apache.mina.util.AvailablePortFinder;
public abstract class AbstractFileRegionTest extends TestCase {
private static final int FILE_SIZE = 1 * 1024 * 1024; // 1MB file
protected abstract IoAcceptor createAcceptor();
protected abstract IoConnector createConnector();
public void testSendLargeFile() throws Throwable {
File file = createLargeFile();
assertEquals("Test file not as big as specified", FILE_SIZE, file.length());
final CountDownLatch latch = new CountDownLatch(1);
final boolean[] success = {false};
final Throwable[] exception = {null};
int port = AvailablePortFinder.getNextAvailable(1025);
IoAcceptor acceptor = createAcceptor();
acceptor.setHandler(new IoHandlerAdapter() {
private int index = 0;
@Override
public void exceptionCaught(IoSession session, Throwable cause)
throws Exception {
exception[0] = cause;
session.close();
}
@Override
public void messageReceived(IoSession session, Object message) throws Exception {
IoBuffer buffer = (IoBuffer) message;
while (buffer.hasRemaining()) {
int x = buffer.getInt();
if (x != index) {
throw new Exception(String.format("Integer at %d was %d but should have been %d", index, x, index));
}
index++;
}
if (index > FILE_SIZE / 4) {
throw new Exception("Read too much data");
}
if (index == FILE_SIZE / 4) {
success[0] = true;
session.close();
}
}
});
acceptor.bind(new InetSocketAddress(port));
IoConnector connector = createConnector();
connector.setHandler(new IoHandlerAdapter() {
@Override
public void exceptionCaught(IoSession session, Throwable cause)
throws Exception {
exception[0] = cause;
session.close();
}
@Override
public void sessionClosed(IoSession session) throws Exception {
latch.countDown();
}
});
ConnectFuture future = connector.connect(new InetSocketAddress("localhost", port));
future.awaitUninterruptibly();
IoSession session = future.getSession();
session.write(file);
latch.await();
if (exception[0] != null) {
throw exception[0];
}
assertTrue("Did not complete file transfer successfully", success[0]);
assertEquals("Written messages should be 1 (we wrote one file)", 1, session.getWrittenMessages());
assertEquals("Written bytes should match file size", FILE_SIZE, session.getWrittenBytes());
connector.dispose();
acceptor.dispose();
}
private File createLargeFile() throws IOException {
File largeFile = File.createTempFile("mina-test", "largefile");
FileChannel channel = new FileOutputStream(largeFile).getChannel();
ByteBuffer buffer = createBuffer();
channel.write(buffer);
channel.close();
return largeFile;
}
private ByteBuffer createBuffer() {
ByteBuffer buffer = ByteBuffer.allocate(FILE_SIZE);
for (int i = 0; i < FILE_SIZE / 4; i++) {
buffer.putInt(i);
}
buffer.flip();
return buffer;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e6c14b741c67aa755c6241fba887fa17548c46fe
|
8be6c54bdaa6b9d326d5052883eadf5f0e18da7e
|
/app/src/main/java/com/dealse/dealsepartner/Interfaces/AddStore.java
|
ab8e38c2dac829c9066a13b953f115bd3c7b9399
|
[] |
no_license
|
heartzz/DealseRetailer
|
1253f18e3c24212a20038c126eba3d6b0a472873
|
3ad626e8de38ee05f853a6366880f035d2580bd0
|
refs/heads/master
| 2023-06-10T12:57:33.513707
| 2021-06-16T20:20:58
| 2021-06-16T20:20:58
| 354,929,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,850
|
java
|
package com.dealse.dealsepartner.Interfaces;
import com.dealse.dealsepartner.Entity.CheckStoreMobieNumberExistRequest;
import com.dealse.dealsepartner.Entity.CheckStoreMobieNumberExistResponse;
import com.dealse.dealsepartner.Entity.Store;
import com.dealse.dealsepartner.Objects.Partner;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
public interface AddStore {
@Multipart
@POST("api/v1/Store/AddStoreForStoreApp")
Call<CheckStoreMobieNumberExistResponse> addStore(@Header("Authorization") String authtoken,
@Part("AreaId") Integer AreaId,
@Part("StoreTypeId") Integer StoreTypeId,
@Part("Name") RequestBody Name,
@Part("Email") RequestBody Email,
@Part("Address") RequestBody Address1,
@Part("Latitude") double Latitude,
@Part("Longitude") double Longitude,
@Part("OwnerName") RequestBody OwnerName,
@Part("OwnerMobileNo") RequestBody OwnerMobileNo,
@Part("MobileNo1") RequestBody MobileNo1,
@Part("DeviceID") RequestBody DeviceID,
@Part MultipartBody.Part Logo
);
}
|
[
"you@example.com"
] |
you@example.com
|
3ca6acef7b47ae79babaf931853edca44db084f4
|
93f3578669fb0d0030a550316aebe0d7b4221631
|
/rpc-supplychain-jxc/src/main/java/cn/com/glsx/supplychain/jxc/kafka/ExportMerchantOrder.java
|
d5ebfe9c3541f38eee7b8e56782f74ddcb050dd1
|
[] |
no_license
|
shanghaif/supplychain
|
4d7de62809b6c88ac5080a85a77fc4bf3d856db8
|
c36c771b0304c5739de98bdfc322c0082a9e523d
|
refs/heads/master
| 2023-02-09T19:01:35.562699
| 2021-01-05T09:39:11
| 2021-01-05T09:39:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,411
|
java
|
package cn.com.glsx.supplychain.jxc.kafka;
import java.util.Date;
//商户订单导出条件搜索
public class ExportMerchantOrder {
private String moMerchantOrder;
private String orderNumber;
private String productCode;
private String productName;
private String materialCode;
private String materialName;
private String dispatchOrderCode;
private String orderMaterialCode;
private String orderMaterialName;
private String type;
private Byte channel;
private String merchantCode;
private String merchantName;
private Byte status;
private Byte signStatus;
private Date startDate;
private Date endDate;
private Date checkStartDate;
private Date checkEndDate;
private Byte productTypeId;
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Byte getChannel() {
return channel;
}
public void setChannel(Byte channel) {
this.channel = channel;
}
public String getMerchantCode() {
return merchantCode;
}
public void setMerchantCode(String merchantCode) {
this.merchantCode = merchantCode;
}
public String getMerchantName() {
return merchantName;
}
public void setMerchantName(String merchantName) {
this.merchantName = merchantName;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public Date getCheckStartDate() {
return checkStartDate;
}
public void setCheckStartDate(Date checkStartDate) {
this.checkStartDate = checkStartDate;
}
public Date getCheckEndDate() {
return checkEndDate;
}
public void setCheckEndDate(Date checkEndDate) {
this.checkEndDate = checkEndDate;
}
public Byte getSignStatus() {
return signStatus;
}
public void setSignStatus(Byte signStatus) {
this.signStatus = signStatus;
}
public String getMoMerchantOrder() {
return moMerchantOrder;
}
public void setMoMerchantOrder(String moMerchantOrder) {
this.moMerchantOrder = moMerchantOrder;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public Byte getProductTypeId() {
return productTypeId;
}
public void setProductTypeId(Byte productTypeId) {
this.productTypeId = productTypeId;
}
public String getOrderMaterialName() {
return orderMaterialName;
}
public void setOrderMaterialName(String orderMaterialName) {
this.orderMaterialName = orderMaterialName;
}
public String getOrderMaterialCode() {
return orderMaterialCode;
}
public void setOrderMaterialCode(String orderMaterialCode) {
this.orderMaterialCode = orderMaterialCode;
}
@Override
public String toString() {
return "ExportMerchantOrder [moMerchantOrder=" + moMerchantOrder
+ ", orderNumber=" + orderNumber + ", productCode="
+ productCode + ", productName=" + productName
+ ", materialCode=" + materialCode + ", materialName="
+ materialName + ", orderMaterialCode=" + orderMaterialCode
+ ", orderMaterialName=" + orderMaterialName + ", type=" + type
+ ", channel=" + channel + ", merchantCode=" + merchantCode
+ ", merchantName=" + merchantName + ", status=" + status
+ ", signStatus=" + signStatus + ", startDate=" + startDate
+ ", endDate=" + endDate + ", checkStartDate=" + checkStartDate
+ ", checkEndDate=" + checkEndDate + ", productTypeId="
+ productTypeId + "]";
}
public String getDispatchOrderCode() {
return dispatchOrderCode;
}
public void setDispatchOrderCode(String dispatchOrderCode) {
this.dispatchOrderCode = dispatchOrderCode;
}
}
|
[
"3064741443@qq.com"
] |
3064741443@qq.com
|
1c8fa536fa6378a10dd02af5414c90ae649420a2
|
091a2336cd35315afcc684222eed0651b9c67b0f
|
/src/main/java/org/gradle/profiler/BuildInvocationResult.java
|
388e514c70f2b76b49760d0cbede98c2a65aa864
|
[
"Apache-2.0"
] |
permissive
|
Vinzhuo/gradle-profiler
|
abcda869afe7afb69a9010eabd2966040e515ea6
|
c4da173bcde8e2a3e2cf4a2b75301b41f49a4202
|
refs/heads/master
| 2021-09-07T21:56:46.344062
| 2018-03-01T17:07:51
| 2018-03-01T17:07:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 648
|
java
|
package org.gradle.profiler;
import java.time.Duration;
class BuildInvocationResult {
private final String displayName;
private final Duration executionTime;
private final String daemonPid;
public BuildInvocationResult(String displayName, Duration executionTime, String daemonPid) {
this.displayName = displayName;
this.executionTime = executionTime;
this.daemonPid = daemonPid;
}
public String getDisplayName() {
return displayName;
}
public Duration getExecutionTime() {
return executionTime;
}
public String getDaemonPid() {
return daemonPid;
}
}
|
[
"adam@gradle.com"
] |
adam@gradle.com
|
e18049078096a53b0b7bf0b8413f10d438ac67f8
|
cfa46c58b75ae523dea0f0cb352a3afa7e71ae98
|
/v0.24/fonte/src/argouml-app/src/org/argouml/uml/cognitive/critics/CrAssocNameConflict.java
|
adbf40e7b31ed4baa78afbb2388707a58fb1eda6
|
[
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive"
] |
permissive
|
pichiliani/CoArgoUML
|
8adc0d167ddf81f2af1139a33a9609b96b6cdf0b
|
bd0810c225dc1d02136c9fedc52cf8b90e0d5bc1
|
refs/heads/master
| 2021-01-13T01:45:25.487103
| 2012-11-28T18:38:40
| 2012-11-28T18:38:40
| 6,907,156
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,638
|
java
|
// $Id: CrAssocNameConflict.java 12950 2007-07-01 08:10:04Z tfmorris $
// Copyright (c) 1996-2006 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph appear in all copies. This software program and
// documentation are copyrighted by The Regents of the University of
// California. The software program and documentation are supplied "AS
// IS", without any accompanying services from The Regents. The Regents
// does not warrant that the operation of the program will be
// uninterrupted or error-free. The end-user understands that the program
// was developed for research purposes and is advised not to rely
// exclusively on the program for any reason. IN NO EVENT SHALL THE
// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
package org.argouml.uml.cognitive.critics;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import org.argouml.cognitive.Critic;
import org.argouml.cognitive.Designer;
import org.argouml.cognitive.ListSet;
import org.argouml.cognitive.ToDoItem;
import org.argouml.model.Model;
import org.argouml.uml.cognitive.UMLDecision;
import org.argouml.uml.cognitive.UMLToDoItem;
/**
* Well-formedness rule [2] for Namespace. See section 2.5.3.26 of
* UML 1.4 spec. Rule [1] is checked by CrNameConfusion.
*
* @author mkl
*/
public class CrAssocNameConflict extends CrUML {
/**
* The constructor.
*
*/
public CrAssocNameConflict() {
setupHeadAndDesc();
addSupportedDecision(UMLDecision.NAMING);
setKnowledgeTypes(Critic.KT_SYNTAX);
// no good trigger
}
/*
* @see org.argouml.uml.cognitive.critics.CrUML#predicate2(
* java.lang.Object, org.argouml.cognitive.Designer)
*/
public boolean predicate2(Object dm, Designer dsgr) {
return computeOffenders(dm).size() > 1;
}
/*
* @see org.argouml.cognitive.critics.Critic#toDoItem( java.lang.Object,
* org.argouml.cognitive.Designer)
*/
public ToDoItem toDoItem(Object dm, Designer dsgr) {
ListSet offs = computeOffenders(dm);
return new UMLToDoItem(this, offs, dsgr);
}
/**
* @param dm
* the object to check
* @return the set of offenders
*/
protected ListSet computeOffenders(Object dm) {
ListSet offenderResult = new ListSet();
if (Model.getFacade().isANamespace(dm)) {
HashMap<String, Object> names = new HashMap<String, Object>();
for (Object name1Object : Model.getFacade().getOwnedElements(dm)) {
if (!Model.getFacade().isAAssociation(name1Object)) {
continue;
}
String name = Model.getFacade().getName(name1Object);
Collection typ1 = getAllTypes(name1Object);
if (name == null || "".equals(name)) {
continue;
}
if (names.containsKey(name)) {
Object offender = names.get(name);
Collection typ2 = getAllTypes(offender);
if (typ1.containsAll(typ2) && typ2.containsAll(typ1)) {
if (!offenderResult.contains(offender)) {
offenderResult.add(offender);
}
offenderResult.add(name1Object);
}
}
names.put(name, name1Object);
}
}
return offenderResult;
}
/*
* @see org.argouml.cognitive.Poster#stillValid(
* org.argouml.cognitive.ToDoItem, org.argouml.cognitive.Designer)
*/
@Override
public boolean stillValid(ToDoItem i, Designer dsgr) {
if (!isActive()) {
return false;
}
ListSet offs = i.getOffenders();
// first element is e.g. the class, but we need to have its namespace
// to recompute the offenders.
Object f = offs.get(0);
Object ns = Model.getFacade().getNamespace(f);
if (!predicate(ns, dsgr)) {
return false;
}
ListSet newOffs = computeOffenders(ns);
boolean res = offs.equals(newOffs);
return res;
}
public Collection getAllTypes(Object assoc) {
Set list = new HashSet();
if (assoc == null) {
return list;
}
Collection assocEnds = Model.getFacade().getConnections(assoc);
if (assocEnds == null) {
return list;
}
for (Object element : assocEnds) {
if (Model.getFacade().isAAssociationEnd(element)) {
Object type = Model.getFacade().getType(element);
list.add(type);
}
}
return list;
}
}
|
[
"pichiliani@gmail.com"
] |
pichiliani@gmail.com
|
640323d23bd52013acf9f233a2e2e43a12b34d91
|
41b5626593f86fe60035fdaae236edf2c9352926
|
/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/common/resq/CourseChapterPeriodViewRESQ.java
|
8a7212f6dcead5768d01ef5003ba21c31b8ab4f5
|
[
"MIT"
] |
permissive
|
chenhaoaixuexi/cloudCourse
|
5b662a822108efa70606c06e590870a9aa6dbbe7
|
eafac97da0a08d7a3245aef2a248778d963c1997
|
refs/heads/master
| 2023-04-06T11:30:58.368217
| 2020-04-08T05:10:53
| 2020-04-08T05:10:53
| 253,463,242
| 0
| 0
|
MIT
| 2023-03-27T22:19:49
| 2020-04-06T10:22:05
|
Java
|
UTF-8
|
Java
| false
| false
| 1,542
|
java
|
package com.roncoo.education.course.common.resq;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 课时信息-查看
*
* @author wujing
*/
@Data
@Accessors(chain = true)
public class CourseChapterPeriodViewRESQ implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty(value = "课时ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 课程ID
*/
@ApiModelProperty(value = "课程ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long courseId;
/**
* 章节ID
*/
@ApiModelProperty(value = "章节ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long chapterId;
/**
* 课时名称
*/
@ApiModelProperty(value = "课时名称")
private String periodName;
/**
* 课时描述
*/
@ApiModelProperty(value = "课时描述")
private String periodDesc;
/**
* 是否免费:1免费,0收费
*/
@ApiModelProperty(value = "是否免费:1免费,0收费")
private Integer isFree;
/**
* 原价
*/
@ApiModelProperty(value = "原价")
private BigDecimal periodOriginal;
/**
* 优惠价
*/
@ApiModelProperty(value = "优惠价")
private BigDecimal periodDiscount;
}
|
[
"chen@LAPTOP-0BE253LS.localdomain"
] |
chen@LAPTOP-0BE253LS.localdomain
|
559a4efbbd5210c738b2f2856b5242ddc7c96f15
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_eada331d8d74f226ad95a41caf4ffb509a366286/DriverConnectionFactory/12_eada331d8d74f226ad95a41caf4ffb509a366286_DriverConnectionFactory_t.java
|
304abdb36e523a8812003895f38c95d919d53723
|
[] |
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,847
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.dbcp2;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.SQLException;
import java.util.Properties;
/**
* A {@link Driver}-based implementation of {@link ConnectionFactory}.
*
* @author Rodney Waldhoff
* @version $Revision$ $Date$
*/
public class DriverConnectionFactory implements ConnectionFactory {
public DriverConnectionFactory(Driver driver, String connectUri, Properties props) {
_driver = driver;
_connectUri = connectUri;
_props = props;
}
@Override
public Connection createConnection() throws SQLException {
return _driver.connect(_connectUri,_props);
}
private final Driver _driver;
private final String _connectUri;
private final Properties _props;
@Override
public String toString() {
return this.getClass().getName() + " [" + String.valueOf(_driver) + ";" +
String.valueOf(_connectUri) + ";" + String.valueOf(_props) + "]";
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
1e29968af3f37ccd7903e7b98664115acc82e518
|
fb342bd11d82fcc24aa38eec728d845a3b996a20
|
/api/src/main/java/pico/erp/production/order/ProductionOrderView.java
|
5f4dbe7febe5be9e4199977682958a2234e93162
|
[] |
no_license
|
kkojaeh/pico-erp-production-order
|
a430ce9724d5a85b000520e80e5ee4bb923e3042
|
3557a5c92efd7f66b6e927d87ea974da02633629
|
refs/heads/master
| 2020-04-26T11:38:45.446376
| 2019-04-05T04:24:54
| 2019-04-05T04:24:54
| 173,523,726
| 0
| 0
| null | 2019-04-03T23:58:22
| 2019-03-03T02:52:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,676
|
java
|
package pico.erp.production.order;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.Set;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import pico.erp.company.CompanyId;
import pico.erp.item.ItemId;
import pico.erp.item.spec.ItemSpecCode;
import pico.erp.process.ProcessId;
import pico.erp.project.ProjectId;
import pico.erp.shared.data.UnitKind;
import pico.erp.user.UserId;
import pico.erp.warehouse.location.site.SiteId;
import pico.erp.warehouse.location.station.StationId;
@Data
public class ProductionOrderView {
ProductionOrderId id;
ProductionOrderCode code;
ItemId itemId;
ProcessId processId;
ItemSpecCode itemSpecCode;
BigDecimal quantity;
BigDecimal spareQuantity;
BigDecimal progressedQuantity;
BigDecimal erroredQuantity;
UnitKind unit;
UserId ordererId;
UserId accepterId;
ProjectId projectId;
CompanyId receiverId;
SiteId receiveSiteId;
StationId receiveStationId;
OffsetDateTime dueDate;
OffsetDateTime committedDate;
OffsetDateTime completedDate;
OffsetDateTime acceptedDate;
OffsetDateTime rejectedDate;
OffsetDateTime canceledDate;
ProductionOrderStatusKind status;
OffsetDateTime estimatedPreparedDate;
OffsetDateTime preparedDate;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public static class Filter {
String code;
CompanyId receiverId;
UserId ordererId;
UserId accepterId;
ProjectId projectId;
ItemId itemId;
Set<ProductionOrderStatusKind> statuses;
OffsetDateTime startDueDate;
OffsetDateTime endDueDate;
}
}
|
[
"kkojaeh@gmail.com"
] |
kkojaeh@gmail.com
|
0f022c5ccfe107399420a2a090fa31c5997dd1a1
|
56456387c8a2ff1062f34780b471712cc2a49b71
|
/com/google/android/gms/games/internal/api/QuestsImpl$3.java
|
6664b4edefe08b1bf36bae8ea7296b0d7963cb32
|
[] |
no_license
|
nendraharyo/presensimahasiswa-sourcecode
|
55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50
|
890fc86782e9b2b4748bdb9f3db946bfb830b252
|
refs/heads/master
| 2020-05-21T11:21:55.143420
| 2019-05-10T19:03:56
| 2019-05-10T19:03:56
| 186,022,425
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 852
|
java
|
package com.google.android.gms.games.internal.api;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.games.internal.GamesClientImpl;
class QuestsImpl$3
extends QuestsImpl.LoadsImpl
{
QuestsImpl$3(QuestsImpl paramQuestsImpl, GoogleApiClient paramGoogleApiClient, int[] paramArrayOfInt, int paramInt, boolean paramBoolean)
{
super(paramGoogleApiClient, null);
}
protected void zza(GamesClientImpl paramGamesClientImpl)
{
int[] arrayOfInt = this.zzaGY;
int i = this.zzaGl;
boolean bool = this.zzaFO;
paramGamesClientImpl.zza(this, arrayOfInt, i, bool);
}
}
/* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\com\google\android\gms\games\internal\api\QuestsImpl$3.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"haryo.nendra@gmail.com"
] |
haryo.nendra@gmail.com
|
20057a0449109e5ff41e01e365f8f671185b2feb
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/apache/camel/component/properties/PropertiesComponentServicePortTest.java
|
7b5f10e582a98bdc6b03768d9d1f990412cc2110
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,365
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.component.properties;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
import org.junit.Test;
public class PropertiesComponentServicePortTest extends ContextTestSupport {
@Test
public void testFunction() throws Exception {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start").to("mock:foo").transform().constant("someserver:{{service.port:FOO}}").to("mock:bar");
}
});
context.start();
String body = "someserver:" + (System.getenv("FOO_SERVICE_PORT"));
getMockEndpoint("mock:foo").expectedBodiesReceived("Hello World");
getMockEndpoint("mock:bar").expectedBodiesReceived(body);
template.sendBody("direct:start", "Hello World");
assertMockEndpointsSatisfied();
}
@Test
public void testFunctionGetOrElse() throws Exception {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start").to("mock:foo").transform().constant("myotherserver:{{service.port:BAR:8888}}").to("mock:bar");
}
});
context.start();
getMockEndpoint("mock:foo").expectedBodiesReceived("Hello World");
getMockEndpoint("mock:bar").expectedBodiesReceived("myotherserver:8888");
template.sendBody("direct:start", "Hello World");
assertMockEndpointsSatisfied();
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
aced38de55b18aad02b9ff2fe3e1ab25a8270333
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_478/Testnull_47778.java
|
7f995a39a52c7c351d4f90fe263516c073fc3774
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package org.gradle.test.performancenull_478;
import static org.junit.Assert.*;
public class Testnull_47778 {
private final Productionnull_47778 production = new Productionnull_47778("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
95c6c46abe1e465594c86572bf4b0a188d9dfd13
|
bc44f09347e813d7a4e2f359f974eef55124f3d7
|
/app/src/main/java/haoshi/com/shop/controller/SendCodeController.java
|
ebbc1384daeb53a7a47703a2a28571d764eded59
|
[] |
no_license
|
dmz1024/HaoShiShop2
|
088a30e718d50b6af291b9128f8007b13cb89880
|
f5a51cf9bb9f9fa9898ea74ca49907bec22c161a
|
refs/heads/master
| 2021-01-19T20:16:01.300975
| 2017-04-26T12:03:31
| 2017-04-26T12:03:31
| 82,548,952
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,420
|
java
|
package haoshi.com.shop.controller;
import java.util.HashMap;
import java.util.Map;
import api.ApiRequest;
import base.bean.SingleBaseBean;
import base.bean.TipLoadingBean;
import haoshi.com.shop.constant.ApiConstant;
import interfaces.OnSingleRequestListener;
/**
* Created by dengmingzhi on 2017/3/30.
*/
public class SendCodeController {
public static SendCodeController getInstance() {
return new SendCodeController();
}
/**
* 获取注册验证码
*
* @param tel
*/
public void getRegCode(final String tel, OnSingleRequestListener<SingleBaseBean> listener) {
new ApiRequest<SingleBaseBean>() {
@Override
protected Map<String, String> getMap() {
Map<String, String> map = new HashMap<>();
map.put("mobile", tel);
return map;
}
@Override
protected String getUrl() {
return ApiConstant.GETPHONEVERIFYCODE;
}
@Override
protected String getMsg(int code) {
switch (code) {
case 10001:
return "手机号格式不正确";
case 10002:
return "该手机已注册";
case 10003:
return "获取验证码次数超过规定数";
}
return super.getMsg(code);
}
@Override
protected Class<SingleBaseBean> getClx() {
return SingleBaseBean.class;
}
}.setOnRequestListeren(listener).post(new TipLoadingBean("正在获取短信验证码", "验证码已发送,请注意查收", "验证码发送失败"));
}
/**
* 获取注册验证码
*
* @param tel
*/
public void getupPwdCode(final String tel, OnSingleRequestListener<SingleBaseBean> listener) {
new ApiRequest<SingleBaseBean>() {
@Override
protected Map<String, String> getMap() {
Map<String, String> map = new HashMap<>();
map.put("mobile", tel);
return map;
}
@Override
protected String getUrl() {
return ApiConstant.UPPWDVERIFYCODE;
}
@Override
protected String getMsg(int code) {
switch (code) {
case 10001:
return "手机号格式不正确";
case 10002:
return "该手机还未注册";
case 10003:
return "获取验证码次数超过规定数";
}
return super.getMsg(code);
}
@Override
protected Class<SingleBaseBean> getClx() {
return SingleBaseBean.class;
}
}.setOnRequestListeren(listener).post(new TipLoadingBean("正在获取短信验证码", "验证码已发送,请注意查收", "验证码发送失败"));
}
/**
* 绑定验证码
*
* @param tel
*/
public void getBindingCode(final String tel, OnSingleRequestListener<SingleBaseBean> listener) {
new ApiRequest<SingleBaseBean>() {
@Override
protected Map<String, String> getMap() {
Map<String, String> map = new HashMap<>();
map.put("mobile", tel);
return map;
}
@Override
protected String getUrl() {
return ApiConstant.WXCHATVERIFYCODE;
}
@Override
protected String getMsg(int code) {
switch (code) {
case 10001:
return "手机号格式不正确";
case 10002:
return "该手机还未注册";
case 10003:
return "获取验证码次数超过规定数";
}
return super.getMsg(code);
}
@Override
protected Class<SingleBaseBean> getClx() {
return SingleBaseBean.class;
}
}.setOnRequestListeren(listener).post(new TipLoadingBean("正在获取短信验证码", "验证码已发送,请注意查收", "验证码发送失败"));
}
}
|
[
"894350911@qq.com"
] |
894350911@qq.com
|
941bee269d3b39e9ea1ee5e421a4c52cba89a8b2
|
0adcb787c2d7b3bbf81f066526b49653f9c8db40
|
/src/main/java/com/alipay/api/request/AlipayEcoMycarParkingExitinfoSyncRequest.java
|
f5b0123038ec97c35ca4cc841d3e4511b459cd6b
|
[
"Apache-2.0"
] |
permissive
|
yikey/alipay-sdk-java-all
|
1cdca570c1184778c6f3cad16fe0bcb6e02d2484
|
91d84898512c5a4b29c707b0d8d0cd972610b79b
|
refs/heads/master
| 2020-05-22T13:40:11.064476
| 2019-04-11T14:11:02
| 2019-04-11T14:11:02
| 186,365,665
| 1
| 0
| null | 2019-05-13T07:16:09
| 2019-05-13T07:16:08
| null |
UTF-8
|
Java
| false
| false
| 3,169
|
java
|
package com.alipay.api.request;
import com.alipay.api.domain.AlipayEcoMycarParkingExitinfoSyncModel;
import java.util.Map;
import com.alipay.api.AlipayRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.AlipayEcoMycarParkingExitinfoSyncResponse;
import com.alipay.api.AlipayObject;
/**
* ALIPAY API: alipay.eco.mycar.parking.exitinfo.sync request
*
* @author auto create
* @since 1.0, 2019-03-28 10:39:45
*/
public class AlipayEcoMycarParkingExitinfoSyncRequest implements AlipayRequest<AlipayEcoMycarParkingExitinfoSyncResponse> {
private AlipayHashMap udfParams; // add user-defined text parameters
private String apiVersion="1.0";
/**
* 车辆驶出上送接口
*/
private String bizContent;
public void setBizContent(String bizContent) {
this.bizContent = bizContent;
}
public String getBizContent() {
return this.bizContent;
}
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
private boolean needEncrypt=false;
private AlipayObject bizModel=null;
public String getNotifyUrl() {
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public void setTerminalType(String terminalType){
this.terminalType=terminalType;
}
public String getTerminalType(){
return this.terminalType;
}
public void setTerminalInfo(String terminalInfo){
this.terminalInfo=terminalInfo;
}
public String getTerminalInfo(){
return this.terminalInfo;
}
public void setProdCode(String prodCode) {
this.prodCode=prodCode;
}
public String getProdCode() {
return this.prodCode;
}
public String getApiMethodName() {
return "alipay.eco.mycar.parking.exitinfo.sync";
}
public Map<String, String> getTextParams() {
AlipayHashMap txtParams = new AlipayHashMap();
txtParams.put("biz_content", this.bizContent);
if(udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new AlipayHashMap();
}
this.udfParams.put(key, value);
}
public Class<AlipayEcoMycarParkingExitinfoSyncResponse> getResponseClass() {
return AlipayEcoMycarParkingExitinfoSyncResponse.class;
}
public boolean isNeedEncrypt() {
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
this.needEncrypt=needEncrypt;
}
public AlipayObject getBizModel() {
return this.bizModel;
}
public void setBizModel(AlipayObject bizModel) {
this.bizModel=bizModel;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
f787ac58ce50bd97f5f6f63a445f4ee617c6a733
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.ocms-OCMS/sources/com/facebook/inject/rootmodule/defaultmodule/___DEFAULT___ProcessRootModule.java
|
3c18ae6d4851549649f95004f2038b87f6a09fae
|
[] |
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
| 390
|
java
|
package com.facebook.inject.rootmodule.defaultmodule;
import com.facebook.inject.AbstractLibraryModule;
import com.facebook.inject.InjectorModule;
import com.facebook.inject.PrivateModule;
import com.facebook.proguard.annotations.DoNotStrip;
@DoNotStrip
@InjectorModule(isRoot = true)
public class ___DEFAULT___ProcessRootModule extends AbstractLibraryModule implements PrivateModule {
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
9086c23b45e013e6220289f98712519c5ef7ebc5
|
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
|
/project153/src/test/java/org/gradle/test/performance/largejavamultiproject/project153/p766/Test15339.java
|
9df02d82ebed86577b633ac8036f28c4021216f6
|
[] |
no_license
|
big-guy/largeJavaMultiProject
|
405cc7f55301e1fd87cee5878a165ec5d4a071aa
|
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
|
refs/heads/main
| 2023-03-17T10:59:53.226128
| 2021-03-04T01:01:39
| 2021-03-04T01:01:39
| 344,307,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,272
|
java
|
package org.gradle.test.performance.largejavamultiproject.project153.p766;
import org.gradle.test.performance.largejavamultiproject.project153.p765.Production15312;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test15339 {
Production15339 objectUnderTest = new Production15339();
@Test
public void testProperty0() {
Production15312 value = new Production15312();
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
Production15325 value = new Production15325();
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
Production15338 value = new Production15338();
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
}
|
[
"sterling.greene@gmail.com"
] |
sterling.greene@gmail.com
|
81bf7efce91300c4b17685c0aded6dde01894503
|
6f6fd51a6f298242318f0538787b6416916e7722
|
/JDK7-45/src/main/java/com/hmz/source/org/omg/PortableInterceptor/AdapterStateHelper.java
|
9e241b422b1a2e34fa3d1e73ad693af62231b78d
|
[] |
no_license
|
houmaozheng/JDKSourceProject
|
5f20578c46ad0758a1e2f45d36380db0bcd46f05
|
699b4cce980371be0d038a06ce3ea617dacd612c
|
refs/heads/master
| 2023-06-16T21:48:46.957538
| 2021-07-15T17:01:46
| 2021-07-15T17:01:46
| 385,537,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,677
|
java
|
package org.omg.PortableInterceptor;
/**
* org/omg/PortableInterceptor/AdapterStateHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
* Tuesday, October 8, 2013 5:44:45 AM PDT
*/
/** Type of object adapter state. State changes are reported either to
* the object adapter or to the adapter manager.
*/
abstract public class AdapterStateHelper
{
private static String _id = "IDL:omg.org/PortableInterceptor/AdapterState:1.0";
public static void insert (org.omg.CORBA.Any a, short that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static short extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
__typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_short);
__typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.PortableInterceptor.AdapterStateHelper.id (), "AdapterState", __typeCode);
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static short read (org.omg.CORBA.portable.InputStream istream)
{
short value = (short)0;
value = istream.read_short ();
return value;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, short value)
{
ostream.write_short (value);
}
}
|
[
"houmaozheng@126.com"
] |
houmaozheng@126.com
|
6d9bd3f3ffb95b6e74d15013221d3a3c39b39d64
|
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
|
/classes5/com/facebook/imagepipeline/producers/BaseConsumer.java
|
64b316d7052d10079a5aaf17b55142b9674e73dc
|
[] |
no_license
|
meeidol-luo/qooq
|
588a4ca6d8ad579b28dec66ec8084399fb0991ef
|
e723920ac555e99d5325b1d4024552383713c28d
|
refs/heads/master
| 2020-03-27T03:16:06.616300
| 2016-10-08T07:33:58
| 2016-10-08T07:33:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,370
|
java
|
package com.facebook.imagepipeline.producers;
import com.facebook.common.logging.FLog;
import javax.annotation.concurrent.ThreadSafe;
@ThreadSafe
public abstract class BaseConsumer<T>
implements Consumer<T>
{
private boolean mIsFinished = false;
/* Error */
public void onCancellation()
{
// Byte code:
// 0: aload_0
// 1: monitorenter
// 2: aload_0
// 3: getfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 6: istore_2
// 7: iload_2
// 8: ifeq +6 -> 14
// 11: aload_0
// 12: monitorexit
// 13: return
// 14: aload_0
// 15: iconst_1
// 16: putfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 19: aload_0
// 20: invokevirtual 23 com/facebook/imagepipeline/producers/BaseConsumer:onCancellationImpl ()V
// 23: goto -12 -> 11
// 26: astore_1
// 27: aload_0
// 28: aload_1
// 29: invokevirtual 27 com/facebook/imagepipeline/producers/BaseConsumer:onUnhandledException (Ljava/lang/Exception;)V
// 32: goto -21 -> 11
// 35: astore_1
// 36: aload_0
// 37: monitorexit
// 38: aload_1
// 39: athrow
// Local variable table:
// start length slot name signature
// 0 40 0 this BaseConsumer
// 26 3 1 localException Exception
// 35 4 1 localObject Object
// 6 2 2 bool boolean
// Exception table:
// from to target type
// 19 23 26 java/lang/Exception
// 2 7 35 finally
// 14 19 35 finally
// 19 23 35 finally
// 27 32 35 finally
}
protected abstract void onCancellationImpl();
/* Error */
public void onFailure(Throwable paramThrowable)
{
// Byte code:
// 0: aload_0
// 1: monitorenter
// 2: aload_0
// 3: getfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 6: istore_2
// 7: iload_2
// 8: ifeq +6 -> 14
// 11: aload_0
// 12: monitorexit
// 13: return
// 14: aload_0
// 15: iconst_1
// 16: putfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 19: aload_0
// 20: aload_1
// 21: invokevirtual 32 com/facebook/imagepipeline/producers/BaseConsumer:onFailureImpl (Ljava/lang/Throwable;)V
// 24: goto -13 -> 11
// 27: astore_1
// 28: aload_0
// 29: aload_1
// 30: invokevirtual 27 com/facebook/imagepipeline/producers/BaseConsumer:onUnhandledException (Ljava/lang/Exception;)V
// 33: goto -22 -> 11
// 36: astore_1
// 37: aload_0
// 38: monitorexit
// 39: aload_1
// 40: athrow
// Local variable table:
// start length slot name signature
// 0 41 0 this BaseConsumer
// 0 41 1 paramThrowable Throwable
// 6 2 2 bool boolean
// Exception table:
// from to target type
// 19 24 27 java/lang/Exception
// 2 7 36 finally
// 14 19 36 finally
// 19 24 36 finally
// 28 33 36 finally
}
protected abstract void onFailureImpl(Throwable paramThrowable);
/* Error */
public void onNewResult(@javax.annotation.Nullable T paramT, boolean paramBoolean)
{
// Byte code:
// 0: aload_0
// 1: monitorenter
// 2: aload_0
// 3: getfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 6: istore_3
// 7: iload_3
// 8: ifeq +6 -> 14
// 11: aload_0
// 12: monitorexit
// 13: return
// 14: aload_0
// 15: iload_2
// 16: putfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 19: aload_0
// 20: aload_1
// 21: iload_2
// 22: invokevirtual 38 com/facebook/imagepipeline/producers/BaseConsumer:onNewResultImpl (Ljava/lang/Object;Z)V
// 25: goto -14 -> 11
// 28: astore_1
// 29: aload_0
// 30: aload_1
// 31: invokevirtual 27 com/facebook/imagepipeline/producers/BaseConsumer:onUnhandledException (Ljava/lang/Exception;)V
// 34: goto -23 -> 11
// 37: astore_1
// 38: aload_0
// 39: monitorexit
// 40: aload_1
// 41: athrow
// Local variable table:
// start length slot name signature
// 0 42 0 this BaseConsumer
// 0 42 1 paramT T
// 0 42 2 paramBoolean boolean
// 6 2 3 bool boolean
// Exception table:
// from to target type
// 19 25 28 java/lang/Exception
// 2 7 37 finally
// 14 19 37 finally
// 19 25 37 finally
// 29 34 37 finally
}
protected abstract void onNewResultImpl(T paramT, boolean paramBoolean);
/* Error */
public void onProgressUpdate(float paramFloat)
{
// Byte code:
// 0: aload_0
// 1: monitorenter
// 2: aload_0
// 3: getfield 16 com/facebook/imagepipeline/producers/BaseConsumer:mIsFinished Z
// 6: istore_3
// 7: iload_3
// 8: ifeq +6 -> 14
// 11: aload_0
// 12: monitorexit
// 13: return
// 14: aload_0
// 15: fload_1
// 16: invokevirtual 46 com/facebook/imagepipeline/producers/BaseConsumer:onProgressUpdateImpl (F)V
// 19: goto -8 -> 11
// 22: astore_2
// 23: aload_0
// 24: aload_2
// 25: invokevirtual 27 com/facebook/imagepipeline/producers/BaseConsumer:onUnhandledException (Ljava/lang/Exception;)V
// 28: goto -17 -> 11
// 31: astore_2
// 32: aload_0
// 33: monitorexit
// 34: aload_2
// 35: athrow
// Local variable table:
// start length slot name signature
// 0 36 0 this BaseConsumer
// 0 36 1 paramFloat float
// 22 3 2 localException Exception
// 31 4 2 localObject Object
// 6 2 3 bool boolean
// Exception table:
// from to target type
// 14 19 22 java/lang/Exception
// 2 7 31 finally
// 14 19 31 finally
// 23 28 31 finally
}
protected void onProgressUpdateImpl(float paramFloat) {}
protected void onUnhandledException(Exception paramException)
{
FLog.wtf(getClass(), "unhandled exception", paramException);
}
}
/* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\com\facebook\imagepipeline\producers\BaseConsumer.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
05bc7beb5ddc608cad546907b65e57a3a7529b1d
|
f79fe306ab22040c13042278decd9c5227e7bf44
|
/edu-manager/src/com/thinlk/service/TeacherService.java
|
5a65eb7247382b62e067fa8304f3ae2d4fae05d1
|
[] |
no_license
|
lancer82/JavaPractice
|
876e2f6f48c23c4ddade5cac20a380a3f2e55ff7
|
3ad707670d74c2a95f803900ae6f41198ea65bb6
|
refs/heads/master
| 2023-05-13T16:00:04.945323
| 2021-05-24T12:47:26
| 2021-05-24T12:47:26
| 288,116,462
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,282
|
java
|
package com.thinlk.service;
import com.thinlk.dao.TeacherDao;
import com.thinlk.domain.Teacher;
public class TeacherService {
private TeacherDao teacherDao = new TeacherDao();
private Teacher[] teachers = teacherDao.findAllTeachers();
public boolean addTeacher(Teacher teacher) {
return teacherDao.addTeacher(teacher);
}
public boolean isExists(String id) {
boolean flag = false;
for (int i = 0; i < teachers.length; i++) {
Teacher teacher = teachers[i];
if (teacher != null && teacher.getId().equals(id)){
flag = true;
}
}
return flag;
}
public Teacher[] findAllTeacher() {
boolean flag = false ;
for (int i = 0; i < teachers.length; i++) {
Teacher teacher = teachers[i];
if (teacher != null ) {
flag = true;
break;
}
}
if (flag) {
return teachers;
}else {
return null;
}
}
public void deleteTeacherById(String delId) {
teacherDao.deleteTeacherById(delId);
}
public void updateTeacherById(String updateId,Teacher teacher) {
teacherDao.updateTeacherById(updateId,teacher);
}
}
|
[
"lp_job@163.com"
] |
lp_job@163.com
|
2fb42890843b1005db9b5ae32ed41b64f9a21210
|
8dcd6fac592760c5bff55349ffb2d7ce39d485cc
|
/com/bumptech/glide/request/target/ViewTarget.java
|
04b35904225fbfee0c2546726b96efe0dfe190f9
|
[] |
no_license
|
andrepcg/hikam-android
|
9e3a02e0ba9a58cf8a17c5e76e2f3435969e4b3a
|
bf39e345a827c6498052d9df88ca58d8823178d9
|
refs/heads/master
| 2021-09-01T11:41:10.726066
| 2017-12-26T19:04:42
| 2017-12-26T19:04:42
| 115,447,829
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,918
|
java
|
package com.bumptech.glide.request.target;
import android.annotation.TargetApi;
import android.graphics.Point;
import android.os.Build.VERSION;
import android.util.Log;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnPreDrawListener;
import android.view.WindowManager;
import com.bumptech.glide.request.Request;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
public abstract class ViewTarget<T extends View, Z> extends BaseTarget<Z> {
private static final String TAG = "ViewTarget";
private static boolean isTagUsedAtLeastOnce = false;
private static Integer tagId = null;
private final SizeDeterminer sizeDeterminer;
protected final T view;
private static class SizeDeterminer {
private static final int PENDING_SIZE = 0;
private final List<SizeReadyCallback> cbs = new ArrayList();
private Point displayDimens;
private SizeDeterminerLayoutListener layoutListener;
private final View view;
private static class SizeDeterminerLayoutListener implements OnPreDrawListener {
private final WeakReference<SizeDeterminer> sizeDeterminerRef;
public SizeDeterminerLayoutListener(SizeDeterminer sizeDeterminer) {
this.sizeDeterminerRef = new WeakReference(sizeDeterminer);
}
public boolean onPreDraw() {
if (Log.isLoggable(ViewTarget.TAG, 2)) {
Log.v(ViewTarget.TAG, "OnGlobalLayoutListener called listener=" + this);
}
SizeDeterminer sizeDeterminer = (SizeDeterminer) this.sizeDeterminerRef.get();
if (sizeDeterminer != null) {
sizeDeterminer.checkCurrentDimens();
}
return true;
}
}
public SizeDeterminer(View view) {
this.view = view;
}
private void notifyCbs(int width, int height) {
for (SizeReadyCallback cb : this.cbs) {
cb.onSizeReady(width, height);
}
this.cbs.clear();
}
private void checkCurrentDimens() {
if (!this.cbs.isEmpty()) {
int currentWidth = getViewWidthOrParam();
int currentHeight = getViewHeightOrParam();
if (isSizeValid(currentWidth) && isSizeValid(currentHeight)) {
notifyCbs(currentWidth, currentHeight);
ViewTreeObserver observer = this.view.getViewTreeObserver();
if (observer.isAlive()) {
observer.removeOnPreDrawListener(this.layoutListener);
}
this.layoutListener = null;
}
}
}
public void getSize(SizeReadyCallback cb) {
int currentWidth = getViewWidthOrParam();
int currentHeight = getViewHeightOrParam();
if (isSizeValid(currentWidth) && isSizeValid(currentHeight)) {
cb.onSizeReady(currentWidth, currentHeight);
return;
}
if (!this.cbs.contains(cb)) {
this.cbs.add(cb);
}
if (this.layoutListener == null) {
ViewTreeObserver observer = this.view.getViewTreeObserver();
this.layoutListener = new SizeDeterminerLayoutListener(this);
observer.addOnPreDrawListener(this.layoutListener);
}
}
private int getViewHeightOrParam() {
LayoutParams layoutParams = this.view.getLayoutParams();
if (isSizeValid(this.view.getHeight())) {
return this.view.getHeight();
}
if (layoutParams != null) {
return getSizeForParam(layoutParams.height, true);
}
return 0;
}
private int getViewWidthOrParam() {
LayoutParams layoutParams = this.view.getLayoutParams();
if (isSizeValid(this.view.getWidth())) {
return this.view.getWidth();
}
if (layoutParams != null) {
return getSizeForParam(layoutParams.width, false);
}
return 0;
}
private int getSizeForParam(int param, boolean isHeight) {
if (param != -2) {
return param;
}
Point displayDimens = getDisplayDimens();
return isHeight ? displayDimens.y : displayDimens.x;
}
@TargetApi(13)
private Point getDisplayDimens() {
if (this.displayDimens != null) {
return this.displayDimens;
}
Display display = ((WindowManager) this.view.getContext().getSystemService("window")).getDefaultDisplay();
if (VERSION.SDK_INT >= 13) {
this.displayDimens = new Point();
display.getSize(this.displayDimens);
} else {
this.displayDimens = new Point(display.getWidth(), display.getHeight());
}
return this.displayDimens;
}
private boolean isSizeValid(int size) {
return size > 0 || size == -2;
}
}
public static void setTagId(int tagId) {
if (tagId != null || isTagUsedAtLeastOnce) {
throw new IllegalArgumentException("You cannot set the tag id more than once or change the tag id after the first request has been made");
}
tagId = Integer.valueOf(tagId);
}
public ViewTarget(T view) {
if (view == null) {
throw new NullPointerException("View must not be null!");
}
this.view = view;
this.sizeDeterminer = new SizeDeterminer(view);
}
public T getView() {
return this.view;
}
public void getSize(SizeReadyCallback cb) {
this.sizeDeterminer.getSize(cb);
}
public void setRequest(Request request) {
setTag(request);
}
public Request getRequest() {
Request tag = getTag();
if (tag == null) {
return null;
}
if (tag instanceof Request) {
return tag;
}
throw new IllegalArgumentException("You must not call setTag() on a view Glide is targeting");
}
private void setTag(Object tag) {
if (tagId == null) {
isTagUsedAtLeastOnce = true;
this.view.setTag(tag);
return;
}
this.view.setTag(tagId.intValue(), tag);
}
private Object getTag() {
if (tagId == null) {
return this.view.getTag();
}
return this.view.getTag(tagId.intValue());
}
public String toString() {
return "Target for: " + this.view;
}
}
|
[
"andrepcg@gmail.com"
] |
andrepcg@gmail.com
|
a1494b7d0f8cffa963ef46f261b2a19a8783d1b5
|
9a6ea6087367965359d644665b8d244982d1b8b6
|
/src/main/java/X/AnonymousClass10P.java
|
baf03fb310db5595e3875fd4d3dcbb699ae61db4
|
[] |
no_license
|
technocode/com.wa_2.21.2
|
a3dd842758ff54f207f1640531374d3da132b1d2
|
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
|
refs/heads/master
| 2023-02-12T11:20:28.666116
| 2021-01-14T10:22:21
| 2021-01-14T10:22:21
| 329,578,591
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,017
|
java
|
package X;
import android.os.Parcel;
import android.os.Parcelable;
/* renamed from: X.10P reason: invalid class name */
public final class AnonymousClass10P implements Parcelable {
public static final Parcelable.Creator CREATOR = new AnonymousClass10M();
public int A00;
public int A01;
public int A02;
public int A03;
public long A04;
public long A05;
public C33381ge A06;
public AnonymousClass10O A07;
public Object A08;
public Object A09;
public String A0A;
public int describeContents() {
return 0;
}
public AnonymousClass10P() {
}
public AnonymousClass10P(long j, String str, C33381ge r4, int i, Object obj, Object obj2, long j2, int i2, int i3, int i4, AnonymousClass10O r13) {
this.A05 = j;
this.A0A = str;
this.A06 = r4;
this.A01 = i;
this.A09 = obj;
this.A08 = obj2;
this.A04 = j2;
this.A02 = i2;
this.A03 = i3;
this.A00 = i4;
this.A07 = r13;
}
public AnonymousClass10P(AnonymousClass10P r15, int i) {
this(r15.A05, r15.A0A, r15.A06, r15.A01, r15.A09, r15.A08, r15.A04, r15.A02, r15.A03, i, r15.A07);
}
public AnonymousClass10P(Parcel parcel) {
this.A05 = parcel.readLong();
this.A0A = parcel.readString();
this.A01 = parcel.readInt();
this.A09 = null;
this.A08 = null;
this.A04 = parcel.readLong();
this.A02 = parcel.readInt();
this.A03 = parcel.readInt();
this.A00 = parcel.readInt();
this.A07 = (AnonymousClass10O) AnonymousClass10O.CREATOR.createFromParcel(parcel);
}
public void writeToParcel(Parcel parcel, int i) {
parcel.writeLong(this.A05);
parcel.writeString(this.A0A);
parcel.writeInt(this.A01);
parcel.writeLong(this.A04);
parcel.writeInt(this.A02);
parcel.writeInt(this.A03);
parcel.writeInt(this.A00);
this.A07.writeToParcel(parcel, i);
}
}
|
[
"madeinborneo@gmail.com"
] |
madeinborneo@gmail.com
|
2d39c22a3eb4df92173854d8a8b39bdc9458edcd
|
5b82e2f7c720c49dff236970aacd610e7c41a077
|
/QueryReformulation-master 2/data/processed/ChangeVetoException.java
|
ee7fd3f605e9ba73a562eeca750efd36ae610f0e
|
[] |
no_license
|
shy942/EGITrepoOnlineVersion
|
4b157da0f76dc5bbf179437242d2224d782dd267
|
f88fb20497dcc30ff1add5fe359cbca772142b09
|
refs/heads/master
| 2021-01-20T16:04:23.509863
| 2016-07-21T20:43:22
| 2016-07-21T20:43:22
| 63,737,385
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 306
|
java
|
/***/
package org.eclipse.core.databinding.observable.value;
/**
* @since 1.0
*
*/
public class ChangeVetoException extends RuntimeException {
/**
* @param string
*/
public ChangeVetoException(String string) {
super(string);
}
private static final long serialVersionUID = 1L;
}
|
[
"muktacseku@gmail.com"
] |
muktacseku@gmail.com
|
2bbf8e90d38b36f135171ea28da309172ea21e2f
|
2c12d4abf2ef35f9974b5a40b5863017ed391a94
|
/sample/VC_SDK_Demo/Demo/app/src/main/java/com/huawei/opensdk/ec_sdk_demo/ui/conference/ConfListActivity.java
|
9eb6d4e1e68feb13f45fbd22d7e7bd6a36891487
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
WindowxDeveloper/CloudVC_Client_API_Demo_Android
|
c8d259a335ad02123d2f793d173023d660910369
|
849aa24a0c25eb1c7e356000562b806985ad4a51
|
refs/heads/master
| 2020-06-17T21:32:58.972830
| 2019-07-09T01:40:46
| 2019-07-09T01:40:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,059
|
java
|
package com.huawei.opensdk.ec_sdk_demo.ui.conference;
import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import com.huawei.opensdk.demoservice.ConfBaseInfo;
import com.huawei.opensdk.ec_sdk_demo.R;
import com.huawei.opensdk.ec_sdk_demo.adapter.ConfListAdapter;
import com.huawei.opensdk.ec_sdk_demo.common.UIConstants;
import com.huawei.opensdk.ec_sdk_demo.logic.conference.mvp.ConfListPresenter;
import com.huawei.opensdk.ec_sdk_demo.logic.conference.mvp.IConfListContract;
import com.huawei.opensdk.ec_sdk_demo.ui.IntentConstant;
import com.huawei.opensdk.ec_sdk_demo.ui.base.MVPBaseActivity;
import com.huawei.opensdk.ec_sdk_demo.util.ActivityUtil;
import com.huawei.opensdk.ec_sdk_demo.widget.ThreeInputDialog;
import java.util.List;
public class ConfListActivity extends MVPBaseActivity<IConfListContract.ConfListView, ConfListPresenter> implements IConfListContract.ConfListView, View.OnClickListener
{
private ConfListPresenter mPresenter;
private ConfListAdapter adapter;
private ListView listView;
private ImageView rightIV;
private ImageView directJoinConfIV;
@Override
protected IConfListContract.ConfListView createView()
{
return this;
}
@Override
protected ConfListPresenter createPresenter()
{
mPresenter = new ConfListPresenter();
return mPresenter;
}
@Override
public void initializeComposition()
{
setContentView(R.layout.conference_list_layout);
listView = (ListView) findViewById(R.id.conference_list);
rightIV = (ImageView) findViewById(R.id.right_img);
directJoinConfIV = (ImageView) findViewById(R.id.join_conf_iv);
//TODO
directJoinConfIV.setVisibility(View.VISIBLE);
directJoinConfIV.setImageResource(R.drawable.join_conf_by_number_icon);
directJoinConfIV.setOnClickListener(this);
initRightIV();
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener()
{
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
mPresenter.onItemClick(position);
}
});
}
private void initRightIV()
{
rightIV.setImageResource(R.drawable.icon_create);
rightIV.setOnClickListener(this);
rightIV.setVisibility(View.VISIBLE);
}
@Override
public void initializeData()
{
adapter = new ConfListAdapter(this);
}
@Override
protected void onResume()
{
super.onResume();
}
@Override
protected void onDestroy()
{
super.onDestroy();
}
@Override
public void showLoading()
{
}
@Override
public void dismissLoading()
{
}
@Override
public void showCustomToast(final int resID)
{
runOnUiThread(new Runnable()
{
@Override
public void run()
{
showToast(resID);
}
});
}
@Override
public void onClick(View v)
{
switch (v.getId())
{
case R.id.right_img:
Intent intent = new Intent(IntentConstant.CREATE_CONF_ACTIVITY_ACTION);
ActivityUtil.startActivity(this, intent);
break;
case R.id.join_conf_iv:
showJoinConfDialog();
break;
default:
break;
}
}
private void showJoinConfDialog()
{
final ThreeInputDialog editDialog = new ThreeInputDialog(this);
editDialog.setTitle(R.string.join_conf);
editDialog.setRightButtonListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
mPresenter.joinReserveConf(editDialog.getInput1(), editDialog.getInput2(), editDialog.getInput3());
}
});
editDialog.setHint1(R.string.conf_id_input);
editDialog.setHint2(R.string.access_code_input);
editDialog.setHint3(R.string.password_code_input);
editDialog.show();
}
@Override
public void refreshConfList(final List<ConfBaseInfo> confBaseInfoList)
{
runOnUiThread(new Runnable()
{
@Override
public void run()
{
adapter.setData(confBaseInfoList);
adapter.notifyDataSetChanged();
}
});
}
@Override
public void gotoConfDetailActivity(String confID)
{
Intent intent = new Intent(IntentConstant.CONF_DETAIL_ACTIVITY_ACTION);
intent.putExtra(UIConstants.CONF_ID, confID);
ActivityUtil.startActivity(this, intent);
}
}
|
[
"wudingyuan@huawei.com"
] |
wudingyuan@huawei.com
|
ad62d705641b83d6e175347028ece2b296821270
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/drjava_cluster/1190/tar_0.java
|
131ddc296a54b8b40c89a1d2b1ef9881312081cd
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,959
|
java
|
/*BEGIN_COPYRIGHT_BLOCK
*
* This file is a part of DrJava. Current versions of this project are available
* at http://sourceforge.net/projects/drjava
*
* Copyright (C) 2001-2002 JavaPLT group at Rice University (javaplt@rice.edu)
*
* DrJava 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.
*
* DrJava 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
* or see http://www.gnu.org/licenses/gpl.html
*
* In addition, as a special exception, the JavaPLT group at Rice University
* (javaplt@rice.edu) gives permission to link the code of DrJava with
* the classes in the gj.util package, even if they are provided in binary-only
* form, and distribute linked combinations including the DrJava and the
* gj.util package. You must obey the GNU General Public License in all
* respects for all of the code used other than these classes in the gj.util
* package: Dictionary, HashtableEntry, ValueEnumerator, Enumeration,
* KeyEnumerator, Vector, Hashtable, Stack, VectorEnumerator.
*
* If you modify this file, you may extend this exception to your version of the
* file, but you are not obligated to do so. If you do not wish to
* do so, delete this exception statement from your version. (However, the
* present version of DrJava depends on these classes, so you'd want to
* remove the dependency first!)
*
END_COPYRIGHT_BLOCK*/
package edu.rice.cs.drjava.ui;
import edu.rice.cs.drjava.model.*;
import edu.rice.cs.drjava.model.repl.*;
import junit.framework.*;
import junit.extensions.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.*;
import java.rmi.registry.Registry;
/**
* Test functions of InteractionsPane.
*
* @version $Id$
*/
public class InteractionsPaneTest extends TestCase {
private GlobalModel _model;
private InteractionsDocument _interactions;
private InteractionsPane _pane;
private boolean _ready = false;
/**
* Constructor.
* @param String name
*/
public InteractionsPaneTest(String name) {
super(name);
}
/**
* Creates a test suite for JUnit to run.
* @return a test suite based on the methods in this class
*/
public static Test suite() {
return new TestSuite(InteractionsPaneTest.class);
}
/**
* Setup method for each JUnit test case.
*/
public void setUp() {
_model = new DefaultGlobalModel();
_interactions = (InteractionsDocument)_model.getInteractionsDocument();
_pane = new InteractionsPane(_model);
_pane.setCaretPosition(_model.getInteractionsFrozenPos());
_ready = true;
}
public void tearDown() {
//_model.quit();
}
/**
* Tests that this.setUp() puts the caret in the correct position.
*/
public void testInitialPosition() {
assertEquals("Initial caret not in the correct position.",
1,
_pane.getCaretPosition(),
_model.getInteractionsFrozenPos());
}
/**
* Tests that moving the caret left when it's already at the prompt will
* cycle it to the end of the line.
*/
public void testCaretMovementCyclesWhenAtPrompt() {
while (! _ready);
_interactions.insertBeforeLastPrompt("test", new SimpleAttributeSet());
_pane.setCaretPosition(_model.getInteractionsFrozenPos());
_pane._moveLeft.actionPerformed(null);
assertEquals("Caret was not cycled when moved left at the prompt.",
_interactions.getLength(),
_pane.getCaretPosition());
}
/**
* Tests that moving the caret right when it's already at the end will
* cycle it to the prompt.
*/
public void testCaretMovementCyclesWhenAtEnd() {
while (! _ready);
_interactions.insertBeforeLastPrompt("test", new SimpleAttributeSet());
_pane.setCaretPosition(_interactions.getLength());
_pane._moveLeft.actionPerformed(null);
assertEquals("Caret was not cycled when moved right at the end.",
_model.getInteractionsFrozenPos(),
_pane.getCaretPosition());
}
/**
* Tests that moving the caret left when it's before the prompt will
* cycle it to the prompt.
*/
public void testLeftBeforePromptMovesToPrompt() {
while (! _ready);
_pane.setCaretPosition(10);
_pane._moveLeft.actionPerformed(null);
assertEquals("Left arrow doesn't move to prompt when caret is before prompt.",
_model.getInteractionsFrozenPos(),
_pane.getCaretPosition());
}
/**
* Tests that moving the caret right when it's before the prompt will
* cycle it to the end of the document.
*/
public void testRightBeforePromptMovesToEnd() {
while (! _ready);
_pane.setCaretPosition(10);
_pane._moveRight.actionPerformed(null);
assertEquals("Right arrow doesn't move to end when caret is before prompt.",
_interactions.getLength(),
_pane.getCaretPosition());
}
/**
* Tests that moving the caret up (recalling the previous command in the History)
* will move the caret to the end of the document.
*/
public void testHistoryRecallMovesToEnd() {
while (! _ready);
_pane.setCaretPosition(10);
_pane._historyPrevAction.actionPerformed(null);
assertEquals("Caret not moved to end on up arrow.",
_interactions.getLength(),
_pane.getCaretPosition());
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
3e4781222c8c374ce0fe7f8cf26bce39d1fb2750
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project85/src/test/java/org/gradle/test/performance85_1/Test85_82.java
|
5fa44f46819696c4927ace17165a8f2f281718da
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 289
|
java
|
package org.gradle.test.performance85_1;
import static org.junit.Assert.*;
public class Test85_82 {
private final Production85_82 production = new Production85_82("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
f136107535951a4a2a02c11609074a27aa28d4a6
|
4c9d35da30abf3ec157e6bad03637ebea626da3f
|
/eclipse/libs_src/org/ripple/bouncycastle/pqc/jcajce/provider/rainbow/BCRainbowPublicKey.java
|
c4c9bbb47e6b4c43450d1242a778cf78a507bf88
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"Apache-2.0"
] |
permissive
|
youweixue/RipplePower
|
9e6029b94a057e7109db5b0df3b9fd89c302f743
|
61c0422fa50c79533e9d6486386a517565cd46d2
|
refs/heads/master
| 2020-04-06T04:40:53.955070
| 2015-04-02T12:22:30
| 2015-04-02T12:22:30
| 33,860,735
| 0
| 0
| null | 2015-04-13T09:52:14
| 2015-04-13T09:52:11
| null |
UTF-8
|
Java
| false
| false
| 4,688
|
java
|
package org.ripple.bouncycastle.pqc.jcajce.provider.rainbow;
import java.security.PublicKey;
import org.ripple.bouncycastle.asn1.DERNull;
import org.ripple.bouncycastle.asn1.x509.AlgorithmIdentifier;
import org.ripple.bouncycastle.pqc.asn1.PQCObjectIdentifiers;
import org.ripple.bouncycastle.pqc.asn1.RainbowPublicKey;
import org.ripple.bouncycastle.pqc.crypto.rainbow.RainbowParameters;
import org.ripple.bouncycastle.pqc.crypto.rainbow.RainbowPublicKeyParameters;
import org.ripple.bouncycastle.pqc.crypto.rainbow.util.RainbowUtil;
import org.ripple.bouncycastle.pqc.jcajce.provider.util.KeyUtil;
import org.ripple.bouncycastle.pqc.jcajce.spec.RainbowPublicKeySpec;
import org.ripple.bouncycastle.util.Arrays;
/**
* This class implements CipherParameters and PublicKey.
* <p/>
* The public key in Rainbow consists of n - v1 polynomial components of the
* private key's F and the field structure of the finite field k.
* <p/>
* The quadratic (or mixed) coefficients of the polynomials from the public key
* are stored in the 2-dimensional array in lexicographical order, requiring n *
* (n + 1) / 2 entries for each polynomial. The singular terms are stored in a
* 2-dimensional array requiring n entries per polynomial, the scalar term of
* each polynomial is stored in a 1-dimensional array.
* <p/>
* More detailed information on the public key is to be found in the paper of
* Jintai Ding, Dieter Schmidt: Rainbow, a New Multivariable Polynomial
* Signature Scheme. ACNS 2005: 164-175 (http://dx.doi.org/10.1007/11496137_12)
*/
public class BCRainbowPublicKey implements PublicKey {
private static final long serialVersionUID = 1L;
private short[][] coeffquadratic;
private short[][] coeffsingular;
private short[] coeffscalar;
private int docLength; // length of possible document to sign
private RainbowParameters rainbowParams;
/**
* Constructor
*
* @param docLength
* @param coeffQuadratic
* @param coeffSingular
* @param coeffScalar
*/
public BCRainbowPublicKey(int docLength, short[][] coeffQuadratic,
short[][] coeffSingular, short[] coeffScalar) {
this.docLength = docLength;
this.coeffquadratic = coeffQuadratic;
this.coeffsingular = coeffSingular;
this.coeffscalar = coeffScalar;
}
/**
* Constructor (used by the {@link RainbowKeyFactorySpi}).
*
* @param keySpec
* a {@link RainbowPublicKeySpec}
*/
public BCRainbowPublicKey(RainbowPublicKeySpec keySpec) {
this(keySpec.getDocLength(), keySpec.getCoeffQuadratic(), keySpec
.getCoeffSingular(), keySpec.getCoeffScalar());
}
public BCRainbowPublicKey(RainbowPublicKeyParameters params) {
this(params.getDocLength(), params.getCoeffQuadratic(), params
.getCoeffSingular(), params.getCoeffScalar());
}
/**
* @return the docLength
*/
public int getDocLength() {
return this.docLength;
}
/**
* @return the coeffQuadratic
*/
public short[][] getCoeffQuadratic() {
return coeffquadratic;
}
/**
* @return the coeffSingular
*/
public short[][] getCoeffSingular() {
short[][] copy = new short[coeffsingular.length][];
for (int i = 0; i != coeffsingular.length; i++) {
copy[i] = Arrays.clone(coeffsingular[i]);
}
return copy;
}
/**
* @return the coeffScalar
*/
public short[] getCoeffScalar() {
return Arrays.clone(coeffscalar);
}
/**
* Compare this Rainbow public key with another object.
*
* @param other
* the other object
* @return the result of the comparison
*/
public boolean equals(Object other) {
if (other == null || !(other instanceof BCRainbowPublicKey)) {
return false;
}
BCRainbowPublicKey otherKey = (BCRainbowPublicKey) other;
return docLength == otherKey.getDocLength()
&& RainbowUtil.equals(coeffquadratic,
otherKey.getCoeffQuadratic())
&& RainbowUtil.equals(coeffsingular,
otherKey.getCoeffSingular())
&& RainbowUtil.equals(coeffscalar, otherKey.getCoeffScalar());
}
public int hashCode() {
int hash = docLength;
hash = hash * 37 + Arrays.hashCode(coeffquadratic);
hash = hash * 37 + Arrays.hashCode(coeffsingular);
hash = hash * 37 + Arrays.hashCode(coeffscalar);
return hash;
}
/**
* @return name of the algorithm - "Rainbow"
*/
public final String getAlgorithm() {
return "Rainbow";
}
public String getFormat() {
return "X.509";
}
public byte[] getEncoded() {
RainbowPublicKey key = new RainbowPublicKey(docLength, coeffquadratic,
coeffsingular, coeffscalar);
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(
PQCObjectIdentifiers.rainbow, DERNull.INSTANCE);
return KeyUtil.getEncodedSubjectPublicKeyInfo(algorithmIdentifier, key);
}
}
|
[
"longwind2012@hotmail.com"
] |
longwind2012@hotmail.com
|
7e4b7972e96d182f200e9931a0493679905d31f2
|
d4fb8f5bd84fe76de0875a27a431b057d95bc239
|
/core/src/main/java/com/caitiaobang/core/app/tools/nice_spinner/SpinnerTextFormatter.java
|
38e0e453683371e24430b421aa913918639e6d50
|
[] |
no_license
|
printlybyte/yf_trajectory
|
6fd81606fefd402a0d0daf76288b4695ed3dea1e
|
923f55609e02b0fe0ff516c4939a9ce9e0b5199f
|
refs/heads/master
| 2020-06-29T21:53:18.103278
| 2020-04-08T08:44:50
| 2020-04-08T08:44:50
| 200,633,905
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 162
|
java
|
package com.caitiaobang.core.app.tools.nice_spinner;
import android.text.Spannable;
public interface SpinnerTextFormatter<T> {
Spannable format(T item);
}
|
[
"18701403668@163.com"
] |
18701403668@163.com
|
0368c2adeae0fc9bdbd3619890ca8ac9d9d4003a
|
93f3578669fb0d0030a550316aebe0d7b4221631
|
/rpc-supplychain/src/main/java/cn/com/glsx/supplychain/mapper/am/StatementSellJbwyMapper.java
|
298332f186a5c4946d591f062eef1143c4a86985
|
[] |
no_license
|
shanghaif/supplychain
|
4d7de62809b6c88ac5080a85a77fc4bf3d856db8
|
c36c771b0304c5739de98bdfc322c0082a9e523d
|
refs/heads/master
| 2023-02-09T19:01:35.562699
| 2021-01-05T09:39:11
| 2021-01-05T09:39:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 413
|
java
|
package cn.com.glsx.supplychain.mapper.am;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import com.github.pagehelper.Page;
import cn.com.glsx.supplychain.model.am.StatementSellJbwy;
@Mapper
public interface StatementSellJbwyMapper extends OreMapper<StatementSellJbwy>{
Page<StatementSellJbwy> pageStatementSellJbwy(StatementSellJbwy record);
}
|
[
"3064741443@qq.com"
] |
3064741443@qq.com
|
00d95b00de61ed29236b0b65a551e36af171ac5a
|
3d6c20dc57a8eb1a015c5d2353a515f29525a1d6
|
/October31Swing/src/Page870/Sketcher.java
|
00d269f2c332ce47ff534b1369927099fb02c2c1
|
[] |
no_license
|
nparvez71/NetbeanSoftware
|
b9e5c93addc2583790c69f53c650c29665e16721
|
1e18ff07914c4c4530bcfd93693d838bea8f9641
|
refs/heads/master
| 2020-03-13T19:14:53.285683
| 2018-04-29T04:34:07
| 2018-04-29T04:34:07
| 131,249,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,954
|
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 Page870;
/**
*
* @author J2EE-33
*/
// Sketching application
import java.awt.Toolkit;
import java.awt.Dimension;
import javax.swing.SwingUtilities;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
public class Sketcher {
public static void main(String[] args) {
theApp = new Sketcher();
SwingUtilities.invokeLater(
new Runnable() { // Anonymous Runnable class object
public void run() { // Run method executed in thread
theApp.creatGUI(); // Call static GUI creator
}
} );
}
// Method to create the application GUI
private void creatGUI() {
window = new SketchFrame("Sketcher"); // Create the app window
Toolkit theKit = window.getToolkit(); // Get the window toolkit
Dimension wndSize = theKit.getScreenSize(); // Get screen size
// Set the position to screen center & size to half screen size
window.setBounds(wndSize.width/4, wndSize.height/4, // Position
wndSize.width/2, wndSize.height/2); // Size
window.addWindowListener(new WindowHandler());// Add window listener
window.setVisible(true);
}
// Handler class for window events
class WindowHandler extends WindowAdapter {
// Handler for window closing event
public void windowClosing(WindowEvent e) {
window.dispose(); // Release the window resources
System.exit(0); // End the application
}
}
private SketchFrame window; // The application window
private static Sketcher theApp; // The application object
}
|
[
"nparvez92@gmail.com"
] |
nparvez92@gmail.com
|
12601151e1b8ced7634b20e90c2efdf54925b2de
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-14263-59-29-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest.java
|
4f272533642b9319364803d33feaf6e1d3b82d97
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 584
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Apr 01 08:19:15 UTC 2020
*/
package com.xpn.xwiki.internal.template;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class InternalTemplateManager_ESTest extends InternalTemplateManager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
0692b977002f47a3388397266f26ede8eb17c859
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/hibernate-orm/2019/4/BytecodeEnhancerRunner.java
|
4801752bc50c3e6b1f07526a968123305fb5a59b
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 4,832
|
java
|
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.testing.bytecode.enhancement;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.hibernate.bytecode.enhance.spi.EnhancementContext;
import org.hibernate.bytecode.enhance.spi.Enhancer;
import org.hibernate.cfg.Environment;
import org.hibernate.testing.junit4.CustomRunner;
import org.junit.runner.Runner;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.ParentRunner;
import org.junit.runners.Suite;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.RunnerBuilder;
/**
* @author Luis Barreiro
*/
public class BytecodeEnhancerRunner extends Suite {
private static final RunnerBuilder CUSTOM_RUNNER_BUILDER = new RunnerBuilder() {
@Override
public Runner runnerForClass(Class<?> testClass) throws Throwable {
return new CustomRunner( testClass );
}
};
public BytecodeEnhancerRunner(Class<?> klass) throws ClassNotFoundException, InitializationError {
super( CUSTOM_RUNNER_BUILDER, klass, enhanceTestClass( klass ) );
}
private static Class<?>[] enhanceTestClass(Class<?> klass) throws ClassNotFoundException {
String packageName = klass.getPackage().getName();
List<Class<?>> classList = new ArrayList<>();
try {
if ( klass.isAnnotationPresent( CustomEnhancementContext.class ) ) {
for ( Class<? extends EnhancementContext> contextClass : klass.getAnnotation( CustomEnhancementContext.class ).value() ) {
EnhancementContext enhancementContextInstance = contextClass.getConstructor().newInstance();
classList.add( getEnhancerClassLoader( enhancementContextInstance, packageName ).loadClass( klass.getName() ) );
}
}
else {
classList.add( getEnhancerClassLoader( new EnhancerTestContext(), packageName ).loadClass( klass.getName() ) );
}
}
catch ( IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException e ) {
// This is unlikely, but if happens throw runtime exception to fail the test
throw new RuntimeException( e );
}
return classList.toArray( new Class<?>[]{} );
}
// --- //
private static ClassLoader getEnhancerClassLoader(EnhancementContext context, String packageName) {
return new ClassLoader() {
private final String debugOutputDir = System.getProperty( "java.io.tmpdir" );
private final Enhancer enhancer = Environment.getBytecodeProvider().getEnhancer( context );
@SuppressWarnings( "ResultOfMethodCallIgnored" )
@Override
public Class<?> loadClass(String name) throws ClassNotFoundException {
if ( !name.startsWith( packageName ) ) {
return getParent().loadClass( name );
}
Class c = findLoadedClass( name );
if ( c != null ) {
return c;
}
try ( InputStream is = getResourceAsStream( name.replace( '.', '/' ) + ".class" ) ) {
if ( is == null ) {
throw new ClassNotFoundException( name + " not found" );
}
byte[] original = new byte[is.available()];
try ( BufferedInputStream bis = new BufferedInputStream( is ) ) {
bis.read( original );
}
byte[] enhanced = enhancer.enhance( name, original );
if ( enhanced == null ) {
return defineClass( name, original, 0, original.length );
}
File f = new File( debugOutputDir + File.separator + name.replace( ".", File.separator ) + ".class" );
f.getParentFile().mkdirs();
f.createNewFile();
try ( FileOutputStream out = new FileOutputStream( f ) ) {
out.write( enhanced );
}
return defineClass( name, enhanced, 0, enhanced.length );
}
catch ( Throwable t ) {
throw new ClassNotFoundException( name + " not found", t );
}
}
};
}
@Override
protected void runChild(Runner runner, RunNotifier notifier) {
// This is ugly but, for now, ORM class loading is inconsistent.
// It sometimes use ClassLoaderService which takes into account AvailableSettings.CLASSLOADERS, and sometimes
// ReflectHelper#classForName() which uses the TCCL.
// See https://hibernate.atlassian.net/browse/HHH-13136 for more information.
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(
( (ParentRunner<?>) runner ).getTestClass().getJavaClass().getClassLoader() );
super.runChild( runner, notifier );
}
finally {
Thread.currentThread().setContextClassLoader( originalClassLoader );
}
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
504374ecfeec1cc4b395941cab9f4ad2ec53b538
|
473b76b1043df2f09214f8c335d4359d3a8151e0
|
/benchmark/bigclonebenchdata_partial/16005064.java
|
5a279f115c370a0f368bf198ffe5eb0323975a6e
|
[] |
no_license
|
whatafree/JCoffee
|
08dc47f79f8369af32e755de01c52d9a8479d44c
|
fa7194635a5bd48259d325e5b0a190780a53c55f
|
refs/heads/master
| 2022-11-16T01:58:04.254688
| 2020-07-13T20:11:17
| 2020-07-13T20:11:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,224
|
java
|
class c16005064 {
private void setInlineXML(Entry entry, DatastreamXMLMetadata ds) throws UnsupportedEncodingException, StreamIOException {
String content;
if (m_obj.hasContentModel(Models.SERVICE_DEPLOYMENT_3_0) && (ds.DatastreamID.equals("SERVICE-PROFILE") || ds.DatastreamID.equals("WSDL"))) {
content = DOTranslationUtility.normalizeInlineXML(new String(ds.xmlContent, m_encoding), m_transContext);
} else {
content = new String(ds.xmlContent, m_encoding);
}
if (m_format.equals(ATOM_ZIP1_1)) {
String name = ds.DSVersionID + ".xml";
try {
m_zout.putNextEntry(new ZipEntry(name));
InputStream is = new ByteArrayInputStream(content.getBytes(m_encoding));
IOUtils.copy(is, m_zout);
m_zout.closeEntry();
is.close();
} catch (IOException e) {
throw new StreamIOException(e.getMessage(), e);
}
IRI iri = new IRI(name);
entry.setSummary(ds.DSVersionID);
entry.setContent(iri, ds.DSMIME);
} else {
entry.setContent(content, ds.DSMIME);
}
}
}
|
[
"piyush16066@iiitd.ac.in"
] |
piyush16066@iiitd.ac.in
|
4a3021fb8305fd2daeeb1a1fc656c3375c9e7c2c
|
afcc736dcb3bb07ac8f75e1c1246bd2953e91a70
|
/mall-coupon/src/main/java/com/sour/mall/coupon/service/ISpuBoundsService.java
|
677682d24c314a255597fd3c9b39c1ebecbcaeb7
|
[] |
no_license
|
Sourlun/mail-springCloud
|
2b94ad5b1cb384f349c43fa5c1c71e36d5bf7555
|
6770cf3c93e50f2ba799ad5df7f9e77b7a0fa38a
|
refs/heads/master
| 2023-04-18T14:10:53.724733
| 2021-05-09T12:06:24
| 2021-05-09T12:06:24
| 339,382,321
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 460
|
java
|
package com.sour.mall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sour.mall.common.utils.PageUtils;
import com.sour.mall.coupon.entity.SpuBoundsEntity;
import java.util.Map;
/**
* 商品spu积分设置
*
* @author SourLun
* @email 1141837289@qq.com
* @date 2021-02-17 21:39:23
*/
public interface ISpuBoundsService extends IService<SpuBoundsEntity> {
PageUtils queryPage(Map<String, Object> params);
}
|
[
"1141837289@qq.com"
] |
1141837289@qq.com
|
13d7d53d6fb5e90fb71e9919eb7dc3a289355762
|
3634eded90370ff24ee8f47ccfa19e388d3784ad
|
/src/main/java/org/jsoup/select/StructuralEvaluator.java
|
61dac804c6e3e312f8e37ea2608249b87f98a210
|
[] |
no_license
|
xiaofans/ResStudyPro
|
8bc3c929ef7199c269c6250b390d80739aaf50b9
|
ac3204b27a65e006ebeb5b522762848ea82d960b
|
refs/heads/master
| 2021-01-25T05:09:52.461974
| 2017-06-06T12:12:41
| 2017-06-06T12:12:41
| 93,514,258
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,163
|
java
|
package org.jsoup.select;
import java.util.Iterator;
import org.jsoup.nodes.Element;
abstract class StructuralEvaluator extends Evaluator {
Evaluator evaluator;
static class Root extends Evaluator {
Root() {
}
public boolean matches(Element root, Element element) {
return root == element;
}
}
static class Has extends StructuralEvaluator {
public Has(Evaluator evaluator) {
this.evaluator = evaluator;
}
public boolean matches(Element root, Element element) {
Iterator it = element.getAllElements().iterator();
while (it.hasNext()) {
Element e = (Element) it.next();
if (e != element && this.evaluator.matches(root, e)) {
return true;
}
}
return false;
}
public String toString() {
return String.format(":has(%s)", new Object[]{this.evaluator});
}
}
static class ImmediateParent extends StructuralEvaluator {
public ImmediateParent(Evaluator evaluator) {
this.evaluator = evaluator;
}
public boolean matches(Element root, Element element) {
if (root == element) {
return false;
}
Element parent = element.parent();
if (parent == null || !this.evaluator.matches(root, parent)) {
return false;
}
return true;
}
public String toString() {
return String.format(":ImmediateParent%s", new Object[]{this.evaluator});
}
}
static class ImmediatePreviousSibling extends StructuralEvaluator {
public ImmediatePreviousSibling(Evaluator evaluator) {
this.evaluator = evaluator;
}
public boolean matches(Element root, Element element) {
if (root == element) {
return false;
}
Element prev = element.previousElementSibling();
if (prev == null || !this.evaluator.matches(root, prev)) {
return false;
}
return true;
}
public String toString() {
return String.format(":prev%s", new Object[]{this.evaluator});
}
}
static class Not extends StructuralEvaluator {
public Not(Evaluator evaluator) {
this.evaluator = evaluator;
}
public boolean matches(Element root, Element node) {
return !this.evaluator.matches(root, node);
}
public String toString() {
return String.format(":not%s", new Object[]{this.evaluator});
}
}
static class Parent extends StructuralEvaluator {
public Parent(Evaluator evaluator) {
this.evaluator = evaluator;
}
public boolean matches(Element root, Element element) {
if (root == element) {
return false;
}
for (Element parent = element.parent(); parent != root; parent = parent.parent()) {
if (this.evaluator.matches(root, parent)) {
return true;
}
}
return false;
}
public String toString() {
return String.format(":parent%s", new Object[]{this.evaluator});
}
}
static class PreviousSibling extends StructuralEvaluator {
public PreviousSibling(Evaluator evaluator) {
this.evaluator = evaluator;
}
public boolean matches(Element root, Element element) {
if (root == element) {
return false;
}
for (Element prev = element.previousElementSibling(); prev != null; prev = prev.previousElementSibling()) {
if (this.evaluator.matches(root, prev)) {
return true;
}
}
return false;
}
public String toString() {
return String.format(":prev*%s", new Object[]{this.evaluator});
}
}
StructuralEvaluator() {
}
}
|
[
"zhaoyu@neoteched.com"
] |
zhaoyu@neoteched.com
|
1c60a5c66f339f6a374108cb95d910503fc5bea8
|
32ecc7b6458225f5261d4926aad1e7ed0aa865c2
|
/app/src/main/java/com/example/dell/toolbardemo/MainActivity.java
|
dcef5605694ef3cdd448b6055f429451a493a0ab
|
[] |
no_license
|
lurenman/ToolBarDemo
|
3a9e97b010d3e9778b671e25693b981cdfa08c85
|
b2672f7361379f45f199ab5016e5f879a87223d3
|
refs/heads/master
| 2020-04-09T01:49:15.204190
| 2018-12-01T07:04:56
| 2018-12-01T07:04:56
| 159,918,253
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,994
|
java
|
package com.example.dell.toolbardemo;
import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.example.dell.toolbardemo.activity.FirstTestActivity;
import com.example.dell.toolbardemo.activity.SearchViewActivity;
import com.example.dell.toolbardemo.activity.SecondTestActivity;
public class MainActivity extends AppCompatActivity {
private Context mContext;
private Button btn_first_test;
private Button btn_SearchView;
private Button btn_SecondTest;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mContext = this;
initView();
initListener();
}
private void initView() {
btn_first_test = (Button) findViewById(R.id.btn_first_test);
btn_SearchView = (Button) findViewById(R.id.btn_SearchView);
btn_SecondTest = (Button) findViewById(R.id.btn_SecondTest);
}
private void initListener() {
btn_first_test.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this, FirstTestActivity.class);
startActivity(intent);
}
});
btn_SearchView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(mContext, SearchViewActivity.class);
startActivity(intent);
}
});
btn_SecondTest.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(mContext, SecondTestActivity.class);
startActivity(intent);
}
});
}
}
|
[
"1464013886@qq.com"
] |
1464013886@qq.com
|
3970e756f10e8ba3dadbb04c78323f3b61e6f8da
|
a225db77848d0f16e67e8b5926f4ea752fa96f64
|
/serenity-core/src/test/java/twolevelpackagerequirements/fruit/apples/PickingApples.java
|
8893ccb02c1549f4b1c578934d3cbb7826cb1ca4
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
AnshumanGo/serenity-core
|
cb3c1ee091aa627b0bed59a9d4d6d5196ad3037a
|
39330a5e92ec54ccb5d0c43c4f6aa4b97c75486b
|
refs/heads/master
| 2021-11-29T19:54:27.254991
| 2021-11-17T15:46:06
| 2021-11-17T15:46:06
| 219,955,490
| 1
| 1
|
NOASSERTION
| 2020-10-01T11:18:58
| 2019-11-06T09:09:01
|
HTML
|
UTF-8
|
Java
| false
| false
| 168
|
java
|
package twolevelpackagerequirements.fruit.apples;
import net.thucydides.core.annotations.Narrative;
@Narrative(text="Pick some apples")
public class PickingApples {}
|
[
"john.smart@wakaleo.com"
] |
john.smart@wakaleo.com
|
4fb5023063123ad933923bf5e5c794002d7e8ef8
|
832adcdeb34c5ba6ba7d9ac6f1be01619711579d
|
/src/codingbat/functional2/NoNeg.java
|
986449d2d9d6432f9fef73fd7b6864171f6f7b87
|
[] |
no_license
|
Duelist256/CoreJava
|
208d5281988350e3a178ddefbebdba21ed6473b9
|
1fb5461691a7ac47ebd97577a8d5dd22171adb74
|
refs/heads/master
| 2021-01-21T15:19:44.807973
| 2017-09-10T13:51:19
| 2017-09-10T13:51:19
| 95,383,213
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 460
|
java
|
package codingbat.functional2;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Duelist on 27.08.2017.
*/
public class NoNeg {
public static List<Integer> noNeg(List<Integer> nums) {
nums.removeIf(n -> n < 0);
return nums;
}
public static void main(String[] args) {
List<Integer> list = new ArrayList<>();
list.add(1);
list.add(-2);
System.out.println(noNeg(list));
}
}
|
[
"selykov.iw@yandex.ru"
] |
selykov.iw@yandex.ru
|
88e1c283b96b873e997b5af793eb752d10604555
|
d991dfbef8c02b207ba543ac0720cbd7bda94e57
|
/initiator/src/main/java/org/oclc/circill/toolkit/initiator/client/SocketClientImpl.java
|
caf7d1b67fddaa7ac721859cc468808c7b54f1eb
|
[
"MIT"
] |
permissive
|
OCLC-Developer-Network/circill-toolkit
|
fa66f6a800029b51960634dc674562c4588c63ae
|
f29d6f59a8b223dabf7b733f178be8fd4489ad58
|
refs/heads/master
| 2023-03-18T22:06:48.392938
| 2021-03-04T22:19:07
| 2021-03-04T22:19:07
| 307,710,469
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,425
|
java
|
/*
* Copyright (c) 2020 OCLC, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the MIT/X11 license. The text of the license can be
* found at http://www.opensource.org/licenses/mit-license.php.
*/
package org.oclc.circill.toolkit.initiator.client;
import org.oclc.circill.toolkit.common.base.StatisticsBean;
import org.oclc.circill.toolkit.service.base.ServiceException;
import java.io.InputStream;
import java.util.Collections;
import java.util.Map;
/**
* Base class for clients (a.k.a. 'initiators') using socket (a.k.a. TCP/IP) transport.
*/
public class SocketClientImpl extends BaseClient implements SocketClient {
/**
* Construct an instance with the provider {@link StatisticsBean}.
* @param statisticsBean the {@link StatisticsBean}
*/
protected SocketClientImpl(final StatisticsBean statisticsBean) {
super(statisticsBean);
}
/**
* Send the provided initiation message with no additional headers to the current target address.
*
* @param initiationMsgBytes the initiation message as an array of bytes (network octets)
* @param targetURL the URL of the target responder
* @return the {@link InputStream} from which the response message can be read
* @throws ServiceException if the service fails
*/
public InputStream sendMessage(final byte[] initiationMsgBytes, final String targetURL) throws ServiceException {
return sendMessage(initiationMsgBytes, Collections.emptyMap(), targetURL);
}
/**
* Send the provided initiation message (with supplied headers), represented as an array of bytes,
* to the current target address using the current connect and read timeouts.
*
* @param initiationMsgBytes the initiation message as an array of bytes (network octets)
* @param targetURL the URL of the target responder
* @param headers a map of HTTP headers
* @return the {@link InputStream} from which the response message can be read
* @throws ServiceException if the exchange of messages with the responder fails
*/
public InputStream sendMessage(final byte[] initiationMsgBytes, final Map<String, String> headers, final String targetURL) throws ServiceException {
// TODO: Implement socket client behavior
throw new UnsupportedOperationException("Socket client not yet implemented.");
}
}
|
[
"73138532+bushmanb614@users.noreply.github.com"
] |
73138532+bushmanb614@users.noreply.github.com
|
b7db1bf61d8fd72dc524a39a4f78afebfcd71b82
|
40593f0da54f7ed23eba02c69c446f88fac2fbb6
|
/JavaFundamentalsMay2018/Java OOP Basics/Exams/MyExam - 29 August 2018/src/constants/Messages.java
|
38d92e8d5d89e924d5d4b8d15dd6235713780686
|
[] |
no_license
|
NinoBonev/SoftUni
|
9edd2d1d747d95bbd39a8632c350840699600d31
|
938a489e2c8b4360de95d0207144313d016ef843
|
refs/heads/master
| 2021-06-29T13:22:37.277753
| 2019-04-16T19:18:53
| 2019-04-16T19:18:53
| 131,605,271
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,313
|
java
|
package constants;
/**
* Created by Nino Bonev - 3.8.2018 г., 16:01
*/
public class Messages {
public static final String ADDED_HERO = "Added hero: %s"; //name
public static final String ADDED_GUILD = "Added Guild: %s"; //name
public static final String ADDED_PROVINCE = "Created province %s"; //name
public static final String SELECTED_PROVINCE = "Province %s selected!"; //name
public static final String ALREADY_SELECTED = "Province %s has already been selected!";
public static final String NOT_ADDED_PROVINCE = "Province with name %s already exists!"; //name
public static final String NOT_EXISTING_PROVINCE = "Province %s does not exist"; //name
public static final String UPDATED_HERO = "Updated hero: %s"; //{heroName}
public static final String NOT_UPDATED = "Hero %s can not be replaced by a weaker one.";//{name}
public static final String REMOVE_HERO = "Successfully removed hero [%s] from guild %s";//{heroName} - {guildName}
public static final String REMOVE_GUILD = "Removed guild [%s] with %d members.";//{{guildName}} - {guildSize}
public static final String NO_SUCH_HERO_TYPE = "No such hero type!";//{{guildName}} - {guildSize}
public static final String INVALID_CHARACTERS = "Invalid character stats!";//{{guildName}} - {guildSize}
public static final String EXISTING_GUILD = "Guild already exists.";//{{guildName}} - {guildSize}
public static final String NO_PROVINCE_SELECTED = "No province selected!";//{{guildName}} - {guildSize}
public static final String NO_EXISTING_GUILD = "Guild [%s] does not exist.";//{{guildName}} - {guildSize}
public static final String REMOVED_GUILD = "Removed guild %s with %d members.";//{{guildName}} - {guildSize}
public static final String COMPLETED_MISSION_STATUS = "Completed";
//{name} - {name} - {id} - {assignedMissionsCount} - {completedMissionsCount} - {rating}
public static final String GUILD_DETAILS_MESSAGE = "Guild: %s\n" +
"###Heroes:";
//{agentType} - {name} - {id} - {assignedMissionsCount} - {completedMissionsCount} - {rating} - {bounty}
public static final String HERO_DETAILED_MESSAGE = "Hero: %s, Type: [%s]\n" +//{heroName} - {heroType}
"#Stats: \n" +
"Health: %d\n" + //health
"Fatigue: %d\n" + //fatigue
"Magicka: %d\n";
//{missionType} - {id} - {Open / Completed} - {rating} - {bounty}
public static final String MISSION_STATUS = "%s Mission - %s\n" +
"Status: %s\n" +
"Rating: %.2f\n" +
"Bounty: %.2f\n";
//{noviceAgentsCount} - {masterAgentsCount} - {totalAssignedMissionsCount} - {totalCompletedMissionsCount} - {totalRatingEarned} - {totalBountyEarned}
public static final String OVER_MESSAGE = "Novice Agents: %d\n" +
"Master Agents: %d\n" +
"Assigned Missions: %d\n" +
"Completed Missions: %d\n" +
"Total Rating Given: %.2f\n" +
"Total Bounty Given: $%.2f\n";
public static final String NO_SUCH_HERO = "No such hero in this guild!";
public static final String SUCCESSFULLY_REMOVED_HERO = "Successfully removed hero [%s] from guild %s";//{heroName} - {guildName}
public static final String HEROES_INFO = "Hero: %s, Offense: %.2f, Defense: %.2f";
}
|
[
"nbonev@gmail.com"
] |
nbonev@gmail.com
|
a1e1ac089595613257c145a7fde93e19706f1181
|
bb45ca5f028b841ca0a08ffef60cedc40090f2c1
|
/app/src/main/java/com/MCWorld/ui/profile/GiftLayout.java
|
eccf243efc4469e19bc58c552930b2f31c7b7fb0
|
[] |
no_license
|
tik5213/myWorldBox
|
0d248bcc13e23de5a58efd5c10abca4596f4e442
|
b0bde3017211cc10584b93e81cf8d3f929bc0a45
|
refs/heads/master
| 2020-04-12T19:52:17.559775
| 2017-08-14T05:49:03
| 2017-08-14T05:49:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,896
|
java
|
package com.MCWorld.ui.profile;
import android.app.Dialog;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
import android.widget.GridView;
import android.widget.TextView;
import com.MCWorld.bbs.b.d;
import com.MCWorld.bbs.b.f;
import com.MCWorld.bbs.b.g;
import com.MCWorld.bbs.b.i;
import com.MCWorld.data.j;
import com.MCWorld.data.profile.GiftInfo;
import com.MCWorld.data.profile.ProductList;
import com.MCWorld.framework.base.image.PaintView;
import com.MCWorld.t;
import com.MCWorld.ui.base.BaseLoadingLayout;
import com.MCWorld.utils.at;
import com.MCWorld.utils.aw;
import com.simple.colorful.c;
import com.simple.colorful.setter.k;
import java.util.ArrayList;
import java.util.List;
public class GiftLayout extends BaseLoadingLayout implements OnItemClickListener, c {
private List<GiftInfo> aab;
private long bfk = 0;
private a bfl;
private GridView bfm;
private Context context;
private int mType = 0;
private String nick;
private class a extends BaseAdapter {
final /* synthetic */ GiftLayout bfn;
private List<GiftInfo> objs;
public a(GiftLayout giftLayout, List<GiftInfo> objs) {
this.bfn = giftLayout;
this.objs = objs;
}
public int getCount() {
return this.objs.size();
}
public Object getItem(int position) {
return this.objs.get(position);
}
public long getItemId(int position) {
return 0;
}
public View getView(int position, View convertView, ViewGroup parent) {
a holder;
if (convertView == null) {
convertView = LayoutInflater.from(parent.getContext()).inflate(i.item_credit_gift, parent, false);
holder = new a(this);
holder.aRg = (PaintView) convertView.findViewById(g.img_gift);
holder.aRh = (TextView) convertView.findViewById(g.title);
holder.bfo = (FrameLayout) convertView.findViewById(g.fl_credit);
holder.bfp = (TextView) convertView.findViewById(g.credits);
convertView.setTag(holder);
} else {
holder = (a) convertView.getTag();
}
GiftInfo info = (GiftInfo) getItem(position);
int size = (at.getScreenPixWidth(this.bfn.context) - at.dipToPx(this.bfn.context, 16)) / 3;
holder.aRg.setLayoutParams(new LayoutParams(size, size));
t.a(holder.aRg, info.getIcon(), 0.0f);
holder.aRh.setText(info.getName());
if (this.bfn.mType == 1) {
holder.bfo.setBackgroundResource(f.bg_exchange_integral);
holder.bfp.setCompoundDrawablesWithIntrinsicBounds(f.ic_cup_white_small, 0, 0, 0);
}
holder.bfp.setText(String.valueOf(info.getCredits()));
return convertView;
}
public void setData(List<GiftInfo> data) {
this.objs = data;
notifyDataSetChanged();
}
}
public GiftLayout(Context context, int type) {
super(context);
this.context = context;
this.mType = type;
}
protected void c(Context context, AttributeSet attrs) {
super.c(context, attrs);
addView(LayoutInflater.from(context).inflate(i.include_video_detail_drama, this, false));
this.bfm = (GridView) findViewById(g.drama);
this.aab = new ArrayList();
this.bfl = new a(this, this.aab);
this.bfm.setAdapter(this.bfl);
this.bfm.setOnItemClickListener(this);
this.bfm.setSelector(d.transparent);
}
public void setGift(ProductList data) {
this.aab = data.getGifts();
this.bfl.setData(this.aab);
}
public void setUser(ProductList data) {
this.bfk = data.getUser() == null ? 0 : data.getUser().getCredits();
this.nick = data.getUser() == null ? "" : data.getUser().getNick();
this.nick = aw.W(this.nick, 10);
}
public void onItemClick(AdapterView<?> adapterView, View v, int position, long arg3) {
GiftInfo info = (GiftInfo) this.bfl.getItem(position);
if (this.mType == 0) {
b(info);
} else if (this.mType == 1) {
c(info);
}
}
public void Ff() {
if (this.bfl != null) {
this.bfl.notifyDataSetChanged();
}
}
private void b(GiftInfo info) {
if (!j.ep().ey()) {
t.an(this.context);
} else if (this.nick != null && info != null) {
t.a(this.context, info, this.bfk);
}
}
private void c(GiftInfo data) {
String msg = data.getDesc();
if (msg != null) {
final Dialog dialog = new Dialog(getContext(), com.simple.colorful.d.RD());
View layout = LayoutInflater.from(getContext()).inflate(i.include_dialog_one, null);
((TextView) layout.findViewById(g.tv_msg)).setText(msg);
dialog.setContentView(layout);
dialog.show();
layout.findViewById(g.tv_confirm).setOnClickListener(new OnClickListener(this) {
final /* synthetic */ GiftLayout bfn;
public void onClick(View arg0) {
dialog.dismiss();
}
});
}
}
public com.simple.colorful.a.a b(com.simple.colorful.a.a builder) {
k setter = new com.simple.colorful.setter.j(this.bfm);
setter.bg(g.item_gift, b.c.backgroundItemGift).bh(g.title, 16842806);
builder.a(setter);
return builder;
}
public void FG() {
}
}
|
[
"18631616220@163.com"
] |
18631616220@163.com
|
adec21b57abf4e89f52d49cbfe60fe28b44f0873
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE789_Uncontrolled_Mem_Alloc/s02/CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_HashSet_54a.java
|
5aff5f37c50d4425d2be1c836df355422785a450
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,023
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_HashSet_54a.java
Label Definition File: CWE789_Uncontrolled_Mem_Alloc.int.label.xml
Template File: sources-sink-54a.tmpl.java
*/
/*
* @description
* CWE: 789 Uncontrolled Memory Allocation
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: HashSet
* BadSink : Create a HashSet using data as the initial size
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
package testcases.CWE789_Uncontrolled_Mem_Alloc.s02;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.logging.Level;
public class CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_HashSet_54a extends AbstractTestCaseServlet
{
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* initialize data in case there are no cookies */
/* Read data from cookies */
{
Cookie cookieSources[] = request.getCookies();
if (cookieSources != null)
{
/* POTENTIAL FLAW: Read data from the first cookie value */
String stringNumber = cookieSources[0].getValue();
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception reading data from cookie", exceptNumberFormat);
}
}
}
(new CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_HashSet_54b()).badSink(data , request, response);
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
(new CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_HashSet_54b()).goodG2BSink(data , request, response);
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"you@example.com"
] |
you@example.com
|
250997407cc51077a34cc6615560120bef8db21d
|
20cb81cc83ab3c78dfdbc21b1f7e5886e8b81fc8
|
/src/HDOJ/baidu/Test5.java
|
46640683212d8bfa3159394c4ee13209c889d1a5
|
[
"MIT"
] |
permissive
|
kid1999/Algorithmic-training
|
44baf08be88fe6b032cde2895b23095824a2afea
|
7bb246ecfa6907c7f4b9a1fb2774ad75ce110673
|
refs/heads/master
| 2021-09-24T14:55:22.201025
| 2021-09-22T08:26:50
| 2021-09-22T08:26:50
| 196,485,140
| 2
| 0
|
MIT
| 2019-10-17T16:13:56
| 2019-07-12T01:07:47
|
Java
|
UTF-8
|
Java
| false
| false
| 477
|
java
|
package HDOJ.baidu;
import java.util.Scanner;
public class Test5 {
public static void main(String[] args) {
int sum = 0;
long[] nums = new long[100010];
nums[1] = 1;
Scanner sc = new Scanner(System.in);
long t = sc.nextLong();
sc.nextLong();
for (int i = 2; i <= t; i++) {
long n = sc.nextLong();
long pre2 = nums[i-1] * (i-1);
nums[i] = (sum + pre2) % n;
sum += pre2;
}
for (int i = 1; i <= t ; i++) {
System.out.println(nums[i]);
}
}
}
|
[
"kid.1447250889@live.com"
] |
kid.1447250889@live.com
|
0edf24c9784c9f68fedc400d9797ae64410126c5
|
3ec181de57f014603bb36b8d667a8223875f5ee8
|
/gwdash-all/gwdash/gwdash-service/src/main/java/com/xiaomi/youpin/gwdash/service/ApiServerBillingService.java
|
392f49a02b34708b6242ee7ebf92344d363fcd9c
|
[
"Apache-2.0"
] |
permissive
|
XiaoMi/mone
|
41af3b636ecabd7134b53a54c782ed59cec09b9e
|
576cea4e6cb54e5bb7c37328f1cb452cda32f953
|
refs/heads/master
| 2023-08-31T08:47:40.632419
| 2023-08-31T08:09:35
| 2023-08-31T08:09:35
| 331,844,632
| 1,148
| 152
|
Apache-2.0
| 2023-09-14T07:33:13
| 2021-01-22T05:20:18
|
Java
|
UTF-8
|
Java
| false
| false
| 7,898
|
java
|
/*
* Copyright 2020 Xiaomi
*
* 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.xiaomi.youpin.gwdash.service;
import com.google.gson.Gson;
import com.xiaomi.youpin.docker.Safe;
import com.xiaomi.youpin.gwdash.bo.BillingReq;
import com.xiaomi.youpin.gwdash.rocketmq.BillingRocketMQProvider;
import com.xiaomi.youpin.tesla.billing.bo.BResult;
import com.xiaomi.youpin.tesla.billing.bo.BillingOperationBo;
import com.xiaomi.youpin.tesla.billing.bo.ReportBo;
import com.xiaomi.youpin.tesla.billing.bo.ReportRes;
import com.xiaomi.youpin.tesla.billing.common.BillingOperationTypeEnum;
import com.xiaomi.youpin.tesla.billing.common.BillingPlatformEnum;
import com.xiaomi.youpin.tesla.billing.common.BillingTypeEnum;
import com.xiaomi.youpin.tesla.billing.dataobject.BillingNorms;
import com.xiaomi.youpin.tesla.billing.service.BillingService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
/**
* @author goodjava@qq.com
* billing 操作服务类
*/
@Service
@Slf4j
public class ApiServerBillingService {
@Reference(group = "${ref.billing.service.group}", interfaceClass = BillingService.class, check = false)
private BillingService billingService;
@Autowired
private BillingRocketMQProvider billingRocketMQProvider;
/**
* 获取报表
*
* @return
*/
public BResult<ReportRes> report(long projectId, long envId) {
log.info("report projectId:{} envId:{}", projectId, envId);
// ReportBo reportBo = new ReportBo();
// reportBo.setBizId(projectId);
// reportBo.setSubBizId(envId);
// LocalDate ld = LocalDate.now();
// long now = System.currentTimeMillis();
return billingService.getBillingDetail(2020, projectId, envId);
// return billingService.generateBizReport(reportBo, ld.getYear(), ld.getMonthValue(), now);
}
/**
* 初始化报表内部数据
*
* @param reportBo
* @return
*/
public BResult<ReportRes> initReport(ReportBo reportBo) {
return billingService.initReport(reportBo);
}
/**
* 下线一台机器(不再对此台机器计费)
*/
public boolean offline(BillingReq req) {
log.info("offline:{}", req);
Safe.run(() -> {
BillingOperationBo bo = new BillingOperationBo();
bo.setBillingPlatform(BillingPlatformEnum.IDC_COMPUTER_ROOM.getCode());
bo.setBillingType(BillingTypeEnum.BY_MINUTE.getCode());
bo.setBillingOperation(BillingOperationTypeEnum.DESTROY_RESOURCE.getCode());
bo.setSubType(req.getSubType());
bo.setAccountId(req.getProjectId());
bo.setOperationTime(System.currentTimeMillis());
bo.setResourceIds(req.getResourceKeyList());
bo.setBizId(req.getProjectId());
bo.setSubBizId(req.getEnvId());
bo.setSendTime(System.currentTimeMillis());
BillingNorms useBillingNorms = new BillingNorms();
useBillingNorms.setCpu(String.valueOf(req.getUseCpu()));
BillingNorms allNorms = new BillingNorms();
allNorms.setCpu(String.valueOf(req.getCpu()));
bo.setUseNorms(useBillingNorms);
bo.setAllNorms(allNorms);
billingRocketMQProvider.send(new Gson().toJson(bo));
});
return true;
}
/**
* 上线一台机器(开始对此台机器计费)
*
* @return
*/
public boolean online(BillingReq req) {
log.info("online:{}", req);
Safe.run(() -> {
BillingOperationBo bo = new BillingOperationBo();
bo.setBillingPlatform(BillingPlatformEnum.IDC_COMPUTER_ROOM.getCode());
bo.setBillingType(BillingTypeEnum.BY_MINUTE.getCode());
bo.setBillingOperation(BillingOperationTypeEnum.CREATE_RESOURCE.getCode());
bo.setSubType(req.getSubType());
bo.setAccountId(req.getProjectId());
bo.setOperationTime(System.currentTimeMillis());
bo.setResourceIds(req.getResourceKeyList());
bo.setBizId(req.getProjectId());
bo.setSubBizId(req.getEnvId());
bo.setSendTime(System.currentTimeMillis());
BillingNorms useBillingNorms = new BillingNorms();
useBillingNorms.setCpu(String.valueOf(req.getUseCpu()));
BillingNorms allNorms = new BillingNorms();
allNorms.setCpu(String.valueOf(req.getCpu()));
bo.setUseNorms(useBillingNorms);
bo.setAllNorms(allNorms);
billingRocketMQProvider.send(new Gson().toJson(bo));
});
return true;
}
/**
* 升级配置
* @param req
* @return
*/
public boolean upgrade(BillingReq req) {
log.info("online:{}", req);
Safe.run(() -> {
BillingOperationBo bo = new BillingOperationBo();
bo.setBillingPlatform(BillingPlatformEnum.IDC_COMPUTER_ROOM.getCode());
bo.setBillingType(BillingTypeEnum.BY_MINUTE.getCode());
bo.setBillingOperation(BillingOperationTypeEnum.RISE_RESOURCE.getCode());
bo.setSubType(req.getSubType());
bo.setAccountId(req.getProjectId());
bo.setOperationTime(System.currentTimeMillis());
bo.setResourceIds(req.getResourceKeyList());
bo.setBizId(req.getProjectId());
bo.setSubBizId(req.getEnvId());
bo.setSendTime(System.currentTimeMillis());
BillingNorms useBillingNorms = new BillingNorms();
useBillingNorms.setCpu(String.valueOf(req.getUseCpu()));
BillingNorms allNorms = new BillingNorms();
allNorms.setCpu(String.valueOf(req.getCpu()));
bo.setUseNorms(useBillingNorms);
bo.setAllNorms(allNorms);
billingRocketMQProvider.send(new Gson().toJson(bo));
});
return true;
}
/**
* 降低配置
* @param req
* @return
*/
public boolean downgrade(BillingReq req) {
log.info("online:{}", req);
Safe.run(() -> {
BillingOperationBo bo = new BillingOperationBo();
bo.setBillingPlatform(BillingPlatformEnum.IDC_COMPUTER_ROOM.getCode());
bo.setBillingType(BillingTypeEnum.BY_MINUTE.getCode());
bo.setBillingOperation(BillingOperationTypeEnum.DROP_RESOURCE.getCode());
bo.setSubType(req.getSubType());
bo.setAccountId(req.getProjectId());
bo.setOperationTime(System.currentTimeMillis());
bo.setResourceIds(req.getResourceKeyList());
bo.setBizId(req.getProjectId());
bo.setSubBizId(req.getEnvId());
bo.setSendTime(System.currentTimeMillis());
BillingNorms useBillingNorms = new BillingNorms();
useBillingNorms.setCpu(String.valueOf(req.getUseCpu()));
BillingNorms allNorms = new BillingNorms();
allNorms.setCpu(String.valueOf(req.getCpu()));
bo.setUseNorms(useBillingNorms);
bo.setAllNorms(allNorms);
billingRocketMQProvider.send(new Gson().toJson(bo));
});
return true;
}
}
|
[
"shanwenbang@xiaomi.com"
] |
shanwenbang@xiaomi.com
|
27883a4b633018f0c830857b1748c3d6fa194a53
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes4.dex_source_from_JADX/com/facebook/pages/adminedpages/backgroundtasks/AdminedPagesPrefetchBackgroundTaskConfig.java
|
a5f04004bdf34fe3e10b1f1fd1f957779e299174
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 394
|
java
|
package com.facebook.pages.adminedpages.backgroundtasks;
import javax.annotation.concurrent.Immutable;
@Immutable
/* compiled from: f */
public class AdminedPagesPrefetchBackgroundTaskConfig {
public final boolean f12420a;
public final long f12421b;
public AdminedPagesPrefetchBackgroundTaskConfig(boolean z, long j) {
this.f12420a = z;
this.f12421b = j;
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
a2b1afcfa4e970e63a5c9fb019a66e29d41cdc2d
|
29170c7d4f8da3eaf88cb040066de89730eec5df
|
/2014_15_Even_Projects/E003, 001, 010/TheReadingRoom/app/src/main/java/com/example/aashya/thereadingroom/asciatic1.java
|
da3f32a08284b3ffb69854ea355e74975b46129f
|
[] |
no_license
|
NileshSingh/MPSTME_Project_Android
|
6c2f77abb5b151d62adfb586c1b339921ef3647e
|
8768deaa1b9bde66a1fdddc6ffdc571ca60489ed
|
refs/heads/master
| 2021-01-21T02:46:06.818487
| 2015-05-06T09:56:31
| 2015-05-06T09:56:31
| 59,458,925
| 0
| 1
| null | 2016-05-23T06:51:50
| 2016-05-23T06:51:50
| null |
UTF-8
|
Java
| false
| false
| 1,231
|
java
|
package com.example.aashya.thereadingroom;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
/**
* Created by aashya on 27/03/15.
*/
public class asciatic1 extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.asciatic1);
Button a = (Button) findViewById(R.id.aboutas);
a.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v) {
Intent intent1 = new Intent(asciatic1.this, asciatic2.class);
startActivity(intent1);
}
});
Button b = (Button) findViewById(R.id.contactas);
b.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v) {
Intent intent1 = new Intent(asciatic1.this, asciatic2.class);
startActivity(intent1);
}
}
);
}
}
|
[
"mudit.kapoor@nmims.edu"
] |
mudit.kapoor@nmims.edu
|
a9445b13526d9e093386f302396eac6584ace4b9
|
ce357e312e3252f023c5ca6dfb5f05e1fdaa2773
|
/core/src/test/java/test/io/smallrye/openapi/runtime/scanner/jakarta/JAXBElementDto.java
|
d363fc4f79d9c8a8e8caf4a3d51ca91f2474d50f
|
[
"Apache-2.0"
] |
permissive
|
devnied/smallrye-open-api
|
b12f623089e7181a5fa55fdc15ab379ede03bb84
|
e38adfac6ded0f0bd6250b0452939c4dbd9c33c7
|
refs/heads/main
| 2023-05-28T07:26:22.331990
| 2021-06-04T07:38:16
| 2021-06-04T07:38:16
| 374,776,562
| 0
| 0
|
Apache-2.0
| 2021-06-07T19:20:08
| 2021-06-07T19:20:07
| null |
UTF-8
|
Java
| false
| false
| 912
|
java
|
package test.io.smallrye.openapi.runtime.scanner.jakarta;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElementRef;
import jakarta.xml.bind.annotation.XmlType;
@Schema
@XmlAccessorType(value = XmlAccessType.FIELD)
@XmlType(name = "JAXBElementDto", propOrder = { "caseSubtitleFree", "caseSubtitle" })
public class JAXBElementDto {
@XmlElementRef(name = "CaseSubtitle", namespace = "urn:Milo.API.Miljo.DataContracts.V1", type = JAXBElement.class, required = false)
protected JAXBElement<String> caseSubtitle;
@XmlElementRef(name = "CaseSubtitleFree", namespace = "urn:Milo.API.Miljo.DataContracts.V1", type = JAXBElement.class, required = false)
protected JAXBElement<String> caseSubtitleFree;
}
|
[
"phillip.kruger@gmail.com"
] |
phillip.kruger@gmail.com
|
e9114071ec6198b23296b2781c288fd306f48219
|
c0a5b21b3ed96f5f8c8db694139f76be5d324eac
|
/tonghang-mp Maven Webapp/src/main/java/com/tonghang/manage/user/dao/UserMapper.java
|
7a62008d122a847a9e229b5eb54295a35213af25
|
[] |
no_license
|
rpgmakervx/th_manager
|
c08e13a0aef992bf0809dc7d27180a8ad9901a4b
|
5d24329ab4beac5b78b7d0ff9d0b8fa3758944d1
|
refs/heads/master
| 2016-09-02T05:28:48.997831
| 2015-10-08T11:07:11
| 2015-10-08T11:07:11
| 41,240,127
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 814
|
java
|
package com.tonghang.manage.user.dao;
import java.util.List;
import java.util.Map;
import com.tonghang.manage.user.pojo.User;
/**
* 分页在service完成,使用PageHelper插件
* @author Administrator
*
*/
public interface UserMapper {
//按照ID查询用户
public User findUserById(String client_id);
//按照用户属性 分页查询用户
public List<User> findUserByAttribute(Map<String,Object> user);
//分页查询所有用户
public List<User> findAllUser();
//根据标签名查询用户
public List<User> finUserByLabelName(String label_name);
//获取总用户量
public int userNumbers();
//获取按条件搜索到的用户的总用户量
public int userNumbersByAttribute(Map<String,Object> user);
//管理员对用户进行封号和解封
public void isolate(User user);
}
|
[
"583110127@qq.com"
] |
583110127@qq.com
|
dc72c70062a271414654b508070136d45025e296
|
e3163e7591eceb0e166e8b8091e2d02636f782c8
|
/src/main/java/com/amazonaws/services/simpleemail/model/SetIdentityNotificationTopicResult.java
|
d4ee633d24a4bb7d26784690b863ffdaae1538a9
|
[
"JSON",
"Apache-2.0"
] |
permissive
|
paulbakker/aws-sdk-java
|
c4542af4c4f72ed0023b8db42c5e57721378ae5d
|
045c79bce0e15634f27019185bfc09f876076629
|
refs/heads/master
| 2021-01-16T20:02:25.185751
| 2013-02-28T02:02:51
| 2013-02-28T02:08:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,711
|
java
|
/*
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.simpleemail.model;
/**
* <p>
* An empty element. Receiving this element indicates that the request completed successfully.
* </p>
*/
public class SetIdentityNotificationTopicResult {
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof SetIdentityNotificationTopicResult == false) return false;
SetIdentityNotificationTopicResult other = (SetIdentityNotificationTopicResult)obj;
return true;
}
}
|
[
"fulghum@amazon.com"
] |
fulghum@amazon.com
|
cf55639cf8d65ea2d721cae0e22d215a25110688
|
fc66eef646e11c8376671ce89ac72d650f3f92c7
|
/app/src/main/java/com/chcovid19project/OrphanageSupport/DeliveryActivity.java
|
27930e2f4547cb9ad2e7b4209b6c346285d63576
|
[] |
no_license
|
COVID-19-Apps/CH-COVID-19-Project
|
95159da1c9a5b6cb86cf93173eb1dd551292eaf0
|
07933ecdebc237beccd437589fd801bc8b968d55
|
refs/heads/master
| 2022-11-10T07:33:26.365190
| 2020-07-01T10:42:05
| 2020-07-01T10:42:05
| 276,349,782
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,222
|
java
|
package com.chcovid19project.OrphanageSupport;
import android.app.SearchManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SearchView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.chcovid19project.Adapter.PersonAdapter;
import com.chcovid19project.ConfirmActivity;
import com.chcovid19project.MainActivity;
import com.chcovid19project.Models.Persons;
import com.chcovid19project.OrphanageSupportActivity;
import com.chcovid19project.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class DeliveryActivity extends AppCompatActivity implements PersonAdapter.SearchAdapterListener {
private FloatingActionButton Add;
private RecyclerView mPersonList;
private PersonAdapter personAdapter;
private List<Persons> personsList;
private RelativeLayout mNoPersons;
private DatabaseReference mPersonsDatabase;
private SearchView searchView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_delivery);
Add = findViewById(R.id.add);
mNoPersons = findViewById(R.id.no_persons);
mPersonList =findViewById(R.id.volunteer_list);
mPersonsDatabase = FirebaseDatabase.getInstance().getReference().child("Persons");
mPersonsDatabase.keepSynced(true);
mPersonList.setHasFixedSize(true);
LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);
mPersonList.setLayoutManager(mLayoutManager);
personsList = new ArrayList<>();
personAdapter = new PersonAdapter(this, personsList, this);
mPersonList.setAdapter(personAdapter);
Add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (isNetworkConnected()) {
AlertDialog.Builder builder = new AlertDialog.Builder(DeliveryActivity.this);
builder.setMessage("Do you want to become Volunteer for Delivery ?").setTitle("Volunteer Confirm");
builder.setCancelable(false)
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
Intent intent = new Intent(DeliveryActivity.this, ConfirmActivity.class);
startActivity(intent);
dialog.dismiss();
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
AlertDialog alert = builder.create();
alert.setTitle("Delivery");
alert.show();
}else{
Toast.makeText(DeliveryActivity.this, "Connect to Internet", Toast.LENGTH_SHORT).show();
}
}
});
readPersons();
}
private void readPersons() {
mPersonsDatabase.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
if (dataSnapshot.exists()) {
personsList.clear();
for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
Persons myStatus = snapshot.getValue(Persons.class);
if (myStatus.getType().contains("Delivery"))
personsList.add(myStatus);
}
if (!personsList.isEmpty()) {
mPersonList.setVisibility(View.VISIBLE);
mNoPersons.setVisibility(View.GONE);
Collections.reverse(personsList);
personAdapter.notifyDataSetChanged();
}else{
mNoPersons.setVisibility(View.VISIBLE);
mPersonList.setVisibility(View.GONE);
}
}else {
mNoPersons.setVisibility(View.VISIBLE);
mPersonList.setVisibility(View.GONE);
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
}
private boolean isNetworkConnected() {
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
return cm.getActiveNetworkInfo() != null && cm.getActiveNetworkInfo().isConnected();
}
@Override
public void onSearchSelected(Persons persons) {
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_search, menu);
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
searchView = (SearchView) menu.findItem(R.id.action_search)
.getActionView();
searchView.setSearchableInfo(searchManager
.getSearchableInfo(getComponentName()));
searchView.setMaxWidth(Integer.MAX_VALUE);
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
// filter recycler view when query submitted
personAdapter.getFilter().filter(query);
return false;
}
@Override
public boolean onQueryTextChange(String query) {
// filter recycler view when text is changed
personAdapter.getFilter().filter(query);
return false;
}
});
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_search) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
|
[
"anandhamurthy2000@gmail.com"
] |
anandhamurthy2000@gmail.com
|
e256eac90d319dfd4683ea72dc90ea7395df5ba1
|
69cb5ec62e23a38440adb26b9e3ebff0ade42f2b
|
/zoom-aop/src/test/java/org/zoomdev/zoom/aop/interceptors/LogMethodCallback.java
|
d9dc6032ddae51022a186d3c9d73f41b0bfa6424
|
[
"ISC",
"MIT"
] |
permissive
|
zoom-framework/zoom
|
a941aa06dcf87a61590494898e4d58252c0f52b1
|
ad5d6cee4aaef9bfb089af246106145ff0176040
|
refs/heads/master
| 2022-08-03T16:06:25.520593
| 2019-07-03T22:06:28
| 2019-07-03T22:06:28
| 157,067,525
| 1
| 0
|
MIT
| 2022-06-21T00:52:06
| 2018-11-11T10:08:57
|
Java
|
UTF-8
|
Java
| false
| false
| 201
|
java
|
package org.zoomdev.zoom.aop.interceptors;
import org.zoomdev.zoom.aop.MethodCallback;
/**
* 提供详细的日志
*
* @author jzoom
*/
public class LogMethodCallback extends MethodCallback {
}
|
[
"jzoom8112@gmail.com"
] |
jzoom8112@gmail.com
|
3a91f431af94e0e983cea86fa53bbc285e16b755
|
24bc4990e9d0bef6a42a6f86dc783785b10dbd42
|
/chrome/browser/password_check/android/internal/java/src/org/chromium/chrome/browser/password_check/PasswordCheckCoordinator.java
|
476e580f15710bc2e6a076bb5e768d9952112778
|
[
"BSD-3-Clause"
] |
permissive
|
nwjs/chromium.src
|
7736ce86a9a0b810449a3b80a4af15de9ef9115d
|
454f26d09b2f6204c096b47f778705eab1e3ba46
|
refs/heads/nw75
| 2023-08-31T08:01:39.796085
| 2023-04-19T17:25:53
| 2023-04-19T17:25:53
| 50,512,158
| 161
| 201
|
BSD-3-Clause
| 2023-05-08T03:19:09
| 2016-01-27T14:17:03
| null |
UTF-8
|
Java
| false
| false
| 7,123
|
java
|
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.password_check;
import android.content.Context;
import android.view.MenuItem;
import androidx.annotation.VisibleForTesting;
import androidx.lifecycle.LifecycleObserver;
import org.chromium.chrome.browser.device_reauth.BiometricAuthRequester;
import org.chromium.chrome.browser.device_reauth.ReauthenticatorBridge;
import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncher;
import org.chromium.chrome.browser.password_check.helper.PasswordCheckChangePasswordHelper;
import org.chromium.chrome.browser.password_check.helper.PasswordCheckIconHelper;
import org.chromium.chrome.browser.password_check.internal.R;
import org.chromium.chrome.browser.password_manager.settings.PasswordAccessReauthenticationHelper;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.components.browser_ui.settings.SettingsLauncher;
import org.chromium.components.favicon.LargeIconBridge;
import org.chromium.ui.modelutil.PropertyModel;
import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
/**
* Creates the PasswordCheckComponentUi. This class is responsible for managing the UI for the check
* of the leaked password.
*/
class PasswordCheckCoordinator implements PasswordCheckComponentUi, LifecycleObserver {
private HelpAndFeedbackLauncher mHelpAndFeedbackLauncher;
private final PasswordCheckFragmentView mFragmentView;
private final SettingsLauncher mSettingsLauncher;
private final PasswordAccessReauthenticationHelper mReauthenticationHelper;
private final ReauthenticatorBridge mReauthenticatorBridge;
private final PasswordCheckMediator mMediator;
private PropertyModel mModel;
/**
* Blueprint for a class that handles interactions with credentials.
*/
interface CredentialEventHandler {
/**
* Edits the given Credential in the password store.
* @param credential A {@link CompromisedCredential} to be edited.
* @param context The context to launch the editing UI from.
*/
void onEdit(CompromisedCredential credential, Context context);
/**
* Removes the given Credential from the password store.
* @param credential A {@link CompromisedCredential} to be removed.
*/
void onRemove(CompromisedCredential credential);
/**
* View the given Credential.
* @param credential A {@link CompromisedCredential} to be viewed.
*/
void onView(CompromisedCredential credential);
/**
* Opens a password change form or home page of |credential|'s origin or an app.
* @param credential A {@link CompromisedCredential} to be changed.
*/
void onChangePasswordButtonClick(CompromisedCredential credential);
}
PasswordCheckCoordinator(PasswordCheckFragmentView fragmentView,
HelpAndFeedbackLauncher helpAndFeedbackLauncher, SettingsLauncher settingsLauncher,
PasswordCheckComponentUi.CustomTabIntentHelper customTabIntentHelper,
PasswordCheckComponentUi.TrustedIntentHelper trustedIntentHelper) {
mHelpAndFeedbackLauncher = helpAndFeedbackLauncher;
mFragmentView = fragmentView;
mSettingsLauncher = settingsLauncher;
// TODO(crbug.com/1101256): If help is part of the view, make mediator the delegate.
mFragmentView.setComponentDelegate(this);
// TODO(crbug.com/1178519): Ideally, the following replaces the lifecycle event forwarding.
// Figure out why it isn't working and use the following lifecycle observer once it does:
// mFragmentView.getLifecycle().addObserver(this);
mReauthenticationHelper = new PasswordAccessReauthenticationHelper(
mFragmentView.getActivity(), mFragmentView.getParentFragmentManager());
mReauthenticatorBridge =
new ReauthenticatorBridge(BiometricAuthRequester.PASSWORD_CHECK_AUTO_PWD_CHANGE);
PasswordCheckChangePasswordHelper changePasswordHelper =
new PasswordCheckChangePasswordHelper(mFragmentView.getActivity(),
mSettingsLauncher, customTabIntentHelper, trustedIntentHelper);
PasswordCheckIconHelper iconHelper = new PasswordCheckIconHelper(
new LargeIconBridge(Profile.getLastUsedRegularProfile()),
mFragmentView.getResources().getDimensionPixelSize(
org.chromium.chrome.browser.ui.favicon.R.dimen.default_favicon_size));
mMediator = new PasswordCheckMediator(changePasswordHelper, mReauthenticationHelper,
mReauthenticatorBridge, mSettingsLauncher, iconHelper);
}
private void launchCheckupInAccount() {
PasswordCheckFactory.getOrCreate(mSettingsLauncher)
.launchCheckupInAccount(mFragmentView.getActivity());
}
@Override
public void onStartFragment() {
// In the rare case of a restarted activity, don't recreate the model and mediator.
if (mModel == null) {
mModel = PasswordCheckProperties.createDefaultModel();
PasswordCheckCoordinator.setUpModelChangeProcessors(mModel, mFragmentView);
mMediator.initialize(mModel, PasswordCheckFactory.getOrCreate(mSettingsLauncher),
mFragmentView.getReferrer(), this::launchCheckupInAccount);
}
}
@Override
public void onResumeFragment() {
mMediator.onResumeFragment();
mReauthenticationHelper.onReauthenticationMaybeHappened();
}
@Override
public void onDestroyFragment() {
mMediator.stopCheck();
if (mFragmentView.getActivity() == null || mFragmentView.getActivity().isFinishing()) {
mMediator
.onUserLeavesCheckPage(); // Should be called only if the activity is finishing.
mMediator.destroy();
mModel = null;
}
}
// TODO(crbug.com/1101256): Move to view code.
@Override
public boolean handleHelp(MenuItem item) {
if (item.getItemId() == R.id.menu_id_targeted_help) {
mHelpAndFeedbackLauncher.show(mFragmentView.getActivity(),
mFragmentView.getActivity().getString(R.string.help_context_check_passwords),
Profile.getLastUsedRegularProfile(), null);
return true;
}
return false;
}
@Override
public void destroy() {
PasswordCheckFactory.destroy();
}
/**
* Connects the given model with the given view using Model Change Processors.
* @param model A {@link PropertyModel} built with {@link PasswordCheckProperties}.
* @param view A {@link PasswordCheckFragmentView}.
*/
@VisibleForTesting
static void setUpModelChangeProcessors(PropertyModel model, PasswordCheckFragmentView view) {
PropertyModelChangeProcessor.create(
model, view, PasswordCheckViewBinder::bindPasswordCheckView);
}
}
|
[
"roger@nwjs.io"
] |
roger@nwjs.io
|
bd8ff8423050714ce6cc02e13f1cd18a0394a771
|
c93d57edc5337e479230150b3bb3833c9a1cce3e
|
/src/com/javarush/test/level18/lesson10/home10/Solution.java
|
321df1092a02b57f80f25e04100c31e82490f40c
|
[] |
no_license
|
Lao-Ax/JavaRushHomeWork
|
fe1cbafc41a57a3bcb5804337ab10474ba34948a
|
d33681fad5d6f891609e1ff1bc51ae104476b7af
|
refs/heads/master
| 2023-01-28T22:01:36.059968
| 2023-01-15T13:11:46
| 2023-01-15T14:28:05
| 264,274,037
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,235
|
java
|
package com.javarush.test.level18.lesson10.home10;
/* Собираем файл
Собираем файл из кусочков
Считывать с консоли имена файлов
Каждый файл имеет имя: [someName].partN. Например, Lion.avi.part1, Lion.avi.part2, ..., Lion.avi.part37.
Имена файлов подаются в произвольном порядке. Ввод заканчивается словом "end"
В папке, где находятся все прочтенные файлы, создать файл без приставки [.partN]. Например, Lion.avi
В него переписать все байты из файлов-частей используя буфер.
Файлы переписывать в строгой последовательности, сначала первую часть, потом вторую, ..., в конце - последнюю.
Закрыть потоки. Не использовать try-with-resources
*/
import java.io.*;
import java.util.Map;
import java.util.TreeMap;
public class Solution {
public static void main(String[] args) throws IOException{
Map<Integer, String> files = new TreeMap<>();
BufferedReader fileNameReader = new BufferedReader(new InputStreamReader(System.in));
String consoleInput;
while (!(consoleInput = fileNameReader.readLine()).equals("end")) {
int part = Integer.parseInt(consoleInput.substring(consoleInput.lastIndexOf(".")+1).replace("part",""));
files.put(part, consoleInput);
}
fileNameReader.close();
String resultFileName = files.get(1).substring(0, files.get(1).lastIndexOf("."));
System.out.println(resultFileName);
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(resultFileName));
for (int i = 1; i <= files.size(); i++) {
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(files.get(i)));
byte[] fileContent = new byte[bis.available()];
bis.read(fileContent);
bos.write(fileContent);
bos.flush();
bis.close();
}
bos.close();
}
}
|
[
"aplekhov@wiley.com"
] |
aplekhov@wiley.com
|
ec496264a8ed1fc88224af31c9f7d37b792ecf9f
|
ed166738e5dec46078b90f7cca13a3c19a1fd04b
|
/minor/guice-OOM-error-reproduction/src/main/java/gen/S_Gen68.java
|
c0636f868a6b4e47c2f9986a87ff1845a8323b05
|
[] |
no_license
|
michalradziwon/script
|
39efc1db45237b95288fe580357e81d6f9f84107
|
1fd5f191621d9da3daccb147d247d1323fb92429
|
refs/heads/master
| 2021-01-21T21:47:16.432732
| 2016-03-23T02:41:50
| 2016-03-23T02:41:50
| 22,663,317
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 326
|
java
|
package gen;
public class S_Gen68 {
@com.google.inject.Inject
public S_Gen68(S_Gen69 s_gen69){
System.out.println(this.getClass().getCanonicalName() + " created. " + s_gen69 );
}
@com.google.inject.Inject public void injectInterfaceWithoutImpl(gen.InterfaceWithoutImpl i){} // should expolode :)
}
|
[
"michal.radzi.won@gmail.com"
] |
michal.radzi.won@gmail.com
|
9949fbd408bcf91f505542c4d44e8ae6917408e9
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/29/29_2e71f5d9a17a6473c882a9472bf2571dc5a7442a/ModuleVCF_LP/29_2e71f5d9a17a6473c882a9472bf2571dc5a7442a_ModuleVCF_LP_s.java
|
5ef6bcc030032c907f080a90be4594288708d24a
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,288
|
java
|
package fr.istic.synthlab.abstraction.module.vcf;
import java.util.ArrayList;
import java.util.List;
import com.jsyn.unitgen.FilterLowPass;
import com.jsyn.unitgen.PassThrough;
import com.jsyn.unitgen.UnitGenerator;
import fr.istic.synthlab.abstraction.filter.FrequencyModulatorFilter;
import fr.istic.synthlab.abstraction.module.AModule;
import fr.istic.synthlab.abstraction.observer.Observer;
import fr.istic.synthlab.abstraction.port.IInputPort;
import fr.istic.synthlab.abstraction.port.IOutputPort;
import fr.istic.synthlab.abstraction.port.Port;
import fr.istic.synthlab.abstraction.wire.IWire;
import fr.istic.synthlab.factory.impl.PACFactory;
public class ModuleVCF_LP extends AModule implements IModuleVCF, Observer<Port> {
private static final String MODULE_NAME = "VCFA LP24";
private static final String IN_NAME = "Input";
private static final String IN_MOD_FREQ_NAME = "FM";
private static final String OUT_NAME = "Output";
// FM Perso
private FrequencyModulatorFilter frequencyModulator;
// PassThrough
private PassThrough passThrough;
// Input & Output du module
private IInputPort input;
private IInputPort fm;
private IOutputPort output;
// Filtres de fréquence JSyn
private FilterLowPass filterJSyn1;
private FilterLowPass filterJSyn2;
public ModuleVCF_LP() {
super(MODULE_NAME);
System.out.println("ModuleVCFA LP24 initialized");
// Création des filtres JSyn
this.filterJSyn1 = new FilterLowPass();
this.filterJSyn2 = new FilterLowPass();
// Conection des filtres JSyn
this.filterJSyn1.output.connect(this.filterJSyn2.input);
// Création du modulateur de fréquence
this.frequencyModulator = new FrequencyModulatorFilter(1000);
// Création d'un module distribuant la nouvelle fréquence
this.passThrough = new PassThrough();
// Connexion du modulateur au PassThrough
frequencyModulator.output.connect(passThrough.input);
// Création d'un port d'entrée sur le générateur perso
this.fm = PACFactory.getFactory().newInputPort(this, IN_MOD_FREQ_NAME,
frequencyModulator.input);
this.fm.addObserver(this);
// Création des ports d'entrée sur le filtre JSyn 1
this.input = PACFactory.getFactory().newInputPort(this, IN_NAME,
filterJSyn1.input);
// Création du port de sortie sur le filtre JSyn 2
this.output = PACFactory.getFactory().newOutputPort(this, OUT_NAME,
filterJSyn2.output);
// Valeur par defaut
this.setCutFrequency(1000);
this.setResonance(1);
// Set de la frequence de coupure de base
filterJSyn1.frequency.set(getCutFrequency());
filterJSyn2.frequency.set(getCutFrequency());
addPort(input);
addPort(fm);
addPort(output);
}
@Override
public List<UnitGenerator> getJSyn() {
List<UnitGenerator> generators = new ArrayList<UnitGenerator>();
generators.add(filterJSyn1);
generators.add(filterJSyn2);
generators.add(frequencyModulator);
generators.add(passThrough);
return generators;
}
@Override
public void start() {
this.filterJSyn1.start();
this.filterJSyn2.start();
this.frequencyModulator.start();
this.passThrough.start();
}
@Override
public void stop() {
this.filterJSyn1.stop();
this.filterJSyn2.stop();
this.frequencyModulator.stop();
this.passThrough.stop();
}
@Override
public void setCutFrequency(int value) {
getParameters().put("cutFrequency", (double) value);
updateFrequency();
}
@Override
public int getCutFrequency() {
return getParameter("cutFrequency").intValue();
}
@Override
public void setResonance(double value) {
getParameters().put("resonance", (double) value);
this.filterJSyn1.Q.set(value);
}
@Override
public double getResonance() {
return getParameter("resonance");
}
private void updateFrequency() {
this.frequencyModulator.setBaseFrequency(getCutFrequency());
if (!getInputFm().isInUse()) {
filterJSyn1.frequency.set(getCutFrequency());
filterJSyn2.frequency.set(getCutFrequency());
}
}
@Override
public IInputPort getInput() {
return input;
}
@Override
public IInputPort getInputFm() {
return fm;
}
@Override
public IOutputPort getOutput() {
return output;
}
@Override
public List<IWire> getWires() {
List<IWire> wires = new ArrayList<IWire>();
if (input.getWire() != null) {
if(!wires.contains(input.getWire()))
wires.add(input.getWire());
}
if (fm.getWire() != null) {
if(!wires.contains(fm.getWire()))
wires.add(fm.getWire());
}
if (output.getWire() != null) {
if(!wires.contains(output.getWire()))
wires.add(output.getWire());
}
return wires;
}
@Override
public void update(Port subject) {
// Lors d'un event sur le port d'entrée
if (subject == fm) {
// En cas de connection
if (fm.isInUse()) {
// Connect the frequency modulator to the output
passThrough.output.connect(filterJSyn1.frequency);
passThrough.output.connect(filterJSyn2.frequency);
} else {
// En cas de déconnection
passThrough.output.disconnectAll();
filterJSyn1.frequency.set(getCutFrequency());
filterJSyn2.frequency.set(getCutFrequency());
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
0af7f56413de79136a4b44300d74bafafc158198
|
b6bfba71956589aa6f56729ec9ebce824a5fb8f4
|
/src/main/java/com/javapatterns/iterator/goodexample/Client.java
|
b84855cc76f0b7f89a5cbe72927e9afa402f09ec
|
[
"Apache-2.0"
] |
permissive
|
plotor/design-pattern
|
5d78d0ef7349a2d637bea5b7270c9557820e5f60
|
4614bab50921b61610693b9b1ed06feddcee9ce6
|
refs/heads/master
| 2022-12-20T17:49:13.396939
| 2020-10-13T14:37:14
| 2020-10-13T14:37:14
| 67,619,122
| 0
| 0
|
Apache-2.0
| 2020-10-13T14:37:15
| 2016-09-07T15:21:45
|
Java
|
UTF-8
|
Java
| false
| false
| 567
|
java
|
package com.javapatterns.iterator.goodexample;
import java.util.Hashtable;
import java.util.Vector;
public class Client {
private Vector v = new Vector();
private Hashtable ht = new Hashtable();
private Display disp = new Display();
public static void main(String[] args) {
Client client = new Client();
client.test();
}
public void test() {
System.out.println("Before testing...");
disp.initList(v.elements());
disp.initList(ht.elements());
System.out.println("After testing...");
}
}
|
[
"zhenchao.wang@hotmail.com"
] |
zhenchao.wang@hotmail.com
|
bbfeaa9284d4e15dc25e8832e38776aa0ba4c646
|
2cea4b28b0a4eb1beb80ab9659f3bf9410698cf0
|
/java/All program/SerializeDemo1.java
|
375a18a7c41e77c56e1ff567b71d43e5d974bdf3
|
[] |
no_license
|
rajeshmorya/Core-java
|
e1e96b4c257ad2e854bcfe2e20b65769aef4d6c3
|
b978193bed637cbf180470b671afaf0f8fdedb79
|
refs/heads/master
| 2020-12-10T11:38:40.210108
| 2020-01-13T12:17:23
| 2020-01-13T12:17:23
| 233,583,010
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 687
|
java
|
import java.io.*;
class Dog implements Serializable
{
int i=10;
int j=20;
}
class SerializeDemo1
{
public static void main(String[] args) throws Exception
{
Dog d1 = new Dog();
System.out.println("serialization started");
FileOutputStream fos = new FileOutputStream("abc.ser");
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(d1);
System.out.println("serializable ended");
System.out.println("Deserializable started");
FileInputStream fis = new FileInputStream("abc.ser");
ObjectInputStream ois = new ObjectInputStream(fis);
Dog d2 = (Dog)ois.readObject();
System.out.println("Deserialization ended");
System.out.println(d2.i+"---------"+d2.j);
}
}
|
[
"rmorya1@gmail.com"
] |
rmorya1@gmail.com
|
8636cf5a220e88bd16f08300c40b8aff8adcf97c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_9e708df17a4f297c874de933100b11608835c575/BPermissionsAdapter/2_9e708df17a4f297c874de933100b11608835c575_BPermissionsAdapter_t.java
|
f20d32cf56bba7a893ee0b8e9e3c7b8e1368652f
|
[] |
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,312
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.bekvon.bukkit.residence.permissions;
import com.bekvon.bukkit.residence.Residence;
import java.util.List;
import org.bukkit.entity.Player;
import de.bananaco.permissions.Permissions;
/**
*
* @author Administrator
*/
public class BPermissionsAdapter implements PermissionsInterface {
Permissions bperms;
public BPermissionsAdapter(Permissions p)
{
bperms = p;
}
public String getPlayerGroup(Player player) {
return this.getPlayerGroup(player.getName(), player.getWorld().getName());
}
public String getPlayerGroup(String player, String world) {
List<String> groups = Permissions.getWorldPermissionsManager().getPermissionSet(world).getGroups(player);
PermissionManager pmanager = Residence.getPermissionManager();
for(String group : groups)
{
if(pmanager.hasGroup(group))
return group.toLowerCase();
}
if(groups.size()>0)
return groups.get(0).toLowerCase();
return null;
}
public boolean hasPermission(Player player, String permission) {
return player.hasPermission(permission);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e727e4662d22cbab7deead58b30d8faa540e567d
|
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
|
/src/br/com/mind5/masterData/cartItemCategory/dao/CaritegDaoJoinTxt.java
|
25329e3b49aeb55793c5bc33a867e9e8a2fb635f
|
[] |
no_license
|
grazianiborcai/Agenda_WS
|
4b2656716cc49a413636933665d6ad8b821394ef
|
e8815a951f76d498eb3379394a54d2aa1655f779
|
refs/heads/master
| 2023-05-24T19:39:22.215816
| 2023-05-15T15:15:15
| 2023-05-15T15:15:15
| 109,902,084
| 0
| 0
| null | 2022-06-29T19:44:56
| 2017-11-07T23:14:21
|
Java
|
UTF-8
|
Java
| false
| false
| 865
|
java
|
package br.com.mind5.masterData.cartItemCategory.dao;
import br.com.mind5.dao.DaoJoin;
import br.com.mind5.dao.DaoJoinBuilder;
import br.com.mind5.dao.DaoJoinBuilderHelper;
import br.com.mind5.dao.DaoJoinType;
import br.com.mind5.dao.common.DaoDbField;
import br.com.mind5.dao.common.DaoDbTable;
public final class CaritegDaoJoinTxt implements DaoJoinBuilder {
private final String leftTable;
public CaritegDaoJoinTxt(String leftTableName) {
leftTable = leftTableName;
}
@Override public DaoJoin build() {
DaoJoinBuilderHelper helper = new DaoJoinBuilderHelper(this.getClass());
helper.addColumn(DaoDbField.COL_COD_ITEM_CATEG);
helper.addJoinType(DaoJoinType.LEFT_OUTER_JOIN);
helper.addLeftTable(leftTable);
helper.addRightTable(DaoDbTable.CART_ITM_CATEG_TEXT_TABLE);
return helper.build();
}
}
|
[
"mmaciel@mind5.com"
] |
mmaciel@mind5.com
|
253f2e93d3856f214d1a721c606ba5896b164f11
|
763f140e2eb16bb0a640b3b0989006c575f34b9a
|
/src/main/java/pk/home/busterminal/web/jsf/security/LoginErrorPhaseListener.java
|
a1332e77b9267e54c9cf3b0b562efd95da02d2aa
|
[
"Apache-2.0"
] |
permissive
|
povloid/busterminal
|
aa6f457d431e66873247c055e416dc04a41c8862
|
3b32db26cd1855ca8e8fe72dde32be33b7d81db8
|
refs/heads/master
| 2023-03-07T21:37:39.198011
| 2021-07-20T12:04:05
| 2021-07-20T12:04:05
| 60,454,839
| 0
| 0
|
Apache-2.0
| 2023-02-22T02:05:12
| 2016-06-05T10:31:45
|
Java
|
UTF-8
|
Java
| false
| false
| 1,673
|
java
|
package pk.home.busterminal.web.jsf.security;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.web.WebAttributes;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
/**
*
* Код позаимствован у:
* User: Dmitry Leontyev
* Date: 12.12.10
* Time: 21:45
*
* доработан:
* @author povloid
*/
public final class LoginErrorPhaseListener implements PhaseListener {
/**
*
*/
private static final long serialVersionUID = 1L;
/* (non-Javadoc)
* @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
*/
@Override
public void beforePhase(final PhaseEvent arg0) {
Exception e = (Exception) FacesContext.getCurrentInstance()
.getExternalContext().getSessionMap()
.get(WebAttributes.AUTHENTICATION_EXCEPTION);
if (e instanceof BadCredentialsException) {
FacesContext.getCurrentInstance().getExternalContext()
.getSessionMap()
.put(WebAttributes.AUTHENTICATION_EXCEPTION, null);
FacesContext.getCurrentInstance().addMessage(
null,
new FacesMessage(FacesMessage.SEVERITY_ERROR,
"Username or password not valid.", null));
}
}
/* (non-Javadoc)
* @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
*/
@Override
public void afterPhase(final PhaseEvent arg0) {
}
/* (non-Javadoc)
* @see javax.faces.event.PhaseListener#getPhaseId()
*/
@Override
public PhaseId getPhaseId() {
return PhaseId.RENDER_RESPONSE;
}
}
|
[
"t34box@gmail.com"
] |
t34box@gmail.com
|
a0b7eb35d002454d0732cdca489e34b582414f2a
|
5f954c33b582f6e01c22bf56e4b131de97608211
|
/lis-commons-util/src/main/java/com/link_intersystems/util/Loop.java
|
d7550aeb2fef95b16291afb5d67972a0479a2b5f
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
link-intersystems/lis-commons
|
bb94fa9e273feaa3714eb1b2464943c00366bc30
|
8ac73983600c99699989d34d9fdb23c5d5551345
|
refs/heads/main
| 2023-07-09T20:43:30.395494
| 2023-06-16T07:24:06
| 2023-06-16T07:49:20
| 28,567,154
| 0
| 1
|
Apache-2.0
| 2023-09-03T12:32:26
| 2014-12-28T17:16:44
|
Java
|
UTF-8
|
Java
| false
| false
| 2,468
|
java
|
package com.link_intersystems.util;
/**
* A configurable implementation of a loop that can be used in main methods in order to
* execute a specific task for a number of times. E.g. like the command line util ping does.
*
* @author René Link {@literal <rene.link@link-intersystems.com>}
*/
public class Loop {
private static interface LoopImplementor {
public boolean hasNext();
default public void next() {
}
}
private static class BoundedLoopImplementor implements LoopImplementor {
private int i;
private int max;
public BoundedLoopImplementor(int max) {
this.max = max;
}
@Override
public boolean hasNext() {
return i < max;
}
@Override
public void next() {
i++;
}
}
private int maxIterations;
private int inc;
private long lagDurationMs;
public Loop() {
setMaxIterations(1);
setLagDurationMs(1000);
}
public void execute(Runnable runnable) throws InterruptedException {
LoopImplementor loopImplementor = getLoopImplementor();
while (loopImplementor.hasNext()) {
runnable.run();
loopImplementor.next();
if (loopImplementor.hasNext()) {
sleep(lagDurationMs);
}
}
}
protected LoopImplementor getLoopImplementor() {
if(inc == 0){
return () -> true;
} else {
return new BoundedLoopImplementor(maxIterations);
}
}
protected int getInc() {
return inc;
}
protected void sleep(long millis) throws InterruptedException {
Thread.sleep(millis);
}
public void setMaxIterations(int maxIterations) {
if (maxIterations < 0) {
throw new IllegalArgumentException("max must be 0 or greater");
}
this.maxIterations = maxIterations;
this.inc = 1;
}
public void setInfinite(boolean infinite) {
this.inc = infinite ? 0 : 1;
}
public void setLagDurationMs(long lagDurationMs) {
if (lagDurationMs < 0) {
throw new IllegalArgumentException("lagDurationMs must be a positive integer.");
}
this.lagDurationMs = lagDurationMs;
}
public long getLagDurationMs() {
return lagDurationMs;
}
public int getMaxIterations() {
return maxIterations;
}
}
|
[
"rene.link@link-intersystems.com"
] |
rene.link@link-intersystems.com
|
d0dd760259b1685077e632be0a1e9abc6066bfcd
|
7e713646a0619267b421aafa41a9afeeaf7a0108
|
/src/main/java/com/gdztyy/inca/controller/BmsStQtyCutPosController.java
|
e9fd09fe7af1075850c99281406dc6d400a34e6a
|
[] |
no_license
|
liutaota/ipl
|
4757e35d1100ca892f2137b690ee4b43b908dc19
|
9d53b9044ba56b6ea65f1347a779d4b66e075bea
|
refs/heads/master
| 2023-03-21T11:28:42.663574
| 2021-03-05T08:49:33
| 2021-03-05T08:49:33
| 344,747,852
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 332
|
java
|
package com.gdztyy.inca.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
/**
* <p>
* 前端控制器
* </p>
*
* @author peiqy
* @since 2020-08-18
*/
@Controller
@RequestMapping("/inca/bmsStQtyCutPos")
public class BmsStQtyCutPosController {
}
|
[
"liutao@qq.com"
] |
liutao@qq.com
|
bd1f67ec388a98c58bb254360cdff61dc69b3f3e
|
ccbbdf20d7fd3741d0edcfc3bbcfb85a2fed9a6f
|
/trunk/FacilityBookingSystem/src/servr/dispatchers/QueryAvailibilityMessageDispatcher.java
|
151da1600b5eada972fa041e034de31371a8a9e3
|
[] |
no_license
|
BGCX067/facilitybooking-svn-to-git
|
f4f68de66a52c4ff77e8e6198215763b52f3c0be
|
0e26ac4bfb4f78a14594b55e2e66e3a4d5ecc6d2
|
refs/heads/master
| 2021-01-13T00:56:29.187030
| 2015-12-28T14:21:50
| 2015-12-28T14:21:50
| 48,848,330
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,248
|
java
|
package servr.dispatchers;
import servr.ServerMain;
import servr.facilitybooking.Facility;
import servr.facilitybooking.FacilityManager;
import communication.messages.client.QueryAvailibilityMessage;
import communication.messages.server.AvailabilitiesMessage;
import communication.utils.Availability;
import communication.utils.DateTime;
public class QueryAvailibilityMessageDispatcher extends ServerDispatcher {
@Override
public void dispatch() {
ServerMain.printOnConsole("QueryAvailibilityMessageDispatcher");
QueryAvailibilityMessage message = (QueryAvailibilityMessage) getReceivedMessage();
String facilityName = message.facilityName;
DateTime day = message.day;
FacilityManager fm = FacilityManager.getFacilityManager();
Facility facility = fm.getFacilityByName(facilityName);
if(facility == null){
String errorText = "Facility " + facilityName + " does not exists." ;
sendErrorMessage(errorText);
return;
}
Availability[] availabilities = facility.getAvailabilityForDay(day);
AvailabilitiesMessage availabilitiesMsg = new AvailabilitiesMessage();
availabilitiesMsg.availabilities = availabilities;
sendReplyMessage(availabilitiesMsg);
}
}
|
[
"you@example.com"
] |
you@example.com
|
26b315adb595e42b389d07b202055e85b6dc3c5a
|
cf9b167b6d73305eb7cb37712bc70fb8b2f60175
|
/minecraft/net/minecraft/entity/item/EntityEnderEye.java
|
31d5303e8e7258c31fdef0f1c88133de1a317c2f
|
[] |
no_license
|
Capsar/Rapture
|
b1ef74dfceb005b291e695605f83839dc25d1c9e
|
b73f53f22eb1caed44e39e4a026eac5cda7b41fc
|
refs/heads/master
| 2021-06-12T20:06:53.100425
| 2020-04-09T14:13:47
| 2020-04-09T14:13:47
| 254,388,305
| 5
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,251
|
java
|
package net.minecraft.entity.item;
import net.minecraft.entity.Entity;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityEnderEye extends Entity
{
/** 'x' location the eye should float towards. */
private double targetX;
/** 'y' location the eye should float towards. */
private double targetY;
/** 'z' location the eye should float towards. */
private double targetZ;
private int despawnTimer;
private boolean shatterOrDrop;
public EntityEnderEye(World worldIn)
{
super(worldIn);
this.setSize(0.25F, 0.25F);
}
@Override
protected void entityInit() {}
/**
* Checks if the entity is in range to render by using the past in distance and comparing it to its average edge
* length * 64 * renderDistanceWeight Args: distance
*/
@Override
public boolean isInRangeToRenderDist(double distance)
{
double var3 = this.getEntityBoundingBox().getAverageEdgeLength() * 4.0D;
var3 *= 64.0D;
return distance < var3 * var3;
}
public EntityEnderEye(World worldIn, double x, double y, double z)
{
super(worldIn);
this.despawnTimer = 0;
this.setSize(0.25F, 0.25F);
this.setPosition(x, y, z);
}
public void moveTowards(BlockPos p_180465_1_)
{
double var2 = p_180465_1_.getX();
int var4 = p_180465_1_.getY();
double var5 = p_180465_1_.getZ();
double var7 = var2 - this.posX;
double var9 = var5 - this.posZ;
float var11 = MathHelper.sqrt_double(var7 * var7 + var9 * var9);
if (var11 > 12.0F)
{
this.targetX = this.posX + var7 / var11 * 12.0D;
this.targetZ = this.posZ + var9 / var11 * 12.0D;
this.targetY = this.posY + 8.0D;
}
else
{
this.targetX = var2;
this.targetY = var4;
this.targetZ = var5;
}
this.despawnTimer = 0;
this.shatterOrDrop = this.rand.nextInt(5) > 0;
}
/**
* Sets the velocity to the args. Args: x, y, z
*/
@Override
public void setVelocity(double x, double y, double z)
{
this.motionX = x;
this.motionY = y;
this.motionZ = z;
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
{
float var7 = MathHelper.sqrt_double(x * x + z * z);
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(y, var7) * 180.0D / Math.PI);
}
}
/**
* Called to update the entity's position/logic.
*/
@Override
public void onUpdate()
{
this.lastTickPosX = this.posX;
this.lastTickPosY = this.posY;
this.lastTickPosZ = this.posZ;
super.onUpdate();
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
for (this.rotationPitch = (float)(Math.atan2(this.motionY, var1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
{
;
}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
{
this.prevRotationPitch += 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
{
this.prevRotationYaw -= 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
{
this.prevRotationYaw += 360.0F;
}
this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
if (!this.worldObj.isRemote)
{
double var2 = this.targetX - this.posX;
double var4 = this.targetZ - this.posZ;
float var6 = (float)Math.sqrt(var2 * var2 + var4 * var4);
float var7 = (float)Math.atan2(var4, var2);
double var8 = var1 + (var6 - var1) * 0.0025D;
if (var6 < 1.0F)
{
var8 *= 0.8D;
this.motionY *= 0.8D;
}
this.motionX = Math.cos(var7) * var8;
this.motionZ = Math.sin(var7) * var8;
if (this.posY < this.targetY)
{
this.motionY += (1.0D - this.motionY) * 0.014999999664723873D;
}
else
{
this.motionY += (-1.0D - this.motionY) * 0.014999999664723873D;
}
}
float var10 = 0.25F;
if (this.isInWater())
{
for (int var3 = 0; var3 < 4; ++var3)
{
this.worldObj.spawnParticle(EnumParticleTypes.WATER_BUBBLE, this.posX - this.motionX * var10, this.posY - this.motionY * var10, this.posZ - this.motionZ * var10, this.motionX, this.motionY, this.motionZ, new int[0]);
}
}
else
{
this.worldObj.spawnParticle(EnumParticleTypes.PORTAL, this.posX - this.motionX * var10 + this.rand.nextDouble() * 0.6D - 0.3D, this.posY - this.motionY * var10 - 0.5D, this.posZ - this.motionZ * var10 + this.rand.nextDouble() * 0.6D - 0.3D, this.motionX, this.motionY, this.motionZ, new int[0]);
}
if (!this.worldObj.isRemote)
{
this.setPosition(this.posX, this.posY, this.posZ);
++this.despawnTimer;
if (this.despawnTimer > 80 && !this.worldObj.isRemote)
{
this.setDead();
if (this.shatterOrDrop)
{
this.worldObj.spawnEntityInWorld(new EntityItem(this.worldObj, this.posX, this.posY, this.posZ, new ItemStack(Items.ender_eye)));
}
else
{
this.worldObj.playAuxSFX(2003, new BlockPos(this), 0);
}
}
}
}
/**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/
@Override
public void writeEntityToNBT(NBTTagCompound tagCompound) {}
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
@Override
public void readEntityFromNBT(NBTTagCompound tagCompund) {}
/**
* Gets how bright this entity is.
*/
@Override
public float getBrightness(float partialTicks)
{
return 1.0F;
}
@Override
public int getBrightnessForRender(float partialTicks)
{
return 15728880;
}
/**
* If returns false, the item will not inflict any damage against entities.
*/
@Override
public boolean canAttackWithItem()
{
return false;
}
}
|
[
"capsar.meijer@gmail.com"
] |
capsar.meijer@gmail.com
|
a9ecf89c6f3dbdb989d9a4f425660c4d362fd811
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/71/org/apache/commons/math/ode/events/EventState_reinitializeBegin_149.java
|
7e12b51d248f7a163d6a411318e99a91fd8f7997
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,007
|
java
|
org apach common math od event
handl state link event handler eventhandl
event handler integr step
time integr propos step event handler
switch function check handl state
handler integr step refer
state end preced step inform
decid handler trigger event
propos step step reduc ensur
event occur bound insid step
version revis date
event state eventst
reiniti begin step
param start tstart independ time variabl
begin step
param start ystart arrai current state vector
begin step
except event except eventexcept event handler
evalu begin step
reiniti begin reinitializebegin start tstart start ystart
event except eventexcept
start tstart
handler start tstart start ystart
posit g0posit
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
a870c9fb1cdfb88f46f29a2fd8be2d2a05b9cea3
|
e923146de8154e8afc466db711a92417f87d79be
|
/src/main/java/jp/yahooapis/im/v201809/conversiontracker/ApiException.java
|
6085a207e5a28f3d2d6fa09cc240ead6221b17dd
|
[
"MIT"
] |
permissive
|
YutaFukuma/ydn-api-java-samples
|
18d2716b4c9aebc4a9deedfb48fade421c232530
|
c2568ff4781691710b55b3e9f48b889f36ae9623
|
refs/heads/master
| 2020-03-30T23:23:48.376544
| 2018-09-20T02:49:54
| 2018-09-20T02:49:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,077
|
java
|
package jp.yahooapis.im.v201809.conversiontracker;
import javax.xml.ws.WebFault;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2.9-b130926.1035
* Generated source version: 2.2
*
*/
@WebFault(name = "ApiExceptionFault", targetNamespace = "http://im.yahooapis.jp/V201809/ConversionTracker")
public class ApiException
extends Exception
{
/**
* Java type that goes as soapenv:Fault detail element.
*
*/
private String faultInfo;
/**
*
* @param faultInfo
* @param message
*/
public ApiException(String message, String faultInfo) {
super(message);
this.faultInfo = faultInfo;
}
/**
*
* @param faultInfo
* @param cause
* @param message
*/
public ApiException(String message, String faultInfo, Throwable cause) {
super(message, cause);
this.faultInfo = faultInfo;
}
/**
*
* @return
* returns fault bean: java.lang.String
*/
public String getFaultInfo() {
return faultInfo;
}
}
|
[
"yahoojp-marketingsolutions-github@mail.yahoo.co.jp"
] |
yahoojp-marketingsolutions-github@mail.yahoo.co.jp
|
6b32f26a1170d5cac58a1d735ad540bc54d5683c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/15/15_3ab4ba6b811bd733bdfa3775fdbecde36688179e/ModuleMain/15_3ab4ba6b811bd733bdfa3775fdbecde36688179e_ModuleMain_s.java
|
4c4bf8a0138cda1537e844aaa48205470bbf919c
|
[] |
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
| 4,551
|
java
|
package edu.teco.dnd.module;
import io.netty.bootstrap.ChannelFactory;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.oio.OioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.channel.socket.oio.OioDatagramChannel;
import io.netty.util.internal.logging.InternalLoggerFactory;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.Arrays;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import edu.teco.dnd.module.config.ConfigReader;
import edu.teco.dnd.module.config.JsonConfig;
import edu.teco.dnd.module.messages.infoReq.ModInfoReqMsgHandler;
import edu.teco.dnd.module.messages.infoReq.ModInfoRequestMessage;
import edu.teco.dnd.module.messages.startApp.StartAppMessage;
import edu.teco.dnd.module.messages.startApp.StartAppMessageHandler;
import edu.teco.dnd.network.PeerExchanger;
import edu.teco.dnd.network.TCPConnectionManager;
import edu.teco.dnd.network.UDPMulticastBeacon;
import edu.teco.dnd.network.logging.Log4j2LoggerFactory;
import edu.teco.dnd.network.messages.PeerMessage;
import edu.teco.dnd.util.InetSocketAddressAdapter;
import edu.teco.dnd.util.NetConnection;
/**
* The main class that is started on a Module.
*/
public class ModuleMain {
/**
* The logger for this class.
*/
private static final Logger LOGGER = LogManager.getLogger(ModuleMain.class);
/**
* Default path for config file.
*/
public static final String DEFAULT_CONFIG_PATH = "module.cfg";
public static void main(final String[] args) {
String configPath = DEFAULT_CONFIG_PATH;
if (args.length > 0) {
LOGGER.debug("argument 0 is \"{}\"", args[0]);
if (args[0].equals("--help") || args[0].equals("-h")) {
System.out.println("Parameters: [--help| $pathToConfig]");
System.out.println("\t--help: print this message");
System.out.println("\t$pathToConfig the path to the used config file.");
} else {
configPath = args[0];
}
}
ConfigReader moduleConfig = null;
try {
moduleConfig = new JsonConfig(configPath);
} catch (IOException e) {
LOGGER.fatal("could not load config", e);
System.exit(1);
}
InternalLoggerFactory.setDefaultFactory(new Log4j2LoggerFactory());
// TODO: add config options to allow selection of netty engine and number of application threads
// TODO: name threads
final NioEventLoopGroup networkEventLoopGroup = new NioEventLoopGroup();
final TCPConnectionManager connectionManager = new TCPConnectionManager(networkEventLoopGroup,
networkEventLoopGroup, new ChannelFactory<NioServerSocketChannel>() {
@Override
public NioServerSocketChannel newChannel() {
return new NioServerSocketChannel();
}
}, new ChannelFactory<NioSocketChannel>() {
@Override
public NioSocketChannel newChannel() {
return new NioSocketChannel();
}
}, moduleConfig.getUuid());
for (final InetSocketAddress address : moduleConfig.getListen()) {
connectionManager.startListening(address);
}
final UDPMulticastBeacon beacon = new UDPMulticastBeacon(new ChannelFactory<OioDatagramChannel>() {
@Override
public OioDatagramChannel newChannel() {
return new OioDatagramChannel();
}
}, new OioEventLoopGroup(), networkEventLoopGroup, moduleConfig.getUuid());
beacon.addListener(connectionManager);
final List<InetSocketAddress> announce = Arrays.asList(moduleConfig.getAnnounce());
beacon.setAnnounceAddresses(announce);
for (final NetConnection address : moduleConfig.getMulticast()) {
beacon.addAddress(address.getInterface(), address.getAddress());
}
connectionManager.addMessageType(PeerMessage.class);
connectionManager.registerTypeAdapter(InetSocketAddress.class, new InetSocketAddressAdapter());
final PeerExchanger peerExchanger = new PeerExchanger(connectionManager);
peerExchanger.addModule(moduleConfig.getUuid(), announce);
ModuleApplicationManager appMan = new ModuleApplicationManager(moduleConfig.getMaxThreadsPerApp(),
moduleConfig.getUuid(), moduleConfig, connectionManager);
// /// register msg handlers ///
connectionManager.addHandler(StartAppMessage.class, new StartAppMessageHandler(appMan));
connectionManager.addHandler(ModInfoRequestMessage.class, new ModInfoReqMsgHandler(moduleConfig, appMan));
}
// TODO: add method for shutdown
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
432d17b868a9e66a847e558c14ef68a40d9fb7d1
|
a840a5e110b71b728da5801f1f3e591f6128f30e
|
/src/main/java/com/google/security/zynamics/reil/translators/ppc/BdzflTranslator.java
|
38e2f3b484e521c2e38ee9e33c1410b08d35a458
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
tpltnt/binnavi
|
0a25d2fde2c6029aeef4fcfec8eead5c8e51f4b4
|
598c361d618b2ca964d8eb319a686846ecc43314
|
refs/heads/master
| 2022-10-20T19:38:30.080808
| 2022-07-20T13:01:37
| 2022-07-20T13:01:37
| 107,143,332
| 0
| 0
|
Apache-2.0
| 2023-08-20T11:22:53
| 2017-10-16T15:02:35
|
Java
|
UTF-8
|
Java
| false
| false
| 2,009
|
java
|
/*
Copyright 2011-2016 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.google.security.zynamics.reil.translators.ppc;
import com.google.security.zynamics.reil.ReilInstruction;
import com.google.security.zynamics.reil.translators.IInstructionTranslator;
import com.google.security.zynamics.reil.translators.ITranslationEnvironment;
import com.google.security.zynamics.reil.translators.InternalTranslationException;
import com.google.security.zynamics.reil.translators.TranslationHelpers;
import com.google.security.zynamics.zylib.disassembly.IInstruction;
import com.google.security.zynamics.zylib.disassembly.IOperandTreeNode;
import java.util.List;
public class BdzflTranslator implements IInstructionTranslator {
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction,
final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "bdzfl");
final IOperandTreeNode addressOperand =
instruction.getOperands().get(1).getRootNode().getChildren().get(0);
final IOperandTreeNode BIOperand =
instruction.getOperands().get(0).getRootNode().getChildren().get(0);
BranchGenerator.generate(instruction.getAddress().toLong() * 0x100, environment, instruction,
instructions, "bdzfl", BIOperand.getValue(), addressOperand.getValue(), true, false, true,
true, true, true);
}
}
|
[
"cblichmann@google.com"
] |
cblichmann@google.com
|
eda1d4a5fc7aecb9609ede90069d60e93291700b
|
4da9097315831c8639a8491e881ec97fdf74c603
|
/src/StockIT-v1-release_source_from_JADX/sources/com/google/android/gms/internal/ads/zzame.java
|
1ea87582b5f2e5b9f72d80e7a42f00373a87732c
|
[
"Apache-2.0"
] |
permissive
|
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
|
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
|
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
|
refs/heads/main
| 2023-08-11T06:17:05.659651
| 2021-10-01T08:48:06
| 2021-10-01T08:48:06
| 410,595,708
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 363
|
java
|
package com.google.android.gms.internal.ads;
/* compiled from: com.google.android.gms:play-services-ads@@19.4.0 */
final class zzame implements zzbad<zzaki> {
zzame() {
}
public final /* synthetic */ void zzh(Object obj) {
zzaki zzaki = (zzaki) obj;
zzaki.zza("/log", zzagx.zzdey);
zzaki.zza("/result", zzagx.zzdfg);
}
}
|
[
"57108396+atul-vyshnav@users.noreply.github.com"
] |
57108396+atul-vyshnav@users.noreply.github.com
|
29bb44610a816e5d1427139adcbd6f071094842f
|
c1d23fc2e2001c5c9a102cb5bde64059e4d33f50
|
/src/test/java/com/yaw/eshop/cucumber/stepdefs/StepDefs.java
|
2838b25a819131c806abe14ebc9be3c814231e59
|
[] |
no_license
|
Yamachar/e-shop-application
|
581557f8e2e9ad9ab07b35aca4a6b7ee721aa874
|
dc5562b10fd97a6be9895effc5f82e1a7dca58dc
|
refs/heads/master
| 2022-12-23T21:50:15.431079
| 2020-09-28T10:43:38
| 2020-09-28T10:43:38
| 299,071,585
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 174
|
java
|
package com.yaw.eshop.cucumber.stepdefs;
import org.springframework.test.web.servlet.ResultActions;
public abstract class StepDefs {
protected ResultActions actions;
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
ce8886552a18dcc953c54833a89ba183ceb6bf40
|
58e28ac435667a5bf8712212484ffdb4f349dd7b
|
/flyway-core/src/main/java/org/flywaydb/core/internal/database/sqlite/SQLiteDatabase.java
|
7825ba4b3e82e0fc8c72cc4d0257e7f3c93dd209
|
[
"Apache-2.0"
] |
permissive
|
Diffblue-benchmarks/Flyway-flyway
|
8f13529c82cf8abc3e6488b75d86efc04e8a1a95
|
5d026a1455e78dacc3f3b70bc9f7d5693f2f4805
|
refs/heads/master
| 2020-04-08T22:56:17.542038
| 2018-11-29T16:36:32
| 2018-11-29T16:36:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,289
|
java
|
/*
* Copyright 2010-2018 Boxfuse GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.flywaydb.core.internal.database.sqlite;
import org.flywaydb.core.api.configuration.Configuration;
import org.flywaydb.core.internal.database.base.Database;
import org.flywaydb.core.internal.placeholder.PlaceholderReplacer;
import org.flywaydb.core.internal.resource.ResourceProvider;
import org.flywaydb.core.internal.sqlscript.AbstractSqlStatementBuilderFactory;
import org.flywaydb.core.internal.sqlscript.SqlStatementBuilder;
import org.flywaydb.core.internal.sqlscript.SqlStatementBuilderFactory;
import java.sql.Connection;
/**
* SQLite database.
*/
public class SQLiteDatabase extends Database<SQLiteConnection> {
/**
* Creates a new instance.
*
* @param configuration The Flyway configuration.
* @param connection The connection to use.
*/
public SQLiteDatabase(Configuration configuration, Connection connection, boolean originalAutoCommit
) {
super(configuration, connection, originalAutoCommit
);
}
@Override
protected SQLiteConnection getConnection(Connection connection
) {
return new SQLiteConnection(configuration, this, connection, originalAutoCommit
);
}
@Override
public final void ensureSupported() {
ensureDatabaseIsRecentEnough("3.7.2");
}
@Override
protected SqlStatementBuilderFactory createSqlStatementBuilderFactory(PlaceholderReplacer placeholderReplacer
) {
return new SQLiteSqlStatementBuilderFactory(placeholderReplacer);
}
public String getDbName() {
return "sqlite";
}
@Override
protected String doGetCurrentUser() {
return "";
}
@Override
public boolean supportsDdlTransactions() {
return true;
}
@Override
public boolean supportsChangingCurrentSchema() {
return false;
}
@Override
public String getBooleanTrue() {
return "1";
}
@Override
public String getBooleanFalse() {
return "0";
}
@Override
public String doQuote(String identifier) {
return "\"" + identifier + "\"";
}
@Override
public boolean catalogIsSchema() {
return true;
}
@Override
public boolean useSingleConnection() {
return true;
}
private static class SQLiteSqlStatementBuilderFactory extends AbstractSqlStatementBuilderFactory {
SQLiteSqlStatementBuilderFactory(PlaceholderReplacer placeholderReplacer) {
super(placeholderReplacer);
}
@Override
public SqlStatementBuilder createSqlStatementBuilder() {
return new SQLiteSqlStatementBuilder();
}
}
}
|
[
"business@axelfontaine.com"
] |
business@axelfontaine.com
|
edea2db7a587f1bd43311bb06d6cb97838b4c54e
|
b4c47b649e6e8b5fc48eed12fbfebeead32abc08
|
/android/app/OnActivityPausedListener.java
|
bec5a37efb9ee6e78f6515c8f4bfe01ed61d9a4c
|
[] |
no_license
|
neetavarkala/miui_framework_clover
|
300a2b435330b928ac96714ca9efab507ef01533
|
2670fd5d0ddb62f5e537f3e89648d86d946bd6bc
|
refs/heads/master
| 2022-01-16T09:24:02.202222
| 2018-09-01T13:39:50
| 2018-09-01T13:39:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 360
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
package android.app;
// Referenced classes of package android.app:
// Activity
public interface OnActivityPausedListener
{
public abstract void onPaused(Activity activity);
}
|
[
"hosigumayuugi@gmail.com"
] |
hosigumayuugi@gmail.com
|
410ca2e6f7caede06fa2e11c1e988a3a1bbc8dc3
|
022980735384919a0e9084f57ea2f495b10c0d12
|
/src/ext_cttdt_ca/ext-impl/src/com/nss/portlet/partner/model/PartnerModel.java
|
b034c3bf7412ada93246c67b84622723d34bf8fa
|
[] |
no_license
|
thaond/nsscttdt
|
474d8e359f899d4ea6f48dd46ccd19bbcf34b73a
|
ae7dacc924efe578ce655ddfc455d10c953abbac
|
refs/heads/master
| 2021-01-10T03:00:24.086974
| 2011-02-19T09:18:34
| 2011-02-19T09:18:34
| 50,081,202
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,805
|
java
|
package com.nss.portlet.partner.model;
import com.liferay.portal.model.BaseModel;
import java.util.Date;
/**
* <a href="PartnerModel.java.html"><b><i>View Source</i></b></a>
*
* <p>
* ServiceBuilder generated this class. Modifications in this class will be
* overwritten the next time is generated.
* </p>
*
* <p>
* This interface is a model that represents the <code>Partner</code>
* table in the database.
* </p>
*
* @author Brian Wing Shun Chan
*
* @see com.nss.portlet.partner.model.Partner
* @see com.nss.portlet.partner.model.impl.PartnerImpl
* @see com.nss.portlet.partner.model.impl.PartnerModelImpl
*
*/
public interface PartnerModel extends BaseModel<Partner> {
public long getPrimaryKey();
public void setPrimaryKey(long pk);
public long getMaPartner();
public void setMaPartner(long maPartner);
public String getTenPartner();
public void setTenPartner(String tenPartner);
public String getUrlPartner();
public void setUrlPartner(String urlPartner);
public String getMoTaPartner();
public void setMoTaPartner(String moTaPartner);
public long getCompanyid();
public void setCompanyid(long companyid);
public long getUserid();
public void setUserid(long userid);
public Date getCreatedate();
public void setCreatedate(Date createdate);
public Date getModifieddate();
public void setModifieddate(Date modifieddate);
public int getThuTuPartner();
public void setThuTuPartner(int thuTuPartner);
public String getTarget();
public void setTarget(String target);
public int getActive();
public void setActive(int active);
public long getImageId_liferay();
public void setImageId_liferay(long imageId_liferay);
public Partner toEscapedModel();
}
|
[
"nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e"
] |
nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e
|
06eedbd1263cdf703207abe42450fccfdecda8f9
|
a82ffa9487703b15ed9af9d8e791129c24b3e6a2
|
/1.JavaSyntax/src/com/javarush/task/task07/task0711/Solution.java
|
eecb510c09bd776b67e131c8d534163fcc0737cf
|
[] |
no_license
|
dinikoff/JavaRushTasks
|
53d9b31acfdd154d847045debb410297e848ac7a
|
d7ecd4b0ec6acdb93c33301aa738138e4ce3ca8f
|
refs/heads/master
| 2020-03-20T11:16:57.260238
| 2018-10-31T19:01:27
| 2018-10-31T19:01:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 817
|
java
|
package com.javarush.task.task07.task0711;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Удалить и вставить
*/
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> list = new ArrayList<>();
for (int i = 0; i < 5; i++) {
list.add(reader.readLine());
}
String temp;
for (int i = 0; i < 13; i++) {
temp = list.get(list.size()-1);
list.remove(list.size()-1);
list.add(0, temp);
}
for (String s : list) {
System.out.println(s);
}
}
}
|
[
"zarazablin@gmail.com"
] |
zarazablin@gmail.com
|
8e47f1748491f24ec3b75d262319caeb28729768
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/game/d/m.java
|
6445552284141a2ab180ff1e051a2c937dc7185b
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,668
|
java
|
package com.tencent.mm.plugin.game.d;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.bt.a;
public final class m extends a {
public String mZV;
public final int op(int i, Object... objArr) {
AppMethodBeat.i(116993);
int f;
if (i == 0) {
e.a.a.c.a aVar = (e.a.a.c.a) objArr[0];
if (this.mZV != null) {
aVar.e(1, this.mZV);
}
AppMethodBeat.o(116993);
return 0;
} else if (i == 1) {
if (this.mZV != null) {
f = e.a.a.b.b.a.f(1, this.mZV) + 0;
} else {
f = 0;
}
AppMethodBeat.o(116993);
return f;
} else if (i == 2) {
e.a.a.a.a aVar2 = new e.a.a.a.a((byte[]) objArr[0], unknownTagHandler);
for (f = a.getNextFieldNumber(aVar2); f > 0; f = a.getNextFieldNumber(aVar2)) {
if (!super.populateBuilderWithField(aVar2, this, f)) {
aVar2.ems();
}
}
AppMethodBeat.o(116993);
return 0;
} else if (i == 3) {
e.a.a.a.a aVar3 = (e.a.a.a.a) objArr[0];
m mVar = (m) objArr[1];
switch (((Integer) objArr[2]).intValue()) {
case 1:
mVar.mZV = aVar3.BTU.readString();
AppMethodBeat.o(116993);
return 0;
default:
AppMethodBeat.o(116993);
return -1;
}
} else {
AppMethodBeat.o(116993);
return -1;
}
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
6eea0a99d2986682b13936920ab5bb3cde678d95
|
e1b266336e7c6d71d34a0c9952014d5e7330b169
|
/org.lunifera.runtime.web.common/src/org/lunifera/runtime/web/common/IWebContextRegistry.java
|
a0672f8988a724e6e3342bf1ce50ff50fa077bd6
|
[] |
no_license
|
spind42/lunifera-runtime-web
|
04910c17eef5f33ddc60fa22b0282b1524a1e1bc
|
a9e1b7413cde920097f4e0ed53e249e936d3d4ee
|
refs/heads/master
| 2021-01-22T07:48:53.247182
| 2014-05-20T16:29:31
| 2014-05-20T16:29:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,221
|
java
|
/**
* Copyright (c) 2012 Committers of lunifera.org.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Florian Pirchner - initial API and implementation
*/
package org.lunifera.runtime.web.common;
import java.util.Map;
/**
* A registry for web contexts. Web contexts are created by that service. And it
* also observes the lifecycle of them.
*/
public interface IWebContextRegistry {
/**
* Returns the count of the contained contexts.
*
* @return
*/
int size();
/**
* Creates a webcontext for the given user.
*
* @param user
* The user id.
* @param properties
* Will be passed to the context. Should only contain primitive
* types, their wrappers and java types.
* @return
*/
IWebContext createContext(String user, Map<String, Object> properties);
/**
* Returns the webcontext for the given id or <code>null</code> if no
* context is available.
*
* @param id
* @return
*/
IWebContext getContext(String id);
}
|
[
"florian.pirchner@gmail.com"
] |
florian.pirchner@gmail.com
|
a25705f75a917a4e3c0941b45576006c4cdc4faa
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2018/4/JMXManagementModule.java
|
55d8c4153a341e56633a5f4ffd53b23ca7e4cc39
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 2,546
|
java
|
/*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j 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 org.neo4j.server.enterprise.modules;
import java.lang.management.ManagementFactory;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import org.neo4j.server.NeoServer;
import org.neo4j.server.enterprise.jmx.ServerManagement;
import org.neo4j.server.modules.ServerModule;
public class JMXManagementModule implements ServerModule
{
private final NeoServer server;
public JMXManagementModule( NeoServer server )
{
this.server = server;
}
@Override
public void start()
{
try
{
ServerManagement serverManagement = new ServerManagement( server );
MBeanServer beanServer = ManagementFactory.getPlatformMBeanServer();
beanServer.registerMBean( serverManagement, createObjectName() );
}
catch ( Exception e )
{
throw new RuntimeException( "Unable to initialize jmx management, see nested exception.", e );
}
}
@Override
public void stop()
{
try
{
MBeanServer beanServer = ManagementFactory.getPlatformMBeanServer();
beanServer.unregisterMBean( createObjectName() );
}
catch ( InstanceNotFoundException e )
{
// ok
}
catch ( Exception e )
{
throw new RuntimeException( "Unable to shut down jmx management, see nested exception.", e );
}
}
private ObjectName createObjectName() throws MalformedObjectNameException
{
return new ObjectName( "org.neo4j.ServerManagement", "restartServer", "lifecycle" );
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
ce7287af1c3ab5daeee7ca597eb3d585a13ca662
|
cedcb6da09c5d4527d8d7f6d3b811c37c5e0c4fb
|
/homework8-bookservice/src/main/java/ua/edu/ukma/krukovska/bookservice/persistence/repository/BookRepository.java
|
f1c7e20110511679d7afbc23b3c74aedf51fcb57
|
[] |
no_license
|
YanaKrukovska/javaee-course
|
91673a6808ed50b726617057dd241f67ed7b9904
|
089accae1f69a8f603172186e3d106b06df181a2
|
refs/heads/master
| 2023-04-04T15:18:36.565608
| 2021-04-03T14:05:08
| 2021-04-03T14:05:08
| 340,674,976
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 669
|
java
|
package ua.edu.ukma.krukovska.bookservice.persistence.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import ua.edu.ukma.krukovska.bookservice.persistence.model.Book;
import java.util.List;
public interface BookRepository extends JpaRepository<Book, Long> {
Book findByIsbn(String isbn);
Book getById(Integer id);
@Query("SELECT b FROM Book b WHERE lower(b.title) LIKE %:q% OR lower(b.author) LIKE %:q% OR lower(b.isbn) LIKE %:q%")
List<Book> findAllWhereTitleLikeOrAuthorLikeOrIsbnLike(@Param("q") String q);
}
|
[
"jana.krua@gmail.com"
] |
jana.krua@gmail.com
|
2943062f127067da8617efb3d622dac0d7857bd4
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes5.dex_source_from_JADX/com/google/common/collect/EnumMultiset.java
|
61590db1c73600012b7bbd994038878dd8463715
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,375
|
java
|
package com.google.common.collect;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Collection;
import java.util.EnumMap;
import java.util.Set;
import javax.annotation.Nullable;
@GwtCompatible
/* compiled from: call_comment_id */
public final class EnumMultiset<E extends Enum<E>> extends AbstractMapBasedMultiset<E> {
private transient Class<E> f7302a;
public final /* bridge */ /* synthetic */ boolean addAll(Collection collection) {
return super.addAll(collection);
}
public final /* bridge */ /* synthetic */ boolean contains(@Nullable Object obj) {
return super.contains(obj);
}
public final /* bridge */ /* synthetic */ Set m13338d() {
return super.d();
}
public final /* bridge */ /* synthetic */ boolean equals(@Nullable Object obj) {
return super.equals(obj);
}
public final /* bridge */ /* synthetic */ int hashCode() {
return super.hashCode();
}
public final /* bridge */ /* synthetic */ boolean isEmpty() {
return super.isEmpty();
}
public final /* bridge */ /* synthetic */ boolean remove(@Nullable Object obj) {
return super.remove(obj);
}
public final /* bridge */ /* synthetic */ boolean removeAll(Collection collection) {
return super.removeAll(collection);
}
public final /* bridge */ /* synthetic */ boolean retainAll(Collection collection) {
return super.retainAll(collection);
}
public final /* bridge */ /* synthetic */ String toString() {
return super.toString();
}
@GwtIncompatible("java.io.ObjectOutputStream")
private void writeObject(ObjectOutputStream objectOutputStream) {
objectOutputStream.defaultWriteObject();
objectOutputStream.writeObject(this.f7302a);
Serialization.m13652a((Multiset) this, objectOutputStream);
}
@GwtIncompatible("java.io.ObjectInputStream")
private void readObject(ObjectInputStream objectInputStream) {
objectInputStream.defaultReadObject();
this.f7302a = (Class) objectInputStream.readObject();
this.a = WellBehavedMap.m13783a(new EnumMap(this.f7302a));
Serialization.m13650a((Multiset) this, objectInputStream);
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
9a773e86a2ecef1430c5a0443dcaa90e1fc66790
|
327d615dbf9e4dd902193b5cd7684dfd789a76b1
|
/base_source_from_JADX/sources/androidx/appcompat/view/menu/C0172b.java
|
620d1345bcb513208926c7529e99f7d1e7912f78
|
[] |
no_license
|
dnosauro/singcie
|
e53ce4c124cfb311e0ffafd55b58c840d462e96f
|
34d09c2e2b3497dd452246b76646b3571a18a100
|
refs/heads/main
| 2023-01-13T23:17:49.094499
| 2020-11-20T10:46:19
| 2020-11-20T10:46:19
| 314,513,307
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,142
|
java
|
package androidx.appcompat.view.menu;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.appcompat.view.menu.C0198m;
import androidx.appcompat.view.menu.C0200n;
import java.util.ArrayList;
/* renamed from: androidx.appcompat.view.menu.b */
public abstract class C0172b implements C0198m {
/* renamed from: a */
protected Context f554a;
/* renamed from: b */
protected Context f555b;
/* renamed from: c */
protected C0183g f556c;
/* renamed from: d */
protected LayoutInflater f557d;
/* renamed from: e */
protected LayoutInflater f558e;
/* renamed from: f */
protected C0200n f559f;
/* renamed from: g */
private C0198m.C0199a f560g;
/* renamed from: h */
private int f561h;
/* renamed from: i */
private int f562i;
/* renamed from: j */
private int f563j;
public C0172b(Context context, int i, int i2) {
this.f554a = context;
this.f557d = LayoutInflater.from(context);
this.f561h = i;
this.f562i = i2;
}
/* renamed from: a */
public View mo1297a(C0187i iVar, View view, ViewGroup viewGroup) {
C0200n.C0201a b = view instanceof C0200n.C0201a ? (C0200n.C0201a) view : mo1305b(viewGroup);
mo1302a(iVar, b);
return (View) b;
}
/* renamed from: a */
public C0198m.C0199a mo1298a() {
return this.f560g;
}
/* renamed from: a */
public C0200n mo1299a(ViewGroup viewGroup) {
if (this.f559f == null) {
this.f559f = (C0200n) this.f557d.inflate(this.f561h, viewGroup, false);
this.f559f.initialize(this.f556c);
updateMenuView(true);
}
return this.f559f;
}
/* renamed from: a */
public void mo1300a(int i) {
this.f563j = i;
}
/* access modifiers changed from: protected */
/* renamed from: a */
public void mo1301a(View view, int i) {
ViewGroup viewGroup = (ViewGroup) view.getParent();
if (viewGroup != null) {
viewGroup.removeView(view);
}
((ViewGroup) this.f559f).addView(view, i);
}
/* renamed from: a */
public abstract void mo1302a(C0187i iVar, C0200n.C0201a aVar);
/* renamed from: a */
public boolean mo1303a(int i, C0187i iVar) {
return true;
}
/* access modifiers changed from: protected */
/* renamed from: a */
public boolean mo1304a(ViewGroup viewGroup, int i) {
viewGroup.removeViewAt(i);
return true;
}
/* renamed from: b */
public C0200n.C0201a mo1305b(ViewGroup viewGroup) {
return (C0200n.C0201a) this.f557d.inflate(this.f562i, viewGroup, false);
}
public boolean collapseItemActionView(C0183g gVar, C0187i iVar) {
return false;
}
public boolean expandItemActionView(C0183g gVar, C0187i iVar) {
return false;
}
public boolean flagActionItems() {
return false;
}
public int getId() {
return this.f563j;
}
public void initForMenu(Context context, C0183g gVar) {
this.f555b = context;
this.f558e = LayoutInflater.from(this.f555b);
this.f556c = gVar;
}
public void onCloseMenu(C0183g gVar, boolean z) {
C0198m.C0199a aVar = this.f560g;
if (aVar != null) {
aVar.mo914a(gVar, z);
}
}
public boolean onSubMenuSelected(C0207r rVar) {
C0198m.C0199a aVar = this.f560g;
if (aVar != null) {
return aVar.mo915a(rVar);
}
return false;
}
public void setCallback(C0198m.C0199a aVar) {
this.f560g = aVar;
}
public void updateMenuView(boolean z) {
ViewGroup viewGroup = (ViewGroup) this.f559f;
if (viewGroup != null) {
C0183g gVar = this.f556c;
int i = 0;
if (gVar != null) {
gVar.flagActionItems();
ArrayList<C0187i> visibleItems = this.f556c.getVisibleItems();
int size = visibleItems.size();
int i2 = 0;
for (int i3 = 0; i3 < size; i3++) {
C0187i iVar = visibleItems.get(i3);
if (mo1303a(i2, iVar)) {
View childAt = viewGroup.getChildAt(i2);
C0187i itemData = childAt instanceof C0200n.C0201a ? ((C0200n.C0201a) childAt).getItemData() : null;
View a = mo1297a(iVar, childAt, viewGroup);
if (iVar != itemData) {
a.setPressed(false);
a.jumpDrawablesToCurrentState();
}
if (a != childAt) {
mo1301a(a, i2);
}
i2++;
}
}
i = i2;
}
while (i < viewGroup.getChildCount()) {
if (!mo1304a(viewGroup, i)) {
i++;
}
}
}
}
}
|
[
"dno_sauro@yahoo.it"
] |
dno_sauro@yahoo.it
|
6f5eec4b7745e0ed2ef01c205fbcb72607e67db8
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/67/org/apache/commons/math/distribution/ExponentialDistributionImpl_setMeanInternal_84.java
|
b6a404b24ef4f9c44f4cd318f4973543128445e1
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 741
|
java
|
org apach common math distribut
implement link exponenti distribut exponentialdistribut
version revis date
exponenti distribut impl exponentialdistributionimpl abstract continu distribut abstractcontinuousdistribut
modifi
param newmean
illeg argument except illegalargumentexcept code newmean code posit
set intern setmeanintern newmean
newmean
math runtim except mathruntimeexcept creat illeg argument except createillegalargumentexcept
local format localizedformat posit newmean
newmean
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
8df237aef432d0885941fcb6676a3cc673a26692
|
2a802b71c99a8e89885edef09a6539a38e808c2b
|
/cas-server-core-authentication/src/main/java/org/jasig/cas/authentication/SuccessfulHandlerMetaDataPopulator.java
|
6fd6f7e1b10d4b41a54ba39f24a63154e7c94453
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
permanz/cas
|
649bd90491e78d3641c49c13c5da760e462ad696
|
ece1fc2652ea1ba0bc91d2911e3d3607135242c3
|
refs/heads/master
| 2021-01-18T20:47:57.665139
| 2016-05-01T18:55:17
| 2016-05-01T18:55:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,371
|
java
|
package org.jasig.cas.authentication;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;
import java.util.HashSet;
import java.util.Set;
/**
* Sets an authentication attribute containing the collection of authentication handlers (by name) that successfully
* authenticated credential. The attribute name is given by {@link AuthenticationHandler#SUCCESSFUL_AUTHENTICATION_HANDLERS}.
* This component provides a simple method to inject successful handlers into the CAS ticket validation
* response to support level of assurance and MFA use cases.
*
* @author Marvin S. Addison
* @author Alaa Nassef
* @since 4.0.0
*/
@RefreshScope
@Component("successfulHandlerMetaDataPopulator")
public class SuccessfulHandlerMetaDataPopulator implements AuthenticationMetaDataPopulator {
@Override
public void populateAttributes(final AuthenticationBuilder builder, final Credential credential) {
Set<String> successes = builder.getSuccesses().keySet();
if (successes != null && !successes.isEmpty()) {
successes = new HashSet(successes);
}
builder.mergeAttribute(AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS, successes);
}
@Override
public boolean supports(final Credential credential) {
return true;
}
}
|
[
"mmoayyed@unicon.net"
] |
mmoayyed@unicon.net
|
8c79c46f6a152456e14e8c6e1b97281261cadb81
|
eb5f5353f49ee558e497e5caded1f60f32f536b5
|
/com/sun/management/jmx/TraceFilter.java
|
38a27634cf445dabfb1597fc9407daa78e2bce65
|
[] |
no_license
|
mohitrajvardhan17/java1.8.0_151
|
6fc53e15354d88b53bd248c260c954807d612118
|
6eeab0c0fd20be34db653f4778f8828068c50c92
|
refs/heads/master
| 2020-03-18T09:44:14.769133
| 2018-05-23T14:28:24
| 2018-05-23T14:28:24
| 134,578,186
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 781
|
java
|
package com.sun.management.jmx;
import javax.management.Notification;
import javax.management.NotificationFilter;
@Deprecated
public class TraceFilter
implements NotificationFilter
{
protected int levels;
protected int types;
public TraceFilter(int paramInt1, int paramInt2)
throws IllegalArgumentException
{
levels = paramInt1;
types = paramInt2;
}
public boolean isNotificationEnabled(Notification paramNotification)
{
return false;
}
public int getLevels()
{
return levels;
}
public int getTypes()
{
return types;
}
}
/* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\com\sun\management\jmx\TraceFilter.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 0.7.1
*/
|
[
"mohit.rajvardhan@ericsson.com"
] |
mohit.rajvardhan@ericsson.com
|
84e9833127c300872947452e1dd836e4efb476ac
|
732a6fa36e14baf7f828ef19a62b515312f9a109
|
/channels/branches/port6/trunk/src/main/java/com/mindalliance/channels/pages/components/segment/checklist/ChecklistEditorPanel.java
|
e6b06cfd4d1730f29cb5c76ad01c49346b960016
|
[] |
no_license
|
gauravbvt/test
|
4e991ad3e7dd5ea670ab88f3a74fe8a42418ec20
|
04e48c87ff5c2209fc4bc703795be3f954909c3a
|
refs/heads/master
| 2020-11-24T02:43:32.565109
| 2014-10-07T23:47:39
| 2014-10-07T23:47:39
| 100,468,202
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,815
|
java
|
package com.mindalliance.channels.pages.components.segment.checklist;
import com.mindalliance.channels.core.command.Change;
import com.mindalliance.channels.core.command.Command;
import com.mindalliance.channels.core.command.commands.UpdateObject;
import com.mindalliance.channels.core.command.commands.UpdateSegmentObject;
import com.mindalliance.channels.core.model.Identifiable;
import com.mindalliance.channels.core.model.Part;
import com.mindalliance.channels.core.model.checklist.ActionStep;
import com.mindalliance.channels.core.model.checklist.Checklist;
import com.mindalliance.channels.core.model.checklist.Step;
import com.mindalliance.channels.core.util.ChannelsUtils;
import com.mindalliance.channels.pages.Updatable;
import com.mindalliance.channels.pages.components.AbstractCommandablePanel;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.PropertyModel;
import java.util.List;
/**
* Checklist editor.
* Copyright (C) 2008-2013 Mind-Alliance Systems. All Rights Reserved.
* Proprietary and Confidential.
* User: jf
* Date: 3/26/13
* Time: 12:34 PM
*/
public class ChecklistEditorPanel extends AbstractCommandablePanel {
private String editedStepRef;
private TextField<String> actionStepText;
private WebMarkupContainer stepsContainer;
private AjaxCheckBox confirmedCheckBox;
public ChecklistEditorPanel( String id, IModel<? extends Identifiable> iModel ) {
super( id, iModel );
init();
}
private void init() {
addStepPanels();
addNewStep();
addConfirmation();
}
private void addStepPanels() {
stepsContainer = new WebMarkupContainer( "stepsContainer" );
stepsContainer.setOutputMarkupId( true );
addOrReplace( stepsContainer );
ListView<Step> stepListView = new ListView<Step>(
"steps",
getSteps()
) {
@Override
protected void populateItem( ListItem<Step> item ) {
Step step = item.getModelObject();
item.add( new ChecklistStepPanel( "step", getPart(), step, isEdited( step ), item.getIndex() ) );
}
};
stepsContainer.add( stepListView );
}
private boolean isEdited( Step step ) {
return editedStepRef != null && step.getRef().equals( editedStepRef );
}
private void addNewStep() {
WebMarkupContainer newStepContainer = new WebMarkupContainer( "newStepContainer" );
newStepContainer.setVisible( isLockedByUser( getPart() ) );
add( newStepContainer );
actionStepText = new TextField<String>(
"newStep",
new PropertyModel<String>( this, "newActionStep" ) );
actionStepText.add( new AjaxFormComponentUpdatingBehavior( "onchange" ) {
@Override
protected void onUpdate( AjaxRequestTarget target ) {
addStepPanels();
target.add( stepsContainer );
target.add( actionStepText );
update( target, new Change( Change.Type.Updated, getPart(), "checklist") );
}
} );
addTipTitle( actionStepText, "Enter a new action step and press return" );
newStepContainer.add( actionStepText );
}
private List<Step> getSteps() {
List<Step> steps = getChecklist().listEffectiveSteps();
getChecklist().sort( steps );
return steps;
}
private Checklist getChecklist() {
return getPart().getEffectiveChecklist();
}
private Part getPart() {
return (Part) getModel().getObject();
}
public String getNewActionStep() {
return "";
}
public void setNewActionStep( String val ) {
String action = ChannelsUtils.cleanUpPhrase( val );
if ( !action.isEmpty() ) {
ActionStep actionStep = new ActionStep( action );
Command command = new UpdateSegmentObject( getUsername(),
getPart(),
"checklist.actionSteps",
actionStep,
UpdateObject.Action.Add );
command.makeUndoable( false );
doCommand( command );
editedStepRef = actionStep.getRef();
}
}
private void addConfirmation() {
confirmedCheckBox = new AjaxCheckBox(
"confirmed",
new PropertyModel<Boolean>( this, "confirmed" )
) {
@Override
protected void onUpdate( AjaxRequestTarget target ) {
Change change = new Change( Change.Type.Updated, getPart() );
change.setProperty( "checklist" );
update( target, change );
}
};
confirmedCheckBox.setOutputMarkupId( true );
addOrReplace( confirmedCheckBox );
}
public boolean isConfirmed() {
return getChecklist().isConfirmed();
}
public void setConfirmed( boolean val ) {
Command command = new UpdateSegmentObject(
getUsername(),
getPart(),
"checklist.confirmed",
val,
UpdateObject.Action.Set
);
command.makeUndoable( false );
doCommand( command );
}
@Override
public void changed( Change change ) {
if ( change.isForInstanceOf( Part.class ) && change.isForProperty( "checklist" ) ) {
if ( change.isExpanded() ) // step is expanded
editedStepRef = (String) change.getQualifier( "stepRef" );
else if ( change.isCollapsed() || change.hasQualifier( "deleted-step" ) ) // step collapsed or deleted
editedStepRef = null;
else
super.changed( change );
} else {
super.changed( change );
}
}
@Override
public void updateWith( AjaxRequestTarget target, Change change, List<Updatable> updated ) {
if ( change.isForInstanceOf( Part.class ) && change.isForProperty( "checklist" ) ) {
addStepPanels();
target.add( stepsContainer );
addConfirmation();
target.add( confirmedCheckBox );
if ( !change.isExpanded() && !change.isCollapsed() ) {
super.updateWith( target, change, updated );
}
} else {
super.updateWith( target, change, updated );
}
}
}
|
[
"denis@baad322d-9929-0410-88f0-f92e8ff3e1bd"
] |
denis@baad322d-9929-0410-88f0-f92e8ff3e1bd
|
1fc6ce526764528e897e1192d4a4ce1b46f9f064
|
5fe70f7634032cb77cc57cba778d18d47a764b6c
|
/openbp-cockpit/src/main/java/org/openbp/cockpit/plugins/debugger/DebuggerServerEvent.java
|
1f4e265c3114a1ad1d19d38f3c95faf68891922a
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
cleancode1116/OpenBP
|
cab222b3e336f1c81d6bc832e3c0d53244c13746
|
460a09c2f396ed1f77add70637644d254326d350
|
refs/heads/master
| 2020-07-11T06:07:24.821569
| 2016-11-18T07:43:22
| 2016-11-18T07:43:22
| 74,003,934
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,226
|
java
|
/*
* Copyright 2007 skynamics AG
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openbp.cockpit.plugins.debugger;
import org.openbp.core.engine.debugger.DebuggerEvent;
import org.openbp.core.model.ModelQualifier;
import org.openbp.jaspira.event.JaspiraEvent;
import org.openbp.jaspira.plugin.Plugin;
/**
* Client event that wraps a debugger server event.
* The event information is contained in the server event class
* {@link org.openbp.core.engine.debugger.DebuggerEvent}<br>
* The event name is the same as defined in the
* the EngineTraceEvent class.
*
* @author Stephan Moritz
*/
public class DebuggerServerEvent extends JaspiraEvent
{
/** Basename for events */
public static final String BASE = "debugger.server.";
/** Event */
private DebuggerEvent debuggerEvent;
/**
* Constructor.
*
* @param source Source plugin
* @param debuggerEvent Debugger event from the server that initiated this event
*/
public DebuggerServerEvent(Plugin source, DebuggerEvent debuggerEvent)
{
super(source, BASE + debuggerEvent.getEventType());
this.debuggerEvent = debuggerEvent;
}
/**
* Gets the underlying debugger event.
* @nowarn
*/
public DebuggerEvent getDebuggerEvent()
{
return debuggerEvent;
}
/**
* Gets the event type.
* @return The event type class)
*/
public String getEventType()
{
return debuggerEvent.getEventType();
}
/**
* Gets the current position of halted process.
* @nowarn
*/
public ModelQualifier getHaltedPosition()
{
return debuggerEvent.getHaltedPosition();
}
/**
* Gets the exception that has occurred.
* @nowarn
*/
public Throwable getException()
{
return debuggerEvent.getException();
}
/**
* Gets the executed data link.
* @nowarn
*/
public ModelQualifier getControlLinkQualifier()
{
return debuggerEvent.getControlLinkQualifier();
}
/**
* Gets the executed control link.
* @nowarn
*/
public ModelQualifier getDataLinkQualifier()
{
return debuggerEvent.getDataLinkQualifier();
}
/**
* Gets the source node socket.
* @nowarn
*/
public ModelQualifier getSourceSocketQualifier()
{
return debuggerEvent.getSourceSocketQualifier();
}
/**
* Gets the target node socket.
* @nowarn
*/
public ModelQualifier getTargetSocketQualifier()
{
return debuggerEvent.getTargetSocketQualifier();
}
/**
* Gets the source parameter.
* @nowarn
*/
public ModelQualifier getSourceParamName()
{
return debuggerEvent.getSourceParamName();
}
/**
* Gets the source parameter member path.
* @nowarn
*/
public String getSourceMemberPath()
{
return debuggerEvent.getSourceMemberPath();
}
/**
* Gets the target parameter.
* @nowarn
*/
public ModelQualifier getTargetParamName()
{
return debuggerEvent.getTargetParamName();
}
/**
* Gets the target parameter member path.
* @nowarn
*/
public String getTargetMemberPath()
{
return debuggerEvent.getTargetMemberPath();
}
/**
* Gets the param value.
* @nowarn
*/
public Object getParamValue()
{
return debuggerEvent.getParamValue();
}
/**
* Gets the string representation of the exception that has occurred.
* This method is used if the thorwable is not able to be transfered with
* RMI.
*
* @nowarn
*/
public String getExceptionString()
{
return debuggerEvent.getExceptionString();
}
/**
* Gets the param value as string.
* @nowarn
*/
public String getParamValueString()
{
return debuggerEvent.getParamValueString();
}
}
|
[
"stephan@blackbuild.com"
] |
stephan@blackbuild.com
|
d450790e6c167cf7ea90f10b2199db82e4671a7e
|
20427549791d43914be3f305b053a10e246c0bec
|
/custom/grocery/grocerystorefront/web/src/org/grocery/storefront/renderer/CMSLinkComponentRenderer.java
|
52d3583623177f7e1db3b8ae228331d26f149add
|
[] |
no_license
|
vaibhav29gupta/hybrisGrocery
|
b5fabc5598b83d1b47cd0ab2fd063d9b9a457ae6
|
31161717714c1a4d9c3267393cfda5ec05bedb9d
|
refs/heads/main
| 2023-06-15T15:07:49.394312
| 2021-07-12T08:09:19
| 2021-07-12T08:09:19
| 385,157,883
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,768
|
java
|
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package org.grocery.storefront.renderer;
import com.sap.security.core.server.csi.XSSEncoder;
import de.hybris.platform.acceleratorcms.component.renderer.CMSComponentRenderer;
import de.hybris.platform.acceleratorstorefrontcommons.tags.Functions;
import de.hybris.platform.category.model.CategoryModel;
import de.hybris.platform.cms2.enums.LinkTargets;
import de.hybris.platform.cms2.model.contents.components.CMSLinkComponentModel;
import de.hybris.platform.commercefacades.product.data.CategoryData;
import de.hybris.platform.commercefacades.product.data.ProductData;
import de.hybris.platform.core.model.product.ProductModel;
import de.hybris.platform.servicelayer.dto.converter.Converter;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.taglibs.standard.tag.common.core.UrlSupport;
import org.owasp.html.HtmlPolicyBuilder;
import org.owasp.html.PolicyFactory;
import org.springframework.beans.factory.annotation.Required;
import static de.hybris.platform.acceleratorstorefrontcommons.tags.HTMLSanitizer.sanitizeHTML;
/**
*/
public class CMSLinkComponentRenderer implements CMSComponentRenderer<CMSLinkComponentModel>
{
private static final Logger LOG = Logger.getLogger(CMSLinkComponentRenderer.class);
protected static final PolicyFactory policy = new HtmlPolicyBuilder().allowStandardUrlProtocols()
.allowElements("a", "span")
.allowAttributes( "href", "style", "class", "title", "target", "download", "rel", "rev",
"hreflang", "type", "text", "accesskey", "contenteditable", "contextmenu", "dir", "draggable",
"dropzone", "hidden", "id", "lang", "spellcheck", "tabindex", "translate")
.onElements("a")
.allowAttributes("class")
.onElements("span")
.toFactory();
private Converter<ProductModel, ProductData> productUrlConverter;
private Converter<CategoryModel, CategoryData> categoryUrlConverter;
protected Converter<ProductModel, ProductData> getProductUrlConverter()
{
return productUrlConverter;
}
@Required
public void setProductUrlConverter(final Converter<ProductModel, ProductData> productUrlConverter)
{
this.productUrlConverter = productUrlConverter;
}
protected Converter<CategoryModel, CategoryData> getCategoryUrlConverter()
{
return categoryUrlConverter;
}
@Required
public void setCategoryUrlConverter(final Converter<CategoryModel, CategoryData> categoryUrlConverter)
{
this.categoryUrlConverter = categoryUrlConverter;
}
protected String getUrl(final CMSLinkComponentModel component)
{
// Call the function getUrlForCMSLinkComponent so that this code is only in one place
return Functions.getUrlForCMSLinkComponent(component, getProductUrlConverter(), getCategoryUrlConverter());
}
@Override
public void renderComponent(final PageContext pageContext, final CMSLinkComponentModel component) throws ServletException,
IOException
{
try
{
final String url = getUrl(component);
final String encodedUrl = UrlSupport.resolveUrl(url, null, pageContext);
final String linkName = component.getLinkName();
StringBuilder html = new StringBuilder();
if (StringUtils.isNotBlank(linkName) && StringUtils.isBlank(encodedUrl))
{
// <span class="empty-nav-item">${component.linkName}</span>
html.append("<span class=\"empty-nav-item\">");
html.append(linkName);
html.append("</span>");
}
else
{
// <a href="${encodedUrl}" ${component.styleAttributes} title="${component.linkName}"
// ${component.target == null || component.target == 'SAMEWINDOW' ? '' : 'target="_blank"'}>${component.linkName}</a>
html.append("<a href=\"");
html.append(encodedUrl);
html.append("\" ");
// Write additional attributes onto the link
if (component.getStyleAttributes() != null)
{
html.append(component.getStyleAttributes());
}
if (StringUtils.isNotBlank(linkName))
{
html.append(" title=\"");
html.append(linkName);
html.append("\" ");
}
if (component.getTarget() != null && !LinkTargets.SAMEWINDOW.equals(component.getTarget()))
{
html.append(" target=\"_blank\"");
}
html.append(">");
if (StringUtils.isNotBlank(linkName))
{
html.append(linkName);
}
html.append("</a>");
}
String sanitizedHTML = policy.sanitize(html.toString());
final JspWriter out = pageContext.getOut();
out.write(sanitizedHTML);
}
catch (final JspException e)
{
if (LOG.isDebugEnabled())
{
LOG.debug(e);
}
}
}
}
|
[
"vaibhav29gupta@gmail.com"
] |
vaibhav29gupta@gmail.com
|
d7885ae7ab1904c6c19bdd51ae59428669bb4f3c
|
0db5294cdafd3382ea7f835a6e98bfede5a73457
|
/trunk/src/UI/action/zyjk/JcjgnjAction.java
|
c7b3eb33d0d83271e0eeb45dccef7313a89acd53
|
[] |
no_license
|
BGCX262/zyjk-svn-to-git
|
a4798e09bb60446e884e0427b568643bae07e80c
|
8f1c15e5a2311ca878e90fba8595f2a1b7c9117f
|
refs/heads/master
| 2020-06-03T19:23:56.395161
| 2015-08-23T06:49:37
| 2015-08-23T06:49:37
| 41,251,930
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,293
|
java
|
/****************************************************
* <p>处理内容:</p>
* <p>Copyright: Copyright (c) 2010</p>;
* @author ;
* 改版履历;
* Rev - Date ------- Name ---------- Note -------------------
* 1.0 2013-06-08 新規作成 ;
****************************************************/
package UI.action.zyjk;
import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import st.platform.db.ConnectionManager;
import st.platform.db.DatabaseConnection;
import st.platform.db.SerialNumber;
import st.platform.utils.Config;
import st.portal.action.BasicAction;
import st.portal.action.MessageBean;
import st.portal.action.PageBean;
import worksynch.util.WriteRecordUtil;
import UI.dao.zyjk.JcjgbaxxBean;
import UI.dao.zyjk.JcjgnjglBean;
import UI.message.MisConstant;
import UI.util.BusinessDate;
@ParentPackage("struts-filter")
@Namespace("/UI/action/zyjk")
public class JcjgnjAction extends BasicAction {
private static final long serialVersionUID = 1L;
private static Logger logger = Logger.getLogger(JcjgnjAction.class);
private JcjgnjglBean jcjgnjglBean; // 返回的信息;
private String strWhere=""; // 查询条件;
private String strSysno=""; // 主键编号;
private PageBean pageBean; // 分页类;
private MessageBean messageBean;// 操作状态
private String jgbh;//机构编号
/**
*
* 查询信息 返回json信息
* @return
*/
@Action(value = "JcjgnjAction_findObjson", results = {
@Result(type = "json", name = MisConstant.FINDOBJSON, params = { "includeProperties","messageBean.*,jcjgnjglBean.*" }) })
public String findObjson() {
try {
jcjgnjglBean = new JcjgnjglBean();
if (!(messageBean.getMethod().equals("add"))) {
jcjgnjglBean = (JcjgnjglBean)findByKey(jcjgnjglBean, " where Sysno ='" + strSysno + "'");
if (jcjgnjglBean != null) {
messageBean.setCheckFlag(MisConstant.MSG_SUCCESS);
messageBean.setCheckMessage(MisConstant.MSG_OPERATE_SUCCESS);
}else{
messageBean.setCheckFlag(MisConstant.MSG_FAIL);
messageBean.setCheckMessage(MisConstant.MSG_OPERATE_FAIL);
}
}
} catch (Exception e) {;
// TODO Auto-generated catch block
// 设置错误返回的提示
logger.error(MisConstant.MSG_OPERATE_FAIL, e);
messageBean.setCheckFlag(MisConstant.MSG_FAIL);
messageBean.setCheckMessage(MisConstant.MSG_OPERATE_FAIL);
}
return MisConstant.FINDOBJSON;
}
/**
*
* 查询信息 返回jsp
* @return
*/
@Action(value = "JcjgnjAction_findByKey", results = {
@Result(name = MisConstant.FINDBYKEY, location = "/UI/zyjk/jcjg/jcjgnj/jcjgnjinfo.jsp") })
public String findByKey() {
try {
jcjgnjglBean = new JcjgnjglBean();
jcjgnjglBean.setJgbh(jgbh);
JcjgbaxxBean ba=new JcjgbaxxBean();
ba=ba.findFirst(" where sysno='"+jgbh+"'");
if(null==ba){
ba=new JcjgbaxxBean();
}
jcjgnjglBean.setJgmc(ba.getDwmc());
if (!(messageBean.getMethod().equals("add"))) {
jcjgnjglBean = (JcjgnjglBean)findByKey(jcjgnjglBean, " where Sysno ='" + strSysno + "'");
if (jcjgnjglBean != null) {
messageBean.setCheckFlag(MisConstant.MSG_SUCCESS);
messageBean.setCheckMessage(MisConstant.MSG_OPERATE_SUCCESS);
}else{
messageBean.setCheckFlag(MisConstant.MSG_FAIL);
messageBean.setCheckMessage(MisConstant.MSG_OPERATE_FAIL);
}
}
} catch (Exception e) {;
// TODO Auto-generated catch block
// 设置错误返回的提示
logger.error(MisConstant.MSG_OPERATE_FAIL, e);
messageBean.setCheckFlag(MisConstant.MSG_FAIL);
messageBean.setCheckMessage(MisConstant.MSG_OPERATE_FAIL);
}
return MisConstant.FINDBYKEY;
}
/**
*
*添加方法
* @return
*/
@Action(value = "JcjgnjAction_insert")
public String insert() {
// 打开数据库连接
ConnectionManager cm = ConnectionManager.getInstance();
DatabaseConnection dc = cm.get();
//开启事务
dc.begin();
int count=0;
try {
String number = Config.getProperty("distcode")+"-"+BusinessDate.getNoFormatToday() + "-" + SerialNumber.getNextSerialNo("67");
jcjgnjglBean.setSysno(number);
// JcjgbaxxBean ba=new JcjgbaxxBean();
// ba=ba.findFirst(" where sysno='"+jcjgnjglBean.getJgbh()+"'");
// jcjgnjglBean.setJgmc(ba.getDwmc());
messageBean = insert(jcjgnjglBean);
count=messageBean.getCheckFlag();
//进行数据同步
if(Config.getProperty("isSynch").equals("1")){
if(count==1){
WriteRecordUtil.write(jcjgnjglBean, jcjgnjglBean.getClass().getName(), "jcjgnjgl", "sysno", number, "add",cm);
}
}
} catch (Exception e) {;
// TODO Auto-generated catch block
// 设置错误返回的提示
logger.error(MisConstant.MSG_OPERATE_FAIL, e);
messageBean.setCheckFlag(MisConstant.MSG_FAIL);
messageBean.setCheckMessage(MisConstant.MSG_OPERATE_FAIL);
}finally{
if ( count > 0 ) {
dc.commit();
} else {
dc.rollback();
}
cm.release();
}
return MisConstant.RETMESSAGE;
}
/**
*
* 修改方法
* @return
*/
@Action(value = "JcjgnjAction_update")
public String update() {
//打开数据库连接
ConnectionManager cm = ConnectionManager.getInstance();
DatabaseConnection dc = cm.get();
//开启事务
dc.begin();
int count=0;
try {
messageBean = update(jcjgnjglBean, " where Sysno ='" + jcjgnjglBean.getSysno() + "'");;
count=messageBean.getCheckFlag();
//往记录表里面插入数据
if(Config.getProperty("isSynch").equals("1")){
if(count==1){
WriteRecordUtil.write(jcjgnjglBean, jcjgnjglBean.getClass().getName(), "jcjgnjgl", "sysno", jcjgnjglBean.getSysno(), "update",cm);
}
}
} catch (Exception e) {;
// TODO Auto-generated catch block
// 设置错误返回的提示
logger.error(MisConstant.MSG_OPERATE_FAIL, e);
messageBean.setCheckFlag(MisConstant.MSG_FAIL);
messageBean.setCheckMessage(MisConstant.MSG_OPERATE_FAIL);
}finally{
if ( count > 0 ) {
dc.commit();
} else {
dc.rollback();
}
cm.release();
}
return MisConstant.RETMESSAGE;
}
/**
*
* 删除改方法
* @return
*/
@Action(value = "JcjgnjAction_delete")
public String delete() {
// 打开数据库连接
ConnectionManager cm = ConnectionManager.getInstance();
DatabaseConnection dc = cm.get();
//开启事务
dc.begin();
int count=0;
try {
jcjgnjglBean = new JcjgnjglBean();
messageBean = delete(jcjgnjglBean, "where Sysno in (" + strSysno + ")");
count=messageBean.getCheckFlag();
//往记录表里面插入数据
if(Config.getProperty("isSynch").equals("1")){
if(count==1){
WriteRecordUtil.write(jcjgnjglBean, jcjgnjglBean.getClass().getName(), "jcjgnjgl", "sysno",strSysno, "delete",cm);
}
}
} catch (Exception e) {;
// TODO Auto-generated catch block
// 设置错误返回的提示
logger.error(MisConstant.MSG_OPERATE_FAIL, e);
messageBean.setCheckFlag(MisConstant.MSG_FAIL);
messageBean.setCheckMessage(MisConstant.MSG_OPERATE_FAIL);
}finally{
if ( count > 0 ) {
dc.commit();
} else {
dc.rollback();
}
cm.release();
}
return MisConstant.RETMESSAGE;
}
public JcjgnjglBean getJcjgnjglBean() {
return jcjgnjglBean;
}
public void setJcjgnjglBean(JcjgnjglBean jcjgnjglBean) {
this.jcjgnjglBean = jcjgnjglBean;
}
public MessageBean getMessageBean() {
return messageBean;
}
public void setMessageBean(MessageBean messageBean) {
this.messageBean = messageBean;
}
public PageBean getPageBean() {
return pageBean;
}
public void setPageBean(PageBean pageBean) {
this.pageBean = pageBean;
}
public String getStrSysno() {
return strSysno;
}
public void setStrSysno(String strSysno) {
this.strSysno = strSysno;
}
public String getStrWhere() {
return strWhere;
}
public void setStrWhere(String strWhere) {
this.strWhere = strWhere;
}
public String getJgbh() {
return jgbh;
}
public void setJgbh(String jgbh) {
this.jgbh = jgbh;
}
}
|
[
"you@example.com"
] |
you@example.com
|
296d46d95998c7ec248e32447fc16697cc0ed27e
|
1c4fa69c68c075af7b529447a51349ec58bae7a5
|
/Code/app/src/main/java/cn/fizzo/hub/school/utils/TimeU.java
|
e5484ea00a42e816f7c0b430c6c34be37c13ca1c
|
[] |
no_license
|
RaulFan2019/SchoolHub
|
daa3d5bda9e504144f794ca37993aa37ddc86e90
|
12d23acc61798bca6e076048cc32798547c417d0
|
refs/heads/master
| 2021-11-03T08:35:37.374144
| 2019-04-26T06:02:58
| 2019-04-26T06:02:58
| 183,540,856
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,519
|
java
|
package cn.fizzo.hub.school.utils;
import android.content.Context;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import cn.fizzo.hub.school.R;
/**
* Created by Raul.fan on 2017/7/16 0016.
*/
public class TimeU {
private static final long ONE_SECOND = 1000;
private static final long ONE_MINUTE = ONE_SECOND * 60;
private static final long ONE_HOUR = ONE_MINUTE * 60;
private static final long ONE_DAY = ONE_HOUR * 24;
public static final String FORMAT_TYPE_1 = "yyyy-MM-dd HH:mm:ss";
public static final String FORMAT_TYPE_2 = "yyyy-MM-dd HH:mm";
public static final String FORMAT_TYPE_3 = "yyyy-MM-dd";
public static final String FORMAT_TYPE_4 = "MM月dd日 HH点mm分";
public static final String FORMAT_TYPE_5 = "HH:mm:ss";
public static final String FORMAT_TYPE_6 = "yyyy.MM.dd HH:mm";
public static final String FORMAT_TYPE_7 = "HH:mm";
public static final String FORMAT_TYPE_8 = "MM.dd HH:mm";
public static final String FORMAT_TYPE_9 = "MM月dd日";
public static final String FORMAT_TYPE_10 = "MM.dd";
/**
* 获取当前时间的String(yyyy-MM-dd HH:mm:ss)
*
* @return
*/
public static String NowTime(final String format) {
SimpleDateFormat df = new SimpleDateFormat(format);// 设置日期格式
return df.format(new Date());// new Date()为获取当前系统时间
}
/**
* 将时间转换为 String 形式
*
* @param date
* @return
*/
public static String formatDateToStr(final Date date, final String format) {
SimpleDateFormat sdf = new SimpleDateFormat(format);
return sdf.format(date);
}
/**
* 转换为date格式
*
* @param timeStr
* @param format
* @return
*/
public static Date formatStrToDate(final String timeStr, final String format) {
Date date = null;
SimpleDateFormat sdf = new SimpleDateFormat(format);
try {
date = sdf.parse(timeStr);
} catch (ParseException e) {
e.printStackTrace();
}
return date;
}
/**
* 获取中文版星期
*
* @return
*/
public static String getWeekCnStr(Context context) {
Calendar c = Calendar.getInstance();
if (c.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
return context.getResources().getString(R.string.date_week_1);
}
if (c.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY) {
return context.getResources().getString(R.string.date_week_2);
}
if (c.get(Calendar.DAY_OF_WEEK) == Calendar.TUESDAY) {
return context.getResources().getString(R.string.date_week_3);
}
if (c.get(Calendar.DAY_OF_WEEK) == Calendar.WEDNESDAY) {
return context.getResources().getString(R.string.date_week_4);
}
if (c.get(Calendar.DAY_OF_WEEK) == Calendar.THURSDAY) {
return context.getResources().getString(R.string.date_week_5);
}
if (c.get(Calendar.DAY_OF_WEEK) == Calendar.FRIDAY) {
return context.getResources().getString(R.string.date_week_6);
}
if (c.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY) {
return context.getResources().getString(R.string.date_week_7);
}
return "";
}
/**
* 秒换成时
*/
public static String formatSecondsToLongHourTime(long Seconds) {
long hour = Seconds / 3600;
long min = Seconds % 3600 / 60;
long sec = Seconds % 60;
String hourstr = ((hour < 10) ? ("0" + String.valueOf(hour)) : String.valueOf(hour));
String minstr = ((min < 10) ? ("0" + String.valueOf(min)) : String.valueOf(min));
String secstr = ((sec < 10) ? ("0" + String.valueOf(sec)) : String.valueOf(sec));
return hourstr + ":" + minstr + ":" + secstr;
}
/**
* 秒换成分:秒
*/
public static String formatSecondsToShortTime(long Seconds) {
long min = Seconds / 60;
long sec = Seconds % 60;
String minstr = ((min < 10) ? ("0" + String.valueOf(min)) : String.valueOf(min));
String secstr = ((sec < 10) ? ("0" + String.valueOf(sec)) : String.valueOf(sec));
return minstr + ":" + secstr;
}
/**
* 获取锻炼记录时间信息
*
* @param startTime
* @param endTime
* @return
*/
public static String getHistoryListTimeStr(final String startTime, final String endTime) {
return formatDateToStr(formatStrToDate(startTime, FORMAT_TYPE_1), FORMAT_TYPE_8)
+ "-"
+ formatDateToStr(formatStrToDate(endTime, FORMAT_TYPE_1), FORMAT_TYPE_7);
}
/**
* 获取锻炼记录头信息
*
* @param startTime
* @param endTime
* @return
*/
public static String getHistoryTitleStr(final String startTime, final String endTime) {
return formatDateToStr(formatStrToDate(startTime, FORMAT_TYPE_1), FORMAT_TYPE_6)
+ "-"
+ formatDateToStr(formatStrToDate(endTime, FORMAT_TYPE_1), FORMAT_TYPE_7);
}
/**
* 获取delay前的日期
*
* @param delay
* @return
*/
public static String getDayByDelay(int delay) {
SimpleDateFormat df = new SimpleDateFormat(FORMAT_TYPE_3);// 设置日期格式
Calendar ca = Calendar.getInstance();//得到一个Calendar的实例
ca.setTime(new Date()); //设置时间为当前时间
ca.add(Calendar.DATE, -delay); // 减delay
Date lastDate = ca.getTime(); //结果
return df.format(lastDate);
}
/**
* 获取delay week前的日期
*
* @param delay
* @return
*/
public static String getWeekByDelay(int delay) {
SimpleDateFormat df = new SimpleDateFormat(FORMAT_TYPE_3);// 设置日期格式
Calendar ca = Calendar.getInstance();//得到一个Calendar的实例
ca.setTime(new Date()); //设置时间为当前时间
ca.add(Calendar.WEEK_OF_YEAR, -delay); // 减delay
ca.set(Calendar.DAY_OF_WEEK, 1);
Date lastDate = ca.getTime(); //结果
return df.format(lastDate);
}
/**
* 获取delay month前的日期
*
* @param delay
* @return
*/
public static String getMonthByDelay(int delay) {
SimpleDateFormat df = new SimpleDateFormat(FORMAT_TYPE_3);// 设置日期格式
Calendar ca = Calendar.getInstance();//得到一个Calendar的实例
ca.setTime(new Date()); //设置时间为当前时间
ca.add(Calendar.MONTH, -delay); // 减delay
ca.set(Calendar.DAY_OF_MONTH, 1);
Date lastDate = ca.getTime(); //结果
return df.format(lastDate);
}
/**
* 获取2个起始时间之间的时间差
* "yyyy-MM-dd HH:mm:ss"
*
* @param beginTimeStr
* @param endTimeStr
* @return 秒
*/
public static long getTimeDiff(final String beginTimeStr, final String endTimeStr, final String format) {
SimpleDateFormat myFormatter = new SimpleDateFormat(format);
long time = 0;
try {
Date beginDate = myFormatter.parse(beginTimeStr);
Date endDate = myFormatter.parse(endTimeStr);
time = (beginDate.getTime() - endDate.getTime()) / 1000;
} catch (Exception e) {
return time;
}
return time;
}
/**
* 获取与现在的时间差
* "yyyy-MM-dd HH:mm:ss"
*
* @param beginTimeStr
* @return 秒
*/
public static long getTimeDiffWithNow(final String beginTimeStr, final String format) {
SimpleDateFormat myFormatter = new SimpleDateFormat(format);
long time = 0;
try {
Date beginDate = myFormatter.parse(beginTimeStr);
time = (System.currentTimeMillis() - beginDate.getTime()) / 1000;
} catch (Exception e) {
return time;
}
return time;
}
/**
* 秒换算成配速格式
*
* @return
*/
public static String formatSecondsToLessonDuration(long Seconds) {
long min = Seconds / 60;
long sec = Seconds % 60;
String minstr = ((min < 10) ? ("0" + String.valueOf(min)) : String.valueOf(min));
String secstr = ((sec < 10) ? ("0" + String.valueOf(sec)) : String.valueOf(sec));
return minstr + ":" + secstr;
}
}
|
[
"raul.fan@fizzo.cn"
] |
raul.fan@fizzo.cn
|
4cb7f2a927b769a0ce3663b68cc822ee89f55457
|
eac1623ac04e9cbfe5affd4314f1b1fa30c1e202
|
/base/src/main/java/app/zingo/employeemanagements/WebApi/MultpleAPI.java
|
98d2e74e8856efc9b9d4f9ca451e84a869af1a9f
|
[] |
no_license
|
ingeinfinite/EmployeeManagement
|
024bd892776b27e20b6c9ac202ab8a1be8e7da09
|
743c20aae6eef07d8ee10ee6f9011d1dced004c1
|
refs/heads/master
| 2022-01-18T07:28:19.183520
| 2019-08-05T05:21:49
| 2019-08-05T05:21:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,415
|
java
|
package app.zingo.employeemanagements.WebApi;
import java.util.ArrayList;
import app.zingo.employeemanagements.Model.Expenses;
import app.zingo.employeemanagements.Model.LiveTracking;
import app.zingo.employeemanagements.Model.LoginDetails;
import app.zingo.employeemanagements.Model.Meetings;
import app.zingo.employeemanagements.Model.Tasks;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import rx.Observable;
public interface MultpleAPI {
@POST("LoginDetails/GetLoginDetailsByEmployeeIdAndLoginDate")
Observable<ArrayList<LoginDetails>> getLoginByEmployeeIdAndDate(@Body LoginDetails details);
@POST("LiveTrackingDetailsAsync/GetliveTrackingDetailsByEmployeeIdAndDate")
Observable<ArrayList<LiveTracking>> getLiveTrackingByEmployeeIdAndDate(@Body LiveTracking details);
@POST("Meetings/GetMeetingsDetailsByEmployeeIdAndLoginDate")
Observable<ArrayList<Meetings>> getMeetingsByEmployeeIdAndDate(@Body Meetings details);
@GET("Tasks/GetTasksByEmployeeId/{EmployeeId}")
Observable<ArrayList<Tasks>> getTasksByEmployeeId(@Path("EmployeeId") int EmployeeId);
@GET("Expenses/GetExpensesByOrganizationIdAndEmployeeId/{OrganizationId}/{EmployeeId}")
Observable<ArrayList<Expenses>> getExpenseByEmployeeIdAndOrganizationId(@Path("OrganizationId") int OrganizationId, @Path("EmployeeId") int EmployeeId);
}
|
[
"nishar@zingohotels.com"
] |
nishar@zingohotels.com
|
e43ee2fc5153912fe020fe438e59931aa53308d3
|
1ee9c4fe14f108d1c57ac5bee23737cf55446df2
|
/java-se/java8/src/main/java/com/j8/lambda/LoopTest.java
|
30f92741dc173dbe8d47068592160ffe96ec8da6
|
[] |
no_license
|
xinxiamu/MuStudy
|
8c50c10b80f8454dcacf367b707faf7148e3ed30
|
928e95f6b1ee82bd957424132e75728ec1be64a4
|
refs/heads/master
| 2022-07-23T23:59:55.725214
| 2019-05-03T15:08:13
| 2019-05-03T15:08:13
| 87,512,690
| 0
| 4
| null | 2022-07-01T20:50:51
| 2017-04-07T06:28:59
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,556
|
java
|
package com.j8.lambda;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* 测试数组遍历。
*
* @author Administrator
*
*/
public class LoopTest {
public static void main(String[] args) {
List<String> list = Arrays.asList("a", "b", "c", "d", "e", "f");
// 两种输出方式,各自优势并不明显
list.forEach(s -> print(s)); // lambda表达式,按顺序输出
System.out.println();
for (String string : list) {
System.out.print(string + ",");
}
// 用流输出
System.out.println();
list.stream().forEach(s -> print(s)); // 按顺序输出
System.out.println();
list.parallelStream().forEach(s -> print(s));// 不按顺序输出,并发的,提高遍历性能,在不要求顺序的场景中选用。
System.out.println();
//测试速度
// List<String> list2 = new ArrayList<>();
// for (int i = 0; i < 50000; i++) { //改为10万再测试,并发遍历反而慢
// list2.add("a" + i);
// }
// long a = System.currentTimeMillis();
// list2.forEach(s -> System.out.print(s));
// System.out.println();
// System.out.println("diff:" + (System.currentTimeMillis() - a));
//大数据量速度反而慢
// System.out.println();
// long b = System.currentTimeMillis();
// list2.parallelStream().forEach(s -> System.out.print(s));
// System.out.println();
// System.out.println("diff2:" + (System.currentTimeMillis() - b));
}
public static void print(String s) {
System.out.print(s + ",");
}
}
|
[
"932852117@qq.com"
] |
932852117@qq.com
|
353db8f8a546ebc746ba63e8ca17d37c37362cf0
|
0c28a12d3efa7ef425a8dd8f829b6521e0c8f6f5
|
/src/results/bugged/Dataset3/1455.txt
|
0e0f9f02a6077df8dff35f203b5e4a7534aaf718
|
[
"Apache-2.0"
] |
permissive
|
bsse1017kavi/Dissection-of-CodeRep
|
8408b80be8104f3642a99ee50deca5b2d9914524
|
a4b09622e1082e2df9683f549f2e26351a440b1a
|
refs/heads/master
| 2022-01-15T11:29:16.391603
| 2019-07-06T09:25:11
| 2019-07-06T09:25:11
| 195,090,051
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,565
|
txt
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.as.weld.deployment.processors;
import org.jboss.as.ee.component.ComponentConfiguration;
import org.jboss.as.ee.component.ComponentConfigurator;
import org.jboss.as.ee.component.ComponentDescription;
import org.jboss.as.ee.component.DependencyConfigurator;
import org.jboss.as.ee.component.EEModuleClassConfiguration;
import org.jboss.as.ee.component.EEModuleConfiguration;
import org.jboss.as.ee.component.EEModuleDescription;
import org.jboss.as.ee.component.InterceptorDescription;
import org.jboss.as.ejb3.component.session.SessionBeanComponentDescription;
import org.jboss.as.server.deployment.Attachments;
import org.jboss.as.server.deployment.DeploymentPhaseContext;
import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
import org.jboss.as.server.deployment.DeploymentUnitProcessor;
import org.jboss.as.weld.WeldDeploymentMarker;
import org.jboss.as.weld.injection.WeldInjectionInterceptor;
import org.jboss.as.weld.injection.WeldManagedReferenceFactory;
import org.jboss.as.weld.services.BeanManagerService;
import org.jboss.modules.ModuleClassLoader;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceName;
import org.jboss.msc.service.ServiceTarget;
import org.jboss.weld.manager.BeanManagerImpl;
import java.util.HashSet;
import java.util.Set;
/**
* Deployment unit processor that add the {@link org.jboss.as.weld.injection.WeldManagedReferenceFactory} instantiator
* to components that are part of a bean archive.
*
* @author Stuart Douglas
*/
public class WeldComponentIntegrationProcessor implements DeploymentUnitProcessor {
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!WeldDeploymentMarker.isWeldDeployment(deploymentUnit)) {
return;
}
final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);
final ServiceName beanManagerServiceName = BeanManagerService.serviceName(deploymentUnit);
for (ComponentDescription component : eeModuleDescription.getComponentDescriptions()) {
final String beanName;
if (component instanceof SessionBeanComponentDescription) {
beanName = component.getComponentName();
} else {
beanName = null;
}
component.getConfigurators().addFirst(new ComponentConfigurator() {
@Override
public void configure(final DeploymentPhaseContext context, final ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
final Class<?> componentClass = configuration.getModuleClassConfiguration().getModuleClass();
final EEModuleConfiguration module = configuration.getModuleClassConfiguration().getModuleConfiguration();
final ModuleClassLoader classLoader = deploymentUnit.getAttachment(Attachments.MODULE).getClassLoader();
//get the interceptors so they can be injected as well
final Set<Class<?>> interceptorClasses = new HashSet<Class<?>>();
for (InterceptorDescription interceptorDescription : description.getAllInterceptors().values()) {
EEModuleClassConfiguration clazz = module.getClassConfiguration(interceptorDescription.getInterceptorClassName());
if (clazz != null) {
interceptorClasses.add(clazz.getModuleClass());
}
}
addWeldInstantiator(context.getServiceTarget(), configuration, componentClass, beanName, deploymentUnit.getServiceName(), beanManagerServiceName, interceptorClasses, classLoader);
configuration.getPostConstructInterceptors().addLast(new WeldInjectionInterceptor.Factory(configuration, interceptorClasses));
}
});
}
}
/**
* As the weld based instantiator needs access to the bean manager it is installed as a service.
*/
private void addWeldInstantiator(final ServiceTarget target, final ComponentConfiguration configuration, final Class<?> componentClass, final String beanName, final ServiceName deploymentServiceName, final ServiceName beanManagerServiceName, final Set<Class<?>> interceptorClasses, final ClassLoader classLoader) {
final ServiceName serviceName = configuration.getComponentDescription().getServiceName().append("WeldInstantiator");
final WeldManagedReferenceFactory factory = new WeldManagedReferenceFactory(componentClass, beanName, interceptorClasses, classLoader);
target.addService(serviceName, factory)
.addDependency(beanManagerServiceName, BeanManagerImpl.class, factory.getBeanManager())
.install();
configuration.setInstanceFactory(factory);
configuration.getStartDependencies().add(new DependencyConfigurator() {
@Override
public void configureDependency(final ServiceBuilder<?> serviceBuilder) throws DeploymentUnitProcessingException {
serviceBuilder.addDependency(serviceName);
}
});
}
@Override
public void undeploy(DeploymentUnit context) {
}
}
|
[
"bsse1017@iit.du.ac.bd"
] |
bsse1017@iit.du.ac.bd
|
e80857e6da556ddc150631efb3429f54adc4d7c2
|
e9045e5fa2457a301fa0401d040b0aafb218f9ad
|
/src/edu/stanford/smi/protegex/owl/inference/dig/exception/DIGErrorException.java
|
65e2eb3d3dc4ddb001686d65383cfea8d77b4f5c
|
[] |
no_license
|
ubbdst/protege-owl-plugin
|
8441c5b3c04b37d6e76227c206a4ce9953d65992
|
55bf58bbeea18349581aae8883da25587b0adb6a
|
refs/heads/master
| 2021-06-05T11:38:14.123125
| 2019-04-03T10:59:21
| 2019-04-03T10:59:21
| 83,047,190
| 1
| 0
| null | 2019-04-03T10:47:48
| 2017-02-24T14:04:41
|
Java
|
UTF-8
|
Java
| false
| false
| 2,704
|
java
|
/*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
*
* The Original Code is Protege-2000.
*
* The Initial Developer of the Original Code is Stanford University. Portions
* created by Stanford University are Copyright (C) 2007. All Rights Reserved.
*
* Protege was developed by Stanford Medical Informatics
* (http://www.smi.stanford.edu) at the Stanford University School of Medicine
* with support from the National Library of Medicine, the National Science
* Foundation, and the Defense Advanced Research Projects Agency. Current
* information about Protege can be obtained at http://protege.stanford.edu.
*
*/
package edu.stanford.smi.protegex.owl.inference.dig.exception;
import java.util.ArrayList;
import java.util.Collection;
/**
* User: matthewhorridge<br>
* The Univeristy Of Manchester<br>
* Medical Informatics Group<br>
* Date: Jun 14, 2004<br><br>
* <p/>
* matthew.horridge@cs.man.ac.uk<br>
* www.cs.man.ac.uk/~horridgm<br><br>
*/
public class DIGErrorException extends DIGReasonerException {
private ArrayList errorList;
public DIGErrorException(ArrayList errorList) {
super(((DIGError) (errorList.get(0))).getMessage());
this.errorList = errorList;
}
/**
* Gets the exception code associated with this
* DIGErrorException
*
* @return An integer exception code.
*/
public int getErrorCode(int index) {
return ((DIGError) errorList.get(index)).getErrorCode();
}
/**
* Gets the exception message of the specified
* exception.
*
* @param index The index of the exception
* @return The exception message
*/
public String getMessage(int index) {
return ((DIGError) errorList.get(index)).getMessage();
}
/**
* Gets the <code>DIGError</code> object
* associated with this exception.
*/
public DIGError getDIGError(int index) {
return (DIGError) errorList.get(index);
}
/**
* Gets the number of DIGErrors
*/
public int getNumberOfErrors() {
return errorList.size();
}
public Collection getErrors() {
return errorList;
}
}
|
[
"hru066@ubbhf0225453.klientdrift.uib.no"
] |
hru066@ubbhf0225453.klientdrift.uib.no
|
6f7a1a52858f56d2a195f52115dff170baa5d122
|
ff0d01ff79c0384f5054898492a5a0e8ce61409e
|
/app/src/main/java/com/dq/liuhe/adapter/order/OrderGoodsAdapter.java
|
13daefd96dfcc7b738fa1a8b2134d14b0227b0f7
|
[] |
no_license
|
jingangdan/DQLiuHe
|
4fecbe787b71c94c67d9de3c14d601c8f3358377
|
f98c942b06ee1f3eb449be8f5d65428b74cfdf80
|
refs/heads/master
| 2020-03-06T15:43:03.763129
| 2018-04-05T02:37:52
| 2018-04-05T02:37:52
| 125,683,837
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,381
|
java
|
package com.dq.liuhe.adapter.order;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.dq.liuhe.R;
import com.dq.liuhe.bean.order.Order;
import com.dq.liuhe.utils.BaseRecyclerViewHolder;
import com.dq.liuhe.utils.HttpPath;
import java.util.List;
/**
* 商品列表(订单列表下)
* Created by jingang on 2018/1/20.
*/
public class OrderGoodsAdapter extends RecyclerView.Adapter<OrderGoodsAdapter.MyViewHolder> {
private Context mContext;
private List<Order.DataBean.GoodslistBean> goodsList;
// private OnItemClickListener onItemClickListener;
public OrderGoodsAdapter(Context mContext, List<Order.DataBean.GoodslistBean> goodsList) {
this.mContext = mContext;
this.goodsList = goodsList;
}
// public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
// this.onItemClickListener = onItemClickListener;
// }
@Override
public MyViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
MyViewHolder vh = new MyViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_order_goods, viewGroup, false));
return vh;
}
@Override
public void onBindViewHolder(final MyViewHolder holder, int positon) {
// if (onItemClickListener != null) {
// holder.itemView.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// int position = holder.getLayoutPosition(); // 1
// onItemClickListener.onItemClick(holder.itemView, position); // 2
// }
// });
// }
// ImageUtils.loadIntoUseFitWidths(mContext,
// HttpPath.IMG_HEADER + goodsList.get(positon).getThumb(),
// R.mipmap.icon_empty002,
// R.mipmap.icon_error002,
// holder.img);
Glide.with(mContext)
.load(HttpPath.IMG_HEADER + goodsList.get(positon).getThumb())
.asBitmap()
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.into(holder.img);
holder.goodsname.setText("" + goodsList.get(positon).getGoodsname());
holder.optionname.setText("" + goodsList.get(positon).getOptionname());
holder.price.setText("¥" + goodsList.get(positon).getPrice());
holder.count.setText("" + goodsList.get(positon).getCount());
}
@Override
public int getItemCount() {
return goodsList.size();
}
public class MyViewHolder extends BaseRecyclerViewHolder {
ImageView img;
TextView goodsname;
TextView optionname;
TextView price;
TextView count;
public MyViewHolder(View view) {
super(view);
img = view.findViewById(R.id.iv_order_img);
goodsname = view.findViewById(R.id.tv_order_goodsname);
optionname = view.findViewById(R.id.tv_order_optionname);
price = view.findViewById(R.id.tv_order_price);
count = view.findViewById(R.id.tv_order_count);
}
}
}
|
[
"acaijingang@163.com"
] |
acaijingang@163.com
|
a292b022da5e65b2044cb292628ffa1fd98e246d
|
9272784a4043bb74a70559016f5ee09b0363f9d3
|
/modules/xiaomai-admin/src/main/java/com/antiphon/xiaomai/apps/action/web/hotel/HotelOrderController.java
|
0aecc2e5547b41547f74cad2dc4445a3f4bf78f9
|
[] |
no_license
|
sky8866/test
|
dd36dad7e15a5d878e599119c87c1b50bd1f2b93
|
93e1826846d83a5a1d25f069dadd169a747151af
|
refs/heads/master
| 2021-01-20T09:27:12.080227
| 2017-08-29T09:33:19
| 2017-08-29T09:33:19
| 101,595,198
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 736
|
java
|
package com.antiphon.xiaomai.apps.action.web.hotel;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping(value = "/admin/hotel/order")
public class HotelOrderController {
private final static String BASE_PATH = "hotel/";
@RequestMapping(value = "")
public String room(String active,String page,HttpServletRequest request) {
request.setAttribute("hotel_active", "active");
request.setAttribute("hotel_order_active" , "active");
request.setAttribute("page", page);
return BASE_PATH+"order";
}
}
|
[
"286549429@qq.com"
] |
286549429@qq.com
|
0a8e00b52b0f075c234b9f9373c2574bbe00f766
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/p280ss/android/ugc/aweme/following/repository/C29607i.java
|
ba61376e77fe33d18d4f4f860d09e06da346dcbc
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 940
|
java
|
package com.p280ss.android.ugc.aweme.following.repository;
import com.bytedance.jedi.arch.ext.list.C11583n;
import kotlin.jvm.internal.C7571f;
/* renamed from: com.ss.android.ugc.aweme.following.repository.i */
public final class C29607i extends C11583n {
/* renamed from: c */
public final long f77976c;
/* renamed from: d */
public final boolean f77977d;
/* renamed from: e */
public final int f77978e;
/* renamed from: f */
public final int f77979f;
public C29607i() {
this(false, 0, 0, false, 0, 0, 63, null);
}
public C29607i(boolean z, int i, long j, boolean z2, int i2, int i3) {
super(z, i);
this.f77976c = j;
this.f77977d = z2;
this.f77978e = i2;
this.f77979f = i3;
}
public /* synthetic */ C29607i(boolean z, int i, long j, boolean z2, int i2, int i3, int i4, C7571f fVar) {
this(true, 0, 0, true, 0, 0);
}
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
1533530d9f8cfb1cd585e31995193c46b9f9032f
|
2b9d67094c04abc644676bc8a9b4a9e58bb54a4d
|
/biz/src/main/java/com/abbcc/dao/impl/SoaTemplateCriteriaDAOImpl.java
|
18fa751592996b2a2860560fbbb2092e367b1dfd
|
[
"Apache-2.0"
] |
permissive
|
baowp/platform
|
a1293443232171134f0efab1fada0d8520fe2940
|
74e99bba08b88c6287ad2a79f1075909acec2c38
|
refs/heads/master
| 2016-09-06T14:42:28.061967
| 2014-04-29T03:47:29
| 2014-04-29T03:47:29
| 19,027,584
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 713
|
java
|
/**
* Copyright (c) 2010 Abbcc Corp.
* No 225,Wen Yi RD, Hang Zhou, Zhe Jiang, China.
* All rights reserved.
*
* "SoaTemplateCriteriaDAOImpl.java is the copyrighted,
* proprietary property of Abbcc Company and its
* subsidiaries and affiliates which retain all right, title and interest
* therein."
*
* Revision History
*
* Date Programmer Notes
* --------- --------------------- --------------------------------------------
* 2010-4-23 baowp initial
*/
package com.abbcc.dao.impl;
import com.abbcc.dao.SoaTemplateCriteriaDAO;
public class SoaTemplateCriteriaDAOImpl extends BaseDAOImpl implements
SoaTemplateCriteriaDAO {
}
|
[
"122515909@qq.com"
] |
122515909@qq.com
|
0650618928f885b2c423a61be44657ff3a993e22
|
a1780458ec351ac03e1d77f4425c4cdbba38f013
|
/dbflute-jdk15-runtime/src/main/java/org/seasar/dbflute/twowaysql/exception/IfCommentWrongExpressionException.java
|
9d95d198059e0fcfeafecc35e566c3f297b9cecc
|
[
"Apache-2.0"
] |
permissive
|
seasarorg/dbflute-jdk15
|
4ed513486277c5f79ed2de5ff4a6eeeaaf84e0ff
|
ee920d7580d89725ded68c958b6788da0d574bd2
|
refs/heads/master
| 2018-12-28T05:27:19.388357
| 2014-01-18T11:49:23
| 2014-01-18T11:49:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,399
|
java
|
/*
* Copyright 2004-2011 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.dbflute.twowaysql.exception;
/**
* The exception of when the IF comment has a wrong expression about outsideSql.
* @author jflute
*/
public class IfCommentWrongExpressionException extends RuntimeException {
/** Serial version UID. (Default) */
private static final long serialVersionUID = 1L;
/**
* Constructor.
* @param msg Exception message. (NotNull)
*/
public IfCommentWrongExpressionException(String msg) {
super(msg);
}
/**
* Constructor.
* @param msg Exception message. (NotNull)
* @param cause Throwable. (NotNull)
*/
public IfCommentWrongExpressionException(String msg, Throwable cause) {
super(msg, cause);
}
}
|
[
"dbflute@gmail.com"
] |
dbflute@gmail.com
|
95189eb451915a0fafd3ba2430e93789137a8988
|
a57412ca109a48480e32c8a8117e436b4ece8f6b
|
/app/src/main/java/com/two/emergencylending/controller/LogoutController.java
|
996acbdb9c6b62a09d201342073fed3fb87643c3
|
[] |
no_license
|
wangyin8866/Comemergencylending_jjt
|
3e82aa54a6ccefe64b1041fb064f9673e1b579d5
|
f20e608f298e7c8047b41a20ce70870dd9b7b0ee
|
refs/heads/master
| 2021-08-27T20:21:52.600715
| 2017-11-28T07:09:39
| 2017-11-28T07:09:39
| 104,042,325
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,912
|
java
|
package com.two.emergencylending.controller;
import android.app.Activity;
import com.two.emergencylending.application.IApplication;
import com.two.emergencylending.constant.ErrorCode;
import com.two.emergencylending.constant.NetContants;
import com.two.emergencylending.constant.SPKey;
import com.two.emergencylending.http.OKManager;
import com.two.emergencylending.utils.CommonUtils;
import com.two.emergencylending.utils.LogUtil;
import com.two.emergencylending.utils.SharedPreferencesUtil;
import com.two.emergencylending.utils.ToastAlone;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import okhttp3.Call;
/**
* Created by User on 2016/8/22.
*/
public class LogoutController {
private Activity mActivity;
private Map parameter;
private IControllerCallBack controller;
private String msg="";
public LogoutController(Activity activity,IControllerCallBack controller) {
this.mActivity = activity;
this.controller = controller;
}
public void loginout() {
if (!CommonUtils.isNetAvailable()) return;
parameter = new HashMap();
parameter.clear();
parameter.put("juid", SharedPreferencesUtil.getInstance(IApplication.globleContext).getString(SPKey.JUID));
parameter.put("login_token", SharedPreferencesUtil.getInstance(IApplication.globleContext).getString(SPKey.LOGIN_TOKEN));
LogUtil.d("Request", parameter.toString());
OKManager.getInstance().sendComplexForm(NetContants.LOGINOUT, parameter, new OKManager.Func1() {
@Override
public void onResponse(String result) {
String response = result.toString().trim();
LogUtil.d("Logout", response);
JSONObject jsonObject = null;
try {
jsonObject = new JSONObject(response);
String flag = jsonObject.optString("flag");
msg = jsonObject.optString("msg");
if (flag.equals(ErrorCode.SUCCESS)) {
// IApplication.getInstance().clearUserInfo(mActivity);
// IApplication.isToHome = true;
// mActivity.finish();
} else if (flag.equals(ErrorCode.EQUIPMENT_KICKED_OUT)) {
IApplication.getInstance().backToLogin(mActivity);
}else {
}
} catch (JSONException e) {
ToastAlone.showLongToast(mActivity,ErrorCode.FAIL_DATA);
e.printStackTrace();
}
}
@Override
public void onFailure(Call call, IOException e) {
ToastAlone.showLongToast(mActivity,ErrorCode.FAIL_NETWORK);
e.printStackTrace();
}
});
}
}
|
[
"wangyin@chinazyjr.com"
] |
wangyin@chinazyjr.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.