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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26c4536817a29f24557c167b752489b936397a6a
|
1883c4b65baac8b6da19944379149eda66ab11a0
|
/SCM/xcf-scm-runtime/src/main/java/com/forte/runtime/pagination/Dialect.java
|
2e38cbcd7f03852a0d7510f517898031a8584d37
|
[] |
no_license
|
cqxcftest-ca3a2-9e97e/testgit-AAAAB3NzaC1yc2EAAAADAQABAAABAQC7
|
f47e85ee440b3574c100291b08bcdbe5df9cf33b
|
bbbae4e48f71086974cefde5ce8a03dd62b26a9e
|
refs/heads/master
| 2021-07-17T22:08:29.049397
| 2017-10-26T00:39:05
| 2017-10-26T00:39:05
| 106,354,188
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 260
|
java
|
package com.forte.runtime.pagination;
public abstract interface Dialect
{
public abstract boolean supportsLimit();
public abstract boolean supportOffsetLimit();
public abstract String getLimitString(String paramString, int paramInt1, int paramInt2);
}
|
[
"12345678"
] |
12345678
|
3d8543426e6bc1aa783a4e77a5ef9ce6a41cd6ea
|
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
|
/media/mca/filterpacks/java/android/filterpacks/performance/Throughput.java
|
93738dd88d5396c3fcd00b90e6fe33061387b59f
|
[
"Apache-2.0",
"LicenseRef-scancode-unicode"
] |
permissive
|
Ankits-lab/frameworks_base
|
8a63f39a79965c87a84e80550926327dcafb40b7
|
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
|
refs/heads/main
| 2023-02-06T03:57:44.893590
| 2020-11-14T09:13:40
| 2020-11-14T09:13:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,720
|
java
|
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.filterpacks.performance;
/**
* @hide
*/
public class Throughput {
private final int mTotalFrames;
private final int mPeriodFrames;
private final int mPeriodTime;
private final int mPixels;
public Throughput(int totalFrames, int periodFrames, int periodTime, int pixels) {
mTotalFrames = totalFrames;
mPeriodFrames = periodFrames;
mPeriodTime = periodTime;
mPixels = pixels;
}
public int getTotalFrameCount() {
return mTotalFrames;
}
public int getPeriodFrameCount() {
return mPeriodFrames;
}
public int getPeriodTime() {
return mPeriodTime;
}
public float getFramesPerSecond() {
return mPeriodFrames / (float)mPeriodTime;
}
public float getNanosPerPixel() {
double frameTimeInNanos = (mPeriodTime / (double)mPeriodFrames) * 1000000.0;
return (float)(frameTimeInNanos / mPixels);
}
public String toString() {
return getFramesPerSecond() + " FPS";
}
}
|
[
"keneankit01@gmail.com"
] |
keneankit01@gmail.com
|
21f08a377d9b33c16ba4ea2a950b181e94ad08d0
|
a1e49f5edd122b211bace752b5fb1bd5c970696b
|
/projects/org.springframework.beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java
|
0e31d83c101e4acef1ddf3c78a9440c720d1063f
|
[
"Apache-2.0"
] |
permissive
|
savster97/springframework-3.0.5
|
4f86467e2456e5e0652de9f846f0eaefc3214cfa
|
34cffc70e25233ed97e2ddd24265ea20f5f88957
|
refs/heads/master
| 2020-04-26T08:48:34.978350
| 2019-01-22T14:45:38
| 2019-01-22T14:45:38
| 173,434,995
| 0
| 0
|
Apache-2.0
| 2019-03-02T10:37:13
| 2019-03-02T10:37:12
| null |
UTF-8
|
Java
| false
| false
| 3,925
|
java
|
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans.factory.config;
import static org.easymock.EasyMock.*;
import static org.junit.Assert.assertTrue;
import java.util.HashMap;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
/**
* Unit tests for {@link CustomScopeConfigurer}.
*
* @author Rick Evans
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class CustomScopeConfigurerTests {
private static final String FOO_SCOPE = "fooScope";
private ConfigurableListableBeanFactory factory;
@Before
public void setUp() {
factory = new DefaultListableBeanFactory();
}
@Test
public void testWithNoScopes() throws Exception {
Scope scope = createMock(Scope.class);
replay(scope);
CustomScopeConfigurer figurer = new CustomScopeConfigurer();
figurer.postProcessBeanFactory(factory);
verify(scope);
}
@Test
public void testSunnyDayWithBonaFideScopeInstance() throws Exception {
Scope scope = createMock(Scope.class);
replay(scope);
factory.registerScope(FOO_SCOPE, scope);
Map<String, Object> scopes = new HashMap<String, Object>();
scopes.put(FOO_SCOPE, scope);
CustomScopeConfigurer figurer = new CustomScopeConfigurer();
figurer.setScopes(scopes);
figurer.postProcessBeanFactory(factory);
verify(scope);
}
@Test
public void testSunnyDayWithBonaFideScopeClass() throws Exception {
Map<String, Object> scopes = new HashMap<String, Object>();
scopes.put(FOO_SCOPE, NoOpScope.class);
CustomScopeConfigurer figurer = new CustomScopeConfigurer();
figurer.setScopes(scopes);
figurer.postProcessBeanFactory(factory);
assertTrue(factory.getRegisteredScope(FOO_SCOPE) instanceof NoOpScope);
}
@Test
public void testSunnyDayWithBonaFideScopeClassname() throws Exception {
Map<String, Object> scopes = new HashMap<String, Object>();
scopes.put(FOO_SCOPE, NoOpScope.class.getName());
CustomScopeConfigurer figurer = new CustomScopeConfigurer();
figurer.setScopes(scopes);
figurer.postProcessBeanFactory(factory);
assertTrue(factory.getRegisteredScope(FOO_SCOPE) instanceof NoOpScope);
}
@Test(expected=IllegalArgumentException.class)
public void testWhereScopeMapHasNullScopeValueInEntrySet() throws Exception {
Map<String, Object> scopes = new HashMap<String, Object>();
scopes.put(FOO_SCOPE, null);
CustomScopeConfigurer figurer = new CustomScopeConfigurer();
figurer.setScopes(scopes);
figurer.postProcessBeanFactory(factory);
}
@Test(expected=IllegalArgumentException.class)
public void testWhereScopeMapHasNonScopeInstanceInEntrySet() throws Exception {
Map<String, Object> scopes = new HashMap<String, Object>();
scopes.put(FOO_SCOPE, this); // <-- not a valid value...
CustomScopeConfigurer figurer = new CustomScopeConfigurer();
figurer.setScopes(scopes);
figurer.postProcessBeanFactory(factory);
}
@SuppressWarnings("unchecked")
@Test(expected=ClassCastException.class)
public void testWhereScopeMapHasNonStringTypedScopeNameInKeySet() throws Exception {
Map scopes = new HashMap();
scopes.put(this, new NoOpScope()); // <-- not a valid value (the key)...
CustomScopeConfigurer figurer = new CustomScopeConfigurer();
figurer.setScopes(scopes);
figurer.postProcessBeanFactory(factory);
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
eb93394f15cd46909361587fb9f3d4afeebc22f4
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/Alluxio--alluxio/49cf8b8badb8247c203a4a4c9313d2b6e2585d51/after/EditLogOperationTest.java
|
655c63838c5905af26db114c51caa38175cbdc68
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,488
|
java
|
/*
* Licensed to the University of California, Berkeley 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 tachyon.master;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.List;
import org.apache.commons.codec.binary.Base64;
import org.junit.Assert;
import org.junit.Test;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* Unit Test for EditLogOperation
*/
public class EditLogOperationTest {
private static final String CREATE_DEPENDENCY_TYPE = "{\"type\":\"CREATE_DEPENDENCY\","
+ "\"parameters\":{\"parents\":[1,2,3],\"commandPrefix\":\"fake command\","
+ "\"dependencyId\":1,\"frameworkVersion\":\"0.3\",\"data\":[\"AAAAAAAAAAAAAA==\"],"
+ "\"children\":[4,5,6,7],"
+ "\"comment\":\"Comment Test\",\"creationTimeMs\":1409349750338,"
+ "\"dependencyType\":\"Narrow\",\"framework\":\"Tachyon Examples\"}}";
private static final ObjectMapper OBJECT_MAPPER = JsonObject.createObjectMapper();
// Tests for CREATE_DEPENDENCY operation
@Test
public void createDependencyTest() throws IOException {
EditLogOperation editLogOperation =
OBJECT_MAPPER.readValue(CREATE_DEPENDENCY_TYPE.getBytes(), EditLogOperation.class);
// get all parameters for "CREATE_DEPENDENCY"
List<Integer> parents = editLogOperation.get("parents", new TypeReference<List<Integer>>() {});
Assert.assertEquals(3, parents.size());
List<Integer> children =
editLogOperation.get("children", new TypeReference<List<Integer>>() {});
Assert.assertEquals(4, children.size());
String commandPrefix = editLogOperation.getString("commandPrefix");
Assert.assertEquals("fake command", commandPrefix);
List<ByteBuffer> data = editLogOperation.getByteBufferList("data");
Assert.assertEquals(1, data.size());
String decodedBase64 = new String(data.get(0).array(), "UTF-8");
Assert.assertEquals(new String(Base64.decodeBase64("AAAAAAAAAAAAAA==")), decodedBase64);
String comment = editLogOperation.getString("comment");
Assert.assertEquals("Comment Test", comment);
String framework = editLogOperation.getString("framework");
Assert.assertEquals("Tachyon Examples", framework);
String frameworkVersion = editLogOperation.getString("frameworkVersion");
Assert.assertEquals("0.3", frameworkVersion);
DependencyType dependencyType = editLogOperation.get("dependencyType", DependencyType.class);
Assert.assertEquals(DependencyType.Narrow, dependencyType);
Integer depId = editLogOperation.getInt("dependencyId");
Assert.assertEquals(1, depId.intValue());
Long creationTimeMs = editLogOperation.getLong("creationTimeMs");
Assert.assertEquals(1409349750338L, creationTimeMs.longValue());
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
fff24251a456d740f74da1427ea3d8520d72509c
|
e2ac3fdc5ad13255cc0f3686d287bf7b7b06a657
|
/MYCHANGE/java/change-request-service/src/main/java/com/example/mirai/mychange/changerequestservice/shared/exception/NotAllowedToAddSelfAsDependentException.java
|
88b9a801610b9a9d8034ed3e3cb8f8234a65e51d
|
[] |
no_license
|
Suresh918/mySpringbootMicroServices
|
c483d876c8b436b8388f5ff7f4b8c1a7f903282d
|
378b020c6cf3fdd742f5935f86c3a4821055af7a
|
refs/heads/main
| 2023-06-27T21:15:44.507233
| 2021-07-17T15:28:08
| 2021-07-17T15:28:08
| 379,893,287
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 213
|
java
|
package com.example.mirai.projectname.changerequestservice.shared.exception;
public class NotAllowedToAddSelfAsDependentException extends RuntimeException {
private static final long serialVersionUID = 1L;
}
|
[
"suresh.uputhula@asml.com"
] |
suresh.uputhula@asml.com
|
ddf1cd8f34a748643f943bec11ea3fa7c0c216d7
|
f5837c59c0f0bd212df65bde9a69a5da5ae5bd04
|
/jclazz-decomp/src/ru/andrew/jclazz/decompiler/engine/ops/FakePopView.java
|
4fa05b2e5383640b0d181c98601fa0441219d120
|
[] |
no_license
|
albfan/jclazz-original
|
7bbf605a78fcfc99b8e637ad6dd818b2293494e7
|
8cacb9238272a4a9a9d2f7fb5a911502ad72674f
|
refs/heads/master
| 2021-01-21T12:50:06.152932
| 2016-03-25T11:13:11
| 2016-03-25T12:05:02
| 38,154,511
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,317
|
java
|
package ru.andrew.jclazz.decompiler.engine.ops;
import ru.andrew.jclazz.decompiler.MethodSourceView;
import ru.andrew.jclazz.decompiler.engine.LocalVariable;
import ru.andrew.jclazz.decompiler.engine.blocks.Block;
public class FakePopView extends OperationView
{
private LocalVariable lvar;
private String fakeValue;
public FakePopView(MethodSourceView methodView, LocalVariable lvar, String fakeValue)
{
super(null, methodView);
this.lvar = lvar;
this.fakeValue = fakeValue;
view = new Object[]{lvar.getView(), " = ", fakeValue};
}
public String getPushType()
{
return null;
}
public String source()
{
/*
String src;
if (!lvar.isPrinted())
{
src = alias(getLVType(lvar)) + " ";
lvar.setPrinted(true);
}
else
{
src = "";
}
src += getLVName(lvar);
src += " = " + fakeValue;
return src;
*/
return null;
}
public void analyze2(Block block)
{
}
public int getOpcode()
{
return 58; // astore
}
public long getStartByte()
{
// TODO may be incorrect
return -1;
}
public boolean isPush()
{
return false;
}
}
|
[
"albertofanjul@gmail.com"
] |
albertofanjul@gmail.com
|
c266996d233296cbce8b94d6487a01ed9ec9a117
|
0deb56bdcf91ca229bf61da0cf3cf3406223fb2c
|
/iot-channel-app/app/channel-tv/src/main/java/swaiotos/channel/iot/tv/iothandle/data/LocalMediaParams.java
|
56dc84f43fe18fca92bcbcf9b94652a70d099951
|
[] |
no_license
|
soulcure/airplay
|
2ceb0a6707b2d4a69f85dd091b797dcb6f2c9d46
|
37dd3a890148a708d8aa6f95ac84355606af6a18
|
refs/heads/master
| 2023-04-11T03:49:15.246072
| 2021-04-16T09:15:03
| 2021-04-16T09:15:03
| 357,804,553
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 181
|
java
|
package swaiotos.channel.iot.tv.iothandle.data;
import java.io.Serializable;
public class LocalMediaParams implements Serializable {
public String name;//媒体文件名称
}
|
[
"chenqiongyao@coocaa.com"
] |
chenqiongyao@coocaa.com
|
6c2ae3a79eaab2422ccd5effa964e3555c6ab504
|
c40efb977101232d91e99af0b78778bad3e0950a
|
/game_db/src/com/hifun/soul/gamedb/entity/HumanTechnologyEntity.java
|
de7c60bfbb9812f025df7cf57702b459019fc30e
|
[] |
no_license
|
cietwwl/server
|
2bca79a17be6d5e6fee65e57d0df1fc753fb35e3
|
d18804f8c182eaa2509666aec10a2212ababc13c
|
refs/heads/master
| 2020-06-14T15:12:16.679591
| 2014-11-19T14:48:04
| 2014-11-19T14:48:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,081
|
java
|
package com.hifun.soul.gamedb.entity;
import java.io.Serializable;
import com.hifun.soul.core.orm.BaseProtobufEntity;
import com.hifun.soul.core.orm.annotation.AutoCreateHumanEntityHolder;
import com.hifun.soul.gamedb.IHumanSubEntity;
import com.hifun.soul.proto.data.entity.Entity.HumanTechnology;
import com.hifun.soul.proto.data.entity.Entity.HumanTechnology.Builder;
/**
* 角色科技实体;
*
* @author magicstone
*
*/
@AutoCreateHumanEntityHolder(EntityHolderClass = "CollectionEntityHolder")
public class HumanTechnologyEntity extends BaseProtobufEntity<HumanTechnology.Builder>
implements IHumanSubEntity {
public HumanTechnologyEntity(Builder builder) {
super(builder);
}
public HumanTechnologyEntity() {
this(HumanTechnology.newBuilder());
}
@Override
public long getHumanGuid() {
return this.builder.getHumanGuid();
}
@Override
public Integer getId() {
return this.builder.getTechnology().getTechnologyId();
}
@Override
public void setId(Serializable id) {
this.builder.getTechnologyBuilder().setTechnologyId((Integer) id);
}
}
|
[
"magicstoneljg@163.com"
] |
magicstoneljg@163.com
|
0758a5c6007d458fde095d4246b6a180db421e0e
|
3884b64b3f227d7a0e335965431c54792d82fe5d
|
/vertx-lang-js/src/test/java/io/vertx/test/it/discovery/service/HelloServiceVertxEBProxy.java
|
26d49b7a479d739c32416bf1ba0c781bbb5bc741
|
[
"Apache-2.0"
] |
permissive
|
vietj/vertx-lang-js
|
a7ab22876ea5cf7e0c0111f47e3fa7e302488efa
|
07e359121c1a650bc28774dcddaddde2eca265c2
|
refs/heads/master
| 2021-01-23T23:56:21.329694
| 2019-06-17T16:46:34
| 2019-06-17T16:46:34
| 21,736,084
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,716
|
java
|
/*
* Copyright 2014 Red Hat, Inc.
*
* Red Hat 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 io.vertx.test.it.discovery.service;
import io.vertx.core.eventbus.DeliveryOptions;
import io.vertx.core.Vertx;
import io.vertx.core.Future;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.function.Function;
import io.vertx.serviceproxy.ServiceException;
import io.vertx.serviceproxy.ServiceExceptionMessageCodec;
import io.vertx.serviceproxy.ProxyUtils;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
/*
Generated Proxy code - DO NOT EDIT
@author Roger the Robot
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public class HelloServiceVertxEBProxy implements HelloService {
private Vertx _vertx;
private String _address;
private DeliveryOptions _options;
private boolean closed;
public HelloServiceVertxEBProxy(Vertx vertx, String address) {
this(vertx, address, null);
}
public HelloServiceVertxEBProxy(Vertx vertx, String address, DeliveryOptions options) {
this._vertx = vertx;
this._address = address;
this._options = options;
try{
this._vertx.eventBus().registerDefaultCodec(ServiceException.class, new ServiceExceptionMessageCodec());
} catch (IllegalStateException ex) {}
}
@Override
public void hello(JsonObject name, Handler<AsyncResult<String>> resultHandler){
if (closed) {
resultHandler.handle(Future.failedFuture(new IllegalStateException("Proxy is closed")));
return;
}
JsonObject _json = new JsonObject();
_json.put("name", name);
DeliveryOptions _deliveryOptions = (_options != null) ? new DeliveryOptions(_options) : new DeliveryOptions();
_deliveryOptions.addHeader("action", "hello");
_vertx.eventBus().<String>send(_address, _json, _deliveryOptions, res -> {
if (res.failed()) {
resultHandler.handle(Future.failedFuture(res.cause()));
} else {
resultHandler.handle(Future.succeededFuture(res.result().body()));
}
});
}
}
|
[
"julien@julienviet.com"
] |
julien@julienviet.com
|
174dcfd8f51c44b989dec33302e1314e036448ca
|
f45ce754926b41c0fd6fac8cff82523e3ea0475a
|
/LeftBullet.java
|
1c7eb590622641aabaa57d324414468a398502e1
|
[] |
no_license
|
chasnolte/cs-261-programming-assignment-1-chasnolte-master
|
f21fed32aaee2bbb292a06ca38395ffbf46729ec
|
3f01fcaf8230a153d6390df8a89b8da8e8a1cdb2
|
refs/heads/master
| 2021-01-02T21:56:53.569281
| 2020-02-11T16:59:18
| 2020-02-11T16:59:18
| 239,816,489
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 776
|
java
|
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* The left bullet actor is created when a player fires a gun, and will kill zombies on impact
*
* @author Chas Nolte
* @version February 11 2020
*/
public class LeftBullet extends Actor
{
/**
* Act - do whatever the LeftBullet wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
//Sets the location of the bullet to where the player is, and constantly moves left when fired
setLocation(getX()-30, getY());
//Bullet is killed if it hits the edge of the world
if (isAtEdge())
{
getWorld().removeObject(this);
}
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
66aa3176a02c565ac24c5330dfd53d552b1e27af
|
fe86a5a01922c2c72df131f2f5970d3c4c6ec6e4
|
/src/main/java/com/kdgc/model/GoJsNode.java
|
503193e4dba379b8a2c87766ebd3c83be331f56c
|
[] |
no_license
|
miki-hmt/blood-analysis
|
e807eae94e4c6dc932b44fc8772d25b6a83f7219
|
50144a52028b5e67ee73a9f62bd8d10cb4abb2da
|
refs/heads/master
| 2023-08-10T07:30:59.129851
| 2021-09-10T01:55:57
| 2021-09-10T01:55:57
| 329,489,492
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 498
|
java
|
package com.kdgc.model;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.List;
/**
* @author jczhou
* @description
* @date 2020/7/24
**/
@Setter
@Getter
@Builder
public class GoJsNode implements Serializable {
private Long nodeId;
private String dbUrl;
private String key;
private String srType;
private List<GoJsNodeField> fields;
/**
* 位置 如: 321 -98
*/
private String loc;
}
|
[
"1329289117@qq.com"
] |
1329289117@qq.com
|
14be2f3bb12a0e2455bd1affdfffa0425afd5c5a
|
7096288718c53a96db43374e7f7fb2038d6540d8
|
/common/java/router/src/net/i2p/router/transport/udp/OutboundRefiller.java
|
078105a4a7b1c00a471c9c758167879cdd1c7f37
|
[
"Unlicense",
"LicenseRef-scancode-public-domain"
] |
permissive
|
mhatta/Nightweb
|
5ea1a4cec12393e0fd7fccafe1b116402e2cafd5
|
b6e58eec6722dfb9df0e3de2de600c222729c96b
|
refs/heads/master
| 2021-08-22T05:14:06.870860
| 2019-02-05T10:27:26
| 2019-02-05T10:27:26
| 151,987,810
| 10
| 0
|
Unlicense
| 2020-04-01T03:15:26
| 2018-10-07T21:40:45
|
Clojure
|
UTF-8
|
Java
| false
| false
| 2,325
|
java
|
package net.i2p.router.transport.udp;
import net.i2p.router.OutNetMessage;
import net.i2p.router.RouterContext;
import net.i2p.util.I2PThread;
import net.i2p.util.Log;
/**
* Blocking thread to grab new messages off the outbound queue and
* plopping them into our active pool.
*
* WARNING - UNUSED since 0.6.1.11
*
*/
class OutboundRefiller implements Runnable {
private RouterContext _context;
private Log _log;
private OutboundMessageFragments _fragments;
private MessageQueue _messages;
private boolean _alive;
// private Object _refillLock;
public OutboundRefiller(RouterContext ctx, OutboundMessageFragments fragments, MessageQueue messages) {
_context = ctx;
_log = ctx.logManager().getLog(OutboundRefiller.class);
_fragments = fragments;
_messages = messages;
// _refillLock = this;
_context.statManager().createRateStat("udp.timeToActive", "Message lifetime until it reaches the outbound fragment queue", "udp", UDPTransport.RATES);
}
public void startup() {
_alive = true;
I2PThread t = new I2PThread(this, "UDP outbound refiller", true);
t.start();
}
public void shutdown() { _alive = false; }
public void run() {
while (_alive) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Check the fragments to see if we can add more...");
boolean wantMore = _fragments.waitForMoreAllowed();
if (wantMore) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Want more fragments...");
OutNetMessage msg = _messages.getNext(-1);
if (msg != null) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("New message found to fragments: " + msg);
_context.statManager().addRateData("udp.timeToActive", msg.getLifetime(), msg.getLifetime());
_fragments.add(msg);
} else {
if (_log.shouldLog(Log.DEBUG))
_log.debug("No message found to fragment");
}
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("No more fragments allowed, looping");
}
}
}
}
|
[
"zsoakes@gmail.com"
] |
zsoakes@gmail.com
|
7abf0db6f55fdab31c92cc30218c873b3bc05646
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/34/34_8b737ef33fd5214c9b5f5839f53aee19668371d9/MusicIndexService/34_8b737ef33fd5214c9b5f5839f53aee19668371d9_MusicIndexService_t.java
|
d753d10569ca31f102a34070c264ea9afeb958ca
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,724
|
java
|
package net.sourceforge.subsonic.service;
import net.sourceforge.subsonic.domain.MusicFile;
import net.sourceforge.subsonic.domain.MusicFolder;
import net.sourceforge.subsonic.domain.MusicIndex;
import net.sourceforge.subsonic.domain.MusicIndex.Artist;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
/**
* Provides services for grouping artists by index.
*
* @author Sindre Mehus
*/
public class MusicIndexService {
private SettingsService settingsService;
private MusicFileService musicFileService;
/**
* Returns a map from music indexes to sets of artists that are direct children of the given music folders.
*
* @param folders The music folders.
* @return A map from music indexes to sets of artists that are direct children of this music file.
* @throws IOException If an I/O error occurs.
*/
public SortedMap<MusicIndex, SortedSet<Artist>> getIndexedArtists(MusicFolder[] folders) throws IOException {
String[] ignoredArticles = settingsService.getIgnoredArticlesAsArray();
String[] shortcuts = settingsService.getShortcutsAsArray();
final List<MusicIndex> indexes = createIndexesFromExpression(settingsService.getIndexString());
Comparator<MusicIndex> indexComparator = new Comparator<MusicIndex>() {
public int compare(MusicIndex a, MusicIndex b) {
int indexA = indexes.indexOf(a);
int indexB = indexes.indexOf(b);
if (indexA == -1) {
indexA = Integer.MAX_VALUE;
}
if (indexB == -1) {
indexB = Integer.MAX_VALUE;
}
if (indexA < indexB) {
return -1;
}
if (indexA > indexB) {
return 1;
}
return 0;
}
};
SortedSet<Artist> artists = createArtists(folders, ignoredArticles, shortcuts);
SortedMap<MusicIndex, SortedSet<Artist>> result = new TreeMap<MusicIndex, SortedSet<Artist>>(indexComparator);
for (Artist artist : artists) {
MusicIndex index = getIndex(artist, indexes);
SortedSet<Artist> artistSet = result.get(index);
if (artistSet == null) {
artistSet = new TreeSet<Artist>();
result.put(index, artistSet);
}
artistSet.add(artist);
}
return result;
}
/**
* Creates a new instance by parsing the given expression. The expression consists of an index name, followed by
* an optional list of one-character prefixes. For example:<p/>
* <p/>
* The expression <em>"A"</em> will create the index <em>"A" -> ["A"]</em><br/>
* The expression <em>"The"</em> will create the index <em>"The" -> ["The"]</em><br/>
* The expression <em>"A(AÅÆ)"</em> will create the index <em>"A" -> ["A", "Å", "Æ"]</em><br/>
* The expression <em>"X-Z(XYZ)"</em> will create the index <em>"X-Z" -> ["X", "Y", "Z"]</em>
*
* @param expr The expression to parse.
* @return A new instance.
*/
protected MusicIndex createIndexFromExpression(String expr) {
int separatorIndex = expr.indexOf('(');
if (separatorIndex == -1) {
MusicIndex index = new MusicIndex(expr);
index.addPrefix(expr);
return index;
}
MusicIndex index = new MusicIndex(expr.substring(0, separatorIndex));
String prefixString = expr.substring(separatorIndex + 1, expr.length() - 1);
for (int i = 0; i < prefixString.length(); i++) {
index.addPrefix(prefixString.substring(i, i + 1));
}
return index;
}
/**
* Creates a list of music indexes by parsing the given expression. The expression is a space-separated list of
* sub-expressions, for which the rules described in {@link #createIndexFromExpression} apply.
*
* @param expr The expression to parse.
* @return A list of music indexes.
*/
protected List<MusicIndex> createIndexesFromExpression(String expr) {
List<MusicIndex> result = new ArrayList<MusicIndex>();
StringTokenizer tokenizer = new StringTokenizer(expr, " ");
while (tokenizer.hasMoreTokens()) {
MusicIndex index = createIndexFromExpression(tokenizer.nextToken());
result.add(index);
}
return result;
}
private SortedSet<Artist> createArtists(MusicFolder[] folders, String[] ignoredArticles,
String[] shortcuts) throws IOException {
SortedMap<String, Artist> artistMap = new TreeMap<String, Artist>();
Set<String> shortcutSet = new HashSet<String>(Arrays.asList(shortcuts));
for (MusicFolder folder : folders) {
MusicFile parent = musicFileService.getMusicFile(folder.getPath());
List<MusicFile> children = musicFileService.getChildDirectories(parent);
for (MusicFile child : children) {
if (shortcutSet.contains(child.getName()) || !child.isDirectory()) {
continue;
}
String sortableName = createSortableName(child.getName(), ignoredArticles);
Artist artist = artistMap.get(sortableName);
if (artist == null) {
artist = new Artist(child.getName(), sortableName);
artistMap.put(sortableName, artist);
}
artist.addMusicFile(child);
}
}
return new TreeSet<Artist>(artistMap.values());
}
private String createSortableName(String name, String[] ignoredArticles) {
String uppercaseName = name.toUpperCase();
for (String article : ignoredArticles) {
if (uppercaseName.startsWith(article.toUpperCase() + " ")) {
return name.substring(article.length() + 1) + ", " + article;
}
}
return name;
}
/**
* Returns the music index to which the given artist belongs.
*
* @param artist The artist in question.
* @param indexes List of available indexes.
* @return The music index to which this music file belongs, or {@link MusicIndex#OTHER} if no index applies.
*/
private MusicIndex getIndex(Artist artist, List<MusicIndex> indexes) {
String sortableName = artist.getSortableName().toUpperCase();
for (MusicIndex index : indexes) {
for (String prefix : index.getPrefixes()) {
if (sortableName.startsWith(prefix.toUpperCase())) {
return index;
}
}
}
return MusicIndex.OTHER;
}
public void setSettingsService(SettingsService settingsService) {
this.settingsService = settingsService;
}
public void setMusicFileService(MusicFileService musicFileService) {
this.musicFileService = musicFileService;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
048d13516e34a18e11a219ae57b05ddecc0b6bd5
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/7/7_55725615a67d8cf19723f1b79d657c9b62b0dc5b/AbyssalCharacterModule/7_55725615a67d8cf19723f1b79d657c9b62b0dc5b_AbyssalCharacterModule_s.java
|
d28add5d3c609c0696f1636700a831b181d1ff33
|
[] |
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,975
|
java
|
package net.sf.anathema.character.abyssal;
import net.sf.anathema.character.abyssal.caste.AbyssalCaste;
import net.sf.anathema.character.abyssal.resonance.AbyssalResonanceModelFactory;
import net.sf.anathema.character.abyssal.resonance.AbyssalResonanceParser;
import net.sf.anathema.character.abyssal.resonance.AbyssalResonancePersisterFactory;
import net.sf.anathema.character.abyssal.resonance.AbyssalResonanceTemplate;
import net.sf.anathema.character.abyssal.resonance.AbyssalResonanceViewFactory;
import net.sf.anathema.character.generic.backgrounds.IBackgroundTemplate;
import net.sf.anathema.character.generic.framework.ICharacterGenerics;
import net.sf.anathema.character.generic.framework.additionaltemplate.IAdditionalViewFactory;
import net.sf.anathema.character.generic.framework.additionaltemplate.model.IAdditionalModelFactory;
import net.sf.anathema.character.generic.framework.additionaltemplate.persistence.IAdditionalPersisterFactory;
import net.sf.anathema.character.generic.framework.module.CharacterModule;
import net.sf.anathema.character.generic.framework.module.NullObjectCharacterModuleAdapter;
import net.sf.anathema.character.generic.impl.backgrounds.CharacterTypeBackgroundTemplate;
import net.sf.anathema.character.generic.impl.backgrounds.TemplateTypeBackgroundTemplate;
import net.sf.anathema.character.generic.impl.caste.CasteCollection;
import net.sf.anathema.character.generic.template.TemplateType;
import net.sf.anathema.lib.registry.IIdentificateRegistry;
import net.sf.anathema.lib.registry.IRegistry;
import net.sf.anathema.lib.util.Identificate;
import static net.sf.anathema.character.generic.type.CharacterType.ABYSSAL;
@CharacterModule
public class AbyssalCharacterModule extends NullObjectCharacterModuleAdapter {
@SuppressWarnings("unused")
private static final TemplateType abyssalTemplateType = new TemplateType(ABYSSAL);
private static final TemplateType loyalAbyssalTemplateType = new TemplateType(ABYSSAL,
new Identificate("default")); //$NON-NLS-1$
@SuppressWarnings("unused")
private static final TemplateType renegadeAbyssalTemplateType = new TemplateType(ABYSSAL,
new Identificate("RenegadeAbyssal")); //$NON-NLS-1$
@SuppressWarnings("unused")
public static final String BACKGROUND_ID_ABYSSAL_COMMAND = "AbyssalCommand"; //$NON-NLS-1$
public static final String BACKGROUND_ID_LIEGE = "Liege"; //$NON-NLS-1$
public static final String BACKGROUND_ID_SPIES = "Spies"; //$NON-NLS-1$
public static final String BACKGROUND_ID_UNDERWORLD_MANSE = "UnderworldManse"; //$NON-NLS-1$
public static final String BACKGROUND_ID_WHISPERS = "Whispers"; //$NON-NLS-1$
@Override
public void registerCommonData(ICharacterGenerics characterGenerics) {
characterGenerics.getAdditionalTemplateParserRegistry().register(AbyssalResonanceTemplate.ID,
new AbyssalResonanceParser());
characterGenerics.getCasteCollectionRegistry().register(ABYSSAL, new CasteCollection(AbyssalCaste.values()));
}
@Override
public void addCharacterTemplates(ICharacterGenerics characterGenerics) {
registerParsedTemplate(characterGenerics, "template/LoyalAbyssal2nd.template", "moep_Abyssals_"); //$NON-NLS-1$
registerParsedTemplate(characterGenerics, "template/RenegadeAbyssal2nd.template", "moep_Abyssals_"); //$NON-NLS-1$
}
@Override
public void addBackgroundTemplates(ICharacterGenerics generics) {
IIdentificateRegistry<IBackgroundTemplate> backgroundRegistry = generics.getBackgroundRegistry();
backgroundRegistry.add(new CharacterTypeBackgroundTemplate(BACKGROUND_ID_ABYSSAL_COMMAND, loyalAbyssalTemplateType));
backgroundRegistry.add(new TemplateTypeBackgroundTemplate(BACKGROUND_ID_LIEGE, loyalAbyssalTemplateType));
backgroundRegistry.add(new CharacterTypeBackgroundTemplate(BACKGROUND_ID_SPIES, loyalAbyssalTemplateType));
backgroundRegistry.add(new CharacterTypeBackgroundTemplate(BACKGROUND_ID_UNDERWORLD_MANSE, loyalAbyssalTemplateType));
backgroundRegistry.add(new CharacterTypeBackgroundTemplate(BACKGROUND_ID_WHISPERS, ABYSSAL));
}
@Override
public void addAdditionalTemplateData(ICharacterGenerics characterGenerics) {
IRegistry<String, IAdditionalModelFactory> additionalModelFactoryRegistry = characterGenerics.getAdditionalModelFactoryRegistry();
String templateId = AbyssalResonanceTemplate.ID;
additionalModelFactoryRegistry.register(templateId, new AbyssalResonanceModelFactory());
IRegistry<String, IAdditionalViewFactory> additionalViewFactoryRegistry = characterGenerics.getAdditionalViewFactoryRegistry();
additionalViewFactoryRegistry.register(templateId, new AbyssalResonanceViewFactory());
IRegistry<String, IAdditionalPersisterFactory> persisterFactory = characterGenerics.getAdditonalPersisterFactoryRegistry();
persisterFactory.register(templateId, new AbyssalResonancePersisterFactory());
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
8c688157e449ba5da271b8c5099e5d8c7c12eaa3
|
a1f6786f150ae75cf9bbdcd177d2a2ae60718a8f
|
/src/main/java/com/alipay/simplehbase/client/service/HbaseRawService.java
|
fb6dfa9cf93919156dc9748cc047ab7d6112b09c
|
[] |
no_license
|
lmy86263/simplehbase
|
a52b5254cba2e659f137a2d69f71ba54908f1803
|
34746d4d28bb5cbf65e2c2109483d80be4955b71
|
refs/heads/master
| 2020-03-26T10:10:58.707184
| 2018-08-15T02:03:44
| 2018-08-15T02:03:44
| 144,785,088
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 564
|
java
|
package com.alipay.simplehbase.client.service;
import java.util.List;
import com.alipay.simplehbase.client.SimpleHbaseCellResult;
/**
* HbaseRawService.
*
* <pre>
* Provides hbase raw service.
* </pre>
*
* @author xinzhi.zhang
* */
public interface HbaseRawService {
/**
* put data.
* */
public void put(String hql);
/**
* select data.
* */
public List<List<SimpleHbaseCellResult>> select(String hql);
/**
* delete data.
* */
public void delete(String hql);
}
|
[
"xinzhi.zhang@alipay.com"
] |
xinzhi.zhang@alipay.com
|
0b531539715ef0f9fd52d5eff913d8e5943bd58b
|
c23d9be4a5d864d4f4443a1edb4eefdd2ea4a955
|
/app/src/main/java/com/nuoxian/kokojia/fragment/TeacherAnswerAll.java
|
15a4621a7fa28cec6315d1ed2a41084c480c1b81
|
[] |
no_license
|
Superingxz/KoKoJia
|
b85ec91e81bf516ff859528c1eeb62e310b06abe
|
84010dd816933dd4042b81f5b46b33c35ae6a766
|
refs/heads/master
| 2021-01-21T09:52:51.580953
| 2017-05-18T08:41:48
| 2017-05-18T08:41:48
| 85,960,266
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,772
|
java
|
package com.nuoxian.kokojia.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import com.google.gson.Gson;
import com.jingchen.pulltorefresh.PullToRefreshLayout;
import com.nuoxian.kokojia.activity.TeacherAnswerDetailsActivity;
import com.nuoxian.kokojia.adapter.TeacherAnswerAdapter;
import com.nuoxian.kokojia.enterty.BuyResult;
import com.nuoxian.kokojia.enterty.TeacherAnswer;
import com.nuoxian.kokojia.http.Urls;
import com.nuoxian.kokojia.utils.CommonMethod;
import com.nuoxian.kokojia.utils.CommonValues;
import com.ypy.eventbus.EventBus;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Administrator on 2016/9/19.
*/
public class TeacherAnswerAll extends BaseTeacherAnswerFragment {
private List<TeacherAnswer.DataBean> mList;
private TeacherAnswerAdapter adapter;
private int page = 1;
private static String status = "0";
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
CommonMethod.showLoadingDialog("正在加载...", getContext());
init();
getData(Urls.TEACHER_ANSWER, CommonValues.NOT_TO_DO, mList, adapter, status, page);
}
private void init() {
//设置适配器
mList = new ArrayList<>();
adapter = new TeacherAnswerAdapter(mList, getContext());
setAdapter(adapter);
//上下拉刷新
setOnRefreshListener(new PullToRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh(PullToRefreshLayout pullToRefreshLayout) {
//刷新
page = 1;
mList.clear();
getData(Urls.TEACHER_ANSWER, CommonValues.TO_REFRESH, mList, adapter, status, page);
adapter.notifyDataSetChanged();
}
@Override
public void onLoadMore(PullToRefreshLayout pullToRefreshLayout) {
//加载
page++;
getData(Urls.TEACHER_ANSWER, CommonValues.TO_LOAD, mList, adapter, status, page);
adapter.notifyDataSetChanged();
}
});
setItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//跳转到答疑详情页
Intent intent = new Intent(getContext(), TeacherAnswerDetailsActivity.class);
intent.putExtra("id", mList.get(position).getId());
startActivity(intent);
}
});
}
}
|
[
"1803117759@qq.com"
] |
1803117759@qq.com
|
b406062f1d26d7b1676eb7acdc0298c43b0da9a4
|
dac724ce4264693b978e60116d53c4cb187be62b
|
/src/main/java/com/tzxx/common/tencentservice/bill/identifyhandler/VatRollSingleInvoiceInfoHandler.java
|
8b5661b35293dc9619c5b7c7531f2976c618a171
|
[] |
no_license
|
gitzhangliang/zlearn-web
|
60572f3e9a79c2ab10ee633fb49fa012958a4cdb
|
81788c7a53c212996d352b526ab6eaa4c9c0caa5
|
refs/heads/master
| 2023-02-24T14:01:07.659840
| 2023-02-12T10:25:28
| 2023-02-12T10:25:28
| 180,762,071
| 1
| 0
| null | 2022-06-17T02:07:26
| 2019-04-11T09:44:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,091
|
java
|
package com.tzxx.common.tencentservice.bill.identifyhandler;
import com.tencentcloudapi.ocr.v20181119.models.SingleInvoiceInfo;
import com.tzxx.common.tencentservice.bill.category.VatRollInvoice;
import java.util.List;
import java.util.Map;
/**
* @author zhangliang
* @date 2021/1/28.
*/
public class VatRollSingleInvoiceInfoHandler extends AbstractSingleInvoiceInfoHandler<VatRollInvoice>{
public VatRollSingleInvoiceInfoHandler(List<SingleInvoiceInfo> singleInvoiceInfos){
super(singleInvoiceInfos);
}
@Override
protected VatRollInvoice doHandle(Map<String, String> nameValueMap) {
VatRollInvoice vatRollInvoice = new VatRollInvoice();
vatRollInvoice.setInvoiceNo(nameValueMap.get("发票号码"));
vatRollInvoice.setInvoiceDate(nameValueMap.get("开票日期"));
vatRollInvoice.setInvoiceCode(nameValueMap.get("发票代码"));
vatRollInvoice.setTotalPriceInFigures(nameValueMap.get("合计金额(小写)"));
vatRollInvoice.setCheckCode(nameValueMap.get("校验码"));
return vatRollInvoice;
}
}
|
[
"906356464@qq.com"
] |
906356464@qq.com
|
b89f21a782cc1064e657d4fe9245d772da6677ec
|
3f2cb4668322822a717db64a01fb56dac7e193c8
|
/usecase/src/main/java/de/cassisi/heartcapture/usecase/port/ReportFileGenerator.java
|
5f0aaa4113f4c44283c67f796343a0c41e513c43
|
[] |
no_license
|
DomenicDev/heartcapture
|
1e80c30274c9ab4246058687131b7f337814636b
|
f62f835f308193499b8c5d6ccb96e0b358f53f33
|
refs/heads/master
| 2023-03-05T15:37:27.854864
| 2021-02-15T16:30:01
| 2021-02-15T16:30:01
| 294,749,044
| 0
| 1
| null | 2021-02-01T11:10:43
| 2020-09-11T16:42:38
|
Java
|
UTF-8
|
Java
| false
| false
| 300
|
java
|
package de.cassisi.heartcapture.usecase.port;
import de.cassisi.heartcapture.entity.ReportData;
import de.cassisi.heartcapture.usecase.exception.ReportGenerationException;
public interface ReportFileGenerator {
byte[] generateReport(ReportData reportData) throws ReportGenerationException;
}
|
[
"domenic.cassisi@web.de"
] |
domenic.cassisi@web.de
|
6e0fe513689f8f3d184c48c1b17f6def238dec0c
|
7b91092bb7197663775772a669b4cc8e210e9735
|
/modules/wss4j/test/interop/TestSTScenario3.java
|
bde6b4ea30f7ada66de042a96752d4557a28b433
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown"
] |
permissive
|
wso2/wso2-wss4j
|
e9786442796d37756e62675aaacfd49972ef8053
|
bbd50534d56277981bbac9d18f1154ec328cd1b7
|
refs/heads/master
| 2023-09-05T02:47:21.212980
| 2023-02-24T06:32:44
| 2023-02-24T06:32:44
| 16,401,283
| 35
| 59
|
Apache-2.0
| 2023-04-10T12:51:16
| 2014-01-31T06:23:25
|
Java
|
UTF-8
|
Java
| false
| false
| 1,802
|
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 interop;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.ws.axis.oasis.STScenario3;
/**
* WS-Security Test Case
* <p/>
*
* @author Davanum Srinivas (dims@yahoo.com)
*/
public class TestSTScenario3 extends TestCase {
/**
* TestScenario1 constructor
* <p/>
*
* @param name name of the test
*/
public TestSTScenario3(String name) {
super(name);
}
/**
* JUnit suite
* <p/>
*
* @return a junit test suite
*/
public static Test suite() {
return new TestSuite(TestSTScenario3.class);
}
/**
* Main method
* <p/>
*
* @param args command line args
*/
public static void main(String[] args) throws Exception {
STScenario3.main(args);
}
public void testSTScenario3() throws Exception {
STScenario3.main(new String[]{"-lhttp://localhost:8080/axis/services/STPing3"});
}
}
|
[
"eranda@wso2.com"
] |
eranda@wso2.com
|
9ee99d976accb18148acd15f90760cb1f4f8596e
|
f92fc2fbbfde756ecdfda07b361285d2b0f4b4d8
|
/src/main/java/designpattern/command/audioplayer/MacroCommand.java
|
ba33dfebf20e9041a6218df044e5c5fea986b54b
|
[] |
no_license
|
blueaken/JianTestPlayGround
|
9dbfde62273f9d8593e111bdc201b61ccfcfbfd9
|
02a962d17a6e7172b96807a785b16e7987fe3f1f
|
refs/heads/master
| 2023-08-04T09:13:19.512764
| 2023-07-15T11:17:25
| 2023-07-15T11:17:25
| 19,551,504
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 327
|
java
|
package designpattern.command.audioplayer;
import java.util.List;
import java.util.ArrayList;
/**
* Author: blueaken
* Date: 3/3/16 10:18 PM
*/
public interface MacroCommand extends Command {
List<Command> cmdList = new ArrayList<>();
public void add(Command command);
public void remove(Command command);
}
|
[
"blueaken@gmail.com"
] |
blueaken@gmail.com
|
cbf279663a650c914342d96c68842048debac483
|
13fad97d2f965bcc38fcaac33c24a69a591431fe
|
/Session11/src/com/auribises/threads/Synchronization.java
|
afd9f58f0f5d08eb3427343f391497c51014346b
|
[] |
no_license
|
ishantk/JavaJ2EELPU1
|
2cbd8106c438e56d38a4129d8d3dfc41879d287f
|
ea63c2839076d073c0968f31825086466c296a14
|
refs/heads/master
| 2022-12-06T21:45:02.106296
| 2020-08-27T14:00:10
| 2020-08-27T14:00:10
| 286,752,644
| 9
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,097
|
java
|
package com.auribises.threads;
class MovieTicket{
String title;
int seatNumber;
String email;
public MovieTicket() {
}
public MovieTicket(String title, int seatNumber) {
//email = ""; // by default lets make it empty
this.title = title;
this.seatNumber = seatNumber;
}
void blockMovieTicket(String email) {
this.email = email;
System.out.println("We have Blocked Ticket for You "+email);
}
void pay() {
System.out.println("Please Pay \u20b9"+200);
System.out.println("Thank You "+email+" Your Ticket has been Booked");
}
void showConfirmedTicket() {
System.out.println("Dear, "+email);
System.out.println("Your Confirmed Ticket Details: "+title+" "+seatNumber);
}
boolean isTicketAvailable() {
//return email.isEmpty();
return email == null;
}
}
// Whenever we have a long running operations we must put in a separate thread
class MovieTicketTransaction extends Thread{
String email;
MovieTicket ticket;
MovieTicketTransaction(String email, MovieTicket ticket){
this.email = email;
this.ticket = ticket;
}
public void run() {
// if any thread is using ticket object, it will be locked for the same thread, and all other threads must wait
// till sync block has not exited, no other thread can use the same ticket object :)
synchronized (ticket) {
// isTicketAvailable is a HACK
// Could be a case for n-number of users, isTicketAvailble may return true
if(ticket.isTicketAvailable()) {
try {
System.out.println("Validating User "+email+" for his account detials in the background");
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
ticket.blockMovieTicket(email);
ticket.pay();
ticket.showConfirmedTicket();
}else {
System.out.println("Sorry, "+email+" ticket is booked :(");
}
}
}
}
class User{
String name;
String phone;
String email;
public User() {
}
public User(String name, String phone, String email) {
this.name = name;
this.phone = phone;
this.email = email;
}
void selectAndBookMovieTicket(MovieTicket ticket) {
MovieTicketTransaction transaction = new MovieTicketTransaction(email, ticket);
transaction.start();
}
}
public class Synchronization {
public static void main(String[] args) {
MovieTicket m1 = new MovieTicket("Avengers", 1);
MovieTicket m2 = new MovieTicket("Avengers", 2);
MovieTicket m3 = new MovieTicket("Avengers", 3);
MovieTicket m4 = new MovieTicket("Avengers", 4);
MovieTicket m5 = new MovieTicket("Avengers", 5);
//System.out.println("Is Seat Number #"+m1.seatNumber+" available: "+m1.isTicketAvailable());
User user1 = new User("John", "+91 99999 88888", "john@example.com");
User user2 = new User("Fionna", "+91 99999 11111", "fionna@example.com");
user1.selectAndBookMovieTicket(m1);
user2.selectAndBookMovieTicket(m1);
}
}
// Challenge: In a Multi Threaded Env, when Multiple Threads access the Same Object, we must sync them
// Assignment: Write a Program demonstrating the usage of synchorized method
|
[
"er.ishant@gmail.com"
] |
er.ishant@gmail.com
|
99be43afa911dd9c6b216e8bd76b54a194493957
|
1627f39bdce9c3fe5bfa34e68c276faa4568bc35
|
/src/implementation/Boj10539.java
|
ca3ceb40ebe88d02036d8ca97d830c7b0245cfb5
|
[
"Apache-2.0"
] |
permissive
|
minuk8932/Algorithm_BaekJoon
|
9ebb556f5055b89a5e5c8d885b77738f1e660e4d
|
a4a46b5e22e0ed0bb1b23bf1e63b78d542aa5557
|
refs/heads/master
| 2022-10-23T20:08:19.968211
| 2022-10-02T06:55:53
| 2022-10-02T06:55:53
| 84,549,122
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 854
|
java
|
package implementation;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Boj10539 {
public static final String SPACE = " ";
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
int N = Integer.parseInt(br.readLine());
int[] A = new int[N];
int chk = 0;
int[] sum = new int[N];
StringTokenizer st = new StringTokenizer(br.readLine(), " ");
for(int i = 0; i < N; i++){
A[i] = Integer.parseInt(st.nextToken());
if(i >= 1){
sum[i] = ((i+1) * A[i]) - chk;
} else {
sum[i] = A[0];
}
chk += sum[i];
sb.append(sum[i]).append(SPACE);
}
System.out.println(sb.toString());
}
}
|
[
"minuk8932@naver.com"
] |
minuk8932@naver.com
|
773cf2d3901b7325b4cc95c7f065089cf15fbe8c
|
1a86e57ccafc65ec3bf74d497d867eb456996058
|
/TAS/src/main/java/info/smartkit/tas/controller/TASController.java
|
a1ff78448ed716dfe14abb0889c085e8cc583ca7
|
[
"Unlicense"
] |
permissive
|
smartkit/COVITAS
|
cad15ba881b40d19cc0c19f7a20232ba86936e41
|
99062d807cc50a50fb346ddaaad764f80ed1f34b
|
refs/heads/master
| 2023-03-10T15:36:03.307181
| 2023-02-23T00:36:17
| 2023-02-23T00:36:17
| 89,655,588
| 0
| 1
|
Unlicense
| 2023-02-23T00:36:19
| 2017-04-28T01:35:06
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,029
|
java
|
package info.smartkit.tas.controller;
import com.fasterxml.jackson.core.JsonProcessingException;
import info.smartkit.tas.pojo.*;
import info.smartkit.tas.service.ITASServices;
import info.smartkit.tas.service.impl.TASService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.Date;
/**
* Created by smartkit on 28/04/2017.
*/
@RestController
@RequestMapping("/tas")
public class TASController {
private static final Logger LOG = LoggerFactory.getLogger(TASController.class);
@Autowired
private ITASServices tasService;
@RequestMapping(method = RequestMethod.GET, value="pf/{chatBotID}/{message}")
public MessageResponse simplePFMessage(@PathVariable int chatBotID, @PathVariable String message) throws JsonProcessingException,IOException {
int timeStampInt = (int) (System.currentTimeMillis() / 1000L);
LOG.info("simplePFMessage called at:"+timeStampInt);
PFMessage pfMessage = new PFMessage();
Message messageObj = new Message();
messageObj.setChatBotID(chatBotID);
messageObj.setTimestamp(timeStampInt);
messageObj.setMessage(message);
//default User
User userObj = new User();
userObj.setExternalID("abc-639184572");
userObj.setFirstName("Tugger");
userObj.setLastName("Sufani");
userObj.setGender("m");
pfMessage.setMessage(messageObj);
pfMessage.setUser(userObj);
return tasService.personalityForge(pfMessage);
}
@RequestMapping(method = RequestMethod.POST,value = "/pf")
public MessageResponse securePfMessage(@RequestBody PFMessage pfMessage) throws JsonProcessingException,IOException {
return tasService.personalityForge(pfMessage);
}
// @RequestMapping(value = "/pf", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
// @ResponseBody
// public Resource<Object> getArtist(@RequestBody PFMessage message) throws JsonProcessingException {
// Object a = tasService.personalityForge(message);
// Resource<Object> resource = new Resource(a);
// resource.add(linkTo(methodOn(ArtistController.class).getArtist(id)).withSelfRel());
// return a;
// }
// private Resource<Album> getAlbumResource(Album album) {
// Resource<Album> resource = new Resource<Album>(album);
//
// // Link to Album
// resource.add(linkTo(methodOn(AlbumController.class).getAlbum(album.getId())).withSelfRel());
// // Link to Artist
// resource.add(linkTo(methodOn(ArtistController.class).getArtist(album.getArtist().getId())).withRel("artist"));
// // Option to purchase Album
// if (album.getStockLevel() > 0) {
// resource.add(linkTo(methodOn(AlbumController.class).purchaseAlbum(album.getId())).withRel("album.purchase"));
// }
// return resource;
// }
}
|
[
"YoungWelle@gmail.com"
] |
YoungWelle@gmail.com
|
b2ee05f923c9613b77bd8136118a23952e1073f8
|
4f8dfcdd6f1494b59684438b8592c6c5c2e63829
|
/DiffTGen-result/output/patch1-Lang-45-Jaid-plausible/Lang_45_1-plausible_jaid/target/0/25/evosuite-tests/org/apache/commons/lang/WordUtils_ESTest_scaffolding.java
|
70cdc38c1f33ec694ce2febaf47dca91c8801c24
|
[] |
no_license
|
IntHelloWorld/Ddifferent-study
|
fa76c35ff48bf7a240dbe7a8b55dc5a3d2594a3b
|
9782867d9480e5d68adef635b0141d66ceb81a7e
|
refs/heads/master
| 2021-04-17T11:40:12.749992
| 2020-03-31T23:58:19
| 2020-03-31T23:58:19
| 249,439,516
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,441
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Mar 30 02:49:04 GMT 2020
*/
package org.apache.commons.lang;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class WordUtils_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang.WordUtils";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("file.encoding", "UTF-8");
java.lang.System.setProperty("java.awt.headless", "true");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
java.lang.System.setProperty("user.country", "US");
java.lang.System.setProperty("user.dir", "/home/hewitt/work/DiffTGen-master/output/patch1-Lang-45-Jaid-plausible/Lang_45_1-plausible_jaid/target/0/25");
java.lang.System.setProperty("user.home", "/home/hewitt");
java.lang.System.setProperty("user.language", "en");
java.lang.System.setProperty("user.name", "hewitt");
java.lang.System.setProperty("user.timezone", "Asia/Chongqing");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(WordUtils_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.lang.StringUtils",
"org.apache.commons.lang.SystemUtils",
"org.apache.commons.lang.WordUtils"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(WordUtils_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.lang.WordUtils",
"org.apache.commons.lang.SystemUtils",
"org.apache.commons.lang.StringUtils"
);
}
}
|
[
"1009479460@qq.com"
] |
1009479460@qq.com
|
5baab3adaad612c779900e4ff92a4d9c92f63454
|
22d8379d28e037f537b27f598f79564b93d9163f
|
/sample-facade/src/main/java/in/hocg/sample/facade/api/IndexController.java
|
2891a921783568ca54c9e33dcb3e27b3f2abe9b7
|
[] |
no_license
|
service-mesh-projects/spring-cloud-sample
|
dac9d65c21b6117736a995bf583357509bdd1e9f
|
ce41775515eac026b3cac66df4c3d54103cb0406
|
refs/heads/master
| 2022-06-26T20:58:23.504469
| 2019-06-09T01:56:17
| 2019-06-09T01:56:17
| 190,943,910
| 0
| 0
| null | 2022-06-17T02:12:34
| 2019-06-08T23:16:01
|
Java
|
UTF-8
|
Java
| false
| false
| 367
|
java
|
package in.hocg.sample.facade.api;
import in.hocg.sample.facade.domain.Example;
import java.util.List;
/**
* Created by hocgin on 2019/6/9.
* email: hocgin@gmail.com
*
* @author hocgin
*/
public interface IndexController {
/**
* Hi
*/
void hi();
void insert();
Example queryOne();
List<Example> queryAll();
}
|
[
"hocgin@gmail.com"
] |
hocgin@gmail.com
|
e6b248e9edd561381f7592ada76d33c14bdbbcdb
|
0dea2f104f1b0b01149ba5e25ca8e125d1fe8404
|
/codeforces/1519/D.java
|
cc6cacfa35c4f4b92821e38b94dbebf82feb3faa
|
[] |
no_license
|
sudhanshu-mallick/All-My-Submissions
|
d14f82c38515d6140338daf5b77bdf2675c8aab6
|
68a97691fad0368a4ba4c39576e45ba8462ad3ae
|
refs/heads/master
| 2023-06-22T16:01:20.872407
| 2021-07-03T13:07:00
| 2021-07-26T08:25:14
| 377,220,272
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,053
|
java
|
import java.util.*;
import java.io.*;
public class Maximum_Sum_Of_Products {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
public static void shuffle(int[] a) {
Random r = new Random();
for (int i = 0; i <= a.length - 2; i++) {
int j = i + r.nextInt(a.length - i);
swap(a, i, j);
}
Arrays.sort(a);
}
public static void swap(int[] a, int i, int j) {
int temp = a[i];
a[i] = a[j];
a[j] = temp;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
FastReader t = new FastReader();
PrintWriter o = new PrintWriter(System.out);
int n = t.nextInt();
long[] a = new long[n];
long[] b = new long[n];
long max = 0, total = 0;
for (int i = 0; i < n; ++i)
a[i] = t.nextLong();
for (int i = 0; i < n; ++i) {
b[i] = t.nextLong();
total += a[i] * b[i];
}
max = total;
for (int i = 0; i < n; ++i) {
int x = i - 1, y = i + 1;
long cur = total;
while (x >= 0 && y < n) {
cur = cur - a[x] * b[x] - a[y] * b[y] + a[x] * b[y] + a[y] * b[x];
--x;
++y;
max = Math.max(max, cur);
}
}
for (int i = 0; i < n; ++i) {
long cur = total;
int x = i, y = i + 1;
while (x >= 0 && y < n) {
cur = cur - a[x] * b[x] - a[y] * b[y] + a[x] * b[y] + a[y] * b[x];
--x;
++y;
max = Math.max(max, cur);
}
}
o.println(max);
o.flush();
o.close();
}
}
|
[
"sudhanshumallick9@gmail.com"
] |
sudhanshumallick9@gmail.com
|
fd22018ed17b79a68b86660df00c13accd15a61b
|
ccaa535498e3daa911985bc3fc0e396eaf56e226
|
/spider-55haitao-realtime/src/main/java/com/haitao55/spider/realtime/service/impl/RealtimeStatisticsServiceImpl.java
|
a82cefa0bba3f52014be4fd68cb608412903e895
|
[] |
no_license
|
github4n/spider-55ht
|
d871aad6e51f7cf800032351137b4b3f12d6e86e
|
7c59cda6b5b514139bd69cff2b914e0815f53cd6
|
refs/heads/master
| 2020-03-29T22:44:38.527732
| 2018-02-01T07:53:30
| 2018-02-01T07:53:30
| 150,438,349
| 1
| 0
| null | 2018-09-26T14:19:14
| 2018-09-26T14:19:14
| null |
UTF-8
|
Java
| false
| false
| 1,969
|
java
|
package com.haitao55.spider.realtime.service.impl;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haitao55.spider.common.dao.RealtimeStatisticsDAO;
import com.haitao55.spider.common.dos.RealtimeStatisticsDO;
import com.haitao55.spider.common.service.impl.BaseService;
import com.haitao55.spider.realtime.service.RealtimeStatisticsService;
/**
* RealtimeStatistics Service 实现类
* Title:
* Description:
* Company: 55海淘
* @author zhaoxl
* @date 2017年1月19日 下午2:23:55
* @version 1.0
*/
@Service("realtimeStatisticsService")
public class RealtimeStatisticsServiceImpl extends BaseService<RealtimeStatisticsDO> implements RealtimeStatisticsService {
@Autowired
private RealtimeStatisticsDAO realtimeStatisticsDAO;
/**
* save or update
*/
@Override
public void saveOrUpdate(RealtimeStatisticsDO realtimeStatisticsDO) {
String realtimeTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
realtimeStatisticsDO.setRealtimeTime(realtimeTime);
RealtimeStatisticsDO selectByKey = realtimeStatisticsDAO.findByPrimaryKey(realtimeStatisticsDO.getTaskId(),realtimeTime);
if(null == selectByKey){
this.save(realtimeStatisticsDO);
}else{
int crawler = selectByKey.getCrawler();
if(0 != realtimeStatisticsDO.getCrawler()){
crawler = crawler +1;
}
int mongo = selectByKey.getMongo();
if(0 != realtimeStatisticsDO.getMongo()){
mongo = mongo+1;
}
int redis = selectByKey.getRedis();
if(0 != realtimeStatisticsDO.getRedis()){
redis = redis+1;
}
int exception = selectByKey.getException();
if(0 != realtimeStatisticsDO.getException()){
exception = exception+1;
}
selectByKey.setCrawler(crawler);
selectByKey.setMongo(mongo);
selectByKey.setRedis(redis);
selectByKey.setException(exception);
this.updateNotNull(selectByKey);
}
}
}
|
[
"liusz_ok@126.com"
] |
liusz_ok@126.com
|
557d1f2a057e1f550b89ad92e0e979aa4eabba3e
|
2d66a5012b7f7763eb58bd93e9a71241614123c8
|
/ezcloud-wechat/src/main/java/com/ezcloud/framework/weixin/service/BaseWeiXinProcessWervice.java
|
d889f062078c6242d8025bcf431c0fd089692714
|
[] |
no_license
|
javakaka/ezcloud-dev
|
98c8f1e6fc9125fce597ad52e6c24ce11d933e03
|
e67643aa609c0f095825881bff7a27afa9a919f0
|
refs/heads/master
| 2020-04-12T09:35:16.702707
| 2017-01-27T05:20:09
| 2017-01-27T05:20:09
| 62,430,591
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,820
|
java
|
package com.ezcloud.framework.weixin.service;
import com.ezcloud.framework.weixin.model.Message;
import com.ezcloud.framework.weixin.model.OutMessage;
public abstract class BaseWeiXinProcessWervice {
/**
* 对微信请求进行业务处理
* @author Administrator
*/
/****接收微信发来的请求消息类型**/
//接收的文本消息
public static final String REQUEST_MSG_TYPE_TEXT ="text";
//接收的图片消息
public static final String REQUEST_MSG_TYPE_IMAGE ="image";
//接收的语音消息
public static final String REQUEST_MSG_TYPE_VOICE ="voice";
//接收的语音识别消息
public static final String REQUEST_MSG_TYPE_VOICE_RECOGNITION ="voice_recognition";
//接收的视频消息
public static final String REQUEST_MSG_TYPE_VIDEO ="video";
//接收的地理位置消息
public static final String REQUEST_MSG_TYPE_LOCATION ="location";
//接收的链接消息
public static final String REQUEST_MSG_TYPE_LINK ="link";
//接收的事件消息
public static final String REQUEST_MSG_TYPE_EVENT ="event";
//接收的关注事件消息
public static final String REQUEST_MSG_TYPE_EVENT_SUBSCRIBE ="subscribe";
//接收的取消关注事件消息
public static final String REQUEST_MSG_TYPE_EVENT_UNSUBSCRIBE ="unsubscribe";
//接收的未关注时扫描二维码消息
public static final String REQUEST_MSG_TYPE_EVENT_SCAN_UNSUBSCRIBE ="scan_unsubscribe";
//接收的已关注公众号时扫描二维码的消息
public static final String REQUEST_MSG_TYPE_EVENT_SCAN_SUBSCRIBE ="scan_subscribe";
//接收的上报地理位置事件消息
public static final String REQUEST_MSG_TYPE_EVENT_LOCATION ="LOCATION";
//接收的用户点击事件消息
public static final String REQUEST_MSG_TYPE_EVENT_CLICK ="CLICK";
//接收用户的自定义菜单点击事件消息
public static final String REQUEST_MSG_TYPE_EVENT_VIEW ="VIEW";
//接收用户的自定义菜单点击 scancode_push:扫码推事件的事件推送
public static final String REQUEST_MSG_TYPE_EVENT_SCANCODE_PUSH ="scancode_push";
//接收用户的自定义菜单点击 scancode_waitmsg:扫码推事件且弹出“消息接收中”提示框的事件推送
public static final String REQUEST_MSG_TYPE_EVENT_SCANCODE_WAITMSG ="scancode_waitmsg";
//自定义菜单点击 pic_sysphoto:弹出系统拍照发图的事件推送
public static final String REQUEST_MSG_TYPE_EVENT_PIC_SYSPHOTO ="pic_sysphoto";
//自定义菜单点击 pic_photo_or_album:弹出拍照或者相册发图的事件推送
public static final String REQUEST_MSG_TYPE_EVENT_PIC_PHOTO_OR_ALBUM ="pic_photo_or_album";
//自定义菜单点击 pic_weixin:弹出微信相册发图器的事件推送
public static final String REQUEST_MSG_TYPE_EVENT_PIC_WEIXIN ="pic_weixin";
//自定义菜单点击 location_select:弹出地理位置选择器的事件推送
public static final String REQUEST_MSG_TYPE_EVENT_LOCATION_SELECT ="location_select";
/***返回的被动响应消息类型**/
//返回文本消息
public static final String RESPONSE_MESSAGE_TYPE_TEXT = "text";
//返回图片消息
public static final String RESPONSE_MESSAGE_TYPE_IMAGE = "image";
//返回语音消息
public static final String RESPONSE_MESSAGE_TYPE_VOICE = "voice";
//返回视频消息
public static final String RESPONSE_MESSAGE_TYPE_VIDEO = "video";
//返回音乐消息
public static final String RESPONSE_MESSAGE_TYPE_MUSIC = "music";
//返回图文消息
public static final String RESPONSE_MESSAGE_TYPE_NEWS = "news";
/***返回的客服消息类型**/
//客服文本消息
public static final String RESPONSE_CUSTOM_MESSAGE_TYPE_TEXT = "text";
//客服图片消息
public static final String RESPONSE_CUSTOM_MESSAGE_TYPE_IMAGE = "image";
//客服语音消息
public static final String RESPONSE_CUSTOM_MESSAGE_TYPE_VOICE = "voice";
//客服视频消息
public static final String RESPONSE_CUSTOM_MESSAGE_TYPE_VIDEO = "video";
//客服音乐消息
public static final String RESPONSE_CUSTOM_MESSAGE_TYPE_MUSIC = "music";
//客服图文消息
public static final String RESPONSE_CUSTOM_MESSAGE_TYPE_NEWS = "news";
private Message outMsg;
//处理文本请求
public abstract OutMessage handleTextMsgRequest(Object msg);
//处理图片请求
public abstract OutMessage handleImageMsgRequest(Object msg);
//处理普通语音请求
public abstract OutMessage handleVoiceMsgRequest(Object msg);
//处理普通语音请求
public abstract OutMessage handleVoiceRecognitionMsgRequest(Object msg);
//处理视频请求
public abstract OutMessage handleVideoMsgRequest(Object msg);
//处理位置信息请求
public abstract OutMessage handleLocationMsgRequest(Object msg);
//处理链接信息请求
public abstract OutMessage handleLinkMsgRequest(Object msg);
//处理事件
public abstract OutMessage handleEventMsgRequest(Object msg);
//已关注时扫描二维码事件
public abstract OutMessage handleScanSubscribeEventMsgRequest(Object msg);
//未关注时扫描二维码事件
public abstract OutMessage handleScanUnSubscribeEventMsgRequest(Object msg);
//处理上报地理位置事件
public abstract OutMessage handleLocationEventMsgRequest(Object msg);
//处理自定义菜单点击拉取消息事件
public abstract OutMessage handleClickEventMsgRequest(Object msg);
//处理自定义菜单点击拉取消息事件
public abstract OutMessage handleClickViewEventMsgRequest(Object msg);
//处理自定义菜单点击拉取消息事件
public abstract OutMessage handleClickScancodePushEventMsgRequest(Object msg);
//自定义菜单点击 scancode_waitmsg:扫码推事件且弹出“消息接收中”提示框的事件推送
public abstract OutMessage handleClickScancodeWaitmsgEventMsgRequest(Object msg);
//自定义菜单点击 pic_sysphoto:弹出系统拍照发图的事件推送
public abstract OutMessage handleClickPicSysphotoEventMsgRequest(Object msg);
//自定义菜单点击 pic_photo_or_album:弹出拍照或者相册发图的事件推送
public abstract OutMessage handleClickPicPhotoOrAlbumEventMsgRequest(Object msg);
//自定义菜单点击 pic_weixin:弹出微信相册发图器的事件推送
public abstract OutMessage handleClickPicWeixinEventMsgRequest(Object msg);
//自定义菜单点击 location_select:弹出地理位置选择器的事件推送
public abstract OutMessage handleClickLocationSelectEventMsgRequest(Object msg);
//处理关注事件
public abstract OutMessage handleSubscribeEventMsgRequest(Object msg);
//处理取消关注事件
public abstract OutMessage handleUnSubscribeEventMsgRequest(Object msg);
}
|
[
"510836102@qq.com"
] |
510836102@qq.com
|
7df9a232a1cf1b4a4522717b3575eb650ec9182c
|
419e0607d4bb1ff298faca921447ee4b35e5b894
|
/plugins/es-analysis-common/src/main/java/org/elasticsearch/analysis/common/RussianStemTokenFilterFactory.java
|
24bb509530c1b22d70a09c22995954893a75b970
|
[
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] |
permissive
|
crate/crate
|
7af793e2f709b77a5addc617d6e9dbba452d4e68
|
8acb044a7cdbab048b045854d0466fccc2492550
|
refs/heads/master
| 2023-08-31T07:17:42.891453
| 2023-08-30T15:09:09
| 2023-08-30T17:13:14
| 9,342,529
| 3,540
| 639
|
Apache-2.0
| 2023-09-14T21:00:43
| 2013-04-10T09:17:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,548
|
java
|
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch 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.elasticsearch.analysis.common;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.snowball.SnowballFilter;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.analysis.AbstractTokenFilterFactory;
public class RussianStemTokenFilterFactory extends AbstractTokenFilterFactory {
public RussianStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) {
super(indexSettings, name, settings);
}
@Override
public TokenStream create(TokenStream tokenStream) {
return new SnowballFilter(tokenStream, "Russian");
}
}
|
[
"f.mathias@zignar.net"
] |
f.mathias@zignar.net
|
5708c1dc32876251e9b81c5d3d21e4f6fe2f7177
|
02cf6b8c574bdcf7955f844fa236a4a37c6a6c47
|
/app/src/main/java/org/team2767/deadeye/DeadeyeView.java
|
ef5b6355d33e0b5055d2274a07f7473fb290f30d
|
[
"MIT"
] |
permissive
|
strykeforce/deadeye-android
|
e927e116abba3ff6f1b7ebeec283558d9778f6af
|
e070d83c9732de731f3336e697544838175dead2
|
refs/heads/master
| 2021-07-18T04:51:53.642320
| 2021-04-29T09:32:06
| 2021-04-29T09:32:06
| 113,485,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,320
|
java
|
package org.team2767.deadeye;
import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.team2767.deadeye.di.Injector;
import timber.log.Timber;
/** Deadeye main view. */
public class DeadeyeView extends GLSurfaceView {
private final DeadeyeRenderer renderer;
public DeadeyeView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
setEGLContextClientVersion(2);
renderer = Injector.get().deadeyeRendererFactory().create(this);
setRenderer(renderer);
setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
Timber.tag("LifeCycles");
Timber.d("DeadeyeView constructed");
}
public DeadeyeView(Context context) {
this(context, null);
}
public void setHueRange(int low, int high) {
renderer.setHueRange(low, high);
}
public void setSaturationRange(int low, int high) {
renderer.setSaturationRange(low, high);
}
public void setValueRange(int low, int high) {
renderer.setValueRange(low, high);
}
public void setMonitor(FrameProcessor.Monitor monitor) {
renderer.setMonitor(monitor);
}
public void setContour(FrameProcessor.Contours contour) {
renderer.setContours(contour);
}
}
|
[
"jeff@jeffhutchison.com"
] |
jeff@jeffhutchison.com
|
7397ce29ea27c8e4e42345e3af5209c61cb7b08f
|
5d00b27e4022698c2dc56ebbc63263f3c44eea83
|
/gen/com/ah/xml/be/config/ApplicationObj.java
|
0693d4a163d75052e5b636d6eac28652326f324e
|
[] |
no_license
|
Aliing/WindManager
|
ac5b8927124f992e5736e34b1b5ebb4df566770a
|
f66959dcaecd74696ae8bc764371c9a2aa421f42
|
refs/heads/master
| 2020-12-27T23:57:43.988113
| 2014-07-28T17:58:46
| 2014-07-28T17:58:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,690
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.07.01 at 11:29:17 AM CST
//
package com.ah.xml.be.config;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for application-obj complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="application-obj">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="identification" type="{http://www.aerohive.com/configuration/others}application-identification" minOccurs="0"/>
* <element name="reporting" type="{http://www.aerohive.com/configuration/others}application-reporting" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "application-obj", propOrder = {
"identification",
"reporting"
})
public class ApplicationObj {
protected ApplicationIdentification identification;
protected ApplicationReporting reporting;
/**
* Gets the value of the identification property.
*
* @return
* possible object is
* {@link ApplicationIdentification }
*
*/
public ApplicationIdentification getIdentification() {
return identification;
}
/**
* Sets the value of the identification property.
*
* @param value
* allowed object is
* {@link ApplicationIdentification }
*
*/
public void setIdentification(ApplicationIdentification value) {
this.identification = value;
}
/**
* Gets the value of the reporting property.
*
* @return
* possible object is
* {@link ApplicationReporting }
*
*/
public ApplicationReporting getReporting() {
return reporting;
}
/**
* Sets the value of the reporting property.
*
* @param value
* allowed object is
* {@link ApplicationReporting }
*
*/
public void setReporting(ApplicationReporting value) {
this.reporting = value;
}
}
|
[
"zjie@aerohive.com"
] |
zjie@aerohive.com
|
6a48e18a40867ca8f9af04260caef11268b077a5
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/7/7_d2f824d8fc3b422da65b715e837b3bc2d01b2517/CRActivePathRequestProcessor/7_d2f824d8fc3b422da65b715e837b3bc2d01b2517_CRActivePathRequestProcessor_s.java
|
e60c2e3dcdf6bac8c91eb6a87306dace58c2bf34
|
[] |
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
| 6,283
|
java
|
package com.gentics.cr;
import java.util.Collection;
import java.util.Iterator;
import java.util.Vector;
import org.apache.log4j.Logger;
import com.gentics.api.lib.datasource.Datasource;
import com.gentics.api.lib.datasource.DatasourceException;
import com.gentics.api.lib.exception.ParserException;
import com.gentics.api.lib.expressionparser.ExpressionParserException;
import com.gentics.api.lib.expressionparser.filtergenerator.DatasourceFilter;
import com.gentics.api.lib.resolving.Resolvable;
import com.gentics.cr.exceptions.CRException;
import com.gentics.cr.util.ArrayHelper;
import com.gentics.cr.util.RequestWrapper;
/**
* This RequestProcessor fetches the active path from a child element
* passed in the request as contentid to the root element.
* Either a root element is given, or it will go up until there is no further
* parent.
* It does not support doNavigation.
* Last changed: $Date: 2010-04-01 15:24:02 +0200 (Do, 01 Apr 2010) $
* @version $Revision: 541 $
* @author $Author: supnig@constantinopel.at $
*
*/
public class CRActivePathRequestProcessor extends RequestProcessor {
/**
* Root id key.
*/
private static final String ROOT_ID = "rootid";
/**
* Logger.
*/
private static final Logger LOG = Logger
.getLogger(CRActivePathRequestProcessor.class);
/**
* Create a new instance of CRRequestProcessor.
* @param config configuration.
* @throws CRException in case of error.
*/
public CRActivePathRequestProcessor(final CRConfig config)
throws CRException {
super(config);
}
/**
*
* Fetch the matching objects using the given CRRequest.
* @param request CRRequest
* @param doNavigation defines if to fetch children
* @return resulting objects
* @throws CRException in case of error.
*/
public final Collection<CRResolvableBean> getObjects(
final CRRequest request,
final boolean doNavigation)
throws CRException {
Datasource ds = null;
DatasourceFilter dsFilter;
Collection<CRResolvableBean> collection = null;
RequestWrapper rW = request.getRequestWrapper();
String rootId = rW.getParameter(ROOT_ID);
if (request != null) {
// Parse the given expression and create a datasource filter
try {
ds = this.config.getDatasource();
if (ds == null) {
throw (new DatasourceException("No Datasource available."));
}
dsFilter = request.getPreparedFilter(config, ds);
// add base resolvables
if (this.resolvables != null) {
for (Iterator<String> it = this.resolvables
.keySet().iterator(); it.hasNext();) {
String name = it.next();
dsFilter.addBaseResolvable(name,
this.resolvables.get(name));
}
}
CRResolvableBean bean = loadSingle(ds, request);
if (bean != null) {
collection = getParents(ds, bean, rootId, request);
if (collection == null) {
collection = new Vector<CRResolvableBean>();
}
collection.add(bean);
}
} catch (ParserException e) {
LOG.error("Error getting filter for Datasource.", e);
throw new CRException(e);
} catch (ExpressionParserException e) {
LOG.error("Error getting filter for Datasource.", e);
throw new CRException(e);
} catch (DatasourceException e) {
LOG.error("Error getting result from Datasource.", e);
throw new CRException(e);
} finally {
CRDatabaseFactory.releaseDatasource(ds);
}
}
return collection;
}
/**
* Create prefill attributes.
* @param request request object
* @return attributes as string array
*/
private String[] getPrefillAttributes(final CRRequest request) {
String[] prefillAttributes = request.getAttributeArray();
prefillAttributes = ArrayHelper.removeElements(
prefillAttributes,
"contentid", "updatetimestamp");
return prefillAttributes;
}
/**
* Fetch a single element.
* @param ds datasource
* @param request request
* @return element
* @throws DatasourceException in case of error
* @throws ParserException in case of error
* @throws ExpressionParserException in case of error
*/
private CRResolvableBean loadSingle(final Datasource ds,
final CRRequest request)
throws DatasourceException, ParserException,
ExpressionParserException {
CRResolvableBean bean = null;
String[] attributes = getPrefillAttributes(request);
Collection<Resolvable> col = this.toResolvableCollection(ds.getResult(
request.getPreparedFilter(config, ds),
attributes,
request.getStart().intValue(),
request.getCount().intValue(),
request.getSorting()));
if (col != null && col.size() > 0) {
bean = new CRResolvableBean(col.iterator().next(), attributes);
}
return bean;
}
/**
* Fetches the parents.
* @param ds datasource
* @param current current child element
* @param rootContentId id of the desired root
* @param request request object
* @return collection of parrents.
* @throws CRException
* @throws ExpressionParserException
* @throws ParserException
* @throws DatasourceException
*/
private Collection<CRResolvableBean> getParents(final Datasource ds,
final CRResolvableBean current, final String rootContentId,
final CRRequest request) throws CRException,
DatasourceException, ParserException, ExpressionParserException {
Collection<CRResolvableBean> ret = null;
String mother = current.getMother_id();
if (mother != null && !(current.getMother_type() + "." + mother)
.equals(rootContentId) && !"0".equals(mother)) {
CRRequest nRequest = request.Clone();
nRequest.setRequestFilter(null);
nRequest.setContentid(current.getMother_type() + "." + mother);
CRResolvableBean parent = loadSingle(ds, nRequest);
ret = getParents(ds, parent, rootContentId, nRequest);
if (ret == null) {
ret = new Vector<CRResolvableBean>();
}
ret.add(parent);
}
return ret;
}
@Override
public void finalize() {
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
107d3dbece408545b315bdb603f63d1cfc472d5b
|
ff17aa326a62de027a014fab99a652f593c7381f
|
/module_mine/src/main/java/com/example/operator/OperatorView.java
|
b05714812eb0f2e90f97b400d52b1741623bea06
|
[] |
no_license
|
majiaxue/jikehui
|
401aa2db1a3846bbbef9d29a29cdb934cb18b4c2
|
9b30feb8dbf058954fe59676303fd260ab5282c8
|
refs/heads/master
| 2022-08-22T18:25:08.014789
| 2020-05-23T10:40:22
| 2020-05-23T10:40:22
| 263,837,386
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 384
|
java
|
package com.example.operator;
import android.support.v4.view.PagerAdapter;
import com.example.mvp.IView;
import com.example.operator.adapter.YysFactorAdapter;
import com.example.operator.adapter.YysQuanyiAdapter;
public interface OperatorView extends IView {
void loadQuanyi(YysQuanyiAdapter adapter);
void loadVp(PagerAdapter adapter);
void loadFactor(String s);
}
|
[
"ellliot_zhang_z@163.com"
] |
ellliot_zhang_z@163.com
|
61fefa6b251e37e3e9df4a2ada3065a40bacf7d5
|
04ff09bc1c3178fc020a2d17e318d5b29da599e6
|
/main/src/main/java/com/sxjs/jd/composition/login/changepassage/ChangePasswordPresenterModule.java
|
46bf3acb0eb71f6d33796cead8e81c22f73da8e4
|
[
"Apache-2.0"
] |
permissive
|
XiePengLearn/refactor-frontend-android
|
b9b820007ed216c20b7b590c39639e161c63bbdc
|
5a08db4065ae4d7a9dc676a4d5328c8f928a8167
|
refs/heads/master
| 2020-07-26T08:45:39.313596
| 2019-09-26T09:00:15
| 2019-09-26T09:00:15
| 208,593,612
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 747
|
java
|
package com.sxjs.jd.composition.login.changepassage;
import com.sxjs.jd.MainDataManager;
import dagger.Module;
import dagger.Provides;
/**
* @Auther: xp
* @Date: 2019/9/15 10:49
* @Description:
*/
@Module
public class ChangePasswordPresenterModule {
private ChangePasswordContract.View view;
private MainDataManager mainDataManager;
public ChangePasswordPresenterModule(ChangePasswordContract.View view, MainDataManager mainDataManager) {
this.view = view;
this.mainDataManager = mainDataManager;
}
@Provides
ChangePasswordContract.View providerMainContractView() {
return view;
}
@Provides
MainDataManager providerMainDataManager() {
return mainDataManager;
}
}
|
[
"769783182@qq.com"
] |
769783182@qq.com
|
26ed2e1dfc43894aed0b78eb3e6181f14e213a53
|
5f14a75cb6b80e5c663daa6f7a36001c9c9b778c
|
/src/com/ubercab/payment/internal/vendor/baidu/BaiduApi.java
|
3a75f4af7f181364775a99cdb77fa1d089b94ce3
|
[] |
no_license
|
MaTriXy/com.ubercab
|
37b6f6d3844e6a63dc4c94f8b6ba6bb4eb0118fb
|
ccd296d27e0ecf5ccb46147e8ec8fb70d2024b2c
|
refs/heads/master
| 2021-01-22T11:16:39.511861
| 2016-03-19T20:58:25
| 2016-03-19T20:58:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 568
|
java
|
package com.ubercab.payment.internal.vendor.baidu;
import com.ubercab.payment.internal.vendor.baidu.model.AuthorizationDetails;
import retrofit.Callback;
import retrofit.http.GET;
import retrofit.http.Query;
abstract interface BaiduApi
{
@GET("/rt/riders/baidu-wallet/connect")
public abstract void getAuthorizationDetails(@Query("pageUrl") String paramString, Callback<AuthorizationDetails> paramCallback);
}
/* Location:
* Qualified Name: com.ubercab.payment.internal.vendor.baidu.BaiduApi
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
12f791bc3ff49050c6498adcaf498055daf1fad0
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE80_XSS/CWE80_XSS__CWE182_getCookies_Servlet_06.java
|
701dd8ffedbc1bb13e8ebdaa67ebe69744d589b5
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 5,380
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE80_XSS__CWE182_getCookies_Servlet_06.java
Label Definition File: CWE80_XSS__CWE182.label.xml
Template File: sources-sink-06.tmpl.java
*/
/*
* @description
* CWE: 80 Cross Site Scripting (XSS)
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* GoodSource: A hardcoded string
* BadSink: Display of data in web page after using replaceAll() to remove script tags, which will still allow XSS (CWE 182: Collapse of Data into Unsafe Value)
* Flow Variant: 06 Control flow: if(private_final_five==5) and if(private_final_five!=5)
*
* */
package testcases.CWE80_XSS;
import testcasesupport.*;
import javax.servlet.http.*;
import javax.servlet.http.*;
public class CWE80_XSS__CWE182_getCookies_Servlet_06 extends AbstractTestCaseServlet
{
/* The variable below is declared "final", so a tool should be able
to identify that reads of this will always give its initialized
value. */
private final int private_final_five = 5;
/* uses badsource and badsink */
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
if(private_final_five == 5)
{
data = ""; /* 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 */
data = cookieSources[0].getValue();
}
}
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: Use a hardcoded string */
data = "foo";
}
if (data != null)
{
/* POTENTIAL FLAW: Display of data in web page after using replaceAll() to remove script tags, which will still allow XSS with strings like <scr<script>ipt> (CWE 182: Collapse of Data into Unsafe Value) */
response.getWriter().println("<br>bad(): data = " + data.replaceAll("(<script>)", ""));
}
}
/* goodG2B1() - use goodsource and badsink by changing private_final_five==5 to private_final_five!=5 */
private void goodG2B1(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
if(private_final_five != 5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
data = ""; /* 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 */
data = cookieSources[0].getValue();
}
}
}
else {
/* FIX: Use a hardcoded string */
data = "foo";
}
if (data != null)
{
/* POTENTIAL FLAW: Display of data in web page after using replaceAll() to remove script tags, which will still allow XSS with strings like <scr<script>ipt> (CWE 182: Collapse of Data into Unsafe Value) */
response.getWriter().println("<br>bad(): data = " + data.replaceAll("(<script>)", ""));
}
}
/* goodG2B2() - use goodsource and badsink by reversing statements in if */
private void goodG2B2(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
if(private_final_five == 5)
{
/* FIX: Use a hardcoded string */
data = "foo";
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
data = ""; /* 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 */
data = cookieSources[0].getValue();
}
}
}
if (data != null)
{
/* POTENTIAL FLAW: Display of data in web page after using replaceAll() to remove script tags, which will still allow XSS with strings like <scr<script>ipt> (CWE 182: Collapse of Data into Unsafe Value) */
response.getWriter().println("<br>bad(): data = " + data.replaceAll("(<script>)", ""));
}
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B1(request, response);
goodG2B2(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);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
bcd59a6437c0925faae44b02db63253deb4003af
|
0ad51dde288a43c8c2216de5aedcd228e93590ac
|
/src/com/vmware/converter/ConverterInvalidTargetProductVersion.java
|
c0aef0f0f9be67310f994e18f5264ebec2eaab7f
|
[] |
no_license
|
YujiEda/converter-sdk-java
|
61c37b2642f3a9305f2d3d5851c788b1f3c2a65f
|
bcd6e09d019d38b168a9daa1471c8e966222753d
|
refs/heads/master
| 2020-04-03T09:33:38.339152
| 2019-02-11T15:19:04
| 2019-02-11T15:19:04
| 155,151,917
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,684
|
java
|
/**
* ConverterInvalidTargetProductVersion.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.vmware.converter;
public class ConverterInvalidTargetProductVersion extends com.vmware.converter.ConverterConverterFault implements java.io.Serializable {
private java.lang.String targetProductVersion;
public ConverterInvalidTargetProductVersion() {
}
public ConverterInvalidTargetProductVersion(
com.vmware.converter.LocalizedMethodFault faultCause,
com.vmware.converter.LocalizableMessage[] faultMessage,
java.lang.String targetProductVersion) {
super(
faultCause,
faultMessage);
this.targetProductVersion = targetProductVersion;
}
/**
* Gets the targetProductVersion value for this ConverterInvalidTargetProductVersion.
*
* @return targetProductVersion
*/
public java.lang.String getTargetProductVersion() {
return targetProductVersion;
}
/**
* Sets the targetProductVersion value for this ConverterInvalidTargetProductVersion.
*
* @param targetProductVersion
*/
public void setTargetProductVersion(java.lang.String targetProductVersion) {
this.targetProductVersion = targetProductVersion;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof ConverterInvalidTargetProductVersion)) return false;
ConverterInvalidTargetProductVersion other = (ConverterInvalidTargetProductVersion) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj) &&
((this.targetProductVersion==null && other.getTargetProductVersion()==null) ||
(this.targetProductVersion!=null &&
this.targetProductVersion.equals(other.getTargetProductVersion())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getTargetProductVersion() != null) {
_hashCode += getTargetProductVersion().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(ConverterInvalidTargetProductVersion.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:converter", "ConverterInvalidTargetProductVersion"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("targetProductVersion");
elemField.setXmlName(new javax.xml.namespace.QName("urn:converter", "targetProductVersion"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
/**
* Writes the exception data to the faultDetails
*/
public void writeDetails(javax.xml.namespace.QName qname, org.apache.axis.encoding.SerializationContext context) throws java.io.IOException {
context.serialize(qname, null, this);
}
}
|
[
"yuji_eda@dwango.co.jp"
] |
yuji_eda@dwango.co.jp
|
4f0b69b86c4b9824abf14ab929730fca1d075e1a
|
3d846bff897cfeae52c2fc29ee6725d3c098c3c2
|
/src/com/tsekhanovich/functional/practice6/Task2.java
|
76756f5aa2fdcf8a3f0997e975d6fc46933d0c3a
|
[] |
no_license
|
PavelTsekhanovich/JavaFunctional
|
2f250ab3d90472e7473fb6d697ca42443e6f9f37
|
a33a281ac0a062d2f9f21de5095b1c0fb38dad35
|
refs/heads/master
| 2021-06-26T03:25:24.471267
| 2020-10-21T14:19:09
| 2020-10-21T14:19:09
| 157,601,666
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 892
|
java
|
package com.tsekhanovich.functional.practice6;
import java.util.function.Function;
/**
* @author Pavel Tsekhanovcih 10.11.2018
* <p>
* Using closure write a lambda expression that adds prefix (before) and suffix (after) to its single string argument;
* prefix and suffix are final variables and will be available in the context during testing.
* All whitespaces on the both ends of the argument must be removed. Do not trim prefix, suffix and the result string.
* Solution format. Submit your lambda expression in any valid format with ; on the end.
* <p>
* Examples: (x, y) -> x + y; (x, y) -> { return x + y; }
*/
public class Task2 {
public static void main(String[] args) {
String prefix = "<";
String suffix = ">";
Function<String, String> example1 = s -> prefix + s.trim() + suffix;
System.out.println(example1.apply("Test"));
}
}
|
[
"p.tsekhanovich93@gmail.com"
] |
p.tsekhanovich93@gmail.com
|
8da8d7781b68aff5ec66c70539cfadba3bd78caa
|
f86938ea6307bf6d1d89a07b5b5f9e360673d9b8
|
/CodeComment_Data/Code_Jam/val/Revenge_of_the_Pancakes/S/pancakes(147).java
|
d8e4ff1277f1407f338068c569c805bbcab22aa3
|
[] |
no_license
|
yxh-y/code_comment_generation
|
8367b355195a8828a27aac92b3c738564587d36f
|
2c7bec36dd0c397eb51ee5bd77c94fa9689575fa
|
refs/heads/master
| 2021-09-28T18:52:40.660282
| 2018-11-19T14:54:56
| 2018-11-19T14:54:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,604
|
java
|
package methodEmbedding.Revenge_of_the_Pancakes.S.LYD798;
//DANIEL YANG CODEJAM
import java.util.*;
import java.math.*;
import java.io.*;
import java.lang.*;
public class pancakes{
public static void main(String args[]) throws IOException
{
BufferedReader f = new BufferedReader(new FileReader("pancakes.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("pancakes.out")));
StringTokenizer st = new StringTokenizer(f.readLine());
int N = Integer.parseInt(st.nextToken());
String temp, x;
int caseNum = 1;
int result = 0;
for(int z = 0; z < N; z++)
{
temp = f.readLine();
//System.out.println(temp);
for(int i = temp.length()-1; i >= 0; i--)//if last character is +/-
{
if(temp.charAt(i) == '+')
continue;
else
{
for(int k = 0; k <= i; k++)//flips pancake
{
if(temp.charAt(k) == '+')
x = temp.substring(0, k) + "-" + temp.substring(k+1);
else
x = temp.substring(0, k) + "+" + temp.substring(k+1);
//System.out.println(temp.substring(0, k)+ " " + temp.substring(k+1));
temp = x;
// System.out.println(temp);
}
}
result ++;
}
out.println("Case #" + caseNum + ": " + result);
caseNum++;
result = 0;
}
out.close();
}
}
|
[
"liangyuding@sjtu.edu.cn"
] |
liangyuding@sjtu.edu.cn
|
c72a4883dbe253e7ce573e5d3a199d0a127d7a2c
|
1506ae5c46a08f0d6dcd122251aeb3a3a149c8fb
|
/app/src/main/java/com/whoami/gcxhzz/until/ObjectUtils.java
|
3afe9c1951bb0964d341ba4145a617881635859b
|
[] |
no_license
|
newPersonKing/gcxhzz
|
b416e1d82a546a69146ebabaee3bd1876bc6b56c
|
07d825efe05d63264908c7dae392bcb923733461
|
refs/heads/master
| 2020-04-22T19:18:48.522149
| 2019-08-30T00:41:16
| 2019-08-30T00:41:16
| 170,604,135
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,552
|
java
|
package com.whoami.gcxhzz.until;
import java.util.List;
import java.util.Map;
/**
* 对象判断
* Created by Josn on 2017/11/10.
*/
public class ObjectUtils {
/**
* 判断字符串是否为空,
* @param obj
* @return
*/
public static final boolean isNull(Object obj) {
if(obj == null) return true;
String type = obj.getClass().getSimpleName();
switch (type) {
case "String":
String str = (String) obj;
if (str == null /*|| str.isEmpty()*/ || str.equals("null") || str.equals(""))
return true;
break;
case "List":
case "ArrayList":
case "LinkedList":
List list = (List) obj;
if (list == null /*|| list.isEmpty()*/)
return true;
break;
case "Map":
case "HashMap":
case "LinkedHashMap":
case "TreeMap":
Map map = (Map) obj;
if (map == null /*|| map.isEmpty()*/)
return true;
break;
default:
/**
* 在判断一次
*/
if (null == obj || "".equals(obj)||"null".equals(obj)||"".equals(obj.toString().trim())) {
return true;
}
break;
}
return false;
}
public static final boolean isNotNull(Object obj){
return !isNull(obj);
}
}
|
[
"guoyong@emcc.net.com"
] |
guoyong@emcc.net.com
|
0af5d59cf94621f2bdc9f7b17d66cb20960c6e33
|
c8688db388a2c5ac494447bac90d44b34fa4132c
|
/sources/com/google/android/gms/internal/ads/ih0.java
|
f62513d583c4864417162d78637d18b510accfc5
|
[] |
no_license
|
mred312/apk-source
|
98dacfda41848e508a0c9db2c395fec1ae33afa1
|
d3ca7c46cb8bf701703468ddc88f25ba4fb9d975
|
refs/heads/master
| 2023-03-06T05:53:50.863721
| 2021-02-23T13:34:20
| 2021-02-23T13:34:20
| 341,481,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 538
|
java
|
package com.google.android.gms.internal.ads;
import android.app.Activity;
import android.app.Application;
/* compiled from: com.google.android.gms:play-services-ads@@19.5.0 */
final class ih0 implements zzrf {
/* renamed from: a */
private final /* synthetic */ Activity f9326a;
ih0(gh0 gh0, Activity activity) {
this.f9326a = activity;
}
public final void zza(Application.ActivityLifecycleCallbacks activityLifecycleCallbacks) {
activityLifecycleCallbacks.onActivityStarted(this.f9326a);
}
}
|
[
"mred312@gmail.com"
] |
mred312@gmail.com
|
5e68688ad0da0e50c054de9828033f6a41ed08df
|
33a5fcf025d92929669d53cf2dc3f1635eeb59c6
|
/成都机动车/core/src/main/java/com/mapuni/core/utils/ToastUtils.java
|
f1b661e93e7ba64a5b5beff280d1d889036568a9
|
[] |
no_license
|
dayunxiang/MyHistoryProjects
|
2cacbe26d522eeb3f858d69aa6b3c77f3c533f37
|
6e041f53a184e7c4380ce25f5c0274aa10f06c8e
|
refs/heads/master
| 2020-11-29T09:23:27.085614
| 2018-03-12T07:07:18
| 2018-03-12T07:07:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 694
|
java
|
package com.mapuni.core.utils;
import android.content.Context;
import android.widget.Toast;
public class ToastUtils {
private static Toast mToast;
/**
* 非阻塞试显示Toast,防止出现连续点击Toast时的显示问题
*/
public static void showToast(Context context, CharSequence text, int duration) {
if (mToast == null) {
mToast = Toast.makeText(context, text, duration);
} else {
mToast.setText(text);
mToast.setDuration(duration);
}
mToast.show();
}
public static void showToast(Context context, CharSequence text) {
showToast(context, text, Toast.LENGTH_SHORT);
}
}
|
[
"you@example.com"
] |
you@example.com
|
58a4b4e5496b13f12fb0909a27c4ca6ab4abd7ce
|
ed2fa0fc455cb4a56669b34639bb95b25c6b7f83
|
/wen-13/sys/src/main/java/nancy/Dao/studentDao.java
|
06545338e5b890f06ecafe97e9ec738845e98632
|
[] |
no_license
|
w7436/wen-Java
|
5bcc2b09faa478196218e46ff64cd23ba64da441
|
6fc9f2a336c512a0d9be70c69950ad5610b3b152
|
refs/heads/master
| 2022-11-27T07:51:28.158473
| 2020-09-11T03:49:41
| 2020-09-11T03:49:41
| 210,778,808
| 0
| 0
| null | 2022-11-16T08:36:03
| 2019-09-25T07:08:33
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 4,359
|
java
|
package nancy.Dao;
import nancy.Util.DBUtil;
import nancy.exception.SystemException;
import nancy.model.student;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
/**
* @ClassName studentDao
* @Description TODO
* @Author DELL
* @Data 2020/7/1 12:55
* @Version 1.0
**/
public class studentDao {
/**
* 学生登录
* @return
* @throws Exception
*/
public static boolean login(Connection con,int id,String password)throws Exception{
String sql="select * from student where Id=? and password=?";
PreparedStatement pstmt=con.prepareStatement(sql);
pstmt.setInt(1,id);
pstmt.setString(2,password);
ResultSet rs=pstmt.executeQuery();
if(!rs.next()){
System.out.println("登录失败");
return false;
}else{
System.out.println("登录成功");
return true;
}
}
//学生信息查询
public static List<student> queryList(Connection c){
PreparedStatement p =null;
ResultSet r = null;
String sql ="select * from student ";
List<student> list = new ArrayList<student>();
try {
p = c.prepareStatement(sql);
r = p.executeQuery();
while(r.next()){
student stu = new student();
stu.setId(r.getInt("Id"));
stu.setName(r.getString("name"));
stu.setSex(r.getString("sex"));
stu.setBirthday(r.getDate("bithday"));
stu.setPassword(r.getString("password"));
stu.setDepart(r.getString("depart"));
stu.setPhone(r.getString("phone"));
stu.setEmail(r.getString("email"));
list.add(stu);
}
return list;
} catch (SQLException e) {
throw new SystemException("查询出错");
} finally {
DBUtil.close(c,p,r);
}
}
//学生添加
public static int studentAdd(Connection con,student stu)throws Exception{
String sql="insert into student values(null,?,?,?,?,?,?,?)";
PreparedStatement pstmt=con.prepareStatement(sql);
pstmt.setString(1, stu.getName());
pstmt.setString(2, stu.getSex());
pstmt.setDate(3, (Date) stu.getBirthday());
pstmt.setString(4,stu.getPassword());
pstmt.setString(5, stu.getDepart());
pstmt.setString(6, stu.getPhone());
pstmt.setString(7,stu.getEmail());
return pstmt.executeUpdate();
}
//更改学生密码
public static boolean studentUpdate(Connection con,int id,String password)throws Exception{
String sql="update student set password=? where Id=?";
PreparedStatement pstmt=con.prepareStatement(sql);
pstmt.setString(1, password);
pstmt.setInt(2, id);
int line = pstmt.executeUpdate();
return line > 0 ? true :false;
}
/**
* 学生删除
* @param con
* @param id
* @return
* @throws Exception
*/
public static int studentDelete(Connection con,int id)throws Exception{
String sql="delete from student where Id=?";
PreparedStatement pstmt=con.prepareStatement(sql);
pstmt.setInt(1, id);
return pstmt.executeUpdate();
}
//根据姓名查询个人信息
public static student qustudent(Connection c,int id)throws Exception{
PreparedStatement p =null;
ResultSet r = null;
String sql ="select * from student where Id = ? ";
student stu = new student();
try {
p = c.prepareStatement(sql);
p.setInt(1,id);
r = p.executeQuery();
while(r.next()){
stu.setId(id);
stu.setName(r.getString("name"));
stu.setSex(r.getString("sex"));
stu.setBirthday(r.getDate("bithday"));
stu.setPassword(r.getString("password"));
stu.setDepart(r.getString("depart"));
stu.setPhone(r.getString("phone"));
stu.setEmail(r.getString("email"));
}
return stu;
} catch (SQLException e) {
throw new SystemException("查询出错");
} finally {
DBUtil.close(c,p,r);
}
}
}
|
[
"3239741254@qq.com"
] |
3239741254@qq.com
|
a01bd9ff18a73deb5d8a39767d2d43a33bc5701e
|
53189efbfed5423821a84f631da404d07a80e404
|
/storage/app/Al-QuranIndonesia_com.andi.alquran.id_source_from_JADX/com/google/android/gms/tagmanager/ar.java
|
fe90815fd1af35923678ff772ec901ab82204ab4
|
[
"MIT"
] |
permissive
|
dwijpr/islam
|
0c9b77028d34862b6d06858c5b0d6ffec91b5014
|
6077291a619ac2f5b30a77e284c0a7361e7c8ad4
|
refs/heads/master
| 2021-01-19T17:16:49.818251
| 2017-03-13T23:00:08
| 2017-03-13T23:00:08
| 82,430,213
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,004
|
java
|
package com.google.android.gms.tagmanager;
import android.util.Log;
public class ar implements C2214o {
private int f7088a;
public ar() {
this.f7088a = 5;
}
public void m10207a(String str) {
if (this.f7088a <= 6) {
Log.e("GoogleTagManager", str);
}
}
public void m10208a(String str, Throwable th) {
if (this.f7088a <= 6) {
Log.e("GoogleTagManager", str, th);
}
}
public void m10209b(String str) {
if (this.f7088a <= 5) {
Log.w("GoogleTagManager", str);
}
}
public void m10210b(String str, Throwable th) {
if (this.f7088a <= 5) {
Log.w("GoogleTagManager", str, th);
}
}
public void m10211c(String str) {
if (this.f7088a <= 4) {
Log.i("GoogleTagManager", str);
}
}
public void m10212d(String str) {
if (this.f7088a <= 2) {
Log.v("GoogleTagManager", str);
}
}
}
|
[
"dwijpr@gmail.com"
] |
dwijpr@gmail.com
|
ef6243a39507b804965ea53287690427c84ada0c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_564ef2858cf8a41f0bf62af1c7dae6d83c526a6b/ViewApplication/10_564ef2858cf8a41f0bf62af1c7dae6d83c526a6b_ViewApplication_t.java
|
08a50dbe89ab2088eda7a53dee72026f4f596c78
|
[] |
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
| 6,523
|
java
|
package com.sun.identity.admin.model;
import com.sun.identity.admin.ManagedBeanResolver;
import com.sun.identity.admin.Resources;
import com.sun.identity.admin.dao.ViewApplicationTypeDao;
import com.sun.identity.entitlement.Application;
import com.sun.identity.entitlement.ApplicationManager;
import com.sun.identity.entitlement.EntitlementException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class ViewApplication implements Serializable {
private String name;
private ViewApplicationType viewApplicationType;
private List<Resource> resources = new ArrayList<Resource>();
private List<Action> actions = new ArrayList<Action>();
private List<ConditionType> conditionTypes = new ArrayList<ConditionType>();
private List<SubjectType> subjectTypes = new ArrayList<SubjectType>();
public ViewApplication(Application a) {
ManagedBeanResolver mbr = new ManagedBeanResolver();
name = a.getName();
// application type
Map<String, ViewApplicationType> entitlementApplicationTypeToViewApplicationTypeMap = (Map<String, ViewApplicationType>) mbr.resolve("entitlementApplicationTypeToViewApplicationTypeMap");
viewApplicationType = entitlementApplicationTypeToViewApplicationTypeMap.get(a.getApplicationType().getName());
// resources
for (String resourceString : a.getResources()) {
Resource r;
try {
r = (Resource) Class.forName(viewApplicationType.getResourceClassName()).newInstance();
} catch (ClassNotFoundException cnfe) {
throw new RuntimeException(cnfe);
} catch (InstantiationException ie) {
throw new RuntimeException(ie);
} catch (IllegalAccessException iae) {
throw new RuntimeException(iae);
}
r.setName(resourceString);
resources.add(r);
}
// actions
for (String actionName : a.getActions().keySet()) {
Boolean value = a.getActions().get(actionName);
BooleanAction ba = new BooleanAction();
ba.setName(actionName);
ba.setAllow(value.booleanValue());
actions.add(ba);
}
// conditions
ConditionTypeFactory ctf = (ConditionTypeFactory) mbr.resolve("conditionTypeFactory");
for (String viewConditionClassName : a.getConditions()) {
Class c;
try {
c = Class.forName(viewConditionClassName);
} catch (ClassNotFoundException cnfe) {
// TODO: log
continue;
}
ConditionType ct = ctf.getConditionType(c);
assert (ct != null);
conditionTypes.add(ct);
}
// subjects
SubjectFactory sf = (SubjectFactory) mbr.resolve("subjectFactory");
for (String viewSubjectClassName : a.getSubjects()) {
SubjectType st = sf.getSubjectType(viewSubjectClassName);
assert (st != null);
subjectTypes.add(st);
}
}
public List<SubjectContainer> getSubjectContainers() {
ManagedBeanResolver mbr = new ManagedBeanResolver();
SubjectFactory sf = (SubjectFactory) mbr.resolve("subjectFactory");
List<SubjectContainer> subjectContainers = new ArrayList<SubjectContainer>();
for (SubjectType st : subjectTypes) {
SubjectContainer sc = sf.getSubjectContainer(st);
if (sc != null && sc.isVisible()) {
subjectContainers.add(sc);
}
}
return subjectContainers;
}
public List<SubjectType> getExpressionSubjectTypes() {
List<SubjectType> ests = new ArrayList<SubjectType>();
for (SubjectType st: subjectTypes) {
if (st.isExpression()) {
ests.add(st);
}
}
return ests;
}
public List<ConditionType> getExpressionConditionTypes() {
List<ConditionType> ects = new ArrayList<ConditionType>();
for (ConditionType ct: conditionTypes) {
if (ct.isExpression()) {
ects.add(ct);
}
}
return ects;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTitle() {
Resources r = new Resources();
String title = r.getString(this, "title." + name);
return title;
}
public ViewApplicationType getViewApplicationType() {
return viewApplicationType;
}
public void setViewApplicationType(ViewApplicationType viewApplicationType) {
this.viewApplicationType = viewApplicationType;
}
public List<Resource> getResources() {
return resources;
}
public void setResources(List<Resource> resources) {
this.resources = resources;
}
public List<Action> getActions() {
return actions;
}
public void setActions(List<Action> actions) {
this.actions = actions;
}
public Application toApplication(ViewApplicationTypeDao viewApplicationTypeDao) {
//
// this is really just modifies the applications.
//
// TODO: realm
Application app = ApplicationManager.getApplication("/", name);
// resources
Set<String> resourceStrings = new HashSet<String>();
for (Resource r : resources) {
resourceStrings.add(r.getName());
}
app.addResources(resourceStrings);
// actions
Map appActions = app.getActions();
for (Action action : actions) {
if (!appActions.containsKey(action.getName())) {
try {
app.addAction(action.getName(), (Boolean) action.getValue());
} catch (EntitlementException ex) {
//TODO
}
}
}
// conditions
//TODO
return app;
}
public List<ConditionType> getConditionTypes() {
return conditionTypes;
}
public void setConditionTypes(List<ConditionType> conditionTypes) {
this.conditionTypes = conditionTypes;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
fbb57188b63499bea3c3c9f49fc816b59db60346
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava14/Foo958Test.java
|
1c7db78d167ac2238afe320267d305fe1ce65d80
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package applicationModulepackageJava14;
import org.junit.Test;
public class Foo958Test {
@Test
public void testFoo0() {
new Foo958().foo0();
}
@Test
public void testFoo1() {
new Foo958().foo1();
}
@Test
public void testFoo2() {
new Foo958().foo2();
}
@Test
public void testFoo3() {
new Foo958().foo3();
}
@Test
public void testFoo4() {
new Foo958().foo4();
}
@Test
public void testFoo5() {
new Foo958().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
9c1488afac58799769128097512c6f8921ccc0c5
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/test/com/alibaba/json/bvt/serializer/stream/StreamWriterTest_writeValueString1.java
|
47f543bf2695794654310acb8b0ab87e242c6e65
|
[] |
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
| 744
|
java
|
package com.alibaba.json.bvt.serializer.stream;
import SerializerFeature.BrowserCompatible;
import com.alibaba.fastjson.serializer.SerializeWriter;
import java.io.StringWriter;
import junit.framework.TestCase;
import org.junit.Assert;
public class StreamWriterTest_writeValueString1 extends TestCase {
public void test_0() throws Exception {
StringWriter out = new StringWriter();
SerializeWriter writer = new SerializeWriter(out, 10);
writer.config(BrowserCompatible, true);
Assert.assertEquals(10, writer.getBufferLength());
writer.writeString("abcde12345678\t");
writer.close();
String text = out.toString();
Assert.assertEquals("\"abcde12345678\\t\"", text);
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
03de611153cc71a7c161bb0a72a31671d7291c76
|
9b27636b2781fede56805c6514cc5983f46741b9
|
/src/test/java/com/faceye/test/feature/util/MathUtilsTestCase.java
|
d7d5e13100ddedb55ad98ff6ce95372b3dd7edf5
|
[] |
no_license
|
haipenge/faceye-boot-jpa
|
d05338e242c8eec92d57e2e1ae4d0b9f1295ee9d
|
72b50137c49865a307abd659c8af80971bfeca81
|
refs/heads/master
| 2020-03-07T08:12:44.632397
| 2018-03-30T02:26:20
| 2018-03-30T02:26:20
| 127,371,075
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 408
|
java
|
package com.faceye.test.feature.util;
import org.junit.Assert;
import org.junit.Test;
import com.faceye.feature.util.MathUtil;
import com.faceye.test.feature.service.BaseTestCase;
public class MathUtilsTestCase extends BaseTestCase {
@Test
public void testRand() throws Exception{
int rand =MathUtil.getRandInt(0, 10);
logger.debug(">>FaceYe --> rand is:"+rand);
Assert.assertTrue(rand>0);
}
}
|
[
"haipenge@gmail.com"
] |
haipenge@gmail.com
|
a035c6711ea070a13c9325b43a2d013c9cf49a82
|
473b76b1043df2f09214f8c335d4359d3a8151e0
|
/benchmark/bigclonebenchdata_partial/14007786.java
|
38111f50c34134f4764a6201650bc3267ec097b7
|
[] |
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
| 2,266
|
java
|
class c14007786 {
@Override
protected IStatus run(IProgressMonitor monitor) {
final int BUFFER_SIZE = 1024;
final int DISPLAY_BUFFER_SIZE = 8196;
File sourceFile = new File(_sourceFile);
File destFile = new File(_destFile);
if (sourceFile.exists()) {
try {
Log.getInstance(FileCopierJob.class).debug(String.format("Start copy of %s to %s", _sourceFile, _destFile));
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(destFile));
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(sourceFile));
monitor.beginTask(Messages.getString("FileCopierJob.MainTask") + " " + _sourceFile, (int) ((sourceFile.length() / DISPLAY_BUFFER_SIZE) + 4));
monitor.worked(1);
byte[] buffer = new byte[BUFFER_SIZE];
int stepRead = 0;
int read;
boolean copying = true;
while (copying) {
read = bis.read(buffer);
if (read > 0) {
bos.write(buffer, 0, read);
stepRead += read;
} else {
copying = false;
}
if (monitor.isCanceled()) {
bos.close();
bis.close();
deleteFile(_destFile);
return Status.CANCEL_STATUS;
}
if (stepRead >= DISPLAY_BUFFER_SIZE) {
monitor.worked(1);
stepRead = 0;
}
}
bos.flush();
bos.close();
bis.close();
monitor.worked(1);
} catch (Exception e) {
processError("Error while copying: " + e.getMessage());
}
Log.getInstance(FileCopierJob.class).debug("End of copy.");
return Status.OK_STATUS;
} else {
processError(Messages.getString("FileCopierJob.ErrorSourceDontExists") + sourceFile.getAbsolutePath());
return Status.CANCEL_STATUS;
}
}
}
|
[
"piyush16066@iiitd.ac.in"
] |
piyush16066@iiitd.ac.in
|
07153097fbd30c1178c825169fe0902110b77b45
|
bbc42646d24002abb5db8265415b1442efdd129c
|
/Java/JavaPatternsAndOther/DDD/infrastructure/src/main/java/dev/gaudnik/infrastructure/BeanConfiguration.java
|
e4726793859818fdf551a6b39a4926280cb9a669
|
[] |
no_license
|
wojciechGaudnik/Learning
|
223a162ddddc59aa4cfe49471ce08ba25587cf1b
|
dfffd4ddd453edf7667fe94b0fb4367235579424
|
refs/heads/master
| 2023-03-09T02:21:47.975665
| 2023-01-22T16:09:51
| 2023-01-22T16:09:51
| 201,742,343
| 0
| 0
| null | 2023-03-01T05:35:15
| 2019-08-11T09:10:46
|
C
|
UTF-8
|
Java
| false
| false
| 351
|
java
|
package dev.gaudnik.infrastructure;
import dev.gaudnik.domain.OrderRepository;
import dev.gaudnik.domain.OrderService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
class BeanConfiguration {
@Bean
OrderService orderService(OrderRepository orderRepository) {
}
}
|
[
"wojciech.gaudnik@gmail.com"
] |
wojciech.gaudnik@gmail.com
|
433a06ba8e549487bfbd710bfe9d69967f6e1645
|
82b5d8b58b4ce2a80d18aa8b823c4d1e34026cb6
|
/src/main/java/com/song/jeremy/mapstruct/ItemsMapStruct.java
|
22d63a6828edcd343d852f7c1503bfbbc2d13fd9
|
[] |
no_license
|
songshengping/songshengping
|
e288914af41507d19e2d220839c042c3f19ffbfe
|
263675235b5cc3f06bebf240de50828e0a4039c4
|
refs/heads/master
| 2023-02-10T03:24:35.859251
| 2021-01-10T12:58:59
| 2021-01-10T12:58:59
| 327,382,213
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,243
|
java
|
package com.song.jeremy.mapstruct;
import com.song.jeremy.dbmodel.Items;
import com.song.jeremy.dbmodel.ItemsImg;
import com.song.jeremy.dbmodel.ItemsParam;
import com.song.jeremy.dbmodel.ItemsSpec;
import com.song.jeremy.response.ItemImgDTO;
import com.song.jeremy.response.ItemParamDTO;
import com.song.jeremy.response.ItemSpecDTO;
import com.song.jeremy.response.ItemsDTO;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.factory.Mappers;
import java.util.List;
/**
* @Description TODO
* @Date 2021/1/7 23:28
* @Created by Jeremy
*/
@Mapper(nullValueCheckStrategy= NullValueCheckStrategy.ALWAYS)
public interface ItemsMapStruct {
ItemsMapStruct INSTANCE = Mappers.getMapper(ItemsMapStruct.class);
ItemsDTO toResItems(Items items);
List<ItemsDTO> toResItemsList(List<Items> itemsList);
ItemSpecDTO toResItemsSpec(ItemsSpec itemsSpec);
List<ItemSpecDTO> toResItemsSpecList(List<ItemsSpec> itemsSpecList);
ItemParamDTO toResItemsParam(ItemsParam itemsParam);
List<ItemParamDTO> toResItemsParamList(List<ItemParamDTO> itemsSpecList);
ItemImgDTO toResItemsImg(ItemsImg itemsImg);
List<ItemImgDTO> toResItemsImgList(List<ItemsImg> itemsSpecList);
}
|
[
"="
] |
=
|
05c85aeedd1f8c1e1e833ab26a6678264d97f442
|
3600ae0359126c9c804c508cacc1ddafb911fda6
|
/FinanceApplication/src/shahi/Action/ReportFolder/EPM/beans/ChequeSearch.java
|
793b7518ba5c5d5f13606c632d7e9fee55df29b4
|
[] |
no_license
|
vins667/FinanceApp
|
30a4bc264915f9b61df8e4cf227a6e577297ae8e
|
c03b34f46f1d630aba60041516500ebb8442a8d2
|
refs/heads/master
| 2020-03-19T06:24:11.728711
| 2018-06-04T12:00:39
| 2018-06-04T12:00:39
| 136,016,264
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,173
|
java
|
package shahi.Action.ReportFolder.EPM.beans;
public class ChequeSearch {
private String ckcono;
private String ckdivi;
private String ckyea4;
private String ckbkid;
private String ckchkn;
private String ckspyn;
private String cksunm;
private String ckpycu;
private String ckait1;
private String ckdtpr;
private String ckvser;
private String ckvono;
public ChequeSearch(){
}
public String getCkcono() {
return ckcono;
}
public void setCkcono(String ckcono) {
this.ckcono = ckcono;
}
public String getCkdivi() {
return ckdivi;
}
public void setCkdivi(String ckdivi) {
this.ckdivi = ckdivi;
}
public String getCkyea4() {
return ckyea4;
}
public void setCkyea4(String ckyea4) {
this.ckyea4 = ckyea4;
}
public String getCkbkid() {
return ckbkid;
}
public void setCkbkid(String ckbkid) {
this.ckbkid = ckbkid;
}
public String getCkchkn() {
return ckchkn;
}
public void setCkchkn(String ckchkn) {
this.ckchkn = ckchkn;
}
public String getCkspyn() {
return ckspyn;
}
public void setCkspyn(String ckspyn) {
this.ckspyn = ckspyn;
}
public String getCksunm() {
return cksunm;
}
public void setCksunm(String cksunm) {
this.cksunm = cksunm;
}
public String getCkpycu() {
return ckpycu;
}
public void setCkpycu(String ckpycu) {
this.ckpycu = ckpycu;
}
public String getCkait1() {
return ckait1;
}
public void setCkait1(String ckait1) {
this.ckait1 = ckait1;
}
public String getCkdtpr() {
return ckdtpr;
}
public void setCkdtpr(String ckdtpr) {
this.ckdtpr = ckdtpr;
}
public String getCkvser() {
return ckvser;
}
public void setCkvser(String ckvser) {
this.ckvser = ckvser;
}
public String getCkvono() {
return ckvono;
}
public void setCkvono(String ckvono) {
this.ckvono = ckvono;
}
@Override
public String toString() {
return "ChequeSearch [ckcono=" + ckcono + ", ckdivi=" + ckdivi + ", ckyea4=" + ckyea4 + ", ckbkid=" + ckbkid
+ ", ckchkn=" + ckchkn + ", ckspyn=" + ckspyn + ", cksunm=" + cksunm + ", ckpycu=" + ckpycu
+ ", ckait1=" + ckait1 + ", ckdtpr=" + ckdtpr + ", ckvser=" + ckvser + ", ckvono=" + ckvono + "]";
}
}
|
[
"vins667@gmail.com"
] |
vins667@gmail.com
|
c7d6cae9cd2f4e799ab4e31af8348955c462db5b
|
926fefb45918a4cb6aef0688084b45d8eac19700
|
/javastone/src/main/java/com/hxr/javatone/concurrency/netty/official/worldclock/WorldClockServerInitializer.java
|
837968d28aac7363f76c1453d9e261482d6c5404
|
[] |
no_license
|
hanxirui/for_java
|
1534d19828b4e30056deb4340d5ce0b9fd819f1a
|
14df7f9cb635da16a0ee283bf016dc77ad3cecec
|
refs/heads/master
| 2022-12-25T02:06:30.568892
| 2019-09-06T06:45:36
| 2019-09-06T06:45:36
| 14,199,294
| 1
| 0
| null | 2022-12-16T06:29:53
| 2013-11-07T09:17:09
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,689
|
java
|
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.hxr.javatone.concurrency.netty.official.worldclock;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.protobuf.ProtobufDecoder;
import io.netty.handler.codec.protobuf.ProtobufEncoder;
import io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder;
import io.netty.handler.codec.protobuf.ProtobufVarint32LengthFieldPrepender;
public class WorldClockServerInitializer extends ChannelInitializer<SocketChannel> {
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline p = ch.pipeline();
p.addLast("frameDecoder", new ProtobufVarint32FrameDecoder());
p.addLast("protobufDecoder", new ProtobufDecoder(WorldClockProtocol.Locations.getDefaultInstance()));
p.addLast("frameEncoder", new ProtobufVarint32LengthFieldPrepender());
p.addLast("protobufEncoder", new ProtobufEncoder());
p.addLast("handler", new WorldClockServerHandler());
}
}
|
[
"han_xirui@163.com"
] |
han_xirui@163.com
|
669a032be270aa880a2f799919861fe9f9f12ed6
|
1671d87c2e414de8186570983c65c220888f20b1
|
/第一阶段/Spring2/src/com/atguigu/test/TestSpring.java
|
5efe704c1f013f2477608d367398f29e8d7c8c07
|
[] |
no_license
|
qisirendexudoudou/BigData_0722
|
4f25b508b4c20088d4155abb2d52e1d39c8b0e81
|
e474e6ebcbbfedd12f859f0198238f58b73e5bec
|
refs/heads/master
| 2022-07-21T17:41:47.611707
| 2019-11-16T05:59:11
| 2019-11-16T05:59:11
| 221,875,869
| 0
| 0
| null | 2022-06-21T02:14:43
| 2019-11-15T08:10:07
|
Java
|
UTF-8
|
Java
| false
| false
| 2,042
|
java
|
package com.atguigu.test;
import static org.junit.Assert.*;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.atguigu.entity.User;
public class TestSpring {
/*
* 1. 容器中的对象 是什么时候创建的?
* 对象是随着容器的创建而创建!一个<bean>只会创建一个对象。默认是单例模式!
*
* 2. getBean(): 从容器中取出对象
* getBean(String id): 取出后,需要手动进行类型转换
* getBean(Class T): 取出后,无需进行类型转换
* 前提: 保证容器中只有唯一此类型的对象
*
* getBean(String id,Class T):
* 3. 常见错误:
* NoSuchBeanDefinitionException: No bean named 'user' is defined : 容器中没有指定id的对象
* NoUniqueBeanDefinitionException: No qualifying bean of type [com.atguigu.entity.User] is defined:
* expected single matching bean but found 2: user1,user2
* 使用类型从容器中取出对象时,发生了歧义(容器中有多个此类型)
*
* 4. 为对象赋值
* 常用:使用<property>标签赋值
* 赋值的类型:
* 字面量: 从字面上就知道数据是什么样的!
* 8种基本数据类型及其包装类+String
* 在<property>标签中,使用value属性或<value>赋值
* 自定义的引用数据类型:
* 在<property>标签中,使用ref属性或<ref>赋值
*
* null:<null>
*
*
*
*
*
*
*/
@Test
public void test() {
// 先获取指定的容器
ApplicationContext context=new ClassPathXmlApplicationContext("helloworld.xml");
// 从容器中获取想要的对象
User bean = (User) context.getBean("user1");
//User user = context.getBean(User.class);
User user = context.getBean("user1", User.class);
//System.out.println(user.getPassword()==null);
System.out.println(user);
}
}
|
[
"546223079@qq.com"
] |
546223079@qq.com
|
778f9319277cdb3e31f3b68d4473ac41f272addf
|
1f9baaa9d5ae5d31a68f8958421192b287338439
|
/app/src/main/java/ci/ws/Models/entities/CIApisStateEntity.java
|
9cb93cc2fd03695da5365fea6d301d24bdaf2e6d
|
[] |
no_license
|
TkWu/CAL_live_code-1
|
538dde0ce66825026ef01d3fadfcbf4d6e4b1dd0
|
ba30ccfd8056b9cc3045b8e06e8dc60b654c1e55
|
refs/heads/master
| 2020-08-29T09:16:35.600796
| 2019-10-23T06:46:53
| 2019-10-23T06:46:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 250
|
java
|
package ci.ws.Models.entities;
import com.google.gson.annotations.Expose;
/**
* Created by joannyang on 16/6/1.
*/
public class CIApisStateEntity implements Cloneable {
@Expose
public String code;
@Expose
public String name;
}
|
[
"s2213005@gmail.com"
] |
s2213005@gmail.com
|
300d2730a361990ad7152be219ead8ef31cfc85d
|
7fb15446b5645b7761a8ac1eee7fce8ff2bfb493
|
/app/src/main/java/com/dibs/dibly/daocontroller/FollowingController.java
|
74d8f117ed5fb423425968d06a67562801a16cc6
|
[] |
no_license
|
loipn1804/Dibly
|
4d7d3cbf3b895b27a3244cb52df9acaade776b20
|
d94e40208b90cc602812a701c6c0a77855741721
|
refs/heads/master
| 2020-12-31T05:09:33.182036
| 2017-04-26T14:18:44
| 2017-04-26T14:18:44
| 59,657,238
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 901
|
java
|
package com.dibs.dibly.daocontroller;
import android.content.Context;
import com.dibs.dibly.application.MyApplication;
import java.util.List;
import greendao.Following;
import greendao.FollowingDao;
/**
* Created by USER on 7/10/2015.
*/
public class FollowingController {
private static FollowingDao getFollowingDao(Context c) {
return ((MyApplication) c.getApplicationContext()).getDaoSession().getFollowingDao();
}
public static void insert(Context context, Following following) {
getFollowingDao(context).insert(following);
}
public static List<Following> getAll(Context ctx) {
return getFollowingDao(ctx).loadAll();
}
public static void deleteByID(Context ctx, long id) {
getFollowingDao(ctx).deleteByKey(id);
}
public static void deleteAll(Context context) {
getFollowingDao(context).deleteAll();
}
}
|
[
"phanngocloi1804@gmail.com"
] |
phanngocloi1804@gmail.com
|
1398f22ea2d1c3262b42da35e0385dff6cf81b15
|
f6190666e6fda3e017b6be3ee1cb14ec7a11a1be
|
/src/main/java/uz/pdp/online/helper/GsonUserHelper.java
|
b50709909cfddeaa549e0a4c05dab98dad37812f
|
[] |
no_license
|
Muhammad0224/MiniInternetMagazine
|
f076a7e3be0d91a133150e7dcb00559dd2d6d1b8
|
7add03feff69dbd1b1ccc77a4a720ad18234f488
|
refs/heads/master
| 2023-07-15T05:58:50.428927
| 2021-08-31T16:51:12
| 2021-08-31T16:51:12
| 401,777,602
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 860
|
java
|
package uz.pdp.online.helper;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import uz.pdp.online.model.Goods;
import uz.pdp.online.model.User;
import uz.pdp.online.service.GsonToList;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class GsonUserHelper {
Gson gson = new GsonBuilder().setPrettyPrinting().create();
public List<User> converter(Reader reader, File file) {
// Type listType = new TypeToken<ArrayList<T>>(){}.getType();
try (BufferedReader bufferedReader = new BufferedReader(new FileReader(file))) {
return new ArrayList<>(Arrays.asList(gson.fromJson(bufferedReader, User[].class)));
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
}
|
[
"murtazayevmuhammad@gmail.com"
] |
murtazayevmuhammad@gmail.com
|
815b9bfc126a76ff55e49f292868fe708a116c67
|
5b2c309c903625b14991568c442eb3a889762c71
|
/classes/com/xueqiu/android/trade/model/SnowxTraderConfigItem.java
|
b383ded94b79436f8c3cf6aeb590ba06588f47e7
|
[] |
no_license
|
iidioter/xueqiu
|
c71eb4bcc53480770b9abe20c180da693b2d7946
|
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
|
refs/heads/master
| 2020-12-14T23:55:07.246659
| 2016-10-08T08:56:27
| 2016-10-08T08:56:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 914
|
java
|
package com.xueqiu.android.trade.model;
import com.google.gson.annotations.Expose;
public class SnowxTraderConfigItem
{
@Expose
private String configMessage;
@Expose
private String configValue;
@Expose
private String tid;
public String getConfigMessage()
{
return this.configMessage;
}
public String getConfigValue()
{
return this.configValue;
}
public String getTid()
{
return this.tid;
}
public void setConfigMessage(String paramString)
{
this.configMessage = paramString;
}
public void setConfigValue(String paramString)
{
this.configValue = paramString;
}
public void setTid(String paramString)
{
this.tid = paramString;
}
}
/* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\com\xueqiu\android\trade\model\SnowxTraderConfigItem.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
8ed107d51920a50db3dc0c7f11937835fd3e26db
|
af6251ee729995455081c4f4e48668c56007e1ac
|
/domain/src/main/java/mmp/gps/domain/push/InstructResultMessage.java
|
4b5ada1bcda4c7e7492a4d6a247692f96705bbe9
|
[] |
no_license
|
LXKing/monitor
|
b7522d5b95d2cca7e37a8bfc66dc7ba389e926ef
|
7d1eca454ce9a93fc47c68f311eca4dcd6f82603
|
refs/heads/master
| 2020-12-01T08:08:53.265259
| 2018-12-24T12:43:32
| 2018-12-24T12:43:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 323
|
java
|
package mmp.gps.domain.push;
/**
* 指令结果消息
*/
public class InstructResultMessage {
/**
* 设备号
*/
public String number;
/**
* 记录号
*/
public String id;
/**
* 结果
*/
public String result;
/**
* 数据
*/
public Object data;
}
|
[
"heavenlystate@163.com"
] |
heavenlystate@163.com
|
4d5ca90d7e79faa7784a5bb8e010252ba62f0389
|
126b90c506a84278078510b5979fbc06d2c61a39
|
/src/ANXCamera/sources/com/color/compat/net/ConnectivityManagerNative.java
|
2ea6036d654e7916ac82b49be7f0969041ad9863
|
[] |
no_license
|
XEonAX/ANXRealCamera
|
196bcbb304b8bbd3d86418cac5e82ebf1415f68a
|
1d3542f9e7f237b4ef7ca175d11086217562fad0
|
refs/heads/master
| 2022-08-02T00:24:30.864763
| 2020-05-29T14:01:41
| 2020-05-29T14:01:41
| 261,256,968
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,536
|
java
|
package com.color.compat.net;
import android.net.ConnectivityManager;
import android.os.Handler;
import android.util.Log;
import com.color.inner.net.ConnectivityManagerWrapper;
import com.color.util.UnSupportedApiVersionException;
import com.color.util.VersionUtils;
import java.util.List;
public class ConnectivityManagerNative {
private static final String TAG = "ConnManagerNative";
public interface OnStartTetheringCallbackNative {
void onTetheringFailed();
void onTetheringStarted();
}
private ConnectivityManagerNative() {
}
public static List<String> readArpFile(ConnectivityManager connectivityManager) {
try {
return ConnectivityManagerWrapper.readArpFile(connectivityManager);
} catch (Throwable th) {
Log.e(TAG, th.toString());
return null;
}
}
public static void setVpnPackageAuthorization(String str, int i, boolean z) {
try {
ConnectivityManagerWrapper.setVpnPackageAuthorization(str, i, z);
} catch (Throwable th) {
Log.e(TAG, th.toString());
}
}
public static void startTethering(ConnectivityManager connectivityManager, int i, boolean z, final OnStartTetheringCallbackNative onStartTetheringCallbackNative, Handler handler) {
try {
ConnectivityManagerWrapper.OnStartTetheringCallbackWrapper onStartTetheringCallbackWrapper = null;
if (VersionUtils.isQ()) {
if (onStartTetheringCallbackNative != null) {
onStartTetheringCallbackWrapper = new ConnectivityManagerWrapper.OnStartTetheringCallbackWrapper() {
public void onTetheringFailed() {
onStartTetheringCallbackNative.onTetheringFailed();
}
public void onTetheringStarted() {
onStartTetheringCallbackNative.onTetheringStarted();
}
};
}
ConnectivityManagerWrapper.startTethering(connectivityManager, i, z, onStartTetheringCallbackWrapper, handler);
} else if (VersionUtils.isN()) {
if (onStartTetheringCallbackNative != null) {
onStartTetheringCallbackWrapper = new ConnectivityManager.OnStartTetheringCallback() {
public void onTetheringFailed() {
onStartTetheringCallbackNative.onTetheringFailed();
}
public void onTetheringStarted() {
onStartTetheringCallbackNative.onTetheringStarted();
}
};
}
connectivityManager.startTethering(i, z, onStartTetheringCallbackWrapper, handler);
} else {
throw new UnSupportedApiVersionException();
}
} catch (Throwable th) {
Log.e(TAG, th.toString());
}
}
public static void stopTethering(ConnectivityManager connectivityManager, int i) {
try {
if (VersionUtils.isQ()) {
ConnectivityManagerWrapper.stopTethering(connectivityManager, i);
} else if (VersionUtils.isN()) {
connectivityManager.stopTethering(i);
} else {
throw new UnSupportedApiVersionException();
}
} catch (Throwable th) {
Log.e(TAG, th.toString());
}
}
}
|
[
"sv.xeon@gmail.com"
] |
sv.xeon@gmail.com
|
a9e446189b72241d7338c0cc5d428844940f0a21
|
9821426ca32b707134eee8dbda9ef4ce64a97045
|
/MiuiSystemUI/raphael/systemui/statusbar/phone/HeadsUpTouchCallbackWrapper.java
|
a6be640f77683a0c2725cd7df4c218218910c77a
|
[] |
no_license
|
mooseIre/arsc_compare
|
a28af8205cc75647b3f6e8c1b3310ca2b2140725
|
3df667d4e4d4924e11cbcfd9df29346a3c259e32
|
refs/heads/master
| 2023-06-21T13:30:23.511293
| 2021-08-12T15:13:08
| 2021-08-12T15:13:08
| 277,633,842
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,135
|
java
|
package com.android.systemui.statusbar.phone;
import android.content.Context;
import com.android.systemui.statusbar.notification.row.ExpandableView;
import com.android.systemui.statusbar.phone.HeadsUpTouchHelper;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/* compiled from: MiuiNotificationPanelViewController.kt */
final class HeadsUpTouchCallbackWrapper implements HeadsUpTouchHelper.Callback {
private final HeadsUpTouchHelper.Callback base;
private final HeadsUpManagerPhone headsUpManagerPhone;
private final MiuiNotificationPanelViewController panelView;
public HeadsUpTouchCallbackWrapper(@NotNull MiuiNotificationPanelViewController miuiNotificationPanelViewController, @NotNull HeadsUpManagerPhone headsUpManagerPhone2, @NotNull HeadsUpTouchHelper.Callback callback) {
Intrinsics.checkParameterIsNotNull(miuiNotificationPanelViewController, "panelView");
Intrinsics.checkParameterIsNotNull(headsUpManagerPhone2, "headsUpManagerPhone");
Intrinsics.checkParameterIsNotNull(callback, "base");
this.panelView = miuiNotificationPanelViewController;
this.headsUpManagerPhone = headsUpManagerPhone2;
this.base = callback;
}
@Override // com.android.systemui.statusbar.phone.HeadsUpTouchHelper.Callback
public boolean isExpanded() {
return this.base.isExpanded() && !(this.headsUpManagerPhone.hasPinnedHeadsUp() && this.panelView.isExpectingSynthesizedDown$packages__apps__MiuiSystemUI__packages__SystemUI__android_common__MiuiSystemUI_core());
}
@Override // com.android.systemui.statusbar.phone.HeadsUpTouchHelper.Callback
@Nullable
public ExpandableView getChildAtRawPosition(float f, float f2) {
return this.base.getChildAtRawPosition(f, f2);
}
@Override // com.android.systemui.statusbar.phone.HeadsUpTouchHelper.Callback
@NotNull
public Context getContext() {
Context context = this.base.getContext();
Intrinsics.checkExpressionValueIsNotNull(context, "base.context");
return context;
}
}
|
[
"viiplycn@gmail.com"
] |
viiplycn@gmail.com
|
802e38b9c31d9275b899ef9e3360975d39579a43
|
0885c2cf8960c646c4b887136ed3a80ce453fabd
|
/src/main/java/com/gow/beau/model/req/category/CategoryListPageReq.java
|
0b1a6996c2c8866e48bbcb91eb6e79e9ebe0abb9
|
[] |
no_license
|
295647706/gow
|
2295f770c29a3bfb6990486352f7f5cf4fbb99aa
|
ead69a8dd65ca4e1d0b7697860d636d459d6b1ff
|
refs/heads/master
| 2022-06-24T20:55:26.662637
| 2020-03-23T00:03:02
| 2020-03-23T00:03:02
| 182,363,425
| 0
| 0
| null | 2022-06-21T01:04:36
| 2019-04-20T05:16:46
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 306
|
java
|
package com.gow.beau.model.req.category;
import com.gow.beau.model.data.PageInfo;
import lombok.Data;
/**
* @ClassName CategoryListPageReq
* @Author lzn
* @DATE 2019/8/30 15:27
*/
@Data
public class CategoryListPageReq extends PageInfo {
private String catName;
private String catIsShow;
}
|
[
"295647706@qq.com"
] |
295647706@qq.com
|
2dd7bc88594539cc90a471c0532495a654045f94
|
275793cd7c5c9ba554bf0aef17e0899fb591ca88
|
/aliyun-java-sdk-openanalytics-open/src/main/java/com/aliyuncs/openanalytics_open/model/v20200928/AlterDatabaseRequest.java
|
f4d30795346f6ab294e3f012fcf2af3d35a34417
|
[
"Apache-2.0"
] |
permissive
|
wosniuyeye/aliyun-openapi-java-sdk
|
4f8a0b5bf1a90ec917bf29bb71a5b231ac28b2f9
|
c30731a2d65b5156948120e1168f3ed6a4897d7a
|
refs/heads/master
| 2023-04-05T13:15:34.306642
| 2021-04-08T02:31:03
| 2021-04-08T02:31:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,664
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.openanalytics_open.model.v20200928;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.openanalytics_open.Endpoint;
/**
* @author auto create
* @version
*/
public class AlterDatabaseRequest extends RpcAcsRequest<AlterDatabaseResponse> {
private String oldDbName;
private String name;
private String description;
private String locationUri;
private String parameters;
public AlterDatabaseRequest() {
super("openanalytics-open", "2020-09-28", "AlterDatabase", "openanalytics");
setMethod(MethodType.POST);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}
public String getOldDbName() {
return this.oldDbName;
}
public void setOldDbName(String oldDbName) {
this.oldDbName = oldDbName;
if(oldDbName != null){
putQueryParameter("OldDbName", oldDbName);
}
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
if(name != null){
putQueryParameter("Name", name);
}
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
if(description != null){
putQueryParameter("Description", description);
}
}
public String getLocationUri() {
return this.locationUri;
}
public void setLocationUri(String locationUri) {
this.locationUri = locationUri;
if(locationUri != null){
putQueryParameter("LocationUri", locationUri);
}
}
public String getParameters() {
return this.parameters;
}
public void setParameters(String parameters) {
this.parameters = parameters;
if(parameters != null){
putQueryParameter("Parameters", parameters);
}
}
@Override
public Class<AlterDatabaseResponse> getResponseClass() {
return AlterDatabaseResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
a23357f746e319f928f3ea1bdff0e291bb3c939c
|
68871d82209187096274eb8013376985ed9f1831
|
/src/main/java/ru/luvas/physics/cw1/entity/Text.java
|
ab0f1ef39d05b0afccd3a53bbe3e6b72f0227394
|
[] |
no_license
|
RinesThaix/PhysicsCW1
|
b70b32204d1e2f8bd7b87067761af30537906b1f
|
791573bbfb3280ba9a7227ea7dcf2d651a32c9d2
|
refs/heads/master
| 2020-06-17T20:45:10.406181
| 2016-12-27T23:18:43
| 2016-12-27T23:18:43
| 74,970,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 840
|
java
|
package ru.luvas.physics.cw1.entity;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
/**
*
* @author RINES <iam@kostya.sexy>
*/
public class Text extends Colored {
private String text;
private int size;
public Text(int x, int y, String text, Color color, int size) {
super(x, y, color);
this.text = text;
this.size = size;
}
public String getText() {
return text;
}
public int getSize() {
return size;
}
public void setText(String text) {
this.text = text;
}
public void setSize(int size) {
this.size = size;
}
@Override
public void draw(Graphics2D g) {
super.draw(g);
g.setFont(new Font("Arial", 0, size));
g.drawString(text, x, y);
}
}
|
[
"iam@kostya.sexy"
] |
iam@kostya.sexy
|
da196942ffa4e22d92e2d3369b7c6c14636f5a48
|
35559cc0d6962fde2d67618aae41a8ba1e8dcd43
|
/②JAVA基础/11月16日作业/四组/IT02_李静静/AnimalDemo/src/Dog.java
|
3a81b77f97e0735317eef93d85c19b4693b127fa
|
[] |
no_license
|
qhit2017/GR1702_01
|
bc9190243fc24db4d19e5ee0daff003f9eaeb2d8
|
8e1fc9157ef183066c522e1025c97efeabe6329a
|
refs/heads/master
| 2021-09-03T16:27:00.789831
| 2018-01-10T11:08:27
| 2018-01-10T11:08:27
| 109,151,555
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,141
|
java
|
/**
*@author 作者 E-mail:996939518@qq.com
* @date 创建时间:2017年11月15日 下午8:18:41
* @version 1.0
* @parameter
* @since
* @return
* @function
*/
public class Dog extends Animal{
/*定义一个类:狗,属性包括: 品种,
* 毛的颜色, 年龄,重量 方法包括:叫、吃、睡觉
* 要求属性私有,并提供get、set方法
*/
private String breed ;
private String color ;
private int age ;
private int weiget ;
Dog(){
System.out.println("我是无参的");
}
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public int getWeiget() {
return weiget;
}
public void setWeiget(int weiget) {
this.weiget = weiget;
}
void wow (){
System.out.println("叫");
}
void eat (){
System.out.println("吃");
}
void sleep (){
System.out.println("睡觉");
}
}
|
[
"hudi@qq.com"
] |
hudi@qq.com
|
02109c32c5ef29d564dd3d3144afb9fc6171f8e2
|
043703eaf27a0d5e6f02bf7a9ac03c0ce4b38d04
|
/subject_systems/Struts2/src/struts-2.5.2/src/core/src/main/java/org/apache/struts2/views/freemarker/tags/TextModel.java
|
f49715da88b5d351351070dd2eb6cb369cc73147
|
[] |
no_license
|
MarceloLaser/arcade_console_test_resources
|
e4fb5ac4a7b2d873aa9d843403569d9260d380e0
|
31447aabd735514650e6b2d1a3fbaf86e78242fc
|
refs/heads/master
| 2020-09-22T08:00:42.216653
| 2019-12-01T21:51:05
| 2019-12-01T21:51:05
| 225,093,382
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 129
|
java
|
version https://git-lfs.github.com/spec/v1
oid sha256:6234e3b250457ae26ec280120aa6eb940d7c34c4747dad3ed1142fad01935c3f
size 1416
|
[
"marcelo.laser@gmail.com"
] |
marcelo.laser@gmail.com
|
d5f5b9b22308a004c9eb0bae44a6f53740614a22
|
1204868f57bbd15757cd79c6838b31c903abd177
|
/camel-blueprint-salesforce-test-6.2/src/main/java/org/apache/camel/salesforce/dto/QueryRecordsContentDocumentFeed.java
|
d72ae7f46fc6f6d97a1088f913b87e053fdff57b
|
[] |
no_license
|
shivamlakade95/fuse-examples-6.2
|
aedaeddcad6efcc8e4f85d550c9e2e174b25fb14
|
f7f9ac9630828dd4e488f80011dbc2e60a7e3e2c
|
refs/heads/master
| 2023-05-11T04:05:40.394046
| 2020-01-02T08:23:34
| 2020-01-02T08:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 732
|
java
|
/*
* Salesforce Query DTO generated by camel-salesforce-maven-plugin
* Generated on: Thu Sep 03 14:23:16 IST 2015
*/
package org.apache.camel.salesforce.dto;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import org.apache.camel.component.salesforce.api.dto.AbstractQueryRecordsBase;
import java.util.List;
/**
* Salesforce QueryRecords DTO for type ContentDocumentFeed
*/
public class QueryRecordsContentDocumentFeed extends AbstractQueryRecordsBase {
@XStreamImplicit
private List<ContentDocumentFeed> records;
public List<ContentDocumentFeed> getRecords() {
return records;
}
public void setRecords(List<ContentDocumentFeed> records) {
this.records = records;
}
}
|
[
"shekhar.csp84@yahoo.co.in"
] |
shekhar.csp84@yahoo.co.in
|
e23964b5b9b67d9be313e042af5c6267d9a901b2
|
e7ca3a996490d264bbf7e10818558e8249956eda
|
/aliyun-java-sdk-rds/src/main/java/com/aliyuncs/rds/model/v20140815/CreateDampPolicyResponse.java
|
a0918b83c607f359c40328de7fe39a8c753cead8
|
[
"Apache-2.0"
] |
permissive
|
AndyYHL/aliyun-openapi-java-sdk
|
6f0e73f11f040568fa03294de2bf9a1796767996
|
15927689c66962bdcabef0b9fc54a919d4d6c494
|
refs/heads/master
| 2020-03-26T23:18:49.532887
| 2018-08-21T04:12:23
| 2018-08-21T04:12:23
| 145,530,169
| 1
| 0
| null | 2018-08-21T08:14:14
| 2018-08-21T08:14:13
| null |
UTF-8
|
Java
| false
| false
| 1,582
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.rds.model.v20140815;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.rds.transform.v20140815.CreateDampPolicyResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class CreateDampPolicyResponse extends AcsResponse {
private String requestId;
private String policyId;
private String policyName;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getPolicyId() {
return this.policyId;
}
public void setPolicyId(String policyId) {
this.policyId = policyId;
}
public String getPolicyName() {
return this.policyName;
}
public void setPolicyName(String policyName) {
this.policyName = policyName;
}
@Override
public CreateDampPolicyResponse getInstance(UnmarshallerContext context) {
return CreateDampPolicyResponseUnmarshaller.unmarshall(this, context);
}
}
|
[
"haowei.yao@alibaba-inc.com"
] |
haowei.yao@alibaba-inc.com
|
a55ce4ead09175116835afc82dca21d54575e687
|
95e1ddd7adc76bd08249d784cf346e9b8cddcc9f
|
/1.JavaSyntax/src/com/javarush/task/task09/task0906/Solution.java
|
50ad24c21a25456d2bc10761e25648e239154bd9
|
[] |
no_license
|
script972/JavaRush
|
2f7190e1ce20826bfab6045aee23c6b9e36d3a72
|
225b5802bd2116f41e2e1ccc57c7427b05ef9a07
|
refs/heads/master
| 2021-01-19T18:32:38.809418
| 2017-10-07T21:44:26
| 2017-10-07T21:44:26
| 78,306,557
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 470
|
java
|
package com.javarush.task.task09.task0906;
/*
Логирование стек трейса
*/
public class Solution {
public static void main(String[] args) {
log("In main method");
}
public static void log(String s) {
//напишите тут ваш код
StackTraceElement[] elem = Thread.currentThread().getStackTrace();
System.out.println(elem[2].getClassName() + ": " + elem[2].getMethodName() + ": " + s);
}
}
|
[
"script972@gmail.com"
] |
script972@gmail.com
|
c8de26880f974d1c23e6db6a890d5aa063fcbaf7
|
dd80a584130ef1a0333429ba76c1cee0eb40df73
|
/external/apache-http/src/org/apache/http/impl/io/ContentLengthInputStream.java
|
3b19c5b62f4574b6b542397842d13d5bd6d438cd
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
karunmatharu/Android-4.4-Pay-by-Data
|
466f4e169ede13c5835424c78e8c30ce58f885c1
|
fcb778e92d4aad525ef7a995660580f948d40bc9
|
refs/heads/master
| 2021-03-24T13:33:01.721868
| 2017-02-18T17:48:49
| 2017-02-18T17:48:49
| 81,847,777
| 0
| 2
|
MIT
| 2020-03-09T00:02:12
| 2017-02-13T16:47:00
| null |
UTF-8
|
Java
| false
| false
| 7,778
|
java
|
/*
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/io/ContentLengthInputStream.java $
* $Revision: 652091 $
* $Date: 2008-04-29 13:41:07 -0700 (Tue, 29 Apr 2008) $
*
* ====================================================================
* 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.impl.io;
import java.io.IOException;
import java.io.InputStream;
import org.apache.http.io.SessionInputBuffer;
/**
* Stream that cuts off after a specified number of bytes.
* Note that this class NEVER closes the underlying stream, even when close
* gets called. Instead, it will read until the "end" of its chunking on
* close, which allows for the seamless execution of subsequent HTTP 1.1
* requests, while not requiring the client to remember to read the entire
* contents of the response.
*
* <p>Implementation note: Choices abound. One approach would pass
* through the {@link InputStream#mark} and {@link InputStream#reset} calls to
* the underlying stream. That's tricky, though, because you then have to
* start duplicating the work of keeping track of how much a reset rewinds.
* Further, you have to watch out for the "readLimit", and since the semantics
* for the readLimit leave room for differing implementations, you might get
* into a lot of trouble.</p>
*
* <p>Alternatively, you could make this class extend
* {@link java.io.BufferedInputStream}
* and then use the protected members of that class to avoid duplicated effort.
* That solution has the side effect of adding yet another possible layer of
* buffering.</p>
*
* <p>Then, there is the simple choice, which this takes - simply don't
* support {@link InputStream#mark} and {@link InputStream#reset}. That choice
* has the added benefit of keeping this class very simple.</p>
*
* @author Ortwin Glueck
* @author Eric Johnson
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
*
* @since 4.0
*/
public class ContentLengthInputStream extends InputStream {
private static final int BUFFER_SIZE = 2048;
/**
* The maximum number of bytes that can be read from the stream. Subsequent
* read operations will return -1.
*/
private long contentLength;
/** The current position */
private long pos = 0;
/** True if the stream is closed. */
private boolean closed = false;
/**
* Wrapped input stream that all calls are delegated to.
*/
private SessionInputBuffer in = null;
/**
* Creates a new length limited stream
*
* @param in The session input buffer to wrap
* @param contentLength The maximum number of bytes that can be read from
* the stream. Subsequent read operations will return -1.
*/
public ContentLengthInputStream(final SessionInputBuffer in, long contentLength) {
super();
if (in == null) {
throw new IllegalArgumentException("Input stream may not be null");
}
if (contentLength < 0) {
throw new IllegalArgumentException("Content length may not be negative");
}
this.in = in;
this.contentLength = contentLength;
}
/**
* <p>Reads until the end of the known length of content.</p>
*
* <p>Does not close the underlying socket input, but instead leaves it
* primed to parse the next response.</p>
* @throws IOException If an IO problem occurs.
*/
public void close() throws IOException {
if (!closed) {
try {
byte buffer[] = new byte[BUFFER_SIZE];
while (read(buffer) >= 0) {
}
} finally {
// close after above so that we don't throw an exception trying
// to read after closed!
closed = true;
}
}
}
/**
* Read the next byte from the stream
* @return The next byte or -1 if the end of stream has been reached.
* @throws IOException If an IO problem occurs
* @see java.io.InputStream#read()
*/
public int read() throws IOException {
if (closed) {
throw new IOException("Attempted read from closed stream.");
}
if (pos >= contentLength) {
return -1;
}
pos++;
return this.in.read();
}
/**
* Does standard {@link InputStream#read(byte[], int, int)} behavior, but
* also notifies the watcher when the contents have been consumed.
*
* @param b The byte array to fill.
* @param off Start filling at this position.
* @param len The number of bytes to attempt to read.
* @return The number of bytes read, or -1 if the end of content has been
* reached.
*
* @throws java.io.IOException Should an error occur on the wrapped stream.
*/
public int read (byte[] b, int off, int len) throws java.io.IOException {
if (closed) {
throw new IOException("Attempted read from closed stream.");
}
if (pos >= contentLength) {
return -1;
}
if (pos + len > contentLength) {
len = (int) (contentLength - pos);
}
int count = this.in.read(b, off, len);
pos += count;
return count;
}
/**
* Read more bytes from the stream.
* @param b The byte array to put the new data in.
* @return The number of bytes read into the buffer.
* @throws IOException If an IO problem occurs
* @see java.io.InputStream#read(byte[])
*/
public int read(byte[] b) throws IOException {
return read(b, 0, b.length);
}
/**
* Skips and discards a number of bytes from the input stream.
* @param n The number of bytes to skip.
* @return The actual number of bytes skipped. <= 0 if no bytes
* are skipped.
* @throws IOException If an error occurs while skipping bytes.
* @see InputStream#skip(long)
*/
public long skip(long n) throws IOException {
if (n <= 0) {
return 0;
}
byte[] buffer = new byte[BUFFER_SIZE];
// make sure we don't skip more bytes than are
// still available
long remaining = Math.min(n, this.contentLength - this.pos);
// skip and keep track of the bytes actually skipped
long count = 0;
while (remaining > 0) {
int l = read(buffer, 0, (int)Math.min(BUFFER_SIZE, remaining));
if (l == -1) {
break;
}
count += l;
remaining -= l;
}
this.pos += count;
return count;
}
}
|
[
"karun.matharu@gmail.com"
] |
karun.matharu@gmail.com
|
3e23330f68d674af5974c5c1611bdafd20f7c409
|
891ae74be3edd5625a235af573b3d82a7b2cb797
|
/server/src/main/java/com/tuofan/core/TimeUtils.java
|
f8d2fb13e69038af2082cf0abe30aafa5bc4b15c
|
[] |
no_license
|
wangyongst/billStar
|
87bfc8d7405d6b04639e040d5140b582fc56ac38
|
0519cff9b08539974adcfbe0b51b926a06bb3a1b
|
refs/heads/master
| 2022-12-22T03:44:22.394837
| 2020-03-16T09:39:56
| 2020-03-16T09:39:56
| 240,644,022
| 0
| 0
| null | 2022-12-10T08:08:14
| 2020-02-15T04:22:21
|
Vue
|
UTF-8
|
Java
| false
| false
| 1,090
|
java
|
package com.tuofan.core;
import java.util.Calendar;
import java.util.Date;
public class TimeUtils {
public static Date month(Integer before) {
Calendar calendar = Calendar.getInstance();// 获取当前日期
calendar.add(Calendar.YEAR, 0);
calendar.add(Calendar.MONTH, -before);
calendar.set(Calendar.DAY_OF_MONTH, 1);// 设置为1号,当前日期既为本月第一天
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
return new Date(calendar.getTimeInMillis());
}
public static Date day(int before) {
Calendar calendar = Calendar.getInstance();// 获取当前日期
calendar.add(Calendar.YEAR, 0);
calendar.add(Calendar.MONTH, 0);
calendar.add(Calendar.DAY_OF_MONTH, -before);// 设置为1号,当前日期既为本月第一天
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
return new Date(calendar.getTimeInMillis());
}
}
|
[
"wangyongst@gmail.com"
] |
wangyongst@gmail.com
|
fcb75fe5f2746d9959684ea740641097d4b06af6
|
b369e3f8258bfbc635fb9d56626301ca6431a673
|
/src/main/java/com/example/service/UserService.java
|
c284cddb98f18b0d280c457d540d493a982f503b
|
[] |
no_license
|
ynfatal/springboot2mybaitsdemo
|
46a01a4777f5948ba374897a141e68ab90a249df
|
66699cfcf554a1c63ee53ed7ccdef3082db9ade2
|
refs/heads/master
| 2020-03-26T13:28:26.850929
| 2018-08-17T09:39:53
| 2018-08-17T09:39:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 282
|
java
|
package com.example.service;
import com.example.entity.User;
import com.github.pagehelper.PageInfo;
/**
* @author: Fatal
* @date: 2018/8/16 0016 11:55
*/
public interface UserService {
int addUser(User user);
PageInfo<User> findAllUser(int pageNum, int pageSize);
}
|
[
"63413763@qq.com"
] |
63413763@qq.com
|
3f2ba8350e2284d8507999652b1372e2a8d6f4d7
|
1f207999be869a53c773c4b3dc4cff3d78f60aca
|
/ybg_base_jar/src/main/java/com/alipay/api/response/ZhimaMerchantOrderRentModifyResponse.java
|
a1c221b6680e639427549a804eba36cd1eb16bf7
|
[] |
no_license
|
BrendaHub/quanmin_admin
|
8b4f1643112910b728adc172324b8fb8a2f672dc
|
866548dc219a2eaee0a09efbc3b6410eb3c2beb9
|
refs/heads/master
| 2021-05-09T04:17:03.818182
| 2018-01-28T15:00:12
| 2018-01-28T15:00:12
| 119,267,872
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 355
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: zhima.merchant.order.rent.modify response.
*
* @author auto create
* @since 1.0, 2017-05-25 14:35:11
*/
public class ZhimaMerchantOrderRentModifyResponse extends AlipayResponse {
private static final long serialVersionUID = 6528341665672394269L;
}
|
[
"13552666934@139.com"
] |
13552666934@139.com
|
c166267424f114816a669b61dcb5deaac8823a1e
|
de91657cdaf0d5f582beda30274c01675899b9f5
|
/JavaProgramming/src/ch04/exma02/DowhileExample.java
|
b35d690e209b3b9ab90c78a0ecb5d4287c23e238
|
[] |
no_license
|
JinByeungKu/MyRepository
|
98722e827e5cae9029efd146d289ad7e132371f1
|
e478ba492d069de53fe5a6151bb296fd2daed9d4
|
refs/heads/master
| 2020-04-12T08:49:45.275190
| 2016-11-16T06:12:53
| 2016-11-16T06:12:53
| 65,832,475
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 222
|
java
|
package ch04.exma02;
public class DowhileExample {
public static void main(String[] args) throws Exception {
int num =0;
do{
num = System.in.read();
System.out.println(num);
} while(num !=113);
}
}
|
[
"splendid1014@naver.com"
] |
splendid1014@naver.com
|
c0f58a0e8d95e6c4c7527477c5d1b99d643f083f
|
ba90ba9bcf91c4dbb1121b700e48002a76793e96
|
/com-gameportal-admin/src/main/java/com/gameportal/manage/order/controller/CCAndGroupController.java
|
574e29b3dcf18acdf7d25d2dd8d9e3696995316a
|
[] |
no_license
|
portalCMS/xjw
|
1ab2637964fd142f8574675bd1c7626417cf96d9
|
f1bdba0a0602b8603444ed84f6d7afafaa308b63
|
refs/heads/master
| 2020-04-16T13:33:21.792588
| 2019-01-18T02:29:40
| 2019-01-18T02:29:40
| 165,632,513
| 0
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,541
|
java
|
package com.gameportal.manage.order.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONObject;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gameportal.manage.order.model.CCAndGroup;
import com.gameportal.manage.order.service.ICCAndGroupService;
import com.gameportal.manage.order.service.ICCGroupService;
import com.gameportal.manage.pojo.ExceptionReturn;
import com.gameportal.manage.pojo.ExtReturn;
import com.gameportal.manage.pojo.GridPanel;
import com.gameportal.manage.redis.service.IRedisService;
import com.gameportal.manage.system.service.ISystemService;
@Controller
@RequestMapping(value = "/manage/ccandgroup")
public class CCAndGroupController {
private static final Logger logger = Logger
.getLogger(CCAndGroupController.class);
@Resource(name = "cCAndGroupServiceImpl")
private ICCAndGroupService cCAndGroupService = null;
@Resource(name = "cCGroupServiceImpl")
private ICCGroupService cCGroupService = null;
@Resource(name = "systemServiceImpl")
private ISystemService systemService = null;
@Resource(name = "redisServiceImpl")
private IRedisService iRedisService = null;
public CCAndGroupController() {
super();
}
@RequestMapping(value = "/index")
public String index(
@RequestParam(value = "id", required = false) String id,
HttpServletRequest request, HttpServletResponse response) {
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
request.setAttribute("id", id);
// `status` int(2) default NULL COMMENT '状态 0未锁定 1锁定',
JSONObject map = new JSONObject();
map.put("0", "未锁定");
map.put("1", "锁定");
request.setAttribute("statusMap", map.toString());
return "com.gameportal.manage.order/cCAndGroup";
}
@RequestMapping(value = "/queryCCAndGroup")
public @ResponseBody
Object queryCCAndGroup(
@RequestParam(value = "status", required = false) Integer status,
@RequestParam(value = "start", required = false) Integer startNo,
@RequestParam(value = "limit", required = false) Integer pageSize,
HttpServletRequest request, HttpServletResponse response) {
Map<String, Object> params = new HashMap<String, Object>();
if (null!=status) {
params.put("status", status);
}
Long count = cCAndGroupService.queryCCAndGroupCount(params);
List<CCAndGroup> list = cCAndGroupService.queryCCAndGroup(params,
startNo, pageSize);
return new GridPanel(count, list, true);
}
@RequestMapping("/del/{id}")
@ResponseBody
public Object delCCAndGroup(@PathVariable Long id) {
try {
if (!StringUtils.isNotBlank(ObjectUtils.toString(id))) {
return new ExtReturn(false, "主键不能为空!");
}
if (cCAndGroupService.deleteCCAndGroup(id)) {
return new ExtReturn(true, "删除成功!");
} else {
return new ExtReturn(false, "删除失败!");
}
} catch (Exception e) {
logger.error("Exception: ", e);
return new ExceptionReturn(e);
}
}
}
|
[
"sunny@gmail.com"
] |
sunny@gmail.com
|
4da1615725995b22cdca0b2b5c572f73d2822fdb
|
395fdaed6042b4f85663f95b8ce181305bf75968
|
/java/intelijidea/chegg-i73/src/DoubleListException.java
|
15f6e7f68e8e2dd2e2faee00a56109f649207b72
|
[] |
no_license
|
amitkumar-panchal/ChQuestiions
|
88b6431d3428a14b0e5619ae6a30b8c851476de7
|
448ec1368eca9544fde0c40f892d68c3494ca209
|
refs/heads/master
| 2022-12-09T18:03:14.954130
| 2020-09-23T01:58:17
| 2020-09-23T01:58:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 288
|
java
|
/**
* DoubleListException class
*/
public class DoubleListException extends IndexOutOfBoundsException {
DoubleListException(){
}
/**
* constructor with parameter
* @param msg of exception
*/
DoubleListException(String msg){
super(msg);
}
}
|
[
"="
] |
=
|
455c437ca6c0c4a080f1ee3119314fa0cd2b18e3
|
410c3edff13b40190e3ef38aa60a42a4efc4ad67
|
/base/src/main/java/io/vproxy/vfd/windows/WindowsFDs.java
|
505a7e7a6d969709d5c1e7762af06ae8ab697b05
|
[
"MIT"
] |
permissive
|
wkgcass/vproxy
|
f3d783531688676932f60f3df57e89ddabf3f720
|
6c891d43d6b9f2d2980a7d4feee124b054fbfdb5
|
refs/heads/dev
| 2023-08-09T04:03:10.839390
| 2023-07-31T08:28:56
| 2023-08-04T12:04:11
| 166,255,932
| 129
| 53
|
MIT
| 2022-09-15T08:35:53
| 2019-01-17T16:14:58
|
Java
|
UTF-8
|
Java
| false
| false
| 4,170
|
java
|
package io.vproxy.vfd.windows;
import io.vproxy.base.util.Logger;
import io.vproxy.base.util.Utils;
import io.vproxy.vfd.*;
import io.vproxy.vfd.jdk.ChannelFDs;
import io.vproxy.vfd.posix.Posix;
import java.io.IOException;
import java.lang.reflect.Proxy;
public class WindowsFDs implements FDs, FDsWithTap {
private final ChannelFDs channelFDs;
private final Windows windows;
public WindowsFDs() {
channelFDs = ChannelFDs.get();
assert VFDConfig.vfdlibname != null;
String lib = VFDConfig.vfdlibname;
try {
Utils.loadDynamicLibrary(lib);
} catch (UnsatisfiedLinkError e) {
System.out.println(lib + " not found, requires lib" + lib + ".dylib or lib" + lib + ".so or " + lib + ".dll on java.library.path");
e.printStackTrace(System.out);
Utils.exit(1);
}
if (VFDConfig.vfdtrace) {
// make it difficult for graalvm native image initializer to detect the Posix.class
// however we cannot use -Dvfdtrace=1 flag when using native image
String clsStr = this.getClass().getPackage().getName() + "." + this.getClass().getSimpleName().substring(0, "Windows".length());
// clsStr should be vfd.posix.Posix
Class<?> cls;
try {
cls = Class.forName(clsStr);
} catch (ClassNotFoundException e) {
// should not happen
throw new RuntimeException(e);
}
windows = (Windows) Proxy.newProxyInstance(Posix.class.getClassLoader(), new Class[]{cls}, new TraceInvocationHandler(new GeneralWindows()));
} else {
windows = new GeneralWindows();
}
}
@Override
public SocketFD openSocketFD() throws IOException {
return channelFDs.openSocketFD();
}
@Override
public ServerSocketFD openServerSocketFD() throws IOException {
return channelFDs.openServerSocketFD();
}
@Override
public DatagramFD openDatagramFD() throws IOException {
return channelFDs.openDatagramFD();
}
@Override
public FDSelector openSelector() throws IOException {
return channelFDs.openSelector();
}
@Override
public long currentTimeMillis() {
return channelFDs.currentTimeMillis();
}
@Override
public boolean isV4V6DualStack() {
return true;
}
@Override
public TapDatagramFD openTap(String dev) throws IOException {
long handle = windows.createTapHandle(dev);
long readOverlapped;
try {
readOverlapped = windows.allocateOverlapped();
} catch (IOException e) {
try {
windows.closeHandle(handle);
} catch (Throwable t) {
Logger.shouldNotHappen("close handle " + handle + " failed when allocating readOverlapped failed", t);
}
throw e;
}
long writeOverlapped;
try {
writeOverlapped = windows.allocateOverlapped();
} catch (IOException e) {
try {
windows.closeHandle(handle);
} catch (Throwable t) {
Logger.shouldNotHappen("close handle " + handle + " failed when allocating writeOverlapped failed", t);
}
try {
windows.releaseOverlapped(readOverlapped);
} catch (Throwable t) {
Logger.shouldNotHappen("releasing readOverlapped " + readOverlapped + " failed when allocating writeOverlapped failed", t);
}
throw e;
}
return new WindowsTapDatagramFD(windows, handle, new TapInfo(dev, (int) handle), readOverlapped, writeOverlapped);
}
@Override
public boolean tapNonBlockingSupported() throws IOException {
return windows.tapNonBlockingSupported();
}
@Override
public TapDatagramFD openTun(String devPattern) throws IOException {
throw new IOException("tun unsupported");
}
@Override
public boolean tunNonBlockingSupported() throws IOException {
throw new IOException("tun unsupported");
}
}
|
[
"wkgcass@hotmail.com"
] |
wkgcass@hotmail.com
|
9122263cd423da62d91e822b22f7c5b788d53709
|
479f01152146181f9c582719f08a8018c2a748a8
|
/List5/src/main/java/com/inter/admin/AdminController.java
|
d4f710f20a340252dd89bda438bb41baaf75dcdf
|
[] |
no_license
|
YeonWooSeong/set19
|
c78107834860bba738e7be86c68944a012875910
|
587c6ff71e6b4a29654406ee31210a33f4bd3419
|
refs/heads/master
| 2021-05-30T12:07:17.791847
| 2016-02-25T08:05:45
| 2016-02-25T08:05:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,658
|
java
|
package com.inter.admin;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.bind.support.SessionStatus;
import com.inter.app.ArticleServiceImpl;
import com.inter.app.ArticleVO;
import com.inter.member.MemberServiceImpl;
import com.inter.member.MemberVO;
@Controller
@SessionAttributes("admin")
@RequestMapping("/admin")
public class AdminController {
private static final Logger logger = LoggerFactory.getLogger(AdminController.class);
@Autowired MemberVO member;
@Autowired ArticleVO article;
@Autowired MemberServiceImpl memberService;
@Autowired AdminServiceImpl adminService;
@Autowired ArticleServiceImpl articleService;
@RequestMapping("")
public String home(){
logger.info("AdminController-login() 진입");
System.out.println("ㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁ");
return "admin/admin/login.tiles";
}
@RequestMapping("/main")
public String main(){
logger.info("AdminController-home() 진입");
return "admin/admin/main.tiles";
}
@RequestMapping("/member")
public String member(Model model){
logger.info("AdminController-home() 진입");
List<MemberVO> members = adminService.getMemberList();
model.addAttribute("list", members);
return "admin/admin/member.tiles";
}
@RequestMapping("/chart")
public String chart(){
logger.info("AdminController-home() 진입");
return "admin/admin/chart.tiles";
}
@RequestMapping("/board")
public String board(Model model){
logger.info("AdminController-home() 진입");
List<ArticleVO> articles = articleService.getAllList();
model.addAttribute("list", articles);
return "admin/admin/board.tiles";
}
@RequestMapping("/member_list")
public void memberList(
Model model
){
List<MemberVO> members = adminService.getMemberList();
model.addAttribute("list", members);
}
@RequestMapping("/member_profile")
public Model memberProfile(
String id,Model model
){
logger.info("개인 프로필 진입");
logger.info("가져온 아이디{}",id);
member = memberService.selectById(id);
model.addAttribute("member", member);
return model;
}
@RequestMapping("/insert")
public void insert(
@RequestParam("id") String id,
@RequestParam("password") String password,
String email, String phone, Model model){
logger.info("insert 진입");
logger.info("id{}",id);
logger.info("password{}",password);
logger.info("email{}",email);
logger.info("phone{}",phone);
member = memberService.selectById(id);
member.setPassword(password);
member.setEmail(email);
member.setPhone(phone);
int result = memberService.change(member);
model.addAttribute("result", id + " 님의 정보수정을 완료했습니다.");
}
@RequestMapping("/delete")
public Model delete(String id,Model model){
memberService.remove(id);
model.addAttribute("result",id+"님의 탈퇴를 완료했습니다.");
return model;
}
@RequestMapping("/logout")
public void logout(SessionStatus status){
status.setComplete();
}
@RequestMapping("/login")
public void login(
String id,
String password,
Model model
) {
System.out.println("아이디 : " + id );
System.out.println("비번 : " + password );
member = memberService.login(id, password);
if (member == null) {
System.out.println("로그인 실패");
model.addAttribute("result", "fail");
} else {
if (member.getId().equals("choa")) {
System.out.println("로그인 성공");
model.addAttribute("admin", member);
model.addAttribute("result", "success");
} else {
System.out.println("로그인 실패");
model.addAttribute("result", "fail");
}
}
}
@RequestMapping("/notice")
public String notice() {
return "admin/admin/notice.tiles";
}
@RequestMapping("/write_notice")
public void writeNotice(
String title,
String content
) {
article.setUsrSubject(title);
article.setUsrContent(content);
article.setUsrName("관리자");
articleService.write(article);
}
@RequestMapping("/delete_writing")
public void deleteWriting(String code) {
articleService.delete(Integer.parseInt(code));
}
}
|
[
"Administrator@MSDN-SPECIAL"
] |
Administrator@MSDN-SPECIAL
|
e304114215c6df6669c08c22fc7ce008494da78d
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE197_Numeric_Truncation_Error/s01/CWE197_Numeric_Truncation_Error__int_console_readLine_to_byte_71b.java
|
a1adebb08d30fa135f080b6b4ec80ff3456fe7d2
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,435
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE197_Numeric_Truncation_Error__int_console_readLine_to_byte_71b.java
Label Definition File: CWE197_Numeric_Truncation_Error__int.label.xml
Template File: sources-sink-71b.tmpl.java
*/
/*
* @description
* CWE: 197 Numeric Truncation Error
* BadSource: console_readLine Read data from the console using readLine
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: to_byte
* BadSink : Convert data to a byte
* Flow Variant: 71 Data flow: data passed as an Object reference argument from one method to another in different classes in the same package
*
* */
package testcases.CWE197_Numeric_Truncation_Error.s01;
import testcasesupport.*;
public class CWE197_Numeric_Truncation_Error__int_console_readLine_to_byte_71b
{
public void badSink(Object dataObject ) throws Throwable
{
int data = (Integer)dataObject;
{
/* POTENTIAL FLAW: Convert data to a byte, possibly causing a truncation error */
IO.writeLine((byte)data);
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(Object dataObject ) throws Throwable
{
int data = (Integer)dataObject;
{
/* POTENTIAL FLAW: Convert data to a byte, possibly causing a truncation error */
IO.writeLine((byte)data);
}
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
d924721309651043e694e11acc8dda3f265edcd3
|
0806a7984f340fed66db1fca723ce79ede258d6e
|
/transfuse-bootstrap/src/main/java/org/androidtransfuse/bootstrap/Bootstraps.java
|
da4e361fb450a83a4bdecd8d387b0594ef5415c9
|
[
"Apache-2.0"
] |
permissive
|
jschmid/transfuse
|
59322fbb22790afad799cff71b20b7f26858cb98
|
8856e059d972e023fb30d5bed5575423d5bc3a67
|
refs/heads/master
| 2021-01-21T00:05:20.613394
| 2013-07-14T22:15:59
| 2013-07-14T22:15:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,727
|
java
|
/**
* Copyright 2013 John Ericksen
*
* 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.androidtransfuse.bootstrap;
import org.androidtransfuse.scope.Scope;
import org.androidtransfuse.scope.ScopeKey;
import org.androidtransfuse.scope.Scopes;
import org.androidtransfuse.util.GeneratedCodeRepository;
import org.androidtransfuse.util.Providers;
import java.lang.annotation.Annotation;
import java.util.HashMap;
import java.util.Map;
/**
* @author John Ericksen
*/
public final class Bootstraps {
public static final String BOOTSTRAPS_INJECTOR_PACKAGE = "org.androidtransfuse.bootstrap";
public static final String BOOTSTRAPS_INJECTOR_NAME = "Bootstraps$Factory";
public static final String BOOTSTRAPS_INJECTOR_METHOD = "inject";
public static final String BOOTSTRAPS_INJECTOR_GET = "get";
public static final String IMPL_EXT = "$Bootstrap";
private static final GeneratedCodeRepository<BootstrapInjector> REPOSITORY =
new GeneratedCodeRepository<BootstrapInjector>(BOOTSTRAPS_INJECTOR_PACKAGE, BOOTSTRAPS_INJECTOR_NAME) {
@Override
public BootstrapInjector findClass(Class clazz) {
try {
Class bootstrapClass = Class.forName(clazz.getName() + IMPL_EXT);
return new BootstrapInjectorReflectionProxy(bootstrapClass);
} catch (ClassNotFoundException e) {
return null;
}
}
};
private Bootstraps(){
//private utility constructor
}
@SuppressWarnings("unchecked")
public static <T> void inject(T input){
REPOSITORY.get(input.getClass()).inject(input);
}
@SuppressWarnings("unchecked")
public static <T> BootstrapInjector<T> getInjector(Class<T> clazz){
return REPOSITORY.get(clazz);
}
public interface BootstrapInjector<T>{
void inject(T input);
<S> BootstrapInjector<T> add(Class<? extends Annotation> scope, Class<S> singletonClass, S singleton);
}
public abstract static class BootstrapsInjectorAdapter<T> implements BootstrapInjector<T>{
private final Map<Class<? extends Annotation> , Map<Class, Object>> scoped = new HashMap<Class<? extends Annotation> , Map<Class, Object>>();
public <S> BootstrapInjector<T> add(Class<? extends Annotation> scope, Class<S> bindType, S instance){
if(!scoped.containsKey(scope)){
scoped.put(scope, new HashMap<Class, Object>());
}
scoped.get(scope).put(bindType, instance);
return this;
}
protected void scopeSingletons(Scopes scopes){
for (Map.Entry<Class<? extends Annotation>, Map<Class, Object>> scopedEntry : scoped.entrySet()) {
Scope scope = scopes.getScope(scopedEntry.getKey());
if(scope != null){
for (Map.Entry<Class, Object> scopingEntry : scopedEntry.getValue().entrySet()) {
scope.getScopedObject(ScopeKey.of(scopingEntry.getKey()), Providers.of(scopingEntry.getValue()));
}
}
}
}
}
}
|
[
"johncarl81@gmail.com"
] |
johncarl81@gmail.com
|
7abd5c3715d3f74c7a09f0ecf8cad72f6cd639e1
|
3eb360b54c646b2bdf9239696ddd7ce8409ece8d
|
/lm_terminal/src/com/lauvan/resource/service/impl/LegalServiceImpl.java
|
e56a61586ffa07c9eecaf864e6305135c3484b93
|
[] |
no_license
|
amoydream/workspace
|
46a8052230a1eeede2c51b5ed2ca9e4c3f8fc39e
|
72f0f1db3e4a63916634929210d0ab3512a69df5
|
refs/heads/master
| 2021-06-11T12:05:24.524282
| 2017-03-01T01:43:35
| 2017-03-01T01:43:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 356
|
java
|
package com.lauvan.resource.service.impl;
import org.springframework.stereotype.Service;
import com.lauvan.base.dao.BaseDAOSupport;
import com.lauvan.resource.entity.R_Legal;
import com.lauvan.resource.service.LegalService;
@Service("legalService")
public class LegalServiceImpl extends BaseDAOSupport<R_Legal>
implements LegalService{
}
|
[
"jason.ss.tao@qq.com"
] |
jason.ss.tao@qq.com
|
3bf85d4c18ecfdab581c806e7760a1a4611edfd8
|
b89eb13a43cd9668393de0ee00366b160808234a
|
/app/src/main/java/com/aier/ardemo/http/basis/BaseSubscriber.java
|
ca7c144bc16298207b162bd79930b378b1b22470
|
[] |
no_license
|
xiaohualaila/demo
|
c01b7387c2d3b036d8d9e8fb4782f7e7d1854b8e
|
2be2efcfdad53ac5cf903c72f85671b5ccb461e8
|
refs/heads/master
| 2020-05-16T17:12:59.793540
| 2019-05-05T11:26:05
| 2019-05-05T11:26:05
| 183,186,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,504
|
java
|
package com.aier.ardemo.http.basis;
import com.aier.ardemo.http.basis.callback.RequestCallback;
import com.aier.ardemo.http.basis.callback.RequestMultiplyCallback;
import com.aier.ardemo.holder.ToastHolder;
import com.aier.ardemo.http.basis.config.HttpCode;
import com.aier.ardemo.http.basis.exception.base.BaseException;
import io.reactivex.observers.DisposableObserver;
/**
* 作者:leavesC
* 时间:2018/10/27 20:52
* 描述:
* GitHub:https://github.com/leavesC
* Blog:https://www.jianshu.com/u/9df45b87cfdf
*/
public class BaseSubscriber<T> extends DisposableObserver<T> {
private RequestCallback<T> requestCallback;
BaseSubscriber(RequestCallback<T> requestCallback) {
this.requestCallback = requestCallback;
}
@Override
public void onNext(T t) {
if (requestCallback != null) {
requestCallback.onSuccess(t);
}
}
@Override
public void onError(Throwable e) {
e.printStackTrace();
if (requestCallback instanceof RequestMultiplyCallback) {
RequestMultiplyCallback callback = (RequestMultiplyCallback) requestCallback;
if (e instanceof BaseException) {
callback.onFail((BaseException) e);
} else {
callback.onFail(new BaseException(HttpCode.CODE_UNKNOWN, e.getMessage()));
}
} else {
ToastHolder.showToast(e.getMessage());
}
}
@Override
public void onComplete() {
}
}
|
[
"380129462@qq.com"
] |
380129462@qq.com
|
a697d90d5d12c88e343b044203e4d1f72e09068e
|
93c99ee9770362d2917c9494fd6b6036487e2ebd
|
/server/decompiled_apps/2b7122657dcb75ede8840eff964dd94a/com.bankeen.ui.addingbankaccount/h.java
|
5c62c113d2488fd59994d79056ac2fee97e30090
|
[] |
no_license
|
YashJaveri/Satic-Analysis-Tool
|
e644328e50167af812cb2f073e34e6b32279b9ce
|
d6f3be7d35ded34c6eb0e38306aec0ec21434ee4
|
refs/heads/master
| 2023-05-03T14:29:23.611501
| 2019-06-24T09:01:23
| 2019-06-24T09:01:23
| 192,715,309
| 0
| 1
| null | 2023-04-21T20:52:07
| 2019-06-19T11:00:47
|
Smali
|
UTF-8
|
Java
| false
| false
| 821
|
java
|
package com.bankeen.ui.addingbankaccount;
import android.content.Context;
import com.bankeen.data.repository.ao;
import dagger.a.c;
import javax.inject.Provider;
/* compiled from: AddingBankAccountManager_Factory */
public final class h implements c<g> {
private final Provider<Context> a;
private final Provider<ao> b;
public h(Provider<Context> provider, Provider<ao> provider2) {
this.a = provider;
this.b = provider2;
}
/* renamed from: a */
public g b() {
return a(this.a, this.b);
}
public static g a(Provider<Context> provider, Provider<ao> provider2) {
return new g((Context) provider.b(), (ao) provider2.b());
}
public static h b(Provider<Context> provider, Provider<ao> provider2) {
return new h(provider, provider2);
}
}
|
[
"root@localhost.localdomain"
] |
root@localhost.localdomain
|
996f1924d3855835a5ffae654196e4b4d8f51203
|
d528fe4f3aa3a7eca7c5ba4e0aee43421e60857f
|
/src/xsgzgl/wjcf/general/GlobalsValue.java
|
0863d14fbd0be9d202666fc140273beae869f015
|
[] |
no_license
|
gxlioper/xajd
|
81bd19a7c4b9f2d1a41a23295497b6de0dae4169
|
b7d4237acf7d6ffeca1c4a5a6717594ca55f1673
|
refs/heads/master
| 2022-03-06T15:49:34.004924
| 2019-11-19T07:43:25
| 2019-11-19T07:43:25
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 641
|
java
|
package xsgzgl.wjcf.general;
import xgxt.action.Base;
public class GlobalsValue {
public static String xxpymc;// 学校拼音名称
public static String[] xxdmValue = new String[] {};// 学校代码
public static String[] xxmcValue = new String[] {};// 学校
// ###########################end#####################################
public static String getXxpymc(String xxdm) {
for (int i = 0; i < xxdmValue.length; i++) {
if (xxdm.equalsIgnoreCase(xxdmValue[i])) {
xxpymc = xxmcValue[i];
break;
}
}
if (Base.isNull(xxpymc)) {
xxpymc = "general";
}
return xxpymc;
}
}
|
[
"1398796456@qq.com"
] |
1398796456@qq.com
|
2029eeb4ede6f32e5ffbb37c924481db7dbc667f
|
5039317afe0b5d6e901ddc7e465af488597db42b
|
/WEB-INF/src/com/skymiracle/wpx/models/WpxMdo_X.java
|
c4438f452f9a0e6ae94f3058bddcf57979b5b636
|
[] |
no_license
|
neorayer/wpx
|
774b7f05c84a293d099db05033817a03e0cbbe7c
|
8d34e9e74a79aea776d2ea9bfde7754ba416fbca
|
refs/heads/master
| 2021-01-10T07:05:53.087756
| 2016-02-24T04:49:30
| 2016-02-24T04:49:30
| 52,413,781
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 264
|
java
|
package com.skymiracle.wpx.models;
import static com.skymiracle.wpx.Singletons.*;
import com.skymiracle.mdo5.Mdo_X;
public abstract class WpxMdo_X<T extends WpxMdo<T>> extends Mdo_X<T>{
public WpxMdo_X(Class<T> mdoClass) {
super(mdoClass, appStore);
}
}
|
[
"neorayer@gmail.com"
] |
neorayer@gmail.com
|
138bb0cee1b198c9d4f4af28797d409a7287a0e6
|
b55fff51aba2f734f5b12d17bb947fe0f835ac4e
|
/org/w3c/css/atrules/css3/media/MediaResolution.java
|
3f23c6553c06195888c3c704ce3526d8eae7abf0
|
[
"W3C-20150513",
"W3C"
] |
permissive
|
Handig-Eekhoorn/css-validator
|
ca27249b95b76d013702d9470581370ce7778bcb
|
f6841dadfe5ca98c891d239a3d481347bdb34502
|
refs/heads/heek-master
| 2023-03-23T02:54:33.121767
| 2020-01-07T22:00:37
| 2020-01-07T22:00:37
| 215,892,548
| 1
| 0
|
NOASSERTION
| 2022-06-07T14:46:11
| 2019-10-17T21:58:07
|
Java
|
UTF-8
|
Java
| false
| false
| 5,088
|
java
|
// $Id$
//
// (c) COPYRIGHT MIT, ECRIM and Keio University, 2011
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.atrules.css3.media;
import org.w3c.css.atrules.css.media.MediaFeature;
import org.w3c.css.atrules.css.media.MediaRangeFeature;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssComparator;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssResolution;
import org.w3c.css.values.CssTypes;
import org.w3c.css.values.CssValue;
/**
* @spec https://www.w3.org/TR/2017/CR-mediaqueries-4-20170905/#descdef-media-resolution
*/
public class MediaResolution extends MediaRangeFeature {
/**
* Create a new MediaResolution
*/
public MediaResolution() {
}
/**
* Create a new MediaResolution
*
* @param expression The expression for this media feature
* @throws org.w3c.css.util.InvalidParamException
* Values are incorrect
*/
public MediaResolution(ApplContext ac, String modifier,
CssExpression expression, boolean check)
throws InvalidParamException {
if (expression != null) {
if (expression.getCount() > 2) {
throw new InvalidParamException("unrecognize", ac);
}
if (expression.getCount() == 0) {
throw new InvalidParamException("few-value", getFeatureName(), ac);
}
CssValue val = expression.getValue();
// it must be a >=0 integer only
switch (val.getType()) {
case CssTypes.CSS_COMPARATOR:
if (modifier != null) {
throw new InvalidParamException("nomodifierrangemedia",
getFeatureName(), ac);
}
CssComparator p = (CssComparator) val;
value = checkValue(ac, p.getParameters(), getFeatureName());
comparator = p.toString();
expression.next();
if (!expression.end()) {
val = expression.getValue();
if (val.getType() != CssTypes.CSS_COMPARATOR) {
throw new InvalidParamException("unrecognize", ac);
}
CssComparator p2;
p2 = (CssComparator) val;
otherValue = checkValue(ac, p2.getParameters(), getFeatureName());
otherComparator = p2.toString();
checkComparators(ac, p, p2, getFeatureName());
}
break;
case CssTypes.CSS_RESOLUTION:
value = checkValue(ac, expression, getFeatureName());
break;
default:
throw new InvalidParamException("unrecognize", ac);
}
expression.next();
setModifier(ac, modifier);
} else {
if (modifier != null) {
throw new InvalidParamException("nomodifiershortmedia",
getFeatureName(), ac);
}
}
}
static CssValue checkValue(ApplContext ac, CssExpression expression, String caller)
throws InvalidParamException {
if (expression.getCount() == 0) {
throw new InvalidParamException("few-value", caller, ac);
}
CssValue val = expression.getValue();
CssValue value = null;
// it must be a >=0 integer only
if (val.getType() == CssTypes.CSS_RESOLUTION) {
CssResolution valnum = (CssResolution) val;
if (valnum.getFloatValue() < 0.f) {
throw new InvalidParamException("negative-value",
val.toString(), ac);
}
value = valnum;
} else {
throw new InvalidParamException("unrecognize", ac);
}
return value;
}
public MediaResolution(ApplContext ac, String modifier, CssExpression expression)
throws InvalidParamException {
this(ac, modifier, expression, false);
}
/**
* Returns the value of this media feature.
*/
public Object get() {
return value;
}
/**
* Returns the name of this media feature.
*/
public final String getFeatureName() {
return "resolution";
}
/**
* Compares two media features for equality.
*
* @param other The other media features.
*/
public boolean equals(MediaFeature other) {
try {
MediaResolution mr = (MediaResolution) other;
return (((value == null) && (mr.value == null)) || ((value != null) && value.equals(mr.value)))
&& (((modifier == null) && (mr.modifier == null)) || ((modifier != null) && modifier.equals(mr.modifier)));
} catch (ClassCastException cce) {
return false;
}
}
}
|
[
"ylafon@w3.org"
] |
ylafon@w3.org
|
17959d268c54f1e9154cc5f73330e8ee25cae0f5
|
7933a54177ef16052648edfd377626c72e6d5d4b
|
/throw-common-msg/src/com/playmore/dbobject/staticdb/BossstageS.java
|
39f1193946b039799c004cd32b6162a7d4df8084
|
[] |
no_license
|
China-Actor/Throw-Server
|
0e6377e875409ff1133dd3e64c6d034005a75c25
|
0571ba6c78842b3674913162b6fb2bfcc5274e9c
|
refs/heads/master
| 2022-10-12T22:25:55.963855
| 2020-04-18T09:55:55
| 2020-04-18T09:55:55
| 252,702,013
| 0
| 1
| null | 2022-10-04T23:57:17
| 2020-04-03T10:34:28
|
Java
|
UTF-8
|
Java
| false
| false
| 1,628
|
java
|
package com.playmore.dbobject.staticdb;
import java.io.Serializable;
import com.playmore.database.DBFieldName;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
/**
* Do not touch! Close it Now!
*/
@SuppressWarnings("serial")
public class BossstageS implements Serializable {
@DBFieldName(fieldName="阶段id", isNullable="columnNoNulls")
private int id;
@DBFieldName(fieldName="bossid", isNullable="columnNullable")
private int bossid;
@DBFieldName(fieldName="血量", isNullable="columnNullable")
private int hp;
@DBFieldName(fieldName="货币掉落包", isNullable="columnNullable")
private int drop1;
@DBFieldName(fieldName="掉落装备包", isNullable="columnNullable")
private int drop2;
@DBFieldName(fieldName="掉落钻石包", isNullable="columnNullable")
private int drop3;
public BossstageS(){
}
public void setId(int id) {
this.id=id;
}
public int getId() {
return id;
}
public void setBossid(int bossid) {
this.bossid=bossid;
}
public int getBossid() {
return bossid;
}
public void setHp(int hp) {
this.hp=hp;
}
public int getHp() {
return hp;
}
public void setDrop1(int drop1) {
this.drop1=drop1;
}
public int getDrop1() {
return drop1;
}
public void setDrop2(int drop2) {
this.drop2=drop2;
}
public int getDrop2() {
return drop2;
}
public void setDrop3(int drop3) {
this.drop3=drop3;
}
public int getDrop3() {
return drop3;
}
public String toString() {
return "BossstageS [id=" + id + " ,bossid=" + bossid + " ,hp=" + hp + " ,drop1=" + drop1 + " ,drop2=" + drop2 + " ,drop3=" + drop3+ "]";
}
}
|
[
"1584992167@qq.com"
] |
1584992167@qq.com
|
0bab26552e896ef2b660bb9931d653d796f873db
|
7165a598196001af2534020e7bd63d727b264f40
|
/app/src/main/java/com/tehike/client/dtc/single/app/project/execption/compat/ActivityKillerV24_V25.java
|
e87d21c9cc48df898ab2b0e2ae33d752b21ade3d
|
[] |
no_license
|
wpfsean/Dtc_F
|
65ee0105ea5b0b33a8dce14d495bc86ff8348f50
|
486a20b0a7a06136e66bbe021d39069213d8b787
|
refs/heads/master
| 2020-05-04T07:52:40.319849
| 2019-04-08T01:55:11
| 2019-04-08T01:55:11
| 171,991,661
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,538
|
java
|
package com.tehike.client.dtc.single.app.project.execption.compat;
import android.app.Activity;
import android.content.Intent;
import android.os.IBinder;
import android.os.Message;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
/**
* Created by wanjian on 2018/5/24.
* <p>
* android 7.1.1
* <p>
* ActivityManagerNative.getDefault().finishActivity(mToken, resultCode, resultData, finishTask))
*/
public class ActivityKillerV24_V25 implements IActivityKiller {
@Override
public void finishLaunchActivity(Message message) {
try {
Object activityClientRecord = message.obj;
Field tokenField = activityClientRecord.getClass().getDeclaredField("token");
tokenField.setAccessible(true);
IBinder binder = (IBinder) tokenField.get(activityClientRecord);
finish(binder);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void finishResumeActivity(Message message) {
finishSomeArgs(message);
}
@Override
public void finishPauseActivity(Message message) {
finishSomeArgs(message);
}
@Override
public void finishStopActivity(Message message) {
finishSomeArgs(message);
}
private void finishSomeArgs(Message message) {
try {
Object someArgs = message.obj;
Field arg1Field = someArgs.getClass().getDeclaredField("arg1");
arg1Field.setAccessible(true);
IBinder binder = (IBinder) arg1Field.get(someArgs);
finish(binder);
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}
private void finish(IBinder binder) throws Exception {
/*
ActivityManagerNative.getDefault()
.finishActivity(r.token, Activity.RESULT_CANCELED, null, Activity.DONT_FINISH_TASK_WITH_ACTIVITY);
*/
Class activityManagerNativeClass = Class.forName("android.app.ActivityManagerNative");
Method getDefaultMethod = activityManagerNativeClass.getDeclaredMethod("getDefault");
Object activityManager = getDefaultMethod.invoke(null);
Method finishActivityMethod = activityManager.getClass().getDeclaredMethod("finishActivity", IBinder.class, int.class, Intent.class, int.class);
int DONT_FINISH_TASK_WITH_ACTIVITY = 0;
finishActivityMethod.invoke(activityManager, binder, Activity.RESULT_CANCELED, null, DONT_FINISH_TASK_WITH_ACTIVITY);
}
}
|
[
"wpfsean@126.com"
] |
wpfsean@126.com
|
3df09111251bb70085fb3ee84457fdd83c11113e
|
477496d43be8b24a60ac1ccee12b3c887062cebd
|
/shirochapter16/src/main/java/com/haien/spring/SpringUtils.java
|
3a4be49efc42c18635ba39445697908aea1922a9
|
[] |
no_license
|
Eliyser/my-shiro-example
|
e860ba7f5b2bb77a87b2b9ec77c46207a260b985
|
75dba475dc50530820d105da87ff8b031701e564
|
refs/heads/master
| 2020-05-20T23:45:31.231923
| 2019-05-09T14:06:04
| 2019-05-09T14:06:04
| 185,808,582
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,859
|
java
|
package com.haien.spring;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
/**
* @Author haien
* @Description 从Spring上下文获取bean信息,被Functions类调用以获取bean注入其属性中
* @Date 2019/3/16
**/
public final class SpringUtils implements BeanFactoryPostProcessor {
private static ConfigurableListableBeanFactory beanFactory; // Spring应用上下文环境
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
throws BeansException {
SpringUtils.beanFactory = beanFactory;
}
/**
* 根据name获取bean实例
* @param name
* @return Object
* @throws org.springframework.beans.BeansException
*
*/
@SuppressWarnings("unchecked")
public static <T> T getBean(String name) throws BeansException {
return (T) beanFactory.getBean(name);
}
/**
* 获取类型为requiredType的bean对象
* @param clz
* @return
* @throws org.springframework.beans.BeansException
*
*/
public static <T> T getBean(Class<T> clz) throws BeansException {
@SuppressWarnings("unchecked")
T result = (T) beanFactory.getBean(clz);
return result;
}
/**
* 判断beanFactory是否包含名为name的bean实例,是则返回true
* @param name
* @return boolean
*/
public static boolean containsBean(String name) {
return beanFactory.containsBean(name);
}
/**
* 判断指定name的bean是一个singleton还是一个prototype(每申请一次重新new一个返回)。
* 若该bean不存在则抛异常(NoSuchBeanDefinitionException)
* @param name
* @return boolean
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
*/
public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException {
return beanFactory.isSingleton(name);
}
/**
* 获取指定name的bean的类型
* @param name
* @return Class 注册对象的类型
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
*/
public static Class<?> getType(String name) throws NoSuchBeanDefinitionException {
return beanFactory.getType(name);
}
/**
* 如果指定name的bean有别名,则返回这些别名
* @param name
* @return
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
*
*/
public static String[] getAliases(String name) throws NoSuchBeanDefinitionException {
return beanFactory.getAliases(name);
}
}
|
[
"1410343862@qq.com"
] |
1410343862@qq.com
|
e5d602bac52b6c422a4613b9c713d87fc1ed0bda
|
ebfff291a6ee38646c4d4e176f5f2eddf390ace4
|
/orange-demo-flowable/orange-demo-flowable-service/common/common-online/src/main/java/com/flow/demo/common/online/object/SqlTable.java
|
47c23750b78b77b0906f326b2e42bd6b845b1fc3
|
[
"Apache-2.0"
] |
permissive
|
jiazhizhong/orange-admin
|
a9d6b5b97cbea72e8fcb55c081b7dc6a523847df
|
bbe737d540fb670fd4ed5514f7faed4f076ef3d4
|
refs/heads/master
| 2023-08-21T11:31:22.188591
| 2021-10-30T06:06:40
| 2021-10-30T06:06:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 596
|
java
|
package com.flow.demo.common.online.object;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* 数据库中的表对象。
*
* @author Jerry
* @date 2021-06-06
*/
@Data
public class SqlTable {
/**
* 表名称。
*/
private String tableName;
/**
* 表注释。
*/
private String tableComment;
/**
* 创建时间。
*/
private Date createTime;
/**
* 关联的字段列表。
*/
private List<SqlTableColumn> columnList;
/**
* 数据库链接Id。
*/
private Long dblinkId;
}
|
[
"707344974@qq.com"
] |
707344974@qq.com
|
9c9b4a78bf11a0e8de2bf496f19539a2e11d89da
|
e75567eb17e621a20b537ca060eef437da6f91de
|
/cooperativa-model/cooperativa-model-api/src/main/java/org/sistcoop/cooperativa/models/DetalleTransaccionClienteModel.java
|
81dd411f60b4535130837f8f71a7a5ceb7c605f0
|
[] |
no_license
|
sistcoop/cooperativa
|
2e9019cb54f8f0ec5fbccfede49b33ffb0691562
|
6b579b89a22725865c1f4fee6aebcd745a7e292e
|
refs/heads/master
| 2016-09-03T06:33:26.543651
| 2015-10-22T22:56:11
| 2015-10-22T22:56:11
| 33,275,083
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 297
|
java
|
package org.sistcoop.cooperativa.models;
import java.math.BigDecimal;
public interface DetalleTransaccionClienteModel extends Model {
String getId();
BigDecimal getValor();
int getCantidad();
BigDecimal getSubtotal();
TransaccionClienteModel getTransaccionCliente();
}
|
[
"carlosthe19916@gmail.com"
] |
carlosthe19916@gmail.com
|
0699c15d0e9b79613b2ca6b626e6b406d20f6d91
|
ad5b11ce6186ca76bf4098852d34b4a806906b1f
|
/zhao_sheng/src/main/java/com/yfy/app/album/SingePicShowActivity.java
|
bbd64b8384c0406bb999e0be574111e68d29fce0
|
[] |
no_license
|
Zhaoxianxv/zhao_sheng1
|
700666c2589529aee9a25597f63cc6a07dcfe78c
|
9fdd9512bf38fcfe4ccbe197034a006a3d053c66
|
refs/heads/master
| 2022-12-14T03:07:48.096666
| 2020-09-06T03:36:17
| 2020-09-06T03:36:17
| 291,885,920
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,775
|
java
|
package com.yfy.app.album;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import com.example.zhao_sheng.R;
import com.yfy.base.activity.BaseActivity;
import com.yfy.final_tag.TagFinal;
import com.yfy.final_tag.glide.GlideTools;
import com.yfy.view.image.PinchImageView;
public class SingePicShowActivity extends BaseActivity {
private String url,title;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.singe_pic_show);
getData();
initSQToolbar();
}
private void initSQToolbar() {
Toolbar toolbar= (Toolbar) findViewById(R.id.show_pic_one_title_bar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (title!=null){
toolbar.setTitle(title);
}else{
toolbar.setTitle("返回");
}
toolbar.setNavigationIcon(R.drawable.ic_left_nav);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
}
public void getData(){
Bundle b = getIntent().getExtras();
if (b != null) {
if (b.containsKey(TagFinal.ALBUM_SINGE_URI)) {
url = b.getString(TagFinal.ALBUM_SINGE_URI);
}
if (b.containsKey("title")) {
title = b.getString("title");
}
}
initView();
}
public void initView(){
PinchImageView imageView= (PinchImageView) findViewById(R.id.big_url_pic);
GlideTools.loadImage(mActivity,url,imageView);
}
}
|
[
"1006584058@qq.com"
] |
1006584058@qq.com
|
80f521fbe553db1fc5fc53d2a939a4cbe155f2e4
|
0b97409901c47b520b33558ae2d3a3f16479c142
|
/FiapStore/src/main/java/com/fiap/demo/Model/Pedido.java
|
422dfc27eb946e5cae3c3f88a6e4949a4ab53c12
|
[] |
no_license
|
paulosthiven25/DBE-DigitalBusinessEnablement-
|
e57b75a06015fef0a64ba3b90439389c162127d2
|
67d0787d085053b22612f05bce607920feaad0f6
|
refs/heads/master
| 2022-12-01T04:23:45.858460
| 2019-10-01T15:04:41
| 2019-10-01T15:04:41
| 183,063,887
| 0
| 0
| null | 2022-11-24T08:16:34
| 2019-04-23T17:27:31
|
Java
|
UTF-8
|
Java
| false
| false
| 1,793
|
java
|
package com.fiap.demo.Model;
import com.fiap.demo.Model.Cliente;
import javax.persistence.*;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Future;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
@Entity
@SequenceGenerator(name="pedido", sequenceName = "SQ_T_PEDIDO", allocationSize = 1)
public class Pedido {
@Id
@GeneratedValue(generator = "pedido", strategy = GenerationType.SEQUENCE)
@NotNull
private int codigo;
@NotNull
@DecimalMin(value = "1",message = "O valor não pode ser menor que 0,00")
private double valor;
@NotNull
@Future(message = "A data não pode estar no passado")
private LocalDate data;
@NotNull
@Min(value = 1,message = "A quantidade mínima é 1")
private int quantidade;
private boolean pago;
@NotNull
@ManyToOne
private Cliente cliente;
public int getCodigo() {
return codigo;
}
public void setCodigo(int codigo) {
this.codigo = codigo;
}
public double getValor() {
return valor;
}
public void setValor(double valor) {
this.valor = valor;
}
public LocalDate getData() {
return data;
}
public void setData(LocalDate data) {
this.data = data;
}
public int getQuantidade() {
return quantidade;
}
public void setQuantidade(int quantidade) {
this.quantidade = quantidade;
}
public boolean isPago() {
return pago;
}
public void setPago(boolean pago) {
this.pago = pago;
}
public Cliente getCliente() {
return cliente;
}
public void setCliente(Cliente cliente) {
this.cliente = cliente;
}
}
|
[
"logonaluno@local.com"
] |
logonaluno@local.com
|
ce246ed0cf6f98a53e93e8d5376ff2cc7380a373
|
745e4cc70b21c2c9fad2cc5a20026c29c1d73ea6
|
/jte-runtime/src/main/java/gg/jte/support/LocalizationSupport.java
|
8d84c097c37763d684e09d8d4e02fb949340e433
|
[
"Apache-2.0"
] |
permissive
|
patadams-company/jte
|
574cc8469022e1cf34d37b8ebc9d19c4c1cedd8e
|
a9af62197aff631aa1044ee1a1a64924a4d67419
|
refs/heads/master
| 2023-03-02T02:06:47.089428
| 2020-11-25T12:29:25
| 2020-11-25T12:29:25
| 316,601,637
| 0
| 0
|
Apache-2.0
| 2021-02-03T19:37:32
| 2020-11-27T21:17:04
| null |
UTF-8
|
Java
| false
| false
| 3,139
|
java
|
package gg.jte.support;
import gg.jte.TemplateOutput;
import gg.jte.Content;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public interface LocalizationSupport {
Pattern pattern = Pattern.compile("\\{(\\d+)}");
String lookup(String key);
@SuppressWarnings("unused") // Called by template code
default Content localize(String key) {
String value = lookup(key);
if (value == null) {
return null;
}
return output -> output.writeContent(value);
}
@SuppressWarnings("unused") // Called by template code
default Content localize(String key, Object ... params) {
String value = lookup(key);
if (value == null) {
return null;
}
return new Content() {
@Override
public void writeTo(TemplateOutput output) {
Matcher matcher = pattern.matcher(value);
if (matcher.find()) {
int startIndex = 0;
do {
output.writeContent(value.substring(startIndex, matcher.start()));
startIndex = matcher.end();
int argumentIndex = Integer.parseInt(matcher.group(1));
if (argumentIndex < params.length) {
Object param = params[argumentIndex];
if (param != null) {
writeParam(output, param);
}
}
} while (matcher.find());
output.writeContent(value.substring(startIndex));
} else {
output.writeContent(value);
}
}
private void writeParam(TemplateOutput output, Object param) {
if (param instanceof String) {
output.writeUserContent((String) param);
} else if (param instanceof Content) {
output.writeUserContent((Content) param);
} else if (param instanceof Enum) {
output.writeUserContent((Enum<?>) param);
} else if (param instanceof Boolean) {
output.writeUserContent((boolean) param);
} else if (param instanceof Byte) {
output.writeUserContent((byte) param);
} else if (param instanceof Short) {
output.writeUserContent((short) param);
} else if (param instanceof Integer) {
output.writeUserContent((int) param);
} else if (param instanceof Long) {
output.writeUserContent((long) param);
} else if (param instanceof Float) {
output.writeUserContent((float) param);
} else if (param instanceof Double) {
output.writeUserContent((double) param);
} else if (param instanceof Character) {
output.writeUserContent((char) param);
}
}
};
}
}
|
[
"andy@mazebert.com"
] |
andy@mazebert.com
|
92aa51a185c253e8c77415ef7908e3ca41270a60
|
d620ab67aa540c7d8466325a39f962fcf074bd06
|
/modules/petals-messaging/src/main/java/org/ow2/petals/messaging/framework/message/mime/writer/TextPlainWriter.java
|
9f0ba925a53d2e860526e741ef94d7880aaebe40
|
[] |
no_license
|
chamerling/petals-dsb
|
fa8439f28bb4077a9324371d7eb691b484a12d24
|
58b355b79f4a4d753a3c762f619ec2b32833549a
|
refs/heads/master
| 2016-09-05T20:44:59.125937
| 2012-03-27T10:28:37
| 2012-03-27T10:28:37
| 3,722,608
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,811
|
java
|
/**
* PETALS: PETALS Services Platform Copyright (C) 2009 EBM WebSourcing
*
* This library 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 any later version.
*
* This library 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 library; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*
* Initial developer(s): EBM WebSourcing
*/
package org.ow2.petals.messaging.framework.message.mime.writer;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import org.ow2.petals.messaging.framework.message.Constants;
import org.ow2.petals.messaging.framework.message.Message;
import org.ow2.petals.messaging.framework.message.mime.Writer;
/**
* @author chamerling - eBM WebSourcing
*
*/
public class TextPlainWriter implements Writer {
/**
* {@inheritDoc}
*/
public byte[] getBytes(Message message, String encoding) throws WriterException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
// content is is a property...
Object o = message.get(Constants.RAW);
if ((o != null) && (o instanceof String)) {
try {
out.write(((String) o).getBytes());
} catch (IOException e) {
throw new WriterException(e);
}
}
return out.toByteArray();
}
}
|
[
"christophe.hamerling@gmail.com"
] |
christophe.hamerling@gmail.com
|
8505d2f7ad3bf10d924acf096a40b09c49943515
|
d653029a119100465a908e663bf795c4dedfe43a
|
/src/main/java/com/common/business/planmgr/pre/mkoutline/web/TResearchOutlineController.java
|
6e7e06b01d628ead81cd78456371e3080a6ad34a
|
[] |
no_license
|
MengleiZhao/bg_perfm-main
|
d59740a42995e3b39c5ddbd0df710d87798f3e80
|
38751d15947984159da0069b54c8db547c55bbb3
|
refs/heads/master
| 2023-05-01T01:54:00.791997
| 2021-05-08T05:51:39
| 2021-05-08T05:51:39
| 365,401,842
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 372
|
java
|
package com.common.business.planmgr.pre.mkoutline.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
/**
* <p>
* 拟定调研提纲 前端控制器
* </p>
*
* @author 田鑫艳
* @since 2021-04-21
*/
@Controller
@RequestMapping("/tResearchOutline")
public class TResearchOutlineController {
}
|
[
"649387483@qq.com"
] |
649387483@qq.com
|
488d62cde11424498313590c7cca9e29669d4326
|
34b713d69bae7d83bb431b8d9152ae7708109e74
|
/admin/broadleaf-contentmanagement-module/src/main/java/org/broadleafcommerce/cms/page/domain/PageTemplateFieldGroupXref.java
|
22945d63ace6029463be91545bb48c9457aa3cf6
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
sinotopia/BroadleafCommerce
|
d367a22af589b51cc16e2ad094f98ec612df1577
|
502ff293d2a8d58ba50a640ed03c2847cb6369f6
|
refs/heads/BroadleafCommerce-4.0.x
| 2021-01-23T14:14:45.029362
| 2019-07-26T14:18:05
| 2019-07-26T14:18:05
| 93,246,635
| 0
| 0
| null | 2017-06-03T12:27:13
| 2017-06-03T12:27:13
| null |
UTF-8
|
Java
| false
| false
| 1,466
|
java
|
/*
* #%L
* BroadleafCommerce CMS Module
* %%
* Copyright (C) 2009 - 2014 Broadleaf Commerce
* %%
* 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.
* #L%
*/
package org.broadleafcommerce.cms.page.domain;
import org.broadleafcommerce.cms.field.domain.FieldGroup;
import org.broadleafcommerce.common.copy.MultiTenantCloneable;
import java.io.Serializable;
import java.math.BigDecimal;
/**
*
* @author Kelly Tisdell
*
*/
public interface PageTemplateFieldGroupXref extends Serializable, MultiTenantCloneable<PageTemplateFieldGroupXref> {
public void setId(Long id);
public Long getId();
public void setPageTemplate(PageTemplate pageTemplate);
public PageTemplate getPageTemplate();
public void setFieldGroup(FieldGroup fieldGroup);
public FieldGroup getFieldGroup();
public void setGroupOrder(BigDecimal groupOrder);
public BigDecimal getGroupOrder();
}
|
[
"sinosie7en@gmail.com"
] |
sinosie7en@gmail.com
|
9f22ba39ff0b5fc0ebf3faf8bbf0d4f2a79fc150
|
7303873dfd8c515337d99bb502a94884cb484f18
|
/target/generated/src/main/java/org/cxrus/canonapi/service/DSubCatProductV2.java
|
f36f27e020e3d439112de1f1e91c8e997e67e0ca
|
[] |
no_license
|
sidie88/soap
|
b7b30213f8f8e7e6fa2004c008b29bd573d319b8
|
bc81ca7af13063b34c0a07ffcfe38f85e88cec08
|
refs/heads/master
| 2021-03-12T23:56:03.794313
| 2015-05-11T02:23:22
| 2015-05-11T02:23:22
| 35,397,099
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,240
|
java
|
package org.cxrus.canonapi.service;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for dSubCatProductV2 complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="dSubCatProductV2">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="productLongName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="productSystemName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="regions" type="{http://service.canonapi.cxrus.org/}dRegionV2" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "dSubCatProductV2", propOrder = {
"productLongName",
"productSystemName",
"regions"
})
public class DSubCatProductV2 {
protected String productLongName;
protected String productSystemName;
@XmlElement(nillable = true)
protected List<DRegionV2> regions;
/**
* Gets the value of the productLongName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProductLongName() {
return productLongName;
}
/**
* Sets the value of the productLongName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProductLongName(String value) {
this.productLongName = value;
}
/**
* Gets the value of the productSystemName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProductSystemName() {
return productSystemName;
}
/**
* Sets the value of the productSystemName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProductSystemName(String value) {
this.productSystemName = value;
}
/**
* Gets the value of the regions property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the regions property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRegions().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DRegionV2 }
*
*
*/
public List<DRegionV2> getRegions() {
if (regions == null) {
regions = new ArrayList<DRegionV2>();
}
return this.regions;
}
}
|
[
"sidie88@gmail.com"
] |
sidie88@gmail.com
|
81ecc9363c9d51df3dacf2d9950ac9252b2f1af2
|
3a220032023dd69952e312742424dd6bff9a59c0
|
/_/elasticsearch-essentials-java-examples/src/main/java/com/essentials/elasticsearch/connection/ES_Connection.java
|
962101f5ef93a900248736739d2a6d8dbcf21ccf
|
[
"Apache-2.0"
] |
permissive
|
paullewallencom/elasticsearch-978-1-7843-9101-0
|
3812b92e476d613c0c83b83966f33f3cdb88dfcf
|
ff74cb7faafdf54c9d1ba828f74fea592898201f
|
refs/heads/main
| 2023-02-10T08:11:02.726847
| 2020-12-30T01:06:24
| 2020-12-30T01:06:24
| 319,436,158
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 997
|
java
|
/**
* @author bharvi
*/
package com.essentials.elasticsearch.connection;
import java.net.InetAddress;
import java.net.UnknownHostException;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
public class ES_Connection {
/**
* Class for initializing ELasticsearch connection
*/
static Client client;
static Settings settings;
public static Client getEsConnection()
{
settings = Settings.settingsBuilder().put("cluster.name", "elasticsearch").put("path.home", "/").build();
try {
client = TransportClient.builder().settings(settings).build()
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), 9300));
System.out.println("connection created");
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return client;
}
}
|
[
"paullewallencom@users.noreply.github.com"
] |
paullewallencom@users.noreply.github.com
|
99b8dc37085fced84ae3854f3883a17f7e1a4ef9
|
f14562f70d910628d5510227b94dafcd46d4714c
|
/projects/stage-1/middleware-frameworks/my-interceptor/src/main/java/org/geektimes/interceptor/InterceptorRegistry.java
|
f2a125f1f2d7daae6925dbe74af74e8b44ecf06d
|
[
"Apache-2.0"
] |
permissive
|
zcw888/geekbang-lessons
|
2af6be8e55632db0774cf4a3225994077783bb93
|
df75a26ce25eae6d1f16ed430d98e389f07b8e8c
|
refs/heads/master
| 2023-08-02T18:29:14.495523
| 2021-09-08T01:00:35
| 2021-09-08T01:00:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,890
|
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.geektimes.interceptor;
import org.geektimes.commons.lang.util.ClassLoaderUtils;
import org.geektimes.commons.util.ServiceLoaders;
import org.geektimes.interceptor.util.InterceptorUtils;
import javax.interceptor.InterceptorBinding;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.util.List;
import static java.util.Arrays.asList;
import static org.geektimes.commons.util.ServiceLoaders.loadSpi;
/**
* The registry of {@link Interceptor}
*
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
* @since 1.0.0
*/
public interface InterceptorRegistry {
void registerInterceptorClass(Class<?> interceptorClass);
default void registerInterceptorClasses(Class<?> interceptorClass, Class<?>... otherInterceptorClasses) {
registerInterceptorClass(interceptorClass);
registerInterceptorClasses(otherInterceptorClasses);
}
default void registerInterceptorClasses(Class<?>[] interceptorClasses) {
registerInterceptorClasses(asList(interceptorClasses));
}
default void registerInterceptorClasses(Iterable<Class<?>> interceptorClasses) {
interceptorClasses.forEach(this::registerInterceptorClass);
}
void registerInterceptor(Object interceptor);
default void registerInterceptors(Object interceptor, Object... otherInterceptors) {
registerInterceptor(interceptor);
registerInterceptors(otherInterceptors);
}
default void registerInterceptors(Object[] interceptors) {
registerInterceptors(asList(interceptors));
}
default void registerInterceptors(Iterable<?> interceptors) {
interceptors.forEach(this::registerInterceptor);
}
default void registerDiscoveredInterceptors() {
registerInterceptors(ServiceLoaders.load(Interceptor.class));
}
/**
* Gets the {@linkplain InterceptorBinding interceptor bindings} of the interceptor.
*
* @return the instance of {@linkplain InterceptorBindings interceptor bindings}
* @throws IllegalStateException See exception details on {@link InterceptorUtils#isInterceptorClass(Class)}
*/
default InterceptorBindings getInterceptorBindings(Class<?> interceptorClass) throws IllegalStateException {
return getInterceptorInfo(interceptorClass).getInterceptorBindings();
}
/**
* Get the instance of {@link InterceptorInfo} from the given interceptor class
*
* @param interceptorClass the given interceptor class
* @return non-null if <code>interceptorClass</code> is a valid interceptor class
* @throws IllegalStateException See exception details on {@link InterceptorUtils#isInterceptorClass(Class)}
*/
InterceptorInfo getInterceptorInfo(Class<?> interceptorClass) throws IllegalStateException;
/**
* Gets the sorted {@link List list} of {@link javax.interceptor.Interceptor @Interceptor} instances
*
* @param interceptedElement the intercepted of {@linkplain AnnotatedElement annotated element}
* @return a non-null read-only sorted {@link List list}
*/
List<Object> getInterceptors(AnnotatedElement interceptedElement);
/**
* <p>
* Declares an annotation type as an {@linkplain javax.interceptor.Interceptor @Interceptor} binding type if you
* wish to make an annotation an interceptor binding type without adding {@link InterceptorBinding} to it.
* </p>
*
* @param interceptorBindingType
*/
void registerInterceptorBindingType(Class<? extends Annotation> interceptorBindingType);
default boolean isInterceptorBinding(Annotation annotation) {
return isInterceptorBindingType(annotation.annotationType());
}
boolean isInterceptorBindingType(Class<? extends Annotation> annotationType);
static InterceptorRegistry getInstance(ClassLoader classLoader) {
return loadSpi(InterceptorRegistry.class, classLoader);
}
static InterceptorRegistry getInstance() {
return getInstance(ClassLoaderUtils.getClassLoader(InterceptorRegistry.class));
}
}
|
[
"mercyblitz@gmail.com"
] |
mercyblitz@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.