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
8d32fc4656f4de0bc73327af5b0f2f2db6dfdb47
4a5b8d37d70aff90d9c3e4d6d53239c12726f88e
/lib-rxjava/src/main/java/cn/ollyice/library/rxjava/SingleOperator.java
744a72a9cf6d1af176e7df608d70dc4fcf25b0d0
[]
no_license
paqxyz/AndGameDemo
29dfad61e371cf6db833107d903acffb8502e647
53271818ffff94564ec4e3337ebf4af13956d5de
refs/heads/master
2020-03-21T04:29:11.037764
2018-06-20T06:06:50
2018-06-20T06:06:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,322
java
/** * Copyright (c) 2016-present, RxJava 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 cn.ollyice.library.rxjava; import cn.ollyice.library.rxjava.annotations.*; /** * Interface to map/wrap a downstream observer to an upstream observer. * * @param <Downstream> the value type of the downstream * @param <Upstream> the value type of the upstream */ public interface SingleOperator<Downstream, Upstream> { /** * Applies a function to the child SingleObserver and returns a new parent SingleObserver. * @param observer the child SingleObserver instance * @return the parent SingleObserver instance * @throws Exception on failure */ @NonNull SingleObserver<? super Upstream> apply(@NonNull SingleObserver<? super Downstream> observer) throws Exception; }
[ "289776839@qq.com" ]
289776839@qq.com
b237a9246e0a9f5f46ecd92c8c446bfe641ace2a
19156214d3c456e7aa9b34183a928ef144b3c206
/src/test-suite-dependencies/geotk-metadata-3.21-sources/src/main/java/org/geotoolkit/internal/jaxb/metadata/MD_GeometricObjects.java
8379cee4b285f7cbd021b60dd62fa8a316792520
[]
no_license
opengeospatial/teamengine-offline
85549dbab9ff681c4f6b09dfabce1e4b85ce4206
6b81fc3fc4647e8f68ba433701199b0e68fc36d2
refs/heads/master
2021-01-01T19:24:08.817030
2014-12-18T17:35:06
2014-12-18T17:35:06
21,212,109
0
0
null
null
null
null
UTF-8
Java
false
false
2,995
java
/* * Geotoolkit.org - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2008-2012, Open Source Geospatial Foundation (OSGeo) * (C) 2009-2012, Geomatys * * 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; * version 2.1 of the License. * * 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. */ package org.geotoolkit.internal.jaxb.metadata; import javax.xml.bind.annotation.XmlElementRef; import org.opengis.metadata.spatial.GeometricObjects; import org.geotoolkit.metadata.iso.spatial.DefaultGeometricObjects; import org.geotoolkit.internal.jaxb.gco.PropertyType; /** * JAXB adapter mapping implementing class to the GeoAPI interface. See * package documentation for more information about JAXB and interface. * * @author Cédric Briançon (Geomatys) * @author Martin Desruisseaux (Geomatys) * @version 3.18 * * @since 2.5 * @module */ public final class MD_GeometricObjects extends PropertyType<MD_GeometricObjects, GeometricObjects> { /** * Empty constructor for JAXB only. */ public MD_GeometricObjects() { } /** * Wraps an GeometricObjects value with a {@code MD_GeometricObjects} element at marshalling time. * * @param metadata The metadata value to marshall. */ private MD_GeometricObjects(final GeometricObjects metadata) { super(metadata); } /** * Returns the GeometricObjects value wrapped by a {@code MD_GeometricObjects} element. * * @param value The value to marshall. * @return The adapter which wraps the metadata value. */ @Override protected MD_GeometricObjects wrap(final GeometricObjects value) { return new MD_GeometricObjects(value); } /** * Returns the GeoAPI interface which is bound by this adapter. */ @Override protected Class<GeometricObjects> getBoundType() { return GeometricObjects.class; } /** * Returns the {@link DefaultGeometricObjects} generated from the metadata value. * This method is systematically called at marshalling time by JAXB. * * @return The metadata to be marshalled. */ @Override @XmlElementRef public DefaultGeometricObjects getElement() { return skip() ? null : DefaultGeometricObjects.castOrCopy(metadata); } /** * Sets the value for the {@link DefaultGeometricObjects}. This method is systematically * called at unmarshalling time by JAXB. * * @param metadata The unmarshalled metadata. */ public void setElement(final DefaultGeometricObjects metadata) { this.metadata = metadata; } }
[ "rjmartell@computer.org" ]
rjmartell@computer.org
60000a419113dffee5fb4efaa218a66cadca4d07
73d000646c21501c8966ee7e08e7f67b2727203c
/lib/impl/src/main/javaTemplates/net/openhft/koloboke/collect/impl/hash/MutableDHashByteSetGO.java
f43cf1ba093430a6d408492a5fb29789fcae50b4
[ "Apache-2.0" ]
permissive
phishman3579/Koloboke
e74a104720a09ff6645c82ee9fa71de0494829c7
ed20a94a918a057daaada3a5989dc864a536612b
refs/heads/master
2020-12-25T11:20:54.195192
2015-02-13T05:16:18
2015-02-13T05:16:18
30,830,911
1
0
null
2015-02-15T15:15:17
2015-02-15T15:15:17
null
UTF-8
Java
false
false
4,887
java
/* with DHash|QHash|LHash hash byte|char|short|int|long|float|double|obj elem Mutable|Updatable|Immutable mutability */ /* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.openhft.koloboke.collect.impl.hash; import net.openhft.koloboke.collect.*; import net.openhft.koloboke.collect.impl.*; import net.openhft.koloboke.collect.set.hash.HashByteSet; import javax.annotation.Nonnull; import java.util.*; public class MutableDHashByteSetGO/*<>*/ extends MutableByteDHashSetSO/*<>*/ implements HashByteSet/*<>*/, InternalByteCollectionOps/*<>*/ { @Override final void copy(SeparateKVByteDHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.copy(hash); if (myMC != modCount() || hashMC != hash.modCount()) throw new ConcurrentModificationException(); } @Override final void move(SeparateKVByteDHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.move(hash); if (myMC != modCount() || hashMC != hash.modCount()) throw new ConcurrentModificationException(); } public int hashCode() { return setHashCode(); } @Override public String toString() { return setToString(); } @Override public boolean equals(Object obj) { return CommonSetOps.equals(this, obj); } @Override public boolean containsAll(@Nonnull Collection<?> c) { return CommonByteCollectionOps.containsAll(this, c); } @Nonnull @Override public ByteCursor/*<>*/ cursor() { return setCursor(); } /* if !(obj elem) */ @Override public boolean add(Byte e) { return add(e.byteValue()); } /* endif */ @Override public boolean add(/* bits */byte key) { /* template Add with internal version */ throw new NotGenerated(); /* endtemplate */ } /* if float|double elem */ @Override public boolean add(byte key) { return add(/* unwrap elem */key/**/); } /* elif obj elem */ private boolean addNullKey() { /* template Add with null elem */ throw new NotGenerated(); /* endtemplate */ } /* endif */ @Override public boolean addAll(@Nonnull Collection<? extends Byte> c) { return CommonByteCollectionOps.addAll(this, c); } @Override public boolean remove(Object key) { /* if !(obj elem) */ return removeByte(((Byte) key).byteValue()); /* elif obj elem // /* template Remove */ // endif */ } /* if obj elem */ private boolean removeNullKey() { /* template Remove with null elem */ throw new NotGenerated(); /* endtemplate */ } /* endif */ @Override boolean justRemove(/* bits */byte key) { return /* if !(obj elem) */removeByte(key)/* elif obj elem //remove(key)// endif */; } /* if !(obj elem) */ @Override public boolean removeByte(/* bits */byte key) { /* template Remove with internal version */ throw new NotGenerated(); /* endtemplate */ } /* if float|double elem */ @Override public boolean removeByte(byte key) { return removeByte(/* unwrap elem */key/**/); } /* endif */ /* endif */ @Override public boolean removeAll(@Nonnull Collection<?> c) { /* if Mutable mutability */ /* if !(obj elem) */ if (c instanceof ByteCollection) { /* endif */ if (c instanceof InternalByteCollectionOps) { InternalByteCollectionOps c2 = (InternalByteCollectionOps) c; if (c2.size() < this.size()/* if obj elem // && equivalence().equals(c2.equivalence()) // endif */) { /* if obj elem */// noinspection unchecked/* endif */ return c2.reverseRemoveAllFrom(this); } } /* if !(obj elem) */ return removeAll(this, (ByteCollection) c); } /* endif */ return removeAll(this, c); /* elif !(Mutable mutability) // throw new UnsupportedOperationException(); // endif */ } @Override public boolean retainAll(@Nonnull Collection<?> c) { return retainAll(this, c); } }
[ "leventov@ya.ru" ]
leventov@ya.ru
99a7742f74191b8f674c643d635ca941f364c775
7342e9d64cc5c816f4e3652cbf9569e58c0650d9
/SeatAccommodationService/src/ua/be/dc/services/seatAccommodation/db/dao/SeatDAO.java
a7456f40ed7313a74d3818ca8a6cadcbfc2bf29a
[]
no_license
sauloperez/distributed-computing
0e5cda636017d3162655af9ef844d10564cf90bd
31efb6b9089cedd8435be0a6f81e5eee3c3f4167
refs/heads/master
2020-06-07T06:43:22.662434
2013-06-20T16:33:12
2013-06-20T16:33:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,820
java
package ua.be.dc.services.seatAccommodation.db.dao; import java.util.List; import org.apache.ibatis.exceptions.PersistenceException; import org.apache.ibatis.session.SqlSession; import ua.be.dc.services.seatAccommodation.db.dao.exception.DAOException; import ua.be.dc.services.seatAccommodation.db.mappers.SeatMapper; import ua.be.dc.services.seatAccommodation.models.Seat; public class SeatDAO extends BasicDAO { public SeatDAO() { super(); } /** * Returns the list of all Seat instances from the database. * @return the list of all Seat instances from the database. */ public List<Seat> selectAll() { SqlSession session = sqlSessionFactory.openSession(); try { SeatMapper mapper = session.getMapper(SeatMapper.class); List<Seat> list = mapper.selectAll(); return list; } finally { session.close(); } } /** * Returns a Seat instance from the database. * @param id primary key value used for lookup. * @return A Seat instance with a primary key value equals to pk. null if there is no matching row. */ public Seat selectById(Integer id) { SqlSession session = sqlSessionFactory.openSession(); try { SeatMapper mapper = session.getMapper(SeatMapper.class); Seat seat = mapper.selectById(id); return seat; } finally { session.close(); } } /** * Insert an instance of Seat into the database. * @param seat the instance to be persisted. */ public void insert(Seat seat) throws PersistenceException { SqlSession session = sqlSessionFactory.openSession(); try { SeatMapper mapper = session.getMapper(SeatMapper.class); mapper.insert(seat); session.commit(); } finally { session.close(); } } /** * Updates an instance of Seat in the database. * @param seat the instance to be updated. * @throws Exception */ public void update(Seat seat) throws DAOException { SqlSession session = sqlSessionFactory.openSession(); try { SeatMapper mapper = session.getMapper(SeatMapper.class); int affectedRows = mapper.update(seat); if (affectedRows == 0) { throw new DAOException("The seat with ID " + seat.getId() + " does not exist"); } session.commit(); } finally { session.close(); } } /** * Delete an instance of Seat from the database. * @param id primary key value of the instance to be deleted. * @throws Exception */ public void delete(Integer id) throws DAOException { SqlSession session = sqlSessionFactory.openSession(); try { SeatMapper mapper = session.getMapper(SeatMapper.class); int affectedRows = mapper.delete(id); if (affectedRows == 0) { throw new DAOException("The seat with ID " + id + " does not exist"); } session.commit(); } finally { session.close(); } } }
[ "saulopefa@gmail.com" ]
saulopefa@gmail.com
ea888d726144fea08d8cb30700aff51bcde55607
e902c6d5369c22bf2c8dfa58f89ad6ac7e71afc6
/txazo-application/txazo-blog/src/main/java/org/txazo/blog/module/blog/service/impl/BlogContentServiceImpl.java
48fb77fe7134e391df65bb1dd428e9043016f313
[ "Apache-2.0" ]
permissive
txazo/txazo
9c54d08b065bb961daedf0db92fc500773a27ad5
4406bbf1d9abc49d91dc87d6942f00b7c1275e77
refs/heads/master
2021-07-21T10:21:32.472232
2020-05-10T14:47:12
2020-05-10T14:47:12
35,081,965
1
3
null
null
null
null
UTF-8
Java
false
false
1,693
java
package org.txazo.blog.module.blog.service.impl; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.txazo.blog.module.blog.bean.BlogContent; import org.txazo.blog.module.blog.dao.BlogContentDao; import org.txazo.blog.module.blog.service.BlogContentService; /** * BlogContentServiceImpl * * @author txazo * @email txazo1218@163.com * @since 10.08.2015 */ @Service public class BlogContentServiceImpl implements BlogContentService { @Autowired private BlogContentDao blogContentDao; @Override public boolean addContent(BlogContent content) { if (checkBlogContent(content)) { try { blogContentDao.addContent(content); return content.getId() > 0; } catch (Exception e) { e.printStackTrace(); } } return false; } @Override public boolean updateContent(BlogContent content) { if (checkBlogContent(content)) { try { return blogContentDao.updateContent(content) > 0; } catch (Exception e) { e.printStackTrace(); } } return false; } private boolean checkBlogContent(BlogContent content) { return content != null && StringUtils.isNoneBlank(content.getContent()); } @Override public BlogContent getContent(int id) { return blogContentDao.getContent(id); } @Override public boolean changeContentStatus(int id, int status) { return blogContentDao.changeContentStatus(id, status) > 0; } }
[ "784990655@qq.com" ]
784990655@qq.com
04f28ab440b850c7a4b4c528e38bf665d1511f23
17eec5a820d0299bcd4879745109ea943d490eab
/ubk_Spider_50/src/com/unbank/robotspider/worker/WebPageProducer.java
32eb2dbaf543be7167e97e4181878581261f825a
[]
no_license
un-knower/ubk_Spider_50
5dcf1ed21088788b692a437e95a99f8ac3ff8283
675693c9e51542d8435630cd6c9f6b9f95e50def
refs/heads/master
2020-03-17T22:52:53.663468
2017-06-08T09:24:39
2017-06-08T09:24:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,003
java
package com.unbank.robotspider.worker; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.unbank.robotspider.entity.NewsInfoMiddleWare; import com.unbank.robotspider.filter.url.URLBaseFilter; import com.unbank.robotspider.parser.WebPagePaser; public class WebPageProducer { public static Log logger = LogFactory.getLog(WebPageProducer.class); public NewsInfoMiddleWare fillNewsPageQueue( NewsInfoMiddleWare newsInfoMiddleWare) { boolean success = newsInfoMiddleWareURLFilter(newsInfoMiddleWare .getUrl()); if (success) { return new WebPagePaser().paser(newsInfoMiddleWare); } else { // logger.info("已经存在相同的网址" + newsInfoMiddleWare.getWebsiteId() // + "=========" + newsInfoMiddleWare.getUrl()); return null; } } private boolean newsInfoMiddleWareURLFilter(String url) { URLBaseFilter urlBaseFilter = new URLBaseFilter(); return urlBaseFilter.checkNewsURL(url); } }
[ "1378022176@qq.com" ]
1378022176@qq.com
b461ed57867a58ed7988d06d5569ac214e836b3d
a90e9ec5df8acf96f9dee5343d4569f8ef365fc0
/app/src/main/java/com/scatl/uestcbbs/custom/imageview/RoundImageView.java
4ec5b3cfa7cf62bd3de18b74fdd6eaa875cff90f
[ "Apache-2.0" ]
permissive
liuwenhaha/UestcBBS-MVP
3e48e03ed11b618acbf60222a0f1b2165d7c56c9
96f6546f2bf167751f58daffd9fe01084d80b3cf
refs/heads/master
2021-01-05T17:13:50.834353
2020-02-17T10:22:39
2020-02-17T10:22:39
241,087,032
1
0
Apache-2.0
2020-02-17T11:05:58
2020-02-17T11:05:57
null
UTF-8
Java
false
false
3,379
java
package com.scatl.uestcbbs.custom.imageview; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Path; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import androidx.appcompat.widget.AppCompatImageView; import com.scatl.uestcbbs.R; import com.scatl.uestcbbs.util.ImageUtil; public class RoundImageView extends AppCompatImageView { private float width, height; private String absolutePath; private Path path; private int cornerRadius; public RoundImageView(Context context) { this(context, null); init(); } public RoundImageView(Context context, AttributeSet attrs) { this(context, attrs, 0); init(); TypedArray typedValue = context.obtainStyledAttributes(attrs, R.styleable.RoundImageView); cornerRadius = typedValue.getInt(R.styleable.RoundImageView_cornerAngel, 20); typedValue.recycle(); } public RoundImageView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); TypedArray typedValue = context.obtainStyledAttributes(attrs, R.styleable.RoundImageView); cornerRadius = typedValue.getInt(R.styleable.RoundImageView_cornerAngel, 20); typedValue.recycle(); } @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); width = getWidth(); height = getHeight(); } private void init() { path = new Path(); } @Override protected void onDraw(Canvas canvas) { if (width >= 100 && height > 30) { //四个圆角 path.moveTo(cornerRadius, 0); path.lineTo(width - cornerRadius, 0); path.quadTo(width, 0, width, cornerRadius); path.lineTo(width, height - cornerRadius); path.quadTo(width, height, width - cornerRadius, height); path.lineTo(cornerRadius, height); path.quadTo(0, height, 0, height - cornerRadius); path.lineTo(0, cornerRadius); path.quadTo(0, 0, cornerRadius, 0); canvas.clipPath(path); } try { super.onDraw(canvas); } catch (RuntimeException e) { Drawable drawable = getDrawable(); if (drawable != null) { Bitmap bitmap = ImageUtil.drawable2Bitmap(drawable); if (bitmap.getHeight() / bitmap.getWidth() >= 5) { bitmap.setHeight(bitmap.getHeight() / 5); setScaleType(ScaleType.CENTER_CROP); setImageBitmap(bitmap); } else { //FIXME Bitmap new_bitmap = Bitmap.createScaledBitmap(bitmap, bitmap.getWidth() / 2, bitmap.getHeight() / 2, true); new_bitmap.setHeight(new_bitmap.getHeight()); setScaleType(ScaleType.CENTER_CROP); setImageBitmap(new_bitmap); } } } } public String getAbsolutePath() { return absolutePath; } public void setAbsolutePath(String absolutePath) { this.absolutePath = absolutePath; } }
[ "sca_tl@foxmail.com" ]
sca_tl@foxmail.com
811fe9d284f45e9e4168781d7bbb4b7da89f4d8c
83148140a1bf76077a7e9f71d424b5108edfc453
/QuickestPhoneBooster/app/src/main/java/utility/quickest/phonebooster/fragment/by.java
d7020c46fefcc4fee0ee82de7be41e4f5771322f
[]
no_license
kotdark/clone_phone_booster
adcf593aae69cd5dc3b070bf8072c6a1006ba58d
8b6d84055739b1269ce64e1d59c7f4bc0adbcd88
refs/heads/master
2020-03-17T13:24:03.837851
2018-05-18T07:10:44
2018-05-18T07:10:44
133,630,146
1
0
null
null
null
null
UTF-8
Java
false
false
928
java
package utility.quickest.phonebooster.fragment; import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import utility.quickest.phonebooster.util.C2535e; /* compiled from: JunkCleanFinishFragment */ class by implements AnimatorUpdateListener { final /* synthetic */ JunkCleanFinishFragment f13585a; by(JunkCleanFinishFragment junkCleanFinishFragment) { this.f13585a = junkCleanFinishFragment; } public void onAnimationUpdate(ValueAnimator valueAnimator) { try { float parseFloat = Float.parseFloat(valueAnimator.getAnimatedValue().toString()); this.f13585a.mFinishTagContainer.getLayoutParams().height = (int) parseFloat; this.f13585a.mFinishTagContainer.requestLayout(); this.f13585a.mFinishTag1.setAlpha(parseFloat / ((float) C2535e.f14680d)); } catch (Throwable th) { } } }
[ "tranduyvn91@gmail.com" ]
tranduyvn91@gmail.com
2ffd1511df864ee6ae4113f8fb302c249c3c9fde
3c883c4df5b825bb7bf4b7baab947d9d3f059b89
/4GHot/app/src/main/java/com/doit/net/Protocol/LTESendPackage.java
727b2aefad3b80a71c211a382255715b7e311bbc
[]
no_license
libin1993/nbl
dd02b0a3248a2141c7d1a23c625b0c863ee9adb8
01ff96b0264f7f18b2b778d2e302fd4b9069f562
refs/heads/master
2022-11-26T04:56:46.359544
2020-08-03T10:03:46
2020-08-03T10:03:46
284,859,464
0
0
null
null
null
null
UTF-8
Java
false
false
5,212
java
package com.doit.net.Protocol; import com.doit.net.Utils.LogUtils; import com.doit.net.Utils.UtilDataFormatChange; import org.apache.http.util.ByteArrayBuffer; /** * Created by Zxc on 2018/10/18. */ public class LTESendPackage { short packageLength;//长 2字节 short packageCheckNum;//校验位2字节 short packageSequence;//包的序号2字节 short packageSessionID;//对话ID2字节 byte packageEquipType;//设备型1字节 byte packageReserve;//预留1字节 byte packageMainType;//主类型1字节 byte packageSubType;//子类型1字节 byte[] byteSubContent;//子协议内容 public short getPackageLength() { return packageLength; } public void setPackageLength(short packageLength) { this.packageLength = packageLength; } public short getPackageCheckNum() { return packageCheckNum; } public void setPackageCheckNum(short packageCheckNum) { this.packageCheckNum = packageCheckNum; } public short getPackageSequence() { return packageSequence; } public void setPackageSequence(short packageSequence) { this.packageSequence = packageSequence; } public short getPackageSessionID() { return packageSessionID; } public void setPackageSessionID(short packageSessionID) { this.packageSessionID = packageSessionID; } public byte getPackageEquipType() { return packageEquipType; } public void setPackageEquipType(byte packageEquipType) { this.packageEquipType = packageEquipType; } public byte getPackageReserve() { return packageReserve; } public void setPackageReserve(byte packageReserve) { this.packageReserve = packageReserve; } public byte getPackageMainType() { return packageMainType; } public void setPackageMainType(byte packageMainType) { this.packageMainType = packageMainType; } public byte getPackageSubType() { return packageSubType; } public void setPackageSubType(byte packageSubType) { this.packageSubType = packageSubType; } public byte[] getByteSubContent() { return byteSubContent; } public void setByteSubContent(byte[] byteSubContent) { this.byteSubContent = byteSubContent; } //得到包长度 public short getPackLength() { short packageLength=12; if(this.byteSubContent!=null) { packageLength+=byteSubContent.length; } return packageLength; } //得到整个包的内容 public byte[] getPackageContent() { ByteArrayBuffer byteArray=new ByteArrayBuffer(getPackLength()); //拷贝包长度 byte[] tempByte_Length=UtilDataFormatChange.shortToByteArray(getPackLength()); byteArray.append(tempByte_Length,0,tempByte_Length.length); //拷贝校验位 byte[] tempByte_CheckNum=UtilDataFormatChange.shortToByteArray(getPackageCheckNum()); byteArray.append(tempByte_CheckNum,0,tempByte_CheckNum.length); //拷贝序号 byte[] tempByte_Sequence=UtilDataFormatChange.shortToByteArray(this.packageSequence); byteArray.append(tempByte_Sequence,0,tempByte_Sequence.length); //拷贝SessionID byte[] tempByte_SessionID=UtilDataFormatChange.shortToByteArray(this.packageSessionID); byteArray.append(tempByte_SessionID,0,tempByte_SessionID.length); //拷贝设备类型 byte[] tempByte_EquipType={this.packageEquipType}; byteArray.append(tempByte_EquipType,0,tempByte_EquipType.length); //拷贝预留 byte[] tempByte_Reserve={this.packageReserve}; byteArray.append(tempByte_Reserve,0,tempByte_Reserve.length); //拷贝主类型 byte[] tempByte_MainType={this.packageMainType}; byteArray.append(tempByte_MainType,0,tempByte_MainType.length); if(this.packageSubType!=-1) { //拷贝子类型 byte[] tempByte_SubType={this.packageSubType}; byteArray.append(tempByte_SubType,0,tempByte_SubType.length); } //拷贝内容 if(this.byteSubContent!=null) { byteArray.append(this.byteSubContent,0,this.byteSubContent.length); } LogUtils.log("发送主类型:"+packageMainType+";发送子类型:"+packageSubType); return byteArray.toByteArray(); } //得到校验位 public short getCheckNum() { ByteArrayBuffer byteArray=new ByteArrayBuffer(getPackLength()); //拷贝序号 byte[] tempByte_Sequence = UtilDataFormatChange.shortToByteArray(this.packageSequence); byteArray.append(tempByte_Sequence,0,tempByte_Sequence.length); //拷贝SessionID byte[] tempByte_SessionID=UtilDataFormatChange.shortToByteArray(this.packageSessionID); byteArray.append(tempByte_SessionID,0,tempByte_SessionID.length); //拷贝设备类型 byte[] tempByte_EquipType={this.packageEquipType}; byteArray.append(tempByte_EquipType,0,tempByte_EquipType.length); //拷贝预留 byte[] tempByte_Reserve={this.packageReserve}; byteArray.append(tempByte_Reserve,0,tempByte_Reserve.length); //拷贝主类型 byte[] tempByte_MainType={this.packageMainType}; byteArray.append(tempByte_MainType,0,tempByte_MainType.length); if(this.packageSubType!=-1) { //拷贝子类型 byte[] tempByte_SubType={this.packageSubType}; byteArray.append(tempByte_SubType,0,tempByte_SubType.length); } //拷贝内容 if(this.byteSubContent!=null) { byteArray.append(this.byteSubContent,0,this.byteSubContent.length); } return LTE_CRC.xcrc(byteArray.toByteArray()); } }
[ "1993911441@qq.com" ]
1993911441@qq.com
ca3777f3294c549caa2c1547cc0be0a2075fff61
63e24adc15dd2155767a477c5026608273d89323
/scm-pay/src/main/java/org/xfs/scm/business/pay/ali/model/AliAuthTokenRequest.java
f4cc9778c2331db0ab464985ec6554f22aeaf77f
[]
no_license
shenfengzhusheng/scm
17978a395182a3f164357372c5c44242659bc970
9b04e91d7c2d4dcac55d326b08606482aba2fea9
refs/heads/master
2022-12-21T14:31:37.214723
2018-11-17T03:24:01
2018-11-17T03:24:01
82,155,192
0
0
null
null
null
null
UTF-8
Java
false
false
568
java
package org.xfs.scm.business.pay.ali.model; public class AliAuthTokenRequest { private String grant_type="authorization_code"; private String code; public AliAuthTokenRequest(){} public AliAuthTokenRequest(String code) { this.code = code; } public String getGrant_type() { return grant_type; } public void setGrant_type(String grant_type) { this.grant_type = grant_type; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } }
[ "xixingyingzhongdui@gmail.com" ]
xixingyingzhongdui@gmail.com
378a1c839797b2d3bc1a1ddccf2711b38246445e
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/card/model/ak.java
86d4d0ff423c93ab469f691a8d2840a46f5fe1a2
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
1,455
java
package com.tencent.mm.plugin.card.model; import com.tencent.mm.g.b.cn; import com.tencent.mm.protocal.c.kq; import com.tencent.mm.sdk.e.c.a; import java.lang.reflect.Field; public final class ak extends cn { protected static a gJc; static { a aVar = new a(); aVar.hSY = new Field[2]; aVar.columns = new String[3]; StringBuilder stringBuilder = new StringBuilder(); aVar.columns[0] = "cardUserId"; aVar.xjA.put("cardUserId", "TEXT PRIMARY KEY "); stringBuilder.append(" cardUserId TEXT PRIMARY KEY "); stringBuilder.append(", "); aVar.xjz = "cardUserId"; aVar.columns[1] = "retryCount"; aVar.xjA.put("retryCount", "INTEGER"); stringBuilder.append(" retryCount INTEGER"); aVar.columns[2] = "rowid"; aVar.xjB = stringBuilder.toString(); gJc = aVar; } protected final a Ac() { return gJc; } public final boolean equals(Object obj) { if (!(obj instanceof ak)) { return false; } if (this.field_cardUserId == ((ak) obj).field_cardUserId) { return true; } return false; } public final int hashCode() { return this.field_cardUserId == null ? 0 : this.field_cardUserId.hashCode(); } public static ak a(kq kqVar) { ak akVar = new ak(); akVar.field_cardUserId = kqVar.vSu; return akVar; } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
3aab83c81829912d2f4875acd922bbf71e91e0ec
dc0c44f3c4729a75570d8c0fa2ae998bdf9e4976
/OOAD/Blatt 7/eclipseWorkspace/ooadAufgabeZugriffsverwaltung.zip_expanded/ooadAufgabeZugriffsverwaltung/src/main/AllTest.java
34a968f0ae95eb888f9cfc9877bac66ae3f30e7f
[]
no_license
WyNotRepax/Studi
4247a2857001e0a9261c381164852f33337e59e8
b5b16ee860b029e38ea96dc629611fc7ec5bddd7
refs/heads/master
2021-12-03T13:55:50.178819
2021-10-20T23:55:19
2021-10-20T23:55:19
251,079,763
0
1
null
null
null
null
UTF-8
Java
false
false
237
java
package main; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) @SuiteClasses({ StrukturUndBasistests.class, Systemtest.class}) public class AllTest { }
[ "benno.steinkamp@hs-osnabrueck.de" ]
benno.steinkamp@hs-osnabrueck.de
f5ead295da2880f56796eac3a1e3c0e2bde01a3d
d64021d9bbef1738bfa402ad9aa38b464118ce8e
/src/main/java/io/github/alessandroscarlatti/group/Group.java
d5278e773dac92ddc65d2dae73aba2e213dfe7c2
[ "MIT" ]
permissive
alessandroscarlatti/windows-context-menu-helper
4006619e1e5ff097942a2fc56374371a012d5d1f
6185d5621e23336b04a93f9b483367f09f8375b4
refs/heads/master
2021-07-20T12:52:01.611822
2020-09-07T21:05:16
2020-09-07T21:05:16
211,530,415
0
0
null
2020-05-27T01:09:14
2019-09-28T16:36:24
Java
UTF-8
Java
false
false
2,138
java
package io.github.alessandroscarlatti.group; import io.github.alessandroscarlatti.command.Command; import io.github.alessandroscarlatti.menu.Menu; import io.github.alessandroscarlatti.windows.menu.ContextMenuItem; import io.github.alessandroscarlatti.windows.reg.AbstractRegSpec; import java.util.ArrayList; import java.util.List; /** * @author Alessandro Scarlatti * @since Saturday, 2/15/2020 */ public class Group implements ContextMenuItem { private String name; private List<ContextMenuItem> children = new ArrayList<>(); private Menu parent; private String regUid; public static void connectGroupToChild(Group parent, ContextMenuItem child) { parent.getChildren().add(child); if (child instanceof Menu) { ((Menu) child).setGroup(parent); } if (child instanceof Command) { ((Command) child).setGroup(parent); } } public boolean isFirstInGroup(ContextMenuItem contextMenuItem) { return children.indexOf(contextMenuItem) == 0; } public boolean isLastInGroup(ContextMenuItem contextMenuItem) { if (children.size() == 0) return false; else return children.indexOf(contextMenuItem) == children.size() - 1; } @Override public AbstractRegSpec getRegSpec() { return null; } @Override public String toString() { return "Group{" + "name='" + name + '\'' + ", children=" + children + '}'; } @Override public String getName() { return null; } public List<ContextMenuItem> getChildren() { return children; } public void setChildren(List<ContextMenuItem> children) { this.children = children; } public void setName(String name) { this.name = name; } public Menu getParent() { return parent; } public void setParent(Menu parent) { this.parent = parent; } public String getRegUid() { return regUid; } public void setRegUid(String regUid) { this.regUid = regUid; } }
[ "violanotesnoextras@gmail.com" ]
violanotesnoextras@gmail.com
0d80b972f7c2e627eed52baa15a4d3ed0383937e
8933cea6d9a1bed7936954ef75c1acb6da4e8c9e
/app/src/main/java/com/cifer/zf_project/Calender/src/com/android/calendar/selectcalendars/SelectVisibleCalendarsFragment.java
68918cd8f6b73478476abdacd656972975792503
[]
no_license
ciferxiao/ZF_Project
ede8547396ae9c2e37088e10b71ebc64fd096661
4d322eb335f8a118a3b6d042270bd072238c6686
refs/heads/master
2020-03-26T10:43:34.560892
2018-08-15T08:03:24
2018-08-15T08:03:26
144,812,680
0
0
null
null
null
null
UTF-8
Java
false
false
6,816
java
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.cifer.zf_project.Calender.src.com.android.calendar.selectcalendars; import android.app.Activity; import android.app.Fragment; import android.content.ContentUris; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.CalendarContract.Calendars; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ListView; import com.android.calendar.AsyncQueryService; import com.android.calendar.CalendarController; import com.android.calendar.CalendarController.EventInfo; import com.android.calendar.CalendarController.EventType; import com.android.calendar.R; import com.android.calendar.Utils; import com.android.calendar.selectcalendars.CalendarColorCache.OnCalendarColorsLoadedListener; public class SelectVisibleCalendarsFragment extends Fragment implements AdapterView.OnItemClickListener, CalendarController.EventHandler, OnCalendarColorsLoadedListener { private static final String TAG = "Calendar"; private static final String IS_PRIMARY = "\"primary\""; private static final String SELECTION = Calendars.SYNC_EVENTS + "=?"; private static final String[] SELECTION_ARGS = new String[] {"1"}; private static final String[] PROJECTION = new String[] { Calendars._ID, Calendars.ACCOUNT_NAME, Calendars.ACCOUNT_TYPE, Calendars.OWNER_ACCOUNT, Calendars.CALENDAR_DISPLAY_NAME, Calendars.CALENDAR_COLOR, Calendars.VISIBLE, Calendars.SYNC_EVENTS, "(" + Calendars.ACCOUNT_NAME + "=" + Calendars.OWNER_ACCOUNT + ") AS " + IS_PRIMARY, }; private static int mUpdateToken; private static int mQueryToken; private static int mCalendarItemLayout = R.layout.mini_calendar_item; private View mView = null; private CalendarController mController; private ListView mList; private SelectCalendarsSimpleAdapter mAdapter; private Activity mContext; private AsyncQueryService mService; private Cursor mCursor; public SelectVisibleCalendarsFragment() { } public SelectVisibleCalendarsFragment(int itemLayout) { mCalendarItemLayout = itemLayout; } @Override public void onAttach(Activity activity) { super.onAttach(activity); mContext = activity; mController = CalendarController.getInstance(activity); mController.registerEventHandler(R.layout.select_calendars_fragment, this); mService = new AsyncQueryService(activity) { @Override protected void onQueryComplete(int token, Object cookie, Cursor cursor) { mAdapter.changeCursor(cursor); mCursor = cursor; } }; } @Override public void onDetach() { super.onDetach(); mController.deregisterEventHandler(R.layout.select_calendars_fragment); if (mCursor != null) { mAdapter.changeCursor(null); mCursor.close(); mCursor = null; } } @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); mView = inflater.inflate(R.layout.select_calendars_fragment, null); mList = (ListView)mView.findViewById(R.id.list); // Hide the Calendars to Sync button on tablets for now. // Long terms stick it in the list of calendars if (Utils.getConfigBool(getActivity(), R.bool.multiple_pane_config)) { // Don't show dividers on tablets mList.setDivider(null); View v = mView.findViewById(R.id.manage_sync_set); if (v != null) { v.setVisibility(View.GONE); } } return mView; } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mAdapter = new SelectCalendarsSimpleAdapter(mContext, mCalendarItemLayout, null, getFragmentManager()); mList.setAdapter(mAdapter); mList.setOnItemClickListener(this); } public void onItemClick(AdapterView<?> parent, View view, int position, long id) { if (mAdapter == null || mAdapter.getCount() <= position) { return; } toggleVisibility(position); } @Override public void onResume() { super.onResume(); mQueryToken = mService.getNextToken(); mService.startQuery(mQueryToken, null, Calendars.CONTENT_URI, PROJECTION, SELECTION, SELECTION_ARGS, Calendars.ACCOUNT_NAME); } /* * Write back the changes that have been made. */ public void toggleVisibility(int position) { mUpdateToken = mService.getNextToken(); Uri uri = ContentUris.withAppendedId(Calendars.CONTENT_URI, mAdapter.getItemId(position)); ContentValues values = new ContentValues(); // Toggle the current setting int visibility = mAdapter.getVisible(position)^1; values.put(Calendars.VISIBLE, visibility); mService.startUpdate(mUpdateToken, null, uri, values, null, null, 0); mAdapter.setVisible(position, visibility); } @Override public void eventsChanged() { if (mService != null) { mService.cancelOperation(mQueryToken); mQueryToken = mService.getNextToken(); mService.startQuery(mQueryToken, null, Calendars.CONTENT_URI, PROJECTION, SELECTION, SELECTION_ARGS, Calendars.ACCOUNT_NAME); } } @Override public long getSupportedEventTypes() { return EventType.EVENTS_CHANGED; } @Override public void handleEvent(EventInfo event) { eventsChanged(); } @Override public void onCalendarColorsLoaded() { if (mAdapter != null) { mAdapter.notifyDataSetChanged(); } } }
[ "1570058539@qq.com" ]
1570058539@qq.com
23a86c8649710f6ab92c159f676764e1591035a6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_3b1f4a0d1b1bf56bc6f2f6e080c13da5feb06a4a/ArchiveConfiguration/1_3b1f4a0d1b1bf56bc6f2f6e080c13da5feb06a4a_ArchiveConfiguration_t.java
25dd43b32fab1cd20d9dca906b09bac56c3026a4
[]
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,175
java
package com.splunk.shep.archiver.archive; import java.lang.ref.SoftReference; import java.net.URI; import org.apache.hadoop.fs.Path; // CONFIG This whole class should use MBeans public class ArchiveConfiguration { /** * Soft link so the memory can be used if needed. (Soft links are * GarbageCollected only if there is really need for the memory) */ private static SoftReference<ArchiveConfiguration> sharedInstanceRef; private static final String ARCHIVING_ROOT = "archiving_root"; private static final String CLUSTER_NAME = "cluster_name"; private static final String SERVER_NAME = "server_name"; private static final String TMP_DIRECTORY_OF_ARCHIVER = "/archiver-tmp"; private static final URI archiverHadoopURI = URI .create("hdfs://localhost:9000"); protected ArchiveConfiguration() { super(); /* * If the configuration of ArchiveConfiguration is time consuming maybe * the shared instance should be hardlinked. */ } public static ArchiveConfiguration getSharedInstance() { ArchiveConfiguration sharedInstance = null; if (sharedInstanceRef != null) { sharedInstance = sharedInstanceRef.get(); } if (sharedInstance == null) { sharedInstance = new ArchiveConfiguration(); sharedInstanceRef = new SoftReference<ArchiveConfiguration>( sharedInstance); } return sharedInstance; } public BucketFormat getArchiveFormat() { return BucketFormat.SPLUNK_BUCKET; } public String getArchivingRoot() { return ARCHIVING_ROOT; } public String getClusterName() { return CLUSTER_NAME; } public String getServerName() { return SERVER_NAME; } /** * @return The Path on hadoop filesystem that is used as a temp directory */ public Path getTmpDirectory() { return new Path(new Path(getArchiverHadoopURI()), TMP_DIRECTORY_OF_ARCHIVER); } /** * @return URI pointing to the hadoop filesystem instance that is used for * archiving. */ public URI getArchiverHadoopURI() { return archiverHadoopURI; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d1ac314a9e4ce218cdd74d189eea8ba79817453b
1a1471bc8882d0654917ba3eb1b63d352948113f
/lpdesignpatterns/src/main/java/com/example/lp/lpdesignpatterns/stateMode/TvController.java
5170d5ecc03cfecb797cf35b956eeafc78cdc952
[]
no_license
CodeLpea/MicroPrc
997af3faf5f39f78d2aa898af19c11872073d0a6
5c8d3c00c7f2c6adbc64278f69849ecb8211f72d
refs/heads/master
2020-06-03T06:32:33.176036
2019-12-10T03:25:01
2019-12-10T03:25:01
191,480,155
1
0
null
null
null
null
UTF-8
Java
false
false
960
java
package com.example.lp.lpdesignpatterns.stateMode; /** * 控制电源开关的实现 * */ public class TvController implements PowerController,TvState{ private TvState tvState; public TvController() { //默认为开机状态 setTvState(new PowerOnState()); } public void setTvState(TvState tvState) { this.tvState = tvState; } @Override public void powerOn() { setTvState(new PowerOnState()); System.out.println("开机了"); } @Override public void powerOff() { setTvState(new PowerOffState()); System.out.println("关机了"); } @Override public void turnUp() { tvState.turnUp(); } @Override public void turnDown() { tvState.turnDown(); } @Override public void nextChanel() { tvState.nextChanel(); } @Override public void preChanel() { tvState.preChanel(); } }
[ "861596052@qq.com" ]
861596052@qq.com
5755b84433ad7e987c48a1e6fd979d0686ccba9b
3fb4d818f9cbb7384b2a82301ab4aa86f58ccdae
/src/main/java/com/example/testdemo/practice/ThreadTest.java
f239b74268bad9d17fb229b82bf18638fa1c3996
[]
no_license
Jiraiya-ji/practice
e9d5f4a958d6a769838ee198234c453b914fa2a2
b834cd0e386b14168766c7af2462c15e99753c24
refs/heads/master
2023-05-14T06:40:37.951218
2020-07-19T05:53:12
2020-07-19T05:53:12
256,140,460
0
0
null
2023-05-09T18:27:35
2020-04-16T07:24:19
Java
UTF-8
Java
false
false
634
java
package com.example.testdemo.practice; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadPoolExecutor; public class ThreadTest { public static void main(String[] args) throws InterruptedException { Thread a = new Thread(()->{ System.out.println(Thread.currentThread().getName()); },"a"); Thread b = new Thread(()->{ System.out.println(Thread.currentThread().getName()); },"b"); a.start(); b.start(); b.join(); // a.join(); } }
[ "you@example.com" ]
you@example.com
aeda8e724fc97ce252dfff8ac2ec56db2cf50dd0
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.shellenv-ShellEnv/sources/com/oculus/clay/app/ClayAppActivity.java
234679aa14fec5b6dd22a7f04fdba302f79cc585
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
2,731
java
package com.oculus.clay.app; import android.app.ActivityManager; import android.app.NativeActivity; import android.os.Bundle; import android.os.Trace; import android.util.Log; import com.facebook.soloader.SysUtil; import com.facebook.soloader.i; import java.io.IOException; public class ClayAppActivity extends NativeActivity { private static a a = new a("Clay", "ClayAppActivity"); private AndroidStorageManager b; private ContentUriProvider c; private boolean d; protected static void a() { Log.e("Clay", "Shutting down process via System.exit", new Exception()); System.exit(0); } protected static void a(Boolean bool, String str) { a.a(bool); SysUtil.a(bool.booleanValue(), str); } public final boolean b() { return this.d; } public AndroidStorageManager getAndroidStorageManager() { return this.b; } public ContentUriProvider getContentUriProvider() { return this.c; } public ActivityManager.MemoryInfo getMemoryInfo() { ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo(); ((ActivityManager) getApplicationContext().getSystemService("activity")).getMemoryInfo(memoryInfo); return memoryInfo; } /* access modifiers changed from: protected */ public void onCreate(Bundle bundle) { a.a("onCreate"); SysUtil.c().d(); try { a.a("SoLoader"); try { i.a(this, 2); } catch (IOException e) { Log.e("Clay", "ClayAppActivity threw IOException during SoLoader.init", e); } catch (Throwable th) { Trace.endSection(); throw th; } this.b = new AndroidStorageManager(getApplicationContext()); this.c = new ContentUriProvider(getApplicationContext()); super.onCreate(bundle); Trace.endSection(); } finally { Trace.endSection(); } } /* access modifiers changed from: protected */ public void onDestroy() { a.a("onDestroy"); SysUtil.c().k(); try { this.b = null; super.onDestroy(); } finally { Trace.endSection(); } } /* access modifiers changed from: protected */ public void onPause() { a.a("onPause"); SysUtil.c().j(); super.onPause(); this.d = false; Trace.endSection(); } /* access modifiers changed from: protected */ public void onResume() { a.a("onResume"); super.onResume(); SysUtil.c().e(); this.d = true; Trace.endSection(); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
6fd42ab90b7e8b84308e2e96a937bd0dc64ee7ba
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/LANG-9b-4-26-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/apache/commons/lang3/time/FastDateParser_ESTest_scaffolding.java
42a92cac45c0cda693d6e082b5a5dc34c7cb8fd5
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
4,480
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Oct 28 09:41:48 UTC 2021 */ package org.apache.commons.lang3.time; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class FastDateParser_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang3.time.FastDateParser"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(FastDateParser_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.io.filefilter.IOFileFilter", "org.apache.commons.lang3.time.FastDateParser$5", "org.apache.commons.lang3.time.FastDateParser$4", "org.apache.commons.io.filefilter.DelegateFileFilter", "org.apache.commons.lang3.time.FastDateParser$3", "org.apache.commons.io.filefilter.AndFileFilter", "org.apache.commons.io.filefilter.MagicNumberFileFilter", "org.apache.commons.io.IOCase", "org.apache.commons.lang3.time.FastDateParser$2", "org.apache.commons.lang3.time.FastDateParser$1", "org.apache.commons.lang3.time.FastDateParser$NumberStrategy", "org.apache.commons.lang3.time.DateParser", "org.apache.commons.lang3.time.FastDateParser$CopyQuotedStrategy", "org.apache.commons.lang3.time.FastDateParser$KeyValue", "org.apache.commons.io.filefilter.SizeFileFilter", "org.apache.commons.io.filefilter.OrFileFilter", "org.apache.commons.io.filefilter.EmptyFileFilter", "org.apache.commons.io.filefilter.NameFileFilter", "org.apache.commons.io.filefilter.NotFileFilter", "org.apache.commons.io.filefilter.TrueFileFilter", "org.apache.commons.io.filefilter.RegexFileFilter", "org.apache.commons.lang3.time.FastDateParser$TimeZoneStrategy", "org.apache.commons.io.filefilter.AgeFileFilter", "org.apache.commons.lang3.time.FastDateParser$Strategy", "org.apache.commons.lang3.time.FastDateParser$TextStrategy", "org.apache.commons.io.filefilter.AbstractFileFilter", "org.apache.commons.io.filefilter.ConditionalFileFilter", "org.apache.commons.io.filefilter.FileFileFilter", "org.apache.commons.io.filefilter.DirectoryFileFilter", "org.apache.commons.io.filefilter.PrefixFileFilter", "org.apache.commons.io.filefilter.HiddenFileFilter", "org.apache.commons.io.filefilter.SuffixFileFilter", "org.apache.commons.io.filefilter.FalseFileFilter", "org.apache.commons.io.filefilter.WildcardFilter", "org.apache.commons.io.filefilter.WildcardFileFilter", "org.apache.commons.lang3.time.FastDateParser", "org.apache.commons.io.filefilter.CanReadFileFilter", "org.apache.commons.io.filefilter.CanWriteFileFilter" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("java.util.TimeZone", false, FastDateParser_ESTest_scaffolding.class.getClassLoader())); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
30177f3f897b78df156785e5b154eb5a75eefab2
21721558a2a941450270016d413633060fe09859
/core/impl/src/main/java/com/blazebit/persistence/impl/function/entity/EntityFunction.java
9606375357960fe4dbea864739b1a8bbdd4ebad0
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bulanov-al/blaze-persistence
3ebd0e2861431af900b4465298233378597a5a37
f5a374fedf8cb1a24c769e37de56bd44e91afcf3
refs/heads/master
2023-05-02T21:37:24.575320
2021-04-24T18:34:21
2021-04-24T18:34:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,358
java
/* * Copyright 2014 - 2021 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.impl.function.entity; import com.blazebit.persistence.impl.util.JpqlFunctionUtil; import com.blazebit.persistence.impl.util.SqlUtils; import com.blazebit.persistence.spi.FunctionRenderContext; import com.blazebit.persistence.spi.JpqlFunction; /** * * @author Christian Beikov * @since 1.3.0 */ public class EntityFunction implements JpqlFunction { public static final String FUNCTION_NAME = "entity_function"; public static final String MARKER_PREDICATE = "999=999"; private static final String AND_MARKER = " and " + MARKER_PREDICATE; @Override public boolean hasArguments() { return true; } @Override public boolean hasParenthesesIfNoArguments() { return true; } @Override public Class<?> getReturnType(Class<?> firstArgumentType) { return firstArgumentType; } @Override public void render(FunctionRenderContext functionRenderContext) { if (functionRenderContext.getArgumentsSize() == 0) { throw new RuntimeException("The ENTITY_FUNCTION function needs at least one argument <sub_query>! args=" + functionRenderContext); } // com.blazebit.persistence.impl.JoinManager.buildClause adds synthetic where clause conjuncts and starts with MARKER_PREDICATE so we can determine it properly // We remove the synthetic predicate here and later extract the values clause alias of it so we can insert the proper SQL values clause at the right place String subquery = functionRenderContext.getArgument(0); StringBuilder sb = new StringBuilder(); int subqueryEndIndex = subquery.lastIndexOf(AND_MARKER); int aliasEndIndex = subquery.indexOf('.', subqueryEndIndex) ; int aliasStartIndex = aliasEndIndex - 1; while (aliasStartIndex > subqueryEndIndex) { if (!SqlUtils.isIdentifier(subquery.charAt(aliasStartIndex))) { aliasStartIndex++; break; } aliasStartIndex--; } String entityName = JpqlFunctionUtil.unquoteSingleQuotes(functionRenderContext.getArgument(1)); String valuesClause = JpqlFunctionUtil.unquoteSingleQuotes(functionRenderContext.getArgument(2)); String valuesAliases = JpqlFunctionUtil.unquoteSingleQuotes(functionRenderContext.getArgument(3)); String syntheticPredicate = JpqlFunctionUtil.unquoteSingleQuotes(functionRenderContext.getArgument(4)); String valuesTableSqlAlias = subquery.substring(aliasStartIndex, aliasEndIndex); appendSubqueryPart(sb, subquery, 1, subqueryEndIndex, subquery.length() - 1); if (!syntheticPredicate.isEmpty()) { String exampleQuerySqlAlias = syntheticPredicate.substring(0, syntheticPredicate.indexOf('.')); syntheticPredicate = syntheticPredicate.replace(exampleQuerySqlAlias, valuesTableSqlAlias); // TODO: this is a hibernate specific integration detail // Replace the subview subselect that is generated for this subselect final String subselect = "( select * from " + entityName + " )"; final String subselectTableExpr = subselect + " " + valuesTableSqlAlias; int subselectIndex = sb.indexOf(subselectTableExpr, 0); final String andSeparator = " and "; if (subselectIndex == -1) { // this is probably a VALUES clause for an entity type int syntheticPredicateStart = sb.indexOf(syntheticPredicate, sb.indexOf(" " + valuesTableSqlAlias + " ")); int end = syntheticPredicateStart + syntheticPredicate.length(); if (sb.indexOf(andSeparator, end) == end) { sb.replace(syntheticPredicateStart, end + andSeparator.length(), ""); } else { sb.replace(syntheticPredicateStart, end, "1=1"); } } else { while ((subselectIndex = sb.indexOf(subselectTableExpr, subselectIndex)) > -1) { int endIndex = subselectIndex + subselect.length(); int syntheticPredicateStart = sb.indexOf(syntheticPredicate, endIndex); int end = syntheticPredicateStart + syntheticPredicate.length(); if (sb.indexOf(andSeparator, end) == end) { sb.replace(syntheticPredicateStart, end + andSeparator.length(), ""); } else { sb.replace(syntheticPredicateStart, end, "1=1"); } sb.replace(subselectIndex, endIndex, entityName); } } } SqlUtils.applyTableNameRemapping(sb, valuesTableSqlAlias, valuesClause, valuesAliases, null, false); functionRenderContext.addChunk("("); functionRenderContext.addChunk(sb.toString()); functionRenderContext.addChunk(")"); } public static void appendSubqueryPart(StringBuilder sb, String sqlQuery) { int subqueryEndIndex = sqlQuery.lastIndexOf(AND_MARKER); if (subqueryEndIndex == -1) { sb.append(sqlQuery); } else { appendSubqueryPart(sb, sqlQuery, 0, subqueryEndIndex, sqlQuery.length()); } } private static void appendSubqueryPart(StringBuilder sb, String sqlQuery, int start, int subqueryEndIndex, int end) { sb.append(sqlQuery, start, subqueryEndIndex); int[] range = removeSyntheticPredicate(sqlQuery, subqueryEndIndex, end); sb.append(sqlQuery, range[0], range[1]); } public static void removeSyntheticPredicate(StringBuilder sb, String sqlQuery, int end) { int subqueryEndIndex = sb.lastIndexOf(AND_MARKER); int[] range = removeSyntheticPredicate(sqlQuery, subqueryEndIndex, end); sb.replace(subqueryEndIndex, range[0], ""); } private static int[] removeSyntheticPredicate(String sqlQuery, int subqueryEndIndex, int end) { // When inlining e.g. a VALUES clause we need to remove the synthetic predicate int idPredicateIndex = sqlQuery.indexOf(" and ", subqueryEndIndex + AND_MARKER.length()); if (idPredicateIndex == -1) { return new int[]{ subqueryEndIndex + AND_MARKER.length(), end }; } else { int isNullPredicateIndex = sqlQuery.indexOf(" is null", idPredicateIndex + 1); int newSubqueryPartStart = isNullPredicateIndex + " is null".length(); for (int i = idPredicateIndex + 1; i < isNullPredicateIndex; i++) { if (sqlQuery.charAt(i) == '(') { newSubqueryPartStart++; } } return new int[]{ newSubqueryPartStart, end }; } } }
[ "christian.beikov@gmail.com" ]
christian.beikov@gmail.com
d2135af8a63289b9e30edae38ef7ed5bb0d2ca05
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_6869.java
253d71e1fca0df312c253f69a9c9e5bf348c7fb1
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
151
java
package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_6869 { }
[ "sebastien.lesaint@gmail.com" ]
sebastien.lesaint@gmail.com
8edad0c332ff42710cccc0a0f02bf8777ffcf16c
cf77bc6f01b90b47e283f4a0ef5ce40a110e06b2
/src/main/java/br/com/projeto/drogaria/dao/ItemVendaDAO.java
78ae4f35c6c386e205125b56cd298c1cd767429a
[]
no_license
leandro19br/Drogaria
97953abac5c435a2ae76c3bf2523e452b53ccc22
38530402f062312cf4ce892b3ff6f2b4a5f6d5d4
refs/heads/master
2021-01-05T03:02:33.945770
2017-08-23T15:25:10
2017-08-23T15:25:10
99,436,028
0
0
null
null
null
null
UTF-8
Java
false
false
149
java
package br.com.projeto.drogaria.dao; import br.com.projeto.drogaria.domain.ItemVenda; public class ItemVendaDAO extends GenericDAO<ItemVenda> { }
[ "leandro19br@gmail.com" ]
leandro19br@gmail.com
475a39f136424704e8798d09e7ca425ca3a778d0
d8f9b0a6573837f08fd111eac80ea74391700142
/nimbleio-extend/src/main/java/com/generallycloud/nio/extend/plugin/jms/client/cmd/HelpExecutable.java
af3d4dab703004ca092889e713a2894c6f06a43f
[]
no_license
wenbo2018/NimbleIO
42e4ab8a4cdfe146dc2c1d8ccda4bd66af13e9bf
539083de663999d6d2fb41f262341890dd63d7e7
refs/heads/master
2021-01-18T10:44:01.873586
2016-09-13T03:11:26
2016-09-13T03:11:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
481
java
package com.generallycloud.nio.extend.plugin.jms.client.cmd; import java.util.HashMap; import com.generallycloud.nio.common.cmd.CmdResponse; import com.generallycloud.nio.common.cmd.CommandContext; public class HelpExecutable extends MQCommandExecutor { public CmdResponse exec(CommandContext context, HashMap<String, String> params) { CmdResponse response = new CmdResponse(); response.setResponse("请尝试:"+context.getCommandKeys()); return response; } }
[ "8738115@qq.com" ]
8738115@qq.com
79f4c33944e862a0c0231206eaf3f690558bf1c4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_8e3150601749bf7d2f29f790bc737563a7ce717c/Graph/4_8e3150601749bf7d2f29f790bc737563a7ce717c_Graph_t.java
be0b69d888623efcb111fd33ef26d8bfae1c740a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,349
java
package uk.ac.gla.dcs.tp3.w.algorithm; import java.util.LinkedList; import uk.ac.gla.dcs.tp3.w.league.League; import uk.ac.gla.dcs.tp3.w.league.Match; import uk.ac.gla.dcs.tp3.w.league.Team; public class Graph { private Vertex[] vertices; private int[][] matrix; private Vertex source; private Vertex sink; public Graph() { this(null, null); } public Graph(League l, Team t) { if (l == null || t == null) return; // Number of team nodes is one less than total number of teams. // The team nodes do not include the team being tested for elimination. int teamTotal = l.getTeams().length; // The r-combination of teamTotal for length 2 is the number of possible // combinations for matches between the list of Teams-{t}. int gameTotal = comb(teamTotal - 1, 2); // Total number of vertices is the number of teams-1 + number of match // pairs + source + sink. vertices = new Vertex[teamTotal + gameTotal + 1]; // Set first vertex to be source, and last vertex to be sink. // Create blank vertices for source and sink. source = new Vertex(0); sink = new Vertex(vertices.length - 1); vertices[0] = source; vertices[vertices.length - 1] = sink; // Create vertices for each team node, and make them adjacent to // the sink. Team[] teamsReal = l.getTeams(); Team[] teams = new Team[teamsReal.length - 1]; // Remove team T from the working list of Teams int pos = 0; for (Team to : teamsReal) { if (!to.equals(t)) { teams[pos] = to; pos++; } } // Create vertex for each team pair and make it adjacent from the // source. // Team[i] is in vertices[vertices.length -2 -i] pos = vertices.length - 2; for (int i = 0; i < teams.length; i++) { vertices[pos] = new TeamVertex(teams[i], pos); vertices[pos].getAdjList().add( new AdjListNode(teams[i].getUpcomingMatches().length, vertices[vertices.length - 1])); pos--; } // Create vertex for each team pair and make it adjacent from the // source. pos = 1; // TODO limit this to something more sensible int infinity = Integer.MAX_VALUE; for (int i = 0; i < teams.length; i++) { for (int j = 1; j < teams.length; j++) { vertices[pos] = new PairVertex(teams[i], teams[j], pos); vertices[pos].getAdjList().add( new AdjListNode(infinity, vertices[vertices.length - 2 - i])); vertices[pos].getAdjList().add( new AdjListNode(infinity, vertices[vertices.length - 2 - j])); vertices[0].getAdjList().add(new AdjListNode(0, vertices[pos])); pos++; } } // For each match not yet played and not involving t, increment the // capacity of the vertex going from home and away team node->sink and // float->pair node of home and away for (Match M : l.getFixtures()) { if (!M.isPlayed() && !(M.getAwayTeam().equals(t) || M.getHomeTeam().equals(t))) { Team home = M.getHomeTeam(); Team away = M.getAwayTeam(); for (int i = vertices.length - 2; i < teams.length; i--) { TeamVertex TV = (TeamVertex) vertices[i]; if (TV.getTeam().equals(home)) { vertices[i].getAdjList().peek().incCapacity(); } else if (TV.getTeam().equals(away)) { vertices[i].getAdjList().peek().incCapacity(); } } for (AdjListNode A : vertices[0].getAdjList()) { PairVertex PV = (PairVertex) A.getVertex(); if ((PV.getTeamA().equals(home) && PV.getTeamB().equals( away)) || PV.getTeamA().equals(away) && PV.getTeamB().equals(home)) { A.incCapacity(); } } } } // TODO Create the adjacency matrix representation of the graph. } public Vertex[] getV() { return vertices; } public void setV(Vertex[] v) { this.vertices = v; } public int[][] getMatrix() { return matrix; } public int getSize() { return vertices.length; } public void setMatrix(int[][] matrix) { this.matrix = matrix; } public Vertex getSource() { return source; } public void setSource(Vertex source) { this.source = source; } public Vertex getSink() { return sink; } public void setSink(Vertex sink) { this.sink = sink; } private static int fact(int s) { // For s < 2, the factorial is 1. Otherwise, multiply s by fact(s-1) return (s < 2) ? 1 : s * fact(s - 1); } private static int comb(int n, int r) { // r-combination of size n is n!/r!(n-r)! return (fact(n) / (fact(r) * fact(n - r))); } /** * carry out a breadth first search/traversal of the graph */ public void bfs() { // TODO Read over this code, I (GR) just dropped this in here from // bfs-example. for (Vertex v : vertices) v.setVisited(false); LinkedList<Vertex> queue = new LinkedList<Vertex>(); for (Vertex v : vertices) { if (!v.getVisited()) { v.setVisited(true); v.setPredecessor(v.getIndex()); queue.add(v); while (!queue.isEmpty()) { Vertex u = queue.removeFirst(); LinkedList<AdjListNode> list = u.getAdjList(); for (AdjListNode node : list) { Vertex w = node.getVertex(); if (!w.getVisited()) { w.setVisited(true); w.setPredecessor(u.getIndex()); queue.add(w); } } } } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5caec09762ddccc4f04bb6115a214c8402d2deee
18b20a45faa4cf43242077e9554c0d7d42667fc2
/HelicoBacterMod/build/tmp/expandedArchives/forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3-sources.jar_db075387fe30fb93ccdc311746149f9d/net/minecraft/world/gen/feature/jigsaw/EmptyJigsawPiece.java
1e03484aaa4c4e8bbb9104383e27b1371daf40c3
[]
no_license
qrhlhplhp/HelicoBacterMod
2cbe1f0c055fd5fdf97dad484393bf8be32204ae
0452eb9610cd70f942162d5b23141b6bf524b285
refs/heads/master
2022-07-28T16:06:03.183484
2021-03-20T11:01:38
2021-03-20T11:01:38
347,618,857
2
0
null
null
null
null
UTF-8
Java
false
false
1,635
java
package net.minecraft.world.gen.feature.jigsaw; import com.mojang.datafixers.Dynamic; import com.mojang.datafixers.types.DynamicOps; import java.util.Collections; import java.util.List; import java.util.Random; import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MutableBoundingBox; import net.minecraft.world.IWorld; import net.minecraft.world.gen.feature.template.Template; import net.minecraft.world.gen.feature.template.TemplateManager; public class EmptyJigsawPiece extends JigsawPiece { public static final EmptyJigsawPiece INSTANCE = new EmptyJigsawPiece(); private EmptyJigsawPiece() { super(JigsawPattern.PlacementBehaviour.TERRAIN_MATCHING); } public List<Template.BlockInfo> func_214849_a(TemplateManager p_214849_1_, BlockPos p_214849_2_, Rotation p_214849_3_, Random p_214849_4_) { return Collections.emptyList(); } public MutableBoundingBox func_214852_a(TemplateManager p_214852_1_, BlockPos p_214852_2_, Rotation p_214852_3_) { return MutableBoundingBox.getNewBoundingBox(); } public boolean func_214848_a(TemplateManager p_214848_1_, IWorld worldIn, BlockPos p_214848_3_, Rotation p_214848_4_, MutableBoundingBox p_214848_5_, Random p_214848_6_) { return true; } public IJigsawDeserializer getType() { return IJigsawDeserializer.EMPTY_POOL_ELEMENT; } public <T> Dynamic<T> serialize0(DynamicOps<T> p_214851_1_) { return new Dynamic<>(p_214851_1_, p_214851_1_.emptyMap()); } public String toString() { return "Empty"; } }
[ "rubickraft169@gmail.com" ]
rubickraft169@gmail.com
cac10fc6a8a16c1f72cf2677a29b6d6d2f0e2a65
c12b21d925193836dc48c06fda5a33b44244f5d8
/src/test/java/com/hivemq/client/internal/mqtt/codec/encoder/mqtt5/Mqtt5PingReqEncoderTest.java
8f52c437122b9b35f324bcb06cb0ab698420c96b
[ "Apache-2.0" ]
permissive
thanhncunit/hivemq-mqtt-client
609a020f3cbf3d3a9af92121da69fc7f1d6f691d
d2b4aeb4da7b8950ddd69b1003707f36b36e32d6
refs/heads/develop
2020-11-24T00:37:27.890212
2019-11-13T20:43:56
2019-11-20T13:11:27
227,887,095
0
1
Apache-2.0
2019-12-13T17:07:07
2019-12-13T17:07:06
null
UTF-8
Java
false
false
1,875
java
/* * Copyright 2018 dc-square and the HiveMQ MQTT Client Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.hivemq.client.internal.mqtt.codec.encoder.mqtt5; import com.hivemq.client.internal.mqtt.codec.encoder.MqttMessageEncoders; import com.hivemq.client.internal.mqtt.message.ping.MqttPingReq; import com.hivemq.client.mqtt.mqtt5.message.Mqtt5MessageType; import io.netty.buffer.ByteBuf; import org.junit.jupiter.api.Test; import static org.junit.Assert.assertArrayEquals; /** * @author David Katz */ class Mqtt5PingReqEncoderTest extends AbstractMqtt5EncoderTest { Mqtt5PingReqEncoderTest() { super(new MqttMessageEncoders() {{ encoders[Mqtt5MessageType.PINGREQ.getCode()] = createPingReqEncoder(); }}, true); } @Test void encode_pingreq() { final byte[] expected = { // fixed header // type, reserved (byte) 0b1100_0000, // remaining length 0 }; final MqttPingReq pingReq = MqttPingReq.INSTANCE; channel.writeOutbound(pingReq); final ByteBuf byteBuf = channel.readOutbound(); final byte[] actual = new byte[byteBuf.readableBytes()]; byteBuf.readBytes(actual); byteBuf.release(); assertArrayEquals(expected, actual); } }
[ "gieblsilvio@outlook.com" ]
gieblsilvio@outlook.com
095f36693fd7dcb2c8fe22b158bdd0b5ed5f4497
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
/flakiness-predicter/input_data/original_tests/activiti-activiti/nonFlakyMethods/org.activiti.editor.language.xml.CommaSplitterTest-testOManyComaInExpression.java
9fb1b768b1f96c6c4d7980ffd5827f5bfb0234d3
[ "BSD-3-Clause" ]
permissive
Taher-Ghaleb/FlakeFlagger
6fd7c95d2710632fd093346ce787fd70923a1435
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
refs/heads/main
2023-07-14T16:57:24.507743
2021-08-26T14:50:16
2021-08-26T14:50:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
@Test public void testOManyComaInExpression(){ String testString="${Everything,should,be,made,as,simple,as,possible},but,no,simpler"; List<String> result=CommaSplitter.splitCommas(testString); assertNotNull(result); assertEquals(4,result.size()); assertEquals("${Everything,should,be,made,as,simple,as,possible}",result.get(0)); assertEquals("but",result.get(1)); assertEquals("no",result.get(2)); assertEquals("simpler",result.get(3)); }
[ "aalsha2@masonlive.gmu.edu" ]
aalsha2@masonlive.gmu.edu
539e00db8eaaa0e96587ed7b26bc4524b1c76305
a2d4bec9812e129e28a63507da7b3aa3f96f5787
/com/google/android/gms/internal/ey.java
225636bdd4ee7b0a18d943c9704c45a61cec1250
[]
no_license
achoraev/RealRacingSource
c5720b4a4437e96c356e88e225a8d0f812e3520a
9bc98f4708c8f67c388b35d756e3c3517572163e
refs/heads/master
2020-04-17T16:47:58.342025
2015-04-22T06:52:40
2015-04-22T06:52:40
34,332,999
0
0
null
null
null
null
UTF-8
Java
false
false
7,762
java
package com.google.android.gms.internal; import android.content.Context; import android.net.Uri.Builder; import android.os.Build; import android.os.Build.VERSION; import android.os.Bundle; import android.os.Looper; import android.text.TextUtils; import java.io.PrintWriter; import java.io.StringWriter; import java.util.ArrayList; import java.util.LinkedList; @ez public class ey implements Thread.UncaughtExceptionHandler { private Context mContext; private Thread.UncaughtExceptionHandler sR; private Thread.UncaughtExceptionHandler sS; private gt sT; public ey(Context paramContext, gt paramgt, Thread.UncaughtExceptionHandler paramUncaughtExceptionHandler1, Thread.UncaughtExceptionHandler paramUncaughtExceptionHandler2) { this.sR = paramUncaughtExceptionHandler1; this.sS = paramUncaughtExceptionHandler2; this.mContext = paramContext; this.sT = paramgt; } public static ey a(Context paramContext, Thread paramThread, gt paramgt) { if ((paramContext == null) || (paramThread == null) || (paramgt == null)) { return null; } gb.bD(); if (!k(paramContext)) { return null; } Thread.UncaughtExceptionHandler localUncaughtExceptionHandler = paramThread.getUncaughtExceptionHandler(); ey localey = new ey(paramContext, paramgt, localUncaughtExceptionHandler, Thread.getDefaultUncaughtExceptionHandler()); if ((localUncaughtExceptionHandler == null) || (!(localUncaughtExceptionHandler instanceof ey))) { try { paramThread.setUncaughtExceptionHandler(localey); return localey; } catch (SecurityException localSecurityException) { gs.c("Fail to set UncaughtExceptionHandler.", localSecurityException); return null; } } return (ey)localUncaughtExceptionHandler; } private String cw() { String str1 = Build.MANUFACTURER; String str2 = Build.MODEL; if (str2.startsWith(str1)) { return str2; } return str1 + " " + str2; } private Throwable d(Throwable paramThrowable) { Bundle localBundle = gb.bD(); if ((localBundle != null) && (localBundle.getBoolean("gads:sdk_crash_report_full_stacktrace", false))) { return paramThrowable; } LinkedList localLinkedList = new LinkedList(); while (paramThrowable != null) { localLinkedList.push(paramThrowable); paramThrowable = paramThrowable.getCause(); } Object localObject1 = null; Throwable localThrowable; Object localObject2; if (!localLinkedList.isEmpty()) { localThrowable = (Throwable)localLinkedList.pop(); StackTraceElement[] arrayOfStackTraceElement = localThrowable.getStackTrace(); ArrayList localArrayList = new ArrayList(); localArrayList.add(new StackTraceElement(localThrowable.getClass().getName(), "<filtered>", "<filtered>", 1)); int i = arrayOfStackTraceElement.length; int j = 0; int k = 0; if (j < i) { StackTraceElement localStackTraceElement = arrayOfStackTraceElement[j]; if (G(localStackTraceElement.getClassName())) { localArrayList.add(localStackTraceElement); k = 1; } for (;;) { j++; break; if (H(localStackTraceElement.getClassName())) { localArrayList.add(localStackTraceElement); } else { localArrayList.add(new StackTraceElement("<filtered>", "<filtered>", "<filtered>", 1)); } } } if (k == 0) { break label276; } if (localObject1 == null) { localObject2 = new Throwable(localThrowable.getMessage()); label230: ((Throwable)localObject2).setStackTrace((StackTraceElement[])localArrayList.toArray(new StackTraceElement[0])); } } for (;;) { localObject1 = localObject2; break; localObject2 = new Throwable(localThrowable.getMessage(), localObject1); break label230; return localObject1; label276: localObject2 = localObject1; } } private static boolean k(Context paramContext) { Bundle localBundle = gb.bD(); if (localBundle == null) {} while (!localBundle.getBoolean("gads:sdk_crash_report_enabled", false)) { return false; } return true; } protected boolean G(String paramString) { if (TextUtils.isEmpty(paramString)) { return false; } if (paramString.startsWith("com.google.android.gms.ads")) { return true; } if (paramString.startsWith("com.google.ads")) { return true; } try { boolean bool = Class.forName(paramString).isAnnotationPresent(ez.class); return bool; } catch (Exception localException) { gs.a("Fail to check class type for class " + paramString, localException); } return false; } protected boolean H(String paramString) { if (TextUtils.isEmpty(paramString)) {} while ((!paramString.startsWith("android.")) && (!paramString.startsWith("java."))) { return false; } return true; } protected boolean a(Throwable paramThrowable) { boolean bool = true; if (paramThrowable == null) { return false; } int i = 0; int j = 0; while (paramThrowable != null) { for (StackTraceElement localStackTraceElement : paramThrowable.getStackTrace()) { if (G(localStackTraceElement.getClassName())) { j = bool; } if (getClass().getName().equals(localStackTraceElement.getClassName())) { i = bool; } } paramThrowable = paramThrowable.getCause(); } if ((j != 0) && (i == 0)) {} for (;;) { return bool; bool = false; } } public void b(Throwable paramThrowable) { if (!k(this.mContext)) {} Throwable localThrowable; do { return; localThrowable = d(paramThrowable); } while (localThrowable == null); ArrayList localArrayList = new ArrayList(); localArrayList.add(c(localThrowable)); gj.a(this.mContext, this.sT.wD, localArrayList, gb.de()); } protected String c(Throwable paramThrowable) { StringWriter localStringWriter = new StringWriter(); paramThrowable.printStackTrace(new PrintWriter(localStringWriter)); return new Uri.Builder().scheme("https").path("//pagead2.googlesyndication.com/pagead/gen_204").appendQueryParameter("id", "gmob-apps-report-exception").appendQueryParameter("os", Build.VERSION.RELEASE).appendQueryParameter("api", String.valueOf(Build.VERSION.SDK_INT)).appendQueryParameter("device", cw()).appendQueryParameter("js", this.sT.wD).appendQueryParameter("appid", this.mContext.getApplicationContext().getPackageName()).appendQueryParameter("stacktrace", localStringWriter.toString()).toString(); } public void uncaughtException(Thread paramThread, Throwable paramThrowable) { if (a(paramThrowable)) { b(paramThrowable); if (Looper.getMainLooper().getThread() == paramThread) {} } do { return; if (this.sR != null) { this.sR.uncaughtException(paramThread, paramThrowable); return; } } while (this.sS == null); this.sS.uncaughtException(paramThread, paramThrowable); } } /* Location: E:\Dropbox\Dropbox\RealRacingHack\Decompile\install_dex2jar.jar * Qualified Name: com.google.android.gms.internal.ey * JD-Core Version: 0.7.0.1 */
[ "audulin@gmail.com" ]
audulin@gmail.com
e33db81236c4631e4d7d6dcb50aabb976cc7f981
71007018bfae36117fd2f779dbe6e6d7bb9bde9c
/src/test/java/com/magento/test/service/CustomerEavAttributeWebsiteServiceTest.java
1f80b2c629e6af80d7ab9cdc932cfd8fa9d44499
[]
no_license
gmai2006/magentotest
819201760b720a90d55ef853be964651ace125ac
ca67d16d6280ddaefbf57fa1129b6ae7bd80408f
refs/heads/main
2023-09-03T05:14:27.788984
2021-10-17T06:25:09
2021-10-17T06:25:09
418,040,494
0
0
null
null
null
null
UTF-8
Java
false
false
3,352
java
/** * %% Copyright (C) 2021 DataScience 9 LLC %% Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * <p>http://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing permissions and * limitations under the License. #L% * * <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or * function or changes please update the templates then submit the template through our web * interface. */ package com.magento.test.service; import com.magento.test.entity.CustomerEavAttributeWebsite; import com.magento.test.entity.CustomerEavAttributeWebsiteId; import com.magento.test.utils.FileUtils; import com.google.gson.JsonArray; import com.google.gson.GsonBuilder; import org.junit.BeforeClass; import org.junit.Test; import java.io.IOException; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.List; import java.util.Arrays; import com.google.gson.Gson; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.magento.test.utils.ByteArrayToBase64TypeAdapter; public class CustomerEavAttributeWebsiteServiceTest { private static DefaultCustomerEavAttributeWebsiteService serviceMock; private static CustomerEavAttributeWebsite[] records; static Gson gson = new GsonBuilder() .registerTypeHierarchyAdapter(byte[].class, new ByteArrayToBase64TypeAdapter()) .setDateFormat("yyyy-MM-dd HH:mm:ss.S") .create(); /** Run when the class is loaded. */ @BeforeClass public static void setUp() { serviceMock = mock(DefaultCustomerEavAttributeWebsiteService.class); String inputFile = "CustomerEavAttributeWebsite.json"; try { String json = FileUtils.readFileFromResource2String(inputFile, Charset.defaultCharset()); records = gson.fromJson(json, CustomerEavAttributeWebsite[].class); } catch (IOException ex) { ex.printStackTrace(); } final CustomerEavAttributeWebsiteId id = new CustomerEavAttributeWebsiteId(records[0].getAttributeId(), records[0].getWebsiteId()); when(serviceMock.find(id)).thenReturn(records[0]); } @Test public void testFind_success() { final CustomerEavAttributeWebsiteId id = new CustomerEavAttributeWebsiteId(records[0].getAttributeId(), records[0].getWebsiteId()); CustomerEavAttributeWebsite testResult = serviceMock.find(id); org.junit.Assert.assertNotNull(testResult); org.junit.Assert.assertTrue( "expect equals isVisible ", records[0].getIsVisible() == testResult.getIsVisible()); org.junit.Assert.assertTrue( "expect equals isRequired ", records[0].getIsRequired() == testResult.getIsRequired()); org.junit.Assert.assertEquals( "expect equals defaultValue ", records[0].getDefaultValue(), testResult.getDefaultValue()); org.junit.Assert.assertTrue( "expect equals multilineCount ", records[0].getMultilineCount() == testResult.getMultilineCount()); } }
[ "gmai2006@gmail.com" ]
gmai2006@gmail.com
236a4c90739e5ea4480318533fc1ba6e0b04583c
cabe0c0f2b3caa865a21456368423cc2d2776218
/src/main/java/com/lonskaya/repository/search/SalesforceContactSearchRepository.java
9a023c3dbbd3130204d2328fd9992a83ab517dd4
[]
no_license
antidote2/lonskaya
530f0f2b0c8e6645f58ea8769f3c92b1db5fbd75
232a432ef509718cb58e59861e4dec920b561394
refs/heads/master
2021-09-07T06:04:41.933668
2018-02-18T12:33:19
2018-02-18T12:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
364
java
package com.lonskaya.repository.search; import com.lonskaya.domain.SalesforceContact; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; /** * Spring Data Elasticsearch repository for the SalesforceContact entity. */ public interface SalesforceContactSearchRepository extends ElasticsearchRepository<SalesforceContact, Long> { }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
f56fdfb7de1c8db196678a8a03282f303b8cbebf
a266d6856ecdcca63343ee214b6210b7d0391b57
/chapter_enum/src/main/java/ru/pimalex1978/goodbadcode/TaxiServiceBad.java
c71c228dd77cc0b5773f287edf3965c3725d6759
[]
no_license
alexander-pimenov/javalesson
21aced7983d22daafc1e8dcb43341d2515ff7076
35b79e63279aaef94b8812f2ca9bc51212b9d952
refs/heads/master
2023-05-26T06:21:53.710359
2023-05-23T19:00:29
2023-05-23T19:00:29
226,805,717
0
0
null
2023-03-04T11:55:45
2019-12-09T06:58:50
Java
UTF-8
Java
false
false
135
java
package ru.pimalex1978.goodbadcode; public enum TaxiServiceBad { ALMAZ_7788, Stolitsa_135, VIP_107, Crystal_7778, TaxiCargo_163 }
[ "pimalex1978@yandex.ru" ]
pimalex1978@yandex.ru
6a74e7f1d5481bd61fb8d0b48c5691d301ac2381
71007018bfae36117fd2f779dbe6e6d7bb9bde9c
/src/main/java/com/magento/test/dao/DefaultSalesruleCouponAggregatedOrderDao.java
c4c72181df2e98acac7b939df7c862ec33308be0
[]
no_license
gmai2006/magentotest
819201760b720a90d55ef853be964651ace125ac
ca67d16d6280ddaefbf57fa1129b6ae7bd80408f
refs/heads/main
2023-09-03T05:14:27.788984
2021-10-17T06:25:09
2021-10-17T06:25:09
418,040,494
0
0
null
null
null
null
UTF-8
Java
false
false
2,741
java
/** * %% Copyright (C) 2021 DataScience 9 LLC %% Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * <p>http://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing permissions and * limitations under the License. #L% * * <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or * function or changes please update the templates then submit the template through our web * interface. */ package com.magento.test.dao; import static java.util.Objects.requireNonNull; import java.util.List; import java.util.logging.Logger; import javax.inject.Inject; import javax.ejb.Stateless; import javax.inject.Named; import javax.persistence.EntityManager; import javax.transaction.Transactional; import com.magento.test.entity.SalesruleCouponAggregatedOrder; import com.magento.test.entity.SalesruleCouponAggregatedOrderId; @Stateless @Named("DefaultSalesruleCouponAggregatedOrderDao") public class DefaultSalesruleCouponAggregatedOrderDao implements SalesruleCouponAggregatedOrderDao { private static final int BATCH_SIZE = 50; private final Logger logger = Logger.getLogger(this.getClass().getName()); private JpaDao dao; @Inject @Named("DefaultJpaDao") public DefaultSalesruleCouponAggregatedOrderDao(JpaDao dao) { this.dao = dao; } public DefaultSalesruleCouponAggregatedOrderDao() {} /** {@inheritDoc} */ @Override public SalesruleCouponAggregatedOrder find(SalesruleCouponAggregatedOrderId id) { final EntityManager em = dao.getEntityManager(); return em.find(SalesruleCouponAggregatedOrder.class, id); } /** {@inheritDoc} */ @Override public List<SalesruleCouponAggregatedOrder> select(int max) { return dao.select( "select a from SalesruleCouponAggregatedOrder a", SalesruleCouponAggregatedOrder.class, max); } /** {@inheritDoc} */ @Override public List<SalesruleCouponAggregatedOrder> selectAll() { return dao.selectAll( "select a from SalesruleCouponAggregatedOrder a", SalesruleCouponAggregatedOrder.class); } /** {@inheritDoc} */ @Override public SalesruleCouponAggregatedOrder create(SalesruleCouponAggregatedOrder e) { return dao.create(e); } /** {@inheritDoc} */ @Override public SalesruleCouponAggregatedOrder update(SalesruleCouponAggregatedOrder e) { return dao.update(e); } }
[ "gmai2006@gmail.com" ]
gmai2006@gmail.com
32792a8ea9cafc1f7a7c37843250004e6af0f20a
29f78bfb928fb6f191b08624ac81b54878b80ded
/generated_SPs_SCs/sc_invoke_sp_manager/src/main/java/sp_manager/output/OutputDataClassName_1_1.java
7859ed71d0acfb1b20234798702fe25d2dabc599
[]
no_license
MSPL4SOA/MSPL4SOA-tool
8a78e73b4ac7123cf1815796a70f26784866f272
9f3419e416c600cba13968390ee89110446d80fb
refs/heads/master
2020-04-17T17:30:27.410359
2018-07-27T14:18:55
2018-07-27T14:18:55
66,304,158
0
1
null
null
null
null
UTF-8
Java
false
false
1,620
java
package sp_manager.output; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name = "OutputDataClassName_1_1") public class OutputDataClassName_1_1 implements Serializable { private static final long serialVersionUID = 1L; @XmlElement(name = "OutputName_1_1_1") protected Integer OutputName_1_1_1; @XmlElement(name = "OutputName_1_1_2") protected Float OutputName_1_1_2; @XmlElement(name = "OutputName_1_1_3") protected Float OutputName_1_1_3; @XmlElement(name = "OutputName_1_1_4") protected Integer OutputName_1_1_4; @XmlElement(name = "OutputName_1_1_5") protected Integer OutputName_1_1_5; public Integer getOutputName_1_1_1() { return OutputName_1_1_1; } public Float getOutputName_1_1_2() { return OutputName_1_1_2; } public Float getOutputName_1_1_3() { return OutputName_1_1_3; } public Integer getOutputName_1_1_4() { return OutputName_1_1_4; } public Integer getOutputName_1_1_5() { return OutputName_1_1_5; } public void setOutputName_1_1_1(Integer value) { this.OutputName_1_1_1 = value; } public void setOutputName_1_1_2(Float value) { this.OutputName_1_1_2 = value; } public void setOutputName_1_1_3(Float value) { this.OutputName_1_1_3 = value; } public void setOutputName_1_1_4(Integer value) { this.OutputName_1_1_4 = value; } public void setOutputName_1_1_5(Integer value) { this.OutputName_1_1_5 = value; } }
[ "akram.kamoun@gmail.com" ]
akram.kamoun@gmail.com
32797070c8271726bc8ac05e8d136acf8b7e7670
ef50e50e0b61db62d0476b5b7df3d5f5044a16a9
/Graph_theory/beautiful-path/java/senthils.java
bc4b09f7a88148b7d2cd1eed6c76d43bc3b44fab
[]
no_license
saketrule/Research_Project-HackerRank_CheckStyle
09fd6ef3a067926c754af693b13566cc55fe16ae
4334bcbc4620fb94fd3d63034a320756e7233ded
refs/heads/master
2021-01-22T13:03:08.055929
2017-09-12T12:11:19
2017-09-12T12:11:19
102,361,527
0
1
null
null
null
null
UTF-8
Java
false
false
2,433
java
import java.io.FileReader; import java.util.*; import java.util.Comparator; import java.util.HashMap; import java.util.Map; import java.util.PriorityQueue; import java.util.Queue; import java.util.Scanner; class Node { int label; int dist = Integer.MAX_VALUE; Map<Integer, List<Integer>> edges; Node(int l) { label = l; edges = new HashMap<>(); } } public class Solution { static void bellmanford(Node[] graph, int N, int M, int start, int end) { graph[start].dist = 0; for(int i=0; i < N-1; i++) { for(int j=0; j < N; j++) { Node curNode = graph[j]; for(Map.Entry<Integer, List<Integer>> entry : curNode.edges.entrySet()) { Node toNode = graph[entry.getKey()]; for(Integer cost : entry.getValue()) { if((curNode.dist | cost) < toNode.dist) { toNode.dist = curNode.dist | cost; } } } } } System.out.println(graph[end].dist == Integer.MAX_VALUE ? -1 : graph[end].dist); } public static void main(String[] args) throws Exception{ /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner in = new Scanner(System.in); int T = 1; //in.nextInt(); for(int i=0; i < T; i++) { int N = in.nextInt(); int M = in.nextInt(); Node[] graph = new Node[N]; for(int j=0; j < N; j++) { graph[j] = new Node(j); } for(int j=0; j < M; j++) { int start = in.nextInt()-1, end = in.nextInt()-1, cost = in.nextInt(); if(!graph[start].edges.containsKey(end)) { graph[start].edges.put(end, new ArrayList()); graph[end].edges.put(start, new ArrayList()); } graph[start].edges.get(end).add(cost); graph[end].edges.get(start).add(cost); } int S = in.nextInt()-1; int E = in.nextInt()-1; bellmanford(graph, N, M, S, E); } in.close(); } }
[ "anonymoussaketjoshi@gmail.com" ]
anonymoussaketjoshi@gmail.com
7c3ebfdf7101436060b84a42e32592018a9bb1f6
a544cb5ab5b1762d720653fa7233b1cfffe5220a
/07.Hibernate Code First & Entity Relatoins/04.Hospital Database/src/main/java/entities/Medicament.java
a9589706f750628aec4709cd56d5fa9172c1cd62
[]
no_license
AtanasYordanov/JavaDB-Frameworks---Hibernate-Spring-Data
ec2c7954ffed8df767d950a0a4e8aff231c185b4
cecd44ee0a6e20f6ea23c7bec5e9f62796a612a5
refs/heads/master
2021-04-03T10:08:36.875455
2018-06-19T07:42:06
2018-06-19T07:42:06
125,184,186
0
1
null
null
null
null
UTF-8
Java
false
false
918
java
package entities; import javax.persistence.*; import java.util.Set; @Entity @Table(name = "medicaments") public class Medicament { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(nullable = false, length = 200) private String name; @ManyToMany(mappedBy = "prescribedMedicaments", cascade = CascadeType.ALL) private Set<Patient> patients; public Medicament() { } public Medicament(String name) { this.name = name; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Set<Patient> getPatients() { return patients; } public void setPatients(Set<Patient> patients) { this.patients = patients; } }
[ "naskoraist@gmail.com" ]
naskoraist@gmail.com
90238f2a064e5b4c5d61a5c02be7def8a1e36bea
adad299298b3a4ddbc0d152093b3e5673a940e52
/neohort4ape/src/application/shared/FieldVerifier.java
fb1170e59ad161e4002122a20fc1a5f634174b9e
[]
no_license
surban1974/neohort
a692e49c8e152cea0b155d81c2b2b1b167630ba8
0c371590e739defbc25d5befd1d44fcf18d1bcab
refs/heads/master
2022-07-27T18:57:49.916560
2022-01-04T18:00:12
2022-01-04T18:00:12
5,521,942
2
1
null
2022-06-30T20:10:02
2012-08-23T08:33:40
Java
UTF-8
Java
false
false
1,547
java
package application.shared; /** * <p> * FieldVerifier validates that the name the user enters is valid. * </p> * <p> * This class is in the <code>shared</code> packing because we use it in both * the client code and on the server. On the client, we verify that the name is * valid before sending an RPC request so the user doesn't have to wait for a * network round trip to get feedback. On the server, we verify that the name is * correct to ensure that the input is correct regardless of where the RPC * originates. * </p> * <p> * When creating a class that is used on both the client and the server, be sure * that all code is translatable and does not use native JavaScript. Code that * is note translatable (such as code that interacts with a database or the file * system) cannot be compiled into client side JavaScript. Code that uses native * JavaScript (such as Widgets) cannot be run on the server. * </p> */ public class FieldVerifier { /** * Verifies that the specified name is valid for our service. * * In this example, we only require that the name is at least four * characters. In your application, you can use more complex checks to ensure * that usernames, passwords, email addresses, URLs, and other fields have the * proper syntax. * * @param name the name to validate * @return true if valid, false if invalid */ public static boolean isValidName(String name) { if (name == null) { return false; } return name.length() > 3; } }
[ "svyatoslav.urbanovych@gmail.com" ]
svyatoslav.urbanovych@gmail.com
83b4f886d7da480ea784cb294acb24ef1ae0e550
13173517a28871029fa7b57ded8145b5b9972022
/src/main/java/acme/study_guide/chapter05/review_questions/question14/Example.java
6b63a493203ab5970ff862f1bf8d26dc9660a37c
[]
no_license
dbelob/ocp-jse8
9001d1833d7bb7e8c874ae7c56b62602d7d1979c
3c8496833c3023c16d28d56020df6c8f2afd934e
refs/heads/master
2021-06-22T22:33:38.232484
2020-12-20T17:16:04
2020-12-20T17:16:04
161,197,521
1
2
null
null
null
null
UTF-8
Java
false
false
680
java
package acme.study_guide.chapter05.review_questions.question14; import java.time.LocalDate; import java.time.LocalTime; import java.time.ZoneId; import java.time.ZonedDateTime; public class Example { public static void main(String[] args) { ZoneId zone = ZoneId.of("US/Eastern"); LocalDate date = LocalDate.of(2016, 3, 13); // LocalDate date = LocalDate.of(2016, 3, 40); // LocalDate date = LocalDate.of(2016, 11, 6); // LocalDate date = LocalDate.of(2016, 11, 7); // LocalDate date = LocalDate.of(2017, 2, 29); LocalTime time1 = LocalTime.of(2, 15); ZonedDateTime a = ZonedDateTime.of(date, time1, zone); } }
[ "dbelob@users.noreply.github.com" ]
dbelob@users.noreply.github.com
43f4a1f30270a06ec65db6f4cf8fb44fc3d93532
cf64ff59a0292500d65d69fcfb0b42d7e4dba9d8
/samples/powerPoint/build/src/vba/vbext_CodePaneview.java
b63bb90fd18cc18a8c4bbd8e2d85f33b402686eb
[ "BSD-2-Clause" ]
permissive
nosdod/CDWriterJava
0bb3db2e68278c445b78afc665731e058dc42ea4
7146689889d8d50d7162b21ea0b98fc5c2364306
refs/heads/main
2023-09-06T01:32:33.614647
2021-11-23T15:14:42
2021-11-23T15:14:42
431,142,538
0
0
null
null
null
null
UTF-8
Java
false
false
275
java
package vba ; import com4j.*; /** */ public enum vbext_CodePaneview { /** * <p> * The value of this constant is 0 * </p> */ vbext_cv_ProcedureView, // 0 /** * <p> * The value of this constant is 1 * </p> */ vbext_cv_FullModuleView, // 1 }
[ "mark.dodson@dodtech.co.uk" ]
mark.dodson@dodtech.co.uk
0c3fd5a197acd8c5c2d4da98e3e9e9229de98f15
95cd21c6bfd537886adefa1dd7e5916ca4dcf559
/optifine/IFileDownloadListener.java
48a66a182280ab1f196c800b2e6ef466fef572a8
[]
no_license
RavenLeaks/BetterCraft-src
acd3653e9259b46571e102480164d86dc75fb93f
fca1f0f3345b6b75eef038458c990726f16c7ee8
refs/heads/master
2022-10-27T23:36:27.113266
2020-06-09T15:50:17
2020-06-09T15:50:17
271,044,072
4
2
null
null
null
null
UTF-8
Java
false
false
337
java
package optifine; public interface IFileDownloadListener { void fileDownloadFinished(String paramString, byte[] paramArrayOfbyte, Throwable paramThrowable); } /* Location: C:\Users\emlin\Desktop\BetterCraft.jar!\optifine\IFileDownloadListener.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "emlin2021@gmail.com" ]
emlin2021@gmail.com
3b92e10ec87c2fc347a24986307daf207d4bc49c
47bee068ddb9dacfff94d08341f604ebe97f9fef
/src/main/java/com/smlsnnshn/Lessons/day16_classes_and_objects/Employee.java
f8857414ff079f0fc7acb000562d1f3d6abbcd0d
[]
no_license
ismailsinansahin/JavaLessons
55686229d946390a52383f5d80e1053f411286e7
768cb63e22462e7c2eef709102df5d19d9c98568
refs/heads/master
2023-07-18T23:10:31.302133
2021-09-14T20:56:35
2021-09-14T20:56:35
360,487,169
2
0
null
null
null
null
UTF-8
Java
false
false
431
java
package com.smlsnnshn.Lessons.day16_classes_and_objects; public class Employee { String name; String job_title; int salary; public void work() { System.out.println(name + " is working hard."); } public void attend_meeting() { System.out.println(name + " is attending a meeting"); } public void introduce() { System.out.println("name: " + name + " job title: " + "salary: " + salary); } }
[ "ismailsinansahin@gmail.com" ]
ismailsinansahin@gmail.com
a88c1d273a97ab3115c2f113fa5686b74a650897
e124c06aa37b93502a84f8931e1e792539883b9d
/divinerpg/entities/vethea/EntityGalroid.java
6eddc87a2991f3539ad71fd58d1bb748521e6e42
[]
no_license
m-shayanshafi/FactRepositoryProjects
12d7b65505c1e0a8e0ec3577cf937a1e3d17c417
1d45d667b454064107d78213e8cd3ec795827b41
refs/heads/master
2020-06-13T12:04:53.891793
2016-12-02T11:30:49
2016-12-02T11:30:49
75,389,381
1
0
null
null
null
null
UTF-8
Java
false
false
4,416
java
package net.divinerpg.entities.vethea; import net.divinerpg.entities.base.EntityDivineRPGMob; import net.divinerpg.libs.Sounds; import net.divinerpg.utils.items.VetheaItems; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.potion.Potion; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class EntityGalroid extends VetheaMob { public EntityGalroid(World var1) { super(var1); addAttackingAI(); } @Override public void entityInit() { super.entityInit(); this.dataWatcher.addObject(19, 200); this.dataWatcher.addObject(20, 1); } @Override public int getSpawnLayer() { return 3; } @Override public void onLivingUpdate() { super.onLivingUpdate(); if (this.getProtectionTimer() <= 0 && !this.getInvincible()) { this.setProtectionTimer(200); this.setInvincible(1); } else if (this.isEntityInvulnerable() && this.getProtectionTimer() <= 0) { this.setProtectionTimer(200); this.setInvincible(0); } this.setProtectionTimer(this.getProtectionTimer()-1); } public boolean getInvincible() { return this.dataWatcher.getWatchableObjectInt(20) == 1; } public int getProtectionTimer() { return this.dataWatcher.getWatchableObjectInt(19); } public void setInvincible(int i) { this.dataWatcher.updateObject(20, i); } public void setProtectionTimer(int i) { this.dataWatcher.updateObject(19, i); } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(net.divinerpg.entities.base.EntityStats.galroidHealth); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(net.divinerpg.entities.base.EntityStats.galroidDamage); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(net.divinerpg.entities.base.EntityStats.galroidSpeed); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(net.divinerpg.entities.base.EntityStats.galroidFollowRange); } @Override protected float getSoundVolume() { return 0.7F; } @Override protected String getLivingSound() { return Sounds.galroid.getPrefixedName(); } @Override protected String getHurtSound() { return Sounds.galroidHurt.getPrefixedName(); } @Override protected String getDeathSound() { return getHurtSound(); } @Override public boolean attackEntityAsMob(Entity par1Entity) { float var2 = 25; if (this.isPotionActive(Potion.damageBoost)) { var2 += 3 << this.getActivePotionEffect(Potion.damageBoost).getAmplifier(); } if (this.isPotionActive(Potion.weakness)) { var2 -= 2 << this.getActivePotionEffect(Potion.weakness).getAmplifier(); } int var3 = 0; if (par1Entity instanceof EntityLiving) { var2 += EnchantmentHelper.getEnchantmentModifierLiving(this, (EntityLiving)par1Entity); var3 += EnchantmentHelper.getKnockbackModifier(this, (EntityLiving)par1Entity); } boolean var4 = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), var2); if (var4) { if (var3 > 0) { par1Entity.addVelocity(-MathHelper.sin(this.rotationYaw * (float)Math.PI / 180.0F) * var3 * 0.5F, 0.4D, MathHelper.cos(this.rotationYaw * (float)Math.PI / 180.0F) * var3 * 0.5F); this.motionX *= 0.6D; this.motionZ *= 0.6D; } int var5 = EnchantmentHelper.getFireAspectModifier(this); if (var5 > 0) { par1Entity.setFire(var5 * 4); } } return var4; } @Override public boolean isEntityInvulnerable() { return this.getInvincible(); } @Override protected void dropFewItems(boolean par1, int par2) { this.dropItem(VetheaItems.polishedPearls, 1); } @Override public String mobName() { return "Galroid"; } }
[ "mshayanshafi@gmail.com" ]
mshayanshafi@gmail.com
abe19ba21788f400c10e7e090617c46cdb35343d
d528fe4f3aa3a7eca7c5ba4e0aee43421e60857f
/main/com/zfsoft/xgxt/xpjpy/zjdxjbsz/dmwh/xmxz/XmxzService.java
7fb6104a222521ae632ba29adc020c2c54766fdb
[]
no_license
gxlioper/xajd
81bd19a7c4b9f2d1a41a23295497b6de0dae4169
b7d4237acf7d6ffeca1c4a5a6717594ca55f1673
refs/heads/master
2022-03-06T15:49:34.004924
2019-11-19T07:43:25
2019-11-19T07:43:25
null
0
0
null
null
null
null
GB18030
Java
false
false
2,404
java
/** * @部门:学工产品事业部 * @日期:2017-3-9 上午09:43:12 */ package com.zfsoft.xgxt.xpjpy.zjdxjbsz.dmwh.xmxz; import com.zfsoft.xgxt.base.service.impl.SuperServiceImpl; /** * @系统名称: 学生工作管理系统 * @模块名称: 评奖评优管理模块 * @类功能描述: 代码维护_项目性质 * @作者:Meng.Wei[工号:1186] * @时间: 2017-3-9 上午09:43:12 * @版本: V5.18.26 * @修改记录: 类修改者-修改日期-修改说明 */ public class XmxzService extends SuperServiceImpl<XmxzForm, XmxzDao>{ private XmxzDao dao = new XmxzDao(); public XmxzService() { super.setDao(dao); } /** * @描述: 增加判断是否有项目名称存在 * @作者: Meng.Wei[工号:1186] * @日期:2017-3-10 上午11:42:33 * @修改记录: 修改者名字-修改日期-修改内容 * @param model * @return * boolean 返回类型 * @throws */ public boolean isExistXzmc(XmxzForm model) { boolean flag = false; String num = dao.isExistXzmc(model); if(!"0".equalsIgnoreCase(num)){ flag = true; } return flag; } /** * @描述: 判断评奖性质在评奖结果当中是否存在 * @作者: Meng.Wei[工号:1186] * @日期:2017-3-9 下午08:14:32 * @修改记录: 修改者名字-修改日期-修改内容 * @param value * @return * @throws Exception * String 返回类型 * @throws */ public String checkXzForPjjg(String value)throws Exception{ String resultXzmc = ""; String[] xzmc = dao.xzCheckExistForPjjg(value); for(int i=0;i<xzmc.length;i++){ if(i==xzmc.length-1){ resultXzmc+=xzmc[i]; }else{ resultXzmc+=xzmc[i]+","; } } return resultXzmc; } /** * @描述: 判断评奖性质在评奖项目当中是否存在 * @作者: Meng.Wei[工号:1186] * @日期:2017-3-9 下午08:15:05 * @修改记录: 修改者名字-修改日期-修改内容 * @param value * @return * @throws Exception * String 返回类型 * @throws */ public String checkXzForPjxm(String value)throws Exception{ String resultXzmc = ""; String[] xzmc = dao.xzCheckExistForPjxm(value); for(int i=0;i<xzmc.length;i++){ if(i==xzmc.length-1){ resultXzmc+=xzmc[i]; }else{ resultXzmc+=xzmc[i]+","; } } return resultXzmc; } }
[ "1398796456@qq.com" ]
1398796456@qq.com
f842d6340224e77809e85903089486b911a7177b
eb5f5353f49ee558e497e5caded1f60f32f536b5
/com/sun/media/sound/SoftSincResampler.java
1ddcb3e3a6cac1f35789fd4a0932ad6385562878
[]
no_license
mohitrajvardhan17/java1.8.0_151
6fc53e15354d88b53bd248c260c954807d612118
6eeab0c0fd20be34db653f4778f8828068c50c92
refs/heads/master
2020-03-18T09:44:14.769133
2018-05-23T14:28:24
2018-05-23T14:28:24
134,578,186
0
2
null
null
null
null
UTF-8
Java
false
false
3,695
java
package com.sun.media.sound; public final class SoftSincResampler extends SoftAbstractResampler { float[][][] sinc_table = new float[sinc_scale_size][sinc_table_fsize][]; int sinc_scale_size = 100; int sinc_table_fsize = 800; int sinc_table_size = 30; int sinc_table_center = sinc_table_size / 2; public SoftSincResampler() { for (int i = 0; i < sinc_scale_size; i++) { float f = (float)(1.0D / (1.0D + Math.pow(i, 1.1D) / 10.0D)); for (int j = 0; j < sinc_table_fsize; j++) { sinc_table[i][j] = sincTable(sinc_table_size, -j / sinc_table_fsize, f); } } } public static double sinc(double paramDouble) { return paramDouble == 0.0D ? 1.0D : Math.sin(3.141592653589793D * paramDouble) / (3.141592653589793D * paramDouble); } public static float[] wHanning(int paramInt, float paramFloat) { float[] arrayOfFloat = new float[paramInt]; for (int i = 0; i < paramInt; i++) { arrayOfFloat[i] = ((float)(-0.5D * Math.cos(6.283185307179586D * (i + paramFloat) / paramInt) + 0.5D)); } return arrayOfFloat; } public static float[] sincTable(int paramInt, float paramFloat1, float paramFloat2) { int i = paramInt / 2; float[] arrayOfFloat = wHanning(paramInt, paramFloat1); for (int j = 0; j < paramInt; j++) { int tmp24_22 = j; float[] tmp24_20 = arrayOfFloat; tmp24_20[tmp24_22] = ((float)(tmp24_20[tmp24_22] * (sinc((-i + j + paramFloat1) * paramFloat2) * paramFloat2))); } return arrayOfFloat; } public int getPadding() { return sinc_table_size / 2 + 2; } public void interpolate(float[] paramArrayOfFloat1, float[] paramArrayOfFloat2, float paramFloat1, float[] paramArrayOfFloat3, float paramFloat2, float[] paramArrayOfFloat4, int[] paramArrayOfInt, int paramInt) { float f1 = paramArrayOfFloat3[0]; float f2 = paramArrayOfFloat2[0]; int i = paramArrayOfInt[0]; float f3 = paramFloat1; int j = paramInt; int k = sinc_scale_size - 1; int m; float[] arrayOfFloat; int i2; float f4; int i3; if (paramFloat2 == 0.0F) { m = (int)((f1 - 1.0F) * 10.0F); if (m < 0) { m = 0; } else if (m > k) { m = k; } float[][] arrayOfFloat1 = sinc_table[m]; while ((f2 < f3) && (i < j)) { int i1 = (int)f2; arrayOfFloat = arrayOfFloat1[((int)((f2 - i1) * sinc_table_fsize))]; i2 = i1 - sinc_table_center; f4 = 0.0F; i3 = 0; while (i3 < sinc_table_size) { f4 += paramArrayOfFloat1[i2] * arrayOfFloat[i3]; i3++; i2++; } paramArrayOfFloat4[(i++)] = f4; f2 += f1; } } else { while ((f2 < f3) && (i < j)) { m = (int)f2; int n = (int)((f1 - 1.0F) * 10.0F); if (n < 0) { n = 0; } else if (n > k) { n = k; } float[][] arrayOfFloat2 = sinc_table[n]; arrayOfFloat = arrayOfFloat2[((int)((f2 - m) * sinc_table_fsize))]; i2 = m - sinc_table_center; f4 = 0.0F; i3 = 0; while (i3 < sinc_table_size) { f4 += paramArrayOfFloat1[i2] * arrayOfFloat[i3]; i3++; i2++; } paramArrayOfFloat4[(i++)] = f4; f2 += f1; f1 += paramFloat2; } } paramArrayOfFloat2[0] = f2; paramArrayOfInt[0] = i; paramArrayOfFloat3[0] = f1; } } /* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\com\sun\media\sound\SoftSincResampler.class * Java compiler version: 8 (52.0) * JD-Core Version: 0.7.1 */
[ "mohit.rajvardhan@ericsson.com" ]
mohit.rajvardhan@ericsson.com
572fe0e11585ed45b9c7191b1ecfe5bd586918f0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_f3788e48c22f1b6ab7b42fc439123e4e1ec30ad4/TopicController/2_f3788e48c22f1b6ab7b42fc439123e4e1ec30ad4_TopicController_t.java
9bf1f1c9a21f72e2729f58cd2527eb5731ff78a6
[]
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,348
java
package cn.iver.controller; import cn.iver.interceptor.AdminInterceptor; import cn.iver.interceptor.LoginInterceptor; import cn.iver.validator.PostValidator; import cn.iver.validator.TopicValidator; import cn.iver.model.Post; import cn.iver.model.Topic; import com.jfinal.aop.Before; import cn.iver.ext.jfinal.Controller; /** * Created with IntelliJ IDEA. * Author: iver * Date: 13-3-28 */ public class TopicController extends Controller { public void index(){ forwardAction("/post/" + getParaToInt(0)); } public void module(){ setAttr("topicPage", Topic.dao.getPageForModule(getParaToInt(0), getParaToInt(1, 1))); setAttr("actionUrl", "/topic/module/" + getParaToInt(0) + "-"); render("/common/index.html"); } public void hot(){ setAttr("topicPage", Topic.dao.getHotPage(getParaToInt(0, 1))); setAttr("actionUrl", "/topic/hot/"); render("/common/index.html"); } public void nice(){ setAttr("topicPage", Topic.dao.getNicePage(getParaToInt(0, 1))); setAttr("actionUrl", "/topic/nice/"); render("/common/index.html"); } @Before(LoginInterceptor.class) public void add(){ render("/topic/add.html"); } @Before({LoginInterceptor.class, TopicValidator.class, PostValidator.class}) public void save(){ Topic topic = getModel(Topic.class); topic.set("userID", getSessionAttr("userID")); Post post = getModel(Post.class); post.set("userID", getSessionAttr("userID")); topic.save(post); redirect("/post/" + topic.getInt("id")); } @Before(AdminInterceptor.class) public void edit(){ Topic topic = Topic.dao.get(getParaToInt(0)); setAttr("topic", topic); render("/topic/edit.html"); } @Before({AdminInterceptor.class, TopicValidator.class}) public void update(){ getModel(Topic.class, "id", "content", "moduleID").myUpdate(); redirect("/post/" + getParaToInt("topic.id")); } @Before(AdminInterceptor.class) public void delete(){ Topic.dao.deleteByID(getParaToInt(0)); forwardAction("/admin/topicList/" + getParaToInt(1)); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
969a73539320b9219deb16800f0af04b6eed27d5
15f806745ef5cca72251254c24618a345fb3eb4c
/fintech-admin/src/main/java/com/qunar/fintech/plat/admin/system/controller/LoginController.java
b6585d34561fa1e5586badce856fdde2796f0d63
[]
no_license
GSIL-Monitor/QunarProjectsStave
005f863b178645d8e90a44bdd14c5c0593574734
c455cda3a3aa86c68203e5d9be2545b2e88b47b0
refs/heads/master
2020-04-23T20:52:59.058801
2019-02-19T09:55:38
2019-02-19T09:55:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,941
java
package com.qunar.fintech.plat.admin.system.controller; import com.qunar.fintech.plat.admin.support.security.AccessLog; import com.qunar.fintech.plat.admin.support.security.ShiroUtils; import com.qunar.fintech.plat.admin.support.util.UserMd5Utils; import com.qunar.fintech.plat.admin.support.web.R; import com.qunar.fintech.plat.admin.system.dao.entity.MenuDO; import com.qunar.fintech.plat.admin.system.dao.entity.Tree; import com.qunar.fintech.plat.admin.system.dao.entity.UserDO; import com.qunar.fintech.plat.admin.system.dao.mapper.UserDao; import com.qunar.fintech.plat.admin.system.service.MenuService; import com.qunar.fintech.util.security.EncodeUtils; import com.qunar.security.QSSO; import com.qunar.security.qsso.model.QUser; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.subject.Subject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import java.util.HashMap; import java.util.List; import java.util.Map; @Controller public class LoginController extends BaseController { @GetMapping({"/", ""}) String welcome(Model model) { return "redirect:/index"; } @AccessLog("请求访问主页") @RequestMapping({"/index"}) String index(Model model, HttpServletRequest request,HttpSession httpSession) { String redirect = processQssoLogin(request,httpSession); if (StringUtils.isNotBlank(redirect)) { return redirect; } if (getUser() == null) { return "redirect:/login"; } List<Tree<MenuDO>> menus = menuService.listMenuTree(getUserId()); logger.info("" + menus.size()); logger.info("" + menus); model.addAttribute("menus", menus); model.addAttribute("name", getUser().getName()); logger.info(getUser().getName()); return "index_v1"; } @GetMapping("/login") String login() { if (getUser() != null) { return "redirect:/index"; } else { return "login"; } } @AccessLog("登录") @PostMapping("/login") @ResponseBody R ajaxLogin(String username, String password) { password = UserMd5Utils.encrypt(username, password); UsernamePasswordToken token = new UsernamePasswordToken(username, password); logger.error("Token = ", token); Subject subject = SecurityUtils.getSubject(); try { subject.login(token); return R.ok(); } catch (AuthenticationException e) { return R.error("用户或密码错误"); } } @GetMapping("/logout") String logout() { ShiroUtils.logout(); return "redirect:/login"; } @GetMapping("/main") String main() { return "main"; } @GetMapping("/403") String error403() { return "403"; } private String processQssoLogin(HttpServletRequest request, HttpSession httpSession) { String token = request.getParameter("token"); if (StringUtils.isBlank(token)) { return null; } QUser qUser = QSSO.getQUser(token); if (qUser == null || StringUtils.isBlank(qUser.getUserId())) { return null; } Map<String, Object> map = new HashMap<>(); map.put("username", qUser.getUserId()); List<UserDO> users = userMapper.list(map); if (CollectionUtils.isEmpty(users) || users.size() != 1) { logger.info("cannot find user or user with size is not 1"); return "redirect:/login?msg=" + EncodeUtils.urlDecode(qUser.getUserId() + "用户不存在"); } try { // 将用户id保存到session中 httpSession.setAttribute("userId", qUser.getUserId()); SecurityUtils.getSubject().login(new UsernamePasswordToken(qUser.getUserId(), users.get(0).getPassword())); } catch (AuthenticationException e) { logger.error(e.getMessage(), e); return "redirect:/login?msg=" + EncodeUtils.urlDecode(qUser.getUserId() + "登录错误"); } return null; } @Autowired MenuService menuService; @Autowired UserDao userMapper; private final Logger logger = LoggerFactory.getLogger(this.getClass()); }
[ "guijun.qu@quanr.com" ]
guijun.qu@quanr.com
d392858793579ef45e9df312658d4e946f66f434
8edee90cb9610c51539e0e6b126de7c9145c57bc
/datastructures-json-micro/src/main/java/org/xbib/datastructures/json/micro/ArrayJson.java
6559aa7c01ec8f93d1b4125220667d08b206bc40
[ "Apache-2.0" ]
permissive
jprante/datastructures
05f3907c2acba8f743639bd8b64bde1e771bb074
efbce5bd1c67a09b9e07d2f0d4e795531cdc583b
refs/heads/main
2023-08-14T18:44:35.734136
2023-04-25T15:47:23
2023-04-25T15:47:23
295,021,623
2
0
null
null
null
null
UTF-8
Java
false
false
7,744
java
package org.xbib.datastructures.json.micro; import java.util.ArrayList; import java.util.IdentityHashMap; import java.util.Iterator; import java.util.List; import java.util.Map; public class ArrayJson extends Json { List<Json> L = new ArrayList<>(); ArrayJson() { } ArrayJson(Json e) { super(e); } public Json dup() { org.xbib.datastructures.json.micro.ArrayJson j = new org.xbib.datastructures.json.micro.ArrayJson(); for (Json e : L) { Json v = e.dup(); v.enclosing = j; j.L.add(v); } return j; } public Json set(int index, Object value) { Json jvalue = make(value); L.set(index, jvalue); setParent(jvalue, this); return this; } public List<Json> asJsonList() { return L; } public List<Object> asList() { ArrayList<Object> A = new ArrayList<Object>(); for (Json x : L) { A.add(x.getValue()); } return A; } public boolean is(int index, Object value) { if (index < 0 || index >= L.size()) { return false; } else { return L.get(index).equals(make(value)); } } public Object getValue() { return asList(); } public boolean isArray() { return true; } public Json at(int index) { return L.get(index); } public Json add(Json el) { L.add(el); setParent(el, this); return this; } public Json remove(Json el) { L.remove(el); el.enclosing = null; return this; } boolean isEqualJson(Json left, Json right) { if (left == null) { return right == null; } else { return left.equals(right); } } boolean isEqualJson(Json left, Json right, Json fields) { if (fields.isNull()) { return left.equals(right); } else if (fields.isString()) { return isEqualJson(resolvePointer(fields.asString(), left), resolvePointer(fields.asString(), right)); } else if (fields.isArray()) { for (Json field : fields.asJsonList()) { if (!isEqualJson(resolvePointer(field.asString(), left), resolvePointer(field.asString(), right))) { return false; } } return true; } else { throw new IllegalArgumentException("Compare by options should be either a property name or an array of property names: " + fields); } } @SuppressWarnings({"unchecked", "rawtypes"}) int compareJson(Json left, Json right, Json fields) { if (fields.isNull()) { return ((Comparable) left.getValue()).compareTo(right.getValue()); } else if (fields.isString()) { Json leftProperty = resolvePointer(fields.asString(), left); Json rightProperty = resolvePointer(fields.asString(), right); return ((Comparable) leftProperty).compareTo(rightProperty); } else if (fields.isArray()) { for (Json field : fields.asJsonList()) { Json leftProperty = resolvePointer(field.asString(), left); Json rightProperty = resolvePointer(field.asString(), right); int result = ((Comparable) leftProperty).compareTo(rightProperty); if (result != 0) { return result; } } return 0; } else { throw new IllegalArgumentException("Compare by options should be either a property name or an array of property names: " + fields); } } Json withOptions(Json array, Json allOptions, String path) { Json opts = allOptions.at(path, object()); boolean dup = opts.is("dup", true); Json compareBy = opts.at("compareBy", nil()); if (opts.is("sort", true)) { int thisIndex = 0, thatIndex = 0; while (thatIndex < array.asJsonList().size()) { Json thatElement = array.at(thatIndex); if (thisIndex == L.size()) { L.add(dup ? thatElement.dup() : thatElement); thisIndex++; thatIndex++; continue; } int compared = compareJson(at(thisIndex), thatElement, compareBy); if (compared < 0) // this < that { thisIndex++; } else if (compared > 0) // this > that { L.add(thisIndex, dup ? thatElement.dup() : thatElement); thatIndex++; } else { // equal, ignore thatIndex++; } } } else { for (Json thatElement : array.asJsonList()) { boolean present = false; for (Json thisElement : L) { if (isEqualJson(thisElement, thatElement, compareBy)) { present = true; break; } } if (!present) { L.add(dup ? thatElement.dup() : thatElement); } } } return this; } public Json with(Json object, Json... options) { if (object == null) { return this; } if (!object.isArray()) { add(object); } else if (options.length > 0) { Json O = collectWithOptions(options); return withOptions(object, O, ""); } else // what about "enclosing" here? we don't have a provision where a Json // element belongs to more than one enclosing elements... { L.addAll(((org.xbib.datastructures.json.micro.ArrayJson) object).L); } return this; } public Json atDel(int index) { Json el = L.remove(index); if (el != null) { el.enclosing = null; } return el; } public Json delAt(int index) { Json el = L.remove(index); if (el != null) { el.enclosing = null; } return this; } public String toString() { return toString(Integer.MAX_VALUE); } public String toString(int maxCharacters) { return toStringImpl(maxCharacters, new IdentityHashMap<Json, Json>()); } String toStringImpl(int maxCharacters, Map<Json, Json> done) { StringBuilder sb = new StringBuilder("["); for (Iterator<Json> i = L.iterator(); i.hasNext(); ) { Json value = i.next(); String s = value.isObject() ? ((ObjectJson) value).toStringImpl(maxCharacters, done) : value.isArray() ? ((org.xbib.datastructures.json.micro.ArrayJson) value).toStringImpl(maxCharacters, done) : value.toString(maxCharacters); if (sb.length() + s.length() > maxCharacters) { s = s.substring(0, Math.max(0, maxCharacters - sb.length())); } else { sb.append(s); } if (i.hasNext()) { sb.append(","); } if (sb.length() >= maxCharacters) { sb.append("..."); break; } } sb.append("]"); return sb.toString(); } public int hashCode() { return L.hashCode(); } public boolean equals(Object x) { return x instanceof org.xbib.datastructures.json.micro.ArrayJson && ((org.xbib.datastructures.json.micro.ArrayJson) x).L.equals(L); } }
[ "joergprante@gmail.com" ]
joergprante@gmail.com
1f605ce0c6779345769e4ab0498dea95872a971e
a33aac97878b2cb15677be26e308cbc46e2862d2
/data/libgdx/Vector2dTest_render.java
3c611dfefb7f7a47f8b37157f45dab4206654302
[]
no_license
GabeOchieng/ggnn.tensorflow
f5d7d0bca52258336fc12c9de6ae38223f28f786
7c62c0e8427bea6c8bec2cebf157b6f1ea70a213
refs/heads/master
2022-05-30T11:17:42.278048
2020-05-02T11:33:31
2020-05-02T11:33:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,953
java
@Override public void render() { Gdx.gl.glClearColor(0, 0, 0, 0); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); renderer.setProjectionMatrix(camera.combined); // Render the 'lerp' vector target as a circle renderer.begin(ShapeType.Filled); renderer.setColor(1.0f, 0, 0, 0.3f); renderer.circle(-2 + lerpTarget.x, 2 + lerpTarget.y, 0.08f, 16); renderer.circle(-4 + lerpTarget2.x, 0 + lerpTarget2.y, 0.08f, 16); renderer.end(); renderer.begin(ShapeType.Line); // Render the three fixed X, Y and sum vectors: renderer.setColor(Color.RED); renderVectorAt(0, 0, Vector2.X); renderer.setColor(Color.GREEN); renderVectorAt(0, 0, Vector2.Y); renderer.setColor(Color.YELLOW); renderVectorAt(0, 0, sum); final float changeRate = Gdx.graphics.getDeltaTime(); renderer.setColor(Color.WHITE); renderVectorAt(2, 2, rotating); rotating.rotate(93 * changeRate); renderVectorAt(2, -2, scalingX); scalingX.set(0, MathUtils.sin((System.currentTimeMillis() - start) / 520.0f)); renderVectorAt(2, -2, scalingY); scalingY.set(MathUtils.cos((System.currentTimeMillis() - start) / 260.0f), 0); renderVectorAt(-2, 2, lerping1); lerping1.lerp(lerpTarget, 0.025f); if (lerping1.epsilonEquals(lerpTarget, 0.05f)) { lerpTarget.set(-1.0f + MathUtils.random(2.0f), -1.0f + MathUtils.random(2.0f)).nor(); } timePassed += Gdx.graphics.getDeltaTime(); renderVectorAt(-4, 0, lerping2); lerping2.set(lerpStart2); lerping2.interpolate(lerpTarget2, MathUtils.clamp(timePassed / DURATION, 0, 1), interpolator); if (lerping2.epsilonEquals(lerpTarget2, 0.025f)) { lerpTarget2.set(-1.0f + MathUtils.random(2.0f), -1.0f + MathUtils.random(2.0f)).nor(); lerpStart2.set(lerping2); timePassed = 0; } renderVectorAt(-2, -2, mash); mash.set(0, 0).add(rotating).add(scalingX).add(scalingY).add(lerping1); renderer.end(); }
[ "bdqnghi@gmail.com" ]
bdqnghi@gmail.com
c836e89d12acab7c47c189e12765d83c5135dc3e
e124c06aa37b93502a84f8931e1e792539883b9d
/ihm-src-0.3/dev/src/org/icehockeymanager/ihm/game/player/goalie/GoalieStats.java
54f412a808731470d231bbc0a766c32c78b15424
[]
no_license
m-shayanshafi/FactRepositoryProjects
12d7b65505c1e0a8e0ec3577cf937a1e3d17c417
1d45d667b454064107d78213e8cd3ec795827b41
refs/heads/master
2020-06-13T12:04:53.891793
2016-12-02T11:30:49
2016-12-02T11:30:49
75,389,381
1
0
null
null
null
null
UTF-8
Java
false
false
1,018
java
/************************************************************* * * Ice Hockey Manager * ================== * * Copyright (C) by the IHM Team (see doc/credits.txt) * * This program is released under the GPL (see doc/gpl.txt) * * Further informations: http://www.icehockeymanager.org * *************************************************************/ package org.icehockeymanager.ihm.game.player.goalie; import org.icehockeymanager.ihm.game.player.*; /** * Goalie stats (analog to the team stats) * * @author Bernhard von Gunten * @created January, 2002 */ public class GoalieStats extends PlayerStats { /** * Comment for <code>serialVersionUID</code> */ private static final long serialVersionUID = 3978984388229085233L; /** * Constructs new GoalieStats for a owner * * @param player * Player of this stats * @param owner * Owner of this stats */ public GoalieStats(Player player, Object owner) { super(player, owner); } }
[ "mshayanshafi@gmail.com" ]
mshayanshafi@gmail.com
c8f9afce3717f032fb12ef6dd8212577d3347fc4
47cf11310fc98d2f67c5c3bb0a31c224fb16275a
/MyUtilModule/src/main/java/com/fc/myutilmodule/Easythread/DelayTaskDispatcher.java
148f30fdbdc1003e92fca348ccc8b3391c8f062e
[]
no_license
xihehe/NewMvpProject
bbce9cfd2bc55d13ab89895340aeb64552c920d9
51cad4eb9059dada35f172816b9670253faffa04
refs/heads/master
2020-04-12T09:12:50.058297
2019-05-15T03:38:08
2019-05-15T03:38:08
162,395,441
1
0
null
null
null
null
UTF-8
Java
false
false
1,393
java
package com.fc.myutilmodule.Easythread; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; /** * The class to launch the delay-task with a core Scheduled pool. * @author haoge on 2018/3/29. */ final class DelayTaskDispatcher { private ScheduledExecutorService dispatcher; private static DelayTaskDispatcher instance = new DelayTaskDispatcher(); private DelayTaskDispatcher() { dispatcher = Executors.newScheduledThreadPool(1, new ThreadFactory() { @Override public Thread newThread(Runnable runnable) { Thread thread = new Thread(runnable); thread.setName("Delay-Task-Dispatcher"); thread.setPriority(Thread.MAX_PRIORITY); return thread; } }); } static DelayTaskDispatcher get() { return instance; } void postDelay(long delay, final ExecutorService pool, final Runnable task) { if (delay == 0) { pool.execute(task); return; } dispatcher.schedule(new Runnable() { @Override public void run() { pool.execute(task); } }, delay, TimeUnit.MILLISECONDS); } }
[ "you@example.com" ]
you@example.com
91f8fe5a292ee36f048ef71e7ebc13cf6144d6a7
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/budejie/sources/com/alipay/sdk/app/statistic/a.java
50dbb07d6b75c044dc8ece5620397891de1456f0
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
2,904
java
package com.alipay.sdk.app.statistic; import android.content.Context; import android.text.TextUtils; import com.ali.auth.third.login.LoginConstants; public final class a { public static final String a = "alipay_cashier_statistic_record"; private static c b; public static void a(Context context) { if (b == null) { b = new c(context); } } private static void b(Context context, String str) { new Thread(new b(context, str)).start(); } public static synchronized void a(Context context, String str) { String str2 = null; synchronized (a.class) { if (b != null) { c cVar = b; if (TextUtils.isEmpty(cVar.P)) { str2 = ""; } else { String str3; String[] split = str.split("&"); if (split != null) { str3 = null; for (String split2 : split) { String[] split3 = split2.split(LoginConstants.EQUAL); if (split3 != null && split3.length == 2) { if (split3[0].equalsIgnoreCase(c.E)) { split3[1].replace("\"", ""); } else if (split3[0].equalsIgnoreCase(c.F)) { str3 = split3[1].replace("\"", ""); } else if (split3[0].equalsIgnoreCase(c.G)) { str2 = split3[1].replace("\"", ""); } } } } else { str3 = null; } str2 = c.a(str2); String a = c.a(c.a(str3)); cVar.I = String.format("%s,%s,-,%s,-,-,-", new Object[]{str2, str3, a}); str2 = String.format("[(%s),(%s),(%s),(%s),(%s),(%s),(%s),(%s),(%s),(%s)]", new Object[]{cVar.H, cVar.I, cVar.J, cVar.K, cVar.L, cVar.M, cVar.N, cVar.O, cVar.P, cVar.Q}); } new Thread(new b(context, str2)).start(); b = null; } } } public static void a(String str, Throwable th) { if (b != null && th.getClass() != null) { b.a(str, th.getClass().getSimpleName(), th); } } private static void a(String str, String str2, Throwable th, String str3) { if (b != null) { b.a(str, str2, c.a(th), str3); } } public static void a(String str, String str2, Throwable th) { if (b != null) { b.a(str, str2, th); } } public static void a(String str, String str2, String str3) { if (b != null) { b.a(str, str2, str3); } } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
014447c2a29e51152fa4b705deacb81b23eb0d41
eace11a5735cfec1f9560e41a9ee30a1a133c5a9
/CMT/cptiscas/程序变异体的backup/改名后/FineGrainedHeap/ROR_138/PQueue.java
cef91957a53c8523a3ae25bb50836b5af9280744
[]
no_license
phantomDai/mypapers
eb2fc0fac5945c5efd303e0206aa93d6ac0624d0
e1aa1236bbad5d6d3b634a846cb8076a1951485a
refs/heads/master
2021-07-06T18:27:48.620826
2020-08-19T12:17:03
2020-08-19T12:17:03
162,563,422
0
1
null
null
null
null
UTF-8
Java
false
false
460
java
/* * PQueue.java * * Created on March 8, 2007, 10:49 PM * * From "Multiprocessor Synchronization and Concurrent Data Structures", * by Maurice Herlihy and Nir Shavit. * Copyright 2007 Elsevier Inc. All rights reserved. */ package mutants.FineGrainedHeap.ROR_138; /** * Unbounded priority queue interface * @param T item type * @author Maurice Herlihy */ public interface PQueue<T> { void add(T item, int priority); T removeMin(); }
[ "daihepeng@sina.cn" ]
daihepeng@sina.cn
71df208801f82e0e182eb4bb32f597ef31f07799
95f9192f471b099999754f5e783a57f2686f6735
/wikAPIdia-wikidata/src/main/java/org/wikapidia/wikidata/WikidataDumpParser.java
cda74a4115c0fb39cac74684d88f537020c8eb0b
[]
no_license
mjaminbook/wikAPIdia
3a8430b89d3f8d6be8596885f42da9ee8c2a2931
d8a0e15e68457ef4ce5c0faf527c43b441f88e1a
refs/heads/master
2020-12-07T00:43:15.041328
2014-04-09T20:57:57
2014-04-09T20:57:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,759
java
package org.wikapidia.wikidata; import org.wikapidia.core.lang.LanguageInfo; import org.wikapidia.core.model.RawPage; import org.wikapidia.parser.DumpSplitter; import org.wikapidia.parser.WpParseException; import org.wikapidia.parser.xml.PageXmlParser; import java.io.File; import java.util.Arrays; import java.util.Iterator; import java.util.logging.Level; import java.util.logging.Logger; /** * @author Shilad Sen */ public class WikidataDumpParser implements Iterable<WikidataEntity> { public static final Logger LOG = Logger.getLogger(DumpSplitter.class.getName()); private final WikidataParser wdParser; private final PageXmlParser xmlParser; DumpSplitter impl; LanguageInfo language; /** * @param file */ public WikidataDumpParser(File file) { this.language = LanguageInfo.getByLangCode("en"); this.impl = new DumpSplitter(file); this.xmlParser = new PageXmlParser(language); this.wdParser = new WikidataParser(); } @Override public Iterator<WikidataEntity> iterator() { return new IteratorImpl(); } public class IteratorImpl implements Iterator<WikidataEntity> { private final Iterator<String> iterImpl; private WikidataEntity buff; public IteratorImpl() { this.iterImpl = impl.iterator(); } @Override public boolean hasNext() { if (buff == null) { fillBuff(); } return (buff != null); } private void fillBuff() { if (buff != null) { return; } // try to queue up the next article while (buff == null && iterImpl.hasNext()) { try { RawPage rp = xmlParser.parse(iterImpl.next()); if (rp.getModel().equals("wikibase-item") || rp.getModel().equals("wikibase-property")) { buff = wdParser.parse(rp); } else if (Arrays.asList("wikitext", "css", "javascript").contains(rp.getModel())) { buff = null; } else { LOG.warning("unknown model: " + rp.getModel() + " in page " + rp.getTitle()); } } catch (Exception e) { LOG.log(Level.WARNING, "parsing of " + impl.getPath() + " failed:", e); } } } @Override public WikidataEntity next() { fillBuff(); WikidataEntity next = buff; buff = null; return next; } @Override public void remove() { throw new UnsupportedOperationException(); } } }
[ "shilad@gmail.com" ]
shilad@gmail.com
d6acd9347e24be231f57d145d94697fa9834815e
aff90cf49aefa5261a80df81e03a5f8a1147e9f1
/src/org/ie/client/Class68.java
da13024ee1ecde404d3e0e6723a2834cc20e242c
[]
no_license
Rune-Status/mig5-interface-editor
7ce4e45e55f7e911254c0b63096e61485190d0d2
0261577a84161857033ecfe5f19596f6dca66d98
refs/heads/master
2020-11-25T08:57:15.369183
2019-12-17T09:42:42
2019-12-17T09:42:42
228,582,704
0
0
null
2019-12-17T09:59:50
2019-12-17T09:38:22
null
UTF-8
Java
false
false
5,991
java
package org.ie.client; /* Class68 - Decompiled by JODE * Visit http://jode.sourceforge.net/ */ public abstract class Class68 { public static int anInt1321; public static Class20[] aClass20Array1322 = new Class20[4]; public static RSString aClass16_1323; public static int[] anIntArray1324 = new int[25]; public static int anInt1325; public static int anInt1326; public static RSString aClass16_1327 = Class37_Sub2.create_rsstring("Welcome to RuneScape"); public static int anInt1328; public static int[][] anIntArrayArray1329; public static void method1244(int i, int i_0_, int i_1_, Class37_Sub4_Sub15 class37_sub4_sub15, boolean bool) { anInt1326++; if (Class37_Sub9_Sub13.anInt3134 < 400) { if (class37_sub4_sub15.anIntArray2824 != null) class37_sub4_sub15 = class37_sub4_sub15.method719((byte) 89); if (class37_sub4_sub15 != null && bool == false && class37_sub4_sub15.aBoolean2811) { RSString rSString = class37_sub4_sub15.aClass16_2852; if ((class37_sub4_sub15.anInt2819 ^ 0xffffffff) != -1) rSString = (Class37_Sub9_Sub27.method881 ((new RSString[] { rSString, (Class52.method1126 (-3, class37_sub4_sub15.anInt2819, (Class37_Sub23 .aClass37_Sub4_Sub7_Sub1_Sub2_2234 .anInt3978))), Class37_Sub9_Sub24.aClass16_3370, Class79.aClass16_1482, Class37_Sub9_Sub24.method870((class37_sub4_sub15 .anInt2819), (byte) -114), Class25.aClass16_644 }))); if ((Class37_Sub14.anInt2122 ^ 0xffffffff) != -2) { if (Class37_Sub4_Sub5.aBoolean2595) { if ((Class37_Sub4_Sub12.anInt2759 & 0x2 ^ 0xffffffff) == -3) { Class37_Sub9_Sub3.method774 (6, i_1_, Class37_Sub9_Sub1.aClass16_2912, i_0_, true, (Class37_Sub9_Sub27.method881 (new RSString[] { Class60.aClass16_1142, Class79.aClass16_1478, rSString })), i); Node.anInt816++; } } else { RSString[] class16s = class37_sub4_sub15.aClass16Array2861; Class37_Sub4_Sub16.anInt2866++; if (Class32.aBoolean744) class16s = Class37_Sub18.method1017(class16s, 5); if (class16s != null) { for (int i_2_ = 4; (i_2_ ^ 0xffffffff) <= -1; i_2_--) { if (class16s[i_2_] != null && !(class16s[i_2_].method159 (RSInterface.aClass16_330, (byte) 89))) { Class86.anInt1582++; int i_3_ = 0; if (i_2_ == 0) i_3_ = 51; if (i_2_ == 1) i_3_ = 26; if ((i_2_ ^ 0xffffffff) == -3) i_3_ = 1; if (i_2_ == 3) i_3_ = 9; if (i_2_ == 4) i_3_ = 8; Class37_Sub9_Sub3.method774 (i_3_, i_1_, class16s[i_2_], i_0_, true, (Class37_Sub9_Sub27.method881 ((new RSString[] { Class37_Sub11_Sub1.aClass16_3627, rSString }))), i); } } } if (class16s != null) { for (int i_4_ = 4; i_4_ >= 0; i_4_--) { if (class16s[i_4_] != null && (class16s[i_4_].method159 (RSInterface.aClass16_330, (byte) 53))) { int i_5_ = 0; if ((class37_sub4_sub15.anInt2819 ^ 0xffffffff) < ((Class37_Sub23 .aClass37_Sub4_Sub7_Sub1_Sub2_2234 .anInt3978) ^ 0xffffffff)) i_5_ = 2000; Class37_Sub9_Sub2.anInt2937++; int i_6_ = 0; if ((i_4_ ^ 0xffffffff) == -1) i_6_ = 51 + i_5_; if (i_4_ == 1) i_6_ = i_5_ + 26; if ((i_4_ ^ 0xffffffff) == -3) i_6_ = i_5_ + 1; if ((i_4_ ^ 0xffffffff) == -4) i_6_ = i_5_ + 9; if ((i_4_ ^ 0xffffffff) == -5) i_6_ = i_5_ + 8; Class37_Sub9_Sub3.method774 (i_6_, i_1_, class16s[i_4_], i_0_, !bool, (Class37_Sub9_Sub27.method881 ((new RSString[] { Class37_Sub11_Sub1.aClass16_3627, rSString }))), i); } } } Class37_Sub9_Sub3.method774 (1007, i_1_, Class37_Sub4_Sub7_Sub7.aClass16_3844, i_0_, true, (Class37_Sub9_Sub27.method881 ((new RSString[] { Class37_Sub11_Sub1.aClass16_3627, rSString }))), i); } } else { Class37_Sub9_Sub3.method774 (33, i_1_, Class37_Sub9_Sub27.aClass16_3404, i_0_, true, Class37_Sub9_Sub27.method881((new RSString[] { Class64.aClass16_1218, Class79.aClass16_1478, rSString })), i); Class37_Sub9_Sub17.anInt3214++; } } } } public static int method1245(byte i, int i_7_) { anInt1325++; int i_8_ = 0; if (i_7_ < 0 || (i_7_ ^ 0xffffffff) <= -65537) { i_8_ += 16; i_7_ >>>= 16; } if (i_7_ >= 256) { i_8_ += 8; i_7_ >>>= 8; } if ((i_7_ ^ 0xffffffff) <= -17) { i_7_ >>>= 4; i_8_ += 4; } if (i != 24) return 30; if (i_7_ >= 4) { i_7_ >>>= 2; i_8_ += 2; } if ((i_7_ ^ 0xffffffff) <= -2) { i_8_++; i_7_ >>>= 1; } return i_7_ + i_8_; } public static void method1246(byte i) { aClass20Array1322 = null; anIntArrayArray1329 = null; aClass16_1323 = null; if (i == 124) { aClass16_1327 = null; anIntArray1324 = null; } } public abstract byte[] method1247(int i); public static RSString method1248(ByteVector class37_sub11, boolean bool, int i) { anInt1328++; try { if (bool != false) anIntArray1324 = null; RSString rSString = new RSString(); rSString.anInt1650 = class37_sub11.method961(255); if (i < rSString.anInt1650) rSString.anInt1650 = i; rSString.aByteArray1669 = new byte[rSString.anInt1650]; class37_sub11.pos += (Class15_Sub1.aClass14_1746.method103 (rSString.aByteArray1669, class37_sub11.pos, -128, class37_sub11.buf, rSString.anInt1650, 0)); return rSString; } catch (Exception exception) { return Class37_Sub4_Sub7_Sub5.aClass16_3806; } } public abstract void method1249(byte[] is, byte i); static { aClass16_1323 = aClass16_1327; } }
[ "iano2k4@hotmail.com" ]
iano2k4@hotmail.com
41f10bcb6a6889d95dcdb1259b537a2361bdb2a0
bae346d33ea053274431034e9cddf608ae5cfc55
/src/main/java/cn/maxcj/common/common/Utils/Security/ShiroUtils.java
6d88bc950f1ea180752386eedc5ea4565e2ebe4f
[]
no_license
maojinkang/Common
22ba6c504986ae65911fcc99a16ed12ff17c34cc
9a41ac1a491a42aa469b130a054339e6f19c4327
refs/heads/master
2020-03-30T05:49:41.171362
2018-09-28T04:36:11
2018-09-28T04:36:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,244
java
package cn.maxcj.common.common.Utils.Security; import cn.maxcj.common.common.Utils.Bean.BeanUtils; import cn.maxcj.common.common.Utils.StringUtils; import cn.maxcj.common.project.system.user.Bean.User; import org.apache.shiro.SecurityUtils; import org.apache.shiro.mgt.RealmSecurityManager; import org.apache.shiro.session.Session; import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.subject.SimplePrincipalCollection; import org.apache.shiro.subject.Subject; /** * @author: Maxcj * @email: 903283542@qq.com */ public class ShiroUtils { public static Subject getSubjct() { return SecurityUtils.getSubject(); } public static Session getSession() { return SecurityUtils.getSubject().getSession(); } public static void logout() { getSubjct().logout(); } public static User getUser() { User user = null; Object obj = getSubjct().getPrincipal(); if (StringUtils.isNotNull(obj)) { user = new User(); BeanUtils.copyBeanProp(user, obj); } return user; } public static void setUser(User user) { Subject subject = getSubjct(); PrincipalCollection principalCollection = subject.getPrincipals(); String realmName = principalCollection.getRealmNames().iterator().next(); PrincipalCollection newPrincipalCollection = new SimplePrincipalCollection(user, realmName); // 重新加载Principal subject.runAs(newPrincipalCollection); } public static void clearCachedAuthorizationInfo() { RealmSecurityManager rsm = (RealmSecurityManager) SecurityUtils.getSecurityManager(); UserRealm realm = (UserRealm) rsm.getRealms().iterator().next(); realm.clearCachedAuthorizationInfo(); } public static Long getUserId() { return getUser().getUserId().longValue(); } public static String getLoginName() { return getUser().getLoginName(); } public static String getIp() { return getSubjct().getSession().getHost(); } public static String getSessionId() { return String.valueOf(getSubjct().getSession().getId()); } }
[ "903283542@qq.com" ]
903283542@qq.com
519a4550169bb62dbe85cf57ea6e89814d4a329b
04cc943e28bc89ae8e0e21654e1f30f9716f98ac
/lab-1/start/boot-start/src/main/java/pe/aysconsultores/bootstart/BootStartApplication.java
ce40cd1b02202e483ba5d0770163dcf0c705b0e4
[]
no_license
hhbravo/Microservices-With-Spring-Student-Files
fee34b5c9b8d2c3b4a49a10716e192dba855e897
c1b600afddeaac5d4aae165fcba7e831992b5469
refs/heads/master
2021-01-08T23:27:51.621828
2020-02-11T00:11:17
2020-02-11T00:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
package pe.aysconsultores.bootstart; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class BootStartApplication { public static void main(String[] args) { SpringApplication.run(BootStartApplication.class, args); } }
[ "jadiaz@farmaciasperuanas.pe" ]
jadiaz@farmaciasperuanas.pe
f64b01d9ff8ab3b887894e58d7280457a6da857c
0f35bcebe934dc48b5cb2079f9f743f501b6d2dc
/src/main/java/frc/robot/RobotMap.java
0af64a3ce9cbfc9cc3fbe18453d8f5ea1e5cb1d1
[]
no_license
madelinebelew/FRC-2019-7874
33385401e6ffcfc7842d8afa23d89c5f02aff67c
1ab80f7d03157e054598dfe7e2278d2d339319a6
refs/heads/master
2020-04-24T16:17:38.776290
2019-02-21T04:20:10
2019-02-21T04:20:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,909
java
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ package frc.robot; /** * The RobotMap is a mapping from the ports sensors and actuators are wired into * to a variable name. This provides flexibility changing wiring, makes checking * the wiring easier and significantly reduces the number of magic numbers * floating around. */ import com.ctre.phoenix.motorcontrol.can.VictorSPX; import com.ctre.phoenix.motorcontrol.can.DoubleSolenoid; public class RobotMap { public static VictorSPX LeftVictor1; public static VictorSPX LeftVictor2; public static VictorSPX RightVictor1; public static VictorSPX RightVictor2; public static DoubleSolenoid Piston1; public static DoubleSolenoid Piston2; public RobotMap() { LeftVictor1 = new VictorSPX(1); LeftVictor2 = new VictorSPX(2); RightVictor1 = new VictorSPX(3); RightVictor2 = new VictorSPX(4); Piston1 = new DoubleSolenoid(5, 0, 1); Piston2 = new DoubleSolenoid(5,2,3); LeftVictor2.follow(LeftVictor1); RightVictor2.follow(RightVictor1); } // For example to map the left and right motors, you could define the // following variables to use with your drivetrain subsystem. // public static int leftMotor = 1; // public static int rightMotor = 2; // If you are using multiple modules, make sure to define both the port // number and the module. For example you with a rangefinder: // public static int rangefinderPort = 1; // public static int rangefinderModule = 1; }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
e0efa2c9f68cff552eba8f19b21fa5deac8bffbf
00abc1aec703a1d48c393bf853be907fc44280f5
/yeb-generator/src/main/java/com/ming/mapper/AppraiseMapper.java
e7da47792e51f19ffbe9cc5f5c67987a98ab5375
[]
no_license
xiaoming-master/yeb
81c5f96e70881c5d9cff1b521f74a27c56115d24
843750239e67c1f92969a7990ac304c952e33593
refs/heads/master
2023-06-24T09:27:42.757753
2021-07-24T17:30:08
2021-07-24T17:30:08
387,009,042
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package com.ming.mapper; import com.ming.pojo.Appraise; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * <p> * Mapper 接口 * </p> * * @author zhanglishen * @since 2021-07-17 */ public interface AppraiseMapper extends BaseMapper<Appraise> { }
[ "1186927930@qq.com" ]
1186927930@qq.com
47931f4a4200814cb8f4c510c1a72c27be17bd80
3d7d658f0d95d19eae9ee94bf6f339a33e0b7679
/lucas-services/src/main/java/com/lucas/dao/user/WmsUserDAO.java
b282500bab630c2e3cb4f8f4630c5c62ced409cc
[]
no_license
goverdhan1/lucasware
a3a6c2e898c7f3d413628c1dc97bfb328a75ccc3
fc59d862afd62cab0098ebe99ed5f8b604a87c35
refs/heads/master
2021-01-10T10:52:14.222460
2015-11-29T17:28:43
2015-11-29T17:28:43
47,071,633
0
0
null
null
null
null
UTF-8
Java
false
false
239
java
/** * Copyright (c) Lucas Systems LLC */ package com.lucas.dao.user; import com.lucas.entity.user.WmsUser; import java.util.List; public interface WmsUserDAO { WmsUser findOneWmsUserById(Long id); List findAllWmsUsers(); }
[ "goverdhan.k@gmail.com" ]
goverdhan.k@gmail.com
93a1fb4444012c293de6f0c5b43c9baf75980944
3bcaebf7d69eaab5e4086568440b2ca56219b50d
/src/main/java/com/tinyolo/cxml/parsing/demo/jaxb/fulfill/ConditionTypes.java
6199985c1c25ac8a04e63d4b251d2068ace21126
[]
no_license
augustine-d-nguyen/cxml-parsing-demo
2a419263b091b32e70fa84312b55d8217e691ac6
3cc169ee0392d88bbf0e03f0791a15287a8eba97
refs/heads/master
2023-01-18T19:07:27.094598
2020-11-20T14:52:52
2020-11-20T14:52:52
314,490,660
0
0
null
null
null
null
UTF-8
Java
false
false
1,825
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2 // See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2020.11.20 at 08:08:13 PM ICT // package com.tinyolo.cxml.parsing.demo.jaxb.fulfill; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "conditionType" }) @XmlRootElement(name = "ConditionTypes") public class ConditionTypes { @XmlElement(name = "ConditionType", required = true) protected List<ConditionType> conditionType; /** * Gets the value of the conditionType property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the conditionType property. * * <p> * For example, to add a new item, do as follows: * <pre> * getConditionType().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ConditionType } * * */ public List<ConditionType> getConditionType() { if (conditionType == null) { conditionType = new ArrayList<ConditionType>(); } return this.conditionType; } }
[ "augustine.d.nguyen@outlook.com" ]
augustine.d.nguyen@outlook.com
dab421b472273a2d2f3a93811503155a856e8e58
16bfe4d91fa6d8c7cd1dce4db0d409e9c3ddc2af
/raj/dp/PartitionProblem.java
2ecffa2c4b6872b5613b6f21f7e757e461b77b00
[]
no_license
passionatecoderraj/dsa
84eb03b524efeb81012c91491fc3dce9aa65aa7a
b8a9654fed1183e464915fb4b8481ae10fe266d6
refs/heads/master
2020-05-21T12:24:38.812925
2020-01-21T04:29:58
2020-01-21T04:29:58
48,559,484
8
6
null
null
null
null
UTF-8
Java
false
false
585
java
/** * */ package com.raj.dp; /** * @author Raj * */ public class PartitionProblem { /** * @param args */ public static void main(String[] args) { int a[] = { 3, 1, 1, 2, 2, 1 }; boolean result = false; PartitionProblem obj = new PartitionProblem(); result = obj.is2PartitionsPossible(a); System.out.println(result); } private boolean is2PartitionsPossible(int[] a) { int l = a.length; int sum = 0; for (int i = 0; i < l; i++) { sum += a[i]; } if (sum % 2 != 0) return false; return new SubsetSum().isSubsetSum(a, a.length, sum / 2); } }
[ "passionatecoderraj@gmail.com" ]
passionatecoderraj@gmail.com
bc19855b8a01f8687f3ee21444f6a35144e6e23a
e46d8e8fd1848a93472d9b8a50335cfc422a87c6
/src/main/java/com/netsuite/webservices/lists/accounting_2018_1/types/ItemInvtClassification.java
1318c568cbe61b8e667cb3877e9cef061d89d065
[]
no_license
djXplosivo/suitetalk-webservices
6d0f1737c52c566fde07eb6e008603b3c271d8d1
bff927f0acb45e772a5944272d0f7d55b87caf2a
refs/heads/master
2020-03-28T02:56:52.772003
2018-09-06T02:52:57
2018-09-06T02:52:57
147,608,548
0
0
null
null
null
null
UTF-8
Java
false
false
1,361
java
package com.netsuite.webservices.lists.accounting_2018_1.types; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ItemInvtClassification. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="ItemInvtClassification"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="_a"/> * &lt;enumeration value="_b"/> * &lt;enumeration value="_c"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "ItemInvtClassification", namespace = "urn:types.accounting_2018_1.lists.webservices.netsuite.com") @XmlEnum public enum ItemInvtClassification { @XmlEnumValue("_a") A("_a"), @XmlEnumValue("_b") B("_b"), @XmlEnumValue("_c") C("_c"); private final String value; ItemInvtClassification(String v) { value = v; } public String value() { return value; } public static ItemInvtClassification fromValue(String v) { for (ItemInvtClassification c: ItemInvtClassification.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "ccolon@git.eandjmedia.com" ]
ccolon@git.eandjmedia.com
66ad95586e03cbcd9bebeff2938d57c7eccbc214
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/glassfish/jersey/server/SecurityManagerConfiguredTest.java
f66c97a98cf7179128b88493192293a706ea5cff
[]
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,524
java
/** * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2014-2017 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can * obtain a copy of the License at * https://oss.oracle.com/licenses/CDDL+GPL-1.1 * or LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at LICENSE.txt. * * GPL Classpath Exception: * Oracle designates this particular file as subject to the "Classpath" * exception as provided by Oracle in the GPL Version 2 section of the License * file that accompanied this code. * * Modifications: * If applicable, add the following below the License Header, with the fields * enclosed by brackets [] replaced by your own identifying information: * "Portions Copyright [year] [name of copyright owner]" * * Contributor(s): * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package org.glassfish.jersey.server; import org.junit.Assert; import org.junit.Test; /** * Test that verifies that security manager is setup to run the Jersey core server unit tests. * * @author Marek Potociar (marek.potociar at oracle.com) */ public class SecurityManagerConfiguredTest { /** * Check that system security manager has been configured. */ @Test public void testSecurityManagerIsConfigured() { Assert.assertNotNull("Jersey core server unit tests should run with active security manager", System.getSecurityManager()); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
f1056165677e80c012a8a2f004268ad9554058ad
2b6de4ef64f921f212cb2e167f01bf32cf621ef1
/service/service-edu/src/main/java/com/atguigu/guli/service/edu/entity/Subject.java
9e021008520fd0c053be65e77896c6467a168ac0
[]
no_license
TL-SH/guli
7c1e69add236c6b5fd5e55a3531462fc1eebe94d
daa83e82db18172ff55874e7f438a8ade0e7465e
refs/heads/master
2022-07-10T19:18:04.274584
2019-12-23T14:39:34
2019-12-23T14:39:34
223,131,061
0
0
null
2022-06-21T02:17:17
2019-11-21T08:58:26
Java
UTF-8
Java
false
false
991
java
package com.atguigu.guli.service.edu.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.atguigu.guli.service.base.model.BaseEntity; import com.baomidou.mybatisplus.annotation.TableId; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** * <p> * 课程科目 * </p> * * @author leishuai * @since 2019-11-20 */ @Data @EqualsAndHashCode(callSuper = true) @Accessors(chain = true) @TableName("edu_subject") @ApiModel(value="Subject对象", description="课程科目") public class Subject extends BaseEntity { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "类别名称") private String title; @ApiModelProperty(value = "父ID") private String parentId; @ApiModelProperty(value = "排序字段") private Integer sort; }
[ "2258010965@qq.com" ]
2258010965@qq.com
73d3491b9c20d295061fef2716c0c5f04aa1b834
a5ca6cc475c6ba01b6ed5e65f8c742fbfd061e96
/dealer-api/src/main/java/com/utonw/dealer/api/dto/BankCardAndMerchantDTO.java
f979f0f0abfba8c3e6fe5bf7072838cbf22e000f
[]
no_license
xiaolizigogogo/dealer
72a127927e6602df90542baca013210fd4155db9
938099c25e0fff2e40046cd55160c9120c4b05a2
refs/heads/master
2021-08-22T03:55:10.371671
2017-11-29T06:32:29
2017-11-29T06:32:29
112,417,891
0
2
null
null
null
null
UTF-8
Java
false
false
2,886
java
package com.utonw.dealer.api.dto; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** * Created by SEELE on 2017/4/29. */ public class BankCardAndMerchantDTO implements Serializable { private static final long serialVersionUID = 1L; private String id; /** * 经销商 ID */ private Long acountId; /** * */ private String cardholder; /** * 银行名 */ private String bankname; /** * 银行卡类型 */ private String cardtype; /** * 银行卡号 */ private String banknumber; /** * 添加时间 */ private Date createddata; /** * 更新时间 */ private Date updatetime; /** * 1:绑定放款银行卡,2:绑定还款银行卡 */ private Integer cardstate; /** * 更新人 */ private Long updateby; private Long meracountid; private String merchantName; public String getId() { return id; } public void setId(String id) { this.id = id; } public Long getAcountId() { return acountId; } public void setAcountId(Long acountId) { this.acountId = acountId; } public String getCardholder() { return cardholder; } public void setCardholder(String cardholder) { this.cardholder = cardholder; } public String getBankname() { return bankname; } public void setBankname(String bankname) { this.bankname = bankname; } public String getCardtype() { return cardtype; } public void setCardtype(String cardtype) { this.cardtype = cardtype; } public String getBanknumber() { return banknumber; } public void setBanknumber(String banknumber) { this.banknumber = banknumber; } public Date getCreateddata() { return createddata; } public void setCreateddata(Date createddata) { this.createddata = createddata; } public Date getUpdatetime() { return updatetime; } public void setUpdatetime(Date updatetime) { this.updatetime = updatetime; } public Integer getCardstate() { return cardstate; } public void setCardstate(Integer cardstate) { this.cardstate = cardstate; } public Long getUpdateby() { return updateby; } public void setUpdateby(Long updateby) { this.updateby = updateby; } public Long getMeracountid() { return meracountid; } public void setMeracountid(Long meracountid) { this.meracountid = meracountid; } public String getMerchantName() { return merchantName; } public void setMerchantName(String merchantName) { this.merchantName = merchantName; } }
[ "user.email" ]
user.email
b00a962ef51334ec5bebcbc5670057faff931bcf
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/eclipse--che/1bbb902e199b2000f269c16471df64239a5daf9e/before/CloneTest.java
1b7fc6dc668f85ea02f5ec91625bfec187ed74f3
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,893
java
/******************************************************************************* * Copyright (c) 2012-2016 Codenvy, S.A. * 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: * Codenvy, S.A. - initial API and implementation *******************************************************************************/ package org.eclipse.che.git.impl; import com.google.common.io.Files; import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.core.util.LineConsumer; import org.eclipse.che.api.core.util.LineConsumerFactory; import org.eclipse.che.api.git.GitConnection; import org.eclipse.che.api.git.GitConnectionFactory; import org.eclipse.che.api.git.shared.CloneRequest; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; import static org.eclipse.che.dto.server.DtoFactory.newDto; import static org.eclipse.che.git.impl.GitTestUtil.cleanupTestRepo; import static org.eclipse.che.git.impl.GitTestUtil.connectToGitRepositoryWithContent; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.testng.AssertJUnit.assertEquals; /** * @author Igor Vinokur */ public class CloneTest { private File localRepo; private File remoteRepo; @BeforeMethod public void setUp() { localRepo = Files.createTempDir(); remoteRepo = Files.createTempDir(); } @AfterMethod public void cleanUp() { cleanupTestRepo(localRepo); cleanupTestRepo(remoteRepo); } @Test(dataProvider = "GitConnectionFactory", dataProviderClass = GitConnectionFactoryProvider.class) public void testSimpleClone(GitConnectionFactory connectionFactory) throws ServerException, IOException, UnauthorizedException, URISyntaxException { //given GitConnection remoteConnection = connectToGitRepositoryWithContent(connectionFactory, remoteRepo); GitConnection localConnection = connectionFactory.getConnection(localRepo.getAbsolutePath()); int filesBefore = localRepo.listFiles().length; //when localConnection.clone(newDto(CloneRequest.class).withRemoteUri(remoteConnection.getWorkingDir().getAbsolutePath())); //then int filesAfter = localRepo.listFiles().length; assertEquals(filesAfter, filesBefore + 2); } @Test(dataProvider = "GitConnectionFactory", dataProviderClass = GitConnectionFactoryProvider.class) public void testLineConsumerOutputWhenCloning(GitConnectionFactory connectionFactory) throws ServerException, IOException, UnauthorizedException, URISyntaxException { //given GitConnection remoteConnection = connectToGitRepositoryWithContent(connectionFactory, remoteRepo); GitConnection localConnection = connectionFactory.getConnection(localRepo.getAbsolutePath()); LineConsumerFactory lineConsumerFactory = mock(LineConsumerFactory.class); LineConsumer lineConsumer = mock(LineConsumer.class); when(lineConsumerFactory.newLineConsumer()).thenReturn(lineConsumer); localConnection.setOutputLineConsumerFactory(lineConsumerFactory); //when localConnection.clone(newDto(CloneRequest.class).withRemoteUri(remoteConnection.getWorkingDir().getAbsolutePath())); //then verify(lineConsumer, atLeastOnce()).writeLine(anyString()); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
1970496a0fcd129c90b2a472fe376e731b793d14
b97bc0706448623a59a7f11d07e4a151173b7378
/src/main/java/radian/tcmis/server7/client/mitsubishi/helpers/MitsubishiServerResourceBundle.java
1d1ff20789521aaf34be3978271a4b5051c8ce16
[]
no_license
zafrul-ust/tcmISDev
576a93e2cbb35a8ffd275fdbdd73c1f9161040b5
71418732e5465bb52a0079c7e7e7cec423a1d3ed
refs/heads/master
2022-12-21T15:46:19.801950
2020-02-07T21:22:50
2020-02-07T21:22:50
241,601,201
0
0
null
2022-12-13T19:29:34
2020-02-19T11:08:43
Java
UTF-8
Java
false
false
1,953
java
package radian.tcmis.server7.client.mitsubishi.helpers; import radian.tcmis.server7.share.helpers.ServerResourceBundle; public class MitsubishiServerResourceBundle extends ServerResourceBundle { static final Object[][] cHash = { {"LOG_DIR","/home/servlet/radian/logs/mitsubishi"}, {"DEBUG","false"}, {"DB_CLIENT","MITSUBISHI"}, {"ORACLE_DRIVER","oracle.jdbc.driver.OracleDriver"}, {"COST_REPORT","/tcmIS/mitsubishi/betacostreport?"}, {"SCHEDULDE_DELIVERY","/tcmIS/mitsubishi/schdelivery?"}, {"CANCEL_MR","/tcmIS/mitsubishi/cancel?"}, {"WASTE_ORDER","/tcmIS/mitsubishi/wasteorder?"}, {"WASTE_ADHOC_REPORT","/tcmIS/mitsubishi/wastereport?"}, {"USAGE_ADHOC_REPORT","/tcmIS/mitsubishi/usagereport?"}, {"MATERIAL_MATRIX_REPORT","/tcmIS/mitsubishi/matrixreport?"}, {"VIEW_MSDS","/tcmIS/mitsubishi/ViewMsds?"}, {"BATCH_REPORT_SERVLET","/tcmIS/mitsubishi/batchreport?"}, {"REGISTER_SERVLET","/tcmIS/mitsubishi/Register"}, {"SALES_ORDER_LOCATION","www.tcmis.com"}, {"SALES_ORDER_PORT","443"}, {"SALES_ORDER_URI","/tcmIS/servlet/radian.tcmis.server7.client.mitsubishi.servlets.MitsubishiBuildSalesOrder"}, {"ERW_TEMPLATE_DIR","/webdata/html/template/"}, {"BASE_DIR_TCM_WWW","/webdata/html/"}, {"WEBS_HOME_WWW","https://www.tcmis.com/"}, {"WEBS_HOME_WWW_ERW_ACTIVE","https://www.tcmis.com/reports/temp/"}, {"WEBS_HOME_WWW_ERW_BATCH","https://www.tcmis.com/reports/"}, {"ERW_REPORT_DIR_ACTIVE","/webdata/html/reports/temp/"}, {"ERW_REPORT_DIR_BATCH","/webdata/html/reports/"}, }; public MitsubishiServerResourceBundle(){ super(); addHash(cHash); } //trong 5/15 public String getDbClient(){ return ("MITSUBISHI"); } }
[ "julio.rivero@wescoair.com" ]
julio.rivero@wescoair.com
5f53ffc49909a9cf74c596f26c2527102db7e1ed
5569e85b18cac6c27b6232920fd56018c5661007
/src/main/java/com/openkm/bean/ExecutionResult.java
6331400d40c123d61eeec7d98a6e3b015e44e930
[]
no_license
bennyjiao/iwisdom
bbe718e5e0c1d613ba06fe32545a6428ca1a582c
92f1fdf0ca05b4e6b51eee5c14de0a33cf65eb17
refs/heads/master
2020-05-30T20:17:19.070540
2013-08-10T05:08:26
2013-08-10T05:08:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,734
java
/** * OpenKM, Open Document Management System (http://www.openkm.com) * Copyright (c) 2006-2012 Paco Avila & Josep Llort * * No bytes were intentionally harmed during the development of this application. * * 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 2 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, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ package com.openkm.bean; public class ExecutionResult { private int exitValue = -1; private String stderr; private String stdout; public String getStdout() { return stdout; } public void setStdout(String stdout) { this.stdout = stdout; } public String getStderr() { return stderr; } public void setStderr(String stderr) { this.stderr = stderr; } public int getExitValue() { return exitValue; } public void setExitValue(int exitValue) { this.exitValue = exitValue; } public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{ "); sb.append("exitValue="); sb.append(exitValue); sb.append(", stderr="); sb.append(stderr); sb.append(", stdout="); sb.append(stdout); sb.append("}"); return sb.toString(); } }
[ "bennyjj@gmail.com" ]
bennyjj@gmail.com
f131631f043aae2097eee48963e949653355b40e
90d4870d9a2c132b7b10b4ff6f5bf78a18ac994b
/org/shaded/apache/http/conn/ManagedClientConnection.java
fba7f686b3842416dd49e8fd6f2a555e8134eb06
[ "Apache-2.0", "MIT" ]
permissive
junpengwang/fire2.5.2
399aa13b6c326d97aa2c9c8dd72bef03464ad6cc
f82ed93de0da5f8d454a9b20c08533a916fc0db4
refs/heads/master
2016-09-13T16:33:27.944146
2016-05-25T12:44:52
2016-05-25T12:44:52
59,662,156
0
0
null
null
null
null
UTF-8
Java
false
false
1,749
java
package org.shaded.apache.http.conn; import java.io.IOException; import java.util.concurrent.TimeUnit; import javax.net.ssl.SSLSession; import org.shaded.apache.http.HttpClientConnection; import org.shaded.apache.http.HttpHost; import org.shaded.apache.http.HttpInetConnection; import org.shaded.apache.http.conn.routing.HttpRoute; import org.shaded.apache.http.params.HttpParams; import org.shaded.apache.http.protocol.HttpContext; public abstract interface ManagedClientConnection extends HttpClientConnection, HttpInetConnection, ConnectionReleaseTrigger { public abstract boolean isSecure(); public abstract HttpRoute getRoute(); public abstract SSLSession getSSLSession(); public abstract void open(HttpRoute paramHttpRoute, HttpContext paramHttpContext, HttpParams paramHttpParams) throws IOException; public abstract void tunnelTarget(boolean paramBoolean, HttpParams paramHttpParams) throws IOException; public abstract void tunnelProxy(HttpHost paramHttpHost, boolean paramBoolean, HttpParams paramHttpParams) throws IOException; public abstract void layerProtocol(HttpContext paramHttpContext, HttpParams paramHttpParams) throws IOException; public abstract void markReusable(); public abstract void unmarkReusable(); public abstract boolean isMarkedReusable(); public abstract void setState(Object paramObject); public abstract Object getState(); public abstract void setIdleDuration(long paramLong, TimeUnit paramTimeUnit); } /* Location: /Users/junpengwang/Downloads/Download/firebase-client-android-2.5.2.jar!/org/shaded/apache/http/conn/ManagedClientConnection.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "wangjunpeng@wilddog.com" ]
wangjunpeng@wilddog.com
26cece082615798ae5f15239037fe46b52e0cf90
6a08f139bf1c988740dfa0e311d17711ba123d01
/org/apache/http/auth/NTUserPrincipal.java
2a24687acce14855bac56c091de4865991a36a62
[ "NAIST-2003", "LicenseRef-scancode-unicode", "ICU", "BSD-3-Clause", "LicenseRef-scancode-public-domain" ]
permissive
IceCruelStuff/badlion-src
61e5b927e75ed5b895cb2fff2c2b95668468c7f7
18e0579874b8b55fd765be9c60f2b17d4766d504
refs/heads/master
2022-12-31T00:30:26.246407
2020-06-30T16:50:49
2020-06-30T16:50:49
297,207,115
0
0
NOASSERTION
2020-10-15T06:27:58
2020-09-21T02:23:57
null
UTF-8
Java
false
false
1,948
java
package org.apache.http.auth; import java.io.Serializable; import java.security.Principal; import java.util.Locale; import org.apache.http.annotation.Immutable; import org.apache.http.util.Args; import org.apache.http.util.LangUtils; @Immutable public class NTUserPrincipal implements Principal, Serializable { private static final long serialVersionUID = -6870169797924406894L; private final String username; private final String domain; private final String ntname; public NTUserPrincipal(String domain, String username) { Args.notNull(username, "User name"); this.username = username; if(domain != null) { this.domain = domain.toUpperCase(Locale.ENGLISH); } else { this.domain = null; } if(this.domain != null && this.domain.length() > 0) { StringBuilder buffer = new StringBuilder(); buffer.append(this.domain); buffer.append('\\'); buffer.append(this.username); this.ntname = buffer.toString(); } else { this.ntname = this.username; } } public String getName() { return this.ntname; } public String getDomain() { return this.domain; } public String getUsername() { return this.username; } public int hashCode() { int hash = 17; hash = LangUtils.hashCode(hash, this.username); hash = LangUtils.hashCode(hash, this.domain); return hash; } public boolean equals(Object o) { if(this == o) { return true; } else { if(o instanceof NTUserPrincipal) { NTUserPrincipal that = (NTUserPrincipal)o; if(LangUtils.equals((Object)this.username, (Object)that.username) && LangUtils.equals((Object)this.domain, (Object)that.domain)) { return true; } } return false; } } public String toString() { return this.ntname; } }
[ "50463419+routerabfrage@users.noreply.github.com" ]
50463419+routerabfrage@users.noreply.github.com
5e1cc4b3eafbeea464b2520455972b94a8408a9c
2474744df850fd4d170a65ef78e1202aea89d8b8
/jehc-bmodules-dao/src/main/java/jehc/bmodules/bdao/impl/BOrderDetailDaoImpl.java
8cbcf7986021d3edbc8d442f86a2c8aa5e35f516
[]
no_license
cgb-extjs-gwt/jehc
073c98ba8d25c8cf0ffa769bf09788e01bae375b
69112cc9b79c96bb258fc472f22c946f8c5a2008
refs/heads/master
2023-04-27T08:04:06.440924
2018-08-24T08:53:24
2018-08-24T08:53:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,745
java
package jehc.bmodules.bdao.impl; import java.util.List; import java.util.Map; import org.springframework.stereotype.Repository; import jehc.bmodules.bdao.BOrderDetailDao; import jehc.bmodules.bmodel.BOrderDetail; import jehc.xtmodules.xtcore.base.impl.BaseDaoImpl; /** * 基础订单详细 * 2016-01-27 13:59:04 邓纯杰 */ @Repository("bOrderDetailDao") public class BOrderDetailDaoImpl extends BaseDaoImpl implements BOrderDetailDao{ /** * 分页 * @param condition * @return */ @SuppressWarnings("unchecked") public List<BOrderDetail> getBOrderDetailListByCondition(Map<String,Object> condition){ return (List<BOrderDetail>)this.getList("getBOrderDetailListByCondition",condition); } /** * 查询对象 * @param b_order_detail_id * @return */ public BOrderDetail getBOrderDetailById(String b_order_detail_id){ return (BOrderDetail)this.get("getBOrderDetailById", b_order_detail_id); } /** * 添加 * @param b_order_detail * @return */ public int addBOrderDetail(BOrderDetail b_Order_Detail){ return this.add("addBOrderDetail", b_Order_Detail); } /** * 修改 * @param b_order_detail * @return */ public int updateBOrderDetail(BOrderDetail b_Order_Detail){ return this.update("updateBOrderDetail", b_Order_Detail); } /** * 删除 * @param condition * @return */ public int delBOrderDetail(Map<String,Object> condition){ return this.del("delBOrderDetail", condition); } /** * 获取订单总金额 * @param condition * @return */ public double getBOrderDetailTotalPriceByCondition(Map<String,Object> condition){ return new Double(this.get("getBOrderDetailTotalPriceByCondition", condition).toString()); } }
[ "244831954@qq.com" ]
244831954@qq.com
2a3d785adb043152c1b27eef03695024f3317109
b327a374de29f80d9b2b3841db73f3a6a30e5f0d
/out/host/linux-x86/obj/EXECUTABLES/dx-tests_intermediates/mainfiles/dxc/junit/opcodes/l2i/Main_testVFE3.java
5076a68cbbdca23c3669e511838496aaeb260272
[]
no_license
nikoltu/aosp
6409c386ed6d94c15d985dd5be2c522fefea6267
f99d40c9d13bda30231fb1ac03258b6b6267c496
refs/heads/master
2021-01-22T09:26:24.152070
2011-09-27T15:10:30
2011-09-27T15:10:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
536
java
//autogenerated by util.CollectAllTests, do not change package dxc.junit.opcodes.l2i; import dxc.junit.opcodes.l2i.jm.*; import dxc.junit.*; public class Main_testVFE3 extends DxAbstractMain { public static void main(String[] args) throws Exception { new Main_testVFE3().testVFE3(); } public void testVFE3() { try { Class.forName("dxc.junit.opcodes.l2i.jm.T_l2i_4"); fail("expected a verification exception"); } catch (Throwable t) { DxUtil.checkVerifyException(t); } } }
[ "fred.faust@gmail.com" ]
fred.faust@gmail.com
10c88769a8acb3e510b114621dd9253a3585e47b
9f31538e7faf2530ab6779a1410f0ec1db5a37c3
/SwingHackDemos/src/jtunes/IITEQPresetCollection.java
536d58b672d99d443aebf0a332b0a0477e75e3a5
[]
no_license
Aishuky11123/NetBeansProjects
79d48e19e0f511262c359079e48803808a96065f
306681c8db5333574967f856d5579be1beb19791
refs/heads/master
2021-05-28T16:08:58.810329
2015-04-04T15:53:40
2015-04-04T15:53:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
802
java
package jtunes; // GENERATED. DO NOT MODIFY import com4j.*; /** * IITEQPresetCollection Interface */ @IID("{AEF4D111-3331-48DA-B0C2-B468D5D61D08}") public interface IITEQPresetCollection extends Com4jObject { /** * Returns the number of EQ presets in the collection. */ @VTID(7) int count(); /** * Returns an IITEQPreset object corresponding to the given index (1-based). */ @VTID(8) IITEQPreset item( int index); /** * Returns an IITEQPreset object with the specified name. */ @VTID(9) IITEQPreset itemByName( java.lang.String name); /** * Returns an IEnumVARIANT object which can enumerate the collection. */ @VTID(10) com4j.Com4jObject _NewEnum(); }
[ "ravjot28@gmail.com" ]
ravjot28@gmail.com
8dfe6fc7ec818c10425b20bd3acba9c4c220099d
4a32f11a57850a891376c3514dbed41379fa2adf
/freeswitch-cdr-spring-boot-starter/src/main/java/link/thingscloud/freeswitch/cdr/spring/boot/starter/config/FreeswitchCdrAutoConfiguration.java
02300e2c99bfcb25d267ff306bc6c695a99076cc
[ "Apache-2.0" ]
permissive
HowellYan/freeswitch-esl-all
d86030992144e01eeb5413a2c82074a28ec040bf
d565dede997d1bbf4f70e68d445040c442af8111
refs/heads/v1.6-dev
2023-07-14T05:28:52.342358
2021-08-16T16:17:32
2021-08-16T16:17:32
393,562,854
0
0
Apache-2.0
2021-08-07T03:04:57
2021-08-07T03:04:56
null
UTF-8
Java
false
false
1,006
java
package link.thingscloud.freeswitch.cdr.spring.boot.starter.config; import link.thingscloud.freeswitch.cdr.handler.CdrHandler; import link.thingscloud.freeswitch.cdr.spring.boot.starter.handler.SimpleCdrHandler; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; /** * <p>FreeswitchCdrAutoConfiguration class.</p> * * @author : <a href="mailto:ant.zhou@aliyun.com">zhouhailin</a> * @version $Id: $Id */ @Configuration @ComponentScan({"link.thingscloud.freeswitch.cdr"}) public class FreeswitchCdrAutoConfiguration { /** * <p>cdrHandler.</p> * * @return a {@link link.thingscloud.freeswitch.cdr.handler.CdrHandler} object. */ @Bean @ConditionalOnMissingBean(CdrHandler.class) public CdrHandler cdrHandler() { return new SimpleCdrHandler(); } }
[ "th15817161961@gmail.com" ]
th15817161961@gmail.com
297d8dd23c4cf65b5468a735e97442393198fcad
0f313671261362beaf80304eb903bc0921a8db77
/app/src/androidTest/java/com/androiddeveloper/webprog26/app2017/ExampleInstrumentedTest.java
8ceeacb46ffa47ce7be4a31d55157d59797e67c6
[]
no_license
webprog26/app2017
a589f436f857c2830ee1f1764beba0b265281902
526a240d015b003331c7546e8e4b03695f5dddc2
refs/heads/master
2021-01-11T13:36:22.363350
2017-06-23T07:23:09
2017-06-23T07:23:09
95,007,711
0
0
null
null
null
null
UTF-8
Java
false
false
780
java
package com.androiddeveloper.webprog26.app2017; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.androiddeveloper.webprog26.app2017", appContext.getPackageName()); } }
[ "webprog26@gmail.com" ]
webprog26@gmail.com
186d428cf061a6e7db70327008e4c740f0f82bcf
573a66e4f4753cc0f145de8d60340b4dd6206607
/JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/911446/beta 0.7/ui/ModuleEvent.java
9696b497771eec31ccbb17d71820e56563833610
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
mkaouer/Code-Smells-Detection-in-JavaScript
3919ec0d445637a7f7c5f570c724082d42248e1b
7130351703e19347884f95ce6d6ab1fb4f5cfbff
refs/heads/master
2023-03-09T18:04:26.971934
2022-03-23T22:04:28
2022-03-23T22:04:28
73,915,037
8
3
null
2023-02-28T23:00:07
2016-11-16T11:47:44
null
UTF-8
Java
false
false
1,329
java
/* Merchant of Venice - technical analysis software for the stock market. Copyright (C) 2002 Andrew Leppard (aleppard@picknowl.com.au) 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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.mov.ui; import org.mov.main.Module; import java.util.EventObject; /** * Representation of an event indicating that a module has been added, * removed or renamed. * * @author Andrew Leppard * @see ModuleListener */ public class ModuleEvent extends EventObject { /** * Create a new module event based on the given module. * * @param module the module */ public ModuleEvent(Module module) { super((Object)module); } }
[ "mmkaouer@umich.edu" ]
mmkaouer@umich.edu
056c4ad776a1b74945c96444e5e776b96ef1af5d
09534c278861e04441712475790c08fe0b92f279
/app/src/main/java/com/walktour/framework/view/viewpagerindicator/IconPageIndicator.java
ffd49ff7225abc7e46ee29029198b09cf7c33622
[]
no_license
copslock/Walktour4
077eee3500387abd9a8b74727dd3c5727cc11384
46b7e77e2a5e54c4f2a83f23448f7031c8b37537
refs/heads/master
2023-07-17T13:05:58.825418
2019-08-20T07:12:35
2019-08-20T07:12:35
397,678,508
1
0
null
null
null
null
UTF-8
Java
false
false
5,489
java
/* * Copyright (C) 2011 The Android Open Source Project * Copyright (C) 2012 Jake Wharton * * 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.walktour.framework.view.viewpagerindicator; import android.content.Context; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager.OnPageChangeListener; import android.util.AttributeSet; import android.view.Gravity; import android.view.View; import android.widget.HorizontalScrollView; import android.widget.ImageView; import com.walktour.gui.R; import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; /** * This widget implements the dynamic action bar tab behavior that can change * across different configurations or circumstances. */ public class IconPageIndicator extends HorizontalScrollView implements PageIndicator { private final IcsLinearLayout mIconsLayout; private ViewPager mViewPager; private OnPageChangeListener mListener; private Runnable mIconSelector; private int mSelectedIndex; public IconPageIndicator(Context context) { this(context, null); } public IconPageIndicator(Context context, AttributeSet attrs) { super(context, attrs); setHorizontalScrollBarEnabled(false); mIconsLayout = new IcsLinearLayout(context, R.attr.vpiIconPageIndicatorStyle); addView(mIconsLayout, new LayoutParams(WRAP_CONTENT, LayoutParams.MATCH_PARENT, Gravity.CENTER)); } private void animateToIcon(final int position) { final View iconView = mIconsLayout.getChildAt(position); if (mIconSelector != null) { removeCallbacks(mIconSelector); } mIconSelector = new Runnable() { public void run() { final int scrollPos = iconView.getLeft() - (getWidth() - iconView.getWidth()) / 2; smoothScrollTo(scrollPos, 0); mIconSelector = null; } }; post(mIconSelector); } @Override public void onAttachedToWindow() { super.onAttachedToWindow(); if (mIconSelector != null) { // Re-post the selector we saved post(mIconSelector); } } @Override public void onDetachedFromWindow() { super.onDetachedFromWindow(); if (mIconSelector != null) { removeCallbacks(mIconSelector); } } @Override public void onPageScrollStateChanged(int arg0) { if (mListener != null) { mListener.onPageScrollStateChanged(arg0); } } @Override public void onPageScrolled(int arg0, float arg1, int arg2) { if (mListener != null) { mListener.onPageScrolled(arg0, arg1, arg2); } } @Override public void onPageSelected(int arg0) { setCurrentItem(arg0); if (mListener != null) { mListener.onPageSelected(arg0); } } @Override public void setViewPager(ViewPager view) { if (mViewPager == view) { return; } if (mViewPager != null) { mViewPager.setOnPageChangeListener(null); } PagerAdapter adapter = view.getAdapter(); if (adapter == null) { throw new IllegalStateException("ViewPager does not have adapter instance."); } mViewPager = view; view.setOnPageChangeListener(this); notifyDataSetChanged(); } public void notifyDataSetChanged() { mIconsLayout.removeAllViews(); IconPagerAdapter iconAdapter = (IconPagerAdapter) mViewPager.getAdapter(); int count = iconAdapter.getCount(); for (int i = 0; i < count; i++) { ImageView view = new ImageView(getContext(), null, R.attr.vpiIconPageIndicatorStyle); view.setImageResource(iconAdapter.getIconResId(i)); mIconsLayout.addView(view); } if (mSelectedIndex > count) { mSelectedIndex = count - 1; } setCurrentItem(mSelectedIndex); requestLayout(); } @Override public void setViewPager(ViewPager view, int initialPosition) { setViewPager(view); setCurrentItem(initialPosition); } @Override public void setCurrentItem(int item) { if (mViewPager == null) { throw new IllegalStateException("ViewPager has not been bound."); } mSelectedIndex = item; mViewPager.setCurrentItem(item); int tabCount = mIconsLayout.getChildCount(); for (int i = 0; i < tabCount; i++) { View child = mIconsLayout.getChildAt(i); boolean isSelected = (i == item); child.setSelected(isSelected); if (isSelected) { animateToIcon(item); } } } @Override public void setOnPageChangeListener(OnPageChangeListener listener) { mListener = listener; } }
[ "15015912346@163.com" ]
15015912346@163.com
198a3ab7b901cb283551227d55846c248bf809ca
752c93221458bca8059fee6eead33aea02480aa5
/app/src/main/java/com/example/a13834598889/billiards/Tool/GlideImageLoader.java
05a2a1056e9e6f5f42f2cd00570532eb11616d52
[]
no_license
xieyipeng/Billiards
83c71d13436db12465d59021fa2d563bdf2b20dd
c26d19f610021dffc52732f9705d169012716e26
refs/heads/master
2020-03-25T01:18:17.987955
2018-10-11T08:56:34
2018-10-11T08:56:34
143,230,508
0
0
null
null
null
null
UTF-8
Java
false
false
1,722
java
package com.example.a13834598889.billiards.Tool; import android.content.Context; import android.net.Uri; import android.widget.ImageView; import com.bumptech.glide.Glide; import com.youth.banner.loader.ImageLoader; /** * Created by 13834598889 on 2018/4/30. */ public class GlideImageLoader extends ImageLoader { @Override public void displayImage(Context context, Object path, ImageView imageView) { /** 注意: 1.图片加载器由自己选择,这里不限制,只是提供几种使用方法 2.返回的图片路径为Object类型,由于不能确定你到底使用的那种图片加载器, 传输的到的是什么格式,那么这种就使用Object接收和返回,你只需要强转成你传输的类型就行, 切记不要胡乱强转! */ //Glide 加载图片简单用法 Glide.with(context).load(path).into(imageView); // //Picasso 加载图片简单用法 // Picasso.with(context).load(path).into(imageView); // // //用fresco加载图片简单用法,记得要写下面的createImageView方法 // Uri uri = Uri.parse((String) path); // imageView.setImageURI(uri); } // //提供createImageView 方法,如果不用可以不重写这个方法,主要是方便自定义ImageView的创建 // @Override // public ImageView createImageView(Context context) { // //使用fresco,需要创建它提供的ImageView,当然你也可以用自己自定义的具有图片加载功能的ImageView // SimpleDraweeView simpleDraweeView=new SimpleDraweeView(context); // return simpleDraweeView; // } }
[ "32957035+xieyipeng@users.noreply.github.com" ]
32957035+xieyipeng@users.noreply.github.com
4822cfdec8c1cfbe083545c1fd05926d14eddb69
96da0dd293981c1da634bd7505ca1b99650dc3a4
/pineapple/src/com/tentcoo/pineapple/core/dispatch/service/formatter/schema/IServiceSchemaFormatter.java
b567dafe2180c8239a05e1adcf73cf7a4d6756ea
[]
no_license
androidHarlan/JsWebView
f66696337aec534fa2bdf697a9c1dbd6e969552d
1004fb9c7458995f121c27897e67f9e08155d24c
refs/heads/master
2020-03-09T15:41:44.151550
2018-04-10T03:37:17
2018-04-10T03:37:17
128,864,900
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
package com.tentcoo.pineapple.core.dispatch.service.formatter.schema; import com.tentcoo.pineapple.core.common.bean.ICore; import com.tentcoo.pineapple.core.dispatch.Request; import com.tentcoo.pineapple.core.dispatch.ResponseSchema; public interface IServiceSchemaFormatter extends ICore { ResponseSchema format(Request request,Object returnData); }
[ "1986821027@qq.com" ]
1986821027@qq.com
ce10e3ed18320dedec48721b456138f2bb475edf
4981fc0e1e82dc9226116aa8f0a29413c947b0ec
/Build/src/tests/junit/org/apache/tools/ant/util/GlobPatternMapperTest.java
bca05b2e38398fa4a8b684a19b93d38fe64a7c7f
[ "MIT", "W3C", "GPL-1.0-or-later", "SAX-PD", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown" ]
permissive
Mayo-WE01051879/mayosapp
7e33d4b73b20e6f58f0ae593ae7c9ac10afff20c
4c678635cfd2823c2df6937165e102fdac72cb86
refs/heads/master
2022-12-10T01:22:54.629304
2021-02-24T20:16:36
2021-02-24T20:16:36
16,258,006
0
0
MIT
2022-12-05T23:23:59
2014-01-26T17:50:40
Java
UTF-8
Java
false
false
3,669
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.tools.ant.util; import junit.framework.TestCase; /** * Tests for org.apache.tools.ant.util;GlobPatternMapper. * */ public class GlobPatternMapperTest extends TestCase { public GlobPatternMapperTest(String name) { super(name); } public void testNoPatternAtAll() { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("foobar"); m.setTo("baz"); assertNull("Shouldn\'t match foobar", m.mapFileName("plonk")); String[] result = m.mapFileName("foobar"); assertNotNull("Should match foobar", result); assertEquals("only one result for foobar", 1, result.length); assertEquals("baz", result[0]); } public void testPostfixOnly() { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("*foo"); m.setTo("*plonk"); assertNull("Shouldn\'t match *foo", m.mapFileName("bar.baz")); String[] result = m.mapFileName("bar.foo"); assertNotNull("Should match *.foo", result); assertEquals("only one result for bar.foo", 1, result.length); assertEquals("bar.plonk", result[0]); // Try a silly case m.setTo("foo*"); result = m.mapFileName("bar.foo"); assertEquals("foobar.", result[0]); } public void testPrefixOnly() { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("foo*"); m.setTo("plonk*"); assertNull("Shouldn\'t match foo*", m.mapFileName("bar.baz")); String[] result = m.mapFileName("foo.bar"); assertNotNull("Should match foo*", result); assertEquals("only one result for foo.bar", 1, result.length); assertEquals("plonk.bar", result[0]); // Try a silly case m.setTo("*foo"); result = m.mapFileName("foo.bar"); assertEquals(".barfoo", result[0]); } public void testPreAndPostfix() { GlobPatternMapper m = new GlobPatternMapper(); m.setFrom("foo*bar"); m.setTo("plonk*pling"); assertNull("Shouldn\'t match foo*bar", m.mapFileName("bar.baz")); String[] result = m.mapFileName("foo.bar"); assertNotNull("Should match foo*bar", result); assertEquals("only one result for foo.bar", 1, result.length); assertEquals("plonk.pling", result[0]); // and a little longer result = m.mapFileName("foo.baz.bar"); assertNotNull("Should match foo*bar", result); assertEquals("only one result for foo.baz.bar", 1, result.length); assertEquals("plonk.baz.pling", result[0]); // and a little shorter result = m.mapFileName("foobar"); assertNotNull("Should match foo*bar", result); assertEquals("only one result for foobar", 1, result.length); assertEquals("plonkpling", result[0]); } }
[ "delapaz.mayo@gmail.com" ]
delapaz.mayo@gmail.com
8b6ee78606ea599d4c80d96be84a1de33decb6bc
2ca66a70fb32c0d342b5847c720348f35db7d131
/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/jspjdbc/org/apache/jsp/memberone/modifyProc_jsp.java
06e51e3a0590ae3135201ee27925054be54597f9
[]
no_license
dongmin7208/JavaServerPage
3cbdbaff3001cf1afeffe3f1a4d03ad8a5bea840
695b95f4c4d02b4d253afd570e1b3d4f476ee5b5
refs/heads/main
2023-06-09T16:01:05.284088
2021-07-01T07:43:20
2021-07-01T07:43:20
381,949,052
1
0
null
null
null
null
UTF-8
Java
false
false
6,510
java
/* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/8.5.42 * Generated at: 2019-07-04 08:10:39 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package org.apache.jsp.memberone; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import memberone.*; public final class modifyProc_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent, org.apache.jasper.runtime.JspSourceImports { private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; private static final java.util.Set<java.lang.String> _jspx_imports_packages; private static final java.util.Set<java.lang.String> _jspx_imports_classes; static { _jspx_imports_packages = new java.util.HashSet<>(); _jspx_imports_packages.add("javax.servlet"); _jspx_imports_packages.add("javax.servlet.http"); _jspx_imports_packages.add("memberone"); _jspx_imports_packages.add("javax.servlet.jsp"); _jspx_imports_classes = null; } private volatile javax.el.ExpressionFactory _el_expressionfactory; private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map<java.lang.String,java.lang.Long> getDependants() { return _jspx_dependants; } public java.util.Set<java.lang.String> getPackageImports() { return _jspx_imports_packages; } public java.util.Set<java.lang.String> getClassImports() { return _jspx_imports_classes; } public javax.el.ExpressionFactory _jsp_getExpressionFactory() { if (_el_expressionfactory == null) { synchronized (this) { if (_el_expressionfactory == null) { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); } } } return _el_expressionfactory; } public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() { if (_jsp_instancemanager == null) { synchronized (this) { if (_jsp_instancemanager == null) { _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } } } return _jsp_instancemanager; } public void _jspInit() { } public void _jspDestroy() { } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final java.lang.String _jspx_method = request.getMethod(); if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) { response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET POST or HEAD"); return; } final javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n"); out.write("\r\n"); request.setCharacterEncoding("UTF-8"); out.write('\r'); out.write('\n'); memberone.MemberDao dao = null; dao = (memberone.MemberDao) _jspx_page_context.getAttribute("dao", javax.servlet.jsp.PageContext.PAGE_SCOPE); if (dao == null){ dao = new memberone.MemberDao(); _jspx_page_context.setAttribute("dao", dao, javax.servlet.jsp.PageContext.PAGE_SCOPE); } out.write('\r'); out.write('\n'); memberone.MemberDto dto = null; dto = (memberone.MemberDto) _jspx_page_context.getAttribute("dto", javax.servlet.jsp.PageContext.PAGE_SCOPE); if (dto == null){ dto = new memberone.MemberDto(); _jspx_page_context.setAttribute("dto", dto, javax.servlet.jsp.PageContext.PAGE_SCOPE); } out.write('\r'); out.write('\n'); org.apache.jasper.runtime.JspRuntimeLibrary.introspect(_jspx_page_context.findAttribute("dto"), request); out.write('\r'); out.write('\n'); String loginID =(String)session.getAttribute("loginID"); dto.setId(loginID); dao.memberUpdate(dto); out.write("\r\n"); out.write("<!doctype html>\r\n"); out.write("<html>\r\n"); out.write("<head>\r\n"); out.write("<title>Update Process</title>\r\n"); out.write("<meta http-equiv=\"Refresh\" content=\"3;url=main.jsp\">\r\n"); out.write("<link href=\"css/style.css\" rel=\"stylesheet\" type=\"text/css\"/>\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); out.write("<article>\r\n"); out.write("<font size=\"3\" face=\"바탕체\">\r\n"); out.write("<b>회원정보가 수정 되었습니다.</b><br/><br/>\r\n"); out.write("3초 후에 로그인 페이지로 이동합니다.\r\n"); out.write("</font>\r\n"); out.write("</article>\r\n"); out.write("</body>\r\n"); out.write("</html>"); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { if (response.isCommitted()) { out.flush(); } else { out.clearBuffer(); } } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "sayg3o3d@gmail.com" ]
sayg3o3d@gmail.com
a6672321b672addd034be5a121fcf7261159312f
0426c44faa22ceada97565e28db5433a0a95b3b7
/gmall-cart/src/main/java/com/atguigu/gmall/cart/listener/CartListener.java
3c527b207662eb330b7bc4befdb198554aecfb1b
[ "Apache-2.0" ]
permissive
joedyli/gmall-201130
4cec037b3c51c0d551e0f97a252f212709c72285
edd1573198d58aecf94a3ded4478d44afd00ea2a
refs/heads/main
2023-05-22T02:29:01.536812
2021-06-08T08:07:16
2021-06-08T08:07:16
366,911,735
2
1
null
null
null
null
UTF-8
Java
false
false
4,079
java
package com.atguigu.gmall.cart.listener; import com.alibaba.fastjson.JSON; import com.atguigu.gmall.cart.feign.GmallPmsClient; import com.atguigu.gmall.cart.mapper.CartMapper; import com.atguigu.gmall.cart.pojo.Cart; import com.atguigu.gmall.common.bean.ResponseVo; import com.atguigu.gmall.pms.entity.SkuEntity; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.rabbitmq.client.Channel; import org.apache.commons.lang3.StringUtils; import org.hibernate.validator.constraints.URL; import org.springframework.amqp.core.ExchangeTypes; import org.springframework.amqp.core.Message; import org.springframework.amqp.rabbit.annotation.Exchange; import org.springframework.amqp.rabbit.annotation.Queue; import org.springframework.amqp.rabbit.annotation.QueueBinding; import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.BoundHashOperations; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; import java.io.IOException; import java.util.List; import java.util.Map; @Component public class CartListener { @Autowired private GmallPmsClient pmsClient; @Autowired private StringRedisTemplate redisTemplate; @Autowired private CartMapper cartMapper; private static final String PRICE_PREFIX = "cart:price:"; private static final String KEY_PREFIX = "cart:info:"; @RabbitListener(bindings = @QueueBinding( value = @Queue("CART_PRICE_QUEUE"), exchange = @Exchange(value = "PMS_ITEM_EXCHANGE", ignoreDeclarationExceptions = "true", type = ExchangeTypes.TOPIC), key = {"item.update"} )) public void listener(Long spuId, Channel channel, Message message) throws IOException { if (spuId == null){ channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); return; } // 查询spu下所有的sku ResponseVo<List<SkuEntity>> listResponseVo = this.pmsClient.querySkusBySpuId(spuId); List<SkuEntity> skuEntities = listResponseVo.getData(); // 如果sku为空,则直接返回 if (CollectionUtils.isEmpty(skuEntities)){ channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); return; } skuEntities.forEach(skuEntity -> { if (this.redisTemplate.hasKey(PRICE_PREFIX + skuEntity.getId())) { this.redisTemplate.opsForValue().set(PRICE_PREFIX + skuEntity.getId(), skuEntity.getPrice().toString()); } }); channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); } @RabbitListener(bindings = @QueueBinding( value = @Queue("CART_DELETE_QUEUE"), exchange = @Exchange(value = "ORDER_EXCHANGE", ignoreDeclarationExceptions = "true", type = ExchangeTypes.TOPIC), key = {"cart.delete"} )) public void delete(Map<String, Object> msg, Channel channel, Message message) throws IOException { if (CollectionUtils.isEmpty(msg)){ channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); return; } String userId = msg.get("userId").toString(); List<String> skuIds = JSON.parseArray(msg.get("skuIds").toString(), String.class); if (StringUtils.isBlank(userId) || CollectionUtils.isEmpty(skuIds)){ channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); return; } // 删除购物车中对应的记录 BoundHashOperations<String, Object, Object> hashOps = this.redisTemplate.boundHashOps(KEY_PREFIX + userId); hashOps.delete(skuIds.toArray()); this.cartMapper.delete(new UpdateWrapper<Cart>().eq("user_id", userId).in("sku_id", skuIds)); channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); } }
[ "joedy23@aliyun.com" ]
joedy23@aliyun.com
2d6edf65656c1696340087d519c3257f38753f17
01d01502aa48b1925284babc355c36cc08b61a8f
/src/main/java/uk/ac/ebi/ddi/pipeline/indexer/tasklet/AbstractTasklet.java
d7cc5a7fdef9ac715aef8554e5bdf8e94bc6524d
[]
no_license
OmicsDI/index-pipeline
979cd119cef4058a4d925917bfeaa4b8d730c108
0a8c88fbeb9a5820460192a408a5c4b9da4b6b20
refs/heads/master
2023-04-16T03:53:03.919946
2022-08-02T13:11:06
2022-08-02T13:11:06
43,423,758
0
0
null
2023-03-24T00:09:34
2015-09-30T09:20:12
Java
UTF-8
Java
false
false
2,564
java
package uk.ac.ebi.ddi.pipeline.indexer.tasklet; import org.springframework.batch.core.ExitStatus; import org.springframework.batch.core.scope.context.ChunkContext; import org.springframework.batch.core.scope.context.StepContext; import org.springframework.batch.core.step.tasklet.Tasklet; import org.springframework.batch.item.ExecutionContext; import org.springframework.beans.factory.InitializingBean; import org.springframework.util.Assert; import java.util.Map; /** * Abstract tasklet, all tasklets should extend this class * * @author Yasset Perez-Riverol (ypriverol@gmail.com) * @date 29/09/15 */ public abstract class AbstractTasklet implements Tasklet, InitializingBean { /** * Update step execution context using a given map of values * * @param chunkContext tasklet chunk context * @param values a map of values */ protected void updateStepExecutionContext(ChunkContext chunkContext, Map<String, Object> values) { Assert.notNull(values, "Cannot add null values to chunkContext"); StepContext stepContext = chunkContext.getStepContext(); ExecutionContext stepExecutionContext = stepContext.getStepExecution().getExecutionContext(); for (Map.Entry<String, Object> entry : values.entrySet()) { stepExecutionContext.put(entry.getKey(), entry.getValue()); } } /** * Update step execution context using a pair of key and value * * @param chunkContext tasklet chunk context * @param key key to identify the value * @param value value assigned to the given key */ protected void updateStepExecutionContext(ChunkContext chunkContext, String key, Object value) { Assert.notNull(key, "Context key cannot be null"); Assert.notNull(value, "Context value cannot be null"); StepContext stepContext = chunkContext.getStepContext(); ExecutionContext stepExecutionContext = stepContext.getStepExecution().getExecutionContext(); stepExecutionContext.put(key, value); } /** * Sets the ExitStatus value for the step executing this tasklet * * @param chunkContext tasklet chunk context * @param exitStatus the exit status to set */ protected void setExitStatus(ChunkContext chunkContext, String exitStatus) { Assert.notNull(exitStatus, "Exit status cannot be null"); StepContext stepContext = chunkContext.getStepContext(); stepContext.getStepExecution().setExitStatus(new ExitStatus(exitStatus)); } }
[ "ypriverol@gmail.com" ]
ypriverol@gmail.com
026cdb6589d111d5831a99215c6b5df350c398e8
f4119395cdc70d9702d0eb7e4d6dcc911726d5fd
/java-squid/src/test/java/org/sonar/java/resolve/targets/bytecodeGenerics/MyAbstractClass.java
bf42c6d3eea271f5bdba393bbc0a5b0ec0bc10e0
[]
no_license
pynicolas/sonar-java
88276e98706f7e58e8c0049806523df8bc256389
94061fdbbfefe228d179fddcfb34c2b7f9ca214e
refs/heads/master
2020-12-27T15:19:14.741783
2015-07-01T12:19:05
2015-07-01T12:19:05
38,374,553
0
1
null
2015-07-01T14:06:37
2015-07-01T14:06:35
null
UTF-8
Java
false
false
965
java
/* * SonarQube Java * Copyright (C) 2012 SonarSource * dev@sonar.codehaus.org * * This program 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 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ package org.sonar.java.resolve.targets.bytecodeGenerics; public abstract class MyAbstractClass<P extends MyClassInterface, Q extends P> { Q data; }
[ "nicolas.peru@sonarsource.com" ]
nicolas.peru@sonarsource.com
b9e3f17a6d5e6167b3b36862d383b7f4ed8f6a25
b7aff63b8a97f99949edabafdd8ef637bcfe3dc5
/olq/src/com/hex/bigdata/udsp/olq/provider/impl/model/KylinDatasource.java
2c904ca517912f7f2915f1a3fae4cee809cb8caf
[]
no_license
dfhao/boracay
432c60301d9e82337f46eea89ffc1f8dc28c1371
b317a2fb69aed8f217c1ab0dbff585549b29f62b
refs/heads/master
2021-09-04T03:30:31.226691
2017-12-28T11:16:05
2017-12-28T11:16:05
116,001,453
1
0
null
2018-01-04T09:54:57
2018-01-02T10:03:48
Java
UTF-8
Java
false
false
2,957
java
package com.hex.bigdata.udsp.olq.provider.impl.model; import com.hex.bigdata.udsp.common.model.ComDatasource; import com.hex.bigdata.udsp.common.model.ComProperties; import com.hex.bigdata.udsp.common.provider.model.Datasource; import com.hex.bigdata.udsp.common.provider.model.Property; import org.apache.commons.lang3.StringUtils; import java.util.List; import java.util.Map; /** * Created by PC on 2017/3/10. */ public class KylinDatasource extends Datasource { public String getDriverClass() { String value = getProperty("driver.class").getValue(); if (StringUtils.isBlank(value)){ value = "org.apache.kylin.jdbc.Driver"; } return value; } public String getJdbcUrl() { String value = getProperty("jdbc.url").getValue(); if (StringUtils.isBlank(value)) throw new IllegalArgumentException("jdbc.url不能为空"); return value; } public String getUsername() { return getProperty("username").getValue(); } public String getPassword() { return getProperty("password").getValue(); } public String getInitialSize() { return getProperty("initial.size").getValue(); } public String getMinIdle() { return getProperty("min.idle").getValue(); } public String getMaxIdle() { return getProperty("max.idle").getValue(); } public String getMaxWait() { return getProperty("max.wait").getValue(); } public String getMaxActive() { return getProperty("max.active").getValue(); } public String getValidationQueryTimeout() { return getProperty("validation.query.timeout").getValue(); } public String getTimeBetweenEvictionRunsMillis() { return getProperty("time.between.eviction.runs.millis").getValue(); } public String getMinEvictableIdleTimeMillis() { return getProperty("min.evictable.idle.time.millis").getValue(); } public String getValidationQuery() { return getProperty("validation.query").getValue(); } public String getTestWhileIdle() { return getProperty("test.while.idle").getValue(); } public String getTestOnBorrow() { return getProperty("test.on.borrow").getValue(); } public String getTestOnReturn() { return getProperty("test.on.return").getValue(); } public KylinDatasource(List<Property> properties) { super(properties); } public KylinDatasource(Map<String, Property> propertieMap) { super(propertieMap); } public KylinDatasource(ComDatasource comDatasource, List<ComProperties> comPropertieList) { super(comDatasource, comPropertieList); } public int getMaxNum() { String value = getProperty("max.data.size").getValue(); if (StringUtils.isBlank(value)) { value = "65535"; } return Integer.valueOf(value); } }
[ "junjie.miao@goupwith.com" ]
junjie.miao@goupwith.com
2b25e6cc1801059d80248d7b2d09f93fe901e57f
4d066bf93529cb1cd5fb03f33f28c1d52b1f7d8e
/src/main/java/me/silloy/spring/start/extension/code/kotlin/KotlinProjectGenerationConfiguration.java
e185f116810396857e39116a3a51b1b3efe7992f
[]
no_license
silloy/start.silloy.me
2bcf3737ee901c773571847e5c3ae8f86e60de78
10e798817f3843f9db25f2505eb303d0376bc212
refs/heads/master
2022-11-06T04:18:40.418660
2020-06-28T07:39:14
2020-06-28T07:39:14
275,532,278
1
2
null
null
null
null
UTF-8
Java
false
false
3,238
java
/* * Copyright 2012-2020 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 * * https://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 me.silloy.spring.start.extension.code.kotlin; import io.spring.initializr.generator.buildsystem.Build; import io.spring.initializr.generator.condition.ConditionalOnLanguage; import io.spring.initializr.generator.condition.ConditionalOnPlatformVersion; import io.spring.initializr.generator.language.kotlin.KotlinLanguage; import io.spring.initializr.generator.project.ProjectDescription; import io.spring.initializr.generator.project.ProjectGenerationConfiguration; import io.spring.initializr.generator.spring.build.BuildCustomizer; import io.spring.initializr.generator.spring.code.kotlin.InitializrMetadataKotlinVersionResolver; import io.spring.initializr.generator.spring.code.kotlin.KotlinVersionResolver; import io.spring.initializr.generator.spring.documentation.HelpDocumentCustomizer; import io.spring.initializr.metadata.InitializrMetadata; import io.spring.initializr.versionresolver.DependencyManagementVersionResolver; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * {@link ProjectGenerationConfiguration} for generation of projects that use the Kotlin * language. * * @author Stephane Nicoll * @author Eddú Meléndez */ @ProjectGenerationConfiguration @ConditionalOnLanguage(KotlinLanguage.ID) class KotlinProjectGenerationConfiguration { @Bean KotlinVersionResolver kotlinVersionResolver(DependencyManagementVersionResolver versionResolver, InitializrMetadata metadata) { return new ManagedDependenciesKotlinVersionResolver(versionResolver, (description) -> new InitializrMetadataKotlinVersionResolver(metadata) .resolveKotlinVersion(description)); } @Bean @ConditionalOnPlatformVersion("2.2.0.RELEASE") ReactorKotlinExtensionsCustomizer reactorKotlinExtensionsCustomizer(InitializrMetadata metadata) { return new ReactorKotlinExtensionsCustomizer(metadata); } @Configuration @ConditionalOnPlatformVersion("2.2.0.M5") static class KotlinCoroutinesCustomizerConfiguration { private final KotlinCoroutinesCustomizer customizer; KotlinCoroutinesCustomizerConfiguration(InitializrMetadata metadata, ProjectDescription description, DependencyManagementVersionResolver versionResolver) { this.customizer = new KotlinCoroutinesCustomizer(metadata, description, versionResolver); } @Bean BuildCustomizer<Build> kotlinCoroutinesBuildCustomizer() { return this.customizer::customize; } @Bean HelpDocumentCustomizer kotlinCoroutinesHelpDocumentCustomizer(Build build) { return (helpDocument) -> this.customizer.customize(helpDocument, build); } } }
[ "sshzh90@gmail.com" ]
sshzh90@gmail.com
24e92e8e57399ad025aaefe8a6e4b6793326c98b
42bb692d9140736c468e7ae328564c12b830b4be
/bitcamp-javabasic/src/step03/Exam02_1.java
039f9d6a0583671307bc5fdc7244279b5a312067
[]
no_license
kimkwanhee/bitcamp
b047f4cc391d2c43bad858f2ffb4f3a6a3779aa2
0245693f83b06d773365b9b5b6b3d4747877d070
refs/heads/master
2021-01-24T10:28:06.247239
2018-08-20T03:13:18
2018-08-20T03:13:18
123,054,178
0
0
null
null
null
null
UTF-8
Java
false
false
1,073
java
// 레퍼런스 배열 - 사용 전 package step03; public class Exam02_1 { public static void main(String[] args) { // 여러 개의 인스턴스 주소 저장하기 class Score { String name; int kor; int eng; int math; int sum; float aver; } // Score 레퍼런스를 여러 개 준비한다. Score s1, s2, s3; // 각 레퍼런스에 인스턴스를 만들어 주소를 저장한다. s1 = new Score(); s2 = new Score(); s3 = new Score(); // 레퍼런스를 이용하여 인스턴스에 접근한 다음에 항목에 값 넣는다. s1.name = "홍길동"; s2.name = "임꺽정"; s3.name = "유관순"; // 레퍼런스를 통해 인스턴스의 각 항목 값을 꺼낸다. System.out.printf("이름: %s\n", s1.name); System.out.printf("이름: %s\n", s2.name); System.out.printf("이름: %s\n", s3.name); } }
[ "rhdwn1955@naver.com" ]
rhdwn1955@naver.com
0934894928e662802bbbba24f460a0ce80edcc5c
e75bc637c8a8bbe11dd3ecf861594476bd3a5022
/src/com/mf/pubparam/service/CitiesService.java
5922d8238780fef534cd5a04745ffc168138e772
[]
no_license
atomicworld/finance
220fc00563368dcd154ca5984e3f2afb22c33d74
ba2ec82334d7654b3edcea35b6eae40bf1917493
refs/heads/master
2021-01-23T04:34:12.684005
2018-03-29T09:45:49
2018-03-29T09:45:49
86,209,158
0
0
null
null
null
null
UTF-8
Java
false
false
412
java
/* * Powered By [yc_genetrator] * version 1.0 * Since 2013 - 2015 */ package com.mf.pubparam.service; import java.util.List; import com.mf.pubparam.entity.Cities; /** * @author xujiuhua * @2015-02-08 * @Email: xujiuhua798@foxmail.com * @version 1.0 * @param <T> */ public interface CitiesService{ public List<Cities> getCitybyParentId(String parentId); public Cities getById(String id); }
[ "huangwen9@wanda.cn" ]
huangwen9@wanda.cn
954ce88da02768aa3b42bfbec678375e1918dd27
bd729ef9fcd96ea62e82bb684c831d9917017d0e
/CHPT/source/trunk/supp_app/cpcs/test_src/com/ctfo/sas/service/test/MyClientHttp.java
1fcc32c7955fa5319b48b6ea642a16ed7f8eace9
[]
no_license
shanghaif/workspace-kepler
849c7de67b1f3ee5e7da55199c05c737f036780c
ac1644be26a21f11a3a4a00319c450eb590c1176
refs/heads/master
2023-03-22T03:38:55.103692
2018-03-24T02:39:41
2018-03-24T02:39:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,360
java
package com.ctfo.sas.service.test; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import com.ctfo.sas.service.MessageForward; import com.ctfo.sas.service.bean.Message; import com.ctfo.threedes.ThreeDES; public class MyClientHttp { private static final String address = "http://192.168.2.135/cpcs/services/MessageForwardYt?wsdl"; public static void main(String[] args) throws Exception { JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean(); factoryBean.setAddress(address); factoryBean.setServiceClass(MessageForward.class); Object obj = factoryBean.create(); MessageForward userService = (MessageForward) obj; Message msg = new Message(); msg.setServiceStationSap(ThreeDES.Encrypt3DES("0f6b0bab-958f-490b-8aed-60e3f01934f7", "0000104332", "UTF-8")); msg.setRequestTime(ThreeDES.Encrypt3DES("0f6b0bab-958f-490b-8aed-60e3f01934f7", "ssNNs", "UTF-8")); msg.setBillNumber(ThreeDES.Encrypt3DES("0f6b0bab-958f-490b-8aed-60e3f01934f7", "ssSSSs", "UTF-8")); msg.setBillType(ThreeDES.Encrypt3DES("0f6b0bab-958f-490b-8aed-60e3f01934f7", "sssZXCVAS", "UTF-8")); msg.setOpType(ThreeDES.Encrypt3DES("0f6b0bab-958f-490b-8aed-60e3f01934f7", "sssFG", "UTF-8")); System.out.println(userService.messageForwardYt(msg)); } }
[ "zhangjunfang0505@163.com" ]
zhangjunfang0505@163.com
7fb325adf60c0282c79dc6f6d2f9e0e2bd0cd8ad
4a33a4e1646efbecaa5172c20a67be57dcda1fea
/springboot-mybatis-transaction/src/main/java/com/composite/model/BoundSqlSqlSource.java
dc8ddd8a3dd05bc9e93e636cb07a110d41646d65
[]
no_license
jackyzonewen/SpringBootCompositeLearn
b2bc92803ee7b2338f49077dfdfcd0633cea9897
7e20b4cf62d2955f6ecd98ad032b2fa4bfda619f
refs/heads/master
2020-09-12T06:26:39.599625
2019-04-26T02:45:43
2019-04-26T02:45:43
222,340,752
1
0
null
2019-11-18T01:43:08
2019-11-18T01:43:08
null
UTF-8
Java
false
false
401
java
package com.composite.model; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis.mapping.SqlSource; public class BoundSqlSqlSource implements SqlSource { private BoundSql boundSql; public BoundSqlSqlSource(BoundSql boundSql) { this.boundSql = boundSql; } @Override public BoundSql getBoundSql(Object parameterObject) { return boundSql; } }
[ "847350737@qq.com" ]
847350737@qq.com
8f80d6e60c67423f67bff7fc9b3a9bb0cc6280f9
258de8e8d556901959831bbdc3878af2d8933997
/washington/washington-core/src/main/java/com/voxlearning/washington/controller/mobile/parent/test/TestMobileParentSignController.java
6464890bcd6372a6e75e4188055fd3ef35a24d18
[]
no_license
Explorer1092/vox
d40168b44ccd523748647742ec376fdc2b22160f
701160b0417e5a3f1b942269b0e7e2fd768f4b8e
refs/heads/master
2020-05-14T20:13:02.531549
2019-04-17T06:54:06
2019-04-17T06:54:06
181,923,482
0
4
null
2019-04-17T15:53:25
2019-04-17T15:53:25
null
UTF-8
Java
false
false
783
java
package com.voxlearning.washington.controller.mobile.parent.test; import com.voxlearning.alps.http.client.execute.HttpRequestExecutor; import com.voxlearning.alps.http.client.execute.POST; /** * Created by malong on 2016/5/12. */ public class TestMobileParentSignController { public static void main(String args[]) { try { System.out.println("Test Start......"); String apiURL = "http://localhost:8081/parentMobile/parent/sign.vpage"; POST post = HttpRequestExecutor.defaultInstance().post(apiURL); System.out.println(post.execute().getResponseString()); System.out.println("Test End......"); } catch (Exception e) { e.printStackTrace(); } } }
[ "wangahai@300.cn" ]
wangahai@300.cn
556bdc10f32d53e6595b398e55fb7d67a77caa1f
f87a4bbf16e8adeecc0e8fbc23b665bfb9315acc
/src/main/java/com/bc/payment/config/LocaleConfiguration.java
fbc06cbeb6928aeb1f5208a187af3f7a38b64fde
[]
no_license
DarrenClarkBC/payment-request-tracker
17ab09cbab8852c1cf4d3cbdde18bfdcf7e36657
519f85b9ddda83a4a2594f1487231838aa86e95d
refs/heads/master
2020-04-05T02:02:20.512328
2018-11-06T23:12:23
2018-11-06T23:12:23
156,460,991
0
0
null
null
null
null
UTF-8
Java
false
false
1,057
java
package com.bc.payment.config; import io.github.jhipster.config.locale.AngularCookieLocaleResolver; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.config.annotation.*; import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; @Configuration public class LocaleConfiguration implements WebMvcConfigurer { @Bean(name = "localeResolver") public LocaleResolver localeResolver() { AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver(); cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY"); return cookieLocaleResolver; } @Override public void addInterceptors(InterceptorRegistry registry) { LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); localeChangeInterceptor.setParamName("language"); registry.addInterceptor(localeChangeInterceptor); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
4b806e753d0e4669c048483b2a135ddea1ca41af
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/abc013/B/4400970.java
67bfc8c4b842509de1d5dbd9286d29e77bcc1c98
[]
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
1,716
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.StringTokenizer; /** * Built using CHelper plug-in Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); Task solver = new Task(); solver.solve(1, in, out); out.close(); } static class Task { public void solve(int testNumber, InputReader in, PrintWriter out) { int a = in.nextInt(); int b = in.nextInt(); if(Math.abs(b - a) > 5) { out.println(10 - Math.abs(b - a)); } else { out.println(Math.abs(b - a)); } } } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public char nextChar() { return next().charAt(0); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } } }
[ "kwnafi@yahoo.com" ]
kwnafi@yahoo.com
40b7dd3d6a11c48b93cc1a4fccc8e1101c947195
02620724eefb488f6b32962c352a6b96af3467d8
/commonapi/src/main/java/com/tm/commonapi/web/rest/errors/FieldErrorVM.java
e874d136bd105d050b2c050eac0bcef849313adc
[]
no_license
antonyashok/hrmsPortal
bc34b08f020bcf30ed829bc2ffba8843846cdfb6
56df9bf82c3a0d04991c24aac68368756ecbacdb
refs/heads/master
2021-01-01T20:32:36.056090
2017-07-31T12:16:00
2017-07-31T12:16:00
98,884,365
0
1
null
null
null
null
UTF-8
Java
false
false
648
java
package com.tm.commonapi.web.rest.errors; import java.io.Serializable; public class FieldErrorVM implements Serializable { private static final long serialVersionUID = 1L; private final String objectName; private final String field; private final String message; public FieldErrorVM(String dto, String field, String message) { this.objectName = dto; this.field = field; this.message = message; } public String getObjectName() { return objectName; } public String getField() { return field; } public String getMessage() { return message; } }
[ "antonyashok110@yahoo.in" ]
antonyashok110@yahoo.in
9049cdd978a1ce3e2a834eca1f57aadcfe3cb01a
0deffdd02bc1a330a7f06d5366ba693b2fd10e61
/BOOT_CAMP_PROJECTS/Deevanshu/HibernateAssignment/src/com/infy/model/Customer.java
4d3da758ef4a4d07320bd32e0fa4b7b8c2b76dbb
[]
no_license
deevanshu07/Projects
77adb903575de9563a324a294c04c88e50dfffeb
6c49672b3b1eda8b16327b56114560140b087e38
refs/heads/master
2021-04-27T21:52:13.560590
2018-04-26T15:35:21
2018-04-26T15:35:21
122,406,211
0
0
null
null
null
null
UTF-8
Java
false
false
1,628
java
package com.infy.model; public class Customer { int customerId; String custName; String custDob; String custMobile; String custType; String custAddress; @Override public String toString() { return "Customer [customerId=" + customerId + ", custName=" + custName + ", custDob=" + custDob + ", custMobile=" + custMobile + ", custType=" + custType + ", custAddress=" + custAddress + "]"; } public int getCustomerId() { return customerId; } public void setCustomerId(int customerId) { this.customerId = customerId; } public String getCustName() { return custName; } public void setCustName(String custName) { this.custName = custName; } public String getCustDob() { return custDob; } public void setCustDob(String custDob) { this.custDob = custDob; } public String getCustMobile() { return custMobile; } public void setCustMobile(String custMobile) { this.custMobile = custMobile; } public String getCustType() { return custType; } public void setCustType(String custType) { this.custType = custType; } public String getCustAddress() { return custAddress; } public void setCustAddress(String custAddress) { this.custAddress = custAddress; } public Customer(int customerId, String custName, String custDob,String custMobile, String custType, String custAddress) { super(); this.customerId = customerId; this.custName = custName; this.custDob = custDob; this.custMobile = custMobile; this.custType = custType; this.custAddress = custAddress; } public Customer() { super(); // TODO Auto-generated constructor stub } }
[ "deevanshumahajan07@gmail.com" ]
deevanshumahajan07@gmail.com
2411eac4b8b14b9f2aba6d585234306edbe618bb
a43d4202628ecb52e806d09f0f3dc1f5bab3ef4f
/src/main/java/pnc/mesadmin/dao/UserRoleDAO.java
860a9183d26be4076bd06549684325aaa904474d
[]
no_license
pnc-mes/base
b88583929e53670340a704f848e4e9e2027f1334
162135b8752b4edc397b218ffd26664929f6920d
refs/heads/main
2023-01-07T22:06:10.794300
2020-10-27T07:47:20
2020-10-27T07:47:20
307,621,190
0
0
null
null
null
null
UTF-8
Java
false
false
1,365
java
package pnc.mesadmin.dao; import org.apache.ibatis.annotations.Param; import pnc.mesadmin.entity.UserInfo; import pnc.mesadmin.entity.UserRoleInfo; import java.util.List; /** * 公司名称:驭航信息技术(上海)有限公司 * 系统名称:PNC-MES管理系统 * 子系统名称:用户角色信息DAO * 创建人:潘俊峰 * 创建时间:2017-05-10 * 修改人: * 修改时间: */ public interface UserRoleDAO { //根据用户标识(UserGd)查询用户角色信息,张亮亮 List<UserRoleInfo> SelectUserRoleInfoByuserGd(@Param("userGd") String arguserGd); //根据用户id和角色id 到用户角色查询信息,此目的是否被勾选,张亮亮 UserRoleInfo SelectUseridAndRolridInfo(@Param("userGd") String userGd, @Param("roleGd") String roleGd); //新增用户角色信息 ,张亮亮 int InsertUserRoleInfo(UserRoleInfo argUserRoleInfo); //删除用户角色信息 此语句是删除用户下的关联表也要删除掉 ,张亮亮 int DeleteUserRoleByruid(@Param("ruid") int argruid, @Param("userGd") String arguserGd); List<UserRoleInfo> selectUserRoleruid(int ruid); //根据角色查询用户Gd (pjf) List<String> SelectByRoleGd(String argRoleGd); int updateUserRoleInfo(UserRoleInfo userRoleInfo); List<UserInfo> SelectByGuids(@Param("ids") List ids); }
[ "95887577@qq.com" ]
95887577@qq.com
077bc5def0980a8b3e05ddf5b0c4b42647fee34c
6253283b67c01a0d7395e38aeeea65e06f62504b
/decompile/app/Gallery2/src/main/java/com/fyusion/sdk/viewer/ext/localfyuse/a.java
49009c22dfb05e4521a6bae0a5c8fd72205b009e
[]
no_license
sufadi/decompile-hw
2e0457a0a7ade103908a6a41757923a791248215
4c3efd95f3e997b44dd4ceec506de6164192eca3
refs/heads/master
2023-03-15T15:56:03.968086
2017-11-08T03:29:10
2017-11-08T03:29:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,879
java
package com.fyusion.sdk.viewer.ext.localfyuse; import android.graphics.Bitmap; import android.text.TextUtils; import android.util.Log; import com.fyusion.sdk.common.ext.e; import com.fyusion.sdk.common.ext.f; import com.fyusion.sdk.common.ext.filter.BlockFilter; import com.fyusion.sdk.common.ext.filter.ExclusiveFilter; import com.fyusion.sdk.common.ext.filter.ImageFilter; import com.fyusion.sdk.common.ext.filter.ImageFilterAbstractFactory; import com.fyusion.sdk.common.ext.filter.MultiControlsFilter; import com.fyusion.sdk.common.ext.g; import com.fyusion.sdk.common.ext.j; import com.fyusion.sdk.common.ext.l; import fyusion.vislib.FyuseContainerType; import fyusion.vislib.FyuseContainerUtils; import fyusion.vislib.Platform; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.nio.channels.FileChannel; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Map.Entry; /* compiled from: Unknown */ public class a { private l a; private l b; private File c; public a(l lVar) { this.a = lVar; } /* JADX WARNING: inconsistent code. */ /* Code decompiled incorrectly, please refer to instructions dump. */ private void a(e eVar) throws IOException { FileChannel channel; Throwable th; Throwable th2; Throwable th3 = null; File b = this.a.b(); if (this.b.a(eVar)) { File c = this.b.c(); int a = f.a(b); File file = new File(c, j.ag); FileChannel channel2 = new FileInputStream(b).getChannel(); try { channel = new FileOutputStream(file).getChannel(); try { channel2.transferTo((long) a, channel2.size() - ((long) a), channel); if (channel != null) { channel.close(); } if (channel2 != null) { channel2.close(); } FyuseContainerUtils.composeFromDir(this.b.c().getPath(), this.c.getPath(), Platform.Android, FyuseContainerType.PROCESSED); com.fyusion.sdk.common.util.a.a(this.b.c()); return; } catch (Throwable th22) { Throwable th4 = th22; th22 = th; th = th4; } } catch (Throwable th5) { th = th5; if (channel2 != null) { if (th3 == null) { channel2.close(); } else { try { channel2.close(); } catch (Throwable th6) { th3.addSuppressed(th6); } } } throw th; } } return; if (channel != null) { if (th22 == null) { channel.close(); } else { channel.close(); } } throw th; throw th; } private void a(File file) { l lVar; File b = this.a.b(); this.c = b; if (file.equals(b) || file.getPath().equals(b.getParent())) { this.c = b; lVar = this.a; } else { if (file.isDirectory()) { this.c = new File(file, b.getName()); } else { this.c = file; } lVar = new l(g.a(), this.c); } this.b = lVar; } private static void a(File file, File file2) throws IOException { if (!file2.exists()) { file2.mkdirs(); } f.b(file, file2); File file3 = new File(file2, j.aj); if (!file3.exists()) { file3.createNewFile(); } file3 = new File(file2, j.ab); if (!file3.exists()) { file3.createNewFile(); } } public e a() throws FileNotFoundException { return this.a.d(); } List<ImageFilter> a(e eVar, ImageFilterAbstractFactory imageFilterAbstractFactory) { return this.a.a(eVar, imageFilterAbstractFactory); } public void a(File file, e eVar, Bitmap bitmap) throws IOException { a(file); a(this.a.b(), this.b.c()); this.b.a(bitmap); a(eVar); } void a(Collection<ImageFilter> collection, e eVar) { if (eVar != null) { List arrayList = new ArrayList(); Iterable arrayList2 = new ArrayList(); int i = 0; for (ImageFilter imageFilter : collection) { int i2; if (imageFilter instanceof ExclusiveFilter) { eVar.setSelectedFilterID(imageFilter.getName()); eVar.setSelectedFilterParameter(Float.toString(imageFilter.getValue())); i2 = 1; } else { if (imageFilter instanceof MultiControlsFilter) { for (Entry key : ((MultiControlsFilter) imageFilter).getFilterValues().entrySet()) { arrayList.add(key.getKey()); arrayList2.add(Arrays.asList(new String[]{String.valueOf(key.getValue())})); } } else { arrayList.add(imageFilter.getName()); List arrayList3 = new ArrayList(); arrayList3.add(String.valueOf(imageFilter.getValue())); if (imageFilter instanceof BlockFilter) { BlockFilter blockFilter = (BlockFilter) imageFilter; arrayList3.add(String.valueOf(blockFilter.getWidth())); arrayList3.add(String.valueOf(blockFilter.getHeight())); } arrayList2.add(arrayList3); } i2 = i; } i = i2; } if (i == 0) { eVar.setSelectedFilterID(ImageFilterAbstractFactory.NO_TONE_CURVE_FILTER); eVar.setSelectedFilterParameter(""); } eVar.setListOfAdjustmentFilters(TextUtils.join(",", arrayList.toArray())); eVar.setListOfAdjustmentFilterParameters(TextUtils.join(",", arrayList2)); Log.d("EditorDataManager", "Tone Filter: " + eVar.getSelectedFilterID() + ": " + eVar.getSelectedFilterParameter()); Log.d("EditorDataManager", "Adjusment Filters: " + eVar.getListOfAdjustmentFilters() + ": " + eVar.getListOfAdjustmentFilterParameters()); } } }
[ "liming@droi.com" ]
liming@droi.com
b0e3d03dedb632e646b9be15790b7ab45db10b9a
d381092dd5f26df756dc9d0a2474b253b9e97bfb
/impe3/impe3-palette/src/main/java/com/isotrol/impe3/freemarker/wrap/PortalAPIMethod.java
f129f82fa5323d6fda2c6f0dbcca97bed70e7767
[]
no_license
isotrol-portal3/portal3
2d21cbe07a6f874fff65e85108dcfb0d56651aab
7bd4dede31efbaf659dd5aec72b193763bfc85fe
refs/heads/master
2016-09-15T13:32:35.878605
2016-03-07T09:50:45
2016-03-07T09:50:45
39,732,690
0
1
null
null
null
null
UTF-8
Java
false
false
1,489
java
/** * This file is part of Port@l * Port@l 3.0 - Portal Engine and Management System * Copyright (C) 2010 Isotrol, SA. http://www.isotrol.com * * Port@l 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. * * Port@l 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 Port@l. If not, see <http://www.gnu.org/licenses/>. */ package com.isotrol.impe3.freemarker.wrap; import freemarker.template.TemplateModel; import freemarker.template.TemplateModelException; /** * Interface class for Port@l API method FreeMarker models. * @author Andres Rodriguez * @param <T> Wrapped object type. */ interface PortalAPIMethod<T> { /** Returns the method name. */ String getName(); /** * Computes the method value. * @param wrapper Object wrapper. * @param object Wrapped object. * @return The template model. * @throws TemplateModelException If requested data cannot be retrieved. */ TemplateModel get(PortalObjectWrapper wrapper, T object) throws TemplateModelException; }
[ "isotrol-portal@portal.isotrol.com" ]
isotrol-portal@portal.isotrol.com
054f8dfef0e37a2a76cf80ca5334e9f4dd133314
12a99ab3fe76e5c7c05609c0e76d1855bd051bbb
/src/main/java/com/alipay/api/response/AlipayCommerceAntestMockgrouplistQueryResponse.java
9c9c9a856c6515f45b115bff448556a88d266267
[ "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
845
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.EcoMockGroupInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.commerce.antest.mockgrouplist.query response. * * @author auto create * @since 1.0, 2020-04-21 15:50:09 */ public class AlipayCommerceAntestMockgrouplistQueryResponse extends AlipayResponse { private static final long serialVersionUID = 8269488451745642948L; /** * 挡板集列表 */ @ApiListField("data") @ApiField("eco_mock_group_info") private List<EcoMockGroupInfo> data; public void setData(List<EcoMockGroupInfo> data) { this.data = data; } public List<EcoMockGroupInfo> getData( ) { return this.data; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
97b66fa0b15e6c1aeef3230e7dbfda027472af6e
04403f16adb8fb34bddc91ce98f545e0fb0e982b
/unsagamod/hinasch/mods/unlsaga/inventory/SlotAccessory.java
490e0aec799d685fa0e59bbf2ce9113d7a0e0f5d
[]
no_license
damofujiki/minecraftmod
9afde5759f98c42d9d8f7a245d59e7661aebc61c
9970b384ffba39fb7dfb3ab3492fc8c7ce9785a8
refs/heads/master
2021-01-15T13:11:16.071722
2014-04-08T16:38:46
2014-04-08T16:38:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
786
java
package hinasch.mods.unlsaga.inventory; import hinasch.mods.unlsaga.item.armor.ItemAccessory; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class SlotAccessory extends Slot{ public SlotAccessory(IInventory par1iInventory, int par2, int par3, int par4) { super(par1iInventory, par2, par3, par4); // TODO 自動生成されたコンストラクター・スタブ } @Override public int getSlotStackLimit() { return 1; } @Override public boolean isItemValid(ItemStack par1ItemStack) { Item item = (par1ItemStack == null ? null : par1ItemStack.getItem()); return (item instanceof ItemAccessory)? true : false; } }
[ "ahoahomen@gmail.com" ]
ahoahomen@gmail.com
f760c297731a9c51ed9205a06fb053a2379d9fef
efd638c93ad741380ada689bd3c4dfb397cce8dd
/app/src/main/java/com/knwedu/college/fragments/CollegeSwapChildrenFragment.java
0fe111d8e83031bc73a9d645553054a237867c1e
[]
no_license
raisahab-ritwik/MY_CPS
fa6d69bf99aa1f6976318f767aa5e8a0aff3b6cf
eeb74e5604498d4d309846e03304fb9f30700800
refs/heads/master
2020-03-12T06:56:59.658729
2018-04-21T17:33:32
2018-04-21T17:33:32
130,496,725
0
1
null
null
null
null
UTF-8
Java
false
false
7,274
java
package com.knwedu.college.fragments; import java.util.ArrayList; import java.util.List; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.app.ProgressDialog; import android.net.http.HttpResponseCache; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ListView; import com.knwedu.college.CollegeParentMainActivity; import com.knwedu.college.adapter.CollegeParentChildrenAdapter; import com.knwedu.college.adapter.CollegeParentSwapAdapter; import com.knwedu.college.utils.CollegeAppUtils; import com.knwedu.college.utils.CollegeDataStructureFramwork.ParentProfileInfo; import com.knwedu.college.utils.CollegeDataStructureFramwork.StudentProfileInfo; import com.knwedu.college.utils.CollegeJsonParser; import com.knwedu.college.utils.CollegeUrls; import com.knwedu.calcuttapublicschool.R; import com.knwedu.ourschool.utils.Constants; public class CollegeSwapChildrenFragment extends Fragment { private ListView list; private CollegeParentChildrenAdapter adapter; private View view; private ProgressDialog dialog; private ArrayList<StudentProfileInfo> studentProfiles; ParentProfileInfo userInfo; CollegeParentSwapAdapter mAdpter; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = inflater.inflate(R.layout.college_fragment_assignment_list, container, false); list = (ListView) view.findViewById(R.id.listview); loadData(); return view; } private void loadData() { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(4); nameValuePairs.add(new BasicNameValuePair("id", CollegeAppUtils .GetSharedParameter(getActivity(), "id"))); new GetAssignmentAsyntask().execute(nameValuePairs); } OnItemClickListener listener = new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>( 2); nameValuePairs.add(new BasicNameValuePair("id",CollegeAppUtils.GetSharedParameter(getActivity(), "id"))); nameValuePairs.add(new BasicNameValuePair(Constants.CHILD_ID,CollegeAppUtils.GetSharedParameter(getActivity(), Constants.CHILD_ID) )); new GetSwapAsyntask().execute(nameValuePairs); } }; @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) @SuppressLint("NewApi") @Override public void onStop() { super.onStop(); if (dialog != null) { if (dialog.isShowing()) { dialog.dismiss(); dialog = null; } } HttpResponseCache cache = HttpResponseCache.getInstalled(); if (cache != null) { cache.flush(); } } private class GetAssignmentAsyntask extends AsyncTask<List<NameValuePair>, Void, Boolean> { String error; int position; /* * public GetAssignmentAsyntask() { this.position = position; } */ @Override protected void onPreExecute() { super.onPreExecute(); dialog = new ProgressDialog(getActivity()); dialog.setTitle(getResources().getString(R.string.swap)); dialog.setMessage(getResources().getString(R.string.please_wait)); dialog.setCanceledOnTouchOutside(false); dialog.setCancelable(false); dialog.show(); } @Override protected Boolean doInBackground(List<NameValuePair>... params) { studentProfiles = new ArrayList<StudentProfileInfo>(); List<NameValuePair> nameValuePairs = params[0]; // Log parameters: Log.d("url extension", CollegeUrls.api_swap_children); String parameters = ""; for (NameValuePair nvp : nameValuePairs) { parameters += nvp.getName() + "=" + nvp.getValue() + ","; } Log.d("Parameters: ", parameters); CollegeJsonParser jParser = new CollegeJsonParser(); JSONObject json = jParser.getJSONFromUrlnew(nameValuePairs, CollegeUrls.api_swap_children); try { if (json != null) { if (json.getString("result").equalsIgnoreCase("1")) { try { JSONArray array = json.getJSONArray("data"); studentProfiles = new ArrayList<StudentProfileInfo>(); for (int i = 0; i < array.length(); i++) { StudentProfileInfo assignment = new StudentProfileInfo( array.getJSONObject(i)); CollegeAppUtils.SetSharedParameter( getActivity(),Constants.CHILD_ID, assignment.id); CollegeAppUtils.SetSharedParameter( getActivity(), "student_name1", assignment.fullname); studentProfiles.add(assignment); } } catch (Exception e) { } return true; } else { try { error = json.getString("data"); } catch (Exception e) { } return false; } } } catch (JSONException e) { } return false; } @Override protected void onPostExecute(Boolean result) { super.onPostExecute(result); if (dialog != null) { dialog.dismiss(); dialog = null; } if (result) { adapter = new CollegeParentChildrenAdapter(getActivity(), studentProfiles); list.setAdapter(mAdpter); list.setOnItemClickListener(listener); } else { } } } private class GetSwapAsyntask extends AsyncTask<List<NameValuePair>, Void, Boolean> { String error; int position; /* * public GetAssignmentAsyntask() { this.position = position; } */ @Override protected void onPreExecute() { super.onPreExecute(); dialog = new ProgressDialog(getActivity()); dialog.setTitle(getResources().getString(R.string.swap)); dialog.setMessage(getResources().getString(R.string.please_wait)); dialog.setCanceledOnTouchOutside(false); dialog.setCancelable(false); dialog.show(); } @Override protected Boolean doInBackground(List<NameValuePair>... params) { studentProfiles = new ArrayList<StudentProfileInfo>(); List<NameValuePair> nameValuePairs = params[0]; // Log parameters: Log.d("url extension", CollegeUrls.api_swap_children); String parameters = ""; for (NameValuePair nvp : nameValuePairs) { parameters += nvp.getName() + "=" + nvp.getValue() + ","; } Log.d("Parameters: ", parameters); CollegeJsonParser jParser = new CollegeJsonParser(); JSONObject json = jParser.getJSONFromUrlnew(nameValuePairs, CollegeUrls.api_swap_child); if(json!= null) { try { if (json.getString("result").equalsIgnoreCase("1")) { } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return true; } @Override protected void onPostExecute(Boolean result) { super.onPostExecute(result); if (dialog != null) { dialog.dismiss(); dialog = null; } if (result) { CollegeParentMainActivity.name.setText(CollegeAppUtils.GetSharedParameter(getActivity(), "student_name1")); } else { } } } }
[ "ritwikrai04@gmail.com" ]
ritwikrai04@gmail.com