blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
35
| license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 539
values | visit_date
timestamp[us]date 2016-08-02 21:09:20
2023-09-06 10:10:07
| revision_date
timestamp[us]date 1990-01-30 01:55:47
2023-09-05 21:45:37
| committer_date
timestamp[us]date 2003-07-12 18:48:29
2023-09-05 21:45:37
| github_id
int64 7.28k
684M
⌀ | star_events_count
int64 0
77.7k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 13
values | gha_event_created_at
timestamp[us]date 2012-06-11 04:05:37
2023-09-14 21:59:18
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-28 02:39:21
⌀ | gha_language
stringclasses 62
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 128
12.8k
| extension
stringclasses 11
values | content
stringlengths 128
8.19k
| authors
listlengths 1
1
| author_id
stringlengths 1
79
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
96a59018caa2e72dda9f12efb071233c1acf489c
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/MOCKITO-21b-2-4-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/mockito/internal/creation/instance/ConstructorInstantiator_ESTest.java
|
745b41cb61c3c1e3c9e164e63c768254af6a8ca8
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 964
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Oct 29 08:32:12 UTC 2021
*/
package org.mockito.internal.creation.instance;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.mockito.internal.creation.instance.ConstructorInstantiator;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class ConstructorInstantiator_ESTest extends ConstructorInstantiator_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
Object object0 = new Object();
ConstructorInstantiator constructorInstantiator0 = new ConstructorInstantiator(object0);
Class<Integer> class0 = Integer.class;
// Undeclared exception!
constructorInstantiator0.newInstance((Class<?>) class0);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
3928ba7e31532797be16d5d6b538c41114ab7d7b
|
c8688db388a2c5ac494447bac90d44b34fa4132c
|
/sources/com/google/android/gms/internal/ads/zzvv.java
|
2f8afbb4a66e897e8ffc07df5a563e9c1915d658
|
[] |
no_license
|
mred312/apk-source
|
98dacfda41848e508a0c9db2c395fec1ae33afa1
|
d3ca7c46cb8bf701703468ddc88f25ba4fb9d975
|
refs/heads/master
| 2023-03-06T05:53:50.863721
| 2021-02-23T13:34:20
| 2021-02-23T13:34:20
| 341,481,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,064
|
java
|
package com.google.android.gms.internal.ads;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
/* compiled from: com.google.android.gms:play-services-ads-lite@@19.5.0 */
public final class zzvv implements Parcelable.Creator<zzvw> {
public final /* synthetic */ Object createFromParcel(Parcel parcel) {
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
int i = 0;
while (parcel.dataPosition() < validateObjectHeader) {
int readHeader = SafeParcelReader.readHeader(parcel);
if (SafeParcelReader.getFieldId(readHeader) != 2) {
SafeParcelReader.skipUnknownField(parcel, readHeader);
} else {
i = SafeParcelReader.readInt(parcel, readHeader);
}
}
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
return new zzvw(i);
}
public final /* synthetic */ Object[] newArray(int i) {
return new zzvw[i];
}
}
|
[
"mred312@gmail.com"
] |
mred312@gmail.com
|
dc715c5ec58caae8c3872e842ff711faea2280d6
|
11177024479b1563ea7c738c3545347585a729b4
|
/nimbits_server/src/main/java/com/nimbits/server/process/task/PointTask.java
|
8ee79a40210913f5a54d777f2fd4469ed9c1ae3d
|
[] |
no_license
|
karzar/com.nimbits
|
4986300b9c2f99411ec650cd7dec4fbd70621b8b
|
8bde109a5f8f857beba3172f2f8101f76ed47b1d
|
refs/heads/master
| 2021-01-17T06:21:47.732160
| 2015-06-18T15:30:54
| 2015-06-18T15:30:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,784
|
java
|
/*
* NIMBITS INC CONFIDENTIAL
* __________________
*
* [2013] - [2014] Nimbits Inc
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Nimbits Inc and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Nimbits Inc
* and its suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Nimbits Inc.
*/
package com.nimbits.server.process.task;
import com.nimbits.client.enums.Parameters;
import com.nimbits.client.model.point.Point;
import com.nimbits.server.transaction.entity.dao.EntityDao;
import com.nimbits.server.transaction.entity.service.EntityService;
import com.nimbits.server.transaction.user.service.UserService;
import com.nimbits.server.transaction.value.service.ValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.logging.Logger;
@Service
public class PointTask extends HttpServlet {
private final Logger logger = Logger.getLogger(PointTask.class.getName());
@Autowired
protected EntityService entityService;
@Autowired
protected EntityDao entityDao;
@Autowired
protected ValueService valueService;
@Autowired
public TaskService taskService;
@Autowired
public UserService userService;
@Override
public void init() throws ServletException {
SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
@Override
public void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws IOException, ServletException {
processRequest(req);
}
//TODO only process active points, use the point count instead
private void processRequest(HttpServletRequest req) {
String cursor = req.getParameter(Parameters.cursor.getText());
long position = Long.valueOf(cursor);
List<Point> points = entityDao.getPoint(position);
if (! points.isEmpty()) {
logger.info("Point Maint: " + position);
}
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
processRequest(req);
}
}
|
[
"bsautner@gmail.com"
] |
bsautner@gmail.com
|
1c52ee150f3a1fe63ebecd4cc2aeb52ded15e838
|
ffcd2a6025a3aa347d33c52af10721c5590b5871
|
/demo/src/main/java/simple/com/demo/MainActivity.java
|
593b82f0751f27476cdf7ee511890922d71432b4
|
[
"MIT"
] |
permissive
|
LiDaQiang2016/commonadapter
|
4c2e33b26e1cb692940681f609fc62bf97a5065d
|
d674cfda4251d1b692f69e1ad1766fc48645c520
|
refs/heads/master
| 2021-01-24T16:03:23.357236
| 2016-04-15T08:41:37
| 2016-04-15T08:41:37
| 56,230,778
| 0
| 0
| null | 2016-04-14T11:09:48
| 2016-04-14T11:09:47
| null |
UTF-8
|
Java
| false
| false
| 4,821
|
java
|
package simple.com.demo;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.simple.commonadapter.ListViewAdapter;
import com.simple.commonadapter.RecyclerAdapter;
import com.simple.commonadapter.viewholders.GodViewHolder;
import com.simple.commonadapter.viewholders.RecyclerViewHolder;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
initListView();
initRecyclerView();
startActivity(new Intent(this, MultiImageActivity.class));
}
private List<String> mockDatas() {
List<String> datas = new ArrayList<>();
for (int i = 0; i < 15; i++) {
datas.add("user - " + i);
}
return datas;
}
/**
* 初始化ListView
*/
private void initListView() {
ListView listView = (ListView) findViewById(R.id.listview);
final ListViewAdapter<String> adapter = new ListViewAdapter<String>(R.layout.list_item_type_1) {
@Override
protected void onBindData(GodViewHolder viewHolder, int position, String item) {
viewHolder
.setText(R.id.textview, item) // 设置文本内容
.setImageResource(R.id.imageview, R.drawable.big_smile); // 设置图片资源
}
};
// 添加数据
adapter.addItems(mockDatas());
listView.setAdapter(adapter);
// 设置ListView的点击事件
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Toast.makeText(MainActivity.this, "Click List : " + adapter.getItem(position), Toast.LENGTH_SHORT).show();
}
});
}
/**
* 初始化RecyclerView
*/
private void initRecyclerView() {
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerview);
// 线性
recyclerView.setLayoutManager(new LinearLayoutManager(MainActivity.this));
// 初始化adapter
final RecyclerAdapter<String> adapter = new RecyclerAdapter<String>(R.layout.list_item_type_1, mockDatas()) {
@Override
protected void onBindData(RecyclerViewHolder viewHolder, int position, String item) {
viewHolder.setText(R.id.textview, item);
ImageView imageView = viewHolder.findViewById(R.id.imageview);
Glide
.with(viewHolder.getContext())
.load("http://img4.duitang.com/uploads/blog/201402/19/20140219232639_Cda2j.thumb.600_0.jpeg")
.into(imageView);
}
// 如果有多个布局,那么覆写getItemViewType与getItemLayout即可
@Override
public int getItemViewType(int position) {
return position % 5 == 0 ? 2 : 1;
}
@Override
protected int getItemLayout(int type) {
if (type == 2) {
return R.layout.list_item_type_2;
}
return R.layout.list_item_type_1;
}
};
// 设置RecyclerView的点击事件
adapter.setOnItemClickListener(new RecyclerAdapter.OnItemClickListener() {
@Override
public void onItemClick(int position) {
Toast.makeText(MainActivity.this, "Click Recycler : "
+ adapter.getItem(position), Toast.LENGTH_SHORT).show();
}
});
recyclerView.setAdapter(adapter);
}
}
|
[
"bboyfeiyu@gmail.com"
] |
bboyfeiyu@gmail.com
|
f5cd9cabac966cd5d70cb41900f0708ebd2e0186
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/gradle--gradle/a0e0f7d899a0935702753e35d2dfa8e0bdb336c4/after/TypedDomainObjectContainerWrapper.java
|
45e220165a406cc21c3b54780f3afeeb8e7184d2
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,338
|
java
|
/*
* Copyright 2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.api.internal;
import groovy.lang.Closure;
import org.gradle.api.*;
import org.gradle.api.internal.plugins.DefaultConvention;
import org.gradle.api.plugins.Convention;
import org.gradle.api.specs.Spec;
import org.gradle.internal.metaobject.DynamicObject;
import org.gradle.internal.reflect.Instantiator;
import org.gradle.util.ConfigureUtil;
import java.util.*;
public class TypedDomainObjectContainerWrapper<U> implements NamedDomainObjectContainer<U>, DynamicObjectAware {
private final Class<U> type;
private final PolymorphicDomainObjectContainer<? super U> parent;
private final NamedDomainObjectSet<U> delegate;
private final Convention convention;
public TypedDomainObjectContainerWrapper(Class<U> type, PolymorphicDomainObjectContainer<? super U> parent, Instantiator instantiator) {
this.parent = parent;
this.type = type;
this.delegate = parent.withType(type);
this.convention = new DefaultConvention(instantiator);
}
public Convention getConvention() {
return convention;
}
public U create(String name) throws InvalidUserDataException {
return parent.create(name, type);
}
public U create(String name, Action<? super U> configureAction) throws InvalidUserDataException {
return parent.create(name, type, configureAction);
}
public U create(String name, Closure configureClosure) throws InvalidUserDataException {
return parent.create(name, type, new ClosureBackedAction<U>(configureClosure));
}
public U maybeCreate(String name) {
return parent.maybeCreate(name, type);
}
public DynamicObject getAsDynamicObject() {
return ((DynamicObjectAware) delegate).getAsDynamicObject();
}
public NamedDomainObjectContainer<U> configure(Closure configureClosure) {
NamedDomainObjectContainerConfigureDelegate delegate = new NamedDomainObjectContainerConfigureDelegate(configureClosure, this);
return ConfigureUtil.configureSelf(configureClosure, this, delegate);
}
public Set<U> findAll(Closure spec) {
return delegate.findAll(spec);
}
public NamedDomainObjectSet<U> matching(Closure spec) {
return delegate.matching(spec);
}
public NamedDomainObjectSet<U> matching(Spec<? super U> spec) {
return delegate.matching(spec);
}
public <S extends U> NamedDomainObjectSet<S> withType(Class<S> type) {
return delegate.withType(type);
}
public boolean add(U e) {
return delegate.add(e);
}
public boolean addAll(Collection<? extends U> c) {
return delegate.addAll(c);
}
public Rule addRule(String description, Closure ruleAction) {
return delegate.addRule(description, ruleAction);
}
public Rule addRule(Rule rule) {
return delegate.addRule(rule);
}
public U findByName(String name) {
return delegate.findByName(name);
}
public SortedMap<String, U> getAsMap() {
return delegate.getAsMap();
}
public U getAt(String name) throws UnknownDomainObjectException {
return delegate.getAt(name);
}
public U getByName(String name) throws UnknownDomainObjectException {
return delegate.getByName(name);
}
public U getByName(String name, Closure configureClosure) throws UnknownDomainObjectException {
return delegate.getByName(name, configureClosure);
}
public Namer<U> getNamer() {
return delegate.getNamer();
}
public SortedSet<String> getNames() {
return delegate.getNames();
}
public List<Rule> getRules() {
return delegate.getRules();
}
public void all(Action<? super U> action) {
delegate.all(action);
}
public void all(Closure action) {
delegate.all(action);
}
public Action<? super U> whenObjectAdded(Action<? super U> action) {
return delegate.whenObjectAdded(action);
}
public void whenObjectAdded(Closure action) {
delegate.whenObjectAdded(action);
}
public Action<? super U> whenObjectRemoved(Action<? super U> action) {
return delegate.whenObjectRemoved(action);
}
public void whenObjectRemoved(Closure action) {
delegate.whenObjectRemoved(action);
}
public <S extends U> DomainObjectCollection<S> withType(Class<S> type, Action<? super S> configureAction) {
return delegate.withType(type, configureAction);
}
public <S extends U> DomainObjectCollection<S> withType(Class<S> type, Closure configureClosure) {
return delegate.withType(type, configureClosure);
}
public void clear() {
delegate.clear();
}
public boolean contains(Object o) {
return delegate.contains(o);
}
public boolean containsAll(Collection<?> c) {
return delegate.containsAll(c);
}
@Override
public boolean equals(Object o) {
return delegate.equals(o);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
public boolean isEmpty() {
return delegate.isEmpty();
}
public Iterator<U> iterator() {
return delegate.iterator();
}
public boolean remove(Object o) {
return delegate.remove(o);
}
public boolean removeAll(Collection<?> c) {
return delegate.removeAll(c);
}
public boolean retainAll(Collection<?> c) {
return delegate.retainAll(c);
}
public int size() {
return delegate.size();
}
public Object[] toArray() {
return delegate.toArray();
}
public <T> T[] toArray(T[] a) {
return delegate.toArray(a);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
a81dbb3a3225982fcac6710ce7a7902092e37084
|
41d16fe73f95e5ab86b0b087198356c331d13424
|
/lib_common/src/main/java/com/qunar/im/base/structs/MessageStatus.java
|
fccafe76544eb96ec4be45d52aaceced412653a1
|
[] |
no_license
|
forgetW/farady_im
|
eb116b70bafd819936af40af6149eb6f7789bf79
|
d0c59f99c195a85fab3624211871c54e79ebf8cf
|
refs/heads/main
| 2023-05-03T22:33:33.090405
| 2021-05-11T08:46:04
| 2021-05-11T08:46:04
| 366,306,354
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,754
|
java
|
package com.qunar.im.base.structs;
/**
* Created by xinbo.wang on 2015/5/8.
*/
public class MessageStatus {
// public final static int STATUS_FAILED = 0;
// public final static int STATUS_SUCCESS = 1;
// public final static int STATUS_PROCESSION = 2;
// public final static int STATUS_DELIVERY = 8;
public final static int STATUS_SINGLE_DELIVERED = 3;//已送达
public final static int STATUS_SINGLE_READED = 4;//已读
public final static int STATUS_SINGLE_OPERATION = 7;//已操作
public final static int STATUS_GROUP_READED = 2;
public final static int STATUS_ALL_READED = 0;
public final static int LOCAL_STATUS_FAILED = 0X00;//发送失败
public final static int LOCAL_STATUS_PROCESSION = 0X01;//发送中
public final static int LOCAL_STATUS_SUCCESS = 0X02;//发送成功
public final static int LOCAL_STATUS_SUCCESS_PROCESSION = 0X03;//设置发送成功及发送中开关
public final static int REMOTE_STATUS_CHAT_SUCCESS = 0X00;//发送到服务器
public final static int REMOTE_STATUS_CHAT_DELIVERED = 0X01;//对方已接收
public final static int REMOTE_STATUS_CHAT_READED = REMOTE_STATUS_CHAT_DELIVERED << 1;//0X02;//对方已读
public final static int REMOTE_STATUS_CHAT_OPERATION = 0x04;//0x04 已操作状态
public final static int REMOTE_STATUS_GROUP_READED = 0x03;//群消息已读
public final static int MEDAL_HAVE = 0x01;//拥有
public final static int MEDAL_WEAL = 0x02;//佩戴
public static boolean isExistStatus(int status, int tag) {
return (status & tag) != 0;
}
public static boolean isProcession(int status) {
return (status & LOCAL_STATUS_SUCCESS_PROCESSION) == LOCAL_STATUS_PROCESSION;
}
}
|
[
"503425930@qq.com"
] |
503425930@qq.com
|
2c08120e503e82e3d6d2eab4b34a43b3c0c46624
|
917484c4da7ac89abe5188201d2336c47f206aef
|
/src/main/java/com/insigma/mvc/serviceimp/jms/JmsProducerServiceImpl.java
|
c8eab15c17a8e6e1433f5e1bcc20db3314024ed3
|
[] |
no_license
|
wengweng85/myweb
|
efab40fb827565b500656e6fdc0ce12ab9f5cca2
|
1cfadd7b0870db7e16edafc49dd5ab5bc9faa985
|
refs/heads/master
| 2020-12-02T07:52:35.046588
| 2017-09-13T06:59:22
| 2017-09-13T06:59:22
| 96,739,015
| 1
| 1
| null | null | null | null |
GB18030
|
Java
| false
| false
| 3,500
|
java
|
package com.insigma.mvc.serviceimp.jms;
import java.io.Serializable;
import javax.annotation.Resource;
import javax.jms.BytesMessage;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.Session;
import javax.jms.StreamMessage;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Service;
import com.insigma.mvc.service.jms.JmsProducerService;
/**
* jms消息服务
*
* @author wengsh
*
*/
//@Service
public class JmsProducerServiceImpl implements JmsProducerService {
private Log log = LogFactory.getLog(JmsProducerServiceImpl.class);
//@Resource(name = "jmsQueueTemplate")
//@Resource(name="jmsTopicTemplate")
private JmsTemplate jmsTemplate;
/**
* 向默认队列发送消息
*/
public void sendMessage(final String msg) {
String destination = jmsTemplate.getDefaultDestination().toString();
log.info("向队列" + destination + "发送了消息------------" + msg);
jmsTemplate.send(new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
return session.createTextMessage(msg);
}
});
}
/**
* 向指定Destination发送map消息
*
* @param destination
* @param message
*/
public void sendMapMessage(final String message) {
String destination = jmsTemplate.getDefaultDestination().toString();
jmsTemplate.send(destination, new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
MapMessage mapMessage = session.createMapMessage();
mapMessage.setString("msgId", message);
return mapMessage;
}
});
System.out.println("springJMS send map message...");
}
/**
* 向指定Destination发送序列化的对象
*
* @param destination
* @param object object 必须序列化
*/
public void sendObjectMessage(final Serializable object) {
String destination = jmsTemplate.getDefaultDestination().toString();
jmsTemplate.send(destination, new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
return session.createObjectMessage(object);
}
});
System.out.println("springJMS send object message...");
}
/**
* 向指定Destination发送字节消息
*
* @param destination
* @param bytes
*/
public void sendBytesMessage(final byte[] bytes) {
String destination = jmsTemplate.getDefaultDestination().toString();
jmsTemplate.send(destination, new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
BytesMessage bytesMessage = session.createBytesMessage();
bytesMessage.writeBytes(bytes);
return bytesMessage;
}
});
System.out.println("springJMS send bytes message...");
}
/**
* 向默认队列发送Stream消息
*/
public void sendStreamMessage() {
String destination = jmsTemplate.getDefaultDestination().toString();
jmsTemplate.send(destination, new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
StreamMessage message = session.createStreamMessage();
message.writeString("stream string");
message.writeInt(11111);
return message;
}
});
System.out.println("springJMS send Strem message...");
}
}
|
[
"whengshaohui@163.com"
] |
whengshaohui@163.com
|
20bad3313267e00d612a2c2609cb6d5af8849894
|
e57e74c68168c81116492185881f5d47e5aa2747
|
/src/main/java/com/illud/freightgw/client/freight/model/PricingDTO.java
|
08cfad591237c5267f1e4ef4c1c38af5219c9668
|
[] |
no_license
|
illudtechzone/freightgw
|
69b6a0278645813d7b10a292758a10774e435782
|
d62929b9e4ac5432cfeb84c0fe1d18ec8f9c3561
|
refs/heads/master
| 2022-12-09T11:02:27.118960
| 2020-02-12T11:01:20
| 2020-02-12T11:01:20
| 206,477,106
| 0
| 1
| null | 2022-12-04T10:17:56
| 2019-09-05T04:51:14
|
Java
|
UTF-8
|
Java
| false
| false
| 6,529
|
java
|
package com.illud.freightgw.client.freight.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.constraints.*;
/**
* PricingDTO
*/
@Validated
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2019-11-07T10:22:09.159+05:30[Asia/Calcutta]")
public class PricingDTO {
@JsonProperty("additionalDescription")
private String additionalDescription = null;
@JsonProperty("basicRate")
private Double basicRate = null;
@JsonProperty("freeWaitingInMins")
private Long freeWaitingInMins = null;
@JsonProperty("id")
private Long id = null;
@JsonProperty("nightSurchargeInMins")
private Double nightSurchargeInMins = null;
/**
* Gets or Sets ratePlan
*/
public enum RatePlanEnum {
NORMAL("NORMAL"),
FULL_DAY("FULL_DAY");
private String value;
RatePlanEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static RatePlanEnum fromValue(String text) {
for (RatePlanEnum b : RatePlanEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("ratePlan")
private RatePlanEnum ratePlan = null;
@JsonProperty("waitingChargeInMins")
private Double waitingChargeInMins = null;
public PricingDTO additionalDescription(String additionalDescription) {
this.additionalDescription = additionalDescription;
return this;
}
/**
* Get additionalDescription
* @return additionalDescription
**/
@ApiModelProperty(value = "")
public String getAdditionalDescription() {
return additionalDescription;
}
public void setAdditionalDescription(String additionalDescription) {
this.additionalDescription = additionalDescription;
}
public PricingDTO basicRate(Double basicRate) {
this.basicRate = basicRate;
return this;
}
/**
* Get basicRate
* @return basicRate
**/
@ApiModelProperty(value = "")
public Double getBasicRate() {
return basicRate;
}
public void setBasicRate(Double basicRate) {
this.basicRate = basicRate;
}
public PricingDTO freeWaitingInMins(Long freeWaitingInMins) {
this.freeWaitingInMins = freeWaitingInMins;
return this;
}
/**
* Get freeWaitingInMins
* @return freeWaitingInMins
**/
@ApiModelProperty(value = "")
public Long getFreeWaitingInMins() {
return freeWaitingInMins;
}
public void setFreeWaitingInMins(Long freeWaitingInMins) {
this.freeWaitingInMins = freeWaitingInMins;
}
public PricingDTO id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public PricingDTO nightSurchargeInMins(Double nightSurchargeInMins) {
this.nightSurchargeInMins = nightSurchargeInMins;
return this;
}
/**
* Get nightSurchargeInMins
* @return nightSurchargeInMins
**/
@ApiModelProperty(value = "")
public Double getNightSurchargeInMins() {
return nightSurchargeInMins;
}
public void setNightSurchargeInMins(Double nightSurchargeInMins) {
this.nightSurchargeInMins = nightSurchargeInMins;
}
public PricingDTO ratePlan(RatePlanEnum ratePlan) {
this.ratePlan = ratePlan;
return this;
}
/**
* Get ratePlan
* @return ratePlan
**/
@ApiModelProperty(value = "")
public RatePlanEnum getRatePlan() {
return ratePlan;
}
public void setRatePlan(RatePlanEnum ratePlan) {
this.ratePlan = ratePlan;
}
public PricingDTO waitingChargeInMins(Double waitingChargeInMins) {
this.waitingChargeInMins = waitingChargeInMins;
return this;
}
/**
* Get waitingChargeInMins
* @return waitingChargeInMins
**/
@ApiModelProperty(value = "")
public Double getWaitingChargeInMins() {
return waitingChargeInMins;
}
public void setWaitingChargeInMins(Double waitingChargeInMins) {
this.waitingChargeInMins = waitingChargeInMins;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PricingDTO pricingDTO = (PricingDTO) o;
return Objects.equals(this.additionalDescription, pricingDTO.additionalDescription) &&
Objects.equals(this.basicRate, pricingDTO.basicRate) &&
Objects.equals(this.freeWaitingInMins, pricingDTO.freeWaitingInMins) &&
Objects.equals(this.id, pricingDTO.id) &&
Objects.equals(this.nightSurchargeInMins, pricingDTO.nightSurchargeInMins) &&
Objects.equals(this.ratePlan, pricingDTO.ratePlan) &&
Objects.equals(this.waitingChargeInMins, pricingDTO.waitingChargeInMins);
}
@Override
public int hashCode() {
return Objects.hash(additionalDescription, basicRate, freeWaitingInMins, id, nightSurchargeInMins, ratePlan, waitingChargeInMins);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PricingDTO {\n");
sb.append(" additionalDescription: ").append(toIndentedString(additionalDescription)).append("\n");
sb.append(" basicRate: ").append(toIndentedString(basicRate)).append("\n");
sb.append(" freeWaitingInMins: ").append(toIndentedString(freeWaitingInMins)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" nightSurchargeInMins: ").append(toIndentedString(nightSurchargeInMins)).append("\n");
sb.append(" ratePlan: ").append(toIndentedString(ratePlan)).append("\n");
sb.append(" waitingChargeInMins: ").append(toIndentedString(waitingChargeInMins)).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 ");
}
}
|
[
"prince.k.c@lxisoft.com"
] |
prince.k.c@lxisoft.com
|
a45ba43877dbd4c135a9fb3071226b0bfbb092c4
|
e43d01a2d9d9ad5860a3bece4ffca9aee24b7a75
|
/dynamic-support/src/main/java/com/pranavpandey/android/dynamic/support/setting/base/DynamicImagePreference.java
|
af6b91477488cf32b5a37ca53f8e257ef4a08b68
|
[
"Apache-2.0"
] |
permissive
|
pranavpandey/dynamic-support
|
6e652e8514f09a4d9cc6efbfc55aa84ed9885bed
|
8a818e2e27f87c2d33ca62ff0b4650c6eafeb8d9
|
refs/heads/master
| 2023-08-17T06:24:58.524568
| 2023-08-05T16:50:14
| 2023-08-05T16:50:14
| 121,538,886
| 285
| 34
|
Apache-2.0
| 2022-08-26T22:35:48
| 2018-02-14T17:20:51
|
Java
|
UTF-8
|
Java
| false
| false
| 7,302
|
java
|
/*
* Copyright 2018-2022 Pranav Pandey
*
* 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.pranavpandey.android.dynamic.support.setting.base;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import androidx.annotation.AttrRes;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.pranavpandey.android.dynamic.preferences.DynamicPreferences;
import com.pranavpandey.android.dynamic.support.Dynamic;
import com.pranavpandey.android.dynamic.support.R;
import com.pranavpandey.android.dynamic.support.util.DynamicResourceUtils;
import com.pranavpandey.android.dynamic.theme.Theme;
import com.pranavpandey.android.dynamic.util.DynamicBitmapUtils;
/**
* A {@link DynamicSpinnerPreference} with a secondary image view to represent data according
* to the need.
*/
public class DynamicImagePreference extends DynamicSpinnerPreference {
/**
* Secondary image view to show the drawable.
*/
private ImageView mImageView;
/**
* Drawable for the image view.
*/
private Drawable mImageDrawable;
public DynamicImagePreference(@NonNull Context context) {
super(context);
}
public DynamicImagePreference(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public DynamicImagePreference(@NonNull Context context,
@Nullable AttributeSet attrs, @AttrRes int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onLoadAttributes(@Nullable AttributeSet attrs) {
super.onLoadAttributes(attrs);
TypedArray a = getContext().obtainStyledAttributes(attrs,
R.styleable.DynamicImagePreference);
try {
mImageDrawable = DynamicResourceUtils.getDrawable(getContext(),
a.getResourceId(
R.styleable.DynamicImagePreference_ads_image,
DynamicResourceUtils.ADS_DEFAULT_RESOURCE_VALUE));
} finally {
a.recycle();
}
}
@Override
protected void onInflate() {
super.onInflate();
mImageView = LayoutInflater.from(getContext()).inflate(
R.layout.ads_preference_image, getViewFrame(), true)
.findViewById(R.id.ads_preference_image_value);
setViewFrame(mImageView, true);
Dynamic.setColorType(getValueView(), Theme.ColorType.NONE);
}
@Override
public @Nullable String getPreferenceKey() {
return super.getAltPreferenceKey();
}
@Override
public @Nullable String getAltPreferenceKey() {
return super.getPreferenceKey();
}
@Override
protected void onUpdate() {
super.onUpdate();
Dynamic.set(getImageView(), getImageDrawable());
Dynamic.setClickable(getPreferenceView(), getOnPreferenceClickListener() != null);
}
@Override
protected void onEnabled(boolean enabled) {
super.onEnabled(enabled);
Dynamic.setEnabled(getImageView(), enabled);
}
@Override
public void setColor() {
super.setColor();
Dynamic.setContrastWithColorTypeOrColor(getImageView(),
getContrastWithColorType(), getContrastWithColor());
Dynamic.setBackgroundAwareSafe(getImageView(),
getBackgroundAware(), getContrast(false));
}
/**
* Get the secondary image view to show the drawable.
*
* @return The secondary image view to show the drawable.
*/
public @Nullable ImageView getImageView() {
return mImageView;
}
/**
* Get the drawable for the image view.
*
* @return The drawable for the image view.
*/
public @Nullable Drawable getImageDrawable() {
return mImageDrawable;
}
/**
* Set the drawable for the image view.
*
* @param imageDrawable The image drawable to be set.
* @param update {@code true} to call {@link #update()} method after setting the
* image drawable.
*/
public void setImageDrawable(@Nullable Drawable imageDrawable, boolean update) {
this.mImageDrawable = imageDrawable;
if (update) {
update();
} else {
Dynamic.set(getImageView(), getImageDrawable());
}
}
/**
* Set the drawable for the image view.
*
* @param imageDrawable The image drawable to be set.
*/
public void setImageDrawable(@Nullable Drawable imageDrawable) {
setImageDrawable(imageDrawable, true);
}
/**
* Set the drawable for the image view.
*
* @param drawableRes The drawable resource to be set.
* @param update {@code true} to call {@link #update()} method after setting the
* image resource.
*/
public void setImageResource(@DrawableRes int drawableRes, boolean update) {
setImageDrawable(DynamicResourceUtils.getDrawable(getContext(), drawableRes), update);
}
/**
* Set the drawable for the image view.
*
* @param drawableRes The drawable resource to be set.
*/
public void setImageResource(@DrawableRes int drawableRes) {
setImageResource(drawableRes, true);
}
/**
* Set the bitmap for the image view.
*
* @param imageBitmap The image bitmap to be set.
* @param update {@code true} to call {@link #update()} method after setting the
* image bitmap.
*/
public void setImageBitmap(@Nullable Bitmap imageBitmap, boolean update) {
try {
setImageDrawable(new BitmapDrawable(DynamicBitmapUtils.resizeBitmap(
imageBitmap, Theme.Size.SMALL, Theme.Size.SMALL)), update);
} catch (Exception e) {
e.getStackTrace();
setImageDrawable(null);
}
}
/**
* Set the bitmap for the image view.
*
* @param imageBitmap The image bitmap to be set.
*/
public void setImageBitmap(@Nullable Bitmap imageBitmap) {
setImageBitmap(imageBitmap, true);
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
@Nullable String key) {
super.onSharedPreferenceChanged(sharedPreferences, key);
if (DynamicPreferences.isNullKey(key)) {
return;
}
if (key.equals(getAltPreferenceKey())) {
update();
}
}
}
|
[
"pranavpande92@gmail.com"
] |
pranavpande92@gmail.com
|
e07c3214710922cc0bfa6d95296f5446223a2b93
|
9df552a636a3f6c77bb309d18ea8e62c6ed8f2ef
|
/src/main/java/com/frankcooper/platform/leetcode/bank/_501_600/_525.java
|
8f8347d8b2c81410017a23e26141e86477d662a7
|
[] |
no_license
|
wat1r/geek-algorithm-leetcode
|
a1bef16541f771bec5c5dd44d8b4634a6251dc08
|
46c0ced5bb069b33bc253366f30feb52b5fb0fa9
|
refs/heads/master
| 2023-07-19T17:52:41.153871
| 2023-07-19T14:01:14
| 2023-07-19T14:01:14
| 245,184,502
| 19
| 4
| null | 2022-06-17T03:38:06
| 2020-03-05T14:28:48
|
Java
|
UTF-8
|
Java
| false
| false
| 2,321
|
java
|
package com.frankcooper.platform.leetcode.bank._501_600;
import java.util.*;
import org.junit.Assert;
public class _525 {
static class _1st {
public static void main(String[] args) {
_1st handler = new _1st();
int[] nums = new int[]{0, 1, 0, 0, 1, 0, 0, 1, 1};
Assert.assertEquals(8, handler.findMaxLength(nums));
}
public int findMaxLength(int[] nums) {
//0 相当于-1 -1 +1 cnt值维持在0附近波动
//k 表示计数0的次数,v表示当前计数下,0的最早的下标索引
//哈希表表示每一个前缀和第一次出现时的下标索引
Map<Integer, Integer> map = new HashMap<>();
int res = 0, cnt = 0;
map.put(0, -1);
for (int i = 0; i < nums.length; i++) {
if (nums[i] == 1) cnt++;
else if (nums[i] == 0) cnt--;
if (map.containsKey(cnt)) {
int prev = map.get(cnt);
res = Math.max(res, i - prev);
} else {
map.put(cnt, i);
}
}
return res;
}
}
static class _2nd {
public static void main(String[] args) {
_2nd handler = new _2nd();
int[] nums = new int[]{0, 1, 0, 0, 1, 0, 0, 1, 1};
Assert.assertEquals(8, handler.findMaxLength(nums));
}
public int findMaxLength(int[] nums) {
int res = 0, n = nums.length;
int[] preSum = new int[n + 1];
for (int i = 0; i < n; i++) {
preSum[i + 1] = preSum[i] + (nums[i] == 0 ? -1 : 1);
}
Map<Integer, Integer> map = new HashMap<>();
for (int i = 0; i <= n; i++) {
if (map.containsKey(preSum[i])) {
res = Math.max(res, i - map.get(preSum[i]));
} else {
map.put(preSum[i], i);
}
}
return res;
}
}
static class _3rd {
public static void main(String[] args) {
_3rd handler = new _3rd();
}
}
static class _4th {
public static void main(String[] args) {
_4th handler = new _4th();
}
}
}
|
[
"cnwangzhou@hotmail.com"
] |
cnwangzhou@hotmail.com
|
027fc26cf06a115a42d524bebd5eb83620b85193
|
cca87c4ade972a682c9bf0663ffdf21232c9b857
|
/com/tencent/mm/plugin/luckymoney/ui/LuckyMoneyAutoScrollItem.java
|
2011e4a1881d5a34d8d34a8a1ad73581e37b4194
|
[] |
no_license
|
ZoranLi/wechat_reversing
|
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
|
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
|
refs/heads/master
| 2021-07-05T01:17:20.533427
| 2017-09-25T09:07:33
| 2017-09-25T09:07:33
| 104,726,592
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,442
|
java
|
package com.tencent.mm.plugin.luckymoney.ui;
import android.content.Context;
import android.os.CountDownTimer;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import com.tencent.mm.R;
import com.tencent.mm.sdk.platformtools.af;
import com.tencent.mm.sdk.platformtools.w;
public class LuckyMoneyAutoScrollItem extends ListView {
public static SparseArray<Integer> nqD;
private int jon;
private Context mContext;
private CountDownTimer nqA;
private int nqB;
b nqC;
private a nqx;
private long nqy;
int nqz;
private class a extends BaseAdapter {
final /* synthetic */ LuckyMoneyAutoScrollItem nqF;
class a {
ImageView nqH;
final /* synthetic */ a nqI;
a(a aVar) {
this.nqI = aVar;
}
}
private a(LuckyMoneyAutoScrollItem luckyMoneyAutoScrollItem) {
this.nqF = luckyMoneyAutoScrollItem;
}
public final int getCount() {
return 2147483646;
}
public final Object getItem(int i) {
return Integer.valueOf(i % 10);
}
public final long getItemId(int i) {
return (long) i;
}
public final View getView(int i, View view, ViewGroup viewGroup) {
a aVar;
if (view == null || view.getTag() == null) {
view = LayoutInflater.from(this.nqF.mContext).inflate(R.i.dgX, null);
a aVar2 = new a(this);
aVar2.nqH = (ImageView) view.findViewById(R.h.cHG);
view.setTag(aVar2);
aVar = aVar2;
} else {
aVar = (a) view.getTag();
}
aVar.nqH.setImageResource(((Integer) LuckyMoneyAutoScrollItem.nqD.get(i % 10)).intValue());
return view;
}
}
interface b {
void aIp();
}
static /* synthetic */ int a(LuckyMoneyAutoScrollItem luckyMoneyAutoScrollItem) {
int i = luckyMoneyAutoScrollItem.jon + 1;
luckyMoneyAutoScrollItem.jon = i;
return i;
}
static {
SparseArray sparseArray = new SparseArray();
nqD = sparseArray;
sparseArray.put(0, Integer.valueOf(R.g.bhE));
nqD.put(1, Integer.valueOf(R.g.bhF));
nqD.put(2, Integer.valueOf(R.g.bhG));
nqD.put(3, Integer.valueOf(R.g.bhH));
nqD.put(4, Integer.valueOf(R.g.bhI));
nqD.put(5, Integer.valueOf(R.g.bhJ));
nqD.put(6, Integer.valueOf(R.g.bhK));
nqD.put(7, Integer.valueOf(R.g.bhL));
nqD.put(8, Integer.valueOf(R.g.bhM));
nqD.put(9, Integer.valueOf(R.g.bhN));
}
public LuckyMoneyAutoScrollItem(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet);
this.nqx = null;
this.nqy = 900;
this.nqz = 0;
this.jon = 0;
this.nqC = null;
this.mContext = context;
this.nqx = new a();
setAdapter(this.nqx);
this.nqB = (int) ((this.mContext.getResources().getDisplayMetrics().density * 60.0f) + 0.5f);
w.i("MicroMsg.LuckyMoneyAutoScrollView", "hy: scroll height is: %d", new Object[]{Integer.valueOf(this.nqB)});
}
public LuckyMoneyAutoScrollItem(Context context, AttributeSet attributeSet) {
this(context, attributeSet, -1);
}
public final void aIo() {
if (this.nqA != null) {
this.nqA.cancel();
}
final long j = ((long) (this.nqz * 50)) + this.nqy;
af.v(new Runnable(this) {
final /* synthetic */ LuckyMoneyAutoScrollItem nqF;
public final void run() {
this.nqF.nqA = new CountDownTimer(this, j) {
final /* synthetic */ AnonymousClass1 nqG;
public final void onTick(long j) {
this.nqG.nqF.smoothScrollToPosition(LuckyMoneyAutoScrollItem.a(this.nqG.nqF));
}
public final void onFinish() {
if (this.nqG.nqF.nqC != null) {
this.nqG.nqF.nqC.aIp();
}
}
}.start();
}
});
}
}
|
[
"lizhangliao@xiaohongchun.com"
] |
lizhangliao@xiaohongchun.com
|
de601b01fdb720ac6c999ea9f191539d7cb701cf
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE789_Uncontrolled_Mem_Alloc/s01/CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_ArrayList_12.java
|
76af46186e3206433fbd230a866f1eb183378c47
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,909
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_ArrayList_12.java
Label Definition File: CWE789_Uncontrolled_Mem_Alloc.int.label.xml
Template File: sources-sink-12.tmpl.java
*/
/*
* @description
* CWE: 789 Uncontrolled Memory Allocation
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* BadSink: ArrayList Create an ArrayList using data as the initial size
* Flow Variant: 12 Control flow: if(IO.staticReturnsTrueOrFalse())
*
* */
package testcases.CWE789_Uncontrolled_Mem_Alloc.s01;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.logging.Level;
import java.util.ArrayList;
public class CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_ArrayList_12 extends AbstractTestCaseServlet
{
/* uses badsource and badsink - see how tools report flaws that don't always occur */
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
if (IO.staticReturnsTrueOrFalse())
{
data = Integer.MIN_VALUE; /* initialize data in case there are no cookies */
/* Read data from cookies */
{
Cookie cookieSources[] = request.getCookies();
if (cookieSources != null)
{
/* POTENTIAL FLAW: Read data from the first cookie value */
String stringNumber = cookieSources[0].getValue();
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception reading data from cookie", exceptNumberFormat);
}
}
}
}
else
{
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
}
/* POTENTIAL FLAW: Create an ArrayList using data as the initial size. data may be very large, creating memory issues */
ArrayList intArrayList = new ArrayList(data);
}
/* goodG2B() - use goodsource and badsink by changing the "if" so that
* both branches use the GoodSource */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
if (IO.staticReturnsTrueOrFalse())
{
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
}
else
{
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
}
/* POTENTIAL FLAW: Create an ArrayList using data as the initial size. data may be very large, creating memory issues */
ArrayList intArrayList = new ArrayList(data);
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
f5f27ba97c68d20e953dc91ca9003cf7d8a66a86
|
bcaa1a733700b8be816982c239d9079fa8c334b7
|
/eu.openanalytics.phaedra.base.ui.charting/src/eu/openanalytics/phaedra/base/ui/charting/render/IRenderCustomizer.java
|
d87390e62b24ff64b1386dab22067285cb4a7a5f
|
[] |
no_license
|
openanalytics/phaedra
|
dfb16cc300d0d90ca9eab233068207452d458040
|
2b0b79000bfcac311072b91f31eb196b08d294fe
|
refs/heads/master
| 2020-12-31T07:01:38.108586
| 2020-12-16T12:30:35
| 2020-12-16T12:30:35
| 58,546,934
| 16
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 208
|
java
|
package eu.openanalytics.phaedra.base.ui.charting.render;
import org.jfree.chart.renderer.xy.XYItemRenderer;
public interface IRenderCustomizer {
public void customize(XYItemRenderer renderer);
}
|
[
"tobias.verbeke@openanalytics.eu"
] |
tobias.verbeke@openanalytics.eu
|
6b4948520cdf3f80a1bab02a1b91c5df3dc30c68
|
a57a63100d60ff094518568e1d0fc445ab279553
|
/1.JavaSyntax/src/com/javarush/task/task09/task0922/Solution.java
|
df8dda4e12dedc0a202fbd7f874767955fde22eb
|
[] |
no_license
|
dananita/TasksfromJavaRush
|
cc4c5a5c37a131948becd12dc3a8ea4d3b9234b2
|
456c714b7dfb8212ac7ea1200044a1d1e118c5fa
|
refs/heads/master
| 2021-09-11T19:37:26.166085
| 2018-04-11T15:03:22
| 2018-04-11T15:03:22
| 111,551,640
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 777
|
java
|
package com.javarush.task.task09.task0922;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.Date;
import java.util.Locale;
/*
Какое сегодня число?
*/
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
BufferedReader reader = new BufferedReader( new InputStreamReader(System.in));
SimpleDateFormat format0 = new SimpleDateFormat("MM/dd/yyyy");
Date datenew = format0.parse(reader.readLine());
SimpleDateFormat format = new SimpleDateFormat("MMM dd, yyyy",Locale.ENGLISH);
System.out.println(format.format(datenew).toUpperCase());
}
}
|
[
"zlakdanata@yandex.ru"
] |
zlakdanata@yandex.ru
|
7218778a480cfda336c1c4a45af1cf964b2deeaf
|
0f52a2a3cc3e639142849526473a6baab95757a3
|
/app/src/main/java/com/android/nana/user/AgreeFriendsRequest.java
|
b7ced65d3551000b961b3cb3b96881e26b7c412c
|
[] |
no_license
|
ruanxuexiong/WebCastApp
|
8ac3b50d64f80fc9776b5342a8cbf71d9c62a9c3
|
ab468b05225aaf0625de4a854a157baf4692cad0
|
refs/heads/master
| 2020-06-12T16:50:17.211203
| 2019-06-29T03:53:32
| 2019-06-29T03:53:32
| 194,361,651
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 387
|
java
|
package com.android.nana.user;
/**
* Created by lenovo on 2017/9/8.
*/
public class AgreeFriendsRequest {
private String friendId;
public AgreeFriendsRequest(String friendId) {
this.friendId = friendId;
}
public String getFriendId() {
return friendId;
}
public void setFriendId(String friendId) {
this.friendId = friendId;
}
}
|
[
"412877174@qq.com"
] |
412877174@qq.com
|
f50ce7ff35c961440b01f6e5d7ab2fbe79ab25fa
|
52dd205230ba5ddbe46fa16e8ca6a869ede52096
|
/mysql/com-fintech-platform-orguser-client/src/main/java/com/fintech/modules/platform/sysorg/controller/SysClientController.java
|
f2a6ea41968a019ff7c2311bae08d0973b30019f
|
[] |
no_license
|
wangshuaibo123/BI
|
f5bfca6bcc0d3d0d1bec973ae5864e1bca697ac3
|
a44f8621a208cfb02e4ab5dc1e576056d62ff37c
|
refs/heads/master
| 2021-05-04T16:20:22.382751
| 2018-01-29T11:02:05
| 2018-01-29T11:02:05
| 120,247,955
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,377
|
java
|
package com.fintech.modules.platform.sysorg.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.fintech.modules.platform.sysorg.dto.SysSynDTO;
import com.fintech.modules.platform.sysorg.service.SynClientService;
import com.fintech.modules.platform.sysorg.service.SysOrgService;
import com.fintech.modules.platform.sysorg.service.SysOrgSynService;
import com.fintech.modules.platform.sysorg.service.SysOrgUserService;
import com.fintech.modules.platform.sysorg.service.SysOrgUserSynService;
import com.fintech.modules.platform.sysorg.service.SysPositionService;
import com.fintech.modules.platform.sysorg.service.SysPositionSynService;
import com.fintech.modules.platform.sysorg.service.SysUserService;
import com.fintech.modules.platform.sysorg.service.SysUserSynService;
import com.fintech.platform.api.org.OrgAPI;
import com.fintech.platform.core.message.DataMsg;
import com.fintech.platform.core.message.PageParameter;
import com.fintech.platform.core.message.PageUtil;
import com.fintech.platform.core.message.QueryReqBean;
import com.fintech.platform.restservice.exception.AbaboonException;
import com.fintech.platform.restservice.web.base.BaseController;
@Controller
@Scope("prototype")
@RequestMapping("/synClient")
public class SysClientController extends BaseController{
private static final Logger logger = LoggerFactory.getLogger(SysClientController.class);
@Autowired
SynClientService synClientService;
@Autowired
SysUserService sysUserService;
@Autowired
SysUserSynService sysUserSynService;
@Autowired
SysOrgSynService sysOrgSynService;
@Autowired
SysOrgService sysOrgService;
@Autowired
SysPositionService sysPositionService;
@Autowired
SysPositionSynService sysPositionSynService;
@Autowired
SysOrgUserService sysOrgUserService;
@Autowired
SysOrgUserSynService sysOrgUserSynService;
@Autowired
OrgAPI orgAPI;
/**Description: 跳转控制方法
* Create Date: 2015年1月26日下午7:27:23<br/>
* Author : cyy <br/>
* Modify Date: <br/>
* Modify By : <br/>
* @param operate
* @return
* @throws AbaboonException
*/
@RequestMapping(value = "/prepareExecute/{operate}")
public ModelAndView execute(@PathVariable("operate") String operate) throws Exception {
ModelAndView model = new ModelAndView();
if("toSynManage".equals(operate)){//跳转至 查询页面
model.setViewName("platform/sysorg/sysclient/clientManage");
} else if("toSynDetail".equals(operate)){//跳转至 查询页面
//批次号
String version = this.getParameterString("version");
//用户
model.addObject("sysUserChangeDTOs", sysUserSynService.getChangeData(version));
//机构
model.addObject("sysOrgChangeDTO", sysOrgSynService.getChangeData(version));
//岗位
model.addObject("sysPositionChangeDTO", sysPositionSynService.getChangeData(version));
//归属机构以及任职
model.addObject( "sysOrgUserChangeDTOs",sysOrgUserSynService.getChangeData(version));
model.setViewName("platform/sysorg/sysclient/clientDetail");
}
return model;
}
/**Description: 查询分页接口
* Create Date: 2015年1月26日下午7:27:19<br/>
* Author : cyy <br/>
* Modify Date: <br/>
* Modify By : <br/>
* @param request
* @param dto
* @param dataMsg
* @return
* @throws Exception
*/
@RequestMapping(value = "/queryListSysSyn")
@ResponseBody
public DataMsg queryListSysSyn(HttpServletRequest request, SysSynDTO dto, @ModelAttribute DataMsg dataMsg) throws Exception {
Map<String, Object> searchParams = new HashMap<String, Object>();
searchParams.put("dto", dto);
QueryReqBean params = new QueryReqBean();
params.setSearchParams(searchParams);
PageParameter pageInfo = PageUtil.toPageParameter(dataMsg);
params.setPageParameter(pageInfo);
List<SysSynDTO> list = synClientService.searchSysSynByPaging(params.getSearchParams());
dataMsg.setData(list);
dataMsg.setTotalRows(pageInfo.getTotalCount());
return dataMsg;
}
@RequestMapping(value = "/udpateSysDataSyn")
@ResponseBody
public DataMsg udpateSysDataSyn(HttpServletRequest request, @ModelAttribute DataMsg dataMsg){
String versions = (String) this.getParameter("versions");//格式: 1,2,3
dataMsg = super.initDataMsg(dataMsg);
try {
synClientService.updateSysDataSynAndCheck(versions);
dataMsg.setMsg("更新成功");
} catch (Exception e) {
dataMsg.failed(e.getMessage());
logger.error("执行方法udpateSysDataSyn异常:", e);
}
return dataMsg;
}
}
|
[
"gangchen1@jieyuechina.com"
] |
gangchen1@jieyuechina.com
|
6b8baa507992d8eb04bbd1b9c3aaac0ebe0243c7
|
c70148e6e0f5a23309dbb78c74e6f9a7f4edeeaa
|
/org.modeldriven.alf/src/org/modeldriven/alf/syntax/expressions/impl/EqualityExpressionImpl.java
|
2956e8c0b67c9f21a45fe75855bc1b00db7fbe23
|
[] |
no_license
|
lschuetze/Alf-Reference-Implementation
|
9fdf03c23e8c98a97a216a5df0c6e9857395ff52
|
c1390c5898a16862af38b1413050ce9b3b294692
|
refs/heads/master
| 2021-01-17T09:31:48.014486
| 2016-02-22T20:02:08
| 2016-02-22T20:02:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,810
|
java
|
/*******************************************************************************
* Copyright 2011-2015 Data Access Technologies, Inc. (Model Driven Solutions)
* All rights reserved worldwide. This program and the accompanying materials
* are made available for use under the terms of the GNU General Public License
* (GPL) version 3 that accompanies this distribution and is available at
* http://www.gnu.org/licenses/gpl-3.0.html. For alternative licensing terms,
* contact Model Driven Solutions.
*******************************************************************************/
package org.modeldriven.alf.syntax.expressions.impl;
import org.modeldriven.alf.syntax.common.*;
import org.modeldriven.alf.syntax.expressions.*;
import org.modeldriven.alf.syntax.units.*;
/**
* A binary expression that tests the equality of its operands.
**/
public class EqualityExpressionImpl extends BinaryExpressionImpl {
private Boolean isNegated = null; // DERIVED
public EqualityExpressionImpl(EqualityExpression self) {
super(self);
}
@Override
public EqualityExpression getSelf() {
return (EqualityExpression) this.self;
}
public Boolean getIsNegated() {
if (this.isNegated == null) {
this.setIsNegated(this.deriveIsNegated());
}
return this.isNegated;
}
public void setIsNegated(Boolean isNegated) {
this.isNegated = isNegated;
}
/**
* An equality expression is negated if its operator is "!=".
**/
protected Boolean deriveIsNegated() {
String operator = this.getSelf().getOperator();
return operator != null && operator.equals("!=");
}
/**
* An equality expression has type Boolean.
**/
@Override
protected ElementReference deriveType() {
return RootNamespace.getRootScope().getBooleanType();
}
/**
* An equality expression has a multiplicity lower bound of 1.
**/
@Override
protected Integer deriveLower() {
return 1;
}
/**
* An equality expression has a multiplicity upper bound of 1.
**/
@Override
protected Integer deriveUpper() {
return 1;
}
/*
* Derivations
*/
public boolean equalityExpressionIsNegatedDerivation() {
this.getSelf().getIsNegated();
return true;
}
public boolean equalityExpressionTypeDerivation() {
this.getSelf().getType();
return true;
}
public boolean equalityExpressionLowerDerivation() {
this.getSelf().getLower();
return true;
}
public boolean equalityExpressionUpperDerivation() {
this.getSelf().getUpper();
return true;
}
/*
* Helper methods
*/
/**
* Returns false for an equality expression.
**/
public Boolean noNullArguments() {
return false;
}
} // EqualityExpressionImpl
|
[
"ed-s@modeldriven.com"
] |
ed-s@modeldriven.com
|
70768088d273b296384335b9443bda7f192a723e
|
ee11c39888179565827ddbf162f8b4c001925beb
|
/common/src/main/java/com/m/im/common/entity/model/BaseMUser.java
|
b53608dd386488573b23d57791321d5e835ee847
|
[] |
no_license
|
Madong1994/MChartServicee
|
87393df3c05aa52358b539e02a4d025dd2ee32d6
|
7b95b14815ae4d574bcc4ff02b2330734240c7d2
|
refs/heads/master
| 2021-05-16T13:10:23.567412
| 2017-10-11T13:24:04
| 2017-10-11T13:24:04
| 105,359,076
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,616
|
java
|
package com.m.im.common.entity.model;
import com.m.im.common.util.msgutil.MessageKit;
import com.m.im.common.util.core.JModel;
import java.math.BigInteger;
import com.jfinal.plugin.activerecord.IBean;
import com.jfinal.plugin.ehcache.CacheKit;
import com.jfinal.plugin.ehcache.IDataLoader;
/**
* Auto generated by JPress, do not modify this file.
*/
@SuppressWarnings("serial")
public abstract class BaseMUser<M extends BaseMUser<M>> extends JModel<M> implements IBean {
public static final String CACHE_NAME = "user";
public static final String METADATA_TYPE = "user";
public static final String ACTION_ADD = "user:add";
public static final String ACTION_DELETE = "user:delete";
public static final String ACTION_UPDATE = "user:update";
public void removeCache(Object key){
if(key == null) return;
CacheKit.remove(CACHE_NAME, key);
}
public void putCache(Object key,Object value){
CacheKit.put(CACHE_NAME, key, value);
}
public M getCache(Object key){
return CacheKit.get(CACHE_NAME, key);
}
public M getCache(Object key,IDataLoader dataloader){
return CacheKit.get(CACHE_NAME, key, dataloader);
}
@Override
public boolean equals(Object o) {
if(o == null){ return false; }
if(!(o instanceof BaseMUser<?>)){return false;}
BaseMUser<?> m = (BaseMUser<?>) o;
if(m.getId() == null){return false;}
return m.getId().compareTo(this.getId()) == 0;
}
@Override
public boolean save() {
boolean saved = super.save();
if (saved) { MessageKit.sendMessage(ACTION_ADD, this); }
return saved;
}
@Override
public boolean delete() {
boolean deleted = super.delete();
if (deleted) { MessageKit.sendMessage(ACTION_DELETE, this); }
return deleted;
}
@Override
public boolean deleteById(Object idValue) {
boolean deleted = super.deleteById(idValue);
if (deleted) { MessageKit.sendMessage(ACTION_DELETE, this); }
return deleted;
}
@Override
public boolean update() {
boolean update = super.update();
if (update) { MessageKit.sendMessage(ACTION_UPDATE, this); }
return update;
}
public void setId(java.lang.Integer id) {
set("id", id);
}
public java.lang.Integer getId() {
return get("id");
}
public void setUserName(java.lang.String userName) {
set("user_name", userName);
}
public java.lang.String getUserName() {
return get("user_name");
}
public void setUserNum(java.lang.String userNum) {
set("user_num", userNum);
}
public java.lang.String getUserNum() {
return get("user_num");
}
public void setPwd(java.lang.String pwd) {
set("pwd", pwd);
}
public java.lang.String getPwd() {
return get("pwd");
}
}
|
[
"123456"
] |
123456
|
dd4bd43d28c31fd2721759b1dd432ca400d24470
|
1264e4d85f7119c4eee2f3f350df84791ffddb6d
|
/Leetcode/src/Q106_Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal.java
|
021427bae2f9ce7d4e8505bb1c9d23b873cc86b3
|
[] |
no_license
|
bumblebee618/mylc
|
37eaa59d19d820aa54f00989c50732f27d84e86f
|
70e2821b4eb4c5ddbd492a818e3c445a6fcbb72c
|
refs/heads/master
| 2022-06-24T11:49:03.987571
| 2022-05-29T22:59:58
| 2022-06-01T00:15:56
| 223,346,232
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,006
|
java
|
import java.util.HashMap;
import java.util.Map;
/*****
*
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
*
* */
public class Q106_Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal
{
private int[] postorder;
private Map<Integer, Integer> inMap;
public TreeNode buildTree(int[] inorder, int[] postorder)
{
if (postorder == null || postorder.length == 0 || inorder == null || inorder.length != postorder.length)
{
return null;
}
this.postorder = postorder;
inMap = new HashMap<>();
for (int i = 0; i < inorder.length; i++)
{
inMap.put(inorder[i], i);
}
return buildTree(0, postorder.length-1, 0, inorder.length-1);
}
private TreeNode buildTree(int postStart, int postEnd, int inStart, int inEnd)
{
if (postStart > postEnd || inStart > inEnd)
{
return null;
}
int inRootPos = inMap.getOrDefault(postorder[postEnd], -1);
if (inRootPos == -1)
{
return null;
}
int leftCount = inRootPos - inStart;
TreeNode root = new TreeNode(postorder[postEnd]);
root.left = buildTree(postStart, postStart+leftCount-1, inStart, inRootPos-1);
root.right = buildTree(postStart+leftCount, postEnd-1, inRootPos+1, inEnd);
return root;
}
/**************************************** main ****************************************/
public static void main(String[] args){
Q106_Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal t = new Q106_Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal();
int[] inorder = {1,2,3,4,5};
int[] postorder = {2,3,1,5,4};
TreeNode root = t.buildTree(inorder, postorder);
}
}
|
[
"jackiechan618@gmail.com"
] |
jackiechan618@gmail.com
|
6de8a0a5088d523b137fc35d1826adf662fc9ee0
|
5d630cceac71b07ffb692ab79e240deea82ec4c0
|
/src/main/java/org/effectivejava/examples/chapter02/item04/UtilityClass.java
|
cae1ce724fb6476d81a1b1d4507b01aa99a2c067
|
[] |
no_license
|
faikturan/effectivejava_hoca
|
06471e5fada431c3a6b88e31362a62eda0d81d2a
|
ae99a22fddc01b0631b83d789757b085068b5b9c
|
refs/heads/master
| 2022-02-10T11:01:30.130919
| 2019-01-16T17:36:41
| 2019-01-16T17:36:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 241
|
java
|
// Noninstantiable utility class
package org.effectivejava.examples.chapter02.item04;
public class UtilityClass {
// Suppress default constructor for noninstantiability
private UtilityClass() {
throw new AssertionError(); // why ?
}
}
|
[
"upux1234"
] |
upux1234
|
79047ff6b42ef8572d4fc42cdf062ad85a53aef3
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_78a9f5a91f1f81b028508b7e9dc5933ee9550268/LogicCompilerTest/14_78a9f5a91f1f81b028508b7e9dc5933ee9550268_LogicCompilerTest_t.java
|
97a74742b3a6a37180bec3a40c648932512152a5
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,436
|
java
|
package org.instructionexecutor;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import org.junit.Test;
import org.suite.SuiteUtil;
import org.suite.node.Node;
import org.util.IoUtil;
public class LogicCompilerTest {
@Test
public void test() {
assertTrue(eval("()"));
assertTrue(eval("3 = 3"));
assertFalse(eval("fail"));
assertFalse(eval("1 = 2"));
}
@Test
public void testAuto() throws IOException {
Class<?> clazz = getClass();
String preds = IoUtil.readStream(clazz.getResourceAsStream("/auto.sl"));
Node n = SuiteUtil.parse("(" + preds + ") >> member (a, b, c,) c");
assertTrue(SuiteUtil.evaluateLogical(n, true, false));
}
@Test
public void testCut() {
assertTrue(eval("(.a = 1; .a = 2), !, .a = 1"));
assertFalse(eval("(.a = 1; .a = 2), !, .a = 2"));
assertFalse(eval(".a = 1, !, .b = 2, fail; .b = 3"));
}
@Test
public void testEval() {
assertTrue(eval("3 < 4"));
assertTrue(eval("3 <= 4"));
assertFalse(eval("4 > 4"));
assertFalse(eval("3 >= 4"));
}
@Test
public void testFibonacci() {
assertTrue(eval("" //
+ "( \n" //
+ " fib 0 1 # \n" //
+ " fib 1 1 # \n" //
+ " fib .n .f \n" //
+ " :- let .n1 (.n - 1) \n" //
+ " , let .n2 (.n1 - 1) \n" //
+ " , fib .n1 .f1 \n" //
+ " , fib .n2 .f2 \n" //
+ " , let .f (.f1 + .f2) \n" //
+ " # \n" //
+ ") >> fib 10 89"));
}
@Test
public void testLogic() {
assertTrue(eval("1 = 2; 3 = 3"));
assertFalse(eval("3 = 3, 1 = 2"));
}
@Test
public void testNot() {
assertTrue(eval("not (1 = 2)"));
assertTrue(eval("not (1 = 1)"));
assertTrue(eval("not (.v = 1), .v = 2"));
assertFalse(eval("not (.v = 1), 1 = 2"));
}
@Test
public void testOnce() {
assertTrue(eval("once (.v = 1; .v = 2), .v = 1"));
assertFalse(eval("once (.v = 1; .v = 2), .v = 2"));
}
@Test
public void testVariables() {
assertTrue(eval(".a = 1, 1 = .a"));
assertFalse(eval(".a = 1, .a = 2"));
}
@Test
public void testWith() {
assertTrue(eval("(p 2 # p 3 #) >> p .v, .v = 3"));
assertFalse(eval("(p 2 :- ! # p 3 #) >> p .v, .v = 3"));
assertTrue(eval("(p .v :- q .v # q 3 #) >> p 3"));
}
private boolean eval(String program) {
return SuiteUtil.evaluateLogical(program);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
ad7e78484b7cdef52b8a66c37b06d941af26cdbf
|
e1095749b78bb767a8fe558e46ba0b7010ebd547
|
/src/main/java/com/robertx22/mine_and_slash/uncommon/wrappers/WeightedWrapper.java
|
5ef5375064697caa83e9de9feb0859f83f3a65c0
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
RobertSkalko/Mine-and-Slash
|
6d1148fa3e626311c2238d314f8c6c5e30c7c00c
|
e16832ccd7ffc438b562202ecde39a324732d7f5
|
refs/heads/1.15
| 2023-07-03T18:47:05.628869
| 2020-07-17T21:40:02
| 2020-07-17T21:40:02
| 113,667,576
| 44
| 41
|
NOASSERTION
| 2022-10-28T01:56:01
| 2017-12-09T12:28:35
|
Java
|
UTF-8
|
Java
| false
| false
| 407
|
java
|
package com.robertx22.mine_and_slash.uncommon.wrappers;
import com.robertx22.mine_and_slash.uncommon.interfaces.IWeighted;
public class WeightedWrapper<T> implements IWeighted {
int weight;
public T object;
public WeightedWrapper(T object, int weight) {
this.weight = weight;
this.object = object;
}
@Override
public int Weight() {
return weight;
}
}
|
[
"treborx555@gmail.com"
] |
treborx555@gmail.com
|
ef46036b2e775b2a1e20759ca72d5caa0fbf5830
|
47798511441d7b091a394986afd1f72e8f9ff7ab
|
/src/main/java/com/alipay/api/response/MybankCreditLoantradeShoptransferConsultResponse.java
|
d3bab4bdc96c4852c502d6f86f6d702c7f4c4e33
|
[
"Apache-2.0"
] |
permissive
|
yihukurama/alipay-sdk-java-all
|
c53d898371032ed5f296b679fd62335511e4a310
|
0bf19c486251505b559863998b41636d53c13d41
|
refs/heads/master
| 2022-07-01T09:33:14.557065
| 2020-05-07T11:20:51
| 2020-05-07T11:20:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,224
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: mybank.credit.loantrade.shoptransfer.consult response.
*
* @author auto create
* @since 1.0, 2019-05-30 10:08:21
*/
public class MybankCreditLoantradeShoptransferConsultResponse extends AlipayResponse {
private static final long serialVersionUID = 8345458618812686984L;
/**
* 咨询结果,allow(允许转让)/refuse(拒绝)
*/
@ApiField("consult_result")
private String consultResult;
/**
* 拒绝码
*/
@ApiField("refuse_code")
private String refuseCode;
/**
* 拒绝文案
*/
@ApiField("refuse_desc")
private String refuseDesc;
public void setConsultResult(String consultResult) {
this.consultResult = consultResult;
}
public String getConsultResult( ) {
return this.consultResult;
}
public void setRefuseCode(String refuseCode) {
this.refuseCode = refuseCode;
}
public String getRefuseCode( ) {
return this.refuseCode;
}
public void setRefuseDesc(String refuseDesc) {
this.refuseDesc = refuseDesc;
}
public String getRefuseDesc( ) {
return this.refuseDesc;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
cb0301a98bf763ae10af868b5d33919d501dff81
|
71975999c9d702a0883ec9038ce3e76325928549
|
/src2.4.0/src/main/java/com/baidu/mapsdkplatform/comapi/a/l.java
|
982a269b456db5fff6684264d6e45f975c13468a
|
[] |
no_license
|
XposedRunner/PhysicalFitnessRunner
|
dc64179551ccd219979a6f8b9fe0614c29cd61de
|
cb037e59416d6c290debbed5ed84c956e705e738
|
refs/heads/master
| 2020-07-15T18:18:23.001280
| 2019-09-02T04:21:34
| 2019-09-02T04:21:34
| 205,620,387
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,050
|
java
|
package com.baidu.mapsdkplatform.comapi.a;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.annotation.TargetApi;
import android.graphics.Point;
import android.view.animation.Interpolator;
import com.baidu.mapapi.animation.Animation;
import com.baidu.mapapi.animation.Animation.AnimationListener;
import com.baidu.mapapi.map.Marker;
import com.baidu.mapapi.model.LatLng;
public class l extends c {
private Animator a = null;
private long b = 0;
private Interpolator c = null;
private AnimationListener d = null;
private int e = 1;
private int f = 0;
private Object[] g;
@TargetApi(11)
public class a implements TypeEvaluator {
public Object evaluate(float f, Object obj, Object obj2) {
LatLng latLng = (LatLng) obj;
LatLng latLng2 = (LatLng) obj2;
double d = (double) f;
return new LatLng(latLng.latitude + (d * (latLng2.latitude - latLng.latitude)), latLng.longitude + ((latLng2.longitude - latLng.longitude) * d));
}
}
@TargetApi(11)
public class b implements TypeEvaluator {
public Object evaluate(float f, Object obj, Object obj2) {
Point point = (Point) obj;
Point point2 = (Point) obj2;
return new Point((int) (((float) point.x) + (((float) (point2.x - point.x)) * f)), (int) (((float) point.y) + (f * ((float) (point2.y - point.y)))));
}
}
public l(Point... pointArr) {
this.g = pointArr;
}
public l(LatLng... latLngArr) {
this.g = latLngArr;
}
/* Access modifiers changed, original: 0000 */
@TargetApi(11)
public ObjectAnimator a(Marker marker) {
String str;
TypeEvaluator bVar;
if (marker.isFixed()) {
if (this.g[0] instanceof Point) {
str = "fixedScreenPosition";
bVar = new b();
} else {
throw new ClassCastException("if the marker is fixed on screen, the parameters of Transformation must be android.graphics.Point");
}
} else if (this.g[0] instanceof LatLng) {
str = "position";
bVar = new a();
} else {
throw new ClassCastException("if the marker isn't fixed on screen, the parameters of Transformation must be Latlng");
}
ObjectAnimator ofObject = ObjectAnimator.ofObject(marker, str, bVar, this.g);
if (ofObject != null) {
ofObject.setRepeatCount(this.f);
ofObject.setRepeatMode(c());
ofObject.setDuration(this.b);
if (this.c != null) {
ofObject.setInterpolator(this.c);
}
}
return ofObject;
}
@TargetApi(11)
public void a() {
if (this.a != null) {
this.a.start();
}
}
public void a(int i) {
this.e = i;
}
public void a(long j) {
if (j < 0) {
j = 0;
}
this.b = j;
}
/* Access modifiers changed, original: protected */
@TargetApi(11)
public void a(Animator animator) {
if (animator != null) {
animator.addListener(new m(this));
}
}
public void a(Interpolator interpolator) {
this.c = interpolator;
}
public void a(AnimationListener animationListener) {
this.d = animationListener;
}
@TargetApi(11)
public void a(Marker marker, Animation animation) {
this.a = a(marker);
a(this.a);
}
@TargetApi(11)
public void b() {
if (this.a != null) {
this.a.cancel();
this.a = null;
}
}
public void b(int i) {
if (i > 0) {
this.f = i;
}
}
public int c() {
return this.e;
}
public void c(int i) {
}
}
|
[
"xr_master@mail.com"
] |
xr_master@mail.com
|
b9d061b3ca5f12a0791d3ea37774c206711554ad
|
511a5e5b585be029dc61dd95390c812027c2413b
|
/zxinglibrary/src/main/java/com/journeyapps/barcodescanner/AutoMoveFocusManager.java
|
df8c8fa11f90fec602155c8e043feef7f4261181
|
[] |
no_license
|
MengkZhang/ebook
|
60733cff344dd906c20ec657d95e4fa4d0789cf5
|
109101ebad3e8e5274e758c786013aab650c3ff1
|
refs/heads/master
| 2020-05-07T09:56:05.996761
| 2019-04-09T15:17:10
| 2019-04-09T15:17:10
| 180,392,558
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,520
|
java
|
package com.journeyapps.barcodescanner;
import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
import android.hardware.Camera;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.widget.Toast;
import com.journeyapps.barcodescanner.camera.CameraSettings;
import java.util.ArrayList;
import java.util.List;
/**
* 移动对焦
* Created by ZhiqiangJia on 2017-04-06.
*/
public class AutoMoveFocusManager implements SensorControler.CameraFocusListener {
private SensorControler controler;
private Camera mCamera;
private Context mContext;
public AutoMoveFocusManager(Context context, Camera camera, CameraSettings settings) {
this.mContext = context;
this.mCamera = camera;
this.controler = new SensorControler(context);
controler = new SensorControler(context);
controler.setCameraFocusListener(this);
resetFoucs();
controler.unlockFocus();
}
public void resetFoucs() {
if (null != controler) {
controler.restFoucs();
}
}
public void start() {
if (null != controler) {
controler.onStart();
}
}
public void stop() {
if (null != controler) {
controler.onStop();
}
}
@Override
public void onFocus() {
int screenWidth = Utils.getScreenWidth(mContext);
Point point = new Point(screenWidth / 2, screenWidth / 2);
onCameraFocus(point);
new Handler().post(new Runnable() {
@Override
public void run() {
Toast.makeText(mContext, "onFocus", Toast.LENGTH_LONG).show();
}
});
}
/**
* @param point
*/
private void onCameraFocus(Point point) {
onCameraFocus(point, false);
}
/**
* 相机对焦
*
* @param point
* @param needDelay 是否需要延时
*/
public void onCameraFocus(final Point point, boolean needDelay) {
long delayDuration = needDelay ? 300 : 0;
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
if (!controler.isFocusLocked()) {
if (onFocus(point, autoFocusCallback)) {
controler.lockFocus();
}
}
}
}, delayDuration);
}
private final Camera.AutoFocusCallback autoFocusCallback = new Camera.AutoFocusCallback() {
@Override
public void onAutoFocus(boolean success, Camera camera) {
//聚焦之后根据结果修改图片
if (success) {
onFocusSuccess();
} else {
//聚焦失败显示的图片,由于未找到合适的资源,这里仍显示同一张图片
onFocusFailed();
}
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
//一秒之后才能再次对焦
controler.unlockFocus();
}
}, 1000);
}
};
private Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
}
};
/**
* 手动聚焦
*
* @param point 触屏坐标
*/
protected boolean onFocus(Point point, Camera.AutoFocusCallback callback) {
if (mCamera == null) {
return false;
}
Camera.Parameters parameters = null;
try {
parameters = mCamera.getParameters();
} catch (Exception e) {
e.printStackTrace();
return false;
}
//不支持设置自定义聚焦,则使用自动聚焦,返回
if (Build.VERSION.SDK_INT >= 14) {
if (parameters.getMaxNumFocusAreas() <= 0) {
return focus(callback);
}
List<Camera.Area> areas = new ArrayList<Camera.Area>();
int left = point.x - 300;
int top = point.y - 300;
int right = point.x + 300;
int bottom = point.y + 300;
left = left < -1000 ? -1000 : left;
top = top < -1000 ? -1000 : top;
right = right > 1000 ? 1000 : right;
bottom = bottom > 1000 ? 1000 : bottom;
areas.add(new Camera.Area(new Rect(left, top, right, bottom), 100));
parameters.setFocusAreas(areas);
try {
//本人使用的小米手机在设置聚焦区域的时候经常会出异常,看日志发现是框架层的字符串转int的时候出错了,
//目测是小米修改了框架层代码导致,在此try掉,对实际聚焦效果没影响
mCamera.setParameters(parameters);
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
return false;
}
}
return focus(callback);
}
private boolean focus(Camera.AutoFocusCallback callback) {
try {
mCamera.autoFocus(callback);
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}
/**
* 聚焦成功
*/
private void onFocusSuccess() {
}
/**
* 聚焦失败
*/
private void onFocusFailed() {
}
}
|
[
"653651979@qq.com"
] |
653651979@qq.com
|
6c3e7b3ecb5f91de007195ec241bed9cfd4d64bd
|
17537c091572a94c58975214094fdfeedb57fde1
|
/core/server/project/commonScene/src/main/java/com/home/commonScene/net/serverRequest/game/login/RePlayerSwitchToSceneServerRequest.java
|
6071bfead13adfca71a52c3eec0c48935c6bdcd6
|
[
"Apache-2.0"
] |
permissive
|
mengtest/home3
|
dc2e5f910bbca6e536ded94d3f749671f0ca76d5
|
a15a63694918483b2e4853edab197b5cdddca560
|
refs/heads/master
| 2023-01-29T13:49:23.822515
| 2020-12-11T10:17:39
| 2020-12-11T10:17:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,493
|
java
|
package com.home.commonScene.net.serverRequest.game.login;
import com.home.commonBase.constlist.generate.ServerMessageType;
import com.home.commonScene.net.serverRequest.game.base.PlayerSceneToGameServerRequest;
import com.home.commonScene.net.serverRequest.game.base.SceneToGameServerRequest;
import com.home.shine.bytes.BytesWriteStream;
import com.home.shine.control.BytesControl;
import com.home.shine.support.DataWriter;
import com.home.shine.support.pool.DataPool;
/** 回复玩家切换到场景(generated by shine) */
public class RePlayerSwitchToSceneServerRequest extends PlayerSceneToGameServerRequest
{
/** 数据类型ID */
public static final int dataID=ServerMessageType.RePlayerSwitchToScene;
/** 端口 */
public int port;
/** 地址 */
public String host="";
/** 令牌 */
public int token;
public RePlayerSwitchToSceneServerRequest()
{
_dataID=ServerMessageType.RePlayerSwitchToScene;
}
@Override
protected void copyData()
{
super.copyData();
}
/** 获取数据类名 */
@Override
public String getDataClassName()
{
return "RePlayerSwitchToSceneServerRequest";
}
/** 写入字节流(简版) */
@Override
protected void toWriteBytesSimple(BytesWriteStream stream)
{
super.toWriteBytesSimple(stream);
stream.writeInt(this.token);
stream.writeUTF(this.host);
stream.writeInt(this.port);
}
/** 转文本输出 */
@Override
protected void toWriteDataString(DataWriter writer)
{
super.toWriteDataString(writer);
writer.writeTabs();
writer.sb.append("token");
writer.sb.append(':');
writer.sb.append(this.token);
writer.writeEnter();
writer.writeTabs();
writer.sb.append("host");
writer.sb.append(':');
writer.sb.append(this.host);
writer.writeEnter();
writer.writeTabs();
writer.sb.append("port");
writer.sb.append(':');
writer.sb.append(this.port);
writer.writeEnter();
}
/** 回池 */
@Override
protected void toRelease(DataPool pool)
{
super.toRelease(pool);
this.token=0;
this.host="";
this.port=0;
}
/** 创建实例 */
public static RePlayerSwitchToSceneServerRequest create(long playerID,int token,String host,int port)
{
RePlayerSwitchToSceneServerRequest re=(RePlayerSwitchToSceneServerRequest)BytesControl.createRequest(dataID);
re.playerID=playerID;
re.token=token;
re.host=host;
re.port=port;
return re;
}
}
|
[
"359944951@qq.com"
] |
359944951@qq.com
|
aa45fa37422f61b41280d41bdd3b43d143ab2a81
|
c1a4f894d8ae2ff12ec2432f35f3cdedebeae776
|
/app/src/main/java/kr/foryou/teoceon/BaseActivity.java
|
1da6f8418deb64740e154b9b7dd184340056fbdb
|
[] |
no_license
|
ItForYou/Teoceon
|
a7ac1ac5809c2597ca8cdda656335fb6550c62ff
|
12d2a71e19b0930345f494456db2dfe9739cedce
|
refs/heads/master
| 2020-09-23T19:09:23.449588
| 2019-12-03T08:12:39
| 2019-12-03T08:12:39
| 225,565,262
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,474
|
java
|
/*******************************************************************************
* Copyright 2011-2013 Sergey Tarasevich
*
* 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 kr.foryou.teoceon;
//import com.nostra13.universalimageloader.core.ImageLoader;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
/**
* @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
*/
public abstract class BaseActivity extends Activity {
public static final String IMAGES = "kr.foryou.teocean.IMAGES";
public static final String IMAGE_POSITION = "kr.foryou.teocean.IMAGE_POSITION";
public static final boolean DEVELOPER_MODE = false;
//protected ImageLoader imageLoader = ImageLoader.getInstance();
@Override
protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
}
}
|
[
"kimnamhyong@naver.com"
] |
kimnamhyong@naver.com
|
6eb3215c96212a0d077d58fbb6904e312ca42e20
|
db2d24a6bb520c2c6fc4dced10909a65e2b569c1
|
/3.JavaMultithreading/src/com/javarush/task/task29/task2907/Solution.java
|
c510cc165ae69e610075300f8f055b3dbf752df8
|
[] |
no_license
|
DanilBogdanov/JavaRushTasks
|
274d9112b81a54c2a6d012db5895ea63ba6e7cc1
|
de3ddbdb4132af9e29568fa5130d9fc89ef3324a
|
refs/heads/master
| 2022-10-02T17:30:26.541617
| 2020-06-09T15:47:23
| 2020-06-09T15:47:23
| 177,746,482
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 473
|
java
|
package com.javarush.task.task29.task2907;
import java.math.BigDecimal;
/*
Этот странный BigDecimal
*/
public class Solution {
public static void main(String[] args) {
System.out.println(getValue(1.1d, 1.2d));
}
public static BigDecimal getValue(double v1, double v2) {
BigDecimal bigDecimal = new BigDecimal(v1 + "");
BigDecimal bigDecimal1 = new BigDecimal(v2 + "");
return bigDecimal.add(bigDecimal1);
}
}
|
[
"dangerdanil@gmail.com"
] |
dangerdanil@gmail.com
|
a0131c9c3ca2be9791ef741aa2ec0b1d97eb369b
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-58b-12-30-MOEAD-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/optimization/fitting/GaussianFitter_ESTest.java
|
6a2ceb622577653074344a9908556c4e46fa1a01
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 579
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Apr 08 09:57:53 UTC 2020
*/
package org.apache.commons.math.optimization.fitting;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class GaussianFitter_ESTest extends GaussianFitter_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
833bbef41a6c943df5d33304611fe28878569634
|
6361a44297dcacfbb5b09924537f033f8ca861cc
|
/Exercise_ XML Processing/xmlProcessing_productShop/src/main/java/productshop/domain/dtos/views/categoriesbyproductscount/CategoryByProductsCountDto.java
|
8d84724ac5833642d1fa1f33499f04e11ae79fa7
|
[] |
no_license
|
allsi89/db_Hibernate_Spring
|
071a9ecb0a3151a83b63ce4ed93954afea9992cc
|
25761e8b1f8085e40680ec92881707781dc8f514
|
refs/heads/master
| 2020-04-04T08:51:31.117586
| 2018-12-08T13:38:25
| 2018-12-08T13:38:25
| 155,797,510
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,742
|
java
|
package productshop.domain.dtos.views.categoriesbyproductscount;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import java.io.Serializable;
import java.math.BigDecimal;
@XmlAccessorType(XmlAccessType.FIELD)
public class CategoryByProductsCountDto implements Serializable {
@XmlAttribute(name = "name")
private String name;
@XmlElement(name = "products-count")
private Integer productsCount;
@XmlElement(name = "average-price")
private Double averagePrice;
@XmlElement(name = "total-revenue")
private BigDecimal totalRevenue;
public CategoryByProductsCountDto() {
}
public CategoryByProductsCountDto(String category, Integer productsCount, Double averagePrice, BigDecimal totalRevenue) {
this.name = category;
this.productsCount = productsCount;
this.averagePrice = averagePrice;
this.totalRevenue = totalRevenue;
}
public String getCategory() {
return name;
}
public void setCategory(String category) {
this.name = category;
}
public Integer getProductsCount() {
return productsCount;
}
public void setProductsCount(Integer productsCount) {
this.productsCount = productsCount;
}
public Double getAveragePrice() {
return averagePrice;
}
public void setAveragePrice(Double averagePrice) {
this.averagePrice = averagePrice;
}
public BigDecimal getTotalRevenue() {
return totalRevenue;
}
public void setTotalRevenue(BigDecimal totalRevenue) {
this.totalRevenue = totalRevenue;
}
}
|
[
"37107768+allsi89@users.noreply.github.com"
] |
37107768+allsi89@users.noreply.github.com
|
4694c258957483a8f5e4f1bdba535fedffd6d01b
|
4af034492bad7e1ad6cdcc589701dddeda915b27
|
/src/main/java/org/apache/ibatis/cache/NullCacheKey.java
|
d1338d4598423905ac1bf8eca8bcc6cc6f605d17
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
gm504117608/guomin-mybatis
|
7b3d013a26e20595c6058148a3e2eca2fb076ea3
|
5917d9d5d6876e19b15090026ab84ddd71a641bb
|
refs/heads/master
| 2021-01-20T12:31:00.307088
| 2017-03-09T10:10:17
| 2017-03-09T10:10:17
| 82,660,102
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,172
|
java
|
/**
* Copyright 2009-2015 the original author or authors.
* <p/>
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.cache;
/**
* @author Clinton Begin
*/
public final class NullCacheKey extends CacheKey {
private static final long serialVersionUID = 3704229911977019465L;
public NullCacheKey() {
super();
}
@Override
public void update(Object object) {
throw new CacheException("Not allowed to update a NullCacheKey instance.");
}
@Override
public void updateAll(Object[] objects) {
throw new CacheException("Not allowed to update a NullCacheKey instance.");
}
}
|
[
"504117608@qq.com"
] |
504117608@qq.com
|
d61a08d96a5efabeac4fb46c488cae06b0c26c5a
|
539c6f876354a7c294dc33049958a4f000494c7b
|
/src/main/java/guava/ListeningExecutorServiceTest.java
|
ef3c9b9bf4d6ae54b75f7025fb66eed492afdb9e
|
[] |
no_license
|
ZLBer/DaliyOfProgramme
|
3392dd9a0ba4d749da6291123892e73f7b5cb981
|
738dec918d659e98c74be2c177dc5b259e05b9b9
|
refs/heads/master
| 2022-10-19T03:09:14.066572
| 2021-01-03T11:48:16
| 2021-01-03T11:48:16
| 164,304,274
| 1
| 0
| null | 2022-09-01T23:01:21
| 2019-01-06T12:20:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,491
|
java
|
package guava;
import com.google.common.util.concurrent.*;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
public class ListeningExecutorServiceTest {
public static void main(String[] args) throws InterruptedException {
/*
*
1.future 添加任务回调
*/
ListeningExecutorService service = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(10));
ListenableFuture<String> explosion = service.submit(new Callable() {
public String call() {
try {
TimeUnit.SECONDS.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return "success";
}
});
explosion.addListener(new Runnable() {
@Override
public void run() {
}
}, service);
Futures.addCallback(explosion, new FutureCallback<String>() {
// we want this handler to run immediately after we push the big red button!
@Override
public void onSuccess(@NullableDecl String s) {
System.out.println(s);
}
public void onFailure(Throwable thrown) {
}
}, service);
Thread.currentThread().join();
}
}
|
[
"1098294815@qq.com"
] |
1098294815@qq.com
|
281672b0183ad28d9c3c6cb0ed9c93c3e66f574f
|
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
|
/Corpus/eclipse.jdt.ui/6436.java
|
609a2ff4ff9dba38c5fcd68f3d7c74f578d0b48d
|
[
"MIT"
] |
permissive
|
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
|
d3fd21745dfddb2979e8ac262588cfdfe471899f
|
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
|
refs/heads/master
| 2020-03-31T15:52:01.005505
| 2018-10-01T23:38:50
| 2018-10-01T23:38:50
| 152,354,327
| 1
| 0
|
MIT
| 2018-10-10T02:57:02
| 2018-10-10T02:57:02
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package simple_out;
public class TestCatchClause {
public int foo() {
int i = 0;
switch(i) {
case 10:
return 10;
case 20:
return bar();
}
return 0;
}
int bar() {
return 10;
}
}
|
[
"masudcseku@gmail.com"
] |
masudcseku@gmail.com
|
316cbaaf75572f4a7b860a9508df9bbc185df7cb
|
8b8b98ecd4f3a637db124e782c8557e8a5ca3112
|
/utote/wsdl2java/programservice/xmlbeans/src/com/microsoft/schemas/_2003/_10/serialization/impl/AnyURIDocumentImpl.java
|
7c6ed2b9f2d094495ae1ca23b915094db7ede04b
|
[] |
no_license
|
OLINSolutions/eiservices
|
ff7d406fdab6890a9c79d8eddc6e8a1fe501a5ad
|
d51cf017500018dc11d1624b6586d9bf516b9c9a
|
refs/heads/master
| 2021-05-31T07:40:57.713006
| 2015-10-12T22:58:33
| 2015-10-12T22:58:33
| 57,132,184
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,824
|
java
|
/*
* An XML document type.
* Localname: anyURI
* Namespace: http://schemas.microsoft.com/2003/10/Serialization/
* Java type: com.microsoft.schemas._2003._10.serialization.AnyURIDocument
*
* Automatically generated - do not modify.
*/
package com.microsoft.schemas._2003._10.serialization.impl;
/**
* A document containing one anyURI(@http://schemas.microsoft.com/2003/10/Serialization/) element.
*
* This is a complex type.
*/
public class AnyURIDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.microsoft.schemas._2003._10.serialization.AnyURIDocument
{
public AnyURIDocumentImpl(org.apache.xmlbeans.SchemaType sType)
{
super(sType);
}
private static final javax.xml.namespace.QName ANYURI$0 =
new javax.xml.namespace.QName("http://schemas.microsoft.com/2003/10/Serialization/", "anyURI");
/**
* Gets the "anyURI" element
*/
public java.lang.String getAnyURI()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ANYURI$0, 0);
if (target == null)
{
return null;
}
return target.getStringValue();
}
}
/**
* Gets (as xml) the "anyURI" element
*/
public org.apache.xmlbeans.XmlAnyURI xgetAnyURI()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlAnyURI target = null;
target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_element_user(ANYURI$0, 0);
return target;
}
}
/**
* Tests for nil "anyURI" element
*/
public boolean isNilAnyURI()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlAnyURI target = null;
target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_element_user(ANYURI$0, 0);
if (target == null) return false;
return target.isNil();
}
}
/**
* Sets the "anyURI" element
*/
public void setAnyURI(java.lang.String anyURI)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ANYURI$0, 0);
if (target == null)
{
target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ANYURI$0);
}
target.setStringValue(anyURI);
}
}
/**
* Sets (as xml) the "anyURI" element
*/
public void xsetAnyURI(org.apache.xmlbeans.XmlAnyURI anyURI)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlAnyURI target = null;
target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_element_user(ANYURI$0, 0);
if (target == null)
{
target = (org.apache.xmlbeans.XmlAnyURI)get_store().add_element_user(ANYURI$0);
}
target.set(anyURI);
}
}
/**
* Nils the "anyURI" element
*/
public void setNilAnyURI()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlAnyURI target = null;
target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_element_user(ANYURI$0, 0);
if (target == null)
{
target = (org.apache.xmlbeans.XmlAnyURI)get_store().add_element_user(ANYURI$0);
}
target.setNil();
}
}
}
|
[
"jordan@equusinteractive.com"
] |
jordan@equusinteractive.com
|
098fd88e38448a7638baa80c4a6ddfbe8127b29a
|
dd80a584130ef1a0333429ba76c1cee0eb40df73
|
/external/objenesis/tck/src/org/objenesis/tck/CandidateLoader.java
|
294fd505b579cbfe100e67f0d3b73de73a11130b
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
karunmatharu/Android-4.4-Pay-by-Data
|
466f4e169ede13c5835424c78e8c30ce58f885c1
|
fcb778e92d4aad525ef7a995660580f948d40bc9
|
refs/heads/master
| 2021-03-24T13:33:01.721868
| 2017-02-18T17:48:49
| 2017-02-18T17:48:49
| 81,847,777
| 0
| 2
|
MIT
| 2020-03-09T00:02:12
| 2017-02-13T16:47:00
| null |
UTF-8
|
Java
| false
| false
| 4,067
|
java
|
/**
* Copyright 2006-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.objenesis.tck;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Properties;
/**
* Loads a set of candidate classes from a properties file into the TCK. <p/> The properties file
* takes the form of candidateClassName=shortDescription.
*
* @author Joe Walnes
* @see TCK
*/
public class CandidateLoader {
private final TCK tck;
private final ClassLoader classloader;
private final ErrorHandler errorHandler;
/**
* Handler for reporting errors from the CandidateLoader.
*/
public static interface ErrorHandler {
/**
* Called whenever, trying to retrieve a candidate class from its name, a
* ClassNotFoundException is thrown
*
* @param name Candidate class name
*/
void classNotFound(String name);
}
/**
* Error handler that logs errors to a text stream.
*/
public static class LoggingErrorHandler implements CandidateLoader.ErrorHandler {
private final PrintStream out;
/**
* @param out Stream in which to log
*/
public LoggingErrorHandler(PrintStream out) {
this.out = out;
}
public void classNotFound(String name) {
out.println("Class not found : " + name);
}
}
/**
* @param tck TCK that will use the candidates
* @param classloader ClassLoader from which candidates classes are loaded
* @param errorHandler Handler called in case of error
*/
public CandidateLoader(TCK tck, ClassLoader classloader, ErrorHandler errorHandler) {
this.tck = tck;
this.classloader = classloader;
this.errorHandler = errorHandler;
}
/**
* @param inputStream Stream containing the properties
* @throws IOException If something goes wrong while reading the stream
*/
public void loadFrom(InputStream inputStream) throws IOException {
// Properties contains a convenient key=value parser, however it stores
// the entries in a Hashtable which loses the original order.
// So, we create a special Properties instance that writes its
// entries directly to the TCK (which retains order).
Properties properties = new Properties() {
private static final long serialVersionUID = 1L;
public Object put(Object key, Object value) {
handlePropertyEntry((String) key, (String) value);
return null;
}
};
properties.load(inputStream);
}
/**
* Load a candidate property file
*
* @param cls Class on which <code>getResourceAsStream</code> is called
* @param resource File name
* @throws IOException If there's problem reading the file
*/
public void loadFromResource(Class cls, String resource) throws IOException {
InputStream candidatesConfig = cls.getResourceAsStream(resource);
if(candidatesConfig == null) {
throw new IOException("Resource '" + resource + "' not found relative to " + cls.getName());
}
try {
loadFrom(candidatesConfig);
}
finally {
candidatesConfig.close();
}
}
private void handlePropertyEntry(String key, String value) {
try {
Class candidate = Class.forName(key, true, classloader);
tck.registerCandidate(candidate, value);
}
catch(ClassNotFoundException e) {
errorHandler.classNotFound(key);
}
}
}
|
[
"karun.matharu@gmail.com"
] |
karun.matharu@gmail.com
|
8d1108e03e501e8408d2ed2a924fb0f808fe3feb
|
6ede49dbb033e235823d80e9a8bb078c26b7fbd0
|
/WebApp/src/main/java/com/stackroute/webapp/model/User.java
|
c05be98cb372a76e98bbdb8909ba64bfc487b22e
|
[] |
no_license
|
Thrush9/Bootcamp_SpringExercises
|
60e346a0dbf2c36acc352cc3160e91cc95d18355
|
56347df85dcff28287baa6b11575c229b2723881
|
refs/heads/main
| 2023-03-02T08:22:44.495107
| 2021-02-13T10:17:30
| 2021-02-13T10:17:30
| 338,546,654
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 677
|
java
|
package com.stackroute.webapp.model;
public class User {
public String email;
public String username;
public String password;
public String mobile;
public User() {
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
}
|
[
"100758@ust-global.com"
] |
100758@ust-global.com
|
4e26e6e5a5d2faa0b22c4ed044398774e7902632
|
3d3184dbbe61cee90f4380578d44ab533f482761
|
/Android-1/Lesson-2/SecondActivity/app/src/main/java/ru/geekbrains/secondactivity/StartSecondActivity.java
|
b4ddd3ee4e5d2a373eb1a8b470e21c75771052df
|
[] |
no_license
|
MrPaul98/Android
|
c170a37a44ca9f06418c921230568097254f5680
|
6acecb69a190943de9827c34800a4ee7b860632d
|
refs/heads/master
| 2022-12-21T12:47:33.879706
| 2020-10-01T11:31:28
| 2020-10-01T11:31:28
| 300,254,265
| 1
| 0
| null | 2020-10-01T11:27:02
| 2020-10-01T11:27:01
| null |
UTF-8
|
Java
| false
| false
| 1,147
|
java
|
package ru.geekbrains.secondactivity;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.EditText;
public class StartSecondActivity implements View.OnClickListener {
public final static String TEXT = "Text";
private Activity sourceActivity;
public StartSecondActivity(Activity sourceActivity){
this.sourceActivity = sourceActivity;
}
@Override
public void onClick(View v) {
// Формируем посылку
EditText txt = (EditText) sourceActivity.findViewById(R.id.editText);
EditText num = (EditText) sourceActivity.findViewById(R.id.editText2);
Parcel parcel = new Parcel();
parcel.text = txt.getText().toString();
parcel.number = Integer.parseInt(num.getText().toString());
// Посылка сформирована, отправляем
Intent intent = new Intent(sourceActivity, SecondActivity.class);
intent.putExtra(TEXT, parcel); // Отправляем посылку
sourceActivity.startActivityForResult(intent, 1);
}
}
|
[
"mrvlmor@gmail.com"
] |
mrvlmor@gmail.com
|
7f82d7e1bdd514da646f0830faede0656a038054
|
db55988e5f1879f9de033aae62bdba25765f5665
|
/demo-web/src/main/java/com/remember/demo/web/controller/TestController.java
|
601ca8dc1de9792656a34b3b249759117b1e4c10
|
[
"MIT"
] |
permissive
|
remember-5/spring-boot-demo
|
043ceb0931a04739359a396096f848622c782f89
|
d000a9b6a717893c04000c4acf4445348166102f
|
refs/heads/main
| 2023-08-24T15:10:28.743845
| 2023-08-04T09:29:54
| 2023-08-04T09:29:54
| 249,986,236
| 8
| 3
|
MIT
| 2023-08-30T06:26:15
| 2020-03-25T13:30:14
|
Java
|
UTF-8
|
Java
| false
| false
| 811
|
java
|
package com.remember.demo.web.controller;
import com.remember.demo.web.design.observer.EventBusCenter;
import com.remember.demo.web.design.observer.NotifyEvent;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author wangjihao
* @date 2020/12/21
*/
@RestController
@RequestMapping("test")
public class TestController {
@GetMapping("${api.a}")
public String test() {
return "aaa";
}
@GetMapping("${api.b}")
public String test1() {
return "bbb";
}
@GetMapping("observer")
public String test2() {
EventBusCenter.post(new NotifyEvent("13372817283", "123@qq.com", "666"));
return "success";
}
}
|
[
"1332661444@qq.com"
] |
1332661444@qq.com
|
0a2d23beebcdac33fefb2ebd6fd563088669a4d2
|
99cd23a66507d37f1a74c5c90413e3b5d7786124
|
/src/main/java/com/west/lake/blog/service/ReviewService.java
|
4e1a05bdc6febf5dbf5dd12084f0e4a6dc740154
|
[
"MIT"
] |
permissive
|
RecentProgress/WestLakeBlogBackEnd
|
dea129ad88efff6ac8519e04c33fb004575a73c4
|
c23d2627230b903e2e3c6422cad868628eeda805
|
refs/heads/master
| 2020-12-12T20:44:12.907308
| 2019-12-19T09:31:50
| 2019-12-19T09:31:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,164
|
java
|
package com.west.lake.blog.service;
import com.west.lake.blog.model.entity.Review;
import java.util.List;
/**
* 评论接口定义
*
* @author futao
* Created on 2019-03-28.
*/
public interface ReviewService {
/**
* 新增评论
*
* @param articleId 文章id
* @param parentReviewId 回复的评论id
* @param content 评论内容
* @return
*/
Review add(String articleId, String parentReviewId, String content);
/**
* 删除评论
*
* @param id 要删除的评论主键
* @return 评论
*/
void delete(String id);
/**
* 修改评论
*
* @param id 要修改的评论主键
* @return 评论
*/
Review update(String id);
/**
* 查询评论列表
*
* @return 评论列表
*/
List<Review> list();
/**
* 获取评论详情
*
* @param id 要查询的评论主键
* @return 评论
*/
Review byId(String id);
/**
* 通过articleId列出一级评论
*
* @param articleId 文章id
* @return
*/
List<Review> listByArticleId(String articleId);
}
|
[
"1185172056@qq.com"
] |
1185172056@qq.com
|
7b1278cd7b449ddf9e4d2c0a2254d9a609431a59
|
d944234f35651bd5a23f8d14b77555390c729926
|
/java-interview-demo/src/main/java/com/interview/threads/InterruptedStopTest.java
|
618368126b153b3c9a11cdea97b63ae3f7a960c9
|
[] |
no_license
|
LJJ1994/Java-Learn
|
4f2d5981c291da24b4be11afa9506e3665d45d6d
|
1932dfc8416f7e4498c848671f59e2a816b1316b
|
refs/heads/master
| 2022-11-06T09:34:32.841582
| 2020-08-01T05:00:09
| 2020-08-01T05:00:09
| 247,892,292
| 0
| 0
| null | 2022-10-12T20:44:53
| 2020-03-17T06:06:00
|
Java
|
UTF-8
|
Java
| false
| false
| 734
|
java
|
package com.interview.threads;
public class InterruptedStopTest {
public static void main(String[] args) throws InterruptedException{
InterruptedStop interruptedStop = new InterruptedStop("A");
interruptedStop.start();
Thread.sleep(100);
System.out.println("中断线程");
interruptedStop.interrupt();
}
}
class InterruptedStop extends Thread{
private String name;
public InterruptedStop(String name){
this.name = name;
}
@Override
public void run(){
while (!isInterrupted()){
System.out.println("线程 " + name + " 正在运行....");
}
System.out.println("线程运行结束...");
}
}
|
[
"optionsci111@gmail.com"
] |
optionsci111@gmail.com
|
0b52076b44cdf45ac3566c2f828e1d750a0ebde2
|
f7160c0f0526cc5afc0fe4e6f06d384394059aa1
|
/largegraph/lg-gwt/src/main/java/com/graphscape/gwt/commons/provider/default_/dom/TableWrapper.java
|
2d26d60c8ddfd906577c47ef9c8da7b774f72a85
|
[] |
no_license
|
o1711/somecode
|
e2461c4fb51b3d75421c4827c43be52885df3a56
|
a084f71786e886bac8f217255f54f5740fa786de
|
refs/heads/master
| 2021-09-14T14:51:58.704495
| 2018-05-15T07:51:05
| 2018-05-15T07:51:05
| 112,574,683
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,141
|
java
|
/**
* All right is from Author of the file,to be explained in comming days.
* Nov 24, 2012
*/
package com.graphscape.gwt.commons.provider.default_.dom;
import com.google.gwt.user.client.DOM;
import com.graphscape.gwt.commons.provider.default_.dom.TRWrapper;
import com.graphscape.gwt.commons.provider.default_.dom.TableWrapper;
import com.graphscape.gwt.core.dom.ElementWrapper;
/**
* @author wu
*
*/
public class TableWrapper extends ElementWrapper {
/**
* @param ele
*/
public TableWrapper() {
super(DOM.createTable());
this.cellspacing(0);
this.cellspading(0);
}
public TableWrapper cellspacing(int cs) {
this.setAttribute("cellspacing", cs + "");
return this;
}
public TableWrapper cellspading(int cs) {
this.setAttribute("cellspading", cs + "");
return this;
}
public TRWrapper insertTrBefore(TRWrapper trw) {
TRWrapper rt = new TRWrapper();
this.element.insertBefore(rt.getElement(), trw == null ? null : trw.getElement());
return rt;
}
public TRWrapper addTr() {
TRWrapper rt = new TRWrapper();
this.append(rt);
return rt;
}
}
|
[
"wkz808@163.com"
] |
wkz808@163.com
|
0fb725fc3c25b4bcb606c7cf59abeb831965302b
|
d0ebbd623d1552167c4989768056dcc28078ff85
|
/abc99/src/main/java/com/fastcode/abc99/addons/reporting/application/dashboardversion/dto/CreateDashboardversionInput.java
|
736d7a4c92b9f6f464729fb1c300dec7e71fd1f9
|
[] |
no_license
|
fastcoderepos/abc99
|
5f8383488094555e9001e2a5ae4a60c0f347146e
|
0f8e2681ee4dd5d35f8b83714c6ed3f3546ef8e5
|
refs/heads/master
| 2023-02-15T11:40:23.634524
| 2021-01-06T11:49:39
| 2021-01-06T11:49:39
| 327,296,257
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 312
|
java
|
package com.fastcode.abc99.addons.reporting.application.dashboardversion.dto;
import lombok.Getter;
import lombok.Setter;
import java.time.*;
@Getter @Setter
public class CreateDashboardversionInput {
private String description;
private String title;
private Long userId;
private Long dashboardId;
}
|
[
"info@nfinityllc.com"
] |
info@nfinityllc.com
|
c7be1350a650e3d07156296857b411338dba65b7
|
ec95ec759f3d3270967aa4e59dffddfec9f4a80f
|
/I_LinkedIn_LeetCode/src/Q023_Merge_k_Sorted_Lists.java
|
e4a4e27da7c5a5e376b5007a3c31e87dc311765f
|
[] |
no_license
|
guccio618/myLeetcode
|
3ccf037f0b917c13967e2bbbee7d04ff8dba68bc
|
a51c874144964435fca7752b83dcbcc52db37a4b
|
refs/heads/master
| 2021-01-13T14:59:31.182538
| 2017-01-26T04:47:40
| 2017-01-26T04:47:40
| 76,620,835
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,624
|
java
|
import java.util.*;
/******
*
* Merge k sorted linked lists and return it as one sorted list.
* Analyze and describe its complexity.
*
* */
public class Q023_Merge_k_Sorted_Lists {
// Solution 1: using divide & conquer
public ListNode mergeKLists(ListNode[] lists) {
if (lists == null || lists.length == 0) {
return null;
}
return mergeList(lists, 0, lists.length - 1);
}
public ListNode mergeList(ListNode[] lists, int start, int end) {
if (start > end) {
return null;
} else if (start == end) {
return lists[start];
}
int mid = start + (end - start) / 2;
ListNode leftList = mergeList(lists, start, mid);
ListNode rightList = mergeList(lists, mid + 1, end);
ListNode dummy = new ListNode(0);
ListNode node = dummy;
while (leftList != null || rightList != null) {
if (leftList != null && rightList != null) {
if (leftList.val < rightList.val) {
node.next = leftList;
leftList = leftList.next;
} else {
node.next = rightList;
rightList = rightList.next;
}
} else if (leftList != null && rightList == null) {
node.next = leftList;
leftList = leftList.next;
} else {
node.next = rightList;
rightList = rightList.next;
}
node = node.next;
}
return dummy.next;
}
// Solution 2: using priorityQueue
public ListNode mergeKLists2(ListNode[] lists) {
if (lists == null || lists.length == 0) {
return null;
}
Queue<ListNode> minHeap = new PriorityQueue<ListNode>(lists.length, new Comparator<ListNode>() {
@Override
public int compare(ListNode node1, ListNode node2) {
return node1.val - node2.val;
}
});
for (int i = 0; i < lists.length; i++) {
if (lists[i] != null) {
minHeap.offer(lists[i]);
}
}
ListNode dummy = new ListNode(0);
ListNode travelor = dummy;
while (!minHeap.isEmpty()) {
ListNode node = minHeap.poll();
travelor.next = node;
travelor = travelor.next;
if (node.next != null) {
minHeap.offer(node.next);
}
}
return dummy.next;
}
/****************************************************/
public ListNode mergeKLists3(List<ListNode> lists) {
if (lists == null || lists.size() == 0) {
return null;
} else if (lists.size() == 1) {
return lists.get(0);
}
int length = lists.size();
int mid = (length - 1) / 2;
ListNode l1 = mergeKLists3(lists.subList(0, mid + 1));
ListNode l2 = mergeKLists3(lists.subList(mid + 1, length));
return merge2Lists(l1, l2);
}
ListNode merge2Lists(ListNode list1, ListNode list2) {
ListNode head = new ListNode(-1);
ListNode current = head;
while (list1 != null && list2 != null) {
if (list1.val < list2.val) {
current.next = list1;
list1 = list1.next;
} else {
current.next = list2;
list2 = list2.next;
}
current = current.next;
}
if (list1 != null) {
current.next = list1;
} else {
current.next = list2;
}
return head.next;
}
/****************************************************/
// by other using PriorityQueue
public ListNode mergeKLists4(ListNode[] lists) {
Queue<ListNode> q = new PriorityQueue<ListNode>(new ListComparator());
for (ListNode n : lists) {
if (n != null) {
q.add(n);
}
}
ListNode head = new ListNode(0), p = head, cur = null;
while (!q.isEmpty()) {
cur = q.poll();
if (cur.next != null)
q.offer(cur.next);
p.next = cur;
p = p.next;
}
return head.next;
}
class ListComparator implements Comparator<ListNode> {
@Override
public int compare(ListNode n1, ListNode n2) {
return n1.val - n2.val;
}
}
}
|
[
"jackiechan618@hotmail.com"
] |
jackiechan618@hotmail.com
|
feff257849826dc4257858cff05c001489cd218d
|
d9fbc865848740472f56685a8f1b16edf8664a6d
|
/connect-file-pulse-expression/src/main/java/io/streamthoughts/kafka/connect/filepulse/expression/function/conditions/Not.java
|
f5dc086a1e21c7075c6e56c2e6eabe3c72472a24
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
streamthoughts/kafka-connect-file-pulse
|
963868eded5104ca3d4b5df44de08e75549762d6
|
9b654639277e48836db2d5dd3f5d3d33d6779307
|
refs/heads/master
| 2023-09-03T20:05:02.957261
| 2023-08-22T14:37:36
| 2023-08-29T16:55:09
| 170,883,666
| 278
| 64
|
Apache-2.0
| 2023-09-14T14:10:13
| 2019-02-15T15:11:40
|
Java
|
UTF-8
|
Java
| false
| false
| 1,481
|
java
|
/*
* Copyright 2021 StreamThoughts.
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.streamthoughts.kafka.connect.filepulse.expression.function.conditions;
import io.streamthoughts.kafka.connect.filepulse.data.TypedValue;
import io.streamthoughts.kafka.connect.filepulse.expression.function.AbstractTransformExpressionFunction;
import io.streamthoughts.kafka.connect.filepulse.expression.function.ExpressionFunction;
/**
* An {@link ExpressionFunction} to reverse a boolean value.
*/
public class Not extends AbstractTransformExpressionFunction {
/**
* {@inheritDoc}
*/
@Override
public TypedValue transform(final TypedValue value) {
return TypedValue.bool(!value.getBool());
}
}
|
[
"florian.hussonnois@gmail.com"
] |
florian.hussonnois@gmail.com
|
4f740c85bc1ec6e1f41afc3c88a40e58062f59fb
|
e8c7dea8f2a5273becf9507b6b7a9026f2726009
|
/app/src/main/java/id/co/myproject/nicepos/view/kasir/home/StrukFragment.java
|
5ba0f04434815a395be82af63f0f366b93f25b75
|
[] |
no_license
|
raihanArman/Nice-POS
|
2918e8e7c2eabd819b798fe5f4e63a3a6fb1426f
|
c8d67e9c36ee028f26b8be2d153ef0c2df1c9924
|
refs/heads/master
| 2022-11-25T15:32:07.780750
| 2020-07-28T10:48:27
| 2020-07-28T10:48:27
| 283,182,933
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,450
|
java
|
package id.co.myproject.nicepos.view.kasir.home;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.text.format.DateFormat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.app.feng.fixtablelayout.FixTableLayout;
import java.util.List;
import id.co.myproject.nicepos.R;
import id.co.myproject.nicepos.adapter.PesananAdapter;
import id.co.myproject.nicepos.model.Pesanan;
import id.co.myproject.nicepos.model.StrukTransaksi;
import id.co.myproject.nicepos.request.ApiRequest;
import id.co.myproject.nicepos.request.RetrofitRequest;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import static id.co.myproject.nicepos.util.Helper.TYPE_BUNDLE_FROM_ORDER;
import static id.co.myproject.nicepos.util.Helper.TYPE_BUNDLE_FROM_TRANSAKSI;
import static id.co.myproject.nicepos.util.Helper.rupiahFormat;
/**
* A simple {@link Fragment} subclass.
*/
public class StrukFragment extends Fragment {
TextView tv_tanggal, tv_cafe, tv_kasir, tv_total, tv_bayar, tv_kembalian;
int id_transaksi, type_bundle;
FixTableLayout tb_menu;
ApiRequest apiRequest;
public String[] title = {"Menu","Harga","Qty"};
Button btn_back;
ImageView iv_back;
public StrukFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_struk, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
id_transaksi = getArguments().getInt("id_transaksi");
type_bundle = getArguments().getInt("type_bundle");
apiRequest = RetrofitRequest.getRetrofitInstance().create(ApiRequest.class);
tv_tanggal = view.findViewById(R.id.tv_tanggal);
tv_cafe = view.findViewById(R.id.tv_cafe);
tv_kasir = view.findViewById(R.id.tv_kasir);
tv_total = view.findViewById(R.id.tv_total);
tv_bayar = view.findViewById(R.id.tv_bayar);
tv_kembalian = view.findViewById(R.id.tv_kembalian);
tb_menu = view.findViewById(R.id.tb_menu);
btn_back = view.findViewById(R.id.btn_back);
iv_back = view.findViewById(R.id.iv_back);
loadData();
loadTableMenu();
if (type_bundle == TYPE_BUNDLE_FROM_ORDER){
iv_back.setVisibility(View.GONE);
}else if (type_bundle == TYPE_BUNDLE_FROM_TRANSAKSI){
iv_back.setVisibility(View.VISIBLE);
btn_back.setVisibility(View.INVISIBLE);
}
btn_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getActivity().getSupportFragmentManager().popBackStackImmediate();
}
});
iv_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getActivity().getSupportFragmentManager().popBackStackImmediate();
}
});
}
private void loadData(){
Call<StrukTransaksi> getStruk = apiRequest.getStruk(id_transaksi);
getStruk.enqueue(new Callback<StrukTransaksi>() {
@Override
public void onResponse(Call<StrukTransaksi> call, Response<StrukTransaksi> response) {
if (response.isSuccessful()){
StrukTransaksi strukTransaksi = response.body();
setData(strukTransaksi);
}
}
@Override
public void onFailure(Call<StrukTransaksi> call, Throwable t) {
Toast.makeText(getActivity(), ""+t.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
private void setData(StrukTransaksi strukTransaksi) {
tv_cafe.setText(strukTransaksi.getNamaCafe());
String date = DateFormat.format("dd MMM yyyy", strukTransaksi.getTanggal()).toString();
tv_tanggal.setText(date);
tv_total.setText(strukTransaksi.getTotal());
tv_bayar.setText(rupiahFormat(Integer.parseInt(strukTransaksi.getUangBayar())));
tv_kembalian.setText(rupiahFormat(Integer.parseInt(strukTransaksi.getUangKembali())));
tv_kasir.setText(strukTransaksi.getNamaKasir());
}
private void loadTableMenu(){
Call<List<Pesanan>> getPesanan = apiRequest.getPesanan(id_transaksi);
getPesanan.enqueue(new Callback<List<Pesanan>>() {
@Override
public void onResponse(Call<List<Pesanan>> call, Response<List<Pesanan>> response) {
if (response.isSuccessful()){
List<Pesanan> pesananList = response.body();
PesananAdapter pesananAdapter = new PesananAdapter(title, pesananList);
tb_menu.setAdapter(pesananAdapter);
}
}
@Override
public void onFailure(Call<List<Pesanan>> call, Throwable t) {
}
});
}
}
|
[
"raihanarman8@gmail.com"
] |
raihanarman8@gmail.com
|
dbf57ea462f139a93e74ba96e36588abb3897869
|
d270f397f3c674199d169f8adf47b4140984cf2e
|
/src/main/java/org/jtester/bytecode/reflector/MethodAccessor.java
|
39b426e02101450dfb0a04d5e6cb0a7eacf1e243
|
[] |
no_license
|
colddew/jtester
|
1f6a3119f2696e9142251a62ee0bd8f75277e91d
|
6979128c43d6dcb1c9dc71aac9af97a0d822a6ae
|
refs/heads/master
| 2021-01-19T05:12:44.180386
| 2019-05-06T14:27:30
| 2019-05-06T14:27:30
| 23,995,747
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,208
|
java
|
package org.jtester.bytecode.reflector;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Arrays;
import org.jtester.bytecode.reflector.helper.ClazzHelper;
import org.jtester.bytecode.reflector.helper.MethodHelper;
import org.jtester.exception.ExceptionWrapper;
import org.jtester.exception.JTesterException;
import org.jtester.exception.NoSuchMethodRuntimeException;
@SuppressWarnings({ "rawtypes", "unchecked" })
public class MethodAccessor<T> {
private final Method method;
private final Class targetClaz;
public MethodAccessor(Class targetClaz, String methodName, Class... parametersType) {
this.targetClaz = targetClaz;
this.method = MethodHelper.getMethod(targetClaz, methodName, parametersType);
}
/**
*
* @param targetObj
* @param targetClazz
* @param methodName
* @param parametersType
*/
public MethodAccessor(Object target, String methodName, Class... parametersType) {
this.targetClaz = target.getClass();
this.method = MethodHelper.getMethod(targetClaz, methodName, parametersType);
}
public MethodAccessor(Method method) {
this.method = method;
this.targetClaz = method.getDeclaringClass();
}
public Method getMethod() {
return this.method;
}
public T invoke(Object target, Object[] args) throws Exception {
boolean isAccessible = this.method.isAccessible();
try {
return (T) method.invoke(target, args);
} catch (InvocationTargetException e) {
Throwable te = e.getTargetException();
if (te instanceof Exception) {
throw (Exception) te;
} else {
throw e;
}
} finally {
this.method.setAccessible(isAccessible);
}
}
/**
* 调用方法,不显式抛出异常<br>
* 原方法如果有显式异常,将被封装
*
* @param target
* @param args
* @return
*/
public T invokeUnThrow(Object target, Object[] args) {
try {
return invoke(target, args);
} catch (InvocationTargetException e) {
Throwable targetException = e.getTargetException();
throw ExceptionWrapper.wrapWithRuntimeException(targetException);
} catch (Throwable e) {
throw ExceptionWrapper.wrapWithRuntimeException(e);
}
}
public T invokeStatic(Object[] args) throws Exception {
if (Modifier.isStatic(method.getModifiers()) == false) {
String methodDesc = method.getName() + "(" + Arrays.toString(method.getParameterTypes()) + ")";
throw new NoSuchMethodRuntimeException("No such static method: " + methodDesc + " in class["
+ this.targetClaz + "]");
} else {
return (T) invoke(null, args);
}
}
public T invokeStaticUnThrow(Object[] args) {
try {
return (T) invokeStatic(args);
} catch (InvocationTargetException e) {
Throwable targetException = e.getTargetException();
throw ExceptionWrapper.wrapWithRuntimeException(targetException);
} catch (Throwable e) {
throw ExceptionWrapper.wrapWithRuntimeException(e);
}
}
/**
* Invokes the given method with the given parameters on the given target
* object
*
* @param target
* The object containing the method, not null
* @param method
* The method, not null
* @param arguments
* The method arguments
* @return The result of the invocation, null if void
* @throws JTesterException
* if the method could not be invoked
*/
public static <T> T invokeMethod(Object target, Method method, Object... arguments) throws Exception {
boolean isAccessible = method.isAccessible();
try {
method.setAccessible(true);
return (T) method.invoke(target, arguments);
} finally {
method.setAccessible(isAccessible);
}
}
public static <T> T invokeMethodUnThrow(Object target, Method method, Object... arguments) {
if (method == null) {
throw new RuntimeException("reflector invoke ,the argument[method] can't be null.");
}
try {
return (T) invokeMethod(target, method, arguments);
} catch (Exception e) {
throw new JTesterException("Unable to invoke method[" + method.getName() + "].", e);
}
}
public static <T> T invokeMethod(Object target, String methodNmae, Object... paras) throws Exception {
if (target == null) {
throw new RuntimeException("the target object can't be null!");
}
Object _target = ClazzHelper.getProxiedObject(target);
Class[] paraClazes = MethodHelper.getParameterClazz(paras);
Method method = MethodHelper.getMethod(_target.getClass(), methodNmae, paraClazes);
Object result = invokeMethod(_target, method, paras);
return (T) result;
}
/**
* 反射调用方法,不显式的抛出受检异常<br>
* 原生的受检异常会被包装成运行时异常
*
* @param <T>
* @param target
* @param methodName
* @param paras
* @return
*/
public static <T> T invokeMethodUnThrow(Object target, String methodName, Object... paras) {
try {
return (T) invokeMethod(target, methodName, paras);
} catch (Exception e) {
throw new JTesterException("Unable to invoke method[" + methodName + "].", e);
}
}
}
|
[
"88028842@qq.com"
] |
88028842@qq.com
|
a79dadf5a1f35fa556a27397c7e2948429474fae
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a001/A001082Test.java
|
d3d53f4f854129d6187cf7391ca87d7d298218aa
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a001;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A001082Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
d0c8e41d20db55f0528b2d9b9934cb159c624e78
|
a486d51bb0b994e27d05ed47c1d88e00eb43ed06
|
/spring-messaging/src/main/java/org/springframework/messaging/handler/AbstractMessageCondition.java
|
d56b312ffbb85993676b388aa0168f460c8e4957
|
[] |
no_license
|
tzh476/spring-framework-5.0.8.RELEASE
|
caa9820d8d636d10ad4ecf15617d45cd9b5bec18
|
1fb5d26284a2a1febb0b2ee22bdc0d4a11deda0f
|
refs/heads/master
| 2022-02-18T12:21:59.955213
| 2019-09-05T12:38:41
| 2019-09-05T12:38:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,307
|
java
|
/*
* Copyright 2002-2017 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.messaging.handler;
import java.util.Collection;
import java.util.Iterator;
import org.springframework.lang.Nullable;
/**
* Base class for {@code MessageCondition's} that pre-declares abstract methods
* {@link #getContent()} and {@link #getToStringInfix()} in order to provide
* implementations of {@link #equals(Object)}, {@link #hashCode()}, and
* {@link #toString()}.
*
* @author Rossen Stoyanchev
* @since 4.0
*/
public abstract class AbstractMessageCondition<T extends AbstractMessageCondition<T>> implements MessageCondition<T> {
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
if (other == null || getClass() != other.getClass()) {
return false;
}
return getContent().equals(((AbstractMessageCondition<?>) other).getContent());
}
@Override
public int hashCode() {
return getContent().hashCode();
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder("[");
for (Iterator<?> iterator = getContent().iterator(); iterator.hasNext(); ) {
Object expression = iterator.next();
builder.append(expression.toString());
if (iterator.hasNext()) {
builder.append(getToStringInfix());
}
}
builder.append("]");
return builder.toString();
}
/**
* Return the collection of objects the message condition is composed of
* (e.g. destination patterns), never {@code null}.
*/
protected abstract Collection<?> getContent();
/**
* The notation to use when printing discrete items of content.
* For example " || " for URL patterns or " && " for param expressions.
*/
protected abstract String getToStringInfix();
}
|
[
"877635632@qq.com"
] |
877635632@qq.com
|
609cb81671bd720026dab482689e8bd2e4352da0
|
b6cb55c0dc6dd775805ff393b18daefa70c88c0f
|
/Express/src/kyle/leis/fs/cachecontainer/da/PositionColumns.java
|
b4686f8dff0aa7f4c577419469ae487afb048fba
|
[] |
no_license
|
haha541514/Express
|
d12ec127df2c6137792ef2724ac2239a27f0dd86
|
72e59fdea51fdba395f52575918ef1972e357cec
|
refs/heads/master
| 2021-04-03T06:50:28.984407
| 2018-03-08T09:04:09
| 2018-03-08T09:06:50
| 124,365,014
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,063
|
java
|
package kyle.leis.fs.cachecontainer.da;
import java.io.Serializable;
import kyle.common.dbaccess.query.GeneralColumns;
public class PositionColumns extends GeneralColumns implements Serializable {
/**
*
*/
private static final long serialVersionUID = -8265284628323765505L;
public PositionColumns() {
m_astrColumns = new String[3];
}
public PositionColumns(String psPscode,
String psPsname, String psPsename){
m_astrColumns = new String[3];
setPspscode(psPscode);
setPspsname(psPsname);
setPspsename(psPsename);
}
public void setPspscode(String psPscode) {
this.setField(0, psPscode);
}
public String getPspscode() {
return this.getField(0);
}
public void setPspsname(String psPsname) {
this.setField(1, psPsname);
}
public String getPspsname() {
return this.getField(1);
}
public void setPspsename(String psPsename) {
this.setField(2, psPsename);
}
public String getPspsename() {
return this.getField(2);
}
public String toString() {
return "Code Generate By Kyle";
}
}
|
[
"541514716@qq.com"
] |
541514716@qq.com
|
5e5aded3dc40ff4536d4f7f59eadc2eb5db86ef1
|
d6cf28d1b37216c657d23d8e512c15bdd9d3f226
|
/dependencies/infrastructure/src/main/java/com/foreveross/atwork/infrastructure/utils/ByteArrayToBase64TypeAdapter.java
|
0543655fcd8c393c7e8bfe5205e30b4349622dae
|
[
"MIT"
] |
permissive
|
AoEiuV020/w6s_lite_android
|
a2ec1ca8acdc848592266b548b9ac6b9a4117cd3
|
1c4ca5bdaea6d5230d851fb008cf2578a23b2ce5
|
refs/heads/master
| 2023-08-22T00:46:03.054115
| 2021-10-27T06:21:32
| 2021-10-27T07:45:41
| 421,650,297
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 978
|
java
|
package com.foreveross.atwork.infrastructure.utils;
import com.foreveross.atwork.infrastructure.utils.encryption.Base64Util;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import java.lang.reflect.Type;
/**
* Created by lingen on 15/4/8.
*/
public class ByteArrayToBase64TypeAdapter implements JsonSerializer<byte[]>, JsonDeserializer<byte[]> {
@Override
public byte[] deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
return Base64Util.decode(json.getAsString());
}
@Override
public JsonElement serialize(byte[] src, Type typeOfSrc, JsonSerializationContext context) {
return new JsonPrimitive(Base64Util.encode(src));
}
}
|
[
"lingen.liu@gmail.com"
] |
lingen.liu@gmail.com
|
3fa119387d5891feda5248e0d3e44a1c47f3ae54
|
97efc6fa9e64e2b8637a93dbe6da7abb573aa1b9
|
/src/main/java/com/servtech/servcloud/app/model/huangliang/QualityExamData.java
|
702937eb2ba1c61d5e4a7dde044b8dfe68581ff5
|
[] |
no_license
|
smartaid1980/STOutsource
|
c65a1a77749973e6b05106d8dabdfa848be76a97
|
d5bc21c2d69d5cb72743a22ba79c794d18786ac3
|
refs/heads/master
| 2023-01-04T23:40:14.806766
| 2020-10-29T02:34:32
| 2020-10-29T02:34:32
| 301,026,621
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 437
|
java
|
package com.servtech.servcloud.app.model.huangliang;
import org.javalite.activejdbc.Model;
import org.javalite.activejdbc.annotations.CompositePK;
import org.javalite.activejdbc.annotations.Table;
/**
* 品質維護
* Created by emma on 2016/8/23.
*/
@Table(value = "a_huangliang_quality_exam_data")
@CompositePK({ "date", "employee_id" , "work_shift_name", "machine_id", "order_id"})
public class QualityExamData extends Model {
}
|
[
"jacokao@servtech.com.tw"
] |
jacokao@servtech.com.tw
|
9328b4e694a85711453d64f999d27a405332416b
|
ac592e6431b66f34f3219656176d52c22a0e41cc
|
/network_monitoring_sd/src/main/java/com/gw/front/lookup/data/FrontLookupLogDataExport.java
|
933e10f68632fd7f2575ea64615ce27b77790ca1
|
[] |
no_license
|
leijie-git/project
|
a19b7beab3982912ea45ae3eecc18953b59c5642
|
dcac5819341c5712efb8201c61dfc3629d7f9a3b
|
refs/heads/master
| 2022-07-10T23:19:36.331798
| 2019-10-17T02:58:38
| 2019-10-17T02:58:38
| 215,679,145
| 1
| 0
| null | 2022-06-29T17:43:00
| 2019-10-17T01:43:31
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 525
|
java
|
package com.gw.front.lookup.data;
import lombok.Data;
@Data
public class FrontLookupLogDataExport {
private String unitcode;//单位编码
private String childstationnum;//子站号
private String unitname;//单位名称
private String unitaddress;//单位地址
private String userName;//发送人
private String sendDate;//发送日期
private String status;//发送状态
private String lookStatus;//查岗状态
private String receiveDate;//回应时间
private String cardName;//身份证名字(回应人)
}
|
[
"574335745@qq.com"
] |
574335745@qq.com
|
3a875af06218a5c35836d0fe83b72ae1408566d5
|
0ae6a4a0edb5a6d36df6c00de32d927ec6ef6b3a
|
/Clp_Data_Service/src/com/bestinfo/service/impl/clpdata/TicketBetInfoSerImpl.java
|
d9e45955bcc9d112df8fa3e536ba4a7e0737559d
|
[] |
no_license
|
415502155/Java
|
910fc3d81e0a07e39405f771e7508ad080c86825
|
972e5a362a11c2e90f294e07b1bf0884373dc085
|
refs/heads/master
| 2022-12-25T01:28:23.664229
| 2021-03-30T07:14:51
| 2021-03-30T07:14:51
| 97,439,827
| 0
| 1
| null | 2022-12-16T09:41:22
| 2017-07-17T05:52:59
|
Java
|
UTF-8
|
Java
| false
| false
| 5,259
|
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.bestinfo.service.impl.clpdata;
import com.bestinfo.bean.ticket.TicketBet;
import com.bestinfo.dao.clpdata.ITicketInfoDao;
import com.bestinfo.service.clpdata.ITicketBetInfoSer;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
/**
*
* @author Administrator
*/
@Service
public class TicketBetInfoSerImpl implements ITicketBetInfoSer{
private static final Logger logger = Logger.getLogger(TicketBetInfoSerImpl.class);
@Resource
private JdbcTemplate termJdbcTemplate;
@Resource
private ITicketInfoDao it;
@Override
public List<TicketBet> getTicketBetsList(Integer game_id,Integer draw_id) {
List<Map> list = new ArrayList<>();
String ticketId ="";
String provinceId ="11";
String gameId ="";
String saleDrawNumber ="";
Integer drawDrawAmount=1;
String beginDrawDrawNumber="";
String agentId ="";
String serialNumber ="";
String operatorId ="";
Integer status =1;
Integer riskControlGroup =null;
String riskControlBetNumber ="";
String multiDrawRePrintTicketId ="";
String multiDrawRePrintProvinceId="";
String multiDrawRePrintGameId ="";
String multiDrawRePrintSaleDrawNumber="";
String multiDrawRrePrintAgentId ="";
String multiDrawRePrintSerialNumber ="";
String saleTime ="";
Integer betTotal =null;
String memberCardNumberString ="";
Integer agnetTypeInteger=null;
Integer seleteType = null;
Integer ticketType=null;
Integer selectionGroupAmount=null;
String selectionDetail ="";
List<TicketBet> ticketBetsList = it.getTicketInfoList(termJdbcTemplate,game_id,draw_id);
for(TicketBet tb:ticketBetsList){
Map map = new LinkedHashMap();
ticketId=tb.getCipher();
map.put("ticketId",ticketId);
map.put("provinceId", "42");//省码
map.put("gameId", tb.getGame_id());
map.put("saleDrawNumber", "");//销售期号 此票被卖出去的期号
map.put("drawDrawAmount", "1");//开奖期数
map.put("beginDrawDrawNumber", "");//起始开奖期号
map.put("agentId", tb.getTerminal_id());
map.put("serialNumber", tb.getSerial_no());
map.put("operatorId", tb.getOperator_id());
map.put("status", "1");//状态:1.销售2.未完成3...4...5...
map.put("riskControlGroup", "");//导致出现风险控制的组序号
map.put("riskControlBetNumber", "");//导致出现风险控制的组序号
map.put("multiDrawRePrintTicketId", "");//多期重打票的特征码
map.put("multiDrawRePrintProvinceId", "");//多期重打票的省码
map.put("multiDrawRePrintGameId", "");//多期重打票的游戏编码
map.put("multiDrawRePrintSaleDrawNumber", "");//多期重打票的销售期号
map.put("multiDrawRePrintAgentId", "");//多期重打票的销售终端逻辑机号
map.put("multiDrawRePrintSerialNumber", "");//多期重打票的销售终端机销售的流水号
map.put("saleTime", "");//销售时间 yyyy-MM-dd HH:mm:ss
Integer bet_stakes =tb.getBet_stakes();
String betTatol =String.valueOf(bet_stakes*2);
map.put("betTotal", betTatol);
map.put("memberCardNumber", tb.getPoint_card());
map.put("agentType", "");//销售终端类型
map.put("selectType", "");//选码方式
map.put("ticketType", "");//彩票类型
map.put("selectionGroupAmount", "");//票面注码组数
map.put("selectionDetail", "");//注码细节描述,见附件
list.add(map);
}
return ticketBetsList;
}
@Override
public List<TicketBet> getTicketInfoPage(Integer game_id, Integer draw_id, Integer ends, Integer starts) {
List<TicketBet> ticketBetsList = it.getTicketInfoPage(termJdbcTemplate,game_id,draw_id,ends,starts);
return ticketBetsList;
}
@Override
public int getTicketInfoCount(Integer game_id, Integer draw_id) {
int count =it.getTicketInfoCount(termJdbcTemplate, game_id, draw_id);
return count;
}
@Override
public int getTicketBetInfoMaxSequenceId(Integer game_id, Integer draw_id) {
int maxSequenceId=it.getTicketBetInfoMaxSequenceId(termJdbcTemplate, game_id, draw_id);
return maxSequenceId;
}
@Override
public List<TicketBet> getTicketInfos(Integer start,Integer rownum) {
logger.info("jin ser :"+start+"-"+rownum);
List<TicketBet> ticketBets =it.getTicketInfoLists(termJdbcTemplate, start,rownum);
return ticketBets;
}
}
|
[
"415502155@qq.com"
] |
415502155@qq.com
|
b0ac5f8e8e429220ba9d9576c460847bf189906d
|
e1dbbd1c0289059bcc7426e30ab41c88221eff11
|
/modules/extensions/lc-es/lc-es-studio-lib-component/src/main/java/com/coremedia/livecontext/elastic/social/rest/LiveContextSocialModule.java
|
e585baf658ff3f9c3e7de78e48e2042749aeb1e4
|
[] |
no_license
|
HongBitgrip/blueprint
|
9ed278a8df33dbe7ec2de7489592f704e408d897
|
14c4de20defd2918817f91174bdbdcc0b9541e2d
|
refs/heads/master
| 2020-03-25T23:15:24.580400
| 2018-08-17T14:44:43
| 2018-08-17T14:44:43
| 144,267,625
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 999
|
java
|
package com.coremedia.livecontext.elastic.social.rest;
import org.codehaus.jackson.Version;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.module.SimpleModule;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.Collection;
@Named
public class LiveContextSocialModule extends SimpleModule {
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
private Collection<JsonSerializer<?>> jsonSerializers;
@Inject
public LiveContextSocialModule(Collection<JsonSerializer<?>> jsonSerializers) {
super("LiveContextSocial", new Version(1, 0, 0, null));
this.jsonSerializers = jsonSerializers;
}
@Override
public void setupModule(final SetupContext context) {
for (final JsonSerializer<?> jsonSerializer : jsonSerializers) {
if (jsonSerializer.getClass().getPackage().equals(LiveContextSocialModule.class.getPackage()) ) {
addSerializer(jsonSerializer);
}
}
super.setupModule(context);
}
}
|
[
"hong.nguyen@bitgrip.de"
] |
hong.nguyen@bitgrip.de
|
809526dc234861756d6baf2f30f7ddb665ec4813
|
ba0ef752f5a0814100ddd4d50a1c395ee5ac765c
|
/core/src/main/java/com/google/common/truth/StringSubject.java
|
e9d34fecb2e42f0e3393b76e88939f97f62d29f4
|
[
"Apache-2.0"
] |
permissive
|
sebasjm/truth
|
0b1471d6050886e04ce35c6369c54bcaa0f717d3
|
aaeb5cf0b8090c1369069190a88186981f51a276
|
refs/heads/master
| 2021-09-08T18:55:38.084750
| 2018-03-06T18:32:48
| 2018-03-07T02:45:46
| 124,785,484
| 0
| 0
|
Apache-2.0
| 2018-03-11T18:23:19
| 2018-03-11T18:23:19
| null |
UTF-8
|
Java
| false
| false
| 7,636
|
java
|
/*
* Copyright (c) 2011 Google, 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.google.common.truth;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.annotations.GwtIncompatible;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
/**
* Propositions for string subjects.
*
* @author David Saff
* @author Christian Gruber (cgruber@israfil.net)
*/
// TODO(kak): Make this final
public class StringSubject extends ComparableSubject<StringSubject, String> {
// TODO(kak): Make this package-private?
/**
* Constructor for use by subclasses. If you want to create an instance of this class itself, call
* {@link Subject#check}{@code .that(actual)}.
*/
protected StringSubject(FailureMetadata metadata, @Nullable String string) {
super(metadata, string);
}
@Override
protected String actualCustomStringRepresentation() {
return quote(actual());
}
@Override
public void isEqualTo(@Nullable Object expected) {
if (actual() == null) {
if (expected != null) {
if (expected instanceof String) {
failWithRawMessage(
"Not true that " + actualAsString() + " is equal to <%s>", quote((String) expected));
} else {
failWithRawMessage(
"Not true that " + actualAsString() + " is equal to (%s)<%s>",
expected.getClass().getName(),
expected);
}
}
} else {
if (expected == null) {
isNull();
} else if (!(expected instanceof String)) {
failWithRawMessage(
"Not true that %s is equal to (%s)<%s>",
actualAsString(), expected.getClass().getName(), expected);
} else if (!actual().equals(expected)) {
if (internalCustomName() != null) {
failComparing("\"" + internalCustomName() + "\":", (String) expected, actual());
} else {
failComparing("", (String) expected, actual());
}
}
}
}
/** @deprecated Use {@link #isEqualTo} instead. String comparison is consistent with equality. */
@Override
@Deprecated
public final void isEquivalentAccordingToCompareTo(String other) {
super.isEquivalentAccordingToCompareTo(other);
}
/** Fails if the string is not null. */
@Override
public void isNull() {
if (actual() != null) {
failWithRawMessage("Not true that %s is null", actualAsString());
}
}
/** Fails if the string does not have the given length. */
public void hasLength(int expectedLength) {
checkArgument(expectedLength >= 0, "expectedLength(%s) must be >= 0", expectedLength);
int actualLength = actual().length();
if (actualLength != expectedLength) {
failWithRawMessage(
"Not true that %s has a length of %s. It is %s.",
actualAsString(), expectedLength, actualLength);
}
}
/** Fails if the string is not equal to the zero-length "empty string." */
public void isEmpty() {
if (actual() == null) {
failWithRawMessage("Not true that null reference is empty");
} else if (!actual().isEmpty()) {
fail("is empty");
}
}
/** Fails if the string is equal to the zero-length "empty string." */
public void isNotEmpty() {
if (actual() == null) {
failWithRawMessage("Not true that null reference is not empty");
} else if (actual().isEmpty()) {
fail("is not empty");
}
}
/** Fails if the string does not contain the given sequence. */
public void contains(CharSequence string) {
checkNotNull(string);
if (actual() == null) {
failWithRawMessage("Not true that null reference contains <%s>", quote(string));
} else if (!actual().contains(string)) {
fail("contains", quote(string));
}
}
/** Fails if the string contains the given sequence. */
public void doesNotContain(CharSequence string) {
checkNotNull(string);
if (actual() == null) {
failWithRawMessage("Not true that null reference contains <%s>", quote(string));
} else if (actual().contains(string)) {
failWithRawMessage("%s unexpectedly contains <%s>", actualAsString(), quote(string));
}
}
/** Fails if the string does not start with the given string. */
public void startsWith(String string) {
checkNotNull(string);
if (actual() == null) {
failWithRawMessage("Not true that null reference starts with <%s>", quote(string));
} else if (!actual().startsWith(string)) {
fail("starts with", quote(string));
}
}
/** Fails if the string does not end with the given string. */
public void endsWith(String string) {
checkNotNull(string);
if (actual() == null) {
failWithRawMessage("Not true that null reference ends with <%s>", quote(string));
} else if (!actual().endsWith(string)) {
fail("ends with", quote(string));
}
}
/** Fails if the string does not match the given regex. */
public void matches(String regex) {
if (!actual().matches(regex)) {
fail("matches", regex);
}
}
/** Fails if the string does not match the given regex. */
@GwtIncompatible("java.util.regex.Pattern")
public void matches(Pattern regex) {
if (!regex.matcher(actual()).matches()) {
fail("matches", regex);
}
}
/** Fails if the string matches the given regex. */
public void doesNotMatch(String regex) {
if (actual().matches(regex)) {
fail("fails to match", regex);
}
}
/** Fails if the string matches the given regex. */
@GwtIncompatible("java.util.regex.Pattern")
public void doesNotMatch(Pattern regex) {
if (regex.matcher(actual()).matches()) {
fail("fails to match", regex);
}
}
/** Fails if the string does not contain a match on the given regex. */
@GwtIncompatible("java.util.regex.Pattern")
public void containsMatch(Pattern pattern) {
if (!pattern.matcher(actual()).find()) {
failWithRawMessage("%s should have contained a match for <%s>", actualAsString(), pattern);
}
}
/** Fails if the string does not contain a match on the given regex. */
public void containsMatch(String regex) {
if (!Platform.containsMatch(actual(), regex)) {
failWithRawMessage("%s should have contained a match for <%s>", actualAsString(), regex);
}
}
/** Fails if the string contains a match on the given regex. */
@GwtIncompatible("java.util.regex.Pattern")
public void doesNotContainMatch(Pattern pattern) {
if (pattern.matcher(actual()).find()) {
failWithRawMessage(
"%s should not have contained a match for <%s>", actualAsString(), pattern);
}
}
/** Fails if the string contains a match on the given regex. */
public void doesNotContainMatch(String regex) {
if (Platform.containsMatch(actual(), regex)) {
failWithRawMessage("%s should not have contained a match for <%s>", actualAsString(), regex);
}
}
private static String quote(@Nullable CharSequence toBeWrapped) {
return (toBeWrapped == null) ? "null" : "\"" + toBeWrapped + "\"";
}
}
|
[
"cpovirk@google.com"
] |
cpovirk@google.com
|
dddec6892605fc1ea6a4ad98a565942217f2d712
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE89_SQL_Injection/CWE89_SQL_Injection__URLConnection_executeQuery_52b.java
|
9939c1b33fc4a778d724094b9d7f9158d53c48ae
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,537
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__URLConnection_executeQuery_52b.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-52b.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: URLConnection Read data from a web server with URLConnection
* GoodSource: A hardcoded string
* Sinks: executeQuery
* GoodSink: Use prepared statement and executeQuery (properly)
* BadSink : data concatenated into SQL statment used in executeQuery(), which could result in SQL Injection
* Flow Variant: 52 Data flow: data passed as an argument from one method to another to another in three different classes in the same package
*
* */
package testcases.CWE89_SQL_Injection;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE89_SQL_Injection__URLConnection_executeQuery_52b
{
public void bad_sink(String data ) throws Throwable
{
(new CWE89_SQL_Injection__URLConnection_executeQuery_52c()).bad_sink(data );
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(String data ) throws Throwable
{
(new CWE89_SQL_Injection__URLConnection_executeQuery_52c()).goodG2B_sink(data );
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(String data ) throws Throwable
{
(new CWE89_SQL_Injection__URLConnection_executeQuery_52c()).goodB2G_sink(data );
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
ddea4d15f1c6fb04195a50d1a0718a7995cb1fdf
|
f0ec508f4b480d8d5399a2880e4cbb0533fc2fc1
|
/com.gzedu.xlims.biz/src/main/java/com/gzedu/xlims/dao/area/GjtAreaDao.java
|
d13349785501501a013f03e266b2f17c758229f0
|
[] |
no_license
|
lizm335/MyLizm
|
a327bd4d08a33c79e9b6ef97144d63dae7114a52
|
1bcca82395b54d431fb26817e61a294f9d7dd867
|
refs/heads/master
| 2020-03-11T17:25:25.687426
| 2018-04-19T03:10:28
| 2018-04-19T03:10:28
| 130,146,458
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,997
|
java
|
/**
* @Package com.gzedu.xlims.dao
* @Project com.gzedu.xlims.biz
* @File LyUserDao.java
* @Date:2016年4月19日下午2:22:01
* @Copyright (c) 2016, eenet.com All Rights Reserved.
*
*/
package com.gzedu.xlims.dao.area;
import com.gzedu.xlims.dao.area.repository.GjtAreaRepository;
import com.gzedu.xlims.pojo.GjtArea;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import java.util.List;
/**
*
* 功能说明:
*
* @author 李明 liming@eenet.com
* @Date 2016年10月8日
* @version 2.5
*
*/
@Component
public class GjtAreaDao {
@Autowired
GjtAreaRepository gjtAreaRepository;
@PersistenceContext(unitName = "entityManagerFactory")
public EntityManager em;
// 省 列表
public List<GjtArea> queryProvince() {
return gjtAreaRepository.queryProvince();
}
// 县级列表 by 省CODE
public List<GjtArea> queryCity(String provinceCode) {
String code = provinceCode.substring(0, 2);
String prefix = code + "%00";
String province = code + "0000";
return gjtAreaRepository.queryCity(prefix, province);
}
// 县级列表 by 省CODE
public List<GjtArea> queryDistrict(String cityCode) {
String code = cityCode.substring(0, 4);
String prefix = code + "%";
String city = code + "00";
return gjtAreaRepository.queryDistrict(prefix, city);
}
public GjtArea queryProvinceByCode(String code) {
String district = code.substring(0, 2) + "0000";
return gjtAreaRepository.findByDistrict(district);
}
public GjtArea queryCityByCode(String code) {
String district = code.substring(0, 4) + "00";
return gjtAreaRepository.findByDistrict(district);
}
public GjtArea queryDistrictByCode(String code) {
String district = code.substring(0, 6);
return gjtAreaRepository.findByDistrict(district);
}
public String queryAreaName(String code){
return gjtAreaRepository.queryAreaNam(code);
}
}
|
[
"lizengming@eenet.com"
] |
lizengming@eenet.com
|
61779138fec0142f27089c39b00c14682774d10d
|
f97d6643da2e5fd7762cac83bff6f6f6615b6a15
|
/src/main/java/com/schantz/remotecq/client/BatchJobActivityRequestIdCommandResult.java
|
3faedb52f98f24c0f7a16c263817c2a866360ce5
|
[] |
no_license
|
roo104/dls-middleware
|
51229bca28e12cb98fd849d2389c7c8a47973caf
|
14158ac6dc849b6c6a2cbfb39aef7d4f99960ed8
|
refs/heads/master
| 2021-05-01T05:12:40.195450
| 2017-02-09T08:55:22
| 2017-02-09T08:55:22
| 79,714,673
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,471
|
java
|
package com.schantz.remotecq.client;
import java.io.*;
import java.util.*;
import com.fasterxml.jackson.annotation.*;
public class BatchJobActivityRequestIdCommandResult implements Serializable {
@JsonProperty("preparedLocks")
private List<CqLock> preparedLocks = new ArrayList<CqLock>();
@JsonProperty("statusMessages")
private List<CommandStatusMessage> statusMessages = new ArrayList<CommandStatusMessage>();
@JsonProperty("identifier")
private BatchJobActivityRequestIdCq identifier = null;
public BatchJobActivityRequestIdCommandResult addPreparedLocksItem(CqLock preparedLocksItem) {
this.preparedLocks.add(preparedLocksItem);
return this;
}
public List<CqLock> getPreparedLocks() {
return preparedLocks;
}
public void setPreparedLocks(List<CqLock> preparedLocks) {
this.preparedLocks = preparedLocks;
}
public BatchJobActivityRequestIdCommandResult addStatusMessagesItem(CommandStatusMessage statusMessagesItem) {
this.statusMessages.add(statusMessagesItem);
return this;
}
public List<CommandStatusMessage> getStatusMessages() {
return statusMessages;
}
public void setStatusMessages(List<CommandStatusMessage> statusMessages) {
this.statusMessages = statusMessages;
}
public BatchJobActivityRequestIdCq getIdentifier() {
return identifier;
}
public void setIdentifier(BatchJobActivityRequestIdCq identifier) {
this.identifier = identifier;
}
}
|
[
"jonasp@schantz.com"
] |
jonasp@schantz.com
|
e4eff5fed721e0a8555b4c9bcaa1214b3d2a8280
|
a57b3be7957c890cd03b5d89ad4b5c5b7805a48a
|
/src/main/java/com/hyva/posretail/pos/posPojo/MultiBankPayment.java
|
6f523ba0a04e82ce73ac9e0d059128f0ef4a01cf
|
[] |
no_license
|
faikturan/PharmaRetail
|
a23bc055feb1ec07f15b94abaa306d92a2a0e064
|
b782fc72051edf2885830c109ea27e261b07e3c6
|
refs/heads/master
| 2022-01-09T22:39:06.162476
| 2018-08-27T17:41:04
| 2018-08-27T17:41:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,247
|
java
|
package com.hyva.posretail.pos.posPojo;
import java.util.Date;
/**
* Created by harshitha on 10/26/2017.
*/
public class MultiBankPayment {
private String bankName;
private double amount;
private String invoiceNo;
private Date date;
private String paymentType;
private String transactionNo;
private String bankAccount;
private Long bankAccountId;
private Long bankId;
private Long bankChargesId;
private String chequeDate;
public String getChequeDate() {
return chequeDate;
}
public void setChequeDate(String chequeDate) {
this.chequeDate = chequeDate;
}
public String getTransactionNo() {
return transactionNo;
}
public void setTransactionNo(String transactionNo) {
this.transactionNo = transactionNo;
}
public Long getBankId() {
return bankId;
}
public void setBankId(Long bankId) {
this.bankId = bankId;
}
public Long getBankChargesId() {
return bankChargesId;
}
public void setBankChargesId(Long bankChargesId) {
this.bankChargesId = bankChargesId;
}
public Long getBankAccountId() {
return bankAccountId;
}
public void setBankAccountId(Long bankAccountId) {
this.bankAccountId = bankAccountId;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public double getAmount() {
return amount;
}
public void setAmount(double amount) {
this.amount = amount;
}
public String getInvoiceNo() {
return invoiceNo;
}
public void setInvoiceNo(String invoiceNo) {
this.invoiceNo = invoiceNo;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getPaymentType() {
return paymentType;
}
public void setPaymentType(String paymentType) {
this.paymentType = paymentType;
}
public String getBankAccount() {
return bankAccount;
}
public void setBankAccount(String bankAccount) {
this.bankAccount = bankAccount;
}
}
|
[
"ksourav796.sk@gmail.com"
] |
ksourav796.sk@gmail.com
|
46e718b2d6e804eb30bbb95e8f3830c7dd65c480
|
c3d4b357aeb445eb78a2c6468f9d9c3fe52005fa
|
/management/src/main/java/com/prolog/time/management/controller/ProjectTemaDefineController.java
|
c883b590c02d790b4029a9cc16450376aa24ebf9
|
[] |
no_license
|
longlongxiaoxiaoliangliang/repository1
|
419849a049fd132e4877a9dc50333308e7f0f43e
|
b97c9efff37a2ff3d7d68d92afc4a431615debe8
|
refs/heads/master
| 2020-04-12T14:09:14.715746
| 2018-12-20T07:49:28
| 2018-12-20T07:49:28
| 162,543,933
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,385
|
java
|
package com.prolog.time.management.controller;
import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.core.pojo.Page;
import com.prolog.time.management.Interface.NotauditedService;
import com.prolog.time.management.Interface.ProjectTemaDefineService;
import com.prolog.time.management.mapper.ProjectTemaDefineMapper;
import com.prolog.time.management.model.dto.ImpProjectInfoDto;
import com.prolog.user.model.PlgFxUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@Api(tags = "项目组定义")
@RestController
@RequestMapping("/projecttema")
public class ProjectTemaDefineController {
@Autowired
private ProjectTemaDefineService projectTemaDefineService;
@ApiOperation(value = "项目查询", notes = "项目查询")
@ApiImplicitParam(name = "search", value = "按名称查询", dataType = "string")
@PostMapping("/queryproject")
public RestMessage<List<Map<String, Object>>> queryProjectDefineData(@RequestParam(value = "search", required = false) String search) {
List<Map<String, Object>> list = projectTemaDefineService.queryProjectDefineData(search);
return RestMessage.newInstance(true, "查询成功!", list);
}
@ApiOperation(value = "选择项目后的左人员列表", notes = "选择项目后的左人员列表")
@ApiImplicitParam(name = "projectno", value = "项目编号")
@PostMapping("/queryLeftUsersData")
public RestMessage<Page<PlgFxUser>> queryLeftUsersData(@RequestParam(value = "search", required = false) String search,
@RequestParam(value = "projectno") String projectno,
@RequestParam(value = "pageNum") int pageNum,
@RequestParam(value = "pageSize") int pageSize) {
Page<PlgFxUser> data = projectTemaDefineService.queryLeftUsersData(search, projectno, pageNum, pageSize);
return RestMessage.newInstance(true, "获取成功!", data);
}
@ApiOperation(value = "选择项目后当前项目人员查询", notes = "选择项目后当前项目人员查询")
@ApiImplicitParams({@ApiImplicitParam(name = "projectno", value = "项目编号",required = true),
@ApiImplicitParam(name = "projectmanager", value = "项目经理ID", dataType = "string",required = true)})
@PostMapping("/queryRightUsersData")
public RestMessage<Page<Map<String, Object>>> queryRightUsersData(@RequestParam(value = "projectno") String projectno,
@RequestParam(value = "projectmanager") String projectmanager,
@RequestParam(value = "pageNum") int pageNum,
@RequestParam(value = "pageSize") int pageSize) {
Page<Map<String, Object>> data = projectTemaDefineService.queryRightUsersData(projectno,projectmanager, pageNum, pageSize);
return RestMessage.newInstance(true, "获取成功!", data);
}
@ApiOperation(value = "批量保存项目组定义信息", notes = "根据页面传过来的参数保存项目组定义信息")
@ApiImplicitParams({@ApiImplicitParam(name = "list", value = "[{project_no:项目编号,project_name:项目名称,project_manager:项目经理ID,project_user:项目人员ID,team_role:项目角色,project_manager_name:项目经理姓名,project_user_name:项目人员姓名,project_user_dept:所在部门}]"),
@ApiImplicitParam(name = "projectno", value = "项目编号",required = true)})
@PostMapping("/addList")
public RestMessage<String> addByList(@RequestBody List<Map<String,Object>> list,
@RequestParam(value = "projectno") String projectno) throws Exception {
int addFlag = projectTemaDefineService.addList(list,projectno);
return RestMessage.newInstance(true, "保存成功!", String.valueOf(addFlag));
}
}
|
[
"you@example.com"
] |
you@example.com
|
37e02996311da372a478534bd0debd9ecf80ba72
|
b4578fd9a6052dd54fc15eee9b3e7c9149addac5
|
/src/main/java/com/yeongjae/damoim/global/aop/RequestLogAspect.java
|
083c0d71c8703e303b0cd201170a2bdbfe93777d
|
[] |
no_license
|
jaeho214/damoim
|
058b0aa9869f034488b4e0f554b0049ad020526f
|
49678c0a08b7588c867c1a74f34459a177d1c2f2
|
refs/heads/master
| 2022-12-06T05:30:44.324187
| 2020-06-15T06:30:09
| 2020-06-15T06:30:09
| 239,747,286
| 0
| 1
| null | 2022-11-16T00:44:11
| 2020-02-11T11:37:53
|
Java
|
UTF-8
|
Java
| false
| false
| 1,967
|
java
|
package com.yeongjae.damoim.global.aop;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.time.LocalDateTime;
@Component
@Aspect
@Slf4j
public class RequestLogAspect {
@Pointcut("execution(* com.yeongjae.damoim.domain.*.controller.*.*(..))")
public void loggerPointCut(){
}
@Around("loggerPointCut()")
public Object printRequestLog(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
try{
Object result = proceedingJoinPoint.proceed();
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String controllerName = proceedingJoinPoint.getSignature().getDeclaringType().getSimpleName();
String methodName = proceedingJoinPoint.getSignature().getName();
try{
log.warn("================= Request Log Start =================");
log.warn("Request Controller => {}", controllerName);
log.warn("Request Method => {}", methodName);
log.warn("Request URL => {}", request.getRequestURL());
log.warn("Request HTTP Method => {}",request.getMethod());
log.warn("Request Log Time => {}", LocalDateTime.now());
log.warn("================= Request Log End =================");
}catch(Exception e){
log.error("LoggerAspect error", e);
}
return result;
} catch (Throwable throwable) {
throw throwable;
}
}
}
|
[
"jaeho214@naver.com"
] |
jaeho214@naver.com
|
7ffb77db851c61c47fb545e60bbe395e41396df2
|
b8a86d2ceca828d7f08a53270fd29ac9460fa696
|
/app/src/main/java/com/biaoyuan/transfernet/ui/mine/UpdataPhoneTwoActivity.java
|
782bd9f7af10881e2efd27e028afc8bd4ac9d385
|
[] |
no_license
|
enmaoFu/qmcs_net
|
3de8c2963bba0bbf95fe3d73f751bd0e0dab5ddf
|
767d4f5389a72cd33236a0f54c44760624088036
|
refs/heads/master
| 2021-07-04T14:50:12.504650
| 2017-09-20T12:47:35
| 2017-09-20T12:47:36
| 104,214,241
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,326
|
java
|
package com.biaoyuan.transfernet.ui.mine;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.and.yzy.frame.util.MatchStingUtil;
import com.and.yzy.frame.util.RetrofitUtils;
import com.biaoyuan.transfernet.R;
import com.biaoyuan.transfernet.base.BaseCodeAty;
import com.biaoyuan.transfernet.config.UserManger;
import com.biaoyuan.transfernet.domain.MessageEvent;
import com.biaoyuan.transfernet.http.Mine;
import com.biaoyuan.transfernet.util.AppJsonUtil;
import org.greenrobot.eventbus.EventBus;
import butterknife.Bind;
import butterknife.OnClick;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.Response;
/**
* Title : 修改手机号第二步
* Create : 2017/6/19
* Author :enmaoFu
*/
public class UpdataPhoneTwoActivity extends BaseCodeAty{
@Bind(R.id.toolbar)
Toolbar mToolbar;
@Bind(R.id.editText)
EditText editText;
@Bind(R.id.code)
EditText code;
@Bind(R.id.get_code_sms)
TextView getCodeSms;
MyCount mMyCount;
private String getPhoneNew;
@Override
public int getLayoutId() {
return R.layout.activity_mine_updata_phone_two;
}
@Override
public void initData() {
Bundle bundle = getIntent().getExtras();
initToolbar(mToolbar,"修改手机号");
}
@OnClick({R.id.get_code_sms,R.id.tv_commit})
@Override
public void btnClick(View view) {
super.btnClick(view);
switch (view.getId()){
case R.id.get_code_sms:
String getPhone = editText.getText().toString().trim();
if(getPhone.length() == 0){
showErrorToast("手机号不能为空");
}else if(!MatchStingUtil.isMobile(getPhone)){
showErrorToast("请输入正确的手机号");
}else{
showLoadingDialog("正在发送");
doHttp(RetrofitUtils.createApi(Mine.class).sendSmsNotSignin(getPhone),1);
}
break;
case R.id.tv_commit:
getPhoneNew = editText.getText().toString().trim();
String getCode = code.getText().toString().trim();
if(getPhoneNew.length() == 0){
showErrorToast("手机号不能为空");
}else if(!MatchStingUtil.isMobile(getPhoneNew)){
showErrorToast("请输入正确的手机号");
}else if(getCode.length() == 0){
showErrorToast("验证码不能为空");
}else if(getCode.length() < 4){
showErrorToast("请输入正确的验证码");
}else{
showLoadingDialog(null);
doHttp(RetrofitUtils.createApi(Mine.class).setStaffInformation("","","","", Long.valueOf(getPhoneNew),getCode),2);
}
break;
}
}
@Override
public void onSuccess(String result, Call<ResponseBody> call, Response<ResponseBody> response, int what) {
super.onSuccess(result, call, response, what);
switch (what){
case 1:
if (mMyCount == null) {
mMyCount = new UpdataPhoneTwoActivity.MyCount(60000, 1000);
}
mMyCount.start();
showToast(AppJsonUtil.getString(result, "msg"));
break;
case 2:
showToast("修改手机号成功");
UserManger.setAcount(getPhoneNew);
EventBus.getDefault().post(new MessageEvent(getPhoneNew,0));
UserManger.setUserPhone(getPhoneNew);
finish();
break;
}
}
@Override
public boolean setIsInitRequestData() {
return false;
}
@Override
public void requestData() {
}
@Override
public EditText getEditTextView() {
return code;
}
private class MyCount extends CountDownTimer {
/**
* @param millisInFuture The number of millis in the future from the call
* to {@link #start()} until the countdown is done and {@link #onFinish()}
* is called.
* @param countDownInterval The interval along the way to receive
* {@link #onTick(long)} callbacks.
*/
public MyCount(long millisInFuture, long countDownInterval) {
super(millisInFuture, countDownInterval);
}
@Override
public void onTick(long millisUntilFinished) {
if (getCodeSms != null) {
getCodeSms.setEnabled(false);
getCodeSms.setTextColor(getResources().getColor(R.color.font_gray));
getCodeSms.setText(millisUntilFinished / 1000 + " s" + "后重发");
}
}
@Override
public void onFinish() {
if (getCodeSms != null) {
getCodeSms.setEnabled(true);
getCodeSms.setTextColor(getResources().getColor(R.color.colorAccent));
getCodeSms.setText("获取验证码");
}
}
}
}
|
[
"fuenmao@126.com"
] |
fuenmao@126.com
|
0857348acb546f6c31f405f4d22a16f026fe9816
|
9ccf9371a610fa0a2d9e6afff615a44f6851f6da
|
/src/test/java/com/demo/myapp/config/StaticResourcesWebConfigurerTest.java
|
ceca5092da9e4fb5140699abd2fed4cde075bc93
|
[] |
no_license
|
baelze/jhipster-demo-app
|
ece2a6f313a6cb1e16abe6108f651d402b68c858
|
8f549f7939ed1757b8682c23bd1d8e8278adfb7e
|
refs/heads/main
| 2023-03-29T15:04:19.429304
| 2021-04-04T01:19:45
| 2021-04-04T01:19:45
| 354,382,132
| 0
| 0
| null | 2021-04-04T16:05:13
| 2021-04-03T19:56:44
|
TypeScript
|
UTF-8
|
Java
| false
| false
| 3,610
|
java
|
package com.demo.myapp.config;
import static com.demo.myapp.config.StaticResourcesWebConfiguration.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.*;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.http.CacheControl;
import org.springframework.mock.web.MockServletContext;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import tech.jhipster.config.JHipsterDefaults;
import tech.jhipster.config.JHipsterProperties;
class StaticResourcesWebConfigurerTest {
public static final int MAX_AGE_TEST = 5;
public StaticResourcesWebConfiguration staticResourcesWebConfiguration;
private ResourceHandlerRegistry resourceHandlerRegistry;
private MockServletContext servletContext;
private WebApplicationContext applicationContext;
private JHipsterProperties props;
@BeforeEach
void setUp() {
servletContext = spy(new MockServletContext());
applicationContext = mock(WebApplicationContext.class);
resourceHandlerRegistry = spy(new ResourceHandlerRegistry(applicationContext, servletContext));
props = new JHipsterProperties();
staticResourcesWebConfiguration = spy(new StaticResourcesWebConfiguration(props));
}
@Test
void shouldAppendResourceHandlerAndInitiliazeIt() {
staticResourcesWebConfiguration.addResourceHandlers(resourceHandlerRegistry);
verify(resourceHandlerRegistry, times(1)).addResourceHandler(RESOURCE_PATHS);
verify(staticResourcesWebConfiguration, times(1)).initializeResourceHandler(any(ResourceHandlerRegistration.class));
for (String testingPath : RESOURCE_PATHS) {
assertThat(resourceHandlerRegistry.hasMappingForPattern(testingPath)).isTrue();
}
}
@Test
void shouldInitializeResourceHandlerWithCacheControlAndLocations() {
CacheControl ccExpected = CacheControl.maxAge(5, TimeUnit.DAYS).cachePublic();
when(staticResourcesWebConfiguration.getCacheControl()).thenReturn(ccExpected);
ResourceHandlerRegistration resourceHandlerRegistration = spy(new ResourceHandlerRegistration(RESOURCE_PATHS));
staticResourcesWebConfiguration.initializeResourceHandler(resourceHandlerRegistration);
verify(staticResourcesWebConfiguration, times(1)).getCacheControl();
verify(resourceHandlerRegistration, times(1)).setCacheControl(ccExpected);
verify(resourceHandlerRegistration, times(1)).addResourceLocations(RESOURCE_LOCATIONS);
}
@Test
void shoudCreateCacheControlBasedOnJhipsterDefaultProperties() {
CacheControl cacheExpected = CacheControl.maxAge(JHipsterDefaults.Http.Cache.timeToLiveInDays, TimeUnit.DAYS).cachePublic();
assertThat(staticResourcesWebConfiguration.getCacheControl())
.extracting(CacheControl::getHeaderValue)
.isEqualTo(cacheExpected.getHeaderValue());
}
@Test
void shoudCreateCacheControlWithSpecificConfigurationInProperties() {
props.getHttp().getCache().setTimeToLiveInDays(MAX_AGE_TEST);
CacheControl cacheExpected = CacheControl.maxAge(MAX_AGE_TEST, TimeUnit.DAYS).cachePublic();
assertThat(staticResourcesWebConfiguration.getCacheControl())
.extracting(CacheControl::getHeaderValue)
.isEqualTo(cacheExpected.getHeaderValue());
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
a0320f329ef95fd186d7d1f8985628d4d9825b51
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/j/src/main/java/org.wp.j/ui/stats/StatsInsightsMostPopularFragment.java
|
7ed484e0fd416c08262cec3db5519710564eb73e
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 5,311
|
java
|
package org.wp.j.ui.stats;
import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import org.wp.j.R;
import org.wp.j.ui.stats.models.InsightsPopularModel;
import org.wp.j.ui.stats.service.StatsService;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
public class StatsInsightsMostPopularFragment extends StatsAbstractInsightsFragment {
public static final String TAG = StatsInsightsMostPopularFragment.class.getSimpleName();
private InsightsPopularModel mInsightsPopularModel;
@Override
protected boolean hasDataAvailable() {
return mInsightsPopularModel != null;
}
@Override
protected void saveStatsData(Bundle outState) {
if (hasDataAvailable()) {
outState.putSerializable(ARG_REST_RESPONSE, mInsightsPopularModel);
}
}
@Override
protected void restoreStatsData(Bundle savedInstanceState) {
if (savedInstanceState.containsKey(ARG_REST_RESPONSE)) {
mInsightsPopularModel = (InsightsPopularModel) savedInstanceState.getSerializable(ARG_REST_RESPONSE);
}
}
@SuppressWarnings("unused")
public void onEventMainThread(StatsEvents.InsightsPopularUpdated event) {
if (!shouldUpdateFragmentOnUpdateEvent(event)) {
return;
}
mInsightsPopularModel = event.mInsightsPopularModel;
updateUI();
}
@SuppressWarnings("unused")
public void onEventMainThread(StatsEvents.SectionUpdateError event) {
if (!shouldUpdateFragmentOnErrorEvent(event)) {
return;
}
mInsightsPopularModel = null;
showErrorUI(event.mError);
}
protected void updateUI() {
super.updateUI();
if (!isAdded() || !hasDataAvailable()) {
return;
}
LinearLayout ll = (LinearLayout) getActivity().getLayoutInflater()
.inflate(R.layout.stats_insights_most_popular_item, (ViewGroup) mResultContainer.getRootView(), false);
int dayOfTheWeek = mInsightsPopularModel.getHighestDayOfWeek();
Calendar c = Calendar.getInstance();
c.setFirstDayOfWeek(Calendar.MONDAY);
c.setTimeInMillis(System.currentTimeMillis());
switch (dayOfTheWeek) {
case 0:
c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
break;
case 1:
c.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);
break;
case 2:
c.set(Calendar.DAY_OF_WEEK, Calendar.WEDNESDAY);
break;
case 3:
c.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);
break;
case 4:
c.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);
break;
case 5:
c.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);
break;
case 6:
c.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
break;
}
DateFormat formatter = new SimpleDateFormat("EEEE");
final TextView mostPopularDayTextView = (TextView) ll.findViewById(R.id.stats_most_popular_day);
mostPopularDayTextView.setText(formatter.format(c.getTime()));
final TextView mostPopularDayPercentTextView = (TextView) ll.findViewById(R.id.stats_most_popular_day_percent);
mostPopularDayPercentTextView.setText(
String.format(
getString(R.string.stats_insights_most_popular_percent_views),
roundToInteger(mInsightsPopularModel.getHighestDayPercent())
)
);
TextView mostPopularHourTextView = (TextView) ll.findViewById(R.id.stats_most_popular_hour);
DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(getActivity());
c.set(Calendar.HOUR_OF_DAY, mInsightsPopularModel.getHighestHour());
c.set(Calendar.MINUTE, 0);
mostPopularHourTextView.setText(timeFormat.format(c.getTime()));
final TextView mostPopularHourPercentTextView = (TextView) ll.findViewById(R.id.stats_most_popular_hour_percent);
mostPopularHourPercentTextView.setText(
String.format(
getString(R.string.stats_insights_most_popular_percent_views),
roundToInteger(mInsightsPopularModel.getHighestHourPercent())
)
);
mResultContainer.addView(ll);
}
/*
* Round a double to the closest integer
*
* If the decimal part is less than 0.5, the integer part stays the same,
* and truncation gives the right result.
* If the decimal part is more that 0.5, the integer part increments,
* and again truncation gives what we want.
*
*/
private int roundToInteger(double inputValue) {
return (int) Math.floor(inputValue + 0.5);
}
@Override
protected StatsService.StatsEndpointsEnum[] sectionsToUpdate() {
return new StatsService.StatsEndpointsEnum[]{
StatsService.StatsEndpointsEnum.INSIGHTS_POPULAR
};
}
@Override
public String getTitle() {
return getString(R.string.stats_insights_popular);
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
702f47e2442222c4d65469b655bc1102f3c22339
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/MATE-20_EMUI_11.0.0/src/main/java/android/security/keystore/IKeystoreCertificateChainCallback.java
|
b8bc24905a784a8cc20adb0aa6006c4288e24a31
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,318
|
java
|
package android.security.keystore;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import android.security.keymaster.KeymasterCertificateChain;
public interface IKeystoreCertificateChainCallback extends IInterface {
void onFinished(KeystoreResponse keystoreResponse, KeymasterCertificateChain keymasterCertificateChain) throws RemoteException;
public static class Default implements IKeystoreCertificateChainCallback {
@Override // android.security.keystore.IKeystoreCertificateChainCallback
public void onFinished(KeystoreResponse response, KeymasterCertificateChain chain) throws RemoteException {
}
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
}
public static abstract class Stub extends Binder implements IKeystoreCertificateChainCallback {
private static final String DESCRIPTOR = "android.security.keystore.IKeystoreCertificateChainCallback";
static final int TRANSACTION_onFinished = 1;
public Stub() {
attachInterface(this, DESCRIPTOR);
}
public static IKeystoreCertificateChainCallback asInterface(IBinder obj) {
if (obj == null) {
return null;
}
IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (iin == null || !(iin instanceof IKeystoreCertificateChainCallback)) {
return new Proxy(obj);
}
return (IKeystoreCertificateChainCallback) iin;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public static String getDefaultTransactionName(int transactionCode) {
if (transactionCode != 1) {
return null;
}
return "onFinished";
}
@Override // android.os.Binder
public String getTransactionName(int transactionCode) {
return getDefaultTransactionName(transactionCode);
}
@Override // android.os.Binder
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
KeystoreResponse _arg0;
KeymasterCertificateChain _arg1;
if (code == 1) {
data.enforceInterface(DESCRIPTOR);
if (data.readInt() != 0) {
_arg0 = KeystoreResponse.CREATOR.createFromParcel(data);
} else {
_arg0 = null;
}
if (data.readInt() != 0) {
_arg1 = KeymasterCertificateChain.CREATOR.createFromParcel(data);
} else {
_arg1 = null;
}
onFinished(_arg0, _arg1);
return true;
} else if (code != 1598968902) {
return super.onTransact(code, data, reply, flags);
} else {
reply.writeString(DESCRIPTOR);
return true;
}
}
/* access modifiers changed from: private */
public static class Proxy implements IKeystoreCertificateChainCallback {
public static IKeystoreCertificateChainCallback sDefaultImpl;
private IBinder mRemote;
Proxy(IBinder remote) {
this.mRemote = remote;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return Stub.DESCRIPTOR;
}
@Override // android.security.keystore.IKeystoreCertificateChainCallback
public void onFinished(KeystoreResponse response, KeymasterCertificateChain chain) throws RemoteException {
Parcel _data = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
if (response != null) {
_data.writeInt(1);
response.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
if (chain != null) {
_data.writeInt(1);
chain.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
if (this.mRemote.transact(1, _data, null, 1) || Stub.getDefaultImpl() == null) {
_data.recycle();
} else {
Stub.getDefaultImpl().onFinished(response, chain);
}
} finally {
_data.recycle();
}
}
}
public static boolean setDefaultImpl(IKeystoreCertificateChainCallback impl) {
if (Proxy.sDefaultImpl != null || impl == null) {
return false;
}
Proxy.sDefaultImpl = impl;
return true;
}
public static IKeystoreCertificateChainCallback getDefaultImpl() {
return Proxy.sDefaultImpl;
}
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
e8ae806ac4b187825d1ea6ac11b87cdc9003be84
|
75d1f41d291ba9662b5abf12b5fd01a240f9cd5a
|
/app/src/main/java/com/xuexiang/xuidemo/fragment/components/statelayout/StatusViewFragment.java
|
eae5997dcee01baf1eb512ec98269e2613cef647
|
[
"Apache-2.0"
] |
permissive
|
CrackerCat/XUI
|
4730ef38a46bf69e0cbf94ec5236fd4257b457b3
|
491d9f770fa74f51df6c50b8967810ae136ec2f1
|
refs/heads/master
| 2023-02-19T05:18:02.818052
| 2022-11-17T15:41:05
| 2022-11-17T15:41:05
| 239,412,037
| 0
| 1
|
Apache-2.0
| 2020-02-10T02:34:06
| 2020-02-10T02:34:06
| null |
UTF-8
|
Java
| false
| false
| 2,664
|
java
|
/*
* Copyright (C) 2018 xuexiangjys(xuexiangjys@163.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.xuexiang.xuidemo.fragment.components.statelayout;
import android.view.View;
import com.xuexiang.xpage.annotation.Page;
import com.xuexiang.xui.widget.popupwindow.status.Status;
import com.xuexiang.xui.widget.popupwindow.status.StatusView;
import com.xuexiang.xuidemo.R;
import com.xuexiang.xuidemo.base.BaseFragment;
import com.xuexiang.xui.utils.XToastUtils;
import butterknife.BindView;
import butterknife.OnClick;
/**
* @author xuexiang
* @since 2018/12/27 下午6:14
*/
@Page(name = "StatusView\n状态提示")
public class StatusViewFragment extends BaseFragment {
@BindView(R.id.status)
StatusView mStatusView;
@Override
protected int getLayoutId() {
return R.layout.fragment_status_view;
}
@Override
protected void initViews() {
mStatusView.setOnErrorClickListener(v -> {
XToastUtils.toast("点击错误状态视图");
mStatusView.dismiss();
});
mStatusView.setOnLoadingClickListener(v -> {
XToastUtils.toast("点击正在加载状态视图");
mStatusView.dismiss();
});
mStatusView.setOnCustomClickListener(v -> {
XToastUtils.toast("点击自定义状态视图");
mStatusView.dismiss();
});
}
@OnClick({R.id.complete, R.id.error, R.id.loading, R.id.none, R.id.custom})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.complete:
mStatusView.setStatus(Status.COMPLETE);
break;
case R.id.error:
mStatusView.setStatus(Status.ERROR);
break;
case R.id.loading:
mStatusView.setStatus(Status.LOADING);
break;
case R.id.none:
mStatusView.setStatus(Status.NONE);
break;
case R.id.custom:
mStatusView.setStatus(Status.CUSTOM);
break;
default:
break;
}
}
}
|
[
"xuexiangjys@163.com"
] |
xuexiangjys@163.com
|
58aca017ec20102d057f957e88d00b6e0363e1fd
|
e0119155edf65e6207448f5ab760230566fc5714
|
/java/XMLTestClient.java
|
af94492a34e9823b8258f434f778562acc3d9184
|
[] |
no_license
|
LivTel/minor-access-systems
|
c2af823dd295840f8cba7aa51355bd34f9b9bac2
|
ae269b6c49d8f376c6f9227821f0fce64d482106
|
refs/heads/master
| 2023-06-26T00:33:26.787526
| 2023-06-13T14:43:19
| 2023-06-13T14:43:19
| 23,577,417
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,063
|
java
|
import java.io.*;
import java.net.*;
import java.util.*;
import java.applet.*;
/** Client to send requests to an Offline Control server. P2ML requests
* generated by another program/script are read from a file. After making
* the TCP connection to the offline server, the request is sent. Acks
* received from the server are used to determine timeout period, responses
* and error messages are written to stdout, stderr or nominated files.
*/
public class XMLTestClient extends Thread {
/** Error code: Indicates a problem parsing the command arguments.*/
public static final int COMAMND_ERROR = 1;
/** Error code: Indicates that connection could not be made to OCR server.*/
public static final int CONNECT_ERROR = 2;
/** Error code: Indicates a problem locating or opening the request file.*/
public static final int FILE_ERROR = 3;
/** Error code: Indicates an i/o problem with opening communications streams.*/
public static final int IO_ERROR = 4;
/** Error code: Indicates a problem reading from the request file.*/
public static final int READ_ERROR = 5;
/** Error code: Indicates an i/o problem sending the request.*/
public static final int SEND_ERROR = 6;
/** File to read request XML from.*/
protected String xmlFile;
/** Offline server host address.*/
protected String host;
/** Offline server host port.*/
protected int port;
/** File to dump response to.*/
protected File responseFile;
/** File to dump error messages to.*/
protected File errorFile;
/** True if output to stdout else to stderr.*/
protected boolean dumpToStdout;
/** True if output should be sent to files.*/
protected boolean dumpToFile;
/** Socket output stream.*/
PrintStream out = null;
/** Socket input stream.*/
BufferedReader in = null;
/** Request file input stream.*/
BufferedReader fin = null;
/** Dump file output stream.*/
PrintStream dump;
/** Create a client to send requests to the Offline server.
* @param host Host for Offline server.
* @param port Port for Offline server.
* @param xmlFile File to read request from.
*/
public XMLTestClient(String host, int port, String xmlFile) {
this.host = host;
this.port = port;
this.xmlFile = xmlFile;
}
public static void main(String args[]) {
try {
new XMLTestClient(args[0], Integer.parseInt(args[1]), args[2]).exec();
} catch (Exception e) {
System.err.println("USAGE: java XMLTestClient <host> <port> <xmlFile>: "+e);
System.exit(1);
}
}
public void exec() {
Socket socket = null;
try {
socket = new Socket(host, port);
System.err.println("Opened connection to: "+
socket.getInetAddress().getHostName()+
" : "+socket.getPort());
} catch (IOException e) {
error(CONNECT_ERROR, "Error opening socket connection: "+e);
return;
}
try {
fin = new BufferedReader(new FileReader(xmlFile));
System.err.println("Opened file input stream");
} catch (IOException e) {
error(FILE_ERROR, "Error opening request file: "+e);
return;
}
try {
out = new PrintStream(socket.getOutputStream());
System.err.println("Opened output stream to server");
in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
System.err.println("Opened input stream from server");
} catch (IOException e) {
error(IO_ERROR, "Error opening socket i/o streams: "+e);
return;
}
// Keep reading from file.
boolean done = false;
String text = null;
while (!done) {
try {
text = fin.readLine();
if (text == null) break;
System.err.println("Read:["+text+"]");
} catch (IOException e) {
error(READ_ERROR, "Error reading from file : "+e);
break;
}
out.println(text);
if (out.checkError())
error(SEND_ERROR, "Error sending : ");
}
System.err.println("Sending.....\n\n");
System.err.println("---------------------------------------------"+
"\n SERVER RESPONSE - START "+
"\n---------------------------------------------");
done = false;
while (!done) {
try {
String reply = in.readLine();
if (reply == null) {
System.err.println("---------------------------------------------"+
"\n SERVER RESPONSE - END "+
"\n---------------------------------------------");
return;
}
System.err.println(reply);
} catch (IOException e) {
System.err.println("Read::Error reading from server: "+e);
return;
}
}
try {
fin.close();
out.close();
} catch (IOException e) {
System.err.println("Read::Error closing file or sending : "+e);
return;
}
}
protected void error(int code, String message) {
System.err.println("<p2ml>"+
"\n <error>"+
"\n <code>"+code+"</code>"+
"\n <message>"+message+"</message>"+
"\n </error>"+
"\n</p2ml>");
}
}
|
[
"snf@astro.livjm.ac.uk"
] |
snf@astro.livjm.ac.uk
|
e7c719a6b208431e553345624629324714cf3c91
|
c198c6fbd59f1a4c7f6ff74dd95649b31a7f1a53
|
/.metadata/.plugins/org.eclipse.core.resources/.history/e3/d14496aad6fe00161a5efe1fc641ff0f
|
dd2ba1a4bab7b3b707bd2a0c743b468e5f55888f
|
[] |
no_license
|
Watsonlevens/2016_TwitterEpi
|
436a75a8440e2b6c2146634bbc8513dd92ac9518
|
7b7e7b12b3a9122ef4b22baf6860da3fb319d7ac
|
refs/heads/master
| 2023-03-15T12:26:37.131970
| 2017-09-20T14:39:27
| 2017-09-20T14:39:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,694
|
/*
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.cloudtrail.model;
import java.io.Serializable;
/**
* <p>
* Returns the objects or data listed below if successful. Otherwise, returns an error.
* </p>
*/
public class StartLoggingResult implements Serializable {
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof StartLoggingResult == false) return false;
StartLoggingResult other = (StartLoggingResult)obj;
return true;
}
}
|
[
"servan.grueninger@uzh.ch"
] |
servan.grueninger@uzh.ch
|
|
265e1236a855c74c4ac62da96dde406ecffc526b
|
369270a14e669687b5b506b35895ef385dad11ab
|
/java.base/jdk/internal/module/Checks.java
|
1b5f2b92d5abb59a6bae68b983f225d212d5263c
|
[] |
no_license
|
zcc888/Java9Source
|
39254262bd6751203c2002d9fc020da533f78731
|
7776908d8053678b0b987101a50d68995c65b431
|
refs/heads/master
| 2021-09-10T05:49:56.469417
| 2018-03-20T06:26:03
| 2018-03-20T06:26:03
| 125,970,208
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,262
|
java
|
/*
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package jdk.internal.module;
import java.util.Set;
/**
* Utility class for checking module, package, and class names.
*/
public final class Checks {
private Checks() { }
/**
* Checks a name to ensure that it's a legal module name.
*
* @throws IllegalArgumentException if name is null or not a legal
* module name
*/
public static String requireModuleName(String name) {
if (name == null)
throw new IllegalArgumentException("Null module name");
int next;
int off = 0;
while ((next = name.indexOf('.', off)) != -1) {
String id = name.substring(off, next);
if (!isJavaIdentifier(id)) {
throw new IllegalArgumentException(name + ": Invalid module name"
+ ": '" + id + "' is not a Java identifier");
}
off = next+1;
}
String last = name.substring(off);
if (!isJavaIdentifier(last)) {
throw new IllegalArgumentException(name + ": Invalid module name"
+ ": '" + last + "' is not a Java identifier");
}
return name;
}
/**
* Returns {@code true} if the given name is a legal module name.
*/
public static boolean isModuleName(String name) {
int next;
int off = 0;
while ((next = name.indexOf('.', off)) != -1) {
String id = name.substring(off, next);
if (!isJavaIdentifier(id))
return false;
off = next+1;
}
String last = name.substring(off);
return isJavaIdentifier(last);
}
/**
* Checks a name to ensure that it's a legal package name.
*
* @throws IllegalArgumentException if name is null or not a legal
* package name
*/
public static String requirePackageName(String name) {
return requireTypeName("package name", name);
}
/**
* Returns {@code true} if the given name is a legal package name.
*/
public static boolean isPackageName(String name) {
return isTypeName(name);
}
/**
* Checks a name to ensure that it's a legal qualified class name
*
* @throws IllegalArgumentException if name is null or not a legal
* qualified class name
*/
public static String requireServiceTypeName(String name) {
return requireQualifiedClassName("service type name", name);
}
/**
* Checks a name to ensure that it's a legal qualified class name.
*
* @throws IllegalArgumentException if name is null or not a legal
* qualified class name
*/
public static String requireServiceProviderName(String name) {
return requireQualifiedClassName("service provider name", name);
}
/**
* Checks a name to ensure that it's a legal qualified class name in
* a named package.
*
* @throws IllegalArgumentException if name is null or not a legal
* qualified class name in a named package
*/
public static String requireQualifiedClassName(String what, String name) {
requireTypeName(what, name);
if (name.indexOf('.') == -1)
throw new IllegalArgumentException(name + ": is not a qualified name of"
+ " a Java class in a named package");
return name;
}
/**
* Returns {@code true} if the given name is a legal class name.
*/
public static boolean isClassName(String name) {
return isTypeName(name);
}
/**
* Returns {@code true} if the given name is a legal type name.
*/
private static boolean isTypeName(String name) {
int next;
int off = 0;
while ((next = name.indexOf('.', off)) != -1) {
String id = name.substring(off, next);
if (!isJavaIdentifier(id))
return false;
off = next+1;
}
String last = name.substring(off);
return isJavaIdentifier(last);
}
/**
* Checks if the given name is a legal type name.
*
* @throws IllegalArgumentException if name is null or not a legal
* type name
*/
private static String requireTypeName(String what, String name) {
if (name == null)
throw new IllegalArgumentException("Null " + what);
int next;
int off = 0;
while ((next = name.indexOf('.', off)) != -1) {
String id = name.substring(off, next);
if (!isJavaIdentifier(id)) {
throw new IllegalArgumentException(name + ": Invalid " + what
+ ": '" + id + "' is not a Java identifier");
}
off = next + 1;
}
String last = name.substring(off);
if (!isJavaIdentifier(last)) {
throw new IllegalArgumentException(name + ": Invalid " + what
+ ": '" + last + "' is not a Java identifier");
}
return name;
}
/**
* Returns true if the given char sequence is a legal Java identifier,
* otherwise false.
*/
private static boolean isJavaIdentifier(CharSequence cs) {
if (cs.length() == 0 || RESERVED.contains(cs))
return false;
int first = Character.codePointAt(cs, 0);
if (!Character.isJavaIdentifierStart(first))
return false;
int i = Character.charCount(first);
while (i < cs.length()) {
int cp = Character.codePointAt(cs, i);
if (!Character.isJavaIdentifierPart(cp))
return false;
i += Character.charCount(cp);
}
return true;
}
// keywords, boolean and null literals, not allowed in identifiers
private static final Set<String> RESERVED = Set.of(
"abstract",
"assert",
"boolean",
"break",
"byte",
"case",
"catch",
"char",
"class",
"const",
"continue",
"default",
"do",
"double",
"else",
"enum",
"extends",
"final",
"finally",
"float",
"for",
"goto",
"if",
"implements",
"import",
"instanceof",
"int",
"interface",
"long",
"native",
"new",
"package",
"private",
"protected",
"public",
"return",
"short",
"static",
"strictfp",
"super",
"switch",
"synchronized",
"this",
"throw",
"throws",
"transient",
"try",
"void",
"volatile",
"while",
"true",
"false",
"null",
"_"
);
}
|
[
"841617433@qq.com"
] |
841617433@qq.com
|
b237d2bcaeb8d9da991ac50c0fd19a6048870ea8
|
dbfef24b8e48968baa87dcd2d8d94af6c9821d98
|
/lynx-api/src/com/dikshatech/portal/dto/ExitDeclarationPk.java
|
19e25e06eb32f63c258481d64974013f574a9c9c
|
[] |
no_license
|
sudheer999/vijay-gradle
|
7ab62da1b41120b48ab5c8f06f3e3be5c4a5530e
|
c03d167319ec915c3eb25e394761682144e1e3b3
|
refs/heads/master
| 2021-04-26T23:02:03.684417
| 2018-03-02T11:03:07
| 2018-03-02T11:03:07
| 123,918,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,254
|
java
|
/*
* This source file was generated by FireStorm/DAO.
*
* If you purchase a full license for FireStorm/DAO you can customize this header file.
*
* For more information please visit http://www.codefutures.com/products/firestorm
*/
package com.dikshatech.portal.dto;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* This class represents the primary key of the exit_declaration table.
*/
public class ExitDeclarationPk implements Serializable
{
protected int id;
/**
* This attribute represents whether the primitive attribute id is null.
*/
protected boolean idNull;
/**
* Sets the value of id
*/
public void setId(int id)
{
this.id = id;
}
/**
* Gets the value of id
*/
public int getId()
{
return id;
}
/**
* Method 'ExitDeclarationPk'
*
*/
public ExitDeclarationPk()
{
}
/**
* Method 'ExitDeclarationPk'
*
* @param id
*/
public ExitDeclarationPk(final int id)
{
this.id = id;
}
/**
* Sets the value of idNull
*/
public void setIdNull(boolean idNull)
{
this.idNull = idNull;
}
/**
* Gets the value of idNull
*/
public boolean isIdNull()
{
return idNull;
}
/**
* Method 'equals'
*
* @param _other
* @return boolean
*/
public boolean equals(Object _other)
{
if (_other == null) {
return false;
}
if (_other == this) {
return true;
}
if (!(_other instanceof ExitDeclarationPk)) {
return false;
}
final ExitDeclarationPk _cast = (ExitDeclarationPk) _other;
if (id != _cast.id) {
return false;
}
if (idNull != _cast.idNull) {
return false;
}
return true;
}
/**
* Method 'hashCode'
*
* @return int
*/
public int hashCode()
{
int _hashCode = 0;
_hashCode = 29 * _hashCode + id;
_hashCode = 29 * _hashCode + (idNull ? 1 : 0);
return _hashCode;
}
/**
* Method 'toString'
*
* @return String
*/
public String toString()
{
StringBuffer ret = new StringBuffer();
ret.append( "com.dikshatech.portal.dto.ExitDeclarationPk: " );
ret.append( "id=" + id );
return ret.toString();
}
}
|
[
"sudheer.tsm9@gmail.com"
] |
sudheer.tsm9@gmail.com
|
0a41c6650db43127ffb8ecf9712d26f3e9d9414a
|
fd3e4cc20a58c2a46892b3a38b96d5e2303266d8
|
/src/main/java/com/tencent/tbs/video/interfaces/C1165a.java
|
c3298d790bab65a731f796bcb4ba82d40baeb312
|
[] |
no_license
|
makewheels/AnalyzeBusDex
|
42ef50f575779b66bd659c096c57f94dca809050
|
3cb818d981c7bc32c3cbd8c046aa78cd38b20e8a
|
refs/heads/master
| 2021-10-22T07:16:40.087139
| 2019-03-09T03:11:05
| 2019-03-09T03:11:05
| 173,123,231
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 340
|
java
|
package com.tencent.tbs.video.interfaces;
import android.content.Intent;
/* renamed from: com.tencent.tbs.video.interfaces.a */
public interface C1165a {
/* renamed from: a */
void m8084a(int i, int i2, Intent intent);
/* renamed from: a */
void m8085a(IUserStateChangedListener iUserStateChangedListener);
}
|
[
"spring@qbserver.cn"
] |
spring@qbserver.cn
|
a0f1986c8b9ac365fe68d9ed4fdff4e6383a6a8d
|
08945e7ed2157b674aa99cd33318b2f0f70b6d51
|
/OnlineTraining/src/exceptionhandling/ExceptionHandlingDemo2.java
|
37f82d1941ac5d6b44de5694958f94ae280e1677
|
[] |
no_license
|
nagarjunreddykasu/seleniumonline
|
356ce7c02ccd72cf0b00ecb256fece7eb38b19cd
|
7ca5db51d16554c27f519f37cf2b9ccbecb97fbe
|
refs/heads/master
| 2023-06-16T18:57:12.490681
| 2021-07-12T10:51:17
| 2021-07-12T10:51:17
| 333,145,937
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 409
|
java
|
package exceptionhandling;
public class ExceptionHandlingDemo2 {
public static void main(String[] args) {
try{
System.out.println("Execution started...");
System.out.println(10/0);
System.out.println("Execution completed");
}
catch(ArithmeticException | NullPointerException | IndexOutOfBoundsException ae){
System.out.println("ArithmeticException Catch block is exucuted");
}
}
}
|
[
"nagarjun.sdet@gmail.com"
] |
nagarjun.sdet@gmail.com
|
27cc1c89b066a60babf0fc1f873a46c808431c5e
|
a9de22590675be8ee38163127a2c24a20c248a0b
|
/src/com/iremote/infraredcode/stb/codequery/Yongchengcable.java
|
556481bb300d653ee4891bd86499ec1249a86c08
|
[] |
no_license
|
jessicaallen777/iremote2
|
0943622300286f8d16e9bb4dca349613ffc23bb1
|
b27aa81785fc8bf5467a1ffcacd49a04e41f6966
|
refs/heads/master
| 2023-03-16T03:20:00.746888
| 2019-12-12T04:02:30
| 2019-12-12T04:02:30
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 912
|
java
|
package com.iremote.infraredcode.stb.codequery;
import com.iremote.infraredcode.tv.codequery.CodeQueryBase;
public class Yongchengcable extends CodeQueryBase {
@Override
public String getProductor() {
return "Yongchengcable";
}
@Override
public String[] getQueryCodeLiberay() {
return querycode;
}
private static String[] querycode = new String[]
{
//机顶盒 永城有线(Yongcheng cable) 1
"00e04700338233811028202820281f291f292029202965281f281f281f29652866282028652820292028662820286528202820282028662820281f28642820286628652866281f2965298995823b8086280000000000000000000000000000000000000000000000000000000000",
//机顶盒 永城有线(Yongcheng cable) 2
"00e04700338234810f291f29202820281f291f291f29652920282028202865296529202866291f291f296529202866291f291f291f2965292028202865291f29652865296528202866288995823b8087280000000000000000000000000000000000000000000000000000000000",
};
}
|
[
"stevenbluesky@163.com"
] |
stevenbluesky@163.com
|
cdb717ff29d78a25864fcd837db526abb4c08e0c
|
1448f519f5beeb597449613ca319a36ee691d6e6
|
/openTCS-PeripheralCommAdapter-Loopback/src/main/java/org/opentcs/commadapter/peripheral/loopback/LoopbackPeripheralAdapterPanelComponentsFactory.java
|
22bbb392abf539a1afa9ee3f1c37716a28b2e8f9
|
[
"CC-BY-4.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
bluseking/opentcs
|
2acc808042a1fe9973c33dda6f2a19366dd7e139
|
0edd4f5a882787b83e5132097cf3cf9fc6ac4cc2
|
refs/heads/master
| 2023-09-06T06:44:10.473728
| 2021-11-25T15:43:14
| 2021-11-25T15:43:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 804
|
java
|
/**
* Copyright (c) The openTCS Authors.
*
* This program is free software and subject to the MIT license. (For details,
* see the licensing information (LICENSE.txt) you should have received with
* this copy of the software.)
*/
package org.opentcs.commadapter.peripheral.loopback;
/**
* A factory for creating various comm adapter panel-specific instances.
*
* @author Martin Grzenia (Fraunhofer IML)
*/
public interface LoopbackPeripheralAdapterPanelComponentsFactory {
/**
* Creates a {@link LoopbackPeripheralCommAdapterPanel} representing the given process model's
* content.
*
* @param processModel The process model to represent.
* @return The comm adapter panel.
*/
LoopbackPeripheralCommAdapterPanel createPanel(LoopbackPeripheralProcessModel processModel);
}
|
[
"stefan.walter@iml.fraunhofer.de"
] |
stefan.walter@iml.fraunhofer.de
|
23c8f34e8f43fb0e59617a719885fb707c96f582
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/androidx/preference/PreferenceDialogFragment.java
|
21213326222613129ed03ae7c0e4578c2d926d20
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,943
|
java
|
package androidx.preference;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import androidx.preference.DialogPreference;
@Deprecated
public abstract class PreferenceDialogFragment extends DialogFragment implements DialogInterface.OnClickListener {
@Deprecated
public static final String ARG_KEY = "key";
public DialogPreference a;
public CharSequence b;
public CharSequence c;
public CharSequence d;
public CharSequence e;
@LayoutRes
public int f;
public BitmapDrawable g;
public int h;
@Deprecated
public DialogPreference getPreference() {
if (this.a == null) {
this.a = (DialogPreference) ((DialogPreference.TargetFragment) getTargetFragment()).findPreference(getArguments().getString("key"));
}
return this.a;
}
@RestrictTo({RestrictTo.Scope.LIBRARY})
public boolean needInputMethod() {
return false;
}
@Deprecated
public void onBindDialogView(View view) {
View findViewById = view.findViewById(16908299);
if (findViewById != null) {
CharSequence charSequence = this.e;
int i = 8;
if (!TextUtils.isEmpty(charSequence)) {
if (findViewById instanceof TextView) {
((TextView) findViewById).setText(charSequence);
}
i = 0;
}
if (findViewById.getVisibility() != i) {
findViewById.setVisibility(i);
}
}
}
@Override // android.content.DialogInterface.OnClickListener
@Deprecated
public void onClick(DialogInterface dialogInterface, int i) {
this.h = i;
}
@Override // android.app.DialogFragment, android.app.Fragment
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
Fragment targetFragment = getTargetFragment();
if (targetFragment instanceof DialogPreference.TargetFragment) {
DialogPreference.TargetFragment targetFragment2 = (DialogPreference.TargetFragment) targetFragment;
String string = getArguments().getString("key");
if (bundle == null) {
DialogPreference dialogPreference = (DialogPreference) targetFragment2.findPreference(string);
this.a = dialogPreference;
this.b = dialogPreference.getDialogTitle();
this.c = this.a.getPositiveButtonText();
this.d = this.a.getNegativeButtonText();
this.e = this.a.getDialogMessage();
this.f = this.a.getDialogLayoutResource();
Drawable dialogIcon = this.a.getDialogIcon();
if (dialogIcon == null || (dialogIcon instanceof BitmapDrawable)) {
this.g = (BitmapDrawable) dialogIcon;
return;
}
Bitmap createBitmap = Bitmap.createBitmap(dialogIcon.getIntrinsicWidth(), dialogIcon.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(createBitmap);
dialogIcon.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
dialogIcon.draw(canvas);
this.g = new BitmapDrawable(getResources(), createBitmap);
return;
}
this.b = bundle.getCharSequence("PreferenceDialogFragment.title");
this.c = bundle.getCharSequence("PreferenceDialogFragment.positiveText");
this.d = bundle.getCharSequence("PreferenceDialogFragment.negativeText");
this.e = bundle.getCharSequence("PreferenceDialogFragment.message");
this.f = bundle.getInt("PreferenceDialogFragment.layout", 0);
Bitmap bitmap = (Bitmap) bundle.getParcelable("PreferenceDialogFragment.icon");
if (bitmap != null) {
this.g = new BitmapDrawable(getResources(), bitmap);
return;
}
return;
}
throw new IllegalStateException("Target fragment must implement TargetFragment interface");
}
@Override // android.app.DialogFragment
@NonNull
public Dialog onCreateDialog(Bundle bundle) {
Activity activity = getActivity();
this.h = -2;
AlertDialog.Builder negativeButton = new AlertDialog.Builder(activity).setTitle(this.b).setIcon(this.g).setPositiveButton(this.c, this).setNegativeButton(this.d, this);
View onCreateDialogView = onCreateDialogView(activity);
if (onCreateDialogView != null) {
onBindDialogView(onCreateDialogView);
negativeButton.setView(onCreateDialogView);
} else {
negativeButton.setMessage(this.e);
}
onPrepareDialogBuilder(negativeButton);
AlertDialog create = negativeButton.create();
if (needInputMethod()) {
create.getWindow().setSoftInputMode(5);
}
return create;
}
@Deprecated
public View onCreateDialogView(Context context) {
int i = this.f;
if (i == 0) {
return null;
}
return LayoutInflater.from(context).inflate(i, (ViewGroup) null);
}
@Deprecated
public abstract void onDialogClosed(boolean z);
@Override // android.app.DialogFragment, android.content.DialogInterface.OnDismissListener
public void onDismiss(DialogInterface dialogInterface) {
super.onDismiss(dialogInterface);
onDialogClosed(this.h == -1);
}
@Deprecated
public void onPrepareDialogBuilder(AlertDialog.Builder builder) {
}
@Override // android.app.DialogFragment, android.app.Fragment
public void onSaveInstanceState(@NonNull Bundle bundle) {
super.onSaveInstanceState(bundle);
bundle.putCharSequence("PreferenceDialogFragment.title", this.b);
bundle.putCharSequence("PreferenceDialogFragment.positiveText", this.c);
bundle.putCharSequence("PreferenceDialogFragment.negativeText", this.d);
bundle.putCharSequence("PreferenceDialogFragment.message", this.e);
bundle.putInt("PreferenceDialogFragment.layout", this.f);
BitmapDrawable bitmapDrawable = this.g;
if (bitmapDrawable != null) {
bundle.putParcelable("PreferenceDialogFragment.icon", bitmapDrawable.getBitmap());
}
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
fdfcf366b245c3c1bef77a5b6b47ffcda9339ea8
|
49744e4c91d519e12d7985383af5575460899a90
|
/faceye-stock-api/src/main/java/com/faceye/component/stock/controller/MechanismController.java
|
b36aaeed963ddf7160cdd4e5c5422b0b84e94e7e
|
[] |
no_license
|
haipenge/faceye-stock
|
b179a367d064a2c3823b1177900de45cca966ef7
|
f6e6b3d9c92dde0466877d20010ef1e5d934fb16
|
refs/heads/master
| 2021-07-09T06:42:18.151541
| 2019-06-03T09:38:55
| 2019-06-03T09:38:55
| 73,882,158
| 2
| 0
| null | 2020-10-12T19:19:48
| 2016-11-16T03:56:23
|
Java
|
UTF-8
|
Java
| false
| false
| 5,177
|
java
|
package com.faceye.component.stock.controller;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import org.springframework.validation.BindingResult;
import javax.validation.Valid;
import com.faceye.component.stock.entity.Mechanism;
import com.faceye.component.stock.service.MechanismService;
import com.faceye.feature.util.AjaxResult;
import com.faceye.feature.util.MathUtil;
import com.faceye.feature.util.http.HttpUtil;
import com.faceye.feature.util.regexp.RegexpUtil;
import com.faceye.feature.util.AjaxResult;
import com.faceye.feature.controller.BaseController;
/**
* 模块:stock<br>
* 实体:Mechanism<br>
* @author @haipenge <br>
* haipenge@gmail.com<br>
* Create Date:2014年12月10日<br>
*/
@Controller
@Scope("prototype")
@RequestMapping("/stock/mechanism")
public class MechanismController extends BaseController<Mechanism, Long, MechanismService> {
@Autowired
public MechanismController(MechanismService service) {
super(service);
}
/**
* 首页<br>
*
* @todo<br>
* @return<br>
* @author:@haipenge haipenge@gmail.com 2014年5月24日<br>
*/
@RequestMapping("/home")
@ResponseBody
public Page<Mechanism> home(HttpServletRequest request, Model model) {
Map searchParams=HttpUtil.getRequestParams(request);
Page<Mechanism> page = this.service.getPage(searchParams, getPage(searchParams), getSize(searchParams));
return page
}
/**
* 转向编辑或新增页面<br>
*
* @todo<br>
* @return<br>
* @author:@haipenge haipenge@gmail.com 2014年5月24日<br>
*/
@RequestMapping("/edit/{id}")
@ResponseBody
public String edit(@PathVariable("id") Long id,Model model,HttpServletRequest request) {
if(id!=null){
beforeInput(model,request);
Mechanism entity=this.service.get(id);
model.addAttribute("mechanism", entity);
}
return AjaxResult.getInstance().buildDefaultResult(true);
}
/**
* 转向新增页面<br>
* @todo<br>
* @param model<br>
* @return<br>
* @author:@haipenge<br>
* haipenge@gmail.com<br>
* 2014年5月27日<br>
*/
@RequestMapping(value="/input")
@ResponseBody
public String input(Mechanism mechanism,Model model,HttpServletRequest request){
beforeInput(model,request);
return AjaxResult.getInstance().buildDefaultResult(true);
}
/**
* 数据保存<br>
*/
@RequestMapping("/save")
@ResponseBody
public String save(@Valid Mechanism mechanism,BindingResult bindingResult, RedirectAttributes redirectAttributes,Model model,HttpServletRequest request) {
if(bindingResult.hasErrors()){
beforeInput(model,request);
return AjaxResult.getInstance().buildDefaultResult(false);
}else{
this.beforeSave(mechanism,request);
this.service.save(mechanism);
return AjaxResult.getInstance().buildDefaultResult(true);
}
}
/**
* 数据删除<br>
*
* @todo<br>
* @return<br>
* @author:@haipenge haipenge@gmail.com 2014年5月24日<br>
*/
@RequestMapping("/remove/{id}")
@ResponseBody
public String remove(@PathVariable("id") Long id, RedirectAttributes redirectAttributes) {
if(id!=null){
this.service.remove(id);
}
return AjaxResult.getInstance().buildDefaultResult(true);
}
/**
* 数据批量删除<br>
*
* @todo<br>
* @return<br>
* @author:@haipenge haipenge@gmail.com 2014年5月24日<br>
*/
@RequestMapping("/multiRemove")
@ResponseBody
public String remove(@RequestParam(required=true) String ids, RedirectAttributes redirectAttributes) {
if(StringUtils.isNotEmpty(ids)){
String [] idArray=ids.split(",");
for(String id:idArray){
this.service.remove(Long.parseLong(id));
}
}
return AjaxResult.getInstance().buildDefaultResult(true);
}
/**
* 取得数据明细<br>
* @todo<br>
* @param id<br>
* @param model<br>
* @return<br>
* @author:@haipenge<br>
* haipenge@gmail.com<br>
* 2014年5月26日<br>
*/
@RequestMapping("/detail/{id}")
@ResponseBody
public Mechanism detail(@PathVariable Long id,Model model){
if(id!=null){
Mechanism mechanism=this.service.get(id);
}
return mechanism;
}
///////////////////////////////////////////////以下为回调函数////////////////////////////////////////////
/**
* 新增、编辑页面的前置逻辑处理<br>
* @todo<br>
* @param model<br>
* @param request<br>
* @author:@haipenge<br>
* haipenge@gmail.com<br>
* 2015年4月5日<br>
*/
protected void beforeInput(Model model,HttpServletRequest request){
}
/**
*
*保存数据前的回调函数
*/
protected void beforeSave(Mechanism mechanism,HttpServletRequest request){
}
}
|
[
"haipenge@gmail.com"
] |
haipenge@gmail.com
|
163be31724a5800f5ed29bc9ba90061612d34340
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/ga-20191120/src/main/java/com/aliyun/ga20191120/models/DescribeApplicationMonitorResponse.java
|
7c53b77b941d48f776f70f1d2fd6b0b75b044a3b
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,476
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ga20191120.models;
import com.aliyun.tea.*;
public class DescribeApplicationMonitorResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public DescribeApplicationMonitorResponseBody body;
public static DescribeApplicationMonitorResponse build(java.util.Map<String, ?> map) throws Exception {
DescribeApplicationMonitorResponse self = new DescribeApplicationMonitorResponse();
return TeaModel.build(map, self);
}
public DescribeApplicationMonitorResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public DescribeApplicationMonitorResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public DescribeApplicationMonitorResponse setBody(DescribeApplicationMonitorResponseBody body) {
this.body = body;
return this;
}
public DescribeApplicationMonitorResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
27ebc0755d4683cb5e0537d76df4cc24e4d67661
|
d6dfdc83446a0c8f4539227d0f674cf9289bdb08
|
/bundle/edu.gemini.ui.workspace/src/main/java/edu/gemini/ui/workspace/BooleanStateAction.java
|
ec343bb9f8676a74c241ba1d2e22d10348be27d0
|
[
"MIT"
] |
permissive
|
gitter-badger/ocs
|
6c3c795ce288f101eff6a800d320b4735ed95571
|
9329213adcb1ff60cea76e4feb426ed79985361f
|
refs/heads/develop
| 2020-12-11T04:12:28.014282
| 2015-06-16T01:17:13
| 2015-06-16T01:17:13
| 37,540,475
| 0
| 0
| null | 2015-06-16T15:57:10
| 2015-06-16T15:57:09
| null |
UTF-8
|
Java
| false
| false
| 254
|
java
|
package edu.gemini.ui.workspace;
import javax.swing.Action;
/**
* Interface for an action that toggles, like a checkbox menu item.
* @author rnorris
*/
public interface BooleanStateAction extends Action {
String BOOLEAN_STATE = "booleanState";
}
|
[
"swalker2m@gmail.com"
] |
swalker2m@gmail.com
|
569b42c2e7a93db7a6db28ebb7181d37e0fe5241
|
2d1854c2c454cfd41ebf9e191b61189d36a40724
|
/Examples/src/main/java/com/aspose/cells/examples/articles/ApplyShadingToAlternateRowsAndColumns.java
|
d393d558f7d7bc7250fe53e1e57aca024f1509fb
|
[
"MIT"
] |
permissive
|
Aspose/Aspose.Cells-for-Java
|
256e7ef67ffd2ff5f82b488b48b0b54f18723d13
|
e2d4f31315723aa8ff305e5515016b700f1605b7
|
refs/heads/master
| 2023-08-16T12:28:59.349558
| 2016-11-21T08:29:11
| 2016-11-21T08:29:11
| 55,831,105
| 1
| 2
| null | 2016-12-02T09:06:41
| 2016-04-09T07:16:12
|
Java
|
UTF-8
|
Java
| false
| false
| 2,265
|
java
|
package com.aspose.cells.examples.articles;
import com.aspose.cells.BackgroundType;
import com.aspose.cells.CellArea;
import com.aspose.cells.Color;
import com.aspose.cells.FormatCondition;
import com.aspose.cells.FormatConditionCollection;
import com.aspose.cells.FormatConditionType;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;
import com.aspose.cells.examples.Utils;
public class ApplyShadingToAlternateRowsAndColumns {
public static void main(String[] args) throws Exception {
String dataDir = Utils.getSharedDataDir(ApplyShadingToAlternateRowsAndColumns.class) + "articles/";
/*
* Create an instance of Workbook Optionally load an existing spreadsheet by passing its stream or path to Workbook
* constructor
*/
Workbook book = new Workbook();
// Access the Worksheet on which desired rule has to be applied
Worksheet sheet = book.getWorksheets().get(0);
// Add FormatConditions to the instance of Worksheet
int index = sheet.getConditionalFormattings().add();
// Access the newly added FormatConditions via its index
FormatConditionCollection conditionCollection = sheet.getConditionalFormattings().get(index);
// Define a CellsArea on which conditional formatting will be applicable
CellArea area = CellArea.createCellArea("A1", "I20");
// Add area to the instance of FormatConditions
conditionCollection.addArea(area);
// Add a condition to the instance of FormatConditions. For this case, the condition type is expression, which is based on
// some formula
index = conditionCollection.addCondition(FormatConditionType.EXPRESSION);
// Access the newly added FormatCondition via its index
FormatCondition formatCondirion = conditionCollection.get(index);
// Set the formula for the FormatCondition. Formula uses the Excel's built-in functions as discussed earlier in this
// article
formatCondirion.setFormula1("=MOD(ROW(),2)=0");
// Set the background color and patter for the FormatCondition's Style
formatCondirion.getStyle().setBackgroundColor(Color.getBlue());
formatCondirion.getStyle().setPattern(BackgroundType.SOLID);
// Save the result on disk
book.save(dataDir + "ASToARAC_out.xlsx");
}
}
|
[
"fahadadeel@gmail.com"
] |
fahadadeel@gmail.com
|
613a104ab90cb164f2c27d45476d4542e0f82acd
|
d458d991ecae109e050c5b879c25d25e7760e987
|
/jedc/src/main/java/net/sf/jdec/constantpool/AbstractRuntimeAnnotation.java
|
bcd3f16098983517091a68e22e7ee368be571868
|
[] |
no_license
|
Neumann789/tools
|
9910d18cc59497ffc7e8fb451a50e4811593413a
|
84f02179778157b19f7357fe449ffebe838a537d
|
refs/heads/master
| 2021-01-20T05:58:40.740858
| 2017-08-26T09:17:37
| 2017-08-26T09:17:37
| 101,475,312
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 649
|
java
|
package net.sf.jdec.constantpool;
import java.util.ArrayList;
import java.util.List;
/***
@author swaroop belur(belurs)
***/
public class AbstractRuntimeAnnotation {
private List annotations = new ArrayList();
private int count;
public AbstractRuntimeAnnotation() {
super();
}
public List getAnnotations() {
return annotations;
}
public void setAnnotations(List annotations) {
this.annotations = annotations;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public void addAnnotation(Annotation a) {
annotations.add(a);
}
}
|
[
"test@test.com"
] |
test@test.com
|
9f7f541240ba649df7c2190864e5fd9ae090e805
|
61fa6101d74bff27cd4f85be205e5f9bd9b1ae30
|
/2016-05-18_NBUT_OJ_Bootstrp/src/com/nbut/servlet/UserActionV2.java
|
d18bce8c1dcd9858cc7b886456a16a23bfde4cb7
|
[] |
no_license
|
LiHuaYang/college
|
93810c6f15aa213f8386a295b2c474dbd6c5c4bc
|
5648bbee3d2df252be0fb925d41dd8b158476e56
|
refs/heads/main
| 2023-02-22T09:49:04.944870
| 2021-01-20T07:15:00
| 2021-01-20T07:15:00
| 89,077,293
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,810
|
java
|
package com.nbut.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.factory.BllFactory;
import com.nbut.bll.UserManage;
import com.nbut.entity.User;
import com.nbut.filter.MyResponseWrapper;
import com.nbut.filter.MyResquestWrapper;
import net.sf.json.JSONObject;
/**
*
*
* 作者:ariclee 时间:2016年6月5日下午4:10:18
*/
@WebServlet("/UserActionV2")
public class UserActionV2 extends BaseServlet {
private static final long serialVersionUID = 1L;
/**
* 函数名称:login
* 功能描述:
* 参数说明:
* 返回值:void
* 备注:
*
* 作者:ariclee 时间:2016年6月5日下午4:06:21
*/
public void login(MyResquestWrapper request, MyResponseWrapper response) throws IOException {
String userId = request.getParameter("id");
String passwd = request.getParameter("passwd");
JSONObject out_json = new JSONObject();
PrintWriter out = response.getWriter();
boolean flag = isLogin(request, response, userId);
if (flag) {// 用户已经登录
out_json.put("msg", "请不要重复登陆");
out_json.put("res", "false");
out_json.put("data", null);
toCilent(out, out_json);
} else { // 用户未登录
User user = login(userId, passwd);
if (user==null) {
out_json.put("msg", "用户验证失败");
out_json.put("res", "false");
out_json.put("data", null);
}
else {
HttpSession session = request.getSession();
session.setAttribute("user", user); // 设置Session
session.setMaxInactiveInterval(30 * 60); // 设置session为三十分钟
out_json.put("msg", "登录成功");
out_json.put("res", "true");
out_json.put("data", user);
}
toCilent(out, out_json);
}
}
/**
* 函数名称:logout
* 功能描述:
* 参数说明:
* 返回值:void
* 备注:
*
* 作者:ariclee 时间:2016年6月5日下午4:09:32
*/
public void logout(MyResquestWrapper request, MyResponseWrapper response) throws IOException {
JSONObject out_json = new JSONObject();
PrintWriter out = response.getWriter();
if (logoutVa(request, response)) {
out_json.put("msg", "登出成功");
out_json.put("res", "true");
out_json.put("data", null);
} else {
out_json.put("msg", "登出失败");
out_json.put("res", "false");
out_json.put("data", null);
}
toCilent(out, out_json);
}
/**
* 函数名称:AdminCheck
* 功能描述:管理员登陆验证
* 参数说明:
* 返回值:void
* 备注:
*
* 作者:ariclee 时间:2016年6月7日上午9:40:06
*/
public void AdminCheck(MyResquestWrapper request, MyResponseWrapper response) throws IOException {
HttpSession session = request.getSession();
User us = (User) session.getAttribute("user");
JSONObject out_json = new JSONObject();
PrintWriter out = response.getWriter();
if (us == null) {
out_json.put("msg", "登陆后再操作");
out_json.put("res", "false");
out_json.put("data", null);
} else {
out_json.put("msg", "验证成功");
out_json.put("res", "true");
request.getSession().setAttribute("user", us);
out_json.put("data", us);
System.out.println("UserActionV2--AdminCheck--" + us);
}
toCilent(out, out_json);
}
/**
* 函数名称:register
* 功能描述:
* 参数说明:
* 返回值:void
* 备注:
*
* 作者:ariclee 时间:2016年6月7日下午12:45:10
*/
public void register(MyResquestWrapper request, MyResponseWrapper response) throws IOException {
JSONObject out_json = new JSONObject();
PrintWriter out = response.getWriter();
boolean isOk = true;
String id = request.getParameter("id");
String password = request.getParameter("password");
String password2 = request.getParameter("password2");
String school = request.getParameter("school");
String nickname = request.getParameter("nickname");
String email = request.getParameter("email");
String msg = "";
out_json.put("data", null);
out_json.put("other", null);
if (password==null || password.trim().equals("")) {
isOk = false;
} else {
if (!password.matches("\\d{6,10}")) { // 密码必须是6-8位的数字!!
msg += "密码必须是6-8位的数字";
out_json.put("msg", msg);
isOk = false;
out_json.put("res", "false");
}
}
if (password2!=null) {
if (!password2.equals(password)) {
msg += "两次密码不一致";
out_json.put("msg", msg);
isOk = false; // 两次密码不一致
out_json.put("res", "false");
}
}
if (email!=null && email!=""){
if (!email.matches("\\w+@\\w+(\\.\\w+)+")) {
msg += "非法邮箱";
out_json.put("msg", msg);
isOk = false; // 非法邮箱
out_json.put("res", "false");
}
}
UserManage mm = BllFactory.getInstance().getUserManage();
if (isOk) {
User uu1 = mm.getUserByUserId(id);
if (uu1.getUser_id()!=null) {
msg+="用户已经注册";
out_json.put("msg", msg);
isOk = false;
out_json.put("res", "false");
}
}
// 基础验证通过,开始进行逻辑业务
if (isOk) {
User uu2 = new User(id, password, school, nickname, email, request.getRemoteAddr());
uu2 = mm.register(uu2);
if (uu2==null) {
msg+="注册失败(未知错误)";
out_json.put("msg", msg);
out_json.put("res", "false");
}
else {
msg+="注册成功";
out_json.put("msg", msg);
out_json.put("res", "true");
HttpSession session = request.getSession(); // 自动登录
session.setAttribute("user", uu2); // 设置Session
session.setMaxInactiveInterval(30 * 60); // 设置session为三十分钟
}
}
toCilent(out, out_json);
}
/******************************************************************************************************/
/**
* 函数名称:isLogin
* 功能描述:验证session中是否有已经存在当前登陆用户
* 参数说明:
* 返回值:boolean
* 备注:
*
* 作者:ariclee 时间:2016年5月31日上午9:01:52
*/
public boolean isLogin(HttpServletRequest request, HttpServletResponse response, String userId) {
HttpSession session = request.getSession();
User us = (User) session.getAttribute("user");
boolean flag = false;
if (us!=null && us.getUser_id().equals(userId)) {
flag = true;
}
return flag;
}
/**
* 函数名称:login
* 功能描述:用户登录
* 参数说明:
* 返回值:void
* 备注:
*
* 作者:ariclee 时间:2016年5月31日上午9:16:21
*/
public User login(String userId, String passwd) {
UserManage uu = BllFactory.getInstance().getUserManage();
User user = uu.login(userId, passwd);
return user;
}
/******************************************************************************************************/
/**
* 函数名称:logout
* 功能描述:
* 参数说明:
* 返回值:boolean
* 备注:
*
* 作者:ariclee 时间:2016年5月31日上午10:21:53
*/
public boolean logoutVa(MyResquestWrapper request, MyResponseWrapper response) {
request.getSession().removeAttribute("user");
request.getSession().invalidate();
HttpSession session = request.getSession();
User us = (User) session.getAttribute("user");
if (us==null) {
return true;
} else {
return false;
}
}
/**
* 函数名称:toCilent
* 功能描述:回送数据至客户端
* 参数说明:
* 返回值:void
* 备注:
*
* 作者:ariclee 时间:2016年5月31日上午11:53:07
*/
public void toCilent(PrintWriter out, JSONObject out_json) {
out.println(out_json);
out.flush();
out.close();
}
}
|
[
"lihy@fingard.com"
] |
lihy@fingard.com
|
69f2818a29b9c5c44805fc94ca7d9775b5da3b6e
|
25dd3a932c3e705bd1bb07ae507c962e35fe1d57
|
/src/main/java/com/demo/test/config/DatabaseConfiguration.java
|
e27e457d8974cd5c6c7e855bc297a76653e97fc6
|
[] |
no_license
|
zeeshan-memon/jhipster-micro-services
|
c87644c167cfa7a871660dc1252ffa0e9120343a
|
d8f9a8d07f18fb0a5508be4a7061f2c890d1225c
|
refs/heads/main
| 2023-04-15T11:30:23.669686
| 2021-04-29T04:41:36
| 2021-04-29T04:41:36
| 362,691,767
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,041
|
java
|
package com.demo.test.config;
import com.github.cloudyrock.spring.v5.EnableMongock;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Profile;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.mongodb.config.EnableMongoAuditing;
import org.springframework.data.mongodb.core.convert.MongoCustomConversions;
import org.springframework.data.mongodb.core.mapping.event.ValidatingMongoEventListener;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import tech.jhipster.config.JHipsterConstants;
import tech.jhipster.domain.util.JSR310DateConverters.DateToZonedDateTimeConverter;
import tech.jhipster.domain.util.JSR310DateConverters.ZonedDateTimeToDateConverter;
@Configuration
@EnableMongock
@EnableMongoRepositories("com.demo.test.repository")
@Profile("!" + JHipsterConstants.SPRING_PROFILE_CLOUD)
@Import(value = MongoAutoConfiguration.class)
@EnableMongoAuditing(auditorAwareRef = "springSecurityAuditorAware")
public class DatabaseConfiguration {
@Bean
public ValidatingMongoEventListener validatingMongoEventListener() {
return new ValidatingMongoEventListener(validator());
}
@Bean
public LocalValidatorFactoryBean validator() {
return new LocalValidatorFactoryBean();
}
@Bean
public MongoCustomConversions customConversions() {
List<Converter<?, ?>> converters = new ArrayList<>();
converters.add(DateToZonedDateTimeConverter.INSTANCE);
converters.add(ZonedDateTimeToDateConverter.INSTANCE);
return new MongoCustomConversions(converters);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
2fc7b488f17be758873ff90fe4ca878047825edd
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/veken0m_bitcoinium/src/main/java/com/veken0m/bitcoinium/WebViewerActivity.java
|
271062828fe82bbc3c94da84a1d2894197c1f382
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
|
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
|
0564143d92f8024ff5fa6b659c2baebf827582b1
|
refs/heads/master
| 2020-07-13T13:53:40.297493
| 2019-01-11T11:51:18
| 2019-01-11T11:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,938
|
java
|
// isComment
package com.veken0m.bitcoinium;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.NavUtils;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.webkit.WebView;
import android.webkit.WebViewClient;
@SuppressLint("isStringConstant")
public class isClassOrIsInterface extends BaseActivity {
static final LayoutParams isVariable = new LayoutParams(isNameExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr);
private class isClassOrIsInterface extends FragmentPagerAdapter {
final int isVariable = isIntegerConstant;
private String[] isVariable = new String[] { "isStringConstant", "isStringConstant" };
private isConstructor(FragmentManager isParameter, Context isParameter) {
super(isNameExpr);
}
@Override
public int isMethod() {
return isNameExpr;
}
@Override
public Fragment isMethod(int isParameter) {
return isNameExpr.isMethod(isNameExpr == isIntegerConstant ? "isStringConstant" : "isStringConstant");
}
@Override
public CharSequence isMethod(int isParameter) {
// isComment
return isNameExpr[isNameExpr];
}
}
@Override
public void isMethod(Bundle isParameter) {
super.isMethod(isNameExpr);
isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr);
// isComment
ViewPager isVariable = (ViewPager) isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr);
isNameExpr.isMethod(new SampleFragmentPagerAdapter(isMethod(), isNameExpr.this));
// isComment
TabLayout isVariable = (TabLayout) isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr);
isNameExpr.isMethod(isNameExpr);
}
@Override
public boolean isMethod(MenuItem isParameter) {
switch(isNameExpr.isMethod()) {
// isComment
case isNameExpr.isFieldAccessExpr.isFieldAccessExpr.isFieldAccessExpr:
isNameExpr.isMethod(this);
return true;
}
return super.isMethod(isNameExpr);
}
@Override
public boolean isMethod(Menu isParameter) {
return true;
}
public static class isClassOrIsInterface extends Fragment {
public static final String isVariable = "isStringConstant";
private String isVariable;
public static PageFragment isMethod(String isParameter) {
Bundle isVariable = new Bundle();
isNameExpr.isMethod(isNameExpr, isNameExpr);
PageFragment isVariable = new PageFragment();
isNameExpr.isMethod(isNameExpr);
return isNameExpr;
}
@Override
public void isMethod(Bundle isParameter) {
super.isMethod(isNameExpr);
isNameExpr = isMethod().isMethod(isNameExpr);
}
@Override
public View isMethod(LayoutInflater isParameter, ViewGroup isParameter, Bundle isParameter) {
WebView isVariable = new WebView(this.isMethod());
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(new WebViewClient());
isNameExpr.isMethod(isIntegerConstant);
isNameExpr.isMethod(true);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod().isMethod(true);
isNameExpr.isMethod().isMethod(true);
isNameExpr.isMethod().isMethod(true);
return isNameExpr;
}
}
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
8865577a120dd7816aaef5e06aa3c2966cfdf403
|
bb67511bec8421fd2ecf0d281ef4113923c8873b
|
/src/main/java/com/google/android/gms/internal/zzfz.java
|
0ebc5bcb118287cb0f29772f671f6838b56f695a
|
[] |
no_license
|
TaintBench/hummingbad_android_samp
|
5b5183737d92948fb2def5b70af8f008bf94e364
|
b7ce27e2a9f2977c11ba57144c639fa5c55dbcb5
|
refs/heads/master
| 2021-07-21T19:35:45.570627
| 2021-07-16T11:38:49
| 2021-07-16T11:38:49
| 234,354,957
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,219
|
java
|
package com.google.android.gms.internal;
import android.content.Context;
import android.os.SystemClock;
import com.google.android.gms.ads.internal.request.AdRequestInfoParcel;
import com.google.android.gms.ads.internal.request.AdResponseParcel;
import com.google.android.gms.ads.internal.util.client.zzb;
@zzgk
public abstract class zzfz extends zzhq {
protected final Context mContext;
protected final com.google.android.gms.internal.zzga.zza zzCD;
protected final Object zzCE = new Object();
protected final com.google.android.gms.internal.zzhj.zza zzCF;
protected AdResponseParcel zzCG;
protected final zzip zzoL;
protected final Object zzpc = new Object();
protected static final class zza extends Exception {
private final int zzCI;
public zza(String str, int i) {
super(str);
this.zzCI = i;
}
public int getErrorCode() {
return this.zzCI;
}
}
protected zzfz(Context context, com.google.android.gms.internal.zzhj.zza zza, zzip zzip, com.google.android.gms.internal.zzga.zza zza2) {
this.mContext = context;
this.zzCF = zza;
this.zzCG = zza.zzGM;
this.zzoL = zzip;
this.zzCD = zza2;
}
public void onStop() {
}
public void zzdG() {
synchronized (this.zzpc) {
zzb.zzaC("AdRendererBackgroundTask started.");
int i = this.zzCF.errorCode;
try {
zzh(SystemClock.elapsedRealtime());
} catch (zza e) {
int errorCode = e.getErrorCode();
if (errorCode == 3 || errorCode == -1) {
zzb.zzaD(e.getMessage());
} else {
zzb.zzaE(e.getMessage());
}
if (this.zzCG == null) {
this.zzCG = new AdResponseParcel(errorCode);
} else {
this.zzCG = new AdResponseParcel(errorCode, this.zzCG.zzyA);
}
zzhu.zzHK.post(new Runnable() {
public void run() {
zzfz.this.onStop();
}
});
i = errorCode;
}
final zzhj zzz = zzz(i);
zzhu.zzHK.post(new Runnable() {
public void run() {
synchronized (zzfz.this.zzpc) {
zzfz.this.zzi(zzz);
}
}
});
}
}
public abstract void zzh(long j) throws zza;
/* access modifiers changed from: protected */
public void zzi(zzhj zzhj) {
this.zzCD.zzb(zzhj);
}
/* access modifiers changed from: protected */
public zzhj zzz(int i) {
AdRequestInfoParcel adRequestInfoParcel = this.zzCF.zzGL;
return new zzhj(adRequestInfoParcel.zzDy, this.zzoL, this.zzCG.zzyw, i, this.zzCG.zzyx, this.zzCG.zzDZ, this.zzCG.orientation, this.zzCG.zzyA, adRequestInfoParcel.zzDB, this.zzCG.zzDX, null, null, null, null, null, this.zzCG.zzDY, this.zzCF.zzqf, this.zzCG.zzDW, this.zzCF.zzGI, this.zzCG.zzEb, this.zzCG.zzEc, this.zzCF.zzGF, null, adRequestInfoParcel.zzDO);
}
}
|
[
"malwareanalyst1@gmail.com"
] |
malwareanalyst1@gmail.com
|
e186ed84113842955c2604b366daed5771dc5f46
|
8a66e50f25445bdc97a0f76fd8796a338196a6e8
|
/pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/common/NodeLocationStore.java
|
99f0a204f361490a2f545cd0cf21dfd05ad00963
|
[] |
no_license
|
iandees/osmosis
|
9fa461a996341fa9ed3a23549b0595c0762ebff0
|
92ae52c01d40a634a966d09763654a91a5078cb4
|
refs/heads/master
| 2020-04-05T23:19:50.766258
| 2012-10-14T17:08:56
| 2012-10-14T17:08:56
| 2,777,547
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 950
|
java
|
// This software is released into the Public Domain. See copying.txt for details.
package org.openstreetmap.osmosis.pgsnapshot.common;
import org.openstreetmap.osmosis.core.lifecycle.Releasable;
/**
* A node location store is used for caching node locations that are
* subsequently used to build way geometries.
*
* @author Brett Henderson
*/
public interface NodeLocationStore extends Releasable {
/**
* Adds the specified node location details.
*
* @param nodeId
* The node identifier.
* @param nodeLocation
* The geo-spatial location details.
*/
void addLocation(long nodeId, NodeLocation nodeLocation);
/**
* Gets the location details of the specified node.
*
* @param nodeId
* The node identifier.
* @return The geo-spatial location details. If the node doesn't exist, the
* valid flag will be set to false.
*/
NodeLocation getNodeLocation(long nodeId);
}
|
[
"brett@bretth.com"
] |
brett@bretth.com
|
ed302ee4087ee55aeade9fe49a84b5fa8984d4b2
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12798-131-22-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/wysiwyg/server/filter/ConversionFilter_ESTest.java
|
30a1aab3f7e71a27e0f3ff2492496ddd11de38dd
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 570
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Apr 07 05:42:54 UTC 2020
*/
package org.xwiki.wysiwyg.server.filter;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class ConversionFilter_ESTest extends ConversionFilter_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
ecf68b3f88901cdb8d49796d9c7022a7ab561218
|
5a0901ce189b7ff7540419ef8dcea8159456b620
|
/src/main/java/com/mahogano/core/magento/mapper/SalesruleLabelMapper.java
|
e4f71246bd82057672cbb11d10aace3e915d70bb
|
[
"MIT"
] |
permissive
|
mahogano/mahogano
|
a2500235deb4922305b6768e6a73ea74ff9e267e
|
e4e8db4659946cd997b5aa34660c19749312e2a0
|
refs/heads/master
| 2022-05-31T04:22:22.366646
| 2020-04-24T17:32:24
| 2020-04-24T17:32:24
| 255,907,135
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 700
|
java
|
package com.mahogano.core.magento.mapper;
import com.mahogano.core.magento.entity.SalesruleLabel;
import org.springframework.jdbc.core.RowMapper;
import java.sql.ResultSet;
import java.sql.SQLException;
public class SalesruleLabelMapper implements RowMapper<SalesruleLabel> {
@Override
public SalesruleLabel mapRow(ResultSet rs, int i) throws SQLException {
SalesruleLabel salesruleLabel = new SalesruleLabel();
salesruleLabel.setLabelId(rs.getInt("label_id"));
salesruleLabel.setRuleId(rs.getInt("rule_id"));
salesruleLabel.setStoreId(rs.getInt("store_id"));
salesruleLabel.setLabel(rs.getString("label"));
return salesruleLabel;
}
}
|
[
"rostyslav.rava@gmail.com"
] |
rostyslav.rava@gmail.com
|
4f5270bf27b3694677851bf0fa671659f0f82fb7
|
59655006fd29f06d68460f506b87d6f8b034634f
|
/src/main/java/com/asu/edu/utils/Utils.java
|
0ef336dc3a7018cc7ae86bf8f3aa0f9a38c18344
|
[] |
no_license
|
malishivu09/secure_bank
|
6e02eef9c875efc16613e82883e130282cdd50ec
|
e0fd691cddfe13cf662cfc39b64378db8164d3fc
|
refs/heads/master
| 2020-03-20T10:54:37.695963
| 2018-06-14T17:29:25
| 2018-06-14T17:29:25
| 137,388,209
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 219
|
java
|
package com.asu.edu.utils;
import java.util.Calendar;
public class Utils {
public static String getUniqueNumber(){
Calendar lCDateTime = Calendar.getInstance();
return lCDateTime.getTimeInMillis()+"";
}
}
|
[
"email@email.com"
] |
email@email.com
|
a853dc7a41e125f8726f9ca0f57dd0985af63bfb
|
862fb84cb5a395efb1a24e449ffb1470baf6117b
|
/src/petsitter/controller/pet/PetInsertServlet.java
|
cd0059bc6d6f094647abec971f3133deeee4958a
|
[] |
no_license
|
rarara1996/jagyun
|
5e0850583e9d22184c3ccc6a7deb56b35dc514d9
|
ad148c91956cf771ef7a1e2d0f5d0f5e5aa2946c
|
refs/heads/FockingGit
| 2022-12-22T01:03:00.300826
| 2019-12-19T06:38:17
| 2019-12-19T06:38:17
| 227,304,463
| 0
| 0
| null | 2022-12-10T12:43:20
| 2019-12-11T07:35:28
|
CSS
|
UTF-8
|
Java
| false
| false
| 1,291
|
java
|
package petsitter.controller.pet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import petsitter.model.service.PetInfoService;
import petsitter.model.vo.Pet;
/**
* Servlet implementation class PetInsertServlet
*/
@WebServlet("/PetInsertServlet")
public class PetInsertServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public PetInsertServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
Pet pet = null;
int result = new PetInfoService().insertPet(pet);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
|
[
"user2@user2-PC"
] |
user2@user2-PC
|
df22ce77bbd67e3ceb3871be96a1d85e5381bfa6
|
bacde5bb0effd64aa061a729d73e07642d876368
|
/vnp/FunMerryChristmasActivity/src/com/vnpgame/undersea/option/OptionScreen.java
|
83d45e6c0fd99f4678994a5495a5116dd9bef2c2
|
[] |
no_license
|
fordream/store-vnp
|
fe10d74acd1a780fb88f90e4854d15ce44ecb68c
|
6ca37dd4a69a63ea65d601aad695150e70f8d603
|
refs/heads/master
| 2020-12-02T15:05:14.994903
| 2015-10-23T13:52:51
| 2015-10-23T13:52:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,325
|
java
|
package com.vnpgame.undersea.option;
import com.google.ads.AdRequest;
import com.google.ads.AdSize;
import com.google.ads.AdView;
import com.vnpgame.undersea.R;
import com.vnpgame.undersea.music.Music;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.CompoundButton.OnCheckedChangeListener;
public class OptionScreen extends Activity implements OnClickListener,
OnCheckedChangeListener {
boolean isback = false;
CheckBox checkBox;
CheckBox checkBox2;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.option);
findViewById(R.id.button1).setOnClickListener(this);
checkBox = (CheckBox) findViewById(R.id.CheckBox01);
checkBox2 = (CheckBox) findViewById(R.id.CheckBox02);
checkBox2.setChecked(Music.runSoundBack);
checkBox.setChecked(Music.runSoundEffect);
checkBox.setOnCheckedChangeListener(this);
checkBox2.setOnCheckedChangeListener(this);
String adUnitId = "a14edad3d74598a";
AdView adView = new AdView(this, AdSize.BANNER, adUnitId);
AdRequest request = new AdRequest();
request.setTesting(true);
adView.loadAd(request);
((LinearLayout) findViewById(R.id.linearLayout2)).addView(adView);
}
protected void onPause() {
super.onPause();
if (!isback && Music.playerBackground != null) {
Music.playerBackground.pause();
}
}
protected void onRestart() {
super.onRestart();
if (Music.runSoundBack & Music.playerBackground != null) {
Music.playerBackground.start();
}
}
public void onClick(View arg0) {
if (arg0.getId() == R.id.button1) {
finish();
}
}
public void onCheckedChanged(CompoundButton arg0, boolean arg1) {
if (arg0.getId() == checkBox2.getId()) {
Music.runSoundBack = checkBox2.isChecked();
Music.setRunSoundBack(this, Music.runSoundBack);
if (Music.runSoundBack) {
if (Music.playerBackground != null)
Music.playerBackground.start();
} else {
if (Music.playerBackground != null)
Music.playerBackground.pause();
}
} else {
Music.runSoundEffect = checkBox.isChecked();
Music.setRunSoundEffect(this, Music.runSoundEffect);
}
}
}
|
[
"truongvv@atmarkcafe.org"
] |
truongvv@atmarkcafe.org
|
fd0e164938f8a1831b56aad310395a7d9f1ce673
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/JetBrains--intellij-community/bb61808a8cd6b2c4ace8abeea285222f24483d07/before/MavenToggleAction.java
|
d7d2ca84ba50b9371b1af8914c49f07ec76178e3
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 715
|
java
|
package org.jetbrains.idea.maven.utils.actions;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.ToggleAction;
import com.intellij.openapi.project.DumbAware;
public abstract class MavenToggleAction extends ToggleAction implements DumbAware {
@Override
public void update(AnActionEvent e) {
super.update(e);
e.getPresentation().setEnabled(isAvailable(e));
}
protected boolean isAvailable(AnActionEvent e) {
return MavenActionUtils.getProject(e) != null;
}
public final boolean isSelected(AnActionEvent e) {
if (!isAvailable(e)) return false;
return doIsSelected(e);
}
protected abstract boolean doIsSelected(AnActionEvent e);
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
90a8ce5414d847ab43c0004cc06299d5c84127c0
|
b12218b44655c734ef72edbfbd157a774c5754ad
|
/aplanmis-common/src/main/java/com/augurit/aplanmis/common/domain/AeaServiceWindow.java
|
10e98bbd726ba6efd3323bfb14e47528217a5800
|
[] |
no_license
|
laughing1990/aplan-fork
|
590a0ebf520e75d1430d5ed862979f6757a6a9e8
|
df27f74c7421982639169cb45a814c9723d9ead9
|
refs/heads/master
| 2021-05-21T16:27:32.373425
| 2019-12-19T09:26:31
| 2019-12-19T09:26:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,377
|
java
|
package com.augurit.aplanmis.common.domain;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
* 服务窗口实体对象
*
* @author jjt
* @date 2019/7/2
*
*/
@Data
public class AeaServiceWindow implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 服务窗口ID
*/
private String windowId;
/**
* 窗口名称
*/
private String windowName;
/**
* 行政区划代码
*/
private String regionId;
/**
* 组织机构代码
*/
private String orgId;
/**
* 联系电话
*/
private String linkPhone;
/**
* 办公时间
*/
private String workTime;
/**
* 窗口地址
*/
private String windowAddress;
/**
* 交通指引
*/
private String trafficGuide;
/**
* 备注说明
*/
private String windowMemo;
/**
* 地图链接
*/
private String mapUrl;
/**
* 地图附件
*/
private String mapAtt;
/**
* 创建人
*/
private String creater;
/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private java.util.Date createTime;
/**
* 修改人
*/
private String modifier;
/**
* 修改时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private java.util.Date modifyTime;
/**
* 排列顺序号
*/
private Long sortNo;
/**
* 是否启用,0表示禁用,1表示启用
*/
private String isActive;
/**
* 窗口类型,来自于数据字典,0表示综合窗口,1表示收费发证窗口
*/
private String windowType;
/**
* 是否公开公示,0表示不公开,1表示公开
*/
private String isPublic;
/**
* 是否所有单项通办,0表示不是,1表示是
*/
private String isAllItem;
/**
* 是否所有阶段通办,0表示不是,1表示是
*/
private String isAllStage;
/**
* 根组织ID
*
*/
private String rootOrgId;
/**
* 办理范围,0表示全市通办,1表示属地办理
*/
private String regionRange;
/**
* 并联使用事项过滤,0表示不过滤,1表示过滤
*/
private String stageItemFilter;
/**
* 扩展字段: 关键字查询
*/
private String keyword;
/**
* 扩展字段: 业务表名(大写)
*/
private String tableName;
/**
* 扩展字段: 业务表主键ID(大写)
*/
private String pkName;
/**
* 扩展字段: 关联记录id
*/
private String recordId;
/**
* 扩展字段: 地图附件数量
*/
private Long mapAttNum;
/**
* 扩展字段: 行政区域名称
*/
private String regionName;
/**
* 扩展字段: 行政区域编码
*/
private String regionCode;
/**
* 扩展字段: 部门名称
*/
private String orgName;
/**
* 扩展字段: 阶段名称
*/
private String stageName;
/**
* 扩展字段: 阶段主题
*/
private String themeName;
/**
* 窗口颜色,效能督查统计图表使用
*/
private String echartsColor;
}
|
[
"xiongyb@augurit.com"
] |
xiongyb@augurit.com
|
bd8e6cfacb27089d1327ec475a2f515c71cf7bdc
|
f5049214ff99cdd7c37da74619b60ac4a26fc6ba
|
/orchestrator/agent/system/eu.agno3.orchestrator.system.cfgfiles/src/main/java/eu/agno3/orchestrator/system/cfgfiles/AbstractResourceLibraryConfigFilesSynchronizationHandler.java
|
eb63ea9cbc679eb711995a62ea94feccf4680cec
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
AgNO3/code
|
d17313709ee5db1eac38e5811244cecfdfc23f93
|
b40a4559a10b3e84840994c3fd15d5f53b89168f
|
refs/heads/main
| 2023-07-28T17:27:53.045940
| 2021-09-17T14:25:01
| 2021-09-17T14:31:41
| 407,567,058
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,421
|
java
|
/**
* © 2015 AgNO3 Gmbh & Co. KG
* All right reserved.
*
* Created: 25.06.2015 by mbechler
*/
package eu.agno3.orchestrator.system.cfgfiles;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.security.NoSuchAlgorithmException;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.apache.commons.codec.binary.Hex;
import org.apache.log4j.Logger;
import eu.agno3.orchestrator.config.model.realm.StructuralObjectReference;
import eu.agno3.orchestrator.config.model.realm.resourcelibrary.ResourceLibraryEntry;
import eu.agno3.orchestrator.config.model.realm.resourcelibrary.ResourceLibraryException;
import eu.agno3.orchestrator.system.file.util.FileHashUtil;
import eu.agno3.orchestrator.system.file.util.FileTemporaryUtils;
/**
* @author mbechler
*
*/
public abstract class AbstractResourceLibraryConfigFilesSynchronizationHandler implements ResourceLibrarySynchronizationHandler {
private static final Logger log = Logger.getLogger(AbstractResourceLibraryConfigFilesSynchronizationHandler.class);
/**
*
* @return the config files manager
* @throws ResourceLibraryException
*/
protected abstract ConfigFileManager getManager ( StructuralObjectReference service ) throws ResourceLibraryException;
/**
*
* {@inheritDoc}
*
* @see eu.agno3.orchestrator.system.cfgfiles.ResourceLibrarySynchronizationHandler#list(eu.agno3.orchestrator.config.model.realm.StructuralObjectReference,
* java.lang.String)
*/
@Override
public List<ResourceLibraryEntry> list ( StructuralObjectReference serviceTarget, String hint ) throws ResourceLibraryException {
ConfigFileManager cfm = getManager(serviceTarget);
if ( log.isDebugEnabled() ) {
log.debug("Listing for " + serviceTarget); //$NON-NLS-1$
}
return list(cfm, hint);
}
/**
*
* @param cfm
* @param hint
* @return
* @throws ResourceLibraryException
*/
private static List<ResourceLibraryEntry> list ( ConfigFileManager cfm, String hint ) throws ResourceLibraryException {
List<String> files = cfm.getFiles();
List<ResourceLibraryEntry> entries = new LinkedList<>();
try {
for ( String path : files ) {
ResourceLibraryEntry e = new ResourceLibraryEntry();
e.setPath(path);
e.setHash(Hex.encodeHexString(FileHashUtil.sha256(cfm.getPath(path))));
if ( log.isTraceEnabled() ) {
log.trace(String.format("%s : %s", e.getPath(), e.getHash())); //$NON-NLS-1$
}
entries.add(e);
}
}
catch (
NoSuchAlgorithmException |
IOException e ) {
throw new ResourceLibraryException("Failed to list resource library", e); //$NON-NLS-1$
}
log.debug("Done listing"); //$NON-NLS-1$
return entries;
}
/**
*
* {@inheritDoc}
*
* @see eu.agno3.orchestrator.system.cfgfiles.ResourceLibrarySynchronizationHandler#synchronize(eu.agno3.orchestrator.config.model.realm.StructuralObjectReference,
* java.lang.String, java.util.Set, java.util.Set, java.util.Set)
*/
@Override
public List<ResourceLibraryEntry> synchronize ( StructuralObjectReference serviceTarget, String hint, Set<ResourceLibraryEntry> update,
Set<ResourceLibraryEntry> add, Set<ResourceLibraryEntry> delete ) throws ResourceLibraryException {
ConfigFileManager cfm = getManager(serviceTarget);
log.debug("Synchronizing"); //$NON-NLS-1$
try {
for ( ResourceLibraryEntry a : add ) {
writeContents(cfm, serviceTarget, a);
}
for ( ResourceLibraryEntry u : update ) {
writeContents(cfm, serviceTarget, u);
}
for ( ResourceLibraryEntry d : delete ) {
if ( log.isDebugEnabled() ) {
log.debug("Removing " + d.getPath()); //$NON-NLS-1$
}
cfm.remove(d.getPath());
}
if ( !add.isEmpty() || !update.isEmpty() || !delete.isEmpty() ) {
this.updated(serviceTarget, hint);
}
}
catch ( IOException e ) {
throw new ResourceLibraryException("Failed to synchronize", e); //$NON-NLS-1$
}
return list(cfm, hint);
}
/**
* @param hint
*
*/
protected void updated ( StructuralObjectReference service, String hint ) {
}
/**
* @param cfm
* @param a
* @throws IOException
*/
private static void writeContents ( ConfigFileManager cfm, StructuralObjectReference serviceTarget, ResourceLibraryEntry a ) throws IOException {
Path path = cfm.getPath(a.getPath());
if ( log.isDebugEnabled() ) {
log.debug("Writing " + path); //$NON-NLS-1$
}
Path tmpFile = FileTemporaryUtils.createRelatedTemporaryFile(path);
try {
Files.write(tmpFile, a.getContent(), StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);
cfm.createOrReplace(a.getPath(), tmpFile);
}
finally {
Files.deleteIfExists(tmpFile);
}
}
}
|
[
"bechler@agno3.eu"
] |
bechler@agno3.eu
|
c2d2d6a17842c157b48e25b31c679cc6aafb8244
|
53be82f4de76e68063528f843d508f92cd434bd8
|
/src/main/java/com/sen/hash/HashTableTest.java
|
0db46fa1d88efc4c7d7c4ca8c208639915cf4f60
|
[] |
no_license
|
sumforest/algorithm
|
cd8aa84fd58149d4f0148a74348508229224fbdf
|
611b87a12a07873f5c7ee05c229791a8233de3b8
|
refs/heads/master
| 2020-08-13T22:13:51.584267
| 2020-01-10T18:38:48
| 2020-01-10T18:38:48
| 215,046,384
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 718
|
java
|
package com.sen.hash;
/**
* @Auther: Sen
* @Date: 2019/10/21 22:11
* @Description:
*/
public class HashTableTest {
public static void main(String[] args) {
StudentInfo s1 = new StudentInfo(16, 3);
StudentInfo s2 = new StudentInfo(17, 5);
StudentInfo s3 = new StudentInfo(18, 20);
StudentInfo s4 = new StudentInfo(19, 19);
StudentInfo s5 = new StudentInfo(20, 4);
HashTable hashTable = new HashTable();
hashTable.put(s1);
hashTable.put(s2);
hashTable.put(s3);
hashTable.put(s4);
hashTable.put(s5);
System.out.println(hashTable);
System.out.println(hashTable.get(new StudentInfo(16)).getCount());
}
}
|
[
"12345678"
] |
12345678
|
f3012fb23744e6dbb1c250ec6eb7d39efa256ccf
|
836234be97139b93e1d459a4053c54bec728accf
|
/app/src/main/java/com/tdr/citycontrolpolice/qrcode/view/ViewfinderView.java
|
031ef47416b7fd52d05231f52b0971a67c07795a
|
[] |
no_license
|
KingJA/CityControlPolice
|
7f4c2b441ea41dc8e593c87083d70d327c1ee45f
|
a6b5d3eeed3b9d854a1c070a65545896570dffcb
|
refs/heads/master
| 2021-01-19T01:36:32.277448
| 2017-06-28T01:00:48
| 2017-06-28T01:00:48
| 55,286,838
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,744
|
java
|
package com.tdr.citycontrolpolice.qrcode.view;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import com.google.zxing.ResultPoint;
import com.tdr.citycontrolpolice.R;
import com.tdr.citycontrolpolice.qrcode.camera.CameraManager;
import java.util.Collection;
import java.util.HashSet;
/**
* This view is overlaid on top of the camera preview. It adds the viewfinder rectangle and partial
* transparency outside it, as well as the laser scanner animation and result points.
*
* @author dswitkin@google.com (Daniel Switkin)
*/
public final class ViewfinderView extends View {
private static final int[] SCANNER_ALPHA = {0, 64, 128, 192, 255, 192, 128, 64};
private static final long ANIMATION_DELAY = 100L;
private static final int OPAQUE = 0xFF;
private final Paint paint;
private Bitmap resultBitmap;
private final int maskColor;
private final int resultColor;
private final int frameColor;
private final int laserColor;
private final int resultPointColor;
private int scannerAlpha;
private Collection<ResultPoint> possibleResultPoints;
private Collection<ResultPoint> lastPossibleResultPoints;
// This constructor is used when the class is built from an XML resource.
public ViewfinderView(Context context, AttributeSet attrs) {
super(context, attrs);
// Initialize these once for performance rather than calling them every time in onDraw().
paint = new Paint();
Resources resources = getResources();
maskColor = resources.getColor(R.color.viewfinder_mask);
resultColor = resources.getColor(R.color.result_view);
frameColor = resources.getColor(R.color.viewfinder_frame);
laserColor = resources.getColor(R.color.viewfinder_laser);
resultPointColor = resources.getColor(R.color.possible_result_points);
scannerAlpha = 0;
possibleResultPoints = new HashSet<ResultPoint>(5);
}
@Override
public void onDraw(Canvas canvas) {
Rect frame = CameraManager.get().getFramingRect();
if (frame == null) {
return;
}
int width = canvas.getWidth();
int height = canvas.getHeight();
// Draw the exterior (i.e. outside the framing rect) darkened
paint.setColor(resultBitmap != null ? resultColor : maskColor);
canvas.drawRect(0, 0, width, frame.top, paint);
canvas.drawRect(0, frame.top, frame.left, frame.bottom + 1, paint);
canvas.drawRect(frame.right + 1, frame.top, width, frame.bottom + 1, paint);
canvas.drawRect(0, frame.bottom + 1, width, height, paint);
if (resultBitmap != null) {
// Draw the opaque result bitmap over the scanning rectangle
paint.setAlpha(OPAQUE);
canvas.drawBitmap(resultBitmap, frame.left, frame.top, paint);
} else {
// Draw a two pixel solid black border inside the framing rect
paint.setColor(frameColor);
canvas.drawRect(frame.left, frame.top, frame.right + 1, frame.top + 2, paint);
canvas.drawRect(frame.left, frame.top + 2, frame.left + 2, frame.bottom - 1, paint);
canvas.drawRect(frame.right - 1, frame.top, frame.right + 1, frame.bottom - 1, paint);
canvas.drawRect(frame.left, frame.bottom - 1, frame.right + 1, frame.bottom + 1, paint);
// Draw a red "laser scanner" line through the middle to show decoding is active
paint.setColor(laserColor);
paint.setAlpha(SCANNER_ALPHA[scannerAlpha]);
scannerAlpha = (scannerAlpha + 1) % SCANNER_ALPHA.length;
int middle = frame.height() / 2 + frame.top;
canvas.drawRect(frame.left + 2, middle - 1, frame.right - 1, middle + 2, paint);
Collection<ResultPoint> currentPossible = possibleResultPoints;
Collection<ResultPoint> currentLast = lastPossibleResultPoints;
if (currentPossible.isEmpty()) {
lastPossibleResultPoints = null;
} else {
possibleResultPoints = new HashSet<ResultPoint>(5);
lastPossibleResultPoints = currentPossible;
paint.setAlpha(OPAQUE);
paint.setColor(resultPointColor);
for (ResultPoint point : currentPossible) {
canvas.drawCircle(frame.left + point.getX(), frame.top + point.getY(), 6.0f, paint);
}
}
if (currentLast != null) {
paint.setAlpha(OPAQUE / 2);
paint.setColor(resultPointColor);
for (ResultPoint point : currentLast) {
canvas.drawCircle(frame.left + point.getX(), frame.top + point.getY(), 3.0f, paint);
}
}
// Request another update at the animation interval, but only repaint the laser line,
// not the entire viewfinder mask.
postInvalidateDelayed(ANIMATION_DELAY, frame.left, frame.top, frame.right, frame.bottom);
}
}
public void drawViewfinder() {
resultBitmap = null;
invalidate();
}
/**
* Draw a bitmap with the result points highlighted instead of the live scanning display.
*
* @param barcode An image of the decoded barcode.
*/
public void drawResultBitmap(Bitmap barcode) {
resultBitmap = barcode;
invalidate();
}
public void addPossibleResultPoint(ResultPoint point) {
possibleResultPoints.add(point);
}
}
|
[
"kingjavip@gmail.com"
] |
kingjavip@gmail.com
|
604e95b963ba3af4bb68ba33158750e26370b964
|
b396b8d3444b36b031e21c171cba6670d116bdea
|
/org.emftext.language.sql/src-gen/org/emftext/language/sql/datatype/LargeObjectLength.java
|
0aa8239ea938440fffe2b90b83fe3ae3d784c092
|
[] |
no_license
|
AresEkb/sql
|
8064aa06d788370f481f8e6d6ba9e44e5bd19fa8
|
730dd92b25954307ca0a4251216b98b12910c035
|
refs/heads/master
| 2021-01-13T00:53:42.921204
| 2015-12-10T12:59:18
| 2015-12-10T12:59:18
| 45,470,328
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,118
|
java
|
/**
*/
package org.emftext.language.sql.datatype;
import org.eclipse.emf.ecore.EObject;
import org.emftext.language.sql.UnsignedInteger;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Large Object Length</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link org.emftext.language.sql.datatype.LargeObjectLength#getValue <em>Value</em>}</li>
* <li>{@link org.emftext.language.sql.datatype.LargeObjectLength#getMultiplier <em>Multiplier</em>}</li>
* <li>{@link org.emftext.language.sql.datatype.LargeObjectLength#getUnits <em>Units</em>}</li>
* </ul>
*
* @see org.emftext.language.sql.datatype.DatatypePackage#getLargeObjectLength()
* @model
* @generated
*/
public interface LargeObjectLength extends EObject {
/**
* Returns the value of the '<em><b>Value</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Value</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Value</em>' attribute.
* @see #setValue(UnsignedInteger)
* @see org.emftext.language.sql.datatype.DatatypePackage#getLargeObjectLength_Value()
* @model dataType="org.emftext.language.sql.common.UnsignedInteger" required="true"
* @generated
*/
UnsignedInteger getValue();
/**
* Sets the value of the '{@link org.emftext.language.sql.datatype.LargeObjectLength#getValue <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Value</em>' attribute.
* @see #getValue()
* @generated
*/
void setValue(UnsignedInteger value);
/**
* Returns the value of the '<em><b>Multiplier</b></em>' attribute.
* The literals are from the enumeration {@link org.emftext.language.sql.datatype.Multiplier}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Multiplier</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Multiplier</em>' attribute.
* @see org.emftext.language.sql.datatype.Multiplier
* @see #setMultiplier(Multiplier)
* @see org.emftext.language.sql.datatype.DatatypePackage#getLargeObjectLength_Multiplier()
* @model
* @generated
*/
Multiplier getMultiplier();
/**
* Sets the value of the '{@link org.emftext.language.sql.datatype.LargeObjectLength#getMultiplier <em>Multiplier</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Multiplier</em>' attribute.
* @see org.emftext.language.sql.datatype.Multiplier
* @see #getMultiplier()
* @generated
*/
void setMultiplier(Multiplier value);
/**
* Returns the value of the '<em><b>Units</b></em>' attribute.
* The literals are from the enumeration {@link org.emftext.language.sql.datatype.CharLengthUnits}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Units</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Units</em>' attribute.
* @see org.emftext.language.sql.datatype.CharLengthUnits
* @see #setUnits(CharLengthUnits)
* @see org.emftext.language.sql.datatype.DatatypePackage#getLargeObjectLength_Units()
* @model
* @generated
*/
CharLengthUnits getUnits();
/**
* Sets the value of the '{@link org.emftext.language.sql.datatype.LargeObjectLength#getUnits <em>Units</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Units</em>' attribute.
* @see org.emftext.language.sql.datatype.CharLengthUnits
* @see #getUnits()
* @generated
*/
void setUnits(CharLengthUnits value);
} // LargeObjectLength
|
[
"denis.nikif@gmail.com"
] |
denis.nikif@gmail.com
|
730128e912b28afb428cdada192d200999cd9d9b
|
b2a635e7cc27d2df8b1c4197e5675655add98994
|
/com/facebook/imagepipeline/nativecode/b.java
|
d5b6f42378438c0e73d1603e43336376453c0f87
|
[] |
no_license
|
history-purge/LeaveHomeSafe-source-code
|
5f2d87f513d20c0fe49efc3198ef1643641a0313
|
0475816709d20295134c1b55d77528d74a1795cd
|
refs/heads/master
| 2023-06-23T21:38:37.633657
| 2021-07-28T13:27:30
| 2021-07-28T13:27:30
| 390,328,492
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 354
|
java
|
package com.facebook.imagepipeline.nativecode;
import com.facebook.soloader.SoLoader;
public class b {
public static void a() {
SoLoader.a("native-filters");
}
}
/* Location: /home/yc/Downloads/LeaveHomeSafe.jar!/com/facebook/imagepipeline/nativecode/b.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"game0427game@gmail.com"
] |
game0427game@gmail.com
|
ba34ff569210dac5c129ced2d0ababf9ba70fcf9
|
13289ed8ba535d3bdcf5d15156b32d86a54be1a8
|
/kubernetes-model/src/model/java/com/marcnuri/yakc/model/io/k8s/api/policy/v1beta1/PodDisruptionBudgetStatus.java
|
c7723e4f5a2c87db99da9a17868d09b2141d9c5b
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
ramkumarrn/yakc
|
e98fb1e733448e7cfc8e1d9274ac2463dd193f01
|
1b32eeb2228db16d77a04d1b0c8729ece021dc41
|
refs/heads/master
| 2023-03-08T09:48:19.000363
| 2021-02-17T12:51:58
| 2021-02-17T12:51:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,203
|
java
|
/*
* Copyright 2020 Marc Nuri
*
* 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.marcnuri.yakc.model.io.k8s.api.policy.v1beta1;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.marcnuri.yakc.model.Model;
import java.time.OffsetDateTime;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.Singular;
import lombok.ToString;
/**
* PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.
*/
@SuppressWarnings({"squid:S1192", "WeakerAccess", "unused"})
@Builder(toBuilder = true, builderClassName = "Builder")
@AllArgsConstructor
@NoArgsConstructor
@Data
@ToString
public class PodDisruptionBudgetStatus implements Model {
/**
* current number of healthy pods
*/
@NonNull
@JsonProperty("currentHealthy")
private Number currentHealthy;
/**
* minimum desired number of healthy pods
*/
@NonNull
@JsonProperty("desiredHealthy")
private Number desiredHealthy;
/**
* DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.
*/
@JsonProperty("disruptedPods")
@Singular(value = "putInDisruptedPods", ignoreNullCollections = true)
private Map<String, OffsetDateTime> disruptedPods;
/**
* Number of pod disruptions that are currently allowed.
*/
@NonNull
@JsonProperty("disruptionsAllowed")
private Number disruptionsAllowed;
/**
* total number of pods counted by this disruption budget
*/
@NonNull
@JsonProperty("expectedPods")
private Number expectedPods;
/**
* Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.
*/
@JsonProperty("observedGeneration")
private Number observedGeneration;
}
|
[
"marc@marcnuri.com"
] |
marc@marcnuri.com
|
4983453537b2d7745b2148ccf206f277ac18daaf
|
2215478141a355e9370e9db15ed7414c1df59ff1
|
/SchoolManager/Server/SchoolManagerApi/src/main/java/com/chris/school/model/xo/ScoreXo.java
|
d5793c868bf7bbec2dd41bcc5cfc35114badaf15
|
[] |
no_license
|
chrischendev/Projects
|
fa9cb487b6ac49f28a6b25c3ddcdd53e04fc5a99
|
2fe4d20fd0981ea8305e681dae8a06252d37ca72
|
refs/heads/master
| 2022-12-27T06:10:30.939853
| 2020-04-22T05:36:07
| 2020-04-22T05:36:07
| 189,320,542
| 0
| 0
| null | 2022-12-16T05:05:38
| 2019-05-30T00:55:36
|
Java
|
UTF-8
|
Java
| false
| false
| 807
|
java
|
package com.chris.school.model.xo;
import com.chris.framework.builder.annotation.ExpandField;
import lombok.Data;
import com.chris.school.model.orm.StudentEntity;
import com.chris.school.model.orm.ScoreEntity;
import com.chris.school.model.orm.SubjectEntity;
import lombok.AllArgsConstructor;
import com.chris.framework.builder.annotation.Expand;
import lombok.NoArgsConstructor;
/**
* App: ChrisApplication
* Pkg: com.chris.school.model.xo
* Author: Chris Chen
* Time: 2018/07/03
* Explain:
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
@Expand(baseEntity = ScoreEntity.class)
public class ScoreXo {
private Integer id;
@ExpandField(baseField="studentId")
private StudentXo student;
@ExpandField(baseField="subjectId")
private SubjectXo subject;
private Integer score;
}
|
[
"chrischen2018@163.com"
] |
chrischen2018@163.com
|
d4dfee9a124f40b1505b01c5a878b8df3c057ad4
|
40e3627ab89ac34d33ffcd6bcefaa93be66868dd
|
/src/test/java/com/univocity/parsers/issues/github/Github_299.java
|
e7d75e46535a266b7cbbe7ee18400cbc39e9e5fb
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
DD2480-group-13/univocity-parsers
|
b1c39fdea2c4c8acd524f7383dc16e551c553232
|
a238731d8679c45bf3072b6d4e0a3822414a6f2a
|
refs/heads/master
| 2021-01-03T09:15:00.282783
| 2020-02-18T15:59:55
| 2020-02-18T15:59:55
| 240,016,171
| 1
| 0
|
NOASSERTION
| 2020-02-18T14:48:00
| 2020-02-12T13:12:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,513
|
java
|
/*
* Copyright (c) 2013 uniVocity Software Pty Ltd. All rights reserved.
* This file is subject to the terms and conditions defined in file
* 'LICENSE.txt', which is part of this source code package.
*/
package com.univocity.parsers.issues.github;
import com.univocity.parsers.common.record.*;
import com.univocity.parsers.csv.*;
import org.testng.annotations.*;
import static org.testng.Assert.*;
/**
* From: https://github.com/univocity/univocity-parsers/issues/299
*
* @author Univocity Software Pty Ltd - <a href="mailto:dev@univocity.com">dev@univocity.com</a>
*/
public class Github_299 {
@Test
public void shouldDetectNewLine() {
CsvFormat format = new CsvFormat();
format.setLineSeparator("\r\n");
CsvParserSettings settings = new CsvParserSettings();
settings.setFormat(format);
settings.setNormalizeLineEndingsWithinQuotes(false);
CsvParser parser = new CsvParser(settings);
String[] values = parser.parseRecord("foo,\" bar \",qix\r\n").getValues();
assertEquals(values.length , 3);
assertEquals(values[0], "foo");
assertEquals(values[1], " bar ");
assertEquals(values[2], "qix");
values = parser.parseRecord("foo,\" bar \"\r\n").getValues();
assertEquals(values.length , 2);
assertEquals(values[0], "foo");
assertEquals(values[1], " bar ");
values = parser.parseRecord("foo,\" bar \",\r\n").getValues();
assertEquals(values.length , 3);
assertEquals(values[0], "foo");
assertEquals(values[1], " bar ");
assertEquals(values[2], null);
}
}
|
[
"jbax@univocity.com"
] |
jbax@univocity.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.