blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 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
sequencelengths 1
1
| author_id
stringlengths 1
79
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
76025eb4635611621f044df2727f087da9a311e9 | b2986a7916527aa3c79e768f23b8bea77b523cb6 | /src/main/java/controller/CollectController.java | 8d9df876bbf4efc5132bba5cea2b1577585e2626 | [] | no_license | ShawyerPeng/SharedCampus | ff4d42a2d7254212febc90c9e889a1539c5b8d59 | 076e95dea5451f7f152a4336bd288f484bcbd9dd | refs/heads/master | 2021-08-28T21:28:30.955360 | 2017-12-13T06:04:51 | 2017-12-13T06:04:51 | 104,431,178 | 6 | 3 | null | null | null | null | UTF-8 | Java | false | false | 2,275 | java | package controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import po.Collect;
import po.Order;
import po.PagedResult;
import service.CollectService;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping("/collect")
public class CollectController {
@Autowired
private CollectService collectService;
@RequestMapping("/insert")
@ResponseBody
public Map<String, Object> insert(@RequestBody Collect collect) {
Map<String, Object> map = new HashMap<>();
Map<String, Object> data = new HashMap<>();
int success = collectService.insertCollect(collect);
if (success == 1) {
map.put("data", data);
map.put("statusCode", "200");
map.put("message", "收藏添加成功");
return map;
} else {
map.put("data", data);
map.put("statusCode", "400");
map.put("message", "收藏添加失败");
return map;
}
}
@RequestMapping("/delete")
@ResponseBody
public Map<String, Object> delete(@RequestBody Collect collect) {
Map<String, Object> map = new HashMap<>();
Map<String, Object> data = new HashMap<>();
Integer collectId = collect.getCollectId();
int success = collectService.deleteCollect(collectId);
if (success == 1) {
map.put("data", data);
map.put("statusCode", "200");
map.put("message", "收藏删除成功");
return map;
} else {
map.put("data", data);
map.put("statusCode", "400");
map.put("message", "收藏删除失败");
return map;
}
}
@RequestMapping("/getAllCollects")
@ResponseBody
public PagedResult<Collect> getAllCollects(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageNo") Integer pageSize) {
return collectService.getAllCollects(pageNo, pageSize);
}
}
| [
"patrickyateschn@gmail.com"
] | patrickyateschn@gmail.com |
d1ace6a9fa2141b64bbb9013cf2ccd76863e9717 | 6829a76a72e1d13e53da18d267771f44139778a9 | /src/java/com/yz/demo/domain/Permission.java | 7a78d71a6f55a42167e3471554ccc99d3534d65c | [] | no_license | SuphieLiang/ssm_shiro_demo | 936f9bb6d3413676339da2967a2f45cc730a843f | fe40d188f5ba361ca6a3adfdcef68c35bf9c2254 | refs/heads/master | 2021-01-19T14:49:29.384900 | 2017-08-23T06:12:05 | 2017-08-23T06:12:05 | 100,919,703 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,749 | java | package com.yz.demo.domain;
import java.io.Serializable;
public class Permission implements Serializable{
private Long id;
private String permission;
private String description;
private Boolean available=Boolean.FALSE;
public Permission() {
}
public Permission(String permission, String description, Boolean available) {
this.permission = permission;
this.description = description;
this.available = available;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPermission() {
return permission;
}
public void setPermission(String permission) {
this.permission = permission;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Boolean getAvailable() {
return available;
}
public void setAvailable(Boolean available) {
this.available = available;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Permission that = (Permission) o;
return id != null ? id.equals(that.id) : that.id == null;
}
@Override
public int hashCode() {
return id != null ? id.hashCode() : 0;
}
@Override
public String toString() {
return "Permission{" +
"id=" + id +
", permission='" + permission + '\'' +
", description='" + description + '\'' +
", available=" + available +
'}';
}
}
| [
"you@example.com"
] | you@example.com |
b4acef1d629bec925f5dd72a56bc5a868ea8ec7b | 5f03ff781dead5207da856a78af34899520568e3 | /src/main/java/com/gupaoedu/vip/pattern/proxy/dynamicproxy/gpproxy/proxy/GPProxy.java | f38b5c7c77b4891a5a68265437e2fcf6be398210 | [] | no_license | foxInfly/gupaoedu-vip-design-principle-openclose | 311eace9c58b29ceec02c626315474c8734078da | 9fead5270df05d1f3bcfb9e5e99fad632b46018d | refs/heads/master | 2022-12-10T13:59:56.144643 | 2020-08-18T23:01:40 | 2020-08-18T23:01:40 | 288,581,674 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,734 | java | package com.gupaoedu.vip.pattern.proxy.dynamicproxy.gpproxy.proxy;
import javax.tools.JavaCompiler;
import javax.tools.StandardJavaFileManager;
import javax.tools.ToolProvider;
import java.io.File;
import java.io.FileWriter;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
/**
* 用来生成源代码的工具类
* Created by Tom.
*/
public class GPProxy {
public static final String ln = "\r\n";
public static Object newProxyInstance(GPClassLoader classLoader, Class<?> [] interfaces, GPInvocationHandler h){
try {
//1、动态生成源代码.java文件
String src = generateSrc(interfaces);
// System.out.println(src);
//2、Java文件输出磁盘,保存文件$Proxy0.java
String filePath = GPProxy.class.getResource("").getPath();
// System.out.println(filePath);
File f = new File(filePath + "$Proxy0.java");
FileWriter fw = new FileWriter(f);
fw.write(src);
fw.flush();
fw.close();
//3、把生成的.java文件编译成.class文件
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
StandardJavaFileManager manage = compiler.getStandardFileManager(null,null,null);
Iterable iterable = manage.getJavaFileObjects(f);
JavaCompiler.CompilationTask task = compiler.getTask(null,manage,null,null,null,iterable);
task.call();
manage.close();
//4、编译生成的.class文件加载到JVM中来
Class proxyClass = classLoader.findClass("$Proxy0");
Constructor c = proxyClass.getConstructor(GPInvocationHandler.class);
f.delete();
//5、返回字节码重组以后的新的代理对象
return c.newInstance(h);
}catch (Exception e){
e.printStackTrace();
}
return null;
}
/**动态生成源代码.java文件,就是一个String
* @author lipu
* @since 2020/4/12 22:21
*/
private static String generateSrc(Class<?>[] interfaces){
StringBuffer sb = new StringBuffer();
sb.append(GPProxy.class.getPackage() + ";" + ln);
sb.append("import " + interfaces[0].getName() + ";" + ln);
sb.append("import java.lang.reflect.*;" + ln);
sb.append("public class $Proxy0 implements " + interfaces[0].getName() + "{" + ln);
sb.append("GPInvocationHandler h;" + ln);
sb.append("public $Proxy0(GPInvocationHandler h) { " + ln);
sb.append("this.h = h;");
sb.append("}" + ln);
for (Method m : interfaces[0].getMethods()){
Class<?>[] params = m.getParameterTypes();
StringBuffer paramNames = new StringBuffer();
StringBuffer paramValues = new StringBuffer();
StringBuffer paramClasses = new StringBuffer();
for (int i = 0; i < params.length; i++) {
Class clazz = params[i];
String type = clazz.getName();
String paramName = toLowerFirstCase(clazz.getSimpleName());
paramNames.append(type + " " + paramName);
paramValues.append(paramName);
paramClasses.append(clazz.getName() + ".class");
if(i > 0 && i < params.length-1){
paramNames.append(",");
paramClasses.append(",");
paramValues.append(",");
}
}
sb.append("public " + m.getReturnType().getName() + " " + m.getName() + "(" + paramNames.toString() + ") {" + ln);
sb.append("try{" + ln);
sb.append("Method m = " + interfaces[0].getName() + ".class.getMethod(\"" + m.getName() + "\",new Class[]{" + paramClasses.toString() + "});" + ln);
sb.append((hasReturnValue(m.getReturnType()) ? "return " : "") + getCaseCode("this.h.invoke(this,m,new Object[]{" + paramValues + "})",m.getReturnType()) + ";" + ln);
sb.append("}catch(Error _ex) { }");
sb.append("catch(Throwable e){" + ln);
sb.append("throw new UndeclaredThrowableException(e);" + ln);
sb.append("}");
sb.append(getReturnEmptyCode(m.getReturnType()));
sb.append("}");
}
sb.append("}" + ln);
return sb.toString();
}
private static Map<Class,Class> mappings = new HashMap<Class, Class>();
static {
mappings.put(int.class,Integer.class);
}
private static String getReturnEmptyCode(Class<?> returnClass){
if(mappings.containsKey(returnClass)){
return "return 0;";
}else if(returnClass == void.class){
return "";
}else {
return "return null;";
}
}
private static String getCaseCode(String code,Class<?> returnClass){
if(mappings.containsKey(returnClass)){
return "((" + mappings.get(returnClass).getName() + ")" + code + ")." + returnClass.getSimpleName() + "Value()";
}
return code;
}
private static boolean hasReturnValue(Class<?> clazz){
return clazz != void.class;
}
private static String toLowerFirstCase(String src){
char [] chars = src.toCharArray();
chars[0] += 32;
return String.valueOf(chars);
}
}
| [
"123@123.com"
] | 123@123.com |
79f48759528b3aa7483ca47105551cb61d84c5f8 | 126b90c506a84278078510b5979fbc06d2c61a39 | /src/ANXCamera/sources/androidx/core/graphics/drawable/d.java | a8804f023d94fef246a055de433f8b5ec9f3815e | [] | 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 | 6,967 | java | package androidx.core.graphics.drawable;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.drawable.Drawable;
/* compiled from: WrappedDrawableApi14 */
class d extends Drawable implements Drawable.Callback, b, c {
/* renamed from: a reason: collision with root package name */
static final PorterDuff.Mode f601a = PorterDuff.Mode.SRC_IN;
/* renamed from: b reason: collision with root package name */
f f602b;
Drawable c;
private int d;
private PorterDuff.Mode e;
private boolean f;
private boolean g;
d(Drawable drawable) {
this.f602b = c();
a(drawable);
}
d(f fVar, Resources resources) {
this.f602b = fVar;
a(resources);
}
private void a(Resources resources) {
f fVar = this.f602b;
if (fVar != null && fVar.f604b != null) {
a(this.f602b.f604b.newDrawable(resources));
}
}
private boolean a(int[] iArr) {
if (!b()) {
return false;
}
ColorStateList colorStateList = this.f602b.c;
PorterDuff.Mode mode = this.f602b.d;
if (colorStateList == null || mode == null) {
this.f = false;
clearColorFilter();
} else {
int colorForState = colorStateList.getColorForState(iArr, colorStateList.getDefaultColor());
if (!(this.f && colorForState == this.d && mode == this.e)) {
setColorFilter(colorForState, mode);
this.d = colorForState;
this.e = mode;
this.f = true;
return true;
}
}
return false;
}
private f c() {
return new f(this.f602b);
}
public final Drawable a() {
return this.c;
}
public final void a(Drawable drawable) {
Drawable drawable2 = this.c;
if (drawable2 != null) {
drawable2.setCallback((Drawable.Callback) null);
}
this.c = drawable;
if (drawable != null) {
drawable.setCallback(this);
setVisible(drawable.isVisible(), true);
setState(drawable.getState());
setLevel(drawable.getLevel());
setBounds(drawable.getBounds());
f fVar = this.f602b;
if (fVar != null) {
fVar.f604b = drawable.getConstantState();
}
}
invalidateSelf();
}
/* access modifiers changed from: protected */
public boolean b() {
return true;
}
public void draw(Canvas canvas) {
this.c.draw(canvas);
}
public int getChangingConfigurations() {
int changingConfigurations = super.getChangingConfigurations();
f fVar = this.f602b;
return changingConfigurations | (fVar != null ? fVar.getChangingConfigurations() : 0) | this.c.getChangingConfigurations();
}
public Drawable.ConstantState getConstantState() {
f fVar = this.f602b;
if (fVar == null || !fVar.a()) {
return null;
}
this.f602b.f603a = getChangingConfigurations();
return this.f602b;
}
public Drawable getCurrent() {
return this.c.getCurrent();
}
public int getIntrinsicHeight() {
return this.c.getIntrinsicHeight();
}
public int getIntrinsicWidth() {
return this.c.getIntrinsicWidth();
}
public int getMinimumHeight() {
return this.c.getMinimumHeight();
}
public int getMinimumWidth() {
return this.c.getMinimumWidth();
}
public int getOpacity() {
return this.c.getOpacity();
}
public boolean getPadding(Rect rect) {
return this.c.getPadding(rect);
}
public int[] getState() {
return this.c.getState();
}
public Region getTransparentRegion() {
return this.c.getTransparentRegion();
}
public void invalidateDrawable(Drawable drawable) {
invalidateSelf();
}
public boolean isAutoMirrored() {
return this.c.isAutoMirrored();
}
public boolean isStateful() {
ColorStateList colorStateList;
if (b()) {
f fVar = this.f602b;
if (fVar != null) {
colorStateList = fVar.c;
return (colorStateList == null && colorStateList.isStateful()) || this.c.isStateful();
}
}
colorStateList = null;
if (colorStateList == null) {
}
}
public void jumpToCurrentState() {
this.c.jumpToCurrentState();
}
public Drawable mutate() {
if (!this.g && super.mutate() == this) {
this.f602b = c();
Drawable drawable = this.c;
if (drawable != null) {
drawable.mutate();
}
f fVar = this.f602b;
if (fVar != null) {
Drawable drawable2 = this.c;
fVar.f604b = drawable2 != null ? drawable2.getConstantState() : null;
}
this.g = true;
}
return this;
}
/* access modifiers changed from: protected */
public void onBoundsChange(Rect rect) {
Drawable drawable = this.c;
if (drawable != null) {
drawable.setBounds(rect);
}
}
/* access modifiers changed from: protected */
public boolean onLevelChange(int i) {
return this.c.setLevel(i);
}
public void scheduleDrawable(Drawable drawable, Runnable runnable, long j) {
scheduleSelf(runnable, j);
}
public void setAlpha(int i) {
this.c.setAlpha(i);
}
public void setAutoMirrored(boolean z) {
this.c.setAutoMirrored(z);
}
public void setChangingConfigurations(int i) {
this.c.setChangingConfigurations(i);
}
public void setColorFilter(ColorFilter colorFilter) {
this.c.setColorFilter(colorFilter);
}
public void setDither(boolean z) {
this.c.setDither(z);
}
public void setFilterBitmap(boolean z) {
this.c.setFilterBitmap(z);
}
public boolean setState(int[] iArr) {
return a(iArr) || this.c.setState(iArr);
}
public void setTint(int i) {
setTintList(ColorStateList.valueOf(i));
}
public void setTintList(ColorStateList colorStateList) {
this.f602b.c = colorStateList;
a(getState());
}
public void setTintMode(PorterDuff.Mode mode) {
this.f602b.d = mode;
a(getState());
}
public boolean setVisible(boolean z, boolean z2) {
return super.setVisible(z, z2) || this.c.setVisible(z, z2);
}
public void unscheduleDrawable(Drawable drawable, Runnable runnable) {
unscheduleSelf(runnable);
}
}
| [
"sv.xeon@gmail.com"
] | sv.xeon@gmail.com |
0e874aab3ef9be2b46ca427fa263e510f766d3c3 | d66be5471ac454345de8f118ab3aa3fe55c0e1ee | /sandbox-apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/OfferingClientLiveTest.java | 6c7751909e638df12cf8bdfd6ed110ca5ada4cb7 | [
"Apache-2.0"
] | permissive | adiantum/jclouds | 3405b8daf75b8b45e95a24ff64fda6dc3eca9ed6 | 1cfbdf00f37fddf04249feedd6fc18ee122bdb72 | refs/heads/master | 2021-01-18T06:02:46.877904 | 2011-04-05T07:14:18 | 2011-04-05T07:14:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,966 | java | /**
*
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.jclouds.cloudstack.features;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import java.util.Set;
import org.jclouds.cloudstack.domain.DiskOffering;
import org.jclouds.cloudstack.domain.NetworkOffering;
import org.jclouds.cloudstack.domain.ServiceOffering;
import org.jclouds.cloudstack.domain.StorageType;
import org.jclouds.cloudstack.domain.TrafficType;
import org.jclouds.cloudstack.options.ListDiskOfferingsOptions;
import org.jclouds.cloudstack.options.ListNetworkOfferingsOptions;
import org.jclouds.cloudstack.options.ListServiceOfferingsOptions;
import org.testng.annotations.Test;
import com.google.common.collect.Iterables;
/**
* Tests behavior of {@code OfferingClient}
*
* @author Adrian Cole
*/
@Test(groups = "live", sequential = true, testName = "OfferingClientLiveTest")
public class OfferingClientLiveTest extends BaseCloudStackClientLiveTest {
public void testListDiskOfferings() throws Exception {
Set<DiskOffering> response = client.getOfferingClient().listDiskOfferings();
assert null != response;
long offeringCount = response.size();
assertTrue(offeringCount >= 0);
for (DiskOffering offering : response) {
DiskOffering newDetails = Iterables.getOnlyElement(client.getOfferingClient().listDiskOfferings(
ListDiskOfferingsOptions.Builder.id(offering.getId())));
assertEquals(offering, newDetails);
assertEquals(offering, client.getOfferingClient().getDiskOffering(offering.getId()));
assert offering.getId() > 0 : offering;
assert offering.getName() != null : offering;
assert offering.getCreated() != null : offering;
assert offering.getDisplayText() != null : offering;
assert offering.getDiskSize() > 0 || (offering.getDiskSize() == 0 && offering.isCustomized()) : offering;
assert offering.getTags() != null : offering;
}
}
public void testListServiceOfferings() throws Exception {
Set<ServiceOffering> response = client.getOfferingClient().listServiceOfferings();
assert null != response;
long offeringCount = response.size();
assertTrue(offeringCount >= 0);
for (ServiceOffering offering : response) {
ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingClient().listServiceOfferings(
ListServiceOfferingsOptions.Builder.id(offering.getId())));
assertEquals(offering, newDetails);
assert offering.getId() > 0 : offering;
assert offering.getName() != null : offering;
assert offering.getCreated() != null : offering;
assert offering.getDisplayText() != null : offering;
assert offering.getCpuNumber() > 0 : offering;
assert offering.getCpuSpeed() > 0 : offering;
assert offering.getMemory() > 0 : offering;
assert offering.getStorageType() != null && StorageType.UNRECOGNIZED != offering.getStorageType() : offering;
assert offering.getTags() != null : offering;
}
}
public void testListNetworkOfferings() throws Exception {
Set<NetworkOffering> response = client.getOfferingClient().listNetworkOfferings();
assert null != response;
long offeringCount = response.size();
assertTrue(offeringCount >= 0);
for (NetworkOffering offering : response) {
NetworkOffering newDetails = Iterables.getOnlyElement(client.getOfferingClient().listNetworkOfferings(
ListNetworkOfferingsOptions.Builder.id(offering.getId())));
assertEquals(offering, newDetails);
assertEquals(offering, client.getOfferingClient().getNetworkOffering(offering.getId()));
assert offering.getId() > 0 : offering;
assert offering.getName() != null : offering;
assert offering.getDisplayText() != null : offering;
assert offering.getMaxConnections() == null || offering.getMaxConnections() > 0 : offering;
assert offering.getTrafficType() != null && TrafficType.UNRECOGNIZED != offering.getTrafficType() : offering;
assert offering.getTags() != null : offering;
}
}
}
| [
"adrian@jclouds.org"
] | adrian@jclouds.org |
e264847242a1cbefa74173f04fb0298c8e1e783b | b50cb4f1a1681ecf79c5fe6e58cc807708b1f772 | /core/src/main/java/com/wuxp/payment/PlatformPaymentService.java | 9c8de68789f74ea877938438631b32b6c347e5a8 | [] | no_license | fengwuxp/fengwuxp-payment-plugins | 34d23a4c52a2aca21ab9f1eea0a38cbaf0a7e829 | 36fd73b97d6d40a2e5939167ccb35f878a40ba31 | refs/heads/master | 2020-12-15T14:54:19.295053 | 2020-07-15T07:03:36 | 2020-07-15T07:03:36 | 235,146,484 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 416 | java | package com.wuxp.payment;
import com.wuxp.payment.model.PlatformPaymentIdentity;
/**
* 平台支付服务,不同的支付平台可以实现对应的接口
* @author wxup
*/
public interface PlatformPaymentService extends PlatformPaymentIdentity, PaymentPlugin, PaymentNotifyProcessor {
/**
* 是否启用
*
* @return
*/
default boolean isEnabled(){
return false;
};
}
| [
"1109695647@qq.com"
] | 1109695647@qq.com |
2120129f3d382807e59efa262ae2a7cc2d01d1e1 | 1a4770c215544028bad90c8f673ba3d9e24f03ad | /second/quark/src/main/java/com/bumptech/glide/b/d/a/d.java | 39c071e0958157a7e981c1f086dbfcf34afd69b2 | [] | no_license | zhang1998/browser | e480fbd6a43e0a4886fc83ea402f8fbe5f7c7fce | 4eee43a9d36ebb4573537eddb27061c67d84c7ba | refs/heads/master | 2021-05-03T06:32:24.361277 | 2018-02-10T10:35:36 | 2018-02-10T10:35:36 | 120,590,649 | 8 | 10 | null | null | null | null | UTF-8 | Java | false | false | 4,940 | java | package com.bumptech.glide.b.d.a;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.support.v4.os.e;
import android.util.Log;
import com.bumptech.glide.b.b.au;
import com.bumptech.glide.b.l;
import com.bumptech.glide.b.m;
import com.bumptech.glide.b.o;
import com.bumptech.glide.util.f;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
/* compiled from: ProGuard */
public final class d implements o<Bitmap> {
public static final l<Integer> a = l.a("com.bumptech.glide.load.resource.bitmap.BitmapEncoder.CompressionQuality", Integer.valueOf(90));
public static final l<CompressFormat> b = l.a("com.bumptech.glide.load.resource.bitmap.BitmapEncoder.CompressionFormat");
private static boolean a(au<Bitmap> auVar, File file, m mVar) {
CompressFormat compressFormat;
boolean z;
Throwable th;
Bitmap bitmap = (Bitmap) auVar.b();
CompressFormat compressFormat2 = (CompressFormat) mVar.a(b);
if (compressFormat2 != null) {
compressFormat = compressFormat2;
} else if (bitmap.hasAlpha()) {
compressFormat = CompressFormat.PNG;
} else {
compressFormat = CompressFormat.JPEG;
}
e.a("encode: [" + bitmap.getWidth() + "x" + bitmap.getHeight() + "] " + compressFormat);
try {
long a = f.a();
int intValue = ((Integer) mVar.a(a)).intValue();
OutputStream fileOutputStream;
try {
fileOutputStream = new FileOutputStream(file);
try {
bitmap.compress(compressFormat, intValue, fileOutputStream);
fileOutputStream.close();
try {
fileOutputStream.close();
z = true;
} catch (IOException e) {
z = true;
}
} catch (IOException e2) {
try {
Log.isLoggable("BitmapEncoder", 3);
if (fileOutputStream == null) {
z = false;
} else {
try {
fileOutputStream.close();
z = false;
} catch (IOException e3) {
z = false;
}
}
if (Log.isLoggable("BitmapEncoder", 2)) {
new StringBuilder("Compressed with type: ").append(compressFormat).append(" of size ").append(com.bumptech.glide.util.l.a(bitmap)).append(" in ").append(f.a(a)).append(", options format: ").append(mVar.a(b)).append(", hasAlpha: ").append(bitmap.hasAlpha());
}
e.a();
return z;
} catch (Throwable th2) {
th = th2;
if (fileOutputStream != null) {
try {
fileOutputStream.close();
} catch (IOException e4) {
}
}
throw th;
}
}
} catch (IOException e5) {
fileOutputStream = null;
Log.isLoggable("BitmapEncoder", 3);
if (fileOutputStream == null) {
fileOutputStream.close();
z = false;
} else {
z = false;
}
if (Log.isLoggable("BitmapEncoder", 2)) {
new StringBuilder("Compressed with type: ").append(compressFormat).append(" of size ").append(com.bumptech.glide.util.l.a(bitmap)).append(" in ").append(f.a(a)).append(", options format: ").append(mVar.a(b)).append(", hasAlpha: ").append(bitmap.hasAlpha());
}
e.a();
return z;
} catch (Throwable th3) {
th = th3;
fileOutputStream = null;
if (fileOutputStream != null) {
fileOutputStream.close();
}
throw th;
}
if (Log.isLoggable("BitmapEncoder", 2)) {
new StringBuilder("Compressed with type: ").append(compressFormat).append(" of size ").append(com.bumptech.glide.util.l.a(bitmap)).append(" in ").append(f.a(a)).append(", options format: ").append(mVar.a(b)).append(", hasAlpha: ").append(bitmap.hasAlpha());
}
e.a();
return z;
} catch (Throwable th4) {
e.a();
}
}
public final com.bumptech.glide.b.d a(m mVar) {
return com.bumptech.glide.b.d.TRANSFORMED;
}
}
| [
"2764207312@qq.com"
] | 2764207312@qq.com |
a53149e20b10c23e7d6696955cca596bb58a5d87 | 01e6d1818d905cec5e57644b791ed4d8344bd4f4 | /app/src/main/java/com/haohao/xubei/ui/module/user/contract/UserPayContract.java | 680ad22462f8daa1905741e715a5cb4b9fc3cfe7 | [] | no_license | tracyly/XuBei | 672ee01ab716107893410a677f0a11c8f3ed7b14 | a637719b9191c436a3da223f17cb7f8437de06ed | refs/heads/master | 2022-10-20T18:41:31.680719 | 2020-06-15T12:08:03 | 2020-06-15T12:08:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 483 | java | package com.haohao.xubei.ui.module.user.contract;
import com.haohao.xubei.ui.module.base.IABaseContract;
import java.util.ArrayList;
/**
* 订单支付
* date:2017/12/4 14:58
* author:Seraph
*
**/
public interface UserPayContract extends IABaseContract {
interface View extends IBaseView {
void selectPayType(String payType);
void initView(ArrayList<String> amountList);
}
abstract class Presenter extends ABasePresenter<View> {
}
}
| [
"xvjun@haotang365.com.cn"
] | xvjun@haotang365.com.cn |
4f5e58e3b2e8d30478553614403502290d46e27c | 62510fa67d0ca78082109a861b6948206252c885 | /hihope_neptune-oh_hid/00_src/v0.3/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/number/CurrencyPrecision.java | c3727c6fcc30376422a2b353bd58b320c76df596 | [
"Apache-2.0",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"ICU"
] | permissive | dawmlight/vendor_oh_fun | a869e7efb761e54a62f509b25921e019e237219b | bc9fb50920f06cd4c27399f60076f5793043c77d | refs/heads/master | 2023-08-05T09:25:33.485332 | 2021-09-10T10:57:48 | 2021-09-10T10:57:48 | 406,236,565 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,721 | java | /* GENERATED SOURCE. DO NOT MODIFY. */
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html#License
package ohos.global.icu.number;
import ohos.global.icu.util.Currency;
/**
* A class that defines a rounding strategy parameterized by a currency to be used when formatting
* numbers in NumberFormatter.
*
* <p>
* To create a CurrencyPrecision, use one of the factory methods on Precision.
*
* @see NumberFormatter
* @hide exposed on OHOS
*/
public abstract class CurrencyPrecision extends Precision {
/* package-private */ CurrencyPrecision() {
}
/**
* Associates a currency with this rounding strategy.
*
* <p>
* <strong>Calling this method is <em>not required</em></strong>, because the currency specified in
* unit() or via a CurrencyAmount passed into format(Measure) is automatically applied to currency
* rounding strategies. However, this method enables you to override that automatic association.
*
* <p>
* This method also enables numbers to be formatted using currency rounding rules without explicitly
* using a currency format.
*
* @param currency
* The currency to associate with this rounding strategy.
* @return A Precision for chaining or passing to the NumberFormatter rounding() setter.
* @throws IllegalArgumentException for null Currency
* @see NumberFormatter
*/
public Precision withCurrency(Currency currency) {
if (currency != null) {
return constructFromCurrency(this, currency);
} else {
throw new IllegalArgumentException("Currency must not be null");
}
};
} | [
"liu_xiyao@hoperun.com"
] | liu_xiyao@hoperun.com |
ab41a27bd766d6ab589a48926d7c19d65a31a7cd | 1c58a5cd41d9a2ee25502464087ef653bcc25109 | /jedis/src/main/java/com/yl/test/TestDemo02.java | 6f6190590432fff29c676a8f39ef9782d237c82c | [] | no_license | yanlele1994/testcode | a98675f44da462411de75f955d71502106f60455 | 30aea487466f648b7fad2699167c3fbfd12f4a5c | refs/heads/master | 2023-06-26T23:31:51.782877 | 2021-07-27T13:50:07 | 2021-07-27T13:50:07 | 389,978,313 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 524 | java | package com.yl.test;
import com.yl.utils.RedisUtils;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
public class TestDemo02 {
public static void main(String[] args) {
JedisPool jedisPool = RedisUtils.open("192.168.195.128", 6379);
Jedis jedis = jedisPool.getResource();
jedis.flushDB();
String str1 = jedis.set("str1", "aaa");
System.out.println(str1);
String v = jedis.get("str1");
System.out.println(v);
jedis.close();
}
}
| [
"zhangsan@qq.com"
] | zhangsan@qq.com |
6196b084e34a5623102dbc84949b591ef8d9d070 | f4a2e6193611874c184e89a850becc23d89e48a6 | /src/main/java/com/jhipster/clx/domain/User.java | 710f4f040fde783f2b2e5e12c23e3de86f418cff | [] | no_license | mfang360/jhipster-sample-application | 43f54858a0e1cfc420a0fbcd954dcdff2aba2891 | 37354f81c06eb24e2f9862758b69ec5cbf158502 | refs/heads/master | 2022-12-21T10:00:08.602231 | 2020-01-17T08:59:27 | 2020-01-17T08:59:27 | 234,510,261 | 0 | 0 | null | 2022-12-16T04:43:29 | 2020-01-17T08:59:14 | Java | UTF-8 | Java | false | false | 5,500 | java | package com.jhipster.clx.domain;
import com.jhipster.clx.config.Constants;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.Instant;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
/**
* A user.
*/
@Entity
@Table(name = "jhi_user")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class User extends AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotNull
@Pattern(regexp = Constants.LOGIN_REGEX)
@Size(min = 1, max = 50)
@Column(length = 50, unique = true, nullable = false)
private String login;
@JsonIgnore
@NotNull
@Size(min = 60, max = 60)
@Column(name = "password_hash", length = 60, nullable = false)
private String password;
@Size(max = 50)
@Column(name = "first_name", length = 50)
private String firstName;
@Size(max = 50)
@Column(name = "last_name", length = 50)
private String lastName;
@Email
@Size(min = 5, max = 254)
@Column(length = 254, unique = true)
private String email;
@NotNull
@Column(nullable = false)
private boolean activated = false;
@Size(min = 2, max = 10)
@Column(name = "lang_key", length = 10)
private String langKey;
@Size(max = 256)
@Column(name = "image_url", length = 256)
private String imageUrl;
@Size(max = 20)
@Column(name = "activation_key", length = 20)
@JsonIgnore
private String activationKey;
@Size(max = 20)
@Column(name = "reset_key", length = 20)
@JsonIgnore
private String resetKey;
@Column(name = "reset_date")
private Instant resetDate = null;
@JsonIgnore
@ManyToMany
@JoinTable(
name = "jhi_user_authority",
joinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "id")},
inverseJoinColumns = {@JoinColumn(name = "authority_name", referencedColumnName = "name")})
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@BatchSize(size = 20)
private Set<Authority> authorities = new HashSet<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getLogin() {
return login;
}
// Lowercase the login before saving it in database
public void setLogin(String login) {
this.login = StringUtils.lowerCase(login, Locale.ENGLISH);
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public boolean getActivated() {
return activated;
}
public void setActivated(boolean activated) {
this.activated = activated;
}
public String getActivationKey() {
return activationKey;
}
public void setActivationKey(String activationKey) {
this.activationKey = activationKey;
}
public String getResetKey() {
return resetKey;
}
public void setResetKey(String resetKey) {
this.resetKey = resetKey;
}
public Instant getResetDate() {
return resetDate;
}
public void setResetDate(Instant resetDate) {
this.resetDate = resetDate;
}
public String getLangKey() {
return langKey;
}
public void setLangKey(String langKey) {
this.langKey = langKey;
}
public Set<Authority> getAuthorities() {
return authorities;
}
public void setAuthorities(Set<Authority> authorities) {
this.authorities = authorities;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof User)) {
return false;
}
return id != null && id.equals(((User) o).id);
}
@Override
public int hashCode() {
return 31;
}
@Override
public String toString() {
return "User{" +
"login='" + login + '\'' +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", email='" + email + '\'' +
", imageUrl='" + imageUrl + '\'' +
", activated='" + activated + '\'' +
", langKey='" + langKey + '\'' +
", activationKey='" + activationKey + '\'' +
"}";
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
c052b6583dda815611b321bd6c70a933367e38cb | cf729a7079373dc301d83d6b15e2451c1f105a77 | /adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201509/express/KeywordGroup.java | c8b1e552c923564dab177aeddf38263215efceea | [] | no_license | cvsogor/Google-AdWords | 044a5627835b92c6535f807ea1eba60c398e5c38 | fe7bfa2ff3104c77757a13b93c1a22f46e98337a | refs/heads/master | 2023-03-23T05:49:33.827251 | 2021-03-17T14:35:13 | 2021-03-17T14:35:13 | 348,719,387 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,650 | java |
package com.google.api.ads.adwords.jaxws.v201509.express;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import com.google.api.ads.adwords.jaxws.v201509.cm.Criterion;
/**
*
* A {@link Criterion} for keyword groups.
* <span class="constraint AdxEnabled">This is disabled for AdX when it is contained within Operators: ADD, SET.</span>
*
*
* <p>Java class for KeywordGroup complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="KeywordGroup">
* <complexContent>
* <extension base="{https://adwords.google.com/api/adwords/cm/v201509}Criterion">
* <sequence>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "KeywordGroup", propOrder = {
"name"
})
public class KeywordGroup
extends Criterion
{
protected String name;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
}
| [
"vacuum13@gmail.com"
] | vacuum13@gmail.com |
1c4153a1a4cfc9022c635a853237709fe7f9c4e0 | bf377c647c451edeccf720d3a66157b174eb1741 | /app/src/main/java/com/openld/roundcornerdemmo/utils/DisplayUtils.java | 47fa5037271506db10097d8a655110c4c441e296 | [] | no_license | leidongld/RoundCornerDemmo | 38e1273543ed565b5c6203aa4f76871bff8ce4e9 | 02ae441839b65f4ef7b8f3fa164580ef8c64fba8 | refs/heads/master | 2022-11-07T11:13:58.453091 | 2020-06-09T14:25:41 | 2020-06-09T14:25:41 | 271,024,496 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,319 | java | package com.openld.roundcornerdemmo.utils;
import android.content.Context;
/**
* author: lllddd
* created on: 2020/6/9 10:26
* description:
*/
public class DisplayUtils {
/**
* px 转 dp
*
* @param context
* @param px
* @return
*/
public static int px2dp(Context context, float px) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (px / scale + 0.5F);
}
/**
* dp 转 px
*
* @param context
* @param dp
* @return
*/
public static int dp2px(Context context, float dp) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dp * scale + 0.5F);
}
/**
* px 转 sp
* @param context
* @param px
* @return
*/
public static int px2sp(Context context, float px) {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (px / fontScale + 0.5F);
}
/**
* sp 转 px
*
* @param context
* @param sp
* @return
*/
public static int sp2px(Context context, float sp) {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (sp * fontScale + 0.5F);
}
}
| [
"leidongld@sina.com"
] | leidongld@sina.com |
27159d3659fd4d83a7e40e1c84bc580d62473062 | 968bfcf50f8b89f889398380f1363b5b45dd717e | /android/app/src/main/java/com/nsu_parking_demo_26526/MainActivity.java | 5cdd9732ed5156c7dacb379ce8d362b8ef04254c | [] | no_license | crowdbotics-apps/nsu-parking-demo-26526 | 15993e49d5fe18a09c378e60b7f069358642dd53 | f36082b4fad1f83f2406dea52638f59a1fdbedb5 | refs/heads/master | 2023-05-04T08:13:57.967590 | 2021-05-10T23:47:45 | 2021-05-10T23:47:45 | 366,203,168 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 371 | java | package com.nsu_parking_demo_26526;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "nsu_parking_demo_26526";
}
}
| [
"team@crowdbotics.com"
] | team@crowdbotics.com |
932bac60c34b80fcf460c4fcc3db394ae7abd9cd | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/JavaProgramData/61/1522.java | f1b04db76a70b97a90c0751d8ce839a5ada35755 | [
"MIT"
] | permissive | qiuchili/ggnn_graph_classification | c2090fefe11f8bf650e734442eb96996a54dc112 | 291ff02404555511b94a4f477c6974ebd62dcf44 | refs/heads/master | 2021-10-18T14:54:26.154367 | 2018-10-21T23:34:14 | 2018-10-21T23:34:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 652 | java | package <missing>;
public class GlobalMembers
{
public static int pb(int m)
{
int[] sz = new int[100000];
sz[1] = 1;
sz[2] = 1;
for (int i = 3;i <= m;i++)
{
sz[i] = sz[i - 1] + sz[i - 2];
}
return sz[m];
}
public static int Main()
{
int i;
int a;
int n;
int k;
int[] s = new int[1000];
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
k = Integer.parseInt(tempVar);
}
for (i = 0;i < k;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
n = Integer.parseInt(tempVar2);
}
s[i] = pb(n);
}
for (i = 0;i < k;i++)
{
System.out.printf("%d\n",s[i]);
}
return 0;
}
}
| [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
b0d96512b96b41198ea3a6122421280083e07c28 | 84977be791b912c6ed0c7da3c3ca0c1e7a9b1220 | /src/main/java/com/skycloud/management/portal/admin/customer/utils/UtilCommon.java | ac3a1464fc13e6140a0f2c9ba6ef577b19f53b77 | [] | no_license | henrylv206/UCFCloudPortal | 1503b9e7a66103684444b78935882973306d9744 | 0283d6c4d1ac9f3de67ea579a8f77c3331fcc897 | refs/heads/master | 2020-12-30T10:50:05.608675 | 2014-07-22T07:33:54 | 2014-07-22T07:33:54 | 21,964,181 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 983 | java | package com.skycloud.management.portal.admin.customer.utils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class UtilCommon {
public static String getSerial(Date date, int index) {
long msel = date.getTime();
SimpleDateFormat fm = new SimpleDateFormat("MMddyyyyHHmmssSS");
msel += index;
date.setTime(msel);
String serials = fm.format(date);
return serials;
}
// ����Ƿ���ͼƬ��ʽ
public static boolean checkIsImage(String imgStr) {
boolean flag = false;
if (imgStr != null) {
if (imgStr.equalsIgnoreCase(".gif")
|| imgStr.equalsIgnoreCase(".jpg")
|| imgStr.equalsIgnoreCase(".jpeg")
|| imgStr.equalsIgnoreCase(".png")
|| imgStr.equalsIgnoreCase(".txt")) {
flag = true;
}
}
return flag;
}
public static Date StrToDate(String str) throws ParseException{
return new SimpleDateFormat("MM/dd/yyyy").parse(str);
}
} | [
"henrylv206@qq.com"
] | henrylv206@qq.com |
ac4c20db5b99815760eb04b7468a914be38fcd3e | cc32a64afed91f7186c009d3d1247370a904be1c | /hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/codesystems/UnknownContentCodeEnumFactory.java | d30bf34f13cb0b49eecc7dcfc6b087b9fd75aebc | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | rmoult01/hapi_fhir_mir_1 | 5dc5966ce06738872d8e0ddb667d513df76bb3d1 | 93270786e2d30185c41987038f878943cd736e34 | refs/heads/master | 2021-07-20T15:58:24.384813 | 2017-10-30T14:36:18 | 2017-10-30T14:36:18 | 106,035,744 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,796 | java | package org.hl7.fhir.dstu3.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1
import org.hl7.fhir.dstu3.model.EnumFactory;
public class UnknownContentCodeEnumFactory implements EnumFactory<UnknownContentCode> {
public UnknownContentCode fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("no".equals(codeString))
return UnknownContentCode.NO;
if ("extensions".equals(codeString))
return UnknownContentCode.EXTENSIONS;
if ("elements".equals(codeString))
return UnknownContentCode.ELEMENTS;
if ("both".equals(codeString))
return UnknownContentCode.BOTH;
throw new IllegalArgumentException("Unknown UnknownContentCode code '"+codeString+"'");
}
public String toCode(UnknownContentCode code) {
if (code == UnknownContentCode.NO)
return "no";
if (code == UnknownContentCode.EXTENSIONS)
return "extensions";
if (code == UnknownContentCode.ELEMENTS)
return "elements";
if (code == UnknownContentCode.BOTH)
return "both";
return "?";
}
public String toSystem(UnknownContentCode code) {
return code.getSystem();
}
}
| [
"moultonr@mir.wustl.edu"
] | moultonr@mir.wustl.edu |
b3271d6f33b73a83f946360f3112d0745d205659 | 5b8337c39cea735e3817ee6f6e6e4a0115c7487c | /sources/p043io/reactivex/internal/operators/observable/ObservableRange.java | c9c1befda08d2bd15c360d815e124b7e7e602c39 | [] | no_license | karthik990/G_Farm_Application | 0a096d334b33800e7d8b4b4c850c45b8b005ccb1 | 53d1cc82199f23517af599f5329aa4289067f4aa | refs/heads/master | 2022-12-05T06:48:10.513509 | 2020-08-10T14:46:48 | 2020-08-10T14:46:48 | 286,496,946 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,687 | java | package p043io.reactivex.internal.operators.observable;
import p043io.reactivex.Observable;
import p043io.reactivex.Observer;
import p043io.reactivex.internal.observers.BasicIntQueueDisposable;
/* renamed from: io.reactivex.internal.operators.observable.ObservableRange */
public final class ObservableRange extends Observable<Integer> {
private final long end;
private final int start;
/* renamed from: io.reactivex.internal.operators.observable.ObservableRange$RangeDisposable */
static final class RangeDisposable extends BasicIntQueueDisposable<Integer> {
private static final long serialVersionUID = 396518478098735504L;
final Observer<? super Integer> actual;
final long end;
boolean fused;
long index;
RangeDisposable(Observer<? super Integer> observer, long j, long j2) {
this.actual = observer;
this.index = j;
this.end = j2;
}
/* access modifiers changed from: 0000 */
public void run() {
if (!this.fused) {
Observer<? super Integer> observer = this.actual;
long j = this.end;
for (long j2 = this.index; j2 != j && get() == 0; j2++) {
observer.onNext(Integer.valueOf((int) j2));
}
if (get() == 0) {
lazySet(1);
observer.onComplete();
}
}
}
public Integer poll() throws Exception {
long j = this.index;
if (j != this.end) {
this.index = 1 + j;
return Integer.valueOf((int) j);
}
lazySet(1);
return null;
}
public boolean isEmpty() {
return this.index == this.end;
}
public void clear() {
this.index = this.end;
lazySet(1);
}
public void dispose() {
set(1);
}
public boolean isDisposed() {
return get() != 0;
}
public int requestFusion(int i) {
if ((i & 1) == 0) {
return 0;
}
this.fused = true;
return 1;
}
}
public ObservableRange(int i, int i2) {
this.start = i;
this.end = ((long) i) + ((long) i2);
}
/* access modifiers changed from: protected */
public void subscribeActual(Observer<? super Integer> observer) {
RangeDisposable rangeDisposable = new RangeDisposable(observer, (long) this.start, this.end);
observer.onSubscribe(rangeDisposable);
rangeDisposable.run();
}
}
| [
"knag88@gmail.com"
] | knag88@gmail.com |
99592a4a6b24a513bae5619b39321d9276af7fb2 | ddf0d861a600e9271198ed43be705debae15bafd | /CompetitiveProgrammingSolution/Implementation/MXMEDIAN.java | f4718cd0e54b0629eb572e776371aa54b504fa30 | [] | no_license | bibhuty-did-this/MyCodes | 79feea385b055edc776d4a9d5aedbb79a9eb55f4 | 2b8c1d4bd3088fc28820145e3953af79417c387f | refs/heads/master | 2023-02-28T09:20:36.500579 | 2021-02-07T17:17:54 | 2021-02-07T17:17:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 682 | java | /**
* Author: o_panda_o
* Email: emailofpanda@yahoo.com
*/
import java.util.Arrays;
import java.util.Scanner;
public class MXMEDIAN {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t=in.nextInt();
while(t-->0){
int n=in.nextInt();
int a[]=new int[2*n+1];
for(int i=1;i<=2*n;++i)
a[i]=in.nextInt();
Arrays.sort(a,1,2*n+1);
System.out.println(a[n+(n+1)/2]);
for(int i=1;i<=n;++i){
System.out.print(a[i]+" "+a[n+i]+" ");
}
System.out.println();
}
}
}
| [
"bibhuty.nit@gmail.com"
] | bibhuty.nit@gmail.com |
d2f7dbebe10c0446344dcf86967012392cff2b4e | 97ead6dfbe1a6b569be08f7cd247161bc0a73121 | /io/src/main/java/com/redshape/io/net/auth/impl/providers/SimpleProvider.java | 24df4ccac120d6cefec76fbfeac3eb71d02e8356 | [
"Apache-2.0"
] | permissive | Redshape/Redshape-AS | 19f54bc0d54061b0302a7b3f63e600afb01168ea | cf3492919a35b868bc7045b35d38e74a3a2b8c01 | refs/heads/master | 2021-01-17T05:17:31.881177 | 2012-09-05T13:49:50 | 2012-09-05T13:49:50 | 1,390,510 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 457 | java | package com.redshape.io.net.auth.impl.providers;
import com.redshape.io.net.auth.AbstractCredentialsProvider;
/**
* Created by IntelliJ IDEA.
* User: user
* Date: Nov 12, 2010
* Time: 1:06:38 PM
* To change this template use File | Settings | File Templates.
*/
public class SimpleProvider extends AbstractCredentialsProvider {
public SimpleProvider() {
super();
}
public boolean isInitialized() {
return true;
}
}
| [
"self@nikelin.ru"
] | self@nikelin.ru |
255761c1d12d200fcff3d185739fe34a86ca9738 | ee731d0acfb6dc9465d6842245ba91a02ef93fcc | /date-time/src/date1/DateDemo3.java | 8d97e7c2c5c82f6756739105d1db132dfc69a156 | [] | no_license | siwolsmu89/J_HTA_java_workspace | 6a668c421c5ada7b792be0ee0a94b3232bd109ca | 43b0bae8e5b7cb68513d8670b136f098d7b8a4e1 | refs/heads/master | 2022-11-18T17:23:29.458359 | 2020-07-20T08:57:02 | 2020-07-20T08:57:02 | 258,408,262 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,134 | java | package date1;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateDemo3 {
public static void main(String[] args) {
/*
* Date를 지정된 형식의 문자열로 변환하기
*/
Date today = new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyy년 M월 d일(EEEE) Hmss");
String formatedText = df.format(today);
System.out.println(formatedText);
}
/*
* 패턴 출력내용 출력값 비고
* ---------------------------------------------------------
* yyyy 년 2020
* MM 월 04 1~9월을 01~09로 표시
* M 월 4 1~9월을 1~9로 표시 (10월부터는 10~12로 표시됨)
* dd 일 06
* d 일 6
* yyyy-MM-dd 2020-04-06
* yyyy.M.d. 2020.4.6.
* yyyy년 M월 d일 2020년 4월 6일
*
* EEEE 요일 월요일 영어로는 Monday
* E, EEE 요일 월 영어로는 M, MON
* a 오전/오후 오전
* H, HH 24시간제(0~23시) 1, 01
* h, hh 12시간제(1~12시) 1, 01
* m, mm 분(0~59) 1, 01
* s, ss 초(0~59) 1, 01
*
*/
}
| [
"siwol_smuire89@naver.com"
] | siwol_smuire89@naver.com |
3ffe9aa011a2b3766cbf77d67433c12a98b07ba5 | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/Gson-15/com.google.gson.stream.JsonWriter/BBC-F0-opt-90/11/com/google/gson/stream/JsonWriter_ESTest_scaffolding.java | a2e4c7e98c26e17a8ed57b1513f27967165075a6 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 3,181 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Oct 20 23:47:18 GMT 2021
*/
package com.google.gson.stream;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class JsonWriter_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
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 = "com.google.gson.stream.JsonWriter";
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();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
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() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(JsonWriter_ESTest_scaffolding.class.getClassLoader() ,
"com.google.gson.stream.JsonWriter"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(JsonWriter_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"com.google.gson.stream.JsonWriter"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
bf2387efc8a9e3bca220e297313037b44657fec6 | 396384ae649e04f1644730d8f8b8bb5ac36b1cab | /iot_spring/src/main/java/com/iot/spring/dao/NaverTransDAO.java | fd59cf3506e662d9c7bf1a04d498bfa92e13f303 | [] | no_license | jiyungg/Spring | 8aff80d511080f7c81f0f27cb8213f54bc89eb78 | f5ffc4bd4ea88680a0a077d857054a1f4edcd25d | refs/heads/master | 2021-09-06T21:25:23.850934 | 2018-02-11T16:45:47 | 2018-02-11T16:45:47 | 119,961,831 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 158 | java | package com.iot.spring.dao;
import java.io.IOException;
public interface NaverTransDAO {
public String getText(String text)throws IOException ;
}
| [
"DJA@DJA-PC"
] | DJA@DJA-PC |
902e41bbffe365f65cfbdfcbb371625faad427c0 | e9d3f2be6be67823129bf7b30c01dd896043b41c | /kr.re.etri.tpl/src/kr/re/etri/tpl/script/actions/RulerBreakpointAction.java | 8db6d29b884b000cd485bb9ec5634a5855e22b01 | [] | no_license | OPRoS/TaskEditor | d248e131b0d7bac0002c41f52a9c6baea1096e86 | 5c3827868d8f77f02375910b38772127ba841d18 | refs/heads/master | 2020-04-05T08:19:46.058409 | 2013-08-27T05:31:01 | 2013-08-27T05:31:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 136 | java | package kr.re.etri.tpl.script.actions;
import org.eclipse.jface.action.Action;
public class RulerBreakpointAction extends Action {
}
| [
"yudonguk@naver.com"
] | yudonguk@naver.com |
3eb898c029b0ee4bc1fd70d68d4a3fd9acdf98cb | c18ca0ee85f21ef5e9890db9bb70ab8bb114200a | /JAVA Prgramming/cam3/src/de/must/wuic/Inlay.java | cb6bbc89f127eed3bcac3f2abede7e81b6e08faa | [] | no_license | f1lm/MS-2014-Boise-State-University | a3032b8b9e13303cdb3b4cb0001eddfd0d1cbffe | 9d87f14e48a5c51a8a3ebfb0e010a493faf70576 | refs/heads/master | 2020-04-15T15:17:48.031552 | 2015-03-18T01:37:30 | 2015-03-18T01:37:30 | 32,502,472 | 1 | 1 | null | 2015-03-19T05:19:57 | 2015-03-19T05:19:56 | null | UTF-8 | Java | false | false | 3,445 | java | /*
* Copyright (c) 2004 Christoph Mueller. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY CHRISTOPH MUELLER ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CHRISTOPH MUELLER OR
* HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package de.must.wuic;
import java.awt.event.ActionListener;
import javax.swing.JPanel;
/**
* Super class for all GUI sectors to be placed into ContainerFrames
* @author Christoph Mueller
*/
public abstract class Inlay extends JPanel implements ActionListener {
protected ContainerFrame ownerFrame;
private String helpTopic;
private String helpTarget;
public Inlay(ContainerFrame ownerFrame) {
this.ownerFrame = ownerFrame;
}
/**
* Sets the component's context help.
* @param helpTopic the context help's topic
* @param helpTarget the context help's target
*/
public void setHelpContext(String helpTopic) {
this.helpTopic = helpTopic;
}
/**
* Sets the component's context help.
* @param helpTopic the context help's topic
* @param helpTarget the context help's target
*/
public void setHelpContext(String helpTopic, String helpTarget) {
this.helpTopic = helpTopic;
this.helpTarget = helpTarget;
}
/**
* Returns the topic of the component's help context
* @return the topic of the component's help context
*/
public String getHelpTopic() {
return helpTopic;
}
/**
* Returns the target of the component's help context
* @return the target of the component's help context
*/
public String getHelpTarget() {
return helpTarget;
}
/**
* Returns a text in the corresponding language according to the locale
* specific resource bundle of the package.
* @param resourceKey the key of the resource to retrieve
* @return the resource
*/
protected String getTranslation(String resourceKey) {
return ownerFrame.getTranslation(resourceKey);
}
/**
* Sets the message to be read by the user, which is presented in the status
* label in this context.
* @param message the message for the user
*/
protected void setMessage(String message) {
ownerFrame.setMessage(message);
}
/**
* Sets the message to be read by the user, it is not reseted by
* generalActionEnding when action completed. Thus, the user is able to notify
* the message without pressing a confirmation button.
* @param messageToKeep the message for the user
*/
protected void setMessageToKeep(String messageToKeep) {
ownerFrame.setMessageToKeep(messageToKeep);
}
}
| [
"milsonmun@yahoo.com"
] | milsonmun@yahoo.com |
df4328703f95c18a533821a0f53d1c60cbdc8272 | 169f4b4cb60dc918bf0d8b8db1a7efdf5d4ebc23 | /java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/QueryWatchesResponse.java | 958efe3e652894e8b40472a93cb2684ece94ccbb | [
"Apache-2.0"
] | permissive | PyJava1984/elasticsearch-java | 387d2212cc0784c06d1a8af0d284f4ee2b1cf9b4 | 5c7c24d9dd33de37e00ca183b32ec5cb17ea8b17 | refs/heads/main | 2023-08-28T17:35:38.220152 | 2021-10-18T19:21:23 | 2021-10-18T19:21:23 | 419,573,301 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,460 | java | /*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. 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 CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------
package co.elastic.clients.elasticsearch.watcher;
import co.elastic.clients.json.DelegatingDeserializer;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.ObjectBuilderDeserializer;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.util.ModelTypeHelper;
import co.elastic.clients.util.ObjectBuilder;
import jakarta.json.stream.JsonGenerator;
import java.lang.Integer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Nullable;
// typedef: watcher.query_watches.Response
@JsonpDeserializable
public final class QueryWatchesResponse implements JsonpSerializable {
private final int count;
private final List<QueryWatch> watches;
// ---------------------------------------------------------------------------------------------
public QueryWatchesResponse(Builder builder) {
this.count = Objects.requireNonNull(builder.count, "count");
this.watches = ModelTypeHelper.unmodifiableNonNull(builder.watches, "watches");
}
public QueryWatchesResponse(Function<Builder, Builder> fn) {
this(fn.apply(new Builder()));
}
/**
* Required - API name: {@code count}
*/
public int count() {
return this.count;
}
/**
* Required - API name: {@code watches}
*/
public List<QueryWatch> watches() {
return this.watches;
}
/**
* Serialize this object to JSON.
*/
public void serialize(JsonGenerator generator, JsonpMapper mapper) {
generator.writeStartObject();
serializeInternal(generator, mapper);
generator.writeEnd();
}
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("count");
generator.write(this.count);
generator.writeKey("watches");
generator.writeStartArray();
for (QueryWatch item0 : this.watches) {
item0.serialize(generator, mapper);
}
generator.writeEnd();
}
// ---------------------------------------------------------------------------------------------
/**
* Builder for {@link QueryWatchesResponse}.
*/
public static class Builder implements ObjectBuilder<QueryWatchesResponse> {
private Integer count;
private List<QueryWatch> watches;
/**
* Required - API name: {@code count}
*/
public Builder count(int value) {
this.count = value;
return this;
}
/**
* Required - API name: {@code watches}
*/
public Builder watches(List<QueryWatch> value) {
this.watches = value;
return this;
}
/**
* Required - API name: {@code watches}
*/
public Builder watches(QueryWatch... value) {
this.watches = Arrays.asList(value);
return this;
}
/**
* Add a value to {@link #watches(List)}, creating the list if needed.
*/
public Builder addWatches(QueryWatch value) {
if (this.watches == null) {
this.watches = new ArrayList<>();
}
this.watches.add(value);
return this;
}
/**
* Set {@link #watches(List)} to a singleton list.
*/
public Builder watches(Function<QueryWatch.Builder, ObjectBuilder<QueryWatch>> fn) {
return this.watches(fn.apply(new QueryWatch.Builder()).build());
}
/**
* Add a value to {@link #watches(List)}, creating the list if needed.
*/
public Builder addWatches(Function<QueryWatch.Builder, ObjectBuilder<QueryWatch>> fn) {
return this.addWatches(fn.apply(new QueryWatch.Builder()).build());
}
/**
* Builds a {@link QueryWatchesResponse}.
*
* @throws NullPointerException
* if some of the required fields are null.
*/
public QueryWatchesResponse build() {
return new QueryWatchesResponse(this);
}
}
// ---------------------------------------------------------------------------------------------
/**
* Json deserializer for {@link QueryWatchesResponse}
*/
public static final JsonpDeserializer<QueryWatchesResponse> _DESERIALIZER = ObjectBuilderDeserializer
.lazy(Builder::new, QueryWatchesResponse::setupQueryWatchesResponseDeserializer, Builder::build);
protected static void setupQueryWatchesResponseDeserializer(
DelegatingDeserializer<QueryWatchesResponse.Builder> op) {
op.add(Builder::count, JsonpDeserializer.integerDeserializer(), "count");
op.add(Builder::watches, JsonpDeserializer.arrayDeserializer(QueryWatch._DESERIALIZER), "watches");
}
}
| [
"sylvain@elastic.co"
] | sylvain@elastic.co |
135ede5e4b2b48d23c1add825d13ccd1f854ecf6 | eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3 | /tags/2011-12-23/seasar2-2.4.45/seasar2/s2-framework/src/main/java/org/seasar/framework/util/SerializeUtil.java | 65e4e95b5a5ae6da2efbfc30686185427acf0e46 | [
"Apache-2.0"
] | permissive | svn2github/s2container | 54ca27cf0c1200a93e1cb88884eb8226a9be677d | 625adc6c4e1396654a7297d00ec206c077a78696 | refs/heads/master | 2020-06-04T17:15:02.140847 | 2013-08-09T09:38:15 | 2013-08-09T09:38:15 | 10,850,644 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,096 | java | /*
* Copyright 2004-2011 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.framework.util;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import org.seasar.framework.exception.ClassNotFoundRuntimeException;
import org.seasar.framework.exception.IORuntimeException;
/**
* オブジェクトをシリアライズするためのユーティリティです。
*
* @author higa
*
*/
public class SerializeUtil {
private static final int BYTE_ARRAY_SIZE = 8 * 1024;
/**
* インスタンスを構築します。
*/
protected SerializeUtil() {
}
/**
* オブジェクトをシリアライズできるかテストします。
*
* @param o
* @return
* @throws IORuntimeException
* @throws ClassNotFoundRuntimeException
*/
public static Object serialize(final Object o) throws IORuntimeException,
ClassNotFoundRuntimeException {
byte[] binary = fromObjectToBinary(o);
return fromBinaryToObject(binary);
}
/**
* オブジェクトをbyteの配列に変換します。
*
* @param o
* @return
*/
public static byte[] fromObjectToBinary(Object o) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream(
BYTE_ARRAY_SIZE);
ObjectOutputStream oos = new ObjectOutputStream(baos);
try {
oos.writeObject(o);
} finally {
oos.close();
}
return baos.toByteArray();
} catch (IOException ex) {
throw new IORuntimeException(ex);
}
}
/**
* byteの配列をオブジェクトに変換します。
*
* @param binary
* @return
*/
public static Object fromBinaryToObject(byte[] binary) {
try {
ByteArrayInputStream bais = new ByteArrayInputStream(binary);
ObjectInputStream ois = new ObjectInputStream(bais);
try {
return ois.readObject();
} finally {
ois.close();
}
} catch (IOException ex) {
throw new IORuntimeException(ex);
} catch (ClassNotFoundException ex) {
throw new ClassNotFoundRuntimeException(ex);
}
}
}
| [
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] | koichik@319488c0-e101-0410-93bc-b5e51f62721a |
5c8b186ed5df52801b76c942b32cf2a76ef9bcea | ca217730cff9435b03347587d61d2ef28b478f7e | /old/models/SCPModelRemoteDoorPC.java | 883c4942637032a341b3c19eaa8e730728d9257d | [] | no_license | Ordinastie/SCPCraft | e8c4c78cc86ac0e7f364156058f35ce30adf059d | 547a204bb14fc33adefb9926baca2f5188d89421 | refs/heads/master | 2023-07-18T19:50:59.231189 | 2014-03-21T23:59:54 | 2014-03-21T23:59:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,421 | java | package SCPCraft.models;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import SCPCraft.mod_Others;
public class SCPModelRemoteDoorPC extends ModelBase
{
//fields
ModelRenderer Shape3;
ModelRenderer Shape1;
ModelRenderer Shape2;
public SCPModelRemoteDoorPC()
{
textureWidth = 64;
textureHeight = 64;
Shape3 = new ModelRenderer(this, 0, 0);
Shape3.addBox(0F, 0F, 0F, 14, 18, 12);
Shape3.setRotationPoint(-7F, 6F, -6F);
Shape3.setTextureSize(64, 64);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
Shape1 = new ModelRenderer(this, 1, 32);
Shape1.addBox(0F, 0F, 0F, 14, 16, 6);
Shape1.setRotationPoint(-7F, -10F, 0F);
Shape1.setTextureSize(64, 64);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 1, 1);
Shape2.addBox(0F, 0F, 0F, 1, 2, 1);
Shape2.setTextureSize(64, 64);
Shape2.mirror = true;
if(mod_Others.remoteDoorActivate)
{
Shape2.setRotationPoint(3F, 4F, -4F);
}
else if(!mod_Others.remoteDoorActivate)
{
Shape2.setRotationPoint(5F, 4F, -4F);
}
setRotation(Shape2, 0F, 0F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
Shape3.render(f5);
Shape1.render(f5);
Shape2.render(f5);
if(mod_Others.remoteDoorActivate)
{
Shape2.setRotationPoint(3F, 4F, -4F);
}
else if(!mod_Others.remoteDoorActivate)
{
Shape2.setRotationPoint(5F, 4F, -4F);
}
}
public void renderModel(float f1)
{
Shape3.render(f1);
Shape1.render(f1);
Shape2.render(f1);
if(mod_Others.remoteDoorActivate)
{
Shape2.setRotationPoint(3F, 4F, -4F);
}
else if(!mod_Others.remoteDoorActivate)
{
Shape2.setRotationPoint(5F, 4F, -4F);
}
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
if(mod_Others.remoteDoorActivate)
{
Shape2.setRotationPoint(3F, 4F, -4F);
}
else if(!mod_Others.remoteDoorActivate)
{
Shape2.setRotationPoint(5F, 4F, -4F);
}
}
}
| [
"ntzrmtthihu777@gmail.com"
] | ntzrmtthihu777@gmail.com |
1f4632402d0da0ce2123d4d84623ee7cc3aae24a | 529149c9cb2135f3bc81874b753bd2c12d5a589b | /src/org/openrdf/query/algebra/evaluation/function/postgis/geometry/attribute/IsRectangle.java | 2c88c00461c708520149cd9e5ed75592308d23c4 | [
"Apache-2.0"
] | permissive | i3mainz/kiwi-postgis | 5ce7a6794267e03044bcbda2d50e7c9ecc4c50bf | 8b287fd3424c53892f945a7db21b590811bf20d4 | refs/heads/master | 2021-07-05T15:30:08.983530 | 2020-11-03T20:49:45 | 2020-11-03T20:49:45 | 200,048,925 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 546 | java | package org.openrdf.query.algebra.evaluation.function.postgis.geometry.attribute;
import org.openrdf.model.vocabulary.POSTGIS;
import org.locationtech.jts.geom.Geometry;
import org.openrdf.query.algebra.evaluation.function.postgis.geometry.base.GeometricBinaryAttributeFunction;
public class IsRectangle extends GeometricBinaryAttributeFunction {
@Override
public String getURI() {
return POSTGIS.st_isRectangle.stringValue();
}
@Override
public boolean attribute(Geometry geom) {
return geom.isRectangle();
}
}
| [
"timo.homburg@hs-mainz.de"
] | timo.homburg@hs-mainz.de |
b69e0fb47426583cf4ee3584580e9070f990dc5c | 30b86c7a3fe6513a8003b5157dffd1f5dda08b38 | /core/src/main/java/org/openstack4j/model/storage/block/builder/VolumeTypeBuilder.java | b5cee84239d0602de0e43c3c8de3c43c4ec09358 | [
"Apache-2.0"
] | permissive | tanjin861117/openstack4j | c098a25529398855a1391f4d51fc28b687cb8cb6 | b58da68654fc7570a3aee3f1eabdf9aef499a607 | refs/heads/master | 2020-04-06T17:29:04.079837 | 2018-11-13T13:17:20 | 2018-11-13T13:17:20 | 157,660,728 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 765 | java | package org.openstack4j.model.storage.block.builder;
import java.util.Map;
import org.openstack4j.common.Buildable.Builder;
import org.openstack4j.model.storage.block.VolumeType;
public interface VolumeTypeBuilder extends Builder<VolumeTypeBuilder, VolumeType> {
/**
* See {@link VolumeType#getName()}
*
* @param name the name of the volume type
* @return VolumeTypeBuilder
*/
VolumeTypeBuilder name(String name);
VolumeTypeBuilder description(String Description);
/**
* See {@link VolumeType#getExtraSpecs()} <b>Optional</b>
*
* @param extraSpecs Defining extra specs for the volume type as a key-value map.
* @return VolumeTypeBuilder
*/
VolumeTypeBuilder extraSpecs(Map<String, String> extraSpecs);
}
| [
"tanjin@szzt.com.cn"
] | tanjin@szzt.com.cn |
31fdf0cf886018e78898e6a5b01c6f3273889fa2 | d26f11c1611b299e169e6a027f551a3deeecb534 | /core/filesystem/org/fdesigner/filesystem/provider/FileInfo.java | dc5e844706afdd43119a7a4995058edaafd3dcf1 | [] | no_license | WeControlTheFuture/fdesigner-ui | 1bc401fd71a57985544220b9f9e42cf18db6491d | 62efb51e57e5d7f25654e67ef8b2762311b766b6 | refs/heads/master | 2020-11-24T15:00:24.450846 | 2019-12-27T08:47:23 | 2019-12-27T08:47:23 | 228,199,674 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,810 | java | /*******************************************************************************
* Copyright (c) 2005, 2015 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [170317] add symbolic link support to API
*******************************************************************************/
package org.fdesigner.filesystem.provider;
import org.fdesigner.filesystem.EFS;
import org.fdesigner.filesystem.IFileInfo;
import org.fdesigner.filesystem.internal.filesystem.local.LocalFileNativesManager;
/**
* This class should be used by file system providers in their implementation
* of API methods that return {@link IFileInfo} objects.
*
* @since org.eclipse.core.filesystem 1.0
* @noextend This class is not intended to be subclassed by clients.
*/
public class FileInfo implements IFileInfo {
/**
* Internal attribute indicating if the file is a directory
*/
private static final int ATTRIBUTE_DIRECTORY = 1 << 0;
/**
* Internal attribute indicating if the file exists.
*/
private static final int ATTRIBUTE_EXISTS = 1 << 16;
/**
* Bit field of file attributes. Initialized to specify a writable resource.
*/
private int attributes = EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OWNER_READ;
private int errorCode = NONE;
/**
* The last modified time.
*/
private long lastModified = EFS.NONE;
/**
* The file length.
*/
private long length = EFS.NONE;
/**
* The file name.
*/
private String name = ""; //$NON-NLS-1$
/**
* The target file name if this is a symbolic link
*/
private String linkTarget = null;
/**
* Creates a new file information object with default values.
*/
public FileInfo() {
super();
}
/**
* Creates a new file information object. All values except the file name
* will have default values.
*
* @param name The name of this file
*/
public FileInfo(String name) {
super();
this.name = name;
}
/**
* Convenience method to clear a masked region of the attributes bit field.
*
* @param mask The mask to be cleared
*/
private void clear(int mask) {
attributes &= ~mask;
}
@Override
public Object clone() {
try {
return super.clone();
} catch (CloneNotSupportedException e) {
// We know this object is cloneable.
return null;
}
}
/**
* @since 1.5
*/
@Override
public int compareTo(IFileInfo o) {
return name.compareTo(o.getName());
}
@Override
public boolean exists() {
return getAttribute(ATTRIBUTE_EXISTS);
}
/**
* @since 1.4
*/
@Override
public int getError() {
return errorCode;
}
@Override
public boolean getAttribute(int attribute) {
if (attribute == EFS.ATTRIBUTE_READ_ONLY && isAttributeSuported(EFS.ATTRIBUTE_OWNER_WRITE))
return (!isSet(EFS.ATTRIBUTE_OWNER_WRITE)) || isSet(EFS.ATTRIBUTE_IMMUTABLE);
else if (attribute == EFS.ATTRIBUTE_EXECUTABLE && isAttributeSuported(EFS.ATTRIBUTE_OWNER_EXECUTE))
return isSet(EFS.ATTRIBUTE_OWNER_EXECUTE);
else
return isSet(attribute);
}
@Override
public String getStringAttribute(int attribute) {
if (attribute == EFS.ATTRIBUTE_LINK_TARGET)
return this.linkTarget;
return null;
}
@Override
public long getLastModified() {
return lastModified;
}
@Override
public long getLength() {
return length;
}
@Override
public String getName() {
return name;
}
@Override
public boolean isDirectory() {
return isSet(ATTRIBUTE_DIRECTORY);
}
private boolean isSet(long mask) {
return (attributes & mask) != 0;
}
private void set(int mask) {
attributes |= mask;
}
@Override
public void setAttribute(int attribute, boolean value) {
if (attribute == EFS.ATTRIBUTE_READ_ONLY && isAttributeSuported(EFS.ATTRIBUTE_OWNER_WRITE)) {
if (value) {
clear(EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OTHER_WRITE | EFS.ATTRIBUTE_GROUP_WRITE);
set(EFS.ATTRIBUTE_IMMUTABLE);
} else {
set(EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OWNER_READ);
clear(EFS.ATTRIBUTE_IMMUTABLE);
}
} else if (attribute == EFS.ATTRIBUTE_EXECUTABLE && isAttributeSuported(EFS.ATTRIBUTE_OWNER_EXECUTE)) {
if (value)
set(EFS.ATTRIBUTE_OWNER_EXECUTE);
else
clear(EFS.ATTRIBUTE_OWNER_EXECUTE | EFS.ATTRIBUTE_GROUP_EXECUTE | EFS.ATTRIBUTE_OTHER_EXECUTE);
} else {
if (value)
set(attribute);
else
clear(attribute);
}
}
private static boolean isAttributeSuported(int value) {
return (LocalFileNativesManager.getSupportedAttributes() & value) != 0;
}
/**
* Sets whether this is a file or directory.
*
* @param value <code>true</code> if this is a directory, and <code>false</code>
* if this is a file.
*/
public void setDirectory(boolean value) {
if (value)
set(ATTRIBUTE_DIRECTORY);
else
clear(ATTRIBUTE_DIRECTORY);
}
/**
* Sets whether this file or directory exists.
*
* @param value <code>true</code> if this file exists, and <code>false</code>
* otherwise.
*/
public void setExists(boolean value) {
if (value)
set(ATTRIBUTE_EXISTS);
else
clear(ATTRIBUTE_EXISTS);
}
/**
* Sets the error code indicating whether an I/O error was encountered when accessing the file.
*
* @param errorCode {@link IFileInfo#IO_ERROR} if this file has an I/O error,
* and {@link IFileInfo#NONE} otherwise.
* @since 1.4
*/
public void setError(int errorCode) {
this.errorCode = errorCode;
}
@Override
public void setLastModified(long value) {
lastModified = value;
}
/**
* Sets the length of this file. A value of {@link EFS#NONE}
* indicates the file does not exist, is a directory, or the length could not be computed.
*
* @param value the length of this file, or {@link EFS#NONE}
*/
public void setLength(long value) {
this.length = value;
}
/**
* Sets the name of this file.
*
* @param name The file name
*/
public void setName(String name) {
if (name == null)
throw new IllegalArgumentException();
this.name = name;
}
/**
* Sets or clears a String attribute, e.g. symbolic link target.
*
* @param attribute The kind of attribute to set. Currently only
* {@link EFS#ATTRIBUTE_LINK_TARGET} is supported.
* @param value The String attribute, or <code>null</code> to clear
* the attribute
* @since org.eclipse.core.filesystem 1.1
*/
public void setStringAttribute(int attribute, String value) {
if (attribute == EFS.ATTRIBUTE_LINK_TARGET)
this.linkTarget = value;
}
/**
* For debugging purposes only.
*/
@Override
public String toString() {
return name;
}
} | [
"491676539@qq.com"
] | 491676539@qq.com |
443e5038db77d85d0780fbc210dacbd7a0bee40b | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/i18n/language/initial/C30486f.java | 23a8f4f5b41234c3225695b3e82dbbad796f4bdf | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 715 | java | package com.p280ss.android.ugc.aweme.i18n.language.initial;
import android.content.Context;
import java.util.concurrent.Callable;
/* renamed from: com.ss.android.ugc.aweme.i18n.language.initial.f */
final /* synthetic */ class C30486f implements Callable {
/* renamed from: a */
private final C30483e f80095a;
/* renamed from: b */
private final Context f80096b;
/* renamed from: c */
private final String[] f80097c;
C30486f(C30483e eVar, Context context, String[] strArr) {
this.f80095a = eVar;
this.f80096b = context;
this.f80097c = strArr;
}
public final Object call() {
return this.f80095a.mo80160a(this.f80096b, this.f80097c);
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
48c705f3b57973821d1920eccd44f17b432389be | b17e8b87a21877e2c0208065b0303de7cbec4a04 | /OOPC/2102 Examples/dec01/BoxingTimingExample.java | 43d642c09a4b93963728bc54ba2b7f7aa6eb3f01 | [] | no_license | jaithakai91/egreer-wpi | 63b799c7fc54cd638c35b8086d6cc71beb37e8f9 | 628122efb2b717c3906cafffdd1ba0f9ecea3136 | refs/heads/master | 2023-04-18T14:31:35.452030 | 2011-03-06T06:31:39 | 2011-03-06T06:31:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,014 | java | package dec01;
/**
* Show timing issues for boxing/unboxing
*
* @author heineman
*/
public class BoxingTimingExample {
/**
* @param args
*/
public static void main(String[] args) {
// What is the only visible difference here?
Integer x, y;
int a, b;
long start, end;
start = System.currentTimeMillis();
for (int i = 0; i < 10000000; i++) {
a = 99;
b = 137;
a = a + b;
}
end = System.currentTimeMillis();
System.out.println ("Time required for int arithmetic: " + (end - start));
// Is there any reason why it is 20x slower? Yes!
start = System.currentTimeMillis();
for (int i = 0; i < 10000000; i++) {
x = 99; // equivalent to x = new Integer(99);
y = 137; // equivalent to y = new Integer(137);
x = x + y; // equivalent to x = new Integer (x.intValue() + y.intValue());
}
end = System.currentTimeMillis();
System.out.println ("Time required for Integer arithmetic: " + (end - start));
}
}
| [
"greer.eric@gmail.com"
] | greer.eric@gmail.com |
9009f72daf419bc21eef09ed8b76a717eb2d10e8 | ed9138bc0d1291163a386124fa467d52e0fb7f3f | /Pos2Books/src/se/budohoor/economics/pos2books/plugins/books/economic/types/CashBookGetData.java | 1ba2885195c1e2ee7ae0c5194d4bf44cb659ec60 | [] | no_license | odie37/pos-2-books | 56a06439e9e072d8bea2e747d65ef3dad3349709 | cbec64fef1d7abb48d948b3adc2f8be36e09cf19 | refs/heads/master | 2016-09-10T10:37:04.105489 | 2015-01-04T19:11:32 | 2015-01-04T19:11:32 | 28,779,078 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,522 | java |
package se.budohoor.economics.pos2books.plugins.books.economic.types;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="entityHandle" type="{http://e-conomic.com}CashBookHandle" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"entityHandle"
})
@XmlRootElement(name = "CashBook_GetData")
public class CashBookGetData {
protected CashBookHandle entityHandle;
/**
* Gets the value of the entityHandle property.
*
* @return
* possible object is
* {@link CashBookHandle }
*
*/
public CashBookHandle getEntityHandle() {
return entityHandle;
}
/**
* Sets the value of the entityHandle property.
*
* @param value
* allowed object is
* {@link CashBookHandle }
*
*/
public void setEntityHandle(CashBookHandle value) {
this.entityHandle = value;
}
}
| [
"mattias.fritzson@gmail.com"
] | mattias.fritzson@gmail.com |
50fab60319807dba71739158a3e9b34c6cb42007 | 798f8e3a90e39c55eeebae251e0dc497c2ca8d91 | /src/main/java/com/ss/editor/tree/generator/tree/node/BranchesParametersTreeNode.java | 1ff29f6d3b8b3065733d6e0927cac1d2436ecd3b | [
"Apache-2.0"
] | permissive | JavaSaBr/jmb-tree-generator | 39166cffc4dee38a986ee15aff259843059f6266 | 94ccb18b4824ccc9e1fa7bcb5bf243db6e1926ba | refs/heads/master | 2021-01-20T06:47:07.781072 | 2018-05-21T03:41:46 | 2018-05-21T03:41:46 | 101,517,524 | 3 | 1 | Apache-2.0 | 2018-05-21T03:39:18 | 2017-08-26T22:53:52 | Java | UTF-8 | Java | false | false | 2,227 | java | package com.ss.editor.tree.generator.tree.node;
import com.ss.editor.annotation.FromAnyThread;
import com.ss.editor.annotation.FxThread;
import com.ss.editor.tree.generator.PluginMessages;
import com.ss.editor.tree.generator.parameters.BranchesParameters;
import com.ss.editor.tree.generator.tree.action.CreateBranchAction;
import com.ss.editor.ui.control.tree.NodeTree;
import com.ss.editor.ui.control.tree.node.TreeNode;
import com.ss.rlib.common.util.array.Array;
import com.ss.rlib.common.util.array.ArrayFactory;
import javafx.collections.ObservableList;
import javafx.scene.control.MenuItem;
import org.jetbrains.annotations.NotNull;
/**
* The implementation of presentation branches parameters node in the {@link ParametersTreeNode}
*
* @author JavaSaBr
*/
public class BranchesParametersTreeNode extends ParametersTreeNode<BranchesParameters> {
public BranchesParametersTreeNode(@NotNull BranchesParameters element, long objectId) {
super(element, objectId);
}
@Override
@FromAnyThread
public @NotNull String getName() {
return PluginMessages.TREE_GENERATOR_EDITOR_NODE_BRANCHES;
}
@Override
@FxThread
public @NotNull Array<TreeNode<?>> getChildren(@NotNull NodeTree<?> nodeTree) {
var branchesParameters = getElement();
var treeParameters = branchesParameters.getTreeParameters();
var children = ArrayFactory.<TreeNode<?>>newArray(TreeNode.class);
var branches = treeParameters.getBranches();
for (var branch : branches) {
children.add(FACTORY_REGISTRY.createFor(branch));
}
for (var i = 0; i < children.size(); i++) {
var node = (BranchParametersTreeNode) children.get(i);
node.setName(PluginMessages.TREE_GENERATOR_EDITOR_NODE_BRANCH + " #" + i);
}
return children;
}
@Override
@FxThread
public void fillContextMenu(@NotNull NodeTree<?> nodeTree, @NotNull ObservableList<MenuItem> items) {
super.fillContextMenu(nodeTree, items);
items.add(new CreateBranchAction(nodeTree, this));
}
@Override
@FxThread
public boolean hasChildren(@NotNull NodeTree<?> nodeTree) {
return true;
}
}
| [
"javasabr@gmail.com"
] | javasabr@gmail.com |
ae30019aaad3e9b5cfef1eec4d6e1df42119c9b0 | 7cb0d799781dee02c1653041fb71283593084c28 | /app/src/main/java/com/kongtiaoapp/xxhj/adapter/MyZhenduanAdapter.java | 46b32990e4952d1a5111183a280997c054685d18 | [] | no_license | guochengabc/xxhj_project | 2a7a41f000dc7c6512d93c83a641e6dd7a531a87 | b6588be8e5c9436f88873e085a76c3241193a8c1 | refs/heads/master | 2020-09-21T13:09:44.562591 | 2020-01-19T09:17:05 | 2020-01-19T09:17:05 | 224,797,254 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,031 | java | package com.kongtiaoapp.xxhj.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.kongtiaoapp.xxhj.R;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* Created by 桂飞 on 2016/11/4.
*/
public class MyZhenduanAdapter extends BaseAdapter {
private List<String> list;
private Context context;
private List<Integer> list_image;
public MyZhenduanAdapter( Context context) {
this.context = context;
notifyDataSetChanged();
}
public void setList(List<String> list, List<Integer> list_image) {
this.list = list;
this.list_image = list_image;
notifyDataSetChanged();
}
@Override
public int getCount() {
return list.size();
}
@Override
public Object getItem(int position) {
return list.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolers viewholers = null;
if (convertView == null) {
convertView = LayoutInflater.from(context).inflate(R.layout.item_zhenduan, parent, false);
viewholers = new ViewHolers(convertView);
convertView.setTag(viewholers);
} else {
viewholers = (ViewHolers) convertView.getTag();
}
viewholers.txt_zhenduan.setText(list.get(position).toString());
viewholers.image_summer.setImageResource(list_image.get(position));
return convertView;
}
class ViewHolers {
@BindView(R.id.txt_zhenduan)
TextView txt_zhenduan;
@BindView(R.id.image_summer)
ImageView image_summer;
public ViewHolers(View view) {
ButterKnife.bind(this, view);
}
}
}
| [
"guochengabc@163.com"
] | guochengabc@163.com |
387b39022f5702b482005bbc325675b96e3821c5 | 7aa02f902ad330c70b0b34ec2d4eb3454c7a3fc1 | /com/google/api/client/googleapis/auth/oauth2/GoogleClientSecrets.java | a164bf1a4b20ad996f1545f34e54c3696cae70cc | [] | no_license | hisabimbola/andexpensecal | 5e42c7e687296fae478dfd39abee45fae362bc5b | c47e6f0a1a6e24fe1377d35381b7e7e37f1730ee | refs/heads/master | 2021-01-19T15:20:25.262893 | 2016-08-11T16:00:49 | 2016-08-11T16:00:49 | 100,962,347 | 1 | 0 | null | 2017-08-21T14:48:33 | 2017-08-21T14:48:33 | null | UTF-8 | Java | false | false | 3,062 | java | package com.google.api.client.googleapis.auth.oauth2;
import com.google.api.client.json.C0657b;
import com.google.api.client.json.C0771d;
import com.google.api.client.p050d.ab;
import com.google.api.client.p050d.am;
import java.io.InputStream;
import java.util.List;
public final class GoogleClientSecrets extends C0657b {
@ab
private Details installed;
@ab
private Details web;
public final class Details extends C0657b {
@ab(a = "auth_uri")
private String authUri;
@ab(a = "client_id")
private String clientId;
@ab(a = "client_secret")
private String clientSecret;
@ab(a = "redirect_uris")
private List<String> redirectUris;
@ab(a = "token_uri")
private String tokenUri;
public Details clone() {
return (Details) super.clone();
}
public String getAuthUri() {
return this.authUri;
}
public String getClientId() {
return this.clientId;
}
public String getClientSecret() {
return this.clientSecret;
}
public List<String> getRedirectUris() {
return this.redirectUris;
}
public String getTokenUri() {
return this.tokenUri;
}
public Details set(String str, Object obj) {
return (Details) super.set(str, obj);
}
public Details setAuthUri(String str) {
this.authUri = str;
return this;
}
public Details setClientId(String str) {
this.clientId = str;
return this;
}
public Details setClientSecret(String str) {
this.clientSecret = str;
return this;
}
public Details setRedirectUris(List<String> list) {
this.redirectUris = list;
return this;
}
public Details setTokenUri(String str) {
this.tokenUri = str;
return this;
}
}
public static GoogleClientSecrets load(C0771d c0771d, InputStream inputStream) {
return (GoogleClientSecrets) c0771d.m7056a(inputStream, GoogleClientSecrets.class);
}
public GoogleClientSecrets clone() {
return (GoogleClientSecrets) super.clone();
}
public Details getDetails() {
boolean z = true;
if ((this.web == null) == (this.installed == null)) {
z = false;
}
am.m6914a(z);
return this.web == null ? this.installed : this.web;
}
public Details getInstalled() {
return this.installed;
}
public Details getWeb() {
return this.web;
}
public GoogleClientSecrets set(String str, Object obj) {
return (GoogleClientSecrets) super.set(str, obj);
}
public GoogleClientSecrets setInstalled(Details details) {
this.installed = details;
return this;
}
public GoogleClientSecrets setWeb(Details details) {
this.web = details;
return this;
}
}
| [
"m.ravinther@yahoo.com"
] | m.ravinther@yahoo.com |
1002c4e118a7201f7feb1d70e24bbc13c7856920 | 65bd4bee5777fcd9cb1cbebcdc6ece29228c936a | /src/main/java/io/github/cottonmc/witchcraft/block/SpellCircleBlock.java | 169f857e80c18d339b7f6cf9642d2b7ba9b26daf | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive"
] | permissive | CottonMC/PracticalWitchcraft | 3fb0c2c4d881bb351ca6c72ab673b4da454a05a2 | c8b663ed44bd7176da78bfa2b107417f3a5e038c | refs/heads/master | 2020-05-07T12:30:44.368747 | 2020-03-02T00:44:41 | 2020-03-02T00:44:41 | 180,507,474 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,660 | java | package io.github.cottonmc.witchcraft.block;
import io.github.cottonmc.witchcraft.block.entity.SpellCircleEntity;
import io.github.cottonmc.witchcraft.effect.WitchcraftEffects;
import io.github.cottonmc.witchcraft.item.WitchcraftItems;
import io.github.cottonmc.witchcraft.spell.Spell;
import net.fabricmc.fabric.api.block.FabricBlockSettings;
import net.fabricmc.fabric.api.util.NbtType;
import net.minecraft.block.Block;
import net.minecraft.block.BlockEntityProvider;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.entity.ItemEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraft.world.explosion.Explosion;
import java.util.Random;
public class SpellCircleBlock extends Block implements BlockEntityProvider {
public SpellCircleBlock() {
super(FabricBlockSettings.of(Material.CARPET).noCollision().build());
}
@Override
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
if (!world.isClient && (world.getBlockEntity(pos) instanceof SpellCircleEntity)) {
if (world.getBlockTickScheduler().isScheduled(pos, WitchcraftBlocks.SPELL_CIRCLE)
|| world.getBlockTickScheduler().isTicking(pos, WitchcraftBlocks.SPELL_CIRCLE)) return ActionResult.SUCCESS;
ItemStack stack = player.getStackInHand(hand);
SpellCircleEntity be = (SpellCircleEntity) world.getBlockEntity(pos);
if (be.hasPixie() && stack.getItem() == WitchcraftItems.BROOMSTICK) {
if (player.hasStatusEffect(WitchcraftEffects.FIZZLE)) {
int level = player.getStatusEffect(WitchcraftEffects.FIZZLE).getAmplifier() + 1;
if (world.getRandom().nextInt(20) <= level) {
world.createExplosion(null, DamageSource.MAGIC, pos.getX(), pos.getY(), pos.getZ(), 3f, true, Explosion.DestructionType.NONE);
world.breakBlock(pos, false);
return ActionResult.SUCCESS;
}
}
be.beginSpell(player);
}
else if (stack.getItem() == WitchcraftItems.BOTTLED_PIXIE) {
ItemStack bottle = new ItemStack(Items.GLASS_BOTTLE);
if (!player.isCreative()) {
if (stack.getCount() == 1) player.setStackInHand(hand, bottle);
else if (!player.inventory.insertStack(bottle)) {
ItemEntity entity = player.dropItem(bottle, false);
world.spawnEntity(entity);
}
}
be.addPixie();
}
}
return ActionResult.SUCCESS;
}
@Override
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random rad) {
if (world.getBlockEntity(pos) instanceof SpellCircleEntity) {
((SpellCircleEntity)world.getBlockEntity(pos)).performSpell();
}
}
@Override
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) {
BlockEntity be = world.getBlockEntity(pos);
if (be instanceof SpellCircleEntity && stack.getOrCreateTag().contains("Spell", NbtType.COMPOUND)) {
SpellCircleEntity circle = (SpellCircleEntity)be;
Spell spell = Spell.fromTag(stack.getTag().getCompound("Spell"));
circle.setSpell(spell);
}
}
@Override
public BlockEntity createBlockEntity(BlockView view) {
return new SpellCircleEntity();
}
}
| [
"goclonefilms@gmail.com"
] | goclonefilms@gmail.com |
7af16953871ba1c844dae58c3d9146b5891dc5ba | ed53c4d93e851d46e963cafb26cb6a3f468dd47c | /extensions/ecs/ecs-weaver/src/arc/ecs/weaver/impl/template/UniEntityLink.java | c53251767e6a14407a428416c7e4f7d5b89e3d8c | [] | no_license | zonesgame/Arc | 0a4ea8cf1c44066e85ffd95cfe52eb1ece1488e7 | ea8a0be1642befa535fba717e94c4fc03bd6f8a0 | refs/heads/main | 2023-06-28T04:21:06.146553 | 2021-07-26T14:02:35 | 2021-07-26T14:02:35 | 384,278,749 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 750 | java | package arc.ecs.weaver.impl.template;
import arc.ecs.*;
import arc.ecs.link.*;
import java.lang.reflect.*;
public class UniEntityLink extends Component{
public Entity field;
public static class Mutator implements UniFieldMutator{
private Base base;
@Override
public int read(Component c, Field f){
Entity e = ((UniEntityLink)c).field;
return (e != null) ? e.getId() : -1;
}
@Override
public void write(int value, Component c, Field f){
Entity e = (value != -1) ? base.getEntity(value) : null;
((UniEntityLink)c).field = e;
}
@Override
public void setBase(Base base){
this.base = base;
}
}
}
| [
"32406374+zonesgame@users.noreply.github.com"
] | 32406374+zonesgame@users.noreply.github.com |
7ee336d62f40ec1365c01050e51c08d5ed6a25b7 | 12b24632ef98ca6bd68f1e85a9b1ffdeff24022d | /SunFlowerJava/app/src/main/java/com/example/sunflower_java/adapters/BindingAdapters.java | e0cdceff58587b00324b4049500f6c6c5f996d49 | [] | no_license | han1254/Sunflower-Java | 04f4a6a575b0bb71bc0350aac6f15cd31ce550ee | 1c61a806f097be003747d2b13fff730fb75a666a | refs/heads/master | 2020-12-14T12:39:49.833591 | 2020-01-18T14:33:51 | 2020-01-18T14:33:51 | 234,746,936 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 405 | java | package com.example.sunflower_java.adapters;
import android.view.View;
import androidx.databinding.BindingAdapter;
/**
* Time:2020/1/14 21:42
* Author: han1254
* Email: 1254763408@qq.com
* Function:
*/
public class BindingAdapters {
@BindingAdapter("isGone")
public static void bindIsGone(View view, boolean isGone) {
view.setVisibility(isGone ? View.GONE : View.VISIBLE);
}
}
| [
"you@example.com"
] | you@example.com |
528028043bad879cf6d6c5e58eff1a6107599d3f | 3df27b037c878b7d980b5c068d3663682c09b0b3 | /src/com/jbf/workflow/dao/SysWorkflowTaskPageUrlDao.java | 6cd8c099d7080baeb715a7fe354c5541d22567ae | [] | no_license | shinow/tjec | 82fbd67886bc1f60c63af3e6054d1e4c16df2a0d | 0b2f4de2eda13acf351dfc04faceea508c9dd4b0 | refs/heads/master | 2021-09-24T15:45:42.212349 | 2018-10-11T06:13:55 | 2018-10-11T06:13:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 797 | java | /************************************************************
* 类名:SysWorkflowTaskPageUrl
*
* 类别:Dao
* 功能:任务对应的处理页面Dao
*
* Ver 変更日 部门 担当者 変更内容
* ──────────────────────────────────────────────
* V1.00 2014-07-23 CFIT-PG HYF 初版
*
* Copyright (c) 2014 CFIT-Weifang Company All Rights Reserved.
************************************************************/
package com.jbf.workflow.dao;
import com.jbf.common.dao.IGenericDao;
import com.jbf.workflow.po.SysWorkflowTaskPageUrl;
public interface SysWorkflowTaskPageUrlDao extends
IGenericDao<SysWorkflowTaskPageUrl, Long> {
}
| [
"lin521lh"
] | lin521lh |
ce19032a9b746f8383af9d14bae8477cb55a2540 | adb073a93ec2ceae65756d9e6f2f04478d6c74aa | /advance-java/week5/23.Behavioral-design-pattern/exercise/test-module-2/src/UI.java | 847ed219f0a3d541197e5b7c8c1855e5647d14ab | [] | no_license | nhlong9697/codegym | 0ae20f19360a337448e206137d703c5c2056a17b | 38e105272fca0aecc0e737277b3a0a47b8cc0702 | refs/heads/master | 2023-05-12T17:18:14.570378 | 2022-07-13T09:07:52 | 2022-07-13T09:07:52 | 250,012,451 | 0 | 0 | null | 2023-05-09T05:40:08 | 2020-03-25T15:12:34 | JavaScript | UTF-8 | Java | false | false | 544 | java | public class UI {
public void initialize() {
System.out.println("---- CHUONG TRINH QUAN LY DANH BA ----");
System.out.println("Chon chuc nang theo so (de tiep tuc):");
System.out.println("1. Xem danh sach");
System.out.println("2. Them moi");
System.out.println("3. Cap nhat");
System.out.println("4. Xoa");
System.out.println("5. Tim kiem");
System.out.println("6. Doc tu file");
System.out.println("7. Ghi vao file");
System.out.println("8. Thoat");
}
}
| [
"n.h.long.9697@gmail.com"
] | n.h.long.9697@gmail.com |
a8a4f8245b2450d1688d882bcb522597ec864c6b | 3ec181de57f014603bb36b8d667a8223875f5ee8 | /jcommon/prometheus/prometheus-client/src/main/java/com/xiaomi/youpin/prometheus/client/PrometheusGauge.java | ce7ac3becb5b79bcff47f0881056d047b9af5d7e | [
"Apache-2.0"
] | permissive | XiaoMi/mone | 41af3b636ecabd7134b53a54c782ed59cec09b9e | 576cea4e6cb54e5bb7c37328f1cb452cda32f953 | refs/heads/master | 2023-08-31T08:47:40.632419 | 2023-08-31T08:09:35 | 2023-08-31T08:09:35 | 331,844,632 | 1,148 | 152 | Apache-2.0 | 2023-09-14T07:33:13 | 2021-01-22T05:20:18 | Java | UTF-8 | Java | false | false | 2,158 | java | package com.xiaomi.youpin.prometheus.client;
import io.prometheus.client.Gauge;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.MDC;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author zhangxiaowei
*/
@Slf4j
public class PrometheusGauge implements XmGauge {
public Gauge myGauge;
public String[] labelNames;
public String[] labelValues;
public PrometheusGauge() {
}
@Override
public void set(double delta,String ...labelValues) {
try {
List<String> mylist = new ArrayList<>(Arrays.asList(labelValues));
mylist.add(Prometheus.constLabels.get(Metrics.SERVICE));
String[] finalValue = mylist.toArray(new String[mylist.size()]);
this.myGauge.labels(finalValue).set(delta);
} catch (Throwable throwable) {
//log.warn(throwable.getMessage());
}
}
public PrometheusGauge(Gauge cb, String[] lns, String[] lvs) {
this.myGauge = cb;
this.labelNames = lns;
this.labelValues = lvs;
}
@Override
public XmGauge with(String... labelValue) {
/*String traceId = MDC.get("tid");
if (StringUtils.isEmpty(traceId)) {
traceId = "no traceId";
}*/
try {
if (this.labelNames.length != labelValue.length) {
log.warn("Incorrect numbers of labels : " + myGauge.describe().get(0).name);
return new PrometheusGauge();
}
return this;
} catch (Throwable throwable) {
log.warn(throwable.getMessage());
return null;
}
}
@Override
public void add(double delta,String... labelValue) {
List<String> mylist = new ArrayList<>(Arrays.asList(labelValues));
mylist.add(Prometheus.constLabels.get(Metrics.SERVICE));
String[] finalValue = mylist.toArray(new String[mylist.size()]);
try {
this.myGauge.labels(finalValue).inc(delta);
} catch (Throwable throwable) {
//log.warn(throwable.getMessage());
}
}
}
| [
"shanwenbang@xiaomi.com"
] | shanwenbang@xiaomi.com |
721f5a5fb90c1e99214fee86ac1c3d9504f33f20 | 23749b673ff50cfb3bd09eb9662715e09da17dc8 | /src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cacheobject_args.java | e2bfc0dbb6d3852ec25dda277a01cd23013d8e8a | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | netscaler/nitro | 20f0499200478b971f6c11a8f77ab44113bfe1a5 | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | refs/heads/master | 2016-08-04T20:02:53.344531 | 2013-11-22T04:04:18 | 2013-11-22T04:04:18 | 8,279,932 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,555 | java | /*
* Copyright (c) 2008-2015 Citrix Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.citrix.netscaler.nitro.resource.config.cache;
/**
* Provides additional arguments required for fetching the cacheobject resource.
*/
public class cacheobject_args
{
private String url;
private Long locator;
private Long httpstatus;
private String host;
private Integer port;
private String groupname;
private String httpmethod;
private String group;
private String ignoremarkerobjects;
private String includenotreadyobjects;
/**
* <pre>
* URL of the particular object whose details is required. Parameter "host" must be specified along with the URL.<br> Minimum length = 1
* </pre>
*/
public void set_url(String url) throws Exception{
this.url = url;
}
/**
* <pre>
* URL of the particular object whose details is required. Parameter "host" must be specified along with the URL.<br> Minimum length = 1
* </pre>
*/
public String get_url() throws Exception {
return this.url;
}
/**
* <pre>
* ID of the cached object.
* </pre>
*/
public void set_locator(long locator) throws Exception {
this.locator = new Long(locator);
}
/**
* <pre>
* ID of the cached object.
* </pre>
*/
public void set_locator(Long locator) throws Exception{
this.locator = locator;
}
/**
* <pre>
* ID of the cached object.
* </pre>
*/
public Long get_locator() throws Exception {
return this.locator;
}
/**
* <pre>
* HTTP status of the object.
* </pre>
*/
public void set_httpstatus(long httpstatus) throws Exception {
this.httpstatus = new Long(httpstatus);
}
/**
* <pre>
* HTTP status of the object.
* </pre>
*/
public void set_httpstatus(Long httpstatus) throws Exception{
this.httpstatus = httpstatus;
}
/**
* <pre>
* HTTP status of the object.
* </pre>
*/
public Long get_httpstatus() throws Exception {
return this.httpstatus;
}
/**
* <pre>
* Host name of the object. Parameter "url" must be specified.<br> Minimum length = 1
* </pre>
*/
public void set_host(String host) throws Exception{
this.host = host;
}
/**
* <pre>
* Host name of the object. Parameter "url" must be specified.<br> Minimum length = 1
* </pre>
*/
public String get_host() throws Exception {
return this.host;
}
/**
* <pre>
* Host port of the object. You must also set the Host parameter.<br> Default value: 80<br> Minimum value = 1
* </pre>
*/
public void set_port(int port) throws Exception {
this.port = new Integer(port);
}
/**
* <pre>
* Host port of the object. You must also set the Host parameter.<br> Default value: 80<br> Minimum value = 1
* </pre>
*/
public void set_port(Integer port) throws Exception{
this.port = port;
}
/**
* <pre>
* Host port of the object. You must also set the Host parameter.<br> Default value: 80<br> Minimum value = 1
* </pre>
*/
public Integer get_port() throws Exception {
return this.port;
}
/**
* <pre>
* Name of the content group to which the object belongs. It will display only the objects belonging to the specified content group. You must also set the Host parameter.
* </pre>
*/
public void set_groupname(String groupname) throws Exception{
this.groupname = groupname;
}
/**
* <pre>
* Name of the content group to which the object belongs. It will display only the objects belonging to the specified content group. You must also set the Host parameter.
* </pre>
*/
public String get_groupname() throws Exception {
return this.groupname;
}
/**
* <pre>
* HTTP request method that caused the object to be stored.<br> Default value: GET<br> Possible values = GET, POST
* </pre>
*/
public void set_httpmethod(String httpmethod) throws Exception{
this.httpmethod = httpmethod;
}
/**
* <pre>
* HTTP request method that caused the object to be stored.<br> Default value: GET<br> Possible values = GET, POST
* </pre>
*/
public String get_httpmethod() throws Exception {
return this.httpmethod;
}
/**
* <pre>
* Name of the content group whose objects should be listed.
* </pre>
*/
public void set_group(String group) throws Exception{
this.group = group;
}
/**
* <pre>
* Name of the content group whose objects should be listed.
* </pre>
*/
public String get_group() throws Exception {
return this.group;
}
/**
* <pre>
* Ignore marker objects. Marker objects are created when a response exceeds the maximum or minimum response size for the content group or has not yet received the minimum number of hits for the content group.<br> Possible values = ON, OFF
* </pre>
*/
public void set_ignoremarkerobjects(String ignoremarkerobjects) throws Exception{
this.ignoremarkerobjects = ignoremarkerobjects;
}
/**
* <pre>
* Ignore marker objects. Marker objects are created when a response exceeds the maximum or minimum response size for the content group or has not yet received the minimum number of hits for the content group.<br> Possible values = ON, OFF
* </pre>
*/
public String get_ignoremarkerobjects() throws Exception {
return this.ignoremarkerobjects;
}
/**
* <pre>
* Include responses that have not yet reached a minimum number of hits before being cached.<br> Possible values = ON, OFF
* </pre>
*/
public void set_includenotreadyobjects(String includenotreadyobjects) throws Exception{
this.includenotreadyobjects = includenotreadyobjects;
}
/**
* <pre>
* Include responses that have not yet reached a minimum number of hits before being cached.<br> Possible values = ON, OFF
* </pre>
*/
public String get_includenotreadyobjects() throws Exception {
return this.includenotreadyobjects;
}
public static class includenotreadyobjectsEnum {
public static final String ON = "ON";
public static final String OFF = "OFF";
}
public static class httpmethodEnum {
public static final String GET = "GET";
public static final String POST = "POST";
}
public static class ignoremarkerobjectsEnum {
public static final String ON = "ON";
public static final String OFF = "OFF";
}
}
| [
"vijay.venkatachalam@citrix.com"
] | vijay.venkatachalam@citrix.com |
4b7b77a11da4e11987484e2e0343cb7592dda208 | ab8a3756a6d0580376deb3cf3cd1c3321f071343 | /src/com/vositor/vositor/Element.java | 671af1ae6f05f545a3b84935a9d1db183aa549d6 | [] | no_license | gongpb/DesignPatterns | 427e51159b3513fc05040bd32d7197d85251e043 | 4a7888a40396a61326bb88d07bb29a0a3214396e | refs/heads/master | 2021-05-02T05:48:17.308084 | 2020-06-01T13:51:07 | 2020-06-01T13:51:07 | 13,065,223 | 1 | 1 | null | null | null | null | GB18030 | Java | false | false | 341 | java | package com.vositor.vositor;
/**
* 抽象元素
* 声明有哪一类访问者访问,程序中通过accept方法的参数来定义的
* @author gong_pibao
*/
public abstract class Element {
//定义业务逻辑
public abstract void doSomething();
//允许访问者访问
public abstract void accept(IVisitor visitor);
}
| [
"my_program@126.com"
] | my_program@126.com |
db8d56030f4da2def3937dcffbfe2f83292478cc | 40d844c1c780cf3618979626282cf59be833907f | /src/testcases/CWE563_Unused_Variable/CWE563_Unused_Variable__unused_public_member_variable_01_good1.java | 27f264990306bc3f9765c61e46f47b303eca3e52 | [] | no_license | rubengomez97/juliet | f9566de7be198921113658f904b521b6bca4d262 | 13debb7a1cc801977b9371b8cc1a313cd1de3a0e | refs/heads/master | 2023-06-02T00:37:24.532638 | 2021-06-23T17:22:22 | 2021-06-23T17:22:22 | 379,676,259 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 939 | java | /*
* @description Unused public class member variable
*
* */
package testcases.CWE563_Unused_Variable;
import testcasesupport.*;
public class CWE563_Unused_Variable__unused_public_member_variable_01_good1 extends AbstractTestCaseClassIssueGood
{
public int intGood1 = 0;
private void good1()
{
/* FIX: Use intGood1 */
IO.writeLine("" + intGood1);
}
public void good()
{
good1();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args)
throws ClassNotFoundException, InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"you@example.com"
] | you@example.com |
01d2c3272057453ba93c9b925d7a4f31c6a57f9c | fa63fa8fea6dfd24f369d69f39f322f78143077c | /mall-ware/src/main/java/com/scut/mall/ware/entity/WareOrderTaskDetailEntity.java | 69e0a76c804d1f99a4b0132db929486ac70da2dd | [] | no_license | laizikeng/mall | 4741f36ba872a673210c1f75b2da8abe2e505083 | 70f1ead689b4101f3e796438d8200285d0b32fcf | refs/heads/main | 2023-07-05T02:36:05.184978 | 2021-08-21T02:42:33 | 2021-08-21T02:42:33 | 387,080,581 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 843 | java | package com.scut.mall.ware.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 库存工作单
*
* @author lzk
* @email 2601665132@qq.com
* @date 2021-08-05 15:09:33
*/
@Data
@TableName("wms_ware_order_task_detail")
public class WareOrderTaskDetailEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* sku_id
*/
private Long skuId;
/**
* sku_name
*/
private String skuName;
/**
* 购买个数
*/
private Integer skuNum;
/**
* 工作单id
*/
private Long taskId;
/**
* 仓库id
*/
private Long wareId;
/**
* 1-已锁定 2-已解锁 3-扣减
*/
private Integer lockStatus;
}
| [
"2601665132@qq.com"
] | 2601665132@qq.com |
69b986e5c686358ed3521a8f1b9769198efa4467 | f0591201f9e05a43ae063ec0f3f4b4915e2e4a59 | /project-sysmgr-api/src/main/java/com/spirit/project/sysmgr/api/service/ServiceModuleService.java | 50c4d70e8e4518d33dbd4412bcd70c330202aa00 | [] | no_license | dante7qx/microservice-spirit | d7867237eb499bc4c5b83ad12650aaf658ea72f4 | e6a2cd52ac44c12ea6d983430a801a3db43c0e8f | refs/heads/master | 2021-01-22T22:20:39.295929 | 2017-08-08T02:03:56 | 2017-08-08T02:03:56 | 85,531,358 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 563 | java | package com.spirit.project.sysmgr.api.service;
import java.util.List;
import com.spirit.project.common.api.exception.SpiritAPIServiceException;
import com.spirit.project.common.api.template.SpiritAbstractService;
import com.spirit.project.sysmgr.api.dto.req.ServiceModuleReqDTO;
import com.spirit.project.sysmgr.api.dto.resp.ServiceModuleRespDTO;
public interface ServiceModuleService extends SpiritAbstractService<ServiceModuleReqDTO, ServiceModuleRespDTO> {
public List<ServiceModuleRespDTO> findServiceModuleResps() throws SpiritAPIServiceException;
}
| [
"sunchao.0129@163.com"
] | sunchao.0129@163.com |
877d7232975541026b536fdeb749dd1a889ed401 | 551569861431b41e2b3455b268bcd585487c0036 | /database/src/main/java/org/seasar/cms/database/identity/impl/PostgreIdentity.java | 737581077b3d6edc28fe8f4600c8de30c42d9439 | [] | no_license | seasarorg/test-cms-1 | dc5066e1a4311036b2ec2480bd2cf183e6d40970 | f5431cef37cb8b484e4e71c5a582f7f66ddce960 | refs/heads/master | 2021-01-21T12:03:11.890874 | 2013-10-09T03:58:55 | 2013-10-09T03:58:55 | 13,432,663 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 586 | java | package org.seasar.cms.database.identity.impl;
/**
* <p>
* <b>同期化:</b> このクラスはスレッドセーフです。
* </p>
*
* @author YOKOTA Takehiko
*/
public class PostgreIdentity extends AbstractIdentity {
public String getDatabaseProductId() {
return "postgre";
}
public boolean isMatched(String productName, String productVersion) {
// XXX 実装しよう。
return false;
}
public String toNumericExpression(String expr) {
return "(to_number(" + expr + ",'9999999999')";
}
}
| [
"skirnir@gmail.com"
] | skirnir@gmail.com |
05a05327eabc5edd5013d914a0adbf0f0644b97e | 446a56b68c88df8057e85f424dbac90896f05602 | /core/cas-server-core-services-registry/src/test/java/org/apereo/cas/services/resource/DefaultRegisteredServiceResourceNamingStrategyTests.java | 28d844ca5a90c7d7cc6ffcb1ac9c9d814a06fee7 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | apereo/cas | c29deb0224c52997cbfcae0073a4eb65ebf41205 | 5dc06b010aa7fd1b854aa1ae683d1ab284c09367 | refs/heads/master | 2023-09-01T06:46:11.062065 | 2023-09-01T01:17:22 | 2023-09-01T01:17:22 | 2,352,744 | 9,879 | 3,935 | Apache-2.0 | 2023-09-14T14:06:17 | 2011-09-09T01:36:42 | Java | UTF-8 | Java | false | false | 1,545 | java | package org.apereo.cas.services.resource;
import org.apereo.cas.services.RegisteredService;
import lombok.val;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import java.util.regex.Pattern;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;
/**
* This is {@link DefaultRegisteredServiceResourceNamingStrategyTests}.
*
* @author Misagh Moayyed
* @since 6.2.0
*/
@Tag("RegisteredService")
class DefaultRegisteredServiceResourceNamingStrategyTests {
private static void verifyFileNamePattern(final Pattern pattern, final String name) {
val matcher = pattern.matcher(name);
assertTrue(matcher.find());
assertNotNull(matcher.group(1));
assertNotNull(matcher.group(2));
}
@Test
void verifyOperation() {
val service = mock(RegisteredService.class);
when(service.getId()).thenReturn(1000L);
when(service.getName()).thenReturn("Test");
val strategy = new DefaultRegisteredServiceResourceNamingStrategy();
val pattern = strategy.buildNamingPattern("json", "xml", "xyz");
assertNotNull(pattern);
val result = strategy.build(service, "json");
assertNotNull(result);
assertEquals("Test-1000.json", result);
verifyFileNamePattern(pattern, "Test-1000.json");
verifyFileNamePattern(pattern, "Test-1000.json");
verifyFileNamePattern(pattern, "Test-Example-1000.json");
verifyFileNamePattern(pattern, "Multiple-Test-Example-1.xml");
}
}
| [
"mm1844@gmail.com"
] | mm1844@gmail.com |
2cc191ad8bb8c00ea56af1e7cb3fd87309327c13 | f20af063f99487a25b7c70134378c1b3201964bf | /appengine/src/main/java/com/dereekb/gae/client/api/service/response/error/impl/ClientResponseErrorInfoImpl.java | 77af6a96d7e9ee56280597f1095cf98f3a6a4aa8 | [] | no_license | dereekb/appengine | d45ad5c81c77cf3fcca57af1aac91bc73106ccbb | d0869fca8925193d5a9adafd267987b3edbf2048 | refs/heads/master | 2022-12-19T22:59:13.980905 | 2020-01-26T20:10:15 | 2020-01-26T20:10:15 | 165,971,613 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,128 | java | package com.dereekb.gae.client.api.service.response.error.impl;
import com.dereekb.gae.client.api.service.response.error.ClientResponseErrorInfo;
import com.dereekb.gae.utilities.web.error.impl.ErrorInfoImpl;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.JsonNode;
/**
* {@link ClientResponseErrorInfo} implementation.
*
* @author dereekb
*
*/
@JsonInclude(Include.NON_EMPTY)
@JsonIgnoreProperties(ignoreUnknown = true)
public class ClientResponseErrorInfoImpl extends ErrorInfoImpl
implements ClientResponseErrorInfo {
private JsonNode errorData;
@Override
public JsonNode getErrorData() {
return this.errorData;
}
public void setErrorData(JsonNode errorData) {
this.errorData = errorData;
}
@Override
public String toString() {
return "ClientResponseErrorInfoImpl [errorData=" + this.errorData + ", getCode()=" + this.getCode()
+ ", getTitle()=" + this.getTitle() + ", getDetail()=" + this.getDetail() + "]";
}
} | [
"dereekb@gmail.com"
] | dereekb@gmail.com |
deb6f3863a47a219dc1758a53db2fb1e9b907817 | ca115e90fea786d3ccf87cda3cf9fcafaf0c709a | /cascading-hadoop/src/main/shared/cascading/tap/hadoop/Dfs.java | 3baa0c14de71e0723beea373067066dcd17a42f6 | [
"Apache-2.0"
] | permissive | tdyas/cascading | b82d8eebbbac2f071de6441de41ae872b7ef4b0b | 05720bf78c05d80606f0f81c3e68cc37139b8bda | refs/heads/wip-3.0 | 2021-01-18T00:00:39.486664 | 2015-02-25T05:34:29 | 2015-02-25T05:34:29 | 31,339,199 | 0 | 0 | null | 2015-02-25T22:29:51 | 2015-02-25T22:29:51 | null | UTF-8 | Java | false | false | 3,762 | java | /*
* Copyright (c) 2007-2014 Concurrent, Inc. All Rights Reserved.
*
* Project and contact information: http://www.cascading.org/
*
* This file is part of the Cascading 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 cascading.tap.hadoop;
import java.beans.ConstructorProperties;
import java.io.IOException;
import java.net.URI;
import cascading.scheme.Scheme;
import cascading.tap.SinkMode;
import cascading.tap.TapException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
/**
* Class Dfs is a {@link cascading.tap.Tap} class that provides access to the Hadoop Distributed File System.
* <p/>
* Use the {@link URI} constructors to specify a different HDFS cluster than the default.
*/
public class Dfs extends Hfs
{
/**
* Constructor Dfs creates a new Dfs instance.
*
* @param scheme of type Scheme
* @param uri of type URI
*/
@ConstructorProperties( {"scheme", "uri"} )
public Dfs( Scheme scheme, URI uri )
{
super( scheme, uri.getPath() );
init( uri );
}
/**
* Constructor Dfs creates a new Dfs instance.
*
* @param scheme of type Scheme
* @param uri of type URI
* @param sinkMode of type SinkMode
*/
@ConstructorProperties( {"scheme", "uri", "sinkMode"} )
public Dfs( Scheme scheme, URI uri, SinkMode sinkMode )
{
super( scheme, uri.getPath(), sinkMode );
init( uri );
}
/**
* Constructor Dfs creates a new Dfs instance.
*
* @param scheme of type Scheme
* @param stringPath of type String
*/
@ConstructorProperties( {"scheme", "stringPath"} )
public Dfs( Scheme scheme, String stringPath )
{
super( scheme, stringPath );
}
/**
* Constructor Dfs creates a new Dfs instance.
*
* @param scheme of type Scheme
* @param stringPath of type String
* @param sinkMode of type SinkMode
*/
@ConstructorProperties( {"scheme", "stringPath", "sinkMode"} )
public Dfs( Scheme scheme, String stringPath, SinkMode sinkMode )
{
super( scheme, stringPath, sinkMode );
}
private void init( URI uri )
{
if( !uri.getScheme().equalsIgnoreCase( "hdfs" ) )
throw new IllegalArgumentException( "uri must use the hdfs scheme" );
setUriScheme( URI.create( uri.getScheme() + "://" + uri.getAuthority() ) );
}
protected void setStringPath( String stringPath )
{
if( stringPath.matches( ".*://.*" ) && !stringPath.startsWith( "hdfs://" ) )
throw new IllegalArgumentException( "uri must use the hdfs scheme" );
super.setStringPath( stringPath );
}
@Override
protected FileSystem getDefaultFileSystem( Configuration configuration )
{
String name = configuration.get( "fs.default.name", "hdfs://localhost:5001/" );
if( name.equals( "local" ) || name.matches( ".*://.*" ) && !name.startsWith( "hdfs://" ) )
name = "hdfs://localhost:5001/";
else if( name.indexOf( '/' ) == -1 )
name = "hdfs://" + name;
try
{
return FileSystem.get( URI.create( name ), configuration );
}
catch( IOException exception )
{
throw new TapException( "unable to get handle to get filesystem for: " + name, exception );
}
}
}
| [
"chris@wensel.net"
] | chris@wensel.net |
6a37d7033ef1776d4b399e0a8445d17169fbfd4e | 208af5d2219a18e2249178591e30f59dc9ade3d6 | /src/test/java/com/cosium/vet/gerrit/DefaultPatchSetCommitMessageFactoryTest.java | 42a655b5076fe990bd0b050d08818ccf53c9bb52 | [
"MIT"
] | permissive | morristech/vet | ccc646aa3e373c9c131613d4a8633594a0a67091 | 2aa297004b5f882195ba76e1612c3f9605f12d43 | refs/heads/master | 2020-03-22T09:05:29.984791 | 2018-06-30T11:05:28 | 2018-06-30T11:05:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,788 | java | package com.cosium.vet.gerrit;
import com.cosium.vet.VetVersion;
import com.cosium.vet.git.CommitMessage;
import com.cosium.vet.git.GitClient;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
/**
* Created on 08/05/18.
*
* @author Reda.Housni-Alaoui
*/
public class DefaultPatchSetCommitMessageFactoryTest {
private static final String HELLO_WORLD = "Hello World";
private static final String HELLO_WORLD_MULTI_LINES = "Hello\n\nWorld\n!";
private GitClient git;
private DefaultPatchSetCommitMessageFactory tested;
@Before
public void before() {
git = mock(GitClient.class);
tested = new DefaultPatchSetCommitMessageFactory(git);
}
@Test
public void
GIVEN_no_existing_changeid_WHEN_build_commitmessage_THEN_the_change_id_is_part_of_the_message() {
when(git.getLastCommitMessage()).thenReturn(CommitMessage.of(HELLO_WORLD));
CommitMessage commitMessage = tested.build(null);
String rawMessage = commitMessage.toString();
Pattern pattern = Pattern.compile(Pattern.compile("Change-Id: ") + "I(.*)");
Matcher matcher = pattern.matcher(rawMessage);
assertThat(matcher.find()).isTrue();
assertThat(matcher.group(1)).isNotBlank();
}
@Test
public void
WHEN_last_commit_message_hello_world_THEN_commit_message_should_contain_hello_world() {
when(git.getLastCommitMessage()).thenReturn(CommitMessage.of(HELLO_WORLD));
CommitMessage commitMessage = tested.build(null);
assertThat(commitMessage.toString()).contains(HELLO_WORLD);
}
@Test
public void GIVEN_existing_change_WHEN_existing_message_contains_blank_lines_THEN_the_new_message_should_preserve_them() {
when(git.getLastCommitMessage()).thenReturn(CommitMessage.of(HELLO_WORLD_MULTI_LINES));
CommitMessage commitMessage = tested.build(null);
assertThat(commitMessage.toString()).contains(HELLO_WORLD_MULTI_LINES);
}
@Test
public void WHEN_changeid_I1234_THEN_commit_message_should_end_with_I1234() {
Patch patch = mock(Patch.class);
when(patch.getCommitMessage()).thenReturn(CommitMessage.of(HELLO_WORLD + "\nChange-Id: I1234"));
CommitMessage commitMessage = tested.build(patch);
assertThat(commitMessage.toString()).endsWith("\nChange-Id: I1234");
}
@Test
public void WHEN_existing_change_THEN_commit_message_contains_VET_VERSION() {
when(git.getLastCommitMessage()).thenReturn(CommitMessage.of(HELLO_WORLD));
CommitMessage commitMessage = tested.build(null);
assertThat(commitMessage.toString()).contains("\nVet-Version: " + VetVersion.getValue());
}
}
| [
"reda.housnialaoui@gmail.com"
] | reda.housnialaoui@gmail.com |
7805df93b6db942f1bdbb7a70ff37107ad1da0f2 | 71071f98d05549b67d4d6741e8202afdf6c87d45 | /files/Spring_Data_Redis/DATAREDIS-314/src/main/java/org/springframework/data/redis/support/collections/DefaultRedisZSet.java | c900ecb78de680b11ac3522c8d072c4259df72d2 | [] | no_license | Sun940201/SpringSpider | 0adcdff1ccfe9ce37ba27e31b22ca438f08937ad | ff2fc7cea41e8707389cb62eae33439ba033282d | refs/heads/master | 2022-12-22T09:01:54.550976 | 2018-06-01T06:31:03 | 2018-06-01T06:31:03 | 128,649,779 | 1 | 0 | null | 2022-12-16T00:51:27 | 2018-04-08T14:30:30 | Java | UTF-8 | Java | false | false | 6,720 | java | /*
* Copyright 2011-2013 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.data.redis.support.collections;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Set;
import org.springframework.data.redis.connection.DataType;
import org.springframework.data.redis.core.BoundZSetOperations;
import org.springframework.data.redis.core.RedisOperations;
import org.springframework.data.redis.core.ZSetOperations.TypedTuple;
/**
* Default implementation for {@link RedisZSet}. Note that the collection support works only with normal,
* non-pipeline/multi-exec connections as it requires a reply to be sent right away.
*
* @author Costin Leau
*/
public class DefaultRedisZSet<E> extends AbstractRedisCollection<E> implements RedisZSet<E> {
private final BoundZSetOperations<String, E> boundZSetOps;
private double defaultScore = 1;
private class DefaultRedisSortedSetIterator extends RedisIterator<E> {
public DefaultRedisSortedSetIterator(Iterator<E> delegate) {
super(delegate);
}
protected void removeFromRedisStorage(E item) {
DefaultRedisZSet.this.remove(item);
}
}
/**
* Constructs a new <code>DefaultRedisZSet</code> instance with a default score of '1'.
*
* @param key
* @param operations
*/
public DefaultRedisZSet(String key, RedisOperations<String, E> operations) {
this(key, operations, 1);
}
/**
* Constructs a new <code>DefaultRedisSortedSet</code> instance.
*
* @param key
* @param operations
* @param defaultScore
*/
public DefaultRedisZSet(String key, RedisOperations<String, E> operations, double defaultScore) {
super(key, operations);
boundZSetOps = operations.boundZSetOps(key);
this.defaultScore = defaultScore;
}
/**
* Constructs a new <code>DefaultRedisZSet</code> instance with a default score of '1'.
*
* @param boundOps
*/
public DefaultRedisZSet(BoundZSetOperations<String, E> boundOps) {
this(boundOps, 1);
}
/**
* Constructs a new <code>DefaultRedisZSet</code> instance.
*
* @param boundOps
* @param defaultScore
*/
public DefaultRedisZSet(BoundZSetOperations<String, E> boundOps, double defaultScore) {
super(boundOps.getKey(), boundOps.getOperations());
this.boundZSetOps = boundOps;
this.defaultScore = defaultScore;
}
public RedisZSet<E> intersectAndStore(RedisZSet<?> set, String destKey) {
boundZSetOps.intersectAndStore(set.getKey(), destKey);
return new DefaultRedisZSet<E>(boundZSetOps.getOperations().boundZSetOps(destKey), getDefaultScore());
}
public RedisZSet<E> intersectAndStore(Collection<? extends RedisZSet<?>> sets, String destKey) {
boundZSetOps.intersectAndStore(CollectionUtils.extractKeys(sets), destKey);
return new DefaultRedisZSet<E>(boundZSetOps.getOperations().boundZSetOps(destKey), getDefaultScore());
}
public Set<E> range(long start, long end) {
return boundZSetOps.range(start, end);
}
public Set<E> reverseRange(long start, long end) {
return boundZSetOps.reverseRange(start, end);
}
public Set<E> rangeByScore(double min, double max) {
return boundZSetOps.rangeByScore(min, max);
}
public Set<E> reverseRangeByScore(double min, double max) {
return boundZSetOps.reverseRangeByScore(min, max);
}
public Set<TypedTuple<E>> rangeByScoreWithScores(double min, double max) {
return boundZSetOps.rangeByScoreWithScores(min, max);
}
public Set<TypedTuple<E>> rangeWithScores(long start, long end) {
return boundZSetOps.rangeWithScores(start, end);
}
public Set<TypedTuple<E>> reverseRangeByScoreWithScores(double min, double max) {
return boundZSetOps.reverseRangeByScoreWithScores(min, max);
}
public Set<TypedTuple<E>> reverseRangeWithScores(long start, long end) {
return boundZSetOps.reverseRangeWithScores(start, end);
}
public RedisZSet<E> remove(long start, long end) {
boundZSetOps.removeRange(start, end);
return this;
}
public RedisZSet<E> removeByScore(double min, double max) {
boundZSetOps.removeRangeByScore(min, max);
return this;
}
public RedisZSet<E> unionAndStore(RedisZSet<?> set, String destKey) {
boundZSetOps.unionAndStore(set.getKey(), destKey);
return new DefaultRedisZSet<E>(boundZSetOps.getOperations().boundZSetOps(destKey), getDefaultScore());
}
public RedisZSet<E> unionAndStore(Collection<? extends RedisZSet<?>> sets, String destKey) {
boundZSetOps.unionAndStore(CollectionUtils.extractKeys(sets), destKey);
return new DefaultRedisZSet<E>(boundZSetOps.getOperations().boundZSetOps(destKey), getDefaultScore());
}
public boolean add(E e) {
Boolean result = add(e, getDefaultScore());
checkResult(result);
return result;
}
public boolean add(E e, double score) {
Boolean result = boundZSetOps.add(e, score);
checkResult(result);
return result;
}
public void clear() {
boundZSetOps.removeRange(0, -1);
}
public boolean contains(Object o) {
return (boundZSetOps.rank(o) != null);
}
public Iterator<E> iterator() {
Set<E> members = boundZSetOps.range(0, -1);
checkResult(members);
return new DefaultRedisSortedSetIterator(members.iterator());
}
public boolean remove(Object o) {
Long result = boundZSetOps.remove(o);
checkResult(result);
return result == 1;
}
public int size() {
Long result = boundZSetOps.size();
checkResult(result);
return result.intValue();
}
public Double getDefaultScore() {
return defaultScore;
}
public E first() {
Set<E> members = boundZSetOps.range(0, 0);
checkResult(members);
Iterator<E> iterator = members.iterator();
if (iterator.hasNext())
return iterator.next();
throw new NoSuchElementException();
}
public E last() {
Set<E> members = boundZSetOps.reverseRange(0, 0);
checkResult(members);
Iterator<E> iterator = members.iterator();
if (iterator.hasNext())
return iterator.next();
throw new NoSuchElementException();
}
public Long rank(Object o) {
return boundZSetOps.rank(o);
}
public Long reverseRank(Object o) {
return boundZSetOps.reverseRank(o);
}
public Double score(Object o) {
return boundZSetOps.score(o);
}
public DataType getType() {
return DataType.ZSET;
}
} | [
"527474541@qq.com"
] | 527474541@qq.com |
de2ac57aec0ba861a0edbfcc8494a4d25e566c2d | 1fadacc8af4519f825bb0ed99a61091572b8a3ed | /jdk8-features/src/com/msrm/jdk8/feature/ImprovedMapApp.java | 41edec74f50790061cb1887ff6afc0c9f1c04e25 | [] | no_license | srirambtechit/java-technology | aeb60240659e2cf6d932c8769dfc63bae9562912 | a6ad2530d8869b90f44dd6248df4aab0927d619d | refs/heads/master | 2020-12-29T02:37:30.081557 | 2016-12-24T16:37:08 | 2016-12-24T16:37:08 | 44,532,533 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,500 | java | package com.msrm.jdk8.feature;
import java.util.HashMap;
import java.util.Map;
public class ImprovedMapApp {
public static void main(String[] args) {
Map<String, String> oldMap = new HashMap<>();
oldMap.put("1", "one");
oldMap.put("2", "two");
oldMap.put("3", "three");
for (int i = 0; i < 10; i++) {
if (!oldMap.containsKey(String.valueOf(i)))
oldMap.put(String.valueOf(i), "val" + i);
}
System.out.println(oldMap);
System.out.println();
// 1. no need of checking key presents
Map<String, String> newMap = new HashMap<>();
newMap.put("1", "one");
newMap.put("2", "two");
newMap.put("3", "three");
for (int i = 0; i < 10; i++) {
newMap.putIfAbsent(String.valueOf(i), "val" + i);
}
System.out.println(newMap);
System.out.println();
// 2. compute logic on map based on presents of value
newMap.computeIfPresent("1", (k, v) -> v.concat(k));
// 3. compute logic on map if value not there
newMap.computeIfAbsent("10", v -> "ten");
// 4. always get value though value not there in map
// key "11" not in map
String foundValue = newMap.getOrDefault("11", "negative");
String defaultValue = newMap.getOrDefault("10", "negative");
System.out.println(foundValue);
System.out.println(defaultValue);
System.out.println();
// 5. merging values in map
newMap.merge("10", "_value", String::concat); // ten_value
// 4. printing map is so easy in lambda style
newMap.forEach((k, v) -> System.out.println(k + "=" + v));
}
}
| [
"srirambtecit@gmail.com"
] | srirambtecit@gmail.com |
9c2900172e00809442d7d0229c5eaf80a2d55dc2 | 889877dd2129c9717bafc77a84408f287fbbdbc3 | /src/main/java/bjl/core/enums/BankSegment.java | 776daaff655bffecb4b21eb9e4c24e5f8afa2b94 | [] | no_license | zhouxhhn/voto | 3cf1405045e81230398cb273cfeaf9ee95b86ac5 | 66fc84c1b6b536be51b84895aa2be316618d3d49 | refs/heads/master | 2020-03-26T23:08:11.746765 | 2018-08-21T05:54:02 | 2018-08-21T05:54:02 | 145,513,289 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,217 | java | package bjl.core.enums;
import org.apache.commons.lang3.StringUtils;
/**
* 银行代号枚举
* Created by zhangjin on 2017/9/7.
*/
public enum BankSegment {
ICBC("工商银行", 1001),
ABC("农业银行", 1002),
BOC("中国银行", 1003),
CCB("建设银行", 1004),
BCM("交通银行", 1005),
PSBC("邮政储蓄银行",1006),
CNCB("中信银行", 1007),
CEB("光大银行", 1008),
HXB("华夏银行", 1009),
CMSB("民生银行", 1010),
PAB("平安银行", 1011),
CMBC("招商银行", 1012),
CIB("兴业银行", 1013),
SPDB("浦发银行", 1014),
GDB("广发银行", 1017);
private String name;
private int value;
public String getName() {
return name;
}
public int getValue() {
return value;
}
BankSegment(String name, int value) {
this.name = name;
this.value = value;
}
public static String getByValue(Integer value){
for(BankSegment bankSegment : BankSegment.values()){
if(value == bankSegment.value){
return bankSegment.name();
}
}
return null;
}
}
| [
"joey.zhou@siyue.cn"
] | joey.zhou@siyue.cn |
d8ea868e54d41cc6fa213acb12d6f5f0b2508bf3 | 7941d6ed6d1f87954de73876c6d70b2b4b9e8a8c | /src/PART_I_Core/Day16_Pbjects_and_Classes/copy/Dog.java | 9db30cfa64ea0efbf4c6389be72a02757929d5c7 | [] | no_license | Isso-Chan/Java-b13 | d91524f41788882b85b8fa7ba69b770cd0042a98 | a8d3697c7b8d77aba197077880b9657190da34a0 | refs/heads/master | 2022-11-14T05:47:48.062951 | 2020-07-02T11:23:43 | 2020-07-02T11:23:43 | 276,617,741 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 452 | java | package PART_I_Core.Day16_Pbjects_and_Classes.copy;
public class Dog {
// class is blueprint and has common properties and methods
String breed;
int age;
String color;
String name;
char veccination;
public void barking() {
System.out.println(name+ " is barking");
}
public void hungry() {
System.out.println(name+" is hungry");
}
public void speeping() {
System.out.println(name+" is sleeping");
}
}
| [
"ismailozcan73@gmail.com"
] | ismailozcan73@gmail.com |
c500a5fcae025d5da3735dba78006840d0f12e70 | 6e423ba9f9a28796344c611350678fba2cb93baf | /im-common/src/main/java/com/huzhihui/im/common/dto/msg/PlatformImMessage.java | fcdacad89929e68a9cee1c69843eae522f144f03 | [] | no_license | zhihuihu/IM | 1402040d866b2ff5f4332e22e7106805e4a221fd | 6fc8e6e9a0a9454495e16420a6bc5e69ee8a3932 | refs/heads/master | 2023-03-29T14:51:11.608020 | 2021-04-03T11:07:33 | 2021-04-03T11:07:33 | 351,090,120 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 651 | java | /**
* zhihuihu.github.io.
* Copyright (c) 2016-2019 All Rights Reserved.
*/
package com.huzhihui.im.common.dto.msg;
/**
* 平台通知消息
* @author huzhi
* @version $ v 0.1 2021/3/24 21:43 huzhi Exp $$
*/
public class PlatformImMessage extends BaseImMessage {
/** 接收者 */
private String toUserId;
/** 数据 */
private String data;
public String getToUserId() {
return toUserId;
}
public void setToUserId(String toUserId) {
this.toUserId = toUserId;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}
| [
"huzhihui_c@qq.com"
] | huzhihui_c@qq.com |
b39a25a6bf95bd38dbc8540d28130f92b0f54369 | 9efdb7d314e5dc90a2568ce1d613c0ff02ccfc4b | /app/src/main/java/com/yusong/community/ui/im/parse/UserProfileManager.java | 2290e87d857d66a48e2e4b3fdb789ae9b3e543ec | [] | no_license | feisher/community_huangshan2 | 1cdcb55e2b9c6394e7f0ac043b2d3c02fed04408 | aa3fc8103a0e6be8de89d0c7d81d2869724c4443 | refs/heads/master | 2021-07-14T18:15:52.164494 | 2017-10-19T03:25:01 | 2017-10-19T03:25:01 | 106,365,007 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,874 | java | package com.yusong.community.ui.im.parse;
import android.content.Context;
import com.hyphenate.EMValueCallBack;
import com.hyphenate.chat.EMClient;
import com.hyphenate.easeui.domain.EaseUser;
import com.yusong.community.ui.im.IMHelper;
import com.yusong.community.ui.im.IMHelper.DataSyncListener;
import com.yusong.community.ui.im.utils.PreferenceManager;
import java.util.ArrayList;
import java.util.List;
public class UserProfileManager {
/**
* application context
*/
protected Context appContext = null;
/**
* init flag: test if the sdk has been inited before, we don't need to init
* again
*/
private boolean sdkInited = false;
/**
* HuanXin sync contact nick and avatar listener
*/
private List<IMHelper.DataSyncListener> syncContactInfosListeners;
private boolean isSyncingContactInfosWithServer = false;
private EaseUser currentUser;
public UserProfileManager() {
}
public synchronized boolean init(Context context) {
if (sdkInited) {
return true;
}
ParseManager.getInstance().onInit(context);
syncContactInfosListeners = new ArrayList<DataSyncListener>();
sdkInited = true;
return true;
}
public void addSyncContactInfoListener(DataSyncListener listener) {
if (listener == null) {
return;
}
if (!syncContactInfosListeners.contains(listener)) {
syncContactInfosListeners.add(listener);
}
}
public void removeSyncContactInfoListener(DataSyncListener listener) {
if (listener == null) {
return;
}
if (syncContactInfosListeners.contains(listener)) {
syncContactInfosListeners.remove(listener);
}
}
public void asyncFetchContactInfosFromServer(List<String> usernames, final EMValueCallBack<List<EaseUser>> callback) {
if (isSyncingContactInfosWithServer) {
return;
}
isSyncingContactInfosWithServer = true;
// ParseManager.getInstance().getContactInfos(usernames, new EMValueCallBack<List<EaseUser>>() {
//
// @Override
// public void onSuccess(List<EaseUser> value) {
// isSyncingContactInfosWithServer = false;
// // in case that logout already before server returns,we should
// // return immediately
// if (!IMHelper.getInstance().isLoggedIn()) {
// return;
// }
// if (callback != null) {
// callback.onSuccess(value);
// }
// }
//
// @Override
// public void onError(int error, String errorMsg) {
// isSyncingContactInfosWithServer = false;
// if (callback != null) {
// callback.onError(error, errorMsg);
// }
// }
//
// });
}
public void notifyContactInfosSyncListener(boolean success) {
for (DataSyncListener listener : syncContactInfosListeners) {
listener.onSyncComplete(success);
}
}
public boolean isSyncingContactInfoWithServer() {
return isSyncingContactInfosWithServer;
}
public synchronized void reset() {
isSyncingContactInfosWithServer = false;
currentUser = null;
PreferenceManager.getInstance().removeCurrentUserInfo();
}
public synchronized EaseUser getCurrentUserInfo() {
if (currentUser == null) {
String username = EMClient.getInstance().getCurrentUser();
currentUser = new EaseUser(username);
String nick = getCurrentUserNick();
currentUser.setNick((nick != null) ? nick : username);
currentUser.setAvatar(getCurrentUserAvatar());
}
return currentUser;
}
public boolean updateCurrentUserNickName(final String nickname) {
boolean isSuccess = ParseManager.getInstance().updateParseNickName(nickname);
if (isSuccess) {
setCurrentUserNick(nickname);
}
return isSuccess;
}
public String uploadUserAvatar(byte[] data) {
String avatarUrl = ParseManager.getInstance().uploadParseAvatar(data);
if (avatarUrl != null) {
setCurrentUserAvatar(avatarUrl);
}
return avatarUrl;
}
//
// public void asyncGetCurrentUserInfo() {
// ParseManager.getInstance().asyncGetCurrentUserInfo(new EMValueCallBack<EaseUser>() {
//
// @Override
// public void onSuccess(EaseUser value) {
// if(value != null){
// setCurrentUserNick(value.getNick());
// setCurrentUserAvatar(value.getAvatar());
// }
// }
//
// @Override
// public void onError(int error, String errorMsg) {
//
// }
// });
//
// }
public void asyncGetUserInfo(final String username,final EMValueCallBack<EaseUser> callback){
ParseManager.getInstance().asyncGetUserInfo(username, callback);
}
private void setCurrentUserNick(String nickname) {
getCurrentUserInfo().setNick(nickname);
PreferenceManager.getInstance().setCurrentUserNick(nickname);
}
private void setCurrentUserAvatar(String avatar) {
getCurrentUserInfo().setAvatar(avatar);
PreferenceManager.getInstance().setCurrentUserAvatar(avatar);
}
private String getCurrentUserNick() {
return PreferenceManager.getInstance().getCurrentUserNick();
}
private String getCurrentUserAvatar() {
return PreferenceManager.getInstance().getCurrentUserAvatar();
}
}
| [
"458079442@qq.com"
] | 458079442@qq.com |
19534c505731b7b576c42867eace316490891d3e | f123c92704e5aa15dfd2e3ab0ecb3c7dfb8b87f2 | /LOTR/src/main/java/lotr/common/world/feature/LOTRWorldGenSimpleTrees.java | 8348f74f75e6ae79dc66aa8b6a964dfe948d78de | [] | no_license | Myrninvollo/LOTR-Minecraft-Mod | 2dcaabb659bfc10b41332f975209f2f8cd7e3f55 | 97843fd05ae9fc7a7f61021fbe288db0f0b4298b | refs/heads/master | 2020-12-30T22:58:22.274461 | 2014-10-12T19:06:55 | 2014-10-12T19:06:55 | 24,939,635 | 1 | 1 | null | 2014-10-12T19:06:55 | 2014-10-08T12:30:52 | null | UTF-8 | Java | false | false | 6,696 | java | package lotr.common.world.feature;
import java.util.Random;
import lotr.common.LOTRMod;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
public class LOTRWorldGenSimpleTrees extends WorldGenAbstractTree
{
private int minHeight;
private int maxHeight;
private Block woodID;
private int woodMeta;
private Block leafID;
private int leafMeta;
private int extraTrunkWidth;
private LOTRWorldGenSimpleTrees(boolean flag, int i, int j, Block k, int l, Block i1, int j1)
{
super(flag);
minHeight = i;
maxHeight = j;
woodID = k;
woodMeta = l;
leafID = i1;
leafMeta = j1;
}
public LOTRWorldGenSimpleTrees setTrunkWidth(int i)
{
extraTrunkWidth = i - 1;
return this;
}
public static LOTRWorldGenSimpleTrees newMallorn(boolean flag)
{
return new LOTRWorldGenSimpleTrees(flag, 9, 15, LOTRMod.wood, 1, LOTRMod.leaves, 1);
}
public static LOTRWorldGenSimpleTrees newApple(boolean flag)
{
return new LOTRWorldGenSimpleTrees(flag, 4, 7, LOTRMod.fruitWood, 0, LOTRMod.fruitLeaves, 0);
}
public static LOTRWorldGenSimpleTrees newPear(boolean flag)
{
return new LOTRWorldGenSimpleTrees(flag, 4, 5, LOTRMod.fruitWood, 1, LOTRMod.fruitLeaves, 1);
}
public static LOTRWorldGenSimpleTrees newCherry(boolean flag)
{
return new LOTRWorldGenSimpleTrees(flag, 4, 8, LOTRMod.fruitWood, 2, LOTRMod.fruitLeaves, 2);
}
public static LOTRWorldGenSimpleTrees newMango(boolean flag)
{
return new LOTRWorldGenSimpleTrees(flag, 4, 7, LOTRMod.fruitWood, 3, LOTRMod.fruitLeaves, 3);
}
public static LOTRWorldGenSimpleTrees newLebethron(boolean flag)
{
return new LOTRWorldGenSimpleTrees(flag, 5, 9, LOTRMod.wood2, 0, LOTRMod.leaves2, 0);
}
public static LOTRWorldGenSimpleTrees newLebethronLarge(boolean flag)
{
return new LOTRWorldGenSimpleTrees(flag, 11, 18, LOTRMod.wood2, 0, LOTRMod.leaves2, 0).setTrunkWidth(2);
}
public static LOTRWorldGenSimpleTrees newBeech(boolean flag)
{
return new LOTRWorldGenSimpleTrees(flag, 5, 9, LOTRMod.wood2, 1, LOTRMod.leaves2, 1);
}
public static LOTRWorldGenSimpleTrees newMaple(boolean flag)
{
return new LOTRWorldGenSimpleTrees(flag, 4, 8, LOTRMod.wood3, 0, LOTRMod.leaves3, 0);
}
public static LOTRWorldGenSimpleTrees newChestnut(boolean flag)
{
return new LOTRWorldGenSimpleTrees(flag, 5, 7, LOTRMod.wood4, 0, LOTRMod.leaves4, 0);
}
@Override
public boolean generate(World world, Random random, int i, int j, int k)
{
int height = MathHelper.getRandomIntegerInRange(random, minHeight, maxHeight);
boolean flag = true;
if (j >= 1 && j + height + 1 <= 256)
{
for (int j1 = j; j1 <= j + 1 + height; j1++)
{
int range = 1;
if (j1 == j)
{
range = 0;
}
if (j1 >= j + 1 + height - 2)
{
range = 2;
}
for (int i1 = i - range; i1 <= i + range + extraTrunkWidth && flag; i1++)
{
for (int k1 = k - range; k1 <= k + range + extraTrunkWidth && flag; k1++)
{
if (j1 >= 0 && j1 < 256)
{
Block block = world.getBlock(i1, j1, k1);
if (block.getMaterial() != Material.air && !block.isLeaves(world, i1, j1, k1) && block != Blocks.grass && block != Blocks.dirt && !block.isWood(world, i1, j1, k1))
{
flag = false;
}
}
else
{
flag = false;
}
}
}
}
if (!flag)
{
return false;
}
else
{
boolean flag1 = true;
for (int i1 = i; i1 <= i + extraTrunkWidth && flag1; i1++)
{
for (int k1 = k; k1 <= k + extraTrunkWidth && flag1; k1++)
{
Block block = world.getBlock(i1, j - 1, k1);
flag1 = ((block == Blocks.grass || block == Blocks.dirt) && j < 256 - height - 1);
}
}
if (flag1)
{
for (int i1 = i; i1 <= i + extraTrunkWidth; i1++)
{
for (int k1 = k; k1 <= k + extraTrunkWidth; k1++)
{
setBlockAndNotifyAdequately(world, i1, j - 1, k1, Blocks.dirt, 0);
}
}
byte leafStart = 3;
byte leafRangeMin = 0;
for (int j1 = j - leafStart + height; j1 <= j + height; j1++)
{
int j2 = j1 - (j + height);
int leafRange = leafRangeMin + 1 - j2 / 2;
for (int i1 = i - leafRange; i1 <= i + leafRange + extraTrunkWidth; i1++)
{
int i2 = i1 - i;
if (i2 > 0)
{
i2 -= extraTrunkWidth;
}
for (int k1 = k - leafRange; k1 <= k + leafRange + extraTrunkWidth; k1++)
{
int k2 = k1 - k;
if (k2 > 0)
{
k2 -= extraTrunkWidth;
}
Block block = world.getBlock(i1, j1, k1);
if ((Math.abs(i2) != leafRange || Math.abs(k2) != leafRange || random.nextInt(2) != 0 && j2 != 0) && block.canBeReplacedByLeaves(world, i1, j1, k1))
{
setBlockAndNotifyAdequately(world, i1, j1, k1, leafID, leafMeta);
}
}
}
}
for (int j1 = 0; j1 < height; j1++)
{
for (int i1 = i; i1 <= i + extraTrunkWidth; i1++)
{
for (int k1 = k; k1 <= k + extraTrunkWidth; k1++)
{
Block block = world.getBlock(i1, j + j1, k1);
if (block.getMaterial() == Material.air || block.isLeaves(world, i1, j + j1, k1))
{
setBlockAndNotifyAdequately(world, i1, j + j1, k1, woodID, woodMeta);
}
}
}
}
return true;
}
else
{
return false;
}
}
}
else
{
return false;
}
}
}
| [
"jakegerzimbke@live.co.uk"
] | jakegerzimbke@live.co.uk |
e02809d87e60adeaaaecaa44b8ad8ac568f15191 | 37992a7083efea148c66381a2e7c988f59de712b | /cppk/app/src/main/java/ru/ppr/cppk/ui/activity/fineListManagement/FineListManagementPresenter.java | c04a814b540f994b0d7efcd358a093e74585be7f | [] | no_license | RVC3/PTK | 5ab897d6abee1f7f7be3ba49c893b97e719085e9 | 1052b2bfa8f565c96a85d5c5928ed6c938a20543 | refs/heads/master | 2022-12-22T22:11:40.231298 | 2020-07-01T09:45:38 | 2020-07-01T09:45:38 | 259,278,530 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,315 | java | package ru.ppr.cppk.ui.activity.fineListManagement;
import android.support.annotation.NonNull;
import com.google.common.primitives.Longs;
import java.util.ArrayList;
import java.util.List;
import ru.ppr.core.ui.mvp.presenter.BaseMvpPresenter;
import ru.ppr.cppk.db.LocalDaoSession;
import ru.ppr.cppk.di.Dagger;
import ru.ppr.cppk.entity.settings.PrivateSettings;
import ru.ppr.cppk.managers.NsiVersionManager;
import ru.ppr.nsi.NsiDaoSession;
import ru.ppr.nsi.entity.Fine;
import ru.ppr.nsi.repository.FineRepository;
/**
* @author Dmitry Nevolin
*/
public class FineListManagementPresenter extends BaseMvpPresenter<FineListManagementView> {
private InteractionListener interactionListener;
private boolean initialized = false;
private LocalDaoSession localDaoSession;
private NsiDaoSession nsiDaoSession;
private PrivateSettings privateSettings;
private NsiVersionManager nsiVersionManager;
private FineRepository fineRepository;
/**
* Список кодов разрешенных штрафов
*/
private List<Long> allowedFineCodeList;
void initialize(@NonNull LocalDaoSession localDaoSession,
@NonNull NsiDaoSession nsiDaoSession,
@NonNull PrivateSettings privateSettings,
@NonNull NsiVersionManager nsiVersionManager,
@NonNull FineRepository fineRepository) {
if (!initialized) {
this.initialized = true;
this.localDaoSession = localDaoSession;
this.nsiDaoSession = nsiDaoSession;
this.privateSettings = privateSettings;
this.nsiVersionManager = nsiVersionManager;
this.allowedFineCodeList = new ArrayList<>();
this.fineRepository = fineRepository;
onInitialize();
}
}
void bindInteractionListener(@NonNull InteractionListener interactionListener) {
this.interactionListener = interactionListener;
}
void onFineChecked(@NonNull Fine fine, boolean isChecked) {
if (isChecked && !allowedFineCodeList.contains(fine.getCode())) {
allowedFineCodeList.add(fine.getCode());
} else if (!isChecked && allowedFineCodeList.contains(fine.getCode())) {
allowedFineCodeList.remove(fine.getCode());
}
privateSettings.setAllowedFineCodes(Longs.toArray(allowedFineCodeList));
Dagger.appComponent().privateSettingsRepository().savePrivateSettings(privateSettings);
}
void onFineListIsEmptyDialogDismiss() {
interactionListener.returnToPreviousScreen();
}
private void onInitialize() {
long[] allowedFineCodes = privateSettings.getAllowedFineCodes();
int nsiVersion = nsiVersionManager.getCurrentNsiVersionId();
List<Fine> fineList = fineRepository.loadAll(nsiVersion);
if (allowedFineCodes != null) {
allowedFineCodeList.addAll(Longs.asList(allowedFineCodes));
}
view.setAllowedFineCodeList(allowedFineCodeList);
view.setFineList(fineList);
view.setFineListIsEmptyDialogVisible(fineList.isEmpty());
}
/**
* Интерфейс обработки событий.
*/
public interface InteractionListener {
void returnToPreviousScreen();
}
}
| [
"kopanevartem@mail.ru"
] | kopanevartem@mail.ru |
dcf1de941c81106d3cc38739a80972b7979a21a4 | d0b2e7a5886252cbbaad9f44599eac7e3576e7a8 | /src/main/java/student_valerija_ionova/lesson_10/level_6/refactoring_methods_mot_more_than_3_strings/BookReaderImpl.java | 15aa942733a6aa685bdb6971a9555e9a4af54181 | [] | no_license | Dmitryyyyo/java_1_tuesday_2020_online | ac1b44822a2aed40a6e12e6909e9b8c699e57d4c | 7e3bba7ead444d0b2bf1b6715289b2fcc4d22c54 | refs/heads/master | 2023-01-02T11:21:40.223345 | 2020-10-21T18:02:55 | 2020-10-21T18:02:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,033 | java | package student_valerija_ionova.lesson_10.level_6.refactoring_methods_mot_more_than_3_strings;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class BookReaderImpl implements BookReader{
private List<Book> bookDatabase;
BookReaderImpl (Book...books){
this.bookDatabase = new ArrayList<>(Arrays.asList(books));
}
public List <Book> getBookDatabase (){
return bookDatabase;
}
public boolean addBook (Book book){
if (!bookDatabase.contains(book) && isValidBook(book)){
bookDatabase.add(book);
return true;
}
return false;
}
public boolean deleteBook (Book book){
if (bookDatabase.contains(book)){
bookDatabase.remove(book);
return true;
}
return false;
}
@Override
public String[] getArrayOfBooks() {
return bookDatabase.stream()
.map(book -> addBookToArray(book))
.toArray(String [] :: new);
}
private String addBookToArray (Book book){
return book.getTitle() + " [" + book.getAuthor() + "]";
}
@Override
public List<Book> findBookByAuthor(String author) {
return bookDatabase.stream()
.filter (book -> matchAuthor(book, author))
.collect(Collectors.toList());
}
@Override
public List<Book> findBookByTitle(String title) {
return bookDatabase.stream()
.filter (book -> matchTitle(book, title))
.collect(Collectors.toList());
}
@Override
public boolean markAsRead(Book book) {
if (bookDatabase.contains(book)){
bookDatabase.get(bookDatabase.indexOf(book)).setRead(true);
}
return bookDatabase.contains(book);
}
@Override
public boolean markAsNotRead(Book book) {
if (bookDatabase.contains(book)){
bookDatabase.get(bookDatabase.indexOf(book)).setRead(false);
}
return bookDatabase.contains(book);
}
@Override
public String[] getArrayOfReadBooks() {
return bookDatabase.stream()
.filter(book -> book.getIsRead())
.map(book -> addBookToArray(book))
.toArray(String[]::new);
}
@Override
public String[] getArrayOfNotReadBooks() {
return bookDatabase.stream()
.filter(book -> !book.getIsRead())
.map(book -> addBookToArray(book))
.toArray(String[]::new);
}
private boolean matchAuthor (Book book, String author){
return book.getAuthor().startsWith(author);
}
private boolean matchTitle (Book book, String title){
return book.getTitle().startsWith(title);
}
private boolean isValidBook (Book book){
return (book.getTitle() != null) && (book.getAuthor() != null) &&
(book.getTitle().length() > 0) && (book.getAuthor().length() > 0);
}
}
| [
"55547022+ValerijaI@users.noreply.github.com"
] | 55547022+ValerijaI@users.noreply.github.com |
4c92944ad8b240069e99dc0595fc0213e4143335 | fb3f91fb6c18bb93c5d51b58d13e201203833994 | /Desarrollo/Tools/GeneradorModel/V3/Sources/MybatisModelGenerator/src/main/java/pe/com/jrtotem/app/generator/service/IInfoDbConnectionCrudService.java | 6b3b37ce5218739a87dc1e335f227f6fa21978ba | [] | no_license | cgb-extjs-gwt/avgust-extjs-generator | d24241e594078eb8af8e33e99be64e56113a1c0c | 30677d1fef4da73e2c72b6c6dfca85d492e1a385 | refs/heads/master | 2023-07-20T04:39:13.928605 | 2018-01-16T18:17:23 | 2018-01-16T18:17:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 614 | java | package pe.com.jrtotem.app.generator.service;
import java.util.List;
import pe.com.jrtotem.app.generator.mybatis.domain.InfoDbConnection;
import pe.com.jrtotem.app.generator.mybatis.domain.InfoDbConnectionExample;
import pe.com.jrtotem.app.generator.util.IMybatisRepositoryHelper;
public interface IInfoDbConnectionCrudService extends IMybatisRepositoryHelper {
Integer create(InfoDbConnection model) throws Exception;
void save(InfoDbConnection model) throws Exception;
void remove(InfoDbConnection model) throws Exception;
List<InfoDbConnection> list(InfoDbConnectionExample example) throws Exception;
}
| [
"raffo8924@gmail.com"
] | raffo8924@gmail.com |
732fc9ebbf19b6fbb6df6fa35af0beb9f85cf162 | ae69e30f8eb4ff2cd47e2336b2a2b31f271a3e5a | /Java/cses/range_queries/DynamicRangeMinimum.java | 3bdb2f40ba8a0f6bfd26327cc850e868881a83e5 | [] | no_license | bdugersuren/CompetitiveProgramming | f35048ef8e5345c5219c992f2be8b84e1f7f1cb8 | cd571222aabe3de952d90d6ddda055aa3b8c08d9 | refs/heads/master | 2023-05-12T00:45:15.065209 | 2021-05-14T13:24:53 | 2021-05-14T13:24:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,990 | java | package cses.range_queries;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
public final class DynamicRangeMinimum {
private static class SegTree {
int leftMost, rightMost;
SegTree left, right;
int min;
SegTree(int leftMost, int rightMost, int[] arr) {
this.leftMost = leftMost;
this.rightMost = rightMost;
if (leftMost == rightMost) {
min = arr[leftMost];
} else {
final int mid = leftMost + rightMost >>> 1;
left = new SegTree(leftMost, mid, arr);
right = new SegTree(mid + 1, rightMost, arr);
recalc();
}
}
private void recalc() {
if (leftMost == rightMost) {
return;
}
min = Math.min(left.min, right.min);
}
private int query(int l, int r) {
if (r < leftMost || l > rightMost) {
return (int) 1e9;
}
if (l <= leftMost && rightMost <= r) {
return min;
}
return Math.min(left.query(l, r), right.query(l, r));
}
private void update(int idx, int val) {
if (leftMost == rightMost) {
min = val;
} else {
final int mid = leftMost + rightMost >>> 1;
if (idx <= mid) {
left.update(idx, val);
} else {
right.update(idx, val);
}
recalc();
}
}
}
public static void main(String[] args) throws IOException {
final FastReader fs = new FastReader();
final PrintWriter pw = new PrintWriter(System.out);
final int n = fs.nextInt();
final int q = fs.nextInt();
final int[] arr = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = fs.nextInt();
}
final SegTree st = new SegTree(0, n - 1, arr);
for (int i = 0; i < q; i++) {
final int t = fs.nextInt();
if (t == 1) {
final int idx = fs.nextInt() - 1;
final int val = fs.nextInt();
st.update(idx, val);
} else {
final int l = fs.nextInt() - 1;
final int r = fs.nextInt() - 1;
pw.println(st.query(l, r));
}
}
pw.close();
}
static final class Utils {
private static class Shuffler {
private static void shuffle(int[] x) {
final Random r = new Random();
for (int i = 0; i <= x.length - 2; i++) {
final int j = i + r.nextInt(x.length - i);
swap(x, i, j);
}
}
private static void shuffle(long[] x) {
final Random r = new Random();
for (int i = 0; i <= x.length - 2; i++) {
final int j = i + r.nextInt(x.length - i);
swap(x, i, j);
}
}
private static void swap(int[] x, int i, int j) {
final int t = x[i];
x[i] = x[j];
x[j] = t;
}
private static void swap(long[] x, int i, int j) {
final long t = x[i];
x[i] = x[j];
x[j] = t;
}
}
public static void shuffleSort(int[] arr) {
Shuffler.shuffle(arr);
Arrays.sort(arr);
}
public static void shuffleSort(long[] arr) {
Shuffler.shuffle(arr);
Arrays.sort(arr);
}
private static int[][] packG(int[][] edges, int n) {
final int[][] g = new int[n][];
final int[] size = new int[n];
for (int[] edge : edges) {
++size[edge[0]];
}
for (int i = 0; i < n; i++) {
g[i] = new int[size[i]];
}
for (int[] edge : edges) {
g[edge[0]][--size[edge[0]]] = edge[1];
}
return g;
}
private static int[][][] packGW(int[][] edges, int n) {
final int[][][] g = new int[n][][];
final int[] size = new int[n];
for (int[] edge : edges) {
++size[edge[0]];
}
for (int i = 0; i < n; i++) {
g[i] = new int[size[i]][2];
}
for (int[] edge : edges) {
g[edge[0]][--size[edge[0]]] = new int[] { edge[1], edge[2] };
}
return g;
}
private Utils() {}
}
static class FastReader {
private static final int BUFFER_SIZE = 1 << 16;
private final DataInputStream din;
private final byte[] buffer;
private int bufferPointer, bytesRead;
FastReader() {
din = new DataInputStream(System.in);
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
FastReader(String file_name) throws IOException {
din = new DataInputStream(new FileInputStream(file_name));
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public String readLine() throws IOException {
final byte[] buf = new byte[1024]; // line length
int cnt = 0, c;
while ((c = read()) != -1) {
if (c == '\n') {
break;
}
buf[cnt++] = (byte) c;
}
return new String(buf, 0, cnt);
}
public int nextSign() throws IOException {
byte c = read();
while ('+' != c && '-' != c) {
c = read();
}
return '+' == c ? 0 : 1;
}
public int nextInt() throws IOException {
int ret = 0;
byte c = read();
while (c <= ' ') {
c = read();
}
final boolean neg = c == '-';
if (neg) { c = read(); }
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (neg) { return -ret; }
return ret;
}
public long nextLong() throws IOException {
long ret = 0;
byte c = read();
while (c <= ' ') { c = read(); }
final boolean neg = c == '-';
if (neg) { c = read(); }
do {
ret = ret * 10 + c - '0';
}
while ((c = read()) >= '0' && c <= '9');
if (neg) { return -ret; }
return ret;
}
public double nextDouble() throws IOException {
double ret = 0, div = 1;
byte c = read();
while (c <= ' ') { c = read(); }
final boolean neg = c == '-';
if (neg) { c = read(); }
do {
ret = ret * 10 + c - '0';
}
while ((c = read()) >= '0' && c <= '9');
if (c == '.') {
while ((c = read()) >= '0' && c <= '9') {
ret += (c - '0') / (div *= 10);
}
}
if (neg) { return -ret; }
return ret;
}
private void fillBuffer() throws IOException {
bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
if (bytesRead == -1) { buffer[0] = -1; }
}
private byte read() throws IOException {
if (bufferPointer == bytesRead) { fillBuffer(); }
return buffer[bufferPointer++];
}
public void close() throws IOException {
din.close();
}
}
}
| [
"nirvana_rsc@yahoo.com"
] | nirvana_rsc@yahoo.com |
f0820571b567ba061add46ee6399693ae89af5a0 | 02a8ce78f8874a301c31476df36196361f814fa8 | /src/Main.java | a7378f4974c6783a0634cebe13ccddffbaac51a8 | [] | no_license | sergioceron/CFIE3 | cb4c783aa12b2202e8d89af27e5e1ff6185446cb | fe626aac1f73cd42e8512085f2687eb1f62caeb7 | refs/heads/master | 2021-01-14T13:44:14.929909 | 2015-01-11T20:01:05 | 2015-01-11T20:01:05 | 29,103,984 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,410 | java | import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.metadata.ClassMetadata;
import java.util.Map;
/**
* User: sg
* Date: 16/09/12
* Time: 11:21 AM
*/
public class Main {
private static final SessionFactory ourSessionFactory;
static {
try {
ourSessionFactory = new AnnotationConfiguration().
configure("hibernate.cfg.xml").
buildSessionFactory();
} catch (Throwable ex) {
throw new ExceptionInInitializerError(ex);
}
}
public static Session getSession() throws HibernateException {
return ourSessionFactory.openSession();
}
public static void main(final String[] args) throws Exception {
final Session session = getSession();
try {
System.out.println("querying all the managed entities...");
final Map metadataMap = session.getSessionFactory().getAllClassMetadata();
for (Object key : metadataMap.keySet()) {
final ClassMetadata classMetadata = (ClassMetadata) metadataMap.get(key);
final String entityName = classMetadata.getEntityName();
final Query query = session.createQuery("from " + entityName);
System.out.println("executing: " + query.getQueryString());
for (Object o : query.list()) {
System.out.println(" " + o);
}
}
} finally {
session.close();
}
}
}
| [
"sceronf@gmail.com"
] | sceronf@gmail.com |
d6e3bce5056d962adc63f629fe1a957a7a5ab14c | c5f0b9a449b0e22ad87a05f2a4d7a010ed167cb3 | /3_implementation/src/net/hudup/core/logistic/ui/JRadioList.java | dab784df6029b221be1c37dd399cc4e832080814 | [
"MIT"
] | permissive | sunflowersoft/hudup-ext | 91bcd5b48d84ab33d6d8184e381d27d8f42315f7 | cb62d5d492a82f1ecc7bc28955a52e767837afd3 | refs/heads/master | 2023-08-03T12:25:02.578863 | 2023-07-21T08:23:52 | 2023-07-21T08:23:52 | 131,940,602 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,699 | java | /**
* HUDUP: A FRAMEWORK OF E-COMMERCIAL RECOMMENDATION ALGORITHMS
* (C) Copyright by Loc Nguyen's Academic Network
* Project homepage: hudup.locnguyen.net
* Email: ng_phloc@yahoo.com
* Phone: +84-975250362
*/
package net.hudup.core.logistic.ui;
import java.awt.GridLayout;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import net.hudup.core.Util;
import net.hudup.core.parser.TextParserUtil;
/**
* This class creates a graphic user interface (GUI) component as a list of radio buttons.
* <br>
* Modified by Loc Nguyen 2011.
*
* @author Someone on internet.
*
* @param <E> type of elements attached with radio buttons.
* @version 10.0
*/
public class JRadioList<E> extends JPanel {
/**
* Serial version UID for serializable class.
*/
private static final long serialVersionUID = 1L;
/**
* List of ratio entries. Each entry has a radio button {@link JRadioButton} and an attached object (attached element).
*/
protected List<Object[]> radioList = Util.newList();
/**
* Button group.
*/
protected ButtonGroup bg = new ButtonGroup();
/**
* Constructor with a specified list of attached object. Each object is attached with a radion button {@link JRadioButton}.
* @param listData specified list of attached object.
* @param listName name of this {@link JRadioList}.
*/
public JRadioList(List<E> listData, String listName) {
super();
setLayout(new GridLayout(0, 1));
if (listName == null || listName.isEmpty()) {
setBorder(BorderFactory.createEtchedBorder());
}
else {
setBorder(BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(), listName) );
}
setListData(listData);
}
/**
* Setting radio list with data list.
* @param listData data list.
*/
public void setListData(List<E> listData) {
for (Object[] pair : radioList) {
JRadioButton rb = (JRadioButton)pair[0];
bg.remove(rb);
remove(rb);
}
radioList.clear();
for (E e : listData) {
String text = e.toString();
JRadioButton rb = new JRadioButton(TextParserUtil.split(text, TextParserUtil.LINK_SEP, null).get(0));
bg.add(rb);
add(rb);
radioList.add(new Object[] { rb, e});
}
updateUI();
}
/**
* Getting the object attached with the selected radio button (selected item).
* @return object attached with the selected radio button (selected item).
*/
@SuppressWarnings("unchecked")
public E getSelectedItem() {
for (Object[] pair : radioList) {
JRadioButton rb = (JRadioButton)pair[0];
if (rb.isSelected())
return (E) pair[1];
}
return null;
}
}
| [
"ngphloc@gmail.com"
] | ngphloc@gmail.com |
2cc7ff876b0c3621caecedd047772daac2d6590d | e7e497b20442a4220296dea1550091a457df5a38 | /main_project/socialgraph/newrecommendupdator/src/main/java/com/renren/xce/socialgraph/builder/BuilderFactory.java | f2e98717ec678ef9f31d50f463b373fa2aab9995 | [] | no_license | gunner14/old_rr_code | cf17a2dedf8dfcdcf441d49139adaadc770c0eea | bb047dc88fa7243ded61d840af0f8bad22d68dee | refs/heads/master | 2021-01-17T18:23:28.154228 | 2013-12-02T23:45:33 | 2013-12-02T23:45:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,736 | java | package com.renren.xce.socialgraph.builder;
import com.renren.xce.socialgraph.common.DataBuilder;
import com.renren.xce.socialgraph.updator.CreateRecommendDataThread;
/**
* BuilderFactory used to create different builder by type
* @author zhangnan
* @email zhangnan@renren-inc.com
*/
public class BuilderFactory {
public static DataBuilder createBuilder(String type) {
if (type.equals(CreateRecommendDataThread.COMMON_FRIENDS)) {
return new CommonFriendsBuilder();
} else if (type.equals(CreateRecommendDataThread.FREINDS_CLUSTER)) {
return new FriendClusterBuilder();
} else if (type.equals(CreateRecommendDataThread.PAGE)) {
return new PageBuilder();
} else if (type.equals(CreateRecommendDataThread.PAGECOLLEGE)) {
return new PageCollegeBuilder();
} else if (type.equals(CreateRecommendDataThread.INFO)) {
return new SameInfoFriendsBuilder();
} else if (type.equals(CreateRecommendDataThread.RVIDEO)) {
return new VideoRecommendDataBuilder();
} else if (type.equals(CreateRecommendDataThread.RBLOG)) {
return new BlogRecommendDataBuilder();
} else if (type.equals(CreateRecommendDataThread.RSITE)) {
return new RcdSiteBuilder();
} else if (type.equals(CreateRecommendDataThread.RAPP)) {
return new AppRecommendDataBuilder();
} else if (type.equals(CreateRecommendDataThread.RFOF)) {
return new RcdFoFBuilder();
} else if (type.equals(CreateRecommendDataThread.RDESK)) {
return new DeskRecommendDataBuilder();
} else if (type.equalsIgnoreCase(CreateRecommendDataThread.RFORUM)) {
return new ForumRecommendDataBuilder();
}else if(type.equalsIgnoreCase(CreateRecommendDataThread.RSHOPMASTER)) {
return new ShoppingMasterBuilder();
}
return null;
}
}
| [
"liyong19861014@gmail.com"
] | liyong19861014@gmail.com |
95a5649789a2682fe7d4271c33a4d8c1fec688fc | e99f78a1d7d244a8def43ca73d570f3a1b0c435f | /PIJReview/src/theappbusiness/priorityqueue/Student.java | f53b604cbff281b15612dfe8e197a719e0c8b477 | [] | no_license | BBK-PiJ-2015-10/Ongoing | 5e153280a7772b1ec6ad5df02ec2cf8115ec272d | 3a6099079c5413d864c8b3ec435f14660d6fad5e | refs/heads/master | 2021-01-13T11:59:36.191993 | 2017-06-29T18:35:31 | 2017-06-29T18:35:31 | 77,915,552 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,211 | java | package theappbusiness.priorityqueue;
public class Student implements Comparable {
private String name;
private Double gpa;
private Integer token;
public double getGpa() {
return gpa;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getToken() {
return token;
}
public void setToken(Integer token) {
this.token = token;
}
public void setGpa(Double gpa) {
this.gpa = gpa;
}
@Override
public int compareTo(Object other) {
Student otherStudent = (Student) other;
if(!this.gpa.equals(otherStudent.gpa)){
return -(this.gpa.compareTo(otherStudent.gpa));
}
else if (!this.name.equals(otherStudent.name)){
int result = this.name.compareTo(otherStudent.name);
if (result>0){
return 1;
}
else {
return -1;
}
}
else if (this.token!=otherStudent.token){
return (this.token.compareTo(otherStudent.token));
}
return 0;
}
public Student(String name, Double gpa, Integer token) {
this.gpa = gpa;
this.name = name;
this.token = token;
}
public Student(){
}
@Override
public String toString(){
return this.name + " " +this.gpa + " " + this.token;
}
}
| [
"yasserpo@hotmail.com"
] | yasserpo@hotmail.com |
f297428bb995099158799aed7454725bec0a90b2 | 13c371fffd8c0ecd5e735755e7337a093ac00e30 | /com/planet_ink/coffee_mud/Abilities/Spells/Spell_DemonGate.java | 492f4f12368fa5c28fe51b555f1f30233bf88925 | [
"Apache-2.0"
] | permissive | z3ndrag0n/CoffeeMud | e6b0c58953e47eb58544039b0781e4071a016372 | 50df765daee37765e76a1632a04c03f8a96d8f40 | refs/heads/master | 2020-09-15T10:27:26.511725 | 2019-11-18T15:41:42 | 2019-11-18T15:41:42 | 223,416,916 | 1 | 0 | Apache-2.0 | 2019-11-22T14:09:54 | 2019-11-22T14:09:53 | null | UTF-8 | Java | false | false | 7,889 | java | package com.planet_ink.coffee_mud.Abilities.Spells;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2002-2019 Bo Zimmerman
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.
*/
public class Spell_DemonGate extends Spell
{
@Override
public String ID()
{
return "Spell_DemonGate";
}
private final static String localizedName = CMLib.lang().L("Demon Gate");
@Override
public String name()
{
return localizedName;
}
private final static String localizedStaticDisplay = CMLib.lang().L("(Demon Gate)");
@Override
public String displayText()
{
return localizedStaticDisplay;
}
@Override
public int abstractQuality()
{
return Ability.QUALITY_BENEFICIAL_SELF;
}
@Override
public int enchantQuality()
{
return Ability.QUALITY_INDIFFERENT;
}
@Override
protected int canAffectCode()
{
return CAN_MOBS;
}
@Override
protected int canTargetCode()
{
return 0;
}
@Override
protected int overrideMana()
{
return 100;
}
@Override
public int classificationCode()
{
return Ability.ACODE_SPELL|Ability.DOMAIN_CONJURATION;
}
@Override
public long flags()
{
return Ability.FLAG_SUMMONING;
}
protected MOB myTarget=null;
@Override
public boolean tick(final Tickable ticking, final int tickID)
{
if(tickID==Tickable.TICKID_MOB)
{
if(affected instanceof MOB)
{
final MOB mob=(MOB)affected;
if(myTarget==null)
myTarget=mob.getVictim();
else
if(myTarget!=mob.getVictim())
unInvoke();
}
}
return super.tick(ticking,tickID);
}
@Override
public void executeMsg(final Environmental myHost, final CMMsg msg)
{
super.executeMsg(myHost,msg);
if((affected!=null)
&&(affected instanceof MOB)
&&(msg.amISource((MOB)affected)||msg.amISource(((MOB)affected).amFollowing())||(msg.source()==invoker()))
&&(msg.sourceMinor()==CMMsg.TYP_QUIT))
{
unInvoke();
if(msg.source().playerStats()!=null)
msg.source().playerStats().setLastUpdated(0);
}
}
@Override
public void unInvoke()
{
final MOB mob=(MOB)affected;
super.unInvoke();
if((canBeUninvoked())&&(mob!=null))
{
final Room R=mob.location();
if(R!=null)
{
if(mob.amFollowing()!=null)
R.showOthers(mob,mob.amFollowing(),CMMsg.MSG_OK_ACTION,L("^F^<FIGHT^><S-NAME> uses the fight to wrest itself from out of <T-YOUPOSS> control!^?%0DTo <T-YOUPOSS> great relief, it disappears back into its home plane.^</FIGHT^>^?"));
else
R.showOthers(mob,null,CMMsg.MSG_OK_ACTION,L("<S-NAME> disappears back into its home plane."));
}
if(mob.amDead())
mob.setLocation(null);
mob.destroy();
}
}
@Override
public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel)
{
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
final boolean success=proficiencyCheck(mob,0,auto);
if(success)
{
invoker=mob;
final CMMsg msg=CMClass.getMsg(mob,null,this,verbalCastCode(mob,null,auto),auto?"":L("^S<S-NAME> open(s) the gates of the abyss, incanting angrily.^?"));
if(mob.location().okMessage(mob,msg))
{
mob.location().send(mob,msg);
final MOB otherMonster=mob.location().fetchInhabitant("the great demonbeast$");
final MOB myMonster = determineMonster(mob, mob.phyStats().level()+(getXLEVELLevel(mob)+(2*getX1Level(mob))));
if(otherMonster!=null)
{
myMonster.location().showOthers(myMonster,mob,CMMsg.MSG_OK_ACTION,L("^F^<FIGHT^><S-NAME> wrests itself from out of <T-YOUPOSS> control!^</FIGHT^>^?"));
myMonster.setVictim(otherMonster);
}
else
if(CMLib.dice().rollPercentage()<10)
{
myMonster.location().showOthers(myMonster,mob,CMMsg.MSG_OK_ACTION,L("^F^<FIGHT^><S-NAME> wrests itself from out of <T-YOUPOSS> control!^</FIGHT^>^?"));
myMonster.setVictim(mob);
}
else
{
myMonster.setVictim(mob.getVictim());
CMLib.commands().postFollow(myMonster,mob,true);
if(myMonster.amFollowing()!=mob)
mob.tell(L("@x1 seems unwilling to follow you.",myMonster.name()));
}
invoker=mob;
beneficialAffect(mob,myMonster,asLevel,0);
}
}
else
return beneficialWordsFizzle(mob,null,L("<S-NAME> attempt(s) to open the gates of the abyss, but fail(s)."));
// return whether it worked
return success;
}
public MOB determineMonster(final MOB caster, final int level)
{
final MOB newMOB=CMClass.getMOB("GenRideable");
final Rideable ride=(Rideable)newMOB;
newMOB.basePhyStats().setAbility(22 + super.getXLEVELLevel(caster));
newMOB.basePhyStats().setLevel(level+ 2 + super.getXLEVELLevel(caster));
CMLib.factions().setAlignment(newMOB,Faction.Align.EVIL);
newMOB.basePhyStats().setWeight(850);
newMOB.basePhyStats().setRejuv(PhyStats.NO_REJUV);
newMOB.baseCharStats().setStat(CharStats.STAT_STRENGTH,18);
newMOB.baseCharStats().setStat(CharStats.STAT_DEXTERITY,18);
newMOB.baseCharStats().setStat(CharStats.STAT_CONSTITUTION,18);
newMOB.baseCharStats().setMyRace(CMClass.getRace("Demon"));
newMOB.baseCharStats().getMyRace().startRacing(newMOB,false);
newMOB.baseCharStats().setStat(CharStats.STAT_GENDER,'M');
newMOB.recoverPhyStats();
newMOB.recoverCharStats();
newMOB.basePhyStats().setArmor(CMLib.leveler().getLevelMOBArmor(newMOB));
newMOB.basePhyStats().setAttackAdjustment(CMLib.leveler().getLevelAttack(newMOB));
newMOB.basePhyStats().setDamage(CMLib.leveler().getLevelMOBDamage(newMOB));
newMOB.basePhyStats().setSpeed(CMLib.leveler().getLevelMOBSpeed(newMOB));
newMOB.setName(L("the great demonbeast"));
newMOB.setDisplayText(L("a horrendous demonbeast is stalking around here"));
newMOB.setDescription(L("Blood red skin with massive horns, and of course muscles in places you didn`t know existed."));
newMOB.addNonUninvokableEffect(CMClass.getAbility("Prop_ModExperience"));
ride.setRiderCapacity(2);
newMOB.recoverCharStats();
newMOB.recoverPhyStats();
newMOB.recoverMaxState();
newMOB.resetToMaxState();
newMOB.text();
newMOB.bringToLife(caster.location(),true);
CMLib.beanCounter().clearZeroMoney(newMOB,null);
newMOB.setMoneyVariation(0);
newMOB.location().showOthers(newMOB,null,CMMsg.MSG_OK_ACTION,L("<S-NAME> tears through the fabric of reality and steps into this world!"));
caster.location().recoverRoomStats();
newMOB.setStartRoom(null);
return(newMOB);
}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
f3ecef314cefb2c8a9320c5f4a04ba21329d7a34 | e6a977b8c8ac1546aeeaf4e7ffd7f467324a832d | /ac/monitor/components/error-monitor/src/main/java/com/hp/it/perf/monitor/config/ConnectConfig.java | e45c29c2aec5d2ca656c71b4e3b1b2989d7044ec | [] | no_license | shengyao15/performance_project | 6c86d6493d2c2d79d3e0d3585f96557a8584b1f6 | d3f7a66e9065379452fcda0bb6209a529822393c | refs/heads/master | 2021-05-16T03:07:16.637843 | 2017-11-01T06:35:58 | 2017-11-01T06:35:58 | 20,017,606 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 967 | java | package com.hp.it.perf.monitor.config;
import java.util.HashMap;
import java.util.Map;
public class ConnectConfig implements ConnectConfigMXBean {
private Map<String, String> configs = new HashMap<String, String>(1);
/* (non-Javadoc)
* @see com.hp.it.perf.monitor.config.ConnectConfigMXBean#getConfigs()
*/
@Override
public Map<String, String> getConfigs() {
return configs;
}
/* (non-Javadoc)
* @see com.hp.it.perf.monitor.config.ConnectConfigMXBean#setConfigs(java.util.Map)
*/
@Override
public void setConfigs(Map<String, String> configs) {
this.configs = configs;
}
/* (non-Javadoc)
* @see com.hp.it.perf.monitor.config.ConnectConfigMXBean#put(java.lang.String, java.lang.String)
*/
@Override
public void put(String k, String v){
configs.put(k, v);
}
/* (non-Javadoc)
* @see com.hp.it.perf.monitor.config.ConnectConfigMXBean#remove(java.lang.String)
*/
@Override
public void remove(String k){
configs.remove(k);
}
}
| [
"shengyao15@126.com"
] | shengyao15@126.com |
aa22f1e77af15729c48de318e4eb16aafbb5ffbb | b615ef46ae2525ac7d6cdb1e48f64931be34aca6 | /zxing/src/main/java/cn/park/com/zxing/bean/ZxingConfig.java | 89c6cedfeaf03b7b6ac6fc1afb8a67b2954bcc1e | [] | no_license | muyed/wisdom-parking-android | 29f66decf656ebc6912af3b44dd1b6bc055b65c3 | d061ea35a1322be80eadb7e4ce18d5ed24f43e5f | refs/heads/master | 2021-05-10T18:07:39.981927 | 2019-02-15T09:02:00 | 2019-02-15T09:02:00 | 118,621,218 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,416 | java | package cn.park.com.zxing.bean;
import java.io.Serializable;
/**
* @author: yzq
* @date: 2017/10/27 14:48
* @declare :zxing配置类
*/
public class ZxingConfig implements Serializable {
/*是否播放声音*/
private boolean isPlayBeep = true;
/*是否震动*/
private boolean isShake = false;
/*是否显示下方的其他功能布局*/
private boolean isShowbottomLayout = true;
/*是否显示闪光灯按钮*/
private boolean isShowFlashLight = true;
/*是否显示相册按钮*/
private boolean isShowAlbum = true;
public boolean isPlayBeep() {
return isPlayBeep;
}
public void setPlayBeep(boolean playBeep) {
isPlayBeep = playBeep;
}
public boolean isShake() {
return isShake;
}
public void setShake(boolean shake) {
isShake = shake;
}
public boolean isShowbottomLayout() {
return isShowbottomLayout;
}
public void setShowbottomLayout(boolean showbottomLayout) {
isShowbottomLayout = showbottomLayout;
}
public boolean isShowFlashLight() {
return isShowFlashLight;
}
public void setShowFlashLight(boolean showFlashLight) {
isShowFlashLight = showFlashLight;
}
public boolean isShowAlbum() {
return isShowAlbum;
}
public void setShowAlbum(boolean showAlbum) {
isShowAlbum = showAlbum;
}
}
| [
"leocheung4ever@gmail.com"
] | leocheung4ever@gmail.com |
1927224e044c814277a50ef9f30564e5b49a08df | 477496d43be8b24a60ac1ccee12b3c887062cebd | /shiro-chapter23/shiro-chapter23-server/src/main/java/com/haien/chapter23/dao/OrganizationDao.java | 2f228c98a99b9e2ea6cb299ffd4eb7d5d2b0bd04 | [] | 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 | 643 | java | package com.haien.chapter23.dao;
import com.haien.chapter23.entity.Organization;
import java.util.List;
/**
* <p>Organization: Zhang Kaitao
* <p>Date: 14-1-28
* <p>Version: 1.0
*/
public interface OrganizationDao {
public Organization createOrganization(Organization organization);
public Organization updateOrganization(Organization organization);
public void deleteOrganization(Long organizationId);
Organization findOne(Long organizationId);
List<Organization> findAll();
List<Organization> findAllWithExclude(Organization excludeOraganization);
void move(Organization source, Organization target);
}
| [
"1410343862@qq.com"
] | 1410343862@qq.com |
c94fcf9150c848133e84219fa3b4d6ded1178a8e | 75eb061709fba7ab7ab7e7dbb31c6720c353ef9e | /WCM_MDM_SONAMA_DB2_14June2018_2/auth/src/main/java/com/ibm/mdm/esoa/client/ScoreProviderAsProv.java | 0cfdb3220d843b0d25f728b34c00df6ed6628ac9 | [
"MIT"
] | permissive | svanandkumar/Connect_360_Release1 | 8867ab02988af510b759d49ed344e60dfc5b542f | 9da56fdc7bd1d57b26c516b9214f5e7ca9b740c2 | refs/heads/master | 2020-03-28T01:00:23.393795 | 2018-09-05T13:29:59 | 2018-09-05T13:29:59 | 147,468,585 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,482 | java |
package com.ibm.mdm.esoa.client;
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.XmlType;
/**
* <p>Java class for scoreProviderAsProv complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="scoreProviderAsProv">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="target" type="{http://client.esoa.mdm.ibm.com/}provider" minOccurs="0"/>
* <element name="record" type="{http://client.esoa.mdm.ibm.com/}provider" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "scoreProviderAsProv", propOrder = {
"target",
"record"
})
public class ScoreProviderAsProv {
protected Provider target;
protected List<Provider> record;
/**
* Gets the value of the target property.
*
* @return
* possible object is
* {@link Provider }
*
*/
public Provider getTarget() {
return target;
}
/**
* Sets the value of the target property.
*
* @param value
* allowed object is
* {@link Provider }
*
*/
public void setTarget(Provider value) {
this.target = value;
}
/**
* Gets the value of the record 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 record property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRecord().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Provider }
*
*
*/
public List<Provider> getRecord() {
if (record == null) {
record = new ArrayList<Provider>();
}
return this.record;
}
}
| [
"anandkumar.swami@in.ibm.com"
] | anandkumar.swami@in.ibm.com |
70af9adcbbe753737d8f721cff57f151ca9e8097 | 95379ba98e777550a5e7bf4289bcd4be3c2b08a3 | /java/net/sf/l2j/gameserver/taskmanager/DecayTaskManager.java | 6612f678ba86d136f775e2e059ec104ef3e3baf7 | [] | no_license | l2brutal/aCis_gameserver | 1311617bd8ce0964135e23d5ac2a24f83023f5fb | 5fa7fe086940343fb4ea726a6d0138c130ddbec7 | refs/heads/master | 2021-01-03T04:10:26.192831 | 2019-03-19T19:44:09 | 2019-03-19T19:44:09 | 239,916,465 | 0 | 1 | null | 2020-02-12T03:12:34 | 2020-02-12T03:12:33 | null | UTF-8 | Java | false | false | 3,057 | java | package net.sf.l2j.gameserver.taskmanager;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import net.sf.l2j.commons.concurrent.ThreadPool;
import net.sf.l2j.gameserver.model.actor.Attackable;
import net.sf.l2j.gameserver.model.actor.Creature;
import net.sf.l2j.gameserver.model.actor.instance.Monster;
/**
* Destroys {@link Creature} corpse after specified time.
*/
public final class DecayTaskManager implements Runnable
{
private final Map<Creature, Long> _characters = new ConcurrentHashMap<>();
protected DecayTaskManager()
{
// Run task each second.
ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
}
@Override
public final void run()
{
// List is empty, skip.
if (_characters.isEmpty())
return;
// Get current time.
final long time = System.currentTimeMillis();
// Loop all characters.
for (Map.Entry<Creature, Long> entry : _characters.entrySet())
{
// Time hasn't passed yet, skip.
if (time < entry.getValue())
continue;
final Creature character = entry.getKey();
// Decay character and remove task.
character.onDecay();
_characters.remove(character);
}
}
/**
* Adds {@link Creature} to the DecayTask with additional interval.
* @param character : {@link Creature} to be added.
* @param interval : Interval in seconds, after which the decay task is triggered.
*/
public final void add(Creature character, int interval)
{
// if character is monster
if (character instanceof Monster)
{
final Monster monster = ((Monster) character);
// monster is spoiled or seeded, double the corpse delay
if (monster.getSpoilerId() != 0 || monster.isSeeded())
interval *= 2;
}
_characters.put(character, System.currentTimeMillis() + interval * 1000);
}
/**
* Removes {@link Creature} from the DecayTask.
* @param actor : {@link Creature} to be removed.
*/
public final void cancel(Creature actor)
{
_characters.remove(actor);
}
/**
* Removes {@link Attackable} from the DecayTask.
* @param monster : {@link Attackable} to be tested.
* @return boolean : True, when action can be applied on a corpse.
*/
public final boolean isCorpseActionAllowed(Monster monster)
{
// get time and verify, if corpse exists
Long time = _characters.get(monster);
if (time == null)
return false;
// get corpse action interval, is half of corpse decay
int corpseTime = monster.getTemplate().getCorpseTime() * 1000 / 2;
// monster is spoiled or seeded, double the corpse action interval
if (monster.getSpoilerId() != 0 || monster.isSeeded())
corpseTime *= 2;
// check last corpse action time
return System.currentTimeMillis() < time - corpseTime;
}
public static final DecayTaskManager getInstance()
{
return SingletonHolder.INSTANCE;
}
private static final class SingletonHolder
{
protected static final DecayTaskManager INSTANCE = new DecayTaskManager();
}
} | [
"vicawnolasco@gmail.com"
] | vicawnolasco@gmail.com |
401f882ab2818a91d2b0b0fd870a174ab7ac1d02 | ec5fe8f20dfe82b479cea3da24c78190f768e086 | /cas-4.1.0/cas-server-core-api/src/main/java/org/jasig/cas/services/RegisteredServiceUsernameAttributeProvider.java | d9e14d39596d68ade6ca978f89a8300a3eb210da | [
"MIT",
"Apache-2.0",
"CDDL-1.1",
"LicenseRef-scancode-unknown-license-reference",
"CDDL-1.0",
"LGPL-2.0-or-later",
"LGPL-2.1-or-later",
"W3C",
"BSD-3-Clause",
"GPL-1.0-or-later",
"SAX-PD",
"LicenseRef-scancode-free-unknown",
"MPL-1.1",
"GPL-2.0-only",
"LicenseRef-scancode-jsr-107-jcache-spec-2013",
"LicenseRef-scancode-public-domain",
"EPL-1.0",
"Classpath-exception-2.0",
"LGPL-2.1-only"
] | permissive | hsj-xiaokang/springboot-shiro-cas-mybatis | b4cf76dc2994d63f771da0549cf711ea674e53bf | 3673a9a9b279dd1e624c1a7a953182301f707997 | refs/heads/master | 2022-06-26T15:28:49.854390 | 2020-12-06T04:43:13 | 2020-12-06T04:43:13 | 103,009,179 | 42 | 24 | MIT | 2022-06-25T07:27:42 | 2017-09-10T06:35:28 | Java | UTF-8 | Java | false | false | 1,551 | java | /*
* Licensed to Apereo under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Apereo 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 the following location:
*
* 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.jasig.cas.services;
import org.jasig.cas.authentication.principal.Principal;
import org.jasig.cas.authentication.principal.Service;
import java.io.Serializable;
/**
* Strategy interface to define what username attribute should
* be returned for a given registered service.
* @author Misagh Moayyed
* @since 4.1.0
*/
public interface RegisteredServiceUsernameAttributeProvider extends Serializable {
/**
* Resolve the username that is to be returned to CAS clients.
*
* @param principal the principal
* @param service the service for which attribute should be calculated
* @return the username value configured for this service
*/
String resolveUsername(Principal principal, Service service);
}
| [
"2356899074@qq.com"
] | 2356899074@qq.com |
dff0d5620ee9fa0a2d226a10b8b37d62d3a8f6dd | 908b9859a4b45dca4d916720122a1b40c0fafe43 | /labs/ebms/src/main/java/somapa/ptc/xml/nsw/DigestMethodDescriptor.java | a93884e125dcf2bc2fc476863725a196c568b59a | [] | no_license | mugabarigiraCHUK/scotomax-hman | 778a3b48c9ac737414beaee9d72d1138a1e5b1ee | 786478731338b5af7a86cada2e4582ddb3b2569f | refs/heads/master | 2021-01-10T06:50:26.179698 | 2012-08-13T16:35:46 | 2012-08-13T16:35:46 | 46,422,699 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,044 | java | /*
* This class was automatically generated with
* <a href="http://castor.exolab.org">Castor 0.9.4</a>, using an
* XML Schema.
* $Id$
*/
package somapa.ptc.xml.nsw;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.mapping.AccessMode;
import org.exolab.castor.mapping.ClassDescriptor;
import org.exolab.castor.mapping.FieldDescriptor;
import org.exolab.castor.xml.*;
import org.exolab.castor.xml.FieldValidator;
import org.exolab.castor.xml.TypeValidator;
import org.exolab.castor.xml.XMLFieldDescriptor;
import org.exolab.castor.xml.handlers.*;
import org.exolab.castor.xml.util.XMLFieldDescriptorImpl;
import org.exolab.castor.xml.validators.*;
/**
*
*
* @version $Revision$ $Date$
**/
public class DigestMethodDescriptor extends DigestMethodTypeDescriptor {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
private java.lang.String nsPrefix;
private java.lang.String nsURI;
private java.lang.String xmlName;
private org.exolab.castor.xml.XMLFieldDescriptor identity;
//----------------/
//- Constructors -/
//----------------/
public DigestMethodDescriptor() {
super();
setExtendsWithoutFlatten(new DigestMethodTypeDescriptor());
nsURI = "http://www.w3.org/2000/09/xmldsig#";
xmlName = "DigestMethod";
} //-- somapa.ptc.xml.nsw.DigestMethodDescriptor()
//-----------/
//- Methods -/
//-----------/
/**
**/
public org.exolab.castor.mapping.AccessMode getAccessMode()
{
return null;
} //-- org.exolab.castor.mapping.AccessMode getAccessMode()
/**
**/
public org.exolab.castor.mapping.ClassDescriptor getExtends()
{
return super.getExtends();
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
/**
**/
public org.exolab.castor.mapping.FieldDescriptor getIdentity()
{
if (identity == null)
return super.getIdentity();
return identity;
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
/**
**/
public java.lang.Class getJavaClass()
{
return somapa.ptc.xml.nsw.DigestMethod.class;
} //-- java.lang.Class getJavaClass()
/**
**/
public java.lang.String getNameSpacePrefix()
{
return nsPrefix;
} //-- java.lang.String getNameSpacePrefix()
/**
**/
public java.lang.String getNameSpaceURI()
{
return nsURI;
} //-- java.lang.String getNameSpaceURI()
/**
**/
public org.exolab.castor.xml.TypeValidator getValidator()
{
return this;
} //-- org.exolab.castor.xml.TypeValidator getValidator()
/**
**/
public java.lang.String getXMLName()
{
return xmlName;
} //-- java.lang.String getXMLName()
}
| [
"developmax@ad344d4b-5b83-fe1d-98cd-db9ebd70f650"
] | developmax@ad344d4b-5b83-fe1d-98cd-db9ebd70f650 |
ee510c6f6b52421cdb254bb77bc8ca0407493b7b | d438b8b4b7953e20586019adcef6133587a1bdd3 | /peppol-smp-server-webapp/src/main/java/com/helger/peppol/smpserver/mock/MockSMPClient.java | 61765e2195801aa295461ce4c03820630dd0148e | [] | no_license | jannewaren/peppol-smp-server | 98ecdbd90010f7e60e9e2e4e32cb58ec5443aa21 | 1e1cb0878def390f0d165e906d92b7c36734ca2c | refs/heads/master | 2021-07-14T05:09:15.555610 | 2017-10-16T16:40:12 | 2017-10-16T16:40:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,030 | java | /**
* Copyright (C) 2014-2017 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.peppol.smpserver.mock;
import com.helger.commons.url.URLHelper;
import com.helger.peppol.smpclient.SMPClient;
/**
* A special SMP client customized for testing purposes only.
*
* @author Philip Helger
*/
public class MockSMPClient extends SMPClient
{
public MockSMPClient ()
{
super (URLHelper.getAsURI (MockWebServer.BASE_URI_HTTP));
}
}
| [
"philip@helger.com"
] | philip@helger.com |
365e9b96c7fb10b036c46128b625b8a8b9e1ffe6 | 55bf526949e399838334d201a9743633c584f53f | /tests/org.jboss.tools.teiid.reddeer/src/org/jboss/tools/teiid/reddeer/preference/DriverDefinitionPreferencePageExt.java | 2fa583916e1ad6312294d8e29ea6ebcf3e9d3d7a | [] | no_license | jniederm/jbosstools-integration-tests | 615377fc65d56387e20cb7b449a8d6c38756c2c1 | 2d43dc88a77492194567dcc4b4771af054db53ae | refs/heads/master | 2021-01-21T01:27:35.301358 | 2013-08-27T15:27:22 | 2013-08-27T19:46:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,695 | java | package org.jboss.tools.teiid.reddeer.preference;
import org.eclipse.core.runtime.Platform;
import org.eclipse.swt.SWT;
import org.jboss.reddeer.eclipse.datatools.ui.DriverDefinition;
import org.jboss.reddeer.eclipse.datatools.ui.DriverTemplate;
import org.jboss.reddeer.eclipse.datatools.ui.preference.DriverDefinitionPreferencePage;
import org.jboss.reddeer.eclipse.datatools.ui.wizard.DriverDefinitionPage;
import org.jboss.reddeer.eclipse.datatools.ui.wizard.DriverDefinitionWizard;
import org.jboss.reddeer.swt.impl.button.PushButton;
import org.jboss.reddeer.swt.util.Bot;
public class DriverDefinitionPreferencePageExt extends DriverDefinitionPreferencePage {
@Override
public void open() {
if (isRunningOnMacOs()) {
Bot.get().shells()[0].pressShortcut(SWT.COMMAND, ',');
}
super.open();
}
public void addDriverDefinition(DriverDefinition driverDefinition) {
new PushButton("Add...").click();
new DriverDefinitionWizardExt(driverDefinition).execute();
new PushButton("OK").click();
}
private static boolean isRunningOnMacOs() {
return Platform.getOS().equalsIgnoreCase("macosx");
}
private class DriverDefinitionWizardExt extends DriverDefinitionWizard {
private DriverDefinition driverDefinition;
public DriverDefinitionWizardExt(DriverDefinition driverDefinition) {
this.driverDefinition = driverDefinition;
}
public void execute() {
DriverTemplate drvTemp = driverDefinition.getDriverTemplate();
DriverDefinitionPage page = getFirstPage();
page.selectDriverTemplate(drvTemp.getType(), drvTemp.getVersion());
page.setName(driverDefinition.getDriverName());
page.addDriverLibrary(driverDefinition.getDriverLibrary());
}
}
}
| [
"vpakan@redhat.com"
] | vpakan@redhat.com |
906a88eec0786ff6ad18cacd05af6b12d461d44f | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_1/src/f/a/d/Calc_1_1_5039.java | d957a883a74da7f912a3e782c29819961d286a98 | [] | no_license | chalstrick/bigRepo1 | ac7fd5785d475b3c38f1328e370ba9a85a751cff | dad1852eef66fcec200df10083959c674fdcc55d | refs/heads/master | 2016-08-11T17:59:16.079541 | 2015-12-18T14:26:49 | 2015-12-18T14:26:49 | 48,244,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 131 | java | package f.a.d;
public class Calc_1_1_5039 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
| [
"christian.halstrick@sap.com"
] | christian.halstrick@sap.com |
72e17b4ddc239c9f769429873d2f99c6bcb9716f | 8d6a11f6d0fcbf6c54713c16ed5a620ae3810754 | /Assignment/Cls/src/main/java/com/ArabBank/lombok/Cls/Skills.java | 2612d8b2ba4cc3db4c97a40dd0b13c349abf371f | [] | no_license | monassar97/Lambda | f059eaedc6aa6beba12008956c474db34e0424cb | 741153c18184e824ba355971f537d643642af67f | refs/heads/master | 2022-06-01T14:59:45.552878 | 2019-12-16T08:27:55 | 2019-12-16T08:27:55 | 228,188,629 | 0 | 0 | null | 2022-05-20T21:19:14 | 2019-12-15T13:27:09 | JavaScript | UTF-8 | Java | false | false | 155 | java | package com.ArabBank.lombok.Cls;
public class Skills {
private String InterpersonalSkills;
private String Responsiveness;
private String Initiative;
}
| [
"johndoe@example.com"
] | johndoe@example.com |
a47901d1efc879bc6010811be1dd1c3bb186db27 | 416a0ee548e4a90eacbabda768f8d892c34d9dd9 | /src/main/java/org/synyx/urlaubsverwaltung/core/mail/MailBuilder.java | 055492dce4906d819e7f07e678e87471be81306f | [
"Apache-2.0"
] | permissive | Faldrian/urlaubsverwaltung | 8b29e313465ffc67b583f0629e3800c40455df65 | 3f11a986da0e8d1224d006d43b6e0e90a73a53a9 | refs/heads/master | 2020-04-19T17:33:13.882325 | 2019-03-05T15:09:07 | 2019-03-05T15:09:07 | 168,338,362 | 0 | 0 | Apache-2.0 | 2019-01-30T12:21:28 | 2019-01-30T12:21:28 | null | UTF-8 | Java | false | false | 1,856 | java | package org.synyx.urlaubsverwaltung.core.mail;
import org.apache.commons.lang.CharEncoding;
import org.apache.velocity.app.VelocityEngine;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.velocity.VelocityEngineUtils;
import java.util.Map;
/**
* Builds mail content by filling Velocity templates with data.
*
* @author Aljona Murygina - murygina@synyx.de
*/
@Service
class MailBuilder {
private static final String TEMPLATE_PATH = "/org/synyx/urlaubsverwaltung/core/mail/";
private static final String TEMPLATE_TYPE = ".vm";
private final VelocityEngine velocityEngine;
@Autowired
MailBuilder(VelocityEngine velocityEngine) {
this.velocityEngine = velocityEngine;
}
/**
* Build text that can be set as mail body using the given model to fill the template with the given name.
*
* @param templateName of the template to be used
* @param model to fill the template
*
* @return the text representation of the filled template
*/
String buildMailBody(String templateName, Map<String, Object> model) {
return VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, getFullyQualifiedTemplateName(templateName),
CharEncoding.UTF_8, model);
}
/**
* Get fully qualified template name including path and file extension of the given template name.
*
* @param templateName to get the fully qualified template name of
*
* @return the fully qualified template name using {@value #TEMPLATE_PATH} as path and {@value #TEMPLATE_TYPE} as
* file extension
*/
private String getFullyQualifiedTemplateName(String templateName) {
return TEMPLATE_PATH + templateName + TEMPLATE_TYPE;
}
}
| [
"murygina@synyx.de"
] | murygina@synyx.de |
db8d56e2b078774857098a99a2637234cef6bc4b | 612b1b7f5201f3ff1a550b09c96218053e195519 | /modules/gui/src/com/haulmont/cuba/gui/components/UiPermissionAware.java | a055b73291e24233860cdfb52f077eccbd14522d | [
"Apache-2.0"
] | permissive | cuba-platform/cuba | ffb83fe0b089056e8da11d96a40c596d8871d832 | 36e0c73d4e3b06f700173c4bc49c113838c1690b | refs/heads/master | 2023-06-24T02:03:12.525885 | 2023-06-19T14:13:06 | 2023-06-19T14:13:06 | 54,624,511 | 1,434 | 303 | Apache-2.0 | 2023-08-31T18:57:38 | 2016-03-24T07:55:56 | Java | UTF-8 | Java | false | false | 1,329 | java | /*
* Copyright (c) 2008-2018 Haulmont.
*
* 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.haulmont.cuba.gui.components;
import com.haulmont.cuba.gui.app.security.role.edit.UiPermissionDescriptor;
/**
* State of subcomponents can be managed by UI permissions.
*/
public interface UiPermissionAware {
/**
* Change state of subcomponent according to the {@code permissionValue}.
*
* @param permissionDescriptor descriptor which contains id of subcomponent and UI permission value
* which will be applied to this subcomponent or ids of subcomponent and its action
* and UI permission value which will be applied to subcomponent's action
*/
void applyPermission(UiPermissionDescriptor permissionDescriptor);
} | [
"artamonov@haulmont.com"
] | artamonov@haulmont.com |
c3e1dca3208c88bcfcea4301ce6c30f110e22223 | ac9244ea93103d593ae406dd54fab79adbc59e7a | /src/headfirst/designpatterns/command/remote/LivingroomLightOffCommand.java | 3795a327d54c9d80fe6b5d5c404d10e3c5216b23 | [] | no_license | bofei222/Head-First-Design-Patterns | 11f731a3b28ca79d40624ed3a5b09503af41308a | cb65d5ea77f1105bfb8622a8c5acf90b9287764e | refs/heads/master | 2021-07-20T23:22:20.418016 | 2020-05-08T23:48:56 | 2020-05-08T23:48:56 | 144,090,495 | 0 | 0 | null | 2018-08-09T02:19:40 | 2018-08-09T02:19:40 | null | UTF-8 | Java | false | false | 258 | java | package headfirst.designpatterns.command.remote;
public class LivingroomLightOffCommand implements Command {
Light light;
public LivingroomLightOffCommand(Light light) {
this.light = light;
}
public void execute() {
light.off();
}
}
| [
"bofei222@163.com"
] | bofei222@163.com |
53e052c6b60c21c66289ce47e1a6a81da7379957 | da514f4f46058d2e71a1fc1900565651478a7daa | /gateway-service/src/main/java/com/github/chenhaiyangs/gateway/service/storage/mock/vo/MockVo.java | 5dc26d4b1802187d8ba657db07f23204e942c4ff | [] | no_license | MicrophoneBen/easy-gateway | 16211a00d644de2e1302302c2cd59bf55c4f5014 | fe713651236378592b2e12ad0f6d3a390e2ffe5e | refs/heads/master | 2020-09-08T14:43:53.124533 | 2019-01-12T13:54:09 | 2019-01-12T13:54:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 605 | java | package com.github.chenhaiyangs.gateway.service.storage.mock.vo;
import com.github.chenhaiyangs.gateway.common.model.base.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
/**
* mock组件Vo类
* @author chenhaiyang
*/
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class MockVo extends BaseModel{
/**
* id
*/
private int id;
/**
* apiId
*/
private int apiId;
/**
* 请求的body
*/
private String body;
/**
* 是否被禁用
*/
private boolean forbidden;
}
| [
"chenhaiyang@ruubypay.com"
] | chenhaiyang@ruubypay.com |
9e6eb4d46a29248b283915e48fb1d2cb35427c94 | 62eb9ce1b39e85073cc66f6531a9a9b9c8033725 | /src/java/us/kbase/narrativemethodstore/ValidateTypeParams.java | 8c9f2364ad6971bc4e4ab5952fbf6845c42f6d46 | [
"MIT"
] | permissive | kbase/kb_sdk | b042e40c7b586554979fd3bcca126359c94ab68f | 3a7e1b29491d8e976eb965b480254385de8f5d54 | refs/heads/develop | 2023-03-22T09:56:09.670295 | 2023-03-15T22:09:45 | 2023-03-15T22:09:45 | 33,894,860 | 23 | 43 | MIT | 2023-03-15T22:09:47 | 2015-04-13T21:23:48 | Java | UTF-8 | Java | false | false | 3,109 | java |
package us.kbase.narrativemethodstore;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* <p>Original spec-file type: ValidateTypeParams</p>
*
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("com.googlecode.jsonschema2pojo")
@JsonPropertyOrder({
"id",
"spec_json",
"display_yaml",
"extra_files"
})
public class ValidateTypeParams {
@JsonProperty("id")
private java.lang.String id;
@JsonProperty("spec_json")
private java.lang.String specJson;
@JsonProperty("display_yaml")
private java.lang.String displayYaml;
@JsonProperty("extra_files")
private Map<String, String> extraFiles;
private Map<java.lang.String, Object> additionalProperties = new HashMap<java.lang.String, Object>();
@JsonProperty("id")
public java.lang.String getId() {
return id;
}
@JsonProperty("id")
public void setId(java.lang.String id) {
this.id = id;
}
public ValidateTypeParams withId(java.lang.String id) {
this.id = id;
return this;
}
@JsonProperty("spec_json")
public java.lang.String getSpecJson() {
return specJson;
}
@JsonProperty("spec_json")
public void setSpecJson(java.lang.String specJson) {
this.specJson = specJson;
}
public ValidateTypeParams withSpecJson(java.lang.String specJson) {
this.specJson = specJson;
return this;
}
@JsonProperty("display_yaml")
public java.lang.String getDisplayYaml() {
return displayYaml;
}
@JsonProperty("display_yaml")
public void setDisplayYaml(java.lang.String displayYaml) {
this.displayYaml = displayYaml;
}
public ValidateTypeParams withDisplayYaml(java.lang.String displayYaml) {
this.displayYaml = displayYaml;
return this;
}
@JsonProperty("extra_files")
public Map<String, String> getExtraFiles() {
return extraFiles;
}
@JsonProperty("extra_files")
public void setExtraFiles(Map<String, String> extraFiles) {
this.extraFiles = extraFiles;
}
public ValidateTypeParams withExtraFiles(Map<String, String> extraFiles) {
this.extraFiles = extraFiles;
return this;
}
@JsonAnyGetter
public Map<java.lang.String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperties(java.lang.String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public java.lang.String toString() {
return ((((((((((("ValidateTypeParams"+" [id=")+ id)+", specJson=")+ specJson)+", displayYaml=")+ displayYaml)+", extraFiles=")+ extraFiles)+", additionalProperties=")+ additionalProperties)+"]");
}
}
| [
"rsutormin@lbl.gov"
] | rsutormin@lbl.gov |
c3fee6ff5e8fe3b7bbdc3b1027db2204e410a7ed | 5ec06dab1409d790496ce082dacb321392b32fe9 | /clients/jaxrs-resteasy/generated/src/gen/java/org/openapitools/model/ComAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties.java | 033331eb04af7e3712c29746ec0e90e7fa928d04 | [
"Apache-2.0"
] | permissive | shinesolutions/swagger-aem-osgi | e9d2385f44bee70e5bbdc0d577e99a9f2525266f | c2f6e076971d2592c1cbd3f70695c679e807396b | refs/heads/master | 2022-10-29T13:07:40.422092 | 2021-04-09T07:46:03 | 2021-04-09T07:46:03 | 190,217,155 | 3 | 3 | Apache-2.0 | 2022-10-05T03:26:20 | 2019-06-04T14:23:28 | null | UTF-8 | Java | false | false | 7,721 | java | package org.openapitools.model;
import java.util.Objects;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import org.openapitools.model.ConfigNodePropertyInteger;
import org.openapitools.model.ConfigNodePropertyString;
import javax.validation.constraints.*;
import io.swagger.annotations.*;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", date = "2019-08-05T00:59:30.156Z[GMT]")
public class ComAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties {
private ConfigNodePropertyString translationFactory = null;
private ConfigNodePropertyString defaultConnectorLabel = null;
private ConfigNodePropertyString defaultConnectorAttribution = null;
private ConfigNodePropertyString defaultConnectorWorkspaceId = null;
private ConfigNodePropertyString defaultConnectorSubscriptionKey = null;
private ConfigNodePropertyString languageMapLocation = null;
private ConfigNodePropertyString categoryMapLocation = null;
private ConfigNodePropertyInteger retryAttempts = null;
private ConfigNodePropertyInteger timeoutCount = null;
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("translationFactory")
public ConfigNodePropertyString getTranslationFactory() {
return translationFactory;
}
public void setTranslationFactory(ConfigNodePropertyString translationFactory) {
this.translationFactory = translationFactory;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("defaultConnectorLabel")
public ConfigNodePropertyString getDefaultConnectorLabel() {
return defaultConnectorLabel;
}
public void setDefaultConnectorLabel(ConfigNodePropertyString defaultConnectorLabel) {
this.defaultConnectorLabel = defaultConnectorLabel;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("defaultConnectorAttribution")
public ConfigNodePropertyString getDefaultConnectorAttribution() {
return defaultConnectorAttribution;
}
public void setDefaultConnectorAttribution(ConfigNodePropertyString defaultConnectorAttribution) {
this.defaultConnectorAttribution = defaultConnectorAttribution;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("defaultConnectorWorkspaceId")
public ConfigNodePropertyString getDefaultConnectorWorkspaceId() {
return defaultConnectorWorkspaceId;
}
public void setDefaultConnectorWorkspaceId(ConfigNodePropertyString defaultConnectorWorkspaceId) {
this.defaultConnectorWorkspaceId = defaultConnectorWorkspaceId;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("defaultConnectorSubscriptionKey")
public ConfigNodePropertyString getDefaultConnectorSubscriptionKey() {
return defaultConnectorSubscriptionKey;
}
public void setDefaultConnectorSubscriptionKey(ConfigNodePropertyString defaultConnectorSubscriptionKey) {
this.defaultConnectorSubscriptionKey = defaultConnectorSubscriptionKey;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("languageMapLocation")
public ConfigNodePropertyString getLanguageMapLocation() {
return languageMapLocation;
}
public void setLanguageMapLocation(ConfigNodePropertyString languageMapLocation) {
this.languageMapLocation = languageMapLocation;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("categoryMapLocation")
public ConfigNodePropertyString getCategoryMapLocation() {
return categoryMapLocation;
}
public void setCategoryMapLocation(ConfigNodePropertyString categoryMapLocation) {
this.categoryMapLocation = categoryMapLocation;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("retryAttempts")
public ConfigNodePropertyInteger getRetryAttempts() {
return retryAttempts;
}
public void setRetryAttempts(ConfigNodePropertyInteger retryAttempts) {
this.retryAttempts = retryAttempts;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("timeoutCount")
public ConfigNodePropertyInteger getTimeoutCount() {
return timeoutCount;
}
public void setTimeoutCount(ConfigNodePropertyInteger timeoutCount) {
this.timeoutCount = timeoutCount;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties comAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties = (ComAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties) o;
return Objects.equals(translationFactory, comAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties.translationFactory) &&
Objects.equals(defaultConnectorLabel, comAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties.defaultConnectorLabel) &&
Objects.equals(defaultConnectorAttribution, comAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties.defaultConnectorAttribution) &&
Objects.equals(defaultConnectorWorkspaceId, comAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties.defaultConnectorWorkspaceId) &&
Objects.equals(defaultConnectorSubscriptionKey, comAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties.defaultConnectorSubscriptionKey) &&
Objects.equals(languageMapLocation, comAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties.languageMapLocation) &&
Objects.equals(categoryMapLocation, comAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties.categoryMapLocation) &&
Objects.equals(retryAttempts, comAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties.retryAttempts) &&
Objects.equals(timeoutCount, comAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties.timeoutCount);
}
@Override
public int hashCode() {
return Objects.hash(translationFactory, defaultConnectorLabel, defaultConnectorAttribution, defaultConnectorWorkspaceId, defaultConnectorSubscriptionKey, languageMapLocation, categoryMapLocation, retryAttempts, timeoutCount);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComAdobeGraniteTranslationConnectorMsftCoreImplMicrosoftTranslProperties {\n");
sb.append(" translationFactory: ").append(toIndentedString(translationFactory)).append("\n");
sb.append(" defaultConnectorLabel: ").append(toIndentedString(defaultConnectorLabel)).append("\n");
sb.append(" defaultConnectorAttribution: ").append(toIndentedString(defaultConnectorAttribution)).append("\n");
sb.append(" defaultConnectorWorkspaceId: ").append(toIndentedString(defaultConnectorWorkspaceId)).append("\n");
sb.append(" defaultConnectorSubscriptionKey: ").append(toIndentedString(defaultConnectorSubscriptionKey)).append("\n");
sb.append(" languageMapLocation: ").append(toIndentedString(languageMapLocation)).append("\n");
sb.append(" categoryMapLocation: ").append(toIndentedString(categoryMapLocation)).append("\n");
sb.append(" retryAttempts: ").append(toIndentedString(retryAttempts)).append("\n");
sb.append(" timeoutCount: ").append(toIndentedString(timeoutCount)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"cliffano@gmail.com"
] | cliffano@gmail.com |
1f34ae17720f909169d9c1a68cb3568e30030bd6 | 7af928921898828426b7af6eff4dd9b7e4252817 | /platforms/android-28/android-stubs-src/file/android/graphics/drawable/shapes/ArcShape.java | 35b38309af439a385165514bc249e0472ab0170f | [] | no_license | Davidxiahao/RAPID | 40c546a739a818a6562d0c9bce5df9f1a462d92b | e99f46155a2f3e6b84324ba75ecd22a278ba7167 | refs/heads/master | 2023-06-27T13:09:02.418736 | 2020-03-06T01:38:16 | 2020-03-06T01:38:16 | 239,509,129 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,194 | java | /*
* Copyright (C) 2007 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.graphics.drawable.shapes;
import android.graphics.Canvas;
import android.graphics.Paint;
/**
* Creates an arc shape. The arc shape starts at a specified angle and sweeps
* clockwise, drawing slices of pie.
* <p>
* The arc can be drawn to a {@link Canvas} with its own
* {@link #draw(Canvas, Paint)} method, but more graphical control is available
* if you instead pass the ArcShape to a
* {@link android.graphics.drawable.ShapeDrawable}.
*/
@SuppressWarnings({"unchecked", "deprecation", "all"})
public class ArcShape extends android.graphics.drawable.shapes.RectShape {
/**
* ArcShape constructor.
*
* @param startAngle the angle (in degrees) where the arc begins
* @param sweepAngle the sweep angle (in degrees). Anything equal to or
* greater than 360 results in a complete circle/oval.
*/
public ArcShape(float startAngle, float sweepAngle) { throw new RuntimeException("Stub!"); }
/**
* @return the angle (in degrees) where the arc begins
*/
public final float getStartAngle() { throw new RuntimeException("Stub!"); }
/**
* @return the sweep angle (in degrees)
*/
public final float getSweepAngle() { throw new RuntimeException("Stub!"); }
public void draw(android.graphics.Canvas canvas, android.graphics.Paint paint) { throw new RuntimeException("Stub!"); }
public void getOutline(android.graphics.Outline outline) { throw new RuntimeException("Stub!"); }
public android.graphics.drawable.shapes.ArcShape clone() throws java.lang.CloneNotSupportedException { throw new RuntimeException("Stub!"); }
}
| [
"davidxiahao@gmail.com"
] | davidxiahao@gmail.com |
18719bdb256772df7d0d38d281ae23c5767f9c16 | 7443cad6728a78e81ff18dfe95349044129c47b4 | /src/skylight-commons-core/src/test/java/br/skylight/commons/FixedListTest.java | cc5652daadee150afa1340b17d13db6a0a694112 | [
"MIT"
] | permissive | nibbleshift/skylight-uas | c78e022248a81e635f6ae13bc7fa9a7569eb29ec | d9be7a377ebd25bbf00aac857309a310d5121255 | refs/heads/master | 2021-05-21T03:48:19.477508 | 2020-04-02T18:12:01 | 2020-04-02T18:12:01 | 252,528,996 | 0 | 1 | MIT | 2020-04-02T17:59:33 | 2020-04-02T17:59:32 | null | UTF-8 | Java | false | false | 1,755 | java | package br.skylight.commons;
import br.skylight.commons.infra.FixedList;
public class FixedListTest {
public static void main(String[] args) {
FixedList<Integer> l = new FixedList<Integer>(5);
if(l.getSize()!=0) throw new AssertionError("OPS!");
l.addItem(1);
if(l.getSize()!=1) throw new AssertionError("OPS!");
if(l.getItem(0)!=1) throw new AssertionError("OPS!");
l.addItem(2);
l.addItem(3);
if(l.getSize()!=3) throw new AssertionError("OPS!");
if(l.getItem(0)!=1) throw new AssertionError("OPS!");
if(l.getItem(1)!=2) throw new AssertionError("OPS!");
if(l.getItem(2)!=3) throw new AssertionError("OPS!");
l.addItem(4);
l.addItem(5);
if(l.getSize()!=5) throw new AssertionError("OPS!");
if(l.getItem(0)!=1) throw new AssertionError("OPS!");
if(l.getItem(1)!=2) throw new AssertionError("OPS!");
if(l.getItem(2)!=3) throw new AssertionError("OPS!");
if(l.getItem(3)!=4) throw new AssertionError("OPS!");
if(l.getItem(4)!=5) throw new AssertionError("OPS!");
l.addItem(6);
if(l.getItem(0)!=2) throw new AssertionError("OPS!");
if(l.getItem(1)!=3) throw new AssertionError("OPS!");
if(l.getItem(2)!=4) throw new AssertionError("OPS!");
if(l.getItem(3)!=5) throw new AssertionError("OPS!");
if(l.getItem(4)!=6) throw new AssertionError("OPS!");
if(l.getSize()!=5) throw new AssertionError("OPS!");
l.addItem(7);
if(l.getItem(0)!=3) throw new AssertionError("OPS!");
if(l.getItem(1)!=4) throw new AssertionError("OPS!");
if(l.getItem(2)!=5) throw new AssertionError("OPS!");
if(l.getItem(3)!=6) throw new AssertionError("OPS!");
if(l.getItem(4)!=7) throw new AssertionError("OPS!");
if(l.getSize()!=5) throw new AssertionError("OPS!");
}
}
| [
"flaviostutz@gmail.com"
] | flaviostutz@gmail.com |
35ce3a14b614eb2de179126fcb7e7b3561dad0c7 | 477781f9346c956597cfc46f8d1cb559ff179474 | /jnetwork/src/main/java/top/jplayer/networklibrary/net/interceptor/JsonFixInterceptor.java | 90a813ad1d99b6a12ae2a97c9caac164aba1fbf7 | [] | no_license | CleverMod/jnetwork | 31afd4bd0a44b0a676e75bf2271d6b77375cc12c | 8efeeb4b06491d48b5405d460a7e58cd9b78b428 | refs/heads/master | 2023-04-19T16:24:16.852574 | 2021-01-30T10:03:14 | 2021-01-30T10:03:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,193 | java | package top.jplayer.networklibrary.net.interceptor;
import androidx.annotation.NonNull;
import java.io.IOException;
import java.nio.charset.Charset;
import okhttp3.Interceptor;
import okhttp3.MediaType;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
import okio.Buffer;
import okio.BufferedSource;
/**
* Created by Administrator on 2018/1/26.
* json 解析自定义,如果返回的Json并不是规范的,可自行修改 method: getJsonBody(String sting)
*/
public class JsonFixInterceptor implements Interceptor {
private static final Charset UTF8 = Charset.forName("UTF-8");
@Override
public Response intercept(@NonNull Chain chain) throws IOException {
Request request = chain.request();
Response response = chain.proceed(request);
response = decrypt(response);
return response;
}
private Response decrypt(Response response) throws IOException {
if (response.isSuccessful()) {
ResponseBody body = response.body();
if (body != null) {
BufferedSource source = body.source();
source.request(Long.MAX_VALUE); // Buffer the entire body.
Buffer buffer = source.buffer();
MediaType contentType = body.contentType();
if (contentType != null && contentType.type().contains("json")) {//判断是否是json类型
String string = buffer.clone().readString(UTF8);
String bodyString = getJsonBody(string);
ResponseBody responseBody = ResponseBody.create(contentType, bodyString);
response = response.newBuilder().body(responseBody).build();
}
}
return response;
}
return response;
}
/**
* @param string 原生body
* @return 修复的body
*/
@NonNull
public String getJsonBody(String string) {
String bodyString = string;
if (string.contains("(") && string.contains(")")) {
bodyString = string.substring(string.indexOf("(") + 1, string.lastIndexOf(")"));
}
return bodyString;
}
}
| [
"admin@example.com"
] | admin@example.com |
3d442d95d31f34e7dfadba2ce62aef4e72237d2e | 3e0d77eedc400f6925ee8c75bf32f30486f70b50 | /CoreJava/src/com/techchefs/javaapps/learning/overloading/TestOverloading.java | 47f4f473b14faeb77eda9f5024ec96c80ff086a2 | [] | no_license | sanghante/ELF-06June19-TechChefs-SantoshG | 1c1349a1e4dcea33923dda73cdc7e7dbc54f48e6 | a13c01aa22e057dad1e39546a50af1be6ab78786 | refs/heads/master | 2023-01-10T05:58:52.183306 | 2019-08-14T13:26:12 | 2019-08-14T13:26:12 | 192,526,998 | 0 | 0 | null | 2023-01-04T07:13:13 | 2019-06-18T11:30:13 | Rich Text Format | UTF-8 | Java | false | false | 227 | java | package com.techchefs.javaapps.learning.overloading;
public class TestOverloading {
public static void main(String[] args) {
MethodOverloading m = new MethodOverloading();
m.search(9);
m.search("Chamundi");
}
}
| [
"santhosh.ghante@yahoo.com"
] | santhosh.ghante@yahoo.com |
18cefd347b1d71d29548295374cb0a0b40a2f1da | 108542e93f7c9c1d2aa36a04d597c75e221ae463 | /BSCCollect/SpringHibernateExample/src/main/java/com/bsc/collect/model/PasswordEncoder.java | 72bf21064449e44b4841885f7acbe668bd19881b | [] | no_license | hasithalakmal/BSCCollect | 36694fc8e1c04dba2a2cd4096fc0f719c51596de | 2022ffba58b9e24e9531d57da76bec064034f336 | refs/heads/master | 2021-01-10T11:38:06.473290 | 2016-01-11T12:17:37 | 2016-01-11T12:17:37 | 43,597,815 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,593 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.bsc.collect.model;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Hasitha
*/
public class PasswordEncoder {
private SecureRandom random = new SecureRandom();
public String Encode(String pass) {
try {
String password = pass;
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(password.getBytes());
byte byteData[] = md.digest();
//convert the byte to hex format method 1
StringBuilder sb = new StringBuilder();
for (int i = 0; i < byteData.length; i++) {
sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1));
}
String newpass = (sb.toString());
return newpass;
} catch (NoSuchAlgorithmException ex) {
Logger.getLogger(PasswordEncoder.class.getName()).log(Level.SEVERE, null, ex);
return "error";
}
}
public String nextPassword() {
return new BigInteger(50, random).toString(32);
}
public static void main(String[] args) {
PasswordEncoder pe = new PasswordEncoder();
String x = pe.Encode("massa");
System.out.println(x);
}
}
| [
"ghasithalakmal@gmail.com"
] | ghasithalakmal@gmail.com |
155fee14e67616653610924cce296e88199a899a | fbf92d6fb8904b57532b0a0f1d328b870031744a | /src/com/zch/safelottery/http/RequestHandle.java | 0772ed53ad31665effa88427c3640da6ee6c1fb5 | [] | no_license | liyq1406/safelottery | 1960fa3cdc7337c654e6aa57818501134d8300ec | 0cc02d92db5cc71489b708dc322afc6773630a62 | refs/heads/master | 2021-01-22T13:51:51.377253 | 2015-09-28T09:49:36 | 2015-09-28T09:49:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,489 | java | package com.zch.safelottery.http;
import java.lang.ref.WeakReference;
/**
* A Handle to an AsyncRequest which can be used to cancel a running request.
*/
class RequestHandle {
private final WeakReference<AsyncHttpRequest> request;
public RequestHandle(AsyncHttpRequest request) {
this.request = new WeakReference(request);
}
/**
* Attempts to cancel this request. This attempt will fail if the request has already completed,
* has already been cancelled, or could not be cancelled for some other reason. If successful,
* and this request has not started when cancel is called, this request should never run. If the
* request has already started, then the mayInterruptIfRunning parameter determines whether the
* thread executing this request should be interrupted in an attempt to stop the request.
* <p> </p> After this method returns, subsequent calls to isDone() will always return
* true. Subsequent calls to isCancelled() will always return true if this method returned
* true.
*
* @param mayInterruptIfRunning true if the thread executing this request should be interrupted;
* otherwise, in-progress requests are allowed to complete
* @return false if the request could not be cancelled, typically because it has already
* completed normally; true otherwise
*/
public boolean cancel(boolean mayInterruptIfRunning) {
AsyncHttpRequest _request = request.get();
return _request == null || _request.cancel(mayInterruptIfRunning);
}
/**
* Returns true if this task completed. Completion may be due to normal termination, an
* exception, or cancellation -- in all of these cases, this method will return true.
*
* @return true if this task completed
*/
public boolean isFinished() {
AsyncHttpRequest _request = request.get();
return _request == null || _request.isDone();
}
/**
* Returns true if this task was cancelled before it completed normally.
*
* @return true if this task was cancelled before it completed
*/
public boolean isCancelled() {
AsyncHttpRequest _request = request.get();
return _request == null || _request.isCancelled();
}
public boolean shouldBeGarbageCollected() {
boolean should = isCancelled() || isFinished();
if (should)
request.clear();
return should;
}
} | [
"meixililulu@163.com"
] | meixililulu@163.com |
b551ea54bff34696cfed902879e7188d8e60ebef | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.browser-base/sources/org/chromium/chrome/browser/explore_sites/ExploreSitesBackgroundTask.java | b01ad9ba2121e7108df960e132eeded4730bea03 | [] | no_license | phwd/quest-tracker | 286e605644fc05f00f4904e51f73d77444a78003 | 3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba | refs/heads/main | 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null | UTF-8 | Java | false | false | 1,942 | java | package org.chromium.chrome.browser.explore_sites;
import J.N;
import android.content.Context;
import org.chromium.base.ContextUtils;
import org.chromium.chrome.browser.profiles.Profile;
/* compiled from: chromium-OculusBrowser.apk-stable-281887347 */
public class ExploreSitesBackgroundTask extends AbstractC4798sm0 {
public AbstractC0804Ne f;
public Profile g;
public static void l(boolean z) {
AbstractC2898hf.b().a(ContextUtils.getApplicationContext(), 100);
C1416Xe1 xe1 = new C1416Xe1();
xe1.f9225a = 90000000;
xe1.b = 7200000;
xe1.c = true;
C1477Ye1 a2 = xe1.a();
C1111Se1 se1 = new C1111Se1(101);
se1.g = a2;
se1.c = 1;
se1.e = true;
se1.f = z;
AbstractC2898hf.b().b(ContextUtils.getApplicationContext(), se1.a());
}
@Override // defpackage.AbstractC0865Oe
public void c(Context context) {
l(true);
}
@Override // defpackage.AbstractC4798sm0
public int e(Context context, C2046cf1 cf1, AbstractC0804Ne ne) {
return C5222vE.d(context) == 6 ? 1 : 0;
}
@Override // defpackage.AbstractC4798sm0
public void f(Context context, C2046cf1 cf1, AbstractC0804Ne ne) {
if (!(N.MwBQ$0Eq() == 0)) {
AbstractC2898hf.b().a(ContextUtils.getApplicationContext(), 101);
return;
}
this.f = ne;
if (this.g == null) {
this.g = Profile.b();
}
N.MYfYpI3c(this.g, false, new C5753yM(this));
AbstractC3364kK0.g("ExploreSites.CatalogUpdateRequestSource", 2, 3);
}
@Override // defpackage.AbstractC4798sm0
public boolean g(Context context, C2046cf1 cf1) {
return false;
}
@Override // defpackage.AbstractC4798sm0
public boolean h(Context context, C2046cf1 cf1) {
return false;
}
public final /* synthetic */ void k() {
this.f.a(false);
}
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
8c8134d8d25150cbf4f06786f6de741485a0ff99 | 88bbe88c848cffd4918c85849db5d0cefe883cca | /src/main/java/com/beans/observables/properties/atomic/AtomicObservableDoubleProperty.java | 7a6d71887cc581c8e75b35e9daf2e4150fd87ae0 | [
"Apache-2.0"
] | permissive | tomtzook/JavaBeans | d7c3db0a3e46155d1af6c26f5f4970d2a28f5993 | c000c98d0af44e4da5de2c52fbe42729e48a6cc2 | refs/heads/master | 2022-12-22T06:03:09.972302 | 2022-12-20T19:22:30 | 2022-12-20T19:22:30 | 145,975,734 | 2 | 0 | Apache-2.0 | 2019-04-04T17:31:55 | 2018-08-24T10:04:25 | Java | UTF-8 | Java | false | false | 2,566 | java | package com.beans.observables.properties.atomic;
import com.beans.observables.binding.AtomicPropertyBindingController;
import com.beans.observables.binding.PropertyBindingController;
import com.beans.observables.listeners.ObservableEventController;
import com.beans.observables.properties.ObservableDoubleProperty;
import com.beans.observables.properties.ObservableDoublePropertyBase;
import com.notifier.EventController;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
/**
* <p>
* A <b>thread-safe</b> implementation of {@link ObservableDoubleProperty}, holding a
* variable which is accessed for writing or reading through {@link #setAsDouble(double)}
* and {@link #getAsDouble()}.
* </p>
* <p>
* This implementation uses the <em>java.util.concurrent.atomic</em> package, to provide
* a lock-free, atomic read and write operations.
* </p>
* <p>
* In some cases, {@link AtomicLong} may old a lock, specifically, if the operating
* system does not support 64-bit operations.
* </p>
* <p>
* Depending on the {@link ObservableEventController} used, it is possible
* that changes from multiple threads won't dispatch in the correct order.
* </p>
*
* @since JavaBeans 1.0
*/
public class AtomicObservableDoubleProperty extends ObservableDoublePropertyBase {
private final AtomicLong mValue;
public AtomicObservableDoubleProperty(Object bean,
EventController eventController,
double initialValue) {
super(bean, eventController);
mValue = new AtomicLong(Double.doubleToLongBits(initialValue));
}
public AtomicObservableDoubleProperty(EventController eventController,
double initialValue) {
super(eventController);
mValue = new AtomicLong(Double.doubleToLongBits(initialValue));
}
@Override
protected void setInternalDirect(Double value) {
mValue.set(Double.doubleToLongBits(value));
}
@Override
protected void setInternal(double value) {
long newLongValue = Double.doubleToLongBits(value);
long oldLongValue = mValue.getAndSet(newLongValue);
if (oldLongValue != newLongValue) {
double oldValue = Double.longBitsToDouble(oldLongValue);
fireValueChangedEvent(oldValue, value);
}
}
@Override
protected double getInternal() {
return Double.longBitsToDouble(mValue.get());
}
}
| [
"tomtzook@gmail.com"
] | tomtzook@gmail.com |
559210bf7dafa234fe5758a0c3c3535d26a3b976 | b327a374de29f80d9b2b3841db73f3a6a30e5f0d | /out/target/common/obj/APPS/FrameworksCoreTests_intermediates/src/src/android/os/IBinderThreadPriorityService.java | bd25fcbed79f70c6da77101fa06028c50176529b | [] | no_license | nikoltu/aosp | 6409c386ed6d94c15d985dd5be2c522fefea6267 | f99d40c9d13bda30231fb1ac03258b6b6267c496 | refs/heads/master | 2021-01-22T09:26:24.152070 | 2011-09-27T15:10:30 | 2011-09-27T15:10:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,495 | java | /*
* This file is auto-generated. DO NOT MODIFY.
* Original file: frameworks/base/core/tests/coretests/src/android/os/IBinderThreadPriorityService.aidl
*/
package android.os;
public interface IBinderThreadPriorityService extends android.os.IInterface
{
/** Local-side IPC implementation stub class. */
public static abstract class Stub extends android.os.Binder implements android.os.IBinderThreadPriorityService
{
private static final java.lang.String DESCRIPTOR = "android.os.IBinderThreadPriorityService";
/** Construct the stub at attach it to the interface. */
public Stub()
{
this.attachInterface(this, DESCRIPTOR);
}
/**
* Cast an IBinder object into an android.os.IBinderThreadPriorityService interface,
* generating a proxy if needed.
*/
public static android.os.IBinderThreadPriorityService asInterface(android.os.IBinder obj)
{
if ((obj==null)) {
return null;
}
android.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof android.os.IBinderThreadPriorityService))) {
return ((android.os.IBinderThreadPriorityService)iin);
}
return new android.os.IBinderThreadPriorityService.Stub.Proxy(obj);
}
public android.os.IBinder asBinder()
{
return this;
}
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
switch (code)
{
case INTERFACE_TRANSACTION:
{
reply.writeString(DESCRIPTOR);
return true;
}
case TRANSACTION_getThreadPriority:
{
data.enforceInterface(DESCRIPTOR);
int _result = this.getThreadPriority();
reply.writeNoException();
reply.writeInt(_result);
return true;
}
case TRANSACTION_getThreadSchedulerGroup:
{
data.enforceInterface(DESCRIPTOR);
java.lang.String _result = this.getThreadSchedulerGroup();
reply.writeNoException();
reply.writeString(_result);
return true;
}
case TRANSACTION_callBack:
{
data.enforceInterface(DESCRIPTOR);
android.os.IBinderThreadPriorityService _arg0;
_arg0 = android.os.IBinderThreadPriorityService.Stub.asInterface(data.readStrongBinder());
this.callBack(_arg0);
reply.writeNoException();
return true;
}
case TRANSACTION_setPriorityAndCallBack:
{
data.enforceInterface(DESCRIPTOR);
int _arg0;
_arg0 = data.readInt();
android.os.IBinderThreadPriorityService _arg1;
_arg1 = android.os.IBinderThreadPriorityService.Stub.asInterface(data.readStrongBinder());
this.setPriorityAndCallBack(_arg0, _arg1);
reply.writeNoException();
return true;
}
}
return super.onTransact(code, data, reply, flags);
}
private static class Proxy implements android.os.IBinderThreadPriorityService
{
private android.os.IBinder mRemote;
Proxy(android.os.IBinder remote)
{
mRemote = remote;
}
public android.os.IBinder asBinder()
{
return mRemote;
}
public java.lang.String getInterfaceDescriptor()
{
return DESCRIPTOR;
}
public int getThreadPriority() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
int _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
mRemote.transact(Stub.TRANSACTION_getThreadPriority, _data, _reply, 0);
_reply.readException();
_result = _reply.readInt();
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
public java.lang.String getThreadSchedulerGroup() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
java.lang.String _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
mRemote.transact(Stub.TRANSACTION_getThreadSchedulerGroup, _data, _reply, 0);
_reply.readException();
_result = _reply.readString();
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
public void callBack(android.os.IBinderThreadPriorityService recurse) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeStrongBinder((((recurse!=null))?(recurse.asBinder()):(null)));
mRemote.transact(Stub.TRANSACTION_callBack, _data, _reply, 0);
_reply.readException();
}
finally {
_reply.recycle();
_data.recycle();
}
}
public void setPriorityAndCallBack(int priority, android.os.IBinderThreadPriorityService recurse) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeInt(priority);
_data.writeStrongBinder((((recurse!=null))?(recurse.asBinder()):(null)));
mRemote.transact(Stub.TRANSACTION_setPriorityAndCallBack, _data, _reply, 0);
_reply.readException();
}
finally {
_reply.recycle();
_data.recycle();
}
}
}
static final int TRANSACTION_getThreadPriority = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
static final int TRANSACTION_getThreadSchedulerGroup = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);
static final int TRANSACTION_callBack = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);
static final int TRANSACTION_setPriorityAndCallBack = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);
}
public int getThreadPriority() throws android.os.RemoteException;
public java.lang.String getThreadSchedulerGroup() throws android.os.RemoteException;
public void callBack(android.os.IBinderThreadPriorityService recurse) throws android.os.RemoteException;
public void setPriorityAndCallBack(int priority, android.os.IBinderThreadPriorityService recurse) throws android.os.RemoteException;
}
| [
"fred.faust@gmail.com"
] | fred.faust@gmail.com |
4047740bd392f65062dcce78c7582fac57ae1cdb | 8f9b2efbd298f1b8f78275544da6ce21183716f5 | /graphql/src/main/java/me/retrodaredevil/solarthing/rest/cache/CacheCalc.java | 913241934b5cb71075e6ba3696916c41e6d99903 | [
"MIT"
] | permissive | nimratbrar/solarthing | fff552fdd2da8fc023b7affd1bd557121d74adbb | 995af54829a73ede2d6c3ffbc98143b793abdd8e | refs/heads/master | 2023-07-05T15:20:06.256301 | 2021-08-17T03:17:25 | 2021-08-17T03:17:25 | 400,350,902 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,386 | java | package me.retrodaredevil.solarthing.rest.cache;
import me.retrodaredevil.solarthing.annotations.UtilityClass;
import me.retrodaredevil.solarthing.cache.packets.IdentificationCacheNode;
import me.retrodaredevil.solarthing.cache.packets.data.IdentificationCacheData;
import me.retrodaredevil.solarthing.packets.TimestampedPacket;
import me.retrodaredevil.solarthing.packets.identification.Identifier;
import me.retrodaredevil.solarthing.packets.identification.IdentifierFragment;
import me.retrodaredevil.solarthing.solar.accumulation.*;
import me.retrodaredevil.solarthing.solar.accumulation.value.AccumulationValue;
import me.retrodaredevil.solarthing.solar.accumulation.value.AccumulationValueFactory;
import me.retrodaredevil.solarthing.solar.common.DailyData;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
import java.util.function.Function;
@UtilityClass
public final class CacheCalc {
private CacheCalc() { throw new UnsupportedOperationException(); }
/**
* Ok, so this function may seem complex, and yeah, it is. The purpose of this is to find the total accumulation over a period of time.
* This is designed with generics to be able to used for floats, or data types containing multiple floats, but can also work with other data
* types that can be added or subtracted. The 4 generic type parameters have been given meaningful names to prevent confusion.
*
* @param identifierFragment The {@link IdentifierFragment}
* @param timestampedPackets The list of timestamped packets
* @param periodStart The start of the period
* @param periodDuration The duration of the period
* @param totalGetter Contains a function to get the desired data from a packet
* @param accumulationValueFactory The factory for the {@link AccumulationValue} being used
* @param converter A function to convert the {@link AccumulationValue} to the type used to create the {@link IdentificationCacheData}
* @param dataCreator Contains a function to create the {@link IdentificationCacheData}
* @param <DATA> The type data that will be cached
* @param <PACKET> The type of packet that will be used to calculate the cache
* @param <VALUE> The type of {@link AccumulationValue} that is used to accumulate the data
* @param <ACCEPTED_VALUE> The type that {@code dataCreator} requires to create a {@code DATA} type.
* @return A new {@link IdentificationCacheData} with data created using {@code dataCreator}
*/
public static <DATA extends IdentificationCacheData, PACKET extends DailyData, VALUE extends AccumulationValue<VALUE>, ACCEPTED_VALUE> IdentificationCacheNode<DATA> calculateCache(
IdentifierFragment identifierFragment, List<TimestampedPacket<PACKET>> timestampedPackets, Instant periodStart, Duration periodDuration,
TotalGetter<PACKET, VALUE> totalGetter,
AccumulationValueFactory<VALUE> accumulationValueFactory, Function<VALUE, ACCEPTED_VALUE> converter, DataCreator<DATA, ACCEPTED_VALUE> dataCreator) {
AccumulationConfig accumulationConfig = AccumulationConfig.createDefault(periodStart.toEpochMilli());
List<AccumulationPair<PACKET>> accumulationPairs = AccumulationUtil.getAccumulationPairs(timestampedPackets, accumulationConfig);
List<AccumulationCalc.SumNode<VALUE>> sumNodes = AccumulationCalc.getTotals(accumulationPairs, totalGetter, timestampedPackets, accumulationValueFactory);
long periodStartDateMillis = periodStart.toEpochMilli();
long previousPeriodStartDateMillis = periodStartDateMillis - periodDuration.toMillis();
long unknownCutOffDateMillis = periodStartDateMillis - CacheHandler.INFO_DURATION.toMillis();
long periodEndDateMillis = periodStart.toEpochMilli() + periodDuration.toMillis();
AccumulationCalc.SumNode<VALUE> lastDataBeforePreviousPeriodStart = null;
AccumulationCalc.SumNode<VALUE> lastDataBeforePeriodStart = null;
AccumulationCalc.SumNode<VALUE> firstDataAfterPeriodStart = null;
AccumulationCalc.SumNode<VALUE> lastDataBeforePeriodEnd = null;
for (AccumulationCalc.SumNode<VALUE> sumNode : sumNodes) {
long dateMillis = sumNode.getDateMillis();
if (dateMillis >= periodEndDateMillis) {
break;
}
if (dateMillis < unknownCutOffDateMillis) {
// If we have data before this, we need to not use it because using it could yield different results depending on the amount of data
// we have available to use -- We don't want that because the result of calculating a cache should be the same every time.
continue;
}
if (dateMillis < previousPeriodStartDateMillis) {
lastDataBeforePreviousPeriodStart = sumNode;
} else if (dateMillis < periodStartDateMillis) {
lastDataBeforePeriodStart = sumNode;
} else {
if (firstDataAfterPeriodStart == null) {
firstDataAfterPeriodStart = sumNode;
}
lastDataBeforePeriodEnd = sumNode;
}
}
final DATA data;
if (firstDataAfterPeriodStart == null) {
assert lastDataBeforePeriodEnd == null;
data = dataCreator.create(
identifierFragment.getIdentifier(),
converter.apply(accumulationValueFactory.getZero()),
null, null,
converter.apply(accumulationValueFactory.getZero()),
null
);
} else {
AccumulationCalc.SumNode<VALUE> firstData = lastDataBeforePeriodStart == null ? firstDataAfterPeriodStart : lastDataBeforePeriodStart;
VALUE generation = lastDataBeforePeriodEnd.getSum().minus(firstData.getSum());
final VALUE unknownGeneration;
final Long unknownStartDateMillis;
if (lastDataBeforePeriodStart == null && lastDataBeforePreviousPeriodStart != null) {
unknownGeneration = firstDataAfterPeriodStart.getSum().minus(lastDataBeforePreviousPeriodStart.getSum());
unknownStartDateMillis = lastDataBeforePreviousPeriodStart.getDateMillis();
} else {
unknownGeneration = accumulationValueFactory.getZero();
unknownStartDateMillis = null;
}
data = dataCreator.create(
identifierFragment.getIdentifier(),
converter.apply(generation),
firstData.getDateMillis(), lastDataBeforePeriodEnd.getDateMillis(),
converter.apply(unknownGeneration),
unknownStartDateMillis
);
}
return new IdentificationCacheNode<>(identifierFragment.getFragmentId(), data);
}
@FunctionalInterface
public interface DataCreator<T, U> {
T create(Identifier identifier, U mainData, Long firstDateMillis, Long lastDateMillis, U unknownData, Long unknownStartDateMillis);
}
}
| [
"retrodaredevil@gmail.com"
] | retrodaredevil@gmail.com |
cc0d52289d123500992940de6cf9ae8abd7eb701 | 5ca035e4a777a16517abdce0cb76bb8905b58cf4 | /getTogether/src/com/gt/gettogether/department/work/model/service/WorkCommentService.java | 18a0e14ea2daeee78c5966fe26f90eb630a5ca07 | [] | no_license | TeamGroupTwo/getTogether | 2c089a1ad827b9bf83cea2e4e54c9ec72d33bf06 | 71ad936c209af157405980859ed8438bf6cb786c | refs/heads/master | 2020-03-18T21:06:33.173104 | 2018-06-11T12:28:15 | 2018-06-11T12:28:15 | 135,259,784 | 2 | 1 | null | 2018-06-12T12:02:44 | 2018-05-29T07:43:07 | Java | UTF-8 | Java | false | false | 1,033 | java | package com.gt.gettogether.department.work.model.service;
import java.sql.Connection;
import java.util.ArrayList;
import com.gt.gettogether.department.work.model.dao.WorkCommentDao;
import com.gt.gettogether.department.work.model.vo.WorkComment;
import static com.gt.gettogether.common.jdbc.JDBCTemplate.*;
public class WorkCommentService {
public ArrayList<WorkComment> selectWorkCommentList() {
return null;
}
public int insertWorkComment(WorkComment wc) {
Connection con = getConnection();
int result = new WorkCommentDao().insertWorkComment(con, wc);
if(result > 0) commit(con);
else rollback(con);
close(con);
return result;
}
public int updateWorkComment() {
return 0;
}
public int deleteWorkComment() {
return 0;
}
public int selectInsertOne(int eNo) {
Connection con = getConnection();
int wcNo = new WorkCommentDao().selectInsertOne(con, eNo);
close(con);
return wcNo;
}
}
| [
"user2@KH_H"
] | user2@KH_H |
913f8eac3a3f6420b2de7fd9610a83abfc29ce7d | 1415496f94592ba4412407b71dc18722598163dd | /doc/libjitisi/sources/org/jitsi/impl/neomedia/codec/audio/silk/LPVariableCutoff.java | a86ab4f821f0cd72ebfb86d20ad0cd0d17817082 | [
"Apache-2.0"
] | permissive | lhzheng880828/VOIPCall | ad534535869c47b5fc17405b154bdc651b52651b | a7ba25debd4bd2086bae2a48306d28c614ce0d4a | refs/heads/master | 2021-07-04T17:25:21.953174 | 2020-09-29T07:29:42 | 2020-09-29T07:29:42 | 183,576,020 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,754 | java | package org.jitsi.impl.neomedia.codec.audio.silk;
import javax.media.Buffer;
public class LPVariableCutoff {
static final /* synthetic */ boolean $assertionsDisabled = (!LPVariableCutoff.class.desiredAssertionStatus());
static void SKP_Silk_LP_interpolate_filter_taps(int[] B_Q28, int[] A_Q28, int ind, int fac_Q16) {
int i_djinn;
int nb;
int na;
if (ind >= 4) {
for (i_djinn = 0; i_djinn < 3; i_djinn++) {
B_Q28[i_djinn] = TablesOther.SKP_Silk_Transition_LP_B_Q28[4][i_djinn];
}
for (i_djinn = 0; i_djinn < 2; i_djinn++) {
A_Q28[i_djinn] = TablesOther.SKP_Silk_Transition_LP_A_Q28[4][i_djinn];
}
} else if (fac_Q16 <= 0) {
for (i_djinn = 0; i_djinn < 3; i_djinn++) {
B_Q28[i_djinn] = TablesOther.SKP_Silk_Transition_LP_B_Q28[ind][i_djinn];
}
for (i_djinn = 0; i_djinn < 2; i_djinn++) {
A_Q28[i_djinn] = TablesOther.SKP_Silk_Transition_LP_A_Q28[ind][i_djinn];
}
} else if (fac_Q16 == SigProcFIX.SKP_SAT16(fac_Q16)) {
for (nb = 0; nb < 3; nb++) {
B_Q28[nb] = Macros.SKP_SMLAWB(TablesOther.SKP_Silk_Transition_LP_B_Q28[ind][nb], TablesOther.SKP_Silk_Transition_LP_B_Q28[ind + 1][nb] - TablesOther.SKP_Silk_Transition_LP_B_Q28[ind][nb], fac_Q16);
}
for (na = 0; na < 2; na++) {
A_Q28[na] = Macros.SKP_SMLAWB(TablesOther.SKP_Silk_Transition_LP_A_Q28[ind][na], TablesOther.SKP_Silk_Transition_LP_A_Q28[ind + 1][na] - TablesOther.SKP_Silk_Transition_LP_A_Q28[ind][na], fac_Q16);
}
} else if (fac_Q16 == 32768) {
for (nb = 0; nb < 3; nb++) {
B_Q28[nb] = SigProcFIX.SKP_RSHIFT(TablesOther.SKP_Silk_Transition_LP_B_Q28[ind][nb] + TablesOther.SKP_Silk_Transition_LP_B_Q28[ind + 1][nb], 1);
}
for (na = 0; na < 2; na++) {
A_Q28[na] = SigProcFIX.SKP_RSHIFT(TablesOther.SKP_Silk_Transition_LP_A_Q28[ind][na] + TablesOther.SKP_Silk_Transition_LP_A_Q28[ind + 1][na], 1);
}
} else if ($assertionsDisabled || Buffer.FLAG_SKIP_FEC - fac_Q16 == SigProcFIX.SKP_SAT16(Buffer.FLAG_SKIP_FEC - fac_Q16)) {
for (nb = 0; nb < 3; nb++) {
B_Q28[nb] = Macros.SKP_SMLAWB(TablesOther.SKP_Silk_Transition_LP_B_Q28[ind + 1][nb], TablesOther.SKP_Silk_Transition_LP_B_Q28[ind][nb] - TablesOther.SKP_Silk_Transition_LP_B_Q28[ind + 1][nb], Buffer.FLAG_SKIP_FEC - fac_Q16);
}
for (na = 0; na < 2; na++) {
A_Q28[na] = Macros.SKP_SMLAWB(TablesOther.SKP_Silk_Transition_LP_A_Q28[ind + 1][na], TablesOther.SKP_Silk_Transition_LP_A_Q28[ind][na] - TablesOther.SKP_Silk_Transition_LP_A_Q28[ind + 1][na], Buffer.FLAG_SKIP_FEC - fac_Q16);
}
} else {
throw new AssertionError();
}
}
static void SKP_Silk_LP_variable_cutoff(SKP_Silk_LP_state psLP, short[] out, int out_offset, short[] in, int in_offset, int frame_length) {
int[] B_Q28 = new int[3];
int[] A_Q28 = new int[2];
if (!$assertionsDisabled && psLP.transition_frame_no < 0) {
throw new AssertionError();
} else if ($assertionsDisabled || ((psLP.transition_frame_no <= 128 && psLP.mode == 0) || (psLP.transition_frame_no <= 256 && psLP.mode == 1))) {
if (psLP.transition_frame_no > 0) {
int fac_Q16;
int ind;
if (psLP.mode == 0) {
if (psLP.transition_frame_no < 128) {
fac_Q16 = psLP.transition_frame_no << 11;
ind = fac_Q16 >> 16;
fac_Q16 -= ind << 16;
if (!$assertionsDisabled && ind < 0) {
throw new AssertionError();
} else if ($assertionsDisabled || ind < 5) {
SKP_Silk_LP_interpolate_filter_taps(B_Q28, A_Q28, ind, fac_Q16);
psLP.transition_frame_no++;
} else {
throw new AssertionError();
}
} else if (psLP.transition_frame_no == 128) {
SKP_Silk_LP_interpolate_filter_taps(B_Q28, A_Q28, 4, 0);
}
} else if (psLP.mode == 1) {
if (psLP.transition_frame_no < 256) {
fac_Q16 = (256 - psLP.transition_frame_no) << 10;
ind = fac_Q16 >> 16;
fac_Q16 -= ind << 16;
if (!$assertionsDisabled && ind < 0) {
throw new AssertionError();
} else if ($assertionsDisabled || ind < 5) {
SKP_Silk_LP_interpolate_filter_taps(B_Q28, A_Q28, ind, fac_Q16);
psLP.transition_frame_no++;
} else {
throw new AssertionError();
}
} else if (psLP.transition_frame_no == 256) {
SKP_Silk_LP_interpolate_filter_taps(B_Q28, A_Q28, 0, 0);
}
}
}
if (psLP.transition_frame_no > 0) {
BiquadAlt.SKP_Silk_biquad_alt(in, in_offset, B_Q28, A_Q28, psLP.In_LP_State, out, out_offset, frame_length);
return;
}
for (int i_djinn = 0; i_djinn < frame_length; i_djinn++) {
out[out_offset + i_djinn] = in[in_offset + i_djinn];
}
} else {
throw new AssertionError();
}
}
}
| [
"lhzheng@grandstream.cn"
] | lhzheng@grandstream.cn |
eb22fd2e7ed19d4e3c89e4afe21002ad49915115 | 53e1530d418dcda795cd140db4d736a65695f37b | /IdeaProjects/src/part1/chapter09/p2/Demo.java | 595ec275646e5f17456f0f9d7ee96dbba186eca2 | [] | no_license | Zed180881/Zed_repo | a03bac736e3c61c0bea61b2f81624c4bc604870b | 6e9499e7ec3cfa9dc11f9d7a92221522c56b5f61 | refs/heads/master | 2020-04-05T18:57:47.596468 | 2016-11-02T07:51:30 | 2016-11-02T07:51:30 | 52,864,144 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 194 | java | package part1.chapter09.p2;
public class Demo {
public static void main(String[] args) {
Protection2 ob1 = new Protection2();
OtherPackage ob2 = new OtherPackage();
}
}
| [
"zed180881@gmail.com"
] | zed180881@gmail.com |
29fa6f484d8833bfbb16ba62a7dfb90ffc0b311a | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/tencent/mm/plugin/sns/storage/AdLandingPagesStorage/AdLandingPageComponent/component/widget/a$2.java | d5ab53638fb2121b0c66a2d7f4158b62151c211e | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 581 | java | package com.tencent.mm.plugin.sns.storage.AdLandingPagesStorage.AdLandingPageComponent.component.widget;
import com.tencent.mm.sdk.platformtools.bi;
import com.tencent.mm.sdk.platformtools.x;
class a$2 implements Runnable {
final /* synthetic */ a nGD;
final /* synthetic */ double ncU;
a$2(a aVar, double d) {
this.nGD = aVar;
this.ncU = d;
}
public final void run() {
x.i("MicroMsg.SightPlayController", "SeekToFrame %f %s", new Object[]{Double.valueOf(this.ncU), bi.cjd().toString()});
a.a(this.nGD, this.ncU);
}
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.