blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
6b5cce17bfd60995c15d8c4d6a0c7e9eae30d588
0cc3358e3e8f81b854f9409d703724f0f5ea2ff7
/src/za/co/mmagon/jwebswing/plugins/jqxwidgets/themes/WebTheme.java
f7a4c83f13106bf82d8ae39c8e7643a1e2d1d748
[]
no_license
jsdelivrbot/JWebMP-CompleteFree
c229dd405fe44d6c29ab06eedaecb7a733cbb183
d5f020a19165418eb21507204743e596bee2c011
refs/heads/master
2020-04-10T15:12:35.635284
2018-12-10T01:03:58
2018-12-10T01:03:58
161,101,028
0
0
null
2018-12-10T01:45:25
2018-12-10T01:45:25
null
UTF-8
Java
false
false
1,289
java
/* * Copyright (C) 2017 Marc Magon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package za.co.mmagon.jwebswing.plugins.jqxwidgets.themes; import za.co.mmagon.jwebswing.base.references.CSSReference; import za.co.mmagon.jwebswing.htmlbuilder.css.themes.Theme; /** * Implements the UI Darkness Theme * * @since 2014/07/05 * @version 1.0 * @author MMagon * * */ public class WebTheme extends Theme { public WebTheme() { super("Web Theme", "jqxwebtheme"); getCssReferences().add(new CSSReference("JQXwebTheme", 3.91, "bower_components/jqwidgets/jqwidgets/styles/jqx.web.css", "https://jqwidgets.com/public/jqwidgets/styles/jqx.web.css")); } }
[ "ged_marc@hotmail.com" ]
ged_marc@hotmail.com
f85deeb450558c1c29bb3bd83d2863dea9292c43
6b24987216a446074a4432d8b8ecea204d4a36e1
/src/main/java/win/bigdream/service/CommentService.java
68ab232973ea05082d04c926d9b9e3af9bf65c46
[]
no_license
SeeCup/blog
90b9e3540272f356997ef188ed65bdf9bec4b1ec
36396c6931c56f0a8673b16e171debd624a9e283
refs/heads/master
2021-07-15T09:48:01.878527
2017-10-19T15:08:34
2017-10-19T15:08:34
103,800,410
1
0
null
null
null
null
UTF-8
Java
false
false
451
java
package win.bigdream.service; import java.util.List; import java.util.Map; import win.bigdream.entity.Comment; /** * 博客评论Service * @author hh * */ public interface CommentService { /** * 根据博客id和状态查询评论 * @param map * @return */ public List<Comment> list(Map<String,Object> map); /** * 添加评论 * @param comment * @return */ public int add(Comment comment); }
[ "1239252862@qq.com" ]
1239252862@qq.com
0ed4327d260f65c34ebf10a6708400d2e9229690
8f43793775526289f1b04c34bed7820a61268e37
/TestJava/src/com/test/BalancedBracket.java
4f99bda339bbdd43f962d2900f8d689c5f9b9547
[]
no_license
srini0827/GuideToChange
6d6f5cffab8334345e390ea8c0fb313c61e29375
5ae3cac52d888681825c7d04040c0f7e5bc1e8e5
refs/heads/master
2022-04-28T18:53:23.229014
2019-11-25T14:49:48
2019-11-25T14:49:48
132,557,739
0
0
null
2022-03-31T18:57:50
2018-05-08T05:21:43
Java
UTF-8
Java
false
false
58
java
package com.test; public class BalancedBracket { }
[ "sradusum@SRADUSUM-KXJ1C.cisco.com" ]
sradusum@SRADUSUM-KXJ1C.cisco.com
32b6b5e5b28df8dee7b0fb9cd080ab3d9e0bc33d
f0462b44f8ccfeda26278e62b4e7a1198d185112
/AndroidProjects/RetrofitApplication/app/src/main/java/com/example/gersonsafj/retrofitapplication/model/Repo.java
33e0c4dc3348e6b5dc3982b2ef9e6395f1d95c96
[]
no_license
GersonSales/Java
16e7c3e7c3038c74b70bb8c6e126da8b453ddda1
de444937e9afed7b32b623c105ce9d51722e58c6
refs/heads/master
2021-05-04T09:55:14.680117
2019-05-29T13:46:19
2019-05-29T13:46:19
47,032,434
0
2
null
2017-10-29T01:23:14
2015-11-28T17:16:23
Java
UTF-8
Java
false
false
621
java
package com.example.gersonsafj.retrofitapplication.model; import com.google.gson.annotations.SerializedName; /** * Created by gersonsafj on 1/15/18. */ public class Repo { @SerializedName("id") int mId; @SerializedName("name") String mName; public Repo(int mId, String mName) { this.mId = mId; this.mName = mName; } public int getmId() { return mId; } public void setmId(int mId) { this.mId = mId; } public String getmName() { return mName; } public void setmName(String mName) { this.mName = mName; } }
[ "gerson.junior@ccc.ufcg.edu.br" ]
gerson.junior@ccc.ufcg.edu.br
fde7e61db1a6347d6beb8847b2c00f6d7467600d
0d656569f26f8c21930b6e35d834609559abaf80
/stance_in_youtube/src/main/java/rawTypes/NonTextual_Content_Type.java
5d912c66844af98dfe1dfe89b163bcd66baf2494
[]
no_license
muchafel/wojatzki
253654f0108c5d1e64fce849138b07ad095db441
11fa796526d6ce2864cd96ad463d1f3aec8cf0af
refs/heads/master
2021-03-24T12:02:35.109255
2018-06-11T09:13:06
2018-06-11T09:13:06
46,419,340
1
0
null
null
null
null
UTF-8
Java
false
false
4,131
java
/* First created by JCasGen Mon Nov 07 10:49:36 CET 2016 */ package rawTypes; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.cas.impl.CASImpl; import org.apache.uima.cas.impl.FSGenerator; import org.apache.uima.cas.FeatureStructure; import org.apache.uima.cas.impl.TypeImpl; import org.apache.uima.cas.Type; import org.apache.uima.cas.impl.FeatureImpl; import org.apache.uima.cas.Feature; import org.apache.uima.jcas.tcas.Annotation_Type; /** * Updated by JCasGen Mon Nov 07 10:49:36 CET 2016 * @generated */ public class NonTextual_Content_Type extends Annotation_Type { /** @generated * @return the generator for this type */ @Override protected FSGenerator getFSGenerator() {return fsGenerator;} /** @generated */ private final FSGenerator fsGenerator = new FSGenerator() { public FeatureStructure createFS(int addr, CASImpl cas) { if (NonTextual_Content_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = NonTextual_Content_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new NonTextual_Content(addr, NonTextual_Content_Type.this); NonTextual_Content_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new NonTextual_Content(addr, NonTextual_Content_Type.this); } }; /** @generated */ @SuppressWarnings ("hiding") public final static int typeIndexID = NonTextual_Content.typeIndexID; /** @generated @modifiable */ @SuppressWarnings ("hiding") public final static boolean featOkTst = JCasRegistry.getFeatOkTst("rawTypes.NonTextual_Content"); /** @generated */ final Feature casFeat_Source; /** @generated */ final int casFeatCode_Source; /** @generated * @param addr low level Feature Structure reference * @return the feature value */ public String getSource(int addr) { if (featOkTst && casFeat_Source == null) jcas.throwFeatMissing("Source", "rawTypes.NonTextual_Content"); return ll_cas.ll_getStringValue(addr, casFeatCode_Source); } /** @generated * @param addr low level Feature Structure reference * @param v value to set */ public void setSource(int addr, String v) { if (featOkTst && casFeat_Source == null) jcas.throwFeatMissing("Source", "rawTypes.NonTextual_Content"); ll_cas.ll_setStringValue(addr, casFeatCode_Source, v);} /** @generated */ final Feature casFeat_Annotator; /** @generated */ final int casFeatCode_Annotator; /** @generated * @param addr low level Feature Structure reference * @return the feature value */ public String getAnnotator(int addr) { if (featOkTst && casFeat_Annotator == null) jcas.throwFeatMissing("Annotator", "rawTypes.NonTextual_Content"); return ll_cas.ll_getStringValue(addr, casFeatCode_Annotator); } /** @generated * @param addr low level Feature Structure reference * @param v value to set */ public void setAnnotator(int addr, String v) { if (featOkTst && casFeat_Annotator == null) jcas.throwFeatMissing("Annotator", "rawTypes.NonTextual_Content"); ll_cas.ll_setStringValue(addr, casFeatCode_Annotator, v);} /** initialize variables to correspond with Cas Type and Features * @generated * @param jcas JCas * @param casType Type */ public NonTextual_Content_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); casFeat_Source = jcas.getRequiredFeatureDE(casType, "Source", "uima.cas.String", featOkTst); casFeatCode_Source = (null == casFeat_Source) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_Source).getCode(); casFeat_Annotator = jcas.getRequiredFeatureDE(casType, "Annotator", "uima.cas.String", featOkTst); casFeatCode_Annotator = (null == casFeat_Annotator) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_Annotator).getCode(); } }
[ "michael.wojatzki@googlemail.com" ]
michael.wojatzki@googlemail.com
ef8f3f2929ff4c16a3b0cc70322b26c2f6f7f8e9
0baaf36a5b8a7cb53b100bc8fbc5983c348e8f72
/src/main/java/com/huihui/netty/util/UserStateUtil.java
7706e9f0a6bef8bbf1c1d7d8b7dbe4c5eac13418
[]
no_license
bannerhuihui/n_server
bdaa1a7949be32817b3c722d462328715ccd57dc
7d795ef1119b6374acdba344f48a53846f48cc3d
refs/heads/master
2022-06-21T20:45:22.103388
2019-09-19T08:35:19
2019-09-19T08:35:19
209,503,458
0
0
null
2022-06-17T02:30:29
2019-09-19T08:36:26
Java
UTF-8
Java
false
false
457
java
package com.huihui.netty.util; import com.huihui.netty.common.NettyCliention; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @className: UserStateUtil * @description: * @author: huihui * @createDate: 2019-09-10 * @version: 1.0 */ public class UserStateUtil { private static final Logger LOGGER = LoggerFactory.getLogger(UserStateUtil.class); public static void changeUserState(int userId,String tag,boolean flag){ } }
[ "yuanhui@huban360.com" ]
yuanhui@huban360.com
41aa4dfe7c2546654ef965622af5fa50529e1981
a711d39bb5a362de95dc176e0da6db04eee9adc0
/xo-opportunity-trader/src/main/java/com/gtc/opportunity/trader/service/scheduled/trade/management/NnOrderSoftCanceller.java
09ecd6dd4828b376004e0330f28113d1755ebed3
[ "MIT" ]
permissive
aspineon/GTC-all-repo
81e458415b0b95c4659263898f805056bc1226db
e4ca91147a9bffd7f5820da413507f532f179085
refs/heads/master
2022-04-07T09:52:40.367277
2020-01-19T09:47:23
2020-01-19T09:47:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,426
java
package com.gtc.opportunity.trader.service.scheduled.trade.management; import com.gtc.model.gateway.command.manage.CancelOrderCommand; import com.gtc.opportunity.trader.domain.*; import com.gtc.opportunity.trader.repository.SoftCancelConfigRepository; import com.gtc.opportunity.trader.service.CurrentTimestamp; import com.gtc.opportunity.trader.service.TradeCreationService; import com.gtc.opportunity.trader.service.command.gateway.WsGatewayCommander; import com.gtc.opportunity.trader.service.dto.TradeDto; import com.gtc.opportunity.trader.service.xoopportunity.creation.ConfigCache; import com.gtc.opportunity.trader.service.xoopportunity.creation.fastexception.RejectionException; import com.newrelic.api.agent.Trace; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.statemachine.StateMachine; import org.springframework.statemachine.service.StateMachineService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; /** * Created by Valentyn Berezin on 03.09.18. */ @Slf4j @Service @RequiredArgsConstructor public class NnOrderSoftCanceller { private final WsGatewayCommander commander; private final CurrentTimestamp dbTime; private final SoftCancelConfigRepository softCancelConfig; private final StateMachineService<TradeStatus, TradeEvent> tradeMachines; private final OldOrderFinder finder; private final TradeCreationService tradesService; private final ConfigCache cache; private final NnOrderCancelPriceFinder cancelPriceFinder; @Trace(dispatcher = true) @Transactional(readOnly = true) @Scheduled(fixedDelayString = "#{${app.schedule.order.cancellerS} * 1000}") public void softCancel() { LocalDateTime now = dbTime.dbNow(); Map<OldOrderFinder.Key, SoftCancelConfig> byClient = getActiveConfigs(); finder.expiredSlave( now, byClient.entrySet().stream().collect( Collectors.toMap(Map.Entry::getKey, it -> it.getValue().getWaitM()) ) ).forEach(it -> cancelAndReplaceOrderIfPossible(byClient, it)); } private void cancelAndReplaceOrderIfPossible(Map<OldOrderFinder.Key, SoftCancelConfig> cancels, Trade trade) { Optional<ClientConfig> config = cache.getClientCfg( trade.getClient().getName(), trade.getCurrencyFrom(), trade.getCurrencyTo()); SoftCancelConfig cancelCfg = cancels.get( new OldOrderFinder.Key(trade.getClient().getName(), trade.getCurrencyFrom(), trade.getCurrencyTo()) ); if (null == cancelCfg || !config.isPresent()) { return; } log.info("Attempting to soft-cancel order {}", trade.getId()); BigDecimal lossPrice = cancelPriceFinder.findSuitableLossPrice(cancelCfg, trade); if (null == lossPrice) { return; } TradeDto softCancel = createSoftCancelTrade(config.get(), lossPrice, trade); if (null == softCancel) { return; } StateMachine<TradeStatus, TradeEvent> machine = tradeMachines.acquireStateMachine(trade.getId()); machine.sendEvent(TradeEvent.SOFT_CANCELLED); tradeMachines.releaseStateMachine(machine.getId()); log.info("Cancelling order {} and replacing it", trade.getId()); commander.cancel(new CancelOrderCommand( trade.getClient().getName(), trade.getId(), trade.getAssignedId() )); log.info("Pushing soft-cancel order {}", softCancel.getCommand()); commander.createOrder(softCancel.getCommand()); // TODO: acknowledge top-order machine that it is done in soft-cancel mode, consider transaction nesting } private TradeDto createSoftCancelTrade(ClientConfig config, BigDecimal price, Trade trade) { try { TradeDto cancel = tradesService.createTradeNoSideValidation( trade.getDependsOn(), config, price, trade.getAmount().abs(), // caution here - we can't use opening amount trade.isSell(), true ); StateMachine<TradeStatus, TradeEvent> machine = tradeMachines .acquireStateMachine(cancel.getTrade().getId()); machine.sendEvent(TradeEvent.DEPENDENCY_DONE); tradeMachines.releaseStateMachine(machine.getId()); return cancel; } catch (RejectionException ex) { log.warn("Soft-cancel trade could not be created, aborting", ex); return null; } } private Map<OldOrderFinder.Key, SoftCancelConfig> getActiveConfigs() { return softCancelConfig.findAllActive().stream() .collect(Collectors.toMap( it -> new OldOrderFinder.Key( it.getClientCfg().getClient().getName(), it.getClientCfg().getCurrency(), it.getClientCfg().getCurrencyTo()), it -> it) ); } }
[ "valentyn.berezin@aurea.com" ]
valentyn.berezin@aurea.com
945eeb2bb5c20e9c879a6fa106b1a19b75d85a3c
731a6b8adb265fccc6abe8e18eae5823409c77eb
/src/main/java/mcp/mobius/betterbarrels/common/blocks/logic/OreDictPair.java
927f0df3d0978129e88aa1687c7dccab354621fe
[]
no_license
DragonsLover/Jabba-1.7.10
fd66cc3c0d289f24558502e581a5cb758c49a0ac
b08e034bec69550e6eac3deb176ba90b4d1bb3d2
refs/heads/master
2021-01-18T06:59:27.623388
2015-05-03T04:51:12
2015-05-03T04:51:12
34,974,113
0
0
null
2015-05-03T04:50:32
2015-05-03T04:50:32
null
UTF-8
Java
false
false
516
java
package mcp.mobius.betterbarrels.common.blocks.logic; public final class OreDictPair { public final ItemImmut itemA; public final ItemImmut itemB; public OreDictPair(ItemImmut itemA, ItemImmut itemB){ this.itemA = itemA; this.itemB = itemB; } @Override public boolean equals(Object o) { OreDictPair c = (OreDictPair)o; return (this.itemA.equals(c.itemA) && this.itemB.equals(c.itemB)); } @Override public int hashCode() { return this.itemA.hashCode() + this.itemB.hashCode() * 877; } }
[ "techokami@holenet.info" ]
techokami@holenet.info
0e58fb922daffab1192273e8b5b58e8313e7866f
b8b5ff83bf34169f3e7c75dab3573de2bfa06a12
/app/src/main/java/cn/zsmy/akm/service/NoticeBroadCastReceive.java
99848580e209bd655508289ae78a1aff606b1c86
[]
no_license
wanjingyan001/akm
c889963f2c5772db8368039f095815ca7b954750
7d84ccc61c98ae804806fad7445a11558d96c240
refs/heads/master
2021-01-10T01:37:57.911792
2016-03-26T03:07:57
2016-03-26T03:07:57
54,759,913
0
1
null
null
null
null
UTF-8
Java
false
false
1,617
java
package cn.zsmy.akm.service; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import cn.zsmy.akm.chat.receiver.MyPushMessageReceiver; import cn.zsmy.akm.utils.Constants; /** * 广播接收者,用于用户消息接收控制 * Created by Administrator on 2016/2/22. */ public class NoticeBroadCastReceive extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { // TODO: This method is called when the BroadcastReceiver is receiving // an Intent broadcast. String type = intent.getStringExtra("TYPE"); switch (type) { case Constants.CLOSE_REPLY_NOTICE: //不接受回复消息 MyPushMessageReceiver.isReceiveReplyMSG = false; break; case Constants.OPEN_REPLY_NOTICE: MyPushMessageReceiver.isReceiveReplyMSG = true; break; case Constants.CLOSE_ADVISORY_NOTICE: //不接受资讯消息 MyPushMessageReceiver.isReceiveAdvisoryMSG = false; break; case Constants.OPEN_ADVISORY_NOTICE: MyPushMessageReceiver.isReceiveAdvisoryMSG = true; break; case Constants.CLOSE_SPREAD_NOTICE: //不接受推广消息 MyPushMessageReceiver.isReceiveSpreadMSG = false; break; case Constants.OPEN_SPREAD_NOTICE: MyPushMessageReceiver.isReceiveSpreadMSG = true; break; } } }
[ "670263921@qq.com" ]
670263921@qq.com
8d7f0cc3f366ef39d4817a9022fd4b6f91d2ef3e
af3e95bf6491bcd8547570d5c9cabb2a2cab0e77
/app/src/test/java/override.java
51d808f4c1ab2ce3771fdb4080ec324191ed1171
[]
no_license
Panditsatish/javaProgramms
f5ca00010b0340ad9b944dc0ca975cc851168d21
aebd1a53591a6c268af7073bf6592e23e89d9c39
refs/heads/main
2023-07-01T00:13:05.504903
2021-07-15T09:07:05
2021-07-15T09:07:05
378,216,184
0
0
null
2021-06-24T05:48:52
2021-06-18T17:02:33
null
UTF-8
Java
false
false
751
java
public class override { int override(int a, int b) { System.out.println("sum of int a&b="+(a+b)); return (a + b); } int override(int a, int b, int c) { System.out.println("sum of int a,b&c="+(a+c+b)); return (a + b + c); } long override(int a, long b) { long c = a + b; System.out.println("sum of long ="+c); return (c); } double override(double a, double b) { System.out.println("sum of double ="+(a+b)); return (a + b); } public static void main(String [] args){ override sc=new override(); sc.override(12,85); sc.override(1222,528546); sc.override(12,52,369); sc.override(15.5,58855.63); } }
[ "satis.tiwari@mobcoder.com" ]
satis.tiwari@mobcoder.com
a70bd77ca72a1ed164fe891ad3309555415ea0d0
0700935171cd90b1d59d0e377f83f33efe86b1c6
/panchkula/src/panchkula/csquestion.java
4c5caa61ab60c1a76aabbd15bebaa248081c7a7c
[]
no_license
sonalbansal16/City-Directory
fb2d02bb53827021c69cfd4198b7c3ffd72d1a3d
fb0db22d26e24f0c778352dc9cb7f3584b0bfdcb
refs/heads/master
2020-03-29T07:47:21.601546
2018-10-14T14:13:19
2018-10-14T14:13:19
149,670,973
0
0
null
null
null
null
UTF-8
Java
false
false
593
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package panchkula; /** * * @author Aarzoo */ public class csquestion { public csquestion() { } @Override public String toString() { return qname; } int qid; String qname; public int getQid() { return qid; } public void setQid(int qid) { this.qid = qid; } public String getQname() { return qname; } public void setQname(String qname) { this.qname = qname; } }
[ "sonalbansal1670@gmail.com" ]
sonalbansal1670@gmail.com
169e1d57b265c0926e884f59e072bb0fa8812c71
31c0feac11f6a2735d7332586162ed8766f706e8
/leyou/ly-auth/ly-auth-service/src/main/java/com/leyou/auth/client/UserClient.java
38c0cdab24594a8a7c3c09508f71d12c5b925175
[]
no_license
HYOnTheWay/leyoushangchang
0b6b5a3b97cb9cf79245c58959647e5c8673ec30
10050351a1e33143fa251fcbef8d5e656d1b4962
refs/heads/master
2022-12-21T12:49:20.117441
2019-09-05T07:49:31
2019-09-05T07:49:31
205,528,840
0
0
null
2022-12-16T00:45:54
2019-08-31T10:17:29
JavaScript
UTF-8
Java
false
false
206
java
package com.leyou.auth.client; import com.leyou.user.pojo.api.UserApi; import org.springframework.cloud.openfeign.FeignClient; @FeignClient("user-service") public interface UserClient extends UserApi { }
[ "15129277457@163.com" ]
15129277457@163.com
4631ea6877675578dd7aacd0517f535d79df1929
4601f43a8afe07ae9fae70b85134b8f8609d13db
/src/test/java/io/github/jhipster/application/config/timezone/HibernateTimeZoneIT.java
110ffbc2ff5df28615afb0d00e4b045261b312e5
[]
no_license
sixsigmapymes/A08
4e5cea4150f0eb497ee997bdb612bf4ebde0cfa6
8da53f82f5a2671cc76b427a273ce3a2c737fb6c
refs/heads/master
2022-12-23T14:34:52.515214
2019-07-10T23:10:17
2019-07-10T23:10:17
196,264,723
0
0
null
2022-12-16T05:01:54
2019-07-10T19:36:15
Java
UTF-8
Java
false
false
6,910
java
package io.github.jhipster.application.config.timezone; import io.github.jhipster.application.A08PrototypeApp; import io.github.jhipster.application.repository.timezone.DateTimeWrapper; import io.github.jhipster.application.repository.timezone.DateTimeWrapperRepository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.support.rowset.SqlRowSet; import org.springframework.transaction.annotation.Transactional; import java.time.*; import java.time.format.DateTimeFormatter; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; /** * Integration tests for the UTC Hibernate configuration. */ @SpringBootTest(classes = A08PrototypeApp.class) public class HibernateTimeZoneIT { @Autowired private DateTimeWrapperRepository dateTimeWrapperRepository; @Autowired private JdbcTemplate jdbcTemplate; private DateTimeWrapper dateTimeWrapper; private DateTimeFormatter dateTimeFormatter; private DateTimeFormatter timeFormatter; private DateTimeFormatter dateFormatter; @BeforeEach public void setup() { dateTimeWrapper = new DateTimeWrapper(); dateTimeWrapper.setInstant(Instant.parse("2014-11-12T05:50:00.0Z")); dateTimeWrapper.setLocalDateTime(LocalDateTime.parse("2014-11-12T07:50:00.0")); dateTimeWrapper.setOffsetDateTime(OffsetDateTime.parse("2011-12-14T08:30:00.0Z")); dateTimeWrapper.setZonedDateTime(ZonedDateTime.parse("2011-12-14T08:30:00.0Z")); dateTimeWrapper.setLocalTime(LocalTime.parse("14:30:00")); dateTimeWrapper.setOffsetTime(OffsetTime.parse("14:30:00+02:00")); dateTimeWrapper.setLocalDate(LocalDate.parse("2016-09-10")); dateTimeFormatter = DateTimeFormatter .ofPattern("yyyy-MM-dd HH:mm:ss.S") .withZone(ZoneId.of("UTC")); timeFormatter = DateTimeFormatter .ofPattern("HH:mm:ss") .withZone(ZoneId.of("UTC")); dateFormatter = DateTimeFormatter .ofPattern("yyyy-MM-dd"); } @Test @Transactional public void storeInstantWithUtcConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("instant", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeFormatter.format(dateTimeWrapper.getInstant()); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeLocalDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("local_date_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getLocalDateTime() .atZone(ZoneId.systemDefault()) .format(dateTimeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeOffsetDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("offset_date_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getOffsetDateTime() .format(dateTimeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeZoneDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("zoned_date_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getZonedDateTime() .format(dateTimeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeLocalTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("local_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getLocalTime() .atDate(LocalDate.of(1970, Month.JANUARY, 1)) .atZone(ZoneId.systemDefault()) .format(timeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeOffsetTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("offset_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getOffsetTime() .toLocalTime() .atDate(LocalDate.of(1970, Month.JANUARY, 1)) .atZone(ZoneId.systemDefault()) .format(timeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeLocalDateWithUtcConfigShouldBeStoredWithoutTransformation() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("local_date", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getLocalDate() .format(dateFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } private String generateSqlRequest(String fieldName, long id) { return format("SELECT %s FROM jhi_date_time_wrapper where id=%d", fieldName, id); } private void assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(SqlRowSet sqlRowSet, String expectedValue) { while (sqlRowSet.next()) { String dbValue = sqlRowSet.getString(1); assertThat(dbValue).isNotNull(); assertThat(dbValue).isEqualTo(expectedValue); } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
34e3020a24c109f174a2ae2714babdab87619472
be7e427b646464f0bf8f0b5f11dd3cedf39df313
/src/test/java/com/jk/study/pattern/regex/RegexPattern.java
ad9eb32cdbaad874a8d7abd24984aa2623dccc42
[]
no_license
JUNGQUI/patternStudy
11046044a7d69771e1ea31986dc1279ff9c4c751
dea9d450c3394cdcbfa7155681fc46ccfe71abaa
refs/heads/main
2023-04-02T23:01:13.597113
2021-04-07T10:48:40
2021-04-07T10:48:40
325,679,723
0
0
null
2021-04-07T10:48:41
2020-12-31T00:54:28
Java
UTF-8
Java
false
false
1,135
java
package com.jk.study.pattern.regex; import java.util.regex.Pattern; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest public class RegexPattern { @Test void regexPattern() { Pattern specialRegex = Pattern.compile("[!@#$%^&*(),.?\":{}|<>]"); Pattern numberRegex = Pattern.compile("[0-9]"); Pattern alphabetRegex = Pattern.compile("[a-zA-Z]"); Assertions.assertTrue(specialRegex.matcher("이건 통과!").find()); Assertions.assertFalse(specialRegex.matcher("이건 불통").find()); Assertions.assertFalse(alphabetRegex.matcher("이건 불통").find()); Assertions.assertTrue(alphabetRegex.matcher("passed").find()); Assertions.assertTrue(alphabetRegex.matcher("but, 이건 통과").find()); Assertions.assertFalse(numberRegex.matcher("not passed").find()); Assertions.assertTrue(numberRegex.matcher("pass, because of 1").find()); } @Test void containsTest() { String object = "development"; String containsObject = "[development]"; Assertions.assertTrue(containsObject.contains(object)); } }
[ "ljk2518@gmail.com" ]
ljk2518@gmail.com
f7dd808d9814aaf0e37bfff8591d98f9e8b9a15c
ad13c53de8146c377ed78e943539ec8fe67605e9
/src/main/java/com/intelliswift/store/OnlineRetailStoreApplication.java
4554f0cc4ed3f1639c17ead8dd511cffbaee1d90
[]
no_license
anurodhpakhale777/online-store
9bbdde16c03fce34a09a79b3fb97666e8b403fce
1eed0173b9519a1e9106b7bcf6dd1289fc6d75ef
refs/heads/master
2022-07-12T11:30:06.371469
2019-12-20T12:56:04
2019-12-20T12:56:04
229,261,363
0
0
null
2022-06-21T02:29:28
2019-12-20T12:31:15
Java
UTF-8
Java
false
false
337
java
package com.intelliswift.store; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class OnlineRetailStoreApplication { public static void main(String[] args) { SpringApplication.run(OnlineRetailStoreApplication.class, args); } }
[ "anurodhpakhale777@gmail.com" ]
anurodhpakhale777@gmail.com
5799440a55bc8319dfdd966a3391abe71971f831
d568f69aefeca9424bf5acb831457aada4ceff72
/Code/src/sample/logicalPack/logicFiz_0to3.java
3225322c4dfc070ccd704b1779113283c2e71519
[]
no_license
GavrilukVladislav350504/CalculatorOfCustomDues
c60eab797c930893446164f80326d4fc95c56a7f
eb85b4b612cbe67efe0505bc56fd5b914d459bc3
refs/heads/master
2021-01-10T17:24:21.329669
2015-12-08T12:56:22
2015-12-08T12:56:22
44,244,188
0
0
null
null
null
null
WINDOWS-1251
Java
false
false
1,489
java
package sample.logicalPack; /** * Created by Влад on 29.10.2015. */ public class logicFiz_0to3 implements logicAbstaract { @Override public double logic(double costAuto, double valueAuto) { double costAutoResult = 0; if (costAuto <= 8500) { costAutoResult = costAuto*0.54; if (costAutoResult < valueAuto*2.5) costAutoResult = valueAuto*2.5; } if (costAuto > 8500&&costAuto <=16700) { costAutoResult = costAuto*0.48; if (costAutoResult < valueAuto*3.5) costAutoResult = valueAuto*3.5; } if (costAuto > 16700&&costAuto <=42300) { costAutoResult = costAuto*0.48; if (costAutoResult < valueAuto*5.5) costAutoResult = valueAuto*5.5; } if (costAuto > 42300&&costAuto <=84600) { costAutoResult = costAuto*0.48; if (costAutoResult < valueAuto*7.5) costAutoResult = valueAuto*7.5; } if (costAuto > 84600&&costAuto <=165000) { costAutoResult = costAuto*0.48; if (costAutoResult < valueAuto*15) costAutoResult = valueAuto*15; } if (costAuto > 165000) { costAutoResult = costAuto*0.48; if (costAutoResult < valueAuto*20) costAutoResult = valueAuto*20; } return costAutoResult; } }
[ "gavriluki@tut.by" ]
gavriluki@tut.by
d8718cc84cd5a0bc53faa4a7c9efa1c4513f7489
f900799080a258c0a34e42c67f32bafcd811c5d2
/core/src/com/zenithlabs/shapeescape/objects/SemiCircleShape.java
9391ba72de983eb603221f86245d475d68516759
[]
no_license
bamdur/ShapeEscape
527d1f3b1fcdfdcc0c913043ff5afad57c39746c
1408214f3ef271ab7eb270cc0b67c79e907b407b
refs/heads/master
2021-06-21T11:09:34.563737
2017-08-09T19:21:29
2017-08-09T19:21:29
96,543,676
1
0
null
null
null
null
UTF-8
Java
false
false
79
java
package com.zenithlabs.shapeescape.objects; public class SemiCircleShape { }
[ "bamdur123@gmail.com" ]
bamdur123@gmail.com
0590ec38a292a41f9ce0b86cc471529a34546211
a1fc65983077730f7403e4cafc24eb264b7697c2
/app/src/main/java/com/e/myapplication/MainActivity.java
0fad2260cbbbdbe2902ad35df5722ba961ba7aae
[]
no_license
ACselvan/newapp
e04565b11a491f16a87fd3042bce655366747057
8913be76c348e4a48de296f5881a6d6ee5b03047
refs/heads/master
2022-10-07T08:25:01.402580
2020-06-05T14:11:04
2020-06-05T14:11:04
271,701,242
0
0
null
null
null
null
UTF-8
Java
false
false
681
java
package com.e.myapplication; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class MainActivity extends AppCompatActivity { Button button; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button=findViewById(R.id.button); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i=new Intent(MainActivity.this,Main2Activity.class); startActivity(i); } });} }
[ "lbalav23@gmail.com" ]
lbalav23@gmail.com
7f97fbe6fc920725824a6617778248663f6471f5
cef1d9e6a59e64b10e4fe0c7920cb793a53e1e30
/Watson2012/src/girlsofsteel/commands/SetPointTurret.java
3b2b845262ed8fc2026807b87f8deaf4728c884f
[]
no_license
GirlsOfSteelRobotics/2014GirlsOfSteel
d0b0ccd3572680282a3cdb5fc5b37a9e6a7da505
91497b52b01504c5cc559e6f943d9cedaf6b178f
refs/heads/master
2021-01-10T17:43:32.183131
2015-12-21T22:06:11
2015-12-21T22:06:11
48,392,056
0
0
null
null
null
null
UTF-8
Java
false
false
638
java
package girlsofsteel.commands; public class SetPointTurret extends CommandBase { double knobValue; public SetPointTurret() { requires(turret); } protected void initialize() { turret.initEncoder(); turret.enablePID(); } protected void execute() { knobValue = oi.getTurretKnobValue(turret.TURRET_OVERRIDE_DEADZONE); turret.setPIDSetPoint(turret.getEncoderDistance() + knobValue); } protected boolean isFinished() { return false; } protected void end() { turret.stopJag(); } protected void interrupted() { end(); } }
[ "joseph.l.jackson@gmail.com" ]
joseph.l.jackson@gmail.com
d6785ae768886c19b587f7e6d7b9848048c6ed22
128838591f528e90bd18c99981395ec489c0a0c8
/src/main/java/duantn/backend/dao/CustomStaffArticleRepository.java
7f7698614aca775dba970de79cd6c9e6f6310df8
[]
no_license
thanhbinhgtv/Java-SpringBoot-Backend-DuAnTN
7aaba32f5e4fc907967d1f7cf360eb0d58dfdcf7
70f331c084ce39c01e0a31cc28ee2beb73c8cb50
refs/heads/master
2023-06-23T15:28:01.698608
2021-06-30T12:30:38
2021-06-30T12:30:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
442
java
package duantn.backend.dao; import duantn.backend.model.entity.StaffArticle; import java.util.Date; import java.util.List; /** * Created with YourComputer. * User: DUC_PRO * Date: 28/04/2021 * Time: 12:38 CH */ public interface CustomStaffArticleRepository { List<StaffArticle> listStaffArticle(Date start, Date end, String search, Integer page, Integer limit); Long countStaffArticle(Date start, Date end, String search); }
[ "duc761230" ]
duc761230
bfb8ebca036432a708a264133132c9984a279966
e423b38d047c8e80c76d05645d0238bff47c25e0
/src/test/java/com/example/casperson/tdddemo/service/PersonServiceTest.java
69438593f4da016a7d3c510360791c5e2ffac407
[]
no_license
cloudtraining/tdd-demo
dbe84f53a40518a21f48a7d9ff9347cdb3d95489
c5eee821edd287b67e1ac2485636138353c01eac
refs/heads/master
2020-03-28T13:17:34.935350
2018-11-06T11:51:43
2018-11-06T11:51:43
148,380,633
1
0
null
null
null
null
UTF-8
Java
false
false
1,283
java
package com.example.casperson.tdddemo.service; import static org.junit.Assert.assertNotNull; import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.List; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import com.example.casperson.tdddemo.model.Person; import com.example.casperson.tdddemo.repository.PersonRepository; @RunWith(MockitoJUnitRunner.class) public class PersonServiceTest { @InjectMocks PersonService personService; @Mock PersonRepository repo; List<Person> persons; @Before public void buildPerson() { persons = new ArrayList<Person>(); persons.add(createPerson("brad", "vandermoon")); persons.add(createPerson("bill", "vandermoon")); persons.add(createPerson("silly", "vandermoon")); } @Test public void findAllByLastName() { when(repo.findAllByLastName("vandermoon")).thenReturn(persons); List<Person> personsFound = personService.findAllByLastName("vandermoon"); assertNotNull(personsFound); } private Person createPerson(String first, String last) { Person person = new Person(); person.setFirstName(first); person.setLastName(last); return person; } }
[ "blv.moon@gmail.com" ]
blv.moon@gmail.com
0a2cc800fbd34e80737049cca45e583d1e066d3d
d7d6082654a6e06a9a55f9e7f7f51aa22526b648
/source/sourceforge/commons/org/artistar/tahoe/config/instance/AT021ATDescriptor.java
94908424312146875f53bc31d5aedfafeb4102d6
[]
no_license
BackupTheBerlios/tahoe
addbff09c1d94ea431b819ac2dd00fe2cd405789
49d4fb89a98fcd64aea27c4c08ee8d70d08fd110
refs/heads/master
2020-12-24T17:44:20.587679
2003-11-11T08:15:57
2003-11-11T08:15:57
39,962,567
0
0
null
null
null
null
UTF-8
Java
false
false
5,206
java
/* * This class was automatically generated with * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML * Schema. * $Id: AT021ATDescriptor.java,v 1.1 2003/11/11 08:19:57 fourfive Exp $ */ package org.artistar.tahoe.config.instance; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.mapping.AccessMode; import org.exolab.castor.xml.TypeValidator; import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class AT021ATDescriptor. * * @version $Revision: 1.1 $ $Date: 2003/11/11 08:19:57 $ */ public class AT021ATDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * Field nsPrefix */ private java.lang.String nsPrefix; /** * Field nsURI */ private java.lang.String nsURI; /** * Field xmlName */ private java.lang.String xmlName; /** * Field identity */ private org.exolab.castor.xml.XMLFieldDescriptor identity; //----------------/ //- Constructors -/ //----------------/ public AT021ATDescriptor() { super(); nsURI = "http://www.evologic.com.uk/evologic/evoinstance"; xmlName = "AT021AT"; org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; org.exolab.castor.xml.XMLFieldHandler handler = null; org.exolab.castor.xml.FieldValidator fieldValidator = null; //-- initialize attribute descriptors //-- _value desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); desc.setImmutable(true); handler = (new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { AT021AT target = (AT021AT) object; return target.getValue(); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { AT021AT target = (AT021AT) object; target.setValue( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } public java.lang.Object newInstance( java.lang.Object parent ) { return null; } } ); desc.setHandler(handler); desc.setRequired(true); addFieldDescriptor(desc); //-- validation code for: _value fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); { //-- local scope StringValidator typeValidator = new StringValidator(); typeValidator.setWhiteSpace("preserve"); fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- initialize element descriptors } //-- org.artistar.tahoe.config.instance.AT021ATDescriptor() //-----------/ //- Methods -/ //-----------/ /** * Method getAccessMode */ public org.exolab.castor.mapping.AccessMode getAccessMode() { return null; } //-- org.exolab.castor.mapping.AccessMode getAccessMode() /** * Method getExtends */ public org.exolab.castor.mapping.ClassDescriptor getExtends() { return null; } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() /** * Method getIdentity */ public org.exolab.castor.mapping.FieldDescriptor getIdentity() { return identity; } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() /** * Method getJavaClass */ public java.lang.Class getJavaClass() { return org.artistar.tahoe.config.instance.AT021AT.class; } //-- java.lang.Class getJavaClass() /** * Method getNameSpacePrefix */ public java.lang.String getNameSpacePrefix() { return nsPrefix; } //-- java.lang.String getNameSpacePrefix() /** * Method getNameSpaceURI */ public java.lang.String getNameSpaceURI() { return nsURI; } //-- java.lang.String getNameSpaceURI() /** * Method getValidator */ public org.exolab.castor.xml.TypeValidator getValidator() { return this; } //-- org.exolab.castor.xml.TypeValidator getValidator() /** * Method getXMLName */ public java.lang.String getXMLName() { return xmlName; } //-- java.lang.String getXMLName() }
[ "fourfive" ]
fourfive
5f750008c3be986a2ee4d269f72dfff047443bb6
186f242af7bc9ea2b5325fc96aaa152517ae4fe5
/Naveen001/src/test/java/pages/ZooplaRequiredAgentPage.java
ce28782c9d257df91148d6c70c0a1a5234d2690e
[]
no_license
MallikarjunTester/NaveenAutomationLabAssignment
d7ed6c618a3a6ab29d4fce1a634fb8ee5f8c13c3
b83ab4233e8418b1911da7bacadda9716291acff
refs/heads/master
2020-05-05T07:47:26.243471
2019-04-06T14:03:51
2019-04-06T14:03:51
179,838,142
0
0
null
null
null
null
UTF-8
Java
false
false
786
java
package pages; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import naveenautomationLabs.assessment1.BaseClass; import naveenautomationLabs.assessment1.WrapperMethods; public class ZooplaRequiredAgentPage extends WrapperMethods{ @FindBy(xpath="//h1[@class='bottom-half']/b[1]") WebElement agentName_InDetails; public ZooplaRequiredAgentPage(WebDriver driver){ this.driver = driver; //This initElements method will create all WebElements PageFactory.initElements(driver, this); } public String getAgentNameInRequiredPage() { return getText(agentName_InDetails); } }
[ "Abcd@ABC" ]
Abcd@ABC
d91f0fb3033e65297a6f5a72509f685081831bd2
7e29706676b084c041a78f22d98bf2f2916f8695
/IdCardReconition-master/app/src/main/java/com/hezd/example/camera/activity/MainActivity.java
b8df85dedd66b34a47aebc0524671264b1bbf4e6
[]
no_license
2381447237/idCardDemo
9ae4c8fd9c96b8a8c725919e8c5f1a21cac931b5
0c33acdaef1b949b224e49c95d97a01087ef6375
refs/heads/master
2021-07-06T14:18:10.193124
2017-10-03T01:43:18
2017-10-03T01:43:18
105,604,186
3
1
null
null
null
null
UTF-8
Java
false
false
7,609
java
package com.hezd.example.camera.activity; import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.BitmapRegionDecoder; import android.graphics.Matrix; import android.graphics.Rect; import android.hardware.Camera; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.Toast; import com.hezd.example.camera.R; import com.hezd.example.camera.view.CameraSurfaceView; import com.ym.idcard.reg.bean.IDCard; import com.ym.idcard.reg.engine.OcrEngine; import java.io.ByteArrayOutputStream; import java.io.IOException; public class MainActivity extends AppCompatActivity implements View.OnClickListener { private static final String TAG = MainActivity.class.getSimpleName(); private RelativeLayout mScanRl; private Button mTakePicBtn; private Camera mCameraInstance; private View mScanV; // 扫描区域属性 private int mScaLeft; private int mScanTop; private int mScanRight; private int mScanBottom; private int mScanWidth; private int mScanHeight; private ImageView mPicIv; private FrameLayout mSurfaceContainerFl; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getViews(); setViews(); setListeners(); } private void getViews() { mSurfaceContainerFl = (FrameLayout) findViewById(R.id.fl_surfaceview_container); mPicIv = (ImageView) findViewById(R.id.iv_pic); mScanRl = (RelativeLayout) findViewById(R.id.rl_scan); mScanV = findViewById(R.id.v_scan); mTakePicBtn = (Button) findViewById(R.id.btn_take_pic); mCameraInstance = getCameraInstance(); CameraSurfaceView mSurfaceView = new CameraSurfaceView(this, mCameraInstance); mSurfaceContainerFl.addView(mSurfaceView); } private Camera getCameraInstance() { if(!getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) { showMessage("this device has no camera!"); return null; } Camera camera = null; try { camera = Camera.open(); } catch (Exception e) { e.printStackTrace(); } return camera; } private void showMessage(String s) { Toast.makeText(this,s,Toast.LENGTH_SHORT).show(); } private void setViews() { mScanV.post(new Runnable() { @Override public void run() { mScaLeft = mScanV.getLeft(); mScanTop = mScanV.getTop(); mScanRight = mScanV.getRight(); mScanBottom = mScanV.getBottom(); mScanWidth = mScanV.getWidth(); mScanHeight = mScanV.getHeight(); Log.d(TAG,"getleft value:"+mScaLeft); Log.d(TAG,"gettop value:"+mScanTop); Log.d(TAG,"getright value:"+mScanRight); Log.d(TAG,"getbottom value:"+mScanBottom); Log.d(TAG,"getwidth value:"+mScanWidth); Log.d(TAG,"getheight value:"+ mScanHeight); } }); } private void setListeners() { mTakePicBtn.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.btn_take_pic: /**拍照并识别身份证,还有一种方式是previewcallback方式,周期性获取某一帧图片解析 * 判断是否解析成功的方法是判断身份证是否包含wrong number字符串,因为解析身份证错误时 * 会包含这个字符串 * */ takePic(); break; } } private void takePic() { mCameraInstance.takePicture(null, null, new Camera.PictureCallback() { @Override public void onPictureTaken(byte[] data, Camera camera) { // Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length); /** * 图片截取的原理,我们预览surfaceview是全屏的,扫描区域是屏幕中的一部分.所以最终 * 需要截取图片,但是有一些需要注意的问题。 * 因为拍照图片尺寸跟扫描框父窗体尺寸是不一样的 * 要先缩放照片尺寸与扫描框父窗体一样在进行裁剪 * 另外还有一个问题,一定要设置预览分辨率否则拍摄照片是变形的。 * 预览的坐标是横屏的xy轴坐标,所以如果是竖屏对图片处理时需要先做旋转操作 * 分辨率设置方法是获取设备支持的预览分辨率利用最小差值法获取最优分辨率并设置 * 还有一种解决办法有人说是是设置拍照图片分辨率和预览分辨率,我没有尝试。 * */ BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeByteArray(data,0,data.length,options); options.inJustDecodeBounds = false; try { int outWidth = options.outWidth; int outHeight = options.outHeight; int count = outHeight+outWidth; int bitmapW = outWidth<outHeight?outWidth:outHeight; int bitmapH = count-bitmapW; float difW = (float)mSurfaceContainerFl.getWidth()/bitmapW; float difH = (float)mSurfaceContainerFl.getHeight()/bitmapH; Matrix matrix = new Matrix(); matrix.postRotate(90); matrix.postScale(difW,difH); Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length); Bitmap scaleBitmap = Bitmap.createBitmap(bitmap,0,0,bitmap.getWidth(),bitmap.getHeight(),matrix,true); // 图片截取两种方式,createbitmap或者bitmapRegionDecoder ByteArrayOutputStream bos = new ByteArrayOutputStream(); scaleBitmap.compress(Bitmap.CompressFormat.JPEG,100,bos); Rect rect = new Rect(mScaLeft,mScanTop,mScanRight,mScanBottom); byte[] bitmapBytes = bos.toByteArray(); BitmapRegionDecoder decoder = BitmapRegionDecoder.newInstance(bitmapBytes,0,bitmapBytes.length,false); Bitmap cropBtimap = decoder.decodeRegion(rect, options); ByteArrayOutputStream cropStream = new ByteArrayOutputStream(); cropBtimap.compress(Bitmap.CompressFormat.JPEG,100,cropStream); /*身份证扫描核心代码*/ OcrEngine ocrEngine = new OcrEngine(); IDCard idCard = ocrEngine.recognize(MainActivity.this, 2, cropStream.toByteArray(), null); Log.d("hezd","idcard info:"+idCard.toString()); mPicIv.setImageBitmap(cropBtimap); } catch (IOException e) { e.printStackTrace(); } // mCameraInstance.startPreview(); } }); } }
[ "2381447237@qq.com" ]
2381447237@qq.com
232e032f4b0aa79a8541ec7b4fbf8882f40011df
46a62c499faaa64fe3cce2356c8b229e9c4c9c49
/taobao-sdk-java-standard/taobao-sdk-java-online_standard-20120923-source/com/taobao/api/domain/WlbItemBatchInventory.java
6d01f728c855673f365ed128ffff73dd85afd2d4
[]
no_license
xjwangliang/learning-python
4ed40ff741051b28774585ef476ed59963eee579
da74bd7e466cd67565416b28429ed4c42e6a298f
refs/heads/master
2021-01-01T15:41:22.572679
2015-04-27T14:09:50
2015-04-27T14:09:50
5,881,815
0
0
null
null
null
null
UTF-8
Java
false
false
1,612
java
package com.taobao.api.domain; import java.util.List; import com.taobao.api.TaobaoObject; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.internal.mapping.ApiListField; /** * 商品的库存信息和批次信息 * * @author auto create * @since 1.0, null */ public class WlbItemBatchInventory extends TaobaoObject { private static final long serialVersionUID = 5782918445156393371L; /** * 批次库存查询结果 */ @ApiListField("item_batch") @ApiField("wlb_item_batch") private List<WlbItemBatch> itemBatch; /** * 商品ID */ @ApiField("item_id") private Long itemId; /** * 商品库存查询结果 */ @ApiListField("item_inventorys") @ApiField("wlb_item_inventory") private List<WlbItemInventory> itemInventorys; /** * 商品在所有仓库的可销库存总数 */ @ApiField("total_quantity") private Long totalQuantity; public List<WlbItemBatch> getItemBatch() { return this.itemBatch; } public void setItemBatch(List<WlbItemBatch> itemBatch) { this.itemBatch = itemBatch; } public Long getItemId() { return this.itemId; } public void setItemId(Long itemId) { this.itemId = itemId; } public List<WlbItemInventory> getItemInventorys() { return this.itemInventorys; } public void setItemInventorys(List<WlbItemInventory> itemInventorys) { this.itemInventorys = itemInventorys; } public Long getTotalQuantity() { return this.totalQuantity; } public void setTotalQuantity(Long totalQuantity) { this.totalQuantity = totalQuantity; } }
[ "shigushuyuan@gmail.com" ]
shigushuyuan@gmail.com
3d1e7d21eb6f6930112a0f01bee752b9004ca030
abf114504abcce2cde4134e5a090d1a6d8fa4c25
/src/main/java/com/note/genericity/CollectionsUtilTest.java
a9d9139c94f65606522b150e32beb1c857513aaf
[]
no_license
loverasd/javademo
1230c84a7fa85148e27fe0bc313251428ff9a230
528f564b219d081e4fa98984d67f8f1a05a1b158
refs/heads/master
2022-07-09T09:50:47.619501
2019-10-21T04:43:55
2019-10-21T04:43:55
145,996,233
0
0
null
2022-06-30T14:46:00
2018-08-24T13:39:32
Java
UTF-8
Java
false
false
916
java
package com.note.genericity; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; /** * @Classname CollectionsUtilTest * @Description TODO * @Date 2019/6/12 14:39 * @Created by x1c */ public class CollectionsUtilTest { public static void main(String[] args) { //List<T> list, Comparator<? super T> c ArrayList<B> bs = new ArrayList<>(); B b = new B(1); B b2 = new B(2); B b3 = new B(3); B b4 = new B(4); bs.add(b); bs.add(b4); bs.add(b3); bs.add(b2); bs.forEach(s-> System.out.println(s.vb)); Collections.sort(bs,Comparator.comparing(x->x.vb)); System.out.println("----"); bs.forEach(s-> System.out.println(s.vb)); } } class A extends B{ int va; } class B { public B() { } public B(int vb) { this.vb = vb; } int vb; }
[ "chen_pan@sinosoft.com.cn" ]
chen_pan@sinosoft.com.cn
cb1c7954ab68ac5e4bf70c4ebc8fd7305791a6d9
f14c60e0aedc58faddf0b119f3ed09249230a4d5
/src/main/java/fr/api/devops/web/rest/UserResource.java
b430039af294e3f1ef45d21b0fe4bd73ffcadfac
[]
no_license
sogeking75/jhipsterSampleApplication
86aac4743fc9b05c3cacfc62d024e9d3e474ad0b
d19cc823c260620b01a8fff0097115f3cefc7cf7
refs/heads/master
2020-03-18T09:10:46.489896
2018-05-23T13:52:30
2018-05-23T13:52:30
134,548,939
0
0
null
2018-05-23T13:52:31
2018-05-23T09:51:32
Java
UTF-8
Java
false
false
8,311
java
package fr.api.devops.web.rest; import fr.api.devops.config.Constants; import com.codahale.metrics.annotation.Timed; import fr.api.devops.domain.User; import fr.api.devops.repository.UserRepository; import fr.api.devops.security.AuthoritiesConstants; import fr.api.devops.service.MailService; import fr.api.devops.service.UserService; import fr.api.devops.service.dto.UserDTO; import fr.api.devops.web.rest.errors.BadRequestAlertException; import fr.api.devops.web.rest.errors.EmailAlreadyUsedException; import fr.api.devops.web.rest.errors.LoginAlreadyUsedException; import fr.api.devops.web.rest.util.HeaderUtil; import fr.api.devops.web.rest.util.PaginationUtil; import io.github.jhipster.web.util.ResponseUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.annotation.Secured; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.net.URI; import java.net.URISyntaxException; import java.util.*; /** * REST controller for managing users. * <p> * This class accesses the User entity, and needs to fetch its collection of authorities. * <p> * For a normal use-case, it would be better to have an eager relationship between User and Authority, * and send everything to the client side: there would be no View Model and DTO, a lot less code, and an outer-join * which would be good for performance. * <p> * We use a View Model and a DTO for 3 reasons: * <ul> * <li>We want to keep a lazy association between the user and the authorities, because people will * quite often do relationships with the user, and we don't want them to get the authorities all * the time for nothing (for performance reasons). This is the #1 goal: we should not impact our users' * application because of this use-case.</li> * <li> Not having an outer join causes n+1 requests to the database. This is not a real issue as * we have by default a second-level cache. This means on the first HTTP call we do the n+1 requests, * but then all authorities come from the cache, so in fact it's much better than doing an outer join * (which will get lots of data from the database, for each HTTP call).</li> * <li> As this manages users, for security reasons, we'd rather have a DTO layer.</li> * </ul> * <p> * Another option would be to have a specific JPA entity graph to handle this case. */ @RestController @RequestMapping("/api") public class UserResource { private final Logger log = LoggerFactory.getLogger(UserResource.class); private final UserRepository userRepository; private final UserService userService; private final MailService mailService; public UserResource(UserRepository userRepository, UserService userService, MailService mailService) { this.userRepository = userRepository; this.userService = userService; this.mailService = mailService; } /** * POST /users : Creates a new user. * <p> * Creates a new user if the login and email are not already used, and sends an * mail with an activation link. * The user needs to be activated on creation. * * @param userDTO the user to create * @return the ResponseEntity with status 201 (Created) and with body the new user, or with status 400 (Bad Request) if the login or email is already in use * @throws URISyntaxException if the Location URI syntax is incorrect * @throws BadRequestAlertException 400 (Bad Request) if the login or email is already in use */ @PostMapping("/users") @Timed @Secured(AuthoritiesConstants.ADMIN) public ResponseEntity<User> createUser(@Valid @RequestBody UserDTO userDTO) throws URISyntaxException { log.debug("REST request to save User : {}", userDTO); if (userDTO.getId() != null) { throw new BadRequestAlertException("A new user cannot already have an ID", "userManagement", "idexists"); // Lowercase the user login before comparing with database } else if (userRepository.findOneByLogin(userDTO.getLogin().toLowerCase()).isPresent()) { throw new LoginAlreadyUsedException(); } else if (userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()).isPresent()) { throw new EmailAlreadyUsedException(); } else { User newUser = userService.createUser(userDTO); mailService.sendCreationEmail(newUser); return ResponseEntity.created(new URI("/api/users/" + newUser.getLogin())) .headers(HeaderUtil.createAlert( "A user is created with identifier " + newUser.getLogin(), newUser.getLogin())) .body(newUser); } } /** * PUT /users : Updates an existing User. * * @param userDTO the user to update * @return the ResponseEntity with status 200 (OK) and with body the updated user * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already in use * @throws LoginAlreadyUsedException 400 (Bad Request) if the login is already in use */ @PutMapping("/users") @Timed @Secured(AuthoritiesConstants.ADMIN) public ResponseEntity<UserDTO> updateUser(@Valid @RequestBody UserDTO userDTO) { log.debug("REST request to update User : {}", userDTO); Optional<User> existingUser = userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()); if (existingUser.isPresent() && (!existingUser.get().getId().equals(userDTO.getId()))) { throw new EmailAlreadyUsedException(); } existingUser = userRepository.findOneByLogin(userDTO.getLogin().toLowerCase()); if (existingUser.isPresent() && (!existingUser.get().getId().equals(userDTO.getId()))) { throw new LoginAlreadyUsedException(); } Optional<UserDTO> updatedUser = userService.updateUser(userDTO); return ResponseUtil.wrapOrNotFound(updatedUser, HeaderUtil.createAlert("A user is updated with identifier " + userDTO.getLogin(), userDTO.getLogin())); } /** * GET /users : get all users. * * @param pageable the pagination information * @return the ResponseEntity with status 200 (OK) and with body all users */ @GetMapping("/users") @Timed public ResponseEntity<List<UserDTO>> getAllUsers(Pageable pageable) { final Page<UserDTO> page = userService.getAllManagedUsers(pageable); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/users"); return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); } /** * @return a string list of the all of the roles */ @GetMapping("/users/authorities") @Timed @Secured(AuthoritiesConstants.ADMIN) public List<String> getAuthorities() { return userService.getAuthorities(); } /** * GET /users/:login : get the "login" user. * * @param login the login of the user to find * @return the ResponseEntity with status 200 (OK) and with body the "login" user, or with status 404 (Not Found) */ @GetMapping("/users/{login:" + Constants.LOGIN_REGEX + "}") @Timed public ResponseEntity<UserDTO> getUser(@PathVariable String login) { log.debug("REST request to get User : {}", login); return ResponseUtil.wrapOrNotFound( userService.getUserWithAuthoritiesByLogin(login) .map(UserDTO::new)); } /** * DELETE /users/:login : delete the "login" User. * * @param login the login of the user to delete * @return the ResponseEntity with status 200 (OK) */ @DeleteMapping("/users/{login:" + Constants.LOGIN_REGEX + "}") @Timed @Secured(AuthoritiesConstants.ADMIN) public ResponseEntity<Void> deleteUser(@PathVariable String login) { log.debug("REST request to delete User: {}", login); userService.deleteUser(login); return ResponseEntity.ok().headers(HeaderUtil.createAlert( "A user is deleted with identifier " + login, login)).build(); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
38001a5b07f58cc495a2da76e74f8d2d9998d69b
48adea00eef7b191f452a9048efd119a2b50228a
/src/main/java/dto/OtusUser.java
07bd3c98325aa0297df12e491b2174b049a61fd8
[]
no_license
nprokazova/petStore
2df128b87225a99290dc0194fa3d205ebd150792
21061def4cd4a6107cb5b24552e3edd78ce668af
refs/heads/master
2023-07-08T02:46:44.064149
2021-08-21T14:41:19
2021-08-21T14:41:19
385,026,365
0
0
null
2021-08-21T14:41:19
2021-07-11T18:37:19
Java
UTF-8
Java
false
false
447
java
package dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import org.codehaus.jackson.map.annotate.JsonSerialize; @Data @AllArgsConstructor @Builder @JsonSerialize public class OtusUser { private String email; private String firstName; private Long id; private String lastName; private String password; private String phone; private Long userStatus; private String username; }
[ "naprokazova@gmail.com" ]
naprokazova@gmail.com
b99b0895d61815c86d3829dbb442f2f19eefbdbc
049a89218390db1822cd9fc58adddbc2ff35a3f9
/app/src/main/java/com/docotel/latihanmvp2/base/BasePresenter.java
051693cdbc2ff5fd902cd8af49d55230969b63c0
[]
no_license
rezyfr/LatihanMVP
f92401a47f1e3d19f8c7e5e8ca16c4973e570b68
e81f05be1931d35db5856a44aa170d337cc6c612
refs/heads/master
2020-04-27T04:43:14.147013
2019-03-06T03:23:00
2019-03-06T03:23:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
193
java
package com.docotel.latihanmvp2.base; public abstract class BasePresenter { private BaseView mBaseView; public BasePresenter(BaseView baseView){ mBaseView = baseView; } }
[ "frotylatz@gmail.com" ]
frotylatz@gmail.com
a5e6e211f2bb92fac8fcd8639f53f05c369e3824
95be304b57b7600f6f3423bc0fbb1b913c304685
/app/src/main/java/com/nguyentien/hai/ecomerce/ultil/CheckConnection.java
ab6a2603a48f1a0aa7330238c4f49dbdd02df96c
[]
no_license
gmbplus95/android-final
23ea3f100a540473e82cb21193b7815f214a123c
0999da289cbb7d70d1cdcea2e025e650ee28b08b
refs/heads/master
2021-01-23T01:42:04.338928
2017-05-31T03:16:15
2017-05-31T03:16:15
92,888,334
0
0
null
null
null
null
UTF-8
Java
false
false
1,080
java
package com.nguyentien.hai.ecomerce.ultil; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.widget.Toast; public class CheckConnection { public static boolean haveNetworkConnection(Context context) { boolean haveConnectedWifi = false; boolean haveConnectedMobile = false; ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo[] netInfo = cm.getAllNetworkInfo(); for (NetworkInfo ni : netInfo) { if (ni.getTypeName().equalsIgnoreCase("WIFI")) if (ni.isConnected()) haveConnectedWifi = true; if (ni.getTypeName().equalsIgnoreCase("MOBILE")) if (ni.isConnected()) haveConnectedMobile = true; } return haveConnectedWifi || haveConnectedMobile; } public static void showToast_Short(Context context, String msg) { Toast.makeText(context, msg, Toast.LENGTH_SHORT).show(); } }
[ "gmbplus95@gmail.com" ]
gmbplus95@gmail.com
0a810e0a1a7263b6363d326defc8c31fbc8bd3a9
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Collections-26/org.apache.commons.collections4.keyvalue.MultiKey/BBC-F0-opt-10/tests/13/org/apache/commons/collections4/keyvalue/MultiKey_ESTest.java
2d1e0647680e402acbee7d082929dfbf69968f67
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
11,097
java
/* * This file was automatically generated by EvoSuite * Wed Oct 20 12:21:24 GMT 2021 */ package org.apache.commons.collections4.keyvalue; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.lang.reflect.Array; import org.apache.commons.collections4.keyvalue.MultiKey; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class MultiKey_ESTest extends MultiKey_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { MultiKey<String> multiKey0 = new MultiKey<String>("MultiKey", "MultiKey", "MultiKey", "MultiKey", "MultiKey"); Object object0 = new Object(); Object object1 = new Object(); MultiKey<Integer> multiKey1 = new MultiKey<Integer>((Integer) null, (Integer) null, (Integer) null); boolean boolean0 = multiKey1.equals(multiKey0); MultiKey<Object> multiKey2 = new MultiKey<Object>((Object) null, multiKey0); Object object2 = new Object(); Integer integer0 = new Integer(1); boolean boolean1 = multiKey2.equals(multiKey2); assertFalse(boolean1 == boolean0); assertTrue(boolean1); } @Test(timeout = 4000) public void test01() throws Throwable { String string0 = "MultiKey"; MultiKey<String> multiKey0 = new MultiKey<String>("MultiKey", "MultiKey", "MultiKey", "MultiKey", "MultiKey"); Object object0 = new Object(); MultiKey<Integer> multiKey1 = null; try { multiKey1 = new MultiKey<Integer>((Integer[]) null); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The array of keys must not be null // verifyException("org.apache.commons.collections4.keyvalue.MultiKey", e); } } @Test(timeout = 4000) public void test02() throws Throwable { MultiKey<String>[] multiKeyArray0 = (MultiKey<String>[]) Array.newInstance(MultiKey.class, 7); MultiKey<String> multiKey0 = new MultiKey<String>("/ZZ", "/ZZ", "/ZZ", "<&vSZx,BAGC^;S#N4P", "FeEG"); multiKeyArray0[0] = multiKey0; MultiKey<String> multiKey1 = new MultiKey<String>("FeEG", "G>c'z+yjI}_*f", "/ZZ"); multiKeyArray0[1] = multiKey1; MultiKey<String> multiKey2 = new MultiKey<String>("G>c'z+yjI}_*f", "/ZZ", "G>c'z+yjI}_*f"); multiKeyArray0[2] = multiKey2; MultiKey<String> multiKey3 = new MultiKey<String>("z8~Q}HRAg)vY\"", "G>c'z+yjI}_*f", "/ZZ", "z8~Q}HRAg)vY\"", ""); multiKeyArray0[3] = multiKey3; String[] stringArray0 = new String[0]; MultiKey<String> multiKey4 = new MultiKey<String>(stringArray0, true); multiKeyArray0[4] = multiKey4; MultiKey<String> multiKey5 = new MultiKey<String>("<&vSZx,BAGC^;S#N4P", "K\"U6#AucE", "FeEG", "G>c'z+yjI}_*f"); multiKeyArray0[5] = multiKey5; MultiKey<String> multiKey6 = new MultiKey<String>(stringArray0, true); multiKeyArray0[6] = multiKey6; MultiKey<String> multiKey7 = new MultiKey<String>("<&vSZx,BAGC^;S#N4P", "<&vSZx,BAGC^;S#N4P", "G>c'z+yjI}_*f"); multiKey7.toString(); MultiKey<Object> multiKey8 = new MultiKey<Object>(stringArray0); int int0 = multiKey8.size(); assertEquals(0, int0); } @Test(timeout = 4000) public void test03() throws Throwable { MultiKey<Integer> multiKey0 = null; try { multiKey0 = new MultiKey<Integer>((Integer[]) null, true); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The array of keys must not be null // verifyException("org.apache.commons.collections4.keyvalue.MultiKey", e); } } @Test(timeout = 4000) public void test04() throws Throwable { MultiKey<Object> multiKey0 = new MultiKey<Object>((Object) null, (Object) null); MultiKey<MultiKey<Object>> multiKey1 = new MultiKey<MultiKey<Object>>(multiKey0, multiKey0); multiKey1.toString(); multiKey1.toString(); multiKey1.toString(); multiKey1.toString(); multiKey0.toString(); multiKey0.toString(); multiKey0.toString(); multiKey0.getKeys(); multiKey0.equals("MultiKey[MultiKey[null, null], MultiKey[null, null]]"); Integer integer0 = new Integer(2562); MultiKey<Integer> multiKey2 = new MultiKey<Integer>(integer0, integer0, integer0); multiKey2.hashCode(); multiKey2.toString(); multiKey0.size(); multiKey2.equals("MultiKey[null, null]"); multiKey1.toString(); multiKey0.toString(); MultiKey<String> multiKey3 = new MultiKey<String>("MultiKey[MultiKey[null, null], MultiKey[null, null]]", ""); // Undeclared exception! try { multiKey3.getKey(2); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // 2 // verifyException("org.apache.commons.collections4.keyvalue.MultiKey", e); } } @Test(timeout = 4000) public void test05() throws Throwable { MultiKey<String> multiKey0 = new MultiKey<String>("", "", "MultiKey", ""); MultiKey<String> multiKey1 = new MultiKey<String>("MultiKey", "MultiKey", "0k:=,W#8zad;", "N9g=E:", ""); String string0 = multiKey1.toString(); assertEquals("MultiKey[MultiKey, MultiKey, 0k:=,W#8zad;, N9g=E:, ]", string0); multiKey1.getKey(0); MultiKey<Object> multiKey2 = new MultiKey<Object>("MultiKey", ""); boolean boolean0 = multiKey2.equals(multiKey0); assertFalse(boolean0); Object object0 = multiKey2.getKey(0); assertEquals("MultiKey", object0); } @Test(timeout = 4000) public void test06() throws Throwable { Object[] objectArray0 = new Object[8]; MultiKey<Object> multiKey0 = new MultiKey<Object>(objectArray0, false); multiKey0.getKey(0); objectArray0[0] = null; String[] stringArray0 = new String[4]; stringArray0[0] = "+,9\"F14Aq"; stringArray0[1] = "bs/ngw"; stringArray0[2] = ""; stringArray0[3] = ""; MultiKey<String> multiKey1 = new MultiKey<String>(stringArray0); String string0 = multiKey1.getKey(0); assertEquals("+,9\"F14Aq", string0); objectArray0[1] = (Object) "+,9\"F14Aq"; Object object0 = new Object(); objectArray0[2] = object0; Object object1 = new Object(); objectArray0[3] = object1; Object object2 = new Object(); objectArray0[4] = object2; multiKey0.getKey(0); objectArray0[5] = null; Object object3 = new Object(); objectArray0[6] = object3; multiKey0.getKey(0); objectArray0[7] = null; MultiKey<Object> multiKey2 = new MultiKey<Object>(objectArray0, false); assertTrue(multiKey2.equals((Object)multiKey0)); } @Test(timeout = 4000) public void test07() throws Throwable { MultiKey<String> multiKey0 = new MultiKey<String>(")[ b*", "", ")[ b*", "vhFgQP$UDq9'\"U", ""); Integer[] integerArray0 = new Integer[0]; MultiKey<Integer> multiKey1 = new MultiKey<Integer>(integerArray0); multiKey1.getKeys(); MultiKey<MultiKey<Integer>> multiKey2 = new MultiKey<MultiKey<Integer>>(multiKey1, multiKey1, multiKey1, multiKey1); multiKey1.toString(); multiKey0.toString(); multiKey2.hashCode(); multiKey0.toString(); // Undeclared exception! try { multiKey1.getKey((-2983)); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // -2983 // verifyException("org.apache.commons.collections4.keyvalue.MultiKey", e); } } @Test(timeout = 4000) public void test08() throws Throwable { String string0 = ":j=6m=Yn'}k82]!;eb"; MultiKey<String> multiKey0 = new MultiKey<String>(":j=6m=Yn'}k82]!;eb", ":j=6m=Yn'}k82]!;eb", "MultiKey", "MultiKey"); multiKey0.toString(); multiKey0.toString(); MultiKey<MultiKey<String>> multiKey1 = new MultiKey<MultiKey<String>>(multiKey0, multiKey0, multiKey0, multiKey0, multiKey0); multiKey1.toString(); Integer integer0 = new Integer((-909)); Integer integer1 = new Integer(1859); Integer integer2 = new Integer(0); MultiKey<Integer> multiKey2 = new MultiKey<Integer>(integer0, integer1, integer2); multiKey2.toString(); multiKey2.equals("MultiKey[:j=6m=Yn'}k82]!;eb, :j=6m=Yn'}k82]!;eb, MultiKey, MultiKey]"); Object object0 = new Object(); MultiKey<Object> multiKey3 = null; Object[] objectArray0 = new Object[3]; objectArray0[0] = (Object) multiKey2; objectArray0[1] = (Object) integer0; objectArray0[2] = (Object) "MultiKey[-909, 1859, 0]"; MultiKey<Object> multiKey4 = new MultiKey<Object>(objectArray0); MultiKey<Object> multiKey5 = new MultiKey<Object>(objectArray0, false); MultiKey<MultiKey<Object>> multiKey6 = new MultiKey<MultiKey<Object>>((MultiKey<Object>) null, (MultiKey<Object>) null, multiKey4, (MultiKey<Object>) null, multiKey5); // Undeclared exception! try { multiKey6.getKey(1859); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // 1859 // verifyException("org.apache.commons.collections4.keyvalue.MultiKey", e); } } @Test(timeout = 4000) public void test09() throws Throwable { String[] stringArray0 = new String[7]; stringArray0[0] = "#y0A7D]J4XCHC1"; stringArray0[1] = "}t]S>`\"E&:vW8W0"; stringArray0[2] = ""; stringArray0[3] = ""; stringArray0[4] = ""; stringArray0[5] = "The array of keys must not be null"; stringArray0[6] = ""; MultiKey<String> multiKey0 = new MultiKey<String>(stringArray0, true); String[] stringArray1 = multiKey0.getKeys(); assertNotSame(stringArray1, stringArray0); } @Test(timeout = 4000) public void test10() throws Throwable { MultiKey<String> multiKey0 = new MultiKey<String>("", "7,l:`VHX~__R,j5", "/4jPJq@a"); assertEquals(3, multiKey0.size()); } @Test(timeout = 4000) public void test11() throws Throwable { Object[] objectArray0 = new Object[3]; Object object0 = new Object(); MultiKey<Object> multiKey0 = new MultiKey<Object>((Object) null, object0); // Undeclared exception! try { multiKey0.getKey(3625); fail("Expecting exception: ArrayIndexOutOfBoundsException"); } catch(ArrayIndexOutOfBoundsException e) { // // 3625 // verifyException("org.apache.commons.collections4.keyvalue.MultiKey", e); } } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
b8dbe53f02a04287a3f3de639546e4b6bb1dd469
5e7bccb5754b0c99c0759bebca3b941bff24418c
/app/src/main/java/com/jhon/appandroidfinal/Model/Coche.java
22d289f682494b4cfcefd311d738e1d59e08ca8c
[]
no_license
JhonDavidChontaEspinoza/appAndroidFinal4
28235c807bdf95fa2fede00dae92642d76ca7415
bbb3010514a0a557c4a2bb2e26decb596ef3c5f5
refs/heads/master
2021-09-04T00:13:45.813969
2018-01-13T07:02:37
2018-01-13T07:02:37
117,322,190
0
0
null
null
null
null
UTF-8
Java
false
false
949
java
package com.jhon.appandroidfinal.Model; /** * Created by DS on 07/01/2018. */ public class Coche { String marca; String dueno; int puertas; int ruedas; public Coche() { } public Coche(String marca, String dueno, int puertas, int ruedas) { this.marca = marca; this.dueno = dueno; this.puertas = puertas; this.ruedas = ruedas; } public String getMarca() { return marca; } public void setMarca(String marca) { this.marca = marca; } public String getDueno() { return dueno; } public void setDueno(String dueno) { this.dueno = dueno; } public int getPuertas() { return puertas; } public void setPuertas(int puertas) { this.puertas = puertas; } public int getRuedas() { return ruedas; } public void setRuedas(int ruedas) { this.ruedas = ruedas; } }
[ "34827496+JhonDavidChontaEspinoza@users.noreply.github.com" ]
34827496+JhonDavidChontaEspinoza@users.noreply.github.com
a1a9b2da60b76a3de00db9c86d47fb16c34b2684
c3c131a72d0f02e16dcc87b25bf45472941ca39c
/11.videoview的使用/src/androidTest/java/com/android/benben/a11videoview/ApplicationTest.java
46e2124999653e0920c069266a55706c2a27bddd
[]
no_license
benliben/Day10
a67d8a46f9c2144a07a94796be4e5ea48057f735
e9a8bd8fcf01ba11454fecae23ebbbd375ab941a
refs/heads/master
2021-01-17T08:46:16.307682
2016-07-22T01:30:12
2016-07-22T01:30:12
63,761,711
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package com.android.benben.a11videoview; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "1287550045@qq.com" ]
1287550045@qq.com
5b7128d675ca9f3ca163f46bc4806531eab4cf42
9ff1097bb215fdc122bb2b03fc1b554afb698bda
/src/main/java/com/dodo/lab/head_first_design_patterns/factory/pizzaaf/PizzaIngredientFactory.java
b020dbadaae5cc47fa159ea44165e58a595bde7c
[]
no_license
nicetoseeyou/design-pattern
8c96e01d2cc32735add2cb41740e530ef1773aec
3a876c3390e36c25440b40e944ee5ac6e5e52f60
refs/heads/master
2021-12-27T05:34:27.657776
2019-12-13T14:37:51
2019-12-13T14:37:51
97,602,681
0
0
null
2021-12-14T21:06:47
2017-07-18T13:39:39
Java
UTF-8
Java
false
false
324
java
package com.dodo.lab.head_first_design_patterns.factory.pizzaaf; public interface PizzaIngredientFactory { public Dough createDough(); public Sauce createSauce(); public Cheese createCheese(); public Veggies[] createVeggies(); public Pepperoni createPepperoni(); public Clams createClam(); }
[ "hello4world@yeah.net" ]
hello4world@yeah.net
a191c396103fbbfce2b7ee822bc6869116ee3bed
b7b2d1018bc160cc986cd5ef20b22bc8999f96fa
/src/test/java/com/slgerkamp/javase8/chapter09/C9_01_04_ReflectiveOperationExceptionTest.java
3d5823bedf289550290101776b84cd5a9348a9e8
[]
no_license
cosmic-cowboy/JavaSE8-for-the-Really-Impatient
3470123f6589b3d4c7aea62f23af055ce1705801
f1cbdcc463dc27f4958d132ce4120e34ffcddcef
refs/heads/master
2021-06-03T23:41:20.822232
2021-05-25T01:50:27
2021-05-25T01:50:27
29,802,281
0
0
null
2021-05-25T01:50:28
2015-01-25T04:13:12
Java
UTF-8
Java
false
false
1,031
java
package com.slgerkamp.javase8.chapter09; import org.junit.Test; import com.slgerkamp.javase8.chapter9.C9_01_04_ReflectiveOperationException; /** * リフレクションで発生する例外処理を一元管理する * */ public class C9_01_04_ReflectiveOperationExceptionTest { @Test(expected=ReflectiveOperationException.class) public void リフレクション_クラスが存在しない() throws ReflectiveOperationException{ C9_01_04_ReflectiveOperationException reflectiveOperationException = new C9_01_04_ReflectiveOperationException(); reflectiveOperationException.reflectionError("C", "main"); } @Test(expected=ReflectiveOperationException.class) public void リフレクション_メソッドが存在しない() throws ReflectiveOperationException{ C9_01_04_ReflectiveOperationException reflectiveOperationException = new C9_01_04_ReflectiveOperationException(); reflectiveOperationException.reflectionError("com.slgerkamp.javase8.chapter9.C9_01_01_Try_With_Resources", "main"); } }
[ "slgerkamp@gmail.com" ]
slgerkamp@gmail.com
54cbc4fbd1b444242cc890c7176a24a1a69ee5a1
e9ab4113b355b247555f3fb2edd0ab2c66f5a224
/src/top/zhyee/java/leetcode/medium/UniqueBinarySearchTreesII.java
1a51d63181821519d0b56772186d9096026efcf0
[]
no_license
yanyzy/leetcode
015b3860e06c99884c8cea54a33afb6eaf1e2c67
09bdb10b4cb20783dd9c3b1bfb9f6ae1d62a6e3b
refs/heads/master
2021-07-05T08:59:06.380305
2020-07-21T08:48:24
2020-07-21T08:48:24
128,915,448
1
0
null
null
null
null
UTF-8
Java
false
false
1,371
java
package top.zhyee.java.leetcode.medium; import top.zhyee.java.leetcode.TreeNode; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class UniqueBinarySearchTreesII { public List<TreeNode> generateTrees(int n) { if (n == 0) { return Collections.emptyList(); } return generateTreesByList(1, n); } private List<TreeNode> generateTreesByList(int from, int to) { if (from > to) { return Collections.singletonList(null); } if (from == to) { return Collections.singletonList(new TreeNode(to)); } List<TreeNode> treeNodes = new ArrayList<>(); for (int i = from; i <= to; i++) { List<TreeNode> left = generateTreesByList(from, i - 1); List<TreeNode> right = generateTreesByList(i + 1, to); for (TreeNode node : left) { for (TreeNode value : right) { TreeNode treeNode = new TreeNode(i); treeNode.left = node; treeNode.right = value; treeNodes.add(treeNode); } } } return treeNodes; } public static void main(String[] args) { System.out.println(new UniqueBinarySearchTreesII().generateTrees(3)); } }
[ "1181862765@qq.com" ]
1181862765@qq.com
3bbb26efe6ae21e0bd947d09d860f4b84393b4e8
987d3a6f4e225b83291df961d3d18bc958f88e9a
/src/GOF23/P257_适配器/Adapter.java
49cdd60ab09d509986091038453231e295175912
[]
no_license
pippichi/IntelliJ_JAVA
2d83d6052651c3eadb4af44c86e9f0ecc5d3caac
90a5e342516529ce1c9cc44128147ca62aa24f76
refs/heads/master
2023-04-12T13:56:36.898397
2021-05-18T07:02:11
2021-05-18T07:02:11
159,301,322
2
0
null
2018-11-27T09:17:02
2018-11-27T08:28:21
null
UTF-8
Java
false
false
217
java
package GOF23.P257_适配器; /** * 适配器(类适配器方式) */ public class Adapter extends Adaptee implements Target { @Override public void handleReq() { super.request(); } }
[ "874496049@qq.com" ]
874496049@qq.com
57ec052af99f7ed4cb3695ff6bb36333514f28a8
d64121af62973e6d2f7fdc6d303bbd162dbcc827
/demo/ColorQuantPerfTest.java
e374d6ab9a2373b50f8d47d7a4d7980e7f1c3e1e
[ "Apache-2.0" ]
permissive
kongzhidea/simpleimage
95bf30a6dc05c91174269d9e03259411ef704a94
9fcd01089665fbf4cdd0595c7e3c96e9be89ce77
refs/heads/master
2021-01-21T08:58:19.520226
2016-07-12T07:42:28
2016-07-12T07:42:28
58,982,670
0
0
null
2016-05-17T02:11:43
2016-05-17T02:11:43
null
UTF-8
Java
false
false
4,196
java
package com.kk.simpleimage; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; import com.alibaba.simpleimage.ImageFormat; import com.alibaba.simpleimage.ImageRender; import com.alibaba.simpleimage.SimpleImageException; import org.apache.commons.io.IOUtils; import com.alibaba.simpleimage.io.ByteArrayOutputStream; import com.alibaba.simpleimage.render.ReadRender; import com.alibaba.simpleimage.render.WriteParameter; import com.alibaba.simpleimage.render.WriteRender; /** * 类ColorQuantPerfTest.java的实现描述 * * @author wendell 2011-8-18 下午07:06:28 */ public class ColorQuantPerfTest { public static void main(String[] args) throws Exception { String appDir = ""; int threads = 0; int times = 0; String algName = ""; appDir = args[0]; threads = Integer.parseInt(args[1]); times = Integer.parseInt(args[2]); algName = args[3]; new ColorQuantPerfTest(appDir, threads, times, algName).start(); } int threadsNum; int times; String appDir; String algName; public ColorQuantPerfTest(String appDir, int threads, int times, String algName) { this.appDir = appDir; this.threadsNum = threads; this.times = times; this.algName = algName; } public void start() throws InterruptedException { CountDownLatch latch = new CountDownLatch(times); File rootDir = new File(new File(appDir), "/src/test/resources/conf.test/simpleimage"); for (int s = 0; s < threadsNum; s++) { Thread t = new Thread(new Worker(latch, rootDir, algName)); t.start(); } latch.await(); } class Worker implements Runnable { CountDownLatch latch; File imgDir; WriteParameter.QuantAlgorithm quantAlg; public Worker(CountDownLatch latch, File imgDir, String algName) { this.latch = latch; this.imgDir = imgDir; if ("m".equalsIgnoreCase(algName)) { quantAlg = WriteParameter.QuantAlgorithm.MedianCut; } else if ("N".equalsIgnoreCase(algName)) { quantAlg = WriteParameter.QuantAlgorithm.NeuQuant; } else { quantAlg = WriteParameter.QuantAlgorithm.OctTree; } } /* (non-Javadoc) * @see java.lang.Runnable#run() */ public void run() { for (; ; ) { if (latch.getCount() > 0) { latch.countDown(); } else { return; } List<File> imgs = new ArrayList<File>(); for (File f : new File(imgDir, "scale").listFiles()) { if (f.isDirectory()) { continue; } imgs.add(f); } for (File imgFile : imgs) { ImageRender wr = null; InputStream inStream = null; OutputStream outStream = new ByteArrayOutputStream(); try { inStream = new FileInputStream(imgFile); ImageRender rr = new ReadRender(inStream); wr = new WriteRender(rr, outStream, ImageFormat.GIF, new WriteParameter(quantAlg)); wr.render(); } catch (Exception e) { e.printStackTrace(); } finally { IOUtils.closeQuietly(inStream); IOUtils.closeQuietly(outStream); if (wr != null) { try { wr.dispose(); } catch (SimpleImageException e) { e.printStackTrace(); } } } } System.out.println("-----"); } } } }
[ "563150913@qq.com" ]
563150913@qq.com
93a7d0c5a323b56652fa67a6099cef761e069f43
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project402/src/main/java/org/gradle/test/performance/largejavamultiproject/project402/p2013/Production40269.java
a84e19b7e66b844bb9070ba00b2ff8d3b20febf0
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,971
java
package org.gradle.test.performance.largejavamultiproject.project402.p2013; public class Production40269 { private Production40266 property0; public Production40266 getProperty0() { return property0; } public void setProperty0(Production40266 value) { property0 = value; } private Production40267 property1; public Production40267 getProperty1() { return property1; } public void setProperty1(Production40267 value) { property1 = value; } private Production40268 property2; public Production40268 getProperty2() { return property2; } public void setProperty2(Production40268 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
8a21641dae79ae16f76b70c4e9bcfbbde244b53f
8cf5d99381436fb12b00a22364cf17a5d4d92cc6
/app/src/main/java/com/rahulxyz/foodish/Activity/Setting.java
e1c47ac1364892c703422847cdb732d6e4df03d3
[]
no_license
rahulxyz/FooDish
66304abfdd24bc9b62a96111263b8c72fd3b11f1
5b09279e8690a3e1b9132df306bc0dd55ef2c20e
refs/heads/master
2021-08-18T17:19:00.543203
2017-11-23T12:19:21
2017-11-23T12:19:21
111,804,542
0
0
null
null
null
null
UTF-8
Java
false
false
1,010
java
package com.rahulxyz.foodish.Activity; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import com.rahulxyz.foodish.R; import butterknife.BindView; import butterknife.ButterKnife; public class Setting extends AppCompatActivity { @BindView(R.id.toolbar_setting) Toolbar toolbar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_setting); ButterKnife.bind(this); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setTitle(null); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); return true; } return super.onOptionsItemSelected(item); } }
[ "rahulguptaxyz15@gmail.com" ]
rahulguptaxyz15@gmail.com
8b5bce346aa6c29e535fbf2fff3d6b63be7a1cce
11c47117452038c4958f03c2a2c4d04aa1354d82
/src/main/java/com/example/service/impl/MqttCheckServiceImpl.java
47c8ada79fb5f8a3254c7857276690f1f28f1d04
[]
no_license
dmshan88/mongo-status
e8ef6c5ce697cf1e7454795120099ee6f6522e71
b4186773dcf7dadf32d4a02f407b3da96b08ac69
refs/heads/master
2020-08-22T17:31:35.690255
2019-10-31T12:35:39
2019-10-31T12:35:39
216,448,454
0
0
null
null
null
null
UTF-8
Java
false
false
4,419
java
package com.example.service.impl; import java.util.Date; import org.eclipse.paho.client.mqttv3.IMqttActionListener; import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; import org.eclipse.paho.client.mqttv3.IMqttToken; import org.eclipse.paho.client.mqttv3.MqttAsyncClient; import org.eclipse.paho.client.mqttv3.MqttCallbackExtended; import org.eclipse.paho.client.mqttv3.MqttConnectOptions; import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttMessage; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import com.example.common.CustomException; import com.example.common.ErrorCode; import com.example.pojo.vo.MqttStatus; import com.example.service.MqttCheckService; import lombok.extern.log4j.Log4j; @Log4j @Service public class MqttCheckServiceImpl implements MqttCheckService { @Value("${app.mqtt_enable}") Boolean mqttEnable; @Value("${app.mqtt_broker}") private String broker; @Value("${app.mqtt_client_id}") private String clientId; @Value("${app.mqtt_username}") private String username; @Value("${app.mqtt_password}") private String password; private static boolean start = false; private static Date connectDate = null; private MqttAsyncClient mqttClient = null; @Override public void checkConnectStatus() throws CustomException { if (!mqttEnable) { return; } if (!start) { start(); } else if (!mqttClient.isConnected()) { throw new CustomException(ErrorCode.MQTT_CONNECT_ERROR, "mqtt 未连接"); } } @Override public MqttStatus getStatus() throws CustomException { MqttStatus status = new MqttStatus(); status.setEnableCheck(mqttEnable); if (mqttEnable) { if (!mqttClient.isConnected()) { throw new CustomException(ErrorCode.MQTT_CONNECT_ERROR, "mqtt 未连接"); } status.setConnected(mqttClient.isConnected()); status.setConnectTimestamp(connectDate.getTime()/1000); } return status; } private void start() throws CustomException { log.info("Mqtt start"); MqttConnectOptions connectOptions = new MqttConnectOptions(); connectOptions.setAutomaticReconnect(true); connectOptions.setUserName(username); connectOptions.setPassword(password.toCharArray()); connectOptions.setCleanSession(false); connectOptions.setKeepAliveInterval(30); try { mqttClient = new MqttAsyncClient(broker, clientId); mqttClient.setCallback(new MqttCallbackExtended() { @Override public void messageArrived(String topic, MqttMessage message) throws Exception { log.info("messageArrived! topic: " + topic + "; message: " + message.toString()); } @Override public void deliveryComplete(IMqttDeliveryToken token) { log.info("deliveryComplete " + token.getMessageId()); } @Override public void connectionLost(Throwable cause) { log.error("connectionLost " + cause.getMessage()); } @Override public void connectComplete(boolean reconnect, String serverURI) { log.info("connectComplete: " + serverURI + ", is reconnect:" + reconnect); connectDate = new Date(); } }); mqttClient.connect(connectOptions, null, new IMqttActionListener() { @Override public void onSuccess(IMqttToken asyncActionToken) { log.info("connect success"); } @Override public void onFailure(IMqttToken asyncActionToken, Throwable exception) { log.error("connect error" + exception.getMessage()); } }); } catch (MqttException e) { throw new CustomException(ErrorCode.MQTT_CONNECT_ERROR, e.getMessage()); } start = true; } }
[ "dm_shan@163.com" ]
dm_shan@163.com
2eefefb964071a3859639363eecc166445c8105a
8e67fdab6f3a030f38fa127a79050b8667259d01
/JavaStudyHalUk/src/TECHNOSTUDY_SAMILBY/gun29/tasks/task1/Task1.java
d8717af388d3ca42fc2861e4a65a0a8d491f9fa1
[]
no_license
mosmant/JavaStudyHalUk
07e38ade6c7a31d923519a267a63318263c5910f
a41e16cb91ef307b50cfc497535126aa1e4035e5
refs/heads/master
2023-07-27T13:31:11.004490
2021-09-12T14:59:25
2021-09-12T14:59:25
405,671,965
0
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
package TECHNOSTUDY_SAMILBY.gun29.tasks.task1; public class Task1 { public static void main(String[] args) { Lesson math = createLesson("Math", 4, 96); Lesson physics = createLesson("Physics", 4, 95); Lesson science = createLesson("Science", 3, 100); Lesson computerScience = createLesson("Computer Science", 4, 100); Lesson chemistry = createLesson("Chemistry", 3, 95); Student student1 = new Student(); student1.name = "John"; student1.maxCredit = 5; student1.takeLesson(math); student1.takeLesson(physics); student1.takeLesson(computerScience); Student student2 = new Student(); student2.name = "Max"; student2.maxCredit = 7; student2.takeLesson(science); student2.takeLesson(chemistry); } public static Lesson createLesson(String name, int credit, double grade) { Lesson newLesson = new Lesson(); newLesson.name = name; newLesson.credit = credit; newLesson.grade = grade; return newLesson; } }
[ "mottnr@gmail.com" ]
mottnr@gmail.com
ef9b1086ffe2c2201e32a971d0b0ac34a37cf14f
c214964029db1bbce9ec0b31e01a71fa47a51916
/java-runtime-8/src/main/java/com/sun/corba/se/PortableActivationIDL/InitialNameServiceHolder.java
ca4e6d1010abdb988044347ac15ef2c233c738ea
[ "Apache-2.0" ]
permissive
likeu-group/leetcode
c7707531cd344f7407fff5367a425024bc2f8f1a
15879415fba1de523f2b40498f0946035f24424b
refs/heads/master
2023-06-25T11:18:07.806037
2021-07-31T05:45:04
2021-07-31T05:45:04
284,753,862
0
0
null
null
null
null
UTF-8
Java
false
false
1,089
java
package com.sun.corba.se.PortableActivationIDL; /** * com/sun/corba/se/PortableActivationIDL/InitialNameServiceHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u221/13320/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl * Thursday, July 4, 2019 4:41:44 AM PDT */ /** Interface used to support binding references in the bootstrap name * service. */ public final class InitialNameServiceHolder implements org.omg.CORBA.portable.Streamable { public InitialNameService value = null; public InitialNameServiceHolder () { } public InitialNameServiceHolder (InitialNameService initialValue) { value = initialValue; } public void _read (org.omg.CORBA.portable.InputStream i) { value = InitialNameServiceHelper.read (i); } public void _write (org.omg.CORBA.portable.OutputStream o) { InitialNameServiceHelper.write (o, value); } public org.omg.CORBA.TypeCode _type () { return InitialNameServiceHelper.type (); } }
[ "993610942@qq.com" ]
993610942@qq.com
57be39624388613c008cfd7213527075345b222d
b364563ff342f17fd6f01b16479a266bc0283b99
/src/Greedy/Greedy_1026.java
94ac33859492afad64b51e10990343be64d662ba
[]
no_license
JangWonSeob/Algorithm_Java
a7145f9f0b86bdf296bdd1385a103a6083201ca3
8991dcbc7f8566b8264fb890ea22d40b99193fa3
refs/heads/master
2023-09-01T14:02:03.807214
2021-10-23T13:20:18
2021-10-27T13:08:34
408,333,679
0
0
null
null
null
null
UTF-8
Java
false
false
819
java
package Greedy; import java.util.*; public class Greedy_1026 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(), sum = 0, arrA[] = new int[n], intArrB[] = new int[n]; Integer[] arrB = Arrays.stream(intArrB).boxed().toArray(Integer[]::new); for (int i = 0; i < n; i++) { arrA[i] = scanner.nextInt(); } Arrays.sort(arrA); for (int i = 0; i < n; i++) { arrB[i] = scanner.nextInt(); } Arrays.sort(arrB, Collections.reverseOrder()); System.out.println(Arrays.toString(arrA)); System.out.println(Arrays.toString(arrB)); for (int i = 0; i < n; i++) { sum += arrA[i] * arrB[i]; } System.out.println(sum); } }
[ "80467890+jang13579@users.noreply.github.com" ]
80467890+jang13579@users.noreply.github.com
a900cec07b9cd411b35357efd567e5eaac8f1a7b
17291d0542e5db9cb4164bbbd2c90fe0e58fb385
/laboratorios/lab02/ejercicioEnLinea/BrokenNQueens.java
ebd65022bc2267fbd813045f60fe690bdc837cf4
[]
no_license
rvillegasm/Estructuras-de-datos-y-Algoritmos-2
43b04ff7fb7d41aef82d1a8e9a83413632c8e840
1d11d6d1aac40d73d4c1bfaf1ce77808714933e7
refs/heads/master
2021-09-14T18:42:49.921548
2018-05-17T13:00:46
2018-05-17T13:00:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,587
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; /** * BrokenNQueens */ public class BrokenNQueens { public static void main(String[] args) throws IOException { BufferedReader scan = new BufferedReader(new InputStreamReader(System.in)); ArrayList<Integer> col = new ArrayList<Integer>(); ArrayList<Integer> fil = new ArrayList<Integer>(); ArrayList<Integer> res = new ArrayList<Integer>(); int n = Integer.parseInt(scan.readLine()); while(n != 0) { for (int i = 0; i < n; i++) { String fila = scan.readLine(); for (int j = 0; j < fila.length(); j++) { char position = fila.charAt(j); if (position == '*') { col.add(j); fil.add(i); } } } res.add(queens(n, fil, col)); n = Integer.parseInt(scan.readLine()); col.clear(); fil.clear(); } for(int i = 1; i <= res.size(); i++){ System.out.println("case " + i + ": " + res.get(i-1)); } } public static int queenAns; public static boolean esValido(int[] tablero, ArrayList<Integer> fil, ArrayList<Integer> col) { for(int i = 0; i < tablero.length; i++) { if(fil.size() != 0) { for(int k=0;k<fil.size();k++){ if(fil.get(k)==tablero[i] && col.get(k)==i){ return false; } } } for(int j = 0; j < tablero.length; j++) { if((Math.abs(tablero[i] - tablero[j]) == Math.abs(i - j)) && (i != j)) { return false; } } } return true; } private static void permutationsQueen(String pre, String pos, int[] tablero, ArrayList<Integer> fil, ArrayList<Integer> col) { if (pos.length() == 0) { String respuesta = pre.substring(1); String[] respuesta2 = respuesta.split(","); for(int i = 0; i < respuesta2.length; i++) { tablero[i] = Integer.parseInt(respuesta2[i]); } if(esValido(tablero, fil, col)) { queenAns++; } } else { for (int i = 0; i < pos.length(); i++) { permutationsQueen(pre + "," + pos.charAt(i), pos.substring(0, i) + pos.substring(i + 1), tablero, fil, col); } } } public static int queens(int n, ArrayList<Integer> fil, ArrayList<Integer> col) { queenAns = 0; int[] tablero = new int[n]; String numeros = ""; for(int i = 0; i < n; i++) { numeros = numeros + i; } permutationsQueen("", numeros, tablero, fil, col); return queenAns; } }
[ "rvillegasm@eafit.edu.co" ]
rvillegasm@eafit.edu.co
b04b6c8c058acc7d70015f13afbc8a79e3091582
de4b8d9bd442fee31ae0b74daa7d8c45297bc0dc
/src/com/company/Task10.java
c47e45e51a2dc4733c61cccfcc6ca88c84675178
[]
no_license
TapSel0/Tasks2
6109cea7995103deaaf7d62be4ac47a866f27176
b4ecaafb4b989caad87ed69e1ecfca2148120ffd
refs/heads/master
2023-04-20T01:09:31.228080
2021-05-13T13:01:29
2021-05-13T13:01:29
367,050,017
0
0
null
null
null
null
UTF-8
Java
false
false
236
java
package com.company; public class Task10 { public static int task10(int steps){ int fields = 0; for(int i = 1; i <= steps; i++){ fields = fields + (i%2 * 4 - 1); } return fields; } }
[ "dvratskiy3@mail.ru" ]
dvratskiy3@mail.ru
b74fdb7141725095a3617ea0d6548001f9f54ab5
90136278c6877319930114fcb03b29c925eb0191
/patienttracker/src/main/java/com/patienttracker/dao/PatientDAO.java
f7bf0aec40277bb5ffa2f84aa50b84f76e9f7b2a
[]
no_license
kumaranM25/PatientTracker
aa2969b0aafa6ce1e90331923e1ddecc15e0b724
d68bc165c1361ad25155522a4a401ebaef816ece
refs/heads/master
2022-12-21T13:29:42.464923
2020-02-19T11:13:02
2020-02-19T11:13:02
240,263,125
1
0
null
2022-12-16T03:47:47
2020-02-13T13:10:11
Java
UTF-8
Java
false
false
394
java
package com.patienttracker.dao; import java.util.List; import com.patienttracker.model.Patient; public interface PatientDAO { public void addPatient(Patient patient); public void updatePatient(Patient patient); public List<Patient> listPatients(); public Patient getPatientById(int patientId); public void removePatient(int patientId); Patient fetchPatient(String emailId); }
[ "indumathi.viswa@DS-PB02PWAQ.HCLT.CORP.HCL.IN" ]
indumathi.viswa@DS-PB02PWAQ.HCLT.CORP.HCL.IN
02218fd39a8e0bc69265db991d804bd6357ba0f8
8d1f0b5c59819c20a0ff8d9658062137eae94ceb
/src/main/java/com/psych/game/model/Employee.java
ccc7c51e0d175e4f74804971df93a09d6ddd67d8
[]
no_license
codergaurav7617/psychGame
e230ac9cf699268e51e83d247d29a0ae39d439c4
341353fd79da4223c32cc16bea5f1595f81d869c
refs/heads/master
2020-11-27T18:34:50.490638
2019-12-22T12:10:18
2019-12-22T12:10:18
229,563,504
0
0
null
null
null
null
UTF-8
Java
false
false
406
java
package com.psych.game.model; import lombok.Getter; import lombok.Setter; import javax.persistence.*; import javax.validation.constraints.NotBlank; @Entity @Table(name = "employees") public class Employee extends Auditable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Getter @Setter private Long id; @Getter @Setter @NotBlank private String name; }
[ "gj76170@gmail.com" ]
gj76170@gmail.com
2f8b12ce25eace6e6025184165b12f43edffc1ef
7308c7be35cd77d7b3eb9baa7e5f8819268cc066
/quickproject-service/src/main/java/com/habazoo/quickproject/service/elastic/document/factory/IndexRequestCreater.java
b336a978efc34fb354e99028ebe3e23a3dae2902
[]
no_license
FishInJava/qucikproject
2365549beb70749ff7597ae315827b9297ebb59a
906ff90118169951a12e54c553b13bd283ce00b3
refs/heads/master
2022-06-21T17:59:50.214290
2021-01-16T04:32:06
2021-01-16T04:32:06
249,617,572
0
0
null
2022-06-21T03:03:51
2020-03-24T05:04:26
Java
UTF-8
Java
false
false
5,505
java
package com.habazoo.quickproject.service.elastic.document.factory; import org.elasticsearch.action.DocWriteRequest; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.support.WriteRequest; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.VersionType; import java.util.Map; /** * @author hbz * @version 1.0.0 * @Description IndexRequest工厂 + builder * @createTime 2020年03月25日 17:05:00F */ public class IndexRequestCreater { /** * *自动创建index * The index operation automatically creates an index if it does not already exist * *文档id不存在的情况下才会put * put-if-absent(op_type = create) * *乐观并发控制:document会有一个版本号 * Optimistic concurrency control * *id自动生成 * id generated automatically * *明确分片:可以对分片命名,插入的时候可以带routing="name"来指明插入分片,默认使用hash(id)来选片 * explicit routing * *有主分片和复制分片(健壮) * primary shard 和 replicas * *可设置超时时间(响应) * *版本号:每个document都有一个版本号,在使用IndexAPI时,用户可以给定版本号,版本号必须是long * version_type=external,version="xxx",数据库中的version > xxx才能更新成功 * version_type=internal,version="xxx",数据库中的version = xxx才能更新成功 * version_type=external_gte,version="xxx",数据库中的version >= xxx才能更新成功 * *设置refresh,可控制增,删,改,批量操作后的可见性 * The Index, Update, Delete, and Bulk APIs support setting refresh * to control when changes made by this request are made visible to search. * false(默认):该操作执行完成,并成功响应后,修改后的内容在某个时间点才对外可见 * true:执行后立马对外可见(还未响应成功)---一般这种会主动调用刷新操作,比较耗费cpu * wait_for:该操作执行中(还未响应成功),es刷新后(刷新线程1s执行一次),修改后的内容对外可见 * * Wait For Active Shards?? * Noop Updates?? */ private IndexRequestCreater(){} public static IndexRequestBuilder prepare(String index, String type, String documentID){ return new IndexRequestCreater.IndexRequestBuilder(index,type,documentID); } public static IndexRequestBuilder prepare(String index, String type){ return new IndexRequestCreater.IndexRequestBuilder(index,type); } public static class IndexRequestBuilder{ private IndexRequest indexRequest = null; public IndexRequestBuilder(String index,String type,String documentID){ this.indexRequest = new IndexRequest(index,type,documentID); } public IndexRequestBuilder(String index,String type){ this.indexRequest = new IndexRequest(index,type); } public IndexRequest creat(){ return this.indexRequest; } public IndexRequestBuilder data(String jsonStr){ this.indexRequest.source(jsonStr); return this; } public IndexRequestBuilder data(Map<String,Object> data){ this.indexRequest.source(data); return this; } public IndexRequestBuilder data(XContentBuilder builder){ this.indexRequest.source(builder); return this; } public IndexRequestBuilder routing(String routing){ indexRequest.routing(routing); return this; } //? public IndexRequestBuilder parent(String parent){ indexRequest.parent(parent); return this; } /** * Timeout to wait for primary shard to become available * TimeValue.timeValueSeconds(1); * TimeValue.timeValueMinutes(1); * @param time * @return */ public IndexRequestBuilder timeout(TimeValue time){ indexRequest.timeout(time); return this; } /** * WriteRequest.RefreshPolicy.WAIT_UNTIL * WriteRequest.RefreshPolicy.IMMEDIATE * WriteRequest.RefreshPolicy.NONE * @param policy * @return */ public IndexRequestBuilder refreshPolicy(WriteRequest.RefreshPolicy policy){ indexRequest.setRefreshPolicy(policy); return this; } public IndexRequestBuilder version(long version,VersionType versionType){ indexRequest.version(version); indexRequest.versionType(versionType); return this; } /** * op_type = DocWriteRequest.OpType.CREATE时, * 如果插入数据的id存在,则操作失败 * @param oftype * @return */ public IndexRequestBuilder opType(DocWriteRequest.OpType oftype){ indexRequest.opType(oftype); return this; } /** * The name of the ingest pipeline to be executed before indexing the document * @param pipeline * @return */ public IndexRequestBuilder setPipeline(String pipeline){ indexRequest.setPipeline(pipeline); return this; } } }
[ "294975286@qq.com" ]
294975286@qq.com
15552e7f83ad3a37c7af17aed820946d7f2b03ab
a81028887a7f6aefea823443d79d241cca2135a5
/src/main/java/com/udev/factory/ReverseLFigureCreator.java
a2ffeae260cda53794a88f42ba9ffbde9ac54752
[]
no_license
OlegKrupenya/Blocks
f02dddb9e9067c9f6458fd9132478bfa92c62c8c
11f3afc68cb50401d60349d5af69d61a144b961e
refs/heads/master
2021-01-23T06:40:20.643561
2013-10-16T11:05:30
2013-10-16T11:05:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
365
java
package com.udev.factory; import com.udev.domain.figures.Figure; import com.udev.domain.figures.JFigure; /** * Created with IntelliJ IDEA. * * @author taipan * Date: 14.09.13 * Time: 23:46 */ public class ReverseLFigureCreator implements FigureCreator { @Override public Figure createFigure() { return new JFigure(); } }
[ "taipan90@rambler.ru" ]
taipan90@rambler.ru
50499f848b6d7f7c6e65bd15c3c33af080b04b46
86994e4f9ac8f9cb4bed15c53351ff26c9c45018
/src/main/java/com/bahia/fibonacci/service/FibonacciService.java
d4e8a7c391e57c240100b2d924265b77b98fe90e
[]
no_license
Sergiolsz/bahia
ad0bb71db4aadfa8f22135c6d84fc06fadf83b34
9aa1e93791f3ac1db9424934ab8b6f77f8e05118
refs/heads/master
2022-12-07T08:40:13.437638
2020-08-27T19:48:07
2020-08-27T19:48:07
290,841,720
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package com.bahia.fibonacci.service; import org.springframework.http.ResponseEntity; import com.bahia.fibonacci.model.Fibonacci; import com.bahia.fibonacci.model.FibonacciNumber; public interface FibonacciService { ResponseEntity<Fibonacci> getSerieFibonacci(int sizeSequence); ResponseEntity<FibonacciNumber> getNumberPositionFibonacci(int sizeSequence, int numberPosition); }
[ "sliebanas@vectoritcgroup.com" ]
sliebanas@vectoritcgroup.com
5ebded79f176447e3c215d9107a4586b336d40a5
66360324dd7c8b80588e0f0f517fc36c8023175d
/app/src/main/java/com/slawski/quicklist/Recycler/ItemTouchHelperAdapter.java
1e20836a306e9bd511c771b4996969feb5cdbc85
[]
no_license
eslawski/quick-list
23b1fdd5d2cd28dac36656c66d3283378c247766
69779f695162848cc7958e5d690104405751fa6e
refs/heads/master
2021-06-14T20:38:04.144495
2017-03-16T00:47:14
2017-03-16T00:47:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,521
java
package com.slawski.quicklist.Recycler; /** * Interface that allows us to plug into certain user interactions controlled by ItemTouchCallbackHelper. * This allows the adapter to perform any logic it needs as views are interacted with. (i.e. swiping tasks) * * A similar pattern can be followed for the ViewHolder to control the state specific views as * they are interacted with. (i.e styling a task to appear 'selected'). */ public interface ItemTouchHelperAdapter { /** * Callback for when an item is dragged. * @param fromPosition from position * @param toPosition to position */ void onItemMove(int fromPosition, int toPosition); /** * Callback for when an swipe is completed. * @param position Position for which the swipe was completed */ void onSwipeCompleted(int position); /** * Callback for when a swipe is in progress and the 'swipe background' needs to be displayed. * The swipe background will be displayed with the exact dimensions/position of the view holder * creating a nice "background" effect as the swipe is in progress. * @param top Vertical coordinate of the view holder for the view being swiped * @param width Width of the view holder for the view being swiped * @param height Height of the view holder for the view being swiped */ void onSwipeInProgress(int top, int width, int height); /** * Callback for when a swipe is canceled by the user. */ void onSwipeCanceled(); }
[ "eslawski@umich.edu" ]
eslawski@umich.edu
a0d1d2c4ae5b7e4fa19b98164f39fcaf34a77131
0851cacd896fd2337e993c2d056bf143727f32d0
/Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/VerticalChoicesPanel.java
887777efcf8b9b8405a6856eb07765a7a13b57b7
[ "Apache-2.0", "GPL-1.0-or-later", "GPL-3.0-only", "LicenseRef-scancode-public-domain", "LGPL-2.1-only", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Oroggs/Long
77f550353889cd483d23b65ce1285c5819b4986d
5668235a9b3c748eab515011b4893bcecfc61a0e
refs/heads/master
2020-05-18T12:59:46.576982
2019-04-30T09:30:47
2019-04-30T09:30:47
184,426,285
1
0
Apache-2.0
2019-05-01T14:12:19
2019-05-01T14:12:19
null
UTF-8
Java
false
false
19,269
java
/* ### * IP: GHIDRA * REVIEWED: YES * * 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 ghidra.app.merge.listing; import ghidra.app.merge.util.ConflictUtility; import ghidra.util.datastruct.LongArrayList; import ghidra.util.layout.MaximizeSpecificColumnGridLayout; import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; import javax.swing.border.Border; import javax.swing.border.TitledBorder; import javax.swing.event.ChangeListener; /** * <CODE>VerticalChoicesPanel</CODE> is a conflict panel for the Listing Merge. * It lays out rows of information vertically in a table format. * Each row can be a header row, an information row, a single choice row, * or a multiple choice row. * <BR>Single choice rows provide a radio button and are used when a single * choice must be made from multiple rows of choices. * <BR>Multiple choice rows provide a check box and are used when more than one * choice can be made from multiple rows of choices. * <BR>Note: Single choice and multiple choice rows are not intended to be * intermixed on the same panel. * <BR>A header label can be set. This appears above the row table. The text * for the header label should be HTML. */ public class VerticalChoicesPanel extends ConflictPanel { private final static long serialVersionUID = 1; final static int HEADER = 0; final static int INFORMATION = 1; final static int RADIO_BUTTON = 2; final static int CHECK_BOX = 3; private JLabel headerLabel; private JPanel rowPanel; private ArrayList<ArrayList<JComponent>> rowComps; private ArrayList<String[]> rows; private LongArrayList rowTypes; private ButtonGroup group; private int columnCount = 1; private MaximizeSpecificColumnGridLayout layout; private int indent; private static final int DEFAULT_TOP = 2; private static final int DEFAULT_LEFT = 4; private static final int DEFAULT_BOTTOM = 2; private static final int DEFAULT_RIGHT = 4; private Insets defaultInsets; private Insets textVsButtonInsets; private Insets textVsCheckBoxInsets; /** * Creates an empty <CODE>VerticalChoicesPanel</CODE> */ public VerticalChoicesPanel() { super(); init(); } /** * @param isDoubleBuffered */ public VerticalChoicesPanel(boolean isDoubleBuffered) { super(isDoubleBuffered); init(); } private void init() { setBorder(BorderFactory.createTitledBorder("Resolve Conflict")); setLayout(new BorderLayout()); headerLabel = new JLabel(" "); headerLabel.setHorizontalAlignment(SwingConstants.CENTER); add(headerLabel, BorderLayout.NORTH); rowComps = new ArrayList<ArrayList<JComponent>>(); rows = new ArrayList<String[]>(); rowTypes = new LongArrayList(); group = new ButtonGroup(); layout = new MaximizeSpecificColumnGridLayout(5, 5, columnCount); layout.maximizeColumn(0); rowPanel = new JPanel(layout); add(rowPanel, BorderLayout.CENTER); rowPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); JRadioButton rb = new JRadioButton(); JCheckBox cb = new JCheckBox(); indent = Math.max(rb.getPreferredSize().width, cb.getPreferredSize().width); defaultInsets = new Insets(DEFAULT_TOP, DEFAULT_LEFT, DEFAULT_BOTTOM, DEFAULT_RIGHT); int labelHeight = (int) new JLabel("A").getPreferredSize().getHeight(); double buttonHeight = new MyRadioButton("A", ListingMergeConstants.KEEP_LATEST).getPreferredSize().getHeight(); int borderHeight; borderHeight = (int) ((buttonHeight - labelHeight) / 2); if (borderHeight < 0) { borderHeight = 0; } textVsButtonInsets = new Insets(DEFAULT_TOP + borderHeight, DEFAULT_LEFT, DEFAULT_BOTTOM + borderHeight, DEFAULT_RIGHT); double checkBoxHeight = new MyCheckBox("A", ListingMergeConstants.KEEP_LATEST).getPreferredSize().getHeight(); borderHeight = (int) ((checkBoxHeight - labelHeight) / 2); if (borderHeight < 0) { borderHeight = 0; } textVsCheckBoxInsets = new Insets(DEFAULT_TOP + borderHeight, DEFAULT_LEFT, DEFAULT_BOTTOM + borderHeight, DEFAULT_RIGHT); add(createUseForAllCheckBox(), BorderLayout.SOUTH); } /** * This sets the text that appears as the border title of this panel. * @param conflictType the type of conflict being resolved. */ void setTitle(String conflictType) { ((TitledBorder) getBorder()).setTitle("Resolve " + conflictType + " Conflict"); } /** * This sets the header text that appears above the table. * @param text the text */ void setHeader(String text) { if (text != null && text.length() != 0) { headerLabel.setText(ConflictUtility.wrapAsHTML(text)); add(headerLabel, BorderLayout.NORTH); } else { headerLabel.setText(""); remove(headerLabel); } validate(); invalidate(); } void setRowHeader(String[] items) { adjustColumnCount(items.length); JComponent[] headerComps = getRowComponents(0); if (headerComps != null) { // remove the header for (int i = 0; i < headerComps.length; i++) { rowPanel.remove(headerComps[i]); } headerComps = null; if (rowComps.isEmpty()) { rowComps.add(0, new ArrayList<JComponent>()); } else { rowComps.set(0, new ArrayList<JComponent>()); } } if (rowTypes.isEmpty()) { rowTypes.add(HEADER); } else { rowTypes.set(0, (long) HEADER); } if ((items != null) && (items.length > 0)) { if (rows.isEmpty()) { rows.add(0, items); } else { rows.set(0, items); } // create the header. headerComps = new JComponent[items.length]; for (int i = 0; i < headerComps.length; i++) { headerComps[i] = new MyLabel(items[i]); headerComps[i].setName(getComponentName(0, i)); setRowComponent(headerComps[i], 0, i, defaultInsets); headerComps[i].setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.BLACK)); } } rowPanel.validate(); validate(); invalidate(); } private void adjustColumnCount(int numberOfColumns) { if (numberOfColumns <= 0) { numberOfColumns = 1; } if (columnCount != numberOfColumns) { columnCount = numberOfColumns; layout = new MaximizeSpecificColumnGridLayout(5, 5, columnCount); layout.maximizeColumn(0); rowPanel.setLayout(layout); } } /** * Gets the GUI components in order from left to right for the indicated row of the display table. * @param row the row index (0 based). * @return the components. */ private JComponent[] getRowComponents(int row) { if (rowComps.isEmpty()) { return new JComponent[0]; } ArrayList<JComponent> list = rowComps.get(row); if (list == null || list.size() == 0) { return new JComponent[0]; } JComponent[] comps = list.toArray(new JComponent[list.size()]); return comps; } private void setRowComponent(JComponent comp, int row, int column, Insets insets) { rowPanel.add(comp); int numRows = rowComps.size(); if (row >= numRows) { // Creating brand new row. for (int i = numRows; i <= row; i++) { rowComps.add(i, new ArrayList<JComponent>()); } } ArrayList<JComponent> list = rowComps.get(row); for (int i = list.size(); i <= column; i++) { list.add(null); } list.set(column, comp); } /** * Adds a row with the items in each column. The first item's component is a radio button. * @param items the text for each column. * @param name the name for the radio button component. * @param conflictOption the conflict option value associated with selecting this row's radio button. * @param listener listener to be notified when the radio button is selected. */ void addRadioButtonRow(final String[] items, final String name, final int conflictOption, final ChangeListener listener) { adjustColumnCount(items.length); final int row = rows.size(); rowTypes.add(RADIO_BUTTON); rows.add(items); final MyRadioButton firstComp = new MyRadioButton(items[0], conflictOption); group.add(firstComp); firstComp.setName(name); ItemListener itemListener = new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { if (listener != null && ((JRadioButton) e.getSource()).isSelected()) { ResolveConflictChangeEvent event = new ResolveConflictChangeEvent(firstComp, row, getSelectedOptions()); listener.stateChanged(event); } } }; firstComp.addItemListener(itemListener); setRowComponent(firstComp, row, 0, defaultInsets); for (int i = 1; i < items.length; i++) { JLabel newComp = new MyLabel(items[i]); newComp.setName(getComponentName(row, i)); setRowComponent(newComp, row, i, textVsButtonInsets); } rowPanel.validate(); validate(); invalidate(); } /** * Adds a row with the items in each column. The first item's component is a check box. * @param items the text for each column. * @param name the name for the check box component. * @param conflictOption the conflict option value associated with selecting this row's check box. * @param listener listener to be notified when the check box is selected or not selected. */ void addCheckBoxRow(final String[] items, final String name, final int conflictOption, final ChangeListener listener) { adjustColumnCount(items.length); int row = rows.size(); rowTypes.add(CHECK_BOX); rows.add(items); MyCheckBox firstComp = new MyCheckBox(items[0], conflictOption); firstComp.setName(name); ItemListener itemListener = new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { if (listener != null) { listener.stateChanged(null); } } }; firstComp.addItemListener(itemListener); setRowComponent(firstComp, row, 0, defaultInsets); for (int i = 1; i < items.length; i++) { JLabel newComp = new MyLabel(items[i]); newComp.setName(getComponentName(row, i)); setRowComponent(newComp, row, i, textVsCheckBoxInsets); } rowPanel.validate(); validate(); invalidate(); } /** * Adds a row to the table that doesn't provide any choices. * Instead this row just provides information. * * @param items the text for each column. */ void addInfoRow(String[] items) { adjustColumnCount(items.length); int row = rows.size(); rowTypes.add(INFORMATION); rows.add(items); MyLabel firstComp = new MyLabel(items[0]); firstComp.setBorder(BorderFactory.createEmptyBorder(0, indent, 0, 0)); firstComp.setName(getComponentName(row, 0)); setRowComponent(firstComp, row, 0, defaultInsets); for (int i = 1; i < items.length; i++) { MyLabel newComp = new MyLabel(items[i]); newComp.setName(getComponentName(row, i)); setRowComponent(newComp, row, i, defaultInsets); } rowPanel.validate(); validate(); invalidate(); } /** * Removes header text for this panel and all table/row information. * It also sets the columnCount back to 1. */ @Override public void clear() { setHeader(null); ListIterator<ArrayList<JComponent>> iter = rowComps.listIterator(); while (iter.hasNext()) { ArrayList<JComponent> compList = iter.next(); ListIterator<JComponent> compIter = compList.listIterator(); while (compIter.hasNext()) { Component rowComp = compIter.next(); rowPanel.remove(rowComp); } compList.clear(); } rowComps.clear(); rows.clear(); rowTypes.clear(); group = new ButtonGroup(); columnCount = 1; rowPanel.validate(); validate(); invalidate(); } /** * Gets a generic name for a component in the table. * @param row the row of the table * @param column the column of the table * @return the default name of the indicated component in the table. */ String getComponentName(int row, int column) { return "ChoiceComponentRow" + row + "Col" + column; } /** * Returns true if the user made a selection for every conflict in the table. */ @Override public boolean allChoicesAreResolved() { for (int row = 0; row < rows.size(); row++) { JComponent comp = getComponent(row, 0); if ((comp instanceof MyRadioButton) && (((MyRadioButton) comp).isSelected())) { return true; } else if ((comp instanceof MyCheckBox) && (((MyCheckBox) comp).isSelected())) { return true; } } return false; } /* (non-Javadoc) * @see ghidra.app.merge.listing.ChoiceComponent#getNumConflictsResolved() */ @Override public int getNumConflictsResolved() { int count = 0; for (int row = 0; row < rows.size(); row++) { JComponent comp = getComponent(row, 0); if ((comp instanceof MyRadioButton) && (((MyRadioButton) comp).isSelected())) { count++; } else if ((comp instanceof MyCheckBox) && (((MyCheckBox) comp).isSelected())) { count++; } } return count; } /** * @return */ protected int getSelectedOptions() { int option = 0; for (int row = 0; row < rows.size(); row++) { JComponent comp = getComponent(row, 0); if ((comp instanceof MyRadioButton) && (((MyRadioButton) comp).isSelected())) { option |= ((MyRadioButton) comp).getOption(); } else if ((comp instanceof MyCheckBox) && (((MyCheckBox) comp).isSelected())) { option |= ((MyCheckBox) comp).getOption(); } } return option; } /** * @param row * @param i * @return */ private JComponent getComponent(int row, int column) { JComponent[] comps = getRowComponents(row); if (column < comps.length) { return comps[column]; } return null; } /** * Returns true if the user made a selection for every conflict in the table and * made the same choice for every row. */ @Override public boolean allChoicesAreSame() { return allChoicesAreResolved(); } private class MyLabel extends JLabel { private final static long serialVersionUID = 1; /** * @param text the text of this label. */ public MyLabel(final String text) { super(text); addComponentListener(new ComponentListener() { @Override public void componentResized(ComponentEvent e) { // Set a tooltip if we can't see all the text. String displayedText = getText(); if (displayedText == null) { setToolTipText(null); return; } Border border2 = MyLabel.this.getBorder(); Insets borderInsets = (border2 != null) ? border2.getBorderInsets(MyLabel.this) : null; int left2 = (borderInsets != null) ? borderInsets.left : 0; int displayedWidth = getWidth() - left2; Font displayedFont = getFont(); FontMetrics fontMetrics = (displayedFont != null) ? getFontMetrics(displayedFont) : null; int stringWidth = (fontMetrics != null) ? fontMetrics.stringWidth(displayedText) : 0; setToolTipText((stringWidth > displayedWidth) ? text : null); } @Override public void componentMoved(ComponentEvent e) { // Do nothing. } @Override public void componentShown(ComponentEvent e) { // Do nothing. } @Override public void componentHidden(ComponentEvent e) { // Do nothing. } }); } } private class MyRadioButton extends JRadioButton { private final static long serialVersionUID = 1; private int option; /** * @param text the text for this radio button * @param option the option value associated with this radio button. */ public MyRadioButton(final String text, int option) { super(text); this.option = option; addComponentListener(new ComponentListener() { @Override public void componentResized(ComponentEvent e) { // Set a tooltip if we can't see all the text. String displayedText = getText(); if (displayedText == null) { setToolTipText(null); return; } int displayedWidth = getWidth() - indent; Font displayedFont = getFont(); FontMetrics fontMetrics = (displayedFont != null) ? getFontMetrics(displayedFont) : null; int stringWidth = (fontMetrics != null) ? fontMetrics.stringWidth(displayedText) : 0; setToolTipText((stringWidth > displayedWidth) ? displayedText : null); } @Override public void componentMoved(ComponentEvent e) { // Do nothing. } @Override public void componentShown(ComponentEvent e) { // Do nothing. } @Override public void componentHidden(ComponentEvent e) { // Do nothing. } }); } /** * Gets the option value associated with this button. */ private int getOption() { return option; } } private class MyCheckBox extends JCheckBox { private final static long serialVersionUID = 1; private int option; /** * @param text the text for this check box * @param option the option value associated with this check box. */ public MyCheckBox(String text, int option) { super(text); this.option = option; addComponentListener(new ComponentListener() { @Override public void componentResized(ComponentEvent e) { // Set a tooltip if we can't see all the text. String displayedText = getText(); if (displayedText == null) { setToolTipText(null); return; } int displayedWidth = getWidth() - indent; Font displayedFont = getFont(); FontMetrics fontMetrics = (displayedFont != null) ? getFontMetrics(displayedFont) : null; int stringWidth = (fontMetrics != null) ? fontMetrics.stringWidth(displayedText) : 0; setToolTipText((stringWidth > displayedWidth) ? displayedText : null); } @Override public void componentMoved(ComponentEvent e) { // Do nothing. } @Override public void componentShown(ComponentEvent e) { // Do nothing. } @Override public void componentHidden(ComponentEvent e) { // Do nothing. } }); } /** * Gets the option value associated with this check box. */ private int getOption() { return option; } } @Override public int getUseForAllChoice() { int conflictOption = 0; int rowCount = rowComps.size(); for (int row = 0; row < rowCount; row++) { JComponent[] comps = getRowComponents(row); for (int i = 0; i < comps.length; i++) { JComponent component = comps[i]; if (component instanceof MyRadioButton && ((MyRadioButton) component).isSelected()) { conflictOption |= ((MyRadioButton) component).option; } else if (component instanceof MyCheckBox && ((MyCheckBox) component).isSelected()) { conflictOption |= ((MyCheckBox) component).option; } } } return conflictOption; } /* (non-Javadoc) * @see ghidra.app.merge.listing.ConflictPanel#removeAllListeners() */ @Override public void removeAllListeners() { // Do nothing. } /* (non-Javadoc) * @see ghidra.app.merge.listing.ConflictPanel#hasChoice() */ @Override public boolean hasChoice() { for (Iterator<Long> iterator = rowTypes.iterator(); iterator.hasNext();) { long rowType = iterator.next().longValue(); if (rowType == RADIO_BUTTON || rowType == CHECK_BOX) { return true; } } return false; } }
[ "46821332+nsadeveloper789@users.noreply.github.com" ]
46821332+nsadeveloper789@users.noreply.github.com
eba1298961f7deb9123541991d6bad0c1cfee929
8816d68ab35cee25ef801fef38851aa9727bf7f6
/app/src/main/java/com/example/ujjwalkumar/medical_record/Data.java
e2f7a3315abccf2cd5de84e3ad05d467a789cdf7
[]
no_license
ukt1997/medical_Database
51efae517ee0934e68e93aa6cfd593d1f0edbfe1
37d80e343b217543ac3044addafe00d1765c8e25
refs/heads/master
2021-04-09T14:55:31.565674
2018-03-16T18:29:30
2018-03-16T18:29:30
125,551,001
0
0
null
null
null
null
UTF-8
Java
false
false
1,333
java
package com.example.ujjwalkumar.medical_record; /** * Created by Ujjwal Kumar on 12-03-2018. */ public class Data { private int id; private String name; private String address; private String mobile; private String age; private byte[] image; public Data(int id, String name, String address, String mobile, String age, byte[] image) { this.id = id; this.name = name; this.address = address; this.mobile = mobile; this.age = age; this.image = image; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getAge() { return age; } public void setAge(String age) { this.age = age; } public byte[] getImage() { return image; } public void setImage(byte[] image) { this.image = image; } }
[ "ukt1997@gmail.com" ]
ukt1997@gmail.com
acbdb0085ee83d86934e3fd562fa59b16b27a035
b4ee1933ddbf87e19fa5d5fc7fd495fd4eca029c
/riptide-spring-boot-starter/src/test/java/org/zalando/riptide/spring/ManualConfiguration.java
6e1f867bd824f604cc5ee3491f8c0dae037d4385
[ "MIT" ]
permissive
snurmine/riptide
c4466d7f001bbcbfcdb104d7c2b85cdb519f340d
d29669e426fbce276d5ab3e8a94d98c14d5eef39
refs/heads/master
2021-01-25T09:52:42.234339
2018-02-27T13:27:02
2018-02-27T13:27:02
123,323,333
0
0
MIT
2018-02-28T18:11:34
2018-02-28T18:11:33
null
UTF-8
Java
false
false
11,573
java
package org.zalando.riptide.spring; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; import net.jodah.failsafe.CircuitBreaker; import net.jodah.failsafe.RetryPolicy; import org.apache.http.ConnectionClosedException; import org.apache.http.NoHttpResponseException; import org.apache.http.client.config.RequestConfig; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.ssl.SSLContexts; import org.springframework.boot.actuate.autoconfigure.MetricsDropwizardAutoConfiguration; import org.springframework.boot.actuate.metrics.GaugeService; import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.http.client.AsyncClientHttpRequestFactory; import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.converter.StringHttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.scheduling.concurrent.ConcurrentTaskExecutor; import org.springframework.scheduling.concurrent.CustomizableThreadFactory; import org.springframework.web.client.AsyncRestTemplate; import org.springframework.web.client.RestTemplate; import org.springframework.web.util.DefaultUriTemplateHandler; import org.zalando.logbook.Logbook; import org.zalando.logbook.httpclient.LogbookHttpRequestInterceptor; import org.zalando.logbook.httpclient.LogbookHttpResponseInterceptor; import org.zalando.logbook.spring.LogbookAutoConfiguration; import org.zalando.riptide.Http; import org.zalando.riptide.OriginalStackTracePlugin; import org.zalando.riptide.UrlResolution; import org.zalando.riptide.backup.BackupRequestPlugin; import org.zalando.riptide.failsafe.FailsafePlugin; import org.zalando.riptide.faults.FaultClassifier; import org.zalando.riptide.faults.TransientFaultException; import org.zalando.riptide.faults.TransientFaultPlugin; import org.zalando.riptide.httpclient.RestAsyncClientHttpRequestFactory; import org.zalando.riptide.metrics.MetricsPlugin; import org.zalando.riptide.spring.PluginTest.CustomPlugin; import org.zalando.riptide.stream.Streams; import org.zalando.riptide.timeout.TimeoutPlugin; import org.zalando.stups.oauth2.httpcomponents.AccessTokensRequestInterceptor; import org.zalando.stups.tokens.AccessTokens; import org.zalando.stups.tokens.JsonFileBackedClientCredentialsProvider; import org.zalando.stups.tokens.JsonFileBackedUserCredentialsProvider; import org.zalando.stups.tokens.Tokens; import org.zalando.tracer.Tracer; import org.zalando.tracer.concurrent.TracingExecutors; import org.zalando.tracer.httpclient.TracerHttpRequestInterceptor; import org.zalando.tracer.spring.TracerAutoConfiguration; import java.io.File; import java.net.URI; import java.util.Arrays; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor.AbortPolicy; import java.util.function.Predicate; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.http.conn.ssl.SSLConnectionSocketFactory.getDefaultHostnameVerifier; @Configuration public class ManualConfiguration { @Configuration static class SharedConfiguration { @Bean(destroyMethod = "stop") public AccessTokens tokens() { return Tokens.createAccessTokensWithUri(URI.create("https://auth.example.com")) .usingClientCredentialsProvider( new JsonFileBackedClientCredentialsProvider(new File("/credentials/client.json"))) .usingUserCredentialsProvider( new JsonFileBackedUserCredentialsProvider(new File("/credentials/user.json"))) .schedulingPeriod(5) .schedulingTimeUnit(SECONDS) .connectionRequestTimeout(1000) .socketTimeout(2000) .manageToken("example") .addScope("uid") .addScope("example.read") .done() .start(); } } @Configuration // just for documentation, should not be imported manually @Import({ LogbookAutoConfiguration.class, TracerAutoConfiguration.class, JacksonAutoConfiguration.class, MetricsDropwizardAutoConfiguration.class, SharedConfiguration.class, }) static class ExampleClientConfiguration { @Bean public Http exampleHttp(final AsyncClientHttpRequestFactory requestFactory, final ClientHttpMessageConverters converters, final GaugeService gaugeService, final ScheduledExecutorService scheduler) { return Http.builder() .baseUrl("https://www.example.com") .urlResolution(UrlResolution.RFC) .requestFactory(requestFactory) .converters(converters.getConverters()) .plugin(new MetricsPlugin(gaugeService, new ZMONMetricsNameGenerator())) .plugin(new TransientFaultPlugin( FaultClassifier.create(ImmutableList.<Predicate<Throwable>>builder() .addAll(FaultClassifier.defaults()) .add(ConnectionClosedException.class::isInstance) .add(NoHttpResponseException.class::isInstance) .build()))) .plugin(new FailsafePlugin(scheduler) .withRetryPolicy(new RetryPolicy() .retryOn(TransientFaultException.class) .withBackoff(50, 2000, MILLISECONDS) .withMaxRetries(10) .withMaxDuration(2, SECONDS) .withJitter(0.2)) .withCircuitBreaker(new CircuitBreaker() .withFailureThreshold(5, 5) .withDelay(30, SECONDS) .withSuccessThreshold(3, 5) .withTimeout(3, SECONDS))) .plugin(new BackupRequestPlugin(scheduler, 10, MILLISECONDS)) .plugin(new TimeoutPlugin(scheduler, 3, SECONDS)) .plugin(new OriginalStackTracePlugin()) .plugin(new CustomPlugin()) .build(); } @Bean public RestTemplate exampleRestTemplate(final ClientHttpRequestFactory requestFactory, final ClientHttpMessageConverters converters) { final RestTemplate template = new RestTemplate(); final DefaultUriTemplateHandler handler = new DefaultUriTemplateHandler(); handler.setBaseUrl("https://www.example.com"); template.setUriTemplateHandler(handler); template.setRequestFactory(requestFactory); template.setMessageConverters(converters.getConverters()); return template; } @Bean public AsyncRestTemplate exampleAsyncRestTemplate(final AsyncClientHttpRequestFactory requestFactory, final ClientHttpMessageConverters converters) { final AsyncRestTemplate template = new AsyncRestTemplate(); final DefaultUriTemplateHandler handler = new DefaultUriTemplateHandler(); handler.setBaseUrl("https://www.example.com"); template.setUriTemplateHandler(handler); template.setAsyncRequestFactory(requestFactory); template.setMessageConverters(converters.getConverters()); return template; } @Bean public RestAsyncClientHttpRequestFactory exampleAsyncClientHttpRequestFactory( final AccessTokens tokens, final Tracer tracer, final Logbook logbook, final ExecutorService executor) throws Exception { return new RestAsyncClientHttpRequestFactory( HttpClientBuilder.create() .setDefaultRequestConfig(RequestConfig.custom() .setConnectTimeout(5000) .setSocketTimeout(5000) .build()) .setConnectionTimeToLive(30, SECONDS) .setMaxConnPerRoute(2) .setMaxConnTotal(20) .addInterceptorFirst(new AccessTokensRequestInterceptor("example", tokens)) .addInterceptorFirst(new TracerHttpRequestInterceptor(tracer)) .addInterceptorLast(new LogbookHttpRequestInterceptor(logbook)) .addInterceptorLast(new GzippingHttpRequestInterceptor()) .addInterceptorLast(new LogbookHttpResponseInterceptor()) .setSSLSocketFactory(new SSLConnectionSocketFactory( SSLContexts.custom() .loadTrustMaterial( getClass().getClassLoader().getResource("example.keystore"), "password".toCharArray()) .build(), getDefaultHostnameVerifier())) .build(), new ConcurrentTaskExecutor(executor)); } @Bean(destroyMethod = "shutdown") public ExecutorService executor(final Tracer tracer) { return TracingExecutors.preserve( new ThreadPoolExecutor( 1, 20, 1, MINUTES, new ArrayBlockingQueue<>(0), new CustomizableThreadFactory("http-example-"), new AbortPolicy()), tracer); } @Bean(destroyMethod = "shutdown") public ScheduledExecutorService scheduler(final Tracer tracer) { return TracingExecutors.preserve( Executors.newScheduledThreadPool( 20, // TODO max-connections-total? new CustomizableThreadFactory("http-example-scheduler-")), tracer); } @Bean public ClientHttpMessageConverters exampleHttpMessageConverters(final ObjectMapper mapper) { final StringHttpMessageConverter textConverter = new StringHttpMessageConverter(); textConverter.setWriteAcceptCharset(false); return new ClientHttpMessageConverters(Arrays.asList( textConverter, new MappingJackson2HttpMessageConverter(mapper), Streams.streamConverter(mapper) )); } } }
[ "willi.schoenborn@zalando.de" ]
willi.schoenborn@zalando.de
087737b67f31f7d86d53a80b87e7a46abf19c975
cb166c4c2c832a05fb54344a7e48688de553b031
/apps/src/main/java/org/syphr/mythtv/apps/previewer/PreviewerWindow.java
b7578f01b9432ad862ec66d1e08e0f9f1cbe9b3a
[ "Apache-2.0" ]
permissive
rtk4616/libmythtv-java
ea8b198aa70a338a75d967dc18132a60a403f7c0
cc7a2012fbd4a4ba2562dda6b2614fb0548526ea
refs/heads/master
2020-03-30T19:07:26.365942
2012-05-11T22:22:58
2012-05-11T22:22:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,848
java
/* * Copyright 2011-2012 Gregory P. Moyer * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.syphr.mythtv.apps.previewer; import java.awt.BorderLayout; import java.awt.Component; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.swing.BorderFactory; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultListCellRenderer; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.syphr.mythtv.data.Program; import org.syphr.mythtv.protocol.Protocol; import org.syphr.mythtv.types.RecordingCategory; /** * This class provides a quick way to examine preview images for existing * recordings. It is not meant to be re-used in application code as it takes * many shortcuts around the proper Swing way, including making network calls * directly inside UI event handlers! If this little app proves useful, I will * clean it up. * * @author Gregory P. Moyer */ public class PreviewerWindow extends JFrame { /** * Serialization ID */ private static final long serialVersionUID = 1L; /** * Standard logging facility. */ private static final Logger LOGGER = LoggerFactory.getLogger(PreviewerWindow.class); private final Protocol protocol; public PreviewerWindow(Protocol protocol) { this.protocol = protocol; initGUI(); } private void initGUI() { setTitle("Preview Image Viewer"); setLayout(new BorderLayout()); final ViewerPanel viewerPanel = new ViewerPanel(protocol); viewerPanel.setBorder(BorderFactory.createTitledBorder("Preview Image")); add(viewerPanel, BorderLayout.CENTER); final JComboBox programsComboBox = new JComboBox(); programsComboBox.setRenderer(new DefaultListCellRenderer() { /** * Serialization ID */ private static final long serialVersionUID = 1L; @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JLabel label = (JLabel)super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value instanceof Program) { Program program = (Program)value; label.setText(program.getTitle() + " - " + program.getSubtitle()); } else { label.setText("<No program selected>"); } return label; } }); programsComboBox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { if (ItemEvent.SELECTED != e.getStateChange()) { return; } Object item = e.getItem(); if (item instanceof Program) { viewerPanel.setProgram((Program)item); } else { viewerPanel.setProgram(null); } } }); List<RecordingCategory> categories = protocol.getAvailableTypes(RecordingCategory.class); JComboBox categoriesComboBox = new JComboBox(categories.toArray(new RecordingCategory[categories.size()])); categoriesComboBox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent event) { if (ItemEvent.SELECTED != event.getStateChange()) { return; } List<Program> programs = new ArrayList<Program>(); programs.add(null); RecordingCategory category = (RecordingCategory)event.getItem(); try { programs.addAll(protocol.queryRecordings(category)); } catch (IOException e) { LOGGER.error("Unable to retrieve programs of type " + category, e); } programsComboBox.setModel(new DefaultComboBoxModel(programs.toArray(new Program[programs.size()]))); programsComboBox.setSelectedItem(null); } }); categoriesComboBox.setSelectedItem(null); categoriesComboBox.setSelectedIndex(0); GridBagLayout selectionLayout = new GridBagLayout(); selectionLayout.columnWeights = new double[] { 0.0, 0.0, 0.0, 1.0 }; selectionLayout.rowWeights = new double[] { 1.0 }; JPanel selectionPanel = new JPanel(selectionLayout); selectionPanel.setBorder(BorderFactory.createTitledBorder("Selection")); selectionPanel.add(new JLabel("Category:"), new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 3, 0, 0), 0, 0)); selectionPanel.add(categoriesComboBox, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 3, 0, 3), 0, 0)); selectionPanel.add(new JLabel("Program:"), new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 3, 0, 0), 0, 0)); selectionPanel.add(programsComboBox, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 3, 0, 3), 0, 0)); add(selectionPanel, BorderLayout.NORTH); } }
[ "moyerg@syphr.com" ]
moyerg@syphr.com
b94e9686fb61a48ecae5c18cceb30954be1922d0
f88f0300f0b33482abca5331a990fa17eb53aedc
/app/src/main/java/com/example/mactestproject/sunflower/FirstFragment.java
7f31ef23f76aa684eb64bb003940f0f2580ff11f
[]
no_license
gangtianwu/MacTestProject
57cab113c42518e43c4f5a913f7d97e880ff6937
bca5aea854faf6bfa30dfef92228c28fd6b9be31
refs/heads/master
2023-01-06T09:23:47.412455
2020-11-04T12:02:28
2020-11-04T12:02:28
283,734,524
0
0
null
null
null
null
UTF-8
Java
false
false
5,560
java
package com.example.mactestproject.sunflower; import android.content.Context; import android.content.Intent; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentActivity; import androidx.navigation.Navigation; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.example.mactestproject.R; import com.example.mactestproject.ViewModelActivity; import com.example.mactestproject.databinding.HomePageBinding; import com.google.android.material.tabs.TabLayout; import com.google.android.material.tabs.TabLayoutMediator; /** * A simple {@link Fragment} subclass. * Use the {@link FirstFragment#newInstance} factory method to * create an instance of this fragment. */ public class FirstFragment extends Fragment { // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; public static final String TAG ="测试Fragment: "; private String mParam1; private String mParam2; private HomePageBinding homePageBinding; public FirstFragment() { // Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param param1 Parameter 1. * @param param2 Parameter 2. * @return A new instance of fragment FirstFragment. */ public static FirstFragment newInstance(String param1, String param2) { FirstFragment fragment = new FirstFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } Log.i(TAG, "onCreate: "); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment Log.i(TAG, "onCreateView: "); homePageBinding = HomePageBinding.inflate(inflater, container, false); // return inflater.inflate(R.layout.fragment_first2, container, false); return homePageBinding.getRoot(); } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); Log.i(TAG, "onViewCreated: "); } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); Log.i(TAG, "onActivityCreated: "); // getView().findViewById(R.id.button31).setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View v) { // Navigation.findNavController(v).navigate(R.id.action_firstFragment2_to_secondFragment); // } // }); homePageBinding.viewpager2.setAdapter(new SunFlowerPagerAdapter(this)); new TabLayoutMediator(homePageBinding.tabs, homePageBinding.viewpager2, new TabLayoutMediator.TabConfigurationStrategy() { @Override public void onConfigureTab(@NonNull TabLayout.Tab tab, int position) { if (position == 0){ tab.setIcon(R.drawable.garden_tab_selector); tab.setText("我的花园"); } if (position == 1){ tab.setIcon(R.drawable.plant_list_tab_selector); tab.setText("植物列表"); } } }).attach(); AppCompatActivity activity = (AppCompatActivity) getActivity(); activity.setSupportActionBar(homePageBinding.toolbar); } @Override public void onViewStateRestored(@Nullable Bundle savedInstanceState) { super.onViewStateRestored(savedInstanceState); Log.i(TAG, "onViewStateRestored: "); } @Override public void onStart() { super.onStart(); Log.i(TAG, "onStart: "); } @Override public void onResume() { super.onResume(); Log.i(TAG, "onResume: "); } @Override public void onPause() { super.onPause(); Log.i(TAG, "onPause: "); } @Override public void onStop() { super.onStop(); Log.i(TAG, "onStop: "); } @Override public void onDestroyView() { super.onDestroyView(); Log.i(TAG, "onDestroyView: "); } @Override public void onDestroy() { super.onDestroy(); Log.i(TAG, "onDestroy: "); } @Override public void onDetach() { super.onDetach(); Log.i(TAG, "onDetach: "+ "=="+this.toString()); } @Override public void onAttach(@NonNull Context context) { super.onAttach(context); Log.i(TAG, "onAttach: "+getActivity().toString() + "=="+this.toString()); } @Override public String toString() { return getClass().getName() + "@" + Integer.toHexString(hashCode()); } }
[ "1142319514@qq.com" ]
1142319514@qq.com
2fc5af04df7bb8a479766b1b61571c5ef506df50
a0d7f8bb1402ff2dd904358101e674d6bfcd3ca3
/src/main/java/com/demo/util/LoadProperties.java
ed0ba63f2139e21d968527cb965820175485303f
[]
no_license
yangwei007/FaceDemo1
8ec63f097787d93d7f61ac40d0e1b98e314e9d65
4b6f30d10a43f6fa292d1a752371592d61f0bbf1
refs/heads/master
2020-05-17T01:36:48.987748
2019-04-25T12:31:17
2019-04-25T12:31:17
183,431,889
0
0
null
null
null
null
UTF-8
Java
false
false
847
java
package com.demo.util; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Properties; import org.springframework.util.ResourceUtils; public class LoadProperties { public static String loadProperties(String fileName,String name) { Properties properties = new Properties(); String value=""; try { File cfgFile = ResourceUtils.getFile("classpath:conf/"+fileName); InputStream stream = new FileInputStream(cfgFile); properties.load(new InputStreamReader(stream, "utf-8")); value = properties.getProperty(name).trim(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return value; } }
[ "1610044378@qq.com" ]
1610044378@qq.com
862c4574d1668216f1f82ac53cea83bbdd667b4d
8f57f414eb5333696e027a329a63e673238259db
/src/programs/Sort.java
82228ddb78975bef166cd3962e9b7e1a1ceded5e
[]
no_license
DhirajAggarwal/iCode
2db39dbcd073d3d8cfe2443a7999debed8b9afec
7b6ca9544b0846b100b307901db54a1fb3b1e253
refs/heads/master
2020-04-07T15:57:54.195297
2018-11-21T07:43:28
2018-11-21T07:43:28
158,509,222
0
0
null
null
null
null
UTF-8
Java
false
false
2,383
java
package programs; import javax.sound.sampled.ReverbType; public class Sort { public static void main(String[] args) { Sort sort = new Sort(); int[] ar = new int[] { 5, 4, 1, 2, 3 }; // sort.bubbleSort(ar); // sort.insertionSort(ar); // sort.selectionSort(ar); // String s = sort.reverse("dhi"); //int c = sort.countChars("AAA rating"); // filename Test.java } // BubbleSort public void bubbleSort(int[] arr) { int i, j, count = 1; boolean swapped; for (i = 0; i < arr.length - 1; i++) { for (j = 0; j < arr.length - i - 1; j++) { System.out.println("Swaping Count: " + count++); swapped = false; if (arr[j] > arr[j + 1]) { arr[j] = arr[j] + arr[j + 1]; arr[j + 1] = arr[j] - arr[j + 1]; arr[j] = arr[j] - arr[j + 1]; swapped = true; } if (swapped == false) break; } } print(arr); } // Insertion Sort public void insertionSort(int[] arr) { int i, j, count = 1; for (i = 1; i < arr.length; i++) { int key = arr[i]; j = i - 1; while (j >= 0 && key < arr[j]) { System.out.println("Swaping Count: " + count++); arr[j + 1] = arr[j]; j = j - 1; } arr[j + 1] = key; } print(arr); } // public void selectionSort(int[] arr) { int n = arr.length, count = 1, j, index = 0; for (int i = 0; i < n; i++) { index = i; for (j = i + 1; j < n - 1; j++) { System.out.println("Swaping Count: " + count++); if (arr[j] < arr[index]) { index = j; } } arr[i] = arr[i] + arr[index]; arr[index] = arr[i] - arr[index]; arr[i] = arr[i] - arr[index]; } print(arr); } // Reverse through recursion public String reverse(String str) { if (str == null || str.length() <= 1) { return str; } return reverse(str.substring(1)) + str.charAt(0); } // Count Character repetition in a string using recursion public int countChars(String str) { int count = 0; if (str == null || str.length() < 1) { return 0; } System.out.println(str + ": " + count); if (str.charAt(0) == 'A' || str.charAt(0) == 'a') { count=1; } return count + countChars(str.substring(1)); } // public void kuchBhi() { } public void print(int[] arr) { for (int i : arr) { System.out.println(i); } } public void swap(int a, int b) { a = a + b; b = a - b; a = a - b; System.out.println(a + " ," + b); } }
[ "dhirajaggarwal@mbk-tech-364-ub.mobikwik.com" ]
dhirajaggarwal@mbk-tech-364-ub.mobikwik.com
ceed241929960428d323b3d66861636cf93a4496
005ed33fd5a5e621b0dc80fb9bf7c8ec5d0eea19
/manageIO/src/main/java/IO/extensionParser/string/StringParserSheet.java
e27cc9e0d119a440017240f3a34e5d93ac44f179
[]
no_license
LotfiAli/Parallel-Programing-In-Java-With-approach-MapReduce
72b2b43222bfc9121e10516dfd0235c73b1852c0
26a52b5b507e15bb8bbf9ec3abb6ba9d3f03629b
refs/heads/master
2021-10-08T22:16:05.951904
2018-12-18T08:17:12
2018-12-18T08:17:12
83,955,574
1
0
null
null
null
null
UTF-8
Java
false
false
1,950
java
package IO.extensionParser.string; import IO.core.base.templateComponent.wrapperFile.WrapperBody; import IO.core.base.templateComponent.wrapperFile.WrapperHeader; import IO.core.exception.IOExcelException; import IO.core.parser.MetaDataObject; import IO.core.parserWrapper.ParserSheet; import java.util.List; /** * Created by alotfi on 6/6/2016. */ public class StringParserSheet implements ParserSheet { private List<String> sheet; private int index; private StringBuilder contentFile; private MetaDataObject metaDataObject; private String sheetName; private WrapperBody wrapperBody; public StringParserSheet(StringBuilder contentFile, MetaDataObject metaDataObject) { this.contentFile = contentFile; this.metaDataObject = metaDataObject; this.sheetName = metaDataObject.getSheetName(); } public StringParserSheet(List<String> sheet,int index) { this.sheet = sheet; this.index = index; } public WrapperHeader getHeader() throws IOExcelException { // try { // return new WrapperHeader(new StringParserRow(sheet.readLine())); // } catch (IOException e) { // throw new IOExcelException("error in read text File", e); // } return null; } public WrapperBody getBody() throws IOExcelException { wrapperBody = new WrapperBody(new StringParserBody(sheet,index)); return wrapperBody; } public String getName() { return sheetName; } public void setSheetName(String sheetName) { this.sheetName = sheetName; } public void create() { StringParserBody parserBody = new StringParserBody(contentFile, metaDataObject.getMetaDataObjects()); parserBody.create(); // StringParserHeader textParserHeader=new StringParserHeader(contentFile,metaDataObject.getMetaDataObjects().get(0)); // textParserHeader.create(); } }
[ "Al123456" ]
Al123456
7572c935af1383aaa73710f8447b164984f500f1
43a307d0eaac4b9bbcc04e2343116d4be7374057
/app/src/main/java/com/zerocool/biztrack/NavigationFragments/HomeFragment.java
1c786d0d0c085fe3584f33519f961ecb68c84705
[]
no_license
ShabbirDev/BizTrack
205de4ee3abe45c0a0ae972f007e420c7d132fa4
e3d07f7f6185895e5c6b4a53fc3cc07c8e91e532
refs/heads/master
2020-03-18T02:33:55.977322
2018-05-21T00:35:34
2018-05-21T00:35:34
134,196,995
0
0
null
null
null
null
UTF-8
Java
false
false
4,034
java
package com.zerocool.biztrack.NavigationFragments; import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.LinearLayout; import com.zerocool.biztrack.Fragments.Home; import com.zerocool.biztrack.Fragments.InventoryList; import com.zerocool.biztrack.R; public class HomeFragment extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; ImageButton NewEntry,CompletedSurvey; LinearLayout Layout; private OnFragmentInteractionListener mListener; public HomeFragment() { // Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param param1 Parameter 1. * @param param2 Parameter 2. * @return A new instance of fragment HomeFragment. */ // TODO: Rename and change types and number of parameters public static HomeFragment newInstance(String param1, String param2) { HomeFragment fragment = new HomeFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment //return inflater.inflate(R.layout.fragment_home, container, false); final View rootView = inflater.inflate(R.layout.fragment_home, container, false); replaceFragment(rootView); return rootView; } private void replaceFragment(View view){ Fragment fragment = new Home(); FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction(); ft.replace(R.id.main_content, fragment); ft.commit(); } // TODO: Rename method, update argument and hook method into UI event public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } } @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnFragmentInteractionListener) { mListener = (OnFragmentInteractionListener) context; } else { throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener"); } } @Override public void onDetach() { super.onDetach(); mListener = null; } /** * This interface must be implemented by activities that contain this * fragment to allow an interaction in this fragment to be communicated * to the activity and potentially other fragments contained in that * activity. * <p> * See the Android Training lesson <a href= * "http://developer.android.com/training/basics/fragments/communicating.html" * >Communicating with Other Fragments</a> for more information. */ public interface OnFragmentInteractionListener { // TODO: Update argument type and name void onFragmentInteraction(Uri uri); } }
[ "38583725+ShabbirDev@users.noreply.github.com" ]
38583725+ShabbirDev@users.noreply.github.com
df2d9bcf697d0b5461a36dfaa6a851c7ae5e220f
7bf24cb665e94ad8fa2be8f2a4a8d82d1012670c
/app/src/main/java/com/intownexec/chat/util/Base64.java
ad0fcba0d80c97f8e55edd259143420bfac726f5
[]
no_license
ph3mmy/Intown-android
3ea0e118d78cf3b435b7028532e45e445905a624
c9bcf9433b1149ed0fe5108961a09de99f5fca05
refs/heads/master
2021-01-22T10:48:08.609946
2017-07-19T07:54:43
2017-07-19T07:54:43
92,655,294
0
0
null
null
null
null
UTF-8
Java
false
false
24,265
java
// Portions copyright 2002, Google, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.intownexec.chat.util; // This code was converted from code at http://iharder.sourceforge.net/base64/ // Lots of extraneous features were removed. /* The original code said: * <p> * I am placing this code in the Public Domain. Do with it as you will. * This software comes with no guarantees or warranties but with * plenty of well-wishing instead! * Please visit * <a href="http://iharder.net/xmlizable">http://iharder.net/xmlizable</a> * periodically to check for updates or to contribute improvements. * </p> * * @author Robert Harder * @author rharder@usa.net * @version 1.3 */ /** * Base64 converter class. This code is not a complete MIME encoder; * it simply converts binary data to base64 data and back. * * <p>Note {@link CharBase64} is a GWT-compatible implementation of this * class. */ public class Base64 { /** Specify encoding (value is {@code true}). */ public final static boolean ENCODE = true; /** Specify decoding (value is {@code false}). */ public final static boolean DECODE = false; /** The equals sign (=) as a byte. */ private final static byte EQUALS_SIGN = (byte) '='; /** The new line character (\n) as a byte. */ private final static byte NEW_LINE = (byte) '\n'; /** * The 64 valid Base64 values. */ private final static byte[] ALPHABET = {(byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R', (byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j', (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', (byte) 's', (byte) 't', (byte) 'u', (byte) 'v', (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z', (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) '+', (byte) '/'}; /** * The 64 valid web safe Base64 values. */ private final static byte[] WEBSAFE_ALPHABET = {(byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R', (byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j', (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', (byte) 's', (byte) 't', (byte) 'u', (byte) 'v', (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z', (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) '-', (byte) '_'}; /** * Translates a Base64 value to either its 6-bit reconstruction value * or a negative number indicating some other meaning. **/ private final static byte[] DECODABET = {-9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8 -5, -5, // Whitespace: Tab and Linefeed -9, -9, // Decimal 11 - 12 -5, // Whitespace: Carriage Return -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 14 - 26 -9, -9, -9, -9, -9, // Decimal 27 - 31 -5, // Whitespace: Space -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 33 - 42 62, // Plus sign at decimal 43 -9, -9, -9, // Decimal 44 - 46 63, // Slash at decimal 47 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, // Numbers zero through nine -9, -9, -9, // Decimal 58 - 60 -1, // Equals sign at decimal 61 -9, -9, -9, // Decimal 62 - 64 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, // Letters 'A' through 'N' 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // Letters 'O' through 'Z' -9, -9, -9, -9, -9, -9, // Decimal 91 - 96 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // Letters 'a' through 'm' 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, // Letters 'n' through 'z' -9, -9, -9, -9, -9 // Decimal 123 - 127 /* ,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 128 - 139 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 140 - 152 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 153 - 165 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 166 - 178 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 179 - 191 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 192 - 204 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 205 - 217 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 218 - 230 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 231 - 243 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 // Decimal 244 - 255 */ }; /** The web safe decodabet */ private final static byte[] WEBSAFE_DECODABET = {-9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8 -5, -5, // Whitespace: Tab and Linefeed -9, -9, // Decimal 11 - 12 -5, // Whitespace: Carriage Return -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 14 - 26 -9, -9, -9, -9, -9, // Decimal 27 - 31 -5, // Whitespace: Space -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 33 - 44 62, // Dash '-' sign at decimal 45 -9, -9, // Decimal 46-47 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, // Numbers zero through nine -9, -9, -9, // Decimal 58 - 60 -1, // Equals sign at decimal 61 -9, -9, -9, // Decimal 62 - 64 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, // Letters 'A' through 'N' 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // Letters 'O' through 'Z' -9, -9, -9, -9, // Decimal 91-94 63, // Underscore '_' at decimal 95 -9, // Decimal 96 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // Letters 'a' through 'm' 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, // Letters 'n' through 'z' -9, -9, -9, -9, -9 // Decimal 123 - 127 /* ,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 128 - 139 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 140 - 152 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 153 - 165 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 166 - 178 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 179 - 191 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 192 - 204 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 205 - 217 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 218 - 230 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9, // Decimal 231 - 243 -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9 // Decimal 244 - 255 */ }; // Indicates white space in encoding private final static byte WHITE_SPACE_ENC = -5; // Indicates equals sign in encoding private final static byte EQUALS_SIGN_ENC = -1; /** Defeats instantiation. */ private Base64() { } /* ******** E N C O D I N G M E T H O D S ******** */ /** * Encodes up to three bytes of the array <var>source</var> * and writes the resulting four Base64 bytes to <var>destination</var>. * The source and destination arrays can be manipulated * anywhere along their length by specifying * <var>srcOffset</var> and <var>destOffset</var>. * This method does not check to make sure your arrays * are large enough to accommodate <var>srcOffset</var> + 3 for * the <var>source</var> array or <var>destOffset</var> + 4 for * the <var>destination</var> array. * The actual number of significant bytes in your array is * given by <var>numSigBytes</var>. * * @param source the array to convert * @param srcOffset the index where conversion begins * @param numSigBytes the number of significant bytes in your array * @param destination the array to hold the conversion * @param destOffset the index where output will be put * @param alphabet is the encoding alphabet * @return the <var>destination</var> array * @since 1.3 */ private static byte[] encode3to4(byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset, byte[] alphabet) { // 1 2 3 // 01234567890123456789012345678901 Bit position // --------000000001111111122222222 Array position from threeBytes // --------| || || || | Six bit groups to index alphabet // >>18 >>12 >> 6 >> 0 Right shift necessary // 0x3f 0x3f 0x3f Additional AND // Create buffer with zero-padding if there are only one or two // significant bytes passed in the array. // We have to shift left 24 in order to flush out the 1's that appear // when Java treats a value as negative that is cast from a byte to an int. int inBuff = (numSigBytes > 0 ? ((source[srcOffset] << 24) >>> 8) : 0) | (numSigBytes > 1 ? ((source[srcOffset + 1] << 24) >>> 16) : 0) | (numSigBytes > 2 ? ((source[srcOffset + 2] << 24) >>> 24) : 0); switch (numSigBytes) { case 3: destination[destOffset] = alphabet[(inBuff >>> 18)]; destination[destOffset + 1] = alphabet[(inBuff >>> 12) & 0x3f]; destination[destOffset + 2] = alphabet[(inBuff >>> 6) & 0x3f]; destination[destOffset + 3] = alphabet[(inBuff) & 0x3f]; return destination; case 2: destination[destOffset] = alphabet[(inBuff >>> 18)]; destination[destOffset + 1] = alphabet[(inBuff >>> 12) & 0x3f]; destination[destOffset + 2] = alphabet[(inBuff >>> 6) & 0x3f]; destination[destOffset + 3] = EQUALS_SIGN; return destination; case 1: destination[destOffset] = alphabet[(inBuff >>> 18)]; destination[destOffset + 1] = alphabet[(inBuff >>> 12) & 0x3f]; destination[destOffset + 2] = EQUALS_SIGN; destination[destOffset + 3] = EQUALS_SIGN; return destination; default: return destination; } // end switch } // end encode3to4 /** * Encodes a byte array into Base64 notation. * Equivalent to calling * {@code encodeBytes(source, 0, source.length)} * * @param source The data to convert * @since 1.4 */ public static String encode(byte[] source) { return encode(source, 0, source.length, ALPHABET, true); } /** * Encodes a byte array into web safe Base64 notation. * * @param source The data to convert * @param doPadding is {@code true} to pad result with '=' chars * if it does not fall on 3 byte boundaries */ public static String encodeWebSafe(byte[] source, boolean doPadding) { return encode(source, 0, source.length, WEBSAFE_ALPHABET, doPadding); } /** * Encodes a byte array into Base64 notation. * * @param source the data to convert * @param off offset in array where conversion should begin * @param len length of data to convert * @param alphabet the encoding alphabet * @param doPadding is {@code true} to pad result with '=' chars * if it does not fall on 3 byte boundaries * @since 1.4 */ public static String encode(byte[] source, int off, int len, byte[] alphabet, boolean doPadding) { byte[] outBuff = encode(source, off, len, alphabet, Integer.MAX_VALUE); int outLen = outBuff.length; // If doPadding is false, set length to truncate '=' // padding characters while (doPadding == false && outLen > 0) { if (outBuff[outLen - 1] != '=') { break; } outLen -= 1; } return new String(outBuff, 0, outLen); } /** * Encodes a byte array into Base64 notation. * * @param source the data to convert * @param off offset in array where conversion should begin * @param len length of data to convert * @param alphabet is the encoding alphabet * @param maxLineLength maximum length of one line. * @return the BASE64-encoded byte array */ public static byte[] encode(byte[] source, int off, int len, byte[] alphabet, int maxLineLength) { int lenDiv3 = (len + 2) / 3; // ceil(len / 3) int len43 = lenDiv3 * 4; byte[] outBuff = new byte[len43 // Main 4:3 + (len43 / maxLineLength)]; // New lines int d = 0; int e = 0; int len2 = len - 2; int lineLength = 0; for (; d < len2; d += 3, e += 4) { // The following block of code is the same as // encode3to4( source, d + off, 3, outBuff, e, alphabet ); // but inlined for faster encoding (~20% improvement) int inBuff = ((source[d + off] << 24) >>> 8) | ((source[d + 1 + off] << 24) >>> 16) | ((source[d + 2 + off] << 24) >>> 24); outBuff[e] = alphabet[(inBuff >>> 18)]; outBuff[e + 1] = alphabet[(inBuff >>> 12) & 0x3f]; outBuff[e + 2] = alphabet[(inBuff >>> 6) & 0x3f]; outBuff[e + 3] = alphabet[(inBuff) & 0x3f]; lineLength += 4; if (lineLength == maxLineLength) { outBuff[e + 4] = NEW_LINE; e++; lineLength = 0; } // end if: end of line } // end for: each piece of array if (d < len) { encode3to4(source, d + off, len - d, outBuff, e, alphabet); lineLength += 4; if (lineLength == maxLineLength) { // Add a last newline outBuff[e + 4] = NEW_LINE; e++; } e += 4; } assert (e == outBuff.length); return outBuff; } /* ******** D E C O D I N G M E T H O D S ******** */ /** * Decodes four bytes from array <var>source</var> * and writes the resulting bytes (up to three of them) * to <var>destination</var>. * The source and destination arrays can be manipulated * anywhere along their length by specifying * <var>srcOffset</var> and <var>destOffset</var>. * This method does not check to make sure your arrays * are large enough to accommodate <var>srcOffset</var> + 4 for * the <var>source</var> array or <var>destOffset</var> + 3 for * the <var>destination</var> array. * This method returns the actual number of bytes that * were converted from the Base64 encoding. * * * @param source the array to convert * @param srcOffset the index where conversion begins * @param destination the array to hold the conversion * @param destOffset the index where output will be put * @param decodabet the decodabet for decoding Base64 content * @return the number of decoded bytes converted * @since 1.3 */ private static int decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset, byte[] decodabet) { // Example: Dk== if (source[srcOffset + 2] == EQUALS_SIGN) { int outBuff = ((decodabet[source[srcOffset]] << 24) >>> 6) | ((decodabet[source[srcOffset + 1]] << 24) >>> 12); destination[destOffset] = (byte) (outBuff >>> 16); return 1; } else if (source[srcOffset + 3] == EQUALS_SIGN) { // Example: DkL= int outBuff = ((decodabet[source[srcOffset]] << 24) >>> 6) | ((decodabet[source[srcOffset + 1]] << 24) >>> 12) | ((decodabet[source[srcOffset + 2]] << 24) >>> 18); destination[destOffset] = (byte) (outBuff >>> 16); destination[destOffset + 1] = (byte) (outBuff >>> 8); return 2; } else { // Example: DkLE int outBuff = ((decodabet[source[srcOffset]] << 24) >>> 6) | ((decodabet[source[srcOffset + 1]] << 24) >>> 12) | ((decodabet[source[srcOffset + 2]] << 24) >>> 18) | ((decodabet[source[srcOffset + 3]] << 24) >>> 24); destination[destOffset] = (byte) (outBuff >> 16); destination[destOffset + 1] = (byte) (outBuff >> 8); destination[destOffset + 2] = (byte) (outBuff); return 3; } } // end decodeToBytes /** * Decodes data from Base64 notation. * * @param s the string to decode (decoded in default encoding) * @return the decoded data * @since 1.4 */ public static byte[] decode(String s) throws Base64DecoderException { byte[] bytes = s.getBytes(); return decode(bytes, 0, bytes.length); } /** * Decodes data from web safe Base64 notation. * Web safe encoding uses '-' instead of '+', '_' instead of '/' * * @param s the string to decode (decoded in default encoding) * @return the decoded data */ public static byte[] decodeWebSafe(String s) throws Base64DecoderException { byte[] bytes = s.getBytes(); return decodeWebSafe(bytes, 0, bytes.length); } /** * Decodes Base64 content in byte array format and returns * the decoded byte array. * * @param source The Base64 encoded data * @return decoded data * @since 1.3 * @throws Base64DecoderException */ public static byte[] decode(byte[] source) throws Base64DecoderException { return decode(source, 0, source.length); } /** * Decodes web safe Base64 content in byte array format and returns * the decoded data. * Web safe encoding uses '-' instead of '+', '_' instead of '/' * * @param source the string to decode (decoded in default encoding) * @return the decoded data */ public static byte[] decodeWebSafe(byte[] source) throws Base64DecoderException { return decodeWebSafe(source, 0, source.length); } /** * Decodes Base64 content in byte array format and returns * the decoded byte array. * * @param source the Base64 encoded data * @param off the offset of where to begin decoding * @param len the length of characters to decode * @return decoded data * @since 1.3 * @throws Base64DecoderException */ public static byte[] decode(byte[] source, int off, int len) throws Base64DecoderException { return decode(source, off, len, DECODABET); } /** * Decodes web safe Base64 content in byte array format and returns * the decoded byte array. * Web safe encoding uses '-' instead of '+', '_' instead of '/' * * @param source the Base64 encoded data * @param off the offset of where to begin decoding * @param len the length of characters to decode * @return decoded data */ public static byte[] decodeWebSafe(byte[] source, int off, int len) throws Base64DecoderException { return decode(source, off, len, WEBSAFE_DECODABET); } /** * Decodes Base64 content using the supplied decodabet and returns * the decoded byte array. * * @param source the Base64 encoded data * @param off the offset of where to begin decoding * @param len the length of characters to decode * @param decodabet the decodabet for decoding Base64 content * @return decoded data */ public static byte[] decode(byte[] source, int off, int len, byte[] decodabet) throws Base64DecoderException { int len34 = len * 3 / 4; byte[] outBuff = new byte[2 + len34]; // Upper limit on size of output int outBuffPosn = 0; byte[] b4 = new byte[4]; int b4Posn = 0; int i = 0; byte sbiCrop = 0; byte sbiDecode = 0; for (i = 0; i < len; i++) { sbiCrop = (byte) (source[i + off] & 0x7f); // Only the low seven bits sbiDecode = decodabet[sbiCrop]; if (sbiDecode >= WHITE_SPACE_ENC) { // White space Equals sign or better if (sbiDecode >= EQUALS_SIGN_ENC) { // An equals sign (for padding) must not occur at position 0 or 1 // and must be the last byte[s] in the encoded value if (sbiCrop == EQUALS_SIGN) { int bytesLeft = len - i; byte lastByte = (byte) (source[len - 1 + off] & 0x7f); if (b4Posn == 0 || b4Posn == 1) { throw new Base64DecoderException( "invalid padding byte '=' at byte offset " + i); } else if ((b4Posn == 3 && bytesLeft > 2) || (b4Posn == 4 && bytesLeft > 1)) { throw new Base64DecoderException( "padding byte '=' falsely signals end of encoded value " + "at offset " + i); } else if (lastByte != EQUALS_SIGN && lastByte != NEW_LINE) { throw new Base64DecoderException( "encoded value has invalid trailing byte"); } break; } b4[b4Posn++] = sbiCrop; if (b4Posn == 4) { outBuffPosn += decode4to3(b4, 0, outBuff, outBuffPosn, decodabet); b4Posn = 0; } } } else { throw new Base64DecoderException("Bad Base64 input character at " + i + ": " + source[i + off] + "(decimal)"); } } // Because web safe encoding allows non padding base64 encodes, we // need to pad the rest of the b4 buffer with equal signs when // b4Posn != 0. There can be at most 2 equal signs at the end of // four characters, so the b4 buffer must have two or three // characters. This also catches the case where the input is // padded with EQUALS_SIGN if (b4Posn != 0) { if (b4Posn == 1) { throw new Base64DecoderException("single trailing character at offset " + (len - 1)); } b4[b4Posn++] = EQUALS_SIGN; outBuffPosn += decode4to3(b4, 0, outBuff, outBuffPosn, decodabet); } byte[] out = new byte[outBuffPosn]; System.arraycopy(outBuff, 0, out, 0, outBuffPosn); return out; } }
[ "femibami4u20@gmail.com" ]
femibami4u20@gmail.com
745f3f448df504fe0d224ae7fbe31d594a83e089
a1a14196d473a6e90461672c1b52f0da8eafae36
/src/main/java/com/es/management/service/LostAndFoundImpl.java
fd7c401b51462c80207356b6e1f23759077d4d13
[]
no_license
blewwind70/jhta-final-project
1e401aedfa5af4dfbb8a03fc49780b2c739bc458
bf73973276aa0734cec289eb30733b15cebb7c34
refs/heads/master
2021-05-07T15:00:06.612494
2017-11-21T13:19:58
2017-11-21T13:19:58
109,960,243
0
0
null
null
null
null
UTF-8
Java
false
false
1,179
java
package com.es.management.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.es.common.vo.Criteria; import com.es.management.mapper.LostAndFoundMapper; import com.es.management.vo.LostCustomerItem; import com.es.management.web.form.InsertItemForm; import com.es.management.web.form.UpdateGiveItemForm; @Service public class LostAndFoundImpl implements LostAndFoundService{ @Autowired private LostAndFoundMapper lostAndFoundMapper; @Override public List<LostCustomerItem> getLostItemSelect(Criteria criteria) { System.out.println("service" + criteria.toString()); return lostAndFoundMapper.getLostItemSelect(criteria); } @Override public LostCustomerItem getDetailLostItemSelect(int id) { return lostAndFoundMapper.getDetailLostItemSelect(id); } @Override public void updateGiveItem(UpdateGiveItemForm updateGiveItemForm) { lostAndFoundMapper.updateGiveItem(updateGiveItemForm); } @Override public void insertItem(InsertItemForm insertItemForm) { lostAndFoundMapper.insertItem(insertItemForm); } }
[ "nonsper@naver.com" ]
nonsper@naver.com
32d7ecdf7866326c2c1c01818082b4c4a72707a6
83f9f193cf220eeb784433e313bd26e82be31de6
/START - 2.7/src/java/ru/exxo/ExxoDate.java
481dcb99b5f980884a73d556191e2ced123f032f
[]
no_license
Kremlianski/EXXO-Portal
a6e1bfe9222c62cc89c4135e2ba2f558b9380014
0b8190c328e93e8a34b99c09c664c2b4b99053bb
refs/heads/master
2020-12-31T01:36:59.242073
2017-04-03T15:13:05
2017-04-03T15:13:05
68,721,572
3
0
null
null
null
null
UTF-8
Java
false
false
1,959
java
package ru.exxo; import java.io.Serializable; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class ExxoDate implements Serializable { private Date Date; private String dateString = ""; private String dateScript = ""; private String properTime = ""; SimpleDateFormat sf = null; SimpleDateFormat sf1 = null; public ExxoDate() { sf = new SimpleDateFormat("yyyy-MM-dd"); sf1 = new SimpleDateFormat("yyyy,M-1,d"); } public ExxoDate(Date Date) { sf = new SimpleDateFormat("yyyy-MM-dd"); sf1 = new SimpleDateFormat("yyyy,M-1,d"); this.Date = Date; dateString = sf.format(Date); dateScript = "startdate=new Date(" + sf1.format(Date) + ")"; } public ExxoDate(String dateString) throws ParseException { sf = new SimpleDateFormat("yyyy-MM-dd"); sf1 = new SimpleDateFormat("yyyy,M-1,d"); this.dateString = dateString; Date = sf.parse(dateString); dateScript = "startdate=new Date(" + sf1.format(Date) + ")"; } public Date getDate() { return Date; } public void setDate(Date Date) { this.Date = Date; dateString = sf.format(Date); dateScript = "new Date(" + sf1.format(Date) + ")"; } public String getDateString() { return dateString; } public void setDateString(String dateString) throws ParseException { this.dateString = dateString; if (!dateString.equals("")) { Date = sf.parse(dateString); dateScript = "new Date(" + sf1.format(Date) + ")"; } } public String getDateScript() { return dateScript; } public String getProperTime() { SimpleDateFormat sf2 = new SimpleDateFormat("d MMM. yyyy, EEEE"); if (Date != null) { properTime = sf2.format(Date); } return properTime; } }
[ "kremlianski@gmail.com" ]
kremlianski@gmail.com
03e26508c4a0f7703dc9011b14bbbce4bb0b34ad
6a7659bbd75333dfc79433cce29f2b70796f798c
/spring-microservices/app-services/guest-services/src/main/java/org/amw061/spring/microservices/guestservices/GuestServicesApplication.java
000778a7c07ec9c6ca3fae2382aa4c14e9b25151
[]
no_license
mwajdzik/spring
3908278d1535dd9907e26d87f4b952cb74489dbf
fe235a9f1c3c421ddce6be81df9615b136156749
refs/heads/master
2021-09-17T09:55:06.588281
2018-06-30T11:50:49
2018-06-30T11:50:49
125,625,234
0
0
null
null
null
null
UTF-8
Java
false
false
1,650
java
package org.amw061.spring.microservices.guestservices; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.context.annotation.Bean; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.Contact; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; import static com.google.common.collect.ImmutableList.of; import static springfox.documentation.builders.PathSelectors.any; import static springfox.documentation.builders.RequestHandlerSelectors.basePackage; import static springfox.documentation.spi.DocumentationType.SWAGGER_2; @SpringBootApplication @EnableSwagger2 @EnableDiscoveryClient public class GuestServicesApplication { @Bean public Docket api() { return new Docket(SWAGGER_2) .groupName("Guest") .select() .apis(basePackage(GuestServicesApplication.class.getPackage().getName())) .paths(any()) .build() .apiInfo(new ApiInfo("Guest Services", "A set of services to provide data access to guests", "1.0.0", null, new Contact("MW", "https://amw061.org", null), null, null, of())); } public static void main(String[] args) { SpringApplication.run(GuestServicesApplication.class, args); } }
[ "wajdzik.maciej@gmail.com" ]
wajdzik.maciej@gmail.com
82813088e58c151b61cdde9f68a0b355047813e7
87c3c335023681d1c906892f96f3a868b3a6ee8e
/HTML5/dev/simplivity-citrixplugin-service/src/main/java/com/vmware/vim25/HostIncompatibleForRecordReplay.java
577b867a0f6b5d3d48d8287d86515572dd2bd37c
[ "Apache-2.0" ]
permissive
HewlettPackard/SimpliVity-Citrix-VCenter-Plugin
19d2b7655b570d9515bf7e7ca0cf1c823cbf5c61
504cbeec6fce27a4b6b23887b28d6a4e85393f4b
refs/heads/master
2023-08-09T08:37:27.937439
2020-04-30T06:15:26
2020-04-30T06:15:26
144,329,090
0
1
Apache-2.0
2020-04-07T07:27:53
2018-08-10T20:24:34
Java
UTF-8
Java
false
false
863
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2019.06.12 at 09:16:35 AM EDT // package com.vmware.vim25; /** * */ @SuppressWarnings("all") public class HostIncompatibleForRecordReplay extends VimFault { public String hostName; public String reason; public String getHostName() { return hostName; } public void setHostName(String hostName) { this.hostName = hostName; } public String getReason() { return reason; } public void setReason(String reason) { this.reason = reason; } }
[ "anuanusha471@gmail.com" ]
anuanusha471@gmail.com
2c9c467a3f2ca2d7a4d0132db1e881d005554a2f
b733c258761e7d91a7ef0e15ca0e01427618dc33
/cards/src/main/java/org/rnd/jmagic/cards/CaravanHurda.java
0754580d4a1bac28d85c3d2c90acc01543702996
[]
no_license
jmagicdev/jmagic
d43aa3d2288f46a5fa950152486235614c6783e6
40e573f8e6d1cf42603fd05928f42e7080ce0f0d
refs/heads/master
2021-01-20T06:57:51.007411
2014-10-22T03:03:34
2014-10-22T03:03:34
9,589,102
2
0
null
null
null
null
UTF-8
Java
false
false
413
java
package org.rnd.jmagic.cards; import org.rnd.jmagic.engine.*; @Name("Caravan Hurda") @Types({Type.CREATURE}) @SubTypes({SubType.GIANT}) @ManaCost("4W") @ColorIdentity({Color.WHITE}) public final class CaravanHurda extends Card { public CaravanHurda(GameState state) { super(state); this.setPower(1); this.setToughness(5); this.addAbility(new org.rnd.jmagic.abilities.keywords.Lifelink(state)); } }
[ "robyter@gmail" ]
robyter@gmail
8610ff9a8494c20a4e9c07abb272d457707c8658
b1a562e38bf94c8f3d641ea41e74762709dfe947
/backend/src/main/java/movieAdvisor/manyToMany/usersToMovies/UsersToMoviesDaoImpl.java
23aa55e7552accbf57d02b671ec6a7aa7702da26
[]
no_license
romandunets/movie-advisor
02442cf5125829d50a23a354345d8c56965d90e2
7eb4e8dfd24318d972701bd1aef7152575801567
refs/heads/master
2021-01-18T22:11:58.673478
2017-02-19T17:56:08
2017-02-19T17:56:08
68,853,322
1
0
null
null
null
null
UTF-8
Java
false
false
4,541
java
package movieAdvisor.manyToMany.usersToMovies; import movieAdvisor.movie.Movie; import movieAdvisor.user.User; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; import java.util.List; /** * Created by eaonmov on 11/15/16. */ public class UsersToMoviesDaoImpl implements UsersToMoviesDao { @Autowired SessionFactory sessionFactory; Session session = null; Transaction tx = null; public boolean addEntity(UsersToMovies utm) throws Exception { session = sessionFactory.openSession(); tx = session.beginTransaction(); session.saveOrUpdate(utm); tx.commit(); session.close(); return false; } public boolean deleteEntity(long user_id, long movie_id) throws Exception { session = sessionFactory.openSession(); Object o = session.load(UsersToMovies.class, new UsersToMovies(user_id, movie_id, 0.f)); tx = session.getTransaction(); session.beginTransaction(); session.delete(o); tx.commit(); return false; } public List<User> getUsersList(long movie_id) throws Exception { session = sessionFactory.openSession(); tx = session.beginTransaction(); List<UsersToMovies> utmList = session.createSQLQuery( "SELECT * FROM users_to_movies where " + "users_to_movies.movie_id=:m_id") .addEntity(UsersToMovies.class) .setParameter("m_id", movie_id).list(); List<User> users = new ArrayList<User>(); for (UsersToMovies utmElement : utmList) { users.add(utmElement.getUser()); } tx.commit(); session.close(); return users; } public List<Movie> getMoviesList(long user_id) throws Exception { session = sessionFactory.openSession(); tx = session.beginTransaction(); List<UsersToMovies> utmList = session.createSQLQuery( "SELECT * FROM users_to_movies where " + "users_to_movies.user_id=:u_id") .addEntity(UsersToMovies.class) .setParameter("u_id", user_id).list(); List<Movie> movies = new ArrayList<Movie>(); for (UsersToMovies utmElement : utmList) { movies.add(utmElement.getMovie()); } for (Movie movie : movies) { assignTagsToMovie(movie); assignGenresToMovie(movie); setOverallMovieRate(movie); } tx.commit(); session.close(); return movies; } public UsersToMovies getEntityById(Long userId, Long movieId) throws Exception { try { session = sessionFactory.openSession(); tx = session.beginTransaction(); List<UsersToMovies> utmList = session.createSQLQuery( "select * from users_to_movies " + "where users_to_movies.user_id=:u_id" + " and users_to_movies.movie_id=:m_id") .addEntity(UsersToMovies.class). setParameter("u_id", userId). setParameter("m_id", movieId).list(); UsersToMovies utm = utmList.get(0); tx.commit(); session.close(); return utm; } catch (Exception e) { e.printStackTrace(); return null; } } private void setOverallMovieRate(Movie movie) { String sqlQuery = "select avg (p.rating) from UsersToMovies p where p.pk.movie=:id"; Long movieId = movie.getId(); Query query = session.createQuery(sqlQuery).setParameter("id", new Movie(movieId)); Double overallRate = (Double) query.list().get(0); if (overallRate != null) { movie.setRate(Float.parseFloat(String.valueOf(overallRate))); } else { movie.setRate(new Float(0)); } } private void assignGenresToMovie(Movie movie) { Query query = session.createQuery("from MoviesToGenres p where p.pk.movie=:id"); query.setParameter("id", movie); movie.setMovieGenres(query.list()); } private void assignTagsToMovie(Movie movie) { Query query = session.createQuery("from MoviesToTags p where p.pk.movie=:id"); query.setParameter("id", movie); movie.setMoviesTags(query.list()); } }
[ "eaonmov@eaonmovlap" ]
eaonmov@eaonmovlap
3671c5d315e6401f587f65234ca26814e1330d9f
a49a5c48794a2537d2dca2f6f78d4092c75b11f6
/laugmap/src/main/java/com/ltei/laugmap/data/geojson/BiMultiMap.java
7c09ff62011d00a90e894f6ff00358e0dc6d062d
[]
no_license
Ltei/LteiAndroidUtils
3b1f761030470368eed85cb77a23bf06dc36589d
b6bc723683f6f1e312d4baee771c928beb545cea
refs/heads/master
2022-04-08T21:22:50.092791
2020-02-20T21:10:19
2020-02-20T21:10:19
177,873,366
1
0
null
null
null
null
UTF-8
Java
false
false
2,709
java
package com.ltei.laugmap.data.geojson; import java.util.Collection; import java.util.HashMap; import java.util.Map; /** * Extension of HashMap that provides two main features. Firstly it allows reverse lookup * for a key given a value, by storing a second HashMap internally which maps values to keys. * Secondly, it supports Collection values, in which case, each item in the collection is * used as a key in the internal reverse HashMap. It's therefore up to the caller to ensure * the overall set of values, and collection values, are unique. * * Used by GeoJsonRenderer to store GeoJsonFeature instances mapped to corresponding Marker, * Polyline, and Polygon map objects. We want to look these up in reverse to provide access * to GeoJsonFeature instances when map objects are clicked. */ public class BiMultiMap<K> extends HashMap<K, Object> { private final Map<Object, K> mValuesToKeys = new HashMap<>(); @Override public void putAll(Map<? extends K, ?> map) { // put() manages the reverse map, so call it on each entry. for (Entry<? extends K, ?> entry : map.entrySet()) { put(entry.getKey(), entry.getValue()); } } @Override public Object put(K key, Object value) { // Store value/key in the reverse map. if (value instanceof Collection) { return put(key, (Collection) value); } else { mValuesToKeys.put(value, key); return super.put(key, value); } } public Object put(K key, Collection values) { // Store values/key in the reverse map. for (Object value : values) { mValuesToKeys.put(value, key); } return super.put(key, values); } @Override public Object remove(Object key) { Object value = super.remove(key); // Also remove the value(s) and key from the reverse map. if (value instanceof Collection) { for (Object valueItem : (Collection) value) { mValuesToKeys.remove(valueItem); } } else { mValuesToKeys.remove(value); } return value; } @Override public void clear() { super.clear(); mValuesToKeys.clear(); } @SuppressWarnings("unchecked") @Override public BiMultiMap<K> clone() { BiMultiMap<K> cloned = new BiMultiMap<>(); cloned.putAll((Map<K, Object>) super.clone()); return cloned; } /** * Reverse lookup of key by value. * * @param value Value to lookup * @return Key for the given value */ public K getKey(Object value) { return mValuesToKeys.get(value); } }
[ "xatofr35@gmail.com" ]
xatofr35@gmail.com
9fb5a4114ddcdb715fda4f27a3f07e2369495b57
bfb16f07ba083aa70593e4765ebe036f060e3b37
/src/main/java/com/OlehHilchenko/OGCRUDApplication/DeveloperRepository/Read.java
5a0b7b28e1a532c3d3c8ea3b59d9f6f4896fa0a2
[]
no_license
OlehHilchenko/OGCRUDApplication
027e0403219b1ab1acc1432d6c99b04feffdbb8a
f7a66e14ae3095bdefe40a812c03ff1df27ec7a2
refs/heads/master
2020-09-19T03:08:28.041713
2019-12-01T19:23:52
2019-12-01T19:23:52
224,192,452
0
0
null
null
null
null
UTF-8
Java
false
false
3,703
java
package main.java.com.OlehHilchenko.OGCRUDApplication.DeveloperRepository; import main.java.com.OlehHilchenko.OGCRUDApplication.DataStore.DataWarehousePath; import main.java.com.OlehHilchenko.OGCRUDApplication.Entities.Developer; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashSet; import java.util.Scanner; public class Read implements DataWarehousePath { ArrayList<String> develop; ArrayList<String> account; ArrayList<String> skill; ArrayList<String> read(String file) { ArrayList<String> temp = new ArrayList<>(); try { Scanner scan = new Scanner(new FileInputStream(file)); while (scan.hasNextLine()) temp.add(scan.nextLine()); scan.close(); } catch (IOException e) { System.out.println(e); } return temp; } public HashMap<Long, Developer> parse() { HashMap<Long, Developer> developersFromFiles = new HashMap<>(); develop = read(DEVELOPERS); account = read(ACCOUNTS); skill = read(SKILLS); for (int i = 0; i < develop.size(); i++) { long ID; String firstName; String lastName; String accountStatus; LinkedHashSet<String> skills = new LinkedHashSet<>(); String IDFirstNameLastName[] = new String[3]; int count = 0; String temp = ""; for (int j = 0; j < develop.get(i).length(); j++) { if (develop.get(i).charAt(j) != ' ') { temp += develop.get(i).charAt(j); } else if (develop.get(i).charAt(j) == ' ') { IDFirstNameLastName[count] = temp; count++; temp = ""; } } IDFirstNameLastName[count] = temp; ID = Long.parseLong(IDFirstNameLastName[0]); firstName = IDFirstNameLastName[1]; lastName = IDFirstNameLastName[2]; developersFromFiles.put(ID, new Developer(ID, firstName, lastName)); String IDAccount[] = new String[2]; temp = ""; count = 0; for (int l = 0; l < account.get(i).length(); l++) { if (account.get(i).charAt(l) != ' ') { temp += account.get(i).charAt(l); } else if (account.get(i).charAt(l) == ' ') { IDAccount[count] = temp; count++; temp = ""; } } IDAccount[count] = temp; developersFromFiles.get(Long.parseLong(IDAccount[0])).accountStatusC.accountStatusValue = IDAccount[1]; Long tempId = (long) 0; temp = ""; count = 0; for (int k = 0; k < skill.get(i).length(); k++) { if (skill.get(i).charAt(k) != ' ') { temp += skill.get(i).charAt(k); } else if (skill.get(i).charAt(k) == ' ' && count == 0) { tempId = Long.parseLong(temp); count++; temp = ""; } else if (skill.get(i).charAt(k) == ' ' && count != 0) { skills.add(temp); count++; temp = ""; } } skills.add(temp); skills.remove(""); //System.out.println("+++"); //System.out.println(skillsValues); developersFromFiles.get(tempId).skillSet.skillsValues = skills; } return developersFromFiles; } }
[ "olehhilchenko@gmail.com" ]
olehhilchenko@gmail.com
3e2387d22a928394f3fd068374f1e403a0c7b140
6fc36e4ffca987e678a18336ecdb6e48cb53e4ea
/proj/elearning/src/com/htyz/util/BeanDateFormat.java
122ac03248dbe8ea15592f406184b5d33f2e2e65
[]
no_license
haijunsu/oldprojs
abdfae123185d4029bb84457370928a9cb72dae6
fb15384cddc410b9de5ce73dfdde19d2b0a61624
refs/heads/master
2022-12-23T07:41:27.931653
2015-08-05T04:02:24
2015-08-05T04:02:24
40,223,166
0
0
null
2022-12-15T23:33:02
2015-08-05T03:40:52
Java
GB18030
Java
false
false
10,197
java
/** * 程序名:BeanDateFormat.java * 功能描述:用于将15位的数字字符串格式化日期显示 * 并当指定年月日的数字字符串字符转换为15位的数字 * 方便数据库的日期处理 * * @version ver 0.1 * @author name: 苏海军 * @copyright 2002, 版权所有 * * 创建日期: 2002年7月31日 */ package com.htyz.util; import java.util.Date; import java.util.GregorianCalendar; import java.text.DateFormat; import java.text.SimpleDateFormat; public class BeanDateFormat { // G Era designator Text AD // y Year Year 1996; 96 // M Month in year Month July; Jul; 07 // w Week in year Number 27 // W Week in month Number 2 // D Day in year Number 189 // d Day in month Number 10 // F Day of week in month Number 2 // E Day in week Text Tuesday; Tue // a Am/pm marker Text PM // H Hour in day (0-23) Number 0 // k Hour in day (1-24) Number 24 // K Hour in am/pm (0-11) Number 0 // h Hour in am/pm (1-12) Number 12 // m Minute in hour Number 30 // s Second in minute Number 55 // S Millisecond Number 978 // z Time zone General time zone Pacific Standard Time; PST; GMT-08:00 // Z Time zone RFC 822 time zone -0800 public final int LONG = 0; //yyyy年M月d日 H:mm:ss.S public final int SHORT = 1; //yyyy-M-d H:mm:ss.S public final int LONG_DATE_CN = 2; //yyyy年M月d日 public final int SHORT_DATE = 3; //yyyy-M-d public final int LONG_TIME = 4; //H:mm:ss 24小时制 public final int SHORT_TIME = 5; //K:mm:ss a 12小时制 public final int LONG_DATE_LONG_TIME = 6; //yyyy年M月d日 H:mm:ss 24小时制 public final int LONG_DATE_SHORT_TIME = 7; //yyyy年M月d日 K:mm:ss a 12小时制 public final int SHORT_DATE_LONG_TIME = 8; //yyyy-M-d H:mm:ss 24小时制 public final int SHORT_DATE_SHORT_TIME = 9; //yyyy-M-d K:mm:ss a 12小时制 public final int LONG_TIME_Mill = 10; //H:mm:ss.S 24小时制 public final int SHORT_TIME_Mill = 11; //K:mm:ss.S a 12小时制 public final int LONG_HOUR_SEC = 12; //H:mm 24小时制 public final int SHORT_HOUR_SEC = 13; //K:mm a 12小时制 public final int LONG_DATE = 14; //yyyy-MM-dd public final int LONG_DATE_LONG_TIME2 = 15; //yyyy/mm/dd HH:mm:ss private int intFormat = 0; private String strFormat = "yyyy'年'M'月'd'日' H:mm:ss.S"; /** ************************************************************ * 方法名:BeanDateFormat * 功能描述:初始化 * * @param * * @retrun * * @author name: 苏海军 * 创建日期:2002-07-31 */ public BeanDateFormat() { this.intFormat = 0; } /** ************************************************************ * 方法名:BeanDateFormat * 功能描述:初始化 * * @param intFormat: 初始化format类型 * * @retrun * * @author name: 苏海军 * 创建日期:2002-07-31 */ public BeanDateFormat(int intFormat) { this.intFormat = intFormat; } /** ************************************************************ * 方法名:BeanDateFormat * 功能描述:初始化 * * @param intFormat: 初始化format类型 * * @retrun * * @author name: 苏海军 * 创建日期:2002-07-31 */ public BeanDateFormat(String strFormat) { this.strFormat = strFormat; } /** ************************************************************ * 方法名:format * 功能描述: * * @param date: 要格式化的日期 * * @retrun String * * @author name: 苏海军 * 创建日期: 2002年7月31日 */ public String format(Date date) { SimpleDateFormat sdf = new SimpleDateFormat(this.strFormat); return sdf.format(date); } /** ************************************************************ * 方法名:format * 功能描述: * * @param date: 要格式化的日期 * @param intFormat: 格式化日期的类型 * * @retrun String * * @author name: 苏海军 * 创建日期:2002年7月31日 */ public String format(Date date, int intFormat) { String strFormat = "yyyy'年'M'月'd'日' H:mm:ss.S"; switch (intFormat) { case LONG: strFormat = "yyyy'年'M'月'd'日' H:mm:ss.S"; break; case SHORT: strFormat = "yyyy'-'M'-'d H:mm:ss.S"; break; case LONG_DATE_CN: strFormat = "yyyy'年'M'月'd'日'"; break; case LONG_DATE: strFormat = "yyyy'-'MM'-'dd"; break; case SHORT_DATE: strFormat = "yyyy'-'M'-'d"; break; case LONG_TIME: this.strFormat = "H:mm:ss"; break; case SHORT_TIME: strFormat = "K:mm:ss a"; break; case LONG_DATE_LONG_TIME: this.strFormat = "yyyy'年'M'月'd'日' H:mm:ss"; break; case LONG_DATE_SHORT_TIME: strFormat = "yyyy'年'M'月'd'日' K:mm:ss a"; break; case SHORT_DATE_LONG_TIME: strFormat = "yyyy-M-d H:mm:ss"; break; case SHORT_DATE_SHORT_TIME: strFormat = "yyyy-M-d K:mm:ss a"; break; case LONG_TIME_Mill: strFormat = "H:mm:ss.S"; break; case SHORT_TIME_Mill: strFormat = "K:mm:ss.S a"; break; case LONG_HOUR_SEC: strFormat = "H:mm"; break; case SHORT_HOUR_SEC: strFormat = "K:mm a"; break; case LONG_DATE_LONG_TIME2: strFormat = "yyyy'-'mm'-'dd hh:mm:ss"; break; default : strFormat = "yyyy'年'M'月'd'日' H:mm:ss.S"; break; } SimpleDateFormat sdf = new SimpleDateFormat(strFormat); return sdf.format(date); } /** ************************************************************ * 方法名:format * 功能描述: * * @param date: 要格式化的日期 * @param strFormat: 格式化日期的类型 * * @retrun String * * @author name: 苏海军 * 创建日期: 2002年7月31日 */ public String format(Date date, String strFormat) { SimpleDateFormat sdf = new SimpleDateFormat(strFormat); return sdf.format(date); } /** ************************************************************ * 方法名:format * 功能描述: * * @param strDate: 要格式化的日期,该是由数字组成的 * @param strFormat: 格式化日期的类型 * * @retrun String * * @author name: 苏海军 * 创建日期:2002年7月31日 */ public String format(String strDate, String strFormat) { if(strDate==null||strDate.equals("")){ return ""; } long longDate = Long.parseLong(strDate); Date date = new Date(longDate); return this.format(date, strFormat); } /** ************************************************************ * 方法名:format * 功能描述: * * @param strDate: 要格式化的日期,该是由数字组成的 * * @retrun String * * @author name: 苏海军 * 创建日期:2002年7月31日 */ public String format(String strDate) { if(strDate==null||strDate.equals("")){ return ""; } long longDate = Long.parseLong(strDate); Date date = new Date(longDate); return this.format(date); } /** ************************************************************ * 方法名:format * 功能描述: * * @param strDate: 要格式化的日期,该是由数字组成的 * @param intFormat: 格式化日期的类型 * * @retrun String * * @author name: 苏海军 * 创建日期: */ public String format(String strDate, int intFormat) { if(strDate==null||strDate.equals("")){ return ""; } long longDate = Long.parseLong(strDate); Date date = new Date(longDate); return this.format(date, intFormat); } /** ************************************************************ * 方法名:parseDBDate * 功能描述:将给定的字符串年月日转换为毫秒,返回15位的字符串 * * @param strYear: 指定的年 * @param strMonth: 指定的月 * @param strDay: 指定的日 * * @retrun String * * @author name: 苏海军 * 创建日期: 2002年7月31日 */ public String parseDBDate(String strYear, String strMonth, String strDay) { String strRtn = "000000000000000"; GregorianCalendar gc = new GregorianCalendar(Integer.parseInt(strYear), Integer.parseInt(strMonth)-1, Integer.parseInt(strDay)); Date newdate = gc.getTime(); long longDate = newdate.getTime(); strRtn = strRtn + Long.toString(longDate); return strRtn.substring(strRtn.length() - 15, strRtn.length()); } public String getYear(String strDate) { if(strDate.equals(null)||strDate==""){ return " "; } long longDate = Long.parseLong(strDate); Date date = new Date(longDate); return this.format(date).substring(0,4); } public String getMonth(String strDate) { if(strDate.equals(null)||strDate==""){ return " "; } long longDate = Long.parseLong(strDate); Date date = new Date(longDate); return this.format(date,14).substring(5,7); } public String getDay(String strDate) { if(strDate.equals(null)||strDate==""){ return " "; } long longDate = Long.parseLong(strDate); Date date = new Date(longDate); return this.format(date,14).substring(8,10); } public int getIntFormat() { return (this.intFormat); } public void setIntFormat(int intFormat) { this.intFormat = intFormat; } public String getStrFormat() { return (this.strFormat); } public void setStrFormat(String strFormat) { this.strFormat = strFormat; } }
[ "navysu@gmail.com" ]
navysu@gmail.com
a715ba9b93c3fb6242b114d3607319e3da0a80a4
cc02b3cf8f7c64f89679564e398fb072bf2574db
/lab1/Lab1RPC/test/jtree/ChildNode.java
a997c1a82aab4065aa39becb1fe1c6ee7c5a0edb
[]
no_license
YanMatheus/labs-sistemas-distribuidos
46d6bb6dce5f74818aa1f253ea889e8770687ce0
bfed1349164176530e2526e62500498480055157
refs/heads/master
2021-04-18T20:17:33.020846
2018-04-19T11:29:10
2018-04-19T11:29:10
126,550,869
0
0
null
null
null
null
UTF-8
Java
false
false
879
java
package jtree; import java.io.File; import javax.swing.tree.DefaultMutableTreeNode; public class ChildNode implements Runnable { private DefaultMutableTreeNode root; private File fileRoot; public ChildNode(File fileRoot, DefaultMutableTreeNode root) { this.fileRoot = fileRoot; this.root = root; } @Override public void run() { createChildren(fileRoot, root); } private void createChildren(File fileRoot, DefaultMutableTreeNode node) { File[] files = fileRoot.listFiles(); if (files == null) return; for (File file : files) { DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(new FileNode(file)); node.add(childNode); if ( file.isDirectory() ) { createChildren(file, childNode); } } } }
[ "mllc@icomp.ufam.edu.br" ]
mllc@icomp.ufam.edu.br
fda101db96e54c401c5fe7ab90f66489761996c0
a6e706b98e8a3adc94ad76ec321820d474e18957
/src/main/java/com/ymt/entity/DataRecord.java
b00dbca8f076fc82c7b5515a70b643eceb57b90b
[]
no_license
Hanlen520/YmtMonkey
572c3eb5cfbbbcc610e7135ec1955a3c649a67d2
1534d46e9e5e652a611406cf820e25a01a761536
refs/heads/master
2020-04-02T13:28:35.478905
2017-09-20T06:44:44
2017-09-20T06:44:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,501
java
package com.ymt.entity; import com.ymt.tools.LimitQueue; import java.math.BigDecimal; import java.util.Map; /** * Created by sunsheng */ public class DataRecord { private String deviceName; private String appInfo; private String appLog; private String appiumLog; private String operaterLog; private String duringTime; private Map<String, Integer> pageCount; private LimitQueue<Step> results; private int totalStep; //测试设备的总内存大小 MB private String totalMem; private LimitQueue<Performance> perfromance; public String getDuringTime() { return duringTime; } public void setDuringTime(String duringTime) { this.duringTime = duringTime; } public Map<String, Integer> getPageCount() { return pageCount; } public void setPageCount(Map<String, Integer> pageCount) { this.pageCount = pageCount; } public LimitQueue<Step> getResults() { return results; } public void setResults(LimitQueue<Step> results) { this.results = results; } public String getDeviceName() { return deviceName; } public void setDeviceName(String deviceName) { this.deviceName = deviceName; } public String getAppInfo() { return appInfo; } public void setAppInfo(String appInfo) { this.appInfo = appInfo; } public String getAppLog() { return appLog; } public void setAppLog(String appLog) { this.appLog = appLog; } public String getAppiumLog() { return appiumLog; } public void setAppiumLog(String appiumLog) { this.appiumLog = appiumLog; } public String getOperaterLog() { return operaterLog; } public void setOperaterLog(String operaterLog) { operaterLog = operaterLog; } public int getTotalStep() { return totalStep; } public void setTotalStep(int totalStep) { this.totalStep = totalStep; } public String getTotalMem() { return totalMem; } public void setTotalMem(String totalMem) { this.totalMem = (new BigDecimal(totalMem).divide(new BigDecimal(1024), 2, BigDecimal.ROUND_HALF_UP) ).toString(); } public LimitQueue<Performance> getPerfromance() { return perfromance; } public void setPerfromance(LimitQueue<Performance> perfromance) { this.perfromance = perfromance; } }
[ "sgsg1986@126.com" ]
sgsg1986@126.com
1014387930f0d557ce18bad6d473f20b7c99ea13
8d4c1b10c6df5d54599a82228a98c5641f5658ec
/src/ch06/EnumMapExample.java
c898296774082a63f3d94b4086d56af1fa5c5218
[]
no_license
whdms705/EffectiveJava3
0e3921856da46958f8e6b1f1701acea31b8bb08a
7dd105d174d6e0e44897387febe0e7e30e70f752
refs/heads/master
2020-04-16T06:22:15.733493
2019-06-23T03:12:57
2019-06-23T03:12:57
165,343,458
0
0
null
null
null
null
UTF-8
Java
false
false
942
java
package ch06; import java.util.EnumMap; //참고 http://clearpal7.blogspot.com/2017/02/java-enummap-vs-hashmap.html // EnumMap VS HashMap //enumMap의 index 는 Enum의 내부 순서를 이용하므로 hashMap의 Hashing을 통한 index보다 효율적이다. //HashMap의 경우 일정한 이상의 자료가 저장 되면, 자체적으로 resizing을 한다. //그로 인해 성능저하가 발생한다. 그러나 EnumMap은 Enum의 갯수로 제한하므로 Resizing에 대한 성능저하가 없다. public class EnumMapExample { enum enumInstance{ A ,B , C} public static void main(String[] args) { EnumMap map = new EnumMap(enumInstance.class); map.put(enumInstance.A,"A result"); map.put(enumInstance.B,"B result"); map.put(enumInstance.C,"C result"); System.out.println(map); String aValue = (String) map.get(enumInstance.A); System.out.println(aValue); } }
[ "whdms705@nate.com" ]
whdms705@nate.com
001d213678dcaad6f673fc33847a8a6708c13164
055f9d14a91f5aaa457cd1e050fe2e738a57767f
/src/main/java/com/frdscm/wms/entity/CargoDetails.java
ab69651065d697be6f3cd0118b55b26f48603486
[]
no_license
13246686373/smartwms-guizhou-release
cd2a524649fd663a819dd64d849d595f19c45219
7e515fe6c7536824bdd5aeb7f26b25dc07139f1a
refs/heads/master
2020-05-05T13:23:05.655043
2019-04-08T05:32:14
2019-04-08T05:32:14
180,074,897
0
0
null
2019-04-08T05:19:04
2019-04-08T05:19:03
null
UTF-8
Java
false
false
2,126
java
package com.frdscm.wms.entity; import com.alibaba.fastjson.annotation.JSONField; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.enums.IdType; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** * 订单货物明细表 * * @author zhangling * @since 2019-04-05 */ @Data public class CargoDetails implements Serializable { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Integer id; /** * 订单ID */ private Integer orderId; /** * 订单编号 */ private String orderNo; /** * 物料 */ private String materialsName; /** * 产品规格 */ private String specificationGrade; /** * 批次号 */ private String batchNo; /** * 单位ID */ private Integer unitId; /** * 单位 */ private String unit; /** * 数量 */ private BigDecimal quantity; /** * 体积 */ private BigDecimal volume; /** * 是否有效: Y 有效 N失效 */ private String enabledFlag; /** * 创建时间 */ @JSONField(serialize = false) private Date createTime; /** * 更新时间 */ @JSONField(serialize = false) @TableField(update = "now()") private Date updateTime; @Override public String toString() { return "CargoDetails{" + "id=" + id + ", orderId=" + orderId + ", orderNo='" + orderNo + ", materialsName='" + materialsName + ", specificationGrade='" + specificationGrade + ", batchNo='" + batchNo + ", unit='" + unit + ", quantity=" + quantity + ", volume=" + volume + ", enabledFlag=" + enabledFlag + ", createTime=" + createTime + ", updateTime=" + updateTime + '}'; } }
[ "crocojohn@163.com" ]
crocojohn@163.com
15bff8f04a3890666c6687e5eb2ad8fc60c7127c
d1cd2aa271593341986d20bcfa8599f3c0ad9b13
/src/main/java/yh/security/entity/SecurityUserDetails.java
8cefc7cd5da8703439cfe3030e1735a505828ca5
[]
no_license
yuandage/spring-security-jwt-guide
fbaac31594171ba501733a188646540f1fab24c2
d13a23e2968917c78c9184166c9c011bedb2fc52
refs/heads/master
2021-03-03T23:38:33.107081
2020-03-10T05:48:01
2020-03-10T05:48:01
245,994,806
0
0
null
null
null
null
UTF-8
Java
false
false
1,076
java
package yh.security.entity; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import java.util.Collection; public class SecurityUserDetails implements UserDetails { private String username; private String password; private Collection<? extends GrantedAuthority> authorities; public SecurityUserDetails(String username, String password, Collection<? extends GrantedAuthority> authorities) { this.username = username; this.password = password; this.authorities = authorities; } @Override public Collection<? extends GrantedAuthority> getAuthorities() { return authorities; } @Override public String getPassword() { return password; } @Override public String getUsername() { return username; } @Override public boolean isAccountNonExpired() { return true; } @Override public boolean isAccountNonLocked() { return true; } @Override public boolean isCredentialsNonExpired() { return true; } @Override public boolean isEnabled() { return true; } }
[ "1027928543@qq.com" ]
1027928543@qq.com
7817c94e5becd1d8430b7be33e6a6964dd8f5fc8
b6b54fede7f0fd413cbea5257927b4117b3f768d
/智能点名系统/CallName/src/DBUtil.java
7bf5bcdae8484e4b10b9c61e49371c240ddfc66f
[ "MIT" ]
permissive
qixin777/SomeSystem
3f27f0e4adfcbac7a3b06a1f60f81ca2f5036af7
6e9dfd49db7756a89abb64b70281e21bf30d2ae2
refs/heads/master
2020-06-04T21:11:15.945446
2019-06-16T14:43:53
2019-06-16T14:43:53
192,193,478
0
0
null
null
null
null
UTF-8
Java
false
false
989
java
import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class DBUtil{ private static Connection conn; private static final String URL = "jdbc:mysql://localhost/callname?useUnicode=true&characterEncoding=UTF-8"; private static final String USERNAME = "root"; private static final String PASSWORD = ""; static{ try{ Class.forName("com.mysql.jdbc.Driver"); } catch (Exception e) { e.printStackTrace(); } } public static Connection getConn(){ try{ conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); } catch (Exception e) { e.printStackTrace(); } return conn; } public static void closeConn(){ if(conn != null){ try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } }
[ "qiqi1096158@gmail.com" ]
qiqi1096158@gmail.com
f615b79d3860413d7dc4c6ee60b8cdaa437ea4f4
0874d515fb8c23ae10bf140ee5336853bceafe0b
/l2j-universe/dist/gameserver/data/scripts/quests/_146_TheZeroHour.java
cf29fe435372575df8c1e407e83557141183c593
[]
no_license
NotorionN/l2j-universe
8dfe529c4c1ecf0010faead9e74a07d0bc7fa380
4d05cbd54f5586bf13e248e9c853068d941f8e57
refs/heads/master
2020-12-24T16:15:10.425510
2013-11-23T19:35:35
2013-11-23T19:35:35
37,354,291
0
1
null
null
null
null
UTF-8
Java
false
false
3,010
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package quests; import lineage2.gameserver.model.instances.NpcInstance; import lineage2.gameserver.model.quest.Quest; import lineage2.gameserver.model.quest.QuestState; import lineage2.gameserver.scripts.ScriptFile; public class _146_TheZeroHour extends Quest implements ScriptFile { private static int KAHMAN = 31554; private static int STAKATO_QUEENS_FANG = 14859; private static int KAHMANS_SUPPLY_BOX = 14849; private static int QUEEN_SHYEED_ID = 25671; @Override public void onLoad() { } @Override public void onReload() { } @Override public void onShutdown() { } public _146_TheZeroHour() { super(true); addStartNpc(KAHMAN); addTalkId(KAHMAN); addKillId(QUEEN_SHYEED_ID); addQuestItem(STAKATO_QUEENS_FANG); } @Override public String onEvent(String event, QuestState st, NpcInstance npc) { int cond = st.getCond(); String htmltext = event; if (event.equals("merc_kahmun_q0146_0103.htm") && (cond == 0)) { st.setCond(1); st.setState(STARTED); st.playSound(SOUND_ACCEPT); } if (event.equals("reward") && (cond == 2)) { htmltext = "merc_kahmun_q0146_0107.htm"; st.takeItems(STAKATO_QUEENS_FANG, -1); st.giveItems(KAHMANS_SUPPLY_BOX, 1); st.addExpAndSp(2850000, 3315000); st.exitCurrentQuest(false); } return htmltext; } @Override public String onTalk(NpcInstance npc, QuestState st) { String htmltext = "noquest"; int npcId = npc.getNpcId(); int cond = st.getCond(); QuestState InSearchOfTheNest = st.getPlayer().getQuestState(_109_InSearchOfTheNest.class); if (npcId == KAHMAN) { if (cond == 0) { if (st.getPlayer().getLevel() >= 81) { if ((InSearchOfTheNest != null) && InSearchOfTheNest.isCompleted()) { htmltext = "merc_kahmun_q0146_0101.htm"; } else { htmltext = "merc_kahmun_q0146_0104.htm"; } } else { htmltext = "merc_kahmun_q0146_0102.htm"; } } else if ((cond == 1) && (st.getQuestItemsCount(STAKATO_QUEENS_FANG) < 1)) { htmltext = "merc_kahmun_q0146_0105.htm"; } else if (cond == 2) { htmltext = "merc_kahmun_q0146_0106.htm"; } } return htmltext; } @Override public String onKill(NpcInstance npc, QuestState st) { if (st.getState() == STARTED) { st.setCond(2); st.giveItems(STAKATO_QUEENS_FANG, 1); } return null; } }
[ "jmendezsr@gmail.com" ]
jmendezsr@gmail.com
eb397bf8b4c33f9f0f1f2920c1055e47df6a851c
da9c4312d0220032cf33b3c8db3c238083c81960
/TacoCloud/src/main/java/ru/smolina/controllers/RegistrationController.java
1face5e11a0304ef16beeef4e1fca8eccb90f8b1
[]
no_license
i-smolina/spring-in-action-5
8845c0159a28d84585f3cf7ecef413156feb1ef2
ec2a343f467c0fa935ffebf05cc6eaee6be506a9
refs/heads/main
2023-07-06T10:17:58.507519
2021-08-02T09:20:50
2021-08-02T09:20:50
371,650,668
0
0
null
null
null
null
UTF-8
Java
false
false
1,062
java
package ru.smolina.controllers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import ru.smolina.repositories.jpa.UserRepository; import ru.smolina.security.RegistrationForm; @Controller @RequestMapping("/register") public class RegistrationController { private UserRepository userRepo; private PasswordEncoder passwordEncoder; @Autowired public RegistrationController(UserRepository userRepo, PasswordEncoder passwordEncoder) { this.userRepo = userRepo; this.passwordEncoder = passwordEncoder; } @GetMapping public String registerForm() { return "registration"; } @PostMapping public String processRegistration(RegistrationForm form) { userRepo.save(form.toUser(passwordEncoder)); return "redirect:/login"; } }
[ "smolirinka@gmail.com" ]
smolirinka@gmail.com
a90a85cce6691ca777baa77a9aae76d1008c3a34
042f0d268784c6b8979d559297d339b6022c7093
/LogisticsSupervisionModel/src/com/nuctech/ls/model/vo/warehouse/ElockDepartmentVO.java
2960874288d1bfad9f0b22d1a73960d4351efd76
[]
no_license
designreuse/jordan
3e049a78bd52fb418fd32b31fc88f0d13f5dd786
ae2e75f062c5a44bf6ee7211e1c5f617c3a9a718
refs/heads/master
2021-01-18T21:00:24.098238
2016-06-18T15:54:13
2016-06-18T15:54:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,622
java
package com.nuctech.ls.model.vo.warehouse; /** * 关锁和组织机构VO类 * @author Administrator * */ public class ElockDepartmentVO { /* 关锁主键 */ private String elockId; /* 关锁号 */ private String elockNumber; /* 所属节点 */ private String belongTo; /* SIM卡号,多个用逗号分开 */ private String simCard; /* 信息上传频率 */ private String interval; /* 网关地址 */ private String gatewayAddress; /* * 关锁状态 维修、损坏、报废等 */ private String elockStatus; private String organizationId; /* 机构名称 */ private String organizationName; /* 上级机构 */ private String parentId; /* 1、国家 2、口岸 3、监管场所 4、建管中心 */ private String organizationType; /* 层次码 */ private String levelCode; /* 经度 */ private String longitude; /* 纬度 */ private String latitude; /* 有效标记 */ private String isEnable; /* 机构描述 */ private String organizationDesc; public ElockDepartmentVO (){ super(); } public ElockDepartmentVO(String elockId, String elockNumber,String belongTo, String simCard, String interval,String gatewayAddress,String elockStatus, String organizationId,String organizationName,String parentId,String organizationType, String levelCode,String longitude,String latitude,String isEnable,String organizationDesc){ super(); this.elockId=elockId; this.elockNumber=elockNumber; this.belongTo=belongTo; this.simCard=simCard; this.interval=interval; this.gatewayAddress=gatewayAddress; this.elockStatus=elockStatus; this.organizationId=organizationId; this.organizationName=organizationName; this.parentId=parentId; this.organizationType=organizationType; this.levelCode=levelCode; this.longitude=longitude; this.latitude=latitude; this.isEnable=isEnable; this.organizationDesc=organizationDesc; } public String getElockId() { return elockId; } public void setElockId(String elockId) { this.elockId = elockId; } public String getElockNumber() { return elockNumber; } public void setElockNumber(String elockNumber) { this.elockNumber = elockNumber; } public String getBelongTo() { return belongTo; } public void setBelongTo(String belongTo) { this.belongTo = belongTo; } public String getSimCard() { return simCard; } public void setSimCard(String simCard) { this.simCard = simCard; } public String getInterval() { return interval; } public void setInterval(String interval) { this.interval = interval; } public String getGatewayAddress() { return gatewayAddress; } public void setGatewayAddress(String gatewayAddress) { this.gatewayAddress = gatewayAddress; } public String getElockStatus() { return elockStatus; } public void setElockStatus(String elockStatus) { this.elockStatus = elockStatus; } public String getOrganizationId() { return organizationId; } public void setOrganizationId(String organizationId) { this.organizationId = organizationId; } public String getOrganizationName() { return organizationName; } public void setOrganizationName(String organizationName) { this.organizationName = organizationName; } public String getParentId() { return parentId; } public void setParentId(String parentId) { this.parentId = parentId; } public String getOrganizationType() { return organizationType; } public void setOrganizationType(String organizationType) { this.organizationType = organizationType; } public String getLevelCode() { return levelCode; } public void setLevelCode(String levelCode) { this.levelCode = levelCode; } public String getLongitude() { return longitude; } public void setLongitude(String longitude) { this.longitude = longitude; } public String getLatitude() { return latitude; } public void setLatitude(String latitude) { this.latitude = latitude; } public String getIsEnable() { return isEnable; } public void setIsEnable(String isEnable) { this.isEnable = isEnable; } public String getOrganizationDesc() { return organizationDesc; } public void setOrganizationDesc(String organizationDesc) { this.organizationDesc = organizationDesc; } }
[ "569746540@qq.com" ]
569746540@qq.com
8b8f6e5c109d8c992c0a368a65b4d6e0209d7d1c
9f7bd42e5c2a7ac9235672ad8750add0b91c9a36
/assignment1/app/src/main/java/pk/edu/pucit/calculator/MainActivity.java
d52324340989f88561381c09f92472866b52db7d
[]
no_license
mqasimdilshad/mc-assignment1calc
f2e81619dee8e1e8002067ad32a9a63e2e728f1a
b56cdbf7d536a3935b1cf8afd0f4b55ff73befec
refs/heads/master
2022-11-16T23:46:30.164376
2020-07-15T19:11:15
2020-07-15T19:11:15
279,954,116
0
0
null
null
null
null
UTF-8
Java
false
false
4,555
java
package pk.edu.pucit.calculator; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import net.objecthunter.exp4j.Expression; import net.objecthunter.exp4j.ExpressionBuilder; public class MainActivity extends AppCompatActivity { private int[] numericButtons = {R.id.btnZero, R.id.btnOne, R.id.btnTwo, R.id.btnThree, R.id.btnFour, R.id.btnFive, R.id.btnSix, R.id.btnSeven, R.id.btnEight, R.id.btnNine,R.id.doubleZero}; private int[] operatorButtons = {R.id.btnAdd, R.id.btnSubtract,R.id.btnMultiply, R.id.btnDivide,R.id.modulus}; private TextView txtScreen; private TextView resultScreen; private boolean lastNumeric; private boolean stateError; private boolean lastDot; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); this.txtScreen = (TextView) findViewById(R.id.tv_equation); this.resultScreen=(TextView)findViewById(R.id.tv_result); setNumericOnClickListener(); setOperatorOnClickListener(); } private void setNumericOnClickListener() { View.OnClickListener listener = new View.OnClickListener() { @Override public void onClick(View v) { TextView button = (TextView) v; if (stateError) { txtScreen.setText(button.getText()); stateError = false; } else { txtScreen.append(button.getText()); } lastNumeric = true; } }; for (int id : numericButtons) { findViewById(id).setOnClickListener(listener); } } private void setOperatorOnClickListener() { // Create a common OnClickListener for operators View.OnClickListener listener = new View.OnClickListener() { @Override public void onClick(View v) { if (lastNumeric && !stateError) { TextView button = (TextView) v; txtScreen.append(button.getText()); lastNumeric = false; lastDot = false; } } }; for (int id : operatorButtons) { findViewById(id).setOnClickListener(listener); } findViewById(R.id.dot).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (lastNumeric && !stateError && !lastDot) { txtScreen.append("."); lastNumeric = false; lastDot = true; } } }); findViewById(R.id.ac).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { txtScreen.setText(""); lastNumeric = false; stateError = false; lastDot = false; } }); findViewById(R.id.equal).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onEqual(); } }); findViewById(R.id.delete).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String eq=txtScreen.getText().toString(); if(eq!=null && eq.length()>0) { if(eq.length()==1) { txtScreen.setText(""); } else{ eq=eq.substring(0,eq.length()-1); txtScreen.setText(eq); } } } }); } private void onEqual() { if (lastNumeric && !stateError) { String txt = txtScreen.getText().toString(); Expression expression = new ExpressionBuilder(txt).build(); try { double result = expression.evaluate(); resultScreen.setText(Double.toString(result)); lastDot = true; // Result contains a dot } catch (ArithmeticException ex) { resultScreen.setText("Error"); stateError = true; lastNumeric = false; } } } }
[ "bsef17m050@pucit.edu.pk" ]
bsef17m050@pucit.edu.pk
073dd1f7e5cad0bbe90219b5fd290f73a7fd185b
fe847429d061dd99efa06ea38521074bd697b2d6
/app/src/main/java/com/example/lesson5/ui/messages/MessageFragment.java
804faf29e1e9119314198dfa2461b0881a291dc7
[]
no_license
zhainaqova/lesson5
5fcde5129dfd2ba92e9412300274fb4d6863258a
b15f1a43fc3f7ef76a998009c28080351fd123ba
refs/heads/master
2023-01-24T15:47:38.672414
2020-12-01T15:49:12
2020-12-01T15:49:12
317,480,756
0
0
null
null
null
null
UTF-8
Java
false
false
641
java
package com.example.lesson5.ui.messages; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import com.example.lesson5.R; import com.example.lesson5.ui.home.HomeViewModel; public class MessageFragment extends Fragment { private HomeViewModel homeViewModel; View root; public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { root = inflater.inflate(R.layout.fragment_home, container, false); return root; } }
[ "zhainakova211@gmail.com" ]
zhainakova211@gmail.com
78be4ad98af45bf2f75935a142ec6400f6e3ed5c
6d0451462ee2fad1e16bcac2f4877cce37645f59
/app/src/test/java/com/vk/app_arduino/ExampleUnitTest.java
55d9da04ee6fd2c726c0453a091085eefb2daa56
[]
no_license
Out-Law/Android-Arduino
211f4d57684cfa9f9ebe1993f0c6578e835181ce
747ee3bee9238cd171833fca3ce217c0974b7edb
refs/heads/master
2023-01-04T13:41:06.764467
2020-10-19T15:11:14
2020-10-19T15:11:14
283,756,220
0
0
null
null
null
null
UTF-8
Java
false
false
379
java
package com.vk.app_arduino; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "nik.safronov.2014@bk.ru" ]
nik.safronov.2014@bk.ru
190fa06edb05feff598ab6db08bcd0a7145ce84b
dce222596084051a71451bd22fb0f492e4b10b6b
/src/br/estacio/programacao/PrimeiraClasse.java
6bbdda3b49409b4e8c84d0f6548df25dc8babf53
[]
no_license
waorrico/TADSTerceiroSemestre
fdffc7365af0861746780a274298a139691db818
25f13486aef6513aa9636e8b63bbab1f83c9c6f1
refs/heads/master
2021-01-16T00:42:21.485304
2017-09-01T00:15:00
2017-09-01T00:15:00
99,973,264
0
0
null
null
null
null
UTF-8
Java
false
false
1,526
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package br.estacio.programacao; /** * * @author aluno */ public class PrimeiraClasse { /** * @param args the command line arguments */ public static void main(String[] args) { //variavel do tipo logico recebe os valores true e false boolean h = true; // variavel do tipo caracter char b = 'x'; // variavel do tipo inteiro byte asd = 100; long y = 12345; int x = 10; short aaa = 4516; //variavel do tipo ponto flutuantr / real float z = 125.45218f; double xyz = 1234.2545; //obejto do tipo Palavra String palavra = "Sou uma string"; System.out.println("Variavel do Tipo boolean h(" + h + ")"); System.out.println("Variavel do Tipo char b(" + b + ")"); System.out.println("Variavel do Tipo int x(" + x + ")"); System.out.println("Variavel do Tipo double xyz(" + xyz + ")"); System.out.println("Variavel do Tipo long y(" + y + ")"); System.out.println("Variavel do Tipo float z(" + z + ")"); System.out.println("Variavel do Tipo byte asd(" + asd + ")"); System.out.println("Variavel do Tipo sort aaa(" + aaa + ")"); System.out.println("Objeto do tipo String (" + palavra + ")"); } }
[ "aluno@estacio.br" ]
aluno@estacio.br
2caac6919a612a0d54d0240e57b6491b9fe8f044
d3fddeb64a694e3f61bb1259ffbe6bdca5f41054
/src/main/java/headfirstjava/chap15/VerySimpleChatServer.java
d18d1f216723d0704015f9f4acfb33889679d6e7
[]
no_license
jinwei233/head-first-java-mvn
d2ba4420aeed49c62cb1b0fab85ee72335b0c942
a5e4335a3465788a2dee2dab07a89a167f3742cc
refs/heads/master
2020-03-26T15:51:09.411452
2018-08-18T16:02:16
2018-08-18T16:02:16
145,068,234
0
0
null
null
null
null
UTF-8
Java
false
false
1,763
java
package chap15; import java.io.*; import java.net.*; import java.util.*; public class VerySimpleChatServer { ArrayList clientOutputStreams; public class ClientHandler implements Runnable { BufferedReader reader; Socket sock; public ClientHandler(Socket clientSOcket) { try { sock = clientSOcket; InputStreamReader isReader = new InputStreamReader(sock.getInputStream()); reader = new BufferedReader(isReader); } catch (Exception ex) { ex.printStackTrace(); } } public void run() { String message; try { while ((message = reader.readLine()) != null) { System.out.println("read " + message); tellEveryone(message); } } catch (Exception ex) { ex.printStackTrace(); } } } public static void main(String[] args) { new VerySimpleChatServer().go(); } public void go() { clientOutputStreams = new ArrayList(); try { ServerSocket serverSock = new ServerSocket(5000); while (true) { Socket clientSocket = serverSock.accept(); PrintWriter writer = new PrintWriter(clientSocket.getOutputStream()); clientOutputStreams.add(writer); Thread t = new Thread(new ClientHandler(clientSocket)); t.start(); System.out.println("got a connection"); } } catch (Exception ex) { ex.printStackTrace(); } } public void tellEveryone(String message) { Iterator it = clientOutputStreams.iterator(); while (it.hasNext()) { try { PrintWriter writer = (PrintWriter) it.next(); writer.println(message); writer.flush(); } catch (Exception ex) { ex.printStackTrace(); } } } }
[ "525614992@qq.com" ]
525614992@qq.com
4dd56b9e67b39128f239c511601998820eb76c5b
195abc02461055b38ead567d44e812ed177cd13f
/PartitionStats.java
02abaeb637c433f167ba0bf28e7049412d206f21
[]
no_license
ds2014/image-pipeline
e63d4284528872f10bb0d1bbb23ef2d06e7368ac
279b1e8251f7e7dbc83c3e038127c8676fa73e50
refs/heads/master
2016-08-11T09:47:54.606825
2016-03-22T11:40:27
2016-03-22T11:40:27
54,469,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,614
java
package edu.umd.lims.fedora.kap; import java.text.NumberFormat; public class PartitionStats { protected Counter stagedUMDMTitleCount = new Counter(); protected Counter stagedUMAMFileCount = new Counter(); protected Counter uploadedProcessedUMDMTitleCount = new Counter(); protected Counter uploadedProcessedUMAMFileCount = new Counter(); protected Counter errorCount = new Counter(); protected Counter umdmTitleErrorCount = new Counter(); protected Counter umamFileErrorCount = new Counter(); public String getCurrentStatistics(){ StringBuilder result = new StringBuilder("Current Partition Statistics: " + "\n" ); result.append("Total UMDM Titles uploaded " + uploadedProcessedUMDMTitleCount.getValue()+ " of Total KAPs " +stagedUMDMTitleCount.getValue() + " Completed: " + getPercent(uploadedProcessedUMDMTitleCount.getValue(),stagedUMDMTitleCount.getValue())+ "\n"); result.append("Total UMAMs uploaded " + LoaderStats.uploadedProcessedUMAMCount.getValue() + " of Total UMAMs " + stagedUMAMFileCount.getValue() + " Completed: " + getPercent(uploadedProcessedUMAMFileCount.getValue(),stagedUMAMFileCount.getValue())); if (result != null) { return result.toString(); } else { return null; } } public String getSummaryStatictics(final Partition partition){ StringBuilder result = new StringBuilder("Partition Statistics: " + "\n"); result.append("Partition #: " + partition.getPartitionNumber() + "; " + " Partition path: " + partition.getPartitionPath()); result.append("; Total Partition UMDM Title Count: " + partition.getStats().stagedUMDMTitleCount.getValue() + "\n"); result.append("Total UMAM Files Count: " + partition.getStats().stagedUMAMFileCount.getValue() + "\n"); result.append("Total Uploaded UMDM Count: " + partition.getStats().uploadedProcessedUMDMTitleCount.getValue() + "\n"); result.append("Total Uploaded UMAM Count: " + partition.getStats().uploadedProcessedUMAMFileCount.getValue() + "\n"); result.append("Total Error Count: " + partition.getStats().errorCount.getValue()); result.append("---------------------------------"); if (result != null) { return result.toString(); } else { return null; } } public static String getPercent(int count, int totalCount){ double percent = 0; String result = ""; if (totalCount!=0){ percent = ( new Double(count)/totalCount); } NumberFormat percentFormatter = NumberFormat.getPercentInstance(); result = percentFormatter.format(percent); return result; } }
[ "ibelyaev@jcvi.org" ]
ibelyaev@jcvi.org
48fd5b525fccddc465f7a7ff165f005d3e8f3ecf
8aa49babbbf3cbbb9b9ea423f722180ddbe3a423
/clients-nodes/flavors/rokos-flavors-Pi2-Pi3/horizon/src/java/nxt/http/DownloadTaggedData.java
156aa4fe849a8ba055d82937b9214de5d5bd7906
[ "EPL-1.0", "LicenseRef-scancode-proprietary-license", "LGPL-2.1-or-later", "MIT", "LGPL-2.1-only", "MPL-2.0", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-philippe-de-muyter" ]
permissive
pichlerx/ROKOS-OK-Bitcoin-Fullnode
1b80721f7e8bf31ab8a294e0c4f3054098e14176
2e45d48f2adcd067fde1838a64d1f575c703641d
refs/heads/master
2023-05-14T12:25:39.478089
2023-04-28T08:03:38
2023-04-28T08:03:38
158,067,231
1
0
MIT
2018-11-18T09:18:02
2018-11-18T09:18:02
null
UTF-8
Java
false
false
3,335
java
/****************************************************************************** * Copyright © 2013-2015 The Nxt Core Developers. * * * * See the AUTHORS.txt, DEVELOPER-AGREEMENT.txt and LICENSE.txt files at * * the top-level directory of this distribution for the individual copyright * * holder information and the developer policies on copyright and licensing. * * * * Unless otherwise agreed in a custom licensing agreement, no part of the * * Nxt software, including this file, may be copied, modified, propagated, * * or distributed except according to the terms contained in the LICENSE.txt * * file. * * * * Removal or modification of this copyright notice is prohibited. * * * ******************************************************************************/ package nxt.http; import nxt.NxtException; import nxt.TaggedData; import org.json.simple.JSONStreamAware; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; public final class DownloadTaggedData extends APIServlet.APIRequestHandler { static final DownloadTaggedData instance = new DownloadTaggedData(); private DownloadTaggedData() { super(new APITag[] {APITag.DATA}, "transaction"); } @Override JSONStreamAware processRequest(HttpServletRequest request, HttpServletResponse response) throws NxtException { long transactionId = ParameterParser.getUnsignedLong(request, "transaction", true); TaggedData taggedData = TaggedData.getData(transactionId); byte[] data = taggedData.getData(); if (!taggedData.getType().equals("")) { response.setContentType(taggedData.getType()); } else { response.setContentType("application/octet-stream"); } try { String encodedFilename = URLEncoder.encode(taggedData.getFilename(), "UTF-8"); response.setHeader("Content-Disposition", "attachment; filename=" + encodedFilename + "; filename*=utf-8''" + encodedFilename); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e.toString(), e); // can't happen, UTF-8 should always be supported } response.setContentLength(data.length); try (OutputStream out = response.getOutputStream()) { try { out.write(data); } catch (IOException e) { throw new ParameterException(JSONResponses.RESPONSE_WRITE_ERROR); } } catch (IOException e) { throw new ParameterException(JSONResponses.RESPONSE_STREAM_ERROR); } return null; } @Override JSONStreamAware processRequest(HttpServletRequest request) throws NxtException { throw new UnsupportedOperationException(); } }
[ "devteam@okcash.co" ]
devteam@okcash.co
6cce3158cb4848e7fc6bb8d68d08060c4952a0af
0529524c95045b3232f6553d18a7fef5a059545e
/app/src/androidTest/java/TestCase_com_fsecure_freedome_vpn_security_privacy_android__702091896.java
5da426f2d9023ece15abec7daf0ecb074dc47f83
[]
no_license
sunxiaobiu/BasicUnitAndroidTest
432aa3e10f6a1ef5d674f269db50e2f1faad2096
fed24f163d21408ef88588b8eaf7ce60d1809931
refs/heads/main
2023-02-11T21:02:03.784493
2021-01-03T10:07:07
2021-01-03T10:07:07
322,577,379
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
import android.net.VpnService.Builder; import androidx.test.runner.AndroidJUnit4; import org.easymock.EasyMock; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) public class TestCase_com_fsecure_freedome_vpn_security_privacy_android__702091896 { @Test public void testCase() throws Exception { Object var2 = EasyMock.createMock(Builder.class); var2 = EasyMock.createMock(Builder.class); String var1 = "android"; ((Builder)var2).addSearchDomain(var1); } }
[ "sunxiaobiu@gmail.com" ]
sunxiaobiu@gmail.com
9d07d22e4b54f74b575697726b09a550d3766504
91574c128657a20553583063121f5b9b7a78d061
/LogicalProgram/src/sorting/SelectionSort.java
9572eb6d85e561e40a399c7cda9029c23225da04
[]
no_license
harbhajan2006/JavaWorkspace
15162823f8cdc6676510cb2eb97e22aa3c7d2216
1a2985cb66fc2e465c63cb0bb9fb47c6a04ab201
refs/heads/master
2022-12-27T12:19:16.102269
2020-05-22T17:45:44
2020-05-22T17:45:44
114,938,632
0
0
null
2020-10-13T04:00:56
2017-12-20T22:56:00
Java
UTF-8
Java
false
false
1,938
java
package sorting; /* Time Complexity: O(n2) as there are two nested loops. Auxiliary Space: O(1) The good thing about selection sort is it never makes more than O(n) swaps and can be useful when memory write is a costly operation. *The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning. The algorithm maintains two subarrays in a given array. 1) The subarray which is already sorted. 2) Remaining subarray which is unsorted. In every iteration of selection sort, the minimum element (considering ascending order) from the unsorted subarray is picked and moved to the sorted subarray. Following example explains the above steps: arr[] = 64 25 12 22 11 // Find the minimum element in arr[0...4] // and place it at beginning 11 25 12 22 64 // Find the minimum element in arr[1...4] // and place it at beginning of arr[1...4] 11 12 25 22 64 // Find the minimum element in arr[2...4] // and place it at beginning of arr[2...4] 11 12 22 25 64 // Find the minimum element in arr[3...4] // and place it at beginning of arr[3...4] 11 12 22 25 64 * */ public class SelectionSort{ // https://www.hackerearth.com/practice/algorithms/sorting/selection-sort/tutorial/ public static void main(String[] args) { /*int arr[]; Scanner sc = new Scanner(System.in); while(sc.hasNextInt()){ arr[]=sc.nextInt(); }*/ int arr[] = {64, 25, 12, 22, 11}; selectionSort(arr); ArrayUtility.printArray(arr); } private static void selectionSort(int[] arr){ int n = arr.length; int loc; // 5 4 6 3 2 for(int i=0;i<n; i++){ loc=i; for(int j=i+1;j<n ;j++){ if(arr[j]<arr[loc]){ // swap data //arr[i]=arr[j]; loc=j; } } ArrayUtility.swapIfNeeded(arr, i, loc); //arr[i]=arr[loc]; } } }
[ "harbhajan2006@users.noreply.github.com" ]
harbhajan2006@users.noreply.github.com
2aca71a1635e6d575e842cd14aafc74ef437ced3
4281d301d9514e521777b299e76cc20759c9b33d
/sys-service/src/main/java/cn/huace/sys/entity/RegionProvince.java
155c4c8014efaddd26077814b01da9ab88343d6a
[]
no_license
LoringCN/ShoppingCar
c485030fc7a1ca369c2ec1088613ba8d826c5778
c35da135b3bc1e4296a461f097b51ff35f13d3de
refs/heads/master
2022-12-25T16:49:23.012497
2019-02-25T07:13:12
2019-02-25T07:13:12
172,452,709
1
1
null
2022-12-16T03:51:03
2019-02-25T07:07:09
Java
UTF-8
Java
false
false
524
java
package cn.huace.sys.entity; import cn.huace.common.entity.BaseEntity; import lombok.Data; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import javax.persistence.Transient; import java.util.List; @Data @Entity @Table(name="region_province") public class RegionProvince extends BaseEntity { @Column(name = "province_id") private Integer provinceId; @Column(name = "name") private String name; @Transient private List<RegionCity> cityList; }
[ "173040251@qq.com" ]
173040251@qq.com
d786e95b72aa9c9e009e9a562965d69e3a619f53
660adc8ca6bb09ce5f943c0e6a8e874b80edd864
/src/test/java/top/parak/examarrangementsystem/service/RecruitApproverServiceTest.java
17103eb02044533ec0437b55af523997b04e3035
[]
no_license
Khighness/eas-server
0fa4f3e13f8f2eb0345739c0cd990f80f41b3b35
8eec058fa04bc2d88100431bbf440ab855f4f267
refs/heads/master
2023-05-03T16:54:42.952272
2021-05-19T06:27:35
2021-05-19T06:27:35
330,572,340
1
0
null
null
null
null
UTF-8
Java
false
false
2,695
java
package top.parak.examarrangementsystem.service; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import top.parak.examarrangementsystem.entity.RecruitApprover; import static org.junit.jupiter.api.Assertions.*; @Slf4j @SpringBootTest class RecruitApproverServiceTest { @Autowired private RecruitApproverService recruitApproverService; @Test void saveRecruitApprover() { int result = recruitApproverService.saveRecruitApprover( RecruitApprover.builder() .email("1823676372@qq.com") .password("CZK666") .build() ); assertEquals(1, result); } @Test void countOfRecruitApprover() { log.info("招办审批员数量:{}", recruitApproverService.countOfRecruitApprover()); } @Test void getRecruitApproverById() { log.info("ID为[1]的考点管理员信息:{}", recruitApproverService.getRecruitApproverById(1L)); } @Test void getRecruitApproverByEmail() { log.info("邮箱为[2298148442@qq.com]的考点管理员信息:{}", recruitApproverService.getRecruitApproverByEmail("2298148442@qq.com")); } @Test void getRecruitApproverByEmailAndPassword() { log.info("邮箱为[1823676372@qq.com],密码为[CZK666]的考点管理员信息:{}", recruitApproverService.getRecruitApproverByEmailAndPassword("1823676372@qq.com", "CZK666")); } @Test void getRecruitApproverList() { recruitApproverService.getRecruitApproverList().stream().forEach( e -> { log.info(e.toString()); } ); } @Test void getRecruitApproverByPage() { recruitApproverService.getRecruitApproverByPage(1, 1).stream().forEach( e -> { log.info(e.toString()); } ); } @Test void updateRecruitApproverPasswordById() { int result = recruitApproverService.updateRecruitApproverPasswordById(1L, "KAG1823"); assertEquals(1, result); } @Test void updateRecruitApproverInfoById() { int result = recruitApproverService.updateRecruitApproverInfoById( RecruitApprover.builder() .id(1L) .gender("男") .build() ); assertEquals(1, result); } @Test void deleteRecruitApproverById() { int result = recruitApproverService.deleteRecruitApproverById(1L); assertEquals(1, result); } }
[ "1823676372@qq.com" ]
1823676372@qq.com
17aa01527bdeba1ee3884f0a6d107db78864b3ae
84a644077d5de2daa4839c5222edf39ebb353a24
/LeetCode/src/question/sixty/to/seventy/SurroundedRegions.java
1cc4dc031785e3c4ba22dd4d5752aca0f0d4d874
[]
no_license
gchangfreddie/Leetcode
7f9d0e7ad3ed07cb8a312ee3884b73e949acf006
e2595348206723ec5be49b43b7bb64bd53b1ee11
refs/heads/master
2021-01-21T04:32:36.415957
2015-01-19T22:05:02
2015-01-19T22:05:02
29,496,211
0
0
null
null
null
null
UTF-8
Java
false
false
1,759
java
package question.sixty.to.seventy; import java.util.*; public class SurroundedRegions { public void solve(char[][] board) { if(board==null || board.length==0 || board[0].length==0) return; int m=board.length, n=board[0].length; LinkedList<Point> list = new LinkedList<Point>(); for (int i=0; i<n; i++) { if (board[0][i]=='O') list.add(new Point(0, i)); if (board[m-1][i]=='O') list.add(new Point(m-1, i)); } for (int i=1; i<m-1; i++) { if (board[i][0]=='O') list.add(new Point(i, 0)); if (board[i][n-1]=='O') list.add(new Point(i, n-1)); } while (!list.isEmpty()) { Point p = list.poll(); board[p.x][p.y]='y'; if (p.x>0 && board[p.x-1][p.y]=='O') list.add(new Point(p.x-1, p.y)); if (p.x<m-1 && board[p.x+1][p.y]=='O') list.add(new Point(p.x+1, p.y)); if (p.y>0 && board[p.x][p.y-1]=='O') list.add(new Point(p.x, p.y-1)); if (p.y<n-1 && board[p.x][p.y+1]=='O') list.add(new Point(p.x, p.y+1)); } for (int i=0; i<m; i++) { for (int j=0; j<n; j++) { if (board[i][j]=='y') board[i][j]='O'; else board[i][j]='X'; } } } public class Point{ int x, y; public Point(int a, int b) { x=a; y=b; } } public static void main(String[] args) { SurroundedRegions sr = new SurroundedRegions(); char[][] board = new char[][]{"xxxx".toCharArray(), "xoox".toCharArray(), "xxox".toCharArray(), "xoxx".toCharArray()}; sr.solve(board); System.out.println(board); } }
[ "accountsall007@gmail.com" ]
accountsall007@gmail.com
05a1f470fdf2fcb3353921eb858e1e3effbabe08
e06a886582c48d873492a0ebd18c25ca298e5a3a
/src/test/java/ucll/project/ui/LoginPageTest.java
24f8365a559cca6fd97d0557c8718b2fca39e5ac
[]
no_license
Projectweek-Test-TuurDutoit/team1
9f3a1f85345f1452696ff2f4264d9ed2cceb589a
f130e43f3f18b8d0918623dd8c001f1545ea9978
refs/heads/master
2020-04-10T13:12:58.722751
2018-12-09T17:12:26
2018-12-09T17:12:26
161,044,159
0
0
null
null
null
null
UTF-8
Java
false
false
2,917
java
package ucll.project.ui; import io.github.bonigarcia.wdm.WebDriverManager; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import ucll.project.ui.pages.HomePage; import ucll.project.ui.pages.LoginPage; import static org.junit.Assert.assertEquals; public class LoginPageTest { private static WebDriver driver; @BeforeClass public static void SetupChromeDriver(){ // Setup the Chrome driver for the whole class WebDriverManager.chromedriver().setup(); driver = new ChromeDriver(); driver.manage().window().maximize(); } @AfterClass public static void CloseChrome(){ // close it in the end, comment this away to keep chrome open driver.close(); } @Test public void LoginTestExpectSuccessV1(){ driver.get("http://localhost:8080/user/login"); driver.findElement(By.id("usernameInput")).sendKeys("user"); driver.findElement(By.id("passwordInput")).sendKeys("user"); driver.findElement(By.id("submitButton")).click(); String pageTitle = driver.findElement(By.id("pageTitle")).getText(); assertEquals("Hello world!",pageTitle); } @Test public void LoginTestExpectSuccessV2(){ LoginPage loginPage = new LoginPage(driver); loginPage.navigateTo(); HomePage homePage = loginPage.loginAs("user","user"); assertEquals("Hello world!", homePage.getPageTitle()); } @Test public void loginTestWithInvalidUsernameExpectFailure(){ LoginPage loginPage = new LoginPage(driver); loginPage.navigateTo(); loginPage = loginPage.loginAsExpectingError("invalid","user"); assertEquals("Please sign in",loginPage.getPageTitle()); assertEquals("Invalid username",loginPage.getErrorMessage()); } @Test public void loginTestWithoutUsernameExpectFailure(){ LoginPage loginPage = new LoginPage(driver); loginPage.navigateTo(); loginPage = loginPage.loginAsExpectingError("","user"); assertEquals("Please sign in",loginPage.getPageTitle()); } @Test public void loginTestWithInvalidPasswordExpectFailure(){ LoginPage loginPage = new LoginPage(driver); loginPage.navigateTo(); loginPage = loginPage.loginAsExpectingError("user","invalid"); assertEquals("Please sign in",loginPage.getPageTitle()); assertEquals("Invalid password",loginPage.getErrorMessage()); } @Test public void loginTestWithoutPasswordExpectFailure(){ LoginPage loginPage = new LoginPage(driver); loginPage.navigateTo(); loginPage = loginPage.loginAsExpectingError("user",""); assertEquals("Please sign in",loginPage.getPageTitle()); } }
[ "me@tuurdutoit.be" ]
me@tuurdutoit.be
6633bd4df7077db37d748c7156544aebc08589ac
b5e9c28f8ba7646d06ba32702b4db1b9346c7743
/java/demo/liu/src/main/java/com/liu/demo/LiuApplication.java
8f81b7c72fa894d093bb819a32b93ff3a20ac138
[ "BSD-2-Clause" ]
permissive
waytai/open
f7ff816ec4bd8b5866308210a38d7665e9599871
00fc6891a8fe8e7dc84067ebea8e69895e14e912
refs/heads/master
2022-12-22T04:19:17.438966
2020-06-06T08:08:49
2020-06-06T08:08:49
40,281,841
0
0
BSD-2-Clause
2022-12-16T05:17:40
2015-08-06T03:16:40
Go
UTF-8
Java
false
false
311
java
package com.liu.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class LiuApplication { public static void main(String[] args) { SpringApplication.run(LiuApplication.class, args); } }
[ "278972894@qq.com" ]
278972894@qq.com
f17380d2f56ec97fac0c9501e766dbd21346b73a
195fcd42d1718c81238b5216476e427f0486b656
/sponge/src/main/java/com/griefdefender/configuration/category/VisualCategory.java
96c55ec4350cab00364733f12b65b78413f5d871
[ "MIT" ]
permissive
BrainStone/GriefDefender
5538c250f4f28596df4d310a1cf7bac760b71341
08108592a223c5102271cf5adabe5f03f54533b4
refs/heads/master
2023-02-03T10:53:35.591825
2020-12-25T22:31:44
2020-12-25T22:31:44
324,441,380
0
0
MIT
2020-12-25T22:16:34
2020-12-25T22:16:34
null
UTF-8
Java
false
false
7,336
java
/* * This file is part of GriefDefender, licensed under the MIT License (MIT). * * Copyright (c) bloodmc * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.griefdefender.configuration.category; import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; import org.spongepowered.api.MinecraftVersion; import org.spongepowered.api.Sponge; @ConfigSerializable public class VisualCategory extends ConfigCategory { @Setting(value = "hide-borders-when-using-wecui", comment = "Whether to hide the glowstone/gold block borders when using WECUI.") public boolean hideBorders = false; @Setting(value = "hide-fillers-when-using-wecui", comment = "Whether to hide the block fillers when using WECUI.") public boolean hideFillers = false; @Setting(value = "hide-wecui-drag-visuals-2d", comment = "Whether drag visuals should be shown while creating a claim in 2D mode.") public boolean hideDrag2d = true; @Setting(value = "client-visuals-per-tick", comment = "The amount of block visuals a client can receive per tick when showing/hiding claims. Default: 12") public int clientVisualsPerTick = 12; @Setting(value = "claim-create-block", comment = "The visual block used during claim creation. (Default: minecraft:diamond_block)") public String claimCreateStartBlock = "minecraft:diamond_block"; @Setting(value = "filler-spacing", comment = "The space between each filler visual block.") public int fillerSpacing = 10; @Setting(value = "active-claim-visual-time", comment = "The active time, in seconds, to keep a claim's visuals shown to a player. (Default: 60)" + "\nNote: If value is <= 0, GD will use the default value.") public int claimVisualTime = 60; @Setting(value = "active-create-block-visual-time", comment = "The active time, in seconds, to keep a claim's create block visual shown to a player. (Default: 180)" + "\nNote: This only applies during claim creation." + "\nNote: If value is <= 0, GD will use the default value.") public int createBlockVisualTime = 180; @Setting(value = "admin-accent-block", comment = "The visual accent block used for admin claims. (Default: minecraft:pumpkin)") public String visualAdminAccentBlock = "minecraft:pumpkin"; @Setting(value = "admin-corner-block", comment = "The visual corner block used for admin claims. (Default: minecraft:glowstone)") public String visualAdminCornerBlock = "minecraft:glowstone"; @Setting(value = "admin-filler-block", comment = "The visual filler block used for admin claims. (Default: minecraft:pumpkin)") public String visualAdminFillerBlock = "minecraft:pumpkin"; @Setting(value = "basic-accent-block", comment = "The visual accent block used for basic claims. (Default: minecraft:gold_block)") public String visualBasicAccentBlock = "minecraft:gold_block"; @Setting(value = "basic-corner-block", comment = "The visual corner block used for basic claims. (Default: minecraft:glowstone)") public String visualBasicCornerBlock = "minecraft:glowstone"; @Setting(value = "basic-filler-block", comment = "The visual filler block used for basic claims. (Default: minecraft:gold_block)") public String visualBasicFillerBlock = "minecraft:gold_block"; @Setting(value = "error-accent-block", comment = "The visual accent block used to visualize an error in a claim. (Default: minecraft:netherrack)") public String visualErrorAccentBlock = "minecraft:netherrack"; @Setting(value = "error-corner-block", comment = "The visual corner block used to visualize an error in a claim. (Default: minecraft:redstone_ore)") public String visualErrorCornerBlock = "minecraft:redstone_ore"; @Setting(value = "error-filler-block", comment = "The visual filler block used to visualize an error in a claim. (Default: minecraft:diamond_block)") public String visualErrorFillerBlock = "minecraft:diamond_block"; @Setting(value = "subdivision-accent-block", comment = "The visual accent block used for subdivision claims. (Default: minecraft:white_wool or minecraft:wool for legacy versions)") public String visualSubdivisionAccentBlock; @Setting(value = "subdivision-corner-block", comment = "The visual corner block used for subdivision claims. (Default: minecraft:iron_block)") public String visualSubdivisionCornerBlock = "minecraft:iron_block"; @Setting(value = "subdivision-filler-block", comment = "The visual filler block used for subdivision claims. (Default: minecraft:white_wool or minecraft:wool for legacy versions)") public String visualSubdivisionFillerBlock; @Setting(value = "town-accent-block", comment = "The visual accent block used for town claims. (Default: minecraft:emerald_block)") public String visualTownAccentBlock = "minecraft:emerald_block"; @Setting(value = "town-corner-block", comment = "The visual corner block used for town claims. (Default: minecraft:glowstone)") public String visualTownCornerBlock = "minecraft:glowstone"; @Setting(value = "town-filler-block", comment = "The visual filler block used for town claims. (Default: minecraft:emerald_block)") public String visualTownFillerBlock = "minecraft:emerald_block"; @Setting(value = "nature-accent-block", comment = "The visual accent block used while in restore nature mode. (Default: minecraft:diamond_block)") public String visualNatureAccentBlock = "minecraft:diamond_block"; @Setting(value = "nature-corner-block", comment = "The visual corner block used while in restore nature mode. (Default: minecraft:diamond_block)") public String visualNatureCornerBlock = "minecraft:diamond_block"; public VisualCategory() { final MinecraftVersion version = Sponge.getPlatform().getMinecraftVersion(); if (version.getName().contains("1.8.8") || version.getName().contains("1.12")) { this.visualSubdivisionAccentBlock = "minecraft:wool"; this.visualSubdivisionFillerBlock = "minecraft:wool"; } else { this.visualSubdivisionAccentBlock = "minecraft:white_wool"; this.visualSubdivisionFillerBlock = "minecraft:white_wool"; } } }
[ "jdroque@gmail.com" ]
jdroque@gmail.com
2c8f06a7769eac42572d0582bef95200d7097f26
51ed1af9c69834726b12fc72839d4407dd0e0089
/org.xtext.quickfix/src-gen/org/xtext/quickfix/exampleQuickfix/impl/ExampleQuickfixPackageImpl.java
4f254cff8050dd2f618e4a91e9b8806a5a2608a4
[]
no_license
Vinayakatk/FormSection
5e616d3412ae624737141faadd42985cb019f519
009e0f2e5258a8022d8394811ee6da8a12422a4e
refs/heads/master
2020-04-06T05:48:28.832038
2016-04-15T12:52:32
2016-04-15T12:52:32
56,318,005
0
0
null
null
null
null
UTF-8
Java
false
false
8,180
java
/** */ package org.xtext.quickfix.exampleQuickfix.impl; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; import org.xtext.quickfix.exampleQuickfix.City; import org.xtext.quickfix.exampleQuickfix.ExampleQuickfixFactory; import org.xtext.quickfix.exampleQuickfix.ExampleQuickfixPackage; import org.xtext.quickfix.exampleQuickfix.Model; import org.xtext.quickfix.exampleQuickfix.Sight; /** * <!-- begin-user-doc --> * An implementation of the model <b>Package</b>. * <!-- end-user-doc --> * @generated */ public class ExampleQuickfixPackageImpl extends EPackageImpl implements ExampleQuickfixPackage { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass modelEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass cityEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass sightEClass = null; /** * Creates an instance of the model <b>Package</b>, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package * package URI value. * <p>Note: the correct way to create the package is via the static * factory method {@link #init init()}, which also performs * initialization of the package, or returns the registered package, * if one already exists. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see org.eclipse.emf.ecore.EPackage.Registry * @see org.xtext.quickfix.exampleQuickfix.ExampleQuickfixPackage#eNS_URI * @see #init() * @generated */ private ExampleQuickfixPackageImpl() { super(eNS_URI, ExampleQuickfixFactory.eINSTANCE); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link ExampleQuickfixPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static ExampleQuickfixPackage init() { if (isInited) return (ExampleQuickfixPackage)EPackage.Registry.INSTANCE.getEPackage(ExampleQuickfixPackage.eNS_URI); // Obtain or create and register package ExampleQuickfixPackageImpl theExampleQuickfixPackage = (ExampleQuickfixPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ExampleQuickfixPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ExampleQuickfixPackageImpl()); isInited = true; // Create package meta-data objects theExampleQuickfixPackage.createPackageContents(); // Initialize created meta-data theExampleQuickfixPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theExampleQuickfixPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(ExampleQuickfixPackage.eNS_URI, theExampleQuickfixPackage); return theExampleQuickfixPackage; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getModel() { return modelEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getModel_Cities() { return (EReference)modelEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getCity() { return cityEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getCity_Name() { return (EAttribute)cityEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getCity_Sights() { return (EReference)cityEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getSight() { return sightEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getSight_Name() { return (EAttribute)sightEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getSight_Description() { return (EAttribute)sightEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExampleQuickfixFactory getExampleQuickfixFactory() { return (ExampleQuickfixFactory)getEFactoryInstance(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private boolean isCreated = false; /** * Creates the meta-model objects for the package. This method is * guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features modelEClass = createEClass(MODEL); createEReference(modelEClass, MODEL__CITIES); cityEClass = createEClass(CITY); createEAttribute(cityEClass, CITY__NAME); createEReference(cityEClass, CITY__SIGHTS); sightEClass = createEClass(SIGHT); createEAttribute(sightEClass, SIGHT__NAME); createEAttribute(sightEClass, SIGHT__DESCRIPTION); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private boolean isInitialized = false; /** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Create type parameters // Set bounds for type parameters // Add supertypes to classes // Initialize classes and features; add operations and parameters initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getModel_Cities(), this.getCity(), null, "cities", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(cityEClass, City.class, "City", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getCity_Name(), ecorePackage.getEString(), "name", null, 0, 1, City.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCity_Sights(), this.getSight(), null, "sights", null, 0, -1, City.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(sightEClass, Sight.class, "Sight", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getSight_Name(), ecorePackage.getEString(), "name", null, 0, 1, Sight.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getSight_Description(), ecorePackage.getEString(), "description", null, 0, 1, Sight.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Create resource createResource(eNS_URI); } } //ExampleQuickfixPackageImpl
[ "vinayaka113@gmail.com" ]
vinayaka113@gmail.com
0b1d8f3208ab37b16523505b2409647f14dc6299
a129386863ccf46cab82819db1dcffac78dd73a0
/target/generated-sources/jooq/org/jooq/sources/routines/StApproxsummarystats6.java
dd633a6db4d79b005a6c651a529fa3322494142a
[]
no_license
alsamancov/jooqzkgis
5f01ef8cebfb9c3a9e6e535080987d94fad3290d
9082a66c349a1715e5ecdff41671e535eaa45ce4
refs/heads/master
2021-09-08T12:31:49.647475
2018-03-09T16:48:24
2018-03-09T16:48:24
124,567,389
0
0
null
null
null
null
UTF-8
Java
false
true
3,946
java
/* * This file is generated by jOOQ. */ package org.jooq.sources.routines; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Parameter; import org.jooq.impl.AbstractRoutine; import org.jooq.sources.Public; import org.jooq.sources.udt.records.SummarystatsRecord; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.10.3" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class StApproxsummarystats6 extends AbstractRoutine<SummarystatsRecord> { private static final long serialVersionUID = -1302548542; /** * The parameter <code>public.st_approxsummarystats.RETURN_VALUE</code>. */ public static final Parameter<SummarystatsRecord> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.sources.udt.Summarystats.SUMMARYSTATS.getDataType(), false, false); /** * The parameter <code>public.st_approxsummarystats.rastertable</code>. */ public static final Parameter<String> RASTERTABLE = createParameter("rastertable", org.jooq.impl.SQLDataType.CLOB, false, false); /** * The parameter <code>public.st_approxsummarystats.rastercolumn</code>. */ public static final Parameter<String> RASTERCOLUMN = createParameter("rastercolumn", org.jooq.impl.SQLDataType.CLOB, false, false); /** * The parameter <code>public.st_approxsummarystats.nband</code>. */ public static final Parameter<Integer> NBAND = createParameter("nband", org.jooq.impl.SQLDataType.INTEGER, false, false); /** * The parameter <code>public.st_approxsummarystats.sample_percent</code>. */ public static final Parameter<Double> SAMPLE_PERCENT = createParameter("sample_percent", org.jooq.impl.SQLDataType.DOUBLE, false, false); /** * Create a new routine call instance */ public StApproxsummarystats6() { super("st_approxsummarystats", Public.PUBLIC, org.jooq.sources.udt.Summarystats.SUMMARYSTATS.getDataType()); setReturnParameter(RETURN_VALUE); addInParameter(RASTERTABLE); addInParameter(RASTERCOLUMN); addInParameter(NBAND); addInParameter(SAMPLE_PERCENT); setOverloaded(true); } /** * Set the <code>rastertable</code> parameter IN value to the routine */ public void setRastertable(String value) { setValue(RASTERTABLE, value); } /** * Set the <code>rastertable</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void setRastertable(Field<String> field) { setField(RASTERTABLE, field); } /** * Set the <code>rastercolumn</code> parameter IN value to the routine */ public void setRastercolumn(String value) { setValue(RASTERCOLUMN, value); } /** * Set the <code>rastercolumn</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void setRastercolumn(Field<String> field) { setField(RASTERCOLUMN, field); } /** * Set the <code>nband</code> parameter IN value to the routine */ public void setNband(Integer value) { setValue(NBAND, value); } /** * Set the <code>nband</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void setNband(Field<Integer> field) { setField(NBAND, field); } /** * Set the <code>sample_percent</code> parameter IN value to the routine */ public void setSamplePercent(Double value) { setValue(SAMPLE_PERCENT, value); } /** * Set the <code>sample_percent</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void setSamplePercent(Field<Double> field) { setField(SAMPLE_PERCENT, field); } }
[ "alsamancov@gmail.com" ]
alsamancov@gmail.com
088d921634f9396ed33f7829de5ee9ee4ee96c29
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/live/model/m$a$i$$ExternalSyntheticLambda4.java
fcc4b61458853a609ecef662229f83ada67f7936
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
428
java
package com.tencent.mm.live.model; import com.tencent.mm.ui.widget.a.g.c; public final class m$a$i$$ExternalSyntheticLambda4 implements g.c { public final void onDialogClick(boolean arg1, String arg2) {} } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar * Qualified Name: com.tencent.mm.live.model.m.a.i..ExternalSyntheticLambda4 * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
556c4f39c144856ad50858bd8bffd775060bf00a
90d30c823a85908eff6918db87236016f376e1aa
/oauth2-ngx-extended-pdf-viewer-test/src/main/java/io/github/jhipster/sample/config/LoggingAspectConfiguration.java
4e181fea9c080649cd89d98b539635aa96f05eef
[ "Apache-2.0" ]
permissive
stephanrauh/ngx-extended-pdf-viewer-issues
aa71bd0a64ed9183976febfcf9ff5d55b0cbf11a
e97e07698d88178987dfa25acaf71f8dbf11ee5f
refs/heads/main
2023-06-11T07:09:32.566655
2023-06-03T13:01:51
2023-06-03T13:01:51
245,000,954
0
10
Apache-2.0
2023-03-07T00:24:13
2020-03-04T20:49:01
TypeScript
UTF-8
Java
false
false
512
java
package io.github.jhipster.sample.config; import io.github.jhipster.sample.aop.logging.LoggingAspect; import io.github.jhipster.config.JHipsterConstants; import org.springframework.context.annotation.*; import org.springframework.core.env.Environment; @Configuration @EnableAspectJAutoProxy public class LoggingAspectConfiguration { @Bean @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) public LoggingAspect loggingAspect(Environment env) { return new LoggingAspect(env); } }
[ "webmaster1@beyondjava.de" ]
webmaster1@beyondjava.de
7c06e82c0a9c617a3b80c4dd225ff80432cd2d6c
6772be6029364aad8430d6b1eb1ac06940325986
/src/tests/Test_query_floor_EC_EC.java
2db184e949b5e3a436044ffc864675b85a1c3003
[]
no_license
josielmoreira/Mutation_Teste_Initial
976d30956b13e80ad8bd5724ab7eed20125ccd98
e22834b0d1887478b2d1052e208ba613a14d23d5
refs/heads/master
2021-01-10T18:43:54.483339
2013-11-29T18:23:36
2013-11-29T18:23:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
412
java
package tests; import static org.junit.Assert.*; import main.Lift; import org.junit.After; import org.junit.Before; import org.junit.Test; public class Test_query_floor_EC_EC { private Lift lift; @Before public void Setup() { lift = new Lift(); } @Test public void TestCase1() { lift.setFloor(1); assertEquals(1, lift.query_floor()); } @After public void TearDown() { lift = null; } }
[ "josiel1nico@gmail.com" ]
josiel1nico@gmail.com