blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
8411efb5a474216d2965a9e1413f3cad66bbaa41
448e2cbb0de24ce1de7741f5a2ac478c9786c831
/presenter/src/main/java/hello/leavesC/presenter/viewModel/ChatViewModel.java
737bd32f5c967e125c30259b895d1fcb8d86d4d6
[]
no_license
AlfaLee/Chat-1
015aaa2fc4325f752c43a65da7a19dc3c55d0f2d
584d675ada70c31f2235e5f34765496095150575
refs/heads/master
2023-03-16T19:43:05.036212
2020-02-03T16:53:06
2020-02-03T16:53:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,455
java
package hello.leavesC.presenter.viewModel; import androidx.lifecycle.LifecycleOwner; import androidx.lifecycle.MediatorLiveData; import androidx.annotation.Nullable; import android.text.TextUtils; import com.tencent.imsdk.TIMConversation; import com.tencent.imsdk.TIMConversationType; import com.tencent.imsdk.TIMManager; import com.tencent.imsdk.TIMMessage; import com.tencent.imsdk.TIMTextElem; import com.tencent.imsdk.TIMValueCallBack; import com.tencent.imsdk.ext.message.TIMConversationExt; import com.tencent.imsdk.ext.message.TIMMessageDraft; import java.util.Collections; import java.util.List; import hello.leavesC.presenter.event.ChatActionEvent; import hello.leavesC.presenter.event.MessageActionEvent; import hello.leavesC.presenter.event.RefreshActionEvent; import hello.leavesC.presenter.liveData.MessageEventLiveData; import hello.leavesC.presenter.liveData.RefreshEventLiveData; import hello.leavesC.presenter.log.Logger; import hello.leavesC.presenter.viewModel.base.BaseViewModel; /** * 作者:叶应是叶 * 时间:2018/10/1 19:40 * 描述: */ public class ChatViewModel extends BaseViewModel { private static final String TAG = "ChatViewModel"; private TIMConversation conversation; //用于标记是否正在获取消息 private volatile boolean isGettingMessage = false; private static final int SHOW_LAST_MESSAGE_NUMBER = 20; private MessageEventLiveData messageEventLiveData; private RefreshEventLiveData refreshEventLiveData; private MediatorLiveData<TIMMessageDraft> messageDraftLiveData = new MediatorLiveData<>(); private MediatorLiveData<ChatActionEvent> chatActionLiveData = new MediatorLiveData<>(); private MediatorLiveData<TIMMessage> showMessageLiveData = new MediatorLiveData<>(); private MediatorLiveData<List<TIMMessage>> showListMessageLiveData = new MediatorLiveData<>(); public ChatViewModel() { messageEventLiveData = MessageEventLiveData.getInstance(); refreshEventLiveData = RefreshEventLiveData.getInstance(); } public void start(String identifier, TIMConversationType conversationType, LifecycleOwner lifecycleOwner) { conversation = TIMManager.getInstance().getConversation(conversationType, identifier); messageEventLiveData.observe(lifecycleOwner, this::handleMessageActionEvent); refreshEventLiveData.observe(lifecycleOwner, this::handleRefreshActionEvent); getMessage(null); TIMConversationExt timConversationExt = new TIMConversationExt(conversation); if (timConversationExt.hasDraft()) { messageDraftLiveData.setValue(timConversationExt.getDraft()); } } private void handleMessageActionEvent(MessageActionEvent messageActionEvent) { switch (messageActionEvent.getAction()) { case MessageActionEvent.NEW_MESSAGE: { TIMMessage message = messageActionEvent.getMessage(); if (message == null) { showMessageLiveData.setValue(null); } else if (message.getConversation().getPeer().equals(conversation.getPeer()) && message.getConversation().getType() == conversation.getType()) { showMessageLiveData.setValue(message); //当前聊天界面已读上报,用于多终端登录时未读消息数同步 readMessages(); } break; } } } private void handleRefreshActionEvent(RefreshActionEvent refreshActionEvent) { chatActionLiveData.setValue(new ChatActionEvent(ChatActionEvent.CLEAN_MESSAGE)); getMessage(null); } public void sendMessage(final TIMMessage message) { /* * 每条消息均位于四种状态其中之一:发送中、发送成功、发送失败、被删除 * 可以根据message.status()方法来获取 * 一开始message处于发送中状态,可以根据此来处理UI状态 */ //先进行发送操作 conversation.sendMessage(message, new TIMValueCallBack<TIMMessage>() { @Override public void onError(int code, String desc) { showToast(desc); chatActionLiveData.setValue(new ChatActionEvent(ChatActionEvent.SEND_MESSAGE_FAIL)); } @Override public void onSuccess(TIMMessage msg) { //此时消息发送成功,message.status()消息状态已在SDK中修改,此时传入null提示更新UI即可 messageEventLiveData.onNewMessage(null); } }); //此时message处在发送中状态,可以根据此来更新UI messageEventLiveData.onNewMessage(message); /* * 要注意的是,以上两个方法的执行顺序不能改变,一开始我是后执行发送操作的 * 可是此时sendMessage(TIMMessage message)方法传入的message并不包含发送对象与会话类型等信息 * 无法用于update(Observable observable, Object data)中的消息类型判断 * 因为这个琢磨了很久,后来调换了位置,发现后台将信息补全了 */ } /** * 获取消息 * * @param message 从该消息开始向前获取,如果为null,则表示从最新消息开始向前获取 */ public void getMessage(@Nullable TIMMessage message) { if (!isGettingMessage) { isGettingMessage = true; TIMConversationExt timConversationExt = new TIMConversationExt(conversation); timConversationExt.getMessage(SHOW_LAST_MESSAGE_NUMBER, message, new TIMValueCallBack<List<TIMMessage>>() { @Override public void onError(int i, String s) { isGettingMessage = false; Logger.e(TAG, "getMessage onError: " + i + " " + s); } @Override public void onSuccess(List<TIMMessage> timMessages) { Collections.reverse(timMessages); showListMessageLiveData.setValue(timMessages); readMessages(); isGettingMessage = false; } }); } } /** * 设置会话为已读 */ private void readMessages() { new TIMConversationExt(conversation).setReadMessage(null, null); } /** * 保存草稿 */ public void saveDraft(String draft) { TIMConversationExt timConversationExt = new TIMConversationExt(conversation); if (TextUtils.isEmpty(draft)) { timConversationExt.setDraft(null); } else { TIMTextElem textElem = new TIMTextElem(); textElem.setText(draft); TIMMessageDraft messageDraft = new TIMMessageDraft(); messageDraft.addElem(textElem); timConversationExt.setDraft(messageDraft); } } public MediatorLiveData<TIMMessageDraft> getMessageDraftLiveData() { return messageDraftLiveData; } public MediatorLiveData<ChatActionEvent> getChatActionLiveData() { return chatActionLiveData; } public MediatorLiveData<TIMMessage> getShowMessageLiveData() { return showMessageLiveData; } public MediatorLiveData<List<TIMMessage>> getShowListMessageLiveData() { return showListMessageLiveData; } }
[ "1990724437@qq.com" ]
1990724437@qq.com
b35dbf2f4bc15952d20f313795a0750bbd0671a1
fb9506d58c1dc3410a60308066cecc28fdcd360e
/OntologyUpdate/src/com/hp/hpl/jena/sparql/expr/ExprFunction.java
f87230b207e3b97861e2f15a8703b46a84cf0afa
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
utalo/ontologyUpdate
37cab2bf8c89f5d2c29d1036169363a9c901969e
96b8bcd880930a9d19363d2a80eac65496663b1b
refs/heads/master
2020-06-14T04:03:28.902754
2019-07-02T16:45:53
2019-07-02T16:45:53
194,888,725
0
0
null
null
null
null
UTF-8
Java
false
false
4,372
java
/* * (c) Copyright 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP * [See end of file] */ package com.hp.hpl.jena.sparql.expr; import java.util.ArrayList; import java.util.List; import com.hp.hpl.jena.sparql.serializer.SerializationContext; /** A function in the expression hierarchy. * Everything that is evaluable (i.e. not NodeValue, NodeVar) is a function). * It is useful to distinguish between values, vars and functions. */ public abstract class ExprFunction extends ExprNode { protected FunctionLabel funcSymbol ; protected String opSign ; protected ExprFunction(String fName) { funcSymbol = new FunctionLabel(fName) ; opSign = null ; } protected ExprFunction(String fName, String opSign) { this(fName) ; this.opSign = opSign ; } public abstract Expr getArg(int i) ; public abstract int numArgs() ; public List getArgs() { List x = new ArrayList() ; for ( int i = 1 ; i <= numArgs() ; i++ ) x.add(this.getArg(i)) ; return x ; } public boolean isFunction() { return true ; } public ExprFunction getFunction() { return this ; } public int hashCode() { return funcSymbol.hashCode() ^ numArgs() ; } // A function is equal if: // + The name is the same // + The arguments are the same (including arity). public boolean equals(Object other) { if ( this == other ) return true ; if ( ! other.getClass().equals(this.getClass()) ) return false ; ExprFunction ex = (ExprFunction)other ; if ( ! funcSymbol.equals(ex.funcSymbol) ) return false ; if ( numArgs() != ex.numArgs() ) return false ; // Arguments are 1, 2, 3, ... for ( int i = 1 ; i <= numArgs() ; i++ ) { Expr a1 = this.getArg(i) ; Expr a2 = ex.getArg(i) ; if ( ! a1.equals(a2) ) return false ; } return true ; } public void visit(ExprVisitor visitor) { visitor.visit(this) ; } /** Name used for output: * SPARQL format: just the extension functions * Prefix format: the function name, dafaulting to the symbol string * Overrided in ExprFunctionN */ public String getFunctionPrintName(SerializationContext cxt) { return funcSymbol.getSymbol() ; } /** Name as a simple name or "function" */ public String getFunctionName(SerializationContext cxt) { return funcSymbol.getSymbol() ; } public FunctionLabel getFunctionSymbol() { return funcSymbol ; } public String getFunctionIRI() { return null ; } public String getOpName() { return opSign ; } } /* * (c) Copyright 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
[ "uta.loesch@gmx.de" ]
uta.loesch@gmx.de
9ae82c84e43e60dae50122b00f68d997e4eaf87a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_aed21d078f6208dfd481dd67430cce32b5497950/For/2_aed21d078f6208dfd481dd67430cce32b5497950_For_s.java
c23e1523347f289f857d10794dd48d076e36caf4
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,015
java
package org.basex.query.expr; import static org.basex.query.QueryText.*; import static org.basex.query.QueryTokens.*; import java.io.IOException; import org.basex.data.Serializer; import org.basex.query.QueryContext; import org.basex.query.QueryException; import org.basex.query.item.Bln; import org.basex.query.item.Dbl; import org.basex.query.item.Item; import org.basex.query.item.Itr; import org.basex.query.item.SeqType; import org.basex.query.iter.Iter; import org.basex.query.util.Var; import org.basex.util.Token; /** * For clause. * * @author Workgroup DBIS, University of Konstanz 2005-10, ISC License * @author Christian Gruen */ public final class For extends ForLet { /** Positional variable. */ private final Var pos; /** Full-text score. */ private final Var score; /** * Constructor. * @param e variable input * @param v variable * @param p positional variable * @param s score variable */ public For(final Expr e, final Var v, final Var p, final Var s) { super(e, v); pos = p; score = s; } @Override public ForLet comp(final QueryContext ctx) throws QueryException { // empty sequence - empty loop expr = checkUp(expr, ctx).comp(ctx); /* bind variable if zero or one values are returned, and if no variables and no context reference is used. */ final SeqType ret = expr.returned(ctx); if(pos == null && score == null && ret.zeroOrOne() && !expr.uses(Use.VAR, ctx)) { ctx.compInfo(OPTBIND, var); var.bind(expr, ctx); } else { var.ret = new SeqType(ret.type, SeqType.Occ.O); } ctx.vars.add(var); if(pos != null) { ctx.vars.add(pos); pos.ret = SeqType.ITR; } if(score != null) { ctx.vars.add(score); score.ret = SeqType.ITR; } return this; } @Override public Iter iter(final QueryContext ctx) { final Var v = var.copy(); final Var p = pos != null ? pos.copy() : null; final Var s = score != null ? score.copy() : null; return new Iter() { /** Variable stack size. */ private int vs; /** Iterator flag. */ private Iter ir; /** Counter. */ private int c; @Override public Bln next() throws QueryException { if(ir == null) { vs = ctx.vars.size(); ir = ctx.iter(expr); ctx.vars.add(v); if(p != null) ctx.vars.add(p); if(s != null) ctx.vars.add(s); } final Item it = ir.next(); if(it != null) { v.bind(it, ctx); if(p != null) p.bind(Itr.get(++c), ctx); if(s != null) s.bind(Dbl.get(it.score()), ctx); } else { reset(); } return Bln.get(ir != null); } @Override public boolean reset() { ctx.vars.reset(vs); if(ir != null) ir.reset(); ir = null; c = 0; return true; } }; } @Override boolean standard() { return pos == null && score == null; } @Override public boolean shadows(final Var v) { return super.shadows(v) || !v.visible(pos) || !v.visible(score); } @Override public String toString() { final StringBuilder sb = new StringBuilder(FOR + " " + var + " "); if(pos != null) sb.append(AT + " " + pos + " "); if(score != null) sb.append(SCORE + " " + score + " "); return sb.append(IN + " " + expr).toString(); } @Override public void plan(final Serializer ser) throws IOException { ser.openElement(this, VAR, var.name.str()); if(pos != null) ser.attribute(POS, pos.name.str()); if(score != null) ser.attribute(Token.token(SCORE), score.name.str()); expr.plan(ser); ser.closeElement(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b184b57911358ac2b157e1c9d89cf17d2e79edf1
92e7a62c54bcf24de97b5d4c1bb15b99f775bed2
/OpenConcerto/src/org/openconcerto/erp/core/sales/shipment/action/NouveauBonLivraisonAction.java
77feceacc38e60e95e8ce1f89fcb3298508a7779
[]
no_license
trespe/openconcerto
4a9c294006187987f64dbf936f167d666e6c5d52
6ccd5a7b56cd75350877842998c94434083fb62f
refs/heads/master
2021-01-13T02:06:29.609413
2015-04-10T08:35:31
2015-04-10T08:35:31
33,717,537
3
0
null
null
null
null
UTF-8
Java
false
false
1,261
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved. * * The contents of this file are subject to the terms of the GNU General Public License Version 3 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each file. */ package org.openconcerto.erp.core.sales.shipment.action; import org.openconcerto.erp.action.CreateFrameAbstractAction; import org.openconcerto.sql.Configuration; import org.openconcerto.sql.view.EditFrame; import javax.swing.Action; import javax.swing.JFrame; public class NouveauBonLivraisonAction extends CreateFrameAbstractAction { public NouveauBonLivraisonAction() { super(); this.putValue(Action.NAME, "Bon de livraison"); } @Override public JFrame createFrame() { return new EditFrame(Configuration.getInstance().getDirectory().getElement("BON_DE_LIVRAISON")); } }
[ "guillaume.maillard@gmail.com@658cf4a1-8b1b-4573-6053-fb3ec553790b" ]
guillaume.maillard@gmail.com@658cf4a1-8b1b-4573-6053-fb3ec553790b
b326624cd3966daafe47ce345be3c888d3c74ba0
4eea13dc72e0ff8ec79c7a94deca38e55868b603
/chapter20/db/SQLDate.java
d79050efd31c6ef874d60a792a2ac7bfe16b8ce1
[ "Apache-2.0" ]
permissive
helloShen/thinkinginjava
1a9bfad9afa68b226684f6e063e9fa2ae36d898c
8986b74b2b7ea1753df33af84cd56287b21b4239
refs/heads/master
2021-01-11T20:38:09.259654
2017-03-07T03:52:54
2017-03-07T03:52:54
79,158,702
3
0
null
null
null
null
UTF-8
Java
false
false
399
java
/** * 自定义注解 * 利用注解,从java类中直接生成SQL语句,创建Table。 */ package com.ciaoshen.thinkinjava.chapter20.db; import java.lang.annotation.*; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface SQLDate{ public int value() default 0; public String name() default ""; public Constraints constraints() default @Constraints; }
[ "symantec__@hotmail.com" ]
symantec__@hotmail.com
5ba749568c38b8418ba57d817996e5f43aeafa39
f09a6f8bd95126265b076330733283bcbd7000b2
/payment/src/test/java/org/killbill/billing/payment/caching/TestStateMachineConfigCache.java
ea2689c53a55cd271e3b906fc9938b8679be5aaa
[ "Apache-2.0" ]
permissive
anumber8/killbill
f899e142fc0f2486a0c1486e8e093a794b06bf21
ab761c1a0572babea2ec3647366682612237b08b
refs/heads/master
2021-01-01T14:47:54.734975
2020-02-06T23:54:53
2020-02-06T23:54:53
239,323,415
1
0
Apache-2.0
2020-02-09T15:04:54
2020-02-09T15:04:53
null
UTF-8
Java
false
false
8,051
java
/* * Copyright 2014-2018 Groupon, Inc * Copyright 2014-2018 The Billing Project, LLC * * The Billing Project licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package org.killbill.billing.payment.caching; import java.io.IOException; import java.net.URISyntaxException; import java.util.UUID; import java.util.concurrent.atomic.AtomicBoolean; import org.killbill.automaton.StateMachineConfig; import org.killbill.billing.callcontext.InternalCallContext; import org.killbill.billing.callcontext.InternalTenantContext; import org.killbill.billing.payment.PaymentTestSuiteNoDB; import org.killbill.billing.payment.api.PaymentApiException; import org.killbill.billing.payment.glue.PaymentModule; import org.killbill.xmlloader.UriAccessor; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import com.google.common.io.ByteStreams; import com.google.common.io.Resources; public class TestStateMachineConfigCache extends PaymentTestSuiteNoDB { private InternalTenantContext multiTenantContext; private InternalTenantContext otherMultiTenantContext; @BeforeMethod(groups = "fast") public void beforeMethod() throws Exception { if (hasFailed()) { return; } super.beforeMethod(); cacheControllerDispatcher.clearAll(); multiTenantContext = Mockito.mock(InternalTenantContext.class); Mockito.when(multiTenantContext.getAccountRecordId()).thenReturn(456L); Mockito.when(multiTenantContext.getTenantRecordId()).thenReturn(99L); otherMultiTenantContext = Mockito.mock(InternalCallContext.class); Mockito.when(otherMultiTenantContext.getAccountRecordId()).thenReturn(123L); Mockito.when(otherMultiTenantContext.getTenantRecordId()).thenReturn(112233L); } @Test(groups = "fast") public void testMissingPluginStateMachineConfig() throws PaymentApiException { Assert.assertNotNull(stateMachineConfigCache.getPaymentStateMachineConfig(UUID.randomUUID().toString(), internalCallContext)); Assert.assertNotNull(stateMachineConfigCache.getPaymentStateMachineConfig(UUID.randomUUID().toString(), multiTenantContext)); Assert.assertNotNull(stateMachineConfigCache.getPaymentStateMachineConfig(UUID.randomUUID().toString(), otherMultiTenantContext)); } @Test(groups = "fast") public void testExistingTenantStateMachineConfig() throws PaymentApiException, URISyntaxException, IOException { final String pluginName = UUID.randomUUID().toString(); final InternalCallContext differentMultiTenantContext = Mockito.mock(InternalCallContext.class); Mockito.when(differentMultiTenantContext.getTenantRecordId()).thenReturn(55667788L); final AtomicBoolean shouldThrow = new AtomicBoolean(false); final Long multiTenantRecordId = multiTenantContext.getTenantRecordId(); final Long otherMultiTenantRecordId = otherMultiTenantContext.getTenantRecordId(); Mockito.when(tenantInternalApi.getPluginPaymentStateMachineConfig(Mockito.eq(pluginName), Mockito.any(InternalTenantContext.class))).thenAnswer(new Answer<String>() { @Override public String answer(final InvocationOnMock invocation) throws Throwable { if (shouldThrow.get()) { throw new RuntimeException("For test purposes"); } final InternalTenantContext internalContext = (InternalTenantContext) invocation.getArguments()[1]; if (multiTenantRecordId.equals(internalContext.getTenantRecordId())) { return new String(ByteStreams.toByteArray(UriAccessor.accessUri(Resources.getResource(PaymentModule.DEFAULT_STATE_MACHINE_PAYMENT_XML).toExternalForm()))); } else if (otherMultiTenantRecordId.equals(internalContext.getTenantRecordId())) { return new String(ByteStreams.toByteArray(UriAccessor.accessUri(Resources.getResource(PaymentModule.DEFAULT_STATE_MACHINE_RETRY_XML).toExternalForm()))); } else { return null; } } }); // Verify the lookup for a non-cached tenant. No system config is set yet but DefaultStateMachineConfigCache returns a default empty one final StateMachineConfig defaultStateMachineConfig = stateMachineConfigCache.getPaymentStateMachineConfig(pluginName, differentMultiTenantContext); Assert.assertNotNull(defaultStateMachineConfig); // Make sure the cache loader isn't invoked, see https://github.com/killbill/killbill/issues/300 shouldThrow.set(true); final StateMachineConfig defaultStateMachineConfig2 = stateMachineConfigCache.getPaymentStateMachineConfig(pluginName, differentMultiTenantContext); Assert.assertNotNull(defaultStateMachineConfig2); Assert.assertEquals(defaultStateMachineConfig2, defaultStateMachineConfig); shouldThrow.set(false); // Verify the lookup for this tenant Assert.assertEquals(stateMachineConfigCache.getPaymentStateMachineConfig(UUID.randomUUID().toString(), multiTenantContext), defaultStateMachineConfig); final StateMachineConfig result = stateMachineConfigCache.getPaymentStateMachineConfig(pluginName, multiTenantContext); Assert.assertNotNull(result); Assert.assertEquals(result.getStateMachines().length, 8); // Verify the lookup for another tenant Assert.assertEquals(stateMachineConfigCache.getPaymentStateMachineConfig(UUID.randomUUID().toString(), otherMultiTenantContext), defaultStateMachineConfig); final StateMachineConfig otherResult = stateMachineConfigCache.getPaymentStateMachineConfig(pluginName, otherMultiTenantContext); Assert.assertNotNull(otherResult); Assert.assertEquals(otherResult.getStateMachines().length, 1); shouldThrow.set(true); // Verify the lookup for this tenant Assert.assertEquals(stateMachineConfigCache.getPaymentStateMachineConfig(pluginName, multiTenantContext), result); // Verify the lookup with another context for the same tenant final InternalCallContext sameMultiTenantContext = Mockito.mock(InternalCallContext.class); Mockito.when(sameMultiTenantContext.getAccountRecordId()).thenReturn(9102L); Mockito.when(sameMultiTenantContext.getTenantRecordId()).thenReturn(multiTenantRecordId); Assert.assertEquals(stateMachineConfigCache.getPaymentStateMachineConfig(pluginName, sameMultiTenantContext), result); // Verify the lookup with the other tenant Assert.assertEquals(stateMachineConfigCache.getPaymentStateMachineConfig(pluginName, otherMultiTenantContext), otherResult); // Verify clearing the cache works stateMachineConfigCache.clearPaymentStateMachineConfig(pluginName, multiTenantContext); Assert.assertEquals(stateMachineConfigCache.getPaymentStateMachineConfig(pluginName, otherMultiTenantContext), otherResult); try { stateMachineConfigCache.getPaymentStateMachineConfig(pluginName, multiTenantContext); Assert.fail(); } catch (final RuntimeException exception) { Assert.assertTrue(exception.getCause() instanceof RuntimeException); Assert.assertEquals(exception.getCause().getMessage(), "For test purposes"); } } }
[ "pierre@mouraf.org" ]
pierre@mouraf.org
da230223f5060ef85796cf54edbd9598a9e703a6
4df578c2b3d2dfeb661106bcbb1cec8df12b0ead
/picocli-examples/src/main/java/picocli/examples/exceptionhandler/ParameterExceptionHandlerDemo.java
ed0ef4d3ecb7ddb11e89f9ebb4c0ed759e75ada4
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "Classpath-exception-2.0", "GPL-2.0-only" ]
permissive
remkop/picocli
2d2555762ba6cb4d58b5f0b3112342dc8191dbd3
8e48885fc25424bd84232a16cfca6f60d088bc96
refs/heads/main
2023-09-01T20:17:15.575396
2023-08-28T21:51:26
2023-08-28T21:51:26
80,640,282
4,563
577
Apache-2.0
2023-09-14T11:43:03
2017-02-01T16:38:41
Java
UTF-8
Java
false
false
2,113
java
package picocli.examples.exceptionhandler; import picocli.CommandLine; import picocli.CommandLine.Command; import picocli.CommandLine.IParameterExceptionHandler; import picocli.CommandLine.MissingParameterException; import picocli.CommandLine.Model.ArgSpec; import picocli.CommandLine.Option; import picocli.CommandLine.ParameterException; @Command public class ParameterExceptionHandlerDemo implements Runnable { @Option(names="--mypath", defaultValue = "${env:MYPATH}", required = true, descriptionKey = "path") private String path; @Override public void run() { System.out.println("Path: " + path); } public static void main(String[] args) { final CommandLine commandLine = new CommandLine(new ParameterExceptionHandlerDemo()); // The default error message if --mypath is not specified and there is no environment variable MYPATH // is "Missing required option '--mypath=<path>'". // This example shows how to customize the error message // to indicate users may also specify an environment variable. IParameterExceptionHandler handler = new IParameterExceptionHandler() { IParameterExceptionHandler defaultHandler = commandLine.getParameterExceptionHandler(); public int handleParseException(ParameterException ex, String[] args) throws Exception { ArgSpec path = commandLine.getCommandSpec().findOption("--mypath"); if (ex instanceof MissingParameterException && ((MissingParameterException) ex).getMissing().contains(path)) { CommandLine cmd = ex.getCommandLine(); cmd.getErr().println(ex.getMessage() + ", alternatively specify environment variable MYPATH"); cmd.usage(cmd.getErr()); return cmd.getCommandSpec().exitCodeOnInvalidInput(); } return defaultHandler.handleParseException(ex, args); } }; int exitCode = commandLine .setParameterExceptionHandler(handler) .execute(args); } }
[ "remkop@yahoo.com" ]
remkop@yahoo.com
17cf33280642c6b424750ec69f258c9b1c92424d
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--kotlin/1b986b6d2b9dca63d4c4a0a78c812d4bc4963cbf/after/Generator.java
e6875c88f65ca6b62c8c06af7414c3cb775dd976
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,222
java
package org.jetbrains.k2js.translate.context.generator; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor; import java.util.List; import java.util.Map; /** * @author Pavel Talanov */ public final class Generator<V> { @NotNull private final Map<DeclarationDescriptor, V> values = Maps.newHashMap(); @NotNull private final List<Rule<V>> rules = Lists.newArrayList(); public void addRule(@NotNull Rule<V> rule) { rules.add(rule); } @NotNull public V get(@NotNull DeclarationDescriptor descriptor) { V result = values.get(descriptor); if (result != null) { return result; } return generate(descriptor); } @NotNull private V generate(@NotNull DeclarationDescriptor descriptor) { V result = null; for (Rule<V> rule : rules) { result = rule.apply(descriptor); if (result != null) { return result; } } throw new AssertionError("No rule applicable to generate result for " + descriptor.toString()); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
36ff427b44eaec4d395ce0f48740fa81e7426364
bc806b5d2f7f2933a4026ee1c625f05017b163c7
/TestDecom/cache/JADX/sources/jakhar/aseem/diva/InsecureDataStorage3Activity.java
97ea519dca5628d7241733a80d59cc49c839b19e
[]
no_license
dx33d/backup
ab9813005bcafa6e6f51c270b56b397d9f7ba7d5
0996542e2522fcb7b2a9c69bf7b9788797329783
refs/heads/master
2020-05-30T01:45:45.659311
2019-05-30T21:23:41
2019-05-30T21:23:41
189,484,194
0
0
null
null
null
null
UTF-8
Java
false
false
1,355
java
package jakhar.aseem.diva; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.EditText; import android.widget.Toast; import java.io.File; import java.io.FileWriter; public class InsecureDataStorage3Activity extends AppCompatActivity { /* Access modifiers changed, original: protected */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView((int) R.layout.activity_insecure_data_storage3); } public void saveCredentials(View view) { EditText usr = (EditText) findViewById(R.id.ids3Usr); EditText pwd = (EditText) findViewById(R.id.ids3Pwd); try { File uinfo = File.createTempFile("uinfo", "tmp", new File(getApplicationInfo().dataDir)); uinfo.setReadable(true); uinfo.setWritable(true); FileWriter fw = new FileWriter(uinfo); fw.write(usr.getText().toString() + ":" + pwd.getText().toString() + "\n"); fw.close(); Toast.makeText(this, "3rd party credentials saved successfully!", 0).show(); } catch (Exception e) { Toast.makeText(this, "File error occurred", 0).show(); Log.d("Diva", "File error: " + e.getMessage()); } } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
fcc6d8985efe3c956bf803012f7bab84b591a6bf
5e4100a6611443d0eaa8774a4436b890cfc79096
/src/main/java/com/alipay/api/domain/KoubeiTradeTicketTicketcodeQueryModel.java
cbb7a0e2e7614800db6bcef981a9ded0ac4f56b2
[ "Apache-2.0" ]
permissive
coderJL/alipay-sdk-java-all
3b471c5824338e177df6bbe73ba11fde8bc51a01
4f4ed34aaf5a320a53a091221e1832f1fe3c3a87
refs/heads/master
2020-07-15T22:57:13.705730
2019-08-14T10:37:41
2019-08-14T10:37:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
870
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 口碑凭证码查询 * * @author auto create * @since 1.0, 2019-07-26 17:37:07 */ public class KoubeiTradeTicketTicketcodeQueryModel extends AlipayObject { private static final long serialVersionUID = 8351165867345394456L; /** * 口碑门店id */ @ApiField("shop_id") private String shopId; /** * 12位的券码,券码为纯数字,且唯一不重复 */ @ApiField("ticket_code") private String ticketCode; public String getShopId() { return this.shopId; } public void setShopId(String shopId) { this.shopId = shopId; } public String getTicketCode() { return this.ticketCode; } public void setTicketCode(String ticketCode) { this.ticketCode = ticketCode; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
63a325e2a4f53e877c9b421529cd0346ca2c7111
c806e8925c30378996992ab57899fbd9ae9ec162
/corejava9/v2ch08/damageReporter/DamageReporter.java
efe5a39bcd025bb35951e700bf3d1bdb60a20bf4
[]
no_license
danielsunzhongyuan/java_practice
903a54d7ca281e2d70010b5e26aa5762e59e1721
93bccddb7f1038c55fbcf7a58128cb37b445fb93
refs/heads/master
2021-05-04T11:18:33.324771
2019-04-29T11:55:17
2019-04-29T11:55:17
45,896,573
0
0
null
null
null
null
UTF-8
Java
false
false
666
java
package damageReporter; import javax.swing.*; /** * This program demonstrates the use of an XML encoder and decoder. All GUI and drawing code is * collected in this class. The only interesting pieces are the action listeners for openItem and * saveItem. Look inside the DamageReport class for encoder customizations. * * @author Cay Horstmann * @version 1.02 2012-01-26 */ public class DamageReporter extends JFrame { public static void main(String[] args) { JFrame frame = new DamageReporterFrame(); frame.setTitle("DamageReporter"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } }
[ "sunzhongyuan@lvwan.com" ]
sunzhongyuan@lvwan.com
4589252faebbcdfc917192176878c1338e5f5e59
6fa701cdaa0d83caa0d3cbffe39b40e54bf3d386
/google/cloud/workflows/v1beta/google-cloud-workflows-v1beta-java/proto-google-cloud-workflows-v1beta-java/src/main/java/com/google/cloud/workflows/v1beta/CreateWorkflowRequestOrBuilder.java
1b10159387ce5ab50efe7d9c01fd839bdfa6652a
[ "Apache-2.0" ]
permissive
oltoco/googleapis-gen
bf40cfad61b4217aca07068bd4922a86e3bbd2d5
00ca50bdde80906d6f62314ef4f7630b8cdb6e15
refs/heads/master
2023-07-17T22:11:47.848185
2021-08-29T20:39:47
2021-08-29T20:39:47
null
0
0
null
null
null
null
UTF-8
Java
false
true
3,036
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/workflows/v1beta/workflows.proto package com.google.cloud.workflows.v1beta; public interface CreateWorkflowRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1beta.CreateWorkflowRequest) com.google.protobuf.MessageOrBuilder { /** * <pre> * Required. Project and location in which the workflow should be created. * Format: projects/{project}/locations/{location} * </pre> * * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code> * @return The parent. */ java.lang.String getParent(); /** * <pre> * Required. Project and location in which the workflow should be created. * Format: projects/{project}/locations/{location} * </pre> * * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code> * @return The bytes for parent. */ com.google.protobuf.ByteString getParentBytes(); /** * <pre> * Required. Workflow to be created. * </pre> * * <code>.google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED];</code> * @return Whether the workflow field is set. */ boolean hasWorkflow(); /** * <pre> * Required. Workflow to be created. * </pre> * * <code>.google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED];</code> * @return The workflow. */ com.google.cloud.workflows.v1beta.Workflow getWorkflow(); /** * <pre> * Required. Workflow to be created. * </pre> * * <code>.google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED];</code> */ com.google.cloud.workflows.v1beta.WorkflowOrBuilder getWorkflowOrBuilder(); /** * <pre> * Required. The ID of the workflow to be created. It has to fulfill the * following requirements: * * Must contain only letters, numbers, underscores and hyphens. * * Must start with a letter. * * Must be between 1-64 characters. * * Must end with a number or a letter. * * Must be unique within the customer project and location. * </pre> * * <code>string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED];</code> * @return The workflowId. */ java.lang.String getWorkflowId(); /** * <pre> * Required. The ID of the workflow to be created. It has to fulfill the * following requirements: * * Must contain only letters, numbers, underscores and hyphens. * * Must start with a letter. * * Must be between 1-64 characters. * * Must end with a number or a letter. * * Must be unique within the customer project and location. * </pre> * * <code>string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED];</code> * @return The bytes for workflowId. */ com.google.protobuf.ByteString getWorkflowIdBytes(); }
[ "bazel-bot-development[bot]@users.noreply.github.com" ]
bazel-bot-development[bot]@users.noreply.github.com
fd4683a6ee870a10eae2eab0fceffa7ec1a5b99c
39d5249686d1b7c2fca9bc33be0c0f6949378bba
/2011_lab3_zad1_java/src/rozprochy/rok2011/lab3/zad1/server/CLI.java
1b044a08a017979a189e57f8b816bcbaeeee8f75
[]
no_license
marcinlos/rozprochy
1896526dd9dce89d3cc43fc26c9ecede2015d643
32cdc88552778a69ed5def499213b2c50e515f65
refs/heads/master
2021-01-22T13:57:27.657818
2014-09-06T14:21:09
2014-09-06T14:21:09
8,122,196
0
1
null
null
null
null
UTF-8
Java
false
false
2,498
java
package rozprochy.rok2011.lab3.zad1.server; import java.io.IOException; import java.util.Map; import java.util.NoSuchElementException; import java.util.Scanner; import rozprochy.rok2011.lab3.zad1.common.CmdShowDevices; import rozprochy.rok2011.lab3.zad1.common.Command; import rozprochy.rok2011.lab3.zad1.common.CommandInterpreter; import rozprochy.rok2011.lab3.zad1.provider.DeviceFactory; /** * Command line interface interpreter for the server. */ public class CLI extends CommandInterpreter { private final LaboratoryImpl laboratory; private final DeviceProviders providers; /** * Creates a command line interface acting upon {@code laboratory} */ public CLI(LaboratoryImpl laboratory, DeviceProviders providers) throws IOException { this.laboratory = laboratory; this.providers = providers; this.cmdShowDevices = new CmdShowDevices(laboratory); registerHandler("add", cmdAdd); registerHandler("show", cmdShowDevices); registerHandler("types", cmdShowTypes); } private Command cmdAdd = new Command() { @Override public boolean execute(String cmd, Scanner input) { try { String type = input.next(); String name = input.next(); DeviceFactory provider = providers.getProviders().get(type); if (provider != null) { laboratory.registerDevice(name, provider); } else { System.err.println("Unknown device `" + type + "'"); } } catch (DeviceAlreadyExists e) { System.err.println("Device " + e.getName() + " already exists"); } catch (NoSuchElementException e) { System.err.println("incomplete command; add <type> <name>"); } return true; } }; private Command cmdShowDevices; private Command cmdShowTypes = new Command() { @Override public boolean execute(String cmd, Scanner input) { Map<String, DeviceFactory> ps = providers.getProviders(); if (! ps.isEmpty()) { for (DeviceFactory provider : ps.values()) { System.out.println(provider.getTypeName()); } } else { System.out.println("(no device providers)"); } return true; } }; }
[ "losiu99@gazeta.pl" ]
losiu99@gazeta.pl
1f7a01216c0f650a524c36126a8fcccebcafb7f7
f86938ea6307bf6d1d89a07b5b5f9e360673d9b8
/CodeComment_Data/Code_Jam/train/Standing_Ovation/S/StandingOvation(262).java
b529056a366616edb71a25cfc664f385865ba741
[]
no_license
yxh-y/code_comment_generation
8367b355195a8828a27aac92b3c738564587d36f
2c7bec36dd0c397eb51ee5bd77c94fa9689575fa
refs/heads/master
2021-09-28T18:52:40.660282
2018-11-19T14:54:56
2018-11-19T14:54:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,196
java
package methodEmbedding.Standing_Ovation.S.LYD575; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class StandingOvation { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(new File("data/standing ovation/A-small-attempt0.in")); BufferedWriter bw = new BufferedWriter(new FileWriter(new File("data/standing ovation/out"))); int t = sc.nextInt(); List<Integer> si = new ArrayList<Integer>(); for (int i = 0; i < t; i++) { sc.nextInt(); String s = sc.next(); si.clear(); for (int j = 0; j < s.length(); j++) { si.add(Integer.valueOf(s.substring(j, j + 1))); } int standing = 0; int friends = 0; for (int j = 0; j < si.size(); j++) { int curr = si.get(j); if (curr > 0 && j > standing) { friends += j - standing; standing += j - standing; } standing += curr; } System.out.println("Case #" + (i + 1) + ": " + friends); bw.write("Case #" + (i + 1) + ": " + friends + "\n"); } bw.close(); } }
[ "liangyuding@sjtu.edu.cn" ]
liangyuding@sjtu.edu.cn
177fb2142b9dfdf75b53c4646178565d133470bb
b19d9b53d8ae9f50e0bc3e6030d6b9713f9c16c3
/src/main/java/org/tinymediamanager/ui/components/EnhancedTextField.java
f37807d5ca356db3f337d9f545f4ab50f4cfa5ba
[ "Apache-2.0" ]
permissive
jmulvaney1/tinyMediaManager
3606cba26e24cfaaa378224dd4cf7aa343bf1480
bff0c13c5d0f286bac4f2b675c75bbafa111fc16
refs/heads/master
2021-01-12T00:35:11.536908
2016-12-27T09:58:21
2016-12-27T09:58:21
78,743,595
1
0
null
2017-01-12T12:32:26
2017-01-12T12:32:26
null
UTF-8
Java
false
false
4,338
java
package org.tinymediamanager.ui.components; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Insets; import java.awt.RenderingHints; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.util.ResourceBundle; import javax.swing.Icon; import javax.swing.JTextField; import javax.swing.UIManager; import javax.swing.border.Border; import org.apache.commons.lang3.StringUtils; import org.tinymediamanager.ui.IconManager; import org.tinymediamanager.ui.UTF8Control; /** * The class EnhancedTextField is used to create a JTextField with<br> * - an icon on the right side<br> * and/or<br> * - a default text when it is not focused * * @author Manuel Laggner */ public class EnhancedTextField extends JTextField implements FocusListener { private static final long serialVersionUID = 5397356153111919435L; private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("messages", new UTF8Control()); //$NON-NLS-1$ private Icon icon; private String textWhenNotFocused; private Insets dummyInsets; /** * just create a simple JTextField */ public EnhancedTextField() { this(null, null); } /** * create a JTextField showing a text when not focused and nothing entered * * @param textWhenNotFocused * the text to be shown */ public EnhancedTextField(String textWhenNotFocused) { this(textWhenNotFocused, null); } /** * create a JTextField with an image on the right side * * @param icon * the icon to be shown */ public EnhancedTextField(Icon icon) { this(null, icon); } /** * create a JTextField showing a text when not focused and nothing entered and an image to the right * * @param textWhenNotFocused * the text to be shown * @param icon * the icon to be shown */ public EnhancedTextField(String textWhenNotFocused, Icon icon) { super(); if (icon != null) { this.icon = icon; } else { this.icon = IconManager.EMPTY_IMAGE; } if (textWhenNotFocused != null) { this.textWhenNotFocused = textWhenNotFocused; } else { this.textWhenNotFocused = ""; } if (StringUtils.isNotBlank(textWhenNotFocused)) { this.addFocusListener(this); } Border border = UIManager.getBorder("TextField.border"); JTextField dummy = new JTextField(); this.dummyInsets = border.getBorderInsets(dummy); } @Override protected void paintComponent(Graphics g) { super.paintComponent(g); int textX = 2; if (this.icon != null) { int iconWidth = icon.getIconWidth(); int iconHeight = icon.getIconHeight(); int x = this.getWidth() - dummyInsets.right - iconWidth - 5;// this is our icon's x textX = x + iconWidth + 2; // this is the x where text should start int y = (this.getHeight() - iconHeight) / 2; icon.paintIcon(this, g, x, y); } setMargin(new Insets(2, textX, 2, 2)); if (!this.hasFocus() && StringUtils.isEmpty(this.getText())) { int height = this.getHeight(); Font prev = g.getFont(); Font italic = prev.deriveFont(Font.ITALIC); Color prevColor = g.getColor(); g.setFont(italic); g.setColor(UIManager.getColor("textInactiveText")); int h = g.getFontMetrics().getHeight(); int textBottom = (height - h) / 2 + h - 4; int x = this.getInsets().left; Graphics2D g2d = (Graphics2D) g; RenderingHints hints = g2d.getRenderingHints(); g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); g2d.drawString(textWhenNotFocused, x, textBottom); g2d.setRenderingHints(hints); g.setFont(prev); g.setColor(prevColor); } } @Override public void focusGained(FocusEvent e) { this.repaint(); } @Override public void focusLost(FocusEvent e) { this.repaint(); } /** * create a predefined search text field * * @return the JTextField for searching */ public static EnhancedTextField createSearchTextField() { return new EnhancedTextField(BUNDLE.getString("tmm.searchfield"), null); //$NON-NLS-1$ } }
[ "manuel.laggner@gmail.com" ]
manuel.laggner@gmail.com
96114016ccdaa2c4bb745851aac739a79e5928b7
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-422-25-5-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/xhtml/filter/DTDXMLFilter_ESTest_scaffolding.java
a1aa19055f329b1f364e10d99cc2489896cc4bb8
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 04 16:43:19 UTC 2020 */ package org.xwiki.rendering.wikimodel.xhtml.filter; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DTDXMLFilter_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
4b9238fe871e31eadf50222aac8f24a4291bfbdd
e4099c6d8a0ba8560b09fdba1ef2d3cf0050ec4f
/client/src/main/java/org/zcj/rpc/client/codec/RpcClientEncoder.java
1dc084f228fec966ca78bebc3c0dccc65e9743ce
[]
no_license
yuzhihui199229/RPC-master
965d404da50b0415aafc7f2dd59f4b0699d0206f
cb609773d887e9f10056a3cff32de335624c530a
refs/heads/master
2023-07-13T14:55:21.552779
2021-08-20T10:37:43
2021-08-20T10:37:43
397,193,965
0
0
null
null
null
null
UTF-8
Java
false
false
1,570
java
package org.zcj.rpc.client.codec; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToByteEncoder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.zcj.rpc.common.model.Head; import org.zcj.rpc.common.model.Protocol; import org.zcj.rpc.serialization.Serializer; import org.zcj.rpc.serialization.SerializerFactory; /** * Author: cunjunzhang * Date: 2020/6/13 17 13 * Description: */ public class RpcClientEncoder extends MessageToByteEncoder<Protocol> { private static Logger log = LoggerFactory.getLogger(RpcClientEncoder.class); @Override protected void encode(ChannelHandlerContext ctx, Protocol protocol, ByteBuf out) throws Exception { log.debug("send request to server : " + protocol); if (protocol == null || protocol.getHead() == null) { throw new Exception("protocol can not be null."); } Head head = protocol.getHead(); Object body = protocol.getObject(); Serializer serializer = SerializerFactory.getSerializer(head.getSerializer()); byte[] bodyBytes = serializer.serialize(body); out.writeByte(head.getSerializer()); // 1个字节 out.writeByte(head.getType()); // 1个字节 out.writeBytes(head.getRequestId().getBytes()); // 32个字节 int bodyBytesLen = bodyBytes.length; out.writeInt(bodyBytesLen); // 4个字节 out.writeBytes(bodyBytes); } }
[ "844370396@qq.com" ]
844370396@qq.com
af646fbc3da2cdaac69dea7b053980033e100400
827bf064e482700d7ded2cd0a3147cb9657db883
/mobilesafe1/app/src/main/java/com/guoshisp/mobilesafe/receiver/OutCallReceiver.java
785c244c4336b94efc7ca8a763f1fd93d0048093
[]
no_license
cody0117/LearnAndroid
d30b743029f26568ccc6dda4313a9d3b70224bb6
02fd4d2829a0af8a1706507af4b626783524813e
refs/heads/master
2021-01-21T21:10:18.553646
2017-02-12T08:43:24
2017-02-12T08:43:24
null
0
0
null
null
null
null
BIG5
Java
false
false
986
java
package com.guoshisp.mobilesafe.receiver; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.guoshisp.mobilesafe.LostProtectedActivity; public class OutCallReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { //取得到廣播傳送來的結果資料 String outnumber = getResultData(); //設定我們撥號進入手機防盜的號碼 String enterPhoneBakNumber = "110"; //判斷設定的號碼是否與廣播過來的資料相同 if (enterPhoneBakNumber.equals(outnumber)) { //進入手機防盜界面 Intent lostIntent = new Intent(context, LostProtectedActivity.class); //為手機防盜對應的Activity設定一個新的工作堆疊 lostIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(lostIntent); // 攔截掉外撥的電話號碼,在撥號記錄中不會顯示該號碼 setResultData(null); } } } 
[ "em3888@gmail.com" ]
em3888@gmail.com
d2acf3277ff74035c9d88f697aff9d5363b749ef
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/androidannotations--androidannotations/b8c425f2cef979dc76aca212b31b679a1e3830a8/after/LayoutValidator.java
12d15d1f927fc548e333110f6e8ed33cfc58c0d3
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,291
java
/* * Copyright 2010-2011 Pierre-Yves Ricau (py.ricau at gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.googlecode.androidannotations.validation; import java.lang.annotation.Annotation; import javax.annotation.processing.ProcessingEnvironment; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import com.googlecode.androidannotations.annotations.Layout; import com.googlecode.androidannotations.helper.HasTargetAnnotationHelper; import com.googlecode.androidannotations.model.AnnotationElements; import com.googlecode.androidannotations.rclass.RClass; import com.googlecode.androidannotations.rclass.RInnerClass; import com.googlecode.androidannotations.rclass.RClass.Res; public class LayoutValidator extends HasTargetAnnotationHelper implements ElementValidator { private static final String ANDROID_ACTIVITY_QUALIFIED_NAME = "android.app.Activity"; private final RClass rClass; private final TypeElement activityTypeElement; public LayoutValidator(ProcessingEnvironment processingEnv, RClass rClass) { super(processingEnv); this.rClass = rClass; activityTypeElement = typeElementFromQualifiedName(ANDROID_ACTIVITY_QUALIFIED_NAME); } @Override public Class<? extends Annotation> getTarget() { return Layout.class; } @Override public boolean validate(Element element, AnnotationElements validatedElements) { IsValid valid = new IsValid(); validateIsActivity(element, valid); validateRFieldName(element, valid); validateIsNotAbstract(element, valid); validateIsNotFinal(element, valid); return valid.isValid(); } private void validateIsNotFinal(Element element, IsValid valid) { if (isFinal(element)) { valid.invalidate(); printAnnotationError(element, annotationName() + " should not be used on a final class"); } } private void validateIsNotAbstract(Element element, IsValid valid) { if (isAbstract(element)) { valid.invalidate(); printAnnotationError(element, annotationName() + " should not be used on an abstract class"); } } private void validateRFieldName(Element element, IsValid valid) { Layout layoutAnnotation = element.getAnnotation(Layout.class); int layoutIdValue = layoutAnnotation.value(); RInnerClass rInnerClass = rClass.get(Res.LAYOUT); if (!rInnerClass.containsIdValue(layoutIdValue)) { valid.invalidate(); printAnnotationError(element, "Layout id value not found in R.layout.*: " + layoutIdValue); } } private void validateIsActivity(Element element, IsValid valid) { TypeElement typeElement = (TypeElement) element; if (!isSubtype(typeElement, activityTypeElement)) { valid.invalidate(); printAnnotationError(element, annotationName() + " should only be used on Activity subclasses"); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
143f50f1a7f7d4372d9333770542f4502023bd35
853df67acc8dc32af7007726117ceb200b04f5e5
/app/src/main/java/com/personal/noncommercial/significantproject/moudle/presenter/PersonalPresenter.java
7ef4e680789542a57111cb447da78ee429028f9e
[]
no_license
lzc304214/significantproject
96440935a9f0a763b4343ebf81601c190186e4ea
224e23d6dda158261119b689487bc63ad4cb70a7
refs/heads/master
2020-03-28T10:26:53.544027
2019-10-23T13:40:39
2019-10-23T13:40:39
129,064,199
0
0
null
null
null
null
UTF-8
Java
false
false
242
java
package com.personal.noncommercial.significantproject.moudle.presenter; /** * @author :lizhengcao * @date :2018/5/30 * E-mail:lizc@bsoft.com.cn * @类说明 */ public interface PersonalPresenter { void getRemoteDataPresenter(); }
[ "1111" ]
1111
202bed6c92ac11b030ca1c7168cc00786c25face
0fb4213bf5d662e009c14b33666dc3d229fb66af
/毕设/毕业设计/jboot-admin/jboot-admin/src/main/java/io/jboot/admin/controller/institution/InstitutionDetailController.java
a642871e4a8d698e9d9aa2e9a9a47530b4b6fc30
[ "Apache-2.0" ]
permissive
wangwangla/qiuzhao
367cf06abd18dd8ad9d969ade81e351417151d68
45073be58d8332bdb6418b8cc96cc241d27cd34f
refs/heads/master
2022-07-17T18:17:02.917582
2019-11-06T14:15:22
2019-11-06T14:15:22
140,359,240
9
1
null
2022-06-29T17:42:43
2018-07-10T01:09:29
Java
UTF-8
Java
false
false
5,357
java
package io.jboot.admin.controller.institution; import java.util.Date; import java.util.List; import com.jfinal.plugin.activerecord.Page; import com.jfinal.plugin.activerecord.Record; import io.jboot.admin.base.common.RestResult; import io.jboot.admin.base.exception.BusinessException; import io.jboot.admin.base.interceptor.NotNullPara; import io.jboot.admin.base.rest.datatable.DataTable; import io.jboot.admin.base.web.base.BaseController; import io.jboot.admin.service.api.InstitutionDetailInfoService; import io.jboot.admin.service.api.InstitutionInfoService; import io.jboot.admin.service.api.ServiceOrderService; import io.jboot.admin.service.entity.model.InstitutionDetailInfo; import io.jboot.admin.service.entity.model.InstitutionInfo; import io.jboot.core.rpc.annotation.JbootrpcService; import io.jboot.web.controller.annotation.RequestMapping; @RequestMapping("/institution/detail") public class InstitutionDetailController extends BaseController{ @JbootrpcService private InstitutionDetailInfoService dataService; @JbootrpcService private InstitutionInfoService infoService; @JbootrpcService private ServiceOrderService service; public void tongji() { String id = getPara("id"); List<Record> lis = dataService.findByInstituId(id); if(lis.size()!=0) { Record r = lis.get(0); setAttr("data", r.get("wd_id")).render("tongji.html"); }else { render("tongji.html"); } } /** * index */ public void index() { String id = getPara("id"); setAttr("data", id).render("main.html"); } /** * 表格数据 */ public void tableData() { int pageNumber = getParaToInt("pageNumber", 1); int pageSize = getParaToInt("pageSize", 30); Page<InstitutionDetailInfo> dataPage = dataService.findPage(pageNumber, pageSize); renderJson(new DataTable<InstitutionDetailInfo>(dataPage)); } /** * add */ public void add() { render("add.html"); } /** * 保存提交 */ public void postAdd() { InstitutionDetailInfo data = getBean(InstitutionDetailInfo.class, "data"); InstitutionInfo info= infoService.findById(data.getInstitutionId()); data.setRepairNum(0); String i = info.getInstitutionWdNum(); int ii = Integer.valueOf(i); ii++; data.setAddDate(new Date()); info.setInstitutionWdNum(String.valueOf(ii)); if (!dataService.save(data)) { throw new BusinessException("保存失败"); } infoService.update(info); renderJson(RestResult.buildSuccess()); } /** * update */ @NotNullPara({"id"}) public void update() { String id = getPara("id"); InstitutionDetailInfo data = dataService.findById(id); setAttr("data", data).render("update.html"); } /** * 修改提交 */ public void postUpdate() { InstitutionDetailInfo data = getBean(InstitutionDetailInfo.class, "data"); if (dataService.findById(data.getWdId()) == null) { throw new BusinessException("数据不存在"); } if (!dataService.update(data)) { throw new BusinessException("修改失败"); } renderJson(RestResult.buildSuccess()); } /** * 删除 */ @NotNullPara({"id"}) public void delete() { String id = getPara("id"); if (!dataService.deleteById(id)) { throw new BusinessException("删除失败"); } renderJson(RestResult.buildSuccess()); } @NotNullPara({"id"}) public void findByInstituId(){ String id = getPara("id"); renderJson(dataService.findByInstituId(id)); } public void cache() { dataService.refreshCache(); renderJson(RestResult.buildSuccess()); } @NotNullPara({"id"}) public void detail() { String id = getPara("id"); Page<InstitutionDetailInfo> dataPage = dataService.findByIDXX(id); renderJson(new DataTable<InstitutionDetailInfo>(dataPage)); } @NotNullPara({"id"}) public void detailview() { String id = getPara("id"); setAttr("data", id).render("/template/main.html"); } /** * 年 */ @NotNullPara({"id"}) public void ndetail() { String id = getPara("id"); List<Record> dataPage = service.findByIDN(id); renderJson(dataPage); } /** * 月 */ @NotNullPara({"id"}) public void ydetail() { String id = getPara("id"); List<Record> dataPage = service.findByIDy(id); renderJson(dataPage); } /** * 季度 */ @NotNullPara({"id"}) public void jddetail() { String id = getPara("id"); List<Record> dataPage = service.findByIDjd(id); renderJson(dataPage); } /** * 周 */ @NotNullPara({"id"}) public void zdetail() { String id = getPara("id"); List<Record> dataPage = service.findByIDz(id); System.out.println(dataPage.toString()); renderJson(dataPage); } }
[ "2818815189@qq.com" ]
2818815189@qq.com
722c2c922dbbbccca2b518ea265ffaba43e1bd55
049d77ab75c0df848fce5e6f29baf31ac02a4f58
/src/main/java/org/efire/net/application/repository/PersistenceAuditEventRepository.java
6cccc8e81f188d7a01ea6f7dd37cf5947456ab97
[]
no_license
leqcar/simplePOSJHipster
a92869f1462e0ecc18b140d4df86c932483be5d9
75f38bf3df5bc7fb293ea8776601cbe511fede79
refs/heads/master
2020-03-18T21:25:48.624376
2018-06-14T15:13:06
2018-06-14T15:13:06
135,279,844
1
0
null
null
null
null
UTF-8
Java
false
false
990
java
package org.efire.net.application.repository; import org.efire.net.application.domain.PersistentAuditEvent; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import java.time.Instant; import java.util.List; /** * Spring Data JPA repository for the PersistentAuditEvent entity. */ public interface PersistenceAuditEventRepository extends JpaRepository<PersistentAuditEvent, Long> { List<PersistentAuditEvent> findByPrincipal(String principal); List<PersistentAuditEvent> findByAuditEventDateAfter(Instant after); List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfter(String principal, Instant after); List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principle, Instant after, String type); Page<PersistentAuditEvent> findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable); }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
f6fea73ec1a900de0ed4e37b429fc1590aa3ece8
0b547b288520cba0fac9c479d6ecb6941dd51221
/sk.stuba.fiit.perconik.core/src/sk/stuba/fiit/perconik/core/listeners/SelectionListener.java
074ce0a46626a0c4818183e518dc809ad02a9ad9
[ "MIT" ]
permissive
anukat2015/perconik
d1e25bdf9be2008723fb6e88943f7d7dc0dfaff8
d80dc0c29df4e3faf318ee18adcaa8f03bb50aab
refs/heads/master
2020-04-05T19:02:48.852160
2016-06-16T09:59:14
2016-06-16T09:59:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
333
java
package sk.stuba.fiit.perconik.core.listeners; import org.eclipse.ui.ISelectionListener; import sk.stuba.fiit.perconik.core.Listener; /** * A selection listener. * * @see Listener * @see ISelectionListener * * @author Pavol Zbell * @since 1.0 */ public interface SelectionListener extends Listener, ISelectionListener { }
[ "pavol.zbell@gmail.com" ]
pavol.zbell@gmail.com
48a7214759f5f325f2af814adde0a31d81aac8fa
37abbb3bc912370c88a6aec26b433421437a6e65
/fucai/module_xmlparser/src/main/java/com/cqfc/xmlparser/transactionmsg115/Msg.java
8b22162665a4ebc2d7c5fef2abe80e932c91e6cc
[]
no_license
ca814495571/javawork
cb931d2c4ff5a38cdc3e3023159a276b347b7291
bdfd0243b7957263ab7ef95a2a8f33fa040df721
refs/heads/master
2021-01-22T08:29:17.760092
2017-06-08T16:52:42
2017-06-08T16:52:42
92,620,274
3
0
null
null
null
null
UTF-8
Java
false
false
2,281
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2014.06.24 at 10:10:56 AM CST // package com.cqfc.xmlparser.transactionmsg115; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{}head"/> * &lt;element ref="{}body"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "head", "body" }) @XmlRootElement(name = "msg") public class Msg { @XmlElement(required = true) protected Headtype head; @XmlElement(required = true) protected Body body; /** * Gets the value of the head property. * * @return * possible object is * {@link Headtype } * */ public Headtype getHead() { return head; } /** * Sets the value of the head property. * * @param value * allowed object is * {@link Headtype } * */ public void setHead(Headtype value) { this.head = value; } /** * Gets the value of the body property. * * @return * possible object is * {@link Body } * */ public Body getBody() { return body; } /** * Sets the value of the body property. * * @param value * allowed object is * {@link Body } * */ public void setBody(Body value) { this.body = value; } }
[ "an__chen@163.com" ]
an__chen@163.com
3fdc462094947caafea924bd9b55c25f653a5ea5
eba0d35ac3cadf1700c571b6e98859eeb96c1498
/src/day22_23_ArrayLists/C06_List06_fibonacci.java
12832902c3c28a4842f070d5ea2a4560bf51ef92
[]
no_license
mosmant/java2021SummerTr
8da3153fe257a9f7636015fc726f18798c8d178b
82898988a62d923c99835027153b7ffd9dc71a50
refs/heads/master
2023-07-20T00:36:32.411637
2021-08-24T09:35:45
2021-08-24T09:35:45
399,409,441
1
1
null
null
null
null
ISO-8859-9
Java
false
false
1,058
java
package day22_23_ArrayLists; import java.util.ArrayList; import java.util.List; public class C06_List06_fibonacci { public static void main(String[] args) { // 100'den buyuk ilk 20 fibonacci sayisini list olarak yazdirin List <Integer> fibonacci =new ArrayList<>(); List <Integer> istenenSayilar = new ArrayList<>(); fibonacci.add(0); // ilk 2 elementini kendim oluşturuyorum buna göre diğerleri meydana geliyor. fibonacci.add(1); int count=1; int sayi=0; int i=1; do { // bu kısım fibonacci list i oluşturuyor. sayi=fibonacci.get(i-1)+fibonacci.get(i); fibonacci.add(sayi); if (sayi>100) { // burası ise istenenSayiler list ini oluşturduk. istenenSayilar.add(sayi); count++; // count u burada artıtıyorum. çünkü 100 den sonrası için kullanacağım. } i++; // indexi burada artırdık. }while(count<=20); // count 20 soruda 100 den sonra 20 elemanı istiyor. System.out.println(istenenSayilar); System.out.println(fibonacci); } }
[ "mottnr@gmail.com" ]
mottnr@gmail.com
30e38f8a37439fc3fae1fd97378447a3de01cbbe
dd4a8c77e1e7b4be5208da1f6387d95879b28712
/src/main/java/org/morshed/web/filter/SpaWebFilter.java
173b5132eab757d06a6884582636814be5c95641
[]
no_license
monjurmorshed793/e-dietics
97b3c618d16ac9f0a5d1717295a9c0ad674cf2b8
3654ac5dcb9f17f3a999aaf0b69fa7dc08e8a522
refs/heads/master
2023-08-22T01:26:18.761680
2021-10-21T18:06:06
2021-10-21T18:06:06
419,786,884
0
0
null
null
null
null
UTF-8
Java
false
false
1,139
java
package org.morshed.web.filter; import org.springframework.stereotype.Component; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebFilter; import org.springframework.web.server.WebFilterChain; import reactor.core.publisher.Mono; @Component public class SpaWebFilter implements WebFilter { /** * Forwards any unmapped paths (except those containing a period) to the client {@code index.html}. */ @Override public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) { String path = exchange.getRequest().getURI().getPath(); if ( !path.startsWith("/api") && !path.startsWith("/management") && !path.startsWith("/services") && !path.startsWith("/swagger") && !path.startsWith("/v2/api-docs") && !path.startsWith("/v3/api-docs") && path.matches("[^\\\\.]*") ) { return chain.filter(exchange.mutate().request(exchange.getRequest().mutate().path("/index.html").build()).build()); } return chain.filter(exchange); } }
[ "monjurmorshed793@gmail.com" ]
monjurmorshed793@gmail.com
c3c71a60d80972678ac39a44f011c1231d226796
eca4a253fe0eba19f60d28363b10c433c57ab7a1
/server/openjacob.admin/java/jacob/model/Memory_history.java
75db9eb23cc1c3d36e8fa29f97139909e822d353
[]
no_license
freegroup/Open-jACOB
632f20575092516f449591bf6f251772f599e5fc
84f0a6af83876bd21c453132ca6f98a46609f1f4
refs/heads/master
2021-01-10T11:08:03.604819
2015-05-25T10:25:49
2015-05-25T10:25:49
36,183,560
0
0
null
null
null
null
UTF-8
Java
false
false
3,696
java
/************************************************************************** * Project : jacob.admin * Date : Mon Jul 27 12:56:19 CEST 2009 * * THIS IS A GENERATED FILE - DO NOT CHANGE! * *************************************************************************/ package jacob.model; import de.tif.jacob.core.Context; import de.tif.jacob.core.data.IDataAccessor; import de.tif.jacob.core.data.IDataTableRecord; import de.tif.jacob.core.data.IDataTransaction; /** * * * Condition: <b></b> * DB table: <b>memory_history</b> * **/ public final class Memory_history { private Memory_history(){} // the name of the table alias public final static String NAME = "memory_history"; // All field names of the table alias "memory_history" /** * <br> * <br> * required: <b>true</b><br> * type: <b>TIMESTAMP</b><br> **/ public final static String systemtime = "systemtime"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>INTEGER</b><br> **/ public final static String free_kb = "free_kb"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>INTEGER</b><br> **/ public final static String total_kb = "total_kb"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>INTEGER</b><br> **/ public final static String max_kb = "max_kb"; /** * <br> * <br> * required: <b>false</b><br> * type: <b>INTEGER</b><br> **/ public final static String before_free_kb = "before_free_kb"; /** * <br> * <br> * required: <b>false</b><br> * type: <b>INTEGER</b><br> **/ public final static String before_total_kb = "before_total_kb"; /** * <br> * <br> * required: <b>false</b><br> * type: <b>INTEGER</b><br> **/ public final static String gc_duration = "gc_duration"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>INTEGER</b><br> **/ public final static String user_sessions = "user_sessions"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>INTEGER</b><br> **/ public final static String pkey = "pkey"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>TEXT</b><br> **/ public final static String nodename = "nodename"; /** * <br> * <br> * required: <b>true</b><br> * type: <b>DECIMAL</b><br> **/ public final static String free_percentage = "free_percentage"; /** * Create a new Record within the current DataAccessor of the Context with a new transaction **/ public static IDataTableRecord newRecord(Context context) throws Exception { return newRecord(context,context.getDataAccessor().newTransaction()); } /** * Create a new Record within the current DataAccessor of the Context and the handsover * transaction. **/ public static IDataTableRecord newRecord(Context context, IDataTransaction trans) throws Exception { return newRecord(context.getDataAccessor(),trans); } /** * Create a new Record within the hands over DataAccessor and a new transaction. **/ public static IDataTableRecord newRecord(IDataAccessor acc) throws Exception { return acc.getTable(NAME).newRecord(acc.newTransaction()); } /** * Create a new Record within the hands over DataAccessor and transaction. **/ public static IDataTableRecord newRecord(IDataAccessor acc, IDataTransaction trans) throws Exception { return acc.getTable(NAME).newRecord(trans); } }
[ "a.herz@freegroup.de" ]
a.herz@freegroup.de
111448e2335bf2070b9695ac32e6139496bf119d
a2f66c80cf6b7d79a6faf4bd8c52c847d70c44fa
/kuina-dao/src/test/java/org/seasar/kuina/dao/internal/binder/CalendarParameterBinderTest.java
d01e42fa37a78c2d97b7718c8523babe32766ba2
[]
no_license
seasarorg/kuina-dao
be7a4e35e2e968051e34561fc1b1f58c3154f2d2
d65f2e3c7fbe524edee4c399f8ab72b6046e8900
refs/heads/master
2021-01-23T13:28:49.800957
2013-10-04T02:48:01
2013-10-04T02:48:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,674
java
/* * Copyright 2004-2010 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.seasar.kuina.dao.internal.binder; import java.util.Calendar; import java.util.Date; import javax.persistence.Query; import javax.persistence.TemporalType; import org.seasar.framework.unit.EasyMockTestCase; import org.seasar.framework.unit.annotation.EasyMock; import org.seasar.framework.unit.annotation.EasyMockType; import static org.easymock.EasyMock.*; /** * {@link CalendarParameterBinder}のテスト. * * @author koichik */ public class CalendarParameterBinderTest extends EasyMockTestCase { @EasyMock(EasyMockType.STRICT) Query query; Calendar calendar; @Override protected void setUp() throws Exception { super.setUp(); calendar = Calendar.getInstance(); calendar.setTime(new Date()); } /** * Named Parameter のテスト. * * @throws Exception */ public void testNamedParameter() throws Exception { CalendarParameterBinder binder = new CalendarParameterBinder("name", TemporalType.DATE); binder.bind(query, calendar); } /** * {@link #testFillParameters}のMockの動作を記録. * * @throws Exception */ public void recordNamedParameter() throws Exception { expect(query.setParameter("name", calendar, TemporalType.DATE)) .andReturn(query); } /** * Positional Parameterのテスト. * * @throws Exception */ public void testPositionalParameter() throws Exception { CalendarParameterBinder binder = new CalendarParameterBinder(1, TemporalType.TIME); binder.bind(query, calendar); } /** * {@link #testPositionalParameter()}のMockの動作を記録. * * @throws Exception */ public void recordPositionalParameter() throws Exception { expect(query.setParameter(1, calendar, TemporalType.TIME)).andReturn( query); } }
[ "koichik@improvement.jp" ]
koichik@improvement.jp
f4a9d60a4778659f5d9ab9224c2855fa0b72230b
da43836d728650803c8ae5ce776fbcc8c1513f07
/ace-modules/bitcola-activity/src/main/java/com/bitcola/activity/mapper/SystemMapper.java
e17afda6dfa8b46f94ae4237f12aef18b0e3c82d
[ "Apache-2.0" ]
permissive
wxpkerpk/exchange-base-examlple
36253f96a1e478365feabad183636675ee1e4f4c
acb61eb9d8316c5cf290481362560203eaf682a7
refs/heads/master
2022-06-28T12:19:17.730542
2019-07-11T16:38:51
2019-07-11T16:38:51
196,430,856
1
4
Apache-2.0
2022-06-21T01:26:27
2019-07-11T16:34:47
Java
UTF-8
Java
false
false
425
java
package com.bitcola.activity.mapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.math.BigDecimal; import java.util.List; @Repository public interface SystemMapper { List<String> selectAllUserId(); void initInnerTestUserBalance(@Param("id") String id, @Param("coin") String coin, @Param("number") BigDecimal number, @Param("key") String balanceKey); }
[ "120443910@qq.com" ]
120443910@qq.com
fe52758f6a08d223546806ee6712451ff3fcd4dc
a3fe5db4cf9f5dc75b8331b1fe69de13e0549587
/activemq/openwire/v5/KeepAliveInfoMarshaller.java
60566b353811b89807f91dce40cf7ea6c082dd06
[]
no_license
ShengtaoHou/software-recovery
7cd8e1a0aabadb808a0f00e5b0503a582c8d3c89
72a3dde6a0cba56f851c29008df94ae129a05d03
refs/heads/master
2020-09-26T08:25:54.952083
2019-12-11T07:32:57
2019-12-11T07:32:57
226,215,103
1
0
null
null
null
null
UTF-8
Java
false
false
1,725
java
// // Decompiled by Procyon v0.5.36 // package org.apache.activemq.openwire.v5; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.BooleanStream; import java.io.DataInput; import org.apache.activemq.openwire.OpenWireFormat; import org.apache.activemq.command.KeepAliveInfo; import org.apache.activemq.command.DataStructure; public class KeepAliveInfoMarshaller extends BaseCommandMarshaller { @Override public byte getDataStructureType() { return 10; } @Override public DataStructure createObject() { return new KeepAliveInfo(); } @Override public void tightUnmarshal(final OpenWireFormat wireFormat, final Object o, final DataInput dataIn, final BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } @Override public int tightMarshal1(final OpenWireFormat wireFormat, final Object o, final BooleanStream bs) throws IOException { final int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } @Override public void tightMarshal2(final OpenWireFormat wireFormat, final Object o, final DataOutput dataOut, final BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } @Override public void looseUnmarshal(final OpenWireFormat wireFormat, final Object o, final DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } @Override public void looseMarshal(final OpenWireFormat wireFormat, final Object o, final DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } }
[ "shengtao@ShengtaoHous-MacBook-Pro.local" ]
shengtao@ShengtaoHous-MacBook-Pro.local
7f3ebdb6a2712109e665f2ddf41464912f7853a3
0c2e2e06c56ec0e05ddb74679fdfe6c4404274b1
/spring-data-jpa/src/main/java/com/sda/spring/data/jpa/repositories/pagination/PersonPagingAndSortingRepository.java
9cbd73026c5174fa9b9584d0fdb9057d7241e9b6
[]
no_license
cosminbucur/sda-upskill
d9ef46237c3cc93a25219b9ecbca60d0b7d5d14b
71fcab3705a8fb8c72bfa7dfa33d17fbde6a31fd
refs/heads/master
2023-08-11T20:19:51.710710
2021-09-11T20:16:18
2021-09-11T20:16:18
333,095,665
0
1
null
null
null
null
UTF-8
Java
false
false
447
java
package com.sda.spring.data.jpa.repositories.pagination; import com.sda.spring.data.jpa.repositories.Person; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.repository.PagingAndSortingRepository; public interface PersonPagingAndSortingRepository extends PagingAndSortingRepository<Person, Long> { Page<Person> findAllByAge(int age, Pageable pageable); }
[ "cosmin.bucur@kambi.com" ]
cosmin.bucur@kambi.com
77d73016a9b6ccba939bdec85ac7a49305140185
ee3db8c34dc91d6e8add03d603b3de412de96f5a
/edex/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/edex/common/nsharpLib/struct/LayerParameters.java
5d2ecb196662e8022113ed2e0910ed6ea1dc8935
[]
no_license
Unidata/awips2-ncep
a9aa3a26d83e901cbfaac75416ce586fc56b77d7
0abdb2cf11fcc3b9daf482f282c0491484ea312c
refs/heads/unidata_18.2.1
2023-07-24T03:53:47.775210
2022-07-12T14:56:56
2022-07-12T14:56:56
34,419,331
2
5
null
2023-03-06T22:22:27
2015-04-22T22:26:52
Java
UTF-8
Java
false
false
1,209
java
package gov.noaa.nws.ncep.edex.common.nsharpLib.struct; /** * * * This code has been developed by the NCEP-SIB for use in the AWIPS2 system. * * This class is a data structure used by nsharpLib functions to store a sounding layer parameters. * * <pre> * SOFTWARE HISTORY * * Date Ticket# Engineer Description * ------- ------- -------- ----------- * 08/24/2016 RM#15923 Chin Chen NSHARP - Native Code replacement. * * </pre> * * @author Chin Chen * @version 1.0 * */ import gov.noaa.nws.ncep.edex.common.nsharpLib.NsharpLibSndglib; public class LayerParameters { private float temperature; private float pressure; public LayerParameters() { super(); this.temperature = NsharpLibSndglib.NSHARP_NATIVE_INVALID_DATA; this.pressure = NsharpLibSndglib.NSHARP_NATIVE_INVALID_DATA; } public float getTemperature() { return temperature; } public void setTemperature(float temperature) { this.temperature = temperature; } public float getPressure() { return pressure; } public void setPressure(float pressure) { this.pressure = pressure; } }
[ "mjames@unidata.ucar.edu" ]
mjames@unidata.ucar.edu
d82be7171b5c9abcd733a5e93715032422730f22
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/agc029/D/3798504.java
46f74023a02007255e4497538ae992c6e2ff827f
[]
no_license
Kawser-nerd/CLCDSA
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
aee32551795763b54acb26856ab239370cac4e75
refs/heads/master
2022-02-09T11:08:56.588303
2022-01-26T18:53:40
2022-01-26T18:53:40
211,783,197
23
9
null
null
null
null
UTF-8
Java
false
false
3,668
java
import java.util.*; import java.io.*; import java.text.*; //Solution Credits: Taranpreet Singh public class Main{ //SOLUTION BEGIN void solve(int TC) throws Exception{ int h = ni(), w = ni(), n = ni(); TreeSet<Integer>[] set = new TreeSet[w]; for(int i = 0; i< w; i++){ set[i] = new TreeSet<>(); set[i].add(h); } for(int i = 0; i< n; i++){ int x = ni()-1, y = ni()-1; // set[y].add(x); set[y].add(x); } if(set[0].contains(1)){ pn(1); return; } int ans = INF; int x = 0, y = 0; int[] min = new int[w]; Arrays.fill(min, -1); min[0] = 0; for(int i = 0; i< w-1; i++){ if(set[y].contains(x+1))break; x++; while(x< h && !set[y].contains(x+1) && set[y+1].contains(x))x++; if(set[y+1].contains(x))break; min[y+1] = x; y++; } for(int i = 0; i< w; i++)if(min[i]!=-1){ int val = set[i].ceiling(min[i]); ans = Math.min(ans, val); } pn(ans); } //SOLUTION END long MOD = (long)1e9+7, IINF = (long)1e9+5; final int INF = (int)2e9, MAX = (int)2e5+1; DecimalFormat df = new DecimalFormat("0.0000000000"); double PI = 3.1415926535897932384626433832792884197169399375105820974944, eps = 1e-8; static boolean multipleTC = false, memory = false; FastReader in;PrintWriter out; void run() throws Exception{ in = new FastReader(); out = new PrintWriter(System.out); int T = (multipleTC)?ni():1; //Solution Credits: Taranpreet Singh for(int i = 1; i<= T; i++)solve(i); out.flush(); out.close(); } public static void main(String[] args) throws Exception{ if(memory)new Thread(null, new Runnable() {public void run(){try{new Main().run();}catch(Exception e){e.printStackTrace();}}}, "1", 1 << 28).start(); else new Main().run(); } long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);} int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);} int bit(long n){return (n==0)?0:(1+bit(n&(n-1)));} void p(Object o){out.print(o);} void pn(Object o){out.println(o);} void pni(Object o){out.println(o);out.flush();} String n(){return in.next();} String nln(){return in.nextLine();} int ni(){return Integer.parseInt(in.next());} long nl(){return Long.parseLong(in.next());} double nd(){return Double.parseDouble(in.next());} class FastReader{ BufferedReader br; StringTokenizer st; public FastReader(){ br = new BufferedReader(new InputStreamReader(System.in)); } public FastReader(String s) throws Exception{ br = new BufferedReader(new FileReader(s)); } String next(){ while (st == null || !st.hasMoreElements()){ try{ st = new StringTokenizer(br.readLine()); }catch (IOException e){ e.printStackTrace(); } } return st.nextToken(); } String nextLine(){ String str = ""; try{ str = br.readLine(); }catch (IOException e){ e.printStackTrace(); } return str; } } } Note: ./Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
[ "kwnafi@yahoo.com" ]
kwnafi@yahoo.com
5774344571faa6575d97931c2c72c5e6b5d0a501
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_bbc7d921f856a09321ac448b496703105194023c/VirgoPlanBuilder/7_bbc7d921f856a09321ac448b496703105194023c_VirgoPlanBuilder_t.java
ab94247c3ada66a4f5ef7761bcac2f8817dfa056
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,863
java
package com.hesham.maven.virgo; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.jar.JarFile; import java.util.jar.Manifest; import java.util.zip.ZipException; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import org.apache.maven.plugin.logging.Log; import com.hesham.maven.virgo.jaxb.plan.ArtifactType; import com.hesham.maven.virgo.jaxb.plan.ObjectFactory; import com.hesham.maven.virgo.jaxb.plan.Plan; public class VirgoPlanBuilder { private VirgoPlanConfig planConfig; String SEP = File.separator; Log logger ; /** * Creates the default configuration */ public VirgoPlanBuilder(VirgoPlanConfig planConfig, Log logger){ if (planConfig.getPlanFileName() == null) throw new IllegalArgumentException("No plan file name was specified."); if (planConfig.getPlanEntity() == null) throw new IllegalArgumentException("No plan entity was set."); this.planConfig = planConfig; this.logger = logger; } public boolean buildPlan(){ List<ArtifactType> planArtifacts = planConfig.getPlanEntity().getArtifact(); if (planArtifacts == null || planArtifacts.size() == 0) { // Try to get them from the plan configuration it self if (planConfig.getModulesNames() != null){ List<ArtifactType> artifacts = prepareArtifactTypes(planConfig.getModulesNames()); planArtifacts.addAll(artifacts); } } return writePlanFile(); } private List<ArtifactType> prepareArtifactTypes(List<String> modules){ if (modules == null) return null; List<ArtifactType> artifacts = new ArrayList<ArtifactType>(modules.size()); for (String moduleName : modules) { ArtifactType artifact = new ArtifactType(); String moduleDirPath = planConfig.getBasePath() + moduleName + File.separator ; String moduleTargetDirPath = moduleDirPath + "target" + File.separator ; try { // Get the module deployable (jar/war) name String deployableName = getModuleDeployableName(moduleDirPath); JarFile deployableJar ; try{ // Look at getModuleDeployableName's TODO deployableJar = new JarFile(moduleTargetDirPath + deployableName + ".jar"); }catch (ZipException e) { deployableJar = new JarFile(moduleTargetDirPath + deployableName + ".war"); } // Get its Manifest Manifest deployableJarManifest = deployableJar.getManifest(); String moduleSymbolicName = deployableJarManifest.getMainAttributes().getValue("Bundle-SymbolicName").trim(); String moduleVersion = deployableJarManifest.getMainAttributes().getValue("Bundle-Version").trim(); String moduleType = "bundle"; // Set the Artifact with values gotten from the original Manifest artifact.setName(moduleSymbolicName); artifact.setVersion(moduleVersion); artifact.setType(moduleType); // TODO: Inspect if there are any other artifact types artifacts.add(artifact); } catch (FileNotFoundException e) { getLogger().error("The module " + moduleName + "'s deployable couldn't be found, however the building will be continued."); } catch (IOException e) { e.printStackTrace(); } } return artifacts; }; /** * This gets the deployable name of a module/project * @param modulePath The absolute path of the module/project * @return * @throws IOException * @throws FileNotFoundException */ private String getModuleDeployableName(String modulePath) throws FileNotFoundException, IOException{ String moduleTargetDirPath = modulePath + File.separator + "target" + File.separator ; // Get the deployable name Properties jarInfo = new Properties(); jarInfo.load(new FileInputStream(moduleTargetDirPath + "maven-archiver" + SEP + "pom.properties")); String deployableName = jarInfo.getProperty("artifactId") + "-" + jarInfo.getProperty("version"); // Get the deployable extension // TODO For now, an assumption of it either being .jar or .war will be made by the caller of this method, later on enhance this by traversing the module's POM file for the packaging type directly return deployableName; } private boolean writePlanFile(){ // Write the plan JAXB to a file try { JAXBContext context = JAXBContext.newInstance("com.hesham.maven.virgo.jaxb.plan"); Marshaller marshaller = context.createMarshaller(); marshaller.setProperty("jaxb.formatted.output",Boolean.TRUE); marshaller.setProperty("jaxb.schemaLocation","http://www.eclipse.org/virgo/schema/plan http://www.eclipse.org/virgo/schema/plan/eclipse-virgo-plan.xsd"); JAXBElement<Plan> planElemWrapper = new ObjectFactory().createPlan(planConfig.getPlanEntity()); String filePath = planConfig.getBasePath() + planConfig.getOutputDirectoryName() + planConfig.getPlanFileName(); // By default, this should be the target directory File outputDir = new File(planConfig.getBasePath() + planConfig.getOutputDirectoryName()); if ( ! outputDir.exists()) outputDir.mkdir(); FileWriter fileWriter = new FileWriter(new File(filePath)); marshaller.marshal(planElemWrapper, fileWriter); fileWriter.close(); return true; } catch (JAXBException e) { e.printStackTrace(); return false; } catch (IOException e) { e.printStackTrace(); return false; } } public Log getLogger() { return logger; } public void setLogger(Log logger) { this.logger = logger; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8837ffacd9c8b0f3a73ad3575b1195be020859f2
2b554c46349d636018fa72dfe96fb99454fbc3c7
/spring-provider-81/src/main/java/com/etoc/service/area/impl/AreaServiceFacade.java
e19a991b0885479dcca597c9453ace7db87a361c
[]
no_license
liuxiaolonger/spring-demo
8ac8a56014c4df6a5e077b27a0e1e5d36ba1cf0c
434c004c4abdc6f3e3834987f8b67cd15986b197
refs/heads/master
2022-07-12T18:15:42.337307
2019-12-01T05:36:51
2019-12-01T05:36:51
178,666,430
0
0
null
2022-06-29T17:48:51
2019-03-31T09:18:01
Java
UTF-8
Java
false
false
3,191
java
package com.etoc.service.area.impl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import com.etoc.base.SysQueryService; import com.etoc.constant.DataType; import com.etoc.service.area.AbsAreaService; import com.etoc.service.area.AreaService; /** * 地区调度器 * * @author longlong * @version [版本号, 2019年1月16日] * @see [相关类/方法] * @since [产品/模块版本] */ @Service @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class AreaServiceFacade extends AbsAreaService implements AreaService { private final Logger logger = LoggerFactory.getLogger(getClass()); private String areaId;// 区域主键ID private Integer areaType;// 区域类型 private String areaName;// 区域名称 private String[] areaIds;//地域主键ID数组 @Override public AreaService addAreaIds(String[] areaIds) { this.areaIds=areaIds; return this; } @Override public AreaService addAreaId(String areaId) { this.areaId = areaId; return this; } @Override public AreaService addAreaType(Integer areaType) { this.areaType = areaType; return this; } @Override public AreaService addAreaName(String areaName) { this.areaName = areaName; return this;} @Override public SysQueryService<?> queryArea(String[] fields) throws Exception { logger.info("查询单个地区信息!"); SysQueryService<?> queryPageService = context.getBean(QueryArea.class) .addAreaId(areaId).addFields(fields); logger.info("执行器开始查询!"); queryPageService.execute(); return queryPageService; } @Override public SysQueryService<?> queryArea(Integer pageNum, Integer pageSize, DataType dataType, String[] fields) throws Exception { SysQueryService<?> sysQueryService = null; if (dataType == null) {// 设置默认分页查询 dataType = DataType.Page; } if (pageNum == null || pageSize == null) {// 设置默认分页查询的当前页和每页数量 pageNum = 1; pageSize = 10; } if (dataType == DataType.Page) { logger.info("分页查询地区信息集合!"); sysQueryService = context.getBean(QueryPageArea.class) .addAreaId(areaId).addAreaName(areaName).addAreaType(areaType) .setQueryParams(pageNum, pageSize, fields); } else if (dataType == DataType.List) { // 当areaId为null areaType为null 时查询所有地区 // 当areaId为null areaType不为null 时按地区类型查询 // 当areaId不为null areaType不为null 时根据父级id及类型查询其子级地域信息 logger.info("查询地区信息List集合!"); sysQueryService = context.getBean(QueryListArea.class) .addAreaId(areaId).addAreaType(areaType) .addFields(fields).addAreaIds(areaIds); } else if (dataType == DataType.Tree) { logger.info("查询地区树型菜单!"); sysQueryService = context.getBean(QueryAreaTree.class); } logger.info("执行器开始执行!"); sysQueryService.execute(); return sysQueryService; } }
[ "896846152@qq.com" ]
896846152@qq.com
4e4090c2859689e03b63f3e4e7e3998017778361
dc7ec58c25a7e29cdb81389e3733d9e3bdc21fc0
/import/common/src/main/java/org/xenei/galway2020/utils/CfgTools.java
3e4046567a9dc59990fba9efd438d0e66519bd7b
[]
no_license
Claudenw/galway2020
3b08e97cd856990c874032a3228c83b2ab3bd557
6ba35973cd14631d5b5e300e1897bd4ed2a94bd1
refs/heads/master
2023-04-30T13:36:36.625061
2023-04-17T11:08:26
2023-04-17T11:08:26
37,376,865
4
2
null
2015-07-12T11:15:15
2015-06-13T15:35:45
JavaScript
UTF-8
Java
false
false
631
java
package org.xenei.galway2020.utils; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.Set; import org.apache.commons.configuration.Configuration; public class CfgTools { /** * Get the set of prefixes for the configuration. * @param cfg The configuration to parse. * @return the set of prefixes from the configuration in order they appeared. */ public static Set<String> getPrefix(Configuration cfg) { Set<String> result = new LinkedHashSet<String>(); Iterator<String> iter = cfg.getKeys(); while (iter.hasNext()) { result.add(iter.next().split("\\.")[0]); } return result; } }
[ "claude@xenei.com" ]
claude@xenei.com
9055ab98a007c8bc12cadf5b0391e02e1bc320fc
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/compliance/gradientpunish/GradientPunishWarning.java
2fd3f93cd0ab730107c501cf058d08ff68ce398f
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,813
java
package com.p280ss.android.ugc.aweme.compliance.gradientpunish; import android.support.annotation.Keep; import com.google.gson.p276a.C6593c; import kotlin.jvm.internal.C7571f; import kotlin.jvm.internal.C7573i; @Keep /* renamed from: com.ss.android.ugc.aweme.compliance.gradientpunish.GradientPunishWarning */ public final class GradientPunishWarning { @C6593c(mo15949a = "toast_text") public final String bubbleText; @C6593c(mo15949a = "detail_url") public final String detailUrl; @C6593c(mo15949a = "popup_confirm") public final String dialogButton; @C6593c(mo15949a = "popup_text") public final String dialogMessage; @C6593c(mo15949a = "warn_type") public final int warnType; public GradientPunishWarning() { this(null, null, null, 0, null, 31, null); } public static /* synthetic */ GradientPunishWarning copy$default(GradientPunishWarning gradientPunishWarning, String str, String str2, String str3, int i, String str4, int i2, Object obj) { if ((i2 & 1) != 0) { str = gradientPunishWarning.dialogMessage; } if ((i2 & 2) != 0) { str2 = gradientPunishWarning.dialogButton; } String str5 = str2; if ((i2 & 4) != 0) { str3 = gradientPunishWarning.bubbleText; } String str6 = str3; if ((i2 & 8) != 0) { i = gradientPunishWarning.warnType; } int i3 = i; if ((i2 & 16) != 0) { str4 = gradientPunishWarning.detailUrl; } return gradientPunishWarning.copy(str, str5, str6, i3, str4); } public final String component1() { return this.dialogMessage; } public final String component2() { return this.dialogButton; } public final String component3() { return this.bubbleText; } public final int component4() { return this.warnType; } public final String component5() { return this.detailUrl; } public final GradientPunishWarning copy(String str, String str2, String str3, int i, String str4) { C7573i.m23587b(str, "dialogMessage"); C7573i.m23587b(str2, "dialogButton"); C7573i.m23587b(str3, "bubbleText"); C7573i.m23587b(str4, "detailUrl"); GradientPunishWarning gradientPunishWarning = new GradientPunishWarning(str, str2, str3, i, str4); return gradientPunishWarning; } public final boolean equals(Object obj) { if (this != obj) { if (obj instanceof GradientPunishWarning) { GradientPunishWarning gradientPunishWarning = (GradientPunishWarning) obj; if (C7573i.m23585a((Object) this.dialogMessage, (Object) gradientPunishWarning.dialogMessage) && C7573i.m23585a((Object) this.dialogButton, (Object) gradientPunishWarning.dialogButton) && C7573i.m23585a((Object) this.bubbleText, (Object) gradientPunishWarning.bubbleText)) { if (!(this.warnType == gradientPunishWarning.warnType) || !C7573i.m23585a((Object) this.detailUrl, (Object) gradientPunishWarning.detailUrl)) { return false; } } } return false; } return true; } public final String getBubbleText() { return this.bubbleText; } public final String getDetailUrl() { return this.detailUrl; } public final String getDialogButton() { return this.dialogButton; } public final String getDialogMessage() { return this.dialogMessage; } public final int getWarnType() { return this.warnType; } public final int hashCode() { String str = this.dialogMessage; int i = 0; int hashCode = (str != null ? str.hashCode() : 0) * 31; String str2 = this.dialogButton; int hashCode2 = (hashCode + (str2 != null ? str2.hashCode() : 0)) * 31; String str3 = this.bubbleText; int hashCode3 = (((hashCode2 + (str3 != null ? str3.hashCode() : 0)) * 31) + Integer.hashCode(this.warnType)) * 31; String str4 = this.detailUrl; if (str4 != null) { i = str4.hashCode(); } return hashCode3 + i; } public final String toString() { StringBuilder sb = new StringBuilder("GradientPunishWarning(dialogMessage="); sb.append(this.dialogMessage); sb.append(", dialogButton="); sb.append(this.dialogButton); sb.append(", bubbleText="); sb.append(this.bubbleText); sb.append(", warnType="); sb.append(this.warnType); sb.append(", detailUrl="); sb.append(this.detailUrl); sb.append(")"); return sb.toString(); } public GradientPunishWarning(String str, String str2, String str3, int i, String str4) { C7573i.m23587b(str, "dialogMessage"); C7573i.m23587b(str2, "dialogButton"); C7573i.m23587b(str3, "bubbleText"); C7573i.m23587b(str4, "detailUrl"); this.dialogMessage = str; this.dialogButton = str2; this.bubbleText = str3; this.warnType = i; this.detailUrl = str4; } public /* synthetic */ GradientPunishWarning(String str, String str2, String str3, int i, String str4, int i2, C7571f fVar) { int i3; if ((i2 & 1) != 0) { str = ""; } if ((i2 & 2) != 0) { str2 = ""; } String str5 = str2; if ((i2 & 4) != 0) { str3 = ""; } String str6 = str3; if ((i2 & 8) != 0) { i3 = 0; } else { i3 = i; } if ((i2 & 16) != 0) { str4 = ""; } this(str, str5, str6, i3, str4); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
025f0cb93382a975f7953c16814a4de07a71bf6a
fb7cfbc4a914ba3f27344a3fe85db601a21dd57e
/app/src/main/java/com/yj/robust/model/GoodsSaleEntity.java
c830882ea7da3d7d274c644f492aea3a7e909896
[]
no_license
zhouxiang130/Robust
f163d68a2e00bee72a985ee6cebe37a8131e2c0d
fb1faf755d4dd6aab267960a95bf9aea00d8c6b0
refs/heads/master
2020-07-14T15:16:51.019563
2019-09-08T13:00:10
2019-09-08T13:00:10
205,341,732
0
0
null
null
null
null
UTF-8
Java
false
false
1,938
java
package com.yj.robust.model; import java.util.List; /** * Created by Suo on 2017/8/28. */ public class GoodsSaleEntity { private String msg; private String code; private List<GoodsSaleData> data; public final String HTTP_OK = "200"; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public List<GoodsSaleData> getData() { return data; } public void setData(List<GoodsSaleData> data) { this.data = data; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public class GoodsSaleData{ private String propesId; private String propesName; private List<GoodsSaleList> jsonArray; public List<GoodsSaleList> getJsonArray() { return jsonArray; } public void setJsonArray(List<GoodsSaleList> jsonArray) { this.jsonArray = jsonArray; } public String getPropesId() { return propesId; } public void setPropesId(String propesId) { this.propesId = propesId; } public String getPropesName() { return propesName; } public void setPropesName(String propesName) { this.propesName = propesName; } public class GoodsSaleList{ private String provalueId; private String provalue; public String getProvalue() { return provalue; } public void setProvalue(String provalue) { this.provalue = provalue; } public String getProvalueId() { return provalueId; } public void setProvalueId(String provalueId) { this.provalueId = provalueId; } } } }
[ "1141681281@qq.com" ]
1141681281@qq.com
cc310823610434d5e4f3ea35c0921a73d1ee11b8
804e8cec063f01f0c80857c0d59efc46129302e8
/dom/src/main/java/org/isisaddons/app/kitchensink/dom/blobclob/BlobClobObjects.java
13eaf81749ba53f5b3a00850f110376d1736909f
[ "Apache-2.0" ]
permissive
isisaddons/isis-app-kitchensink
94334ac78373526588eade2d882415f9ac123104
ab3e73c40b00f29743f83a4365995bb1e39f5bc2
refs/heads/master
2022-06-25T10:17:30.680430
2020-06-21T10:10:34
2020-06-21T10:41:15
24,071,777
5
8
Apache-2.0
2022-06-20T22:40:16
2014-09-15T20:05:41
JavaScript
UTF-8
Java
false
false
2,596
java
/* * Copyright 2014 Dan Haywood * * 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.isisaddons.app.kitchensink.dom.blobclob; import java.util.List; import org.apache.isis.applib.annotation.ActionLayout; import org.apache.isis.applib.annotation.DomainService; import org.apache.isis.applib.annotation.MemberOrder; import org.apache.isis.applib.annotation.NatureOfService; import org.apache.isis.applib.annotation.Optionality; import org.apache.isis.applib.annotation.Parameter; import org.apache.isis.applib.annotation.ParameterLayout; import org.apache.isis.applib.value.Blob; import org.apache.isis.applib.value.Clob; import org.isisaddons.app.kitchensink.dom.RepositoryAbstract; @DomainService( nature = NatureOfService.VIEW_MENU_ONLY, repositoryFor = BlobClobObject.class ) public class BlobClobObjects extends RepositoryAbstract<BlobClobObject> { public BlobClobObjects() { super(BlobClobObject.class, Visibility.VISIBLE); } @MemberOrder(sequence = "30") public BlobClobObject createBlobClobObject( @ParameterLayout(named="Name") final String name, @ParameterLayout(named="Some blob") @Parameter(optionality=Optionality.OPTIONAL) final Blob blob, @ParameterLayout(named="Some image") @Parameter(optionality= Optionality.OPTIONAL) final Blob image, @ParameterLayout(named="Some clob") @Parameter(optionality=Optionality.OPTIONAL) final Clob clob) { final BlobClobObject obj = factoryService.instantiate(BlobClobObject.class); obj.setName(name); obj.setSomeBlob(blob); obj.setSomeImage(image); obj.setSomeClob(clob); repositoryService.persist(obj); return obj; } @ActionLayout(named="First BlobClobObject") @Override public BlobClobObject first() { return super.first(); } @ActionLayout(named="List All BlobClobObjects") @Override public List<BlobClobObject> listAll() { return super.listAll(); } }
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk
96f063fff5809fb027c49e74e9bc36b0bec57364
5b2c309c903625b14991568c442eb3a889762c71
/classes/android/support/v4/b/a/j.java
163d3198eb7394e23de4db442245d2dd78bc3461
[]
no_license
iidioter/xueqiu
c71eb4bcc53480770b9abe20c180da693b2d7946
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
refs/heads/master
2020-12-14T23:55:07.246659
2016-10-08T08:56:27
2016-10-08T08:56:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
289
java
package android.support.v4.b.a; import java.lang.reflect.Method; final class j { static Method a; static boolean b; } /* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\android\support\v4\b\a\j.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
079bf4b781e8224dec0e241384b544bf1f1abfad
b59a518d8bf03443668552f5b24a2950e96816a7
/src/apps/guitar-prj/src/main/java/com/xukaiqiang/gb/orm/entity/Store.java
344f376aee074df16664d94af46c8b2ebaef4b4e
[]
no_license
jjmnbv/guitar
94ecbfca238580e6916ad6bd6c6d0ebc4407f6ae
36a668c814356e8343c6f0a451bec645ec41c112
refs/heads/master
2021-06-23T10:33:43.654118
2017-07-21T09:09:48
2017-07-21T09:09:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,225
java
package com.xukaiqiang.gb.orm.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import com.xukaiqiang.gb.orm.dialect.AbstractStore; import com.xukaiqiang.gb.orm.dialect.Schema.Tables; /** * 门店 * */ @Entity @Table(name = Tables.STORE) public class Store extends AbstractStore implements Serializable { private static final long serialVersionUID = 1L; @Column(name = Columns.STORE_USERID) private Integer userId; @Column(name = Columns.STORE_NAME) private String name; @Column(name = Columns.STORE_ADDRESS) private String address; /** * @return 用户编号 */ public Integer getUserId() { return userId; } /** * 用户编号 * * @param userId */ public void setUserId(Integer userId) { this.userId = userId; } /** * @return 门店名称 */ public String getName() { return name; } /** * 门店名称 * * @param name */ public void setName(String name) { this.name = name; } /** * @return 地址 */ public String getAddress() { return address; } /** * 地址 * * @param address */ public void setAddress(String address) { this.address = address; } }
[ "994028591@qq.com" ]
994028591@qq.com
2af6690d51bdadddc1008cc633d54d9f65940e1f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XCOMMONS-928-12-23-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/job/AbstractJob_ESTest.java
ff0e92b1c1e60615430c509c469fb640ef118fe2
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
/* * This file was automatically generated by EvoSuite * Sun Apr 05 14:36:27 UTC 2020 */ package org.xwiki.job; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class AbstractJob_ESTest extends AbstractJob_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
d04deeb710175ee34799ad70e754584d1c903a5e
0b7577c0e09246013b1e2c35d44981135fcfd89c
/src/main/java/de/michi/clashofdiscord/ClashOfDiscord.java
1c04861093e8a38df2d0a09bf5a2c952f91de956
[]
no_license
MichiBa09/ClashOfDiscord
9bc3d35fb8e0e9596d09385c4ac3f735c661e922
35578a44b0e88fad4d707047c81bc9539851575f
refs/heads/master
2020-06-02T12:36:42.437638
2019-06-10T11:35:30
2019-06-10T11:35:30
191,156,106
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
package de.michi.clashofdiscord; /** * Created by Michi on 09.06.2019. */ public class ClashOfDiscord { public static String supercellKey; public static ClashOfDiscord instance; public String prefix; public ClashOfDiscord(String supercellKey, String prefix) { instance = this; this.supercellKey = supercellKey; this.prefix = prefix; } public String getPrefix() { return this.prefix; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
ef911900b466cb9dba711ec35ec94472124f0412
a2df6764e9f4350e0d9184efadb6c92c40d40212
/aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/model/v20190815/QueryLinkeBahamutApppipelinecomponentallallowskipwhichneedconfigRequest.java
9258c36165da77fd6107de6f098499e168b70ef2
[ "Apache-2.0" ]
permissive
warriorsZXX/aliyun-openapi-java-sdk
567840c4bdd438d43be6bd21edde86585cd6274a
f8fd2b81a5f2cd46b1e31974ff6a7afed111a245
refs/heads/master
2022-12-06T15:45:20.418475
2020-08-20T08:37:31
2020-08-26T06:17:49
290,450,773
1
0
NOASSERTION
2020-08-26T09:15:48
2020-08-26T09:15:47
null
UTF-8
Java
false
false
1,644
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.sofa.model.v20190815; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.sofa.Endpoint; /** * @author auto create * @version */ public class QueryLinkeBahamutApppipelinecomponentallallowskipwhichneedconfigRequest extends RpcAcsRequest<QueryLinkeBahamutApppipelinecomponentallallowskipwhichneedconfigResponse> { public QueryLinkeBahamutApppipelinecomponentallallowskipwhichneedconfigRequest() { super("SOFA", "2019-08-15", "QueryLinkeBahamutApppipelinecomponentallallowskipwhichneedconfig", "sofa"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } @Override public Class<QueryLinkeBahamutApppipelinecomponentallallowskipwhichneedconfigResponse> getResponseClass() { return QueryLinkeBahamutApppipelinecomponentallallowskipwhichneedconfigResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
79329e18caf8579b0ddaed3946fb480074925945
bd91f3120baef8b9f29b68f19e9a5184dc8dcc9e
/src/main/java/com/cn/tianxia/api/domain/txdata/v2/UserChannelDao.java
0a0f0470f61f9479469d35510f5abed182340a2c
[]
no_license
xfearless1201/api
f929cbaf6d54f04a46c5dcd840a6a9917d81c11c
304a8533b31f15b8f9b75017d23a26ce5bbc0300
refs/heads/master
2022-06-21T10:44:06.679009
2019-06-17T10:42:14
2019-06-17T10:42:14
192,326,878
1
4
null
2021-08-13T15:33:07
2019-06-17T10:39:58
Java
UTF-8
Java
false
false
827
java
package com.cn.tianxia.api.domain.txdata.v2; import java.util.List; import org.apache.ibatis.annotations.Param; import com.cn.tianxia.api.project.v2.UserChannelEntity; public interface UserChannelDao { int deleteByPrimaryKey(Integer id); int insert(UserChannelEntity record); int insertSelective(UserChannelEntity record); UserChannelEntity selectByPrimaryKey(Integer id); int updateByPrimaryKeySelective(UserChannelEntity record); int updateByPrimaryKey(UserChannelEntity record); /** * * @Description 查询平台分层支付渠道列表 * @param cid * @param typeId * @return */ List<UserChannelEntity> findAllByType(@Param("payIds") List<String> payIds,@Param("cid") Integer cid,@Param("typeId") Integer typeId,@Param("type") String type); }
[ "xfearless1201@gmail.com" ]
xfearless1201@gmail.com
748b9dc336d927a56ed83f26ed1b9a9e50c6438b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/31/31_512e05a94f7111941d0f6925fbbf7405cd556a0f/PageResource/31_512e05a94f7111941d0f6925fbbf7405cd556a0f_PageResource_t.java
3cbb30e350209c6d07743b34359936faec519718
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,346
java
package org.mayocat.cms.pages.front.resource; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import javax.inject.Inject; import javax.inject.Provider; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; import org.mayocat.cms.pages.front.builder.PageContextBuilder; import org.mayocat.cms.pages.meta.PageEntity; import org.mayocat.rest.Resource; import org.mayocat.cms.pages.model.Page; import org.mayocat.cms.pages.store.PageStore; import org.mayocat.context.Execution; import org.mayocat.image.model.Image; import org.mayocat.image.model.Thumbnail; import org.mayocat.image.store.ThumbnailStore; import org.mayocat.model.Attachment; import org.mayocat.rest.annotation.ExistingTenant; import org.mayocat.rest.views.FrontView; import org.mayocat.shop.front.context.ContextConstants; import org.mayocat.shop.front.resources.AbstractFrontResource; import org.mayocat.store.AttachmentStore; import org.mayocat.theme.Breakpoint; import org.mayocat.theme.Theme; import org.xwiki.component.annotation.Component; /** * @version $Id$ */ @Component(PageResource.PATH) @Path(PageResource.PATH) @Produces(MediaType.TEXT_HTML) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @ExistingTenant public class PageResource extends AbstractFrontResource implements Resource { public static final String PATH = ROOT_PATH + PageEntity.PATH; @Inject private Provider<PageStore> pageStore; @Inject private Provider<AttachmentStore> attachmentStore; @Inject private Provider<ThumbnailStore> thumbnailStore; @Inject private Execution execution; @Path("{slug}") @GET public FrontView getPage(@PathParam("slug") String slug, @Context Breakpoint breakpoint, @Context UriInfo uriInfo) { final Page page = pageStore.get().findBySlug(slug); if (page == null) { return new FrontView("404", breakpoint); } FrontView result = new FrontView("page", page.getModel(), breakpoint); Map<String, Object> context = getContext(uriInfo); context.put(ContextConstants.PAGE_TITLE, page.getTitle()); context.put(ContextConstants.PAGE_DESCRIPTION, page.getContent()); Theme theme = this.execution.getContext().getTheme(); List<Attachment> attachments = this.attachmentStore.get().findAllChildrenOf(page, Arrays .asList("png", "jpg", "jpeg", "gif")); List<Image> images = new ArrayList<Image>(); for (Attachment attachment : attachments) { if (AbstractFrontResource.isImage(attachment)) { List<Thumbnail> thumbnails = thumbnailStore.get().findAll(attachment); Image image = new Image(attachment, thumbnails); images.add(image); } } PageContextBuilder builder = new PageContextBuilder(theme); Map<String, Object> pageContext = builder.build(page, images); context.put("page", pageContext); result.putContext(context); return result; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b0b79de6a540fe1598cbaaf028f0bd77b6a08fb1
ff6c42e570d3ad819b249fde0bb10a8ae527025b
/src/main/java/org/spring/cloud/k8s/concertsservice/repo/ConcertRepository.java
2fcb7831c3dc92a9c420f85a7c0299ae6cba75d4
[ "Apache-2.0" ]
permissive
esteban-aliverti/s1p_concerts-service
35103e1db71603a4e1285b6379081bab5bb3602b
bc7798867b4069af376a7dd2ac6b7b5d26d44e30
refs/heads/master
2020-03-29T02:20:58.619179
2018-09-19T08:52:20
2018-09-19T08:52:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package org.spring.cloud.k8s.concertsservice.repo; import org.spring.cloud.k8s.concertsservice.model.Concert; import org.springframework.data.mongodb.repository.ReactiveMongoRepository; import org.springframework.stereotype.Repository; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @Repository public interface ConcertRepository extends ReactiveMongoRepository<Concert, String> { Flux<Concert> findByName(String name); Mono<Concert> findByBand(String band); }
[ "salaboy@gmail.com" ]
salaboy@gmail.com
66edf98f82b7fd7b995a1e839a5fb3737d3f8d73
333e24ae3ab23aed46644da207e9ebd8c667ab28
/app/src/main/java/com/zz/cold/business/mine/mvp/presenter/MineInfoPresenter.java
4383bfa119c22146b9fb0c1f262202aee9c39ed6
[]
no_license
sunjingcat/eCold
c0906ad9beecc0a1c79afcdffb68cbca8ed02c4a
c015192abe8448e13707298ac5c428a5fe1eca48
refs/heads/main
2023-03-28T11:37:56.144921
2020-11-30T02:40:29
2020-11-30T02:40:29
312,205,808
0
0
null
null
null
null
UTF-8
Java
false
false
1,842
java
package com.zz.cold.business.mine.mvp.presenter; import com.zz.cold.net.ApiService; import com.zz.cold.bean.UserBasicBean; import com.zz.cold.business.mine.mvp.Contract; import com.zz.cold.net.JsonT; import com.zz.cold.net.MyBasePresenterImpl; import com.zz.cold.net.RequestObserver; import com.zz.cold.net.RxNetUtils; /** * Created by 77 on 2018/8/8. */ public class MineInfoPresenter extends MyBasePresenterImpl<Contract.IMineInfoView> implements Contract.IsetMineInfoPresenter { public MineInfoPresenter(Contract.IMineInfoView view) { super(view); } @Override public void getMineInfo() { RxNetUtils.request(getApi(ApiService.class).getUserDetail(), new RequestObserver<JsonT<UserBasicBean>>(this) { @Override protected void onSuccess(JsonT<UserBasicBean> data) { if (data.isSuccess()) { view.showUserInfo(data.getData()); } else { } } @Override protected void onFail2(JsonT<UserBasicBean> userInfoJsonT) { super.onFail2(userInfoJsonT); view.showToast(userInfoJsonT.getMessage()); } }, mDialog); } @Override public void logout() { RxNetUtils.request(getApi(ApiService.class).logout(), new RequestObserver<JsonT>(this) { @Override protected void onSuccess(JsonT data) { if (data.isSuccess()) { view.showIntent(); } else { } } @Override protected void onFail2(JsonT userInfoJsonT) { super.onFail2(userInfoJsonT); view.showToast(userInfoJsonT.getMessage()); view.showIntent(); } }, mDialog); } }
[ "sj2012518@126.com" ]
sj2012518@126.com
ac1926dded68b64d8c9b72a74926371874a58cf1
1b36c0d8c56f7580a91e1e8f8b1e57fa88272e8f
/Subentry/boxing-master/app/src/main/java/com/bilibili/boxing/ui/IntentFilterActivity.java
28fb9725ee6b4193589ddc010f40fb96d6999271
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
hrony/GitHub
2cabc08c6e29f32931ce44d217c0c04057daf9fc
a22f3ed254a005a8c8007f677968655620ccd3b1
refs/heads/master
2020-05-18T12:03:14.128849
2017-11-27T01:48:21
2017-11-27T01:48:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,085
java
package com.bilibili.boxing.ui; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; import android.text.TextUtils; import android.widget.Toast; import com.bilibili.boxing.demo.R; import com.bilibili.boxing.model.BoxingManager; import com.bilibili.boxing.model.config.BoxingConfig; import com.bilibili.boxing.model.config.BoxingCropOption; import com.bilibili.boxing.model.entity.BaseMedia; import com.bilibili.boxing.utils.BoxingFileHelper; import com.bilibili.boxing_impl.ui.BoxingActivity; import java.util.List; import java.util.Locale; /** * A demo to show a Picker Activity with intent filter, which can start by other apps. * Get absolute path through {@link Intent#getDataString()} in {@link #onActivityResult(int, int, Intent)}. * * @author ChenSL */ public class IntentFilterActivity extends BoxingActivity { @Override protected void onCreate(Bundle savedInstanceState) { // in DCIM/bili/boxing String cropPath = BoxingFileHelper.getBoxingPathInDCIM(); if (TextUtils.isEmpty(cropPath)) { Toast.makeText(getApplicationContext(), R.string.boxing_storage_deny, Toast.LENGTH_SHORT).show(); return; } Uri destUri = new Uri.Builder() .scheme("file") .appendPath(cropPath) .appendPath(String.format(Locale.US, "%s.jpg", System.currentTimeMillis())) .build(); BoxingConfig config = new BoxingConfig(BoxingConfig.Mode.SINGLE_IMG).needCamera().withCropOption(new BoxingCropOption(destUri)); BoxingManager.getInstance().setBoxingConfig(config); super.onCreate(savedInstanceState); } @Override public void onBoxingFinish(Intent intent, @Nullable List<BaseMedia> medias) { if (medias != null && medias.size() > 0) { intent.setData(Uri.parse(medias.get(0).getPath())); setResult(RESULT_OK, intent); } else { setResult(RESULT_CANCELED, null); } finish(); } }
[ "wwqweiwenqiang@qq.com" ]
wwqweiwenqiang@qq.com
a730e205b85f1dc0feed768eca764efa112977f3
8a8254c83cc2ec2c401f9820f78892cf5ff41384
/baseline/AntennaPod/app/src/main/java/baseline/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java
576b2479fe06b613fb63b15d59a435472600d91d
[ "MIT" ]
permissive
VU-Thesis-2019-2020-Wesley-Shann/subjects
46884bc6f0f9621be2ab3c4b05629e3f6d3364a0
14a6d6bb9740232e99e7c20f0ba4ddde3e54ad88
refs/heads/master
2022-12-03T05:52:23.309727
2020-08-19T12:18:54
2020-08-19T12:18:54
261,718,101
0
0
null
2020-07-11T12:19:07
2020-05-06T09:54:05
Java
UTF-8
Java
false
false
4,924
java
package baseline.de.danoeh.antennapod.fragment.gpodnet; import android.app.Activity; import android.content.Context; import android.os.AsyncTask; import android.os.Bundle; import androidx.fragment.app.ListFragment; import androidx.core.view.MenuItemCompat; import androidx.appcompat.widget.SearchView; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.widget.TextView; import java.util.List; import baseline.de.danoeh.antennapod.menuhandler.MenuItemUtils; import baseline.de.danoeh.antennapod.R; import baseline.de.danoeh.antennapod.activity.MainActivity; import baseline.de.danoeh.antennapod.adapter.gpodnet.TagListAdapter; import baseline.de.danoeh.antennapod.core.gpoddernet.GpodnetService; import baseline.de.danoeh.antennapod.core.gpoddernet.GpodnetServiceException; import baseline.de.danoeh.antennapod.core.gpoddernet.model.GpodnetTag; public class TagListFragment extends ListFragment { private static final String TAG = "TagListFragment"; private static final int COUNT = 50; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true); } @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { super.onCreateOptionsMenu(menu, inflater); inflater.inflate(R.menu.gpodder_podcasts, menu); MenuItem searchItem = menu.findItem(R.id.action_search); final SearchView sv = (SearchView) MenuItemCompat.getActionView(searchItem); MenuItemUtils.adjustTextColor(getActivity(), sv); sv.setQueryHint(getString(R.string.gpodnet_search_hint)); sv.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit(String s) { Activity activity = getActivity(); if (activity != null) { sv.clearFocus(); ((MainActivity) activity).loadChildFragment(SearchListFragment.newInstance(s)); } return true; } @Override public boolean onQueryTextChange(String s) { return false; } }); } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); getListView().setOnItemClickListener((parent, view1, position, id) -> { GpodnetTag tag = (GpodnetTag) getListAdapter().getItem(position); MainActivity activity = (MainActivity) getActivity(); activity.loadChildFragment(TagFragment.newInstance(tag)); }); startLoadTask(); } @Override public void onResume() { super.onResume(); ((MainActivity) getActivity()).getSupportActionBar().setTitle(R.string.add_feed_label); } @Override public void onDestroyView() { super.onDestroyView(); cancelLoadTask(); } private AsyncTask<Void, Void, List<GpodnetTag>> loadTask; private void cancelLoadTask() { if (loadTask != null && !loadTask.isCancelled()) { loadTask.cancel(true); } } private void startLoadTask() { cancelLoadTask(); loadTask = new AsyncTask<Void, Void, List<GpodnetTag>>() { private Exception exception; @Override protected List<GpodnetTag> doInBackground(Void... params) { GpodnetService service = new GpodnetService(); try { return service.getTopTags(COUNT); } catch (GpodnetServiceException e) { e.printStackTrace(); exception = e; return null; } finally { service.shutdown(); } } @Override protected void onPreExecute() { super.onPreExecute(); setListShown(false); } @Override protected void onPostExecute(List<GpodnetTag> gpodnetTags) { super.onPostExecute(gpodnetTags); final Context context = getActivity(); if (context != null) { if (gpodnetTags != null) { setListAdapter(new TagListAdapter(context, android.R.layout.simple_list_item_1, gpodnetTags)); } else if (exception != null) { TextView txtvError = new TextView(getActivity()); txtvError.setText(exception.getMessage()); getListView().setEmptyView(txtvError); } setListShown(true); } } }; loadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } }
[ "sshann95@outlook.com" ]
sshann95@outlook.com
39d68fc4d63ba796811cfd2a6d29591e9e48300d
3676ca2c16308e8894a4fd6f43218330d63febaf
/app/src/main/java/com/sun/study/util/NavigationBarUtil.java
cc36ba58b003ac9590f07148739934a457de4670
[]
no_license
jyyxxgz/In-depthStudy
945d16abf8703ead3de914fcff0483d33580895c
9440d1a0319f7bd771543761fdc5d96d99d82ca4
refs/heads/master
2021-04-25T11:13:15.823815
2017-11-30T05:56:19
2017-11-30T05:56:19
111,894,492
0
0
null
2017-11-24T08:29:22
2017-11-24T08:29:21
null
UTF-8
Java
false
false
1,052
java
package com.sun.study.util; import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.ViewConfiguration; /** * Created by sunfusheng on 16/7/29. */ public class NavigationBarUtil { // 判断设备是否有返回键、菜单键来确定是否有 NavigationBar public static boolean hasNavigationBar(Context context) { boolean hasMenuKey = ViewConfiguration.get(context).hasPermanentMenuKey(); boolean hasBackKey = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK); if (!hasMenuKey && !hasBackKey) { return true; } return false; } // 获取 NavigationBar 的高度 public static int getNavigationBarHeight(Activity activity) { Resources resources = activity.getResources(); int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android"); return resources.getDimensionPixelSize(resourceId); } }
[ "sfsheng0322@gmail.com" ]
sfsheng0322@gmail.com
b6ca5e6422e5cc390ae91b47982cf2e89142510b
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/com/coolapk/market/util/DisplayUtils.java
9c669fe768de594b7be9bb5f52621f10d5d6448d
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
2,750
java
package com.coolapk.market.util; import android.app.Activity; import android.content.Context; import android.graphics.Point; import android.util.DisplayMetrics; import android.util.TypedValue; import com.coolapk.market.AppHolder; public class DisplayUtils { private static Point sPoint = new Point(); public static int dp2px(Context context, float f) { return (int) (TypedValue.applyDimension(1, f, getDM()) + 0.5f); } public static float dp2pxf(Context context, float f) { return TypedValue.applyDimension(1, f, getDM()) + 0.5f; } public static int sp2px(Context context, float f) { return (int) (TypedValue.applyDimension(2, f, getDM()) + 0.5f); } public static int px2dp(Context context, float f) { return (int) ((f / getDM().density) + 0.5f); } public static int getWidthDp(Context context) { DisplayMetrics dm = getDM(); return (int) (((float) dm.widthPixels) / dm.density); } public static int getHeightDp(Context context) { DisplayMetrics dm = getDM(); return (int) (((float) dm.heightPixels) / dm.density); } public static int getWidthPixels(Context context) { return getDM().widthPixels; } public static int getHeightPixels(Context context) { return getDM().heightPixels; } public static int getDpi(Context context) { return getDM().densityDpi; } public static float getAnyScaleHeightPixels(Context context, float f) { return ((float) getDM().heightPixels) / f; } private static DisplayMetrics getDM() { return AppHolder.getApplication().getResources().getDisplayMetrics(); } public static int getDecorViewWidth(Context context) { Activity currentActivity = AppHolder.getCurrentActivity(); if (currentActivity == null) { return getWidthPixels(context); } currentActivity.getWindowManager().getDefaultDisplay().getSize(sPoint); return sPoint.x; } public static int getDecorMinSideLength(Context context) { Activity currentActivity = AppHolder.getCurrentActivity(); if (currentActivity == null) { return Math.min(getWidthPixels(context), getHeightPixels(context)); } currentActivity.getWindowManager().getDefaultDisplay().getSize(sPoint); return Math.min(sPoint.x, sPoint.y); } public static int getDecorViewHeight(Context context) { Activity currentActivity = AppHolder.getCurrentActivity(); if (currentActivity == null) { return getWidthPixels(context); } currentActivity.getWindowManager().getDefaultDisplay().getSize(sPoint); return sPoint.y; } }
[ "test@gmail.com" ]
test@gmail.com
5f4460d73d753e8887b859dafd538fc7911880fa
6f8652384358b96d3019bf0626c4e30f91db0c29
/com.conx.logistics.kernel/com.conx.logistics.kernel.ui/kernel.ui.forms/domain/src/main/java/com/conx/logistics/kernel/ui/forms/domain/model/items/ConditionalBlockRepresentation.java
d5f4feaae66080f59dc9d04a08e777db133077c5
[]
no_license
conxgit/conxlogistics-gerrit3
6850a3b7caab6fa84248e207d5c774651a10dceb
ba166747998500c77c209537d5331ab74746cf44
refs/heads/master
2016-09-02T00:14:15.209184
2012-08-22T01:02:01
2012-08-22T01:02:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,667
java
/* * * * */ package com.conx.logistics.kernel.ui.forms.domain.model.items; import java.util.Map; import javax.persistence.Entity; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.Table; import com.conx.logistics.kernel.ui.forms.domain.model.FormItemRepresentation; import com.conx.logistics.kernel.ui.forms.shared.form.FormEncodingException; import com.conx.logistics.kernel.ui.forms.shared.form.FormEncodingFactory; import com.conx.logistics.kernel.ui.forms.shared.form.FormRepresentationDecoder; @Entity @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) @Table(name="uiConditionalBlockRepresentation") public class ConditionalBlockRepresentation extends FormItemRepresentation { private FormItemRepresentation ifBlock; private FormItemRepresentation elseBlock; private String condition; public ConditionalBlockRepresentation() { super("conditionalBlock"); } public FormItemRepresentation getIfBlock() { return ifBlock; } public void setIfBlock(FormItemRepresentation ifBlock) { this.ifBlock = ifBlock; } public FormItemRepresentation getElseBlock() { return elseBlock; } public void setElseBlock(FormItemRepresentation elseBlock) { this.elseBlock = elseBlock; } public String getCondition() { return condition; } public void setCondition(String condition) { this.condition = condition; } @Override public Map<String, Object> getDataMap() { Map<String, Object> data = super.getDataMap(); data.put("condition", this.condition); data.put("ifBlock", this.ifBlock == null ? null : this.ifBlock.getDataMap()); data.put("elseBlock", this.elseBlock == null ? null : this.elseBlock.getDataMap()); return data; } @Override @SuppressWarnings("unchecked") public void setDataMap(Map<String, Object> data) throws FormEncodingException { super.setDataMap(data); this.condition = (String) data.get("condition"); FormRepresentationDecoder decoder = FormEncodingFactory.getDecoder(); this.ifBlock = (FormItemRepresentation) decoder.decode((Map<String, Object>) data.get("ifBlock")); this.elseBlock = (FormItemRepresentation) decoder.decode((Map<String, Object>) data.get("elseBlock")); } @Override public boolean equals(Object obj) { if (!super.equals(obj)) return false; if (!(obj instanceof ConditionalBlockRepresentation)) return false; ConditionalBlockRepresentation other = (ConditionalBlockRepresentation) obj; boolean equals = (this.condition == null && other.condition == null) || (this.condition != null && this.condition.equals(other.condition)); if (!equals) return equals; equals = (this.ifBlock == null && other.ifBlock == null) || (this.ifBlock != null && this.ifBlock.equals(other.ifBlock)); if (!equals) return equals; equals = (this.elseBlock == null && other.elseBlock == null) || (this.elseBlock != null && this.elseBlock.equals(other.elseBlock)); return equals; } @Override public int hashCode() { int result = super.hashCode(); int aux = this.condition == null ? 0 : this.condition.hashCode(); result = 37 * result + aux; aux = this.ifBlock == null ? 0 : this.ifBlock.hashCode(); result = 37 * result + aux; aux = this.elseBlock == null ? 0 : this.elseBlock.hashCode(); result = 37 * result + aux; return result; } }
[ "mduduzi.keswa@bconv.com" ]
mduduzi.keswa@bconv.com
52cbf7e5cc416060cec47866128d966891beb5a1
4589a9b3563e39d49039aa846fea25d9dbc10a8a
/src/before/adapter/Adapter.java
363db948b943097de2555f7fbd97949720e461a8
[]
no_license
moocstudent/DesignPattern1
3769f733484e963110f65a6b75e5293cd1ec76ef
b728ea7c82e96960fac20baab0f3dc6f80336ea2
refs/heads/master
2022-03-06T13:07:06.189716
2019-12-07T15:08:16
2019-12-07T15:08:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
package before.adapter; public class Adapter implements Target{ private Adaptee adaptee; public Adapter(Adaptee adaptee){ this.adaptee = adaptee; } @Override public void adapteeMethod() { adaptee.adapteeMethod(); } @Override public void adapterMethod() { System.out.println("Adapter method!"); } }
[ "deadzq@qq.com" ]
deadzq@qq.com
f35a0d3a0d0c1b74d185af3bc59784a3dba7a2cc
e1af7696101f8f9eb12c0791c211e27b4310ecbc
/MCP/src/minecraft/net/minecraft/util/MouseFilter.java
b82e5281cebffa7c658decee6fb7cc90422e185a
[]
no_license
VinmaniaTV/Mania-Client
e36810590edf09b1d78b8eeaf5cbc46bb3e2d8ce
7a12b8bad1a8199151b3f913581775f50cc4c39c
refs/heads/main
2023-02-12T10:31:29.076263
2021-01-13T02:29:35
2021-01-13T02:29:35
329,156,099
0
0
null
null
null
null
UTF-8
Java
false
false
872
java
package net.minecraft.util; public class MouseFilter { private float targetValue; private float remainingValue; private float lastAmount; /** * Smooths mouse input */ public float smooth(float p_76333_1_, float p_76333_2_) { this.targetValue += p_76333_1_; p_76333_1_ = (this.targetValue - this.remainingValue) * p_76333_2_; this.lastAmount += (p_76333_1_ - this.lastAmount) * 0.5F; if (p_76333_1_ > 0.0F && p_76333_1_ > this.lastAmount || p_76333_1_ < 0.0F && p_76333_1_ < this.lastAmount) { p_76333_1_ = this.lastAmount; } this.remainingValue += p_76333_1_; return p_76333_1_; } public void reset() { this.targetValue = 0.0F; this.remainingValue = 0.0F; this.lastAmount = 0.0F; } }
[ "vinmaniamc@gmail.com" ]
vinmaniamc@gmail.com
e413d647fdfd2261f49bc79e1d8b6097d6ec0a9f
d87a0c1c75a43cbfc544cb3e882b82df685452eb
/src/java/org/exist/xmlrpc/.svn/text-base/RpcServlet.java.svn-base
f387668d3fd6dfc8f36c6a7fb01a8a2a7ddc9e03
[ "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
c3bd/cassandraxml
ab4171332e230be8b350846f65bf9e6a3745f129
d47c7727ce373d52fdd8736b3682af3c010c91b1
refs/heads/master
2021-01-01T16:39:29.298552
2013-10-31T09:57:08
2013-10-31T09:57:08
14,013,089
0
1
Apache-2.0
2023-03-20T11:53:02
2013-10-31T09:51:39
Java
UTF-8
Java
false
false
3,358
/* * eXist Open Source Native XML Database * Copyright (C) 2001-07 The eXist Project * http://exist-db.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: RpcServlet.java 8868 2009-04-21 19:13:25Z wolfgang_m $ */ package org.exist.xmlrpc; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.xmlrpc.XmlRpcException; import org.apache.xmlrpc.XmlRpcHandler; import org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping; import org.apache.xmlrpc.server.RequestProcessorFactoryFactory; import org.apache.xmlrpc.server.XmlRpcHandlerMapping; import org.apache.xmlrpc.server.XmlRpcNoSuchHandlerException; import org.apache.xmlrpc.webserver.XmlRpcServlet; public class RpcServlet extends XmlRpcServlet { @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Request logger try { super.doPost(request, response); } catch (Throwable e){ log("Problem during XmlRpc execution", e); throw new ServletException("An unknown error occurred: " + e.getMessage(), e); } } protected XmlRpcHandlerMapping newXmlRpcHandlerMapping() throws XmlRpcException { DefaultHandlerMapping mapping = new DefaultHandlerMapping(); mapping.setVoidMethodEnabled(true); mapping.setRequestProcessorFactoryFactory(new XmldbRequestProcessorFactoryFactory()); mapping.loadDefault(RpcConnection.class); return mapping; } private static class XmldbRequestProcessorFactoryFactory extends RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory { RequestProcessorFactory instance = null; public RequestProcessorFactory getRequestProcessorFactory(Class pClass) throws XmlRpcException { if (instance == null) instance = new XmldbRequestProcessorFactory("disxml"); return instance; } } private static class DefaultHandlerMapping extends AbstractReflectiveHandlerMapping { private DefaultHandlerMapping() throws XmlRpcException { } public void loadDefault(Class clazz) throws XmlRpcException { registerPublicMethods("Default", clazz); } public XmlRpcHandler getHandler(String pHandlerName) throws XmlRpcNoSuchHandlerException, XmlRpcException { if (pHandlerName.indexOf('.') < 0) pHandlerName = "Default." + pHandlerName; return super.getHandler(pHandlerName); } } }
[ "xiafan68@gmail.com" ]
xiafan68@gmail.com
f752bf9b5a9a53ebb2067bbc05db41601773a33e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/19/19_3e4602908361f6821ad23faafe1c2e95831f5072/Bank/19_3e4602908361f6821ad23faafe1c2e95831f5072_Bank_t.java
67f68ddf9b695d836d496fcd2a298940fb768e97
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,067
java
package com.m0pt0pmatt.bettereconomy.banks; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map.Entry; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.YamlConfiguration; import com.m0pt0pmatt.bettereconomy.BetterEconomy; import com.m0pt0pmatt.bettereconomy.currency.Currency; /** * Banks are structures which trade currencies to/from players * @author Matthew * */ public class Bank { //name of the bank, used for looking up WorldGuard regions and player accounts private String name; //A map from a currency to the amount of that currency currently stored private HashMap<Currency,Integer> amounts; //configuration private File configFile; private YamlConfiguration config; public Bank(String bankName, File configFile){ this.name = bankName; amounts = new HashMap<Currency,Integer>(); this.configFile = configFile; config = YamlConfiguration.loadConfiguration(configFile); load(); } public void load(){ ConfigurationSection currenciesSection = config.getConfigurationSection("currencies"); if (currenciesSection == null){ return; } for (String currency: currenciesSection.getKeys(false)){ ConfigurationSection currencySection = currenciesSection.getConfigurationSection(currency); if (currencySection == null) continue; if (!currencySection.isInt("amount")) continue; int amount = currencySection.getInt("amount"); amounts.put(BetterEconomy.economy.getCurrency(currency), amount); } } public void save(){ ConfigurationSection currenciesSection = config.createSection("currencies"); for (Entry<Currency, Integer> entry: amounts.entrySet()){ ConfigurationSection currencySection = currenciesSection.createSection(entry.getKey().getName()); currencySection.set("amount", entry.getValue()); } try { config.save(configFile); } catch (IOException e) { e.printStackTrace(); } } public String getName(){ return name; } /** * @return map of currencies to their amounts */ public HashMap<Currency,Integer> getMap(){ return amounts; } /** * Adds a currency to the bank (initial amount = 0) * @param c currency to be added */ public boolean addCurrency(Currency c){ amounts.put(c,0); return true; } /** * @param c currency whose amount is desired * @return amount of a currency in the bank, null if currency is not in the bank */ public int getCurrencyAmount(Currency c){ if (amounts.containsKey(c)){ return amounts.get(c); } return 0; } /** * Removes a currency from the bank * @param c currency to be removed */ public void removeCurrency(Currency c){ amounts.remove(c); } /** * Updates the amount of a given currency * @param c currency to be updated * @param amount new amount of the currency */ public void updateAmount(Currency c, Integer amount){ amounts.put(c,amount); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f9fdc708536b91f1485683298c807c6c5017ca50
1db6a93e85819415ea490425345697c66d32b840
/src/lang/eventb/substitutions/VarAssignment.java
7e85006bb673ea0967bc98cb8361c7e6e1c6e018
[]
no_license
stratosphr/oldSTRATESTX
0454359727703fe4fd02e6cc331b634a46af9bd5
0be33d0ab0a3dca339aad1416e3cb0040b58b0e3
refs/heads/master
2021-05-07T03:50:57.731037
2017-11-24T14:56:43
2017-11-24T14:56:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,757
java
package lang.eventb.substitutions; import lang.maths.defs.DefsContext; import lang.maths.exprs.arith.AArithExpr; import lang.maths.exprs.arith.Var; import lang.maths.exprs.bool.ABoolExpr; import lang.maths.exprs.bool.And; import lang.maths.exprs.bool.Equals; import lang.maths.exprs.bool.InDomain; import visitors.formatters.interfaces.IObjectFormatter; import java.util.Collection; import java.util.Collections; import java.util.stream.Collectors; import java.util.stream.Stream; /** * Created by gvoiron on 21/11/17. * Time : 22:19 */ public final class VarAssignment extends AAssignment<Var> { public VarAssignment(Var var, AArithExpr value) { super(var, value); } @Override public String accept(IObjectFormatter formatter) { return formatter.visit(this); } @Override public ABoolExpr getPrd(DefsContext defsContext) { return new And( Stream.of( Collections.singletonList(getPrdInAssignments(defsContext)), defsContext.getVarsDefs().values().stream().filter(varDef -> !varDef.getVar().equals(assignable)).map(varDef -> new Equals(varDef.getVar().prime(), varDef.getVar())).collect(Collectors.toList()), defsContext.getFunVarsDefs().values().stream().map(funVarDef -> new Equals(funVarDef.getVar().prime(), funVarDef.getVar())).collect(Collectors.toList()) ).flatMap(Collection::stream).toArray(ABoolExpr[]::new) ); } @Override ABoolExpr getPrdInAssignments(DefsContext defsContext) { return new And( new InDomain(value, defsContext.getVarsDefs().get(assignable.getName()).getDomain()), new Equals(assignable.prime(), value) ); } }
[ "stratosphr@gmail.com" ]
stratosphr@gmail.com
e153e89b9684fe1f59f9d5bdffd086b83fcc2b70
c42531b0f0e976dd2b11528504e349d5501249ae
/Sandy Lodge/MHSystems/app/src/main/java/com/mh/systems/sandylodge/web/models/CompetitionResultAPI.java
f0f54e7d8dfbc0819c1a07f00a6cac501f897d4d
[ "MIT" ]
permissive
Karan-nassa/MHSystems
4267cc6939de7a0ff5577c22b88081595446e09e
a0e20f40864137fff91784687eaf68e5ec3f842c
refs/heads/master
2021-08-20T05:59:06.864788
2017-11-28T08:02:39
2017-11-28T08:02:39
112,189,266
0
0
null
null
null
null
UTF-8
Java
false
false
2,783
java
package com.mh.systems.sandylodge.web.models; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class CompetitionResultAPI { @SerializedName("aClientId") @Expose private String aClientId; @SerializedName("aCommand") @Expose private String aCommand; @SerializedName("aJsonParams") @Expose private AJsonParamsResultOfCompetition aJsonParams; @SerializedName("aModuleId") @Expose private String aModuleId; @SerializedName("aUserClass") @Expose private String aUserClass; /** * No args constructor for use in serialization * */ public CompetitionResultAPI() { } /** * * @param aJsonParamsResultOfCompetition * @param aModuleId * @param aUserClass * @param aClientId * @param aCommand */ public CompetitionResultAPI(String aClientId, String aCommand, AJsonParamsResultOfCompetition aJsonParams, String aModuleId, String aUserClass) { this.aClientId = aClientId; this.aCommand = aCommand; this.aJsonParams = aJsonParams; this.aModuleId = aModuleId; this.aUserClass = aUserClass; } /** * * @return * The aClientId */ public String getAClientId() { return aClientId; } /** * * @param aClientId * The aClientId */ public void setAClientId(String aClientId) { this.aClientId = aClientId; } /** * * @return * The aCommand */ public String getACommand() { return aCommand; } /** * * @param aCommand * The aCommand */ public void setACommand(String aCommand) { this.aCommand = aCommand; } /** * * @return * The aJsonParamsResultOfCompetition */ public AJsonParamsResultOfCompetition getAJsonParams() { return aJsonParams; } /** * * @param aJsonParams * The aJsonParams */ public void setAJsonParams(AJsonParamsResultOfCompetition aJsonParams) { this.aJsonParams = aJsonParams; } /** * * @return * The aModuleId */ public String getAModuleId() { return aModuleId; } /** * * @param aModuleId * The aModuleId */ public void setAModuleId(String aModuleId) { this.aModuleId = aModuleId; } /** * * @return * The aUserClass */ public String getAUserClass() { return aUserClass; } /** * * @param aUserClass * The aUserClass */ public void setAUserClass(String aUserClass) { this.aUserClass = aUserClass; } }
[ "karan@ucreate.co.in" ]
karan@ucreate.co.in
385d1c65b6a611ad8742c6ef4b5ee33e70d4f8a6
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/TemperatureController3218.java
dd2af69adf53ae9a921d73ab9cb0131914601ba1
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
371
java
package syncregions; public class TemperatureController3218 { public int execute(int temperature3218, int targetTemperature3218) { //sync _bfpnFUbFEeqXnfGWlV3218, behaviour 1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
a9bfb09fe318018775c4a87761a7114fa4a2a019
104cda8eafe0617e2a5fa1e2b9f242d78370521b
/aliyun-java-sdk-hdr/src/main/java/com/aliyuncs/hdr/model/v20170925/DescribeSitePairRequest.java
8f5ac19335ae0e0f7d10ac0500a1ca27e35398f7
[ "Apache-2.0" ]
permissive
SanthosheG/aliyun-openapi-java-sdk
89f9b245c1bcdff8dac0866c36ff9a261aa40684
38a910b1a7f4bdb1b0dd29601a1450efb1220f79
refs/heads/master
2020-07-24T00:00:59.491294
2019-09-09T23:00:27
2019-09-11T04:29:56
207,744,099
2
0
NOASSERTION
2019-09-11T06:55:58
2019-09-11T06:55:58
null
UTF-8
Java
false
false
1,555
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.hdr.model.v20170925; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.hdr.Endpoint; /** * @author auto create * @version */ public class DescribeSitePairRequest extends RpcAcsRequest<DescribeSitePairResponse> { public DescribeSitePairRequest() { super("hdr", "2017-09-25", "DescribeSitePair", "hdr"); try { this.getClass().getDeclaredField("ProductEndpointMap").set(this, Endpoint.endpointMap); this.getClass().getDeclaredField("ProductEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } private String sitePairId; public String getSitePairId() { return this.sitePairId; } public void setSitePairId(String sitePairId) { this.sitePairId = sitePairId; if(sitePairId != null){ putQueryParameter("SitePairId", sitePairId); } } @Override public Class<DescribeSitePairResponse> getResponseClass() { return DescribeSitePairResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
2ff6e6d39df4df6996112ff1ec40c9f6e332a465
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/PACT_com.pactforcure.app/javafiles/com/pactforcure/app/ui/DnaCollectionActivity$$Lambda$1.java
07a13f13499cdaf6c6e6a244cf14810ab167193b
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
1,704
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.pactforcure.app.ui; import android.view.View; // Referenced classes of package com.pactforcure.app.ui: // DnaCollectionActivity final class DnaCollectionActivity$$Lambda$1 implements android.view.View.OnClickListener { public static android.view.View.OnClickListener lambdaFactory$(DnaCollectionActivity dnacollectionactivity) { return ((android.view.View.OnClickListener) (new DnaCollectionActivity$$Lambda$1(dnacollectionactivity))); // 0 0:new #2 <Class DnaCollectionActivity$$Lambda$1> // 1 3:dup // 2 4:aload_0 // 3 5:invokespecial #20 <Method void DnaCollectionActivity$$Lambda$1(DnaCollectionActivity)> // 4 8:areturn } public void onClick(View view) { DnaCollectionActivity.lambda$onCreate$12(arg$1, view); // 0 0:aload_0 // 1 1:getfield #15 <Field DnaCollectionActivity arg$1> // 2 4:aload_1 // 3 5:invokestatic #28 <Method void DnaCollectionActivity.lambda$onCreate$12(DnaCollectionActivity, View)> // 4 8:return } private final DnaCollectionActivity arg$1; private DnaCollectionActivity$$Lambda$1(DnaCollectionActivity dnacollectionactivity) { // 0 0:aload_0 // 1 1:invokespecial #13 <Method void Object()> arg$1 = dnacollectionactivity; // 2 4:aload_0 // 3 5:aload_1 // 4 6:putfield #15 <Field DnaCollectionActivity arg$1> // 5 9:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
38dcf0526178945074f61f41ffa13f9d40b9cf45
cb2e6417ccc2b663f4196d1cb97a6b3decef7cd5
/Camera211/app/src/main/java/jp/ohwada/android/camera211/util/ImageUtil.java
d81d72e50a550b08754d1efe6b4767a450d1c265
[]
no_license
tiendung690/Android_Samples
194c02668a812dcf25d2580fb968d7722c6afb2a
282b11ec28193c0308ae6039068d6d8903dc02e8
refs/heads/master
2021-02-27T12:05:18.406016
2020-03-07T10:11:49
2020-03-07T10:11:49
245,604,927
1
0
null
null
null
null
UTF-8
Java
false
false
2,397
java
/** * Camera2 Sample * 2019-02-01 K.OHWADA */ package jp.ohwada.android.camera211.util; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.media.Image; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.nio.ByteBuffer; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; /** * class ImageUtil */ public class ImageUtil{ public static final String FILE_PREFIX = "camera_"; public static final String FILE_EXT_JPG = ".jpg"; private static final String DATE_FORMAT = "yyyy_MM_dd_HH_mm_ss_SSS"; private static final int JPEG_QUALITY = 100; private Context mContext; /** * constractor */ public ImageUtil(Context context) { mContext = context; } /** * getOutputFileInExternalFilesDir */ public File getOutputFileInExternalFilesDir(String prefix, String ext) { File dir = mContext.getExternalFilesDir(null); String filename = getOutputFileName(prefix, ext); File file = new File(dir, filename); return file; } // getOutputFileInExternalFilesDir /** *getOutputFileName */ public String getOutputFileName(String prefix, String ext) { SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT, Locale.US); String currentDateTime = sdf.format(new Date()); String filename = prefix + currentDateTime + ext; return filename; } // getOutputFileName /** * saveImageAsJpeg */ public boolean saveImageAsJpeg(Image image, File file) { boolean is_error = false; ByteBuffer buffer = image.getPlanes()[0].getBuffer(); byte[] bytes = new byte[buffer.capacity()]; buffer.get(bytes); Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length, null); FileOutputStream out = null; try { out = new FileOutputStream(file); bitmap.compress(Bitmap.CompressFormat.JPEG, JPEG_QUALITY, out); } catch (Exception e) { e.printStackTrace(); is_error = true; } try { if (out != null) out.close(); } catch (IOException e) { e.printStackTrace(); } return ! is_error; } // saveImageAsJpeg } // class ImageUtil
[ "vantiendung690@gmail.com" ]
vantiendung690@gmail.com
0026bf93d7385945c175f2c860e09f9cd23557f0
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/sellhouse/SHECusAssistantDataGroup.java
5ab5a67d5052e7290babb7068ee62c1996dc9d8c
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
4,123
java
package com.kingdee.eas.fdc.sellhouse; import com.kingdee.bos.framework.ejb.EJBRemoteException; import com.kingdee.bos.util.BOSObjectType; import java.rmi.RemoteException; import com.kingdee.bos.framework.AbstractBizCtrl; import com.kingdee.bos.orm.template.ORMObject; import java.lang.String; import com.kingdee.bos.metadata.entity.EntityViewInfo; import com.kingdee.eas.common.EASBizException; import com.kingdee.bos.dao.IObjectPK; import com.kingdee.eas.fdc.sellhouse.app.*; import com.kingdee.eas.framework.ITreeBase; import com.kingdee.bos.metadata.entity.SelectorItemCollection; import com.kingdee.eas.framework.CoreBaseCollection; import com.kingdee.bos.util.*; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.bos.framework.*; import com.kingdee.eas.framework.TreeBase; public class SHECusAssistantDataGroup extends TreeBase implements ISHECusAssistantDataGroup { public SHECusAssistantDataGroup() { super(); registerInterface(ISHECusAssistantDataGroup.class, this); } public SHECusAssistantDataGroup(Context ctx) { super(ctx); registerInterface(ISHECusAssistantDataGroup.class, this); } public BOSObjectType getType() { return new BOSObjectType("808912E3"); } private SHECusAssistantDataGroupController getController() throws BOSException { return (SHECusAssistantDataGroupController)getBizController(); } /** *getValue-System defined method *@param pk pk *@return */ public SHECusAssistantDataGroupInfo getSHECusAssistantDataGroupInfo(IObjectPK pk) throws BOSException, EASBizException { try { return getController().getSHECusAssistantDataGroupInfo(getContext(), pk); } catch(RemoteException err) { throw new EJBRemoteException(err); } } /** *getValue-System defined method *@param pk pk *@param selector selector *@return */ public SHECusAssistantDataGroupInfo getSHECusAssistantDataGroupInfo(IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException { try { return getController().getSHECusAssistantDataGroupInfo(getContext(), pk, selector); } catch(RemoteException err) { throw new EJBRemoteException(err); } } /** *getValue-System defined method *@param oql oql *@return */ public SHECusAssistantDataGroupInfo getSHECusAssistantDataGroupInfo(String oql) throws BOSException, EASBizException { try { return getController().getSHECusAssistantDataGroupInfo(getContext(), oql); } catch(RemoteException err) { throw new EJBRemoteException(err); } } /** *getCollection-System defined method *@return */ public SHECusAssistantDataGroupCollection getSHECusAssistantDataGroupCollection() throws BOSException { try { return getController().getSHECusAssistantDataGroupCollection(getContext()); } catch(RemoteException err) { throw new EJBRemoteException(err); } } /** *getCollection-System defined method *@param view view *@return */ public SHECusAssistantDataGroupCollection getSHECusAssistantDataGroupCollection(EntityViewInfo view) throws BOSException { try { return getController().getSHECusAssistantDataGroupCollection(getContext(), view); } catch(RemoteException err) { throw new EJBRemoteException(err); } } /** *getCollection-System defined method *@param oql oql *@return */ public SHECusAssistantDataGroupCollection getSHECusAssistantDataGroupCollection(String oql) throws BOSException { try { return getController().getSHECusAssistantDataGroupCollection(getContext(), oql); } catch(RemoteException err) { throw new EJBRemoteException(err); } } }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
7978e1e380946ed40611fc0bd6038366ebc04a3d
5c007a23b88f1f2c51843199904da7724ff34bae
/react/RnModule/src/main/java/com/pds/rn/RnFragment.java
97d07c25ef8844b980470e3ce7286cdb193c5f06
[]
no_license
bubian/BlogProject
d8100916fee3ba8505c9601a216a6b9b1147b048
8278836ff8fe62af977b5ca330767a2f425d8792
refs/heads/master
2023-08-10T17:52:46.490579
2021-09-14T06:42:58
2021-09-14T06:42:58
161,014,161
0
0
null
null
null
null
UTF-8
Java
false
false
5,169
java
package com.pds.rn; import android.graphics.Color; import android.graphics.PixelFormat; import android.net.Uri; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import com.alibaba.android.arouter.facade.annotation.Route; import com.facebook.react.ReactRootView; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeMap; import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; import com.pds.rn.rectfragment.BaseReactFragment; import com.pds.rn.rectfragment.BaseReactFragmentDelegate; import com.pds.rn.rectfragment.ReactFragmentDelegate; import com.pds.rn.utils.FragmentRNCollector; import com.pds.rn.utils.RnEventHelper; import com.pds.router.module.BundleKey; import com.pds.router.module.ModuleGroupRouter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.HashMap; import java.util.Map; import javax.annotation.Nullable; /** * Author: pengdaosong. * <p> * CreateTime: 2018/11/9 4:10 PM * <p> * Email:pengdaosong@medlinker.com. * <p> * Description: */ @Route(path = ModuleGroupRouter.RN_FRAGMENT) public class RnFragment extends BaseReactFragment implements DefaultHardwareBackBtnHandler { private static final String TAG = "ReactFragment"; private static final String SCHEME = "sch:"; private Map<String, String> mParams = new HashMap<>(); private String mCurModuleName; private String mCurPageName; private static final String MODULE_NAME = "moduleName"; private static final String ROUTE_NAME = "routeName"; private static final String EXTRA = "extra"; private static final String SPLIT = "/"; private String mExtra; private boolean mIsStopped; private boolean mIsVisibleToUser; @Retention(RetentionPolicy.SOURCE) public @interface RnModuleName { } @Nullable @Override protected String getMainComponentName() { return "ReactNativeApp"; // return mCurModuleName; } private String getCurrentModuleRouterName() { return String.format("%s-%s", mCurModuleName, mCurPageName); } @Override public void onCreate(Bundle savedInstanceState) { Bundle bundle = getArguments(); if (null == bundle) { return; } String url = bundle.getString(BundleKey.URL); if (TextUtils.isEmpty(url)) { return; } if (url.trim().startsWith(SPLIT)) { url = SCHEME.concat(url); } Uri uri = Uri.parse(url); if (uri != null) { try { for (String key : uri.getQueryParameterNames()) { this.mParams.put(key, uri.getQueryParameter(key)); } } catch (Exception e) { e.printStackTrace(); } } if (null != mParams && mParams.size() > 0) { mCurModuleName = mParams.get(MODULE_NAME); mCurPageName = mParams.get(ROUTE_NAME); mExtra = mParams.get(EXTRA); } super.onCreate(savedInstanceState); } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); view.setBackgroundColor(Color.TRANSPARENT); } @Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); mIsVisibleToUser = isVisibleToUser; FragmentRNCollector.onVisible(getCurrentModuleRouterName(), mIsVisibleToUser && !mIsStopped); createWritableMap(isVisibleToUser ? RnEventHelper.EVENT_KEY_FRAGMENT_WILL_APPEAR : RnEventHelper.EVENT_KEY_FRAGMENT_WILL_DISAPPEAR); } @Override public void onResume() { super.onResume(); mIsStopped = false; FragmentRNCollector.onVisible(getCurrentModuleRouterName(), mIsVisibleToUser && !mIsStopped); } @Override public void onStop() { super.onStop(); mIsStopped = true; FragmentRNCollector.onVisible(getCurrentModuleRouterName(), mIsVisibleToUser && !mIsStopped); } private void createWritableMap(String eventName) { WritableMap params = new WritableNativeMap(); params.putString(MODULE_NAME, mCurModuleName); params.putString(ROUTE_NAME, mCurPageName); RnEventHelper.sendEvent(eventName, params); } @Override protected BaseReactFragmentDelegate createReactFragmentDelegate() { ReactFragmentDelegate delegate = new ReactFragmentDelegate(this, getMainComponentName()); Bundle optionBundle = new Bundle(); optionBundle.putString(MODULE_NAME, mCurModuleName); optionBundle.putString(ROUTE_NAME, mCurPageName); optionBundle.putString(EXTRA, mExtra); delegate.setLaunchOptions(optionBundle); return delegate; } @Override public void invokeDefaultOnBackPressed() { } @Override public void onDestroy() { super.onDestroy(); FragmentRNCollector.remove(getCurrentModuleRouterName()); } }
[ "pengdaosong@medlinker.com" ]
pengdaosong@medlinker.com
b8aeceedb0b2d8f82aec7426b330e079b0d82dc5
09ffd3c1caea9dfa9541263cb8d4e5d7723fd886
/adult_edu/src/main/java/com/allen/service/basic/spec/impl/EditSpecServiceImpl.java
34e8181bf0a91351b7ee59689e84247232a7dd01
[]
no_license
Allen5413/adult_edu
23846545a382cb488d80140a86c56dbadf7281a4
e175832d7e60d0b2725d560e8081b38d108dda54
refs/heads/master
2020-04-05T12:39:02.330647
2017-09-19T02:52:40
2017-09-19T02:52:40
95,195,421
0
0
null
null
null
null
UTF-8
Java
false
false
3,104
java
package com.allen.service.basic.spec.impl; import com.allen.base.exception.BusinessException; import com.allen.dao.basic.school.SchoolDao; import com.allen.dao.basic.spec.SpecDao; import com.allen.dao.datachange.DataChangeDao; import com.allen.entity.basic.School; import com.allen.entity.basic.Spec; import com.allen.entity.datachange.DataChange; import com.allen.entity.user.User; import com.allen.service.basic.spec.EditSpecService; import com.allen.util.StringUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * Created by Allen on 2017/7/7. */ @Service public class EditSpecServiceImpl implements EditSpecService { @Autowired private SpecDao specDao; @Autowired private DataChangeDao dataChangeDao; @Autowired private SchoolDao schoolDao; @Override public void edit(Spec spec, long centerId, int isOperateAudit, long operateId, String editReson) throws Exception { Spec spec2 = specDao.findByCodeAndSchoolId(spec.getCode(), spec.getSchoolId()); if(spec2 != null && spec2.getId() != spec.getId() && spec.getCode().equals(spec2.getCode())){ throw new BusinessException("专业编号已存在"); } if(null == spec2){ spec2 = specDao.findOne(spec.getId()); } //查询操作是否需要审核 if(isOperateAudit == User.ISOPERATEAUDIT_NOT) { spec2.setCode(spec.getCode()); spec2.setName(spec.getName()); specDao.save(spec2); }else { String changeContent = ""; String changeField = ""; if(!spec2.getCode().equals(spec.getCode())){ changeContent += "专业编号为<span style='color:red'>"+spec2.getCode()+"</span>变更为<span style='color:red'>"+spec.getCode()+"</span>;"; changeField += "code='"+spec.getCode()+"',"; } if(!spec2.getName().equals(spec.getName())){ changeContent += "专业名称为<span style='color:red'>"+spec2.getName()+"</span>变更为<span style='color:red'>"+spec.getName()+"</span>;"; changeField += "name='"+spec.getName()+"',"; } if(!StringUtil.isEmpty(changeField)){ changeField = changeField.substring(0, changeField.length()-1); School school = schoolDao.findOne(spec.getSchoolId()); changeContent = school.getName()+"的"+changeContent; } DataChange dataChange = new DataChange(); dataChange.setCenterId(centerId); dataChange.setChangeContent(changeContent); dataChange.setState(DataChange.STATE_AUDIT_WAIT); dataChange.setType(DataChange.TYPE_EDIT); dataChange.setChangeTable("spec"); dataChange.setChangeTableId(spec.getId()); dataChange.setChangeTableField(changeField); dataChange.setCreatorId(operateId); dataChange.setEditReson(editReson); dataChangeDao.save(dataChange); } } }
[ "2319772333@qq.com" ]
2319772333@qq.com
8501bd0b0fddb67bd31fa65ddf97a28df25ea544
757c4d23d827bf3594bc1d111b6fb930b2bdd7ab
/app/src/main/java/com/example/juicekaaa/schooldemo/Data/Gson/SysParamter.java
97784836f835cce66dd185f3b4f291e4fbca6b54
[]
no_license
ChrisTiiii/SChoolDemo
5644da844ffb699cd09b46d2a591ef17e49588b5
efeb9a5d84ce907c4f1d162d8ce17c1e773ad6da
refs/heads/master
2020-03-11T19:37:16.404631
2018-04-19T13:38:02
2018-04-19T13:38:02
130,212,804
2
1
null
null
null
null
UTF-8
Java
false
false
3,620
java
//package com.example.juicekaaa.schooldemo.Data; // //import android.content.Context; // //import com.example.juicekaaa.schooldemo.R; // //import java.util.HashMap; // ///** // * Created by Juicekaaa on 16/12/14. // */ // //public class SysParamter { // // public SysParamter() { // for (int i = 0; i < resName.length; i++) { // majorBulid.put(i + 11 + "", resName[i]); //// majorImage.put(i + 11 + "", resImages[i]); // buildImage.put(i + 11 + "", buildPhotos[i]); // buildTuding.put(i + 11 + "", tudingPosition[i]); // // } // // } // //// public void searchForDanwei() { //// MyDBHelper myDBHelper=new MyDBHelper(); //// //// } // // public static HashMap<String, String> majorBulid = new HashMap<String, String>(); //// public static HashMap<String, Integer> majorImage = new HashMap<String, Integer>(); // public static HashMap<String, Integer> buildImage = new HashMap<String, Integer>(); // public static HashMap<String, int[]> buildTuding = new HashMap<String, int[]>(); //// //图片资源整合 //// private int[] resImages = { //// R.mipmap.a, R.mipmap.b, R.mipmap.c, R.mipmap.d, R.mipmap.e, R.mipmap.f, R.mipmap.g, R.mipmap.h, R.mipmap.i, //// R.mipmap.j, R.mipmap.k, R.mipmap.l, R.mipmap.m, R.mipmap.basketball, R.mipmap.football, R.mipmap.tennis, //// R.mipmap.hospital, R.mipmap.food, R.mipmap.sfood, R.mipmap.library, R.mipmap.flat1, R.mipmap.flat2, //// R.mipmap.flat3, R.mipmap.flat4 //// }; // // // public String[] resName = { // "A楼:文化创意学院", // "B楼", // "C楼:公共课教学楼", // "D楼:中德机电学院", // "E楼:外语与公共教育学院", // "F楼:尚德光伏学院", // "G楼:办公楼", // "H楼:办公楼", // "L楼:物联网与软件技术学院、中德机电学院", // "I楼:教学楼", // "J楼:物联网与软件技术学院和中德机电学院", // "K楼:文化创意学院、物联网与软件技术学院实训地", // "M楼:办公楼", // "宿舍1-3号:男生宿舍楼", // "宿舍4-6号:女生宿舍楼", // "宿舍7-9号:男生宿舍楼", // "宿舍10-12号:10-11女生宿舍楼/12男生宿舍楼", // "篮球场:篮球场分三个大场区", // "操场:田径场与足球场", // "网球场:有两块场地", // "医务室", // "食堂:分一食堂和二食堂", // "美食城:三食堂", // "图书馆:1-6楼", // // }; // // public int[] buildPhotos = { // // R.mipmap.p11_101, R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.p15_101, // R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.wxstc, // R.mipmap.p21_101, R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.p24_101, R.mipmap.wxstc, // R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.wxstc, // R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.wxstc, R.mipmap.wxstc // // }; // // public int[][] tudingPosition = new int[][]{{530, 230}, {33, 66}, {5, 6}, {510, 153}, {348, 158}, // {530, 230}, {33, 66}, {5, 6}, {510, 153}, {348, 158}, // {292, 335}, {33, 66}, {5, 6}, {596, 339}, {348, 158}, // {530, 230}, {33, 66}, {5, 6}, {510, 153}, {348, 158}, // {530, 230}, {33, 66}, {5, 6}, {510, 153}, {348, 158}}; // // //}
[ "454837243@qq.com" ]
454837243@qq.com
d89930dea2c6e03e6d4dcc06bc256da2e14e43ea
352163a8f69f64bc87a9e14471c947e51bd6b27d
/bin/ext-template/ytelcoacceleratorstorefront/web/testsrc/de/hybris/platform/ytelcoacceleratorstorefront/interceptors/CSRFHandlerInterceptorTest.java
f28697b2e83ce21b2fd9dc7bb8711538e4eb4c1d
[]
no_license
GTNDYanagisawa/merchandise
2ad5209480d5dc7d946a442479cfd60649137109
e9773338d63d4f053954d396835ac25ef71039d3
refs/heads/master
2021-01-22T20:45:31.217238
2015-05-20T06:23:45
2015-05-20T06:23:45
35,868,211
3
5
null
null
null
null
UTF-8
Java
false
false
4,686
java
/* * [y] hybris Platform * * Copyright (c) 2000-2012 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. */ package de.hybris.platform.ytelcoacceleratorstorefront.interceptors; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import de.hybris.bootstrap.annotations.IntegrationTest; import de.hybris.platform.servicelayer.ServicelayerTest; import de.hybris.platform.util.Config; import de.hybris.platform.ytelcoacceleratorstorefront.util.CSRFHandlerInterceptor; import de.hybris.platform.ytelcoacceleratorstorefront.util.CSRFTokenManager; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import junit.framework.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.BDDMockito; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; @IntegrationTest public class CSRFHandlerInterceptorTest extends ServicelayerTest { private static final String SESSION_CSRF_ATTRIBUTE = "de.hybris.platform.ytelcoacceleratorstorefront.util.CSRFTokenManager.tokenval"; private static final String CSRF_URL_PROPERTY = "csrf.allowed.url.patterns"; @InjectMocks private final CSRFHandlerInterceptor csrfHandlerInterceptor = new CSRFHandlerInterceptor(); @Mock private HttpServletRequest request; @Mock private HttpServletResponse response; @Before public void prepare() { MockitoAnnotations.initMocks(this); } @Test public void shouldNotCheckWithNonPostRequest() throws Exception { BDDMockito.given(request.getMethod()).willReturn("GET"); boolean verified = csrfHandlerInterceptor.preHandle(request, response, null); Assert.assertEquals(true, verified); BDDMockito.given(request.getMethod()).willReturn("PUT"); verified = csrfHandlerInterceptor.preHandle(request, response, null); Assert.assertEquals(true, verified); BDDMockito.given(request.getMethod()).willReturn("DELETE"); verified = csrfHandlerInterceptor.preHandle(request, response, null); Assert.assertEquals(true, verified); } @Test public void shouldCheckWithPostRequest() throws Exception { final HttpSession session = Mockito.mock(HttpSession.class); BDDMockito.given(session.getAttribute(SESSION_CSRF_ATTRIBUTE)).willReturn("123"); BDDMockito.given(request.getMethod()).willReturn("POST"); BDDMockito.given(request.getSession()).willReturn(session); BDDMockito.given(request.getParameter(CSRFTokenManager.CSRF_PARAM_NAME)).willReturn("123"); final boolean verified = csrfHandlerInterceptor.preHandle(request, response, null); Assert.assertEquals(true, verified); } @Test public void shouldErrorOnMismatchTokens() throws Exception { final HttpSession session = Mockito.mock(HttpSession.class); BDDMockito.given(session.getAttribute(SESSION_CSRF_ATTRIBUTE)).willReturn("1234"); BDDMockito.given(request.getMethod()).willReturn("POST"); BDDMockito.given(request.getSession()).willReturn(session); BDDMockito.given(request.getParameter(CSRFTokenManager.CSRF_PARAM_NAME)).willReturn("123"); final boolean verified = csrfHandlerInterceptor.preHandle(request, response, null); verify(response, times(1)).sendError(HttpServletResponse.SC_FORBIDDEN, "Bad or missing CSRF value"); Assert.assertEquals(false, verified); } @Test public void shouldPassOnExemptUrl() throws Exception { final String originalValues = Config.getParameter(CSRF_URL_PROPERTY); try { Config.setParameter(CSRF_URL_PROPERTY, "/[^/]+(/[^?]*)+(sop-response)$"); final HttpSession session = Mockito.mock(HttpSession.class); BDDMockito.given(session.getAttribute(SESSION_CSRF_ATTRIBUTE)).willReturn("1234"); // Mismatch tokens BDDMockito.given(request.getParameter(CSRFTokenManager.CSRF_PARAM_NAME)).willReturn("123"); BDDMockito.given(request.getMethod()).willReturn("POST"); BDDMockito.given(request.getSession()).willReturn(session); BDDMockito.given(request.getServletPath()).willReturn("/paymentDetails/sop-response?targetArea=accountArea"); final boolean verified = csrfHandlerInterceptor.preHandle(request, response, null); Assert.assertEquals(true, verified); } finally { Config.setParameter(CSRF_URL_PROPERTY, originalValues); } } }
[ "yanagisawa@gotandadenshi.jp" ]
yanagisawa@gotandadenshi.jp
6deac0f34c68dd1d9dd4e2e5e846cc142f92abfa
7f785360d78bb5bb91c50e788c0ad6f3081741f2
/results/Nopol+UnsatGuided/EvoSuite Tests/Math/Math57/seed83/generatedTests/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint_ESTest_scaffolding.java
c374e226f052b2f9334cf416ae4185f59aafdeb5
[]
no_license
Spirals-Team/test4repair-experiments
390a65cca4e2c0d3099423becfdc47bae582c406
5bf4dabf0ccf941d4c4053b6a0909f106efa24b5
refs/heads/master
2021-01-13T09:47:18.746481
2020-01-27T03:26:15
2020-01-27T03:26:15
69,664,991
5
6
null
2020-10-13T05:57:11
2016-09-30T12:28:13
Java
UTF-8
Java
false
false
3,513
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Jan 21 11:46:04 GMT 2017 */ package org.apache.commons.math.stat.clustering; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class EuclideanIntegerPoint_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.stat.clustering.EuclideanIntegerPoint"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(EuclideanIntegerPoint_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math.exception.util.Localizable", "org.apache.commons.math.exception.NumberIsTooSmallException", "org.apache.commons.math.exception.MathRuntimeException", "org.apache.commons.math.exception.MathIllegalArgumentException", "org.apache.commons.math.exception.NullArgumentException", "org.apache.commons.math.exception.NonMonotonousSequenceException", "org.apache.commons.math.exception.MathArithmeticException", "org.apache.commons.math.util.FastMath", "org.apache.commons.math.util.MathUtils", "org.apache.commons.math.stat.clustering.EuclideanIntegerPoint", "org.apache.commons.math.exception.DimensionMismatchException", "org.apache.commons.math.exception.NumberIsTooLargeException", "org.apache.commons.math.exception.MathIllegalNumberException", "org.apache.commons.math.exception.NotFiniteNumberException", "org.apache.commons.math.exception.MathThrowable", "org.apache.commons.math.stat.clustering.Clusterable", "org.apache.commons.math.exception.NotPositiveException" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(EuclideanIntegerPoint_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.math.stat.clustering.EuclideanIntegerPoint", "org.apache.commons.math.util.FastMath", "org.apache.commons.math.util.MathUtils" ); } }
[ "martin.monperrus@gnieh.org" ]
martin.monperrus@gnieh.org
e0d6f930765540648b8b9615674bb37c100f04eb
16c444e99b2141d537564b1cab640e336fcfaee3
/src/test/java/com/janushenderson/automation/runners/TestAll.java
390a1f7dfb7c429b1f497528cbd678f9114bff96
[ "MIT" ]
permissive
QAAutomationRules/SerenityAPITest
e087979ad32257950506e4e9539d0f2b28f59e6f
4b98880d5ec3acf4db81ac12f2961e314e951e37
refs/heads/master
2020-09-05T12:42:07.414341
2019-11-06T23:20:26
2019-11-06T23:20:26
220,108,084
0
0
null
null
null
null
UTF-8
Java
false
false
497
java
package com.janushenderson.automation.runners; import cucumber.api.CucumberOptions; import net.serenitybdd.cucumber.CucumberWithSerenity; import org.junit.runner.RunWith; @RunWith(CucumberWithSerenity.class) @CucumberOptions( plugin = {"pretty", "html:target/cucumber-htmlreport","json:target/cucumber-report.json"}, features = {"src/test/resources/features"}, glue={"com.janushenderson.automation.stepdefinitions"}, tags = {"@Smoke"} ) public class TestAll { }
[ "john@sample.com" ]
john@sample.com
29430a3346ae164fd075d783b9666361bf499ba6
5b652af09e8392353a86bccb59427c22ebdd5a7d
/src/com/kingdee/eas/hr/base/app/WSTechPostType.java
246669313b5086c93b42fc0f7bfee54415450248
[]
no_license
yangpengfei0810/ypfGit
595384192a8349634931e318303959cbabf7ea49
b5fc6a79f2cbb9ea817ba10766a061359ad7c006
refs/heads/master
2016-09-12T13:01:47.560657
2016-04-18T04:29:18
2016-04-18T04:29:18
56,286,364
0
0
null
null
null
null
UTF-8
Java
false
false
2,873
java
package com.kingdee.eas.hr.base.app; import com.kingdee.bos.webservice.WSBean; public class WSTechPostType extends WSBean { private com.kingdee.eas.basedata.org.app.WSCtrlUnit CU ; private com.kingdee.eas.basedata.org.app.WSHROrgUnit hrOrgUnit ; private String name ; private String description ; private String lastUpdateTime ; private com.kingdee.eas.base.permission.app.WSUser creator ; private String simpleName ; private int isStandard ; private String createTime ; private com.kingdee.eas.base.permission.app.WSUser lastUpdateUser ; private String number ; private String id ; public com.kingdee.eas.basedata.org.app.WSCtrlUnit getCU() { return this.CU; } public void setCU( com.kingdee.eas.basedata.org.app.WSCtrlUnit CU) { this.CU = CU; } public com.kingdee.eas.basedata.org.app.WSHROrgUnit getHrOrgUnit() { return this.hrOrgUnit; } public void setHrOrgUnit( com.kingdee.eas.basedata.org.app.WSHROrgUnit hrOrgUnit) { this.hrOrgUnit = hrOrgUnit; } public String getName() { return this.name; } public void setName( String name) { this.name = name; } public String getDescription() { return this.description; } public void setDescription( String description) { this.description = description; } public String getLastUpdateTime() { return this.lastUpdateTime; } public void setLastUpdateTime( String lastUpdateTime) { this.lastUpdateTime = lastUpdateTime; } public com.kingdee.eas.base.permission.app.WSUser getCreator() { return this.creator; } public void setCreator( com.kingdee.eas.base.permission.app.WSUser creator) { this.creator = creator; } public String getSimpleName() { return this.simpleName; } public void setSimpleName( String simpleName) { this.simpleName = simpleName; } public int getIsStandard() { return this.isStandard; } public void setIsStandard( int isStandard) { this.isStandard = isStandard; } public String getCreateTime() { return this.createTime; } public void setCreateTime( String createTime) { this.createTime = createTime; } public com.kingdee.eas.base.permission.app.WSUser getLastUpdateUser() { return this.lastUpdateUser; } public void setLastUpdateUser( com.kingdee.eas.base.permission.app.WSUser lastUpdateUser) { this.lastUpdateUser = lastUpdateUser; } public String getNumber() { return this.number; } public void setNumber( String number) { this.number = number; } public String getId() { return this.id; } public void setId( String id) { this.id = id; } }
[ "348894966@qq.com" ]
348894966@qq.com
e304da7fe1f4140d6d6b45f60bf79cf946a13a91
146a30bee123722b5b32c0022c280bbe7d9b6850
/depsWorkSpace/bc-java-master/prov/src/main/java/org/mightyfish/jcajce/provider/symmetric/ChaCha.java
039f6001e0b6d2f02e06497a46a6862d8df4d7b1
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
GLC-Project/java-experiment
1d5aa7b9974c8ae572970ce6a8280e6a65417837
b03b224b8d5028dd578ca0e7df85d7d09a26688e
refs/heads/master
2020-12-23T23:47:57.341646
2016-02-13T16:20:45
2016-02-13T16:20:45
237,313,620
0
1
null
2020-01-30T21:56:54
2020-01-30T21:56:53
null
UTF-8
Java
false
false
1,258
java
package org.mightyfish.jcajce.provider.symmetric; import org.mightyfish.crypto.CipherKeyGenerator; import org.mightyfish.crypto.engines.ChaChaEngine; import org.mightyfish.jcajce.provider.config.ConfigurableProvider; import org.mightyfish.jcajce.provider.symmetric.util.BaseKeyGenerator; import org.mightyfish.jcajce.provider.symmetric.util.BaseStreamCipher; import org.mightyfish.jcajce.provider.util.AlgorithmProvider; public final class ChaCha { private ChaCha() { } public static class Base extends BaseStreamCipher { public Base() { super(new ChaChaEngine(), 8); } } public static class KeyGen extends BaseKeyGenerator { public KeyGen() { super("ChaCha", 128, new CipherKeyGenerator()); } } public static class Mappings extends AlgorithmProvider { private static final String PREFIX = ChaCha.class.getName(); public Mappings() { } public void configure(ConfigurableProvider provider) { provider.addAlgorithm("Cipher.CHACHA", PREFIX + "$Base"); provider.addAlgorithm("KeyGenerator.CHACHA", PREFIX + "$KeyGen"); } } }
[ "a.eslampanah@live.com" ]
a.eslampanah@live.com
3fb11b71ff415333e567cc296b902ff736c3a5bb
d366efb839073419b23ffef7eee1e5d225522f70
/src/main/java/text/string_metric/edit_distance/JaroDistance.java
fc1c6ce2f35895a1ff860929163ebd23f464b64c
[]
no_license
kinow/text
575b92b2727d5735cc8650e5f2aaff6a2c7b4390
0b82a3a0ba7808ce96c5e1cba4688b65f11e7002
refs/heads/master
2021-01-23T11:49:14.526899
2020-06-15T22:23:25
2020-06-15T22:23:25
26,518,100
0
0
null
2020-06-15T22:23:27
2014-11-12T03:50:46
Java
UTF-8
Java
false
false
553
java
package text.string_metric.edit_distance; import org.apache.commons.lang.Validate; import text.string_metric.EditDistance; import uk.ac.shef.wit.simmetrics.similaritymetrics.Jaro; public class JaroDistance implements EditDistance<Double, String> { private final Jaro jaroMetric; public JaroDistance() { jaroMetric = new Jaro(); } public Double distance(String from, String to) { Validate.notEmpty(from, "Missing 'from' string"); Validate.notEmpty(to, "Missing 'to' string"); return (double) jaroMetric.getSimilarity(from, to); } }
[ "brunodepaulak@yahoo.com.br" ]
brunodepaulak@yahoo.com.br
c698b3526e91efcbfab066dc77f9207b92da5915
5272ea9b2c0679a5ba5ef4b7cabcf75a30634ee2
/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URIEditorTests.java
ed72c6fedccb7b390e606b0426175806acfddd0e
[ "Apache-2.0" ]
permissive
whvixd/spring4-note
ad3fa3a79fc0a23b8f6bc5e27770b3eaa09c0593
1f37db9f25bdadb09f417ce84f6266921c308dee
refs/heads/master
2022-12-30T16:36:20.729963
2020-10-21T03:47:10
2020-10-21T03:47:10
269,893,579
0
0
null
null
null
null
UTF-8
Java
false
false
4,598
java
/* * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.beans.propertyeditors; import java.beans.PropertyEditor; import java.net.URI; import org.junit.Test; import org.springframework.util.ClassUtils; import static org.junit.Assert.*; /** * @author Juergen Hoeller * @author Arjen Poutsma */ public class URIEditorTests { private void doTestURI(String uriSpec) { PropertyEditor uriEditor = new URIEditor(); uriEditor.setAsText(uriSpec); Object value = uriEditor.getValue(); assertTrue(value instanceof URI); URI uri = (URI) value; assertEquals(uriSpec, uri.toString()); } @Test public void standardURI() throws Exception { doTestURI("mailto:juergen.hoeller@interface21.com"); } @Test public void withNonExistentResource() throws Exception { doTestURI("gonna:/freak/in/the/morning/freak/in/the.evening"); } @Test public void standardURL() throws Exception { doTestURI("https://www.springframework.org"); } @Test public void standardURLWithFragment() throws Exception { doTestURI("https://www.springframework.org#1"); } @Test public void standardURLWithWhitespace() throws Exception { PropertyEditor uriEditor = new URIEditor(); uriEditor.setAsText(" https://www.springframework.org "); Object value = uriEditor.getValue(); assertTrue(value instanceof URI); URI uri = (URI) value; assertEquals("https://www.springframework.org", uri.toString()); } @Test public void classpathURL() throws Exception { PropertyEditor uriEditor = new URIEditor(getClass().getClassLoader()); uriEditor.setAsText("classpath:" + ClassUtils.classPackageAsResourcePath(getClass()) + "/" + ClassUtils.getShortName(getClass()) + ".class"); Object value = uriEditor.getValue(); assertTrue(value instanceof URI); URI uri = (URI) value; assertEquals(uri.toString(), uriEditor.getAsText()); assertTrue(!uri.getScheme().startsWith("classpath")); } @Test public void classpathURLWithWhitespace() throws Exception { PropertyEditor uriEditor = new URIEditor(getClass().getClassLoader()); uriEditor.setAsText(" classpath:" + ClassUtils.classPackageAsResourcePath(getClass()) + "/" + ClassUtils.getShortName(getClass()) + ".class "); Object value = uriEditor.getValue(); assertTrue(value instanceof URI); URI uri = (URI) value; assertEquals(uri.toString(), uriEditor.getAsText()); assertTrue(!uri.getScheme().startsWith("classpath")); } @Test public void classpathURLAsIs() throws Exception { PropertyEditor uriEditor = new URIEditor(); uriEditor.setAsText("classpath:test.txt"); Object value = uriEditor.getValue(); assertTrue(value instanceof URI); URI uri = (URI) value; assertEquals(uri.toString(), uriEditor.getAsText()); assertTrue(uri.getScheme().startsWith("classpath")); } @Test public void setAsTextWithNull() throws Exception { PropertyEditor uriEditor = new URIEditor(); uriEditor.setAsText(null); assertNull(uriEditor.getValue()); assertEquals("", uriEditor.getAsText()); } @Test public void getAsTextReturnsEmptyStringIfValueNotSet() throws Exception { PropertyEditor uriEditor = new URIEditor(); assertEquals("", uriEditor.getAsText()); } @Test public void encodeURI() throws Exception { PropertyEditor uriEditor = new URIEditor(); uriEditor.setAsText("https://example.com/spaces and \u20AC"); Object value = uriEditor.getValue(); assertTrue(value instanceof URI); URI uri = (URI) value; assertEquals(uri.toString(), uriEditor.getAsText()); assertEquals("https://example.com/spaces%20and%20%E2%82%AC", uri.toASCIIString()); } @Test public void encodeAlreadyEncodedURI() throws Exception { PropertyEditor uriEditor = new URIEditor(false); uriEditor.setAsText("https://example.com/spaces%20and%20%E2%82%AC"); Object value = uriEditor.getValue(); assertTrue(value instanceof URI); URI uri = (URI) value; assertEquals(uri.toString(), uriEditor.getAsText()); assertEquals("https://example.com/spaces%20and%20%E2%82%AC", uri.toASCIIString()); } }
[ "wangzhx@fxiaoke.com" ]
wangzhx@fxiaoke.com
0d2c86a612e53c4d8526ca766f48c91047d2d705
827bf064e482700d7ded2cd0a3147cb9657db883
/AndroidPOS/src/com/aadhk/product/library/b/a.java
f33c4febcfd4b356c867de310b1d2bbd137ebd76
[]
no_license
cody0117/LearnAndroid
d30b743029f26568ccc6dda4313a9d3b70224bb6
02fd4d2829a0af8a1706507af4b626783524813e
refs/heads/master
2021-01-21T21:10:18.553646
2017-02-12T08:43:24
2017-02-12T08:43:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,291
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.aadhk.product.library.b; import android.content.Context; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import com.aadhk.product.library.b; import com.aadhk.product.library.c; // Referenced classes of package com.aadhk.product.library.b: // e, b, f, d public final class a extends e implements android.view.View.OnClickListener, android.widget.AdapterView.OnItemClickListener { private d f; private String g[]; public a(Context context, String as[]) { super(context, c.b); g = as; ListView listview = (ListView)findViewById(b.f); listview.setAdapter(new com.aadhk.product.library.b.b(this, e, g)); listview.setOnItemClickListener(this); } public final void onClick(View view) { if (f != null) { d _tmp = f; } dismiss(); } public final void onItemClick(AdapterView adapterview, View view, int i, long l) { if (a != null) { a.a(Integer.valueOf(i)); } dismiss(); } }
[ "em3888@gmail.com" ]
em3888@gmail.com
6a262c5c8965b3521ffff1f30eeecb89bcaf6b65
e1e5bd6b116e71a60040ec1e1642289217d527b0
/H5/L2Mythras/L2Mythras_2017_07_12/java/l2f/gameserver/model/actor/instances/player/Bonus.java
e65d0bdf99ae05fe044287e546b07514bc738e7a
[]
no_license
serk123/L2jOpenSource
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
603e784e5f58f7fd07b01f6282218e8492f7090b
refs/heads/master
2023-03-18T01:51:23.867273
2020-04-23T10:44:41
2020-04-23T10:44:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,477
java
package l2f.gameserver.model.actor.instances.player; public class Bonus { public static final int NO_BONUS = 0; public static final int BONUS_GLOBAL_ON_AUTHSERVER = 1; public static final int BONUS_GLOBAL_ON_GAMESERVER = 2; private double rateXp = 1.; private double rateSp = 1.; private double dropSiege = 1.; private double questRewardRate = 1.; private double questDropRate = 1.; private double dropAdena = 1.; private double dropItems = 1.; private double dropSpoil = 1.; private double weight; private int craftChance; private int masterWorkChance; private int bonusExpire; public double getRateXp() { return rateXp; } public void setRateXp(double rateXp) { this.rateXp = rateXp; } public double getRateSp() { return rateSp; } public void setRateSp(double rateSp) { this.rateSp = rateSp; } public double getQuestRewardRate() { return questRewardRate; } public void setQuestRewardRate(double questRewardRate) { this.questRewardRate = questRewardRate; } public double getQuestDropRate() { return questDropRate; } public void setQuestDropRate(double questDropRate) { this.questDropRate = questDropRate; } public double getDropAdena() { return dropAdena; } public void setDropAdena(double dropAdena) { this.dropAdena = dropAdena; } public double getDropItems() { return dropItems; } public void setDropItems(double dropItems) { this.dropItems = dropItems; } public double getDropSpoil() { return dropSpoil; } public void setDropSpoil(double dropSpoil) { this.dropSpoil = dropSpoil; } public int getBonusExpire() { return bonusExpire; } public void setBonusExpire(int bonusExpire) { this.bonusExpire = bonusExpire; } public double getDropSiege() { return dropSiege; } public void setDropSiege(double dropSiege) { this.dropSiege = dropSiege; } public double getWeight() { return weight; } public void setWeight(double weight) { this.weight = weight; } public double getCraftChance() { return craftChance; } public void setCraftChance(int craftChance) { this.craftChance = craftChance; } public double getMasterWorkChance() { return masterWorkChance; } public void setMasterWorkChance(int masterWorkChance) { this.masterWorkChance = masterWorkChance; } }
[ "64197706+L2jOpenSource@users.noreply.github.com" ]
64197706+L2jOpenSource@users.noreply.github.com
c1402b01bffa94c938d9db362dab08eb35ee8d94
504f0ba5c18ccc7393e6715f1ce9b236c4f6d99f
/pcdn-20170411/src/main/java/com/aliyun/pcdn20170411/models/GetCurrentModeRequest.java
25372c6480099cf9297ebea433eb3abc7e1d23ef
[ "Apache-2.0" ]
permissive
jhz-duanmeng/alibabacloud-java-sdk
77f69351dee8050f9c40d7e19b05cf613d2448d6
ac8bfeb15005d3eac06091bbdf50e7ed3e891c38
refs/heads/master
2023-01-16T04:30:12.898713
2020-11-25T11:45:31
2020-11-25T11:45:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
957
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.pcdn20170411.models; import com.aliyun.tea.*; public class GetCurrentModeRequest extends TeaModel { @NameInMap("SecurityToken") public String securityToken; @NameInMap("Version") @Validation(required = true) public String version; public static GetCurrentModeRequest build(java.util.Map<String, ?> map) throws Exception { GetCurrentModeRequest self = new GetCurrentModeRequest(); return TeaModel.build(map, self); } public GetCurrentModeRequest setSecurityToken(String securityToken) { this.securityToken = securityToken; return this; } public String getSecurityToken() { return this.securityToken; } public GetCurrentModeRequest setVersion(String version) { this.version = version; return this; } public String getVersion() { return this.version; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
8ab4670d1369809d4b0c7a23aa3c93f2f3d16740
8415d1a962ec87eb8047116eec848b5f94bcc734
/src/test/java/seleniumPrograms/TextFuntionXpath.java
e15f02bff9f1db6ef59a7a8897e740fd39f2eb6b
[]
no_license
aravindanath/MavenTestNG
693ee3d4f67ed52ab96982ae07ab3ffa534680c1
c28557e77cc700c03108cdd912f23ca18132d536
refs/heads/master
2023-05-13T14:01:24.076136
2019-07-28T04:25:58
2019-07-28T04:25:58
194,358,417
0
4
null
2023-05-09T18:30:50
2019-06-29T03:06:23
HTML
UTF-8
Java
false
false
830
java
package seleniumPrograms; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.*; import io.github.bonigarcia.wdm.WebDriverManager; public class TextFuntionXpath { WebDriver driver; @Test public void openBrowser() throws InterruptedException { WebDriverManager.chromedriver().setup(); driver = new ChromeDriver(); driver.manage().window().fullscreen(); driver.get("https://www.facebook.com"); Thread.sleep(2000); WebElement title = driver.findElement(By.xpath("//span[text()='Create an account']")); System.out.println("Title: " + title.getText()); Thread.sleep(2000); } @AfterTest public void close() { driver.close(); } }
[ "aravindanath86@gmail.com" ]
aravindanath86@gmail.com
1282857080c19addc73888eb4512fe8a754efeda
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/fts/c/d.java
0a276b925d2bb4e12e0aaf2c72c5bb3c04727558
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
4,254
java
package com.tencent.mm.plugin.fts.c; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.kernel.g; import com.tencent.mm.plugin.fts.a.h; import com.tencent.mm.plugin.fts.a.i; import com.tencent.mm.plugin.fts.a.n; import com.tencent.mm.sdk.platformtools.ab; import com.tencent.wcdb.database.SQLiteStatement; public final class d implements i { private boolean aGx; private boolean bZq; public h mBT; public SQLiteStatement mBU; public SQLiteStatement mBV; public SQLiteStatement mHl; public d() { AppMethodBeat.i(136835); ab.i("MicroMsg.FTS.FTS5SOSHistoryStorage", "Create %s", new Object[] { "FTS5SOSHistoryStorage" }); AppMethodBeat.o(136835); } public final String ck(String paramString, int paramInt) { return null; } public final void create() { AppMethodBeat.i(136836); ab.i("MicroMsg.FTS.FTS5SOSHistoryStorage", "OnCreate %s | isCreated =%b", new Object[] { "FTS5SOSHistoryStorage", Boolean.valueOf(this.bZq) }); int i; if (!this.bZq) { if (((n)g.M(n.class)).isFTSContextReady()) break label85; ab.i("MicroMsg.FTS.FTS5SOSHistoryStorage", "Create Fail!"); i = 0; if (i != 0) { ab.i("MicroMsg.FTS.FTS5SOSHistoryStorage", "SetCreated"); this.bZq = true; } } AppMethodBeat.o(136836); return; label85: this.mBT = ((n)g.M(n.class)).getFTSIndexDB(); ab.i("MicroMsg.FTS.FTS5SOSHistoryStorage", "Create Success!"); if ((this.mBT.MT("FTS5IndexSOSHistory")) && (this.mBT.MT("FTS5MetaSOSHistory"))) ab.d("MicroMsg.FTS.FTS5SOSHistoryStorage", "Table Exist, Not Need To Create"); while (true) { String str1 = String.format("INSERT INTO %s (content) VALUES (?);", new Object[] { "FTS5IndexSOSHistory" }); this.mBU = this.mBT.compileStatement(str1); str1 = String.format("INSERT INTO %s (docid, history, timestamp) VALUES (last_insert_rowid(), ?, ?);", new Object[] { "FTS5MetaSOSHistory" }); this.mBV = this.mBT.compileStatement(str1); str1 = String.format("UPDATE %s SET timestamp=? WHERE docid = ?", new Object[] { "FTS5MetaSOSHistory" }); this.mHl = this.mBT.compileStatement(str1); i = 1; break; ab.d("MicroMsg.FTS.FTS5SOSHistoryStorage", "Table Not Exist, Need To Create"); String str2 = String.format("DROP TABLE IF EXISTS %s;", new Object[] { "FTS5IndexSOSHistory" }); str1 = String.format("DROP TABLE IF EXISTS %s;", new Object[] { "FTS5MetaSOSHistory" }); this.mBT.execSQL(str2); this.mBT.execSQL(str1); str1 = String.format("CREATE VIRTUAL TABLE %s USING fts5(content, tokenize='mmSimple', prefix='1 2 3 4 5');", new Object[] { "FTS5IndexSOSHistory" }); this.mBT.execSQL(str1); str1 = String.format("CREATE TABLE IF NOT EXISTS %s (docid INTEGER PRIMARY KEY, history TEXT, timestamp INTEGER);", new Object[] { "FTS5MetaSOSHistory" }); this.mBT.execSQL(str1); this.mBT.execSQL(String.format("CREATE INDEX IF NOT EXISTS SOSHistory_history ON %s(history);", new Object[] { "FTS5MetaSOSHistory" })); this.mBT.execSQL(String.format("CREATE INDEX IF NOT EXISTS SOSHistory_timestamp ON %s(timestamp);", new Object[] { "FTS5MetaSOSHistory" })); } } public final void destroy() { AppMethodBeat.i(136837); ab.i("MicroMsg.FTS.FTS5SOSHistoryStorage", "OnDestroy %s | isDestroyed %b | isCreated %b", new Object[] { "FTS5SOSHistoryStorage", Boolean.valueOf(this.aGx), Boolean.valueOf(this.bZq) }); if ((!this.aGx) && (this.bZq)) { this.mBU.close(); this.mHl.close(); this.mBV.close(); ab.i("MicroMsg.FTS.FTS5SOSHistoryStorage", "SetDestroyed"); this.aGx = true; } AppMethodBeat.o(136837); } public final String getName() { return "FTS5SOSHistoryStorage"; } public final int getPriority() { return 1024; } public final int getType() { return 1024; } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes6-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.fts.c.d * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
3b06b0dfe19f8680d2ca1584cb0248d54a590511
7828a219eeadd49676ea5de95e66dc3c4f378180
/common-class/src/com/hfm/date/DateTimeFormatTest.java
e35c81df56a4c5c1bd7f270be549402883e1b31f
[ "MIT" ]
permissive
hfming/core-java
14ccca48941f3395bab684713a5e1623433d2532
ef5c4e53965e3ef6857e3e7ccecd2472a2524cdc
refs/heads/master
2023-08-25T21:52:01.374660
2021-10-09T11:47:08
2021-10-09T11:47:08
223,633,168
0
0
null
null
null
null
UTF-8
Java
false
false
2,540
java
package com.hfm.date; import org.junit.jupiter.api.Test; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.time.format.FormatStyle; import java.time.temporal.TemporalAccessor; /** * DateTimeFormat * * @author hfm * @version 1.01 2020-04-14 16:24 * @date 2020/4/14 */ public class DateTimeFormatTest { @Test public void dateTimeFormatTest() { // 方式一:预定义标准格式化 DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ISO_DATE; LocalDateTime localDateTime = LocalDateTime.now(); // format 方法格式化 System.out.println(localDateTime); System.out.println(dateTimeFormatter.format(localDateTime)); System.out.println(localDateTime.format(dateTimeFormatter)); DateTimeFormatter isoDateTime = DateTimeFormatter.ISO_DATE_TIME; System.out.println(isoDateTime.format(localDateTime)); System.out.println(localDateTime.format(isoDateTime)); System.out.println("================"); // 方式二:本地化的格式 ofLocalizedDateTime -> FormatStyle.SHORT 与 FormatStyle.MEDIUM DateTimeFormatter shortFormat = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT); System.out.println(shortFormat.format(localDateTime)); DateTimeFormatter mediumFormat = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM); System.out.println(mediumFormat.format(localDateTime)); // ofLocalizedDate -》 FormatStyle.SHORT\FormatStyle.MEDIUM\FormatStyle.FULL\FormatStyle.LONG DateTimeFormatter fullFormat = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL); System.out.println(fullFormat.format(localDateTime)); DateTimeFormatter longFormat = DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG); System.out.println(longFormat.format(localDateTime)); System.out.println("================"); // 方式三:自定义格式 DateTimeFormatter dateTimeFormatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss"); System.out.println(localDateTime); System.out.println(dateTimeFormatter2.format(localDateTime)); System.out.println(localDateTime.format(dateTimeFormatter2)); // parse 方法解析 TemporalAccessor parse1 = dateTimeFormatter2.parse("2020-04-14 04:39:22"); System.out.println(parse1); // 解析 TemporalAccessor parse = dateTimeFormatter.parse("2020-04-14"); System.out.println(parse); } }
[ "hfming2016@163.com" ]
hfming2016@163.com
665340b6c4a375edfb84f24696ad85652cb94d7a
a10543f3d7106dc324c4f4d8ed032a8a416ab895
/lib/java/com/ismartgo/app/share/ShareDialog.java
6c5b2e8a814479e584881b8a4dcfa56ff601ec70
[]
no_license
whywuzeng/jingmgouproject
32bfa45339700419842df772b91a2c178dcf0e23
0a6d1b9d33f7dca653f199181446b2a2ba8a07a4
refs/heads/master
2022-07-15T21:32:28.100332
2022-06-24T10:12:28
2022-06-24T10:12:28
81,888,796
1
4
null
null
null
null
UTF-8
Java
false
false
3,538
java
package com.ismartgo.app.share; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.view.Window; import android.view.WindowManager.LayoutParams; import cn.sharesdk.framework.ShareSDK; import com.ismartgo.app.url.Url; public class ShareDialog extends Dialog implements View.OnClickListener { public static String mImageUrl; public static String mTargetUrl; public static String mText; public static String mTitle; private String[] mArrayImage; private Context mContext; ShareUtils share; public ShareDialog(Context paramContext) { super(paramContext, 2131427356); this.mContext = paramContext; ShareSDK.initSDK(paramContext); } public void cancel(View paramView) { dismiss(); } public String getText() { return mText; } public String getTitle() { return mTitle; } public void onClick(View paramView) { this.share = new ShareUtils(this.mContext); switch (paramView.getId()) { default: case 2131231108: case 2131231109: case 2131231110: case 2131231111: case 2131231112: } while (true) { dismiss(); return; this.share.setPlatform("Wechat"); this.share.initShare(mTitle, mText, mImageUrl, mTargetUrl, this.mArrayImage); this.share.startShare(); continue; this.share.setPlatform("WechatMoments"); this.share.initShare(mTitle, mText, mImageUrl, mTargetUrl, this.mArrayImage); this.share.startShare(); continue; this.share.setPlatform("SinaWeibo"); this.share.initShare(mTitle, mText, mImageUrl, mTargetUrl, this.mArrayImage); this.share.startShare(); continue; this.share.setPlatform("QQ"); this.share.initShare(mTitle, mText, mImageUrl, mTargetUrl, this.mArrayImage); this.share.startShare(); continue; this.share.setPlatform("QZone"); this.share.initShare(mTitle, mText, mImageUrl, mTargetUrl, this.mArrayImage); this.share.startShare(); } } protected void onCreate(Bundle paramBundle) { super.onCreate(paramBundle); setContentView(2130903114); findViewById(2131231108).setOnClickListener(this); findViewById(2131231109).setOnClickListener(this); findViewById(2131231110).setOnClickListener(this); findViewById(2131231111).setOnClickListener(this); findViewById(2131231112).setOnClickListener(this); findViewById(2131230873).setOnClickListener(this); paramBundle = getWindow(); paramBundle.setGravity(80); WindowManager.LayoutParams localLayoutParams = paramBundle.getAttributes(); localLayoutParams.width = -1; paramBundle.setAttributes(localLayoutParams); } public void setShare(String paramString1, String paramString2, String paramString3, int paramInt1, String paramString4, int paramInt2) { mImageUrl = paramString1; mTitle = paramString2; mTargetUrl = Url.SHARE_GOODS_URL + "mid=" + paramInt1 + "&uid=" + paramString4 + "&type=" + paramInt2; mText = paramString3; Log.i("Share", "imageUrl: " + paramString1); Log.i("Share", "title: " + paramString2); Log.i("Share", "targetUrl: " + mTargetUrl); Log.i("Share", "text: " + paramString3); } } /* Location: F:\一周备份\面试apk\希望代码没混淆\jingmgou\jingmgou2\classes-dex2jar.jar * Qualified Name: com.ismartgo.app.share.ShareDialog * JD-Core Version: 0.6.2 */
[ "jiushiqiangone@sina.com" ]
jiushiqiangone@sina.com
1dd15856920fd97d24c82494a3dec7ce47dff0a6
bf7b4c21300a8ccebb380e0e0a031982466ccd83
/middlewareConcepts2014-master/Assignment3/lib/jacorb-3.4/src/generated/org/omg/CosNotifyComm/SequencePullConsumerOperations.java
51f0b5379a0ea561b4a111151c5b79ac487f7f56
[]
no_license
Puriakshat/Tuberlin
3fe36b970aabad30ed95e8a07c2f875e4912a3db
28dcf7f7edfe7320c740c306b1c0593a6c1b3115
refs/heads/master
2021-01-19T07:30:16.857479
2014-11-06T18:49:16
2014-11-06T18:49:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package org.omg.CosNotifyComm; /** * Generated from IDL interface "SequencePullConsumer". * * @author JacORB IDL compiler V @project.version@ * @version generated at 27-May-2014 20:14:30 */ public interface SequencePullConsumerOperations extends org.omg.CosNotifyComm.NotifyPublishOperations { /* constants */ /* operations */ void disconnect_sequence_pull_consumer(); }
[ "puri.akshat@gmail.com" ]
puri.akshat@gmail.com
c8dca60d61210e9c0eedfd16283588d690657205
6b978b12c587c77c13394b9319c70ec0c6587683
/rest-netty/src/main/java/com/java/study/netty/transport/netty/NettyTransport.java
69f71f9f08b1223a44ab4af4b62e55c2be0eaf53
[]
no_license
seawindnick/rest-rpc
519137fa7f55487f3e8100b38a9f2414d448c38d
aab66745c8250fbc53ad5e0370f62268ed49a3f7
refs/heads/master
2023-05-09T07:23:26.926829
2021-05-28T10:25:17
2021-05-28T10:25:17
371,666,793
0
0
null
null
null
null
UTF-8
Java
false
false
1,820
java
package com.java.study.netty.transport.netty; import com.java.study.netty.transport.InFlightRequests; import com.java.study.netty.transport.ResponseFuture; import com.java.study.netty.transport.command.Command; import com.java.study.netty.transport.Transport; import io.netty.channel.Channel; import io.netty.channel.ChannelFutureListener; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeoutException; /** * <Description> * * @author hushiye * @since 2020-12-13 16:24 */ public class NettyTransport implements Transport { private final Channel channel; private final InFlightRequests inFlightRequests; public NettyTransport(Channel channel, InFlightRequests inFlightRequests) { this.channel = channel; this.inFlightRequests = inFlightRequests; } @Override public CompletableFuture<Command> send(Command request) { //构建返回信息 CompletableFuture<Command> commandCompletedFuture = new CompletableFuture<>(); try{ //将在途请求放到 inFlightRequests 中 inFlightRequests.put(new ResponseFuture(request.getHeader().getRequestId(),commandCompletedFuture)); //发送命令 channel.writeAndFlush(request).addListener((ChannelFutureListener) channelFuture->{ //处理发送失败情况 if (!channelFuture.isSuccess()){ commandCompletedFuture.completeExceptionally(channelFuture.cause()); channel.close(); } }); } catch (Throwable e) { //处理发送异常 inFlightRequests.remove(request.getHeader().getRequestId()); commandCompletedFuture.completeExceptionally(e); } return commandCompletedFuture; } }
[ "hushiye001@ke.com" ]
hushiye001@ke.com
72cbdefe5b1f2ca9fd3ff022a33c3dc90d1afa39
a42c28deb26db57c1c4f377a67c422a6b7e3906b
/app/src/main/java/com/star/wanandroid/presenter/project/ProjectPresenter.java
3eedc18385fdec7c0490e1bb24f93059618311b7
[]
no_license
crystalDf/HongYang-Blog-20180416-WanAndroid
6ef74cf3477e3c6cf1da4312ec20d66eef281212
d87043195f067638abf8a11effa8f5baadaf13d4
refs/heads/master
2020-03-12T10:14:04.197700
2018-06-10T15:13:05
2018-06-10T15:13:05
130,568,796
1
0
null
null
null
null
UTF-8
Java
false
false
1,801
java
package com.star.wanandroid.presenter.project; import com.star.wanandroid.R; import com.star.wanandroid.app.WanAndroidApp; import com.star.wanandroid.base.presenter.BasePresenter; import com.star.wanandroid.contract.project.ProjectContract; import com.star.wanandroid.core.DataManager; import com.star.wanandroid.core.bean.project.ProjectClassifyData; import com.star.wanandroid.utils.RxUtils; import com.star.wanandroid.widget.BaseObserver; import java.util.List; import javax.inject.Inject; public class ProjectPresenter extends BasePresenter<ProjectContract.View> implements ProjectContract.Presenter { private DataManager mDataManager; @Inject ProjectPresenter(DataManager dataManager) { super(dataManager); this.mDataManager = dataManager; } @Override public void attachView(ProjectContract.View view) { super.attachView(view); } @Override public void getProjectClassifyData() { addSubscribe(mDataManager.getProjectClassifyData() .compose(RxUtils.rxSchedulerHelper()) .compose(RxUtils.handleResult()) .subscribeWith(new BaseObserver<List<ProjectClassifyData>>(mView, WanAndroidApp.getInstance().getString(R.string.failed_to_obtain_project_classify_data)) { @Override public void onNext(List<ProjectClassifyData> projectClassifyDataList) { mView.showProjectClassifyData(projectClassifyDataList); } })); } @Override public int getProjectCurrentPage() { return mDataManager.getProjectCurrentPage(); } @Override public void setProjectCurrentPage(int page) { mDataManager.setProjectCurrentPage(page); } }
[ "chendong333@gmail.com" ]
chendong333@gmail.com
d2a94a013db4c36e8d9599b74db9661541e2cf69
540cb0a2dc9464957ab4f8139c04d894be910372
/sdk/src/test/java/com/google/cloud/dataflow/sdk/options/DataflowProfilingOptionsTest.java
8b89abd2b1d39076e09c75899d19e1598b31bd0f
[ "Apache-2.0" ]
permissive
spotify/DataflowJavaSDK
8e1fa04b091bbcc45df2c057ecd223d041088fa4
2b200759edc25a6ec43ca277dac33fb62fddf475
refs/heads/master
2023-06-15T11:04:45.318231
2015-11-10T20:03:21
2015-11-10T20:59:25
45,999,683
3
3
Apache-2.0
2023-03-18T19:48:43
2015-11-11T18:00:01
Java
UTF-8
Java
false
false
1,590
java
/* * Copyright (C) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.cloud.dataflow.sdk.options; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import com.fasterxml.jackson.databind.ObjectMapper; import org.hamcrest.Matchers; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** * Tests for {@link DataflowProfilingOptions}. */ @RunWith(JUnit4.class) public class DataflowProfilingOptionsTest { private static final ObjectMapper MAPPER = new ObjectMapper(); @Test public void testOptionsObject() throws Exception { DataflowPipelineOptions options = PipelineOptionsFactory.fromArgs(new String[] { "--enableProfilingAgent", "--profilingAgentConfiguration={\"interval\": 21}"}) .as(DataflowPipelineOptions.class); assertTrue(options.getEnableProfilingAgent()); String json = MAPPER.writeValueAsString(options); assertThat(json, Matchers.containsString( "\"profilingAgentConfiguration\":{\"interval\":21}")); } }
[ "davorbonaci@users.noreply.github.com" ]
davorbonaci@users.noreply.github.com
0e9bdd3a802181105fe955ca12f22547a4beb047
2d666e65b8fce172523b4814d34bb88fdccf4a92
/Collections/Project/Products.java
70f92ba1d766c7553a44b616b3fa005b92773768
[]
no_license
agnelrayan/java
b95c89a31f075edfa8c4b4b3ff3c1734da89119a
3f6ba7b48320957e0f930e37f910cd041e4121ae
refs/heads/master
2021-01-01T16:46:57.881527
2018-06-08T11:46:20
2018-06-08T11:46:20
97,918,738
0
0
null
null
null
null
UTF-8
Java
false
false
697
java
package com.expertzlab.Collections.Project; import java.util.ArrayList; import java.util.List; public class Products { private final List<Product> products = new ArrayList<Product>(); public Products () { this.initStoreItems(); } public List<Product> getProducts() { return products; } public void initStoreItems() { String [] productNames = {"Lux Soap", "Fair n Lovely", "MTR"}; Double [] productPrice = {40.00d, 60.00d, 30.00d}; Integer [] stock = {10, 6, 10}; for (int i=0; i < productNames.length; i++) { this.products.add(new Product(i+1, productNames[i], productPrice[i], stock[i])); } } }
[ "agnelrayan@gmail.com" ]
agnelrayan@gmail.com
af07de71f021d3bf49e63c2598d4bcdfe02ca7c1
7d6636ec7c7a22af8fc19983f90ea88a40b925c7
/src/java/mc/alk/arena/util/compat/pre/PlayerHelper.java
27bb6ad417925d5b126803d7958542c33984c6c2
[]
no_license
TheEliteFour/BattleArena
dae3592244137d5adf067b81ed143f85ccaa7137
83dfff1584642c01d1c182c498135f36c46a37ec
refs/heads/master
2021-01-24T14:56:15.000669
2014-03-01T16:38:45
2014-03-01T16:38:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,845
java
package mc.alk.arena.util.compat.pre; import mc.alk.arena.controllers.plugins.HeroesController; import mc.alk.arena.util.Log; import mc.alk.arena.util.compat.IPlayerHelper; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityRegainHealthEvent; import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import java.lang.reflect.Method; @SuppressWarnings({"UnnecessaryBoxing", "BoxingBoxedValue"}) public class PlayerHelper implements IPlayerHelper{ Method getHealth; Method setHealth; Method getMaxHealth; Method getAmount; final Object blankArgs[] = {}; public PlayerHelper(){ try { setHealth = Player.class.getMethod("setHealth", int.class); getHealth = Player.class.getMethod("getHealth"); getMaxHealth = Player.class.getMethod("getMaxHealth"); getAmount = EntityRegainHealthEvent.class.getMethod("getAmount"); } catch (Exception e) { Log.printStackTrace(e); } } @SuppressWarnings("deprecation") @Override public void setHealth(Player player, double health, boolean skipHeroes) { if (!skipHeroes && HeroesController.enabled()){ HeroesController.setHealth(player,health); return; } final int oldHealth = (int)getHealth(player); if (oldHealth > health){ EntityDamageEvent event = new EntityDamageEvent(player, DamageCause.CUSTOM, (int)(oldHealth-health) ); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()){ player.setLastDamageCause(event); final int dmg = (int) Math.max(0,oldHealth - event.getDamage()); setHealth(player,dmg); } } else if (oldHealth < health){ EntityRegainHealthEvent event = new EntityRegainHealthEvent(player, (int)(health-oldHealth),RegainReason.CUSTOM); Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()){ final Integer regen = Math.min(oldHealth + getAmount(event),(int)getMaxHealth(player)); setHealth(player, regen); } } } @Override public double getHealth(Player player) { try { return new Double((Integer)getHealth.invoke(player, blankArgs)); } catch (Exception e) { Log.printStackTrace(e); return 20; } } @Override public double getMaxHealth(Player player) { try { return new Double((Integer)getMaxHealth.invoke(player, blankArgs)); } catch (Exception e) { Log.printStackTrace(e); return 20; } } public Integer getAmount(EntityRegainHealthEvent event) { try { return new Integer((Integer)getAmount.invoke(event, blankArgs)); } catch (Exception e) { Log.printStackTrace(e); return null; } } public void setHealth(Player player, Integer health){ try { setHealth.invoke(player, health); } catch (Exception e) { Log.printStackTrace(e); } } }
[ "alkarin.v@gmail.com" ]
alkarin.v@gmail.com
ed0b575808894cdece96e30cc84080d5f8766f53
06e4ecdea31c9f33fa600373dbe6d3148e14f818
/src/main/java/com/slyak/spring/jpa/XmlNamedTemplateResolver.java
ccebe2ebeb6409bd78fdf68dbb75bfa742932e92
[ "Apache-2.0" ]
permissive
zsf513/spring-data-jpa-extra
8a368bdb2a6e37a2f7e4469fe77b2b8a9acaa590
c605fe1be754edb3b20ba14dd4b943fbfa0c4188
refs/heads/master
2021-01-25T08:01:22.190025
2017-04-21T03:19:46
2017-04-21T03:19:46
93,700,237
1
0
null
2017-06-08T02:41:18
2017-06-08T02:41:18
null
UTF-8
Java
false
false
2,289
java
package com.slyak.spring.jpa; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.xml.DefaultDocumentLoader; import org.springframework.beans.factory.xml.DocumentLoader; import org.springframework.beans.factory.xml.ResourceEntityResolver; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import org.springframework.util.xml.DomUtils; import org.springframework.util.xml.SimpleSaxErrorHandler; import org.springframework.util.xml.XmlValidationModeDetector; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.EntityResolver; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import java.util.Iterator; import java.util.List; /** * . * * @author stormning on 2016/12/17. */ public class XmlNamedTemplateResolver implements NamedTemplateResolver { protected final Log logger = LogFactory.getLog(getClass()); private String encoding = "UTF-8"; private DocumentLoader documentLoader = new DefaultDocumentLoader(); private EntityResolver entityResolver; private ErrorHandler errorHandler = new SimpleSaxErrorHandler(logger); public XmlNamedTemplateResolver(ResourceLoader resourceLoader) { this.entityResolver = new ResourceEntityResolver(resourceLoader); } public void setEncoding(String encoding) { this.encoding = encoding; } @Override public Iterator<Void> doInTemplateResource(Resource resource, final NamedTemplateCallback callback) throws Exception { InputSource inputSource = new InputSource(resource.getInputStream()); inputSource.setEncoding(encoding); Document doc = documentLoader.loadDocument(inputSource, entityResolver, errorHandler, XmlValidationModeDetector.VALIDATION_XSD, false); final List<Element> sqes = DomUtils.getChildElementsByTagName(doc.getDocumentElement(), "sql"); return new Iterator<Void>() { int index = 0, total = sqes.size(); @Override public boolean hasNext() { return index < total; } @Override public Void next() { Element sqle = sqes.get(index); callback.process(sqle.getAttribute("name"), sqle.getTextContent()); index++; return null; } @Override public void remove() { //ignore } }; } }
[ "stormning@163.com" ]
stormning@163.com
cc10a1fc8b2ac2eb0131f61e6ccad55f2f16b258
45e4e25c2ce035fd5c99d31c426de32705ca50ad
/in.mymoviemanager.imdb/src/in/mymoviemanager/imdb/model/Actors.java
ab1b1eb93cd85d85cc5678d9db761bc3173a7159
[]
no_license
amitjoy/my-movie-manager
454b9492157f6f2ec77cd781eed1a98d4283f057
0dee7b210711366778ad6769a0a31d8f5cd8da37
refs/heads/master
2021-01-10T13:44:45.367802
2020-10-19T20:08:08
2020-10-19T20:08:08
45,376,087
1
0
null
null
null
null
UTF-8
Java
false
false
401
java
package in.mymoviemanager.imdb.model; import java.util.List; import javax.xml.bind.annotation.XmlRootElement; /** * Actors Model * * @author AMIT KUMAR MONDAL (admin@amitinside.com) * */ @XmlRootElement public class Actors { List<String> item; public List<String> getItem() { return item; } public void setItem(List<String> item) { this.item = item; } }
[ "admin@amitinside.com" ]
admin@amitinside.com
33b3cff4146413ae06424927314121ecd78ede55
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/zhihu/android/video/player2/plugin/p2017c/LivePlayCoverBelowPlugin.java
4928ad25ebf62313d2d4180861842e49842a26ea
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,944
java
package com.zhihu.android.video.player2.plugin.p2017c; import android.content.Context; import android.graphics.Bitmap; import android.view.View; import android.widget.ImageView; import com.facebook.common.p452b.UiThreadImmediateExecutorService; import com.facebook.common.p458h.CloseableReference; import com.facebook.drawee.generic.GenericDraweeHierarchy; import com.facebook.drawee.p464a.p465a.Fresco; import com.facebook.drawee.p473e.ScalingUtils; import com.facebook.imagepipeline.p504g.BaseBitmapDataSubscriber; import com.facebook.imagepipeline.p509l.CloseableImage; import com.facebook.imagepipeline.p512o.C4081b; import com.facebook.p463d.DataSource; import com.zhihu.android.app.util.ImageUtils; import com.zhihu.android.base.widget.ZHDraweeView; import com.zhihu.android.video.player2.base.plugin.C26575a; import com.zhihu.android.video.player2.plugin.inline.InlinePlayUpCoverPlugin; import com.zhihu.android.video.player2.plugin.p2017c.LivePlayCoverBelowPlugin; import java8.util.Optional; import java8.util.p2234b.AbstractC32235e; /* renamed from: com.zhihu.android.video.player2.plugin.c.b */ /* compiled from: LivePlayCoverBelowPlugin */ public class LivePlayCoverBelowPlugin extends C26575a { /* renamed from: a */ private ZHDraweeView f93200a; @Override // com.zhihu.android.video.player2.base.plugin.C26575a public boolean isBelowVideoView() { return true; } public LivePlayCoverBelowPlugin() { setTag(InlinePlayUpCoverPlugin.class.getSimpleName()); } @Override // com.zhihu.android.video.player2.base.plugin.C26575a public View onCreateView(Context context) { this.f93200a = new ZHDraweeView(context); ((GenericDraweeHierarchy) this.f93200a.getHierarchy()).mo28036a(ScalingUtils.AbstractC3990b.f17966i); this.f93200a.setScaleType(ImageView.ScaleType.CENTER_CROP); this.f93200a.setBusinessType(1); this.f93200a.enableAutoMask(false); return this.f93200a; } /* renamed from: a */ public void mo113086a(String str) { this.f93200a.setImageURI(""); mo113087b(str); } /* renamed from: b */ public void mo113087b(String str) { final DataSource<CloseableReference<CloseableImage>> a = Fresco.m20883c().mo28368a(C4081b.m22469a(str), this.f93200a); a.mo27627a(new BaseBitmapDataSubscriber() { /* class com.zhihu.android.video.player2.plugin.p2017c.LivePlayCoverBelowPlugin.C267091 */ @Override // com.facebook.imagepipeline.p504g.BaseBitmapDataSubscriber public void onNewResultImpl(Bitmap bitmap) { Optional.m150255b(bitmap).mo131261a((AbstractC32235e) new AbstractC32235e() { /* class com.zhihu.android.video.player2.plugin.p2017c.$$Lambda$b$1$4k5YjlFdwTDD7CaQAJBrIexGko */ @Override // java8.util.p2234b.AbstractC32235e public final void accept(Object obj) { LivePlayCoverBelowPlugin.C267091.this.m129413a((Bitmap) obj); } }); Optional.m150255b(a).mo131261a((AbstractC32235e) $$Lambda$YCs0r_zrN5qkVlbL65ual2ytXjY.INSTANCE); } /* access modifiers changed from: private */ /* renamed from: a */ public /* synthetic */ void m129413a(Bitmap bitmap) { LivePlayCoverBelowPlugin.this.f93200a.setImageBitmap(ImageUtils.m83748a(bitmap, 16)); } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.facebook.d.c] */ @Override // com.facebook.p463d.BaseDataSubscriber public void onFailureImpl(DataSource<CloseableReference<CloseableImage>> cVar) { Optional.m150255b(cVar).mo131261a((AbstractC32235e) $$Lambda$YCs0r_zrN5qkVlbL65ual2ytXjY.INSTANCE); } }, UiThreadImmediateExecutorService.m20513b()); } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
0d76befade69856a1208b1aa02c5bb2b352620b1
13c371fffd8c0ecd5e735755e7337a093ac00e30
/com/planet_ink/coffee_mud/Items/Basic/GenDrink.java
817f15ee14357dd37a5d2b546933e4e62f2e6eda
[ "Apache-2.0" ]
permissive
z3ndrag0n/CoffeeMud
e6b0c58953e47eb58544039b0781e4071a016372
50df765daee37765e76a1632a04c03f8a96d8f40
refs/heads/master
2020-09-15T10:27:26.511725
2019-11-18T15:41:42
2019-11-18T15:41:42
223,416,916
1
0
Apache-2.0
2019-11-22T14:09:54
2019-11-22T14:09:53
null
UTF-8
Java
false
false
6,554
java
package com.planet_ink.coffee_mud.Items.Basic; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; /* Copyright 2004-2019 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class GenDrink extends StdDrink { @Override public String ID() { return "GenDrink"; } protected String readableText = ""; public GenDrink() { super(); setName("a generic drinking container"); basePhyStats.setWeight(1); setDisplayText("a generic drinking container sits here."); setDescription(""); baseGoldValue=1; capacity=5; amountOfThirstQuenched=100; amountOfLiquidHeld=700; amountOfLiquidRemaining=700; liquidType=RawMaterial.RESOURCE_FRESHWATER; setMaterial(RawMaterial.RESOURCE_LEATHER); recoverPhyStats(); } @Override public boolean isGeneric() { return true; } @Override public String text() { return CMLib.coffeeMaker().getPropertiesStr(this,false); } @Override public int liquidType() { if((material()&RawMaterial.MATERIAL_MASK)==RawMaterial.MATERIAL_LIQUID) return material(); if(!CMath.isInteger(readableText)) return liquidType; return CMath.s_int(readableText); } @Override public void setLiquidType(final int newLiquidType) { liquidType = newLiquidType; readableText = "" + newLiquidType; } @Override public String keyName() { return readableText; } @Override public void setKeyName(final String newKeyName) { readableText=newKeyName; } @Override public String readableText() { return readableText; } @Override public void setReadableText(final String text) { readableText = text; } @Override public void setMiscText(final String newText) { miscText=""; CMLib.coffeeMaker().setPropertiesStr(this,newText,false); recoverPhyStats(); } private final static String[] MYCODES={"HASLOCK","HASLID","CAPACITY","CONTAINTYPES","RESETTIME","QUENCHED","LIQUIDHELD","LIQUIDTYPE","DEFCLOSED","DEFLOCKED"}; @Override public String getStat(final String code) { if(CMLib.coffeeMaker().getGenItemCodeNum(code)>=0) return CMLib.coffeeMaker().getGenItemStat(this,code); switch(getCodeNum(code)) { case 0: return "" + hasALock(); case 1: return "" + hasADoor(); case 2: return "" + capacity(); case 3: return "" + containTypes(); case 4: return "" + openDelayTicks(); case 5: return "" + thirstQuenched(); case 6: return "" + liquidHeld(); case 7: return "" + liquidType(); case 8: return "" + defaultsClosed(); case 9: return "" + defaultsLocked(); default: return CMProps.getStatCodeExtensionValue(getStatCodes(), xtraValues, code); } } @Override public void setStat(final String code, final String val) { if(CMLib.coffeeMaker().getGenItemCodeNum(code)>=0) CMLib.coffeeMaker().setGenItemStat(this,code,val); else switch(getCodeNum(code)) { case 0: setDoorsNLocks(hasADoor(), isOpen(), defaultsClosed(), CMath.s_bool(val), false, CMath.s_bool(val) && defaultsLocked()); break; case 1: setDoorsNLocks(CMath.s_bool(val), isOpen(), CMath.s_bool(val) && defaultsClosed(), hasALock(), isLocked(), defaultsLocked()); break; case 2: setCapacity(CMath.s_parseIntExpression(val)); break; case 3: setContainTypes(CMath.s_parseBitLongExpression(Container.CONTAIN_DESCS, val)); break; case 4: setOpenDelayTicks(CMath.s_parseIntExpression(val)); break; case 5: setThirstQuenched(CMath.s_parseIntExpression(val)); break; case 6: setLiquidHeld(CMath.s_parseIntExpression(val)); break; case 7: { int x = CMath.s_parseListIntExpression(RawMaterial.CODES.NAMES(), val); x = ((x >= 0) && (x < RawMaterial.RESOURCE_MASK)) ? RawMaterial.CODES.GET(x) : x; setLiquidType(x); break; } case 8: setDoorsNLocks(hasADoor(), isOpen(), CMath.s_bool(val), hasALock(), isLocked(), defaultsLocked()); break; case 9: setDoorsNLocks(hasADoor(), isOpen(), defaultsClosed(), hasALock(), isLocked(), CMath.s_bool(val)); break; default: CMProps.setStatCodeExtensionValue(getStatCodes(), xtraValues, code, val); break; } } @Override protected int getCodeNum(final String code) { for(int i=0;i<MYCODES.length;i++) { if(code.equalsIgnoreCase(MYCODES[i])) return i; } return -1; } private static String[] codes = null; @Override public String[] getStatCodes() { if(codes!=null) return codes; final String[] MYCODES=CMProps.getStatCodesList(GenDrink.MYCODES,this); final String[] superCodes=CMParms.toStringArray(GenericBuilder.GenItemCode.values()); codes=new String[superCodes.length+MYCODES.length]; int i=0; for(;i<superCodes.length;i++) codes[i]=superCodes[i]; for(int x=0;x<MYCODES.length;i++,x++) codes[i]=MYCODES[x]; return codes; } @Override public boolean sameAs(final Environmental E) { if(!(E instanceof GenDrink)) return false; final String[] codes=getStatCodes(); for(int i=0;i<codes.length;i++) { if(!E.getStat(codes[i]).equals(getStat(codes[i]))) return false; } return true; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
be6f9d6d3b13aee30bede8f69adde16e22a0956a
c491f74fe1e1176a5d59dbad3a7d224f122d1474
/src/main/java/com/saifiahmada/spring/service/UserService.java
22dfc253daafe705012b123e01fc826e5f652eeb
[]
no_license
saifiahmada/bootsec
9346adc4c3da0b455caf9a284ef272ddd8a1ffd6
9d0bc292b2c1d7f2725efc8e20a03af0068562c0
refs/heads/master
2020-05-28T07:57:48.638126
2015-03-20T09:50:10
2015-03-20T09:50:10
32,514,040
0
0
null
null
null
null
UTF-8
Java
false
false
1,350
java
package com.saifiahmada.spring.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import com.saifiahmada.spring.domain.User; import com.saifiahmada.spring.repository.UserRepository; @Service public class UserService implements UserDetailsService { private UserRepository repo; @Autowired public UserService(UserRepository repo) { this.repo = repo; } @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { User user = repo.findByName(username); if (user == null) { return null; } List<GrantedAuthority> auth = AuthorityUtils .commaSeparatedStringToAuthorityList("ROLE_USER"); if (username.equals("admin")) { auth = AuthorityUtils .commaSeparatedStringToAuthorityList("ROLE_ADMIN"); } String password = user.getPassword(); return new org.springframework.security.core.userdetails.User(username, password, auth); } }
[ "saifiahmada@gmail.com" ]
saifiahmada@gmail.com
8910a2571d2e37b8411dc4653d3c42671f25a0be
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
/cab.snapp.passenger.play_184.apk-decompiled/sources/com/squareup/picasso/ab.java
79974226371c833c41a68d411472ed4eb002dd4d
[]
no_license
BaseMax/PopularAndroidSource
a395ccac5c0a7334d90c2594db8273aca39550ed
bcae15340907797a91d39f89b9d7266e0292a184
refs/heads/master
2020-08-05T08:19:34.146858
2019-10-06T20:06:31
2019-10-06T20:06:31
212,433,298
2
0
null
null
null
null
UTF-8
Java
false
false
4,128
java
package com.squareup.picasso; import java.io.PrintWriter; import java.io.StringWriter; public final class ab { public final long averageDownloadSize; public final long averageOriginalBitmapSize; public final long averageTransformedBitmapSize; public final long cacheHits; public final long cacheMisses; public final int downloadCount; public final int maxSize; public final int originalBitmapCount; public final int size; public final long timeStamp; public final long totalDownloadSize; public final long totalOriginalBitmapSize; public final long totalTransformedBitmapSize; public final int transformedBitmapCount; public ab(int i, int i2, long j, long j2, long j3, long j4, long j5, long j6, long j7, long j8, int i3, int i4, int i5, long j9) { this.maxSize = i; this.size = i2; this.cacheHits = j; this.cacheMisses = j2; this.totalDownloadSize = j3; this.totalOriginalBitmapSize = j4; this.totalTransformedBitmapSize = j5; this.averageDownloadSize = j6; this.averageOriginalBitmapSize = j7; this.averageTransformedBitmapSize = j8; this.downloadCount = i3; this.originalBitmapCount = i4; this.transformedBitmapCount = i5; this.timeStamp = j9; } public final void dump() { dump(new PrintWriter(new StringWriter())); } public final void dump(PrintWriter printWriter) { printWriter.println("===============BEGIN PICASSO STATS ==============="); printWriter.println("Memory Cache Stats"); printWriter.print(" Max Cache Size: "); printWriter.println(this.maxSize); printWriter.print(" Cache Size: "); printWriter.println(this.size); printWriter.print(" Cache % Full: "); printWriter.println((int) Math.ceil((double) ((((float) this.size) / ((float) this.maxSize)) * 100.0f))); printWriter.print(" Cache Hits: "); printWriter.println(this.cacheHits); printWriter.print(" Cache Misses: "); printWriter.println(this.cacheMisses); printWriter.println("Network Stats"); printWriter.print(" Download Count: "); printWriter.println(this.downloadCount); printWriter.print(" Total Download Size: "); printWriter.println(this.totalDownloadSize); printWriter.print(" Average Download Size: "); printWriter.println(this.averageDownloadSize); printWriter.println("Bitmap Stats"); printWriter.print(" Total Bitmaps Decoded: "); printWriter.println(this.originalBitmapCount); printWriter.print(" Total Bitmap Size: "); printWriter.println(this.totalOriginalBitmapSize); printWriter.print(" Total Transformed Bitmaps: "); printWriter.println(this.transformedBitmapCount); printWriter.print(" Total Transformed Bitmap Size: "); printWriter.println(this.totalTransformedBitmapSize); printWriter.print(" Average Bitmap Size: "); printWriter.println(this.averageOriginalBitmapSize); printWriter.print(" Average Transformed Bitmap Size: "); printWriter.println(this.averageTransformedBitmapSize); printWriter.println("===============END PICASSO STATS ==============="); printWriter.flush(); } public final String toString() { return "StatsSnapshot{maxSize=" + this.maxSize + ", size=" + this.size + ", cacheHits=" + this.cacheHits + ", cacheMisses=" + this.cacheMisses + ", downloadCount=" + this.downloadCount + ", totalDownloadSize=" + this.totalDownloadSize + ", averageDownloadSize=" + this.averageDownloadSize + ", totalOriginalBitmapSize=" + this.totalOriginalBitmapSize + ", totalTransformedBitmapSize=" + this.totalTransformedBitmapSize + ", averageOriginalBitmapSize=" + this.averageOriginalBitmapSize + ", averageTransformedBitmapSize=" + this.averageTransformedBitmapSize + ", originalBitmapCount=" + this.originalBitmapCount + ", transformedBitmapCount=" + this.transformedBitmapCount + ", timeStamp=" + this.timeStamp + '}'; } }
[ "MaxBaseCode@gmail.com" ]
MaxBaseCode@gmail.com
b908caddab8d2e7473a45cba4a06e7f627d58d59
38599663f4622a9512dd46516e7b101a7391cbda
/src/main/java/com/mycompany/myapp/ConsultaOnlineApp.java
ceefd3242096042f21a59440409f3e13c70e124b
[]
no_license
wanderson-gomes/Avaliacao_ES_II
909fbf3ecb0b13a366d5f06d93f5710a51b352c8
bcc5159dfed62486a7f59eba8f5dc42cd9d77302
refs/heads/main
2023-06-06T13:51:09.647635
2021-06-22T19:45:11
2021-06-22T19:45:11
379,367,448
0
0
null
2021-06-22T19:01:28
2021-06-22T18:36:53
Java
UTF-8
Java
false
false
4,123
java
package com.mycompany.myapp; import com.mycompany.myapp.config.ApplicationProperties; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; import java.util.Collection; import java.util.Optional; import javax.annotation.PostConstruct; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.core.env.Environment; import tech.jhipster.config.DefaultProfileUtil; import tech.jhipster.config.JHipsterConstants; @SpringBootApplication @EnableConfigurationProperties({ LiquibaseProperties.class, ApplicationProperties.class }) public class ConsultaOnlineApp { private static final Logger log = LoggerFactory.getLogger(ConsultaOnlineApp.class); private final Environment env; public ConsultaOnlineApp(Environment env) { this.env = env; } /** * Initializes ConsultaOnline. * <p> * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile * <p> * You can find more information on how profiles work with JHipster on <a href="https://www.jhipster.tech/profiles/">https://www.jhipster.tech/profiles/</a>. */ @PostConstruct public void initApplication() { Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles()); if ( activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION) ) { log.error( "You have misconfigured your application! It should not run " + "with both the 'dev' and 'prod' profiles at the same time." ); } if ( activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD) ) { log.error( "You have misconfigured your application! It should not " + "run with both the 'dev' and 'cloud' profiles at the same time." ); } } /** * Main method, used to run the application. * * @param args the command line arguments. */ public static void main(String[] args) { SpringApplication app = new SpringApplication(ConsultaOnlineApp.class); DefaultProfileUtil.addDefaultProfile(app); Environment env = app.run(args).getEnvironment(); logApplicationStartup(env); } private static void logApplicationStartup(Environment env) { String protocol = Optional.ofNullable(env.getProperty("server.ssl.key-store")).map(key -> "https").orElse("http"); String serverPort = env.getProperty("server.port"); String contextPath = Optional .ofNullable(env.getProperty("server.servlet.context-path")) .filter(StringUtils::isNotBlank) .orElse("/"); String hostAddress = "localhost"; try { hostAddress = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { log.warn("The host name could not be determined, using `localhost` as fallback"); } log.info( "\n----------------------------------------------------------\n\t" + "Application '{}' is running! Access URLs:\n\t" + "Local: \t\t{}://localhost:{}{}\n\t" + "External: \t{}://{}:{}{}\n\t" + "Profile(s): \t{}\n----------------------------------------------------------", env.getProperty("spring.application.name"), protocol, serverPort, contextPath, protocol, hostAddress, serverPort, contextPath, env.getActiveProfiles() ); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
a6900b6aa7cddbf71bfd259fa9f893f0cd642d34
2bc00c3d724a8ddbfc1ca7f57265cd459dc67467
/android/renho/gen/com/example/renho/R.java
b2e377a85affbc60d11d0937ffbad506501fe2c7
[]
no_license
renho-r/ongit
1aed813a2d056b940f8de56e7fbdc739f0277de1
5b3d2dc16b3381ebe251868ce08872372a6f12a2
refs/heads/master
2021-10-07T17:05:07.269405
2020-04-07T13:15:57
2020-04-07T13:15:57
31,402,894
5
0
null
2020-12-09T08:18:51
2015-02-27T04:06:44
HTML
UTF-8
Java
false
false
173
java
/*___Generated_by_IDEA___*/ package com.example.renho; /* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */ public final class R { }
[ "rho_i_xx@163.com" ]
rho_i_xx@163.com
785924cc6717021ee28badb8b9a360add34f4e3e
c06b04186855e4e0fe5e771239b31983d92bbdd7
/T1809-Java_Architect/01_Java_Beginner/01_Java300/09_Mult_Thread/mysol/c9_proj1/src/com/accenture/spm/state/StateBlockedYield.java
afeb2fec6453e0d1ebdeeb81fdf1cb8d7511b623
[ "MIT" ]
permissive
specter01wj/ShangXueTang_Course
0c6b8895c684891f72ee3f42c14ac3884d1b7db4
1de238c3385585f07e19815f680277672d2e1b9b
refs/heads/master
2020-04-05T16:46:57.934281
2019-04-17T06:12:26
2019-04-17T06:12:26
157,028,215
0
1
null
null
null
null
UTF-8
Java
false
false
432
java
package com.accenture.spm.state; public class StateBlockedYield { public static void main(String[] args) { MyYield my = new MyYield(); new Thread(my,"a").start(); new Thread(my,"b").start(); } } class MyYield implements Runnable{ @Override public void run() { System.out.println(Thread.currentThread().getName()+"-->start"); Thread.yield(); System.out.println(Thread.currentThread().getName()+"-->end"); } }
[ "specter01wj@gmail.com" ]
specter01wj@gmail.com
04690421cc3f0cc32a44bc507797ab3fa6de499a
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava0/Foo914.java
dfc35a7a79e655d755cd9881ea1c0e104f1849e3
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package applicationModulepackageJava0; public class Foo914 { public void foo0() { new applicationModulepackageJava0.Foo913().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
363e49572a3b2903fe2033d1a066cfefe07717aa
3597758f9cf7ed36e43f0efcf075530873e34ef5
/src/main/java/com/airbnb/clone/security/JwtAuthenticationFilter.java
c176e8c7097ceec97113867a942430cecaf1350b
[]
no_license
nhlong9697/project-codegym-back-end
227bb4cd3ea0f1725ed974df21d7c454ac6bca44
9397748f27e278162cba4fd0f53f626f235f7dd7
refs/heads/master
2022-12-13T15:36:18.395489
2020-09-11T03:00:43
2020-09-11T03:00:43
290,137,102
0
1
null
2020-09-07T10:18:01
2020-08-25T06:49:48
Java
UTF-8
Java
false
false
2,441
java
package com.airbnb.clone.security; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; import org.springframework.web.filter.OncePerRequestFilter; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @Component public class JwtAuthenticationFilter extends OncePerRequestFilter { @Autowired private JwtProvider jwtProvider; @Qualifier("appUserService") @Autowired private UserDetailsService userDetailsService; @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { String jwt = getJwtFromRequest(request); if (StringUtils.hasText(jwt) && jwtProvider.validateToken(jwt)) { String username = jwtProvider.getUsernameFromJwt(jwt); UserDetails userDetails = userDetailsService.loadUserByUsername(username); UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request)); SecurityContextHolder.getContext().setAuthentication(authentication); } filterChain.doFilter(request, response); } private String getJwtFromRequest(HttpServletRequest request) { String bearerToken = request.getHeader("Authorization"); if (StringUtils.hasText(bearerToken) && bearerToken.startsWith("Bearer ")) { return bearerToken.substring(7); } return bearerToken; } }
[ "n.h.long.9697@gmail.com" ]
n.h.long.9697@gmail.com
b62991e40229f99cab382f18d7c1085e13004cdc
1de0bd7e9bf278009bcccb892864b893883ed0cb
/.history/48.rotate-image_20190307170141.java
04da69e48f527a236700ec866a5b8e9da46c33f3
[]
no_license
zhejianusc/leetcode_vs_code
b90a6539ff3d610302df06284d9ef2c4b27c6cca
485565448adc98f90cc1135c7cd12cfdd3fde31c
refs/heads/master
2020-04-24T00:44:20.160179
2020-03-24T04:40:32
2020-03-24T04:40:32
171,574,685
0
0
null
null
null
null
UTF-8
Java
false
false
1,422
java
/* * @lc app=leetcode id=48 lang=java * * [48] Rotate Image * * https://leetcode.com/problems/rotate-image/description/ * * algorithms * Medium (46.49%) * Total Accepted: 227.6K * Total Submissions: 485.1K * Testcase Example: '[[1,2,3],[4,5,6],[7,8,9]]' * * You are given an n x n 2D matrix representing an image. * * Rotate the image by 90 degrees (clockwise). * * Note: * * You have to rotate the image in-place, which means you have to modify the * input 2D matrix directly. DO NOT allocate another 2D matrix and do the * rotation. * * Example 1: * * * Given input matrix = * [ * ⁠ [1,2,3], * ⁠ [4,5,6], * ⁠ [7,8,9] * ], * * rotate the input matrix in-place such that it becomes: * [ * ⁠ [7,4,1], * ⁠ [8,5,2], * ⁠ [9,6,3] * ] * * * Example 2: * * * Given input matrix = * [ * ⁠ [ 5, 1, 9,11], * ⁠ [ 2, 4, 8,10], * ⁠ [13, 3, 6, 7], * ⁠ [15,14,12,16] * ], * * rotate the input matrix in-place such that it becomes: * [ * ⁠ [15,13, 2, 5], * ⁠ [14, 3, 4, 1], * ⁠ [12, 6, 8, 9], * ⁠ [16, 7,10,11] * ] * 5 2 13 15 * 1 4 3 14 * 9 8 6 12 * 11 10 7 16 * */ class Solution { public void rotate(int[][] matrix) { if(matrix == null || matrix.length <= 1) return; int n = matrix.length; for(int i = 0; i < n; i++) { for(int j = i; j < n; j++) { } } } }
[ "jianzher@sina.com" ]
jianzher@sina.com
e4b36a31b6f6d944bb690136854992dea4124eab
3a92132d74b183a9b77ca9c78bdf6e80c68a99e8
/WebApps/ServerII/src/com/dimdim/conference/tag/SignInFormsInfoTag.java
b5161971c1a570fbc26f7b85e8a083744cd55c2e
[]
no_license
holdensmagicalunicorn/DimSim
d2ee09dd586b03e365bd673fd474d2934277ee90
4fbc916bd6e79fc91fc32614a7d83ffc6e41b421
refs/heads/master
2021-01-17T08:38:23.350840
2011-08-28T21:52:17
2011-08-28T21:52:17
2,285,304
0
0
null
null
null
null
UTF-8
Java
false
false
4,303
java
/* ************************************************************************** * * * DDDDD iii DDDDD iii * * DD DD mm mm mmmm DD DD mm mm mmmm * * DD DD iii mmm mm mm DD DD iii mmm mm mm * * DD DD iii mmm mm mm DD DD iii mmm mm mm * * DDDDDD iii mmm mm mm DDDDDD iii mmm mm mm * * * ************************************************************************** ************************************************************************** * * * Part of the DimDim V 1.0 Codebase (http://www.dimdim.com) * * * * Copyright (c) 2006 Communiva Inc. All Rights Reserved. * * * * * * This code is licensed under the DimDim License * * For details please visit http://www.dimdim.com/license * * * ************************************************************************** */ package com.dimdim.conference.tag; //import java.text.DateFormat; //import java.util.Locale; import javax.servlet.jsp.tagext.TagSupport; //import javax.servlet.http.HttpServletRequest; //import javax.servlet.ServletContext; import com.dimdim.conference.ConferenceConsoleConstants; //import com.dimdim.conference.application.UserSession; //import com.dimdim.conference.application.UserManager; //import com.dimdim.conference.model.IConference; //import com.dimdim.conference.model.IConferenceParticipant; //import com.dimdim.conference.model.ConferenceInfo; /** * @author Jayant Pandit * @email Jayant.Pandit@communiva.com * * This tag adds the information about the current user to the page, so * that the console code knows its own id. This tag adds following lines to * the page. * ---------------------- * <script langauage='javascript'> * window.userid = '<user id>' * window.userroll = 'PRESENTER/ACTIVE_PRESENTER/ATTENDEE' * </script> * ---------------------- */ public class SignInFormsInfoTag extends TagSupport { public int doEndTag() { try { StringBuffer buf = new StringBuffer(); // HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); // String browserType = (String)pageContext.getSession(). // getAttribute(ConferenceConsoleConstants.BROWSER_TYPE); buf.append("<script language='javascript'>"); buf.append(ConferenceConsoleConstants.lineSeparator); // buf.append(" window.presenter_download_bandwidth_required='"+ // ConferenceConsoleConstants.getPresenterDownloadBandwidthRequired()+"';"); // buf.append(ConferenceConsoleConstants.lineSeparator); // buf.append(" window.attendee_download_bandwidth_required='"+ // ConferenceConsoleConstants.getAttendeeDownloadBandwidthRequired()+"';"); // buf.append(ConferenceConsoleConstants.lineSeparator); // buf.append(" window.presenter_upload_bandwidth_required='"+ // ConferenceConsoleConstants.getPresenterUploadBandwidthRequired()+"';"); // buf.append(ConferenceConsoleConstants.lineSeparator); // buf.append(" window.attendee_upload_bandwidth_required='"+ // ConferenceConsoleConstants.getAttendeeUploadBandwidthRequired()+"';"); // buf.append(ConferenceConsoleConstants.lineSeparator); buf.append(" window.server_max_attendee_audios='"+ConferenceConsoleConstants.getMaxAttendeeAudios()+"';"); buf.append(ConferenceConsoleConstants.lineSeparator); buf.append(" window.trackback_url='"+ConferenceConsoleConstants.getTrackbackURL()+"';"); buf.append(ConferenceConsoleConstants.lineSeparator); buf.append("</script>"); buf.append(ConferenceConsoleConstants.lineSeparator); pageContext.getOut().println(buf.toString()); } catch(Exception e) { } return EVAL_PAGE; } }
[ "mattwilmott@gmail.com" ]
mattwilmott@gmail.com