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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fdaef604e851851344145ca435ada9f58d5bb8cb
|
40cac9136da589ecc3cd179f5357bbea1f88cf41
|
/src/main/java/com/pcg/db/mongo/dao/impl/ScheduleLogDAOImpl.java
|
50f45e579d98be87424fdb59b1f54b63ce9a5da0
|
[] |
no_license
|
obinna240/CouncilDemo2
|
430ae4630f739aa4826c4494b88c01d315eade36
|
d25608092b4e1c55918ea969f09b853193a747ed
|
refs/heads/master
| 2020-03-07T23:29:39.590957
| 2018-04-02T16:34:26
| 2018-04-02T16:34:26
| 127,782,889
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 787
|
java
|
package com.pcg.db.mongo.dao.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.mongodb.core.MongoOperations;
import com.pcg.db.mongo.dao.ScheduleLogDAOCustom;
import com.pcg.db.mongo.model.ScheduleLog;
/**
* DAO for managing scheduled tasks in Assist
*/
public class ScheduleLogDAOImpl extends CustomDAOImpl<ScheduleLog, Long> implements ScheduleLogDAOCustom {
@Autowired @Qualifier("mongoTemplate") MongoOperations mongoOps;
private static Log m_log = LogFactory.getLog(ScheduleLogDAOImpl.class);
public ScheduleLogDAOImpl() {
super(ScheduleLog.class);
}
}
|
[
"obinna240@yahoo.co.uk"
] |
obinna240@yahoo.co.uk
|
9737625fcb4d13df4d9353dbedbaab3bf4238451
|
d12608842c2ad5efb31c03fc901a1a58e0690d9e
|
/src/main/java/cn/bxd/sip/his/webservice/hisws/invoke/QueryToPayRecipeInfoListResponse.java
|
5499324a2a945e7e53e9dde16eda1f9472d7f771
|
[] |
no_license
|
haomeiling/hlp
|
fc69cf8dcc92b72f495784b4de7973e2f9128b47
|
cc826e0acd91b5cd4acdb253ceb1465659df1e97
|
refs/heads/master
| 2020-06-27T13:15:27.673382
| 2019-10-08T07:22:16
| 2019-10-08T07:22:16
| 199,963,146
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,607
|
java
|
package cn.bxd.sip.his.webservice.hisws.invoke;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>anonymous complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="queryToPayRecipeInfoListResult" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"queryToPayRecipeInfoListResult"
})
@XmlRootElement(name = "queryToPayRecipeInfoListResponse")
public class QueryToPayRecipeInfoListResponse {
protected String queryToPayRecipeInfoListResult;
/**
* 获取queryToPayRecipeInfoListResult属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getQueryToPayRecipeInfoListResult() {
return queryToPayRecipeInfoListResult;
}
/**
* 设置queryToPayRecipeInfoListResult属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setQueryToPayRecipeInfoListResult(String value) {
this.queryToPayRecipeInfoListResult = value;
}
}
|
[
"48750800+haomeiling@users.noreply.github.com"
] |
48750800+haomeiling@users.noreply.github.com
|
bcf64d25a929fe6ce7cafa89c8a32addc9311c3f
|
8e5584f51543d2122fe2c565eb96f4f61aed1af6
|
/server/src/com/xiejun/server/ServletContext.java
|
fdbb0e44e9d5b322c90e6fa03ad6f493e24642d5
|
[] |
no_license
|
Wall-Xj/JavaStudy
|
8bf8c149b75582eca1e52fc06bffbbb06c3bd528
|
0fe70d8d869b9360b09e9ce27efecd7329d42f8c
|
refs/heads/master
| 2021-01-15T22:46:22.591778
| 2018-03-05T13:23:10
| 2018-03-05T13:23:10
| 99,911,643
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 793
|
java
|
package com.xiejun.server;
import java.util.HashMap;
import java.util.Map;
/**
* 上下文
* @author Administrator
*
*/
public class ServletContext {
//为每一个servlet取个别名
// login -->com.bjsxt.server.demo03.LoginServlet
private Map<String,String> servlet ;
//url -->login
// /log -->login
// /login -->login
private Map<String,String> mapping;
ServletContext(){
servlet =new HashMap<String,String>();
mapping =new HashMap<String,String>();
}
public Map<String, String> getServlet() {
return servlet;
}
public void setServlet(Map<String, String> servlet) {
this.servlet = servlet;
}
public Map<String, String> getMapping() {
return mapping;
}
public void setMapping(Map<String, String> mapping) {
this.mapping = mapping;
}
}
|
[
"592942092@qq.com"
] |
592942092@qq.com
|
b24b7b4da1110a89f8dd15d8cd5d52e258daf80b
|
bd281a8f67851c30287937f29f2ecaea8ebdb3db
|
/jbossas-remote-6/src/main/java/org/jboss/arquillian/container/jbossas/remote_6/ShrinkWrapUtil.java
|
bb65db97ca65ff7f41a15bc9357f5fc8c8ba6e95
|
[] |
no_license
|
DavideD/arquillian-container-jbossas
|
b36d6480a79a155222040d2a9f5b8e99aefaf1b6
|
dc49b188ef944c6c8aabe39b35d66cf4c23ef955
|
refs/heads/master
| 2021-01-16T21:45:48.989994
| 2011-06-26T18:04:08
| 2011-06-26T18:04:08
| 1,722,203
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,071
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
* as indicated by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.jboss.arquillian.container.jbossas.remote_6;
import java.io.File;
import java.io.FileOutputStream;
import java.net.URL;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.exporter.ZipExporter;
import org.jboss.shrinkwrap.descriptor.api.Descriptor;
/**
* ShrinkWrapUtil
*
* @author <a href="mailto:aslak@redhat.com">Aslak Knutsen</a>
* @version $Revision: $
*/
final class ShrinkWrapUtil
{
private ShrinkWrapUtil() { }
/**
* Creates a tmp folder and exports the file. Returns the URL for that file location.
*
* @param archive Archive to export
* @return
*/
public static URL toURL(final Archive<?> archive)
{
// create a random named temp file, then delete and use it as a directory
try
{
File root = File.createTempFile("arquillian", archive.getName());
root.delete();
root.mkdirs();
File deployment = new File(root, archive.getName());
deployment.deleteOnExit();
archive.as(ZipExporter.class).exportTo(deployment, true);
return deployment.toURI().toURL();
}
catch (Exception e)
{
throw new RuntimeException("Could not export deployment to temp", e);
}
}
public static URL toURL(final Descriptor descriptor)
{
// create a random named temp file, then delete and use it as a directory
try
{
File root = File.createTempFile("arquillian", descriptor.getDescriptorName());
root.delete();
root.mkdirs();
File deployment = new File(root, descriptor.getDescriptorName());
deployment.deleteOnExit();
FileOutputStream stream = new FileOutputStream(deployment);
try
{
descriptor.exportTo(stream);
}
finally
{
try
{
stream.close();
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
return deployment.toURI().toURL();
}
catch (Exception e)
{
throw new RuntimeException("Could not export deployment to temp", e);
}
}
}
|
[
"aslak@redhat.com"
] |
aslak@redhat.com
|
459b8109a8edd4314285ced07495b6efd7516531
|
12a99ab3fe76e5c7c05609c0e76d1855bd051bbb
|
/src/main/java/com/alipay/api/response/KoubeiRetailWmsOutboundworkDeleteResponse.java
|
ecc498022f886c7a8bacea44f918d2e5768c6a94
|
[
"Apache-2.0"
] |
permissive
|
WindLee05-17/alipay-sdk-java-all
|
ce2415cfab2416d2e0ae67c625b6a000231a8cfc
|
19ccb203268316b346ead9c36ff8aa5f1eac6c77
|
refs/heads/master
| 2022-11-30T18:42:42.077288
| 2020-08-17T05:57:47
| 2020-08-17T05:57:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 385
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.retail.wms.outboundwork.delete response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiRetailWmsOutboundworkDeleteResponse extends AlipayResponse {
private static final long serialVersionUID = 5363885593635874391L;
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
09331cf4d13249a9987da48919d2cab77731ff1b
|
1aef4669e891333de303db570c7a690c122eb7dd
|
/src/main/java/com/alipay/api/domain/AlipayOpenAgentCancelModel.java
|
29c6cc1e4e3974d2007e3d66f11d4d419a8da59f
|
[
"Apache-2.0"
] |
permissive
|
fossabot/alipay-sdk-java-all
|
b5d9698b846fa23665929d23a8c98baf9eb3a3c2
|
3972bc64e041eeef98e95d6fcd62cd7e6bf56964
|
refs/heads/master
| 2020-09-20T22:08:01.292795
| 2019-11-28T08:12:26
| 2019-11-28T08:12:26
| 224,602,331
| 0
| 0
|
Apache-2.0
| 2019-11-28T08:12:26
| 2019-11-28T08:12:25
| null |
UTF-8
|
Java
| false
| false
| 686
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 取消代商户签约、创建应用事务
*
* @author auto create
* @since 1.0, 2019-11-18 14:27:27
*/
public class AlipayOpenAgentCancelModel extends AlipayObject {
private static final long serialVersionUID = 1527269919892374618L;
/**
* ISV 代商户操作事务编号,通过事务开启接口alipay.open.agent.create调用返回。
*/
@ApiField("batch_no")
private String batchNo;
public String getBatchNo() {
return this.batchNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
b0c9fa9866d8033811f1ffdc6657bca7c54685fb
|
02570607edea101396ff231025498056ece3df31
|
/TVLibrary/src/main/java/com/swl/tvlibrary/recyclerView/LinearLayoutManagerTV.java
|
64e1b4200b9c05bcdc94df3891c9733547339046
|
[] |
no_license
|
SKToukir/FileBrowser-TV
|
978048f6d172224522d57b06a2282b2f9fd922ea
|
25b6d2f19bd76d7933f143744d1b01a40958f2ef
|
refs/heads/master
| 2023-03-05T15:12:25.861913
| 2021-02-18T04:41:21
| 2021-02-18T04:41:21
| 334,580,130
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,021
|
java
|
package com.swl.tvlibrary.recyclerView;
import android.content.Context;
import android.graphics.PointF;
import android.util.AttributeSet;
import android.view.View;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.LinearSmoothScroller;
import androidx.recyclerview.widget.RecyclerView;
/**
* 自定义的GridLayoutManager
* 配合RecyclerTV一起使用,
* 解决Recycler使用在TV上的各种焦点问题,无法快速滚动问题,滚动焦点错乱问题
*
* @author zhangTianSheng 956122936@qq.com
*/
public class LinearLayoutManagerTV extends LinearLayoutManager {
public LinearLayoutManagerTV(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
public LinearLayoutManagerTV(Context context, int orientation, boolean reverseLayout) {
super(context, orientation, reverseLayout);
}
public LinearLayoutManagerTV(Context context) {
super(context);
}
@Override
public void scrollToPosition(int position) {
super.scrollToPosition(position);
}
/**
* 解决快速长按焦点丢失问题.
*
* @param focused
* @param focusDirection
* @param recycler
* @param state
* @return
*/
@Override
public View onFocusSearchFailed(View focused, int focusDirection, RecyclerView.Recycler recycler, RecyclerView.State state) {
View nextFocus = super.onFocusSearchFailed(focused, focusDirection, recycler, state);
return null;
}
/**
* RecyclerView的smoothScrollToPosition方法最终会执行smoothScrollToPosition
*
* @param recyclerView
* @param state
* @param position
*/
@Override
public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) {
TvLinearSmoothScroller linearSmoothScroller = new TvLinearSmoothScroller(recyclerView.getContext());
linearSmoothScroller.setTargetPosition(position);
startSmoothScroll(linearSmoothScroller);
}
public PointF computeVectorForPosition(int targetPosition) {
return super.computeScrollVectorForPosition(targetPosition);
}
/**
* Base class which scrolls to selected view in onStop().
*/
class TvLinearSmoothScroller extends LinearSmoothScroller {
public TvLinearSmoothScroller(Context context) {
super(context);
}
@Override
public PointF computeScrollVectorForPosition(int targetPosition) {
return computeVectorForPosition(targetPosition);
}
/**
* 滑动完成后,让该targetPosition 处的item获取焦点
*/
@Override
protected void onStop() {
super.onStop();
View targetView = findViewByPosition(getTargetPosition());
if (targetView != null) {
targetView.requestFocus();
}
}
}
}
|
[
"toukirsk@gmail.com"
] |
toukirsk@gmail.com
|
77811edbe265e72102a603b5ca103bab13017de0
|
adb8b1da4d427a62827dc6b24bf6b1e3274a7f6b
|
/src/main/java/com/github/xuejike/springboot/jkfaststart/common/QueryDslTool.java
|
ceea034db72e00be3bc96be78261de674bd49120
|
[] |
no_license
|
xuejike/jk-faststart
|
a59d98ae8a307eb44c14af567033a3546d797ae1
|
16215490dcaa066727fa05568313561ea96485e9
|
refs/heads/master
| 2021-05-05T15:49:05.803706
| 2018-05-30T06:14:42
| 2018-05-30T06:14:42
| 117,321,869
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 471
|
java
|
package com.github.xuejike.springboot.jkfaststart.common;
import com.querydsl.jpa.impl.JPAQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.persistence.EntityManager;
@Component
public class QueryDslTool {
@Autowired
EntityManager entityManager;
public JPAQuery getQuery(){
JPAQuery<Object> jpaQuery = new JPAQuery<>(entityManager);
return jpaQuery;
}
}
|
[
"xuejike2004@126.com"
] |
xuejike2004@126.com
|
1126465776a76fa3c53f7354cd3cf0e4a1739dc0
|
296ca0c34cd6b0dcd9eddd40fe277ca825388058
|
/src/flowchart/arrow/RR/ShapeArrow_RR_IF.java
|
bf818e0d452083a88a9f39bd08eb887bc803e39d
|
[] |
no_license
|
iptomar/algorithmi-code
|
a53f64369d8d40f2381e68ac1bd598604ff580c5
|
544ed5b000fdbc36ac2e98f17d36a792eebf7965
|
refs/heads/master
| 2021-01-21T21:38:57.213393
| 2016-07-19T03:30:50
| 2016-07-19T03:30:50
| 53,688,238
| 0
| 10
| null | 2016-07-19T03:30:51
| 2016-03-11T18:30:38
|
Java
|
UTF-8
|
Java
| false
| false
| 5,342
|
java
|
/*
* Copyright (c) 2015 Instituto Politecnico de Tomar. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//:: ::
//:: Antonio Manuel Rodrigues Manso ::
//:: ::
//:: I N S T I T U T O P O L I T E C N I C O D E T O M A R ::
//:: Escola Superior de Tecnologia de Tomar ::
//:: e-mail: manso@ipt.pt ::
//:: url : http://orion.ipt.pt/~manso ::
//:: ::
//:: This software was build with the purpose of investigate and ::
//:: learning. ::
//:: ::
//:: (c)2015 ::
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//////////////////////////////////////////////////////////////////////////////
package flowchart.arrow.RR;
import i18n.FkeyWord;
import flowchart.decide.IfElse.IfThenElse;
import flowchart.shape.BorderFlowChart;
import flowchart.utils.UtilsFlowchart;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Polygon;
/**
*
* @author ZULU
*/
public class ShapeArrow_RR_IF extends BorderFlowChart {
/**
* Creates a line border with the specified color, thickness, and corner
* shape.
*
* @param color the color of the border
*/
public ShapeArrow_RR_IF(Color color) {
super(color);
}
/**
* Paints the border for the specified component with the specified position
* and size.
*
* @param c the component for which this border is being painted
* @param g the paint graphics
* @param x the x position of the painted border
* @param y the y position of the painted border
* @param width the width of the painted border
* @param height the height of the painted border
*/
public void paint(Graphics g, int x, int y, int width, int height, Color fillColor) {
int S = getBorderSize() / 2 + 1;
int W = getBorderSize() * 3;
int y2 = y + height;
int x2 = x + width;
Polygon p = new Polygon();
p.addPoint(x2 - W + S, y + S);//inicio da seta
p.addPoint(x2 - W, y + S / 2);//inicio da seta
p.addPoint(x2 - W + S, y);//inicio da seta
p.addPoint(x2, y);//2
p.addPoint(x2, y2 - S);//3
//SETA
p.addPoint(x + 2 * S, y2 - S);//SETA
p.addPoint(x + 3 * S, y2);//SETA
p.addPoint(x, y2 - (int) (1.5 * S));//SETA
p.addPoint(x + 3 * S, y2 - 3 * S);//SETA
p.addPoint(x + 2 * S, y2 - 2 * S);//SETA
p.addPoint(x2 - S, y2 - 2 * S);//5
p.addPoint(x2 - S, y + S);//2
p.addPoint(p.xpoints[0], p.ypoints[0]); //fechar
g.setColor(fillColor);
g.fillPolygon(p);
if (S > 1) {
g.setColor(Color.BLACK);
g.drawPolygon(p);
}
if (shape.parent instanceof IfThenElse) {
String txt = FkeyWord.get("KEYWORD.then");
Dimension dimText = UtilsFlowchart.getTextDimension(txt, getLabelFont());
drawLabel(g, txt, x2-3*S-dimText.width, y2 - dimText.height+5);
}
}
/**
* Reinitialize the insets parameter with this Border's current Insets.
*
* @param c the component for which this border insets value applies
* @param insets the object to be reinitialized
*/
public Insets getBorderInsets(Component c, Insets insets) {
insets.set(getThickness(), getThickness(), getThickness(), getThickness());
return insets;
}
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
private static final long serialVersionUID = 201509071215L;
//::::::::::::::::::::::::::: Copyright(c) M@nso 2015 :::::::::::::::::::
///////////////////////////////////////////////////////////////////////////
}
|
[
"manso@ipt.pt"
] |
manso@ipt.pt
|
4a42c7b0c7383b2186fc83f4aa4b03cf37ac9f6d
|
b118a9cb23ae903bc5c7646b262012fb79cca2f2
|
/src/com/estrongs/android/ui/preference/fragments/d.java
|
603245d12ac8b165f22a3c76815e2287a91af938
|
[] |
no_license
|
secpersu/com.estrongs.android.pop
|
22186c2ea9616b1a7169c18f34687479ddfbb6f7
|
53f99eb4c5b099d7ed22d70486ebe179e58f47e0
|
refs/heads/master
| 2020-07-10T09:16:59.232715
| 2015-07-05T03:24:29
| 2015-07-05T03:24:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,807
|
java
|
package com.estrongs.android.ui.preference.fragments;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.estrongs.android.pop.ad;
import com.estrongs.android.ui.dialog.cg;
import com.estrongs.android.ui.dialog.ct;
import com.estrongs.android.util.am;
class d
implements Preference.OnPreferenceClickListener
{
d(BackupPreferenceFragment paramBackupPreferenceFragment) {}
public boolean onPreferenceClick(Preference paramPreference)
{
paramPreference = com.estrongs.android.pop.esclasses.g.a(a.getActivity()).inflate(2130903061, null);
Object localObject1 = (Button)paramPreference.findViewById(2131361960);
EditText localEditText = (EditText)paramPreference.findViewById(2131361959);
Object localObject2 = (EditText)paramPreference.findViewById(2131361963);
((TextView)paramPreference.findViewById(2131361958)).setText(2131428146);
((TextView)paramPreference.findViewById(2131361962)).setText(2131428147);
String str = am.bk(ad.a(a.getActivity()).au());
if (str != null) {
localEditText.setText(str);
}
localObject2 = new ct(a.getActivity()).a(2131427379).b(2131427339, new f(this, localEditText, (EditText)localObject2)).c(2131427340, new e(this));
((Button)localObject1).setOnClickListener(new g(this, str, localEditText));
localObject1 = ((ct)localObject2).b();
((cg)localObject1).setContentView(paramPreference);
((cg)localObject1).show();
return true;
}
}
/* Location:
* Qualified Name: com.estrongs.android.ui.preference.fragments.d
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
d7d9d9d24f92f3567ef110aab7eae9ac8ea46fa7
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/mybatis--mybatis-3/c012ffbd04aff191290cc4850ccfc35499ae876e/before/BatchExecutor.java
|
4d641afaf1fe711ccaa8c86e5877377d38e1a61d
|
[] |
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
| 5,542
|
java
|
/*
* Copyright 2009-2012 The MyBatis Team
*
* 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.apache.ibatis.executor;
import java.sql.BatchUpdateException;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator;
import org.apache.ibatis.executor.keygen.KeyGenerator;
import org.apache.ibatis.executor.statement.StatementHandler;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.transaction.Transaction;
public class BatchExecutor extends BaseExecutor {
public static final int BATCH_UPDATE_RETURN_VALUE = Integer.MIN_VALUE + 1002;
private final List<Statement> statementList = new ArrayList<Statement>();
private final List<BatchResult> batchResultList = new ArrayList<BatchResult>();
private String currentSql;
private MappedStatement currentStatement;
public BatchExecutor(Configuration configuration, Transaction transaction) {
super(configuration, transaction);
}
public int doUpdate(MappedStatement ms, Object parameterObject) throws SQLException {
Configuration configuration = ms.getConfiguration();
StatementHandler handler = configuration.newStatementHandler(this, ms, parameterObject, RowBounds.DEFAULT, null, null);
BoundSql boundSql = handler.getBoundSql();
String sql = boundSql.getSql();
Statement stmt;
if (sql.equals(currentSql) && ms.equals(currentStatement)) {
int last = statementList.size() - 1;
stmt = statementList.get(last);
BatchResult batchResult = batchResultList.get(last);
batchResult.addParameterObject(parameterObject);
} else {
Connection connection = getConnection();
stmt = handler.prepare(connection);
currentSql = sql;
currentStatement = ms;
statementList.add(stmt);
BatchResult batchResult = new BatchResult(ms, sql);
batchResult.addParameterObject(parameterObject);
batchResultList.add(batchResult);
}
handler.parameterize(stmt);
handler.batch(stmt);
return BATCH_UPDATE_RETURN_VALUE;
}
public <E> List<E> doQuery(MappedStatement ms, Object parameterObject, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql)
throws SQLException {
Statement stmt = null;
try {
flushStatements();
Configuration configuration = ms.getConfiguration();
StatementHandler handler = configuration.newStatementHandler(this, ms, parameterObject, rowBounds, resultHandler, boundSql);
Connection connection = getConnection();
stmt = handler.prepare(connection);
handler.parameterize(stmt);
return handler.<E>query(stmt, resultHandler);
} finally {
closeStatement(stmt);
}
}
public List<BatchResult> doFlushStatements(boolean isRollback) throws SQLException {
try {
List<BatchResult> results = new ArrayList<BatchResult>();
if (isRollback) {
return Collections.emptyList();
} else {
for (int i = 0, n = statementList.size(); i < n; i++) {
Statement stmt = statementList.get(i);
BatchResult batchResult = batchResultList.get(i);
try {
batchResult.setUpdateCounts(stmt.executeBatch());
MappedStatement ms = batchResult.getMappedStatement();
List<Object> parameterObjects = batchResult.getParameterObjects();
KeyGenerator keyGenerator = ms.getKeyGenerator();
if (keyGenerator instanceof Jdbc3KeyGenerator) {
Jdbc3KeyGenerator jdbc3KeyGenerator = (Jdbc3KeyGenerator) keyGenerator;
jdbc3KeyGenerator.processBatch(ms, stmt, parameterObjects);
} else {
for (Object parameter : parameterObjects) {
keyGenerator.processAfter(this, ms, stmt, parameter);
}
}
} catch (BatchUpdateException e) {
StringBuffer message = new StringBuffer();
message.append(batchResult.getMappedStatement().getId())
.append(" (batch index #")
.append(i + 1)
.append(")")
.append(" failed.");
if (i > 0) {
message.append(" ")
.append(i)
.append(" prior sub executor(s) completed successfully, but will be rolled back.");
}
throw new BatchExecutorException(message.toString(), e, results, batchResult);
}
results.add(batchResult);
}
return results;
}
} finally {
for (Statement stmt : statementList) {
closeStatement(stmt);
}
currentSql = null;
statementList.clear();
batchResultList.clear();
}
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
3aae41a86be6f4eeb208dc3bbec1a150d57eb616
|
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
|
/modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201702/ExchangeRateDirection.java
|
bb59762f69cb1507b9573b3d475940a4a1369ae1
|
[
"Apache-2.0"
] |
permissive
|
mo4ss/googleads-java-lib
|
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
|
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
|
refs/heads/master
| 2022-12-05T00:30:56.740813
| 2022-11-16T10:47:15
| 2022-11-16T10:47:15
| 108,132,394
| 0
| 0
|
Apache-2.0
| 2022-11-16T10:47:16
| 2017-10-24T13:41:43
|
Java
|
UTF-8
|
Java
| false
| false
| 3,613
|
java
|
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* ExchangeRateDirection.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.dfp.axis.v201702;
public class ExchangeRateDirection implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected ExchangeRateDirection(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _TO_NETWORK = "TO_NETWORK";
public static final java.lang.String _FROM_NETWORK = "FROM_NETWORK";
public static final java.lang.String _UNKNOWN = "UNKNOWN";
public static final ExchangeRateDirection TO_NETWORK = new ExchangeRateDirection(_TO_NETWORK);
public static final ExchangeRateDirection FROM_NETWORK = new ExchangeRateDirection(_FROM_NETWORK);
public static final ExchangeRateDirection UNKNOWN = new ExchangeRateDirection(_UNKNOWN);
public java.lang.String getValue() { return _value_;}
public static ExchangeRateDirection fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
ExchangeRateDirection enumeration = (ExchangeRateDirection)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static ExchangeRateDirection fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumSerializer(
_javaType, _xmlType);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(ExchangeRateDirection.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201702", "ExchangeRateDirection"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
|
[
"api.cseeley@gmail.com"
] |
api.cseeley@gmail.com
|
a5e460f1d498d14250f2e472e6b5e6f80f384293
|
a59ac307b503ff470e9be5b1e2927844eff83dbe
|
/wheatfield/branches/rkylin-wheatfield-HKYH/wheatfield/src/test/java/test/wheatfield/CreditRepaymentMonthManagerTest.java
|
4e8a00cec62722f1e700a264b56047761599ad6a
|
[] |
no_license
|
yangjava/kylin-wheatfield
|
2cc82ee9e960543264b1cfc252f770ba62669e05
|
4127cfca57a332d91f8b2ae1fe1be682b9d0f5fc
|
refs/heads/master
| 2020-12-02T22:07:06.226674
| 2017-07-03T07:59:15
| 2017-07-03T07:59:15
| 96,085,446
| 0
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,609
|
java
|
/*
* Powered By rkylin-code-generator
* Web Site: http://www.chanjetpay.com
* Since 2014 - 2015
*/
package test.wheatfield;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import com.rkylin.wheatfield.manager.CreditRepaymentMonthManager;
import com.rkylin.wheatfield.pojo.CreditRepaymentMonth;
import com.rkylin.wheatfield.pojo.CreditRepaymentMonthQuery;
public class CreditRepaymentMonthManagerTest extends BaseJUnit4Test {
@Autowired
@Qualifier("creditRepaymentMonthManager")
private CreditRepaymentMonthManager creditRepaymentMonthManager;
public void testNewCreditRepaymentMonth() {
CreditRepaymentMonth CreditRepaymentMonth = new CreditRepaymentMonth();
creditRepaymentMonthManager.saveCreditRepaymentMonth(CreditRepaymentMonth);
}
public void testUpdateCreditRepaymentMonth(){
CreditRepaymentMonth CreditRepaymentMonth = new CreditRepaymentMonth();
// CreditRepaymentMonth.setId(2l);
creditRepaymentMonthManager.saveCreditRepaymentMonth(CreditRepaymentMonth);
}
public void testDeleteCreditRepaymentMonth(){
creditRepaymentMonthManager.deleteCreditRepaymentMonthById(99L);
}
public void testDeleteCreditRepaymentMonthByQuery(){
CreditRepaymentMonthQuery query = new CreditRepaymentMonthQuery();
creditRepaymentMonthManager.deleteCreditRepaymentMonth(query);
}
public void testFindCreditRepaymentMonthById(){
CreditRepaymentMonthQuery query = new CreditRepaymentMonthQuery();
int size = creditRepaymentMonthManager.queryList(query).size();
System.out.println(size);
}
}
|
[
"yangjava@users.noreply.github.com"
] |
yangjava@users.noreply.github.com
|
2b74c8be70326d4aa22767af7378a3c0f2359ab4
|
5e520a6b641baa05463d89911e9eb0e66c91672d
|
/src/main/java/com/pde/jhipster/repository/AuthorityRepository.java
|
629ef250db6649155c07da03971c64a35815c1a9
|
[] |
no_license
|
pde201/jhipster-sample-application
|
66125b356fa6764105e653bc70fbe481ba935e89
|
6f653b823818223b7318611d0f4c1b871fa19b38
|
refs/heads/main
| 2023-03-23T02:18:28.843549
| 2021-03-21T09:02:52
| 2021-03-21T09:02:52
| 349,946,715
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 296
|
java
|
package com.pde.jhipster.repository;
import com.pde.jhipster.domain.Authority;
import org.springframework.data.jpa.repository.JpaRepository;
/**
* Spring Data JPA repository for the {@link Authority} entity.
*/
public interface AuthorityRepository extends JpaRepository<Authority, String> {}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
af8801275796e13bd46ceef76d58f63023cbbab1
|
9383ef29ea17c95664e39e0ef9351d6b4989328d
|
/src/main/java/slimeknights/toolleveling/Tooltips.java
|
8c93fc139bae4e2f61030e64350538301773940c
|
[
"MIT"
] |
permissive
|
miuirussia/TinkersToolLeveling
|
8e60b2819407dd96a8d1a51f6ef305a164bb202a
|
45854fbead649b5273c0f4e5920c80b2e62dd401
|
refs/heads/master
| 2020-05-30T15:09:01.345512
| 2016-09-29T12:43:35
| 2016-09-29T12:43:35
| 69,581,594
| 0
| 0
| null | 2016-09-29T15:34:20
| 2016-09-29T15:34:20
| null |
UTF-8
|
Java
| false
| false
| 3,303
|
java
|
package slimeknights.toolleveling;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.translation.I18n;
import java.awt.*;
import java.util.List;
import slimeknights.tconstruct.library.client.CustomFontColor;
import slimeknights.tconstruct.library.utils.TinkerUtil;
// utility class for constructing tooltip
public final class Tooltips {
private Tooltips() {
} // non-instantiable
public static void addTooltips(ItemStack itemStack, List<String> tooltips) {
NBTTagCompound tag = TinkerUtil.getModifierTag(itemStack, TinkerToolLeveling.modToolLeveling.getModifierIdentifier());
if(!tag.hasNoTags()) {
ToolLevelNBT data = new ToolLevelNBT(tag);
tooltips.add(1, getXpToolTip(data.xp, TinkerToolLeveling.modToolLeveling.getXpForLevelup(data.level, itemStack)));
tooltips.add(1, getLevelTooltip(data.level));
}
}
private static String getXpToolTip(int xp, int xpNeeded) {
return String.format("%s: %s", I18n.translateToLocal("tooltip.xp"), getXpString(xp, xpNeeded));
}
private static String getXpString(int xp, int xpNeeded) {
return TextFormatting.WHITE + String.format("%d / %d", xp, xpNeeded);
//float xpPercentage = (float)xp / (float)xpNeeded * 100f;
//return String.format("%.2f", xpPercentage) + "%"
}
private static String getLevelTooltip(int level) {
return String.format("%s: %s", I18n.translateToLocal("tooltip.level"), getLevelString(level));
}
public static String getLevelString(int level) {
return getLevelColor(level) + getRawLevelString(level) + TextFormatting.RESET;
}
private static String getRawLevelString(int level) {
if(level <= 0) {
return "";
}
// try a basic translated string
if(I18n.canTranslate("tooltip.level." + level)) {
return I18n.translateToLocal("tooltip.level." + level);
}
// ok. try to find a modulo
int i = 1;
while(I18n.canTranslate("tooltip.level." + i)) {
i++;
}
// get the modulo'd string
String str = I18n.translateToLocal("tooltip.level." + (level % i));
// and add +s!
for(int j = level / i; j > 0; j--) {
str += '+';
}
return str;
}
private static String getLevelColor(int level) {
float hue = (0.277777f * level);
hue = hue - (int) hue;
return CustomFontColor.encodeColor(Color.HSBtoRGB(hue, 0.75f, 0.8f));
/* Old colors
switch (level%12)
{
case 0: return TextFormatting.GRAY.toString();
case 1: return TextFormatting.DARK_RED.toString();
case 2: return TextFormatting.GOLD.toString();
case 3: return TextFormatting.YELLOW.toString();
case 4: return TextFormatting.DARK_GREEN.toString();
case 5: return TextFormatting.DARK_AQUA.toString();
case 6: return TextFormatting.LIGHT_PURPLE.toString();
case 7: return TextFormatting.WHITE.toString();
case 8: return TextFormatting.RED.toString();
case 9: return TextFormatting.DARK_PURPLE.toString();
case 10:return TextFormatting.AQUA.toString();
case 11:return TextFormatting.GREEN.toString();
default: return "";
}*/
}
}
|
[
"bernhard.bonigl@gmail.com"
] |
bernhard.bonigl@gmail.com
|
0ab0818fc4d7f8fc2dcf593d5339a5fe98973ab2
|
5765c87fd41493dff2fde2a68f9dccc04c1ad2bd
|
/Variant Programs/2-4/16/dealer/Retailer.java
|
165ab47c4182c0d4bedcbc80ee18741b0be71e2f
|
[
"MIT"
] |
permissive
|
hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism
|
42e4c2061c3f8da0dfce760e168bb9715063645f
|
a42ced1d5a92963207e3565860cac0946312e1b3
|
refs/heads/master
| 2020-08-09T08:10:08.888384
| 2019-11-25T01:14:23
| 2019-11-25T01:14:23
| 214,041,532
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,649
|
java
|
package dealer;
import multitasking.DcSpreadsheet;
import multitasking.GrrProgrammer;
import multitasking.Treat;
import multitasking.GpaInterface;
import multitasking.ObtainingConfiguration;
import multitasking.Configuration;
import multitasking.SchedulingPlanner;
import moot.OperationSimulated;
import java.io.IOException;
import java.util.*;
public class Retailer {
public static int AssignThing;
public java.util.LinkedList<Treat> mechanisms;
public java.util.ArrayDeque<Configuration> performance;
public static final String maximize = "N1pJ";
public Retailer() {
multitasking.Configuration using;
multitasking.Configuration sta;
multitasking.Configuration days;
multitasking.Configuration grr;
multitasking.Configuration lm;
this.performance = new java.util.ArrayDeque<>();
using = new multitasking.SchedulingPlanner();
sta = new multitasking.GpaInterface();
days = new multitasking.ObtainingConfiguration();
grr = new multitasking.GrrProgrammer();
lm = new multitasking.DcSpreadsheet();
this.performance.addLast(using);
this.performance.addLast(sta);
this.performance.addLast(days);
this.performance.addLast(lm);
this.performance.addLast(grr);
}
public synchronized void orderedMechanisms(java.util.LinkedList<Treat> summons) {
int nominate;
nominate = -147242579;
this.mechanisms = summons;
}
public synchronized void doForwardingAgain(int dischargeDays) {
double flag;
flag = 0.6887431070371106;
this.AssignThing = dischargeDays;
}
public synchronized void scarperCaller() {
double narrowerMax;
narrowerMax = 0.5705936068200637;
for (multitasking.Configuration fh : performance) {
fh.resumeServer();
while (fh.goIsMoving()) {
if (fh.findCompletionActSmall() == mechanisms.size()) {
fh.ceaseOrganizer();
} else {
java.util.LinkedList<Treat> lineMechanism;
lineMechanism = new java.util.LinkedList<>();
for (multitasking.Treat postscript : mechanisms) {
if (postscript.obtainSendDays() == fh.catchRifeCheck() + 1) {
lineMechanism.add(new multitasking.Treat(postscript));
}
}
java.util.Collections.sort(lineMechanism);
while (!lineMechanism.isEmpty()) {
fh.methodEntrance(lineMechanism.removeFirst());
}
fh.markAfootDials(fh.catchRifeCheck() + 1);
fh.nsoTic();
}
}
}
this.photographySnapshot();
}
public synchronized void photographySnapshot() {
int restricted;
restricted = 896956854;
try {
java.lang.String masthead;
OperationSimulated.ProducerSubmitted.write("Summary\n");
System.out.println("Summary");
masthead =
java.lang.String.format(
"%-9s%23s%26s", "Algorithm", "Average Waiting Time", "Average Turnaround Time");
OperationSimulated.ProducerSubmitted.write(masthead + "\n");
System.out.println(masthead);
for (multitasking.Configuration waffen : performance) {
java.lang.String synopsis;
synopsis =
java.lang.String.format(
"%-9s%23.2f%26.2f",
waffen.compilerMake(),
waffen.haveModerateDeferPeriods(),
waffen.conveyRegularAdjustmentAmount());
OperationSimulated.ProducerSubmitted.write(synopsis + "\n");
System.out.println(synopsis);
}
OperationSimulated.ProducerSubmitted.close();
} catch (java.io.IOException tipp) {
System.out.println("Unable to write summary to file.");
}
}
}
|
[
"hayden.cheers@me.com"
] |
hayden.cheers@me.com
|
46c22ebd2f964a7753d35f961280afd96530a2d0
|
2f1f883b88c35fbdd7bcdad42b364df465f61279
|
/ses-app/ses-web-ros/src/main/java/com/redescooter/ses/web/ros/service/base/impl/OpeInvoiceCombinDetailBServiceImpl.java
|
2b0aec6e55400661a2376c80faa1f5ed2727e11c
|
[
"MIT"
] |
permissive
|
RedElect/ses-server
|
bd4a6c6091d063217655ab573422f4cf37c8dcbf
|
653cda02110cb31a36d8435cc4c72e792467d134
|
refs/heads/master
| 2023-06-19T16:16:53.418793
| 2021-07-19T09:19:25
| 2021-07-19T09:19:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,203
|
java
|
package com.redescooter.ses.web.ros.service.base.impl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import com.redescooter.ses.web.ros.dao.base.OpeInvoiceCombinDetailBMapper;
import com.redescooter.ses.web.ros.dm.OpeInvoiceCombinDetailB;
import com.redescooter.ses.web.ros.service.base.OpeInvoiceCombinDetailBService;
@Service
public class OpeInvoiceCombinDetailBServiceImpl extends ServiceImpl<OpeInvoiceCombinDetailBMapper, OpeInvoiceCombinDetailB> implements OpeInvoiceCombinDetailBService {
@Override
public int updateBatch(List<OpeInvoiceCombinDetailB> list) {
return baseMapper.updateBatch(list);
}
@Override
public int batchInsert(List<OpeInvoiceCombinDetailB> list) {
return baseMapper.batchInsert(list);
}
@Override
public int insertOrUpdate(OpeInvoiceCombinDetailB record) {
return baseMapper.insertOrUpdate(record);
}
@Override
public int insertOrUpdateSelective(OpeInvoiceCombinDetailB record) {
return baseMapper.insertOrUpdateSelective(record);
}
}
|
[
"alex@redescooter.com"
] |
alex@redescooter.com
|
0af6ee2944daa9e3a2967d91362d5ea1bbddee49
|
167c6226bc77c5daaedab007dfdad4377f588ef4
|
/java/ql/test/stubs/springframework-5.3.8/org/springframework/boot/SpringBootConfiguration.java
|
483c5cc5606536c4681dcb915d4334b58c686bf1
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
github/codeql
|
1eebb449a34f774db9e881b52cb8f7a1b1a53612
|
d109637e2d7ab3b819812eb960c05cb31d9d2168
|
refs/heads/main
| 2023-08-20T11:32:39.162059
| 2023-08-18T14:33:32
| 2023-08-18T14:33:32
| 143,040,428
| 5,987
| 1,363
|
MIT
| 2023-09-14T19:36:50
| 2018-07-31T16:35:51
|
CodeQL
|
UTF-8
|
Java
| false
| false
| 260
|
java
|
package org.springframework.boot;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import org.springframework.context.annotation.Configuration;
@Target(ElementType.TYPE)
@Configuration
public @interface SpringBootConfiguration {}
|
[
"artem.smotrakov@gmail.com"
] |
artem.smotrakov@gmail.com
|
6c1de33ba4bc89db10ea2bb20c15a88fb8dd9b68
|
59d56ad52a7e016883b56b73761104a17833a453
|
/src/main/java/com/whatever/MoleculeService/SearchActivePrincipleByProductIdResponse.java
|
9e674f7e960e059f295ce17c9cfac8faf65a7952
|
[] |
no_license
|
zapho/cxf-client-quarkus
|
3c330a3a5f370cce21c5cd1477ffbe274d1bba59
|
6e147d44b9ea9cc455d52f0efe234ef787b336c4
|
refs/heads/master
| 2023-01-22T03:33:27.579072
| 2020-12-08T14:55:27
| 2020-12-08T14:55:27
| 319,641,033
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,624
|
java
|
package com.whatever.MoleculeService;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java pour anonymous complex type.
*
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="moleculeList" type="{urn:Vidal}ArrayOfMolecule"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"moleculeList"
})
@XmlRootElement(name = "searchActivePrincipleByProductIdResponse")
public class SearchActivePrincipleByProductIdResponse {
@XmlElement(required = true, nillable = true)
protected ArrayOfMolecule moleculeList;
/**
* Obtient la valeur de la propriété moleculeList.
*
* @return
* possible object is
* {@link ArrayOfMolecule }
*
*/
public ArrayOfMolecule getMoleculeList() {
return moleculeList;
}
/**
* Définit la valeur de la propriété moleculeList.
*
* @param value
* allowed object is
* {@link ArrayOfMolecule }
*
*/
public void setMoleculeList(ArrayOfMolecule value) {
this.moleculeList = value;
}
}
|
[
"fabrice.aupert@dedalus-group.com"
] |
fabrice.aupert@dedalus-group.com
|
4577a6a30b2ecc14c9c7b9f7fd00407c6a3ede9b
|
0712e445a79595bb6ae07385d9dea4ebb811f972
|
/EpamLabs/finalTask/src/main/java/com/kozitski/pufar/filter/RunFilter.java
|
354a7a90726974f963904aa7e95dda29804fe6d7
|
[] |
no_license
|
Den4ik5/javaProjects
|
bf00c237216f8b2961bf830433ae3b14db8168ab
|
ce3cf4c16458bb1ec5dfb7c252b70b4dd5f74a9a
|
refs/heads/master
| 2020-04-09T15:32:24.683342
| 2018-12-04T22:22:58
| 2018-12-04T22:22:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 546
|
java
|
package com.kozitski.pufar.filter;
//@WebFilter("/*")
//public class RunFilter implements Filter {
//
// @Override
// public void init(FilterConfig filterConfig) throws ServletException {
//
// }
//
// @Override
// public void destroy() {
//
// }
//
// @Override
// public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
// // transmit to filter
// // WebPathReturner.setSf(request.getServletContext().getRealPath("/"));
// }
//}
|
[
"andrei.kozitsky@mail.ru"
] |
andrei.kozitsky@mail.ru
|
0b549f7b8ef5238c62cfe74ff195bf967097f3c8
|
85552d7099fac0836e86667281490ce75646ab56
|
/src/org/adligo/tests4j_4gwt/client/model/run/I_GwtMethodWrapper.java
|
e5005f78e20040f76cc924a87177ef6b7e776c42
|
[
"Apache-2.0"
] |
permissive
|
adligo/tests4j_4gwt.adligo.org
|
8049c241f2ba857065c477f37ac0332dd48fcc8e
|
6a8e44a5ff425e24a8634b4df3cdfc203d32b006
|
refs/heads/master
| 2020-05-20T02:37:35.470964
| 2015-04-01T06:26:47
| 2015-04-01T06:26:47
| 33,230,165
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 137
|
java
|
package org.adligo.tests4j_4gwt.client.model.run;
public interface I_GwtMethodWrapper {
public String getName();
public void run();
}
|
[
"scott@adligo.com"
] |
scott@adligo.com
|
da56487d0f751676244a3314da4e2868f1802994
|
3968031093eb98cb5ef7751c7d68fa5bffefa26b
|
/src/com/kaylerrenslow/a3plugin/dialog/newGroup/SQFConfigFunctionInformationHolder.java
|
43ec1a4be07cfba485bd3c3e40c1c62bb76d150c
|
[
"MIT"
] |
permissive
|
qimenxiaozi/arma-intellij-plugin
|
e48d354da16a629e4783deb9320adc8e022420d9
|
458675e3b0bf5773e1cd5e34d2c638b4b24c4a11
|
refs/heads/master
| 2021-01-19T15:03:43.451287
| 2017-06-06T00:20:12
| 2017-06-06T00:20:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,532
|
java
|
package com.kaylerrenslow.a3plugin.dialog.newGroup;
import com.intellij.openapi.module.Module;
import com.kaylerrenslow.a3plugin.util.Attribute;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Class that holds information for a config function (function defined inside description.ext/CfgFunctions
*
* @author Kayler
* @since 04/25/2016
*/
public class SQFConfigFunctionInformationHolder {
/**
* Function tag name
*/
public final String functionTagName;
/**
* Function config class name (class name inside description.ext/CfgFunctions)
*/
public final String functionClassName;
/**
* Function file name (e.g. fn_function.sqf)
*/
public final String functionFileName;
/**
* String containing path to the function. This will be something like 'folder\anotherFolder'
*/
public final String functionLocation;
/**
* Module that the function resides in
*/
public final Module module;
/**
* Special attributes about the function
*/
public final Attribute[] attributes;
public SQFConfigFunctionInformationHolder(@NotNull String functionTagName, @NotNull String functionClassName, @NotNull String functionLocation, @NotNull String functionFileName, @NotNull Module module, @Nullable Attribute[] attributes) {
this.functionTagName = functionTagName;
this.functionClassName = functionClassName;
this.functionLocation = functionLocation;
this.functionFileName = functionFileName;
this.module = module;
this.attributes = attributes;
}
}
|
[
"kaylerrenslow@gmail.com"
] |
kaylerrenslow@gmail.com
|
3b23f32ec3bcf6310a10f08123fd0930ded3139e
|
0963125ded363c7ebe0e1baf53958e91cffada19
|
/app/src/main/java/com/jude/joy/model/bean/ImageJoy.java
|
99597f7639d9095fecf2a1eb5cb1203fa602de00
|
[] |
no_license
|
sunnyvip9/Joy
|
db0bf20553c97abbe49482c67f1aaf39093baf3a
|
92a48d8699adba1a711e80810b44ebf5bd80fd9a
|
refs/heads/master
| 2021-01-15T14:02:33.711510
| 2016-03-18T07:41:26
| 2016-03-18T07:41:26
| 54,182,985
| 1
| 0
| null | 2016-03-18T07:40:05
| 2016-03-18T07:40:04
| null |
UTF-8
|
Java
| false
| false
| 890
|
java
|
package com.jude.joy.model.bean;
/**
* Created by Mr.Jude on 2015/8/20.
*/
public class ImageJoy {
/**
* ct : 2015-08-13 13:10:36.891
* img : http://img.hao123.com/data/3_1b72caa7998cf674fecb4f334cf9d356_430
* title : 牙膏还有这技能。
* type : 2
*/
private String ct;
private String img;
private String title;
private int type;
public void setCt(String ct) {
this.ct = ct;
}
public void setImg(String img) {
this.img = img;
}
public void setTitle(String title) {
this.title = title;
}
public void setType(int type) {
this.type = type;
}
public String getCt() {
return ct;
}
public String getImg() {
return img;
}
public String getTitle() {
return title;
}
public int getType() {
return type;
}
}
|
[
"973829691@qq.com"
] |
973829691@qq.com
|
6af61262fec00f783195df1bf13bf84af747b0ca
|
f5049214ff99cdd7c37da74619b60ac4a26fc6ba
|
/runtime/db/eu.agno3.runtime.db/src/main/java/eu/agno3/runtime/db/DataSourceUtil.java
|
f2383be0653dfc39f0549097f6f590a0e7a59169
|
[
"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
| 3,207
|
java
|
/**
* © 2014 AgNO3 Gmbh & Co. KG
* All right reserved.
*
* Created: 09.01.2014 by mbechler
*/
package eu.agno3.runtime.db;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.UUID;
/**
* @author mbechler
*
*/
public interface DataSourceUtil {
/**
* @return metadata for the datasource
*/
DataSourceMetaData createMetadata ();
/**
* Check whether a schema exists
*
* @param catalog
* @param schema
* @return whether given schema exists
* @throws DatabaseException
*/
boolean schemaExists ( String catalog, String schema ) throws DatabaseException;
/**
* Make sure a database schema exists
*
* @param catalog
* @param schema
* @throws DatabaseException
*/
void ensureSchemaExists ( String catalog, String schema ) throws DatabaseException;
/**
* Create a schema
*
* @param catalog
* @param schema
* @throws DatabaseException
*/
void createSchema ( String catalog, String schema ) throws DatabaseException;
/**
* Drop a schema
*
* Contained objects must be dropped first, you may use {@link #clearSchema(String, String)} for this.
*
* @param catalog
* @param schemaName
* @throws DatabaseException
*/
void dropSchema ( String catalog, String schemaName ) throws DatabaseException;
/**
* Set the connection default schema
*
* @param conn
* @param catalog
* @param schemaName
* @throws DatabaseException
*/
void setConnectionDefaultSchema ( Connection conn, String catalog, String schemaName ) throws DatabaseException;
/**
* Remove all objects from the given schema
*
* @param catalog
* @param schema
* @throws DatabaseException
*/
void clearSchema ( String catalog, String schema ) throws DatabaseException;
/**
* Remove all objects from the database
*
* @param catalog
* @throws DatabaseException
*/
void clearDatabase ( String catalog ) throws DatabaseException;
/**
* Escapes a database identifier (e.g. schema, table name) for use in a query
*
* @param conn
* @param schema
* @return the escaped identifier
* @throws DatabaseException
*/
String quoteIdentifier ( Connection conn, String schema ) throws DatabaseException;
/**
*
* @return whether locking is supported
* @throws DatabaseException
*/
boolean lockDatabase () throws DatabaseException;
/**
*
* @throws DatabaseException
*/
void unlockDatabase () throws DatabaseException;
/**
* @return the validation query to use
*/
String getValidationQuery ();
/**
* @param ps
* @param i
* @param uuid
* @throws SQLException
*/
void setParameter ( PreparedStatement ps, int i, UUID uuid ) throws SQLException;
/**
* @param rs
* @param i
* @return uuid
* @throws SQLException
*/
UUID extractUUID ( ResultSet rs, int i ) throws SQLException;
}
|
[
"bechler@agno3.eu"
] |
bechler@agno3.eu
|
3f39483030ebe5aed3c60d7d2b8564648b989f77
|
425b39fd89dde81a6c4c905f34071e838cd67e10
|
/06.SpringDataIntro/BookShopSystem/src/main/java/bookshopsystemapp/service/BookServiceImpl.java
|
c4b95bc70fd2f1575c453b7a093b39203b35ca4e
|
[] |
no_license
|
rayailieva/DatabaseFrameworks
|
c68d484615eaa360df2bc90dcbef7313832f4db1
|
00d98576855cfe20b07273ce324bcd0d96b8c41f
|
refs/heads/master
| 2020-04-02T14:27:38.071295
| 2018-12-20T11:40:46
| 2018-12-20T11:40:46
| 154,525,582
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,560
|
java
|
package bookshopsystemapp.service;
import bookshopsystemapp.domain.entities.*;
import bookshopsystemapp.repository.AuthorRepository;
import bookshopsystemapp.repository.BookRepository;
import bookshopsystemapp.repository.CategoryRepository;
import bookshopsystemapp.util.FileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.stream.Collectors;
@Service
@Transactional
public class BookServiceImpl implements BookService {
private final static String BOOKS_FILE_PATH =
"C:\\Users\\raya\\IdeaProjects\\JavaDatabaseAdvanced\\06.SpringDataIntro\\BookShopSystem\\src\\main\\resources\\files\\books.txt";
private final BookRepository bookRepository;
private final AuthorRepository authorRepository;
private final CategoryRepository categoryRepository;
private final FileUtil fileUtil;
@Autowired
public BookServiceImpl(BookRepository bookRepository, AuthorRepository authorRepository, CategoryRepository categoryRepository, FileUtil fileUtil) {
this.bookRepository = bookRepository;
this.authorRepository = authorRepository;
this.categoryRepository = categoryRepository;
this.fileUtil = fileUtil;
}
@Override
public void seedBooks() throws IOException {
if (this.bookRepository.count() != 0) {
return;
}
String[] booksFileContent = this.fileUtil.getFileContent(BOOKS_FILE_PATH);
for (String line : booksFileContent) {
String[] lineParams = line.split("\\s+");
Book book = new Book();
book.setAuthor(this.getRandomAuthor());
EditionType editionType = EditionType.values()[Integer.parseInt(lineParams[0])];
book.setEditionType(editionType);
LocalDate releaseDate = LocalDate.parse(lineParams[1], DateTimeFormatter.ofPattern("d/M/yyyy"));
book.setReleaseDate(releaseDate);
int copies = Integer.parseInt(lineParams[2]);
book.setCopies(copies);
BigDecimal price = new BigDecimal(lineParams[3]);
book.setPrice(price);
AgeRestriction ageRestriction = AgeRestriction.values()[Integer.parseInt(lineParams[4])];
book.setAgeRestriction(ageRestriction);
StringBuilder title = new StringBuilder();
for (int i = 5; i < lineParams.length; i++) {
title.append(lineParams[i]).append(" ");
}
book.setTitle(title.toString().trim());
Set<Category> categories = this.getRandomCategories();
book.setCategories(categories);
this.bookRepository.saveAndFlush(book);
}
}
@Override
public List<String> getAllBooksByReleaseDateAfter() {
List<Book> books =
this.bookRepository.findAllByReleaseDateAfter(LocalDate.parse("2000-12-31"));
return books.stream().map(Book::getTitle).collect(Collectors.toList());
}
@Override
public List<String> getAllAuthorsWithBookAfter() {
List<Book> books =
this.bookRepository.findAllByReleaseDateBefore(LocalDate.parse("1990-01-01"));
return books.stream()
.map(b -> String.format("%s %s"
, b.getAuthor().getFirstName()
, b.getAuthor().getLastName()))
.collect(Collectors.toList());
}
private Author getRandomAuthor() {
Random random = new Random();
int randomId = random.nextInt((int) (this.authorRepository.count() - 1)) + 1;
return this.authorRepository.getOne(randomId);
}
private Set<Category> getRandomCategories() {
Set<Category> categories = new LinkedHashSet<>();
Random random = new Random();
int length = random.nextInt(5);
for (int i = 0; i < length; i++) {
Category category = this.getRandomCategory();
categories.add(category);
}
return categories;
}
private Category getRandomCategory() {
Random random = new Random();
int randomId = random.nextInt((int) (this.categoryRepository.count() - 1)) + 1;
return this.categoryRepository.getOne(randomId);
}
}
|
[
"you@example.com"
] |
you@example.com
|
1d1fc9ed55d112e9957a1360be8632a9fe7078e5
|
dfcb99fd9feb71da35182811ed5f32bf69cd2bbf
|
/src/widget-extended/src/main/java/de/iwes/widgets/pattern/page/impl/TriggerableMethodLabel.java
|
b6d65fae9fda1bab938a1f48cfb4700d4cb6838f
|
[
"Apache-2.0"
] |
permissive
|
ogema/ogema-widgets
|
99d544d0ec6aebf68fd846fe2c08f5ac5dee7790
|
3adac6461c52555a42a4f1837267380adce293fb
|
refs/heads/public
| 2022-11-29T21:33:14.704989
| 2019-12-09T08:25:41
| 2019-12-09T08:25:41
| 124,270,200
| 0
| 1
|
Apache-2.0
| 2022-11-16T06:25:46
| 2018-03-07T17:23:28
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,158
|
java
|
/**
* Copyright 2014-2018 Fraunhofer-Gesellschaft zur Förderung der angewandten Wissenschaften e.V.
*
* 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 de.iwes.widgets.pattern.page.impl;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import org.json.JSONObject;
import org.ogema.core.resourcemanager.pattern.ResourcePattern;
import de.iwes.widgets.api.widgets.WidgetPage;
import de.iwes.widgets.api.widgets.sessionmanagement.OgemaHttpRequest;
import de.iwes.widgets.html.form.label.Label;
import de.iwes.widgets.html.form.label.LabelData;
public class TriggerableMethodLabel extends Label {
private static final long serialVersionUID = 1L;
private final Method method;
public TriggerableMethodLabel(WidgetPage<?> page, String id, Method method) {
super(page, id, "");
this.method = method;
}
@Override
public TriggerableMethodLabelOptions createNewSession() {
return new TriggerableMethodLabelOptions(this);
}
@Override
public TriggerableMethodLabelOptions getData(OgemaHttpRequest req) {
return (TriggerableMethodLabelOptions) super.getData(req);
}
private class TriggerableMethodLabelOptions extends LabelData {
private String message = "";
private ResourcePattern<?> selectedPattern = null;
public TriggerableMethodLabelOptions(TriggerableMethodLabel tml) {
super(tml);
}
@Override
public JSONObject retrieveGETData(OgemaHttpRequest req) {
setText(message);
return super.retrieveGETData(req);
}
public void setMessage(String message) {
this.message = message;
}
public void setMessage() {
String newText = "";
if (selectedPattern != null || Modifier.isStatic(method.getModifiers())) {
try {
newText = method.invoke(selectedPattern).toString(); // TODO other String conversion method
} catch (Exception e) {
}
}
this.message = newText;
}
public String getMessage() {
return message;
}
public void setPattern(ResourcePattern<?> selectedPattern) {
this.selectedPattern = selectedPattern;
}
public ResourcePattern<?> getPattern() {
return selectedPattern;
}
}
public void setMessage(OgemaHttpRequest req) {
getData(req).setMessage();
}
public void setMessage(String message, OgemaHttpRequest req) {
getData(req).setMessage(message);
}
public String getMessage(OgemaHttpRequest req) {
return getData(req).getMessage();
}
public void setPattern(ResourcePattern<?> selectedPattern, OgemaHttpRequest req) {
getData(req).setPattern(selectedPattern);
}
public ResourcePattern<?> getPattern(OgemaHttpRequest req) {
return getData(req).getPattern();
}
}
|
[
"christoph.noelle@iee.fraunhofer.de"
] |
christoph.noelle@iee.fraunhofer.de
|
2be222d7ef027606e66468f32356ca4f0d9b2e9f
|
f2e5f0c74cca281000e5b0a47044a84b49d5cb87
|
/550Dij/src/Node.java
|
535c5f8841aa174457808e756e1dfb2097c8be8f
|
[] |
no_license
|
AaronZhangGitHub/Archive
|
7ad351831c7d1d197471213a2b483696ee38f426
|
e803443d5333f7f8f99e99e257735d5440ca8df7
|
refs/heads/master
| 2021-01-16T19:06:45.637250
| 2017-08-12T20:49:55
| 2017-08-12T20:49:55
| 100,136,627
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,061
|
java
|
import java.util.ArrayList;
class Node {
private String name;
private Node next;
private int serialNumber;
private Edge adj;
private int inDeg;
private double shortestPathFromSource;
private Node pred;
private boolean handled;
private ArrayList<Edge> edgeHolder = new ArrayList<Edge>();
private double xVal;
private double yVal;
public Node(int sn, double xVal, double yVal) {
this.serialNumber = sn;
this.xVal = xVal;
this.yVal= yVal;
this.shortestPathFromSource = Integer.MAX_VALUE;
pred = null;
handled = false;
}
public double getX(){
return xVal;
}
public double getY(){
return yVal;
}
public boolean handled() {
return handled;
}
public void handle() {
handled = true;
}
public double getShortestPathFromSource() {
return shortestPathFromSource;
}
public void setShortestPathFromSource(double s) {
shortestPathFromSource = s;
}
public void setPred(Node p) {
pred = p;
}
public Node getPred() {
return pred;
}
public int getSerialNum() {
return serialNumber;
}
public void setNext(Node next) {
this.next = next;
}
public void addEdge(Edge e) {
//The edges coming out of this node, to another node
edgeHolder.add(e);
}
public int numEdgesOutOf() {
return edgeHolder.size();
}
public boolean hasEdge() {
if (edgeHolder.size() > 0) {
return true;
}
return false;
}
public Edge returnEdge(int i) {
return edgeHolder.get(i);
}
public boolean removeEdge(Node deleteNode) {
for (int i = 0; i < edgeHolder.size(); i++) {
if (deleteNode.name.equals(edgeHolder.get(i).getTo().name)) {
// Edge exists to be deleted
deleteNode.decInDeg();
// Delete Edge
edgeHolder.remove(edgeHolder.get(i));
// Return True
return true;
}
}
return false;
}
public void incInDeg() {
inDeg++;
}
public void decInDeg() {
if (inDeg > 0) {
inDeg--;
}
}
public int getInDeg() {
return inDeg;
}
public void decInDegEdgesOut() {
for (int i = 0; i < edgeHolder.size(); i++) {
edgeHolder.get(i).getTo().decInDeg();
}
}
}
|
[
"aaronz@live.unc.edu"
] |
aaronz@live.unc.edu
|
98e71427ba971a1cc76c33231afca2a2e0c31121
|
63efef2a78943970a3cefcbec4a7bd9d1c3b3793
|
/lis-commons-lang/src/test/java/com/link_intersystems/lang/reflect/MemberModifierPredicatetTest.java
|
9f55de83e803839c3e9236991046b6c04543fcc0
|
[
"Apache-2.0"
] |
permissive
|
renelink/lis-commons
|
5ae526fd2bcd142dfb914fd0f2b1207c72d48473
|
4a58042547475f0efb0e41c9db1656bdc37ffa8b
|
refs/heads/master
| 2020-03-18T08:52:10.358477
| 2017-11-19T15:07:06
| 2017-11-19T15:07:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,765
|
java
|
/**
* Copyright 2011 Link Intersystems GmbH <rene.link@link-intersystems.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.link_intersystems.lang.reflect;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import org.junit.Before;
import org.junit.Test;
import com.link_intersystems.lang.reflect.MemberModifierPredicate.Match;
public class MemberModifierPredicatetTest {
@SuppressWarnings("unused")
private String privateTest;
public String publicTest;
private Field privateTestField;
private Field publicTestField;
private Method privateMethod;
private Method publicMethod;
@SuppressWarnings("unused")
private static final String TEST_CONSTANT = "TEST_CONSTANT";
@SuppressWarnings("unused")
private static String TEST_CONSTANT_2 = "TEST_CONSTANT_2";
private Constructor<? extends MemberModifierPredicatetTest> privateConstructor;
private Constructor<? extends MemberModifierPredicatetTest> publicConstructor;
private Field privateStaticFinalConstField;
private Field privateStaticConstField;
public MemberModifierPredicatetTest() {
}
MemberModifierPredicatetTest(int testConstructor) {
}
@SuppressWarnings("unused")
private void privateMethod() {
}
@Before
public void setup() throws SecurityException, NoSuchFieldException,
NoSuchMethodException {
privateStaticFinalConstField = getClass().getDeclaredField(
"TEST_CONSTANT");
privateStaticConstField = getClass()
.getDeclaredField("TEST_CONSTANT_2");
privateTestField = getClass().getDeclaredField("privateTest");
publicTestField = getClass().getDeclaredField("publicTest");
privateMethod = getClass().getDeclaredMethod("privateMethod");
publicMethod = getClass().getDeclaredMethod("setup");
privateConstructor = getClass().getDeclaredConstructor(int.class);
publicConstructor = getClass().getDeclaredConstructor();
}
@Test(expected = IllegalArgumentException.class)
public void newWithNullMatch() {
new MemberModifierPredicate(Modifier.PUBLIC, null);
}
@Test
public void evaluateAgainstMethod() {
MemberModifierPredicate memberModifierPredicate = new MemberModifierPredicate(
Modifier.PUBLIC);
boolean evaluate = memberModifierPredicate.evaluate(privateMethod);
assertFalse(evaluate);
evaluate = memberModifierPredicate.evaluate(publicMethod);
assertTrue(evaluate);
}
@Test
public void evaluateAgainstConstructor() {
MemberModifierPredicate memberModifierPredicate = new MemberModifierPredicate(
Modifier.PUBLIC);
boolean evaluate = memberModifierPredicate.evaluate(privateConstructor);
assertFalse(evaluate);
evaluate = memberModifierPredicate.evaluate(publicConstructor);
assertTrue(evaluate);
}
@Test
public void evaluateAgainstField() {
MemberModifierPredicate memberModifierPredicate = new MemberModifierPredicate(
Modifier.PUBLIC);
boolean evaluate = memberModifierPredicate.evaluate(privateTestField);
assertFalse(evaluate);
evaluate = memberModifierPredicate.evaluate(publicTestField);
assertTrue(evaluate);
}
@Test
public void matchExace() {
MemberModifierPredicate memberModifierPredicate = new MemberModifierPredicate(
Modifier.PRIVATE | Modifier.STATIC | Modifier.FINAL,
Match.EXACT);
boolean evaluate = memberModifierPredicate
.evaluate(privateStaticConstField);
assertFalse(evaluate);
evaluate = memberModifierPredicate
.evaluate(privateStaticFinalConstField);
assertTrue(evaluate);
}
@Test
public void matchAtLeastOne() {
MemberModifierPredicate memberModifierPredicate = new MemberModifierPredicate(
Modifier.PROTECTED | Modifier.STATIC, Match.AT_LEAST_ONE);
boolean evaluate = memberModifierPredicate
.evaluate(privateStaticConstField);
assertTrue(evaluate);
evaluate = memberModifierPredicate
.evaluate(privateStaticFinalConstField);
assertTrue(evaluate);
memberModifierPredicate = new MemberModifierPredicate(
Modifier.PROTECTED | Modifier.NATIVE, Match.AT_LEAST_ONE);
evaluate = memberModifierPredicate
.evaluate(privateStaticFinalConstField);
assertFalse(evaluate);
}
}
|
[
"rene.link@link-intersystems.com"
] |
rene.link@link-intersystems.com
|
473aa80fc5e5dea122ee4ed0a7841578f0b3a35f
|
d3679002d911a2b4e62e9270be387e7da099f81c
|
/src/p06/lecture/p4method/A06ParameterCast.java
|
66eb1caf77f0fe01644fb2af43b2a00c14ff505c
|
[] |
no_license
|
dailydevp/java20210325
|
3fb3315fbbba31b914959c32b51eaf4d12d52883
|
7c022fc6f194de3b5e876b2e74c61bbd2b33f702
|
refs/heads/master
| 2023-04-23T00:36:19.028568
| 2021-05-04T12:52:35
| 2021-05-04T12:52:35
| 351,269,342
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 267
|
java
|
package p06.lecture.p4method;
public class A06ParameterCast {
public static void main(String[] args) {
int a = 5;
double b;
b = a;
a = (int) b;
MyClass6 o1 = new MyClass6();
o1.method1(a);
// o1.method1(b);
o1.method2(b);
o1.method2(a);
}
}
|
[
"hyde8547@naver.com"
] |
hyde8547@naver.com
|
23041eec3630ad070739541c0aae5681137f4d11
|
442b00ba09789b546125b42a5fb58f597e9a2395
|
/src/main/java/vigna/fastutil/BidirectionalIterator.java
|
3901851ba00bcd88807e20753f51cbf292aaf973
|
[
"Apache-2.0"
] |
permissive
|
tommyettinger/doughyo
|
305737ffb63534a7393fd08e3e3db5c250883bb1
|
e0f8fec76873aee223d6ae354665da9cccb9104b
|
refs/heads/master
| 2021-01-20T18:44:00.817894
| 2016-06-26T09:23:06
| 2016-06-26T09:23:06
| 60,392,230
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,685
|
java
|
package vigna.fastutil;
/*
* Copyright (C) 2002-2015 Sebastiano Vigna
*
* 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.
*/
import java.util.Iterator;
import java.util.ListIterator;
/** A bidirectional {@link Iterator}.
*
* <P>This kind of iterator is essentially a {@link ListIterator} that
* does not support {@link ListIterator#previousIndex()} and {@link
* ListIterator#nextIndex()}. It is useful for those maps that can easily
* provide bidirectional iteration, but provide no index.
*
* <P>Note that iterators returned by <code>fastutil</code> classes are more
* specific, and support skipping. This class serves the purpose of organising
* in a cleaner way the relationships between various iterators.
*
* @see Iterator
* @see ListIterator
*/
public interface BidirectionalIterator<K> extends Iterator<K> {
/** Returns the previous element from the collection.
*
* @return the previous element from the collection.
* @see ListIterator#previous()
*/
K previous();
/** Returns whether there is a previous element.
*
* @return whether there is a previous element.
* @see ListIterator#hasPrevious()
*/
boolean hasPrevious();
}
|
[
"tommy.ettinger@gmail.com"
] |
tommy.ettinger@gmail.com
|
70622e9f4cc07dd3ac1f0e5634a7915fcbed20ec
|
ddfb3a710952bf5260dfecaaea7d515526f92ebb
|
/build/tmp/expandedArchives/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-sources.jar_c582e790131b6dd3325b282fce9d2d3d/net/minecraft/client/renderer/entity/IronGolemRenderer.java
|
9021150c9ad9ac25939293104676354ba323f3db
|
[
"Apache-2.0"
] |
permissive
|
TheDarkRob/Sgeorsge
|
88e7e39571127ff3b14125620a6594beba509bd9
|
307a675cd3af5905504e34717e4f853b2943ba7b
|
refs/heads/master
| 2022-11-25T06:26:50.730098
| 2020-08-03T15:42:23
| 2020-08-03T15:42:23
| 284,748,579
| 0
| 0
|
Apache-2.0
| 2020-08-03T16:19:36
| 2020-08-03T16:19:35
| null |
UTF-8
|
Java
| false
| false
| 1,807
|
java
|
package net.minecraft.client.renderer.entity;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.entity.layers.IronGolemCracksLayer;
import net.minecraft.client.renderer.entity.layers.IronGolenFlowerLayer;
import net.minecraft.client.renderer.entity.model.IronGolemModel;
import net.minecraft.entity.passive.IronGolemEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class IronGolemRenderer extends MobRenderer<IronGolemEntity, IronGolemModel<IronGolemEntity>> {
private static final ResourceLocation IRON_GOLEM_TEXTURES = new ResourceLocation("textures/entity/iron_golem/iron_golem.png");
public IronGolemRenderer(EntityRendererManager renderManagerIn) {
super(renderManagerIn, new IronGolemModel<>(), 0.7F);
this.addLayer(new IronGolemCracksLayer(this));
this.addLayer(new IronGolenFlowerLayer(this));
}
/**
* Returns the location of an entity's texture.
*/
public ResourceLocation getEntityTexture(IronGolemEntity entity) {
return IRON_GOLEM_TEXTURES;
}
protected void applyRotations(IronGolemEntity entityLiving, MatrixStack matrixStackIn, float ageInTicks, float rotationYaw, float partialTicks) {
super.applyRotations(entityLiving, matrixStackIn, ageInTicks, rotationYaw, partialTicks);
if (!((double)entityLiving.limbSwingAmount < 0.01D)) {
float f = 13.0F;
float f1 = entityLiving.limbSwing - entityLiving.limbSwingAmount * (1.0F - partialTicks) + 6.0F;
float f2 = (Math.abs(f1 % 13.0F - 6.5F) - 3.25F) / 3.25F;
matrixStackIn.rotate(Vector3f.ZP.rotationDegrees(6.5F * f2));
}
}
}
|
[
"iodiceandrea251@gmail.com"
] |
iodiceandrea251@gmail.com
|
f00a7603c7f1e88fd5c6b26019ad4c813859e753
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-ecs/src/main/java/com/aliyuncs/ecs/model/v20140526/DescribePhysicalConnectionsResponse.java
|
55f7a6bd0db4c9425e6bffbecb271325717d876c
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 5,835
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.ecs.model.v20140526;
import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.ecs.transform.v20140526.DescribePhysicalConnectionsResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class DescribePhysicalConnectionsResponse extends AcsResponse {
private String requestId;
private Integer pageNumber;
private Integer pageSize;
private Integer totalCount;
private List<PhysicalConnectionType> physicalConnectionSet;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Integer getPageNumber() {
return this.pageNumber;
}
public void setPageNumber(Integer pageNumber) {
this.pageNumber = pageNumber;
}
public Integer getPageSize() {
return this.pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Integer getTotalCount() {
return this.totalCount;
}
public void setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
}
public List<PhysicalConnectionType> getPhysicalConnectionSet() {
return this.physicalConnectionSet;
}
public void setPhysicalConnectionSet(List<PhysicalConnectionType> physicalConnectionSet) {
this.physicalConnectionSet = physicalConnectionSet;
}
public static class PhysicalConnectionType {
private String adLocation;
private String creationTime;
private String status;
private String type;
private String portNumber;
private String circuitCode;
private String spec;
private Long bandwidth;
private String description;
private String portType;
private String enabledTime;
private String businessStatus;
private String lineOperator;
private String name;
private String redundantPhysicalConnectionId;
private String peerLocation;
private String accessPointId;
private String physicalConnectionId;
public String getAdLocation() {
return this.adLocation;
}
public void setAdLocation(String adLocation) {
this.adLocation = adLocation;
}
public String getCreationTime() {
return this.creationTime;
}
public void setCreationTime(String creationTime) {
this.creationTime = creationTime;
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
public String getPortNumber() {
return this.portNumber;
}
public void setPortNumber(String portNumber) {
this.portNumber = portNumber;
}
public String getCircuitCode() {
return this.circuitCode;
}
public void setCircuitCode(String circuitCode) {
this.circuitCode = circuitCode;
}
public String getSpec() {
return this.spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
public Long getBandwidth() {
return this.bandwidth;
}
public void setBandwidth(Long bandwidth) {
this.bandwidth = bandwidth;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public String getPortType() {
return this.portType;
}
public void setPortType(String portType) {
this.portType = portType;
}
public String getEnabledTime() {
return this.enabledTime;
}
public void setEnabledTime(String enabledTime) {
this.enabledTime = enabledTime;
}
public String getBusinessStatus() {
return this.businessStatus;
}
public void setBusinessStatus(String businessStatus) {
this.businessStatus = businessStatus;
}
public String getLineOperator() {
return this.lineOperator;
}
public void setLineOperator(String lineOperator) {
this.lineOperator = lineOperator;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getRedundantPhysicalConnectionId() {
return this.redundantPhysicalConnectionId;
}
public void setRedundantPhysicalConnectionId(String redundantPhysicalConnectionId) {
this.redundantPhysicalConnectionId = redundantPhysicalConnectionId;
}
public String getPeerLocation() {
return this.peerLocation;
}
public void setPeerLocation(String peerLocation) {
this.peerLocation = peerLocation;
}
public String getAccessPointId() {
return this.accessPointId;
}
public void setAccessPointId(String accessPointId) {
this.accessPointId = accessPointId;
}
public String getPhysicalConnectionId() {
return this.physicalConnectionId;
}
public void setPhysicalConnectionId(String physicalConnectionId) {
this.physicalConnectionId = physicalConnectionId;
}
}
@Override
public DescribePhysicalConnectionsResponse getInstance(UnmarshallerContext context) {
return DescribePhysicalConnectionsResponseUnmarshaller.unmarshall(this, context);
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
783bbf1b1494ab425f70c03c31c1a524ad3f7369
|
1627f39bdce9c3fe5bfa34e68c276faa4568bc35
|
/src/segment_tree/lazy_propagation/Boj1395.java
|
bb69cca097ae0b431745c5399c061a09ac1e5e74
|
[
"Apache-2.0"
] |
permissive
|
minuk8932/Algorithm_BaekJoon
|
9ebb556f5055b89a5e5c8d885b77738f1e660e4d
|
a4a46b5e22e0ed0bb1b23bf1e63b78d542aa5557
|
refs/heads/master
| 2022-10-23T20:08:19.968211
| 2022-10-02T06:55:53
| 2022-10-02T06:55:53
| 84,549,122
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,014
|
java
|
package segment_tree.lazy_propagation;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/**
*
* @author exponential-e
* 백준 1395번: 스위치
*
* @see https://www.acmicpc.net/problem/1395/
*
*/
public class Boj1395 {
private static int INF = 1 << 20;
private static int start = INF / 2;
private static int[] tree = new int[INF];
private static boolean[] lazy = new boolean[INF];
private static final String NEW_LINE = "\n";
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int N = Integer.parseInt(st.nextToken());
int M = Integer.parseInt(st.nextToken());
StringBuilder sb = new StringBuilder();
while(M-- > 0){
st = new StringTokenizer(br.readLine());
int cmd = Integer.parseInt(st.nextToken());
int S = Integer.parseInt(st.nextToken()) - 1;
int T = Integer.parseInt(st.nextToken());
if(cmd == 0){
click(S, T, 1, 0, start);
}
else{
sb.append(status(S, T, 1, 0, start)).append(NEW_LINE);
}
}
System.out.println(sb.toString());
}
private static int[] makeSon(int node){
return new int[]{node * 2, node * 2 + 1};
}
private static void propagation(int node, int s, int e){
if(!lazy[node]) return;
if(node < start){
int[] son = makeSon(node);
lazy[son[0]] ^= true; // click
lazy[son[1]] ^= true;
int size = (e - s) / 2;
int sum = 0;
if(lazy[son[0]]) sum += size - tree[son[0]]; // if left side flipping
else sum += tree[son[0]];
if(lazy[son[1]]) sum += size - tree[son[1]];
else sum += tree[son[1]];
tree[node] = sum;
}
else{
tree[node] ^= 1;
}
lazy[node] = false;
}
private static void click(int s, int e, int node, int ns, int ne){
propagation(node, ns, ne);
if(e <= ns || ne <= s) return;
if(s <= ns && ne <= e){
lazy[node] ^= true; // clicked
propagation(node, ns, ne);
return;
}
int[] son = makeSon(node);
int mid = (ns + ne) / 2;
click(s, e, son[0], ns, mid);
click(s, e, son[1], mid, ne);
tree[node] = tree[son[0]] + tree[son[1]]; // get on switch
}
private static int status(int s, int e, int node, int ns, int ne){
propagation(node, ns, ne);
if(e <= ns || ne <= s) return 0;
if(s <= ns && ne <= e) return tree[node];
int[] son = makeSon(node);
int mid = (ns + ne) / 2;
return status(s, e, son[0], ns, mid) + status(s, e, son[1], mid, ne);
}
}
|
[
"minuk8932@naver.com"
] |
minuk8932@naver.com
|
93ddd081d6cc3a44e608a65567fe08de9fae4dc8
|
5979994b215fabe125cd756559ef2166c7df7519
|
/aimir-model-hibernate/src/main/java/com/aimir/dao/mvm/impl/LpGMDaoImpl.java
|
0a34e40a3b8e36261033a03b260620220f014f78
|
[] |
no_license
|
TechTinkerer42/Haiti
|
91c45cb1b784c9afc61bf60d43e1d5623aeba888
|
debaea96056d1d4611b79bd846af8f7484b93e6e
|
refs/heads/master
| 2023-04-28T23:39:43.176592
| 2021-05-03T10:49:42
| 2021-05-03T10:49:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,759
|
java
|
package com.aimir.dao.mvm.impl;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.SQLQuery;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.ProjectionList;
import org.hibernate.criterion.Projections;
import org.hibernate.transform.Transformers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.aimir.dao.AbstractHibernateGenericDao;
import com.aimir.dao.mvm.LpGMDao;
import com.aimir.model.mvm.LpGM;
import com.aimir.util.Condition;
import com.aimir.util.SearchCondition;
@Repository(value="lpgmDao")
public class LpGMDaoImpl extends AbstractHibernateGenericDao<LpGM, Integer> implements LpGMDao{
private static Log log = LogFactory.getLog(LpGMDaoImpl.class);
@Autowired
protected LpGMDaoImpl(SessionFactory sessionFactory) {
super(LpGM.class);
super.setSessionFactory(sessionFactory);
}
public List<LpGM> getLpGMsByListCondition(Set<Condition> set) {
return findByConditions(set);
}
public List<Object> getLpGMsCountByListCondition(Set<Condition> set) {
return findTotalCountByConditions(set);
}
@SuppressWarnings("unchecked")
public List<Object> getLpGMsMaxMinSumAvg(Set<Condition> conditions, String div) {
Criteria criteria = getSession().createCriteria(LpGM.class);
if(conditions != null) {
Iterator it = conditions.iterator();
while(it.hasNext()){
Condition condition = (Condition)it.next();
Criterion addCriterion = SearchCondition.getCriterion(condition);
if(addCriterion != null){
criteria.add(addCriterion);
}
}
}
ProjectionList pjl = Projections.projectionList();
if("max".equals(div)) {
pjl.add(Projections.max("value_00"));
}
else if("min".equals(div)) {
pjl.add(Projections.min("value_00"));
}
else if("avg".equals(div)) {
pjl.add(Projections.avg("value_00"));
}
else if("sum".equals(div)) {
pjl.add(Projections.sum("value_00"));
}
criteria.setProjection(pjl);
return criteria.list();
}
@SuppressWarnings("unchecked")
public List<Object> getLpGMsByNoSended() {
StringBuffer sbQuery = new StringBuffer();
sbQuery.append("SELECT A.CHANNEL, A.YYYYMMDDHH, A.DST, A.MDEV_ID, A.MDEV_TYPE, A.VALUE, A.VALUE_00, A.VALUE_15, A.VALUE_30, A.VALUE_45 ")
.append(", B.VALUE_00 AS VALUE_00_RESULT , B.VALUE_15 AS VALUE_15_RESULT, B.VALUE_30 AS VALUE_30_RESULT, B.VALUE_45 AS VALUE_45_RESULT ")
.append("FROM LP_GM A ")
.append("JOIN (SELECT * FROM LP_GM ")
.append("WHERE CHANNEL = 98 ")
.append("AND (VALUE_00 = 0 OR VALUE_15 = 0 OR VALUE_30 = 0 OR VALUE_45 = 0 )) B ")
.append("ON A.YYYYMMDDHH = B.YYYYMMDDHH ")
.append("AND A.DST = B.DST ")
.append("AND A.MDEV_TYPE = B.MDEV_TYPE ")
.append("AND A.MDEV_ID = B.MDEV_ID ")
.append("AND A.CHANNEL = 1 ")
.append("AND A.MDEV_TYPE = ?");
SQLQuery query = getSession().createSQLQuery(sbQuery.toString());
return query.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list();
}
@SuppressWarnings("unchecked")
public List<Object> getLpGMsByNoSended(String mdevType) {
StringBuffer sbQuery = new StringBuffer();
sbQuery.append("SELECT A.CHANNEL, A.YYYYMMDDHH, A.DST, A.MDEV_ID, A.MDEV_TYPE, A.VALUE, A.VALUE_00, A.VALUE_15, A.VALUE_30, A.VALUE_45 ")
.append(", B.VALUE_00 AS VALUE_00_RESULT , B.VALUE_15 AS VALUE_15_RESULT, B.VALUE_30 AS VALUE_30_RESULT, B.VALUE_45 AS VALUE_45_RESULT ")
.append("FROM LP_GM A ")
.append("JOIN (SELECT * FROM LP_GM ")
.append("WHERE CHANNEL = 98 ")
.append("AND (VALUE_00 = 0 OR VALUE_15 = 0 OR VALUE_30 = 0 OR VALUE_45 = 0 )) B ")
.append("ON A.YYYYMMDDHH = B.YYYYMMDDHH ")
.append("AND A.DST = B.DST ")
.append("AND A.MDEV_TYPE = B.MDEV_TYPE ")
.append("AND A.MDEV_ID = B.MDEV_ID ")
.append("AND A.CHANNEL = 1 ")
.append("AND A.MDEV_TYPE = ?");
SQLQuery query = getSession().createSQLQuery(sbQuery.toString());
query.setString(0, mdevType);
return query.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list();
}
public void updateSendedResult(LpGM lpgm) {
//OPF-610 정규화 관련 처리로 내용 삭제. 호출 하는 함수 없음
}
public List<Object> getConsumptionGmCo2LpValuesParentId(Map<String, Object> condition) {
log.info("최상위 위치별 총합\n==== conditions ====\n" + condition);
@SuppressWarnings("unused")
Integer locationId = (Integer) condition.get("locationId");
Integer channel = (Integer) condition.get("channel");
// 탄소일 경우만 0 ,
// 수도/온도/습도의
// 사용량일때는 1
String startDate = (String) condition.get("startDate");
//String hh0 = (String) condition.get("hh0");
StringBuffer sb = new StringBuffer();
sb.append("\n SELECT SUM(VALUE_00) AS SUMVALUE");
sb.append("\n FROM LP_GM LP INNER JOIN (SELECT ID FROM LOCATION WHERE PARENT_ID=:parentId) L ");
sb.append("\n ON LP.LOCATION_ID = L.ID ");
sb.append("\n WHERE LP.CHANNEL=:channel AND YYYYMMDDHH =:startDate ");
SQLQuery query = getSession().createSQLQuery(sb.toString());
query.setInteger("parentId", locationId);
query.setInteger("channel", channel);
query.setString("startDate", startDate);
return query.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP)
.list();
}
public int getLpInterval( String mdevId ) {
/*
* select * from meter m
* inner join ( select lp.meter_id from lp_em lp where lp.mdev_id =
*/
//주기 ( lpInterval ) 구해오기
StringBuffer buffer = new StringBuffer();
buffer.append("\n SELECT DISTINCT M.LP_INTERVAL FROM METER M ");
buffer.append("\n INNER JOIN (SELECT METER_ID FROM LP_EM WHERE MDEV_ID=:mdevId) LP ");
buffer.append("\n ON M.ID = LP.METER_ID ");
SQLQuery query = getSession().createSQLQuery(buffer.toString());
query.setString("mdevId", mdevId);
List<Object> result = query.list();
return Integer.parseInt(String.valueOf(result.get(0)));
}
}
|
[
"marsr0913@nuritelecom.com"
] |
marsr0913@nuritelecom.com
|
74bd22cc7dc1882cf2f420585585cf7abc7130f3
|
7b40d383ff3c5d51c6bebf4d327c3c564eb81801
|
/src/com/facebook/internal/Validate.java
|
f9e3c0b55a4eb0c70afa254a3bcc24593691ae26
|
[] |
no_license
|
reverseengineeringer/com.yik.yak
|
d5de3a0aea7763b43fd5e735d34759f956667990
|
76717e41dab0b179aa27f423fc559bbfb70e5311
|
refs/heads/master
| 2021-01-20T09:41:04.877038
| 2015-07-16T16:44:44
| 2015-07-16T16:44:44
| 38,577,543
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,648
|
java
|
package com.facebook.internal;
import java.util.Collection;
import java.util.Iterator;
public final class Validate
{
public static void containsNoNullOrEmpty(Collection<String> paramCollection, String paramString)
{
notNull(paramCollection, paramString);
paramCollection = paramCollection.iterator();
while (paramCollection.hasNext())
{
String str = (String)paramCollection.next();
if (str == null) {
throw new NullPointerException("Container '" + paramString + "' cannot contain null values");
}
if (str.length() == 0) {
throw new IllegalArgumentException("Container '" + paramString + "' cannot contain empty values");
}
}
}
public static <T> void containsNoNulls(Collection<T> paramCollection, String paramString)
{
notNull(paramCollection, paramString);
paramCollection = paramCollection.iterator();
while (paramCollection.hasNext()) {
if (paramCollection.next() == null) {
throw new NullPointerException("Container '" + paramString + "' cannot contain null values");
}
}
}
public static <T> void notEmpty(Collection<T> paramCollection, String paramString)
{
if (paramCollection.isEmpty()) {
throw new IllegalArgumentException("Container '" + paramString + "' cannot be empty");
}
}
public static <T> void notEmptyAndContainsNoNulls(Collection<T> paramCollection, String paramString)
{
containsNoNulls(paramCollection, paramString);
notEmpty(paramCollection, paramString);
}
public static void notNull(Object paramObject, String paramString)
{
if (paramObject == null) {
throw new NullPointerException("Argument '" + paramString + "' cannot be null");
}
}
public static void notNullOrEmpty(String paramString1, String paramString2)
{
if (Utility.isNullOrEmpty(paramString1)) {
throw new IllegalArgumentException("Argument '" + paramString2 + "' cannot be null or empty");
}
}
public static void oneOf(Object paramObject, String paramString, Object... paramVarArgs)
{
int j = paramVarArgs.length;
int i = 0;
while (i < j)
{
Object localObject = paramVarArgs[i];
if (localObject != null)
{
if (!localObject.equals(paramObject)) {}
}
else {
while (paramObject == null) {
return;
}
}
i += 1;
}
throw new IllegalArgumentException("Argument '" + paramString + "' was not one of the allowed values");
}
}
/* Location:
* Qualified Name: com.facebook.internal.Validate
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
3bdecc40043fc718634d1c850f7b16037f59f3f1
|
b2c17008630d1742455131238ae998b55c8d9773
|
/OOPSConcepts/inheritance/hasA/BusDemo.java
|
fab781f3112ba56ff98445508d969ba184c5ed76
|
[] |
no_license
|
mnarendra333/batch23
|
66362817fb598f2aa0306bdde19e3bd1b67dfbda
|
54e3c7ae3954efc5d07a28e816d29ebd78c38254
|
refs/heads/master
| 2022-12-21T08:31:24.224187
| 2020-02-01T03:45:29
| 2020-02-01T03:45:29
| 204,832,319
| 0
| 2
| null | 2022-12-15T23:35:22
| 2019-08-28T02:37:20
|
Java
|
UTF-8
|
Java
| false
| false
| 1,631
|
java
|
class BusDemo
{
public void getBusses(Bus[] busses, String busType)
{
for(int i=0;i<busses.length;i++)
{
Bus obj = busses[i];
if(obj.getBusType().equals(busType))
{
System.out.println(obj.getBusId()+" "+obj.getBusName()+" "+
obj.getFare()+" "+obj.getBusType());
}else
{
System.out.println("No Busses!!!! with given criteria");
}
}
}
public void getBusses(Bus[] busses, String busType, double fare)
{
for(int i=0;i<busses.length;i++)
{
Bus busObj = busses[i];
if(busObj.getBusType().equals(busType) && busObj.getFare() <=fare)
{
System.out.println(busObj.getBusId()+" "+busObj.getBusName()+" "+busObj.getFare()+" "+busObj.getBusType());
}
}
}
public static void main(String args[])
{
Bus obj1 = new Bus(1001,"Kaveri",900,"sleeper");
Bus obj2 = new Bus(1002,"",1000,"semi-sleeper");
Bus obj3 = new Bus(1003,"Komitla",1900,"sleeper");
Bus obj4 = new Bus(1004,"MorningStar",2900,"sleeper");
Bus obj5 = new Bus(1005,"Vaibhav",850,"sleeper");
Bus obj6 = new Bus(1006,"KMBT",1900,"semi-sleeper");
Bus obj7 = new Bus(1007,"Orange",3600,"sleeper");
Bus obj8 = new Bus(1008,"Green",500,"semi-sleeper");
Bus obj9 = new Bus(1009,"REDT",700,"sleeper");
Bus obj10 = new Bus(1010,"Test",1000,"semi-sleeper");
Bus busses[] = new Bus[]{obj1,obj2,obj3,obj4,obj5,obj6,obj7,obj8,obj9,obj10};
BusDemo obj = new BusDemo();
obj.getBusses(busses,"non-ac");
System.out.println("============================================");
obj.getBusses(busses,"sleeper",900);
}
}
|
[
"mnarendra333@gmail.com"
] |
mnarendra333@gmail.com
|
2758a7fe4fa3f6608dd3f4611cc2f011f6953de9
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/31/31_71dc59510d788b0753446b4c7fb0539822fbc7c0/RegionFilterBuilder/31_71dc59510d788b0753446b4c7fb0539822fbc7c0_RegionFilterBuilder_t.java
|
eca6551a9351bde2a106cd53d05208538753341a
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,836
|
java
|
/*******************************************************************************
* Copyright (c) 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.virgo.kernel.osgi.region;
import org.osgi.framework.InvalidSyntaxException;
/**
* A builder for creating {@link RegionFilter} instances. A builder instance can be obtained from the
* {@link RegionDigraph#createRegionFilterBuilder()} method.
* <p />
* <strong>Concurrent Semantics</strong><br />
*
* Implementations of this interface must be thread safe.
*/
public interface RegionFilterBuilder {
/**
* Allow capabilities with the given name space matching the given filter.
*
* @param namespace the name space of the capabilities to be allowed
* @param filter the filter matching the capabilities to be allowed
* @return this builder (for method chaining)
*/
RegionFilterBuilder allow(String namespace, String filter) throws InvalidSyntaxException;
/**
* Allow all capabilities with the given name space.
*
* @param namespace the name space of the capabilities to be allowed
* @return this builder (for method chaining)
*/
RegionFilterBuilder allowAll(String namespace);
/**
* Build a {@link RegionFilter} from the current state of this builder.
*
* @return the {@link RegionFilter} built
*/
RegionFilter build();
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
122ceabf70b3e9440c7856328049f7ac3667cb2c
|
b2f07f3e27b2162b5ee6896814f96c59c2c17405
|
/com/sun/media/sound/RIFFInvalidDataException.java
|
c4c6aade4e9def4a55a8bd807b7dd2955088b07f
|
[] |
no_license
|
weiju-xi/RT-JAR-CODE
|
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
|
d5b2590518ffb83596a3aa3849249cf871ab6d4e
|
refs/heads/master
| 2021-09-08T02:36:06.675911
| 2018-03-06T05:27:49
| 2018-03-06T05:27:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 624
|
java
|
/* */ package com.sun.media.sound;
/* */
/* */ public final class RIFFInvalidDataException extends InvalidDataException
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */
/* */ public RIFFInvalidDataException()
/* */ {
/* 37 */ super("Invalid Data!");
/* */ }
/* */
/* */ public RIFFInvalidDataException(String paramString) {
/* 41 */ super(paramString);
/* */ }
/* */ }
/* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar
* Qualified Name: com.sun.media.sound.RIFFInvalidDataException
* JD-Core Version: 0.6.2
*/
|
[
"yuexiahandao@gmail.com"
] |
yuexiahandao@gmail.com
|
ee5a85d2b0e857757d96aa5ea27c91e5a447c03f
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/apache/activemq/bugs/AMQ5035Test.java
|
7a3466c039eb9761eb5fc3b4864b13ec2498fa18
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,292
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.activemq.bugs;
import Session.AUTO_ACKNOWLEDGE;
import javax.jms.Connection;
import javax.jms.MessageConsumer;
import javax.jms.Session;
import javax.jms.Topic;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.jmx.BrokerViewMBean;
import org.junit.Test;
public class AMQ5035Test {
private static final String CLIENT_ID = "amq-test-client-id";
private static final String DURABLE_SUB_NAME = "testDurable";
private final String xbean = "xbean:";
private final String confBase = "src/test/resources/org/apache/activemq/bugs/amq5035";
private static BrokerService brokerService;
private String connectionUri;
@Test
public void testFoo() throws Exception {
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(connectionUri);
Connection connection = factory.createConnection();
connection.setClientID(AMQ5035Test.CLIENT_ID);
connection.start();
Session session = connection.createSession(false, AUTO_ACKNOWLEDGE);
Topic topic = session.createTopic("Test.Topic");
MessageConsumer consumer = session.createDurableSubscriber(topic, AMQ5035Test.DURABLE_SUB_NAME);
consumer.close();
BrokerViewMBean brokerView = getBrokerView(AMQ5035Test.DURABLE_SUB_NAME);
brokerView.destroyDurableSubscriber(AMQ5035Test.CLIENT_ID, AMQ5035Test.DURABLE_SUB_NAME);
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
88d91c138b0fdc794a1214e8cf8ac5b3411259e1
|
caa4f0ce10797c3b78680b958e2e9277d01c82ce
|
/src/com/shlg/chuang/annotation/Constraints.java
|
94a828d9045e29fb7766887869f23effa71792d9
|
[] |
no_license
|
liushuiwushuang/codeThink
|
00812e221713a7f2bb9e54722834190986fac7ae
|
3285f374abfba339692c8e74dbcb87d0c5a70ef7
|
refs/heads/master
| 2021-01-19T04:15:17.251027
| 2017-05-05T10:13:31
| 2017-05-05T10:13:31
| 62,606,501
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 427
|
java
|
package com.shlg.chuang.annotation;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@Retention(RUNTIME)
@Target(FIELD)
public @interface Constraints {
boolean primaryKey() default false;
boolean allowNull() default true;
boolean unique() default false;
}
|
[
"1303637389@qq.com"
] |
1303637389@qq.com
|
90224526dd6f43b6bb5710bbe4dd1afa456ab8a9
|
8ccd1c071b19388f1f2e92c5e5dbedc78fead327
|
/src/main/java/ohos/agp/render/render3d/impl/CoreResource.java
|
b846380654a28290b69066cee0937fad37ca5e37
|
[] |
no_license
|
yearsyan/Harmony-OS-Java-class-library
|
d6c135b6a672c4c9eebf9d3857016995edeb38c9
|
902adac4d7dca6fd82bb133c75c64f331b58b390
|
refs/heads/main
| 2023-06-11T21:41:32.097483
| 2021-06-24T05:35:32
| 2021-06-24T05:35:32
| 379,816,304
| 6
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,248
|
java
|
package ohos.agp.render.render3d.impl;
import java.math.BigInteger;
class CoreResource {
private transient long agpCptrCoreResource;
private final Object delLock = new Object();
transient boolean isAgpCmemOwn;
CoreResource(long j, boolean z) {
this.isAgpCmemOwn = z;
this.agpCptrCoreResource = j;
}
static long getCptr(CoreResource coreResource) {
if (coreResource == null) {
return 0;
}
return coreResource.agpCptrCoreResource;
}
/* access modifiers changed from: package-private */
public void delete() {
synchronized (this.delLock) {
if (this.agpCptrCoreResource != 0) {
if (!this.isAgpCmemOwn) {
this.agpCptrCoreResource = 0;
} else {
this.isAgpCmemOwn = false;
throw new UnsupportedOperationException("C++ destructor does not have public access");
}
}
}
}
static long getCptrAndSetMemOwn(CoreResource coreResource, boolean z) {
if (coreResource != null) {
coreResource.isAgpCmemOwn = z;
}
return getCptr(coreResource);
}
/* access modifiers changed from: package-private */
public CorePropertyHandle getProperties() {
long propertiesInCoreResource = CoreJni.getPropertiesInCoreResource(this.agpCptrCoreResource, this);
if (propertiesInCoreResource == 0) {
return null;
}
return new CorePropertyHandle(propertiesInCoreResource, false);
}
/* access modifiers changed from: package-private */
public void setProperties(CorePropertyHandle corePropertyHandle) {
CoreJni.setPropertiesInCoreResource(this.agpCptrCoreResource, this, CorePropertyHandle.getCptr(corePropertyHandle), corePropertyHandle);
}
/* access modifiers changed from: package-private */
public BigInteger getType() {
return CoreJni.getTypeInCoreResource(this.agpCptrCoreResource, this);
}
static void destroy(CoreResource coreResource) {
CoreJni.destroyInCoreResource(getCptr(coreResource), coreResource);
}
}
|
[
"yearsyan@gmail.com"
] |
yearsyan@gmail.com
|
233ae51f3a64b8e039bfd8e2a1c8e91fb5ed74f6
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/webview/model/h.java
|
c040f98df3cbe4299e5aaf3189995d103617ae17
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,783
|
java
|
package com.tencent.mm.plugin.webview.model;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.protocal.protobuf.dco;
import com.tencent.mm.protocal.protobuf.dfo;
import com.tencent.mm.sdk.platformtools.RWCache;
import com.tencent.mm.sdk.platformtools.Util;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
public final class h
{
public int WKG;
public int WKH;
public int WKI;
public final List<dfo> WKJ;
public int WKK;
public long WKL;
private h()
{
AppMethodBeat.i(78862);
this.WKG = 20480;
this.WKH = 30720;
this.WKI = 51200;
this.WKJ = new LinkedList();
this.WKK = 0;
this.WKL = 0L;
AppMethodBeat.o(78862);
}
public static void mh(List<dco> paramList)
{
AppMethodBeat.i(78863);
if (Util.isNullOrNil(paramList))
{
AppMethodBeat.o(78863);
return;
}
paramList = paramList.iterator();
while (paramList.hasNext())
{
dco localdco = (dco)paramList.next();
g localg = com.tencent.mm.plugin.webview.modeltools.g.iwb();
int i = localdco.ZsX;
long l1 = Util.nowSecond();
long l2 = localdco.aaIw;
localg.WKE.set(Integer.valueOf(i), Long.valueOf(l1 + l2));
}
com.tencent.mm.plugin.webview.modeltools.g.iwb().iuZ();
AppMethodBeat.o(78863);
}
public static final class a
{
private static final h WKM;
static
{
AppMethodBeat.i(78861);
WKM = new h((byte)0);
AppMethodBeat.o(78861);
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: com.tencent.mm.plugin.webview.model.h
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
40b868c834716ec0a20974065f757aed53030d78
|
f27cb821dd601554bc8f9c112d9a55f32421b71b
|
/examples/quarkus/testsuite/native/db2/src/main/java/com/blazebit/persistence/examples/quarkus/testsuite/nativedb2/Dummy.java
|
241545b58683109a33bdde3501adf6c3d5752240
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
Blazebit/blaze-persistence
|
94f7e75154e80ce777a61eb3d436135ad6d7a497
|
a9b1b6efdd7ae388e7624adc601a47d97609fdaa
|
refs/heads/main
| 2023-08-31T22:41:17.134370
| 2023-07-14T15:31:39
| 2023-07-17T14:52:26
| 21,765,334
| 1,475
| 92
|
Apache-2.0
| 2023-08-07T18:10:38
| 2014-07-12T11:08:47
|
Java
|
UTF-8
|
Java
| false
| false
| 817
|
java
|
/*
* Copyright 2014 - 2023 Blazebit.
*
* 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.blazebit.persistence.examples.quarkus.testsuite.nativedb2;
/**
* Newer Javadoc versions don't package empty javadocs anymore.
*
* @author Christian Beikov
* @since 1.6.0
*/
public class Dummy {
}
|
[
"christian.beikov@gmail.com"
] |
christian.beikov@gmail.com
|
5a5c2812b1e4d1d4710ada02dc8eacc6191d16de
|
347d1a1083145ddbbbcf5e5bd9d483be93e7086b
|
/xiao2/monthproject/src/main/java/com/bawei/monthproject/MainActivity.java
|
a9d36f4a23ecf76b38516bc3848acd8aeea047e1
|
[] |
no_license
|
2318279444/1707A
|
34f0fe8fe24e7b67e5733d2c556ab042edb8d3e5
|
46de73c27a1f392f059e1054b35ca9ded0037172
|
refs/heads/master
| 2020-11-30T07:24:00.423533
| 2019-12-28T02:21:34
| 2019-12-28T02:21:34
| 230,346,614
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 396
|
java
|
package com.bawei.monthproject;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.bawei.base.BaseActivity;
public class MainActivity extends BaseActivity {
@Override
protected void inidata() {
}
@Override
protected void iniview() {
}
@Override
protected int inilayout() {
return R.layout.activity_main;
}
}
|
[
"2318279444@qq.com"
] |
2318279444@qq.com
|
eff23a8ac6fb4dd6b141c7bca129b1a6d9087e29
|
4b5351f597b8e0a817b0ba70bebc98451dce6e8a
|
/Chapter2/src/ch04/Student.java
|
9a80f920cd07ec2eb538f58aff1cfbbefae2e7e2
|
[] |
no_license
|
xjvmdutl/chapter02
|
414a6fcf12c573686bbf6f4e7a2d3ab796e4418e
|
22a0129831093d0a6f3c522bd2cdcfa0ef5be98e
|
refs/heads/master
| 2023-05-07T10:14:09.486236
| 2021-05-30T10:28:55
| 2021-05-30T10:28:55
| 367,574,123
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 508
|
java
|
package ch04;
public class Student {
public int studentID;
public String studentName;
public String address;
public void showStudentInfo() {//학생 정보를 보여준다.
System.out.println(studentID + "학번 학생의 이름은 "+studentName+" 이고, 주소는 "+address+"입니다.");
}
public String getStudentName(){//studentName을 가져가는 함수
return studentName;
}
public void setStudentName(String name) {//studentName을 지정하는 함수
studentName = name;
}
}
|
[
"widn45@naver.com"
] |
widn45@naver.com
|
c4803a1d825e2eb900220c802746cb50695aa5e8
|
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
|
/bazaar8.apk-decompiled/sources/com/farsitel/bazaar/ui/splash/SplashActivity.java
|
5215d2363133b8a9f9c3109cf4ad9994dc7c7438
|
[] |
no_license
|
BaseMax/PopularAndroidSource
|
a395ccac5c0a7334d90c2594db8273aca39550ed
|
bcae15340907797a91d39f89b9d7266e0292a184
|
refs/heads/master
| 2020-08-05T08:19:34.146858
| 2019-10-06T20:06:31
| 2019-10-06T20:06:31
| 212,433,298
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,799
|
java
|
package com.farsitel.bazaar.ui.splash;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ProgressBar;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.constraintlayout.widget.Group;
import androidx.databinding.ViewDataBinding;
import b.l.g;
import b.r.E;
import c.c.a.c.c.a;
import c.c.a.d.b.d;
import c.c.a.d.b.l;
import c.c.a.d.f.b;
import c.c.a.f.C0407c;
import c.c.a.n.y.e;
import com.farsitel.bazaar.R;
import com.farsitel.bazaar.core.model.Resource;
import com.farsitel.bazaar.core.model.ResourceState;
import com.farsitel.bazaar.data.entity.ErrorModel;
import com.farsitel.bazaar.data.entity.None;
import com.farsitel.bazaar.ui.home.MainActivity;
import h.f.b.j;
import h.f.b.k;
/* compiled from: SplashActivity.kt */
public final class SplashActivity extends b {
public e w;
public C0407c x;
public boolean y = true;
public static final /* synthetic */ e a(SplashActivity splashActivity) {
e eVar = splashActivity.w;
if (eVar != null) {
return eVar;
}
j.c("splashViewModel");
throw null;
}
public final void C() {
C0407c cVar = this.x;
if (cVar != null) {
ProgressBar progressBar = cVar.E;
j.a((Object) progressBar, "binding.progressBar");
l.c(progressBar);
C0407c cVar2 = this.x;
if (cVar2 != null) {
Group group = cVar2.B;
j.a((Object) group, "binding.errorGroup");
l.a(group);
return;
}
j.c("binding");
throw null;
}
j.c("binding");
throw null;
}
public final void D() {
if (this.y) {
F();
}
}
public final void E() {
E a2 = A().a(e.class);
e eVar = (e) a2;
eVar.e().a(this, new d(this));
j.a((Object) a2, "viewModelFactory.create(…\n })\n }");
this.w = eVar;
e eVar2 = this.w;
if (eVar2 != null) {
eVar2.k();
} else {
j.c("splashViewModel");
throw null;
}
}
public final void F() {
Intent intent = new Intent(this, MainActivity.class);
getIntent().addFlags(32768);
startActivity(intent);
finish();
}
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
ViewDataBinding a2 = g.a(this, R.layout.activity_splash);
j.a((Object) a2, "DataBindingUtil.setConte…R.layout.activity_splash)");
this.x = (C0407c) a2;
if (!isTaskRoot()) {
Intent intent = getIntent();
j.a((Object) intent, "intent");
String action = intent.getAction();
if (intent.hasCategory("android.intent.category.LAUNCHER") && action != null && j.a((Object) action, (Object) "android.intent.action.MAIN")) {
finish();
return;
}
}
E();
}
public void onPause() {
super.onPause();
this.y = false;
}
public void onResume() {
super.onResume();
this.y = true;
e eVar = this.w;
ResourceState resourceState = null;
if (eVar != null) {
Resource a2 = eVar.e().a();
if (a2 != null) {
resourceState = a2.d();
}
if (j.a((Object) resourceState, (Object) ResourceState.Success.f12179a)) {
D();
return;
}
return;
}
j.c("splashViewModel");
throw null;
}
public final void a(Resource<None> resource) {
if (resource != null) {
ResourceState d2 = resource.d();
if (j.a((Object) d2, (Object) ResourceState.Loading.f12178a)) {
C();
} else if (j.a((Object) d2, (Object) ResourceState.Success.f12179a)) {
D();
} else if (j.a((Object) d2, (Object) ResourceState.Error.f12177a)) {
a(resource.c());
} else {
a aVar = a.f4699b;
aVar.a(new Throwable("Illegal State in handleResourceState in " + k.a(SplashActivity.class)));
}
}
}
public final void a(ErrorModel errorModel) {
if (errorModel != null) {
C0407c cVar = this.x;
if (cVar != null) {
ProgressBar progressBar = cVar.E;
j.a((Object) progressBar, "binding.progressBar");
l.a(progressBar);
C0407c cVar2 = this.x;
if (cVar2 != null) {
Group group = cVar2.B;
j.a((Object) group, "binding.errorGroup");
l.c(group);
C0407c cVar3 = this.x;
if (cVar3 != null) {
AppCompatTextView appCompatTextView = cVar3.C;
j.a((Object) appCompatTextView, "binding.errorText");
appCompatTextView.setText(d.b((Context) this, errorModel));
C0407c cVar4 = this.x;
if (cVar4 != null) {
cVar4.A.setOnClickListener(new c(this));
} else {
j.c("binding");
throw null;
}
} else {
j.c("binding");
throw null;
}
} else {
j.c("binding");
throw null;
}
} else {
j.c("binding");
throw null;
}
}
}
}
|
[
"MaxBaseCode@gmail.com"
] |
MaxBaseCode@gmail.com
|
06cf451e50262ac6100ae26ffa1025d6c29c971a
|
dbab952a4527a87cda154a66669d683311a76ca4
|
/datasharing/src/main/java/com/example/dm/enumT/E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行.java
|
6edb224857e9fbee3368003635990dd9e02667d2
|
[] |
no_license
|
zhoudy-github/demok8s
|
6b957cd1e6aaee663fd069e4cd78d2da449a088e
|
38f00f7f59b4f55e2c250050608a8131f036c740
|
refs/heads/master
| 2023-02-17T13:45:15.586325
| 2021-01-18T13:17:11
| 2021-01-18T13:17:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,435
|
java
|
package com.example.dm.enumT;
//import com.coalvalue.domain.pojo.ListItem;
/**
* Created by silence on 2016/1/18.
*/
public enum E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行 {
国家机关 ("000001", "国家机关",1,""),
民办非企业单位_社会团体 ("000006", "民办非企业单位_社会团体",1,""),
国有企业 ("000002", "国有企业",2,""),
外资企业 ("000004", "外资企业",2,""),
城镇集体企业 ("000003", "城镇集体企业",2,""),
城镇私营企业及其他城镇企业 ("000005", "城镇私营企业及其他城镇企业",2,""),
其他 ("000007", "其他",1,""),
;
public static E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行 from(E_待_DP0102_PaymentUnitTypeEnum_单位性质_定 typeEnum) {
switch (typeEnum){
default:
return E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行.其他;
}
}
private final String statusText;
private final String displayText;
private final Integer id;
private String helpMessage;
public String getHelpMessage() {
return helpMessage;
}
public void setHelpMessage(String helpMessage) {
this.helpMessage = helpMessage;
}
public String getDisplayText() {
return displayText;
}
E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行(String statusText, String displayText, Integer id, String helpMessage) {
this.statusText = statusText;
this.displayText = displayText;
this.id = id;
this.helpMessage = helpMessage;
}
public String getText() {
return this.statusText;
}
public Integer getId() {
return this.id;
}
/*
public static List<ListItem> retriveTypese() {
List<ListItem> list = new ArrayList<ListItem>();
for (AccountingVoucherStatusEnum status : AccountingVoucherStatusEnum.values()) {
ListItem element = new ListItem(status.getId(), status.getDisplayText(), status.getHelpMessage());
list.add(element);
}
return list;
}
public static List<ListItem> retriveTypese(String statusText) {
List<ListItem> list = new ArrayList<ListItem>();
for(PersonalAccountStatusEnum status : PersonalAccountStatusEnum.values()) {
ListItem element = new ListItem(status.getText(), status.getDisplayText());
if (status.getText().equals(statusText)){
element.setSelected(true);
}
list.add(element);
}
return list;
}*/
public static E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行 fromString(String text) {
for (E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行 status : E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行.values()) {
if (status.getText().equals(text) ) {
return status;
}
}
throw new RuntimeException("no customer status " + text);
}
public static E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行 fromInt(Integer text) {
for (E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行 status : E_待_DP0102_PaymentUnitTypeEnum_单位性质_工行.values()) {
if (status.getId().equals(text) ) {
return status;
}
}
throw new RuntimeException("no customer status " + text);
}
}
|
[
"1026957152@qq.com"
] |
1026957152@qq.com
|
36952119fd4c68c698bf0dad1856180980671315
|
fbb451429d7c4bace20f1d1c6ae4123526784491
|
/D2D/Server/WebService/src/com/ca/arcflash/ha/utils/VMwareUploadManager.java
|
2e49c31d0ae3868b488c01af7b40d62538d29015
|
[] |
no_license
|
cliicy/autoupdate
|
93ffb71feb958ff08915327b2ea8eec356918286
|
8da1c549847b64a9ea00452bbc97c16621005b4f
|
refs/heads/master
| 2021-01-24T08:11:26.676542
| 2018-02-26T13:33:29
| 2018-02-26T13:33:29
| 122,970,736
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,503
|
java
|
package com.ca.arcflash.ha.utils;
import java.io.InputStream;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.log4j.Logger;
import com.ca.arcflash.ha.vmwaremanagerIntf.CAVMDetails;
import com.ca.arcflash.ha.vmwaremanagerIntf.CAVirtualInfrastructureManager;
import com.ca.arcflash.jobscript.replication.RepJobMonitor;
import com.ca.arcflash.webservice.service.CommonService;
public class VMwareUploadManager {
private static Logger logger = Logger.getLogger(VMwareUploadManager.class);
public static boolean uploadToStorage(HARetryStrategy strategy,
CAVirtualInfrastructureManager vmwareManager,
CAVMDetails vmDetails, Map<String, String> fileUris, String afguid) {
RepJobMonitor jobMonitor = CommonService.getInstance().getRepJobMonitorInternal(afguid);
Iterator<String> iter = fileUris.keySet().iterator();
while (iter.hasNext()) {
String key = iter.next();
String value = fileUris.get(key);
for (int i = 0; i < strategy.getTimes(); ++i) {
try {
if (vmwareManager.putVMConfig(vmDetails.getVmName(),
vmDetails.getUuid(), value, key)) {
iter.remove();
break;
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
synchronized (jobMonitor) {
if (jobMonitor.isCurrentJobCancelled())
return false;
}
try {
Thread.sleep(strategy.getInterval() * 1000);
} catch (InterruptedException e) {
logger.error(e.getMessage(), e);
}
}
}
return fileUris.size() == 0;
}
public static boolean deleteFromStorage(HARetryStrategy strategy,
CAVirtualInfrastructureManager vmwareManager,
CAVMDetails vmDetails,List<String> fileNames){
boolean isDeleted =false;
InputStream in = null;
for (String name : fileNames) {
for (int i = 0; i < strategy.getTimes(); i++) {
try {
in = vmwareManager.getVMConfig(vmDetails.getVmName(), vmDetails.getUuid(), name);
if(in != null){
try {
in.close();
}catch(Exception e) {}
isDeleted = vmwareManager.deleteVMConfig(vmDetails.getVmName(), vmDetails.getUuid(), name);
if(isDeleted)
break;
}else { // A null 'in' means the file doesn't exist, to retry more times is meaningless.
break;
}
} catch (Exception e) {
}
try {
Thread.sleep(strategy.getInterval() * 1000);
} catch (InterruptedException e) {
}
}
}
return isDeleted;
}
}
|
[
"cliicy@gmail.com"
] |
cliicy@gmail.com
|
d7299ffa613e73d414f38b88b91be9c9aa3eaf9c
|
d71fc6f733e494f35f1ea855f25c5e830efea632
|
/kernel/impl/fabric3-contribution/src/main/java/org/fabric3/contribution/processor/SymLinkContributionProcessor.java
|
aaacd7b17cc1c5a4b304fc2c0719e5b2d15ccc68
|
[
"Apache-2.0"
] |
permissive
|
carecon/fabric3-core
|
d92ba6aa847386ee491d16f7802619ee1f65f493
|
14a6c6cd5d7d3cabf92e670ac89432a5f522c518
|
refs/heads/master
| 2020-04-02T19:54:51.148466
| 2018-12-06T19:56:50
| 2018-12-06T19:56:50
| 154,750,871
| 0
| 0
| null | 2018-10-25T23:39:54
| 2018-10-25T23:39:54
| null |
UTF-8
|
Java
| false
| false
| 6,861
|
java
|
/*
* Fabric3
* Copyright (c) 2009-2015 Metaform Systems
*
* 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.
* Portions originally based on Apache Tuscany 2007
* licensed under the Apache 2.0 license.
*/
package org.fabric3.contribution.processor;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import org.fabric3.api.host.Fabric3Exception;
import org.fabric3.api.host.stream.Source;
import org.fabric3.api.host.stream.UrlSource;
import org.fabric3.spi.contribution.Contribution;
import org.fabric3.spi.contribution.ContributionProcessor;
import org.fabric3.spi.contribution.ProcessorRegistry;
import org.fabric3.spi.contribution.Resource;
import org.fabric3.spi.introspection.IntrospectionContext;
import org.fabric3.spi.util.RegexHelper;
import org.oasisopen.sca.annotation.Destroy;
import org.oasisopen.sca.annotation.EagerInit;
import org.oasisopen.sca.annotation.Init;
import org.oasisopen.sca.annotation.Reference;
import static org.fabric3.spi.contribution.Constants.EXPLODED_CONTENT_TYPE;
/**
* Processes a symbolic link contribution (*.contribution file). This is done by de-referencing the target directory specified in the .contribution file and
* introspecting it. The introspection results are then copied to the <code>Contribution</code> representing the symbolic link.
*/
@EagerInit
public class SymLinkContributionProcessor implements ContributionProcessor {
public static final String F3_SYMLINK = "f3.symlink";
private ProcessorRegistry processorRegistry;
public SymLinkContributionProcessor(@Reference ProcessorRegistry processorRegistry) {
this.processorRegistry = processorRegistry;
}
@Init
public void init() {
processorRegistry.register(this);
}
@Destroy
public void destroy() {
processorRegistry.unregister(this);
}
public boolean canProcess(Contribution contribution) {
String sourceUrl = contribution.getLocation().toString();
return sourceUrl.endsWith(".contribution") || contribution.getMetaData(Boolean.class, F3_SYMLINK) != null; // source url will change
}
public void processManifest(Contribution contribution, IntrospectionContext context) {
try {
Contribution syntheticContribution = createSyntheticContribution(contribution);
processorRegistry.processManifest(syntheticContribution, context);
// override the locations
contribution.overrideLocation(syntheticContribution.getLocation());
contribution.getAdditionalLocations().addAll(syntheticContribution.getAdditionalLocations());
contribution.setManifest(syntheticContribution.getManifest());
contribution.addMetaData(F3_SYMLINK, Boolean.TRUE);
contribution.addMetaData(contribution.getUri(), syntheticContribution);
} catch (IOException e) {
throw new Fabric3Exception(e);
}
}
public void index(Contribution contribution, IntrospectionContext context) {
Contribution syntheticContribution = contribution.getMetaData(Contribution.class, contribution.getUri());
processorRegistry.indexContribution(syntheticContribution, context);
for (Resource resource : syntheticContribution.getResources()) {
resource.setContribution(contribution);
contribution.addResource(resource);
}
}
public void process(Contribution contribution, IntrospectionContext context) {
Contribution syntheticContribution = contribution.getMetaData(Contribution.class, contribution.getUri());
processorRegistry.processContribution(syntheticContribution, context);
contribution.removeMetaData(contribution.getUri());
}
private Contribution createSyntheticContribution(Contribution contribution) throws IOException, Fabric3Exception {
try {
URL location = contribution.getLocation();
Path symFile = Paths.get(location.toURI());
List<String> paths = Files.readAllLines(symFile, Charset.defaultCharset());
if (paths.isEmpty()) {
throw new Fabric3Exception("Invalid contribution file: " + location);
}
// take the first entry in the file as the main contribution location
String pathname = paths.get(0);
// expand variables of the form ${..}
pathname = RegexHelper.expandExpression(pathname, (s) -> {
String var = s.substring(2, s.length() - 1);
String path = System.getenv().get(var);
if (path == null) {
throw new Fabric3Exception("Contribution location environment variable not set: " + var);
}
return path;
});
File file = new File(pathname);
URL dereferencedLocation = file.toURI().toURL();
URI contributionUri = URI.create(file.getName());
Source source = new UrlSource(dereferencedLocation);
long timestamp = System.currentTimeMillis();
Contribution syntheticContribution = new Contribution(contributionUri, source, dereferencedLocation, timestamp, EXPLODED_CONTENT_TYPE);
if (paths.size() > 1) {
for (int i = 1; i < paths.size(); i++) {
String subPath = paths.get(i);
// expand variables of the form ${..}
subPath = RegexHelper.expandExpression(subPath, (s) -> {
String var = s.substring(2, s.length() - 1);
String path = System.getenv().get(var);
if (path == null) {
throw new Fabric3Exception("Contribution location environment variable not set: " + var);
}
return path;
});
syntheticContribution.addAdditionalLocation(new File(subPath).toURI().toURL());
}
}
return syntheticContribution;
} catch (URISyntaxException e) {
throw new IOException(e);
}
}
}
|
[
"jim.marino@gmail.com"
] |
jim.marino@gmail.com
|
a72bb14d4011a7625774ec974a0901c53781f263
|
d98ed4986ecdd7df4c04e4ad09f38fdb7a7043e8
|
/Hero_Specialties/src/main/java/net/sf/anathema/hero/specialties/display/presenter/SpecialtiesInitializer.java
|
db995b64922cc74952694d3a96136069001f5624
|
[] |
no_license
|
bjblack/anathema_3e
|
3d1d42ea3d9a874ac5fbeed506a1a5800e2a99ac
|
963f37b64d7cf929f086487950d4870fd40ac67f
|
refs/heads/master
| 2021-01-19T07:12:42.133946
| 2018-12-18T23:57:41
| 2018-12-18T23:57:41
| 67,353,965
| 0
| 0
| null | 2016-09-04T15:47:48
| 2016-09-04T15:47:48
| null |
UTF-8
|
Java
| false
| false
| 1,725
|
java
|
package net.sf.anathema.hero.specialties.display.presenter;
import net.sf.anathema.hero.environment.HeroEnvironment;
import net.sf.anathema.hero.individual.model.Hero;
import net.sf.anathema.hero.individual.model.HeroModelInitializer;
import net.sf.anathema.hero.individual.model.RegisteredInitializer;
import net.sf.anathema.hero.individual.overview.HeroModelGroup;
import net.sf.anathema.hero.individual.view.SectionView;
import net.sf.anathema.hero.specialties.model.SpecialtiesModel;
import net.sf.anathema.hero.specialties.model.SpecialtiesModelFetcher;
import net.sf.anathema.library.initialization.Weight;
import net.sf.anathema.library.presenter.CategorizedOptionalPropertyPresenter;
import net.sf.anathema.library.view.property.OptionalPropertiesView;
@RegisteredInitializer (HeroModelGroup.Mundane)
@Weight (weight = 300)
public class SpecialtiesInitializer implements HeroModelInitializer
{
private HeroEnvironment environment;
@SuppressWarnings ("UnusedParameters")
public SpecialtiesInitializer (HeroEnvironment environment)
{
this.environment = environment;
}
@Override
public void initialize (SectionView sectionView, Hero hero)
{
String viewName = environment.getResources ().getString ("AdditionalTemplateView.TabName.Specialties");
OptionalPropertiesView view = sectionView.addView (viewName, OptionalPropertiesView.class);
SpecialtiesModel specialtiesModel = SpecialtiesModelFetcher.fetch (hero);
new CategorizedOptionalPropertyPresenter (hero, specialtiesModel, view, environment.getResources ()).initPresentation ();
}
@Override
public boolean canWorkForHero (Hero hero)
{
return SpecialtiesModelFetcher.fetch (hero) != null;
}
}
|
[
"BJ@BJ-PC"
] |
BJ@BJ-PC
|
23b08b00efaf50b2254252fe5eb78a248b8522cc
|
6dbe38fa197104d0e8e1164fa05921f823aa8fd3
|
/portal/src/main/java/com/springinpractice/ch13/portal/formatter/LinkFormatter.java
|
a143f3103251c971708bfa4fd71cff1b2c8ee173
|
[] |
no_license
|
bbaron/sip13-new
|
e273d64af876a93800f39809a9db9a9ec6c27a9f
|
0219e6b8b1c143fe34f17e4638c5e3b005d0c2b7
|
refs/heads/master
| 2020-12-25T07:58:36.751370
| 2012-12-28T20:44:52
| 2012-12-28T20:44:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 801
|
java
|
package com.springinpractice.ch13.portal.formatter;
import java.text.ParseException;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.format.Formatter;
import org.springframework.hateoas.Link;
import org.springframework.stereotype.Component;
/**
* @author Willie Wheeler (willie.wheeler@gmail.com)
*/
@Component
public class LinkFormatter implements Formatter<Link> {
private static final Logger log = LoggerFactory.getLogger(LinkFormatter.class);
@Override
public String print(Link link, Locale locale) {
log.debug("Printing Link: {}", link);
return link.getHref();
}
@Override
public Link parse(String href, Locale locale) throws ParseException {
log.debug("Parsing Link: href={}", href);
return new Link(href);
}
}
|
[
"willie.wheeler@gmail.com"
] |
willie.wheeler@gmail.com
|
3a265ee0d9c15b2213c554e38b52a7cdf69c4147
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/aom/src/main/java/com/huaweicloud/sdk/aom/v2/model/DeleteAlarmRuleResponse.java
|
255f98208e5f6d396ee93a5a27b7022a4fd3420d
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 1,743
|
java
|
package com.huaweicloud.sdk.aom.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huaweicloud.sdk.core.SdkResponse;
import java.util.Objects;
/**
* Response Object
*/
public class DeleteAlarmRuleResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "body")
private String body;
public DeleteAlarmRuleResponse withBody(String body) {
this.body = body;
return this;
}
/**
* Get body
* @return body
*/
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
DeleteAlarmRuleResponse that = (DeleteAlarmRuleResponse) obj;
return Objects.equals(this.body, that.body);
}
@Override
public int hashCode() {
return Objects.hash(body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteAlarmRuleResponse {\n");
sb.append(" body: ").append(toIndentedString(body)).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 ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
0566fdcaaa6af30f58a833750c46d33abf7a323c
|
167c6226bc77c5daaedab007dfdad4377f588ef4
|
/java/ql/test/stubs/jinjava-2.6.0/com/fasterxml/jackson/databind/node/NumericNode.java
|
dda8f9438433799ab89c794c89cd102cde2e8396
|
[
"MIT"
] |
permissive
|
github/codeql
|
1eebb449a34f774db9e881b52cb8f7a1b1a53612
|
d109637e2d7ab3b819812eb960c05cb31d9d2168
|
refs/heads/main
| 2023-08-20T11:32:39.162059
| 2023-08-18T14:33:32
| 2023-08-18T14:33:32
| 143,040,428
| 5,987
| 1,363
|
MIT
| 2023-09-14T19:36:50
| 2018-07-31T16:35:51
|
CodeQL
|
UTF-8
|
Java
| false
| false
| 1,243
|
java
|
// Generated automatically from com.fasterxml.jackson.databind.node.NumericNode for testing purposes
package com.fasterxml.jackson.databind.node;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.node.JsonNodeType;
import com.fasterxml.jackson.databind.node.ValueNode;
import java.math.BigDecimal;
import java.math.BigInteger;
abstract public class NumericNode extends ValueNode
{
protected NumericNode(){}
public abstract BigDecimal decimalValue();
public abstract BigInteger bigIntegerValue();
public abstract JsonParser.NumberType numberType();
public abstract Number numberValue();
public abstract String asText();
public abstract boolean canConvertToInt();
public abstract boolean canConvertToLong();
public abstract double doubleValue();
public abstract int intValue();
public abstract long longValue();
public final JsonNodeType getNodeType(){ return null; }
public final double asDouble(){ return 0; }
public final double asDouble(double p0){ return 0; }
public final int asInt(){ return 0; }
public final int asInt(int p0){ return 0; }
public final long asLong(){ return 0; }
public final long asLong(long p0){ return 0; }
}
|
[
"atorralba@users.noreply.github.com"
] |
atorralba@users.noreply.github.com
|
e0bce5f19517dce3a856cd4cc2cc2dc7def0d141
|
b345f82f22f6607a6dcff8ef86c44dce80e8f378
|
/subprojects/griffon-core-java8/src/main/java/griffon/core/editors/LocalDateTimePropertyEditor.java
|
d7e0e09582f49304e39d18742cb8c6e289318dda
|
[
"Apache-2.0"
] |
permissive
|
eunsebi/griffon
|
2296201165b0e4842e84d8764a7bde6f1f9ca56a
|
52a2c4bb33953438d62fffd0e4b7d7740930bb0d
|
refs/heads/master
| 2021-01-01T20:36:01.491286
| 2017-06-22T08:45:33
| 2017-06-22T08:45:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,239
|
java
|
/*
* Copyright 2008-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 griffon.core.editors;
import griffon.core.formatters.Formatter;
import griffon.core.formatters.LocalDateTimeFormatter;
import griffon.metadata.PropertyEditorFor;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeParseException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import static griffon.util.GriffonNameUtils.isBlank;
/**
* @author Andres Almiray
* @since 2.4.0
*/
@PropertyEditorFor(LocalDateTime.class)
public class LocalDateTimePropertyEditor extends AbstractPropertyEditor {
protected void setValueInternal(Object value) {
if (null == value) {
super.setValueInternal(null);
} else if (value instanceof CharSequence) {
handleAsString(String.valueOf(value));
} else if (value instanceof LocalDateTime) {
super.setValueInternal(value);
} else if (value instanceof LocalDate) {
super.setValueInternal(LocalDateTime.of((LocalDate) value, LocalTime.of(0, 0, 0, 0)));
} else if (value instanceof Date) {
handleAsDate((Date) value);
} else if (value instanceof Calendar) {
handleAsCalendar((Calendar) value);
} else if (value instanceof Number) {
handleAsDate(new Date(((Number) value).longValue()));
} else if (value instanceof List) {
handleAsList((List) value);
} else {
throw illegalValue(value, LocalDateTime.class);
}
}
protected void handleAsDate(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
handleAsCalendar(c);
}
protected void handleAsCalendar(Calendar value) {
int h = value.get(Calendar.HOUR);
int i = value.get(Calendar.MINUTE);
int s = value.get(Calendar.SECOND);
int n = value.get(Calendar.MILLISECOND) * 1000;
super.setValueInternal(LocalDateTime.of(LocalDate.ofEpochDay(value.getTime().getTime()), LocalTime.of(h, i, s, n)));
}
protected void handleAsString(String str) {
if (isBlank(str)) {
super.setValueInternal(null);
return;
}
try {
super.setValueInternal(LocalDateTime.parse(str));
} catch (DateTimeParseException dtpe) {
throw illegalValue(str, LocalDateTime.class, dtpe);
}
}
protected Formatter<LocalDateTime> resolveFormatter() {
return isBlank(getFormat()) ? null : new LocalDateTimeFormatter(getFormat());
}
protected void handleAsList(List<?> list) {
if (list.isEmpty()) {
super.setValueInternal(null);
return;
}
List<Object> values = new ArrayList<>();
values.addAll(list);
switch (list.size()) {
case 7:
// ok
break;
case 6:
values.add(0d);
break;
case 5:
values.add(0d);
values.add(0d);
break;
case 4:
values.add(0d);
values.add(0d);
values.add(0d);
break;
case 3:
values.add(0d);
values.add(0d);
values.add(0d);
values.add(0d);
break;
default:
throw illegalValue(list, LocalDateTime.class);
}
for (int i = 0, valuesSize = values.size(); i < valuesSize; i++) {
Object val = values.get(i);
if (val instanceof Number) {
values.set(i, parse((Number) val));
} else if (val instanceof CharSequence) {
values.set(i, parse(String.valueOf(val)));
} else {
throw illegalValue(list, LocalDateTime.class);
}
}
super.setValueInternal(
LocalDateTime.of(
(Integer) values.get(0),
(Integer) values.get(1),
(Integer) values.get(2),
(Integer) values.get(3),
(Integer) values.get(4),
(Integer) values.get(5),
(Integer) values.get(6)
)
);
}
protected int parse(String val) {
try {
return Integer.parseInt(val.trim());
} catch (NumberFormatException e) {
throw illegalValue(val, LocalDateTime.class, e);
}
}
protected int parse(Number val) {
return val.intValue();
}
}
|
[
"aalmiray@gmail.com"
] |
aalmiray@gmail.com
|
3df2d5428de988d4677e2270bc968a58f78af461
|
d4dbb0571226af5809cc953e73924d505094e211
|
/Hibernate/09.Workshop/AirConditionerTestingSystem/src/main/java/app/repositories/ReportRepository.java
|
e54dfb50ac01e8ee10c188dc476ca24eb16c563c
|
[] |
no_license
|
vasilgramov/database-fundamentals
|
45e258e965e85514e60b849d9049737ae25e81c0
|
0ebe74ab4bffef0d29d6ee2e200f07bdc24fe6bf
|
refs/heads/master
| 2021-06-18T17:54:36.238976
| 2017-07-10T14:49:44
| 2017-07-10T14:49:44
| 89,739,950
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 326
|
java
|
package app.repositories;
import app.domains.entities.reports.Report;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import javax.transaction.Transactional;
@Repository
@Transactional
public interface ReportRepository extends JpaRepository<Report, Long> {
}
|
[
"gramovv@gmail.com"
] |
gramovv@gmail.com
|
fb7cfb8aa970b08f687b258947c6af6e5a31adbc
|
d44ca237ce9c8e6d3115956ed3eda0e6f3c66fe0
|
/jscenegraph/src/jscenegraph/database/inventor/shapenodes/soshape_trianglesort.java
|
1f5df0f5faa82e9d7de861f8725af30e7de2bb01
|
[
"BSD-3-Clause"
] |
permissive
|
YvesBoyadjian/Koin3D
|
bf0128a91ee90b1eaf2127aa8f4903b23680c2db
|
5b89e63fc460882f1acb642ff6323f6acdfd6160
|
refs/heads/master
| 2023-06-22T18:18:47.413274
| 2023-06-16T10:34:47
| 2023-06-16T10:34:47
| 139,198,732
| 16
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 139
|
java
|
/**
*
*/
package jscenegraph.database.inventor.shapenodes;
/**
* @author Yves Boyadjian
*
*/
public class soshape_trianglesort {
}
|
[
"yboyadjian@hotmail.fr"
] |
yboyadjian@hotmail.fr
|
e529864c269de071e8ae9995739c600e3e1b4c1b
|
e947cf88ce73c8d0db01d170539e989f631728f3
|
/.svn/pristine/e5/e529864c269de071e8ae9995739c600e3e1b4c1b.svn-base
|
064f927e2a9afb11956694c7b87ad8ab3dd3ef61
|
[] |
no_license
|
codeclimate-testing/java-plazma
|
8537f572229253c6a28f0bc58b32d8ad619b9929
|
d2f343564cd59882e43b1a1efede7a3b403e2bdb
|
refs/heads/master
| 2021-01-21T05:36:14.105653
| 2017-09-05T21:38:32
| 2017-09-05T21:38:32
| 101,927,837
| 0
| 1
| null | 2017-10-19T13:15:00
| 2017-08-30T20:53:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,897
|
/*
* Copyright (C) 2005-2010 Oleh Hapon ohapon@users.sourceforge.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Oleh Hapon
* Kyiv, UKRAINE
* ohapon@users.sourceforge.net
*/
/*
* Created on 09.07.2007
*
*/
package org.plazmaforge.bsolution.finance.client.swt.forms.common;
import org.eclipse.swt.widgets.Composite;
import org.plazmaforge.bsolution.finance.common.beans.OperationRegister;
import org.plazmaforge.framework.client.swt.controls.XCombo;
/**
* @author Oleh Hapon
* $Id: XOperationTypeCombo.java,v 1.2 2010/04/28 06:31:07 ohapon Exp $
*/
public class XOperationTypeCombo extends XCombo {
public XOperationTypeCombo(Composite parent, int style) {
super(parent, style);
}
public XOperationTypeCombo(Composite parent, int style, int toolStyle) {
super(parent, style, toolStyle);
}
public void init() {
super.init();
addValue(OperationRegister.DEBIT, Messages.getString("XOperationTypeCombo.operation.type.debit")); //$NON-NLS-1$
addValue(OperationRegister.CREDIT, Messages.getString("XOperationTypeCombo.operation.type.credit")); //$NON-NLS-1$
}
}
|
[
"abaldwinhunter@codeclimate.com"
] |
abaldwinhunter@codeclimate.com
|
|
02ba9827461a6d8f81ab07205ea8fa75bcc97aed
|
7fa17fdef7db6173005b78d76d3a2877831552c1
|
/project-model-maven-tests/src/test/java/org/jboss/seam/forge/maven/dependencies/RepositoryLookupTest.java
|
281196086ab36f0441d68cd2e98fa2a1da69291d
|
[] |
no_license
|
paulbakker/forge
|
1893517c84c22540eb0f74708bc1f80c486f1f99
|
93fc30c6417d6fe95d03d670d699a3de8822f14d
|
refs/heads/master
| 2021-01-15T22:02:34.301934
| 2011-04-24T22:18:36
| 2011-04-24T22:18:36
| 1,573,810
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,810
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.seam.forge.maven.dependencies;
import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.forge.maven.util.ProjectModelTest;
import org.jboss.seam.forge.project.dependencies.Dependency;
import org.jboss.seam.forge.project.dependencies.DependencyBuilder;
import org.jboss.seam.forge.project.dependencies.DependencyMetadata;
import org.jboss.seam.forge.project.dependencies.DependencyRepository;
import org.jboss.seam.forge.project.dependencies.DependencyRepositoryImpl;
import org.jboss.seam.forge.project.dependencies.DependencyResolver;
import org.jboss.seam.forge.project.facets.DependencyFacet.KnownRepository;
import org.jboss.seam.forge.resources.DependencyResource;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
*/
@Singleton
@RunWith(Arquillian.class)
public class RepositoryLookupTest extends ProjectModelTest
{
@Deployment
public static JavaArchive getTestArchive()
{
return createTestArchive()
.addManifestResource(
"META-INF/services/org.jboss.seam.forge.project.dependencies.DependencyResolverProvider");
}
@Inject
private DependencyResolver resolver;
@Test
public void testResolveVersions() throws Exception
{
Dependency dep = DependencyBuilder.create("com.ocpsoft:prettyfaces-jsf2");
DependencyRepository repo = new DependencyRepositoryImpl(KnownRepository.CENTRAL);
List<Dependency> versions = resolver.resolveVersions(dep, Arrays.asList(repo));
assertTrue(versions.size() > 4);
}
@Test
public void testResolveVersionsStaticVersion() throws Exception
{
Dependency dep = DependencyBuilder.create("com.ocpsoft:prettyfaces-jsf2:3.2.0");
DependencyRepository repo = new DependencyRepositoryImpl(KnownRepository.CENTRAL);
List<Dependency> versions = resolver.resolveVersions(dep, Arrays.asList(repo));
assertTrue(versions.size() >= 1);
}
@Test
public void testResolveVersionsStaticVersionSnapshot() throws Exception
{
Dependency dep = DependencyBuilder.create("org.jboss.errai.forge:forge-errai:1.0-SNAPSHOT");
DependencyRepository repo = new DependencyRepositoryImpl(KnownRepository.JBOSS_NEXUS);
List<Dependency> versions = resolver.resolveVersions(dep, repo);
assertTrue(versions.size() >= 1);
}
@Test
public void testResolveArtifacts() throws Exception
{
Dependency dep = DependencyBuilder.create("org.jboss.errai.forge:forge-errai");
DependencyRepository repo = new DependencyRepositoryImpl(KnownRepository.JBOSS_NEXUS);
List<DependencyResource> artifacts = resolver.resolveArtifacts(dep, Arrays.asList(repo));
assertTrue(artifacts.size() >= 1);
}
@Test
public void testResolveArtifactsSnapshotStaticVersion() throws Exception
{
Dependency dep = DependencyBuilder.create("org.jboss.errai.forge:forge-errai:[1.0-SNAPSHOT]");
DependencyRepository repo = new DependencyRepositoryImpl(KnownRepository.JBOSS_NEXUS);
List<DependencyResource> artifacts = resolver.resolveArtifacts(dep, Arrays.asList(repo));
assertTrue(artifacts.size() >= 1);
}
@Test
public void testResolveArtifactsStaticVersion() throws Exception
{
Dependency dep = DependencyBuilder.create("com.ocpsoft:prettyfaces-jsf2:[3.2.0]");
DependencyRepository repo = new DependencyRepositoryImpl(KnownRepository.CENTRAL);
List<DependencyResource> artifacts = resolver.resolveArtifacts(dep, Arrays.asList(repo));
assertTrue(artifacts.size() >= 1);
}
@Test
public void testResolveDependenciesStaticVersion() throws Exception
{
Dependency dep = DependencyBuilder.create("org.jboss.seam.international:seam-international:[3.0.0,)");
DependencyRepository repo = new DependencyRepositoryImpl(KnownRepository.JBOSS_NEXUS);
List<DependencyResource> artifacts = resolver.resolveDependencies(dep, Arrays.asList(repo));
assertTrue(artifacts.size() >= 1);
}
@Test
public void testResolveDependencyMetadata() throws Exception
{
Dependency dep = DependencyBuilder.create("org.jboss.seam.international:seam-international:3.0.0.Final");
DependencyRepository repo = new DependencyRepositoryImpl(KnownRepository.JBOSS_NEXUS);
DependencyMetadata meta = resolver.resolveDependencyMetadata(dep, Arrays.asList(repo));
assertTrue(meta.getDependencies().size() >= 1);
assertTrue(meta.getManagedDependencies().size() >= 1);
}
}
|
[
"lincolnbaxter@gmail.com"
] |
lincolnbaxter@gmail.com
|
9cebcc586f733f464f2cb45037c5874069700b9e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/25/25_3fc0ffc7b28943ba65554081b45e492491e952ec/UserTests/25_3fc0ffc7b28943ba65554081b45e492491e952ec_UserTests_s.java
|
61d39e2f8656c6e3fd71776c619d9c5fd59ac9d7
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,187
|
java
|
package test;
import static org.junit.Assert.*;
import main.*;
import org.junit.Before;
import org.junit.Test;
public class UserTests {
AccessTracker tracker;
@Before
public void setup() {
tracker = new AccessTracker();
}
@Test
public void checkoutAndReturnToolTest() {
User testUser = new User("", "", 12345678);
Tool testTool = new Tool("HITCOO", 15);
testUser.checkoutTool(testTool);
tracker.loadTools();
// Ensures that once a tool has been checked out by a user, the database
// and the system recognize that it has actually been checked out.
assertTrue(testTool.isCheckedOut());
// Ensures that the user actually has the tool
assertTrue(testUser.getToolsCheckedOut().contains(testTool));
testUser.returnTool(testTool);
tracker.loadTools();
// Ensures that once a tool has been returned, the database
// and the system recognize that it has actually been returned.
assertFalse(testTool.isCheckedOut());
// Ensures that the user no longer has the tool
assertFalse(testUser.getToolsCheckedOut().contains(testTool));
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7f9c02ee9a27a94dfdfc200f0a85372174bece06
|
9987110960a600d05c335de20a118da712b29191
|
/android/jdonkey/src/main/java/org/dkf/jmule/views/AbstractAdapter.java
|
c30f386e923ef97cdbd56aaf74775cc15a4057a8
|
[
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
a-pavlov/jed2k
|
57a9a23a018cf52f7aaa54bc977cc9be02b6c8e8
|
c27cc2b28c01789e09511f8446934e6555863858
|
refs/heads/master
| 2023-08-31T20:22:28.949276
| 2023-08-22T16:58:22
| 2023-08-22T16:58:22
| 35,595,139
| 123
| 55
|
NOASSERTION
| 2023-08-21T19:15:39
| 2015-05-14T06:32:38
|
Java
|
UTF-8
|
Java
| false
| false
| 3,176
|
java
|
/*
* Created by Angel Leon (@gubatron), Alden Torres (aldenml)
* Copyright (c) 2011-2014, FrostWire(R). All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.dkf.jmule.views;
import android.content.Context;
import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
/**
*
* @author gubatron
* @author aldenml
*
*/
public abstract class AbstractAdapter<T> extends ArrayAdapter<T> {
private final int layoutResId;
public AbstractAdapter(Context context, int layoutResId) {
super(context, 0);
this.layoutResId = layoutResId;
}
@Override
public final View getView(int position, View convertView, ViewGroup parent) {
T item = getItem(position);
if (convertView == null) {
convertView = View.inflate(getContext(), layoutResId, null);
}
setupView(convertView, parent, item);
return convertView;
}
@SuppressWarnings("unchecked")
protected final <V extends View> V findView(View view, int id) {
return (V) getView(view, getHolder(view), id);
}
protected abstract void setupView(View view, ViewGroup parent, T item);
private SparseArray<View> getHolder(View view) {
@SuppressWarnings("unchecked")
SparseArray<View> h = (SparseArray<View>) view.getTag();
if (h == null) {
h = new SparseArray<View>();
view.setTag(h);
}
return h;
}
private View getView(View view, SparseArray<View> h, int id) {
View v = null;
int index = h.indexOfKey(id);
if (index < 0) {
v = view.findViewById(id);
h.put(id, v);
} else {
v = h.valueAt(index);
}
return v;
}
public static abstract class OnItemClickAdapter<T> implements OnItemClickListener {
@Override
public final void onItemClick(AdapterView<?> parent, View view, int position, long id) {
try {
@SuppressWarnings("unchecked")
AbstractAdapter<T> adapter = (AbstractAdapter<T>) parent.getAdapter();
onItemClick(parent, view, adapter, position, id);
} catch (ClassCastException e) {
// ignore
}
}
public abstract void onItemClick(AdapterView<?> parent, View view, AbstractAdapter<T> adapter, int position, long id);
}
}
|
[
"dkfsoft@gmail.com"
] |
dkfsoft@gmail.com
|
72b8989ff50ea265f6c6f34d067e0b2deae86fce
|
238d89f2c469b32986be45db254493a53f0d3a1b
|
/spring-boot-self/src/main/java/com/spring/boot/order/handler/HandlerType.java
|
6ff4af0a596384f2ba9a3d0631a685e15f8efaee
|
[
"Apache-2.0"
] |
permissive
|
dongzl/spring-book-code
|
f4f11747f6cf16d89102ea36b1482e0d78c27d19
|
9afbea0e5aad155fc23a631f2d989687c40b4247
|
refs/heads/master
| 2022-12-24T18:06:35.409066
| 2020-12-12T04:35:35
| 2020-12-12T04:35:35
| 176,476,679
| 0
| 1
|
Apache-2.0
| 2022-12-16T04:59:18
| 2019-03-19T09:37:14
|
Java
|
UTF-8
|
Java
| false
| false
| 496
|
java
|
package com.spring.boot.order.handler;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author dongzonglei
* @description
* @date 2019-09-14 17:52
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface HandlerType {
String value();
}
|
[
"dzllikelsw@163.com"
] |
dzllikelsw@163.com
|
7364bb13a89a9e3c515b88c1b64d5f106fa4d9bf
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/mc/cost/ds/MC_COST_3009_DDataSet.java
|
d3ed41317c71d06ddc2756c7e268a133c29bc6a0
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,687
|
java
|
/***************************************************************************************************
* 파일명 : .java
* 기능 : 독자우대-구독신청
* 작성일자 : 2007-05-22
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.mc.cost.ds;
import java.sql.*;
import java.util.*;
import somo.framework.db.*;
import somo.framework.util.*;
import chosun.ciis.mc.cost.dm.*;
import chosun.ciis.mc.cost.rec.*;
/**
*
*/
public class MC_COST_3009_DDataSet extends somo.framework.db.BaseDataSet implements java.io.Serializable{
public String errcode;
public String errmsg;
public MC_COST_3009_DDataSet(){}
public MC_COST_3009_DDataSet(String errcode, String errmsg){
this.errcode = errcode;
this.errmsg = errmsg;
}
public void setErrcode(String errcode){
this.errcode = errcode;
}
public void setErrmsg(String errmsg){
this.errmsg = errmsg;
}
public String getErrcode(){
return this.errcode;
}
public String getErrmsg(){
return this.errmsg;
}
public void getValues(CallableStatement cstmt) throws SQLException{
this.errcode = Util.checkString(cstmt.getString(1));
this.errmsg = Util.checkString(cstmt.getString(2));
}
}/*----------------------------------------------------------------------------------------------------
Web Tier에서 DataSet 객체 관련 코드 작성시 사용하십시오.
<%
MC_COST_3009_DDataSet ds = (MC_COST_3009_DDataSet)request.getAttribute("ds");
%>
Web Tier에서 Record 객체 관련 코드 작성시 사용하십시오.
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 DataSet 객체의 <%= %> 작성시 사용하십시오.
<%= ds.getErrcode()%>
<%= ds.getErrmsg()%>
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 Record 객체의 <%= %> 작성시 사용하십시오.
----------------------------------------------------------------------------------------------------*/
/* 작성시간 : Fri May 08 15:44:43 KST 2009 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
dcd5cef79e392f8fc540e86b2f8f2c6a0e05d96c
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/openzipkin--zipkin/2fe5142e08b4d74bd38da4ff5837e969777755da/before/IndexNameFormatter.java
|
8f21b8e59dc091446b1387d69970764ce9ed4939
|
[] |
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
| 5,094
|
java
|
/**
* Copyright 2015-2017 The OpenZipkin 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 zipkin.storage.elasticsearch.http;
import com.google.auto.value.AutoValue;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.TimeZone;
import javax.annotation.Nullable;
import zipkin.internal.Util;
@AutoValue
abstract class IndexNameFormatter {
static Builder builder() {
return new AutoValue_IndexNameFormatter.Builder();
}
abstract Builder toBuilder();
private static final String DAILY_INDEX_FORMAT = "yyyy-MM-dd";
private static final TimeZone UTC = TimeZone.getTimeZone("UTC");
abstract String index();
abstract char dateSeparator();
abstract ThreadLocal<SimpleDateFormat> dateFormat(); // SimpleDateFormat isn't thread-safe
@AutoValue.Builder static abstract class Builder {
abstract Builder index(String index);
abstract Builder dateSeparator(char dateSeparator);
abstract Builder dateFormat(ThreadLocal<SimpleDateFormat> dateFormat);
abstract char dateSeparator();
final IndexNameFormatter build() {
return dateFormat(new ThreadLocal<SimpleDateFormat>() {
@Override protected SimpleDateFormat initialValue() {
SimpleDateFormat result =
new SimpleDateFormat(DAILY_INDEX_FORMAT.replace('-', dateSeparator()));
result.setTimeZone(TimeZone.getTimeZone("UTC"));
return result;
}
}).autoBuild();
}
abstract IndexNameFormatter autoBuild();
}
/**
* Returns a set of index patterns that represent the range provided. Notably, this compresses
* months or years using wildcards (in order to send smaller API calls).
*
* <p>For example, if {@code beginMillis} is 2016-11-30 and {@code endMillis} is 2017-01-02, the
* result will be 2016-11-30, 2016-12-*, 2017-01-01 and 2017-01-02.
*/
List<String> formatTypeAndRange(@Nullable String type, long beginMillis, long endMillis) {
GregorianCalendar current = midnightUTC(beginMillis);
GregorianCalendar end = midnightUTC(endMillis);
if (current.equals(end)) {
return Collections.singletonList(formatTypeAndTimestamp(type, current.getTimeInMillis()));
}
String prefix = prefix(type);
List<String> indices = new ArrayList<>();
while (current.compareTo(end) <= 0) {
if (current.get(Calendar.MONTH) == 0 && current.get(Calendar.DATE) == 1) {
// attempt to compress a year
current.set(Calendar.DAY_OF_YEAR, current.getActualMaximum(Calendar.DAY_OF_YEAR));
if (current.compareTo(end) <= 0) {
indices.add(
String.format("%s-%s%c*", prefix, current.get(Calendar.YEAR), dateSeparator()));
current.add(Calendar.DATE, 1); // rollover to next year
continue;
} else {
current.set(Calendar.DAY_OF_YEAR, 1); // rollback to first of the year
}
} else if (current.get(Calendar.DATE) == 1) {
// attempt to compress a month
current.set(Calendar.DATE, current.getActualMaximum(Calendar.DATE));
if (current.compareTo(end) <= 0) {
indices.add(String.format("%s-%s%c%02d%c*", prefix,
current.get(Calendar.YEAR), dateSeparator(),
current.get(Calendar.MONTH) + 1, dateSeparator()
));
current.add(Calendar.DATE, 1); // rollover to next month
continue;
} else {
current.set(Calendar.DATE, 1); // rollback to first of the month
}
}
indices.add(formatTypeAndTimestamp(type, current.getTimeInMillis()));
current.add(Calendar.DATE, 1);
}
return indices;
}
static GregorianCalendar midnightUTC(long epochMillis) {
GregorianCalendar result = new GregorianCalendar(UTC);
result.setTimeInMillis(Util.midnightUTC(epochMillis));
return result;
}
String formatTypeAndTimestamp(@Nullable String type, long timestampMillis) {
return prefix(type) + "-" + dateFormat().get().format(new Date(timestampMillis));
}
private String prefix(@Nullable String type) {
return type != null ? index() + ":" + type : index();
}
// for testing
long parseDate(String timestamp) {
try {
return dateFormat().get().parse(timestamp).getTime();
} catch (ParseException e) {
throw new AssertionError(e);
}
}
String formatType(@Nullable String type) {
return prefix(type) + "-*";
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
33434e5d14c1851d6959a04ec673b68787349778
|
ff5f00be10ef21710493902d0ad334c556ac1221
|
/pkuhit.xap-api/src/main/java/pkuhit/xap/file/FileObject.java
|
8279bc452089998502fa6a64a7ac9a7cf7ac6614
|
[] |
no_license
|
sun-wangbaiyu/emr-code
|
2ed323a682f42db1ce3c3c61c7680de2f80d6290
|
034f2a6a969b55ff97c8b8cdaff1e0c0615a0dc7
|
refs/heads/master
| 2020-05-16T09:14:30.758529
| 2017-11-19T03:31:40
| 2017-11-19T03:31:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 927
|
java
|
package pkuhit.xap.file;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class FileObject
{
String id;
String name;
Long size;
ObjectData data;
public FileObject(String id, Long size, InputStream in) throws IOException
{
this.id = id;
this.size = size;
this.data = new ObjectData(in);
}
public String getId()
{
return id;
}
public Long getSize()
{
return size;
}
public InputStream asInputStream() throws IOException
{
return data.asInputStream();
}
public byte[] asByteArray() throws IOException
{
return this.data.asByteArray();
}
public void writeTo(OutputStream out) throws IOException
{
data.writeTo(out);
}
public enum Type
{
BIZ, BASE
}
}
|
[
"149516374@qq.com"
] |
149516374@qq.com
|
ba67c38a634985f22e6d49d21555a7ae7a305468
|
30debfb588d3df553019a29d761f53698564e8c8
|
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201609/cm/DisplayAttribute.java
|
ed32a3952be01d6d84305d91b20397304f67c3ba
|
[
"Apache-2.0"
] |
permissive
|
jinhyeong/googleads-java-lib
|
8f7a5b9cad5189e45b5ddcdc215bbb4776b614f9
|
872c39ba20f30f7e52d3d4c789a1c5cbefaf80fc
|
refs/heads/master
| 2021-01-19T09:35:38.933267
| 2017-04-03T14:12:43
| 2017-04-03T14:12:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,532
|
java
|
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* DisplayAttribute.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201609.cm;
/**
* Attributes for Text Labels.
*/
public class DisplayAttribute extends com.google.api.ads.adwords.axis.v201609.cm.LabelAttribute implements java.io.Serializable {
/* Background color of the label in RGB format.
* <span class="constraint MatchesRegex">A background
* color string must begin with a '#' character followed by either 6
* or 3 hexadecimal characters (24 vs. 12 bits). This is checked by the
* regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'.</span> */
private java.lang.String backgroundColor;
/* A short description of the label.
* <span class="constraint StringLength">The length
* of this string should be between 0 and 200, inclusive.</span> */
private java.lang.String description;
public DisplayAttribute() {
}
public DisplayAttribute(
java.lang.String labelAttributeType,
java.lang.String backgroundColor,
java.lang.String description) {
super(
labelAttributeType);
this.backgroundColor = backgroundColor;
this.description = description;
}
/**
* Gets the backgroundColor value for this DisplayAttribute.
*
* @return backgroundColor * Background color of the label in RGB format.
* <span class="constraint MatchesRegex">A background
* color string must begin with a '#' character followed by either 6
* or 3 hexadecimal characters (24 vs. 12 bits). This is checked by the
* regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'.</span>
*/
public java.lang.String getBackgroundColor() {
return backgroundColor;
}
/**
* Sets the backgroundColor value for this DisplayAttribute.
*
* @param backgroundColor * Background color of the label in RGB format.
* <span class="constraint MatchesRegex">A background
* color string must begin with a '#' character followed by either 6
* or 3 hexadecimal characters (24 vs. 12 bits). This is checked by the
* regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'.</span>
*/
public void setBackgroundColor(java.lang.String backgroundColor) {
this.backgroundColor = backgroundColor;
}
/**
* Gets the description value for this DisplayAttribute.
*
* @return description * A short description of the label.
* <span class="constraint StringLength">The length
* of this string should be between 0 and 200, inclusive.</span>
*/
public java.lang.String getDescription() {
return description;
}
/**
* Sets the description value for this DisplayAttribute.
*
* @param description * A short description of the label.
* <span class="constraint StringLength">The length
* of this string should be between 0 and 200, inclusive.</span>
*/
public void setDescription(java.lang.String description) {
this.description = description;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof DisplayAttribute)) return false;
DisplayAttribute other = (DisplayAttribute) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj) &&
((this.backgroundColor==null && other.getBackgroundColor()==null) ||
(this.backgroundColor!=null &&
this.backgroundColor.equals(other.getBackgroundColor()))) &&
((this.description==null && other.getDescription()==null) ||
(this.description!=null &&
this.description.equals(other.getDescription())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getBackgroundColor() != null) {
_hashCode += getBackgroundColor().hashCode();
}
if (getDescription() != null) {
_hashCode += getDescription().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(DisplayAttribute.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201609", "DisplayAttribute"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("backgroundColor");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201609", "backgroundColor"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("description");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201609", "description"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"jradcliff@users.noreply.github.com"
] |
jradcliff@users.noreply.github.com
|
2bff81e773c6df44d7aebbbd9ff6cef2abc17152
|
1516f3d9b6d5b9f04800dfb2e74fbb82c593fcbc
|
/model/api/src/main/java/org/keycloak/migration/migrators/MigrateTo1_6_0.java
|
80105861975724e511f25d80be313b95d9f0fde1
|
[
"Apache-2.0"
] |
permissive
|
eugene-chow/keycloak
|
6817603a2c5575cb4b0d1eee04e9b0ff952049d4
|
ec018d27399a292b352aed6e828b33029e65b417
|
refs/heads/master
| 2021-01-22T12:37:29.261882
| 2015-09-29T02:32:16
| 2015-09-29T02:32:16
| 43,339,974
| 0
| 0
| null | 2015-09-29T02:28:00
| 2015-09-29T02:27:57
| null |
UTF-8
|
Java
| false
| false
| 663
|
java
|
package org.keycloak.migration.migrators;
import java.util.List;
import org.keycloak.migration.ModelVersion;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.utils.KeycloakModelUtils;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class MigrateTo1_6_0 {
public static final ModelVersion VERSION = new ModelVersion("1.6.0");
public void migrate(KeycloakSession session) {
List<RealmModel> realms = session.realms().getRealms();
for (RealmModel realm : realms) {
KeycloakModelUtils.setupOfflineTokens(realm);
}
}
}
|
[
"mposolda@gmail.com"
] |
mposolda@gmail.com
|
62f4897a1fc3a3038d1340d0b41c92b3b9233f52
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_2/src/c/c/c/Calc_1_2_2227.java
|
7591318757e596fb2af9d62f025de54af4b5f886
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 131
|
java
|
package c.c.c;
public class Calc_1_2_2227 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
f184ed5e404a6058215f51e20569f3518e236948
|
2b438c607ca0b2ee575eec4752cc7c5c7792f4cc
|
/opencart-rest/src/main/java/com/cherkashyn/vitalii/computer_shop/opencart/domain/CategoryToLayout.java
|
08dc30c652205b19a79945408d08f63d4dda01f9
|
[] |
no_license
|
cherkavi/java-code-example
|
a94a4c5eebd6fb20274dc4852c13e7e8779a7570
|
9c640b7a64e64290df0b4a6820747a7c6b87ae6d
|
refs/heads/master
| 2023-02-08T09:03:37.056639
| 2023-02-06T15:18:21
| 2023-02-06T15:18:21
| 197,267,286
| 0
| 4
| null | 2022-12-15T23:57:37
| 2019-07-16T21:01:20
|
Java
|
UTF-8
|
Java
| false
| false
| 1,279
|
java
|
package com.cherkashyn.vitalii.computer_shop.opencart.domain;
// Generated Sep 27, 2013 3:55:56 AM by Hibernate Tools 3.4.0.CR1
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* OcCategoryToLayout generated by hbm2java
*/
@Entity
@Table(name = "oc_category_to_layout", catalog = "opencart")
public class CategoryToLayout implements java.io.Serializable {
private CategoryToLayoutId id;
private int layoutId;
public CategoryToLayout() {
}
public CategoryToLayout(CategoryToLayoutId id, int layoutId) {
this.id = id;
this.layoutId = layoutId;
}
@EmbeddedId
@AttributeOverrides({
@AttributeOverride(name = "categoryId", column = @Column(name = "category_id", nullable = false)),
@AttributeOverride(name = "storeId", column = @Column(name = "store_id", nullable = false)) })
public CategoryToLayoutId getId() {
return this.id;
}
public void setId(CategoryToLayoutId id) {
this.id = id;
}
@Column(name = "layout_id", nullable = false)
public int getLayoutId() {
return this.layoutId;
}
public void setLayoutId(int layoutId) {
this.layoutId = layoutId;
}
}
|
[
"technik7job@gmail.com"
] |
technik7job@gmail.com
|
6e04df561173b53914e7717271931fdf70c554f4
|
a9c11aea4af4b56d91baaeb51597059fc7a0e7a2
|
/Homework_1/src/main/java/twitter_sentiment/SentimentMapper.java
|
36a8eb393db11302863b48e5f5ef776e4c71ac1b
|
[] |
no_license
|
NCNarayanaKumar/NBA-Tweets-Sentiment-Analysis
|
662c57cfdb5a248661c44fbe939d23bd6cb116be
|
0b379b679cdb1869283b141b34b6b07fa6dd0b50
|
refs/heads/master
| 2021-04-29T14:44:46.260222
| 2017-07-14T19:19:13
| 2017-07-14T19:19:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,088
|
java
|
package twitter_sentiment;
import java.io.IOException;
import java.net.URI;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.lib.input.FileSplit;
import utilities.LookupService;
import utilities.TweetWritable;
/**
* The SentimentMapper scores raw tweet data from Twitter.
*
*
* The goal of the SentimentMapper is to examine every word in every given tweet, asking:
*
* 1) does this word indicate a feeling, sentiment or attitude?
*
* 2) if so, what is the affective score for the word? (Scores are found in a lookup table)
*
* As the tweet is processed, the score for words found in the lookup table are summed.
*
* When the Mapper is done, we will have the following information: - every tweet will have ---- a total score, ---- a
* size, indicating how many words are in the tweet ---- a hit rate, indicating how many times a word in the tweet was
* also found in the lookup table
*
* To store this information, you may or may not find it useful to use the TweetWritable.class found in utilities.
*
*
*
* In this first version of Sentiment processing, we are only processing one topic - tweets about the Clippers on the
* evening of May 1, 2017
*
*
* @author elizabeth corey
*
*/
public class SentimentMapper extends Mapper<LongWritable, Text, Text, TweetWritable> {
private static final String LOOKUP_TABLE_PROPERTY = "lookupTable";
private static final Log LOG = LogFactory.getLog(SentimentMapper.class);
public static LookupService lookupService;
/**
* Before the Mapper starts processing any data, it needs to setup
*
* 1) a new lookup service using the lookup table cached in the driver
*
* 2) a key for the data being processed by this Mapper. We will use the input split's filename as the key.
*
* In this case, the filename is "Clippers_5_1" - so we have information about the tweet topic embedded in the
* filename.
*/
@Override
public void setup(Context context) throws IOException {
// Get the name of the lookup table or use AFINN-111 if none set
String lookupName = context.getConfiguration().get(LOOKUP_TABLE_PROPERTY, "AFINN-111");
URI lookupFile = null;
// retrieve the lookup table from the cache using context.getCacheFiles();
// LOG.info("0000" + lookupName);
URI[] cacheFiles = context.getCacheFiles();
for (int i = 0; i < cacheFiles.length; i++) {
// LOG.info("0000" + FilenameUtils.getName(cacheFiles[i].getPath()));
if (FilenameUtils.getName(cacheFiles[i].getPath()).equals(lookupName))
lookupFile = cacheFiles[i];
}
LOG.info("Using lookup table " + lookupFile.getPath().toString());
// Create and initialize the lookupService using lookupTableURI
lookupService = new LookupService();
lookupService.initialize(lookupFile);
// get the name of the input file from the split and use if for the Mapper's TOPIC
Path inputPath = ((FileSplit) context.getInputSplit()).getPath();
TOPIC.set(inputPath.getName());
}
private static final Text TOPIC = new Text();
private static final TweetWritable TWEET = new TweetWritable();
@Override
public void map(LongWritable key, Text line, Context context) throws IOException, InterruptedException {
/*
* Convert the line, which is received as a Text object, to a String object.
*/
String tweet = line.toString();
/*
* Use the parseText method to get the tweet's text.
*/
String twitterText = parseText(tweet);
if (twitterText == null)
return;
long tweetId = 0;
try {
tweetId = getId(tweet);
} catch (Exception e) {
}
/*
* The line.split("\\W+") call uses regular expressions to split the line up by non-word characters. You can use
* it and then iterate through resulting array of words
*
*/
int scoreCount = 0;
int totalScore = 0;
int wordCount = 0;
for (String word : twitterText.split("\\W+")) {
if (word.length() > 0) {
/*
* Obtain the first word and use the lookupService that you initialized during setup to search for the
* word in your sentiment list
*/
Integer score = lookupService.get(word);
wordCount++;
/*
* If the word is found in the sentiment list, get the number associated with that word. Add the number
* to the score for the tweet.
*/
if (score != null) {
totalScore += score;
scoreCount++;
}
}
}
/*-
* Using the information you gathered when processing the tweet, create a new utilities.TweetWritable.
* Use the setters on TweetWritable to set the following:
* tweet
* nHits (the number of times a word in the tweet was found in the lookup table)
* size (the number of words in a tweet)
* score
*/
TWEET.setNHits(scoreCount);
TWEET.setScore(totalScore);
TWEET.setSize(wordCount);
TWEET.setTweet(tweet);
TWEET.setTweetId(tweetId);
/*
* Call the write method on the Context object to emit a key and a value from the map method. The key is the
* TOPIC defined in the setter; the value is TweetWritable.
*/
context.write(TOPIC, TWEET);
}
/**
* Parse our quirky data. This doesn't generalize.
*
* @param string
*
* @return String containing the textual part of the tweet (or null, if the record is invalid)
*/
String parseText(String string) {
/*
* Make sure the first part is a id -- id example: 858950241151840256. An id is an integer with 18 digits
*/
try {
if (string.length() < 18)
return null;
Long.parseLong(string.substring(0, 17));
} catch (NumberFormatException e) {
return null; // not a valid id
}
/*
* If the records starts with a valid id, then the rest of the record is the tweet's text and we can return it.
*
*/
return string.substring(18);
}
long getId(String string) {
return Long.parseLong(string.substring(0, 17));
}
}
|
[
"cloudera@quickstart.cloudera"
] |
cloudera@quickstart.cloudera
|
aa1d3732fcbb4f42cace676d74df7178dfd6f1e3
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/sas-20181203/src/main/java/com/aliyun/sas20181203/models/DescribeFrontVulPatchListResponse.java
|
338aa4862a54bffb30101dabe88781b0dfdf9b59
|
[
"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,467
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sas20181203.models;
import com.aliyun.tea.*;
public class DescribeFrontVulPatchListResponse 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 DescribeFrontVulPatchListResponseBody body;
public static DescribeFrontVulPatchListResponse build(java.util.Map<String, ?> map) throws Exception {
DescribeFrontVulPatchListResponse self = new DescribeFrontVulPatchListResponse();
return TeaModel.build(map, self);
}
public DescribeFrontVulPatchListResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public DescribeFrontVulPatchListResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public DescribeFrontVulPatchListResponse setBody(DescribeFrontVulPatchListResponseBody body) {
this.body = body;
return this;
}
public DescribeFrontVulPatchListResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
e69a7f5094e13ff426b8d2a53eae2110bf5b5b5a
|
8238bc5b3398bca1bdfab9a18225eb3fbd893cfd
|
/baselibrary/src/main/java/com/fy/base/BaseBean.java
|
da0788f19cc0d9e11301a5814d8a76b3017d5ddc
|
[] |
no_license
|
SetAdapter/MoveNurse
|
2a890ff9a456b9284df69f44fe2616bb306de386
|
c4770363d3b136cbe1a3cf1237d39c07151be2af
|
refs/heads/master
| 2020-04-23T14:02:05.946825
| 2019-02-18T05:12:30
| 2019-02-18T05:12:30
| 171,218,203
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 170
|
java
|
package com.fy.base;
import java.io.Serializable;
/**
* 序列化对象基类
* Created by fangs on 2017/3/13.
*/
public class BaseBean implements Serializable {
}
|
[
"383411934@qq.com"
] |
383411934@qq.com
|
b885f085dc9d53b43490f25a0078bf95ebf24de8
|
3f2fe92f11fe6a012ea87936bedbeb08fd392a1a
|
/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/configuration/XMLUIConfiguration.java
|
5f7bef60825741a81900651bfc789defd81faedc
|
[] |
no_license
|
pulipulichen/dspace-dlll
|
bbb61aa528876e2ce4908fac87bc9b2323baac3c
|
e9379176291c171c19573f7f6c685b6dc995efe1
|
refs/heads/master
| 2022-08-22T21:15:12.751565
| 2022-07-12T14:50:10
| 2022-07-12T14:50:10
| 9,954,185
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,415
|
java
|
/*
* XMLUIConfiguration.java
*
* Version: $Revision: 1.3 $
*
* Date: $Date: 2006/01/11 03:06:43 $
*
* Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
* Institute of Technology. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Hewlett-Packard Company nor the name of the
* Massachusetts Institute of Technology nor the names of their
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package org.dspace.app.xmlui.configuration;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.log4j.Logger;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import org.jdom.xpath.XPath;
/**
* This class reads the XMLUI configuration file.
*
* @author Scott Phillips
*/
public class XMLUIConfiguration
{
/** log4j category */
private static Logger log = Logger.getLogger(XMLUIConfiguration.class);
/** The configured Aspects */
private static List<Aspect> aspects = new ArrayList<Aspect>();
/** The configured Theme rules */
private static List<Theme> themes = new ArrayList<Theme>();
/**
* Initialize the XMLUI Configuration.
*
* Load and parse the xmlui.xconf configuration file for a list of
* installed aspects and themes. Multiple configuration paths may be
* supplied but only the first valid file (exists and readable) will
* be used.
*
* @param configPath Multiple paths configuration paths may be specified
*/
public static void loadConfig(String ... configPaths) throws IOException,
JDOMException
{
if (configPaths == null || configPaths.length == 0)
throw new IllegalStateException(
"The xmlui configuration path must be defined.");
File configFile = null;
for (String configPath : configPaths )
{
if (configPath != null)
configFile = new File(configPath);
if (configFile != null && configFile.exists() && configFile.canRead())
{
log.info("Loading XMLUI configuration from: "+configPath);
break;
}
else
{
log.debug("Faild to load XMLUI configuration from: "+configPath);
}
}
if (configFile == null)
{
String allPaths = "";
boolean first = true;
for (String configPath : configPaths)
{
if (first)
first = false;
else
allPaths += ", ";
allPaths += configPath;
}
throw new IllegalStateException("None of the xmlui configuration paths were valid: "+ allPaths);
}
// FIXME: Sometime in the future require that the xmlui.xconf be valid.
// SAXBuilder builder = new SAXBuilder(true);
SAXBuilder builder = new SAXBuilder();
Document config = builder.build(configFile);
@SuppressWarnings("unchecked") // This cast is correct
List<Element> aspectElements = XPath.selectNodes(config,
"//xmlui/aspects/aspect");
@SuppressWarnings("unchecked") // This cast is correct
List<Element> themeElements = XPath.selectNodes(config,
"//xmlui/themes/theme");
for (Element aspectElement : aspectElements)
{
String path = aspectElement.getAttributeValue("path");
String name = aspectElement.getAttributeValue("name");
if (path == null || path.length() == 0)
throw new IllegalStateException(
"All aspects muth define a path");
aspects.add(new Aspect(name, path));
log.info("Aspect Installed: name='"+name+"', path='"+path+"'.");
}
// Put them in the order that people expect.
Collections.reverse(aspects);
for (Element themeElement : themeElements)
{
String name = themeElement.getAttributeValue("name");
String path = themeElement.getAttributeValue("path");
String id = themeElement.getAttributeValue("id");
String regex = themeElement.getAttributeValue("regex");
String handle = themeElement.getAttributeValue("handle");
if (path == null || path.length() == 0)
throw new IllegalStateException("All themes muth define a path");
themes.add(new Theme(name, path, id, regex, handle));
log.info("Theme Installed: name='"+name+"', path='"+path+"', id='"+id+"', regex='"+regex+"', handle='"+handle+"'.");
}
}
/**
*
* @return The configured Aspect chain.
*/
public static List<Aspect> getAspectChain() {
return aspects;
}
/**
*
* @return The configured Theme rules.
*/
public static List<Theme> getThemeRules() {
return themes;
}
}
|
[
"pulipuli.chen@gmail.com"
] |
pulipuli.chen@gmail.com
|
6534887e7b445f77579d7ceece88c8566b0b8fdb
|
d9958f03e60b0121945e2bc7b4ddd79f1a5245ce
|
/src/main/java/pl/konczak/tries/ihe/pharm/AdxpDelimiter.java
|
a056fc65906505c26462cd130321a458129120da
|
[
"Apache-2.0"
] |
permissive
|
chuddyni/jaxb-pl-hl7-tries
|
d181d0e2f8487d29a520ac68b47b6ce14a63891f
|
d8322a630381de5911348cb9708e5b68d55dfa33
|
refs/heads/master
| 2023-03-18T11:20:38.922488
| 2020-06-15T20:50:45
| 2020-06-15T20:52:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 794
|
java
|
package pl.konczak.tries.ihe.pharm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for adxp.delimiter complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="adxp.delimiter">
* <complexContent>
* <restriction base="{urn:ihe:pharm}ADXP">
* <attribute name="partType" type="{urn:ihe:pharm}AddressPartType" fixed="DEL" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "adxp.delimiter")
public class AdxpDelimiter
extends ADXP
{
}
|
[
"konczak.piotrek@gmail.com"
] |
konczak.piotrek@gmail.com
|
c727da7617d27c2de08831d6849576c092e75488
|
a823d48f9c18a308d389492471f205365bb4e578
|
/0000-java8-master/src/main/java/com/sun/org/apache/xml/internal/security/c14n/InvalidCanonicalizerException.java
|
e888f4663ab04718708167a8f7549c8f208ebc16
|
[] |
no_license
|
liuawen/Learning-Algorithms
|
3e145915ceecb93e88ca92df5dc1d0bf623db429
|
983c93a96ce0807534285782a55b22bb31252078
|
refs/heads/master
| 2023-07-19T17:04:39.723755
| 2023-07-14T14:59:03
| 2023-07-14T14:59:03
| 200,856,810
| 16
| 6
| null | 2023-04-17T19:13:20
| 2019-08-06T13:26:41
|
Java
|
UTF-8
|
Java
| false
| false
| 2,369
|
java
|
/*
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/**
* 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 com.sun.org.apache.xml.internal.security.c14n;
import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
public class InvalidCanonicalizerException extends XMLSecurityException {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* Constructor InvalidCanonicalizerException
*
*/
public InvalidCanonicalizerException() {
super();
}
/**
* Constructor InvalidCanonicalizerException
*
* @param msgID
*/
public InvalidCanonicalizerException(String msgID) {
super(msgID);
}
/**
* Constructor InvalidCanonicalizerException
*
* @param msgID
* @param exArgs
*/
public InvalidCanonicalizerException(String msgID, Object exArgs[]) {
super(msgID, exArgs);
}
/**
* Constructor InvalidCanonicalizerException
*
* @param msgID
* @param originalException
*/
public InvalidCanonicalizerException(String msgID, Exception originalException) {
super(msgID, originalException);
}
/**
* Constructor InvalidCanonicalizerException
*
* @param msgID
* @param exArgs
* @param originalException
*/
public InvalidCanonicalizerException(
String msgID, Object exArgs[], Exception originalException
) {
super(msgID, exArgs, originalException);
}
}
|
[
"157514367@qq.com"
] |
157514367@qq.com
|
803f13cdbc1e333f836777c03abe109968d01b7c
|
053aa31c45cb01706f0ec9be9dc523e926807a09
|
/app/src/main/java/com/alorma/github/ui/activity/issue/IssueAssigneesPresenter.java
|
d6afac276362236167ec76c421034b62ffa6700c
|
[
"MIT"
] |
permissive
|
mikepenz/Gitskarios
|
81d8bf3a7dde4b1e336c8d05f7c52a973933d22b
|
f888e137bc7aa9fdb986378d56be53c1a11797d5
|
refs/heads/develop
| 2021-01-18T19:48:24.243963
| 2016-07-11T17:15:12
| 2016-07-11T17:15:12
| 37,779,386
| 4
| 4
| null | 2015-06-20T17:45:36
| 2015-06-20T17:45:36
| null |
UTF-8
|
Java
| false
| false
| 1,591
|
java
|
package com.alorma.github.ui.activity.issue;
import com.alorma.github.presenter.Presenter;
import com.alorma.github.sdk.bean.dto.response.User;
import com.alorma.github.sdk.bean.info.IssueInfo;
import com.alorma.github.sdk.core.ApiClient;
import com.alorma.github.sdk.core.datasource.RestWrapper;
import com.alorma.github.sdk.core.repository.GenericRepository;
import com.alorma.github.sdk.services.repo.GetRepoCollaboratorsClient;
import java.util.List;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
public class IssueAssigneesPresenter extends Presenter<IssueInfo, List<User>> {
@Override
public void load(IssueInfo issueInfo, Callback<List<User>> listCallback) {
GetRepoCollaboratorsClient contributorsClient =
new GetRepoCollaboratorsClient(issueInfo.repoInfo);
contributorsClient.observable()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnSubscribe(listCallback::showLoading)
.doOnCompleted(listCallback::hideLoading)
.subscribe(users -> listCallback.onResponse(users, true), Throwable::printStackTrace);
}
@Override
public void loadMore(IssueInfo issueInfo, Callback<List<User>> listCallback) {
}
@Override
protected GenericRepository<IssueInfo, List<User>> configRepository(RestWrapper restWrapper) {
return null;
}
@Override
protected RestWrapper getRest(ApiClient apiClient, String token) {
return null;
}
@Override
public void action(List<User> users, Callback<List<User>> listCallback, boolean firstTime) {
}
}
|
[
"bernatbor15@gmail.com"
] |
bernatbor15@gmail.com
|
fd920e38e515056360ea2045c608a64e6acaa453
|
f766baf255197dd4c1561ae6858a67ad23dcda68
|
/app/src/main/java/android/support/v7/widget/ab.java
|
ab510d361dc38164d0e3d17e0922e3712f6e0ab4
|
[] |
no_license
|
jianghan200/wxsrc6.6.7
|
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
|
eb6c56587cfca596f8c7095b0854cbbc78254178
|
refs/heads/master
| 2020-03-19T23:40:49.532494
| 2018-06-12T06:00:50
| 2018-06-12T06:00:50
| 137,015,278
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,037
|
java
|
package android.support.v7.widget;
import android.view.View;
public abstract class ab
{
protected final RecyclerView.h QG;
int QH = Integer.MIN_VALUE;
private ab(RecyclerView.h paramh)
{
this.QG = paramh;
}
public abstract int aU(View paramView);
public abstract int aV(View paramView);
public abstract int aW(View paramView);
public abstract int aX(View paramView);
public abstract void bj(int paramInt);
public final int fr()
{
if (Integer.MIN_VALUE == this.QH) {
return 0;
}
return fu() - this.QH;
}
public abstract int fs();
public abstract int ft();
public abstract int fu();
public abstract int fv();
public abstract int getEnd();
public abstract int getEndPadding();
public abstract int getMode();
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes3-dex2jar.jar!/android/support/v7/widget/ab.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"526687570@qq.com"
] |
526687570@qq.com
|
b60abc971ff41221ef88166971cd30c2647a5b98
|
bccd0b387f574ae2939cb38cc2ff19fa87c8a453
|
/src/main/java/br/com/isaccanedo/blockchain/BlockchainDemo.java
|
7bea987a57788a6d88b2423a493d3004a2590887
|
[
"MIT"
] |
permissive
|
isaccanedo/spring-boot-blockchain
|
0d5ec7b38a85f7a89d941e2a84b8cf9157fcd445
|
a019c9e22776c8f1ffb180c02d7f793dc845a846
|
refs/heads/master
| 2022-12-29T23:09:30.098202
| 2020-10-15T18:38:13
| 2020-10-15T18:38:13
| 304,417,066
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 661
|
java
|
package br.com.isaccanedo.blockchain;
public class BlockchainDemo {
public static void main(String[] args) {
Blockchain blockchain = new Blockchain();
blockchain.addBlock(new String[]{"Isac envia 500 bitcoin para Carlos.", "Ricardo envia 100 bitcoin para Isac."});
blockchain.addBlock(new String[]{"Vanessa envia 200 bitcoin para Karina."});
blockchain.addBlock(new String[]{"Santana envia 40 bitcoin para Pedro."});
System.out.println("Hash de blocos:");
for(Block block : blockchain.getBlocks()) {
System.out.println("Bloco #" + block.getIndex() + ": " + block.getHash());
}
}
}
|
[
"isaccanedo@gmail.com"
] |
isaccanedo@gmail.com
|
a7aed33bd2ef60ef7957a5b4ebeb3e3de9e56453
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2009-11-01/seasar2-2.4.40/seasar2/s2-extension/src/main/java/org/seasar/extension/jdbc/types/CalendarTimestampType.java
|
6c8df77450f8ab7287738c0e745bd933e4f09a37
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,063
|
java
|
/*
* Copyright 2004-2009 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.extension.jdbc.types;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.Calendar;
import org.seasar.extension.jdbc.ValueType;
import org.seasar.framework.util.CalendarConversionUtil;
/**
* {@link Timestamp}と互換性をもつ{@link Calendar}用の{@link ValueType}です。
*
* @author taedium
*
*/
public class CalendarTimestampType extends TimestampType {
public Object getValue(ResultSet resultSet, int index) throws SQLException {
return toCalendar(super.getValue(resultSet, index));
}
public Object getValue(ResultSet resultSet, String columnName)
throws SQLException {
return toCalendar(super.getValue(resultSet, columnName));
}
public Object getValue(CallableStatement cs, int index) throws SQLException {
return toCalendar(super.getValue(cs, index));
}
public Object getValue(CallableStatement cs, String parameterName)
throws SQLException {
return toCalendar(super.getValue(cs, parameterName));
}
/**
* {@link Calendar}に変換します。
*
* @param value
* 値
* @return {@link Calendar}
*/
protected Calendar toCalendar(Object value) {
return CalendarConversionUtil.toCalendar(value);
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
4616d1f320e5adaff4b3f9d69ffb069e77f13ea1
|
9568042cd8a05697c4175e58dd3c327922000967
|
/model/io/src/main/java/org/collada/_2005/_11/colladaschema/GlSampler3D.java
|
308e8baf7c979c8e95ad545df45be2495b53a76a
|
[] |
no_license
|
omni360/moredread
|
c6f447dd1b3bd6b96b4868ef98e33957cd218101
|
2b5cafb1eb0f7db80efa2c787263c791eaafef71
|
refs/heads/master
| 2020-12-24T16:41:18.215717
| 2011-10-03T14:19:30
| 2011-10-03T14:19:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,166
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2011.09.27 at 09:19:50 PM MESZ
//
package org.collada._2005._11.colladaschema;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
*
* A three-dimensional texture sampler for the GLSL profile.
*
*
* <p>Java class for gl_sampler3D complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="gl_sampler3D">
* <complexContent>
* <extension base="{http://www.collada.org/2005/11/COLLADASchema}fx_sampler3D_common">
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "gl_sampler3D")
public class GlSampler3D
extends FxSampler3DCommon
{
}
|
[
"landru@untoldwind.net"
] |
landru@untoldwind.net
|
97ba1ae63ce144ce59e14fa4b57b830e84b824e7
|
15b260ccada93e20bb696ae19b14ec62e78ed023
|
/v2/src/main/java/com/alipay/api/domain/DynamicDataVO.java
|
1e7601446de43dd1c415de905bbf0a209bed02fc
|
[
"Apache-2.0"
] |
permissive
|
alipay/alipay-sdk-java-all
|
df461d00ead2be06d834c37ab1befa110736b5ab
|
8cd1750da98ce62dbc931ed437f6101684fbb66a
|
refs/heads/master
| 2023-08-27T03:59:06.566567
| 2023-08-22T14:54:57
| 2023-08-22T14:54:57
| 132,569,986
| 470
| 207
|
Apache-2.0
| 2022-12-25T07:37:40
| 2018-05-08T07:19:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,045
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 动态数据VO
*
* @author auto create
* @since 1.0, 2023-04-28 13:56:08
*/
public class DynamicDataVO extends AlipayObject {
private static final long serialVersionUID = 8779692233697198853L;
/**
* 动态属性列表,列表类型
*/
@ApiListField("attribute_list")
@ApiField("dynamic_attribute_v_o")
private List<DynamicAttributeVO> attributeList;
/**
* 商品动态数据查询Order,返回时将入参带回
*/
@ApiField("order")
private ItemDynamicQueryOrder order;
public List<DynamicAttributeVO> getAttributeList() {
return this.attributeList;
}
public void setAttributeList(List<DynamicAttributeVO> attributeList) {
this.attributeList = attributeList;
}
public ItemDynamicQueryOrder getOrder() {
return this.order;
}
public void setOrder(ItemDynamicQueryOrder order) {
this.order = order;
}
}
|
[
"auto-publish"
] |
auto-publish
|
ee74c06c35a2ed7dea1d73578f81caa68f6ba8e4
|
31505bbbd81d179645f909dbe91ca3024af752c7
|
/src/main/java/m09/s10/AsNavigableSet.java
|
506a30b5aa0372604c4f499f49fb5860b53fb2f0
|
[] |
no_license
|
Angelica1030/jse
|
bbcad5ca8b40c0cbb4a51beac9397556eb9fcc56
|
6486c1a648438e4d292ba67d0f2024b34c6053f1
|
refs/heads/master
| 2023-07-24T01:26:21.010516
| 2021-04-22T13:38:57
| 2021-04-22T13:38:57
| 360,125,006
| 0
| 0
| null | 2021-09-06T10:12:43
| 2021-04-21T10:20:07
|
Java
|
UTF-8
|
Java
| false
| false
| 1,120
|
java
|
package m09.s10;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.NavigableSet;
import java.util.TreeSet;
public class AsNavigableSet {
public static void main(String[] args) {
Collection<Integer> coll = List.of(5, -3, -1, 12, 27, 5);
NavigableSet<Integer> ns = new TreeSet<>(coll);
System.out.println(coll + " -> " + ns);
System.out.println("Eleven or more: " + ns.ceiling(11));
System.out.println("Zero or less: " + ns.floor(0));
System.out.println("More than -1: " + ns.higher(-1));
System.out.println("Less than -1: " + ns.lower(-1));
System.out.println("Poll the first element: " + ns.pollFirst());
System.out.println("Poll the last element: " + ns.pollLast());
System.out.print("Looping in descending order: ");
Iterator<Integer> it = ns.descendingIterator();
while (it.hasNext()) {
System.out.print(it.next() + " ");
}
System.out.println();
System.out.println("The set in descending order: " + ns.descendingSet());
}
}
|
[
"egalli64@gmail.com"
] |
egalli64@gmail.com
|
e623f8503f83bd79cb508ff8db0c4e65f0f527c0
|
5598faaaaa6b3d1d8502cbdaca903f9037d99600
|
/code_changes/Apache_projects/HDFS-162/375c6b8f2ea934eac4a1e7673479ba20202152c6/~Block.java
|
939cc4dd63cc03158b127fa9992b5eb64d4055f0
|
[] |
no_license
|
SPEAR-SE/LogInBugReportsEmpirical_Data
|
94d1178346b4624ebe90cf515702fac86f8e2672
|
ab9603c66899b48b0b86bdf63ae7f7a604212b29
|
refs/heads/master
| 2022-12-18T02:07:18.084659
| 2020-09-09T16:49:34
| 2020-09-09T16:49:34
| 286,338,252
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,183
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hdfs.protocol;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.hdfs.server.common.GenerationStamp;
import org.apache.hadoop.io.*;
/**************************************************
* A Block is a Hadoop FS primitive, identified by a
* long.
*
**************************************************/
@InterfaceAudience.Private
@InterfaceStability.Evolving
public class Block implements Writable, Comparable<Block> {
public static final String BLOCK_FILE_PREFIX = "blk_";
public static final String METADATA_EXTENSION = ".meta";
static { // register a ctor
WritableFactories.setFactory
(Block.class,
new WritableFactory() {
public Writable newInstance() { return new Block(); }
});
}
public static final Pattern blockFilePattern = Pattern
.compile(BLOCK_FILE_PREFIX + "(-??\\d++)$");
public static final Pattern metaFilePattern = Pattern
.compile(BLOCK_FILE_PREFIX + "(-??\\d++)_(\\d++)\\" + METADATA_EXTENSION
+ "$");
public static boolean isBlockFilename(File f) {
String name = f.getName();
return blockFilePattern.matcher(name).matches();
}
public static long filename2id(String name) {
Matcher m = blockFilePattern.matcher(name);
return m.matches() ? Long.parseLong(m.group(1)) : 0;
}
public static boolean isMetaFilename(String name) {
return metaFilePattern.matcher(name).matches();
}
/**
* Get generation stamp from the name of the metafile name
*/
public static long getGenerationStamp(String metaFile) {
Matcher m = metaFilePattern.matcher(metaFile);
return m.matches() ? Long.parseLong(m.group(2))
: GenerationStamp.GRANDFATHER_GENERATION_STAMP;
}
/**
* Get the blockId from the name of the metafile name
*/
public static long getBlockId(String metaFile) {
Matcher m = metaFilePattern.matcher(metaFile);
return m.matches() ? Long.parseLong(m.group(1)) : 0;
}
private long blockId;
private long numBytes;
private long generationStamp;
public Block() {this(0, 0, 0);}
public Block(final long blkid, final long len, final long generationStamp) {
set(blkid, len, generationStamp);
}
public Block(final long blkid) {
this(blkid, 0, GenerationStamp.GRANDFATHER_GENERATION_STAMP);
}
public Block(Block blk) {
this(blk.blockId, blk.numBytes, blk.generationStamp);
}
/**
* Find the blockid from the given filename
*/
public Block(File f, long len, long genstamp) {
this(filename2id(f.getName()), len, genstamp);
}
public void set(long blkid, long len, long genStamp) {
this.blockId = blkid;
this.numBytes = len;
this.generationStamp = genStamp;
}
/**
*/
public long getBlockId() {
return blockId;
}
public void setBlockId(long bid) {
blockId = bid;
}
/**
*/
public String getBlockName() {
return BLOCK_FILE_PREFIX + String.valueOf(blockId);
}
/**
*/
public long getNumBytes() {
return numBytes;
}
public void setNumBytes(long len) {
this.numBytes = len;
}
public long getGenerationStamp() {
return generationStamp;
}
public void setGenerationStamp(long stamp) {
generationStamp = stamp;
}
/**
*/
public String toString() {
return getBlockName() + "_" + getGenerationStamp();
}
/////////////////////////////////////
// Writable
/////////////////////////////////////
@Override // Writable
public void write(DataOutput out) throws IOException {
writeHelper(out);
}
@Override // Writable
public void readFields(DataInput in) throws IOException {
readHelper(in);
}
final void writeHelper(DataOutput out) throws IOException {
out.writeLong(blockId);
out.writeLong(numBytes);
out.writeLong(generationStamp);
}
final void readHelper(DataInput in) throws IOException {
this.blockId = in.readLong();
this.numBytes = in.readLong();
this.generationStamp = in.readLong();
if (numBytes < 0) {
throw new IOException("Unexpected block size: " + numBytes);
}
}
// write only the identifier part of the block
public void writeId(DataOutput out) throws IOException {
out.writeLong(blockId);
out.writeLong(generationStamp);
}
// Read only the identifier part of the block
public void readId(DataInput in) throws IOException {
this.blockId = in.readLong();
this.generationStamp = in.readLong();
}
@Override // Comparable
public int compareTo(Block b) {
return blockId < b.blockId ? -1 :
blockId > b.blockId ? 1 : 0;
}
@Override // Object
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Block)) {
return false;
}
return compareTo((Block)o) == 0;
}
@Override // Object
public int hashCode() {
//GenerationStamp is IRRELEVANT and should not be used here
return (int)(blockId^(blockId>>>32));
}
}
|
[
"archen94@gmail.com"
] |
archen94@gmail.com
|
ccc752799e6a8db0219378f16647e7f5aef2e785
|
59e292da993a65f5028554dd5ed478f0adf0dbe5
|
/config/config-server/test/com/thoughtworks/go/config/serialization/PipelineConfigsTest.java
|
5431be66dced9adaf15bd7c5a32ac402facda78e
|
[
"Apache-2.0"
] |
permissive
|
willthames/gocd
|
e017c14ae642f22e0e195e9c8981571c018fe393
|
034b713d1c1a657ed63899ff24c2d4f5bdb5d6d7
|
refs/heads/master
| 2020-12-25T12:27:43.182428
| 2014-07-23T16:21:46
| 2014-07-23T16:21:46
| 22,195,370
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,359
|
java
|
/*************************GO-LICENSE-START*********************************
* Copyright 2014 ThoughtWorks, 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.
*************************GO-LICENSE-END***********************************/
package com.thoughtworks.go.config.serialization;
import com.thoughtworks.go.config.*;
import com.thoughtworks.go.config.MagicalGoConfigXmlWriter;
import com.thoughtworks.go.domain.config.Admin;
import com.thoughtworks.go.helper.ConfigFileFixture;
import com.thoughtworks.go.helper.NoOpMetricsProbeService;
import com.thoughtworks.go.helper.PipelineConfigMother;
import com.thoughtworks.go.metrics.service.MetricsProbeService;
import com.thoughtworks.go.util.ConfigElementImplementationRegistryMother;
import com.thoughtworks.go.util.GoConstants;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.junit.Assert.assertThat;
import static org.junit.matchers.JUnitMatchers.hasItem;
public class PipelineConfigsTest {
private MetricsProbeService metricsProbeService = new NoOpMetricsProbeService();
private static final String PIPELINES_WITH_PERMISSION = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+ "<cruise xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
+ "xsi:noNamespaceSchemaLocation=\"cruise-config.xsd\" schemaVersion=\""
+ GoConstants.CONFIG_SCHEMA_VERSION + "\">\n"
+ " <server artifactsdir=\"other-artifacts\">\n"
+ " <security>\n"
+ " <roles>\n"
+ " <role name=\"admin\" />\n"
+ " <role name=\"mingle\" />\n"
+ " </roles>\n"
+ " </security>\n"
+ " </server>\n"
+ " <pipelines group=\"defaultGroup\">\n"
+ " <authorization>\n"
+ " %s "
+ " </authorization>"
+ " <pipeline name=\"pipeline1\" labeltemplate=\"alpha.${COUNT}\">\n"
+ " <materials>\n"
+ " <svn url=\"foobar\" checkexternals=\"true\" />\n"
+ " </materials>\n"
+ " <stage name=\"mingle\">\n"
+ " <jobs>\n"
+ " <job name=\"functional\">\n"
+ " <artifacts>\n"
+ " <artifact src=\"artifact1.xml\" dest=\"cruise-output\" />\n"
+ " </artifacts>\n"
+ " </job>\n"
+ " </jobs>\n"
+ " </stage>\n"
+ " </pipeline>\n"
+ " </pipelines>\n"
+ "</cruise>\n\n";
private static final String VIEW_PERMISSION = " <view>\n"
+ " <user>jez</user>\n"
+ " <user>lqiao</user>\n"
+ " <role>mingle</role>\n"
+ " </view>\n";
private static final String OPERATION_PERMISSION = " <operate>\n"
+ " <user>jez</user>\n"
+ " <user>lqiao</user>\n"
+ " <role>mingle</role>\n"
+ " </operate>\n";
@Test
public void shouldWriteOperatePermissionForGroupCorrectly() {
OperationConfig operationConfig = new OperationConfig(new AdminUser(new CaseInsensitiveString("jez")), new AdminUser(new CaseInsensitiveString("lqiao")), new AdminRole(
new CaseInsensitiveString("mingle")));
Authorization authorization = new Authorization(operationConfig);
PipelineConfig pipelineConfig = PipelineConfigMother.pipelineConfig("pipeline1");
PipelineConfigs pipelineConfigs = new PipelineConfigs(authorization, pipelineConfig);
MagicalGoConfigXmlWriter xmlWriter = new MagicalGoConfigXmlWriter(new ConfigCache(), ConfigElementImplementationRegistryMother.withNoPlugins(),
metricsProbeService);
String xml = xmlWriter.toXmlPartial(pipelineConfigs);
assertThat(xml, is("<pipelines>\n"
+ " <authorization>\n"
+ " <operate>\n"
+ " <user>jez</user>\n"
+ " <user>lqiao</user>\n"
+ " <role>mingle</role>\n"
+ " </operate>\n"
+ " </authorization>\n"
+ " <pipeline name=\"pipeline1\">\n"
+ " <materials>\n"
+ " <svn url=\"http://some/svn/url\" dest=\"svnDir\" />\n"
+ " </materials>\n"
+ " <stage name=\"mingle\">\n"
+ " <jobs />\n"
+ " </stage>\n"
+ " </pipeline>\n"
+ "</pipelines>"));
}
@Test
public void shouldLoadOperationPermissionForPipelines() {
CruiseConfig cruiseConfig = ConfigMigrator.load(configureAuthorization(OPERATION_PERMISSION));
PipelineConfigs group = cruiseConfig.getGroups().first();
assertThat(group.getAuthorization(), instanceOf(Authorization.class));
AdminsConfig actual = group.getAuthorization().getOperationConfig();
assertion(actual);
}
@Test
public void shouldLoadOperationAndViewPermissionForPipelinesNoMatterTheConfigOrder() {
CruiseConfig cruiseConfig = ConfigMigrator.load(configureAuthorization(OPERATION_PERMISSION + VIEW_PERMISSION));
PipelineConfigs group = cruiseConfig.getGroups().first();
assertThat(group.getAuthorization(), instanceOf(Authorization.class));
AdminsConfig actualView = group.getAuthorization().getViewConfig();
AdminsConfig actualOperation = group.getAuthorization().getOperationConfig();
assertion(actualView);
assertion(actualOperation);
}
@Test
public void shouldLoadViewAndOperationPermissionForPipelinesNoMatterTheConfigOrder() {
CruiseConfig cruiseConfig = ConfigMigrator.load(configureAuthorization(VIEW_PERMISSION + OPERATION_PERMISSION));
PipelineConfigs group = cruiseConfig.getGroups().first();
assertThat(group.getAuthorization(), instanceOf(Authorization.class));
AdminsConfig actualView = group.getAuthorization().getViewConfig();
AdminsConfig actualOperation = group.getAuthorization().getOperationConfig();
assertion(actualView);
assertion(actualOperation);
}
private void assertion(AdminsConfig actualView) {
assertThat(actualView, hasItem((Admin) new AdminUser(new CaseInsensitiveString("jez"))));
assertThat(actualView, hasItem((Admin) new AdminUser(new CaseInsensitiveString("lqiao"))));
assertThat(actualView, hasItem((Admin) new AdminRole(new CaseInsensitiveString("mingle"))));
}
private String configureAuthorization(String permission) {
return String.format(PIPELINES_WITH_PERMISSION, permission);
}
}
|
[
"godev@thoughtworks.com"
] |
godev@thoughtworks.com
|
0f2680cf2f5233713fbcd092acc2296d8864593d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/19/19_6234952185dabbf9fc340ec5813fbb79428dd753/ConventConfigurationManager/19_6234952185dabbf9fc340ec5813fbb79428dd753_ConventConfigurationManager_s.java
|
2149ce779e32dae7304f8766f3197ab9392f9a68
|
[] |
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,776
|
java
|
/*
* Copyright (c) 2013. ToppleTheNun
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
* the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.conventnunnery.libraries.config;
import org.bukkit.plugin.Plugin;
import java.io.File;
public class ConventConfigurationManager {
private final Plugin plugin;
/**
* Instantiates a new version of the configuration manager for a plugin
*
* @param plugin Plugin that is using the manager
*/
public ConventConfigurationManager(Plugin plugin) {
this.plugin = plugin;
}
public ConventConfiguration loadConventConfiguration(File file) throws IllegalArgumentException {
if (file == null) {
throw new IllegalArgumentException("File cannot be null");
}
ConventConfiguration c = null;
if (file.getName().endsWith(".yml")) {
c = new ConventYamlConfiguration(plugin, file);
}
return c;
}
public ConventConfigurationGroup loadConventConfigurationGroup(File directory) throws IllegalArgumentException {
if (directory == null) {
throw new IllegalArgumentException(directory.getPath() + " cannot be null");
}
if (!directory.exists() && directory.getName().endsWith("/")) {
directory.mkdirs();
}
if (!directory.isDirectory()) {
throw new IllegalArgumentException(directory.getPath() + " must be a directory");
}
if (!directory.exists() && !directory.getParentFile().mkdirs()) {
throw new IllegalArgumentException(directory.getPath() + " does not exist and cannot be made");
}
ConventConfigurationGroup ccg = new ConventConfigurationGroup();
for (File file : directory.listFiles()) {
if (file.getName().endsWith(".yml")) {
ccg.addConventConfiguration(new ConventYamlConfiguration(plugin, file));
}
}
return ccg;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
58f614b302e8524eeac2210a19b5905e719009db
|
cffbacf1f9d7906af219793787eb954b50d6d1f4
|
/HandCopyGWT2/src/java/br/com/i9/aparato/client/AdminHandCopyAccordion.java
|
f5637836e6bd445cdc46123f1fbfb71c0ec38ea8
|
[] |
no_license
|
geoleite/HandCopy
|
538e51504e014a1ac2cdfac7ef7ef48e7da79fe1
|
2bccc6fa46657a425240931e070968755f6d284c
|
refs/heads/master
| 2021-01-12T03:36:19.539034
| 2017-01-06T20:34:26
| 2017-01-06T20:34:26
| 78,234,627
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,818
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package br.com.i9.aparato.client;
import br.com.easyportal.gwt.client.accordionModel.AMenuHandlerAccordion;
import br.com.easyportal.gwt.client.admin.portal.portal.sis_sistema.Sis_sistemaConsultGWT;
import br.com.i9.aparato.client.handcopy.handcopy2.relatorio.Rel_UsuariosCadastrados;
import br.com.i9.aparato.client.handcopy.handcopy2.relatorio.Rel_UsuariosRequisicoes;
import br.com.i9.aparato.client.handcopy.handcopy2.relatorio.Rel_UsuariosRequisicoesPeriodo;
import br.com.i9.aparato.client.handcopy.handcopy2.relatorio.Rel_UsuariosSaldo;
import br.com.i9.aparato.client.handcopy.handcopy2.req_requisicao.Req_requisicaoConsultGWT;
import br.com.i9.aparato.client.handcopy.handcopy2.ser_servico.Ser_servicoConsultGWT;
import br.com.i9.aparato.client.handcopy.handcopy2.ser_servico.Ser_servicoConsultSetorGWT;
import br.com.i9.aparato.client.handcopy.handcopy2.set_setor.Set_setorConsultGWT;
import br.com.i9.aparato.client.handcopy.handcopy2.sol_solicitacao.MinhasSolicitacoesGWT;
import br.com.i9.aparato.client.handcopy.handcopy2.sol_solicitacao.Sol_solicitacaoInsertGWT;
import br.com.i9.aparato.client.handcopy.handcopy2.vw_col_colaborador.Vw_col_colaboradorConsultGWT;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.TabItem;
import com.extjs.gxt.ui.client.widget.Window;
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.user.client.Timer;
import java.util.HashMap;
/**
*
* @author geoleite
*/
public class AdminHandCopyAccordion extends AMenuHandlerAccordion {
private HashMap<String, TabItem> itens = new HashMap<String, TabItem>();
public AdminHandCopyAccordion() {
setSystem("HANDCOPY");
}
@Override
public void actionEventMenu(Object me, String acao) {
TabItem tabItem = null;
tabItem = itens.get(acao);
if (tabItem == null) {
tabItem = new TabItem();
tabItem.setClosable(true);
tabItem.setLayout(new FitLayout());
ContentPanel cp = new ContentPanel();
cp.setFrame(false);
cp.setBorders(false);
cp.setHeaderVisible(false);
cp.setBodyBorder(false);
cp.setLayout(new FitLayout());
if ("HANDCOPY.setor".equalsIgnoreCase(acao)) {
tabItem.setText("Setores");
cp.add(getSetores());
} else if ("HANDCOPY.Servico".equalsIgnoreCase(acao)) {
tabItem.setText("Servicos");
cp.add(getServico());
} else if ("HANDCOPY.AssociarSetorServico".equalsIgnoreCase(acao)) {
tabItem.setText("Servicos Setor");
cp.add(getServicoSetor());
} else if ("HANDCOPY.Colaborador".equalsIgnoreCase(acao)) {
tabItem.setText("Usuarios");
cp.add(getVW_Colaborador());
} else if ("HANDCOPY.Subordinados".equalsIgnoreCase(acao)) {
tabItem.setText("Usuarios");
cp.add(getVW_Colaborador());
} else if ("HANDCOPY.MinhasSolicitacoes".equalsIgnoreCase(acao)) {
tabItem.setText("Solicitacoes");
cp.add(getMinhasSolicitacoes());
} else if ("HANDCOPY.Requisicoes".equalsIgnoreCase(acao)) {
tabItem.setText("Requisicoes");
cp.add(getRequisicoes());
} else if ("HANDCOPY.UsuCadRel".equalsIgnoreCase(acao)) {
//tabItem.setText("Usuarios Cadastrados");
//cp.add(getMinhasSolicitacoes());
relUsuariosCadastrados();
return;
} else if ("HANDCOPY.UsuReqPeriodoRel".equalsIgnoreCase(acao)) {
//tabItem.setText("Usuarios Cadastrados");
//cp.add(getMinhasSolicitacoes());
relUsuariosRequisicoesPeriodo();
return;
} else if ("HANDCOPY.UsuRequisicoesRel".equalsIgnoreCase(acao)) {
//tabItem.setText("Usuarios Cadastrados");
//cp.add(getMinhasSolicitacoes());
relUsuariosRequisicoes();
return;
} else if ("HANDCOPY.UsuSaldoRel".equalsIgnoreCase(acao)) {
//tabItem.setText("Usuarios Cadastrados");
//cp.add(getMinhasSolicitacoes());
relUsuariosSaldo();
return;
} else if ("HANDCOPY.NovaSolicitacao".equalsIgnoreCase(acao)) {
Sol_solicitacaoInsertGWT sol_solicitacaoInsertGWT = new Sol_solicitacaoInsertGWT();
sol_solicitacaoInsertGWT.setVisible(true);
return;
} else {
MessageBox.alert("Opcão ainda não implementada", "Em breve esta opção estará disponível!", null);
}
if (cp != null) {
tabItem.add(cp);
//Adiciona o tabitem se não existir no tabPanel
getPortalAccordionGWT().getTabPanel().add(tabItem);
itens.put(acao, tabItem);
}
} else {
TabItem tabTemp = getPortalAccordionGWT().getTabPanel().getItemByItemId(acao);
if (tabTemp == null) {
getPortalAccordionGWT().getTabPanel().add(tabItem);
}
}
getPortalAccordionGWT().getTabPanel().setSelection(tabItem);
//getPortalAccordionGWT().setHeight(com.google.gwt.user.client.Window.getClientHeight()-60);
getPortalAccordionGWT().layout();
}
private void relUsuariosCadastrados() {
Rel_UsuariosCadastrados rel = new Rel_UsuariosCadastrados();
rel.setVisible(true);
}
private void relUsuariosSaldo() {
Rel_UsuariosSaldo rel = new Rel_UsuariosSaldo();
rel.setVisible(true);
}
private void relUsuariosRequisicoes() {
Rel_UsuariosRequisicoes rel = new Rel_UsuariosRequisicoes();
rel.setVisible(true);
}
private void relUsuariosRequisicoesPeriodo() {
new Rel_UsuariosRequisicoesPeriodo();
}
private ContentPanel getServicoSetor() {
return new Ser_servicoConsultSetorGWT();
}
private ContentPanel getRequisicoes() {
return new Req_requisicaoConsultGWT();
}
private ContentPanel getMinhasSolicitacoes() {
return new MinhasSolicitacoesGWT();
}
private ContentPanel getSetores() {
return new Set_setorConsultGWT();
}
private ContentPanel getServico() {
return new Ser_servicoConsultGWT();
}
private ContentPanel getVW_Colaborador() {
return new Vw_col_colaboradorConsultGWT();
}
}
|
[
"georgeleitejunior@gmail.com"
] |
georgeleitejunior@gmail.com
|
317da60c66a8092496bafe0ae2bf76f3b5232ce2
|
6451c77ce976b7b927b6345e9dd4c586fd15b317
|
/cgi_kunde2.0_shop/shop/build/hybris/bin/custom/pacoshop/pacoshopfulfilmentprocess/src/com/cgi/pacoshop/fulfilmentprocess/actions/order/OptinSSOAction.java
|
a2acd4a807379857cf3b5ca2f5209f990ad4ea84
|
[] |
no_license
|
dixit-anup/maventotalproject
|
eefae3fbc1de085b3057edd87dcb3605f7e8750b
|
2c0f5581d32dd1aa265e455a9447ab7d160cf5f1
|
refs/heads/master
| 2021-01-16T21:57:39.423961
| 2014-08-21T14:58:18
| 2014-08-21T14:58:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,134
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2013 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package com.cgi.pacoshop.fulfilmentprocess.actions.order;
import com.cgi.pacoshop.fulfilmentprocess.client.ClientStatus;
import com.cgi.pacoshop.fulfilmentprocess.service.SSOFulfillmentService;
import com.cgi.pacoshop.fulfilmentprocess.util.LogHelper;
import de.hybris.platform.orderprocessing.model.OrderProcessModel;
import de.hybris.platform.processengine.action.AbstractSimpleDecisionAction;
import de.hybris.platform.task.RetryLaterException;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
/**
* Action to register a specific customer into the SSO list of "optin".
*
* @author symmetrics - a CGI Group brand <info@symmetrics.de>
* @author Phillipe Bergeron <philippe.bergeron@cgi.com>
* @author Ivan Vorontsov <ivan.vorontsov@cgi.com>
* @version 1.0v Mar 04 2014
* @module hybris - pacoshopcore
* @link http://www.symmetrics.de/
* @copyright 2014 symmetrics - a CGI Group brand
* @see "https://wiki.hybris.com/"
*/
public class OptinSSOAction extends AbstractSimpleDecisionAction<OrderProcessModel>
{
private static final Logger LOGGER = Logger.getLogger(OptinSSOAction.class);
@Resource
private SSOFulfillmentService ssoFulfillmentService;
/*
* (non-Javadoc)
*
* @see
* de.hybris.platform.processengine.action.AbstractSimpleDecisionAction#executeAction(de.hybris.platform.processengine
* .model.BusinessProcessModel)
*/
@Override
public Transition executeAction(final OrderProcessModel orderProcessModel) throws RetryLaterException, Exception
{
ClientStatus status = ssoFulfillmentService.registerAcceptedTerms(orderProcessModel.getOrder());
Transition result = ClientStatus.SUCCESS == status ? Transition.OK : Transition.NOK;
LogHelper.info(LOGGER, result.name());
return result;
}
}
|
[
"dmitry.bilyk@symmetrics.de"
] |
dmitry.bilyk@symmetrics.de
|
c820568edd7f3dcd70684ba7de8f11e1c5247cbd
|
f5398748ea435d203248eb208850a1d36939e3a8
|
/EASy-Standalone/EASyCommandLineTest/testdata/elevator/PL_SimElevator2/src/gui/views/outside/ElevatorPanel.java
|
470172c4c5daa422a1927bf1b3b0fed8cbce3dd2
|
[
"Apache-2.0"
] |
permissive
|
SSEHUB/EASyProducer
|
20b5a01019485428b642bf3c702665a257e75d1b
|
eebe4da8f957361aa7ebd4eee6fff500a63ba6cd
|
refs/heads/master
| 2023-06-25T22:40:15.997438
| 2023-06-22T08:54:00
| 2023-06-22T08:54:00
| 16,176,406
| 12
| 2
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 4,891
|
java
|
package gui.views.outside;
import gui.buttons.$outerview_buttontype;
//import gui.buttons.DefaultButton;
import gui.views.ScrollPanel;
import java.awt.Dimension;
import java.awt.Graphics;
import java.util.ArrayList;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import properties.ProgramSettings;
import gui.buttons.EmergencyButton;
/**
* Eigene Klasse die von JPanel erbt und die einzelnen Etagen aufs Panel
* zeichnet. Implementiert Scrollable, damit es Scrollbar ist.
*
*/
public class ElevatorPanel extends ScrollPanel {
private static final long serialVersionUID = 1L;
private JLabel elevatorImage;
private int iElevatorIndex;
private ArrayList<$outerview_buttontype> callButtons;
private ArrayList<EmergencyButton> emergencyButtons;
/**
* @return the emergencyButtons
*/
public ArrayList<EmergencyButton> getEmergencyButtons() {
return emergencyButtons;
}
public ArrayList<$outerview_buttontype> getCallButtons() {
return callButtons;
}
public int getElevatorIndex() {
return iElevatorIndex;
}
/**
* @return the elevatorImage
*/
public JLabel getElevatorImage() {
return elevatorImage;
}
/**
* Ueberladener Konstruktor.
*/
public ElevatorPanel(int iIndex) {
this.iElevatorIndex = iIndex;
this.callButtons = new ArrayList<$outerview_buttontype>(ProgramSettings.FLOORS);
createPanel();
}
/**
* zeichnet das Panel mit dem Elevator-Image.
*/
public void createPanel() {
this.setLayout(null);
/*
* Ist für das repaint des Graphic-Objektes nun nicht mehr selber
* verantwortlich.
*/
this.setOpaque(false);
this.setPreferredSize(new Dimension(200, Math.max(470, (ProgramSettings.getTotalHeight(ProgramSettings.FLOORS)) + 81)));
this.elevatorImage = new JLabel();
Icon icon = new ImageIcon(getClass().getResource("../../../doorsClosed.gif"));
this.elevatorImage.setIcon(icon);
this.elevatorImage.setBounds(55, this.getPreferredSize().height - 64, 40, 40);
this.add(elevatorImage);
// anzahl buttons pro etage
/*
* #if($controller_synchronized == true)
*/
if (ProgramSettings.FLOORS_BUTTONS == ProgramSettings.ELEVATORS) {
createComponents();
} else {
int iii = Math.round(ProgramSettings.ELEVATORS / ProgramSettings.FLOORS_BUTTONS);
// wenn iii == 1, falls kommazahl und abgerundet wird, dann nur
// buttons, wenn kleiner als anzahl knoepfe/etage
if ((iii == 1)
&& iElevatorIndex < ProgramSettings.FLOORS_BUTTONS) {
createComponents();
}
// wenn iControllerIndex vielfache von iii
if ((iii != 1) && ((iElevatorIndex + 1) % iii) == 0) {
createComponents();
}
}
/*
* #else
*/
createComponents();
/*
* #end
*/
}
private void createComponents() {
createButtons();
createFloorLabels();
if(ProgramSettings.OUTERVIEW_EMERGENCY){
createEmergencyButtons();
}
}
/**
* Diese Methode added Buttons zum hoch oder runterfahren neben die
* Fahrstuehle.
*/
public void createButtons() {
// Rufbuttons erzeugen
for (int i = 0; i < ProgramSettings.FLOORS; i++) {
$outerview_buttontype tmpButton = new $outerview_buttontype(i, iElevatorIndex);
tmpButton.setBounds(110, this.getPreferredSize().height
- (i * ProgramSettings.FLOORS_HEIGHT)
- 45, 50, 20);
callButtons.add(tmpButton);
this.add(tmpButton);
}
}
private void createFloorLabels() {
for(int i = 0; i < ProgramSettings.FLOORS; i++) {
// Label für Etagennummer initialisieren
JLabel lblFloor = new JLabel(Integer.toString(i));
lblFloor.setText(Integer.toString(i));
lblFloor.setPreferredSize(new Dimension(10, 5));
lblFloor.setBounds(35 - (5 * lblFloor.getText().length()), this.getPreferredSize().height
- (i * ProgramSettings.FLOORS_HEIGHT)
- 55, lblFloor.getText().length() * 10, 45);
this.add(lblFloor);
}
}
/**
* Diese Methode erzeugt neben jeder Etage einen Notruf-Button
*/
private void createEmergencyButtons() {
this.emergencyButtons = new ArrayList<EmergencyButton>();
for (int i = 0; i < ProgramSettings.FLOORS; i++) {
EmergencyButton emButton = new EmergencyButton(i, iElevatorIndex, false);
emButton.setBounds(170, this.getPreferredSize().height
- (i * ProgramSettings.FLOORS_HEIGHT) - 45,
20, 20);
emergencyButtons.add(emButton);
this.add(emButton);
}
}
/**
* Diese Methode zeichnet die Rechtecke fuer die Etagen.
*
* @param g
* die gezeichnete Grafik
*/
public void paintComponent(Graphics g) {
for (int i = 0; i < ProgramSettings.FLOORS; i++) {
g.drawRect(ProgramSettings.FLOORS_HEIGHT, this
.getPreferredSize().height
- (i * ProgramSettings.FLOORS_HEIGHT) - 70,
ProgramSettings.FLOORS_HEIGHT,
ProgramSettings.FLOORS_HEIGHT);
}
}
}
|
[
"elscha@sse.uni-hildesheim.de"
] |
elscha@sse.uni-hildesheim.de
|
97628957fe56a2efaf5c77223765675b82cb7a20
|
a4a51084cfb715c7076c810520542af38a854868
|
/src/main/java/com/tencent/liteav/audio/impl/Play/d.java
|
6a7edda7955c4aa067b5885a8baac11f711af899
|
[] |
no_license
|
BharathPalanivelu/repotest
|
ddaf56a94eb52867408e0e769f35bef2d815da72
|
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
|
refs/heads/master
| 2020-09-30T18:55:04.802341
| 2019-12-02T10:52:08
| 2019-12-02T10:52:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,307
|
java
|
package com.tencent.liteav.audio.impl.Play;
import android.content.Context;
import android.media.AudioTrack;
import com.tencent.liteav.basic.log.TXCLog;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.Arrays;
public class d {
/* renamed from: a reason: collision with root package name */
static d f31142a = new d();
/* access modifiers changed from: private */
/* renamed from: b reason: collision with root package name */
public static final String f31143b = ("AudioCenter:" + d.class.getSimpleName());
/* renamed from: c reason: collision with root package name */
private a f31144c;
/* access modifiers changed from: private */
/* renamed from: d reason: collision with root package name */
public boolean f31145d = false;
/* renamed from: e reason: collision with root package name */
private volatile boolean f31146e = false;
/* access modifiers changed from: private */
/* renamed from: f reason: collision with root package name */
public Context f31147f = null;
/* access modifiers changed from: private */
/* renamed from: g reason: collision with root package name */
public int f31148g = 0;
/* access modifiers changed from: private */
public volatile boolean h = false;
/* access modifiers changed from: private */
public int i = 48000;
/* access modifiers changed from: private */
public int j = 2;
/* access modifiers changed from: private */
public int k = 16;
class a extends Thread {
/* renamed from: b reason: collision with root package name */
volatile boolean f31150b = false;
public a(String str) {
super(str);
}
public void a() {
this.f31150b = true;
}
public void b() {
this.f31150b = false;
}
}
private d() {
}
public static d a() {
return f31142a;
}
public void b() {
TXCLog.w(f31143b, "mult-track-player start!");
if (this.f31146e) {
TXCLog.e(f31143b, "mult-track-player can not start because of has started!");
} else if (this.i == 0 || this.j == 0) {
String str = f31143b;
TXCLog.e(str, "strat mult-track-player failed with invalid audio info , samplerate:" + this.i + ", channels:" + this.j);
} else {
this.f31146e = true;
if (this.f31144c == null) {
this.f31144c = new a("AUDIO_TRACK") {
public void run() {
a();
try {
int i = d.this.j == 1 ? 2 : 3;
int i2 = d.this.k == 8 ? 3 : 2;
AudioTrack audioTrack = new AudioTrack(3, d.this.i, i, i2, AudioTrack.getMinBufferSize(d.this.i, i, i2), 1);
String e2 = d.f31143b;
TXCLog.i(e2, "create audio track, samplerate:" + d.this.i + ", channels:" + d.this.j + ", bits:" + d.this.k);
try {
audioTrack.play();
boolean unused = d.this.h = true;
d dVar = d.this;
dVar.a(dVar.f31147f, d.this.f31148g);
int i3 = 100;
int i4 = 0;
while (this.f31150b) {
byte[] nativeGetMixedTracksData = b.nativeGetMixedTracksData(d.this.j * 2048);
TXCAudioBasePlayController.onCorePlayPcmData(nativeGetMixedTracksData, 0, d.this.i, d.this.j);
if (nativeGetMixedTracksData == null || nativeGetMixedTracksData.length <= 0) {
try {
sleep(5);
} catch (InterruptedException unused2) {
}
} else {
if (d.this.f31145d) {
Arrays.fill(nativeGetMixedTracksData, (byte) 0);
}
if (i3 != 0 && i4 < 800) {
short[] sArr = new short[(nativeGetMixedTracksData.length / 2)];
ByteBuffer.wrap(nativeGetMixedTracksData).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(sArr);
for (int i5 = 0; i5 < sArr.length; i5++) {
sArr[i5] = (short) (sArr[i5] / i3);
}
ByteBuffer.wrap(nativeGetMixedTracksData).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().put(sArr);
i4 += nativeGetMixedTracksData.length / ((d.this.i * 2) / 1000);
i3 = (i3 * (800 - i4)) / 800;
}
audioTrack.write(nativeGetMixedTracksData, 0, nativeGetMixedTracksData.length);
}
}
try {
audioTrack.pause();
audioTrack.flush();
audioTrack.stop();
audioTrack.release();
} catch (Exception e3) {
e3.printStackTrace();
}
TXCLog.e(d.f31143b, "mult-player thread stop finish!");
} catch (Exception e4) {
e4.printStackTrace();
}
} catch (Exception e5) {
e5.printStackTrace();
}
}
};
this.f31144c.start();
}
TXCLog.w(f31143b, "mult-track-player thread start finish!");
}
}
public void c() {
TXCLog.w(f31143b, "mult-track-player stop!");
if (!this.f31146e) {
TXCLog.w(f31143b, "mult-track-player can not stop because of not started yet!");
return;
}
a aVar = this.f31144c;
if (aVar != null) {
aVar.b();
this.f31144c = null;
}
this.f31148g = 0;
this.f31147f = null;
this.h = false;
this.f31146e = false;
TXCLog.w(f31143b, "mult-track-player stop finish!");
}
public synchronized void a(Context context, int i2) {
this.f31147f = context;
this.f31148g = i2;
if (this.h) {
TXCLog.w(f31143b, "mult-track-player setAudioRoute~");
com.tencent.liteav.audio.impl.a.a().b(i2);
} else {
TXCLog.w(f31143b, "mult-track-player do'not setAudioRoute~");
}
}
public boolean d() {
return this.f31146e;
}
}
|
[
"noiz354@gmail.com"
] |
noiz354@gmail.com
|
038d10f1c702b78ec9a9235af44f190e843dc81a
|
124e4b4e9a06999c1da7a58820cd1b02bcb64290
|
/TestFHIR/target/generated-sources/xjc/org/hl7/fhir/model/OrderOutcomeStatus.java
|
85dc07f878d31819e09054d33ad81d55dae649ba
|
[] |
no_license
|
Rickeys-playground/bmi591
|
37e7c065bf5582caeb66b996d0f444e66328e359
|
b34e909755ed996b0a45843353f1170e18a805a7
|
refs/heads/master
| 2016-08-07T05:57:07.707808
| 2015-09-01T10:02:24
| 2015-09-01T10:02:24
| 41,276,769
| 0
| 1
| null | 2015-09-01T10:02:25
| 2015-08-24T02:12:42
|
Java
|
UTF-8
|
Java
| false
| false
| 3,022
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.08.27 at 10:15:25 PM MST
//
package org.hl7.fhir.model;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
/**
* If the element is present, it must have either a @value, an @id, or extensions
*
* <p>Java class for OrderOutcomeStatus complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="OrderOutcomeStatus">
* <complexContent>
* <extension base="{http://hl7.org/fhir}Element">
* <attribute name="value" type="{http://hl7.org/fhir}OrderOutcomeStatus-list" />
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OrderOutcomeStatus")
public class OrderOutcomeStatus
extends Element
implements ToString
{
@XmlAttribute(name = "value")
protected OrderOutcomeStatusList value;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link OrderOutcomeStatusList }
*
*/
public OrderOutcomeStatusList getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link OrderOutcomeStatusList }
*
*/
public void setValue(OrderOutcomeStatusList value) {
this.value = value;
}
public java.lang.String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
super.appendFields(locator, buffer, strategy);
{
OrderOutcomeStatusList theValue;
theValue = this.getValue();
strategy.appendField(locator, this, "value", buffer, theValue);
}
return buffer;
}
}
|
[
"rickey86@gmail.com"
] |
rickey86@gmail.com
|
04746298e2c89e7c2d4a463a383748e34f411f0e
|
e5bb4c1c5cb3a385a1a391ca43c9094e746bb171
|
/Service/trunk/service/api-product/src/main/java/com/hzfh/api/product/service/PartnerIssuerFollowService.java
|
4cafeaf7819709c6da96c4502dac93512c395e3e
|
[] |
no_license
|
FashtimeDotCom/huazhen
|
397143967ebed9d50073bfa4909c52336a883486
|
6484bc9948a29f0611855f84e81b0a0b080e2e02
|
refs/heads/master
| 2021-01-22T14:25:04.159326
| 2016-01-11T09:52:40
| 2016-01-11T09:52:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 696
|
java
|
package com.hzfh.api.product.service;
import com.hzfh.api.product.model.PartnerIssuerFollow;
import com.hzfh.api.product.model.query.PartnerIssuerFollowCondition;
import com.hzframework.data.service.BaseService;
/*******************************************************************************
*
* Copyright 2015 HZFH. All rights reserved.
* Author: GuoZhenYu
* Create Date: 2015/5/22
* Description:
*
* Revision History:
* Date Author Description
*
******************************************************************************/
public interface PartnerIssuerFollowService extends BaseService<PartnerIssuerFollow, PartnerIssuerFollowCondition> {
}
|
[
"ulei0343@163.com"
] |
ulei0343@163.com
|
9f1fa196f8e680cebc6bff105806ed52d8cf5756
|
8d9293642d3c12f81cc5f930e0147a9d65bd6efb
|
/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
|
c5a07ba84b45731d68f83084eeed50c9cd5aecfd
|
[] |
no_license
|
NicholasBlackburn1/Blackburn-1.17
|
7c086591ac77cf433af248435026cf9275223daa
|
fd960b995b33df75ce61865ba119274d9b0e4704
|
refs/heads/main
| 2022-07-28T03:27:14.736924
| 2021-09-23T15:55:53
| 2021-09-23T15:55:53
| 399,960,376
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,802
|
java
|
package net.minecraft.server.rcon.thread;
import com.google.common.collect.Lists;
import java.io.IOException;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.server.ServerInterface;
import net.minecraft.server.dedicated.DedicatedServerProperties;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class RconThread extends GenericThread {
private static final Logger LOGGER = LogManager.getLogger();
private final ServerSocket socket;
private final String rconPassword;
private final List<RconClient> clients = Lists.newArrayList();
private final ServerInterface serverInterface;
private RconThread(ServerInterface p_11608_, ServerSocket p_11609_, String p_11610_) {
super("RCON Listener");
this.serverInterface = p_11608_;
this.socket = p_11609_;
this.rconPassword = p_11610_;
}
private void clearClients() {
this.clients.removeIf((p_11612_) -> {
return !p_11612_.isRunning();
});
}
public void run() {
try {
while(this.running) {
try {
Socket socket = this.socket.accept();
RconClient rconclient = new RconClient(this.serverInterface, this.rconPassword, socket);
rconclient.start();
this.clients.add(rconclient);
this.clearClients();
} catch (SocketTimeoutException sockettimeoutexception) {
this.clearClients();
} catch (IOException ioexception) {
if (this.running) {
LOGGER.info("IO exception: ", (Throwable)ioexception);
}
}
}
} finally {
this.closeSocket(this.socket);
}
}
@Nullable
public static RconThread create(ServerInterface p_11616_) {
DedicatedServerProperties dedicatedserverproperties = p_11616_.getProperties();
String s = p_11616_.getServerIp();
if (s.isEmpty()) {
s = "0.0.0.0";
}
int i = dedicatedserverproperties.rconPort;
if (0 < i && 65535 >= i) {
String s1 = dedicatedserverproperties.rconPassword;
if (s1.isEmpty()) {
LOGGER.warn("No rcon password set in server.properties, rcon disabled!");
return null;
} else {
try {
ServerSocket serversocket = new ServerSocket(i, 0, InetAddress.getByName(s));
serversocket.setSoTimeout(500);
RconThread rconthread = new RconThread(p_11616_, serversocket, s1);
if (!rconthread.start()) {
return null;
} else {
LOGGER.info("RCON running on {}:{}", s, i);
return rconthread;
}
} catch (IOException ioexception) {
LOGGER.warn("Unable to initialise RCON on {}:{}", s, i, ioexception);
return null;
}
}
} else {
LOGGER.warn("Invalid rcon port {} found in server.properties, rcon disabled!", (int)i);
return null;
}
}
public void stop() {
this.running = false;
this.closeSocket(this.socket);
super.stop();
for(RconClient rconclient : this.clients) {
if (rconclient.isRunning()) {
rconclient.stop();
}
}
this.clients.clear();
}
private void closeSocket(ServerSocket p_11614_) {
LOGGER.debug("closeSocket: {}", (Object)p_11614_);
try {
p_11614_.close();
} catch (IOException ioexception) {
LOGGER.warn("Failed to close socket", (Throwable)ioexception);
}
}
}
|
[
"nickblackburn02@gmail.com"
] |
nickblackburn02@gmail.com
|
8c8f24c30b4b5c31d940d17c8bae6b9bcdf5b7f2
|
6fa701cdaa0d83caa0d3cbffe39b40e54bf3d386
|
/google/cloud/documentai/v1beta3/google-cloud-documentai-v1beta3-java/proto-google-cloud-documentai-v1beta3-java/src/main/java/com/google/cloud/documentai/v1beta3/EnableProcessorResponseOrBuilder.java
|
15816725042718ae1754a9c55b490237757e5167
|
[
"Apache-2.0"
] |
permissive
|
oltoco/googleapis-gen
|
bf40cfad61b4217aca07068bd4922a86e3bbd2d5
|
00ca50bdde80906d6f62314ef4f7630b8cdb6e15
|
refs/heads/master
| 2023-07-17T22:11:47.848185
| 2021-08-29T20:39:47
| 2021-08-29T20:39:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 393
|
java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/documentai/v1beta3/document_processor_service.proto
package com.google.cloud.documentai.v1beta3;
public interface EnableProcessorResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.EnableProcessorResponse)
com.google.protobuf.MessageOrBuilder {
}
|
[
"bazel-bot-development[bot]@users.noreply.github.com"
] |
bazel-bot-development[bot]@users.noreply.github.com
|
9918ab8209a9c11bcbfb5001410fce579b0f3ad5
|
c188408c9ec0425666250b45734f8b4c9644a946
|
/open-sphere-plugins/search/src/test/java/io/opensphere/search/controller/SearchTransformerTest.java
|
793713162db573323410f976708c26630a596c5f
|
[
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] |
permissive
|
rkausch/opensphere-desktop
|
ef8067eb03197c758e3af40ebe49e182a450cc02
|
c871c4364b3456685411fddd22414fd40ce65699
|
refs/heads/snapshot_5.2.7
| 2023-04-13T21:00:00.575303
| 2020-07-29T17:56:10
| 2020-07-29T17:56:10
| 360,594,280
| 0
| 0
|
Apache-2.0
| 2021-04-22T17:40:38
| 2021-04-22T16:58:41
| null |
UTF-8
|
Java
| false
| false
| 6,107
|
java
|
package io.opensphere.search.controller;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.awt.Color;
import java.util.Collection;
import java.util.List;
import org.easymock.EasyMock;
import org.easymock.EasyMockSupport;
import org.junit.Test;
import com.google.common.collect.HashBiMap;
import com.google.common.collect.Maps;
import io.opensphere.core.geometry.Geometry;
import io.opensphere.core.geometry.GeometryRegistry;
import io.opensphere.core.geometry.PointGeometry;
import io.opensphere.core.geometry.PolylineGeometry;
import io.opensphere.core.geometry.renderproperties.PointRenderProperties;
import io.opensphere.core.model.GeographicPosition;
import io.opensphere.core.model.LatLonAlt;
import io.opensphere.core.search.SearchResult;
import io.opensphere.core.util.collections.New;
import io.opensphere.search.model.SearchModel;
/**
* Unit test for {@link SearchTransformer}.
*
*/
public class SearchTransformerTest
{
/**
* The geometries published during the test.
*/
private final List<Geometry> myPublishedGeometries = New.list();
/**
* Tests the {@link SearchTransformer} ability to add and remove geometries.
*/
@Test
public void test()
{
EasyMockSupport support = new EasyMockSupport();
GeometryRegistry registry = createGeometryRegistry(support);
SearchResult noLocations = new SearchResult();
noLocations.setText("no locations");
SearchResult pointResult = new SearchResult();
pointResult.getLocations().add(LatLonAlt.createFromDegrees(10, 11));
pointResult.setText("point");
SearchResult box = new SearchResult();
box.getLocations().addAll(New.list(LatLonAlt.createFromDegrees(10, 10), LatLonAlt.createFromDegrees(10, 11),
LatLonAlt.createFromDegrees(11, 11), LatLonAlt.createFromDegrees(11, 10), LatLonAlt.createFromDegrees(10, 10)));
box.setText("box");
SearchModel model = new SearchModel();
support.replayAll();
SearchTransformer transformer = new SearchTransformer(model, registry, Maps.synchronizedBiMap(HashBiMap.create()),
Maps.synchronizedBiMap(HashBiMap.create()));
model.getShownResults().addAll(noLocations, pointResult, box);
assertEquals(4, myPublishedGeometries.size());
PointGeometry point = (PointGeometry)myPublishedGeometries.get(0);
assertEquals(Color.CYAN, point.getRenderProperties().getColor());
assertEquals(PointRenderProperties.TOP_Z, point.getRenderProperties().getZOrder());
assertTrue(point.getRenderProperties().isDrawable());
assertTrue(point.getRenderProperties().isPickable());
assertFalse(point.getRenderProperties().isObscurant());
assertFalse(point.getRenderProperties().isHidden());
assertTrue(point.getRenderProperties().isRound());
assertEquals(5f, point.getRenderProperties().getSize(), 0f);
assertEquals(7f, point.getRenderProperties().getHighlightSize(), 0f);
assertEquals(-2130706433, point.getRenderProperties().getHighlightColorARGB());
assertEquals(LatLonAlt.createFromDegrees(10, 11), ((GeographicPosition)point.getPosition()).getLatLonAlt());
PolylineGeometry boxGeom = (PolylineGeometry)myPublishedGeometries.get(2);
assertEquals(Color.CYAN, boxGeom.getRenderProperties().getColor());
assertEquals(PointRenderProperties.TOP_Z, boxGeom.getRenderProperties().getZOrder());
assertTrue(boxGeom.getRenderProperties().isDrawable());
assertTrue(boxGeom.getRenderProperties().isPickable());
assertFalse(boxGeom.getRenderProperties().isObscurant());
assertFalse(boxGeom.getRenderProperties().isHidden());
assertEquals(4f, boxGeom.getRenderProperties().getWidth(), 0f);
assertEquals(-2130706433, boxGeom.getRenderProperties().getHighlightColorARGB());
assertEquals(LatLonAlt.createFromDegrees(10, 10), ((GeographicPosition)boxGeom.getVertices().get(0)).getLatLonAlt());
assertEquals(LatLonAlt.createFromDegrees(10, 11), ((GeographicPosition)boxGeom.getVertices().get(1)).getLatLonAlt());
assertEquals(LatLonAlt.createFromDegrees(11, 11), ((GeographicPosition)boxGeom.getVertices().get(2)).getLatLonAlt());
assertEquals(LatLonAlt.createFromDegrees(11, 10), ((GeographicPosition)boxGeom.getVertices().get(3)).getLatLonAlt());
assertEquals(LatLonAlt.createFromDegrees(10, 10), ((GeographicPosition)boxGeom.getVertices().get(4)).getLatLonAlt());
model.getShownResults().clear();
assertTrue(myPublishedGeometries.isEmpty());
transformer.close();
model.getShownResults().add(pointResult);
assertTrue(myPublishedGeometries.isEmpty());
support.verifyAll();
}
/**
* Creates an easy mocked {@link GeometryRegistry}.
*
* @param support Used to create the mock.
* @return The mocked {@link GeometryRegistry}.
*/
@SuppressWarnings("unchecked")
private GeometryRegistry createGeometryRegistry(EasyMockSupport support)
{
GeometryRegistry registry = support.createMock(GeometryRegistry.class);
registry.addGeometriesForSource(EasyMock.isA(SearchTransformer.class), EasyMock.isA(Collection.class));
EasyMock.expectLastCall().andAnswer(() ->
{
myPublishedGeometries.addAll((Collection<? extends Geometry>)EasyMock.getCurrentArguments()[1]);
return null;
}).anyTimes();
registry.removeGeometriesForSource(EasyMock.isA(SearchTransformer.class), EasyMock.isA(Collection.class));
EasyMock.expectLastCall().andAnswer(() ->
{
myPublishedGeometries.removeAll((Collection<? extends Geometry>)EasyMock.getCurrentArguments()[1]);
return null;
}).anyTimes();
return registry;
}
}
|
[
"kauschr@opensphere.io"
] |
kauschr@opensphere.io
|
9260df7b9bb13fac3e6734bd2e05fe327e63acb9
|
879f208f56648efe1ec0df2daab454ef758f5894
|
/CloudPan/src/test/java/com/zhiyou100/dao/FileDaoTest.java
|
9f3fa0d0cdc2f5f8e9088ca36ad139d64606e8d2
|
[] |
no_license
|
realguoshuai/CloudPan
|
edfbec168af53fef7601d942f50fa5389f47845c
|
068a57b825a309ba094a7f025e7d55f11894f7bf
|
refs/heads/master
| 2021-05-14T09:51:04.734468
| 2018-01-17T09:15:42
| 2018-01-17T09:15:42
| 116,336,420
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 988
|
java
|
package com.zhiyou100.dao;
import static org.junit.Assert.*;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.zhiyou100.entity.FileDO;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring-dao.xml")
public class FileDaoTest {
@Autowired
private FileDao dao;
@Test
public void testListFile() {
List<FileDO> listFile = dao.listFile();
System.out.println(listFile);
}
@Test
public void testUpdateFile() {
FileDO fileDO =new FileDO("asdafs", 20, 2);
dao.updateFile(fileDO);
}
@Test
public void testAddFile() {
FileDO fileDO =new FileDO("11111", 10, 1);
dao.addFile(fileDO);
}
@Test
public void testDeleteFile() {
dao.deleteFile(1);
}
@Test
public void downFile() {
dao.downFile(2);
}
}
|
[
"yooless@163.com"
] |
yooless@163.com
|
f48c6340800354586340468a68a3f669f467a657
|
a7c85a1e89063038e17ed2fa0174edf14dc9ed56
|
/spring-aop-perf-tests/src/main/java/coas/perf/ComplexCondition300/Advice7.java
|
f9249ad43792cdbab88ff72f78beca91932dbac0
|
[] |
no_license
|
pmaslankowski/java-contracts
|
28b1a3878f68fdd759d88b341c8831716533d682
|
46518bb9a83050956e631faa55fcdf426589830f
|
refs/heads/master
| 2021-03-07T13:15:28.120769
| 2020-09-07T20:06:31
| 2020-09-07T20:06:31
| 246,267,189
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,640
|
java
|
package coas.perf.ComplexCondition300;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;
import coas.perf.ComplexCondition300.Subject300;
@Aspect
@Component("Advice_300_7_cc")
public class Advice7 {
@Around("execution(* coas.perf.ComplexCondition300.Subject300.*(..)) and (execution(* *.junk0(..)) or execution(* *.junk1(..)) or execution(* *.junk2(..)) or execution(* *.junk3(..)) or execution(* *.junk4(..)) or execution(* *.junk5(..)) or execution(* *.junk6(..)) or execution(* *.junk7(..)) or execution(* *.junk8(..)) or execution(* *.junk9(..)) or execution(* *.junk10(..)) or execution(* *.junk11(..)) or execution(* *.junk12(..)) or execution(* *.junk13(..)) or execution(* *.junk14(..)) or execution(* *.junk15(..)) or execution(* *.junk16(..)) or execution(* *.junk17(..)) or execution(* *.junk18(..)) or execution(* *.junk19(..)) or execution(* *.junk20(..)) or execution(* *.junk21(..)) or execution(* *.junk22(..)) or execution(* *.junk23(..)) or execution(* *.junk24(..)) or execution(* *.junk25(..)) or execution(* *.junk26(..)) or execution(* *.junk27(..)) or execution(* *.junk28(..)) or execution(* *.junk29(..)) or execution(* *.target(..)))")
public Object onTarget(ProceedingJoinPoint joinPoint) throws Throwable {
int res = (int) joinPoint.proceed();
for (int i=0; i < 1000; i++) {
if (res % 2 == 0) {
res /= 2;
} else {
res = 2 * res + 1;
}
}
return res;
}
}
|
[
"pmaslankowski@gmail.com"
] |
pmaslankowski@gmail.com
|
6dc8f3497f08bf16bf70f75fef028e7b42754431
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/17/17_6d9e875e4f605f0f56f77d24769103a7e6cdd138/TenantDao/17_6d9e875e4f605f0f56f77d24769103a7e6cdd138_TenantDao_s.java
|
ef4d129ffb6f398750312f58e7173273bf0cafa9
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,978
|
java
|
package eu.comexis.napoleon.server.dao;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.UUID;
import com.googlecode.objectify.Key;
import eu.comexis.napoleon.shared.model.City;
import eu.comexis.napoleon.shared.model.Company;
import eu.comexis.napoleon.shared.model.Country;
import eu.comexis.napoleon.shared.model.JobTitle;
import eu.comexis.napoleon.shared.model.Nationality;
import eu.comexis.napoleon.shared.model.Owner;
import eu.comexis.napoleon.shared.model.Tenant;
import eu.comexis.napoleon.shared.model.simple.SimpleTenant;
public class TenantDao extends NapoleonDao<Tenant> {
public TenantDao() {
super();
// TODO Auto-generated constructor stub
}
public Tenant create(String companyId) {
Key<Company> companyKey = new Key<Company>(Company.class, companyId);
Tenant tenant = new Tenant();
System.out.println("Set company key " + companyKey.toString());
tenant.setCompany(companyKey);
return tenant;
}
/**
* Retrieves the list of all tenants stored in the database (with the minimum of data to be shown
* in UI)
*
* @return The list of tenants
*/
public ArrayList<SimpleTenant> getListSimpleTenants(String companyId) {
LOG.info("Get list Tenants (" + clazz + ") for company " + companyId);
Key<Company> companyKey = new Key<Company>(Company.class, companyId);
Iterator<Tenant> iterator = this.listAll(companyId).iterator();
ArrayList<SimpleTenant> tenants = new ArrayList<SimpleTenant>();
while (iterator.hasNext()) {
Tenant tenant = iterator.next();
SimpleTenant o = new SimpleTenant();
o.setId(tenant.getId());
o.setName(tenant.getLastName());
o.setCity(tenant.getCity());
o.setAddress(tenant.getStreet());
o.setMobileNumber(tenant.getMobilePhoneNumber());
o.setPhoneNumber(tenant.getPhoneNumber());
tenants.add(o);
}
return tenants;
}
@Override
public Tenant update(Tenant tenant) {
if (tenant.getCompany() != null){
return update(tenant,tenant.getCompany());
}else{
// log error
LOG.fatal("Parent Company is not set, cannot save tenant");
return null;
}
}
public Tenant update(Tenant tenant, String companyId) {
Key<Company> companyKey = new Key<Company>(Company.class, companyId);
return update(tenant,companyKey);
}
public Tenant update(Tenant tenant, Key<Company> companyKey) {
String tenantId = tenant.getId();
CountryDao countryData = new CountryDao();
if (tenantId == null || tenantId.length() == 0) {
UUID uuid = UUID.randomUUID();
System.out.println("Creating Uuid " + uuid.toString());
tenant.setId(uuid.toString());
tenant.setCompany(companyKey);
tenant.setFlagActivated(true);
}
// if country does not exist, create it.
Country country = countryData.getByName(tenant.getCountry(), companyKey);
if (country == null) {
country = countryData.create(companyKey);
country.setName(tenant.getCountry());
countryData.update(country);
}
City city = countryData.getCityByFullName(country.getId(), tenant.getCity(),tenant.getPostalCode());
if (city == null) {
city = countryData.addCity(country.getId(), tenant.getCity(),tenant.getPostalCode());
}
if (tenant.getNationality()!= null && !tenant.getNationality().isEmpty()){
NationalityDao natDao = new NationalityDao();
Nationality nat = new Nationality();
nat.setName(tenant.getNationality());
nat.setCompany(companyKey);
natDao.update(nat);
}
if (tenant.getJobTitle()!= null && !tenant.getJobTitle().isEmpty()){
JobTitleDao jobDao = new JobTitleDao();
JobTitle job = new JobTitle();
job.setName(tenant.getJobTitle());
job.setCompany(companyKey);
jobDao.update(job);
}
return super.update(tenant);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
33641cc5c89e172b82195d7a40290a910dfb0d25
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/AtCoder/agc007/F/980687.java
|
6c7a0bced9290aada2577531cc8845f68280d43f
|
[] |
no_license
|
Kawser-nerd/CLCDSA
|
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
|
aee32551795763b54acb26856ab239370cac4e75
|
refs/heads/master
| 2022-02-09T11:08:56.588303
| 2022-01-26T18:53:40
| 2022-01-26T18:53:40
| 211,783,197
| 23
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,217
|
java
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
/**
* @author Pavel Mavrin
*/
public class Main {
private void solve() throws IOException {
int n = nextInt();
String S = next();
String T = next();
if (S.equals(T)) {
out.println(0);
return;
}
int j = n - 1;
int res = 0;
int[] q = new int[n + 1];
int h = 0;
int t = 0;
int d = 0;
int jj = n;
for (int i = n - 1; i >= 0; i--) {
if (j > i) j = i;
while (j >= 0 && S.charAt(j) != T.charAt(i)) j--;
if (j < 0) {
out.println(-1);
return;
}
while (t > h) {
int xx = q[h] - d;
if (xx > i) {
h++;
} else {
break;
}
}
if (j < i && j != jj) {
d++;
q[t++] = (j + d);
res = Math.max(res, t - h);
}
jj = j;
// System.out.println(i + " " + j);
// for (int e = h; e < t; e++) {
// System.out.println(q[e] - d);
// }
}
out.println(res);
}
private BufferedReader br;
private PrintWriter out;
private StringTokenizer st;
String next() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return st.nextToken();
}
int nextInt() throws IOException {
return Integer.parseInt(next());
}
long nextLong() throws IOException {
return Long.parseLong(next());
}
public static void main(String[] args) throws IOException {
new Main().run();
}
private void run() throws IOException {
br = new BufferedReader(new InputStreamReader(System.in));
out = new PrintWriter(System.out);
solve();
out.close();
}
}
|
[
"kwnafi@yahoo.com"
] |
kwnafi@yahoo.com
|
ae1ed166363d6babae69c6b51cc91e53274ea67a
|
1a73b7b663a0beb318b69e977987c46d816e350c
|
/app/src/main/java/com/millennium/followme/MainActivity.java
|
f45315146da8f3897727664284e5478d00957a51
|
[] |
no_license
|
coolsgupta/FollowMe
|
77ccdd7f8e3c2912cb2ae4dfb702403d6010b3c9
|
050de926cef71674dcec1ebd4f18f999460bdae5
|
refs/heads/master
| 2021-01-20T19:56:38.017769
| 2016-08-08T14:33:04
| 2016-08-08T14:33:04
| 65,211,394
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,674
|
java
|
package com.millennium.followme;
import android.Manifest;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
public class MainActivity extends AppCompatActivity {
private Button mGuideButton;
private Button mFollowButton;
private TextView mStatusTextView;
public static final MediaType JSON
= MediaType.parse("application/json; charset=utf-8");
private static String URL;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mGuideButton = (Button) findViewById(R.id.guideButton);
mFollowButton = (Button) findViewById(R.id.followButton);
mStatusTextView = (TextView) findViewById(R.id.statusTextView);
}
public void guide(View view) {
mFollowButton.setVisibility(View.INVISIBLE);
mGuideButton.setVisibility(View.INVISIBLE);
mStatusTextView.setVisibility(View.VISIBLE);
final double[] latitude = new double[1];
final double[] longitude = new double[1];
URL = "http://tracknfollowme.achintsatsangi.com/users/receiver1.php";
OkHttpClient client = new OkHttpClient();
/*String post (String URL,String json) throws IOException {
RequestBody body = RequestBody.create(JSON, );
Request request = new Request.Builder()
.url(URL)
.post(body)
.build();
Response response = null;
try {
response = client.newCall(request).execute();
} catch (IOException e) {
e.printStackTrace();
}
try {
return response.body().string();
} catch (IOException e) {
e.printStackTrace();
}
}*/
LocationManager locationManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
LocationListener locationListener = new LocationListener() {
@Override
public void onLocationChanged(Location loc) {
Toast.makeText(
getBaseContext(),
"Location changed: Lat: " + loc.getLatitude() + " Lng: "
+ loc.getLongitude(), Toast.LENGTH_SHORT).show();
longitude[0] = loc.getLongitude();
latitude[0] = loc.getLatitude();
Log.d("marvin",latitude[0]+","+longitude[0]);
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onProviderDisabled(String provider) {
}
};
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
mStatusTextView.setText("permission problem");
}
locationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER, 0, 0, locationListener);
}
public void follow (View view){
Intent intent = new Intent(this, MapsActivity.class);
startActivity(intent);
}
}
|
[
"="
] |
=
|
3bec43354f610b981804c4751bfd3fe31ad03ef8
|
d2a6f18f24fe4866ec687f82fdde2a98fa9df368
|
/OpenImmo/src/main/jaxb/org/openestate/io/openimmo/xml/Zimmer.java
|
257e817456374ffc633b5776225b46982cd87e9c
|
[
"Apache-2.0"
] |
permissive
|
jcelmeta14/OpenEstate-IO
|
0255ec398cfaa55233e5e6e6d322a4410c82c3fb
|
180e62a1c23596e5e284ce7fc6d07081918b0a38
|
refs/heads/master
| 2023-07-14T22:51:46.528402
| 2021-08-16T00:50:09
| 2021-08-16T00:50:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,520
|
java
|
package org.openestate.io.openimmo.xml;
import java.io.Serializable;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for <zimmer> element.
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "zimmer")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public class Zimmer implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
{
@XmlAttribute(name = "zimmertyp")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
protected Zimmer.Zimmertyp zimmertyp;
/**
* Gets the value of the zimmertyp property.
*
* @return
* possible object is
* {@link Zimmer.Zimmertyp }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public Zimmer.Zimmertyp getZimmertyp() {
return zimmertyp;
}
/**
* Sets the value of the zimmertyp property.
*
* @param value
* allowed object is
* {@link Zimmer.Zimmertyp }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public void setZimmertyp(Zimmer.Zimmertyp value) {
this.zimmertyp = value;
}
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE2;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
Zimmer.Zimmertyp theZimmertyp;
theZimmertyp = this.getZimmertyp();
strategy.appendField(locator, this, "zimmertyp", buffer, theZimmertyp, (this.zimmertyp!= null));
}
return buffer;
}
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public Object clone() {
return copyTo(createNewInstance());
}
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public Object copyTo(Object target) {
final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE2;
return copyTo(null, target, strategy);
}
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof Zimmer) {
final Zimmer copy = ((Zimmer) draftCopy);
{
Boolean zimmertypShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.zimmertyp!= null));
if (zimmertypShouldBeCopiedAndSet == Boolean.TRUE) {
Zimmer.Zimmertyp sourceZimmertyp;
sourceZimmertyp = this.getZimmertyp();
Zimmer.Zimmertyp copyZimmertyp = ((Zimmer.Zimmertyp) strategy.copy(LocatorUtils.property(locator, "zimmertyp", sourceZimmertyp), sourceZimmertyp, (this.zimmertyp!= null)));
copy.setZimmertyp(copyZimmertyp);
} else {
if (zimmertypShouldBeCopiedAndSet == Boolean.FALSE) {
copy.zimmertyp = null;
}
}
}
}
return draftCopy;
}
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public Object createNewInstance() {
return new Zimmer();
}
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final Zimmer that = ((Zimmer) object);
{
Zimmer.Zimmertyp lhsZimmertyp;
lhsZimmertyp = this.getZimmertyp();
Zimmer.Zimmertyp rhsZimmertyp;
rhsZimmertyp = that.getZimmertyp();
if (!strategy.equals(LocatorUtils.property(thisLocator, "zimmertyp", lhsZimmertyp), LocatorUtils.property(thatLocator, "zimmertyp", rhsZimmertyp), lhsZimmertyp, rhsZimmertyp, (this.zimmertyp!= null), (that.zimmertyp!= null))) {
return false;
}
}
return true;
}
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE2;
return equals(null, null, object, strategy);
}
/**
*
* Java enum for <em>zimmertyp</em> attribute in <zimmer> elements.
*
* <p>Java class for null.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="ZIMMER"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "")
@XmlEnum
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public enum Zimmertyp {
ZIMMER;
public String value() {
return name();
}
public static Zimmer.Zimmertyp fromValue(String v) {
return valueOf(v);
}
}
}
|
[
"andy@openindex.de"
] |
andy@openindex.de
|
66522004ff4246bdeaebe74243d3483c2d69f760
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/main/java/org/gradle/test/performancenull_227/Productionnull_22668.java
|
18be646806ecf9f002af259c31e8a864784915fc
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package org.gradle.test.performancenull_227;
public class Productionnull_22668 {
private final String property;
public Productionnull_22668(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.