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
7a3c7a30f01303211391dcd0846cb646d4eebc47
1b4227ada45f64736f39d947592530b4c8944fb3
/org.sqlproc.meta/src/org/sqlproc/meta/util/Utils.java
3e89ca6175577a38054363febd78a7117303e2d8
[]
no_license
peffenberger/sql-processor-eclipse
bb13c39d07fa0fe3708225aaf73335667584b1ba
5061d667963d67cd52cae8f9644fa0ac08ebd607
refs/heads/master
2021-01-18T14:31:14.917362
2015-08-25T07:52:05
2015-08-25T07:52:05
41,757,370
0
0
null
2015-09-01T18:58:46
2015-09-01T18:58:46
null
UTF-8
Java
false
false
7,154
java
package org.sqlproc.meta.util; import java.util.ArrayList; import java.util.List; import org.sqlproc.meta.processorMeta.Column; import org.sqlproc.meta.processorMeta.ExtendedColumn; import org.sqlproc.meta.processorMeta.ExtendedMappingItem; import org.sqlproc.meta.processorMeta.MappingColumn; import org.sqlproc.meta.processorMeta.MappingRule; import org.sqlproc.meta.processorMeta.MetaStatement; import org.sqlproc.meta.processorMeta.PojoType; import org.sqlproc.meta.processorMeta.ValueType; import org.sqlproc.plugin.lib.util.CommonUtils; public class Utils extends CommonUtils { public static String getTokenFromModifier(MetaStatement statement, String tokenName) { if (statement.getModifiers() == null || statement.getModifiers().isEmpty()) { return null; } for (String filter : statement.getModifiers()) { int ix = filter.indexOf('='); if (ix <= 0) continue; String key = filter.substring(0, ix); String val = filter.substring(ix + 1); if (key.equals(tokenName)) { return val; } } return null; } public static String getTokenFromModifier(MappingRule rule, String tokenName) { if (rule.getModifiers() == null || rule.getModifiers().isEmpty()) { return null; } for (String filter : rule.getModifiers()) { int ix = filter.indexOf('='); if (ix <= 0) continue; String key = filter.substring(0, ix); String val = filter.substring(ix + 1); if (key.equals(tokenName)) { return val; } } return null; } public static String getTokenFromModifier(MetaStatement statement, String tokenName, String tokenSuffix) { if (statement.getModifiers() == null || statement.getModifiers().isEmpty()) { return null; } for (String filter : statement.getModifiers()) { int ix = filter.indexOf('='); if (ix <= 0) continue; String key = filter.substring(0, ix); String val = filter.substring(ix + 1); if (tokenSuffix != null) { int ix2 = val.indexOf('='); if (ix2 <= 0) continue; if (!tokenSuffix.equals(val.substring(ix2 + 1))) continue; val = val.substring(0, ix2); } if (key.equals(tokenName)) { return val; } } return null; } public static List<String> getTokensFromModifier(MetaStatement statement, String tokenName) { List<String> result = new ArrayList<String>(); if (statement.getModifiers() == null || statement.getModifiers().isEmpty()) { return result; } for (String filter : statement.getModifiers()) { int ix = filter.indexOf('='); if (ix <= 0) continue; String key = filter.substring(0, ix); String val = filter.substring(ix + 1); int ix2 = val.indexOf('='); // String val2 = (ix2 > 0) ? val.substring(ix2 + 1) : null; val = (ix2 > 0) ? val.substring(0, ix2) : val; if (key.equals(tokenName)) { result.add(val); } } return result; } public static String constName(String name) { String result = ""; int last = 0; for (int i = 0, l = name.length(); i < l; i++) { if (Character.isUpperCase(name.charAt(i))) { result = result + name.substring(last, i).toUpperCase() + "_"; last = i; } } if (last < name.length()) result = result + name.substring(last).toUpperCase(); return result; } public static boolean isFinal(MetaStatement m) { String finalToken = getTokenFromModifier(m, "final"); if (finalToken != null) return true; return false; } public static String getName(Column column) { StringBuilder sb = new StringBuilder(); boolean first = true; for (ExtendedColumn ei : column.getColumns()) { if (first) first = false; else sb.append("."); sb.append(ei.getCol().getName()); } return sb.toString(); } public static String getName(MappingColumn column) { StringBuilder sb = new StringBuilder(); boolean first = true; for (ExtendedMappingItem ei : column.getItems()) { if (first) first = false; else sb.append("."); sb.append(ei.getAttr().getName()); } return sb.toString(); } public static boolean isNumber(String s) { if (s == null) return false; s = s.trim(); for (int i = 0, l = s.length(); i < l; i++) { char c = s.charAt(i); if (!Character.isDigit(c)) return false; } return true; } public static String _toFirstUpper(String name) { int l = name.length(); if (l == 0) return name; if (l == 1) return name.toUpperCase(); char c = name.charAt(1); if (Character.isUpperCase(c)) return name; return name.substring(0, 1).toUpperCase() + name.substring(1); } public static String getPropertyValue(ValueType pv) { String s = _getPropertyValue(pv); if (s == null) return null; if (s.startsWith("$$")) { String ss = System.getenv(s.substring(2)); if (ss != null) s = ss; } return s; } public static String _getPropertyValue(ValueType pv) { if (pv == null) return null; String s = pv.getValue(); if (s != null) { s = s.trim(); if (s.startsWith("\"")) s = s.substring(1); if (s.endsWith("\"")) s = s.substring(0, s.length() - 1); return s; } else if (pv.getId() != null) return pv.getId(); else return "" + pv.getNumber(); } public static String getPropertyValueRegex(ValueType pv) { String s = getPropertyValue(pv); if (s == null) return null; String s2 = s.replaceAll("\\\\\\\\", "\\\\"); return s2; } public static String getPropertyValue(PojoType pv) { if (pv == null) return null; if (pv.getType() != null) return pv.getType().getQualifiedName(); if (pv.getIdent() != null) return getPropertyValue(pv.getIdent()); if (pv.getRef() != null) { if (pv.getRef().getClassx() != null) return pv.getRef().getClassx().getQualifiedName(); return pv.getRef().getClass_(); } return null; } }
[ "Vladimir.Hudec@gmail.com" ]
Vladimir.Hudec@gmail.com
de7c700456aacd62794150439cd5ac40a7202e75
1b25373e7fdd7871cdeea182c454f117c76fbdd8
/src/main/java/com/github/davidmoten/rx2/Consumers.java
63ccb22571d51ede7962889de1a845c0ea666671
[ "Apache-2.0" ]
permissive
janbols/rxjava2-extras
d6f3f88947f46a40afbd77531e91428195a51508
b3b44589bcecb8b535170cf87f3ac3cf4dd7265d
refs/heads/master
2021-01-11T10:08:06.285756
2017-01-13T13:06:45
2017-01-13T13:06:45
78,618,048
0
0
null
2017-01-11T08:22:22
2017-01-11T08:22:22
null
UTF-8
Java
false
false
4,568
java
package com.github.davidmoten.rx2; import java.io.Closeable; import java.util.Arrays; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import com.github.davidmoten.rx2.exceptions.AssertionException; import io.reactivex.functions.Consumer; import io.reactivex.functions.LongConsumer; public final class Consumers { private Consumers() { // prevent instantiation } public static LongConsumer addLongTo(final List<Long> list) { return new LongConsumer() { @Override public void accept(long t) throws Exception { list.add(t); } }; } @SuppressWarnings("unchecked") public static <T extends Closeable> Consumer<T> close() { return (Consumer<T>) CloseHolder.INSTANCE; } private static enum CloseHolder { ; final static Consumer<Closeable> INSTANCE = new Consumer<Closeable>() { @Override public void accept(Closeable t) throws Exception { t.close(); } }; } public static Consumer<Object> increment(final AtomicInteger value) { return new Consumer<Object>() { @Override public void accept(Object t) throws Exception { value.incrementAndGet(); } }; } public static Consumer<Throwable> printStackTrace() { // TODO make holder return new Consumer<Throwable>() { @Override public void accept(Throwable e) throws Exception { e.printStackTrace(); } }; } @SuppressWarnings("unchecked") public static <T> Consumer<T> doNothing() { return (Consumer<T>) DoNothingHolder.INSTANCE; } private static enum DoNothingHolder { ; static final Consumer<Object> INSTANCE = new Consumer<Object>() { @Override public void accept(Object t) throws Exception { // do nothing } }; } public static <T> Consumer<T> set(final AtomicReference<T> value) { return new Consumer<T>() { @Override public void accept(T t) throws Exception { value.set(t); } }; } public static Consumer<Integer> set(final AtomicInteger value) { return new Consumer<Integer>() { @Override public void accept(Integer t) throws Exception { value.set(t); } }; } public static Consumer<Object> decrement(final AtomicInteger value) { return new Consumer<Object>() { @Override public void accept(Object t) throws Exception { value.decrementAndGet(); } }; } public static Consumer<Object> setToTrue(final AtomicBoolean value) { return new Consumer<Object>() { @Override public void accept(Object t) throws Exception { value.set(true); } }; } public static <T> Consumer<T> addTo(final List<T> list) { return new Consumer<T>() { @Override public void accept(T t) throws Exception { list.add(t); } }; } @SuppressWarnings("unchecked") public static <T> Consumer<T> println() { return (Consumer<T>) PrintlnHolder.INSTANCE; } private static enum PrintlnHolder { ; static final Consumer<Object> INSTANCE = new Consumer<Object>() { @Override public void accept(Object t) throws Exception { System.out.println(t); } }; } public static Consumer<byte[]> assertBytesEquals(final byte[] expected) { // TODO make holder return new Consumer<byte[]>() { @Override public void accept(byte[] array) throws Exception { if (!Arrays.equals(expected, array)) { // TODO use custom exception throw new AssertionException("arrays not equal: expected=" + Arrays.toString(expected) + ",actual=" + Arrays.toString(array)); } } }; } }
[ "davidmoten@gmail.com" ]
davidmoten@gmail.com
a944f2dbc210e416b68c4ec72f5da46ad7722cf8
a8a7cc6bae2a202941e504aea4356e2a959e5e95
/jenkow-activiti/modules/activiti-engine/src/main/java/org/activiti/engine/impl/cmd/CreateAttachmentCmd.java
590a42327355af368c03f859b5e4d1ca0de66f5e
[ "Apache-2.0" ]
permissive
jenkinsci/jenkow-plugin
aed5d5db786ad260c16cebecf5c6bbbcbf498be5
228748890476b2f17f80b618c8d474a4acf2af8b
refs/heads/master
2023-08-19T23:43:15.544100
2013-05-14T00:49:56
2013-05-14T00:49:56
4,395,961
2
4
null
2022-12-20T22:37:41
2012-05-21T16:58:26
Java
UTF-8
Java
false
false
3,124
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 org.activiti.engine.impl.cmd; import java.io.InputStream; import org.activiti.engine.impl.db.DbSqlSession; import org.activiti.engine.impl.interceptor.CommandContext; import org.activiti.engine.impl.persistence.entity.AttachmentEntity; import org.activiti.engine.impl.persistence.entity.ByteArrayEntity; import org.activiti.engine.impl.persistence.entity.CommentEntity; import org.activiti.engine.impl.persistence.entity.CommentManager; import org.activiti.engine.impl.util.ClockUtil; import org.activiti.engine.impl.persistence.entity.CommentEntity; import org.activiti.engine.impl.persistence.entity.CommentManager; import org.activiti.engine.impl.persistence.entity.TaskEntity; import org.activiti.engine.impl.util.ClockUtil; import org.activiti.engine.impl.util.IoUtil; import org.activiti.engine.task.Attachment; /** * @author Tom Baeyens */ // Not Serializable public class CreateAttachmentCmd extends NeedsActiveTaskCmd<Attachment> { protected String attachmentType; protected String processInstanceId; protected String attachmentName; protected String attachmentDescription; protected InputStream content; protected String url; public CreateAttachmentCmd(String attachmentType, String taskId, String processInstanceId, String attachmentName, String attachmentDescription, InputStream content, String url) { super(taskId); this.attachmentType = attachmentType; this.taskId = taskId; this.processInstanceId = processInstanceId; this.attachmentName = attachmentName; this.attachmentDescription = attachmentDescription; this.content = content; this.url = url; } @Override protected Attachment execute(CommandContext commandContext, TaskEntity task) { AttachmentEntity attachment = new AttachmentEntity(); attachment.setName(attachmentName); attachment.setDescription(attachmentDescription); attachment.setType(attachmentType); attachment.setTaskId(taskId); attachment.setProcessInstanceId(processInstanceId); attachment.setUrl(url); DbSqlSession dbSqlSession = commandContext.getDbSqlSession(); dbSqlSession.insert(attachment); if (content!=null) { byte[] bytes = IoUtil.readInputStream(content, attachmentName); ByteArrayEntity byteArray = new ByteArrayEntity(bytes); dbSqlSession.insert(byteArray); attachment.setContentId(byteArray.getId()); } commandContext.getHistoryManager() .createAttachmentComment(taskId, processInstanceId, attachmentName, true); return attachment; } }
[ "m2spring@springdot.org" ]
m2spring@springdot.org
f0a756be8752601852ce86e11e0baeb15dca0e61
f5f143087f35fa67fa4c54cad106a32e1fb45c0e
/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java
a0c1bd4441f3a370ebfe0cc0f5d2c180f991deab
[]
no_license
SiverDX/SWFCopyValues
03b665b8f4ae3a2a22f360ea722813eeb52b4ef0
d146d8dcf6d1f7a69aa0471f85b852e64cad02f7
refs/heads/master
2022-07-29T06:56:55.446686
2021-12-04T09:48:48
2021-12-04T09:48:48
324,795,135
0
1
null
null
null
null
UTF-8
Java
false
false
3,635
java
/* * Copyright (C) 2010-2018 JPEXS, All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.FullMultinameAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.GetPropertyAVM2Item; import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.ecma.ArrayType; import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.decompiler.flash.ecma.ObjectType; import com.jpexs.decompiler.flash.ecma.Undefined; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.List; /** * * @author JPEXS */ public class GetPropertyIns extends InstructionDefinition { public GetPropertyIns() { super(0x66, "getproperty", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, true); } @Override public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException { if (constants.getMultiname(ins.operands[0]).kind == Multiname.MULTINAMEL) { String name = EcmaScript.toString(lda.operandStack.pop()); Object obj = lda.operandStack.pop(); if (obj == ArrayType.EMPTY_ARRAY) { if ("length".equals(name)) { lda.operandStack.push(0L); } else { lda.operandStack.push(Undefined.INSTANCE); } return true; } if (obj == ObjectType.EMPTY_OBJECT) { lda.operandStack.push(Undefined.INSTANCE); return true; } return true; } return false; } @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) { int multinameIndex = ins.operands[0]; FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); stack.push(new GetPropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname)); } @Override public int getStackPopCount(AVM2Instruction ins, ABC abc) { int multinameIndex = ins.operands[0]; return 1 + getMultinameRequiredStackSize(abc.constants, multinameIndex); } @Override public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; } }
[ "kai.zahn@yahoo.de" ]
kai.zahn@yahoo.de
98caededf1fc766dbc263964be6557f405fed5d7
03d61086047f041168f9a77b02a63a9af83f0f3f
/newrelic/src/main/java/com/newrelic/agent/config/KeyTransactionConfigImpl.java
f4258b43922c20eee87ef8b8be7b05af1641a17a
[]
no_license
masonmei/mx2
fa53a0b237c9e2b5a7c151999732270b4f9c4f78
5a4adc268ac1e52af1adf07db7a761fac4c83fbf
refs/heads/master
2021-01-25T10:16:14.807472
2015-07-30T21:49:33
2015-07-30T21:49:35
39,944,476
1
0
null
null
null
null
UTF-8
Java
false
false
1,725
java
// // Decompiled by Procyon v0.5.29 // package com.newrelic.agent.config; import java.util.Iterator; import java.util.Collections; import java.util.HashMap; import java.util.Map; final class KeyTransactionConfigImpl implements KeyTransactionConfig { private final Map<String, Long> apdexTs; private final long apdexTInMillis; private KeyTransactionConfigImpl(final Map<String, Object> props, final long apdexTInMillis) { this.apdexTInMillis = apdexTInMillis; final Map<String, Long> apdexTs = new HashMap<String, Long>(); for (final Map.Entry<String, Object> entry : props.entrySet()) { final Object apdexT = entry.getValue(); if (apdexT instanceof Number) { final Long apdexTinMillis = (long)(((Number)apdexT).doubleValue() * 1000.0); final String txName = entry.getKey(); apdexTs.put(txName, apdexTinMillis); } } this.apdexTs = Collections.unmodifiableMap((Map<? extends String, ? extends Long>)apdexTs); } public boolean isApdexTSet(final String transactionName) { return this.apdexTs.containsKey(transactionName); } public long getApdexTInMillis(final String transactionName) { final Long apdexT = this.apdexTs.get(transactionName); if (apdexT == null) { return this.apdexTInMillis; } return apdexT; } static KeyTransactionConfig createKeyTransactionConfig(Map<String, Object> settings, final long apdexTInMillis) { if (settings == null) { settings = Collections.emptyMap(); } return new KeyTransactionConfigImpl(settings, apdexTInMillis); } }
[ "dongxu.m@gmail.com" ]
dongxu.m@gmail.com
301882667f2a7244c9706f175156be0db3bc5044
b5a62331f8c5b605151ebd900a8321440f0617f4
/Sources/concept/components/admin/edit/SWEditEntityMeta.java
d674befee55e6c6ee83baed53f7b13c4cd8328ea
[]
no_license
jfveillette/soloweb
12dbc953c1254193608e4b9a6be2cd516b391bdf
fbb05e6a204e2e61c72f3275c745aea32700826a
refs/heads/master
2016-09-10T06:48:50.028201
2014-04-16T08:53:09
2014-04-16T08:53:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,054
java
package concept.components.admin.edit; import is.rebbi.wo.util.IMTab; import is.rebbi.wo.util.USEOUtilities; import com.webobjects.appserver.WOActionResults; import com.webobjects.appserver.WOContext; import com.webobjects.eoaccess.EOModelGroup; import com.webobjects.foundation.NSArray; import com.webobjects.foundation.NSMutableArray; import concept.ViewPage; import concept.data.SWAttributeMeta; import concept.data.SWEntityMeta; public class SWEditEntityMeta extends ViewPage<SWEntityMeta> { public SWAttributeMeta currentColumn; public String currentAttributeName; public SWEditEntityMeta( WOContext context ) { super( context ); } public WOActionResults createAttributeMeta() { SWAttributeMeta a = selectedObject().createColumnsRelationship(); a.setName( currentAttributeName ); return null; } public WOActionResults deleteAttributeMeta() { ec().deleteObject( currentColumn ); saveChangesToObjectStore(); return null; } public NSArray<String> unmappedAttributeNames() { if( selectedObject().name() == null ) { return NSArray.emptyArray(); } NSMutableArray<String> attributeNames = new NSMutableArray<>(); attributeNames.addObjectsFromArray( (NSArray<? extends String>)USEOUtilities.relationships( EOModelGroup.defaultGroup().entityNamed( selectedObject().name() ) ).valueForKeyPath( "name" ) ); attributeNames.addObjectsFromArray( (NSArray<? extends String>)USEOUtilities.attributes( EOModelGroup.defaultGroup().entityNamed( selectedObject().name() ) ).valueForKeyPath( "name" ) ); attributeNames.removeObjectsInArray( mappedAttributeNames() ); return attributeNames; } public NSArray<String> mappedAttributeNames() { return (NSArray<String>)selectedObject().columns().valueForKeyPath( "name" ); } @Override public NSArray<IMTab> additionalTabs() { NSMutableArray<IMTab> tabs = new NSMutableArray<IMTab>(); tabs.addObject( new IMTab( "Almennt" ) ); tabs.addObject( new IMTab( "Skilgreindir reitir" ) ); tabs.addObject( new IMTab( "Óskilgreindir reitir" ) ); return tabs; } }
[ "hugi@karlmenn.is" ]
hugi@karlmenn.is
5c7db2782bc637de75e5b5970c4bd843c443571d
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app98/source/com/actionbarsherlock/internal/view/View_HasStateListenerSupport.java
1362ceb3301903edbe3215c483f3910436fdb0af
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
365
java
package com.actionbarsherlock.internal.view; public abstract interface View_HasStateListenerSupport { public abstract void addOnAttachStateChangeListener(View_OnAttachStateChangeListener paramView_OnAttachStateChangeListener); public abstract void removeOnAttachStateChangeListener(View_OnAttachStateChangeListener paramView_OnAttachStateChangeListener); }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
f665cc72df6245a64bcb0056fda598945fe81810
b2a50f92f359a63a4adf9c42e7d9734b1f87c50e
/src/main/java/com/epmresources/server/domain/Materials.java
8dc1e7f8fa1c6848f7bc2153ce8c1b8a36067854
[]
no_license
thetlwinoo/epm-resources
a9dbc08bacd45a0e57c31c14aff3a3e5c6a82597
88f2918de8c07cd1c3a2f701c4adfa97305b974d
refs/heads/master
2022-12-26T15:46:06.041561
2019-12-20T07:35:25
2019-12-20T07:35:25
220,428,422
0
0
null
2022-12-16T04:40:56
2019-11-08T09:06:17
Java
UTF-8
Java
false
false
1,750
java
package com.epmresources.server.domain; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import javax.persistence.*; import javax.validation.constraints.*; import java.io.Serializable; /** * A Materials. */ @Entity @Table(name = "materials") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public class Materials implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") @SequenceGenerator(name = "sequenceGenerator") private Long id; @NotNull @Column(name = "name", nullable = false) private String name; // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public Materials name(String name) { this.name = name; return this; } public void setName(String name) { this.name = name; } // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Materials)) { return false; } return id != null && id.equals(((Materials) o).id); } @Override public int hashCode() { return 31; } @Override public String toString() { return "Materials{" + "id=" + getId() + ", name='" + getName() + "'" + "}"; } }
[ "thetlwinoo85@yahoo.com" ]
thetlwinoo85@yahoo.com
4766159d2d871691ffa53143be310e301e2ee4d2
3ed76f1b1966eb8c037c4949ea4a4f698d534aca
/src/main/java/com/sciome/charts/model/SciomeData.java
243fdad74dccc3ab9073210009018c8da2f485b6
[ "MIT" ]
permissive
auerbachs/BMDExpress-2
580ec4fa9761d5f651de33b9cf491acc05413c5d
df1e1b719f22af75dfd553050e021b524b8455eb
refs/heads/master
2023-08-31T02:58:56.048916
2023-08-16T13:13:45
2023-08-16T13:13:45
93,664,187
15
3
null
2022-11-16T00:52:53
2017-06-07T17:58:27
Java
UTF-8
Java
false
false
941
java
package com.sciome.charts.model; /* * This is a generic data representation. it is ment to store the name of a datpoint, * the x value, y value and an extra value which can be any object. * The type and use of the extravalue will be handled by the implementing chart class. * * it is ultimately used to relate data to the chart nodes. This will ultimately allow * communication channels to be built and allow charts to be more interactive with the user * and other ui charts/components */ public class SciomeData<X, Y> { private String name; private Object extraValue; private X xValue; private Y yValue; public SciomeData(String n, X x, Y y, Object o) { name = n; xValue = x; yValue = y; extraValue = o; } public String getName() { return name; } public Object getExtraValue() { return extraValue; } public X getXValue() { return xValue; } public Y getYValue() { return yValue; } }
[ "jason.phillips@sciome.com" ]
jason.phillips@sciome.com
7c35ec1b5c3d65d1546008afc78f23d1d3ccac1f
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/ecf/2394.java
3dea9c1d56d234846d84ec7e369fa8543e53e63e
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,108
java
/******************************************************************************* Copyright (c) 2010 Composent, Inc. and others. All rights reserved. This * program and the accompanying materials are made available under the terms of * the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Composent, Inc. - initial API and implementation ******************************************************************************/ package org.eclipse.ecf.examples.internal.loadbalancing.ds.consumer; import org.eclipse.ecf.examples.loadbalancing.IDataProcessor; import org.eclipse.ecf.examples.loadbalancing.IDataProcessorAsync; import org.eclipse.ecf.remoteservice.IAsyncCallback; public class DataProcessorClientComponent { public void bind(IDataProcessor dataProcessor) { System.out.println("Got data processor on client"); final String data = "Here's some data from a client"; // Use it System.out.println("Invoking data processor"); String result = dataProcessor.processData(data); System.out.println("Sync result=" + result); System.out.println(); // See if we've got an async interface and if so, use it if (dataProcessor instanceof IDataProcessorAsync) { IDataProcessorAsync dpAsync = (IDataProcessorAsync) dataProcessor; System.out.println("Got async data processor on client"); IAsyncCallback<String> callback = new IAsyncCallback<String>() { public void onSuccess(String result) { System.out.println("Async result=" + result); } public void onFailure(Throwable exception) { System.out.println("Async invoke failed with exception"); if (exception != null) exception.printStackTrace(); } }; // Now invoke async dpAsync.processDataAsync(data, callback); } } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
79b6bc3bf1f3696b438159c2459c5f9c3cfaf066
2209bb2f7c8edf7f75d539b3cb68f27cf5de02a2
/datastore/src/test/java/org/jboss/test/capedwarf/datastore/test/ModuleCallbackTest.java
ea81ef2f51d4f48b1c091e549bd0bd761198e7b8
[]
no_license
matejonnet/capedwarf-blue
0bfdb8229da74506deaa476373c70e8c62039d9e
a0a3f4798a4aaf545cc92bdfb95cbc8212e5e5de
refs/heads/master
2021-01-17T05:46:12.974806
2013-04-11T09:58:39
2013-04-11T09:59:05
3,515,916
0
0
null
null
null
null
UTF-8
Java
false
false
2,714
java
/* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.test.capedwarf.datastore.test; import com.google.appengine.api.datastore.DatastoreService; import com.google.appengine.api.datastore.DatastoreServiceFactory; import com.google.appengine.api.datastore.Entity; import com.google.appengine.api.datastore.Key; import junit.framework.Assert; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.jboss.test.capedwarf.common.support.JBoss; import org.jboss.test.capedwarf.common.test.TestBase; import org.jboss.test.capedwarf.common.test.TestContext; import org.jboss.test.capedwarf.datastore.support.SimpleCallback; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; /** * @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a> */ @RunWith(Arquillian.class) @Category(JBoss.class) public class ModuleCallbackTest extends TestBase { @Deployment public static WebArchive getDeployment() { TestContext context = TestContext.asDefault().setIgnoreLogging(true).setCallbacks(true); WebArchive war = getCapedwarfDeployment(context); war.addClass(SimpleCallback.class); return war; } @Test public void testPreGetSwitch() throws Exception { DatastoreService service = DatastoreServiceFactory.getDatastoreService(); Entity e1 = new Entity("SC"); e1.setProperty("x", "original"); Key key = service.put(e1); Entity e2 = service.get(key); Assert.assertEquals(SimpleCallback.ENTITY.getProperty("x"), e2.getProperty("x")); service.delete(key); } }
[ "ales.justin@gmail.com" ]
ales.justin@gmail.com
5cfd403eb79a6a7179ec2d8e4a1abf9506c34887
10aa413e76b2c628731e66adfb77e2fe7aacfde4
/app/src/main/java/com/cxp/androidut/mvp/base/BasePresenter.java
23cbe7ac05671a9bc61f15096f0d671592692076
[]
no_license
cheng-peng/AndroidUT
fc47c5861a2c2bb0c097759b5e526e51619f505f
1de71746cba996cf25911763fda73a8a329dda0a
refs/heads/master
2020-04-27T20:54:44.927403
2019-03-12T07:59:39
2019-03-12T07:59:39
174,675,551
0
0
null
null
null
null
UTF-8
Java
false
false
1,328
java
package com.cxp.androidut.mvp.base; import java.lang.ref.Reference; import java.lang.ref.WeakReference; /** * 文 件 名: BasePresenter * 创 建 人: CXP * 创建日期: 2019-03-12 8:33 * 描 述: * 修 改 人: * 修改时间: * 修改备注: */ public abstract class BasePresenter<T extends MvpView> { /** * View接口类型的弱引用 */ private Reference<T> mViewRef; protected T mMvpView; /** * 建立关联 */ public void attachView(T view){ mViewRef = new WeakReference<>(view); if(isViewAttached()) { mMvpView = getView(); } } /** * 获取View * @return View */ public T getView(){ return mViewRef.get(); } /** * UI展示相关的操作需要判断一下 Activity 是否已经 finish. * <p> * todo : 只有当 isActivityAlive 返回true时才可以执行与Activity相关的操作, * 比如 弹出Dialog、Window、跳转Activity等操作. * * @return boolean */ public boolean isViewAttached(){ return mViewRef != null && mViewRef.get() != null; } /** * 解除关联 */ public void detachView(){ if( mViewRef != null){ mViewRef.clear(); mViewRef = null; } } }
[ "q978515742@163.com" ]
q978515742@163.com
b80f39eee48492893d00f3213b9fb9498fa059a1
711d679ea75f0c80cb81b22b110734094fcac235
/feizhai/src/main/java/net/swiftos/feizhai/model/entity/ArticleType.java
785b5d4510a538742e0ff73c84f3fc81536f3f85
[ "Apache-2.0" ]
permissive
ganyao114/SwiftAndroid
c349b3fd2f52bb5b8fb84d32f315fec1cc99d2dc
fa73e76e293366f5fc9477473a93907f06ec9f21
refs/heads/master
2021-01-19T12:03:53.068213
2017-08-23T08:25:01
2017-08-23T08:25:01
82,280,410
1
0
null
2017-03-21T13:55:25
2017-02-17T09:28:38
Java
UTF-8
Java
false
false
152
java
package net.swiftos.feizhai.model.entity; /** * Created by ganyao on 2017/5/15. */ public enum ArticleType { Default, Markdown, Html }
[ "939543405@qq.com" ]
939543405@qq.com
f5d29b07325e5bf91597dd423a2607c311ef546e
833af4b04505f03553eedd0796898fe3825f2852
/NhryService/src/main/java/com/nhry/data/stock/domain/TSsmVoucherItem.java
6787ff80746622064dcfda952c21ba6cc3d97464
[]
no_license
gongnol/nhry-platform
a9613a34d91db950cd958ae7d3ba923ecf22dc71
204bdbc94bc187e0aecd87dcd5fba0e5e04130c3
refs/heads/master
2021-01-21T16:15:29.538474
2017-08-05T07:19:47
2017-08-05T07:19:47
95,402,706
1
2
null
null
null
null
UTF-8
Java
false
false
2,946
java
package com.nhry.data.stock.domain; import java.math.BigDecimal; public class TSsmVoucherItem extends TSsmVoucherItemKey { private String revertVoucherItemNo; private String branchNo; private String matnr; private String werks; private String lgort; private String unit; private BigDecimal qty; private String inOutType; private String bwart; private String chgReason; private String costCenter; private String refOrderNo; private String refOrderItemNo; public String getRevertVoucherItemNo() { return revertVoucherItemNo; } public void setRevertVoucherItemNo(String revertVoucherItemNo) { this.revertVoucherItemNo = revertVoucherItemNo == null ? null : revertVoucherItemNo.trim(); } public String getBranchNo() { return branchNo; } public void setBranchNo(String branchNo) { this.branchNo = branchNo == null ? null : branchNo.trim(); } public String getMatnr() { return matnr; } public void setMatnr(String matnr) { this.matnr = matnr == null ? null : matnr.trim(); } public String getWerks() { return werks; } public void setWerks(String werks) { this.werks = werks == null ? null : werks.trim(); } public String getLgort() { return lgort; } public void setLgort(String lgort) { this.lgort = lgort == null ? null : lgort.trim(); } public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit == null ? null : unit.trim(); } public BigDecimal getQty() { return qty; } public void setQty(BigDecimal qty) { this.qty = qty; } public String getInOutType() { return inOutType; } public void setInOutType(String inOutType) { this.inOutType = inOutType == null ? null : inOutType.trim(); } public String getBwart() { return bwart; } public void setBwart(String bwart) { this.bwart = bwart == null ? null : bwart.trim(); } public String getChgReason() { return chgReason; } public void setChgReason(String chgReason) { this.chgReason = chgReason == null ? null : chgReason.trim(); } public String getCostCenter() { return costCenter; } public void setCostCenter(String costCenter) { this.costCenter = costCenter == null ? null : costCenter.trim(); } public String getRefOrderNo() { return refOrderNo; } public void setRefOrderNo(String refOrderNo) { this.refOrderNo = refOrderNo == null ? null : refOrderNo.trim(); } public String getRefOrderItemNo() { return refOrderItemNo; } public void setRefOrderItemNo(String refOrderItemNo) { this.refOrderItemNo = refOrderItemNo == null ? null : refOrderItemNo.trim(); } }
[ "979164557@qq.com" ]
979164557@qq.com
2cdc2ca91afb151bb7cdf40452e075c2a7a6d0f6
db55988e5f1879f9de033aae62bdba25765f5665
/demo-websocket/websocket-route/src/main/java/com/remember/websocket/route/config/StartRunner.java
6a12e05708f42faed14c07cda5988f3787eca2f9
[ "MIT" ]
permissive
remember-5/spring-boot-demo
043ceb0931a04739359a396096f848622c782f89
d000a9b6a717893c04000c4acf4445348166102f
refs/heads/main
2023-08-24T15:10:28.743845
2023-08-04T09:29:54
2023-08-04T09:29:54
249,986,236
8
3
MIT
2023-08-30T06:26:15
2020-03-25T13:30:14
Java
UTF-8
Java
false
false
954
java
package com.remember.websocket.route.config; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; /** * @author fly * @date 2021/12/16 17:58 */ @Slf4j @Component @RequiredArgsConstructor public class StartRunner implements ApplicationRunner { /** * 项目启动时重新激活启用的定时任务 * * @param applicationArguments / */ @Override public void run(ApplicationArguments applicationArguments) throws Exception { // String s = UUID.randomUUID().toString(true); // WebSocketConstant.SERVER_ID += s; // Demo02Message.ROUTING_KEY = Demo02Message.ROUTING_KEY + s + ".*"; // log.info(WebSocketConstant.SERVER_ID); // log.info("--------------------主机编号已生成---------------------"); } }
[ "1332661444@qq.com" ]
1332661444@qq.com
7d3bd175cf20a82343e79874d1630280ec06d76e
642f1f62abb026dee2d360a8b19196e3ccb859a1
/web-cx/src/main/java/com/sun3d/why/dao/BpInfoTagMapper.java
d1be8f02977c7149d1038448c8a604583dcf65fc
[]
no_license
P79N6A/alibaba-1
f6dacf963d56856817b211484ca4be39f6dd9596
6ec48f26f16d51c8a493b0eee12d90775b6eaf1d
refs/heads/master
2020-05-27T08:34:26.827337
2019-05-25T07:50:12
2019-05-25T07:50:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
666
java
package com.sun3d.why.dao; import java.util.List; import com.sun3d.why.model.BpInfoTag; public interface BpInfoTagMapper { /** * 根据父标签编码查找子标签编码集合 * @param parentTagCode * @return */ List<BpInfoTag> queryChildTagByCode(String parentTagCode); /** * 查找父标签集合 * @return */ List<BpInfoTag> queryParentTagsByCode(); /** * 根据子标签查找子标签集合 * @param infoTagCode * @return */ List<BpInfoTag> queryChildTagsByChildCode(String infoTagCode); /** * 根据子标签查找父标签 * @param infoTagCode * @return */ BpInfoTag queryParentTagByCode(String infoTagCode); }
[ "comalibaba@163.com" ]
comalibaba@163.com
5b116522f4ee6d838ba6f22b7126b2ffb0f3f8e9
9ee294cea46b872dae47fc076f4ab668ac8d10d4
/app/src/main/java/com/bhargav/hcms/TotalHealthTips/PageAdapter/DietPageAdapter.java
70fe4f2e9350d5e867632d95d77bc78844761019
[]
no_license
bhargav944/HCMS-Old-Code
0507424f3491578356b3afd2a09b9ecf60ab84e8
f57c164ef684c8cd9502cab42ee10968ee6ce49a
refs/heads/master
2020-09-12T00:20:39.513138
2019-08-12T10:02:18
2019-08-12T10:02:18
222,238,398
1
0
null
null
null
null
UTF-8
Java
false
false
1,369
java
package com.bhargav.hcms.TotalHealthTips.PageAdapter; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import com.bhargav.hcms.TotalHealthTips.Tabs.Diet_Plan.DietTab1; import com.bhargav.hcms.TotalHealthTips.Tabs.Diet_Plan.DietTab2; import com.bhargav.hcms.TotalHealthTips.Tabs.Diet_Plan.DietTab3; import com.bhargav.hcms.TotalHealthTips.Tabs.Diet_Plan.DietTab4; /** * Created by Gurramkonda Bhargav on 05-07-2018. */ public class DietPageAdapter extends FragmentStatePagerAdapter { int mNoOfTabs; public DietPageAdapter(FragmentManager fm, int NumberOfTabs) { super(fm); this.mNoOfTabs = NumberOfTabs; } @Override public Fragment getItem(int position) { switch(position) { case 0: DietTab1 tab1 = new DietTab1(); return tab1; case 1: DietTab2 tab2 = new DietTab2(); return tab2; case 2: DietTab3 tab3 = new DietTab3(); return tab3; case 3: DietTab4 tab4 = new DietTab4(); return tab4; default: return null; } } @Override public int getCount() { return mNoOfTabs; } }
[ "bhargav.gurramkonda@gmail.com" ]
bhargav.gurramkonda@gmail.com
46ca83d52602223bddbbcb5c3e3bdcf90c80e62a
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava14/Foo487Test.java
69fb4d7f04b9390596cdc70fe9978b6753635e10
[]
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
482
java
package applicationModulepackageJava14; import org.junit.Test; public class Foo487Test { @Test public void testFoo0() { new Foo487().foo0(); } @Test public void testFoo1() { new Foo487().foo1(); } @Test public void testFoo2() { new Foo487().foo2(); } @Test public void testFoo3() { new Foo487().foo3(); } @Test public void testFoo4() { new Foo487().foo4(); } @Test public void testFoo5() { new Foo487().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
76119236dc863ea1d9dd456f58a00f7f4bbdeefd
ae58dfa26ad7b8d9267280916abae011e1652ce5
/src/main/java/cn/directfinance/DemoApplication.java
f35e11aaf71ce1fd1dc7650317301e2dd21b2304
[]
no_license
jastinshi/TestProject
0cbc864395cc3fc6b4810012435621f6664bce78
413aea2c16dcef60a28bcd5ba0aceba099d36512
refs/heads/master
2021-10-20T19:15:18.181775
2019-03-01T09:10:31
2019-03-01T09:10:31
173,268,511
0
0
null
null
null
null
UTF-8
Java
false
false
430
java
package cn.directfinance; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } }
[ "admin@example.com" ]
admin@example.com
9acd6d083410b15b780815cdcb56b31ccf29d37f
5ccccb200c5564ac33e4e2e5327a0721751b31ce
/kbopark-operation/kbopark-operation-platform/src/main/java/com/kbopark/operation/mapper/LedgerAccountMapper.java
39fab6f7a69e1a38b547c1915cd365f2dddfedd6
[]
no_license
arvin-xiao/peg_back
444e40f43cc8de62431260dab8082dc400135cf8
30e98fc7e23701403ab1e5cad7e4de9bf1a1b965
refs/heads/master
2023-04-30T14:10:48.613681
2020-12-09T13:12:09
2020-12-09T13:12:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,158
java
/* * Copyright (c) 2018-2025, kbopark All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the pig4cloud.com developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: kbopark */ package com.kbopark.operation.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.kbopark.operation.entity.LedgerAccount; import org.apache.ibatis.annotations.Mapper; /** * 分账账户管理 * * @author pigx code generator * @date 2020-09-29 10:24:33 */ @Mapper public interface LedgerAccountMapper extends BaseMapper<LedgerAccount> { }
[ "862970151@qq.com" ]
862970151@qq.com
3311c0433c3428d1ad80bc3b506a54c4785b69e0
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/140/019/CWE476_NULL_Pointer_Dereference__null_check_after_deref_05.java
57a54aef3aaa7886c428832450574db5397ff6f3
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
3,257
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE476_NULL_Pointer_Dereference__null_check_after_deref_05.java Label Definition File: CWE476_NULL_Pointer_Dereference.pointflaw.label.xml Template File: point-flaw-05.tmpl.java */ /* * @description * CWE: 476 NULL Pointer Dereference * Sinks: null_check_after_deref * GoodSink: Do not check for null after the object has been dereferenced * BadSink : Check for null after the object has already been dereferenced * Flow Variant: 05 Control flow: if(privateTrue) and if(privateFalse) * * */ public class CWE476_NULL_Pointer_Dereference__null_check_after_deref_05 extends AbstractTestCase { /* The two variables below are not defined as "final", but are never * assigned any other value, so a tool should be able to identify that * reads of these will always return their initialized values. */ private boolean privateTrue = true; private boolean privateFalse = false; public void bad() throws Throwable { if (privateTrue) { { String myString = null; myString = "Hello"; IO.writeLine(myString.length()); /* FLAW: Check for null after dereferencing the object. This null check is unnecessary. */ if (myString != null) { myString = "my, how I've changed"; } IO.writeLine(myString.length()); } } } /* good1() changes privateTrue to privateFalse */ private void good1() throws Throwable { if (privateFalse) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); } else { { String myString = null; myString = "Hello"; IO.writeLine(myString.length()); /* FIX: Don't check for null since we wouldn't reach this line if the object was null */ myString = "my, how I've changed"; IO.writeLine(myString.length()); } } } /* good2() reverses the bodies in the if statement */ private void good2() throws Throwable { if (privateTrue) { { String myString = null; myString = "Hello"; IO.writeLine(myString.length()); /* FIX: Don't check for null since we wouldn't reach this line if the object was null */ myString = "my, how I've changed"; IO.writeLine(myString.length()); } } } public void good() throws Throwable { good1(); good2(); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
fd2375f27278c13b06a8f4a7af2b7940ccd5c709
54783fa8742d3338c3da28ff2385ad28377e61be
/jsonb/formatting/src/main/java/jakartaee/examples/jsonb/formatting/Formatting.java
6ecb976833e7a622d4be198474f5715b7055e3da
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
nishantraut/jakartaee-examples
1879bd18a71aef9c20511145c7a07d99862cce34
3ebaa96cf2fb324bfcffc66300ef7094f65e8db8
refs/heads/master
2022-04-27T09:50:30.063507
2020-04-30T09:27:04
2020-04-30T09:27:04
260,663,068
1
0
NOASSERTION
2020-05-02T10:27:21
2020-05-02T10:27:20
null
UTF-8
Java
false
false
1,173
java
/* * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S) DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package jakartaee.examples.jsonb.formatting; /** * A null values object. * * @author Manfred Riem (mriem@manorrock.com) */ public class Formatting { /** * Stores the string. */ private String string; /** * Get the string. * * @return the string. */ public String getString() { return string; } /** * Set the string. * * @param string the string. */ public void setString(String string) { this.string = string; } }
[ "mriem@manorrock.com" ]
mriem@manorrock.com
c71326214bba790ff96988497251fa791060f255
8a62d65d2530e17ec5db3f7803960f4f69b955c0
/comp1110-homework/src/comp1110/homework/O04/Circle.java
5a227ed7f9206f4289f165d3e09bdf9ae6351820
[]
no_license
OddUlrich/Software_Structured_Design
cd650dae7010603bf0e52a9e8819a524a6b1c345
d2e7958450813f99842a88408abb6d66d66ff1b8
refs/heads/master
2020-06-23T00:23:22.397038
2020-03-10T23:17:44
2020-03-10T23:17:44
198,443,940
1
0
null
null
null
null
UTF-8
Java
false
false
2,309
java
package comp1110.homework.O04; public class Circle extends Shape{ private double radius; public Circle(double radius) { this.radius = radius; } Circle(double length, double x, double y) { this.radius = length; this.x = x; this.y = y; } public double getRadius() { return radius; } @Override public double perimeter() { return 2 * Math.PI * radius; } @Override public double area() { return Math.PI * Math.pow(radius, 2); } @Override public boolean isPointInside(double xPos, double yPos) { if (distanceOfPoint(xPos, yPos, x, y) < radius) { return true; } else { return false; } } @Override public double distanceOfPoint(double x1, double y1, double x2, double y2) { double dist; dist = Math.sqrt(Math.pow((x1 - x2), 2) + Math.pow((y1 - y2), 2)); return dist; } @Override public boolean overlaps(Shape other) { if (other instanceof Circle) { double sumLen = ((Circle) other).radius + radius; if (sumLen > distanceOfPoint(other.x, other.y, x, y)) { return true; } } else if (other instanceof Square) { if (((Square) other).isPointInside(x, y)) { return true; } else if ((x > ((Square) other).leftX) && (x < ((Square) other).rightX)) { // in x range if (Math.abs(((Square) other).y - y) < ((Square) other).getSideLength()/2 + radius) { return true; } } else if ((y > ((Square) other).downY) && (y < ((Square) other).upY)) { // in y range if (Math.abs(((Square) other).x - x) < ((Square) other).getSideLength() / 2 + radius) { return true; } } else if (isPointInside(((Square) other).leftX, ((Square) other).upY) || isPointInside(((Square) other).rightX, ((Square) other).upY) || isPointInside(((Square) other).leftX, ((Square) other).downY) || isPointInside(((Square) other).rightX, ((Square) other).downY)) { return true; } } return false; } }
[ "vmoonodd@gmail.com" ]
vmoonodd@gmail.com
06f876f245b8e7eabe52d2f844b625e0194ec0cb
446a56b68c88df8057e85f424dbac90896f05602
/api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/model/support/throttle/JdbcThrottleProperties.java
c9f98801937db96697cf9016c03f5189d9a226c8
[ "Apache-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
apereo/cas
c29deb0224c52997cbfcae0073a4eb65ebf41205
5dc06b010aa7fd1b854aa1ae683d1ab284c09367
refs/heads/master
2023-09-01T06:46:11.062065
2023-09-01T01:17:22
2023-09-01T01:17:22
2,352,744
9,879
3,935
Apache-2.0
2023-09-14T14:06:17
2011-09-09T01:36:42
Java
UTF-8
Java
false
false
1,877
java
package org.apereo.cas.configuration.model.support.throttle; import org.apereo.cas.configuration.model.support.jpa.AbstractJpaProperties; import org.apereo.cas.configuration.support.RequiresModule; import com.fasterxml.jackson.annotation.JsonFilter; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; import java.io.Serial; /** * This is {@link JdbcThrottleProperties}. * * @author Misagh Moayyed * @since 6.3.0 */ @RequiresModule(name = "cas-server-support-throttle-jdbc") @Getter @Setter @Accessors(chain = true) @JsonFilter("JdbcThrottleProperties") public class JdbcThrottleProperties extends AbstractJpaProperties { /** * SQL throttling query for all failing records. */ public static final String SQL_AUDIT_QUERY_ALL = "SELECT * FROM COM_AUDIT_TRAIL WHERE " + "AUD_ACTION = ? AND APPLIC_CD = ? AND AUD_DATE >= ? ORDER BY AUD_DATE DESC"; /** * SQL throttling query. */ private static final String SQL_AUDIT_QUERY_BY_USER_AND_IP = "SELECT * FROM COM_AUDIT_TRAIL " + "WHERE AUD_CLIENT_IP = ? AND AUD_USER = ? " + "AND AUD_ACTION = ? AND APPLIC_CD = ? AND AUD_DATE >= ? " + "ORDER BY AUD_DATE DESC"; @Serial private static final long serialVersionUID = -9199878384425691919L; /** * Decide whether JDBC audits should be enabled. */ private boolean enabled = true; /** * Audit query to execute against the database * to locate audit records based on IP, user, date and * an application code along with the relevant audit action. */ private String auditQuery = SQL_AUDIT_QUERY_BY_USER_AND_IP; }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
a13f6580aa86c636d62a55a01b592ad047e50912
e91a15900a2049d70be4f01014f345fd227172d7
/src/offficeHour/ArraySimple.java
0cf33889a044da595b2d7651f6daabc291fe06b4
[]
no_license
AliceGitProj/day01
67be3589ffbd53ddfd3a4b66f8c621b57edd10b2
27d5126c078d9d1123e958337a734727469fda56
refs/heads/master
2022-04-04T16:55:43.051688
2020-02-23T22:32:35
2020-02-23T22:32:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,080
java
package offficeHour; public class ArraySimple { public static void main(String[] args) { String[]developers ={"Natasha","Alesya","Ulya","Kolya"}; String[]testers ={"Vlad","Tanya","Ruslan","Temur"}; String[]analTeam={"Dermo","Shitface","PoopyButt","Zanoza","Kakashka"}; String[][] scrumTeam ={developers, testers, analTeam}; int maxLength = scrumTeam[0][0].length(); String longestString=""; for(String[] each1DArray : scrumTeam ){ for(String eachelement: each1DArray){ if(maxLength<eachelement.length()){ maxLength=eachelement.length(); longestString=eachelement; } } } System.out.println("Longest name is "+longestString+" it has "+maxLength+" letters."); for(String[] each1DArray : scrumTeam ){ for(String eachelement: each1DArray){ if(maxLength==eachelement.length()){ System.out.println(eachelement); } } } } }
[ "hi.alesya@gmail.com" ]
hi.alesya@gmail.com
0c66ddc70004d18b932d1a8b07dc6f8c167e8eea
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/alipay/mobileappcommon/biz/rpc/pginfo/model/ClientPGReportReqPB.java
eaf557c9892c03028d8225819186332ae75b8a65
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,996
java
package com.alipay.mobileappcommon.biz.rpc.pginfo.model; import com.squareup.wire.Message; import com.squareup.wire.Message.Datatype; import com.squareup.wire.Message.Label; import com.squareup.wire.ProtoField; import java.util.Collections; import java.util.List; public final class ClientPGReportReqPB extends Message { public static final String DEFAULT_CLIENTID = ""; public static final String DEFAULT_MANUFACTURER = ""; public static final String DEFAULT_MOBILEBRAND = ""; public static final String DEFAULT_MOBILEMODEL = ""; public static final String DEFAULT_NETTYPE = ""; public static final String DEFAULT_OSVERSION = ""; public static final List<PgDataPB> DEFAULT_PGDATA = Collections.emptyList(); public static final String DEFAULT_PLATFORM = ""; public static final String DEFAULT_PRODUCTID = ""; public static final String DEFAULT_PRODUCTVERSION = ""; public static final String DEFAULT_ROMVERSION = ""; public static final String DEFAULT_UTDID = ""; public static final int TAG_CLIENTID = 3; public static final int TAG_MANUFACTURER = 5; public static final int TAG_MOBILEBRAND = 4; public static final int TAG_MOBILEMODEL = 7; public static final int TAG_NETTYPE = 8; public static final int TAG_OSVERSION = 11; public static final int TAG_PGDATA = 12; public static final int TAG_PLATFORM = 10; public static final int TAG_PRODUCTID = 1; public static final int TAG_PRODUCTVERSION = 2; public static final int TAG_ROMVERSION = 6; public static final int TAG_UTDID = 9; @ProtoField(tag = 3, type = Datatype.STRING) public String clientId; @ProtoField(tag = 5, type = Datatype.STRING) public String manufacturer; @ProtoField(tag = 4, type = Datatype.STRING) public String mobileBrand; @ProtoField(tag = 7, type = Datatype.STRING) public String mobileModel; @ProtoField(tag = 8, type = Datatype.STRING) public String netType; @ProtoField(tag = 11, type = Datatype.STRING) public String osVersion; @ProtoField(label = Label.REPEATED, tag = 12) public List<PgDataPB> pgData; @ProtoField(tag = 10, type = Datatype.STRING) public String platform; @ProtoField(tag = 1, type = Datatype.STRING) public String productId; @ProtoField(tag = 2, type = Datatype.STRING) public String productVersion; @ProtoField(tag = 6, type = Datatype.STRING) public String romVersion; @ProtoField(tag = 9, type = Datatype.STRING) public String utdid; public ClientPGReportReqPB() { } public ClientPGReportReqPB(ClientPGReportReqPB clientPGReportReqPB) { super(clientPGReportReqPB); if (clientPGReportReqPB != null) { this.productId = clientPGReportReqPB.productId; this.productVersion = clientPGReportReqPB.productVersion; this.clientId = clientPGReportReqPB.clientId; this.mobileBrand = clientPGReportReqPB.mobileBrand; this.manufacturer = clientPGReportReqPB.manufacturer; this.romVersion = clientPGReportReqPB.romVersion; this.mobileModel = clientPGReportReqPB.mobileModel; this.netType = clientPGReportReqPB.netType; this.utdid = clientPGReportReqPB.utdid; this.platform = clientPGReportReqPB.platform; this.osVersion = clientPGReportReqPB.osVersion; this.pgData = copyOf(clientPGReportReqPB.pgData); } } public final boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ClientPGReportReqPB)) { return false; } ClientPGReportReqPB clientPGReportReqPB = (ClientPGReportReqPB) obj; return equals((Object) this.productId, (Object) clientPGReportReqPB.productId) && equals((Object) this.productVersion, (Object) clientPGReportReqPB.productVersion) && equals((Object) this.clientId, (Object) clientPGReportReqPB.clientId) && equals((Object) this.mobileBrand, (Object) clientPGReportReqPB.mobileBrand) && equals((Object) this.manufacturer, (Object) clientPGReportReqPB.manufacturer) && equals((Object) this.romVersion, (Object) clientPGReportReqPB.romVersion) && equals((Object) this.mobileModel, (Object) clientPGReportReqPB.mobileModel) && equals((Object) this.netType, (Object) clientPGReportReqPB.netType) && equals((Object) this.utdid, (Object) clientPGReportReqPB.utdid) && equals((Object) this.platform, (Object) clientPGReportReqPB.platform) && equals((Object) this.osVersion, (Object) clientPGReportReqPB.osVersion) && equals(this.pgData, clientPGReportReqPB.pgData); } public final ClientPGReportReqPB fillTagValue(int i, Object obj) { switch (i) { case 1: this.productId = (String) obj; break; case 2: this.productVersion = (String) obj; break; case 3: this.clientId = (String) obj; break; case 4: this.mobileBrand = (String) obj; break; case 5: this.manufacturer = (String) obj; break; case 6: this.romVersion = (String) obj; break; case 7: this.mobileModel = (String) obj; break; case 8: this.netType = (String) obj; break; case 9: this.utdid = (String) obj; break; case 10: this.platform = (String) obj; break; case 11: this.osVersion = (String) obj; break; case 12: this.pgData = immutableCopyOf((List) obj); break; } return this; } public final int hashCode() { int i = 0; int i2 = this.hashCode; if (i2 != 0) { return i2; } int hashCode = ((this.platform != null ? this.platform.hashCode() : 0) + (((this.utdid != null ? this.utdid.hashCode() : 0) + (((this.netType != null ? this.netType.hashCode() : 0) + (((this.mobileModel != null ? this.mobileModel.hashCode() : 0) + (((this.romVersion != null ? this.romVersion.hashCode() : 0) + (((this.manufacturer != null ? this.manufacturer.hashCode() : 0) + (((this.mobileBrand != null ? this.mobileBrand.hashCode() : 0) + (((this.clientId != null ? this.clientId.hashCode() : 0) + (((this.productVersion != null ? this.productVersion.hashCode() : 0) + ((this.productId != null ? this.productId.hashCode() : 0) * 37)) * 37)) * 37)) * 37)) * 37)) * 37)) * 37)) * 37)) * 37)) * 37; if (this.osVersion != null) { i = this.osVersion.hashCode(); } int hashCode2 = (this.pgData != null ? this.pgData.hashCode() : 1) + ((hashCode + i) * 37); this.hashCode = hashCode2; return hashCode2; } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
dc2e918b3c9facadc21f6e5c45e50298b4d6c421
9ad0aa646102f77501efde94d115d4ff8d87422f
/LintCode/java/MinimumSubarray.java
2a724d2a3f046bdfbda397b555fafc7ddb36e477
[]
no_license
xiaotdl/CodingInterview
cb8fc2b06bf587c83a9683d7b2cb80f5f4fd34ee
514e25e83b0cc841f873b1cfef3fcc05f30ffeb3
refs/heads/master
2022-01-12T05:18:48.825311
2022-01-05T19:41:32
2022-01-05T19:41:32
56,419,795
0
1
null
null
null
null
UTF-8
Java
false
false
651
java
import java.util.ArrayList; public class MinimumSubarray { /** * @param nums: a list of integers * @return: A integer indicate the sum of minimum subarray */ // V1, O(n) // PrefixSum public int minSubArray(ArrayList<Integer> nums) { if (nums == null || nums.size() == 0) { return 0; } int sum = 0; int maxSum = 0; int minSum = Integer.MAX_VALUE; for (int i = 0; i < nums.size(); i++) { sum += nums.get(i); minSum = Math.min(minSum, sum - maxSum); maxSum = Math.max(maxSum, sum); } return minSum; } }
[ "xiaotdl@gmail.com" ]
xiaotdl@gmail.com
704c68112dc4b597f0d84591651e5e947b7e939c
f617d7ed61f4d0632827ea792fdf773e9e87d6d9
/ch11/ex11-28.MemberServiceTest.java
ed5c499135051c4b521193637918003a3baa03dc
[]
no_license
freebz/JPA-Programming
e796f3d3868913775068f31d86020ded8ddd737e
a52637cba47fa46dfdab9330361d1f8f4bfe5866
refs/heads/master
2020-09-15T09:24:35.035143
2019-11-22T12:09:56
2019-11-22T12:09:56
223,409,858
1
0
null
null
null
null
UTF-8
Java
false
false
1,067
java
// 예제 11.28 회원가입 테스트 코드 package jpabook.jpashop.service; import jpabook.jpashop.domain.Member; import jpabook.jpashop.repository.MemberRepository; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.transaction.annotation.Transactional; import static org.junit.Assert.*; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(location = "classpath:appConfig.xml") @Transactional public class memberServiceTest { @Autowired MemberService memberService; @Autowired MemberRepository memberRepository; @Test public void 회원가입() throws Exception { //Given Member member = new Member(); member.setName("kim"); //When Long saveId = memberService.join(member); //Then assertEquals(member, memberRepository.findOne(saveId)); } @Test(expected = IllegalStateException.class) public void 중복_회원_예외() throws Exception { ... } }
[ "freebz@hananet.net" ]
freebz@hananet.net
56e727c156b1e1ed9d48d1f64ec66eb35e99cead
bceba483c2d1831f0262931b7fc72d5c75954e18
/src/qubed/corelogicextensions/PREPAIDITEM.java
e036b787045b5deda61083bf5c82c4e2c6b5b2de
[]
no_license
Nigel-Qubed/credit-services
6e2acfdb936ab831a986fabeb6cefa74f03c672c
21402c6d4328c93387fd8baf0efd8972442d2174
refs/heads/master
2022-12-01T02:36:57.495363
2020-08-10T17:26:07
2020-08-10T17:26:07
285,552,565
0
1
null
null
null
null
UTF-8
Java
false
false
7,796
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // 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: 2020.08.05 at 04:53:09 AM CAT // package qubed.corelogicextensions; import java.util.HashMap; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import javax.xml.namespace.QName; /** * Information regarding the prepaid item. * * <p>Java class for PREPAID_ITEM complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PREPAID_ITEM"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="PREPAID_ITEM_DETAIL" type="{http://www.mismo.org/residential/2009/schemas}PREPAID_ITEM_DETAIL" minOccurs="0"/> * &lt;element name="PREPAID_ITEM_PAID_TO" type="{http://www.mismo.org/residential/2009/schemas}PAID_TO" minOccurs="0"/> * &lt;element name="PREPAID_ITEM_PAYMENTS" type="{http://www.mismo.org/residential/2009/schemas}PREPAID_ITEM_PAYMENTS" minOccurs="0"/> * &lt;element name="SELECTED_SERVICE_PROVIDER" type="{http://www.mismo.org/residential/2009/schemas}SELECTED_SERVICE_PROVIDER" minOccurs="0"/> * &lt;element name="EXTENSION" type="{http://www.mismo.org/residential/2009/schemas}PREPAID_ITEM_EXTENSION" minOccurs="0"/> * &lt;/sequence> * &lt;attGroup ref="{http://www.w3.org/1999/xlink}MISMOresourceLink"/> * &lt;attGroup ref="{http://www.mismo.org/residential/2009/schemas}AttributeExtension"/> * &lt;attribute name="SequenceNumber" type="{http://www.mismo.org/residential/2009/schemas}MISMOSequenceNumber_Base" /> * &lt;anyAttribute processContents='lax'/> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PREPAID_ITEM", propOrder = { "prepaiditemdetail", "prepaiditempaidto", "prepaiditempayments", "selectedserviceprovider", "extension" }) public class PREPAIDITEM { @XmlElement(name = "PREPAID_ITEM_DETAIL") protected PREPAIDITEMDETAIL prepaiditemdetail; @XmlElement(name = "PREPAID_ITEM_PAID_TO") protected PAIDTO prepaiditempaidto; @XmlElement(name = "PREPAID_ITEM_PAYMENTS") protected PREPAIDITEMPAYMENTS prepaiditempayments; @XmlElement(name = "SELECTED_SERVICE_PROVIDER") protected SELECTEDSERVICEPROVIDER selectedserviceprovider; @XmlElement(name = "EXTENSION") protected PREPAIDITEMEXTENSION extension; @XmlAttribute(name = "SequenceNumber") protected Integer sequenceNumber; @XmlAttribute(name = "label", namespace = "http://www.w3.org/1999/xlink") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String label; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the prepaiditemdetail property. * * @return * possible object is * {@link PREPAIDITEMDETAIL } * */ public PREPAIDITEMDETAIL getPREPAIDITEMDETAIL() { return prepaiditemdetail; } /** * Sets the value of the prepaiditemdetail property. * * @param value * allowed object is * {@link PREPAIDITEMDETAIL } * */ public void setPREPAIDITEMDETAIL(PREPAIDITEMDETAIL value) { this.prepaiditemdetail = value; } /** * Gets the value of the prepaiditempaidto property. * * @return * possible object is * {@link PAIDTO } * */ public PAIDTO getPREPAIDITEMPAIDTO() { return prepaiditempaidto; } /** * Sets the value of the prepaiditempaidto property. * * @param value * allowed object is * {@link PAIDTO } * */ public void setPREPAIDITEMPAIDTO(PAIDTO value) { this.prepaiditempaidto = value; } /** * Gets the value of the prepaiditempayments property. * * @return * possible object is * {@link PREPAIDITEMPAYMENTS } * */ public PREPAIDITEMPAYMENTS getPREPAIDITEMPAYMENTS() { return prepaiditempayments; } /** * Sets the value of the prepaiditempayments property. * * @param value * allowed object is * {@link PREPAIDITEMPAYMENTS } * */ public void setPREPAIDITEMPAYMENTS(PREPAIDITEMPAYMENTS value) { this.prepaiditempayments = value; } /** * Gets the value of the selectedserviceprovider property. * * @return * possible object is * {@link SELECTEDSERVICEPROVIDER } * */ public SELECTEDSERVICEPROVIDER getSELECTEDSERVICEPROVIDER() { return selectedserviceprovider; } /** * Sets the value of the selectedserviceprovider property. * * @param value * allowed object is * {@link SELECTEDSERVICEPROVIDER } * */ public void setSELECTEDSERVICEPROVIDER(SELECTEDSERVICEPROVIDER value) { this.selectedserviceprovider = value; } /** * Gets the value of the extension property. * * @return * possible object is * {@link PREPAIDITEMEXTENSION } * */ public PREPAIDITEMEXTENSION getEXTENSION() { return extension; } /** * Sets the value of the extension property. * * @param value * allowed object is * {@link PREPAIDITEMEXTENSION } * */ public void setEXTENSION(PREPAIDITEMEXTENSION value) { this.extension = value; } /** * Gets the value of the sequenceNumber property. * * @return * possible object is * {@link Integer } * */ public Integer getSequenceNumber() { return sequenceNumber; } /** * Sets the value of the sequenceNumber property. * * @param value * allowed object is * {@link Integer } * */ public void setSequenceNumber(Integer value) { this.sequenceNumber = value; } /** * Gets the value of the label property. * * @return * possible object is * {@link String } * */ public String getLabel() { return label; } /** * Sets the value of the label property. * * @param value * allowed object is * {@link String } * */ public void setLabel(String value) { this.label = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } }
[ "vectorcrael@yahoo.com" ]
vectorcrael@yahoo.com
8affe26df757209e747182477a9613372c17c0b0
798e78c8d32c0a32b2895997614d4fe0b6f963e5
/SE/SE_similarityCompare/src/pyl/searchengine/Posting.java
5cf6e1550cb620e32f1689560532009c34c5cd85
[]
no_license
pylSER/MSc
2081da6fd16ab12bdeee32fec558a8acb615bc2f
6150eaa1cfb1e8236571c30005f5c94c61b98d73
refs/heads/master
2020-03-31T05:11:25.756395
2018-11-16T07:17:49
2018-11-16T07:17:49
151,936,537
0
0
null
null
null
null
UTF-8
Java
false
false
1,209
java
package pyl.searchengine; import java.util.ArrayList; public class Posting { private int DID; private ArrayList<Integer> positionList; public int getDID() { return DID; } public void setDID(int DID) { this.DID = DID; } public ArrayList<Integer> getPositionList() { return positionList; } public void setPositionList(ArrayList<Integer> positionList) { this.positionList = positionList; } @Override public boolean equals(Object obj) { if(obj == this) return true; if(obj instanceof Posting){ Posting other=(Posting) obj; if(this.DID==other.DID){ return true; }else { return false; } }else { return false; } } @Override public int hashCode() { return ("x"+DID).hashCode(); } @Override public String toString() { String temp="D"+DID+":"; for (int i = 0; i < positionList.size(); i++) { temp+=positionList.get(i); if(i!=positionList.size()-1){ temp+=","; } } return temp; } }
[ "pyl14@software.nju.edu.cn" ]
pyl14@software.nju.edu.cn
373033b58e1a969b36d744f47bfe6214af039234
643d701fc59bf663dd8ec809576521147d54c313
/src/main/java/gwt/jelement/indexeddb/IDBVersionChangeEvent.java
e8c33bfed9da7ba691d3dc4848abe72c70325f6f
[ "MIT" ]
permissive
gwt-jelement/gwt-jelement
8e8cca46b778ed1146a2efd8be996a358f974b44
f28303d85f16cefa1fc067ccb6f0b610cdf942f4
refs/heads/master
2021-01-01T17:03:07.607472
2018-01-16T15:46:44
2018-01-16T15:46:44
97,984,978
6
5
null
null
null
null
UTF-8
Java
false
false
1,610
java
/* * Copyright 2017 Abed Tony BenBrahim <tony.benrahim@10xdev.com> * and Gwt-JElement project contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package gwt.jelement.indexeddb; import gwt.jelement.events.Event; import jsinterop.annotations.*; @JsType(namespace = JsPackage.GLOBAL, name="IDBVersionChangeEvent", isNative = true) public class IDBVersionChangeEvent extends Event { @JsProperty(name="dataLoss") private String dataLoss; @JsConstructor public IDBVersionChangeEvent(String type){ super((String) null); } @JsConstructor public IDBVersionChangeEvent(String type, IDBVersionChangeEventInit eventInitDict){ super((String) null); } @JsProperty(name="oldVersion") public native double getOldVersion(); @JsProperty(name="newVersion") public native double getNewVersion(); @JsProperty(name="dataLossMessage") public native String getDataLossMessage(); @JsOverlay public final IDBDataLossAmount getDataLoss(){ return IDBDataLossAmount.of(dataLoss); } }
[ "tony.benbrahim@gmail.com" ]
tony.benbrahim@gmail.com
4c5297ee9eb51c54aba4cf16fce4849e3df0ba2d
7e514984ca48c1ed93bc19b80bce35000be48352
/src/goryachev/swing/theme/AgRadioButtonIcon.java
d7d290c4be3b0379218185f7596a46c9039f70ff
[ "Apache-2.0" ]
permissive
andy-goryachev/PasswordSafe
6413d03c9939c2cf8e3d6c3a9f979649c9c9feb5
3e58901fcc4130d2423e7aeeace541999cfd6937
refs/heads/master
2023-08-08T21:28:46.100894
2023-07-21T05:46:59
2023-07-21T05:46:59
30,781,883
19
0
null
null
null
null
UTF-8
Java
false
false
2,042
java
// Copyright © 2015-2023 Andy Goryachev <andy@goryachev.com> package goryachev.swing.theme; import goryachev.swing.Theme; import goryachev.swing.ThemeKey; import goryachev.swing.UI; import java.awt.Color; import java.awt.Component; import java.awt.Graphics; import java.awt.Graphics2D; import javax.swing.AbstractButton; import javax.swing.ButtonModel; import javax.swing.Icon; public class AgRadioButtonIcon implements Icon { public static final int SIZE = 13; public static final Color outerBorderColor = ThemeColor.create(ThemeKey.TEXT_FG, 0.5, ThemeKey.PANEL_BG); public static final Color innerBorderColor = ThemeColor.create(ThemeKey.TEXT_BG, 0.8, ThemeKey.PANEL_BG); public static final Color normalControlColor = ThemeColor.create(ThemeKey.TEXT_FG, 0.9, ThemeKey.PANEL_BG); public static final Color disabledControlColor = ThemeColor.create(ThemeKey.TEXT_FG, 0.4, ThemeKey.PANEL_BG); public AgRadioButtonIcon() { } public void paintIcon(Component comp, Graphics gg, int x, int y) { Graphics2D g = UI.createAntiAliasingAndQualityGraphics(gg); try { AbstractButton c = (AbstractButton)comp; ButtonModel m = c.getModel(); // background if((m.isPressed() && m.isArmed()) || !m.isEnabled()) { g.setColor(Theme.PANEL_BG); } else { g.setColor(Theme.TEXT_BG); } g.fillOval(x + 1, y + 1, SIZE - 2, SIZE - 2); // border // g.setColor(innerBorderColor); // g.drawOval(x + 1, y + 1, SIZE - 3, SIZE - 3); g.setColor(outerBorderColor); g.drawOval(x, y, SIZE - 1, SIZE - 1); // dot if(m.isSelected()) { if(m.isEnabled()) { g.setColor(normalControlColor); } else { g.setColor(disabledControlColor); } g.translate(x + SIZE/2, y + SIZE/2); g.fillOval(-2, -2, 5, 5); } } finally { g.dispose(); } } public int getIconWidth() { return SIZE; } public int getIconHeight() { return SIZE; } }
[ "andy@goryachev.com" ]
andy@goryachev.com
91ab969ec0bd900b482794112c8e6b263353cb07
8c86cdf81703d2543c9527f79a8ca93518e403a1
/src/main/java/ua/helpdesk/entity/PersistentLogin.java
ed0171e261fd0f043366606c9d25a3b219f347b9
[]
no_license
AnGo84/HelpDesk
2ce22bab23118bd7d82f8abcc7d8dfb93e6802ae
16e33130e13e8e48391587c4b7131d2997dad53c
refs/heads/master
2022-09-26T00:48:11.658420
2021-02-23T22:00:45
2021-02-23T22:00:45
138,514,788
1
1
null
2022-09-22T19:37:39
2018-06-24T20:56:34
Java
UTF-8
Java
false
false
1,078
java
package ua.helpdesk.entity; import javax.persistence.Column; import javax.persistence.Id; import javax.persistence.Temporal; import javax.persistence.TemporalType; import java.io.Serializable; import java.util.Date; //@Entity //@Table(name="PERSISTENT_LOGINS") public class PersistentLogin implements Serializable { @Id private String series; @Column(name = "USERNAME", unique = true, nullable = false) private String username; @Column(name = "TOKEN", unique = true, nullable = false) private String token; @Temporal(TemporalType.TIMESTAMP) private Date last_used; public String getSeries() { return series; } public void setSeries(String series) { this.series = series; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getToken() { return token; } public void setToken(String token) { this.token = token; } public Date getLast_used() { return last_used; } public void setLast_used(Date last_used) { this.last_used = last_used; } }
[ "ango1984@gmail.com" ]
ango1984@gmail.com
f9744f8de12d33e8ec56ff1a58f658ab90e54b17
56319e53f4155b0f0ae4ab249b1d3249fc8ddd98
/apache-tomcat-8.0.39/converted/org/apache/catalina/connector/MainForTestResponse_testEncodeRedirectURL06.java
b657567f601fe79c64aa5cfc8edf8466f5aab365
[]
no_license
SnowOnion/J2mConvertedTestcases
2f904e2f2754f859f6125f248d3672eb1a70abd1
e74b0e4c08f12e5effeeb8581670156ace42640a
refs/heads/master
2021-01-11T19:01:42.207334
2017-01-19T12:22:22
2017-01-19T12:22:22
79,295,183
1
0
null
null
null
null
UTF-8
Java
false
false
583
java
package org.apache.catalina.connector; import org.apache.catalina.connector.TestResponse; public class MainForTestResponse_testEncodeRedirectURL06 { public static void main(String[] args) { try { TestResponse.setUpPerTestClass(); TestResponse objTestResponse = new TestResponse(); objTestResponse.setUp(); objTestResponse.testEncodeRedirectURL06(); objTestResponse.tearDown(); TestResponse.tearDownPerTestClass(); } catch (Throwable e) { e.printStackTrace(); } } }
[ "snowonionlee@gmail.com" ]
snowonionlee@gmail.com
c85e40044a8a0600d6fe01e36e81064e40ebd617
8a8254c83cc2ec2c401f9820f78892cf5ff41384
/baseline/AntennaPod/core/src/main/java/baseline/de/danoeh/antennapod/core/storage/APDownloadAlgorithm.java
13273eb05d6443331263da9f728b82550225604a
[ "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,546
java
package baseline.de.danoeh.antennapod.core.storage; import android.content.Context; import android.util.Log; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import baseline.de.danoeh.antennapod.core.feed.FeedFilter; import baseline.de.danoeh.antennapod.core.feed.FeedItem; import baseline.de.danoeh.antennapod.core.feed.FeedPreferences; import baseline.de.danoeh.antennapod.core.preferences.UserPreferences; import baseline.de.danoeh.antennapod.core.util.NetworkUtils; import baseline.de.danoeh.antennapod.core.util.PowerUtils; /** * Implements the automatic download algorithm used by AntennaPod. This class assumes that * the client uses the APEpisodeCleanupAlgorithm. */ public class APDownloadAlgorithm implements AutomaticDownloadAlgorithm { private static final String TAG = "APDownloadAlgorithm"; /** * Looks for undownloaded episodes in the queue or list of new items and request a download if * 1. Network is available * 2. The device is charging or the user allows auto download on battery * 3. There is free space in the episode cache * This method is executed on an internal single thread executor. * * @param context Used for accessing the DB. * @return A Runnable that will be submitted to an ExecutorService. */ @Override public Runnable autoDownloadUndownloadedItems(final Context context) { return () -> { // true if we should auto download based on network status boolean networkShouldAutoDl = NetworkUtils.autodownloadNetworkAvailable() && UserPreferences.isEnableAutodownload(); // true if we should auto download based on power status boolean powerShouldAutoDl = PowerUtils.deviceCharging(context) || UserPreferences.isEnableAutodownloadOnBattery(); // we should only auto download if both network AND power are happy if (networkShouldAutoDl && powerShouldAutoDl) { Log.d(TAG, "Performing auto-dl of undownloaded episodes"); List<FeedItem> candidates; final List<FeedItem> queue = DBReader.getQueue(); final List<FeedItem> newItems = DBReader.getNewItemsList(); candidates = new ArrayList<>(queue.size() + newItems.size()); candidates.addAll(queue); for(FeedItem newItem : newItems) { FeedPreferences feedPrefs = newItem.getFeed().getPreferences(); FeedFilter feedFilter = feedPrefs.getFilter(); if(!candidates.contains(newItem) && feedFilter.shouldAutoDownload(newItem)) { candidates.add(newItem); } } // filter items that are not auto downloadable Iterator<FeedItem> it = candidates.iterator(); while(it.hasNext()) { FeedItem item = it.next(); if(!item.isAutoDownloadable()) { it.remove(); } } int autoDownloadableEpisodes = candidates.size(); int downloadedEpisodes = DBReader.getNumberOfDownloadedEpisodes(); int deletedEpisodes = UserPreferences.getEpisodeCleanupAlgorithm() .makeRoomForEpisodes(context, autoDownloadableEpisodes); boolean cacheIsUnlimited = UserPreferences.getEpisodeCacheSize() == UserPreferences .getEpisodeCacheSizeUnlimited(); int episodeCacheSize = UserPreferences.getEpisodeCacheSize(); int episodeSpaceLeft; if (cacheIsUnlimited || episodeCacheSize >= downloadedEpisodes + autoDownloadableEpisodes) { episodeSpaceLeft = autoDownloadableEpisodes; } else { episodeSpaceLeft = episodeCacheSize - (downloadedEpisodes - deletedEpisodes); } FeedItem[] itemsToDownload = candidates.subList(0, episodeSpaceLeft) .toArray(new FeedItem[episodeSpaceLeft]); Log.d(TAG, "Enqueueing " + itemsToDownload.length + " items for download"); try { DBTasks.downloadFeedItems(false, context, itemsToDownload); } catch (DownloadRequestException e) { e.printStackTrace(); } } }; } }
[ "sshann95@outlook.com" ]
sshann95@outlook.com
d31bad4e9038ac9cf5fdd6ebfeb4a355b14c14a5
d915e37b2d6b09a5a30fb5065a9e4542e33b5eca
/app/src/main/java/com/daskiworks/ghwatch/WatchedRepositoryListAdapter.java
260b4aaae2dafff183c62150d755ce0e730790e8
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
Daskiworks/ghwatch
af4a07d0d292a1e6adc8c9d2907056490de11344
143f45891950ff4d8616e68c0385494d15800310
refs/heads/master
2023-08-31T21:52:05.027344
2023-08-26T10:39:55
2023-08-26T10:39:55
15,629,521
26
5
Apache-2.0
2022-12-17T23:24:18
2014-01-04T09:09:52
Java
UTF-8
Java
false
false
7,916
java
/* * Copyright 2014 contributors as indicated by the @authors tag. * * 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.daskiworks.ghwatch; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.view.LayoutInflater; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.ListView; import android.widget.PopupMenu; import android.widget.TextView; import com.daskiworks.ghwatch.backend.PreferencesUtils; import com.daskiworks.ghwatch.image.ImageLoader; import com.daskiworks.ghwatch.model.Repository; import com.daskiworks.ghwatch.model.WatchedRepositories; /** * {@link ListView} adapter used to show list of watched repositories from {@link WatchedRepositories}. * * @author Vlastimil Elias <vlastimil.elias@worldonline.cz> */ public class WatchedRepositoryListAdapter extends BaseAdapter { public ImageLoader imageLoader; private LayoutInflater layoutInflater; private WatchedRepositories repositoriesData; private Context context; private List<Repository> filteredRepositories = null; public WatchedRepositoryListAdapter(Context activity, final WatchedRepositories repositoriesData, ImageLoader imageLoader) { this.context = activity; layoutInflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE); this.repositoriesData = repositoriesData; this.imageLoader = imageLoader; } public void setNotificationStream(WatchedRepositories repositoriesData) { this.repositoriesData = repositoriesData; filteredRepositories = null; } private List<Repository> getFilteredRepositories() { if (filteredRepositories == null) { filteredRepositories = new ArrayList<Repository>(); if (repositoriesData != null) { for (Repository n : repositoriesData) { // filtering can be added here filteredRepositories.add(n); } } } return filteredRepositories; } public void removeRepositoryByPosition(int position) { repositoriesData.removeRepositoryById(getFilteredRepositories().get(position).getId()); filteredRepositories = null; } public void removeRepositoryById(long id) { repositoriesData.removeRepositoryById(id); filteredRepositories = null; } @Override public int getCount() { return getFilteredRepositories().size(); } @Override public Object getItem(int position) { return getFilteredRepositories().get(position); } @Override public long getItemId(int position) { return getFilteredRepositories().get(position).getId(); } @Override public View getView(int position, View convertView, ViewGroup parent) { View listItem = null; if (convertView == null) { listItem = layoutInflater.inflate(R.layout.list_watched_repos, parent, false); } else { listItem = layoutInflater.inflate(R.layout.list_watched_repos, parent, false); } // Initialize the views in the layout ImageView iv = (ImageView) listItem.findViewById(R.id.thumb); TextView tvRepoName = (TextView) listItem.findViewById(R.id.repo_name); TextView tvNotifFilter = (TextView) listItem.findViewById(R.id.notif_filter); TextView tvRepoVisibility = (TextView) listItem.findViewById(R.id.repo_visibility); // Set the views in the layout final Repository repository = getFilteredRepositories().get(position); imageLoader.displayImage(repository.getRepositoryAvatarUrl(), iv); tvRepoName.setText(repository.getRepositoryFullName()); tvRepoName.setSelected(true); //repo visibility text boolean notifFilterVisible = true; { StringBuilder sb = new StringBuilder(context.getString(R.string.pref_repoVisibility_context)); sb.append(": "); String[] sa = context.getResources().getStringArray(R.array.pref_repoVisibilityFull_entries); int p = Integer.parseInt(PreferencesUtils.getRepoVisibilityForRepository(context, repository.getRepositoryFullName(), false)); sb.append(sa[p]); if (p == 0) { sb.append(" ("); sb.append(sa[Integer.parseInt(PreferencesUtils.getRepoVisibility(context))]); sb.append(")"); } tvRepoVisibility.setText(sb); if (PreferencesUtils.PREF_REPO_VISIBILITY_INVISIBLE.equals(PreferencesUtils.getRepoVisibilityForRepository(context, repository.getRepositoryFullName(), true))) { notifFilterVisible = false; } } //notif filter text { StringBuilder sb = new StringBuilder(context.getString(R.string.pref_notifyFilter)); sb.append(": "); String[] sa = context.getResources().getStringArray(R.array.pref_notifyFilterFull_entries); if(notifFilterVisible) { int p = Integer.parseInt(PreferencesUtils.getNotificationFilterForRepository(context, repository.getRepositoryFullName(), false)); sb.append(sa[p]); if (p == 0) { sb.append(" ("); sb.append(sa[Integer.parseInt(PreferencesUtils.getNotificationFilter(context))]); sb.append(")"); } } else { sb.append(sa[Integer.parseInt(PreferencesUtils.PREF_NOTIFY_FILTER_NOTHING)]); sb.append(" ("); sb.append(context.getString(R.string.text_because)); sb.append(" "); sb.append(context.getResources().getStringArray(R.array.pref_repoVisibilityFull_entries)[2]); sb.append(")"); } tvNotifFilter.setText(sb); } View.OnClickListener cl = new View.OnClickListener() { @Override public void onClick(View v) { handleMenuItemClicked(repository, -10); } }; listItem.setOnClickListener(cl); final boolean nfiv = notifFilterVisible; ImageButton imgButton = (ImageButton) listItem.findViewById(R.id.button_menu); imgButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { PopupMenu popup = new PopupMenu(context, v); MenuInflater inflater = popup.getMenuInflater(); inflater.inflate(R.menu.list_watched_repos_context, popup.getMenu()); popup.getMenu().getItem(1).setEnabled(nfiv); popup.show(); popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { return handleMenuItemClicked(repository, item.getItemId()); } }); } }); return listItem; } private boolean handleMenuItemClicked(Repository repository, int menuItemId) { if (onItemMenuClickedListener != null) return onItemMenuClickedListener.onMenuItemClick(repository, menuItemId); return false; } private OnItemMenuClickedListener onItemMenuClickedListener; /** * Listener for notification menu item clicks. */ public static interface OnItemMenuClickedListener { public boolean onMenuItemClick(Repository repository, int menuItemId); } public void setOnItemMenuClickedListener(OnItemMenuClickedListener onItemMenuClickedListener) { this.onItemMenuClickedListener = onItemMenuClickedListener; } @Override public void notifyDataSetChanged() { filteredRepositories = null; super.notifyDataSetChanged(); } }
[ "vlastimil.elias@worldonline.cz" ]
vlastimil.elias@worldonline.cz
874e222dee8157d402739564627bacc69345c824
4179e709b3f114a235b8ea94a4617bfe347d5d83
/addons/implied-repos/common/src/main/java/org/commonjava/indy/implrepo/conf/ImpliedRepoConfig.java
f5a966fa78852e4c04a46a987d91ec810213b1ab
[]
no_license
michalszynkiewicz/indy
59bd4057515d9401fcc35dbb26b1045bd7844e2f
ac74fe0c776adc2f2045d220eeaf2c7cde4196e8
refs/heads/master
2021-01-21T08:11:53.746004
2016-08-19T20:05:14
2016-08-19T20:05:14
66,242,190
0
0
null
2016-08-22T05:29:41
2016-08-22T05:29:40
null
UTF-8
Java
false
false
6,268
java
/** * Copyright (C) 2011 Red Hat, Inc. (jdcasey@commonjava.org) * * 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.commonjava.indy.implrepo.conf; import org.commonjava.indy.conf.IndyConfigInfo; import org.commonjava.web.config.ConfigurationException; import org.commonjava.web.config.annotation.SectionName; import org.commonjava.web.config.section.MapSectionListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.enterprise.context.ApplicationScoped; import java.io.File; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.regex.PatternSyntaxException; @ApplicationScoped @SectionName( ImpliedRepoConfig.SECTION_NAME) public class ImpliedRepoConfig extends MapSectionListener implements IndyConfigInfo { public static final String SECTION_NAME = "implied-repos"; public static final String ENABLED_KEY = "enabled"; public static final String INCLUDE_SNAPSHOTS_KEY = "include.snapshots"; public static final String DISABLED_HOST_KEY = "disable"; public static final boolean DEFAULT_ENABLED = false; public static final boolean DEFAULT_INCLUDE_SNAPSHOT_REPOS = false; private Boolean enabled; private Boolean includeSnapshotRepos; private List<String> blacklist = new ArrayList<>(); public ImpliedRepoConfig() { } public boolean isEnabled() { return enabled == null ? DEFAULT_ENABLED : enabled; } public void setEnabled( final Boolean enabled ) { this.enabled = enabled; } public boolean isIncludeSnapshotRepos() { return includeSnapshotRepos == null ? DEFAULT_INCLUDE_SNAPSHOT_REPOS : includeSnapshotRepos; } public void setIncludeSnapshotRepos( final Boolean includeSnapshotRepos ) { this.includeSnapshotRepos = includeSnapshotRepos; } public void addBlacklist( final String host ) { this.blacklist.add( host ); } public boolean isBlacklisted( final URL url ) { final String proto = url.getProtocol(); final String host = url.getHost(); int port = url.getPort(); if ( port < 0 ) { port = "https".equals( proto ) ? 443 : 80; } String hostAndPort = host + ":" + port; String hostAndPortAndProto = proto + "://" + hostAndPort; String hostAndProto = proto + "://" + host; String u = url.toString(); if ( blacklist.contains( host ) || blacklist.contains( hostAndPort ) || blacklist.contains( hostAndPortAndProto ) || blacklist.contains( hostAndProto ) || blacklist.contains( u ) ) { return true; } for ( String bl : blacklist ) { try { if ( u.matches( bl ) ) { return true; } } catch ( PatternSyntaxException e ) { Logger logger = LoggerFactory.getLogger( getClass() ); logger.warn( "[BLACKLIST SKIP] Regex comparison failed on pattern: " + bl, e); } } return false; } public List<String> getBlacklist() { return blacklist; } public void setBlacklist( final List<String> blacklist ) { this.blacklist = blacklist; } @Override public void parameter( final String name, final String value ) throws ConfigurationException { switch ( name ) { case ENABLED_KEY: { this.enabled = Boolean.parseBoolean( value ); break; } case INCLUDE_SNAPSHOTS_KEY: { this.includeSnapshotRepos = Boolean.parseBoolean( value ); break; } case DISABLED_HOST_KEY: { this.blacklist.add( value ); break; } default: { throw new ConfigurationException( "Invalid value: '{}' for parameter: '{}'. Only numeric values are accepted for section: '{}'.", value, name, SECTION_NAME ); } } } // @javax.enterprise.context.ApplicationScoped // public static class FeatureConfig // extends AbstractIndyFeatureConfig<ImpliedRepoConfig, ImpliedRepoConfig> // { // public FeatureConfig() // { // super( new ImpliedRepoConfig() ); // } // // @Produces // @Default // @ApplicationScoped // public ImpliedRepoConfig getImpliedRepoConfig() // throws ConfigurationException // { // return getPrefabInstance(); // } // // @Override // public IndyConfigClassInfo getInfo() // { // return getPrefabInstance(); // } // } @Override public String getDefaultConfigFileName() { return new File( IndyConfigInfo.CONF_INCLUDES_DIR, "implied-repos.conf" ).getPath(); } @Override public InputStream getDefaultConfig() { return Thread.currentThread() .getContextClassLoader() .getResourceAsStream( "default-implied-repos.conf" ); } // @Override // public Class<?> getConfigurationClass() // { // return getClass(); // } public boolean isBlacklisted( final String url ) throws MalformedURLException { final URL u = new URL( url ); return isBlacklisted( u ); } }
[ "jdcasey@commonjava.org" ]
jdcasey@commonjava.org
a599dd13b294dce0a685a26abcc7022c380c5c67
642cb4ce82e92729e69447ea26086d57d0266296
/sdks/java/http_client/v1/src/test/java/org/openapitools/client/model/ProtobufAnyTest.java
90203be193d7117afa155143e3d7f9ccbc22648a
[ "Apache-2.0" ]
permissive
vamsikavuru/polyaxon
243c91b2a2998260f6b21e864b02347629c4867f
f1695c98f320c2e5c9fdf72e7f7885954df755a9
refs/heads/master
2022-08-24T05:22:04.806006
2020-05-28T14:50:54
2020-05-28T15:04:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,917
java
// Copyright 2018-2020 Polyaxon, 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. /* * Polyaxon SDKs and REST API specification. * Polyaxon SDKs and REST API specification. * * The version of the OpenAPI document: 1.0.92 * Contact: contact@polyaxon.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for ProtobufAny */ public class ProtobufAnyTest { private final ProtobufAny model = new ProtobufAny(); /** * Model tests for ProtobufAny */ @Test public void testProtobufAny() { // TODO: test ProtobufAny } /** * Test the property 'typeUrl' */ @Test public void typeUrlTest() { // TODO: test typeUrl } /** * Test the property 'value' */ @Test public void valueTest() { // TODO: test value } }
[ "mouradmourafiq@gmail.com" ]
mouradmourafiq@gmail.com
d18973456249dca65d581e35b92059456c56bac5
4beac940b0e518232573c260dbc74a73b0a18ca1
/spring-boot-logging/logging-spring-boot-autoconfigure/src/main/java/in/hocg/boot/logging/autoconfiguration/LoggingLookup.java
554f944f96e1418c3d3b96f14c155178aeafffaa
[ "Apache-2.0" ]
permissive
hwedwin/spring-boot-starters-project
03d06a84ecc7ed082664fe596ae39dec5a88149a
96709ecd4fc43189e74d447b85eed63a4400ebfc
refs/heads/master
2023-07-19T21:17:58.378570
2021-08-30T07:49:58
2021-08-30T07:49:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,273
java
package in.hocg.boot.logging.autoconfiguration; import lombok.Getter; import lombok.Setter; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.MarkerManager; import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.core.config.plugins.Plugin; import org.apache.logging.log4j.core.lookup.AbstractLookup; import org.apache.logging.log4j.core.lookup.StrLookup; import org.apache.logging.log4j.status.StatusLogger; import org.springframework.core.env.Environment; /** * Created by hocgin on 2020/8/16 * email: hocgin@gmail.com * * @author hocgin */ @Plugin(name = "logging", category = StrLookup.CATEGORY) public class LoggingLookup extends AbstractLookup implements StrLookup { @Getter @Setter private static Environment environment; private static final Logger LOGGER = StatusLogger.getLogger(); private static final Marker LOOKUP = MarkerManager.getMarker("LOOKUP"); @Override public String lookup(LogEvent logEvent, String s) { try { return environment.getProperty(s); } catch (final Exception e) { LOGGER.warn(LOOKUP, "Error while getting system property [{}].", s, e); return null; } } }
[ "hocgin@gmail.com" ]
hocgin@gmail.com
1b5c0bb3b9a1d6815732fdc7eaa2d508fd2ed026
e44cd8c126e279c088d4db5fac2b40ce6f124273
/src/main/java/com/norconex/collector/core/checksum/AbstractMetadataChecksummer.java
56d0c5d4c32c44c22546bb1203a082b6f06f2181
[ "Apache-2.0" ]
permissive
Norconex/collector-core
46332b120eb610b1a561859d7d2313225465ab39
b8ce8484620b3e707ffb8d6aabd50b0acf472261
refs/heads/master
2023-07-21T14:09:08.033400
2023-07-09T06:00:33
2023-07-09T06:00:33
21,438,702
7
20
Apache-2.0
2023-07-07T21:56:45
2014-07-02T20:08:32
Java
UTF-8
Java
false
false
6,486
java
/* Copyright 2014-2021 Norconex 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.norconex.collector.core.checksum; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.norconex.collector.core.doc.CrawlDocMetadata; import com.norconex.commons.lang.map.Properties; import com.norconex.commons.lang.map.PropertySetter; import com.norconex.commons.lang.xml.IXMLConfigurable; import com.norconex.commons.lang.xml.XML; /** * <p>Abstract implementation of {@link IMetadataChecksummer} giving the option * to keep the generated checksum. The checksum can be stored * in a target field name specified. If no target field name is specified, * it stores it under the * metadata field name {@link CrawlDocMetadata#CHECKSUM_METADATA}. * </p><p> * <b>Implementors do not need to store the checksum themselves, this abstract * class does it.</b> * </p><p> * Implementors should offer this XML configuration usage: * </p> * * {@nx.xml #usage * <metadataChecksummer class="(subclass)"> * keep="[false|true]" * toField="(optional metadata field to store the checksum)" * onSet="[append|prepend|replace|optional]" /> * } * <p> * <code>toField</code> is ignored unless the <code>keep</code> * attribute is set to <code>true</code>. * </p> * @author Pascal Essiembre */ public abstract class AbstractMetadataChecksummer implements IMetadataChecksummer, IXMLConfigurable { private static final Logger LOG = LoggerFactory.getLogger( AbstractMetadataChecksummer.class); private boolean keep; private String toField = CrawlDocMetadata.CHECKSUM_METADATA; private PropertySetter onSet; @Override public final String createMetadataChecksum(Properties metadata) { String checksum = doCreateMetaChecksum(metadata); if (isKeep()) { String field = getToField(); if (StringUtils.isBlank(field)) { field = CrawlDocMetadata.CHECKSUM_METADATA; } PropertySetter.orAppend(onSet).apply(metadata, field, checksum); LOG.debug("Meta checksum stored in {}", field); } return checksum; } protected abstract String doCreateMetaChecksum(Properties metadata); /** * Whether to keep the metadata checksum value as a new metadata field. * @return <code>true</code> to keep the checksum */ public boolean isKeep() { return keep; } /** * Sets whether to keep the metadata checksum value as a new metadata field. * @param keep <code>true</code> to keep the checksum */ public void setKeep(boolean keep) { this.keep = keep; } /** * Gets the metadata field to use to store the checksum value. * Defaults to {@link CrawlDocMetadata#CHECKSUM_METADATA}. * Only applicable if {@link #isKeep()} returns {@code true} * @return metadata field name * @deprecated Since 2.0.0, use {@link #getToField()}. */ @Deprecated public String getTargetField() { return toField; } /** * Sets the metadata field name to use to store the checksum value. * @param targetField the metadata field name * @deprecated Since 2.0.0, use {@link #setToField(String)}. */ @Deprecated public void setTargetField(String targetField) { this.toField = targetField; } /** * Gets the metadata field to use to store the checksum value. * Defaults to {@link CrawlDocMetadata#CHECKSUM_METADATA}. * Only applicable if {@link #isKeep()} returns {@code true} * @return metadata field name * @since 2.0.0 */ public String getToField() { return toField; } /** * Sets the metadata field name to use to store the checksum value. * @param toField the metadata field name * @since 2.0.0 */ public void setToField(String toField) { this.toField = toField; } /** * Gets the property setter to use when a value is set. * @return property setter * @since 2.0.0 */ public PropertySetter getOnSet() { return onSet; } /** * Sets the property setter to use when a value is set. * @param onSet property setter * @since 2.0.0 */ public void setOnSet(PropertySetter onSet) { this.onSet = onSet; } @Override public final void loadFromXML(XML xml) { setKeep(xml.getBoolean("@keep", keep)); xml.checkDeprecated("@targetField", "@toField", false); setToField(xml.getString("@targetField", toField)); setToField(xml.getString("@toField", toField)); // overwrites above line setOnSet(PropertySetter.fromXML(xml, onSet)); loadChecksummerFromXML(xml); } protected abstract void loadChecksummerFromXML(XML xml); @Override public final void saveToXML(XML xml) { xml.setAttribute("keep", isKeep()); xml.setAttribute("toField", getToField()); PropertySetter.toXML(xml, getOnSet()); saveChecksummerToXML(xml); } protected abstract void saveChecksummerToXML(XML xml); @Override public boolean equals(final Object other) { return EqualsBuilder.reflectionEquals(this, other); } @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } @Override public String toString() { return new ReflectionToStringBuilder( this, ToStringStyle.SHORT_PREFIX_STYLE).toString(); } }
[ "pascal.essiembre@norconex.com" ]
pascal.essiembre@norconex.com
fb642d7d6bb05f80a4f13a393f829fdc86adc3f9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_b80ca668c81ec8e13256769d27d25fa030844a08/Test/4_b80ca668c81ec8e13256769d27d25fa030844a08_Test_s.java
e1e47fb0d1b8b60597adcbdf7950a4087045d20f
[]
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
231
java
/* * Test.java * Braden Simpson (V00685500) * Jordan Ell (V00660306) * University of Victoria, CSC586A * Virtual Machines */ public class Test { public static int returnX() { int x = 1; return x + 309; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4d92fce1ec6daf7f14454e2ee7be71f5d95b3ddb
86ccb87786458a8807fe9eff9b7200f2626c01a2
/src/main/java/p1018/Solution.java
282c3b73c049b551e3e0ee796508340e34e529ec
[]
no_license
fisher310/leetcoderevolver
d919e566271730b3df26fe28b85c387a3f48faa3
83263b69728f94b51e7188cd79fcdac1f261c339
refs/heads/master
2023-03-07T19:05:58.119634
2022-03-23T12:40:13
2022-03-23T12:40:13
251,488,466
0
0
null
2021-03-24T01:50:58
2020-03-31T03:14:04
Java
UTF-8
Java
false
false
419
java
package p1018; import java.util.ArrayList; import java.util.List; /** * @author lihailong * @since 2021/1/14 0014 */ class Solution { public List<Boolean> prefixesDivBy5(int[] A) { List<Boolean> ans = new ArrayList<>(A.length); int x = 0; for (int i = 0; i < A.length; i++) { x = ((x << 1) | A[i]) % 5; ans.add(x == 0); } return ans; } }
[ "316049914@qq.com" ]
316049914@qq.com
4a496c4ff88eefcfbb98079620295f93b6c7ddca
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_d1f5af8d0c9fe5750418c8db11af22c7078a6123/ZipcodeService/25_d1f5af8d0c9fe5750418c8db11af22c7078a6123_ZipcodeService_s.java
913daca3ba0ee472db86387606e64f7b0f1806e2
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,750
java
package com.cmozie.classes; import java.net.MalformedURLException; import java.net.URL; import java.net.URLEncoder; import webConnections.WebStuff; import com.cmozie.Libz.FileStuff; import android.app.Activity; import android.app.IntentService; import android.content.Intent; import android.os.Bundle; import android.os.Message; import android.os.Messenger; import android.os.RemoteException; import android.util.Log; public class ZipcodeService extends IntentService { public static final String MESSENGER_KEY = "messenger"; public static final String enteredZipcode = "zipcode"; public ZipcodeService() { super("ZipcodeService"); // TODO Auto-generated constructor stub } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub } @Override protected void onHandleIntent(Intent intent) { // TODO Auto-generated method stub Log.i("ONHandleIntent", "Started"); //m_file = FileStuff.getInstance(); Bundle extras = intent.getExtras(); Messenger messenger = (Messenger) extras.get(MESSENGER_KEY); String zips = extras.getString(enteredZipcode); //this is the base url of the api String baseURL = "http://zipfeeder.us/zip?"; //key needed to use api String key = "key=EN4GbNMq"; //this empty string accepts an empty string which will be for zipcodes entered String qs = ""; try{ qs = URLEncoder.encode(zips, "UTF-8"); }catch (Exception e) { //if an error in the api show the bad url alert Log.e("Bad URL","Encoding Problem"); qs = ""; } //creates finalURL as a URL URL UrlResult; String queryReply; try{ //sets the final url to the base plus the api key with the string parameter needed for search as well as the empty string that recieves a zipcode. UrlResult = new URL (baseURL + key + "&zips=" + qs); //logs the final url query Log.i("URL",UrlResult.toString()); queryReply = WebStuff.getURLStringResponse(UrlResult); //storing of the FileStuff.storeStringFile(this, "temp", queryReply, false); Log.i("STORED FILE", "saved"); }catch (MalformedURLException e){ Log.e("BAD URL", "Malformed URL"); UrlResult = null; } Log.i("OnHandleIntent","Done looking up zipcode"); Message message = Message.obtain(); message.arg1 = Activity.RESULT_OK; message.obj = "Service is done"; try { messenger.send(message); } catch (RemoteException e) { // TODO Auto-generated catch block Log.e("On handleintent",e.getMessage().toString()); e.printStackTrace(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2ef45d3b4b863c7b1e0eb1cafdc9d66f1b99cd2a
a155085c868d6e7a9e70341bba9d36fe33e76518
/src/main/java/mmall/controller/protal/ShippingController.java
01c892467e7813c15d0ce11b3b56377be11f04ec
[]
no_license
winelx/Mmall
705892a93cc862a80e5b1c13f8c9562379391850
c4d7d092a46f09020395b01c52ff19742b625639
refs/heads/master
2022-12-27T06:01:44.112310
2020-12-08T07:10:04
2020-12-08T07:10:04
132,427,663
0
0
null
2022-12-16T02:59:07
2018-05-07T08:05:20
Java
UTF-8
Java
false
false
3,937
java
package mmall.controller.protal; import mmall.common.Const; import mmall.common.ResponseCode; import mmall.common.ServiceReponse; import mmall.pojo.Shipping; import mmall.pojo.User; import mmall.service.IShippingService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpSession; @Controller @RequestMapping("/shipping/") public class ShippingController { @Autowired private IShippingService iShippingService; /** * 添加地址 * * @param session 用户信息,判断用户是登录 * @param shipping 地址对象 * @return */ @RequestMapping("add.do") @ResponseBody public ServiceReponse add(HttpSession session, Shipping shipping) { //拿到用户信息 User user = (User) session.getAttribute(Const.CURRENT_USER); //判断用户信息是否为空 if (user == null) { //如果为空 return ServiceReponse.createByErrorMessage("请先登录"); } return iShippingService.add(user.getId(), shipping); } /** * @param session * @param shippingId 地址id * @return */ @RequestMapping("del.do") @ResponseBody public ServiceReponse del(HttpSession session, Integer shippingId) { //避免横向越权 //判断用户是否登录 User user = (User) session.getAttribute(Const.CURRENT_USER); if (user == null) { return ServiceReponse.createByError(ResponseCode.NEED_LOGIN.getCode(), ResponseCode.NEED_LOGIN.getDesc()); } return iShippingService.del(user.getId(), shippingId); } /** * 更新 * * @param session * @param shipping 对象 * @return */ @RequestMapping("updata.do") @ResponseBody public ServiceReponse updata(HttpSession session, Shipping shipping) { //避免横向越权 //判断用户是否登录 User user = (User) session.getAttribute(Const.CURRENT_USER); if (user == null) { return ServiceReponse.createByError(ResponseCode.NEED_LOGIN.getCode(), ResponseCode.NEED_LOGIN.getDesc()); } return iShippingService.updata(user.getId(), shipping); } /** * 查询 * * @param session * @param shippingId * @return */ @RequestMapping("select.do") @ResponseBody public ServiceReponse select(HttpSession session, Integer shippingId) { //避免横向越权 //判断用户是否登录 User user = (User) session.getAttribute(Const.CURRENT_USER); if (user == null) { return ServiceReponse.createByError(ResponseCode.NEED_LOGIN.getCode(), ResponseCode.NEED_LOGIN.getDesc()); } return iShippingService.select(user.getId(), shippingId); } /** * 地址列表 * @param pageNum * @param pageSize * @param session * @return */ @RequestMapping("list.do") @ResponseBody public ServiceReponse list(@RequestParam(value = "pageNUm", defaultValue = "1") int pageNum, @RequestParam(value = "pageSize", defaultValue = "10") int pageSize, HttpSession session) { //避免横向越权 //判断用户是否登录 User user = (User) session.getAttribute(Const.CURRENT_USER); if (user == null) { return ServiceReponse.createByError(ResponseCode.NEED_LOGIN.getCode(), ResponseCode.NEED_LOGIN.getDesc()); } return iShippingService.list(user.getId(), pageNum, pageSize); } }
[ "1094290855@qq.com" ]
1094290855@qq.com
e90301e430f4495f6a3f88edb9cf66b5d182f375
a2a418ea62ccb5faf9acc9f37a610dd7e9e2e32a
/src_workflow/cla/poc/workflow/spec/NodeSpec.java
d982f226296044cfdcfccf7c3eba05e0139ea6ae
[ "BSD-2-Clause" ]
permissive
Clariones/event-driven-generation
b5b3115629cb8ded115cd14463dcbb123ffcc9ce
f5525f5af980807a6c9983065b465f19ad6bab31
refs/heads/master
2021-11-12T22:31:22.171488
2021-03-15T09:49:52
2021-03-15T09:49:52
164,572,933
2
1
BSD-2-Clause
2020-07-17T02:46:35
2019-01-08T05:51:45
Java
UTF-8
Java
false
false
2,659
java
package cla.poc.workflow.spec; import java.awt.*; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; public class NodeSpec extends BaseSpec { protected Map<String, EventSpec> allEventSpecMap; protected Map<String, RoleSpec> allRoleSpecMap; protected Map<String, String> enterChecking = new HashMap<>(); protected Map<String, ConditionSpec> allConditionMap = new HashMap<>(); public Map<String, String> getEnterChecking() { return enterChecking; } public void setEnterChecking(Map<String, String> enterChecking) { this.enterChecking = enterChecking; } public Map<String, EventSpec> getAllEventSpecMap() { if (allEventSpecMap == null){ allEventSpecMap = new HashMap<>(); } return allEventSpecMap; } public void setAllEventSpecMap(Map<String, EventSpec> allEventSpecMap) { this.allEventSpecMap = allEventSpecMap; } public Map<String, RoleSpec> getAllRoleSpecMap() { if (allRoleSpecMap == null){ allRoleSpecMap = new HashMap<>(); } return allRoleSpecMap; } public void setAllRoleSpecMap(Map<String, RoleSpec> allRoleSpecMap) { this.allRoleSpecMap = allRoleSpecMap; } public Map<String, ConditionSpec> getAllConditionMap() { return allConditionMap; } public void setAllConditionMap(Map<String, ConditionSpec> allConditionMap) { this.allConditionMap = allConditionMap; } public EventSpec createEvent(String eventName) { if (allEventSpecMap == null){ allEventSpecMap = new LinkedHashMap<>(); } EventSpec spec = allEventSpecMap.get(eventName); if (spec == null){ spec = new EventSpec(); spec.setName(eventName); allEventSpecMap.put(eventName, spec); } return spec; } public RoleSpec defineRole(String roleName) { if (allRoleSpecMap == null){ allRoleSpecMap = new LinkedHashMap<>(); } RoleSpec spec = allRoleSpecMap.get(roleName); if (spec == null){ spec = new RoleSpec(); spec.setName(roleName); allRoleSpecMap.put(roleName, spec); } return spec; } public ConditionSpec defineCondition(String condition) { ConditionSpec cspec = getAllConditionMap().get(condition); if (cspec != null) { return cspec; } cspec = new ConditionSpec(); cspec.setName(condition); getAllConditionMap().put(condition, cspec); return cspec; } }
[ "clariones@163.com" ]
clariones@163.com
70c257a2092d2f91d63490dcc0ad3faed70d9266
82193b733bdebec6b41a0eee1ebbde10fa17895a
/test/com/facebook/buck/rust/RustLibraryDescriptionTest.java
12aa857e03ede0c19247beaa46b22781c8855ad5
[ "Apache-2.0" ]
permissive
LinuxEntrepreneur/buck
939b2579eaa2703756297aab81bcaa6c0cae64ea
2339f348fa3593659dff12785e0428301f2cc42e
refs/heads/master
2021-01-19T07:17:46.109707
2017-04-05T21:30:16
2017-04-07T07:56:15
87,534,702
2
0
null
2017-04-07T10:28:39
2017-04-07T10:28:39
null
UTF-8
Java
false
false
2,300
java
/* * Copyright 2017-present Facebook, 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.facebook.buck.rust; import com.facebook.buck.cxx.CxxGenruleBuilder; import com.facebook.buck.model.BuildTargetFactory; import com.facebook.buck.parser.NoSuchBuildTargetException; import com.facebook.buck.rules.BuildRuleResolver; import com.facebook.buck.rules.DefaultBuildTargetSourcePath; import com.facebook.buck.rules.DefaultTargetNodeToBuildRuleTransformer; import com.facebook.buck.rules.FakeSourcePath; import com.facebook.buck.rules.TargetGraph; import com.facebook.buck.testutil.TargetGraphFactory; import com.google.common.collect.ImmutableSortedSet; import org.junit.Test; public class RustLibraryDescriptionTest { @Test public void testGeneratedSourceFromCxxGenrule() throws NoSuchBuildTargetException { CxxGenruleBuilder srcBuilder = new CxxGenruleBuilder(BuildTargetFactory.newInstance("//:src")) .setOut("lib.rs"); RustLibraryBuilder libraryBuilder = RustLibraryBuilder.from("//:lib") .setSrcs( ImmutableSortedSet.of(new DefaultBuildTargetSourcePath(srcBuilder.getTarget()))); RustBinaryBuilder binaryBuilder = RustBinaryBuilder.from("//:bin") .setSrcs(ImmutableSortedSet.of(new FakeSourcePath("main.rs"))) .setDeps(ImmutableSortedSet.of(libraryBuilder.getTarget())); TargetGraph targetGraph = TargetGraphFactory.newInstance( srcBuilder.build(), libraryBuilder.build(), binaryBuilder.build()); BuildRuleResolver ruleResolver = new BuildRuleResolver( targetGraph, new DefaultTargetNodeToBuildRuleTransformer()); ruleResolver.requireRule(binaryBuilder.getTarget()); } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
0c203ba782d847f0e8407717ebe4783628ac9a15
22ebf86c5b5d8d0dbe0aa015241fa10c07b58b08
/src/main/java/com/litemanager/admin/dao/MenuDao.java
bcf3a25d2103ebc6aad0c6e435b7fe75ef57def8
[]
no_license
BestJex/litemanager
5e19666595dd09cf036922d6a25d5d1061f80e6d
72b3e19a938c7bd34c740aa5929573fe5d415ec0
refs/heads/master
2022-11-28T15:52:39.150405
2019-05-26T10:18:48
2019-05-26T10:18:48
188,572,550
0
0
null
null
null
null
UTF-8
Java
false
false
506
java
package com.litemanager.admin.dao; import com.baomidou.mybatisplus.mapper.BaseMapper; import com.litemanager.admin.entity.Menu; import com.litemanager.admin.entity.VO.ShowMenu; import java.util.List; import java.util.Map; /** * <p> * Mapper 接口 * </p> * * @author wangl * @since 2017-10-31 */ public interface MenuDao extends BaseMapper<Menu> { List<Menu> showAllMenusList(Map map); List<Menu> getMenus(Map map); List<ShowMenu> selectShowMenuByUser(Map<String,Object> map); }
[ "2252930004@qq.com" ]
2252930004@qq.com
38e9f9d82ee26c04e974c742aaed77ecea6faf2a
afd7ebabda451990715066b7d045489b19ccccd5
/.svn/pristine/38/38e9f9d82ee26c04e974c742aaed77ecea6faf2a.svn-base
1817f75b8b4585551412aecdef10f8d3df278e93
[ "CC-BY-SA-2.5", "AFL-2.1", "LicenseRef-scancode-unknown-license-reference", "MIT", "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-proprietary-license" ]
permissive
malakeel/jetspeed-portal
6996ab54816ebf7073aec1a6cbd86f59e3ee9d17
149dd8eba01eb86cc946d473d65ecc387464ca13
refs/heads/master
2022-12-29T07:50:12.413375
2020-04-18T04:55:45
2020-04-18T04:55:45
247,505,166
0
0
Apache-2.0
2022-12-16T02:47:04
2020-03-15T16:27:17
Java
UTF-8
Java
false
false
3,306
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jetspeed.om.page.impl; import org.apache.jetspeed.om.page.BaseFragmentElement; import org.apache.jetspeed.om.page.FragmentDefinition; import org.apache.jetspeed.om.page.FragmentReference; import org.apache.jetspeed.om.page.BaseFragmentValidationListener; import org.apache.jetspeed.om.page.PageFragment; /** * FragmentDefinitionImpl * * @author <a href="mailto:rwatler@apache.org">Randy Watler</a> * @version $Id$ */ public class FragmentDefinitionImpl extends BaseFragmentsElementImpl implements FragmentDefinition { private static final long serialVersionUID = 1L; /* (non-Javadoc) * @see org.apache.jetspeed.om.page.FragmentDefinition#getDefId() */ public String getDefId() { BaseFragmentElement rootFragment = getRootFragment(); return ((rootFragment != null) ? rootFragment.getId() : null); } /* (non-Javadoc) * @see org.apache.jetspeed.page.document.impl.NodeImpl#getType() */ public String getType() { return DOCUMENT_TYPE; } /* (non-Javadoc) * @see org.apache.jetspeed.page.document.impl.NodeImpl#isHidden() */ public boolean isHidden() { return false; } /* (non-Javadoc) * @see org.apache.jetspeed.page.document.impl.NodeImpl#setHidden(boolean) */ public void setHidden(boolean hidden) { throw new UnsupportedOperationException("PageTemplate.setHidden()"); } /* (non-Javadoc) * @see org.apache.jetspeed.om.page.impl.BaseFragmentsElementImpl#newBaseFragmentValidationListener() */ protected BaseFragmentValidationListener newBaseFragmentValidationListener() { return new BaseFragmentValidationListener() { /* (non-Javadoc) * @see org.apache.jetspeed.om.page.BaseFragmentValidationListener#validate(org.apache.jetspeed.om.page.BaseFragmentElement) */ public boolean validate(BaseFragmentElement fragmentElement) { // PageFragments can only appear in PageTemplates; recursive FragmentReference not supported return (!(fragmentElement instanceof PageFragment) && !(fragmentElement instanceof FragmentReference)); } /* (non-Javadoc) * @see org.apache.jetspeed.om.page.BaseFragmentValidationListener#validate() */ public boolean validate() { return true; } }; } }
[ "mansour.alakeel@gmail.com" ]
mansour.alakeel@gmail.com
40f1abbd44bdf167a19b93251937c9b8a4fef347
b6e99b0346572b7def0e9cdd1b03990beb99e26f
/src/gcom/cadastro/imovel/bean/ImovelEloAnormalidadeRelatoriosHelper.java
b70981a22517d54ef759ebe4e749f3132315d474
[]
no_license
prodigasistemas/gsan
ad64782c7bc991329ce5f0bf5491c810e9487d6b
bfbf7ad298c3c9646bdf5d9c791e62d7366499c1
refs/heads/master
2023-08-31T10:47:21.784105
2023-08-23T17:53:24
2023-08-23T17:53:24
14,600,520
19
20
null
2015-07-29T19:39:10
2013-11-21T21:24:16
Java
ISO-8859-1
Java
false
false
1,536
java
package gcom.cadastro.imovel.bean; import gcom.cadastro.imovel.ImovelEloAnormalidade; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.Date; /** * [CRC:1710] - Botões de imprimir nas abas de Consultar Imovel.<br/><br/> * * Classe que servirá para exibir os dados dos Cadastros Ocorrências * no RelatorioDadosComplementaresImovel.<br/><br/> * *Pode ser usada por qualquer outro relatorio desde *que não altere o que já existe. * * @author Marlon Patrick * @since 23/09/2009 */ public class ImovelEloAnormalidadeRelatoriosHelper { private ImovelEloAnormalidade imovelEloAnormalidade; public ImovelEloAnormalidade getImovelEloAnormalidade() { return imovelEloAnormalidade; } public void setImovelEloAnormalidade(ImovelEloAnormalidade cadastroOcorrencia) { this.imovelEloAnormalidade = cadastroOcorrencia; } public String getDescricaoEloAnormalidade() { if(imovelEloAnormalidade!=null && imovelEloAnormalidade.getEloAnormalidade()!=null){ return imovelEloAnormalidade.getEloAnormalidade().getDescricao(); } return ""; } public Date getDataOcorrencia() { if(imovelEloAnormalidade!=null){ return imovelEloAnormalidade.getDataAnormalidade(); } return null; } public InputStream getFotoOcorrencia() { if(imovelEloAnormalidade!=null && imovelEloAnormalidade.getFotoAnormalidade()!=null ){ return new ByteArrayInputStream(imovelEloAnormalidade.getFotoAnormalidade()); } return null; } }
[ "piagodinho@gmail.com" ]
piagodinho@gmail.com
faae23928a2fb14f4bfacc9e335b842c354fa2fb
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_464dcfba20fff26f6673f4d84b7a097dc5e70523/GestorServicio/7_464dcfba20fff26f6673f4d84b7a097dc5e70523_GestorServicio_t.java
1a1f3580fc2b2d5db91e1fcfc5fe0018e83568a3
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,326
java
package casarural; import java.sql.SQLException; import java.util.List; public class GestorServicio { private static GestorServicio gestorServicio; private GestorBD gbd; /**Devuelve una instancia de la clase GestorServicio * @param ninguno * @return Una instancia del Gestor de Servicios */ public static GestorServicio getInstance() { if (gestorServicio == null) { gestorServicio = new GestorServicio(); } return gestorServicio; } private GestorServicio() { gbd = GestorBD.getInstance(); } /**Obtiene una lista de las recogidas actuales * @param ninguno * @return Una lista de recogidas */ public List<Recogida> getRecogidas() { return gbd.getRecogidas(); } /**Crea un Servicio asignandolo a un recorrido * * @param servicio Toma como entrada la clase Servicio * @return confirmación true/false */ public boolean crearServicio(Servicio servicio) { try { return gbd.crearServicio(servicio); } catch (SQLException ex) { ex.printStackTrace(); return false; } } /**Obtiene una lista de Servicios asignados a una casa rural * * @param numCasa Código de la casa rural de la cual se requieren los servicios * @return listaDeServicios asociados a una casa rural */ public List<Servicio> mostrarServicios(int numCasa){ try { java.util.Date fechaActual = new java.util.Date(); java.sql.Date fecha = new java.sql.Date(fechaActual.getTime()); return gbd.obtenerServicios(numCasa, fecha); }catch(SQLException ex){ ex.printStackTrace(); return null; } } /**Crea una reserva y asigna un servicio a la misma * * @param * @param idServicio Identificador del servicio que se asignara a la reserva * @param numPlazas Numero de plazas que se quiere reservar * @return */ public boolean transaccionDeReserva(List<Reserva> reservasTotales, int idReserva, String numTfno, int idServicio, int numPlazas){ try { float precioTotal = 0; for(Reserva reserva: reservasTotales){ precioTotal = precioTotal + reserva.getPrecioTotal(); } gbd.transaccionDeReserva(reservasTotales, idReserva, numTfno, precioTotal, idServicio, numPlazas); return true; }catch(SQLException ex){ ex.printStackTrace(); return false; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c7935faf7a0553f71bb182c6d5e16f7e69a2257d
46a62c499faaa64fe3cce2356c8b229e9c4c9c49
/taobao-sdk-java-standard/taobao-sdk-java-online_standard-20120923-source/com/taobao/api/response/ItemRecommendAddResponse.java
06db808b88e306d6cac5fb9370e52db3e0b7c3a9
[]
no_license
xjwangliang/learning-python
4ed40ff741051b28774585ef476ed59963eee579
da74bd7e466cd67565416b28429ed4c42e6a298f
refs/heads/master
2021-01-01T15:41:22.572679
2015-04-27T14:09:50
2015-04-27T14:09:50
5,881,815
0
0
null
null
null
null
UTF-8
Java
false
false
617
java
package com.taobao.api.response; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.domain.Item; import com.taobao.api.TaobaoResponse; /** * TOP API: taobao.item.recommend.add response. * * @author auto create * @since 1.0, null */ public class ItemRecommendAddResponse extends TaobaoResponse { private static final long serialVersionUID = 2548712338226915676L; /** * 被推荐的商品的信息 */ @ApiField("item") private Item item; public void setItem(Item item) { this.item = item; } public Item getItem( ) { return this.item; } }
[ "shigushuyuan@gmail.com" ]
shigushuyuan@gmail.com
634646d7036af4b294724b266b041f8722b51002
a97533539030384708c6a546cc9952f2ddaeff05
/jmetal-component/src/test/java/org/uma/jmetal/component/catalogue/pso/globalbestinitialization/DefaultGlobalBestInitializationTest.java
1e6e407f3f68a4d4f35d563c759601b513d6e3e9
[ "MIT" ]
permissive
jMetal/jMetal
862ab3902ecda7f0485ec2905b6c8f09a4fb0fc4
95fbeee22d1a4c50fb1c31b2f152c07c35629d91
refs/heads/main
2023-09-04T21:46:12.666316
2023-08-31T09:10:34
2023-08-31T09:10:34
19,381,895
515
623
MIT
2023-07-04T07:47:11
2014-05-02T16:59:26
Java
UTF-8
Java
false
false
2,282
java
package org.uma.jmetal.component.catalogue.pso.globalbestinitialization; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertThrows; import java.util.ArrayList; import java.util.List; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.uma.jmetal.component.catalogue.pso.globalbestinitialization.impl.DefaultGlobalBestInitialization; import org.uma.jmetal.problem.doubleproblem.DoubleProblem; import org.uma.jmetal.problem.doubleproblem.impl.FakeDoubleProblem; import org.uma.jmetal.solution.doublesolution.DoubleSolution; import org.uma.jmetal.util.archive.BoundedArchive; import org.uma.jmetal.util.errorchecking.exception.InvalidConditionException; import org.uma.jmetal.util.errorchecking.exception.NullParameterException; class DefaultGlobalBestInitializationTest { @Test void initializeRaisesAnExceptionIfTheSwarmIsNull() { assertThrows(NullParameterException.class, () -> new DefaultGlobalBestInitialization().initialize(null, Mockito.mock( BoundedArchive.class))) ; } @Test void initializeRaisesAnExceptionIfTheGlobalBestIsNull() { assertThrows(NullParameterException.class, () -> new DefaultGlobalBestInitialization().initialize(new ArrayList<>(), null)) ; } @Test void initializeRaisesAnExceptionIfTheSwarmIsEmpty() { assertThrows(InvalidConditionException.class, () -> new DefaultGlobalBestInitialization().initialize(new ArrayList<>(), Mockito.mock(BoundedArchive.class))) ; } @Test void shouldInitializeReturnAGlobalBestArchiveWithASolution() { List<DoubleSolution> swarm = new ArrayList<>(); DoubleProblem problem = new FakeDoubleProblem(3, 2, 0) ; DoubleSolution particle = problem.createSolution() ; swarm.add(particle); BoundedArchive<DoubleSolution> archive = Mockito.mock(BoundedArchive.class) ; List<DoubleSolution> archiveList = List.of(particle) ; Mockito.when(archive.solutions()).thenReturn(archiveList) ; BoundedArchive<DoubleSolution> globalBest = new DefaultGlobalBestInitialization().initialize(swarm, archive) ; assertEquals(1, globalBest.solutions().size()); assertSame(particle, globalBest.solutions().get(0)); } }
[ "ajnebro@users.noreply.github.com" ]
ajnebro@users.noreply.github.com
3ac21845db7eec65523100fb4715aea7e0041559
943083da7372eb646d88bb03e63781e3520b81b9
/RMLBSK-POINT/src/com/rtmap/experience/core/model/UserInfo.java
a2012b88e6aa2c1de817b79f8821e8afdcd61344
[]
no_license
H3ll0W0lrd/dt_workspace
9ca4a0cd32b7990c5fcbd7f52474328b53891623
112efdcfab920ff66a034d2524a0aaa2f819b7a8
refs/heads/master
2022-01-08T09:37:27.990460
2018-08-03T14:56:02
2018-08-03T14:56:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
684
java
package com.rtmap.experience.core.model; import java.io.Serializable; public class UserInfo implements Serializable { private String key;// 认证key private int status; private String message; private String phone;//手机号 public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
[ "dingtao@yintaodeMacBook-Air.local" ]
dingtao@yintaodeMacBook-Air.local
7408910fd92611a5af0e71fa7de6244b7a03d91c
52c36ce3a9d25073bdbe002757f08a267abb91c6
/src/main/java/com/alipay/api/response/AlipayMobileStdPublicMessageCustomSendResponse.java
267a35142d09179a9fc22a6c375f667461ac890d
[ "Apache-2.0" ]
permissive
itc7/alipay-sdk-java-all
d2f2f2403f3c9c7122baa9e438ebd2932935afec
c220e02cbcdda5180b76d9da129147e5b38dcf17
refs/heads/master
2022-08-28T08:03:08.497774
2020-05-27T10:16:10
2020-05-27T10:16:10
267,271,062
0
0
Apache-2.0
2020-05-27T09:02:04
2020-05-27T09:02:04
null
UTF-8
Java
false
false
397
java
package com.alipay.api.response; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.mobile.std.public.message.custom.send response. * * @author auto create * @since 1.0, 2019-03-08 15:29:11 */ public class AlipayMobileStdPublicMessageCustomSendResponse extends AlipayResponse { private static final long serialVersionUID = 3284998266351946812L; }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
5187b56ad94acb0a9e798b26747a644340baa1ce
791ddf4cbc563f533e7d00a9259e24fe85008877
/kernel/src/test/java/org/jboss/test/kernel/annotations/support/FactoryMethodBadAnnotationTester.java
0600bea1c6b4baeafb4ee5a77a029e0b364bbe7b
[]
no_license
wolfc/microcontainer
7dd1fe85057c31575458ad1a22c3f74534f72bd0
4ef8127e690e18f54f40287b72f68dbf3541b07c
refs/heads/master
2020-04-25T23:27:30.830476
2013-01-09T14:15:50
2013-01-09T14:15:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,627
java
/* * JBoss, Home of Professional Open Source * Copyright 2006, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.test.kernel.annotations.support; import org.jboss.beans.metadata.api.annotations.FactoryMethod; /** * @author <a href="mailto:ales.justin@jboss.com">Ales Justin</a> */ public class FactoryMethodBadAnnotationTester implements AnnotationTester { private String value; private FactoryMethodBadAnnotationTester(String value) { this.value = value; } public String getValue() { return value; } @FactoryMethod public AnnotationTester getTester() { return new FactoryMethodBadAnnotationTester("FromAnnotations"); } }
[ "ajustin@redhat.com" ]
ajustin@redhat.com
ea2878acc3169242f026ab9696783d130d0f273b
b7f30a0a657039d1c3610f50c60f739a9efbfad8
/Java/designpatterns/src/abstractfactory/cars/FordFactory.java
42b582971e36f34a8e425d9874ef2c724c612f78
[]
no_license
SDP-SPIII-2020/sample-code
a454fbca21f3d114ded3b7e3131576b9d2fd9741
8b7629e76f267c6463857158b5dd9d3378877bfa
refs/heads/master
2020-12-09T22:29:04.168028
2020-04-25T17:33:38
2020-04-25T17:33:38
233,433,462
3
4
null
null
null
null
UTF-8
Java
false
false
250
java
package abstractfactory.cars; public class FordFactory implements CarFactoryInterface { @Override public CarEngine getEngine() { return new FordEngine(); } @Override public CarWindow getWindow() { return new FordWindow(); } }
[ "keith@dcs.bbk.ac.uk" ]
keith@dcs.bbk.ac.uk
a726ab6c40d1e83aa65ab3178c6a2c55ddb0977c
109c6e1ec35e33602288a436eb16dc571b82e945
/example/src/main/java/com/chan_wen/app/MPlayerUtil/IMDisplay.java
7f71fdfe0c6318a7297478e4eb459057030f9364
[]
no_license
hutaodediannao/AndroidTV-master
b5c786f4282723f54820f3bf585da5e2009af17c
620229d1133236fbe08a6b1026da48ef658c7ebe
refs/heads/master
2020-05-30T09:10:26.659336
2019-06-17T16:53:27
2019-06-17T16:53:27
189,636,285
1
1
null
null
null
null
UTF-8
Java
false
false
370
java
/* * * IMDisplay.java * * Created by Wuwang on 2016/9/29 * Copyright © 2016年 深圳哎吖科技. All rights reserved. */ package com.chan_wen.app.MPlayerUtil; import android.view.SurfaceHolder; import android.view.View; /** * Description: */ public interface IMDisplay extends IMPlayListener { View getDisplayView(); SurfaceHolder getHolder(); }
[ "643759269@qq.com" ]
643759269@qq.com
511d7a078ab6260e26484f8f25b6b6ff4e3baa5d
3f11806af42888e5716a4e2eae672a1cd51ceacd
/ph-edifact/ph-edifact-toxml/src/main/java/org/spunk/edifact/node/DataElement.java
f2ca87e3d83a21a1279925f3b14494e8bc651172
[ "Apache-2.0" ]
permissive
phax/graveyard
1ba1e15cec3ed187b012bfe2fb4810333f657bef
5601a10d51c159c965a934975ae44ce440572d22
refs/heads/master
2023-08-27T20:38:29.514832
2019-03-27T09:50:34
2019-03-27T09:50:34
50,441,450
0
0
null
null
null
null
UTF-8
Java
false
false
2,013
java
/** * Copyright 2012 A. Nonymous * Copyright (C) 2016 Philip Helger (www.helger.com) * philip[at]helger[dot]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 org.spunk.edifact.node; import java.io.Serializable; import javax.annotation.Nonnegative; import javax.annotation.Nonnull; import javax.annotation.Nullable; import com.helger.commons.annotation.ReturnsMutableCopy; import com.helger.commons.collection.ext.CommonsArrayList; import com.helger.commons.collection.ext.ICommonsList; /** * DataElement. */ public class DataElement implements Serializable { private final ICommonsList <Component> m_aComponents = new CommonsArrayList<> (); /** * Constructor. */ public DataElement () {} /** * Getter. * * @return components. */ @Nonnull @ReturnsMutableCopy public ICommonsList <Component> getAllComponents () { return m_aComponents.getClone (); } @Nonnegative public int getComponentCount () { return m_aComponents.size (); } @Nullable public Component getComponentAtIndex (final int nIndex) { return m_aComponents.get (nIndex); } /** * Append a new data element component. * * @return The newly appended component. */ public Component nextComponent () { final Component component = new Component (); m_aComponents.add (component); return component; } /** * {@inheritDoc} */ @Override public String toString () { return m_aComponents.toString (); } }
[ "philip@helger.com" ]
philip@helger.com
402363ca8cf9648321f16c3f71f9f8a6ca5b403f
6c65b892e2f931ff0c67d2932b0bd4f3368baaad
/app/src/main/java/com/mao/cn/learnDevelopProject/ui/activity/annotation/ViewUtils.java
f8a64c68267c11492a1981bacb4eda5d464b3fc2
[]
no_license
maoai-xianyu/LearnDevelopProject
e262bac7e2db7c8d0de7c977ad96bed5870277e6
5efafab1df566a92792304811e67f7a1e4ed87d1
refs/heads/master
2021-07-21T16:12:47.862651
2020-10-24T03:41:34
2020-10-24T03:41:34
137,330,396
0
0
null
null
null
null
UTF-8
Java
false
false
1,077
java
package com.mao.cn.learnDevelopProject.ui.activity.annotation; import android.app.Activity; import android.view.View; import java.lang.reflect.Field; /** * @author zhangkun * @time 2020-03-20 23:33 */ public class ViewUtils { public static void inject(Activity activity) { // 1. 获取所有属性 通过反射获取 Field[] declaredFields = activity.getClass().getDeclaredFields(); // 2. 过滤关于 ViewById 属性 for (Field field : declaredFields) { ViewById viewById = field.getAnnotation(ViewById.class); if (viewById != null){ // 3. findViewById() View view = activity.findViewById(viewById.value()); // 4. 反射注入 field.setAccessible(true); try { // activity 属性所在类,view 代表是属性的值 field.set(activity,view); } catch (IllegalAccessException e) { e.printStackTrace(); } } } } }
[ "194264514@qq.com" ]
194264514@qq.com
46c043cb7b8fd31f6a75f88e7efa1d0b7f8ba83e
9cd45a02087dac52ea4d39a0c17e525c11a8ed97
/src/java/com/tapjoy/GCMReceiver.java
dcd40bb5f3fd3b6599d14f27d53a65429c62444f
[]
no_license
abhijeetvaidya24/INFO-NDVaidya
fffb90b8cb4478399753e3c13c4813e7e67aea19
64d69250163e2d8d165e8541aec75b818c2d21c5
refs/heads/master
2022-11-29T16:03:21.503079
2020-08-12T06:00:59
2020-08-12T06:00:59
286,928,296
0
0
null
null
null
null
UTF-8
Java
false
false
774
java
/* * Decompiled with CFR 0.0. * * Could not load the following classes: * android.content.BroadcastReceiver * android.content.Context * android.content.Intent * android.os.Bundle * com.tapjoy.internal.ge * java.lang.String */ package com.tapjoy; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import com.tapjoy.internal.ge; public class GCMReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { boolean bl = ge.b((Context)context).a(intent); if (this.isOrderedBroadcast()) { this.setResult(-1, null, null); if (bl) { this.abortBroadcast(); } } } }
[ "abhijeetvaidya24@gmail.com" ]
abhijeetvaidya24@gmail.com
d0d6a344874f62b0a98909fe629a8a3eee100d70
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/redsolution_xabber-android/xabber/src/main/java/com/xabber/android/data/xaccount/ClientSettingsDeserializer.java
7bacce4e1aa38e5df589cf9f26658cccb6c394ca
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,062
java
// isComment package com.xabber.android.data.xaccount; import com.google.gson.JsonArray; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import org.json.JSONObject; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; public class isClassOrIsInterface implements JsonDeserializer<AuthManager.ListClientSettingsDTO> { private List<AuthManager.ClientSettingsDTO> isVariable; private List<AuthManager.DeletedDTO> isVariable; @Override public AuthManager.ListClientSettingsDTO isMethod(JsonElement isParameter, Type isParameter, JsonDeserializationContext isParameter) throws JsonParseException { isNameExpr = new ArrayList<>(); isNameExpr = new ArrayList<>(); JsonArray isVariable = isNameExpr.isMethod().isMethod("isStringConstant").isMethod(); for (int isVariable = isIntegerConstant; isNameExpr < isNameExpr.isMethod(); isNameExpr++) { JsonElement isVariable = isNameExpr.isMethod(isNameExpr); AuthManager.ClientSettingsDTO isVariable = isNameExpr.isMethod(isNameExpr, AuthManager.ClientSettingsDTO.class); isNameExpr.isMethod(isNameExpr); } JsonElement isVariable = isNameExpr.isMethod().isMethod("isStringConstant").isMethod(); AuthManager.OrderDataDTO isVariable = isNameExpr.isMethod(isNameExpr, AuthManager.OrderDataDTO.class); JsonArray isVariable = isNameExpr.isMethod().isMethod("isStringConstant").isMethod(); for (int isVariable = isIntegerConstant; isNameExpr < isNameExpr.isMethod(); isNameExpr++) { JsonElement isVariable = isNameExpr.isMethod(isNameExpr); AuthManager.DeletedDTO isVariable = isNameExpr.isMethod(isNameExpr, AuthManager.DeletedDTO.class); isNameExpr.isMethod(isNameExpr); } return new AuthManager.ListClientSettingsDTO(isNameExpr, isNameExpr, isNameExpr); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
402dd5dc545e38851b66e139a87e6af473b294d2
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MOCKITO-3b-1-1-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/mockito/internal/invocation/InvocationMatcher_ESTest.java
91e951773f1f57386ea3d6195bff38b0ce7c3f77
[]
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
572
java
/* * This file was automatically generated by EvoSuite * Sun Apr 05 11:50:25 UTC 2020 */ package org.mockito.internal.invocation; 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 InvocationMatcher_ESTest extends InvocationMatcher_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
6415b71d23b375926d6a0eeb984ea709d26add3c
f841aaa90907057b8125d1d76654862027966214
/gen/org/elixir_lang/psi/ElixirStab.java
e6de5258c6b1938fcd7e900f05e56d5050f65f20
[ "Apache-2.0" ]
permissive
niknetniko/intellij-elixir
7316869aa4b557e985755c3d0a2ddffe23d19af2
2451d44ca69bff210853a2397182b50e0744a014
refs/heads/master
2021-08-15T11:51:55.853621
2020-09-18T20:12:10
2020-09-18T20:13:45
233,114,600
0
0
NOASSERTION
2020-01-10T19:15:51
2020-01-10T19:15:50
null
UTF-8
Java
false
true
516
java
// This is a generated file. Not intended for manual editing. package org.elixir_lang.psi; import com.ericsson.otp.erlang.OtpErlangObject; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.List; public interface ElixirStab extends Quotable { @NotNull List<ElixirEndOfExpression> getEndOfExpressionList(); @Nullable ElixirStabBody getStabBody(); @NotNull List<ElixirStabOperation> getStabOperationList(); @NotNull OtpErlangObject quote(); }
[ "Kronic.Deth@gmail.com" ]
Kronic.Deth@gmail.com
749edc5311d675b04d73af5cf05077238e63a804
480beb8e6931f9492969b6bd5dc25c4877dab576
/backtracking/Boj2549.java
09e6f9117dda51f43dd6978582b317eb96582837
[]
no_license
wonseok5893/algorithm
a2905de9abf7b9dc538aaec334ac75996f45b6d3
8c00674321ffa1ee61a2552e425102cf0bcf714c
refs/heads/master
2023-05-28T03:24:25.264814
2021-05-28T07:48:51
2021-05-28T07:48:51
296,323,238
1
0
null
null
null
null
UTF-8
Java
false
false
566
java
package backtracking; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Boj2549 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader( System.in )); int[][] graph = new int[4][4]; for (int i = 0; i < 4; i++) { graph[i] = Arrays.stream(br.readLine().split("")) .mapToInt(Integer::parseInt).toArray(); } // } }
[ "wonseok5893@naver.com" ]
wonseok5893@naver.com
6dc8f8b9f61fadc5742e32fc2cea4c3d0422e6b0
acab104246006355bc0ee0d5bc10451a1f14ac34
/blog-springboot/src/main/java/com/zzx/model/entity/MailMessage.java
17b9cdeb8432fb47536a922d95cb9fab0372d4ac
[ "Apache-2.0" ]
permissive
MQPearth/Blog
9b92c01a8336ea0c5967e1d5bdc2579f7761ab61
a0d23362c84d3c26453105367f2549d9d5428b87
refs/heads/master
2023-07-21T21:51:33.502658
2023-06-13T07:55:03
2023-06-13T07:55:03
191,179,907
610
181
Apache-2.0
2023-07-13T13:36:53
2019-06-10T14:06:20
Java
UTF-8
Java
false
false
694
java
package com.zzx.model.entity; import org.springframework.beans.factory.annotation.Value; import org.springframework.mail.SimpleMailMessage; import org.springframework.stereotype.Component; /** * 对SimpleMailMessage进行一层封装 */ @Component public class MailMessage { @Value("${spring.mail.username}") private String fromMail; private MailMessage() { } public SimpleMailMessage create(String toMail, String subject, String text) { SimpleMailMessage message = new SimpleMailMessage(); message.setFrom(fromMail); message.setTo(toMail); message.setSubject(subject); message.setText(text); return message; } }
[ "null" ]
null
c78bd793d0de575a5e728cb28a9215696d23afa8
0fba221d6ae9decbec140102e730b8747de75d4e
/chat/src/main/java/cn/wildfire/chat/third/location/ui/activity/ShowLocationActivity.java
b59d6a62197c90e10f673561ebbe1e17bec98781
[ "MIT" ]
permissive
shaohui93/android-chat
625a6bb18a60ccaebcdd9f8c2d5ce4f1016458ad
83debca7e78eb8ecc4acbe7622b4c2ec28147a28
refs/heads/master
2020-04-20T08:21:26.219024
2019-02-01T08:49:17
2019-02-01T08:49:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,779
java
package cn.wildfire.chat.third.location.ui.activity; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.view.View; import android.widget.Button; import android.widget.ImageButton; import android.widget.RelativeLayout; import com.tencent.map.geolocation.TencentLocation; import com.tencent.map.geolocation.TencentLocationListener; import com.tencent.mapsdk.raster.model.LatLng; import com.tencent.tencentmap.mapsdk.map.MapView; import com.tencent.tencentmap.mapsdk.map.TencentMap; import androidx.recyclerview.widget.RecyclerView; import butterknife.Bind; import cn.wildfire.chat.third.location.ui.base.BaseActivity; import cn.wildfire.chat.third.location.ui.presenter.MyLocationAtPresenter; import cn.wildfire.chat.third.location.ui.view.IMyLocationAtView; import cn.wildfirechat.chat.R; /** * @创建者 CSDN_LQR * @描述 */ public class ShowLocationActivity extends BaseActivity<IMyLocationAtView, MyLocationAtPresenter> implements IMyLocationAtView, TencentLocationListener, SensorEventListener { private TencentMap mTencentMap; private double mLat; private double mLong; @Bind(R.id.confirmButton) Button mBtnToolbarSend; @Bind(R.id.rlMap) RelativeLayout mRlMap; @Bind(R.id.map) MapView mMap; @Bind(R.id.ibShowLocation) ImageButton mIbShowLocation; @Override public void initView() { mBtnToolbarSend.setVisibility(View.VISIBLE); mTencentMap = mMap.getMap(); mBtnToolbarSend.setVisibility(View.INVISIBLE); } @Override public void initData() { mLat = getIntent().getDoubleExtra("Lat", 0); mLong = getIntent().getDoubleExtra("Long", 0); String title = getIntent().getStringExtra("title"); setToolbarTitle(title); mTencentMap.setCenter(new LatLng(mLat, mLong)); } @Override public void initListener() { mBtnToolbarSend.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { } }); } @Override protected MyLocationAtPresenter createPresenter() { return null; } @Override protected int provideContentViewId() { return R.layout.location_activity_show_location; } @Override public void onLocationChanged(TencentLocation tencentLocation, int i, String s) { } @Override public void onStatusUpdate(String s, int i, String s1) { String desc = ""; switch (i) { case STATUS_DENIED: desc = "权限被禁止"; break; case STATUS_DISABLED: desc = "模块关闭"; break; case STATUS_ENABLED: desc = "模块开启"; break; case STATUS_GPS_AVAILABLE: desc = "GPS可用,代表GPS开关打开,且搜星定位成功"; break; case STATUS_GPS_UNAVAILABLE: desc = "GPS不可用,可能 gps 权限被禁止或无法成功搜星"; break; case STATUS_LOCATION_SWITCH_OFF: desc = "位置信息开关关闭,在android M系统中,此时禁止进行wifi扫描"; break; case STATUS_UNKNOWN: break; default: break; } } @Override public void onSensorChanged(SensorEvent event) { // if (myLocation != null) { // myLocation.setRotation(event.values[0]); // } } @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { } @Override public RecyclerView getRvPOI() { return null; } }
[ "imndxx@gmail.com" ]
imndxx@gmail.com
b0f7a4ce96e99d23e950e0c4d3cc3e5b47d08861
1f5c9b19b09f0fad775a5bb07473690ae6b0c814
/salebusirule/src/private/nc/bs/so/custmatrel/rule/CustMatRelPriorityRule.java
08dd4d752853de737c63c0f6e08735c8b1b619a8
[]
no_license
hdulqs/NC65_SCM_SO
8e622a7bb8c2ccd1b48371eedd50591001cd75c0
aaf762285b10e7fef525268c2c90458aa4290bf6
refs/heads/master
2020-05-19T01:23:50.824879
2018-07-04T09:41:39
2018-07-04T09:41:39
null
0
0
null
null
null
null
GB18030
Java
false
false
2,755
java
package nc.bs.so.custmatrel.rule; import nc.impl.pubapp.env.BSContext; import nc.impl.pubapp.pattern.rule.IRule; import nc.itf.so.pub.para.IPriorityCode; import nc.vo.so.custmatrel.entity.CustMatRelBVO; import nc.vo.so.custmatrel.entity.CustMatRelVO; import nc.vo.so.pub.para.CustBaseclPriorityCode; import nc.vo.so.pub.para.CustSaleclPriorityCode; import nc.vo.so.pub.para.MarBaseclPriorityCode; import nc.vo.so.pub.para.MarSaleclPriorityCode; import nc.vo.so.pub.para.SinglePriorityCode; import nc.vo.so.pub.util.BaseSaleClassUtil; import nc.vo.so.pub.util.PriorityCodeGenUtil; /** * @description * 销售客户物料关系保存前设置优先码(销售组织 (00) + 物料(0) + 物料分类(00) + 客户(0) + 客户分类) * @scene * 销售客户物料关系新增、修改保存前 * @param * 无 */ public class CustMatRelPriorityRule implements IRule<CustMatRelVO> { @Override public void process(CustMatRelVO[] vos) { for (CustMatRelVO vo : vos) { this.setPriority(vo); } } private IPriorityCode[] getPriorityCodeItems(CustMatRelBVO bvo, boolean ismarbase, boolean iscustbase) { String pk_org = bvo.getPk_org(); if (null == pk_org) { pk_org = BSContext.getInstance().getGroupID(); } IPriorityCode[] codeitems = new IPriorityCode[4]; // 物料 codeitems[0] = new SinglePriorityCode(bvo.getPk_material()); // 物料分类 if (ismarbase) { codeitems[1] = new MarBaseclPriorityCode(bvo.getPk_materialbaseclass(), pk_org); } else { codeitems[1] = new MarSaleclPriorityCode(bvo.getPk_materialsaleclass(), pk_org); } // 客户 codeitems[2] = new SinglePriorityCode(bvo.getPk_customer()); // 客户分类 if (iscustbase) { codeitems[3] = new CustBaseclPriorityCode(bvo.getPk_custbaseclass(), pk_org); } else { codeitems[3] = new CustSaleclPriorityCode(bvo.getPk_custsaleclass(), pk_org); } return codeitems; } /** * 设置优先码 * * @param vo */ private void setPriority(CustMatRelVO vo) { // 优先码生成规则 销售组织 (00) + 物料(0) + 物料分类(00) + 客户(0) + 客户分类 String pk_group = BSContext.getInstance().getGroupID(); boolean ismarbase = BaseSaleClassUtil.isMarBaseClass(pk_group); boolean iscustbase = BaseSaleClassUtil.isCustBaseClass(pk_group); CustMatRelBVO[] bvos = vo.getChildrenVO(); if (null == bvos) { return; } for (CustMatRelBVO bvo : bvos) { IPriorityCode[] pricodeitems = this.getPriorityCodeItems(bvo, ismarbase, iscustbase); String pricode = PriorityCodeGenUtil.genPriorityCode(pricodeitems); bvo.setCprioritycode(pricode); } } }
[ "944482059@qq.com" ]
944482059@qq.com
3bf6b6472e2467f998eb5d5b3d49074befc7c6a9
627dafa165ee4420680b4144c849e141596ae0b0
/wecardio/wecardio/src/main/java/com/borsam/service/pub/impl/MailServiceImpl.java
5db6548d87ea0ddefe2065f9d8cb5a5f64aab06b
[]
no_license
tan-tian/wecardio
97339383a00ecd090dd952ea3c4c3f32dac8a6f2
5e291d19bce2d4cebd43040e4195a26d18d947c3
refs/heads/master
2020-04-03T01:01:57.429064
2018-10-25T15:26:50
2018-10-25T15:26:50
154,917,227
0
0
null
null
null
null
UTF-8
Java
false
false
5,795
java
package com.borsam.service.pub.impl; import com.borsam.pub.UserType; import com.borsam.repository.entity.token.AccountToken; import com.borsam.service.pub.MailService; import com.hiteam.common.util.ConfigUtils; import com.hiteam.common.web.I18Util; import freemarker.template.Configuration; import freemarker.template.Template; import org.springframework.core.task.TaskExecutor; import org.springframework.mail.javamail.JavaMailSenderImpl; import org.springframework.mail.javamail.MimeMessageHelper; import org.springframework.stereotype.Service; import org.springframework.ui.freemarker.FreeMarkerTemplateUtils; import org.springframework.util.Assert; import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; import javax.annotation.Resource; import javax.mail.internet.MimeMessage; import java.util.HashMap; import java.util.Map; /** * Service - 邮件 * Created by tantian on 2015/6/23. */ @Service("mailServiceImpl") public class MailServiceImpl implements MailService { @Resource(name = "freeMarkerConfigurer") private FreeMarkerConfigurer freeMarkerConfigurer; @Resource(name = "javaMailSender") private JavaMailSenderImpl javaMailSender; @Resource(name = "taskExecutor") private TaskExecutor taskExecutor; /** * 添加邮件发送任务 * @param mimeMessage mimeMessage */ private void addSendTask(final MimeMessage mimeMessage) { taskExecutor.execute(new Runnable() { public void run() { javaMailSender.send(mimeMessage); } }); } @Override public void send(String host, Integer port, String username, String password, String from, String to, String subject, String templatePath, Map<String, Object> model, boolean async) { Assert.hasText(host); Assert.notNull(port); Assert.hasText(username); Assert.hasText(password); Assert.hasText(from); Assert.hasText(to); Assert.hasText(subject); Assert.hasText(templatePath); try { Configuration configuration = freeMarkerConfigurer.getConfiguration(); Template template = configuration.getTemplate(templatePath); String text = FreeMarkerTemplateUtils.processTemplateIntoString(template, model); javaMailSender.setHost(host); javaMailSender.setPort(port); javaMailSender.setUsername(username); javaMailSender.setPassword(password); MimeMessage mimeMessage = javaMailSender.createMimeMessage(); MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, false, "utf-8"); mimeMessageHelper.setFrom(from); mimeMessageHelper.setTo(to); mimeMessageHelper.setSubject(subject); mimeMessageHelper.setText(text, true); if (async) { addSendTask(mimeMessage); } else { javaMailSender.send(mimeMessage); } } catch (Exception e) { e.printStackTrace(); } } @Override public void send(String to, String subject, String templatePath, Map<String, Object> model, boolean async) { String host = ConfigUtils.config.getProperty("smtpHost"); Integer port = Integer.valueOf(ConfigUtils.config.getProperty("smtpPort")); String username = ConfigUtils.config.getProperty("smtpUsername"); String password = ConfigUtils.config.getProperty("smtpPassword"); String from = ConfigUtils.config.getProperty("smtpFromMail"); this.send(host, port, username, password, from, to, subject, templatePath, model, async); } @Override public void send(String to, String subject, String templatePath, Map<String, Object> model) { String host = ConfigUtils.config.getProperty("smtpHost"); Integer port = Integer.valueOf(ConfigUtils.config.getProperty("smtpPort")); String username = ConfigUtils.config.getProperty("smtpUsername"); String password = ConfigUtils.config.getProperty("smtpPassword"); String from = ConfigUtils.config.getProperty("smtpFromMail"); this.send(host, port, username, password, from, to, subject, templatePath, model, true); } @Override public void send(String to, String subject, String templatePath) { String host = ConfigUtils.config.getProperty("smtpHost"); Integer port = Integer.valueOf(ConfigUtils.config.getProperty("smtpPort")); String username = ConfigUtils.config.getProperty("smtpUsername"); String password = ConfigUtils.config.getProperty("smtpPassword"); String from = ConfigUtils.config.getProperty("smtpFromMail"); this.send(host, port, username, password, from, to, subject, templatePath, null, true); } @Override public void sendActiveMail(String to, String username, AccountToken token) { Map<String, Object> model = new HashMap<String, Object>(); model.put("username", username); model.put("token", token); String subject = I18Util.getMessage("org.register.mailSubject"); String activeMail = ConfigUtils.config.getProperty("activeMail"); send(to, subject, activeMail, model); } @Override public void sendFindPasswordMail(UserType userType, String to, String username, AccountToken token) { Map<String, Object> model = new HashMap<String, Object>(); model.put("userType", userType.getPath()); model.put("username", username); model.put("token", token); String subject = I18Util.getMessage("common.password.mailSubject"); String findPasswordMail = ConfigUtils.config.getProperty("findPasswordMail"); send(to, subject, findPasswordMail, model); } }
[ "tantiant@126.com" ]
tantiant@126.com
17a4327fc3e5e84da6850491e78144c382441542
da5940bdc8045d60063c5e8e1cdce9e8d9bd977a
/Licenta/src/org/w3/x2001/xmlSchema/SimpleExtensionType.java
1a262bf69742921dab0e8a6f1c57af4c45383d9c
[]
no_license
dorapolicarp/MyRepo
a9afb3fae31bb067041a62d1369ccc7e1bb67134
937632317a3187e756bec021c0719e4c7ed5f5f7
refs/heads/master
2021-03-12T22:07:03.287136
2013-05-11T10:36:13
2013-05-11T10:36:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,986
java
/* * XML Type: simpleExtensionType * Namespace: http://www.w3.org/2001/XMLSchema * Java type: org.w3.x2001.xmlSchema.SimpleExtensionType * * Automatically generated - do not modify. */ package org.w3.x2001.xmlSchema; /** * An XML simpleExtensionType(@http://www.w3.org/2001/XMLSchema). * * This is a complex type. */ public interface SimpleExtensionType extends org.w3.x2001.xmlSchema.ExtensionType { public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType) org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(SimpleExtensionType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s074985EFE4BCD563FC15DE11E5DA0167").resolveHandle("simpleextensiontypee0detype"); /** * A factory class with static methods for creating instances * of this type. */ public static final class Factory { public static org.w3.x2001.xmlSchema.SimpleExtensionType newInstance() { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType newInstance(org.apache.xmlbeans.XmlOptions options) { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); } /** @param xmlAsString the string value to parse */ public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); } /** @param file the file from which to load an xml document */ public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); } public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.w3.x2001.xmlSchema.SimpleExtensionType parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return (org.w3.x2001.xmlSchema.SimpleExtensionType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); } private Factory() { } // No instance of this class allowed } }
[ "dorapolicarp@gmail.com" ]
dorapolicarp@gmail.com
62f45302f854c7bce16a3a50e7a4da5257cc082c
74539d9e911ccfd18b0c13a526810be052eec77b
/src/com/google/gdata/model/atom/Category.java
b486ee289d709da726e64f44da9c5048c24b2f9c
[]
no_license
dovikn/inegotiate-android
723f12a3ee7ef46b980ee465b36a6a154e5adf6f
cea5e088b01ae4487d83cd1a84e6d2df78761a6e
refs/heads/master
2021-01-12T02:14:41.503567
2017-01-10T04:20:15
2017-01-10T04:20:15
78,492,148
0
1
null
null
null
null
UTF-8
Java
false
false
5,985
java
package com.google.gdata.model.atom; import com.google.gdata.client.GDataProtocol.Query; import com.google.gdata.data.ICategory; import com.google.gdata.model.AttributeKey; import com.google.gdata.model.Element; import com.google.gdata.model.ElementCreator; import com.google.gdata.model.ElementKey; import com.google.gdata.model.ElementMetadata; import com.google.gdata.model.ElementMetadata.Cardinality; import com.google.gdata.model.MetadataRegistry; import com.google.gdata.model.QName; import com.google.gdata.model.ValidationContext; import com.google.gdata.util.Namespaces; import com.google.gdata.util.common.base.Preconditions; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Category extends Element implements ICategory { public static final ElementKey<Void, Category> KEY; public static final AttributeKey<String> LABEL; public static final AttributeKey<String> SCHEME; public static final AttributeKey<String> TERM; public static final AttributeKey<String> XML_LANG; private static final Pattern categoryPattern; static { KEY = ElementKey.of(new QName(Namespaces.atomNs, Query.CATEGORY), Category.class); SCHEME = AttributeKey.of(new QName("scheme")); TERM = AttributeKey.of(new QName("term")); LABEL = AttributeKey.of(new QName("label")); XML_LANG = AttributeKey.of(new QName(Namespaces.xmlNs, "lang")); categoryPattern = Pattern.compile("(\\{([^\\}]+)\\})?(.+)"); } public static void registerMetadata(MetadataRegistry registry) { if (!registry.isRegistered(KEY)) { ElementCreator builder = registry.build(KEY).setCardinality(Cardinality.SET); builder.addAttribute(XML_LANG); builder.addAttribute(SCHEME); builder.addAttribute(TERM).setRequired(true); builder.addAttribute(LABEL); } } public Category() { super(KEY); } protected Category(ElementKey<?, ? extends Category> key) { super((ElementKey) key); } protected Category(ElementKey<?, ? extends Category> key, Element source) { super(key, source); } public Category(String category) { this(); Matcher m = categoryPattern.matcher(category); if (m.matches()) { if (m.group(2) != null) { setScheme(m.group(2)); } setTerm(m.group(3)); return; } throw new IllegalArgumentException("Invalid category: " + category); } public Category(String scheme, String term) { this(scheme, term, null); } public Category(String scheme, String term, String label) { this(); setScheme(scheme); if (term == null) { throw new NullPointerException("Invalid term. Cannot be null"); } setTerm(term); setLabel(label); } public Category lock() { return (Category) super.lock(); } public String getScheme() { return (String) getAttributeValue(SCHEME); } public void setScheme(String scheme) { setAttributeValue(SCHEME, (Object) scheme); } public String getTerm() { return (String) getAttributeValue(TERM); } public void setTerm(String term) { Preconditions.checkNotNull(term, "Null category term"); setAttributeValue(TERM, (Object) term); } public String getLabel() { return (String) getAttributeValue(LABEL); } public void setLabel(String label) { setAttributeValue(LABEL, (Object) label); } public String getLabelLang() { return (String) getAttributeValue(XML_LANG); } public void setLabelLang(String lang) { setAttributeValue(XML_LANG, (Object) lang); } protected Element narrow(ElementMetadata<?, ?> meta, ValidationContext vc) { return adapt(this, meta, getScheme()); } public String toString() { StringBuilder sb = new StringBuilder(); String scheme = getScheme(); if (scheme != null) { sb.append("{"); sb.append(scheme); sb.append("}"); } sb.append(getTerm()); String label = getLabel(); if (label != null) { sb.append("("); sb.append(label); sb.append(")"); } return sb.toString(); } public boolean equals(Object obj) { if (!(obj instanceof Category)) { return false; } Category other = (Category) obj; String scheme = getScheme(); if (scheme == null) { if (other.getScheme() != null) { return false; } } else if (!scheme.equals(other.getScheme())) { return false; } String term = getTerm(); if (term == null) { if (other.getTerm() != null) { return false; } } else if (!term.equals(other.getTerm())) { return false; } String label = getLabel(); if (label == null) { if (other.getLabel() != null) { return false; } } else if (!label.equals(other.getLabel())) { return false; } return true; } public int hashCode() { int hashCode; int i = 0; String scheme = getScheme(); if (scheme != null) { hashCode = scheme.hashCode(); } else { hashCode = 0; } int result = hashCode + 629; String term = getTerm(); int i2 = result * 37; if (term != null) { hashCode = term.hashCode(); } else { hashCode = 0; } result = i2 + hashCode; String label = getLabel(); hashCode = result * 37; if (label != null) { i = label.hashCode(); } return hashCode + i; } }
[ "dovik@dovik-macbookpro.roam.corp.google.com" ]
dovik@dovik-macbookpro.roam.corp.google.com
ab56ecd0472e66c25cd67115f4fcb5117a8ef7e7
dfbc143422bb1aa5a9f34adf849a927e90f70f7b
/Contoh Project/video walp/com/google/android/gms/common/internal/safeparcel/b.java
c44245ab47b03aeff542c33c4fbc480374f1c073
[]
no_license
IrfanRZ44/Set-Wallpaper
82a656acbf99bc94010e4f74383a4269e312a6f6
046b89cab1de482a9240f760e8bcfce2b24d6622
refs/heads/master
2020-05-18T11:18:14.749232
2019-05-01T04:17:54
2019-05-01T04:17:54
184,367,300
0
0
null
null
null
null
UTF-8
Java
false
false
6,232
java
package com.google.android.gms.common.internal.safeparcel; import android.os.Bundle; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; import java.util.List; public class b { public static int a(Parcel paramParcel) { return b(paramParcel, 20293); } public static void a(Parcel paramParcel, int paramInt) { c(paramParcel, paramInt); } public static void a(Parcel paramParcel, int paramInt, float paramFloat) { b(paramParcel, paramInt, 4); paramParcel.writeFloat(paramFloat); } public static void a(Parcel paramParcel, int paramInt1, int paramInt2) { b(paramParcel, paramInt1, 4); paramParcel.writeInt(paramInt2); } public static void a(Parcel paramParcel, int paramInt, long paramLong) { b(paramParcel, paramInt, 8); paramParcel.writeLong(paramLong); } public static void a(Parcel paramParcel, int paramInt, Bundle paramBundle, boolean paramBoolean) { if (paramBundle == null) { if (paramBoolean) { b(paramParcel, paramInt, 0); } return; } int i = b(paramParcel, paramInt); paramParcel.writeBundle(paramBundle); c(paramParcel, i); } public static void a(Parcel paramParcel, int paramInt, IBinder paramIBinder, boolean paramBoolean) { if (paramIBinder == null) { if (paramBoolean) { b(paramParcel, paramInt, 0); } return; } int i = b(paramParcel, paramInt); paramParcel.writeStrongBinder(paramIBinder); c(paramParcel, i); } public static void a(Parcel paramParcel, int paramInt1, Parcelable paramParcelable, int paramInt2, boolean paramBoolean) { if (paramParcelable == null) { if (paramBoolean) { b(paramParcel, paramInt1, 0); } return; } int i = b(paramParcel, paramInt1); paramParcelable.writeToParcel(paramParcel, paramInt2); c(paramParcel, i); } public static void a(Parcel paramParcel, int paramInt, String paramString, boolean paramBoolean) { if (paramString == null) { if (paramBoolean) { b(paramParcel, paramInt, 0); } return; } int i = b(paramParcel, paramInt); paramParcel.writeString(paramString); c(paramParcel, i); } public static void a(Parcel paramParcel, int paramInt, List<Integer> paramList, boolean paramBoolean) { if (paramList == null) { if (paramBoolean) { b(paramParcel, paramInt, 0); } return; } int i = b(paramParcel, paramInt); int j = paramList.size(); paramParcel.writeInt(j); for (int k = 0; k < j; k++) { paramParcel.writeInt(((Integer)paramList.get(k)).intValue()); } c(paramParcel, i); } public static void a(Parcel paramParcel, int paramInt, boolean paramBoolean) { b(paramParcel, paramInt, 4); if (paramBoolean) {} for (int i = 1;; i = 0) { paramParcel.writeInt(i); return; } } public static void a(Parcel paramParcel, int paramInt, byte[] paramArrayOfByte, boolean paramBoolean) { if (paramArrayOfByte == null) { if (paramBoolean) { b(paramParcel, paramInt, 0); } return; } int i = b(paramParcel, paramInt); paramParcel.writeByteArray(paramArrayOfByte); c(paramParcel, i); } public static <T extends Parcelable> void a(Parcel paramParcel, int paramInt1, T[] paramArrayOfT, int paramInt2, boolean paramBoolean) { if (paramArrayOfT == null) { if (paramBoolean) { b(paramParcel, paramInt1, 0); } return; } int i = b(paramParcel, paramInt1); int j = paramArrayOfT.length; paramParcel.writeInt(j); int k = 0; if (k < j) { T ? = paramArrayOfT[k]; if (? == null) { paramParcel.writeInt(0); } for (;;) { k++; break; a(paramParcel, ?, paramInt2); } } c(paramParcel, i); } public static void a(Parcel paramParcel, int paramInt, String[] paramArrayOfString, boolean paramBoolean) { if (paramArrayOfString == null) { if (paramBoolean) { b(paramParcel, paramInt, 0); } return; } int i = b(paramParcel, paramInt); paramParcel.writeStringArray(paramArrayOfString); c(paramParcel, i); } private static <T extends Parcelable> void a(Parcel paramParcel, T paramT, int paramInt) { int i = paramParcel.dataPosition(); paramParcel.writeInt(1); int j = paramParcel.dataPosition(); paramT.writeToParcel(paramParcel, paramInt); int k = paramParcel.dataPosition(); paramParcel.setDataPosition(i); paramParcel.writeInt(k - j); paramParcel.setDataPosition(k); } private static int b(Parcel paramParcel, int paramInt) { paramParcel.writeInt(0xFFFF0000 | paramInt); paramParcel.writeInt(0); return paramParcel.dataPosition(); } private static void b(Parcel paramParcel, int paramInt1, int paramInt2) { if (paramInt2 >= 65535) { paramParcel.writeInt(0xFFFF0000 | paramInt1); paramParcel.writeInt(paramInt2); return; } paramParcel.writeInt(paramInt1 | paramInt2 << 16); } public static void b(Parcel paramParcel, int paramInt, List<String> paramList, boolean paramBoolean) { if (paramList == null) { if (paramBoolean) { b(paramParcel, paramInt, 0); } return; } int i = b(paramParcel, paramInt); paramParcel.writeStringList(paramList); c(paramParcel, i); } private static void c(Parcel paramParcel, int paramInt) { int i = paramParcel.dataPosition(); int j = i - paramInt; paramParcel.setDataPosition(paramInt - 4); paramParcel.writeInt(j); paramParcel.setDataPosition(i); } } /* Location: C:\Users\IrfanRZ\Desktop\video walp\classes_dex2jar.jar * Qualified Name: com.google.android.gms.common.internal.safeparcel.b * JD-Core Version: 0.7.0.1 */
[ "irfan.rozal44@gmail.com" ]
irfan.rozal44@gmail.com
4d7766a9a30873e784f9d5e2659de24f140f516b
37d8b470e71ea6edff6ed108ffd2b796322b7943
/zcms/src/com/zving/bbs/admin/ForumUserGroupOption.java
9dddea8c805ce341fae29a2b55a891c64842aaa5
[]
no_license
haifeiforwork/myfcms
ef9575be5fc7f476a048d819e7c0c0f2210be8ca
fefce24467df59d878ec5fef2750b91a29e74781
refs/heads/master
2020-05-15T11:37:50.734759
2014-06-28T08:31:55
2014-06-28T08:31:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,637
java
package com.zving.bbs.admin; import com.zving.framework.Page; import com.zving.framework.data.DataTable; import com.zving.framework.data.QueryBuilder; import com.zving.framework.data.Transaction; import com.zving.framework.utility.HtmlUtil; import com.zving.framework.utility.Mapx; import com.zving.framework.utility.StringUtil; import com.zving.schema.ZCAdminGroupSchema; import com.zving.schema.ZCForumGroupSchema; import com.zving.schema.ZCForumMemberSchema; import com.zving.schema.ZCForumMemberSet; public class ForumUserGroupOption extends Page { public static Mapx init(Mapx params) { return params; } public static Mapx initBasic(Mapx params) { ZCForumGroupSchema userGroup = new ZCForumGroupSchema(); userGroup.setID(params.getString("ID")); userGroup.fill(); params = userGroup.toMapx(); Mapx map = new Mapx(); map.put("Y", "允许"); map.put("N", "不允许"); if ((StringUtil.isEmpty(userGroup.getSystemName())) || (!(userGroup.getSystemName().equals("游客")))) { params.put("AllowHeadImage", HtmlUtil.mapxToRadios("AllowHeadImage", map, userGroup .getAllowHeadImage())); params.put("AllowNickName", HtmlUtil.mapxToRadios("AllowNickName", map, userGroup .getAllowNickName())); params.put("AllowPanel", HtmlUtil.mapxToRadios("AllowPanel", map, userGroup .getAllowPanel())); } else { params.put("AllowHeadImage", "不允许"); params.put("AllowNickName", "不允许"); params.put("AllowPanel", "不允许"); } params.put("AllowUserInfo", HtmlUtil.mapxToRadios("AllowUserInfo", map, userGroup .getAllowUserInfo())); params.put("AllowVisit", HtmlUtil .mapxToRadios("AllowVisit", map, userGroup.getAllowVisit())); params.put("AllowSearch", HtmlUtil.mapxToRadios("AllowSearch", map, userGroup .getAllowSearch())); return params; } public static Mapx initPostOption(Mapx params) { ZCForumGroupSchema userGroup = new ZCForumGroupSchema(); userGroup.setID(params.getString("ID")); userGroup.fill(); params = userGroup.toMapx(); Mapx map = new Mapx(); map.put("Y", "允许"); map.put("N", "不允许"); if ((StringUtil.isEmpty(userGroup.getSystemName())) || (!(userGroup.getSystemName().equals("游客")))) { params.put("AllowTheme", HtmlUtil.mapxToRadios("AllowTheme", map, userGroup .getAllowTheme())); params.put("AllowReply", HtmlUtil.mapxToRadios("AllowReply", map, userGroup .getAllowReply())); params.put("Verify", HtmlUtil.mapxToRadios("Verify", map, userGroup.getVerify())); } else { params.put("AllowTheme", "不允许"); params.put("AllowReply", "不允许"); params.put("Verify", "不允许"); } return params; } public void editSave() { Transaction trans = new Transaction(); ZCForumGroupSchema userGroup = new ZCForumGroupSchema(); userGroup.setID($V("ID")); userGroup.fill(); userGroup.setValue(this.Request); trans.add(userGroup, 2); if (trans.commit()) this.Response.setLogInfo(1, "设置成功!"); else this.Response.setLogInfo(0, "操作失败!"); } public static Mapx initSpecailOption(Mapx params) { long SiteID = ForumUtil.getCurrentBBSSiteID(); ZCForumGroupSchema userGroup = new ZCForumGroupSchema(); userGroup.setID(params.getString("ID")); userGroup.fill(); params = userGroup.toMapx(); Mapx map = new Mapx(); map.put("Y", "允许"); map.put("N", "不允许"); params.put("AllowVisit", HtmlUtil .mapxToRadios("AllowVisit", map, userGroup.getAllowVisit())); params.put("AllowSearch", HtmlUtil.mapxToRadios("AllowSearch", map, userGroup .getAllowSearch())); params.put("AllowHeadImage", HtmlUtil.mapxToRadios("AllowHeadImage", map, userGroup .getAllowHeadImage())); params.put("AllowUserInfo", HtmlUtil.mapxToRadios("AllowUserInfo", map, userGroup .getAllowUserInfo())); params.put("AllowNickName", HtmlUtil.mapxToRadios("AllowNickName", map, userGroup .getAllowNickName())); String sql = "select a.Name,b.GroupID from ZCForumGroup a,ZCAdminGroup b where a.SiteID=" + SiteID + " and b.SiteID=" + SiteID + " and a.ID=b.GroupID and a.type='2' and a.SystemName<>'系统管理员'"; DataTable dt = new QueryBuilder(sql).executeDataTable(); params.put("AdminGroup", HtmlUtil.dataTableToOptions(dt, userGroup.getRadminID())); return params; } public void editSpecialSave() { String sqlSiteID = "SiteID=" + ForumUtil.getCurrentBBSSiteID(); Transaction trans = new Transaction(); ZCForumGroupSchema userGroup = new ZCForumGroupSchema(); userGroup.setID($V("ID")); userGroup.fill(); userGroup.setValue(this.Request); ZCAdminGroupSchema newGroup = new ZCAdminGroupSchema(); newGroup.setGroupID(userGroup.getID()); ZCAdminGroupSchema adminGroup; if (newGroup.fill()) { if ($V("RadminID").equals("0")) { trans.add(newGroup, 5); ZCForumMemberSet memberSet = new ZCForumMemberSchema().query(new QueryBuilder( "where " + sqlSiteID + " and UserGroupID=" + newGroup.getGroupID())); for (int i = 0; i < memberSet.size(); ++i) { memberSet.get(i).setAdminID(0L); } trans.add(memberSet, 2); } else { adminGroup = new ZCAdminGroupSchema(); adminGroup.setGroupID($V("RadminID")); adminGroup.fill(); newGroup = adminGroup; newGroup.setGroupID(userGroup.getID()); trans.add(newGroup, 2); ZCForumMemberSet memberSet = new ZCForumMemberSchema().query(new QueryBuilder( "where " + sqlSiteID + " and UserGroupID=" + newGroup.getGroupID())); for (int i = 0; i < memberSet.size(); ++i) { memberSet.get(i).setAdminID($V("RadminID")); } trans.add(memberSet, 2); } } else if (!($V("RadminID").equals("0"))) { adminGroup = new ZCAdminGroupSchema(); adminGroup.setGroupID($V("RadminID")); adminGroup.fill(); newGroup = adminGroup; newGroup.setGroupID(userGroup.getID()); trans.add(newGroup, 1); ZCForumMemberSet memberSet = new ZCForumMemberSchema().query(new QueryBuilder("where " + sqlSiteID + " and UserGroupID=" + newGroup.getGroupID())); for (int i = 0; i < memberSet.size(); ++i) { memberSet.get(i).setAdminID($V("RadminID")); } trans.add(memberSet, 2); } trans.add(userGroup, 2); if (trans.commit()) this.Response.setLogInfo(1, "设置成功!"); else this.Response.setLogInfo(0, "操作失败!"); } } /* * Location: F:\JAVA\Tomcat5.5\webapps\zcms\WEB-INF\classes\ Qualified Name: * com.zving.bbs.admin.ForumUserGroupOption JD-Core Version: 0.5.3 */
[ "yourfei@live.cn@c1c2bf6e-ae9d-b823-7fc2-ff1dc594729e" ]
yourfei@live.cn@c1c2bf6e-ae9d-b823-7fc2-ff1dc594729e
d11a3eda26dfc7b2fa5703bdbbcc47205df54242
57ec97caae6a381196ded23caa48bf3197eee0dd
/happylifeplat-transaction-tx-dubbo/src/main/java/com/happylifeplat/transaction/tx/dubbo/interceptor/DubboTxTransactionAspect.java
bef23b5afd0465b4c38bfd8596c23b2216f7f3bc
[ "Apache-2.0" ]
permissive
JackCaptain1015/HappyLifePlafTransactionStudy
7c1edad272402ce430f8d96d3a56b38b97b59bff
d0efb0037566e60d685ff524a7b62c9768418faf
refs/heads/master
2021-05-05T21:23:23.638814
2017-12-28T02:14:29
2017-12-28T02:14:29
115,574,925
0
2
null
null
null
null
UTF-8
Java
false
false
1,513
java
/* * * Copyright 2017-2018 549477611@qq.com(xiaoyu) * * This copyrighted material is made available to anyone wishing to use, modify, * copy, or redistribute it subject to the terms and conditions of the GNU * Lesser General Public License, as published by the Free Software Foundation. * * 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 distribution; if not, see <http://www.gnu.org/licenses/>. * */ package com.happylifeplat.transaction.tx.dubbo.interceptor; import com.happylifeplat.transaction.core.interceptor.AbstractTxTransactionAspect; import org.aspectj.lang.annotation.Aspect; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.Ordered; import org.springframework.stereotype.Component; /** * @author xiaoyu */ @Aspect @Component public class DubboTxTransactionAspect extends AbstractTxTransactionAspect implements Ordered { @Autowired public DubboTxTransactionAspect(DubboTxTransactionInterceptor dubboTxTransactionInterceptor) { this.setTxTransactionInterceptor(dubboTxTransactionInterceptor); } public void init() { } @Override public int getOrder() { return Ordered.HIGHEST_PRECEDENCE; } }
[ "yu.xiao@happylifeplat.com" ]
yu.xiao@happylifeplat.com
e5d960188cf18c29ceae501e7ba72d19962f7197
0fe59b1dfb5cf2454cef805da2804b2d3e52f742
/bee-platform-system/platform-user/src/main/java/com/bee/platform/user/authority/enums/EnumUserType.java
8821444ea4ce1fff8dbb293c375f5c1c1d901934
[]
no_license
wensheng930729/platform
f75026113a841e8541017c364d30b80e94d6ad5c
49c57f1f59b1e2e2bcc2529fdf6cb515d38ab55c
refs/heads/master
2020-12-11T13:58:59.772611
2019-12-16T06:02:40
2019-12-16T06:02:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package com.bee.platform.user.authority.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** * @author Raphael.dq * @date 2019/06/14 */ @AllArgsConstructor @Getter public enum EnumUserType { CONSOLE_USER(1, "后台用户"), CUSTOMER(0, "中台用户"); private Integer code; private String description; }
[ "414608036@qq.com" ]
414608036@qq.com
1758d191dcfad1abe4d0c91236a1d74b2ad6feb8
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
/SCT2/tags/22_RELEASE_2_4_0/test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/namedinterfaceaccess/NamedInterfaceAccessStatemachine.java
bc07a66d924ef31d3b87b78c3d084dd8ff95732b
[]
no_license
huybuidac20593/yakindu
377fb9100d7db6f4bb33a3caa78776c4a4b03773
304fb02b9c166f340f521f5e4c41d970268f28e9
refs/heads/master
2021-05-29T14:46:43.225721
2015-05-28T11:54:07
2015-05-28T11:54:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,884
java
package org.yakindu.scr.namedinterfaceaccess; public class NamedInterfaceAccessStatemachine implements INamedInterfaceAccessStatemachine { private final class SCISafeImpl implements SCISafe { private boolean open; public boolean isRaisedOpen() { return open; } private void raiseOpen() { open = true; } private boolean close; public boolean isRaisedClose() { return close; } private void raiseClose() { close = true; } public void clearEvents() { } public void clearOutEvents() { open = false; close = false; } } private SCISafeImpl sCISafe; private final class SCIUserImpl implements SCIUser { private boolean numberPressed; private long numberPressedValue; public void raiseNumberPressed(long value) { numberPressed = true; numberPressedValue = value; } private long getNumberPressedValue() { if (!numberPressed) throw new IllegalStateException( "Illegal event value acces. Event NumberPressed is not raised!"); return numberPressedValue; } private boolean reset; public void raiseReset() { reset = true; } public void clearEvents() { numberPressed = false; reset = false; } } private SCIUserImpl sCIUser; public enum State { region_1_Idle, region_1_Number1Pressed, region_1_Number2Pressed, region_1_Number3Pressed, _region1_Closed, _region1_Open, $NullState$ }; private long number1; private long number2; private long number3; private final State[] stateVector = new State[2]; private int nextStateIndex; public NamedInterfaceAccessStatemachine() { sCISafe = new SCISafeImpl(); sCIUser = new SCIUserImpl(); } public void init() { for (int i = 0; i < 2; i++) { stateVector[i] = State.$NullState$; } clearEvents(); clearOutEvents(); number1 = 3; number2 = 7; number3 = 5; } public void enter() { entryAction(); sCISafe.raiseClose(); nextStateIndex = 0; stateVector[0] = State.region_1_Idle; nextStateIndex = 1; stateVector[1] = State._region1_Closed; } public void exit() { switch (stateVector[0]) { case region_1_Idle : nextStateIndex = 0; stateVector[0] = State.$NullState$; break; case region_1_Number1Pressed : nextStateIndex = 0; stateVector[0] = State.$NullState$; break; case region_1_Number2Pressed : nextStateIndex = 0; stateVector[0] = State.$NullState$; break; case region_1_Number3Pressed : nextStateIndex = 0; stateVector[0] = State.$NullState$; break; default : break; } switch (stateVector[1]) { case _region1_Closed : nextStateIndex = 1; stateVector[1] = State.$NullState$; break; case _region1_Open : nextStateIndex = 1; stateVector[1] = State.$NullState$; break; default : break; } exitAction(); } /** * This method resets the incoming events (time events included). */ protected void clearEvents() { sCISafe.clearEvents(); sCIUser.clearEvents(); } /** * This method resets the outgoing events. */ protected void clearOutEvents() { sCISafe.clearOutEvents(); } /** * Returns true if the given state is currently active otherwise false. */ public boolean isStateActive(State state) { switch (state) { case region_1_Idle : return stateVector[0] == State.region_1_Idle; case region_1_Number1Pressed : return stateVector[0] == State.region_1_Number1Pressed; case region_1_Number2Pressed : return stateVector[0] == State.region_1_Number2Pressed; case region_1_Number3Pressed : return stateVector[0] == State.region_1_Number3Pressed; case _region1_Closed : return stateVector[1] == State._region1_Closed; case _region1_Open : return stateVector[1] == State._region1_Open; default : return false; } } public SCISafe getSCISafe() { return sCISafe; } public SCIUser getSCIUser() { return sCIUser; } /* Entry action for statechart 'NamedInterfaceAccess'. */ private void entryAction() { } /* Exit action for state 'NamedInterfaceAccess'. */ private void exitAction() { } /* The reactions of state Idle. */ private void reactRegion_1_Idle() { if (sCIUser.numberPressed && sCIUser.numberPressedValue == number1) { nextStateIndex = 0; stateVector[0] = State.$NullState$; nextStateIndex = 0; stateVector[0] = State.region_1_Number1Pressed; } } /* The reactions of state Number1Pressed. */ private void reactRegion_1_Number1Pressed() { if (sCIUser.numberPressed && sCIUser.numberPressedValue == number2) { nextStateIndex = 0; stateVector[0] = State.$NullState$; nextStateIndex = 0; stateVector[0] = State.region_1_Number2Pressed; } else { if (sCIUser.numberPressed) { nextStateIndex = 0; stateVector[0] = State.$NullState$; sCISafe.raiseClose(); nextStateIndex = 0; stateVector[0] = State.region_1_Idle; } } } /* The reactions of state Number2Pressed. */ private void reactRegion_1_Number2Pressed() { if (sCIUser.numberPressed && sCIUser.numberPressedValue == number3) { nextStateIndex = 0; stateVector[0] = State.$NullState$; sCISafe.raiseOpen(); nextStateIndex = 0; stateVector[0] = State.region_1_Number3Pressed; } else { if (sCIUser.numberPressed) { nextStateIndex = 0; stateVector[0] = State.$NullState$; sCISafe.raiseClose(); nextStateIndex = 0; stateVector[0] = State.region_1_Idle; } } } /* The reactions of state Number3Pressed. */ private void reactRegion_1_Number3Pressed() { if (sCIUser.numberPressed) { nextStateIndex = 0; stateVector[0] = State.$NullState$; sCISafe.raiseClose(); nextStateIndex = 0; stateVector[0] = State.region_1_Idle; } } /* The reactions of state Closed. */ private void reactRegion1_Closed() { if (sCISafe.open) { nextStateIndex = 1; stateVector[1] = State.$NullState$; nextStateIndex = 1; stateVector[1] = State._region1_Open; } } /* The reactions of state Open. */ private void reactRegion1_Open() { if (sCISafe.close) { nextStateIndex = 1; stateVector[1] = State.$NullState$; nextStateIndex = 1; stateVector[1] = State._region1_Closed; } } public void runCycle() { clearOutEvents(); for (nextStateIndex = 0; nextStateIndex < stateVector.length; nextStateIndex++) { switch (stateVector[nextStateIndex]) { case region_1_Idle : reactRegion_1_Idle(); break; case region_1_Number1Pressed : reactRegion_1_Number1Pressed(); break; case region_1_Number2Pressed : reactRegion_1_Number2Pressed(); break; case region_1_Number3Pressed : reactRegion_1_Number3Pressed(); break; case _region1_Closed : reactRegion1_Closed(); break; case _region1_Open : reactRegion1_Open(); break; default : // $NullState$ } } clearEvents(); } }
[ "a.muelder@googlemail.com" ]
a.muelder@googlemail.com
6c99129bbb7e0cbed2c59126bed21bd185575dc6
d4630f8976f7c815aa4ab00dfbba928b512e22ac
/vip-zookeeper/src/main/java/com/lxl/curator/CuratorCreateSessionDemo.java
7c99a7310b0701f7b94aa1cf59068abda585192c
[]
no_license
flayax/gupao-vip
b5fa863a4b45a1717dafc7765cfa682e8c0c7c2d
fdf138ce7349f723bd9728d208ea4da6929312a1
refs/heads/master
2020-05-28T13:41:00.361346
2019-04-24T01:59:22
2019-04-24T01:59:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
980
java
package com.lxl.curator; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.retry.ExponentialBackoffRetry; public class CuratorCreateSessionDemo { private final static String CONNECTSTRING = "192.168.122.139:2181"; public static void main(String[] args) { // 创建会话的两种方式 normal CuratorFramework curatorFramework= CuratorFrameworkFactory. newClient(CONNECTSTRING,5000,5000, new ExponentialBackoffRetry(1000,3)); curatorFramework.start(); //start方法启动连接 //fluent风格 CuratorFramework curatorFramework1=CuratorFrameworkFactory.builder().connectString(CONNECTSTRING).sessionTimeoutMs(5000). retryPolicy(new ExponentialBackoffRetry(1000,3)). namespace("node").build(); curatorFramework1.start(); System.out.println("success"); } }
[ "408030514@qq.com" ]
408030514@qq.com
2e8230042b3423ae943ca8994f95187eec363c4e
5fc0d72360f75e919f0f5a2a16c785dbf2973da3
/_src/six_seven/eclipse/SpringFreshFruitsStore/src_test/it/freshfruits/conf/Config.java
bd01d7b2b51d8adda77ad76804ff61be70da1fdd
[ "Apache-2.0" ]
permissive
paullewallencom/spring-978-1-8471-9402-2
ebfdf3de58ee6568097ea71a018b67cb91242964
2292afc1882aaf7694fe1fbfcfd4b3bcbdf7f994
refs/heads/main
2023-02-01T19:02:11.725803
2020-12-20T17:46:03
2020-12-20T17:46:03
319,443,305
0
0
null
null
null
null
UTF-8
Java
false
false
1,369
java
package it.freshfruits.conf; import java.io.IOException; import java.util.Properties; public class Config { public String getDbDriverProduction() { return dbDriverProduction; } public String getDbDriverDebug() { return dbDriverDebug; } public String getDbDriver() { return dbDriver; } public String getDbUser() { return dbUser; } public String getDbPass() { return dbPass; } public String getDbUrl() { return dbUrl; } public Config() { Properties props = new Properties(); try { props.load(Config.class.getResourceAsStream("/it/freshfruits/conf/config.properties")); } catch (IOException e) { e.printStackTrace(); } dbDriverProduction = props.getProperty("jdbc.production.driver"); dbDriverDebug = props.getProperty("jdbc.debug.driver"); dbDriver = props.getProperty("jdbc.driver"); dbUrl = props.getProperty("jdbc.url"); dbUser = props.getProperty("jdbc.username"); dbPass = props.getProperty("jdbc.password"); } private String dbDriverProduction; private String dbDriverDebug; private String dbDriver; private String dbUser; private String dbPass; private String dbUrl; }
[ "paullewallencom@users.noreply.github.com" ]
paullewallencom@users.noreply.github.com
ce37ac4cd0706a8b0a4f36ad49fb919b895e0943
d12608842c2ad5efb31c03fc901a1a58e0690d9e
/src/main/java/cn/bxd/sip/his/model/dto/platform/R.java
4c517e0c60899906b7e163e30e28fa8e14bfb38f
[]
no_license
haomeiling/hlp
fc69cf8dcc92b72f495784b4de7973e2f9128b47
cc826e0acd91b5cd4acdb253ceb1465659df1e97
refs/heads/master
2020-06-27T13:15:27.673382
2019-10-08T07:22:16
2019-10-08T07:22:16
199,963,146
0
0
null
null
null
null
UTF-8
Java
false
false
2,346
java
package cn.bxd.sip.his.model.dto.platform; import cn.bxd.sip.his.comm.HisConvertConst; import java.util.HashMap; import java.util.Map; /** * Description: 返回信息类 * Package: com.bxd.medicalinsurance.model.payBiz * * @author Leeves * @version 1.0.0 2018-08-18 */ public class R<T> extends HashMap<String, Object> { private static final long serialVersionUID = 1L; public R() { put(HisConvertConst.RETRUN_CODE, HisConvertConst.RETRUN_SUCCESS_CODE); put(HisConvertConst.RESULT_CODE, HisConvertConst.RESULT_SUCCESS_CODE); put(HisConvertConst.RETRUN_MSG, "处理成功"); } public static R sysError() { return sysError(HisConvertConst.RETRUN_FAIL_CODE, "处理失败"); } public static R sysError(String msg) { return sysError(HisConvertConst.RETRUN_FAIL_CODE, msg); } public static R sysError(String code, String msg) { R r = new R(); r.put(HisConvertConst.RETRUN_CODE, code); r.put(HisConvertConst.RETRUN_MSG, msg); return r; } public static R resultError() { return resultError(HisConvertConst.RETRUN_FAIL_CODE, "处理失败"); } public static R resultError(String msg) { return resultError(HisConvertConst.RETRUN_FAIL_CODE, msg); } public static R resultError(String code, String msg) { R r = new R(); r.put(HisConvertConst.RETRUN_CODE, HisConvertConst.RETRUN_SUCCESS_CODE); r.put(HisConvertConst.RESULT_CODE, code); r.put(HisConvertConst.RETRUN_MSG, msg); return r; } public static R ok(String msg) { R r = new R(); r.put(HisConvertConst.RESULT_CODE, HisConvertConst.RESULT_SUCCESS_CODE); r.put(HisConvertConst.RETRUN_MSG, msg); return r; } public static <T> R<T> ok(T t){ R<T> r = new R<>(); r.put(HisConvertConst.RESULT_CODE, HisConvertConst.RESULT_SUCCESS_CODE); r.put(HisConvertConst.RETRUN_MSG,t); return r; } public static R ok(Map<String, Object> map) { R r = new R(); r.putAll(map); return r; } @Override public R put(String key, Object value){ super.put(key,value); return this; } public static R ok() { return new R(); } public static void main(String[] args) { R ok = R.ok("123"); System.out.println(ok); /* R ok = R.ok("123"); String r = ok.get("returnMsg"); System.out.println(r);*/ } }
[ "48750800+haomeiling@users.noreply.github.com" ]
48750800+haomeiling@users.noreply.github.com
85cbd0bb4a41fecc2ef41fee5cd535e78f021569
5a01335f0076ac048c558d60bc20acedf1390cdd
/collect-core/src/main/java/org/openforis/collect/persistence/TaxonVernacularNameDao.java
5a6819fe289d1df7a4ce43bc1a496c60e07370a1
[]
no_license
Arbonaut/collect
c2fb05e8cf1e3c6ee8256a264c1e80157e5708da
989ee98fbe4d6db95eec003c042d76c7b6f08735
refs/heads/master
2021-01-18T12:26:40.178158
2013-05-14T19:28:58
2013-05-14T19:28:58
2,926,313
1
0
null
null
null
null
UTF-8
Java
false
false
5,520
java
package org.openforis.collect.persistence; import static org.openforis.collect.persistence.jooq.Sequences.OFC_TAXON_VERNACULAR_NAME_ID_SEQ; import static org.openforis.collect.persistence.jooq.tables.OfcTaxon.OFC_TAXON; import static org.openforis.collect.persistence.jooq.tables.OfcTaxonVernacularName.OFC_TAXON_VERNACULAR_NAME; import java.sql.Connection; import java.util.ArrayList; import java.util.List; import org.jooq.Record; import org.jooq.Result; import org.jooq.SelectConditionStep; import org.jooq.StoreQuery; import org.jooq.TableField; import org.openforis.collect.persistence.jooq.MappingJooqDaoSupport; import org.openforis.collect.persistence.jooq.MappingJooqFactory; import org.openforis.idm.model.species.TaxonVernacularName; import org.springframework.transaction.annotation.Transactional; /** * @author G. Miceli * @author S. Ricci * @author E. Wibowo */ @Transactional @SuppressWarnings({ "unchecked", "rawtypes" }) public class TaxonVernacularNameDao extends MappingJooqDaoSupport<TaxonVernacularName, TaxonVernacularNameDao.JooqFactory> { private static final TableField[] QUALIFIER_FIELDS = {OFC_TAXON_VERNACULAR_NAME.QUALIFIER1, OFC_TAXON_VERNACULAR_NAME.QUALIFIER2, OFC_TAXON_VERNACULAR_NAME.QUALIFIER3}; public TaxonVernacularNameDao() { super(TaxonVernacularNameDao.JooqFactory.class); } @Override public TaxonVernacularName loadById(int id) { return super.loadById(id); } @Override public void insert(TaxonVernacularName entity) { super.insert(entity); } @Override public void update(TaxonVernacularName entity) { super.update(entity); } @Override public void delete(int id) { super.delete(id); } public List<TaxonVernacularName> findByVernacularName(int taxonomyId, String searchString, int maxResults) { return findByVernacularName(taxonomyId, searchString, null, maxResults); } public List<TaxonVernacularName> findByVernacularName(int taxonomyId, String searchString, String[] qualifierValues, int maxResults) { JooqFactory jf = getMappingJooqFactory(); //find containing searchString = "%" + searchString.toUpperCase() + "%"; SelectConditionStep selectConditionStep = jf.select(OFC_TAXON_VERNACULAR_NAME.getFields()) .from(OFC_TAXON_VERNACULAR_NAME) .join(OFC_TAXON).on(OFC_TAXON.ID.equal(OFC_TAXON_VERNACULAR_NAME.TAXON_ID)) .where(OFC_TAXON.TAXONOMY_ID.equal(taxonomyId) .and(JooqFactory.upper(OFC_TAXON_VERNACULAR_NAME.VERNACULAR_NAME).like(searchString))); if ( qualifierValues != null ) { for (int i = 0; i < qualifierValues.length; i++) { String value = qualifierValues[i]; if ( value != null ) { TableField field = QUALIFIER_FIELDS[i]; selectConditionStep.and(field.equal(value)); } } } selectConditionStep.limit(maxResults); Result<?> result = selectConditionStep.fetch(); List<TaxonVernacularName> entities = jf.fromResult(result); return entities; } public List<TaxonVernacularName> findByTaxon(int taxonId) { JooqFactory jf = getMappingJooqFactory(); SelectConditionStep selectConditionStep = jf.select(OFC_TAXON_VERNACULAR_NAME.getFields()) .from(OFC_TAXON_VERNACULAR_NAME) .where(OFC_TAXON_VERNACULAR_NAME.TAXON_ID.equal(taxonId)); Result<?> result = selectConditionStep.fetch(); List<TaxonVernacularName> entities = jf.fromResult(result); return entities; } public void deleteByTaxonomy(int taxonomyId) { JooqFactory jf = getMappingJooqFactory(); SelectConditionStep selectTaxonIds = jf.select(OFC_TAXON.ID).from(OFC_TAXON).where(OFC_TAXON.TAXONOMY_ID.equal(taxonomyId)); jf.delete(OFC_TAXON_VERNACULAR_NAME).where(OFC_TAXON_VERNACULAR_NAME.TAXON_ID.in(selectTaxonIds)).execute(); } protected static class JooqFactory extends MappingJooqFactory<TaxonVernacularName> { private static final long serialVersionUID = 1L; public JooqFactory(Connection connection) { super(connection, OFC_TAXON_VERNACULAR_NAME.ID, OFC_TAXON_VERNACULAR_NAME_ID_SEQ, TaxonVernacularName.class); } @Override public void fromRecord(Record r, TaxonVernacularName t) { t.setId(r.getValue(OFC_TAXON_VERNACULAR_NAME.ID)); t.setVernacularName(r.getValue(OFC_TAXON_VERNACULAR_NAME.VERNACULAR_NAME)); t.setLanguageCode(r.getValue(OFC_TAXON_VERNACULAR_NAME.LANGUAGE_CODE)); t.setLanguageVariety(r.getValue(OFC_TAXON_VERNACULAR_NAME.LANGUAGE_VARIETY)); t.setTaxonSystemId(r.getValue(OFC_TAXON_VERNACULAR_NAME.TAXON_ID)); t.setStep(r.getValue(OFC_TAXON_VERNACULAR_NAME.STEP)); List<String> q = new ArrayList<String>(); for ( TableField field : QUALIFIER_FIELDS ) { q.add((String) r.getValue(field)); } t.setQualifiers(q); } @Override public void fromObject(TaxonVernacularName t, StoreQuery<?> q) { q.addValue(OFC_TAXON_VERNACULAR_NAME.ID, t.getId()); q.addValue(OFC_TAXON_VERNACULAR_NAME.VERNACULAR_NAME, t.getVernacularName()); q.addValue(OFC_TAXON_VERNACULAR_NAME.LANGUAGE_CODE, t.getLanguageCode()); q.addValue(OFC_TAXON_VERNACULAR_NAME.LANGUAGE_VARIETY, t.getLanguageVariety()); q.addValue(OFC_TAXON_VERNACULAR_NAME.TAXON_ID, t.getTaxonSystemId()); q.addValue(OFC_TAXON_VERNACULAR_NAME.STEP, t.getStep()); List<String> qualifiers = t.getQualifiers(); for (int i = 0; i < qualifiers.size(); i++) { q.addValue(QUALIFIER_FIELDS[i], qualifiers.get(i)); } } @Override protected void setId(TaxonVernacularName t, int id) { t.setId(id); } @Override protected Integer getId(TaxonVernacularName t) { return t.getId(); } } }
[ "stefano.ricci@fao.org" ]
stefano.ricci@fao.org
fe2b9b3819f8ad152f0a235da216125fcf0819f1
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/TIME-10b-2-9-Single_Objective_GGA-WeightedSum-BasicBlockCoverage-opt/org/joda/time/field/PreciseDurationDateTimeField_ESTest.java
cee6888d345c4a4f742b45480e2434fe60788881
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
1,952
java
/* * This file was automatically generated by EvoSuite * Mon Oct 25 22:19:02 UTC 2021 */ package org.joda.time.field; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.joda.time.DateTimeFieldType; import org.joda.time.DurationField; import org.joda.time.field.TestPreciseDurationDateTimeField; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class PreciseDurationDateTimeField_ESTest extends PreciseDurationDateTimeField_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { DateTimeFieldType dateTimeFieldType0 = mock(DateTimeFieldType.class, new ViolatedAssumptionAnswer()); DurationField durationField0 = mock(DurationField.class, new ViolatedAssumptionAnswer()); TestPreciseDurationDateTimeField.MockStandardBaseDateTimeField testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0 = new TestPreciseDurationDateTimeField.MockStandardBaseDateTimeField(); int int0 = (-1); testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0.addWrapField(0L, (-1)); testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0.getLeapAmount(3540L); testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0.add(0L, 0); testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0.isLeap(0L); testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0.add(899L, 3540L); testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0.set(0L, 0); long long0 = 0L; // Undeclared exception! testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0.set(0L, (-1)); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
9129fe3101438487a2c833f3c19bb318cb7044a5
540ff089fc1d0fa4aa6315b3922fb8b6d5e593c8
/src/main/java/com/redislabs/riot/redis/writer/search/aggregate/RandomSample.java
9bdaf636fef75a77bbeda87bf0e59631ed55ba19
[]
no_license
phanirajl/riot
f70243f21524f01191b24d54598bcd0c438f9ee4
4303da31b1e69f735756a4cc6839e25d9dc3b733
refs/heads/master
2020-06-01T14:31:29.530212
2019-06-07T18:59:25
2019-06-07T18:59:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
231
java
package com.redislabs.riot.redis.writer.search.aggregate; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) public class RandomSample extends PropertyReducer { private int size; }
[ "jruaux@gmail.com" ]
jruaux@gmail.com
5d7a7a3ab09b8d7a29833b090780a8d0e706ab72
da889968b2cc15fc27f974e30254c7103dc4c67e
/Optimization Algorithm_GUI/src/Algorithm_DoubleAuction/Lagrangian_Relaxation_PSO_Tanh_DA/Population.java
12278bf7a54392809ba6af50eeb683771983c132
[]
no_license
say88888/My_Project_thesis
fcd4d96b34de8627fa054146eb6164b7c3636344
04908ea3ed6b7a9c1939a5d8e16dfc65d66437f4
refs/heads/master
2020-04-10T08:32:37.106239
2018-12-08T05:52:44
2018-12-08T05:52:44
160,908,221
0
0
null
null
null
null
UTF-8
Java
false
false
2,855
java
package Algorithm_DoubleAuction.Lagrangian_Relaxation_PSO_Tanh_DA; public class Population extends Double_Auction_LRPSO_Tanh { Individual[] individuals; P_Individual[] P_individuals; G_Individual[] G_individuals; E_Individual[] E_individuals; V_Individual[] V_individuals; /* * Constructors 構造函數 */ // Create a population 創建一個人口 public Population(int populationSize, boolean initialise) { individuals = new Individual[populationSize]; P_individuals = new P_Individual[populationSize]; G_individuals = new G_Individual[1]; E_individuals = new E_Individual[1]; V_individuals = new V_Individual[populationSize]; // Initialise population 人口初始化 if (initialise) { G_Individual newGIndividual = new G_Individual(); newGIndividual.XglobalIndividual(); newGIndividual.YglobalIndividual(); saveG_Individual( newGIndividual); E_Individual newEIndividual = new E_Individual(); newEIndividual.XglobalIndividual(); newEIndividual.YglobalIndividual(); saveE_Individual( newEIndividual); // Loop and create individuals 循環並個體創建 for (int i = 0; i < size(); i++) { Individual newIndividual = new Individual(); newIndividual.XgenerateIndividual(); newIndividual.YgenerateIndividual(); saveIndividual(i, newIndividual); P_Individual newPIndividual = new P_Individual(); newPIndividual.XpreviousIndividual(); newPIndividual.YpreviousIndividual(); saveP_Individual(i, newPIndividual); V_Individual newVIndividual = new V_Individual(); newVIndividual.XvelocityIndividual(); newVIndividual.YvelocityIndividual(); saveV_Individual(i, newVIndividual); } } } /* Getters */ public Individual getIndividual(int index) { return individuals[index]; } public P_Individual getP_Individual(int index) { return P_individuals[index]; } public G_Individual getG_Individual( ) { return G_individuals[0]; } public E_Individual getE_Individual( ) { return E_individuals[0]; } public V_Individual getV_Individual(int index) { return V_individuals[index]; } public G_Individual getFittest() { G_Individual fittest = G_individuals[0]; return fittest; } /* Public methods 公共方法 */ // Get population size 獲取種群大小 public int size() { return individuals.length; } // Save individual 保存個體 public void saveIndividual(int index, Individual indiv) { individuals[index] = indiv; } public void saveP_Individual(int index, P_Individual indiv) { P_individuals[index] = indiv; } public void saveG_Individual( G_Individual indiv) { G_individuals[0] = indiv; } public void saveE_Individual( E_Individual indiv) { E_individuals[0] = indiv; } public void saveV_Individual(int index, V_Individual indiv) { V_individuals[index] = indiv; } }
[ "gtvsta99@gmail.com" ]
gtvsta99@gmail.com
55a4a1a353b9658f5a743ebf9552df94ebad43a8
2f757e15ed9eb01602a1c93bf545947f6870edb0
/Java/workspace_20161227/값읽기/src/값읽기/TextMain.java
421a10bba5caef62cd456a2dca24090c93779edd
[]
no_license
wooyeonhui/SmartContents
80e4e9f2d284c5c0f2f3a9bc0654913bcc526e54
d88f3edc2e43c72ace423b7e94bbddaf4b6d151d
refs/heads/master
2020-12-24T10:40:47.556296
2017-01-13T08:16:48
2017-01-13T08:16:48
73,137,586
0
0
null
null
null
null
UHC
Java
false
false
266
java
package 값읽기; import java.util.Scanner; public class TextMain { public static void main(String[] args) { //입력받기 Scanner sc = new Scanner(System.in); int a; System.out.print("정수 : "); a = sc.nextInt(); System.out.println(a); } }
[ "you@example.com" ]
you@example.com
7cdc2d8be32f96dec3093d4b4123f68a48aa6efb
0d36e8d7aa9727b910cb2ed6ff96eecb4444b782
/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColor.java
c5ff06ff40d7638d36d0ac33c9b7128cab4df08e
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
PelionIoT/mbed-cloud-sdk-java
b6d93f7e22c5afa30a51329b60e0f33c042ef00e
cc99c51db43cc9ae36601f20f20b7d8cd7515432
refs/heads/master
2023-08-19T01:25:29.548242
2020-07-01T16:48:16
2020-07-01T16:48:16
95,459,293
0
1
Apache-2.0
2021-01-15T08:44:08
2017-06-26T15:06:56
Java
UTF-8
Java
false
false
5,358
java
// This file was generated by the Pelion SDK foundation code generator. // This model class was autogenerated on Wed Jun 05 19:22:52 UTC 2019. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; import java.util.Date; import com.arm.mbed.cloud.sdk.annotations.Internal; import com.arm.mbed.cloud.sdk.annotations.Preamble; import com.arm.mbed.cloud.sdk.common.SdkModel; /** * Model for a light theme color. */ @Preamble(description = "Model for a light theme color.") public class LightThemeColor extends AbstractLightThemeColor { /** * Serialisation Id. */ private static final long serialVersionUID = 8449501951297820L; /** * Internal constructor. * * <p> * Constructor based on all fields. * <p> * Note: Should not be used. Use {@link #LightThemeColor()} instead. * * @param color * The color given as name (purple) or as a hex code. * @param reference * Color name. * @param updatedAt * Last update time in UTC. */ @Internal public LightThemeColor(String color, LightThemeColorReference reference, Date updatedAt) { super(color, reference, updatedAt); } /** * Internal constructor. * * <p> * Constructor based on a similar object. * <p> * Note: Should not be used. Use {@link #LightThemeColor()} instead. * * @param lightThemeColor * a light theme color. */ @Internal public LightThemeColor(LightThemeColor lightThemeColor) { this(lightThemeColor == null ? (String) null : lightThemeColor.color, lightThemeColor == null ? LightThemeColorReference.getDefault() : lightThemeColor.reference, lightThemeColor == null ? new Date() : lightThemeColor.updatedAt); } /** * Constructor. */ public LightThemeColor() { this((String) null, LightThemeColorReference.getDefault(), new Date()); } /** * Internal constructor. * * <p> * Constructor based on read-only fields. * <p> * Note: Should not be used. Use {@link #LightThemeColor()} instead. * * @param updatedAt * Last update time in UTC. */ @Internal public LightThemeColor(Date updatedAt) { this((String) null, LightThemeColorReference.getDefault(), updatedAt); } /** * Executes setId. * * @param id * a string. */ @Override public void setId(String id) { setReference(id); } /** * Executes setId. * <p> * Similar to {@link #setId(String)} * * @param id * a string. */ @Internal public void setLightThemeColorId(String id) { setId(id); } /** * Executes getId. * * @return something */ @Override public String getId() { return reference == null ? null : reference.getString(); } /** * Returns a string representation of the object. * * <p> * * @see java.lang.Object#toString() * @return the string representation */ @Override public String toString() { return "LightThemeColor [color=" + color + ", reference=" + reference + ", updatedAt=" + updatedAt + "]"; } /** * Method to ensure {@link #equals(Object)} is correct. * * <p> * Note: see this article: <a href="https://www.artima.com/lejava/articles/equality.html">canEqual()</a> * * @param other * another object. * @return true if the other object is an instance of the class in which canEqual is (re)defined, false otherwise. */ @Override protected boolean canEqual(Object other) { return other instanceof LightThemeColor; } /** * Indicates whether some other object is "equal to" this one. * * <p> * * @see java.lang.Object#equals(java.lang.Object) * @param obj * an object to compare with this instance. * @return true if this object is the same as the obj argument; false otherwise. */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!super.equals(obj)) { return false; } if (!(obj instanceof LightThemeColor)) { return false; } final LightThemeColor other = (LightThemeColor) obj; if (!other.canEqual(this)) { return false; } return true; } @SuppressWarnings("PMD.UselessOverridingMethod") @Override public int hashCode() { return super.hashCode(); } /** * Checks whether the model is valid or not. * * <p> * * @see SdkModel#isValid() * @return true if the model is valid; false otherwise. */ @Override public boolean isValid() { return super.isValid() && reference != null; } /** * Clones this instance. * * <p> * * @see java.lang.Object#clone() * @return a cloned instance */ @Override public LightThemeColor clone() { return new LightThemeColor(this); } }
[ "adrien.cabarbaye@arm.com" ]
adrien.cabarbaye@arm.com
6f8bd19d82a33158d35186ea3890164f33210dc2
fe06f97c2cf33a8b4acb7cb324b79a6cb6bb9dac
/java/dao/impl/PTWCS/Bin$2r/tiee5avdgu6wfrji+gg==$0DAOImpl.java
6454a35437288e6a4964986870b8efaedeed8a59
[]
no_license
HeimlichLin/TableSchema
3f67dae0b5b169ee3a1b34837ea9a2d34265f175
64b66a2968c3a169b75d70d9e5cf75fa3bb65354
refs/heads/master
2023-02-11T09:42:47.210289
2023-02-01T02:58:44
2023-02-01T02:58:44
196,526,843
0
0
null
2022-06-29T18:53:55
2019-07-12T07:03:58
Java
UTF-8
Java
false
false
1,323
java
package com.doc.common.dao.impl; public class Bin$2r/tiee5avdgu6wfrji+gg==$0DAOImpl extends GeneralDAOImpl<Bin$2r/tiee5avdgu6wfrji+gg==$0Po> implements Bin$2r/tiee5avdgu6wfrji+gg==$0DAO { public static final Bin$2r/tiee5avdgu6wfrji+gg==$0DAOImpl INSTANCE = new Bin$2r/tiee5avdgu6wfrji+gg==$0DAOImpl(); public static final String TABLENAME = "BIN$2R/TIEE5AVDGU6WFRJI+GG==$0"; public Bin$2r/tiee5avdgu6wfrji+gg==$0DAOImpl() { super(TABLENAME); } protected static final MapConverter<Bin$2r/tiee5avdgu6wfrji+gg==$0Po> CONVERTER = new MapConverter<Bin$2r/tiee5avdgu6wfrji+gg==$0Po>() { @Override public Bin$2r/tiee5avdgu6wfrji+gg==$0Po convert(final DataObject dataObject) { final Bin$2r/tiee5avdgu6wfrji+gg==$0Po bin$2r/tiee5avdgu6wfrji+gg==$0Po = new Bin$2r/tiee5avdgu6wfrji+gg==$0Po(); return bin$2r/tiee5avdgu6wfrji+gg==$0Po; } @Override public DataObject toDataObject(final Bin$2r/tiee5avdgu6wfrji+gg==$0Po bin$2r/tiee5avdgu6wfrji+gg==$0Po) { final DataObject dataObject = new DataObject(); return dataObject; } }; public MapConverter<Bin$2r/tiee5avdgu6wfrji+gg==$0Po> getConverter() { return CONVERTER; } @Override public SqlWhere getPkSqlWhere(Bin$2r/tiee5avdgu6wfrji+gg==$0Po po) { throw new ApBusinessException("無pk不支援"); } }
[ "jerry.l@acer.com" ]
jerry.l@acer.com
6aa7eeb1159035fd12687fdc6158c6d796805daa
3634eded90370ff24ee8f47ccfa19e388d3784ad
/src/main/java/io/realm/processor/RealmAnalytics.java
a893314b85a4b43c2a6226a0920f7eeba6d558cd
[]
no_license
xiaofans/ResStudyPro
8bc3c929ef7199c269c6250b390d80739aaf50b9
ac3204b27a65e006ebeb5b522762848ea82d960b
refs/heads/master
2021-01-25T05:09:52.461974
2017-06-06T12:12:41
2017-06-06T12:12:41
93,514,258
0
0
null
null
null
null
UTF-8
Java
false
false
3,803
java
package io.realm.processor; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.NetworkInterface; import java.net.SocketException; import java.net.URL; import java.security.NoSuchAlgorithmException; import java.util.Enumeration; import java.util.Set; public class RealmAnalytics { private static final String ADDRESS_PREFIX = "https://api.mixpanel.com/track/?data="; private static final String ADDRESS_SUFFIX = "&ip=1"; private static final int CONNECT_TIMEOUT = 4000; private static final String EVENT_NAME = "Run"; private static final String JSON_TEMPLATE = "{\n \"event\": \"%EVENT%\",\n \"properties\": {\n \"token\": \"%TOKEN%\",\n \"distinct_id\": \"%USER_ID%\",\n \"Anonymized MAC Address\": \"%USER_ID%\",\n \"Anonymized Bundle ID\": \"%APP_ID%\",\n \"Binding\": \"java\",\n \"Realm Version\": \"%REALM_VERSION%\",\n \"Host OS Type\": \"%OS_TYPE%\",\n \"Host OS Version\": \"%OS_VERSION%\",\n \"Target OS Type\": \"android\"\n }\n}"; private static final int READ_TIMEOUT = 2000; private static final String TOKEN = "ce0fac19508f6c8f20066d345d360fd0"; private static RealmAnalytics instance; private Set<String> packages; private RealmAnalytics(Set<String> packages) { this.packages = packages; } public static RealmAnalytics getInstance(Set<String> packages) { if (instance == null) { instance = new RealmAnalytics(packages); } return instance; } private void send() { try { HttpURLConnection connection = (HttpURLConnection) getUrl().openConnection(); connection.setRequestMethod("GET"); connection.connect(); connection.getResponseCode(); } catch (IOException e) { } catch (NoSuchAlgorithmException e2) { } } public void execute() { Thread backgroundThread = new Thread(new Runnable() { public void run() { RealmAnalytics.this.send(); } }); backgroundThread.start(); try { backgroundThread.join(6000); } catch (InterruptedException e) { } } public URL getUrl() throws MalformedURLException, SocketException, NoSuchAlgorithmException, UnsupportedEncodingException { return new URL(ADDRESS_PREFIX + Utils.base64Encode(generateJson()) + ADDRESS_SUFFIX); } public String generateJson() throws SocketException, NoSuchAlgorithmException { return JSON_TEMPLATE.replaceAll("%EVENT%", EVENT_NAME).replaceAll("%TOKEN%", TOKEN).replaceAll("%USER_ID%", getAnonymousUserId()).replaceAll("%APP_ID%", getAnonymousAppId()).replaceAll("%REALM_VERSION%", Version.VERSION).replaceAll("%OS_TYPE%", System.getProperty("os.name")).replaceAll("%OS_VERSION%", System.getProperty("os.version")); } public static String getAnonymousUserId() throws NoSuchAlgorithmException, SocketException { Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces(); if (networkInterfaces.hasMoreElements()) { return Utils.hexStringify(Utils.sha256Hash(((NetworkInterface) networkInterfaces.nextElement()).getHardwareAddress())); } throw new IllegalStateException("No network interfaces detected"); } public String getAnonymousAppId() throws NoSuchAlgorithmException { StringBuilder stringBuilder = new StringBuilder(); for (String modelPackage : this.packages) { stringBuilder.append(modelPackage).append(":"); } return Utils.hexStringify(Utils.sha256Hash(stringBuilder.toString().getBytes())); } }
[ "zhaoyu@neoteched.com" ]
zhaoyu@neoteched.com
fc9a87d1eaba58267758102f3bbdebbfb0085673
f55869ec738c06c959044a86e7a48bfa0f196ee4
/JAVA开发的打字软件源程序/codefans.net/Ftyped/Chat.java
1697dd1d19530263e015753e6f750e333bb85220
[]
no_license
noRelax/java-utils
168bd392d98817d490c5ccc6f9da872b5cb65747
b5269bdf16fa67e78229524be227f9aa394ded6c
refs/heads/master
2021-01-12T06:23:47.130975
2016-12-26T03:18:45
2016-12-26T03:18:45
77,353,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,937
java
import javax.swing.*; import java.awt.*; /** * This code was edited or generated using CloudGarden's Jigloo * SWT/Swing GUI Builder, which is free for non-commercial * use. If Jigloo is being used commercially (ie, by a corporation, * company or business for any purpose whatever) then you * should purchase a license for each developer using Jigloo. * Please visit www.cloudgarden.com for details. * Use of Jigloo implies acceptance of these licensing terms. * A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR * THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED * LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE. */ public class Chat extends JInternalFrame{ MainFrame parent; private JTextPane jtp; private JTextField txtData; public Chat(MainFrame parent){ this.parent=parent; setLayer(4); setBounds(1,326,0,0); this.setPreferredSize(new java.awt.Dimension(140, 223)); ((javax.swing.plaf.basic.BasicInternalFrameUI) this.getUI()).setNorthPane(null); this.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE); GridBagLayout thisLayout = new GridBagLayout(); thisLayout.rowWeights = new double[] {0.1, 0.1, 0.0, 0.0}; thisLayout.rowHeights = new int[] {7, 7, 49, 56}; thisLayout.columnWeights = new double[] {0.0, 0.0, 0.0, 0.0}; thisLayout.columnWidths = new int[] {0, 45, 45, 48}; getContentPane().setLayout(thisLayout); setVisible(true); pack(); { jtp = new JTextPane(); getContentPane().add(jtp, new GridBagConstraints(1, 0, 4, 5, 0.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); jtp.setPreferredSize(new Dimension(140, 160)); jtp.setEditable(false); } { txtData = new JTextField(); getContentPane().add(txtData, new GridBagConstraints(1, 7, 3, 1, 0.0, 0.0, GridBagConstraints.SOUTH, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); txtData.setColumns(10); } } }
[ "wusong@hfjy.com" ]
wusong@hfjy.com
c336f0441c937eac5bfb244bf7f0c1d3bd6b21a3
e3edf5f28ad49b87c50d86e69ba64bf842e1878d
/app/src/main/java/com/lxkj/jieju/Http/ResultBean.java
6492aabe4b3368d58c7164b50eb062fcace3118e
[]
no_license
2403102119/jiejushancheng
516f01c3b9629b905b95feb1600585b36e880ab9
ebb8c9e3e2443e5cee60f965967e163edbc8b147
refs/heads/master
2021-03-25T05:52:33.126346
2020-04-17T11:47:23
2020-04-17T11:47:23
247,593,824
0
0
null
null
null
null
UTF-8
Java
false
false
477
java
package com.lxkj.jieju.Http; import java.io.Serializable; public class ResultBean implements Serializable { public String result; public String resultNote; public String getResult() { return result; } public String getResultNote() { return resultNote; } public void setResultNote(String resultNote) { this.resultNote = resultNote; } public void setResult(String result) { this.result = result; } }
[ "m17600167028@163.com" ]
m17600167028@163.com
9f2ba372fd8fe3ed6276923a79ac47440d8bf334
c19cb77e3958a194046d6f84ca97547cc3a223c3
/pkix/src/main/java/org/bouncycastle/openssl/PEMException.java
3753aece8ec913a0743a45950af7a695836b22f1
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bcgit/bc-java
1b6092bc5d2336ec26ebd6da6eeaea6600b4c70a
62b03c0f704ebd243fe5f2d701aef4edd77bba6e
refs/heads/main
2023-09-04T00:48:33.995258
2023-08-30T05:33:42
2023-08-30T05:33:42
10,416,648
1,984
1,021
MIT
2023-08-26T05:14:28
2013-06-01T02:38:42
Java
UTF-8
Java
false
false
559
java
package org.bouncycastle.openssl; import java.io.IOException; public class PEMException extends IOException { Exception underlying; public PEMException( String message) { super(message); } public PEMException( String message, Exception underlying) { super(message); this.underlying = underlying; } public Exception getUnderlyingException() { return underlying; } public Throwable getCause() { return underlying; } }
[ "dgh@cryptoworkshop.com" ]
dgh@cryptoworkshop.com
0fe9a8e7d77c25337c5151a2314c4a9e7382f9c1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_8469fd2bf5e3c02eb872c41bc1d383b2b4ef8f6e/WebSession/2_8469fd2bf5e3c02eb872c41bc1d383b2b4ef8f6e_WebSession_s.java
8c74c5a93f5a6b0f0016da3f77abc5e85d81069e
[]
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
7,001
java
/* * Copyright 2004-2013 H2 Group. Multiple-Licensed under the H2 License, * Version 1.0, and under the Eclipse Public License, Version 1.0 * (http://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.server.web; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.Timestamp; import java.util.ArrayList; import java.util.HashMap; import java.util.Locale; import org.h2.bnf.Bnf; import org.h2.bnf.context.DbContents; import org.h2.bnf.context.DbContextRule; import org.h2.message.TraceSystem; import org.h2.util.New; /** * The web session keeps all data of a user session. * This class is used by the H2 Console. */ class WebSession { private static final int MAX_HISTORY = 1000; /** * The last time this client sent a request. */ long lastAccess; /** * The session attribute map. */ final HashMap<String, Object> map = New.hashMap(); /** * The current locale. */ Locale locale; /** * The currently executing statement. */ Statement executingStatement; /** * The current updatable result set. */ ResultSet result; private final WebServer server; private final ArrayList<String> commandHistory = New.arrayList(); private Connection conn; private DatabaseMetaData meta; private DbContents contents = new DbContents(); private Bnf bnf; private boolean shutdownServerOnDisconnect; WebSession(WebServer server) { this.server = server; } /** * Put an attribute value in the map. * * @param key the key * @param value the new value */ void put(String key, Object value) { map.put(key, value); } /** * Get the value for the given key. * * @param key the key * @return the value */ Object get(String key) { if ("sessions".equals(key)) { return server.getSessions(); } return map.get(key); } /** * Remove a session attribute from the map. * * @param key the key */ void remove(String key) { map.remove(key); } /** * Get the BNF object. * * @return the BNF object */ Bnf getBnf() { return bnf; } /** * Load the SQL grammar BNF. */ void loadBnf() { try { Bnf newBnf = Bnf.getInstance(null); DbContextRule columnRule = new DbContextRule(contents, DbContextRule.COLUMN); DbContextRule newAliasRule = new DbContextRule(contents, DbContextRule.NEW_TABLE_ALIAS); DbContextRule aliasRule = new DbContextRule(contents, DbContextRule.TABLE_ALIAS); DbContextRule tableRule = new DbContextRule(contents, DbContextRule.TABLE); DbContextRule schemaRule = new DbContextRule(contents, DbContextRule.SCHEMA); DbContextRule columnAliasRule = new DbContextRule(contents, DbContextRule.COLUMN_ALIAS); DbContextRule procedureRule = new DbContextRule(contents, DbContextRule.PROCEDURE); newBnf.updateTopic("column_name", columnRule); newBnf.updateTopic("new_table_alias", newAliasRule); newBnf.updateTopic("table_alias", aliasRule); newBnf.updateTopic("column_alias", columnAliasRule); newBnf.updateTopic("table_name", tableRule); newBnf.updateTopic("schema_name", schemaRule); newBnf.updateTopic("expression", procedureRule); newBnf.linkStatements(); bnf = newBnf; } catch (Exception e) { // ok we don't have the bnf server.traceError(e); } } /** * Get the SQL statement from history. * * @param id the history id * @return the SQL statement */ String getCommand(int id) { return commandHistory.get(id); } /** * Add a SQL statement to the history. * * @param sql the SQL statement */ void addCommand(String sql) { if (sql == null) { return; } sql = sql.trim(); if (sql.length() == 0) { return; } if (commandHistory.size() > MAX_HISTORY) { commandHistory.remove(0); } int idx = commandHistory.indexOf(sql); if (idx >= 0) { commandHistory.remove(idx); } commandHistory.add(sql); } /** * Get the list of SQL statements in the history. * * @return the commands */ ArrayList<String> getCommands() { return commandHistory; } /** * Update session meta data information and get the information in a map. * * @return a map containing the session meta data */ HashMap<String, Object> getInfo() { HashMap<String, Object> m = New.hashMap(); m.putAll(map); m.put("lastAccess", new Timestamp(lastAccess).toString()); try { m.put("url", conn == null ? "${text.admin.notConnected}" : conn.getMetaData().getURL()); m.put("user", conn == null ? "-" : conn.getMetaData().getUserName()); m.put("lastQuery", commandHistory.size() == 0 ? "" : commandHistory.get(0)); m.put("executing", executingStatement == null ? "${text.admin.no}" : "${text.admin.yes}"); } catch (SQLException e) { TraceSystem.traceThrowable(e); } return m; } void setConnection(Connection conn) throws SQLException { this.conn = conn; if (conn == null) { meta = null; } else { meta = conn.getMetaData(); } contents = new DbContents(); } DatabaseMetaData getMetaData() { return meta; } Connection getConnection() { return conn; } DbContents getContents() { return contents; } /** * Shutdown the server when disconnecting. */ void setShutdownServerOnDisconnect() { this.shutdownServerOnDisconnect = true; } boolean getShutdownServerOnDisconnect() { return shutdownServerOnDisconnect; } /** * Close the connection and stop the statement if one is currently * executing. */ void close() { if (executingStatement != null) { try { executingStatement.cancel(); } catch (Exception e) { // ignore } } if (conn != null) { try { conn.close(); } catch (Exception e) { // ignore } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3b8421bb73c012f20abc7993596eb0ba5a314a46
e53e7cc71187f77a3089d4d94d90621523cea610
/eo-maven-plugin/src/main/java/org/eolang/maven/RegisterMojo.java
ac204a9d9677aeac1fc895ed7e05b5580455340d
[ "MIT" ]
permissive
Sitiritis/eo
3f8ce88bb0b77f856d87a78273e4c1b0c0a8bf54
9c0c1af6a4d32ce7b865bd40936149063e62023f
refs/heads/master
2023-08-22T08:29:17.894997
2021-10-08T15:18:26
2021-10-08T15:18:26
372,416,600
0
0
MIT
2021-05-31T07:15:54
2021-05-31T07:15:53
null
UTF-8
Java
false
false
4,049
java
/* * The MIT License (MIT) * * Copyright (c) 2016-2021 Yegor Bugayenko * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.eolang.maven; import com.jcabi.log.Logger; import java.io.File; import java.io.IOException; import java.nio.file.FileSystems; import java.nio.file.Path; import java.nio.file.PathMatcher; import java.util.Collection; import java.util.HashSet; import java.util.Set; import java.util.stream.Collectors; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.cactoos.set.SetOf; /** * Register all sources. * * @since 0.12 * @checkstyle ClassDataAbstractionCouplingCheck (500 lines) */ @Mojo( name = "register", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true ) @SuppressWarnings("PMD.ImmutableField") public final class RegisterMojo extends SafeMojo { /** * Directory in which .eo files are located. * @checkstyle MemberNameCheck (7 lines) */ @Parameter( required = true, defaultValue = "${project.basedir}/src/main/eo" ) private File sourcesDir; /** * List of inclusion GLOB filters for finding EO files. */ @Parameter private Set<String> includes = new SetOf<>("**/*.eo"); /** * List of exclusion GLOB filters for finding EO files. */ @Parameter private Set<String> excludes = new HashSet<>(0); @Override public void exec() throws IOException { final Collection<Path> sources = new Walk(this.sourcesDir.toPath()) .stream() .filter( file -> this.includes.stream().anyMatch( glob -> RegisterMojo.matcher(glob).matches(file) ) ) .filter( file -> this.excludes.stream().noneMatch( glob -> RegisterMojo.matcher(glob).matches(file) ) ) .collect(Collectors.toList()); final Unplace unplace = new Unplace(this.sourcesDir); for (final Path file : sources) { final String name = unplace.make(file); if (!this.tojos().select(t -> t.get("id").equals(name)).isEmpty()) { Logger.debug(this, "EO source %s already registered", name); continue; } this.tojos() .add(name) .set(AssembleMojo.ATTR_VERSION, ParseMojo.ZERO) .set(AssembleMojo.ATTR_EO, file.toAbsolutePath().toString()); Logger.debug(this, "EO source %s registered", name); } Logger.info(this, "%d EO sources registered", sources.size()); } /** * Create glob matcher from text. * @param text The pattern * @return Matcher */ private static PathMatcher matcher(final String text) { return FileSystems.getDefault() .getPathMatcher(String.format("glob:%s", text)); } }
[ "yegor256@gmail.com" ]
yegor256@gmail.com
339dd69e41b0596bd5abb03e793d391a427944a0
972b548c643587ed6e95018628402932bd2668f8
/src/main/java/com/learn/io/_3_lesson/_2_Charset.java
36b73a91c04f176a7730ac4b6601b777387bcaa2
[]
no_license
py4ina/javaMiddle
4f11730079b7ef0008215dd847b4b8eca9d0cc5a
37ced902bc7bdb533591d1e045697937279a43b2
refs/heads/master
2022-12-22T02:57:32.711072
2020-01-21T15:59:08
2020-01-21T15:59:08
160,514,870
0
0
null
2022-12-16T05:07:51
2018-12-05T12:27:41
Java
UTF-8
Java
false
false
719
java
package com.learn.io._3_lesson; import java.io.*; public class _2_Charset { private static final int BYTES = 256; private static final int BUFFER_SIZE = 16; public static void main(String[] args) throws UnsupportedOperationException, IOException { byte[] rawData = new byte[BYTES]; for (int k = 0; k < BYTES; k++) { rawData[k] = (byte) (k - 128); } InputStream is = new ByteArrayInputStream(rawData); Reader reader = new InputStreamReader(is/*, "UTF-8"*/); char[] buff = new char[BUFFER_SIZE]; int count; while ((count = reader.read(buff)) != -1){ System.out.println(new String(buff, 0, count)); } } }
[ "py4ina@gmail.com" ]
py4ina@gmail.com
d05b888fae2f99b40b4498b8d7bf9c623751628b
647ce242e20bc792b334cf445d1fb3243f0f3b47
/chintai-migration-cms/src/net/chintai/backend/sysadmin/shop_listing/action/MediaInfoUpdateConfirmAction.java
d3005e2fc0e90f282e26ced50e69a7ffa70617d1
[]
no_license
sangjiexun/20191031test
0ce6c9e3dabb7eed465d4add33a107e5b5525236
3248d86ce282c1455f2e6ce0e05f0dbd15e51518
refs/heads/master
2020-12-14T20:31:05.085987
2019-11-01T06:03:50
2019-11-01T06:03:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,518
java
/* * $Id: MediaInfoUpdateConfirmAction.java 4246 2009-03-23 09:00:00Z lee-hosup $ * --------------------------------------------------------- * 更新日 更新者 内容 * --------------------------------------------------------- * 2009/02/18 BGT)李昊燮 新規作成 * */ package net.chintai.backend.sysadmin.shop_listing.action; import net.chintai.backend.sysadmin.common.AuthorityId; import net.chintai.backend.sysadmin.common.BaseActionSupport; import net.chintai.backend.sysadmin.common.BusinessContext; import net.chintai.backend.sysadmin.common.service.AuthService; import net.chintai.backend.sysadmin.shop_listing.action.view.MediaInfoUpdateView; import net.chintai.backend.sysadmin.shop_listing.service.MediaInfoConfirmService; import net.chintai.backend.sysadmin.shop_listing.service.ShopBasicInfoService; import net.chintai.backend.sysadmin.shop_listing.service.bean.MediaInfoConfirmInServiceBean; import net.chintai.backend.sysadmin.shop_listing.service.bean.MediaInfoConfirmOutServiceBean; import net.chintai.backend.sysadmin.shop_listing.service.bean.ShopBasicInfoOutServiceBean; import org.apache.commons.beanutils.BeanUtils; import org.apache.struts.validator.DynaValidatorForm; import org.springframework.context.ApplicationContext; /** * 出稿情報(仮保存)更新確認アクション * * @author Lee Hosup * @version $Revision: 4246 $ * Copyright: (C) CHINTAI Corporation All Right Reserved. */ public class MediaInfoUpdateConfirmAction extends BaseActionSupport { /* * (非 Javadoc) * * @see net.chintai.backend.sysadmin.common.BaseActionSupport# * doExecute(net.chintai.backend.sysadmin.common.BusinessContext) */ @Override protected void doExecute(BusinessContext context) throws Exception { // 画面データ取得 DynaValidatorForm form = (DynaValidatorForm) context.getForm(); String shopCd = form.getString("shopCd"); // Injection ApplicationContext ac = getWebApplicationContext(); ShopBasicInfoService basicInfoService = (ShopBasicInfoService) ac.getBean("shopBasicInfoService"); // 契約店舗詳細情報を取得 ShopBasicInfoOutServiceBean basicInfoOutBean = basicInfoService.searchShopBasicInfo(shopCd); // viewHelper設定 MediaInfoUpdateView view = new MediaInfoUpdateView(); BeanUtils.copyProperties(view, basicInfoOutBean); // 出稿情報登録確認サービス MediaInfoConfirmService service = (MediaInfoConfirmService) ac.getBean("mediaInfoConfirmService"); MediaInfoConfirmInServiceBean inBean = new MediaInfoConfirmInServiceBean(); BeanUtils.copyProperties(inBean, form); MediaInfoConfirmOutServiceBean outBean = service.searchConfirmInfo(inBean); BeanUtils.copyProperties(view, outBean); BeanUtils.copyProperties(view, form); // 二重更新防止トークンをセット saveToken(context.getRequest()); context.setForward("success", view); } /* * (非 Javadoc) * * @see * net.chintai.backend.sysadmin.common.BaseActionSupport#isAuthorized(java * .lang.String) */ @Override protected boolean isAuthorized(String userId) { ApplicationContext ac = getWebApplicationContext(); AuthService auth = (AuthService) ac.getBean("authService"); return auth.authenticate(userId, AuthorityId.SHOP_LISTING); } }
[ "yuki.hirukawa@ctc-g.co.jp" ]
yuki.hirukawa@ctc-g.co.jp
0e8357d30ddf2ae431b4b6a4979cc03ae2468583
a579f76462681129bf725d5c73ccde010fc0d615
/src/main/java/com/tonfun/tools/controller/autoController/BSOne/SalesorderhistoryController.java
5918964000d39ffb4feb0905fe8f8bfde2c8276a
[]
no_license
zgy520/codeGenerate
2dd8b17769abec132fd2436c621d1e44190f600d
4ab7f026ce6a571d1e1878f2d73ad496217cfbf9
refs/heads/master
2020-03-16T09:42:02.942435
2018-06-21T14:57:36
2018-06-21T14:57:36
132,620,915
0
0
null
null
null
null
UTF-8
Java
false
false
3,702
java
package com.tonfun.tools.controller.autoController.BSOne; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; import org.springframework.validation.BindingResult; import javax.validation.Valid; import com.tonfun.tools.Error.DefaultErrorCode; import com.tonfun.tools.Error.ErrCode; import com.tonfun.tools.Error.ErrorCode; import com.tonfun.tools.dao.persistence.pagination.Pagination; import com.tonfun.tools.dao.persistence.pagination.Pagination.PaginationBuilder; import com.tonfun.tools.Model.BSOne.Salesorderhistory; import com.tonfun.tools.service.I.module.BSOne.CI.BSOne.ISalesorderhistoryService; @Controller @RequestMapping(value="/Salesorderhistory") public class SalesorderhistoryController{ private static final Logger LOGGER = LoggerFactory.getLogger(SalesorderhistoryController.class); @Autowired ISalesorderhistoryService salesorderhistoryservice; /** * 返回对应的jsp页面的路径 */ @RequestMapping("/") private String showsalesorderhistoryPage() { return "/Salesorderhistory/salesorderhistory"; } /** * 返回所有的数据 */ @RequestMapping("/getAllSalesorderhistorys") @ResponseBody private List<Salesorderhistory> getAllSalesorderhistorys () { LOGGER.info("返回所有的数据"); return salesorderhistoryservice.findAll(); } /** * 根据分页信息获取数据 */ @RequestMapping("/getAllSalesorderhistorysByPagination") @ResponseBody private Pagination<Salesorderhistory> getAllSalesorderhistorysByPagination (PaginationBuilder<Salesorderhistory> paginationBuilder) { LOGGER.info("根据分页信息返回相应的数据"); Pagination<Salesorderhistory> salesorderhistorys = salesorderhistoryservice.queryByPagination(paginationBuilder.build()); return salesorderhistorys; } /** * 新增数据 */ @RequestMapping("/addSalesorderhistory") @ResponseBody private ErrorCode addSalesorderhistory(@Valid Salesorderhistory salesorderhistory,BindingResult bindingResult) { LOGGER.info("新增数据"); DefaultErrorCode errorCode = new DefaultErrorCode(); if (bindingResult.hasErrors()) { errorCode.setErrCode(ErrCode.VALIDATION_FAILED); errorCode.setErrMsg("验证失败"+bindingResult.getAllErrors()); }else { this.salesorderhistoryservice.save(salesorderhistory); } return errorCode; } /** * 修改实体的属性值 */ public ErrorCode modifySalesorderhistory (Long id,Salesorderhistory salesorderhistory,@Valid BindingResult bindingResult) { LOGGER.info("编辑id为"+id+"的实体属性"); ErrorCode errorCode = new DefaultErrorCode(); if (bindingResult.hasErrors()) { errorCode.setErrMsg("验证失败:"+bindingResult.getAllErrors()); errorCode.setErrCode(ErrCode.VALIDATION_FAILED); }else { errorCode = this.salesorderhistoryservice.modifySalesorderhistory(id,salesorderhistory); } return errorCode; } /** * 根据Id删除实体 */ @RequestMapping("/deleteSalesorderhistory") @ResponseBody private ErrorCode deleteSalesorderhistory(Long id) { LOGGER.info("删除id为"+id+"对应的实体数据"); DefaultErrorCode errorCode = new DefaultErrorCode(); try { this.salesorderhistoryservice.deleteById(id); }catch (Exception e) { errorCode.setErrCode(ErrCode.FAIL); errorCode.setErrMsg("删除失败,错误提示为:"+e.getMessage()); } return errorCode; } }
[ "a442391947@gmail.com" ]
a442391947@gmail.com
5d4122bea2915335b59b554c517d1831f7c86bab
311f1237e7498e7d1d195af5f4bcd49165afa63a
/sourcedata/jedit40source/jEdit/org/gjt/sp/jedit/search/CharIndexedSegment.java
352d87c09981871795861ddcc0f64ef64916cee4
[ "Apache-2.0" ]
permissive
DXYyang/SDP
86ee0e9fb7032a0638b8bd825bcf7585bccc8021
6ad0daf242d4062888ceca6d4a1bd4c41fd99b63
refs/heads/master
2023-01-11T02:29:36.328694
2019-11-02T09:38:34
2019-11-02T09:38:34
219,128,146
10
1
Apache-2.0
2023-01-02T21:53:42
2019-11-02T08:54:26
Java
UTF-8
Java
false
false
1,909
java
/* * CharIndexedSegment.java * :tabSize=8:indentSize=8:noTabs=false: * :folding=explicit:collapseFolds=1: * * Copyright (C) 1998 Wes Biggs * Copyright (C) 2000, 2001 Slava Pestov * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as published * by the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package org.gjt.sp.jedit.search; //{{{ Imports import java.io.Serializable; import javax.swing.text.Segment; import gnu.regexp.*; //}}} public class CharIndexedSegment implements CharIndexed, Serializable { //{{{ CharIndexedSegment constructor CharIndexedSegment(Segment seg, boolean reverse) { this.seg = seg; m_index = (reverse ? seg.count - 1 : 0); this.reverse = reverse; } //}}} //{{{ charAt() method public char charAt(int index) { if(reverse) index = -index; return ((m_index + index) < seg.count && m_index + index >= 0) ? seg.array[seg.offset + m_index + index] : CharIndexed.OUT_OF_BOUNDS; } //}}} //{{{ isValid() method public boolean isValid() { return (m_index >=0 && m_index < seg.count); } //}}} //{{{ move() method public boolean move(int index) { if(reverse) index = -index; return ((m_index += index) < seg.count); } //}}} //{{{ Private members private Segment seg; private int m_index; private boolean reverse; //}}} }
[ "512463514@qq.com" ]
512463514@qq.com
6bb15217e07a0965345c52a9903f2fb6ba216b92
672965a4564058dcd1f5bebc5c262274305d4fdc
/src/test/java/com/emc/ecs/sync/test/DelayFilter.java
62eceb2390d6db8e5beb84ef8ac7b65a78b1e891
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
GrandPubba/ecs-sync
f9868c70f49c5d9776b80875e3de579c4cc41dec
ab441d92beb74a06f68afb61efa5ef558e509ea1
refs/heads/master
2020-12-27T14:59:33.724812
2016-02-15T06:59:54
2016-02-15T06:59:54
53,346,725
0
0
null
2016-03-07T17:59:05
2016-03-07T17:59:05
null
UTF-8
Java
false
false
2,018
java
/* * Copyright 2013-2015 EMC Corporation. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://www.apache.org/licenses/LICENSE-2.0.txt * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.emc.ecs.sync.test; import com.emc.ecs.sync.filter.SyncFilter; import com.emc.ecs.sync.model.object.SyncObject; import com.emc.ecs.sync.source.SyncSource; import com.emc.ecs.sync.target.SyncTarget; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Options; import java.util.Iterator; public class DelayFilter extends SyncFilter { private int delayMs; @Override public String getActivationName() { return null; } @Override public void filter(SyncObject obj) { try { Thread.sleep(delayMs); getNext().filter(obj); } catch (InterruptedException e) { throw new RuntimeException("interrupted during wait", e); } } @Override public SyncObject reverseFilter(SyncObject obj) { return getNext().reverseFilter(obj); } @Override public String getName() { return null; } @Override public String getDocumentation() { return null; } @Override public Options getCustomOptions() { return null; } @Override protected void parseCustomOptions(CommandLine line) { } @Override public void configure(SyncSource source, Iterator<SyncFilter> filters, SyncTarget target) { } public int getDelayMs() { return delayMs; } public void setDelayMs(int delayMs) { this.delayMs = delayMs; } }
[ "stu.arnett@emc.com" ]
stu.arnett@emc.com
7de533f6b72c157aab08d6de60343113ed75c514
dd80a584130ef1a0333429ba76c1cee0eb40df73
/packages/apps/UnifiedEmail/src/com/android/mail/utils/DelayedTaskHandler.java
67c438c1b8edd7b0f401a61fd505e5f3bbf84d89
[ "MIT" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
Java
false
false
2,606
java
/* * Copyright (C) 2012 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.mail.utils; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.os.SystemClock; /** * Class to queue tasks. This delay the specified task by the specified time, up to the maximum * duration from the time that the first request was received */ public abstract class DelayedTaskHandler extends Handler { private final int mDelayMs; private static final long UNSET_TIME = -1; /** * Tracks the time when a task was queued, when there had been no pending task. */ private long mLastTaskExecuteTime = UNSET_TIME; public DelayedTaskHandler(Looper looper, int defaultDelayMs) { super(looper); mDelayMs = defaultDelayMs; } /** * Schedule the task to be run after the default delay. */ public void scheduleTask() { final long currentTime = SystemClock.elapsedRealtime(); removeMessages(0); if (mLastTaskExecuteTime == UNSET_TIME || ((mLastTaskExecuteTime + mDelayMs) < currentTime)) { // If this is the first task that has been queued or if the last task ran more than // long enough ago that we don't want to delay this task, run it now sendEmptyMessage(0); } else { // Otherwise delay this task for the specify delay duration sendEmptyMessageDelayed(0, mDelayMs); } } @Override public void dispatchMessage(Message msg) { onTaskExecution(); performTask(); } /** * Called when the task managed by this handler is executed. This method can also be called * to indicate that the task has been started externally. * * This updates the handler's internal timestamp. */ public void onTaskExecution() { mLastTaskExecuteTime = SystemClock.elapsedRealtime(); } /** * Method to perform the needed task. */ protected abstract void performTask(); }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
6c45f4c962cb620a972270cfd6d9037d6d661215
40df4983d86a3f691fc3f5ec6a8a54e813f7fe72
/app/src/main/java/android/support/p015v4/view/PagerTabStrip.java
8691559945ceccd2879ad59f2a1b1f4bf51fe2e7
[]
no_license
hlwhsunshine/RootGeniusTrunAK
5c63599a939b24a94c6f083a0ee69694fac5a0da
1f94603a9165e8b02e4bc9651c3528b66c19be68
refs/heads/master
2020-04-11T12:25:21.389753
2018-12-24T10:09:15
2018-12-24T10:09:15
161,779,612
0
0
null
null
null
null
UTF-8
Java
false
false
8,076
java
package android.support.p015v4.view; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.support.annotation.ColorInt; import android.support.annotation.ColorRes; import android.support.annotation.DrawableRes; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewConfiguration; /* renamed from: android.support.v4.view.PagerTabStrip */ public class PagerTabStrip extends PagerTitleStrip { private static final int FULL_UNDERLINE_HEIGHT = 1; private static final int INDICATOR_HEIGHT = 3; private static final int MIN_PADDING_BOTTOM = 6; private static final int MIN_STRIP_HEIGHT = 32; private static final int MIN_TEXT_SPACING = 64; private static final int TAB_PADDING = 16; private static final int TAB_SPACING = 32; private static final String TAG = "PagerTabStrip"; private boolean mDrawFullUnderline; private boolean mDrawFullUnderlineSet; private int mFullUnderlineHeight; private boolean mIgnoreTap; private int mIndicatorColor; private int mIndicatorHeight; private float mInitialMotionX; private float mInitialMotionY; private int mMinPaddingBottom; private int mMinStripHeight; private int mMinTextSpacing; private int mTabAlpha; private int mTabPadding; private final Paint mTabPaint; private final Rect mTempRect; private int mTouchSlop; /* renamed from: android.support.v4.view.PagerTabStrip$1 */ class C01711 implements OnClickListener { C01711() { } public void onClick(View view) { PagerTabStrip.this.mPager.setCurrentItem(PagerTabStrip.this.mPager.getCurrentItem() - 1); } } /* renamed from: android.support.v4.view.PagerTabStrip$2 */ class C01722 implements OnClickListener { C01722() { } public void onClick(View view) { PagerTabStrip.this.mPager.setCurrentItem(PagerTabStrip.this.mPager.getCurrentItem() + 1); } } public PagerTabStrip(Context context) { this(context, null); } public PagerTabStrip(Context context, AttributeSet attributeSet) { super(context, attributeSet); this.mTabPaint = new Paint(); this.mTempRect = new Rect(); this.mTabAlpha = 255; this.mDrawFullUnderline = false; this.mDrawFullUnderlineSet = false; this.mIndicatorColor = this.mTextColor; this.mTabPaint.setColor(this.mIndicatorColor); float f = context.getResources().getDisplayMetrics().density; this.mIndicatorHeight = (int) ((3.0f * f) + 0.5f); this.mMinPaddingBottom = (int) ((6.0f * f) + 0.5f); this.mMinTextSpacing = (int) (64.0f * f); this.mTabPadding = (int) ((16.0f * f) + 0.5f); this.mFullUnderlineHeight = (int) ((1.0f * f) + 0.5f); this.mMinStripHeight = (int) ((f * 32.0f) + 0.5f); this.mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(), getPaddingBottom()); setTextSpacing(getTextSpacing()); setWillNotDraw(false); this.mPrevText.setFocusable(true); this.mPrevText.setOnClickListener(new C01711()); this.mNextText.setFocusable(true); this.mNextText.setOnClickListener(new C01722()); if (getBackground() == null) { this.mDrawFullUnderline = true; } } public boolean getDrawFullUnderline() { return this.mDrawFullUnderline; } int getMinHeight() { return Math.max(super.getMinHeight(), this.mMinStripHeight); } @ColorInt public int getTabIndicatorColor() { return this.mIndicatorColor; } protected void onDraw(Canvas canvas) { super.onDraw(canvas); int height = getHeight(); int left = this.mCurrText.getLeft() - this.mTabPadding; int right = this.mCurrText.getRight() + this.mTabPadding; int i = height - this.mIndicatorHeight; this.mTabPaint.setColor((this.mTabAlpha << 24) | (this.mIndicatorColor & ViewCompat.MEASURED_SIZE_MASK)); canvas.drawRect((float) left, (float) i, (float) right, (float) height, this.mTabPaint); if (this.mDrawFullUnderline) { this.mTabPaint.setColor(ViewCompat.MEASURED_STATE_MASK | (this.mIndicatorColor & ViewCompat.MEASURED_SIZE_MASK)); canvas.drawRect((float) getPaddingLeft(), (float) (height - this.mFullUnderlineHeight), (float) (getWidth() - getPaddingRight()), (float) height, this.mTabPaint); } } public boolean onTouchEvent(MotionEvent motionEvent) { int action = motionEvent.getAction(); if (action != 0 && this.mIgnoreTap) { return false; } float x = motionEvent.getX(); float y = motionEvent.getY(); switch (action) { case 0: this.mInitialMotionX = x; this.mInitialMotionY = y; this.mIgnoreTap = false; break; case 1: if (x >= ((float) (this.mCurrText.getLeft() - this.mTabPadding))) { if (x > ((float) (this.mCurrText.getRight() + this.mTabPadding))) { this.mPager.setCurrentItem(this.mPager.getCurrentItem() + 1); break; } } this.mPager.setCurrentItem(this.mPager.getCurrentItem() - 1); break; break; case 2: if (Math.abs(x - this.mInitialMotionX) > ((float) this.mTouchSlop) || Math.abs(y - this.mInitialMotionY) > ((float) this.mTouchSlop)) { this.mIgnoreTap = true; break; } } return true; } public void setBackgroundColor(@ColorInt int i) { super.setBackgroundColor(i); if (!this.mDrawFullUnderlineSet) { this.mDrawFullUnderline = (ViewCompat.MEASURED_STATE_MASK & i) == 0; } } public void setBackgroundDrawable(Drawable drawable) { super.setBackgroundDrawable(drawable); if (!this.mDrawFullUnderlineSet) { this.mDrawFullUnderline = drawable == null; } } public void setBackgroundResource(@DrawableRes int i) { super.setBackgroundResource(i); if (!this.mDrawFullUnderlineSet) { this.mDrawFullUnderline = i == 0; } } public void setDrawFullUnderline(boolean z) { this.mDrawFullUnderline = z; this.mDrawFullUnderlineSet = true; invalidate(); } public void setPadding(int i, int i2, int i3, int i4) { if (i4 < this.mMinPaddingBottom) { i4 = this.mMinPaddingBottom; } super.setPadding(i, i2, i3, i4); } public void setTabIndicatorColor(@ColorInt int i) { this.mIndicatorColor = i; this.mTabPaint.setColor(this.mIndicatorColor); invalidate(); } public void setTabIndicatorColorResource(@ColorRes int i) { setTabIndicatorColor(getContext().getResources().getColor(i)); } public void setTextSpacing(int i) { if (i < this.mMinTextSpacing) { i = this.mMinTextSpacing; } super.setTextSpacing(i); } void updateTextPositions(int i, float f, boolean z) { Rect rect = this.mTempRect; int height = getHeight(); int i2 = height - this.mIndicatorHeight; rect.set(this.mCurrText.getLeft() - this.mTabPadding, i2, this.mCurrText.getRight() + this.mTabPadding, height); super.updateTextPositions(i, f, z); this.mTabAlpha = (int) ((Math.abs(f - 0.5f) * 2.0f) * 255.0f); rect.union(this.mCurrText.getLeft() - this.mTabPadding, i2, this.mCurrText.getRight() + this.mTabPadding, height); invalidate(rect); } }
[ "603820467@qq.com" ]
603820467@qq.com
32e3810396543e8b1af10da49aff310f04357c70
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-58b-2-29-SPEA2-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/analysis/function/Gaussian$Parametric_ESTest.java
780558a43ae89690c8c4491d1e2a50cbf275cf75
[]
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
891
java
/* * This file was automatically generated by EvoSuite * Mon Apr 06 15:48:09 UTC 2020 */ package org.apache.commons.math.analysis.function; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.apache.commons.math.analysis.function.Gaussian; 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 Gaussian$Parametric_ESTest extends Gaussian$Parametric_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { Gaussian.Parametric gaussian_Parametric0 = new Gaussian.Parametric(); double[] doubleArray0 = new double[3]; // Undeclared exception! gaussian_Parametric0.value((-1435.61832), doubleArray0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
5e3da868387c24a105c4c305be26bc4e21db1a63
ec3839996919ed49fe752b13a96981e67e6813ce
/src/LeetCode_1053.java
de0d72a415569e5ac2da8a8b80e87f009828f880
[]
no_license
epochong/Array
816b76557d137164671e87fa5ee86c48e9adb2df
947f620ff203f148dd959ca7955f44e52531f22d
refs/heads/master
2020-07-29T12:40:05.528721
2019-09-20T14:09:16
2019-09-20T14:09:16
209,805,947
0
0
null
null
null
null
UTF-8
Java
false
false
1,384
java
/** * @author epochong * @date 2019/9/16 23:00 * @email epochong@163.com * @blog epochong.github.io * @describe */ public class LeetCode_1053 { public static int[] prevPermOpt1(int[] A) { int index = 0; int cur = 0; for (int i = A.length - 1; i >= 1; i--) { if (A[i] == A[i - 1]) { continue; } index = findIndex(A,i); if (index != -1) { cur = i; break; } } if (cur != 0) { int tem = A[index]; A[index] = A[cur]; A[cur] = tem; } return A; } public static int findIndex(int[] arr,int cur) { for (int i = cur; i >= 0; i--) { if (arr[i] > arr[cur]) { int[] tem = new int[cur - i - 1]; for (int k = i + 1; k < i; k++) { tem[i] = arr[k]; } if (findIndex(tem,cur - 1) != -1) { return findIndex(tem,cur - 1); } else { return i; } } } return -1; } public static void main(String[] args) { int[] arr = new int[]{3,1,1,3}; arr = prevPermOpt1(arr); for (int i : arr) { System.out.println(i); } } }
[ "Valentineone@example.com" ]
Valentineone@example.com