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
a7f32feb962f53402a1d4a214758c0163ca01fa0
4f4ddc396fa1dfc874780895ca9b8ee4f7714222
/src/java/com/gensym/editor/text/Recording.java
6a0ad152f0662875af10935bafc070f156943a41
[]
no_license
UtsavChokshiCNU/GenSym-Test2
3214145186d032a6b5a7486003cef40787786ba0
a48c806df56297019cfcb22862dd64609fdd8711
refs/heads/master
2021-01-23T23:14:03.559378
2017-09-09T14:20:09
2017-09-09T14:20:09
102,960,203
3
5
null
null
null
null
UTF-8
Java
false
false
4,985
java
/* * Copyright (C) 1986-2017 Gensym Corporation. All Rights Reserved. * * Recording.java * */ package com.gensym.editor.text; import java.io.PrintStream; import java.io.FileOutputStream; import java.io.FileInputStream; import java.io.ObjectOutputStream; import java.io.ObjectInputStream; import java.io.IOException; import java.io.Serializable; import java.lang.ClassNotFoundException; import java.util.Vector; import java.util.Enumeration; import com.gensym.message.Trace; import com.gensym.util.Sequence; /** A 'recording' in the sense of a record of a sequence of events * that can be played back, saved, and restored */ public class Recording extends Sequence implements Serializable { private static final boolean traceEvents = true; private static final boolean debug = true; //int defaultCapacity = 50; // If you use this as the arg to super compiler complains that it can't be // accessed before the super is called. //int defaultCapacityIncrement = 25; /* If someone uses the same methods during playback as during * their original run, we can get a spurious duplication and * extensions unless we inhibit add, dump, or the like while * the playback operation is ongoing. */ private boolean isRecording = true; public void pause() { isRecording = false; } public void resume() { isRecording = true; } //---- Constructors ------------------ public Recording() { super(50); } public Recording(FileInputStream fis) { try { ObjectInputStream ois = new ObjectInputStream(fis); Sequence record = (Sequence)ois.readObject(); if (debug) { System.out.println("Retrived record from " + fis); } /* copy over the elements */ Object[] contents = record.getContents(); for (int i = 0; i < contents.length; i++) { addElement( contents[i] ); if (debug) { System.out.println(i + " = " + contents[i]); } } } catch (IOException e) { Trace.exception(e, "Problem using ObjectInputStream"); } catch (ClassNotFoundException e) { Trace.exception(e); } } //---- primary entry point ----------- /** Adds the object to the end of the record. */ @Override public boolean add(Object o) { if ( isRecording ) { if ( traceEvents ) System.out.println("Adding " + o); addElement(o); } /* In jdk1.2 Vector has been revampted to implement List, so now * it has an 'add' method, which add's to the end. The javadoc * says it (always??) returns true. */ return true; } /** Removes all of the stored objects from the record. */ public void reset() { removeAllElements(); } /** */ public void save (FileOutputStream fos) { try { ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject( this ); } catch (IOException e) { Trace.exception(e, "Problem using ObjectOutputStream"); } } //---- Dumping toString's to a stream -------------- /** Prints a listing of the recorded items to System.out. * This uses the toString method of the items, and is intended * for visual inspections of the record rather than offline storage. */ public void dump() { dump(System.out); } /** Prints a listing of the recorded items to the stream. * This uses the toString method of the items, and is intended * for visual inspections of the record rather than offline storage. */ public void dump(PrintStream stream) { for ( int i=0; i < elementCount; i++ ) { stream.println("#" + i + " " + elementAt(i)); } } //---- Playing back by issuing the objects as wrapped events ---- private Vector listeners = new Vector(); /** Adds a listener to the list of RecordingPlayback listeners. */ public void addPlaybackListener (RecordingPlaybackEventListener l) { listeners.addElement(l); } /** Removes a listener to the list of RecordingPlayback listeners. */ public void removePlaybackListener (RecordingPlaybackEventListener l) { listeners.removeElement(l); } public void playback() { playback(-1); } public void playback(long milliesToSleep) { boolean oldValueOfRecording = isRecording; try { // the Try is here for the benefit of the recording flag. isRecording = false; Enumeration r = elements(); Vector list = (Vector)listeners.clone(); while ( r.hasMoreElements() ) { Object next = r.nextElement(); System.out.println("Playing back " + next); RecordingPlaybackEvent e = new RecordingPlaybackEvent(next); for (int i = 0; i < list.size(); i++ ) { if ( milliesToSleep != -1 ) { try { Thread.sleep(milliesToSleep); } catch (InterruptedException ex) { Trace.exception(ex, "Unexpected exception while sleeping during Playback"); } } ((RecordingPlaybackEventListener)list.elementAt(i)) .handleRecordPlaybackEvent(e); } } } finally { isRecording = oldValueOfRecording; } } }
[ "utsavchokshi@Utsavs-MacBook-Pro.local" ]
utsavchokshi@Utsavs-MacBook-Pro.local
529b2ae49b525ea5e28e9797f3d08e8e18c14436
e6d34bda17520f1e61bb9fab1b3a1e660a91b0db
/src/main/java/walkingkooka/build/Builder.java
4b6128a2300c4986bb6566d5b577abf87ca7c1f7
[ "Apache-2.0" ]
permissive
mP1/walkingkooka
d614345bb2ebef1e4e5c976f9a24cbda2e0c3bb5
fc2b2aba7c9a29eee7dec25177b5b7cf0313554e
refs/heads/master
2023-07-19T10:18:59.148269
2023-07-17T10:40:49
2023-07-17T10:40:49
135,434,888
2
2
Apache-2.0
2023-09-13T09:09:18
2018-05-30T11:47:26
Java
UTF-8
Java
false
false
1,071
java
/* * Copyright 2019 Miroslav Pokorny (github.com/mP1) * * 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 walkingkooka.build; import walkingkooka.text.Whitespace; /** * A {@link Builder} is typically used to aggregate all the required properties required to build an * immutable value object. */ public interface Builder<T> { static void checkLabel(final String label) { Whitespace.failIfNullOrEmptyOrWhitespace(label, "label"); } /** * Builds the immutable instance. */ T build() throws BuilderException; }
[ "miroslav.pokorny@gmail.com" ]
miroslav.pokorny@gmail.com
42a96b38be4a19b7edc568451735fc0fe6466cda
f57001a92718a164fcc853d4a59dcfa4c17cae39
/src/by/belhard/j26/lessons/lesson10/example/StorageExample.java
0b3eee399c3bb873ccf989c38cb4b5e2a18d77ac
[]
no_license
Rozenberg-jv/BH-J26
a23e146dca25b1dd2eba90d5a48a0dc9d416b900
30c085e4dc1eb555ba9bf51797c263e1fb012cb2
refs/heads/master
2023-02-05T23:35:18.328773
2020-12-30T18:01:59
2020-12-30T18:01:59
313,393,909
0
1
null
null
null
null
UTF-8
Java
false
false
253
java
package by.belhard.j26.lessons.lesson10.example; public class StorageExample { public static void main(String[] args) { FruitStorage fruitStorage = new FruitStorage(); fruitStorage.processInvoice("invoice.in"); } }
[ "avangard.npaper@gmail.com" ]
avangard.npaper@gmail.com
ced034ccc69170c61b769e1022dbdc76c3adc7ad
5a088135a99a386e473f94f971c571864373865c
/04.MSH/02.Engineering/03.Code/01.server/trunk/base/trunk/src/main/java/com/lenovohit/el/base/model/User.java
7144b9e4a0af60ba9b748b73db3107e3e234cea3
[]
no_license
jacky-cyber/work
a7bebd2cc910da1e9e227181def880a78cc1de07
e58558221b2a8f410b087fa2ce88017cea12efa4
refs/heads/master
2022-02-25T09:48:53.940782
2018-05-01T10:04:53
2018-05-01T10:04:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,138
java
package com.lenovohit.el.base.model; import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import javax.persistence.Transient; import com.lenovohit.bdrp.authority.model.AuthUser; import com.lenovohit.core.model.BaseIdModel; import com.lenovohit.core.utils.BeanUtils; @Entity @Table(name = "EL_USER") public class User extends BaseIdModel implements AuthUser { private static final long serialVersionUID = 2674008211844809760L; private String name; private String idCardNo; private String gender; private String nickname; private String mobile; private String password; private String payPassword; private String email; private String wechat; private String weibo; private String qq; private String portrait; private String perHomeBg; private String siId; private String personId; private String sessionId; private String appId; private Set<UserApp> userApps = new HashSet<UserApp>(0); private Set<AppUser> appUsers = new HashSet<AppUser>(0); private Set<AppFeedBack> appFeedBacks = new HashSet<AppFeedBack>(0); @Column(name = "NAME", length = 100) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @Column(name = "ID_CARD_NO", length = 18) public String getIdCardNo() { return this.idCardNo; } public void setIdCardNo(String idCardNo) { this.idCardNo = idCardNo; } @Column(name = "GENDER", length = 1) public String getGender() { return this.gender; } public void setGender(String gender) { this.gender = gender; } @Column(name = "NICKNAME", length = 100) public String getNickname() { return this.nickname; } public void setNickname(String nickname) { this.nickname = nickname; } @Column(name = "MOBILE", length = 11) public String getMobile() { return this.mobile; } public void setMobile(String mobile) { this.mobile = mobile; } @Column(name = "PASSWORD", length = 50, updatable=false, insertable =false) public String getPassword() { return this.password; } public void setPassword(String password) { this.password = password; } @Column(name = "PAY_PASSWORD", length = 50,updatable=false, insertable =false) public String getPayPassword() { return this.payPassword; } public void setPayPassword(String payPassword) { this.payPassword = payPassword; } @Column(name = "EMAIL", length = 100) public String getEmail() { return this.email; } public void setEmail(String email) { this.email = email; } @Column(name = "WECHAT", length = 50) public String getWechat() { return this.wechat; } public void setWechat(String wechat) { this.wechat = wechat; } @Column(name = "WEIBO", length = 50) public String getWeibo() { return this.weibo; } public void setWeibo(String weibo) { this.weibo = weibo; } @Column(name = "QQ", length = 50) public String getQq() { return this.qq; } public void setQq(String qq) { this.qq = qq; } @Column(name = "PORTRAIT", length = 200) public String getPortrait() { return this.portrait; } public void setPortrait(String portrait) { this.portrait = portrait; } @Column(name = "PER_HOME_BG", length = 200) public String getPerHomeBg() { return this.perHomeBg; } public void setPerHomeBg(String perHomeBg) { this.perHomeBg = perHomeBg; } @Column(name = "SI_ID", length = 20) public String getSiId() { return this.siId; } public void setSiId(String siId) { this.siId = siId; } @Column(name = "PERSON_ID", length = 32) public String getPersonId() { return personId; } public void setPersonId(String personId) { this.personId = personId; } @Transient public String getSessionId() { return sessionId; } public void setSessionId(String sessionId) { this.sessionId = sessionId; } @Transient public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } @Transient public Set<UserApp> getUserApps() { if(null == userApps){ return new HashSet<UserApp>(); } return this.userApps; } public void setUserApps(Set<UserApp> userApps) { this.userApps = userApps; } @Transient public Set<AppUser> getAppUsers() { if(null == appUsers){ return new HashSet<AppUser>(); } return this.appUsers; } public void setAppUsers(Set<AppUser> appUsers) { this.appUsers = appUsers; } @Transient public Set<AppFeedBack> getAppFeedBacks() { if(null == appFeedBacks){ return new HashSet<AppFeedBack>(); } return this.appFeedBacks; } public void setAppFeedBacks(Set<AppFeedBack> appFeedBacks) { this.appFeedBacks = appFeedBacks; } @Transient @Override public String getUsername() { // TODO Auto-generated method stub return this.getMobile(); } @Override public void setUsername(String username) { this.setMobile(username); } @Override public AuthUser clone() { try { Object clone = super.clone(); return (AuthUser)clone; } catch (CloneNotSupportedException e) { User target = new User(); BeanUtils.copyProperties(this, target); return target; } } }
[ "liuximing2016@qq.com" ]
liuximing2016@qq.com
f0d1e9cf1549a8af93674f0ee125b3f69019203f
a306f79281c4eb154fbbddedea126f333ab698da
/com/facebook/react/views/picker/ReactDialogPickerManager.java
5f0638f6f13fded131664bf7b8f7c7507a0bddf3
[]
no_license
pkcsecurity/decompiled-lightbulb
50828637420b9e93e9a6b2a7d500d2a9a412d193
314bb20a383b42495c04531106c48fd871115702
refs/heads/master
2022-01-26T18:38:38.489549
2019-05-11T04:27:09
2019-05-11T04:27:09
186,070,402
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package com.facebook.react.views.picker; import com.facebook.react.module.annotations.ReactModule; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.views.picker.ReactPicker; import com.facebook.react.views.picker.ReactPickerManager; @ReactModule( name = "AndroidDialogPicker" ) public class ReactDialogPickerManager extends ReactPickerManager { protected static final String REACT_CLASS = "AndroidDialogPicker"; protected ReactPicker createViewInstance(ThemedReactContext var1) { return new ReactPicker(var1, 0); } public String getName() { return "AndroidDialogPicker"; } }
[ "josh@pkcsecurity.com" ]
josh@pkcsecurity.com
76f9046625a9913e461610d45de56bd2a17c7d9e
1d11d02630949f18654d76ed8d5142520e559b22
/TreeGrow/src/org/tolweb/treegrow/tree/undo/ZombiedNodesUndoableEdit.java
540c326e54436c4ebe4536ee81c27653b63b85c9
[]
no_license
tolweb/tolweb-app
ca588ff8f76377ffa2f680a3178351c46ea2e7ea
3a7b5c715f32f71d7033b18796d49a35b349db38
refs/heads/master
2021-01-02T14:46:52.512568
2012-03-31T19:22:24
2012-03-31T19:22:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
672
java
/* * ZombiedNodesUndoableEdit.java * * Created on November 7, 2003, 2:21 PM */ package org.tolweb.treegrow.tree.undo; import java.util.*; /** * * @author dmandel */ public abstract class ZombiedNodesUndoableEdit extends AbstractTreeEditorUndoableEdit { protected ArrayList zombiedNodes; protected boolean fromConstructor; /** Creates a new instance of ZombiedNodesUndoableEdit */ public ZombiedNodesUndoableEdit() { zombiedNodes = new ArrayList(); fromConstructor = true; } public ArrayList getZombiedNodes() { return zombiedNodes; } public abstract void updateTreePanel(); }
[ "lenards@iplantcollaborative.org" ]
lenards@iplantcollaborative.org
7ae10334933175a938a591efc1a51cf3aac1c1cb
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/kotlin/reflect/jvm/internal/impl/serialization/deserialization/descriptors/DeserializedMemberScope$propertyProtos$2.java
5f0110d735ab860259046277ab8cd265a65fc06e
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
1,609
java
package kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors; import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.Lambda; import kotlin.reflect.jvm.internal.impl.name.Name; import kotlin.reflect.jvm.internal.impl.protobuf.MessageLite; import kotlin.reflect.jvm.internal.impl.serialization.ProtoBuf.Property; /* compiled from: DeserializedMemberScope.kt */ final class DeserializedMemberScope$propertyProtos$2 extends Lambda implements Function0<Map<Name, ? extends List<? extends Property>>> { final /* synthetic */ DeserializedMemberScope f38893a; final /* synthetic */ Collection f38894b; DeserializedMemberScope$propertyProtos$2(DeserializedMemberScope deserializedMemberScope, Collection collection) { this.f38893a = deserializedMemberScope; this.f38894b = collection; super(0); } public final /* synthetic */ Object invoke() { DeserializedMemberScope deserializedMemberScope = this.f38893a; Map linkedHashMap = new LinkedHashMap(); for (Object next : this.f38894b) { Name b = deserializedMemberScope.f38901b.f26246d.mo5830b(((Property) ((MessageLite) next)).f40422g); ArrayList arrayList = linkedHashMap.get(b); if (arrayList == null) { arrayList = new ArrayList(); linkedHashMap.put(b, arrayList); } arrayList.add(next); } return linkedHashMap; } }
[ "mi.arevalo10@uniandes.edu.co" ]
mi.arevalo10@uniandes.edu.co
c93e1e59b11318e26f46f7cb35afb9be2b7bb431
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/platform/platform-impl/src/com/intellij/ide/lightEdit/statusBar/LightEditAbstractPopupWidgetWrapper.java
e4f51edccb69b1ef8722d6c3bf937c5c23d759a8
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
2,472
java
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.ide.lightEdit.statusBar; import com.intellij.ide.lightEdit.LightEditService; import com.intellij.ide.lightEdit.LightEditorInfo; import com.intellij.ide.lightEdit.LightEditorInfoImpl; import com.intellij.ide.lightEdit.LightEditorListener; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.NotNullLazyValue; import com.intellij.openapi.wm.CustomStatusBarWidget; import com.intellij.openapi.wm.StatusBar; import com.intellij.openapi.wm.StatusBarWidget; import com.intellij.openapi.wm.impl.status.EditorBasedStatusBarPopup; import kotlinx.coroutines.CoroutineScope; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; public abstract class LightEditAbstractPopupWidgetWrapper implements StatusBarWidget, LightEditorListener, CustomStatusBarWidget { private final NotNullLazyValue<EditorBasedStatusBarPopup> myOriginalInstance; private @Nullable Editor myEditor; private final @NotNull Project myProject; protected LightEditAbstractPopupWidgetWrapper(@NotNull Project project, @NotNull CoroutineScope scope) { myProject = project; myOriginalInstance = NotNullLazyValue.createValue(() -> { //noinspection deprecation return createOriginalWidget(scope); }); } protected @Nullable Editor getLightEditor() { return myEditor; } protected abstract @NotNull EditorBasedStatusBarPopup createOriginalWidget(@NotNull CoroutineScope scope); private @NotNull EditorBasedStatusBarPopup getOriginalWidget() { return myOriginalInstance.getValue(); } @Override public void install(@NotNull StatusBar statusBar) { getOriginalWidget().install(statusBar); LightEditService.getInstance().getEditorManager().addListener(this); } @Override public void dispose() { Disposer.dispose(getOriginalWidget()); } @Override public void afterSelect(@Nullable LightEditorInfo editorInfo) { myEditor = LightEditorInfoImpl.getEditor(editorInfo); getOriginalWidget().setEditor(myEditor); getOriginalWidget().update(); } @Override public JComponent getComponent() { return getOriginalWidget().getComponent(); } protected @NotNull Project getProject() { return myProject; } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
2fec58dc068973643934d24bfc347130d0f243d4
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/8/ShiroAuthenticationStrategy.java
90ce4a9ca3c5fad6019c2eea1849b56cb3e75d24
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
1,470
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.server.security.enterprise.auth; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationToken; import org.apache.shiro.authc.pam.AbstractAuthenticationStrategy; import org.apache.shiro.realm.Realm; import java.util.Collection; public class ShiroAuthenticationStrategy extends AbstractAuthenticationStrategy { @Override public AuthenticationInfo beforeAllAttempts( Collection<? extends Realm> realms, AuthenticationToken token ) throws AuthenticationException { return new ShiroAuthenticationInfo(); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
c2a4c3456b4de703886fc1e54e45043fd8f0e9ea
d831fbd0756bcf8df9ae97c1d6ae11d7c15a8fbb
/src/org/ctp/enchantmentsolution/threads/AdvancementThread.java
4e7572319aed1d7cd1144f1e8f10de15dff538f4
[]
no_license
crashtheparty/EnchantmentSolution
f877804c17a42ec7bb64741ea51074153611a20d
27a261fb2d030053831139ebb30bb4dffe278ce0
refs/heads/master
2023-06-28T19:24:38.544815
2023-06-18T05:41:47
2023-06-18T05:41:47
140,357,749
21
17
null
2023-01-12T21:38:07
2018-07-10T00:49:17
Java
UTF-8
Java
false
false
1,595
java
package org.ctp.enchantmentsolution.threads; import java.util.Iterator; import org.bukkit.entity.Player; import org.ctp.enchantmentsolution.EnchantmentSolution; import org.ctp.enchantmentsolution.advancements.ESAdvancement; import org.ctp.enchantmentsolution.utils.AdvancementUtils; import org.ctp.enchantmentsolution.utils.abilityhelpers.OverkillDeath; import org.ctp.enchantmentsolution.utils.player.ESPlayer; public class AdvancementThread implements Runnable { @Override public void run() { kilimanjaro(); worldRecord(); } private void kilimanjaro() { if (!ESAdvancement.KILIMANJARO.isEnabled()) return; Iterator<ESPlayer> iter = EnchantmentSolution.getOverkillDeathPlayers().iterator(); while (iter.hasNext()) { ESPlayer esPlayer = iter.next(); Iterator<OverkillDeath> deaths = esPlayer.getOverkillDeaths().iterator(); while (deaths.hasNext()) { OverkillDeath death = deaths.next(); death.minus(); if (death.getTicks() <= 0) deaths.remove(); } if (esPlayer.getOverkillDeaths().size() >= 10 && esPlayer.isOnline()) { Player player = esPlayer.getOnlinePlayer(); AdvancementUtils.awardCriteria(player, ESAdvancement.KILIMANJARO, "kills"); } } } private void worldRecord() { if (!ESAdvancement.WORLD_RECORD.isEnabled()) return; Iterator<ESPlayer> iter = EnchantmentSolution.getAllESPlayers(true).iterator(); while (iter.hasNext()) { ESPlayer esPlayer = iter.next(); if (esPlayer.getOnlinePlayer().getEyeLocation().getBlock().isLiquid()) esPlayer.addUnderwaterTick(); else esPlayer.resetUnderwaterTick(); } } }
[ "laytfire2@gmail.com" ]
laytfire2@gmail.com
a1fd45e3b17b87e790374664bd3c993bae5dc598
13b89199b2147bd1c7d3a062a606f0edd723c8d6
/AlgorithmStudy/src/CodeUp/배열/_1430_ing.java
e3fa6cbaa1c504b0ff0dbfc9359d877229e33b1f
[]
no_license
chlals862/Algorithm
7bcbcf09b5d4ecad5af3a99873dc960986d1709f
ab4a6d0160ad36404b64ad4b32ce38b67994609f
refs/heads/master
2022-11-28T13:05:58.232855
2022-11-23T09:56:27
2022-11-23T09:56:27
243,694,528
1
1
null
null
null
null
UTF-8
Java
false
false
1,301
java
package CodeUp.배열; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.StringTokenizer; public class _1430_ing { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); static StringTokenizer st; public static void main(String[] args) throws IOException { int count = 0; int num1 = Integer.parseInt(br.readLine()); st = new StringTokenizer(br.readLine()); int[] arr1 = new int[num1]; for(int row=0;row<arr1.length;row++) { arr1[row] = Integer.parseInt(st.nextToken()); } int num2 = Integer.parseInt(br.readLine()); int[] arr2 = new int[num2]; st = new StringTokenizer(br.readLine()); for(int row=0;row<arr2.length;row++) { arr2[row] = Integer.parseInt(st.nextToken()); } int[] result = new int[num2]; for(int row=0;row<arr2.length;row++) { for(int col=0;col<arr1.length;col++) { if(arr2[row] == arr1[col]) { result[row] = 1; break; }else if(arr2[row] != arr1[col]) { result[count] = 0; } } } for(int row=0;row<result.length;row++) bw.write(result[row]+" "); bw.flush(); } }
[ "chlals862@naver.com" ]
chlals862@naver.com
7d0f55245c561fdb482abfdf150c7ba19e8d427b
ad5cd983fa810454ccbb8d834882856d7bf6faca
/platform/bootstrap/gensrc/de/hybris/platform/task/model/TriggerTaskModel.java
5f85adae680663ed56d3f700b6ad0569a22b6484
[]
no_license
amaljanan/my-hybris
2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8
ef9f254682970282cf8ad6d26d75c661f95500dd
refs/heads/master
2023-06-12T17:20:35.026159
2021-07-09T04:33:13
2021-07-09T04:33:13
384,177,175
0
0
null
null
null
null
UTF-8
Java
false
false
3,559
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at 07-Jul-2021, 5:02:58 PM --- * ---------------------------------------------------------------- * * Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.task.model; import de.hybris.bootstrap.annotations.Accessor; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.cronjob.model.TriggerModel; import de.hybris.platform.servicelayer.model.ItemModelContext; import de.hybris.platform.task.TaskModel; /** * Generated model class for type TriggerTask first defined at extension processing. */ @SuppressWarnings("all") public class TriggerTaskModel extends TaskModel { /**<i>Generated model type code constant.</i>*/ public static final String _TYPECODE = "TriggerTask"; /** <i>Generated constant</i> - Attribute key of <code>TriggerTask.trigger</code> attribute defined at extension <code>processing</code>. */ public static final String TRIGGER = "trigger"; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public TriggerTaskModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public TriggerTaskModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated since 4.1.1 Please use the default constructor without parameters * @param _runnerBean initial attribute declared by type <code>TriggerTask</code> at extension <code>processing</code> * @param _trigger initial attribute declared by type <code>TriggerTask</code> at extension <code>processing</code> */ @Deprecated(since = "4.1.1", forRemoval = true) public TriggerTaskModel(final String _runnerBean, final TriggerModel _trigger) { super(); setRunnerBean(_runnerBean); setTrigger(_trigger); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated since 4.1.1 Please use the default constructor without parameters * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> * @param _runnerBean initial attribute declared by type <code>TriggerTask</code> at extension <code>processing</code> * @param _trigger initial attribute declared by type <code>TriggerTask</code> at extension <code>processing</code> */ @Deprecated(since = "4.1.1", forRemoval = true) public TriggerTaskModel(final ItemModel _owner, final String _runnerBean, final TriggerModel _trigger) { super(); setOwner(_owner); setRunnerBean(_runnerBean); setTrigger(_trigger); } /** * <i>Generated method</i> - Getter of the <code>TriggerTask.trigger</code> attribute defined at extension <code>processing</code>. * @return the trigger */ @Accessor(qualifier = "trigger", type = Accessor.Type.GETTER) public TriggerModel getTrigger() { return getPersistenceContext().getPropertyValue(TRIGGER); } /** * <i>Generated method</i> - Setter of <code>TriggerTask.trigger</code> attribute defined at extension <code>processing</code>. * * @param value the trigger */ @Accessor(qualifier = "trigger", type = Accessor.Type.SETTER) public void setTrigger(final TriggerModel value) { getPersistenceContext().setPropertyValue(TRIGGER, value); } }
[ "amaljanan333@gmail.com" ]
amaljanan333@gmail.com
3ee6254d7b5efadf129dd4fb3ee267a51d27074d
6b874867e75329325b0baaf1c0f3f6d7ecf004cf
/src/main/java/programmers/q42883/Solution.java
36ddd10dd723faf4928e0494be4d3f597e5df6e9
[]
no_license
kkssry/algorithm
e36ef834fea2d2db444b16b58898b9cc76a45383
cdd4af227db018d2529e6aedd991d2ef1b596d6f
refs/heads/master
2020-04-20T14:27:19.293476
2020-02-28T13:55:16
2020-02-28T13:55:16
168,898,908
1
0
null
null
null
null
UTF-8
Java
false
false
627
java
package programmers.q42883; public class Solution { public String solution(String number, int k) { StringBuilder sb = new StringBuilder(number); while (k > 0) { boolean deleted = false; for (int i = 0; i < sb.length() - 1; i++) { if (sb.charAt(i) < sb.charAt(i + 1)) { sb.deleteCharAt(i); deleted = true; break; } } if (!deleted) { sb.deleteCharAt(sb.length() - 1); } k--; } return sb.toString(); } }
[ "kkssry@naver.com" ]
kkssry@naver.com
4f9f8a90d66c8440e38fe25fd0eca040661dce61
15d0df6ba5c3a9b5a1b0798a873a2ad30608a2ce
/Workspace/org.openlayer.map/src/org/openlayer/map/control/ShapesView.java
877c9de1acab8aefd8d9526b4da8f33d9685021f
[ "BSD-3-Clause", "BSD-2-Clause", "Apache-2.0" ]
permissive
condast/org.condast.js
5a8ce7ef7b0053e17d15f773f61800119309e444
2796a614abdfc1b4ce84d7b31cb6c4942953b277
refs/heads/master
2022-08-30T12:42:38.513505
2022-06-09T17:22:58
2022-06-09T17:22:58
74,229,866
0
0
null
null
null
null
UTF-8
Java
false
false
4,434
java
package org.openlayer.map.control; import java.util.Collection; import org.condast.commons.data.plane.FieldData; import org.condast.commons.data.plane.FieldData.Shapes; import org.condast.commons.data.plane.IField; import org.condast.commons.data.plane.IPolygon; import org.condast.commons.strings.StringStyler; import org.condast.commons.strings.StringUtils; import org.condast.js.commons.controller.AbstractView; import org.condast.js.commons.controller.IJavascriptController; public class ShapesView extends AbstractView<ShapesView.Commands> { public static enum Commands{ CLEAR_SHAPES, SET_SHAPE, ADD_SHAPE, ADDEND_SHAPE, GET_SHAPE, REMOVE_SHAPE; public CommandTypes getCommandType() { CommandTypes type = CommandTypes.SEQUENTIAL; switch( this ) { case CLEAR_SHAPES: type = CommandTypes.EQUAL; break; case SET_SHAPE: case REMOVE_SHAPE: type = CommandTypes.EQUAL_ATTR; break; default: break; } return type; } public boolean isArray() { boolean result = false; switch( this ) { case ADD_SHAPE: case ADDEND_SHAPE: break; default: break; } return result; } public static boolean isValue( String str ) { if( StringUtils.isEmpty(str)) return false; String styles = StringStyler.styleToEnum(str); for( Commands command: values()) { if( command.name().equals(styles)) return true; } return false; } @Override public String toString() { return StringStyler.toMethodString(this.name()); } } public static enum Types{ POINT, POLYGON, LINE_STRING, LINEAR_RING, MULTI_POINT, MULTI_LINE_STRING, MULTI_POLYGON, GEOMETRY_COLLECTION, CIRCLE; @Override public String toString() { return StringStyler.prettyString( this.name()); } public static Types fromShape(FieldData.Shapes shape) { Types type = Types.POINT; switch( shape ) { case LINE: type = LINE_STRING; break; case BOX: case SQUARE: type = Types.LINEAR_RING; break; case CIRCLE: type = Types.CIRCLE; break; default: break; } return type; } } private IField field; public ShapesView( IJavascriptController controller) { super( controller ); } @Override protected CommandTypes getCommandType(Commands command) { return command.getCommandType(); } public IField getField() { return field; } /** * Clear the interactions * @return */ public String clear() { return super.clear( Commands.CLEAR_SHAPES ); } /** * Create a new shape on the map of the given type * @param name * @param type * @return */ public String setShape( String name, Types type){ Collection<String> params = super.getParameters( Commands.SET_SHAPE); params.add( name ); params.add( type.toString() ); return super.perform(Commands.SET_SHAPE, params.toArray( new String[params.size()]), false); } /** * Create a new shape on the map of the given type * @param name * @param type * @return */ public String setShape( String name, Shapes shape){ return this.setShape( name, Types.fromShape( shape )); } public String addShape( IPolygon polygon ){ Collection<String> params = super.getParameters( Commands.ADD_SHAPE); params.add( polygon.toWKT() ); return super.perform(Commands.ADD_SHAPE, params.toArray( new String[params.size()]), Commands.ADD_SHAPE.isArray()); } public String addShape( String wtk ){ Collection<String> params = super.getParameters( Commands.ADD_SHAPE); params.add( wtk ); return super.perform(Commands.ADD_SHAPE, params.toArray( new String[params.size()]), Commands.ADD_SHAPE.isArray() ); } public String addendShape( String wtk ){ Collection<String> params = super.getParameters( Commands.ADDEND_SHAPE); params.add( wtk ); return super.perform(Commands.ADDEND_SHAPE, params.toArray( new String[params.size()]), Commands.ADDEND_SHAPE.isArray() ); } public String getShape( String id ){ Collection<String> params = super.getParameters( Commands.GET_SHAPE); params.add( id ); return super.perform(Commands.GET_SHAPE, params.toArray( new String[params.size()]), Commands.GET_SHAPE.isArray() ); } public String removeShape( String id ){ Collection<String> params = super.getParameters( Commands.REMOVE_SHAPE); params.add( id ); return super.perform(Commands.REMOVE_SHAPE, params.toArray( new String[params.size()]), Commands.REMOVE_SHAPE.isArray()); } }
[ "info@condast.com" ]
info@condast.com
737f2f73c27da6e880c4f8fa8e76a2c9d7e076dc
dd91160574613bda26b84634982dfbb668f9cd4e
/src/main/java/classstructuremethods/Note.java
5db597ffff64349b96b3b692965ca2f34292a5e8
[]
no_license
djtesla/training-solutions
fbaa6216e151be39e0ceef7bcb1466652d56f9e4
4d54a4d5573ae897bef7bcd55cc779d92414d57b
refs/heads/master
2023-07-15T21:38:59.893443
2021-09-06T06:02:13
2021-09-06T06:02:13
308,435,314
0
0
null
null
null
null
UTF-8
Java
false
false
622
java
package classstructuremethods; public class Note { private String name; private String topic; private String text; public void setName(String name) { this.name = name; } public void setTopic(String topic) { this.topic = topic; } public void setText(String text) { this.text = text; } public String getName() { return name; } public String getTopic() { return topic; } public String getText() { return text; } public String getNoteText() { return name + ": " + "(" + topic + ") " + text; } }
[ "djtesla@gmailcom" ]
djtesla@gmailcom
bc194a27702efeb72c959b8c30d565d52f4e0c45
7dc6bf17c5acc4a5755063a3ffc0c86f4b6ad8c3
/java_decompiled_from_smali/org/andengine/b/b/a/a.java
455216f733ee6bf18dcc3bd7f709a30e3844ef31
[]
no_license
alecsandrudaj/mobileapp
183dd6dc5c2fe8ab3aa1f21495d4221e6f304965
b1b4ad337ec36ffb125df8aa1d04c759c33c418a
refs/heads/master
2023-02-19T18:07:50.922596
2021-01-07T15:30:44
2021-01-07T15:30:44
300,325,195
0
0
null
2020-11-19T13:26:25
2020-10-01T15:18:57
Smali
UTF-8
Java
false
false
403
java
package org.andengine.b.b.a; import java.util.ArrayList; import org.andengine.b.b.c; public class a implements c { private final ArrayList a = new ArrayList(); public synchronized void a_(float f) { ArrayList arrayList = this.a; for (int size = arrayList.size() - 1; size >= 0; size--) { ((Runnable) arrayList.remove(size)).run(); } } }
[ "rgosa@bitdefender.com" ]
rgosa@bitdefender.com
90a4bf5cc764be2cee00838f6c38392ea87d6bca
9891d611ab0317633eb8de02973625421011cac6
/app/src/main/java/com/annieshub/stores/shippingMethodListPOJO/Model.java
bbf093f4f0a57e2ac863ebf887f90b4c4d14b239
[]
no_license
mukulraw/agtaj
67c3956baed47b4b006a1757773300a94cd5fdf6
5cbbb7ac5795b747d74636da346e6514cce4b512
refs/heads/master
2021-07-07T10:12:33.580768
2020-07-27T09:28:15
2020-07-27T09:28:15
133,718,318
0
1
null
null
null
null
UTF-8
Java
false
false
1,141
java
package com.annieshub.stores.shippingMethodListPOJO; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.List; public class Model { @SerializedName("Flat Rate") @Expose private List<FlatRate> flatRate = null; @SerializedName("Free Shipping") @Expose private List<FreeShipping> freeShipping = null; @SerializedName("United Parcel Service") @Expose private List<UnitedParcelService> unitedParcelService = null; public List<FlatRate> getFlatRate() { return flatRate; } public void setFlatRate(List<FlatRate> flatRate) { this.flatRate = flatRate; } public List<FreeShipping> getFreeShipping() { return freeShipping; } public void setFreeShipping(List<FreeShipping> freeShipping) { this.freeShipping = freeShipping; } public List<UnitedParcelService> getUnitedParcelService() { return unitedParcelService; } public void setUnitedParcelService(List<UnitedParcelService> unitedParcelService) { this.unitedParcelService = unitedParcelService; } }
[ "mukulraw199517@gmail.com" ]
mukulraw199517@gmail.com
66a5ef40c62eeaced5e523a093a83ed91156d532
f492b061b94a69b127844ad61c3fdc9fa2f3298f
/core-monitor/src/main/java/com/zk/monitor/core/util/ArrayUtil.java
2f5a7c30bb2f5eda4e41512cfb189fb89bac1866
[]
no_license
iosdouble/zk-monitor
b4cb0c0a15cf9cbc8cb1d73c0cffe0ba6574973d
a4fe6a0cdc5b328969a49875a39158c3586a5810
refs/heads/master
2023-01-14T15:01:30.928811
2020-11-18T08:55:10
2020-11-18T08:55:10
312,130,740
0
1
null
null
null
null
UTF-8
Java
false
false
1,231
java
package com.zk.monitor.core.util; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * com.zk.monitor.core.util * create by admin nihui * create time 2020/11/18 * version 1.0 **/ public class ArrayUtil { /** * 去掉数组中空项 * * @param olds * @return news */ public static String[] trim(String[] olds) { if (olds ==null ||olds.length == 0){ return olds; } List<String> list = new ArrayList<>(); for (String old : olds) { if (old != null && !"".equals(old)) { list.add(old); } } String[] news = new String[list.size()]; for (int i = 0; i < list.size(); i++) { news[i] = list.get(i); } return news; } /** * 匹配字符出现次数 * @param srcText * @param findText * @return */ public static int appearNumber(String srcText, String findText) { int count = 0; Pattern p = Pattern.compile(findText); Matcher m = p.matcher(srcText); while (m.find()) { count++; } return count; } }
[ "18202504057@163.com" ]
18202504057@163.com
bb6f66f056ec2c1dda417baef8223d819aa5e4dc
0f07875056ac8f6429f554b14a73b351cf216940
/hacks/eTradr/src/java/de/oop/etrade/business/ordering/boundary/APIAudit.java
f384e45266d7d808112427723a1b5e72464494f0
[]
no_license
dlee0113/java_ee_patterns_and_best_practices
b40b541d46799b634b52ffc5a31daf1e08236cc5
195a8ddf73e656d9acb21293141d6b38a47d0069
refs/heads/master
2020-06-30T03:26:52.852948
2015-04-01T12:35:15
2015-04-01T12:35:15
33,245,536
15
12
null
null
null
null
UTF-8
Java
false
false
348
java
package de.oop.etrade.business.ordering.boundary; import javax.interceptor.AroundInvoke; import javax.interceptor.InvocationContext; public class APIAudit { @AroundInvoke public Object audit(InvocationContext context) throws Exception{ System.out.println("--- " + context.getMethod()); return context.proceed(); } }
[ "dlee0113@gmail.com" ]
dlee0113@gmail.com
67a26e9eea93220fcc574e920cc72a227b1309a1
e5fcecd08dc30e947cf11d1440136994226187c6
/SpagoBIConsoleEngine/src/main/java/it/eng/spagobi/engines/console/exporter/JRSpagoBIDataStoreDataSource.java
661e56cfebdc99cab08408438bd7ccbcb9395274
[]
no_license
skoppe/SpagoBI
16851fa5a6949b5829702eaea2724cee0629560b
7a295c096e3cca9fb53e5c125b9566983472b259
refs/heads/master
2021-05-05T10:18:35.120113
2017-11-27T10:26:44
2017-11-27T10:26:44
104,053,911
0
0
null
2017-09-19T09:19:44
2017-09-19T09:19:43
null
UTF-8
Java
false
false
2,873
java
/* SpagoBI, the Open Source Business Intelligence suite * Copyright (C) 2012 Engineering Ingegneria Informatica S.p.A. - SpagoBI Competency Center * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0, without the "Incompatible With Secondary Licenses" notice. * If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package it.eng.spagobi.engines.console.exporter; import java.sql.Date; import java.util.Iterator; import net.sf.jasperreports.engine.JRField; import net.sf.jasperreports.engine.JRRewindableDataSource; import org.apache.log4j.Logger; import it.eng.spago.dbaccess.sql.DateDecorator; import it.eng.spagobi.tools.dataset.common.datastore.IDataStore; import it.eng.spagobi.tools.dataset.common.datastore.IRecord; /** * @author Andrea Gioia (andrea.gioia@eng.it) */ public class JRSpagoBIDataStoreDataSource implements JRRewindableDataSource { private IDataStore dataStore = null; private Iterator<IRecord> records = null; private IRecord currentRecord = null; private static transient Logger logger = Logger.getLogger(JRSpagoBIDataStoreDataSource.class); public JRSpagoBIDataStoreDataSource(IDataStore ds) { dataStore = ds; if (dataStore != null) { records = dataStore.iterator(); } } public boolean next() { boolean hasNext = false; if (records != null) { hasNext = records.hasNext(); if (hasNext) { currentRecord = records.next(); logger.debug("Go to nect record ..."); } } return hasNext; } public Object getFieldValue(JRField field) { Object value = null; int fieldIndex; if (currentRecord != null) { fieldIndex = dataStore.getMetaData().getFieldIndex(field.getName()); value = currentRecord.getFieldAt(fieldIndex).getValue(); if(value instanceof DateDecorator) { DateDecorator dateDecorator = (DateDecorator)value; value = new Date(dateDecorator.getTime()); } } logger.debug(field.getName() + ": " + value); return value; } public void moveFirst() { if (dataStore != null) { records = dataStore.iterator(); } } /** * Returns the underlying map dataStore used by this data source. * * @return the underlying dataStore */ public IDataStore getDataStore() { return dataStore; } /** * Returns the total number of records/maps that this data source * contains. * * @return the total number of records of this data source */ public int getRecordCount() { return dataStore == null ? 0 : (int)dataStore.getRecordsCount(); } /** * Clones this data source by creating a new instance that reuses the same * underlying map collection. * * @return a clone of this data source */ public JRSpagoBIDataStoreDataSource cloneDataSource() { return new JRSpagoBIDataStoreDataSource(dataStore); } }
[ "mail@skoppe.eu" ]
mail@skoppe.eu
9dfabae4c6ad20e803ff1d461eb1c52bbc0c7b31
fff8f77f810bbd5fb6b4e5f7a654568fd9d3098d
/src/main/java/androidx/navigation/fragment/FragmentNavArgsLazyKt.java
bf4c8c8e0948e539fd25b7af3d40a77d41ad15b8
[]
no_license
TL148/gorkiy
b6ac8772587e9e643d939ea399bf5e7a42e89f46
da8fbd017277cf72020c8c800326954bb1a0cee3
refs/heads/master
2021-05-21T08:24:39.286900
2020-04-03T02:57:49
2020-04-03T02:57:49
252,618,229
0
0
null
2020-04-03T02:54:39
2020-04-03T02:54:39
null
UTF-8
Java
false
false
1,109
java
package androidx.navigation.fragment; import androidx.fragment.app.Fragment; import androidx.navigation.NavArgs; import androidx.navigation.NavArgsLazy; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Reflection; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0012\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u001a\u001f\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003*\u00020\u0004H‡\b¨\u0006\u0005"}, d2 = {"navArgs", "Landroidx/navigation/NavArgsLazy;", "Args", "Landroidx/navigation/NavArgs;", "Landroidx/fragment/app/Fragment;", "navigation-fragment-ktx_release"}, k = 2, mv = {1, 1, 13}) /* compiled from: FragmentNavArgsLazy.kt */ public final class FragmentNavArgsLazyKt { private static final <Args extends NavArgs> NavArgsLazy<Args> navArgs(Fragment fragment) { Intrinsics.reifiedOperationMarker(4, "Args"); return new NavArgsLazy<>(Reflection.getOrCreateKotlinClass(NavArgs.class), new FragmentNavArgsLazyKt$navArgs$1(fragment)); } }
[ "itaysontesterlab@gmail.com" ]
itaysontesterlab@gmail.com
7ae58e10f08f91a5a3b5f34c108daded508c6ecc
a05e1a01a49a59129cdd71c1fe843c910a35ed8c
/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/spec/BatchGetItemSpec.java
3075e83cc4146d6219e93fbf169568c146dbc88d
[ "Apache-2.0", "JSON" ]
permissive
lenadkn/java-sdk-test-2
cd36997e44cd3926831218b2da7c71deda8c2b26
28375541f8a4ae27417419772190a8de2b68fc32
refs/heads/master
2021-01-20T20:36:53.719764
2014-12-19T00:38:57
2014-12-19T00:38:57
65,262,893
1
0
null
null
null
null
UTF-8
Java
false
false
3,491
java
/* * Copyright 2014-2014 Amazon.com, Inc. or its affiliates. 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://aws.amazon.com/apache2.0 * * 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.amazonaws.services.dynamodbv2.document.spec; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; import com.amazonaws.event.ProgressListener; import com.amazonaws.metrics.RequestMetricCollector; import com.amazonaws.services.dynamodbv2.document.TableKeysAndAttributes; import com.amazonaws.services.dynamodbv2.model.BatchGetItemRequest; import com.amazonaws.services.dynamodbv2.model.KeysAndAttributes; import com.amazonaws.services.dynamodbv2.model.ReturnConsumedCapacity; /** * Full parameter specification for the BatchGetItem API. */ public class BatchGetItemSpec extends AbstractSpec<BatchGetItemRequest> { private Collection<TableKeysAndAttributes> tableKeyAndAttributes; private Map<String, KeysAndAttributes> unprocessedKeys; public BatchGetItemSpec() { super(new BatchGetItemRequest()); } public Collection<TableKeysAndAttributes> getTableKeysAndAttributes() { return tableKeyAndAttributes; } public BatchGetItemSpec withTableKeyAndAttributes( TableKeysAndAttributes ... tableKeyAndAttributes) { if (tableKeyAndAttributes == null) this.tableKeyAndAttributes = null; else { Set<String> names = new LinkedHashSet<String>(); for (TableKeysAndAttributes e: tableKeyAndAttributes) names.add(e.getTableName()); if (names.size() != tableKeyAndAttributes.length) { throw new IllegalArgumentException( "table names must not duplicate in the list of TableKeysAndAttributes"); } this.tableKeyAndAttributes = Arrays.asList(tableKeyAndAttributes); } return this; } public String getReturnConsumedCapacity() { return getRequest().getReturnConsumedCapacity(); } public BatchGetItemSpec withReturnConsumedCapacity(ReturnConsumedCapacity capacity) { getRequest().withReturnConsumedCapacity(capacity); return this; } @Override public BatchGetItemSpec withProgressListener(ProgressListener progressListener) { setProgressListener(progressListener); return this; } @Override public BatchGetItemSpec withRequestMetricCollector( RequestMetricCollector requestMetricCollector) { setRequestMetricCollector(requestMetricCollector); return this; } public Map<String, KeysAndAttributes> getUnprocessedKeys() { return unprocessedKeys; } public BatchGetItemSpec withUnprocessedKeys( Map<String, KeysAndAttributes> unprocessedKeys) { this.unprocessedKeys = Collections.unmodifiableMap( new LinkedHashMap<String, KeysAndAttributes>(unprocessedKeys)); return this; } }
[ "aws@amazon.com" ]
aws@amazon.com
29400e2aedd8de53c0f6b63d37ac2cee319fddda
f06239af9a874bc34eff6cd331498f1e23e29a8d
/src/main/java/org/oddjob/arooa/registry/Path.java
a6ec3979446508a662bf514c119c3a44e13ab7a8
[ "Apache-2.0" ]
permissive
robjg/arooa
70950665a2d5ecae3134df350832c44b8eb45e02
35f56775fc0e98ba3fb0f9c71134bc9c7a6ad584
refs/heads/master
2023-07-05T10:42:30.565054
2023-07-04T06:29:29
2023-07-04T06:29:29
1,803,585
1
0
null
null
null
null
UTF-8
Java
false
false
4,585
java
/* * (c) Rob Gordon 2005 */ package org.oddjob.arooa.registry; import java.io.Serializable; /** * Represent the path to a component. * * @author Rob Gordon. */ public class Path implements Serializable { private static final long serialVersionUID = 20051117; /** The path separator. */ public static final String PATH_SEPARATOR = "/"; private final String element; private final Path parent; /** * Constructor for an empty path. */ public Path() { this(null); } public Path(String path) { if (path == null || path.length() == 0) { element = null; parent = null; } else { int index = path.lastIndexOf(PATH_SEPARATOR); // ignore trailing slashes. if (index == path.length() - 1) { path = path.substring(0, index); index = path.lastIndexOf(PATH_SEPARATOR); } if (index < 0) { element = path; parent = new Path(); } else { element = path.substring(index + 1); parent = new Path(path.substring(0, index)); } } } /** * Constructor for a path which takes a path in the form a/b/c. * * @param path The path as a String. */ private Path(Path parent, String element) { this.parent = parent; this.element = element; } /** * Return the size or depth of this path. a/b/c has a size of 3. * * @return The size of this path. */ public int size() { if (parent == null) { return 0; } return parent.size() + 1; } /** * Get the id of the top element in the path. This can be used to lookup * the component which contains the component which is the next part * of the path. * * @return The id of the topmost element. */ public String getRoot() { if (parent == null) { return null; } if (parent.parent == null) { return element; } return parent.getRoot(); } public String getId() { return element; } /** * Get the path below the topmost element. This can be used to traverse * down * to lookup a component * * @return The child path or null if this path is a single element. */ public Path getChildPath() { if (parent == null) { return null; } if (parent.parent == null) { return new Path(); } return parent.getChildPath().addId(element); } /** * Create a new path by adding a new path element identified by they id to * this path. If the id is null a new null path element will be added. * * @param id The id of the new path element. May be null. * @return The new path. */ public Path addId(String id) { if (id == null) { return this; } return new Path(this, id); } public Path getParent() { return parent; } /** * Create a new path by adding a path to this path. * * @param extra The extra path. * @return The new path. */ public Path addPath(Path extra) { if (extra == null) { return this; } return addPath(extra.parent).addId(extra.element); } /** * Resolve the other path relative to this path. if this path is a/b and * other is a/b/c/d the resultant relative path is c/d. * * @param other The other path. * @return The relative path, null if the other path is not in this hierarchy. */ public Path relativeTo(Path other) { if (other == null) { return null; } if (other.equals(this)) { return new Path(); } Path previousResult = relativeTo(other.parent); if (previousResult == null) { return null; } return previousResult.addId(other.element); } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (!(obj instanceof Path)) { return false; } Path other = (Path) obj; if (other.parent == null && parent == null) { return true; } if (other.parent == null || parent == null) { return false; } if (! other.element.equals(this.element)) { return false; } return other .parent.equals(parent); } @Override public int hashCode() { if (parent == null) { return 0; } return parent.hashCode() + element.hashCode(); } /* * (non-Javadoc) * @see java.lang.Object#toString() */ public String toString() { if (parent == null) { return ""; } String parentString = parent.toString(); if (parentString.length() > 0 ) { return parentString + PATH_SEPARATOR + element; } else { return element; } } }
[ "rob@rgordon.co.uk" ]
rob@rgordon.co.uk
4c0123070f63f42827d59ea25d981ccf917babb0
614551e61e84f2af4fa97a9efa7b6ea868a339be
/app/src/main/java/cn/hancang/www/ui/mall/presenter/ShopCartPresenter.java
6373b5a42af7362f3bfe93f3b05bfad52e4ff74c
[]
no_license
SuperZhouyong/ShopCoder
1b3fe736e8c351456805da791bd503df5d341781
713ab3d23913a9e89d3343f9cb5144b5ba89e324
refs/heads/master
2021-05-26T07:19:00.363712
2018-07-23T06:21:40
2018-07-23T06:21:40
127,888,164
5
0
null
null
null
null
UTF-8
Java
false
false
2,104
java
package cn.hancang.www.ui.mall.presenter; import com.intention.sqtwin.bean.DeleteAllShopCartBean; import com.intention.sqtwin.bean.DeleteGoodsBean; import cn.hancang.www.app.AppConstant; import cn.hancang.www.baserx.RxSubscriber; import cn.hancang.www.bean.ShopCartGoodsBean; import cn.hancang.www.ui.mall.contract.ShopCartContract; /** * Description: 绝无Bug * Data:2018/6/5 0005-下午 16:31 * Blog:Super简单 * Author: ZhouYong */ public class ShopCartPresenter extends ShopCartContract.Presenter { @Override public void getShopCartInfoRequest() { mRxManage.add(mModel.getShopCartInfo().subscribe(new RxSubscriber<ShopCartGoodsBean>(mContext) { @Override protected void _onNext(ShopCartGoodsBean shopCartGoodsBean) { mView.returnShopCartInfo(shopCartGoodsBean); } @Override protected void _onError(String message) { mView.showErrorTip(AppConstant.oneMessage, message); } })); } @Override public void getDeleteGoodsRequest(int goodId) { mRxManage.add(mModel.getDeleteBean(goodId).subscribe(new RxSubscriber<DeleteGoodsBean>(mContext) { @Override protected void _onNext(DeleteGoodsBean deleteGoodsBean) { mView.returnDeleteGoodsInfo(deleteGoodsBean); } @Override protected void _onError(String message) { mView.showErrorTip(AppConstant.twoMessage, message); } })); } @Override public void getDeleteAllGoodsRequest() { mRxManage.add(mModel.getDeleteAllShopCartInfo().subscribe(new RxSubscriber<DeleteAllShopCartBean>(mContext) { @Override protected void _onNext(DeleteAllShopCartBean deleteAllShopCartBean) { mView.returnDeleteAllGoodsInfo(deleteAllShopCartBean); } @Override protected void _onError(String message) { mView.showErrorTip(AppConstant.threeMessage, message); } })); } }
[ "z_zhouyong@163.com" ]
z_zhouyong@163.com
79facde0b7f06b850f92d1b71d262e794fab10c6
58bfec312547195c2b2049176fa94f09e413cfbb
/src/org/infoglue/igide/editor/EditableInfoglueContent.java
4a6454917a5d70241697cbcd2563d151fe4c942f
[]
no_license
stenbacka/infoglue-eclipse-ide
e35d598ed60d3627e7e1e6e0daea83b7f0856d58
86b0183230d42df8e5dac02876d0d93c05e32e15
refs/heads/master
2021-01-17T22:08:11.325779
2011-01-03T21:19:21
2011-01-03T21:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,494
java
/* =============================================================================== * * Part of the InfoglueIDE Project * * =============================================================================== * * Copyright (C) Stefan Sik 2007 * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2, as published by the * Free Software Foundation. See the file LICENSE.html for more information. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple * Place, Suite 330 / Boston, MA 02111-1307 / USA. * * =============================================================================== */ /* * Created on 2004-nov-20 */ package org.infoglue.igide.editor; import java.util.ArrayList; import java.util.Collection; import org.eclipse.core.runtime.IProgressMonitor; import org.infoglue.igide.cms.ContentTypeAttribute; import org.infoglue.igide.cms.ContentVersion; import org.infoglue.igide.cms.InfoglueCMS; import org.infoglue.igide.cms.connection.InfoglueConnection; import org.infoglue.igide.model.content.ContentNode; /** * @author Stefan Sik * * This class holds an editable contentversion * and its local resources * */ public class EditableInfoglueContent { private ContentVersion contentVersion; private String name; private ContentNode node; private String id; private Collection attributes = new ArrayList(); private InfoglueConnection connection; public int hashCode() { try { return id.hashCode(); } catch(Exception e) {} return super.hashCode(); } @Override public boolean equals(Object obj) { if(obj instanceof EditableInfoglueContent) { try { EditableInfoglueContent o = (EditableInfoglueContent) obj; return id.equals(o.id); } catch(Exception e) {} } return super.equals(obj); } public void doSave(IProgressMonitor monitor) { String versionValue = InfoglueCMS.buildVersionValue(attributes); this.contentVersion.setValue(versionValue); } public EditableInfoglueContent(ContentNode node, String id, ContentVersion contentVersion, InfoglueConnection connection) { this.node = node; this.id = id; this.connection = connection; this.contentVersion = contentVersion; } public void addAttribute(ContentTypeAttribute a) { attributes.add(a); } public Collection getAttributes() { return attributes; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getId() { return id; } public ContentVersion getContentVersion() { return contentVersion; } public void setContentVersion(ContentVersion contentVersion) { this.contentVersion = contentVersion; } public InfoglueConnection getConnection() { return connection; } public void setConnection(InfoglueConnection connection) { this.connection = connection; } public ContentNode getNode() { return node; } public void setNode(ContentNode node) { this.node = node; } }
[ "mattias.bogeblad@gmail.com" ]
mattias.bogeblad@gmail.com
6ce97b1c061aa399f51f996445e71def40abbec5
dbab952a4527a87cda154a66669d683311a76ca4
/src/main/java/com/coalvalue/employee/domain/pojo/UserItems.java
c8f797207044f73906936a292cf553d2f0f9bbd5
[]
no_license
zhoudy-github/demok8s
6b957cd1e6aaee663fd069e4cd78d2da449a088e
38f00f7f59b4f55e2c250050608a8131f036c740
refs/heads/master
2023-02-17T13:45:15.586325
2021-01-18T13:17:11
2021-01-18T13:17:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,216
java
package com.coalvalue.employee.domain.pojo; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import java.io.Serializable; import java.util.Date; /** * Created by silence on 2016/1/16. */ public class UserItems implements Serializable{ private Integer messageCount; private long shopCartItemCount; private long updateCount; private boolean tradingFlag; private boolean updateFlag; private long tradingDealCount; private long tradingOrderCount; private boolean capacityFlag; private int capacityCount; private long canvassingCount; private long pendingCanvassingCount; private Date lastLoginDate; private String lastLoginIp; public Integer getMessageCount() { return messageCount; } public void setMessageCount(Integer messageCount) { this.messageCount = messageCount; } public long getShopCartItemCount() { return shopCartItemCount; } public void setShopCartItemCount(long shopCartItemCount) { this.shopCartItemCount = shopCartItemCount; } public void setUpdateCount(long updateCount) { this.updateCount = updateCount; } public long getUpdateCount() { return updateCount; } public void setTradingFlag(boolean tradingFlag) { this.tradingFlag = tradingFlag; } public boolean isTradingFlag() { return tradingFlag; } public void setTradingDealCount(long tradingDealCount) { this.tradingDealCount = tradingDealCount; } public long getTradingDealCount() { return tradingDealCount; } public void setTradingOrderCount(long tradingOrderCount) { this.tradingOrderCount = tradingOrderCount; } public long getTradingOrderCount() { return tradingOrderCount; } public void setCapacityFlag(boolean capacityFlag) { this.capacityFlag = capacityFlag; } public boolean isCapacityFlag() { return capacityFlag; } public void setCapacityCount(int capacityCount) { this.capacityCount = capacityCount; } public int getCapacityCount() { return capacityCount; } public void setCanvassingCount(long canvassingCount) { this.canvassingCount = canvassingCount; } public long getCanvassingCount() { return -10; } public long getPendingCanvassingCount() { return -10; } public void setPendingCanvassingCount(long pendingCanvassingCount) { this.pendingCanvassingCount = pendingCanvassingCount; } public boolean isUpdateFlag() { return updateFlag; } public void setUpdateFlag(boolean updateFlag) { this.updateFlag = updateFlag; } public void setLastLoginDate(Date lastLoginDate) { this.lastLoginDate = lastLoginDate; } public Date getLastLoginDate() { return lastLoginDate; } public void setLastLoginIp(String lastLoginIp) { this.lastLoginIp = lastLoginIp; } public String getLastLoginIp() { return lastLoginIp; } @Override public String toString() { return ReflectionToStringBuilder.toString(this); } }
[ "1026957152@qq.com" ]
1026957152@qq.com
05703dfa0d2de290ad5d50f7576b14f7cc0ffe0c
ac82c09fd704b2288cef8342bde6d66f200eeb0d
/projects/OG-Engine/src/main/java/com/opengamma/engine/calcnode/SimpleCalculationNodeSet.java
1e451c71241e7916777cc9d7c0bb99d7bba492ba
[ "Apache-2.0" ]
permissive
cobaltblueocean/OG-Platform
88f1a6a94f76d7f589fb8fbacb3f26502835d7bb
9b78891139503d8c6aecdeadc4d583b23a0cc0f2
refs/heads/master
2021-08-26T00:44:27.315546
2018-02-23T20:12:08
2018-02-23T20:12:08
241,467,299
0
2
Apache-2.0
2021-08-02T17:20:41
2020-02-18T21:05:35
Java
UTF-8
Java
false
false
2,290
java
/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.engine.calcnode; import java.util.AbstractCollection; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import org.springframework.beans.factory.InitializingBean; import com.opengamma.util.ArgumentChecker; /** * Creates a set of more-or-less identical nodes, e.g. one for each core or a fixed number. */ public class SimpleCalculationNodeSet extends AbstractCollection<SimpleCalculationNode> implements InitializingBean { private SimpleCalculationNodeFactory _factory; private int _nodeCount; private double _nodesPerCore; private Collection<SimpleCalculationNode> _nodes; public SimpleCalculationNodeFactory getNodeFactory() { return _factory; } public void setNodeFactory(final SimpleCalculationNodeFactory factory) { ArgumentChecker.notNull(factory, "factory"); _factory = factory; } public void setNodeCount(final int nodeCount) { ArgumentChecker.notNegative(nodeCount, "nodeCount"); _nodeCount = nodeCount; } public int getNodeCount() { return _nodeCount; } public void setNodesPerCore(final double nodesPerCore) { ArgumentChecker.notNegativeOrZero(nodesPerCore, "nodesPerCore"); _nodesPerCore = nodesPerCore; } public double getNodesPerCore() { return _nodesPerCore; } protected int getCores() { return Runtime.getRuntime().availableProcessors(); } @Override public Iterator<SimpleCalculationNode> iterator() { return _nodes.iterator(); } @Override public int size() { return _nodes.size(); } @Override public void afterPropertiesSet() { ArgumentChecker.notNullInjected(getNodeFactory(), "nodeFactory"); final int nodes; if (getNodeCount() == 0) { if (getNodesPerCore() == 0) { throw new IllegalStateException("Either nodeCount or nodesPerCore must be set"); } nodes = (int) Math.ceil(getNodesPerCore() * (double) getCores()); } else { nodes = getNodeCount(); } _nodes = new ArrayList<SimpleCalculationNode>(nodes); for (int i = 0; i < nodes; i++) { _nodes.add(getNodeFactory().createNode()); } } }
[ "cobaltblue.ocean@gmail.com" ]
cobaltblue.ocean@gmail.com
ec4b1188b5c55a514b5c131a5c8ab53dc7be8d62
daef61cfaae89d7646851d3f39ef77eae1d0448d
/ojTest/SellStock.java
f709bad305738255d25dcd5e26c3e985c6f7f4e7
[]
no_license
zhx1019/leetCodeSrc
91a7183682acdd72ddc21f5c83fc7d53b6dca6d2
261f4382667af95e0dbd662acd50fee0b8c667e9
refs/heads/master
2020-04-06T07:05:42.141420
2014-10-19T14:12:22
2014-10-19T14:12:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,270
java
package ojTest; public class SellStock { public int maxProfit(int[] prices){ if(prices == null || prices.length <= 1) { return 0; } /*int[] profitEachDay = new int[prices.length]; profitEachDay[0] = 0; for(int i = 1; i < prices.length; i++) { profitEachDay[i] = prices[i] - prices[i-1]; System.out.print(" " + profitEachDay[i]); } System.out.println(); int[] sum = new int[prices.length]; sum[0] = profitEachDay[0]; for(int i = 1; i < profitEachDay.length; i++) { if(sum[i -1] <= 0) { sum[i] = profitEachDay[i]; } else { sum[i] = profitEachDay[i] + sum[i-1]; } } int max = sum[0]; for(int i = 0; i < profitEachDay.length;i++) { if (max < sum[i]) max = sum[i]; }*/ int maxPrice = prices[prices.length- 1]; int ans = 0; for(int i = prices.length - 1; i >= 0; i--) { maxPrice = maxPrice > prices[i] ? maxPrice : prices[i]; ans = ans > maxPrice - prices[i] ? ans : maxPrice - prices[i]; } return ans; } public static void main(String[] args) { // TODO Auto-generated method stub SellStock ss = new SellStock(); int[] price = {1,2,4}; System.out.println(ss.maxProfit(price)); } }
[ "root@ubuntu.(none)" ]
root@ubuntu.(none)
6d1de8cb62fcf1a79061450b30b90539651807d8
8a23e25226dca8013b8fc7d8480a522ca04efef3
/src/test/java/org/sharpsw/ejbcacli/service/mocks/EjbcaWSCertificateProfileListingMock.java
b043dfb74706f5c003824c7eabd5c465ffd5b4f4
[]
no_license
andersonkmi/EJBCAWebServiceClient
186768ecb8b21789bf91e5a3576d78befc8c86c8
bb37dffa9b43f835e38049d5dbc0285101bbc874
refs/heads/master
2021-01-21T13:41:45.301870
2013-01-20T15:07:29
2013-01-20T15:07:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
601
java
package org.sharpsw.ejbcacli.service.mocks; import java.util.ArrayList; import java.util.List; import org.sharpsw.ejbcacli.NameAndId; public class EjbcaWSCertificateProfileListingMock extends EjbcaWSMock { public List<NameAndId> getAvailableCertificateProfiles(int id) { List<NameAndId> results = new ArrayList<NameAndId>(); NameAndId item1 = new NameAndId(); item1.setId(1); item1.setName("Certificate profile 1"); NameAndId item2 = new NameAndId(); item2.setId(2); item2.setName("Certificate profile 2"); results.add(item1); results.add(item2); return results; } }
[ "andersonkmi@acm.org" ]
andersonkmi@acm.org
9b8a80cf83a5e359e43d63a0eb03b6cae0fd60e1
80e1e6aec24b025d24ef735c51a84a7b7a3413e6
/src/com/main/xiaozhao2017/day6/Question2.java
a62e06564795f30bf983ddfa5be39df8dfe9bdc2
[]
no_license
Keeplingshi/JavaAlgorithms
1d363b21bc8f9f86a2ac21b5539cff315d19ee55
ee316d7460071597aa0520bcf34f6b59f2dab64c
refs/heads/master
2018-10-28T05:02:16.678827
2018-08-22T14:19:56
2018-08-22T14:19:56
111,682,221
0
0
null
null
null
null
UTF-8
Java
false
false
1,200
java
package com.main.xiaozhao2017.day6; import java.util.Scanner; /** * 题目描述 小易去附近的商店买苹果,奸诈的商贩使用了捆绑交易,只提供6个每袋和8个每袋的包装(包装不可拆分)。 可是小易现在只想购买恰好n个苹果,小易想购买尽量少的袋数方便携带。如果不能购买恰好n个苹果,小易将不会购买。 输入描述: 输入一个整数n,表示小易想购买n(1 ≤ n ≤ 100)个苹果 输出描述: 输出一个整数表示最少需要购买的袋数,如果不能买恰好n个苹果则输出-1 示例1 输入 20 输出 3 * @author Administrator * */ public class Question2 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int result=getNumOfBags(n); System.out.println(result); } private static int getNumOfBags(int n) { if(n==6){ return 1; } int result=-1; int count=n/8; if(n%8==0){ return count; } for(int i=count;i>=1;i--) { int value=n-i*8; if(value%6==0){ result=i+value/6; return result; } } return result; } }
[ "chenbkeep@163.com" ]
chenbkeep@163.com
53a4449b7c6bde1b3d0d2279b011cfae01ccb456
6f41ebd98592e332d46454f53a4107d31658fa03
/app/src/main/java/com/spark/szhb_master/entity/AssetsInfo.java
89e4da3455d04a5817e0a67b2ad52671f342dde5
[]
no_license
wqf6146/heyue
f23cdc0b5da94ae03fad69703b0076ddb1dd4d56
30f72231e681b96de43e1e20a84d046a1611f819
refs/heads/master
2022-09-22T00:06:07.388725
2020-06-06T12:19:12
2020-06-06T12:19:12
262,222,788
0
0
null
null
null
null
UTF-8
Java
false
false
1,606
java
package com.spark.szhb_master.entity; public class AssetsInfo { /** * frost : 0 * frost_convert : 0 * sum : 100 * sum_convert : 100 * usable : 100 * usable_convert : 100 */ private float frost; //冻结(全合约账户) private float frost_convert; private float sum; //总额(总资产合计) private float sum_convert; private float usable; //余额(资金账户) private float usable_convert; private float harvest_num; public void setHarvest_num(float harvest_num) { this.harvest_num = harvest_num; } public float getHarvest_num() { return harvest_num; } public float getFrost() { return frost; } public void setFrost(float frost) { this.frost = frost; } public float getFrost_convert() { return frost_convert; } public void setFrost_convert(float frost_convert) { this.frost_convert = frost_convert; } public float getSum() { return sum; } public void setSum(float sum) { this.sum = sum; } public float getSum_convert() { return sum_convert; } public void setSum_convert(float sum_convert) { this.sum_convert = sum_convert; } public float getUsable() { return usable; } public void setUsable(float usable) { this.usable = usable; } public float getUsable_convert() { return usable_convert; } public void setUsable_convert(float usable_convert) { this.usable_convert = usable_convert; } }
[ "346806726@qq.com" ]
346806726@qq.com
4a1576d005db42363b8b92cd4f6c1db88eb93ca5
3386dd7e7be492cfb06912215e5ef222bbc7ce34
/autocomment_netbeans/spooned/org/jbpm/bpmn2/xml/CatchLinkNodeHandler.java
6683e534c58dc2b40c02217c8e1fd13cd47d465b
[ "Apache-2.0" ]
permissive
nerzid/autocomment
cc1d3af05045bf24d279e2f824199ac8ae51b5fd
5803cf674f5cadfdc672d4957d46130a3cca6cd9
refs/heads/master
2021-03-24T09:17:16.799705
2016-09-28T14:32:21
2016-09-28T14:32:21
69,360,519
0
1
null
null
null
null
UTF-8
Java
false
false
1,866
java
/** * Copyright 2015 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * 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.jbpm.bpmn2.xml; import org.xml.sax.Attributes; import org.jbpm.workflow.core.node.CatchLinkNode; import org.drools.core.xml.Handler; import org.jbpm.workflow.core.Node; public class CatchLinkNodeHandler extends AbstractNodeHandler implements Handler { public Class<?> generateNodeFor() { return CatchLinkNode.class; } @Override protected Node createNode(Attributes attrs) { throw new UnsupportedOperationException(); } @Override public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) { CatchLinkNode linkNode = ((CatchLinkNode) (node)); writeNode("intermediateCatchEvent", linkNode, xmlDump, metaDataType); xmlDump.append((">" + (EOL))); writeExtensionElements(linkNode, xmlDump); String name = ((String) (node.getMetaData().get(IntermediateCatchEventHandler.LINK_NAME))); xmlDump.append(((("<linkEventDefinition name=\"" + name) + "\" >") + (EOL))); Object target = linkNode.getMetaData("target"); if (null != target) { xmlDump.append(((String.format("<target>%s</target>", target)) + (EOL))); } xmlDump.append(("</linkEventDefinition>" + (EOL))); endNode("intermediateCatchEvent", xmlDump); } }
[ "nerzid@gmail.com" ]
nerzid@gmail.com
8974479ae5ebf2458add4b0a35f86e432b5754b5
1ec73a5c02e356b83a7b867580a02b0803316f0a
/java/bj/bigData/Oozie/ex01/OozieRunner.java
e33b6d8b6f44725669eff388a093989ca3b54e7a
[]
no_license
jxsd0084/JavaTrick
f2ee8ae77638b5b7654c3fcf9bceea0db4626a90
0bb835fdac3c2f6d1a29d1e6e479b553099ece35
refs/heads/master
2021-01-20T18:54:37.322832
2016-06-09T03:22:51
2016-06-09T03:22:51
60,308,161
0
1
null
null
null
null
UTF-8
Java
false
false
2,873
java
package bj.bigData.Oozie.ex01; //import cn.crxy.idc.utils.Metadata; import org.apache.oozie.client.OozieClient; import org.apache.oozie.client.OozieClientException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Properties; /** * Created by gs on 2015/10/25. */ public class OozieRunner { //配置参数 public static String OOZIECLIENT = ""; public static String NAMENODE = ""; public static String JOBTRACKER = ""; public static String QUEUENAME = ""; public static String EXAMPLESROOT = ""; public static String USERNAME = ""; //传递参数 public static String JOB_NAME = ""; public static String WF_PATH = ""; public static String LIBPATH = ""; public OozieRunner() { /* Metadata metadata = new Metadata( "/config/oozie.properties" ); OOZIECLIENT = metadata.getValue( "oozieClient" ); NAMENODE = metadata.getValue( "nameNode" ); JOBTRACKER = metadata.getValue( "jobTracker" ); QUEUENAME = metadata.getValue( "queueName" ); EXAMPLESROOT = metadata.getValue( "examplesRoot" ); USERNAME = metadata.getValue( "username" ); LIBPATH = metadata.getValue( "libpath" );*/ } public static void main( String[] args ) { //获取参数 if ( args.length != 2 ) { System.out.println( "USage: <JOB_NAME> <WF_PATH>" ); System.exit( 1 ); } JOB_NAME = args[ 0 ]; //当前启动oozie流程名称 WF_PATH = args[ 1 ]; //workflow.xml文件所在的地址(HDFS上) try { //获取oozie配置文件对象,设置相应配置 OozieRunner oozieRunner = new OozieRunner(); OozieClient client = new OozieClient( OOZIECLIENT ); Properties conf = client.createConfiguration(); conf.setProperty( OozieClient.USER_NAME, USERNAME ); conf.setProperty( OozieClient.APP_PATH, NAMENODE + "/user/" + USERNAME + "/" + WF_PATH ); conf.setProperty( OozieClient.LIBPATH, NAMENODE + "/user/" + USERNAME + "/" + LIBPATH ); conf.setProperty( "oozieClient", OOZIECLIENT ); conf.setProperty( "nameNode", NAMENODE ); conf.setProperty( "queueName", QUEUENAME ); conf.setProperty( "jobTracker", JOBTRACKER ); conf.setProperty( "jobname", JOB_NAME ); conf.setProperty( "examplesRoot", EXAMPLESROOT ); //获取上一个小时的时间 Calendar calendar = Calendar.getInstance(); calendar.set( Calendar.HOUR_OF_DAY, calendar.get( Calendar.HOUR_OF_DAY ) - 1 ); SimpleDateFormat df = new SimpleDateFormat( "yyyyMMddHH" ); conf.setProperty( "inputtime", df.format( calendar.getTime() ) ); System.out.println( "当前的时间:" + df.format( new Date() ) ); System.out.println( "一个小时前的时间:" + df.format( calendar.getTime() ) ); //启动job System.out.println( "job_minute启动成功,id : " + client.run( conf ) ); } catch ( OozieClientException e ) { e.printStackTrace(); } } }
[ "chenlong88882001@163.com" ]
chenlong88882001@163.com
0a6574b084b341ed4743e9c6b655e94a975d2058
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/81/org/apache/commons/math/distribution/CauchyDistribution_getMedian_40.java
cc3527286eb9221d0026bd506f55addafd18e8a0
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
325
java
org apach common math distribut cauchi distribut refer href http mathworld wolfram cauchi distribut cauchydistribut html cauchi distribut version revis date cauchi distribut cauchydistribut continu distribut continuousdistribut access median median distribut median getmedian
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
fe44b9f1968dc352de19064f245cd9b84dddce7c
e63363389e72c0822a171e450a41c094c0c1a49c
/Mate20_9_0_0/src/main/java/android/system/ErrnoException.java
f071a0826270becb78efdefaf0d95489c75c6387
[]
no_license
solartcc/HwFrameWorkSource
fc23ca63bcf17865e99b607cc85d89e16ec1b177
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
refs/heads/master
2022-12-04T21:14:37.581438
2020-08-25T04:30:43
2020-08-25T04:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,662
java
package android.system; import java.io.IOException; import java.net.SocketException; import libcore.io.Libcore; public final class ErrnoException extends Exception { public final int errno; private final String functionName; public ErrnoException(String functionName, int errno) { this.functionName = functionName; this.errno = errno; } public ErrnoException(String functionName, int errno, Throwable cause) { super(cause); this.functionName = functionName; this.errno = errno; } public String getMessage() { String errnoName = OsConstants.errnoName(this.errno); if (errnoName == null) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("errno "); stringBuilder.append(this.errno); errnoName = stringBuilder.toString(); } String description = Libcore.os.strerror(this.errno); StringBuilder stringBuilder2 = new StringBuilder(); stringBuilder2.append(this.functionName); stringBuilder2.append(" failed: "); stringBuilder2.append(errnoName); stringBuilder2.append(" ("); stringBuilder2.append(description); stringBuilder2.append(")"); return stringBuilder2.toString(); } public IOException rethrowAsIOException() throws IOException { IOException newException = new IOException(getMessage()); newException.initCause(this); throw newException; } public SocketException rethrowAsSocketException() throws SocketException { throw new SocketException(getMessage(), this); } }
[ "lygforbs0@gmail.com" ]
lygforbs0@gmail.com
e83709f1563b89d214ec99c0f60003c1259e496e
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/robolectric/ParameterizedRobolectricTestRunnerParameterTest.java
fee9cc5ed8446336bba15d6773b7f102a1fe4ed5
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
758
java
package org.robolectric; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.ParameterizedRobolectricTestRunner.Parameter; import org.robolectric.annotation.Config; /** * Tests for the {@link Parameter} annotation */ @RunWith(ParameterizedRobolectricTestRunner.class) @Config(manifest = Config.NONE) public final class ParameterizedRobolectricTestRunnerParameterTest { @Parameter(0) public boolean booleanValue; @Parameter(1) public int intValue; @Parameter(2) public String stringValue; @Parameter(3) public String expected; @Test public void parameters_shouldHaveValues() { assertThat(((("" + (booleanValue)) + (intValue)) + (stringValue))).isEqualTo(expected); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
5fcfeeb5ee3135503ef7d93f7a5310f460dd2275
b61cfd8d0eb8fc6d4423e980c682af78383993eb
/payments-api/src/main/java/uk/gov/caz/psr/dto/historicalinfo/PaymentsInfoByOperatorResponse.java
3a316a75ce59e131efd0b431502387ce834e397f
[ "OGL-UK-3.0" ]
permissive
DEFRA/clean-air-zones-api
984e6ba7d16cc484e74dd57b1fab6150e230ce1c
e6437781ff5dc71b01ffce9fd6f8bec2226ee0a6
refs/heads/master
2023-07-24T13:59:03.152029
2021-05-06T16:24:20
2021-05-06T16:24:20
232,327,284
0
2
NOASSERTION
2023-07-13T17:02:58
2020-01-07T13:10:59
Java
UTF-8
Java
false
false
3,529
java
package uk.gov.caz.psr.dto.historicalinfo; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty; import java.time.LocalDateTime; import java.util.List; import java.util.Set; import java.util.UUID; import lombok.Builder; import lombok.Value; /** * Value object that represents the response with the paginated information of payments made by the * given operator. */ @Value @Builder public class PaymentsInfoByOperatorResponse { /** * Current page number. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.page}") int page; /** * Total pages count. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.page-count}") int pageCount; /** * Requested page size or 10 if not provided. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.per-page}") int perPage; /** * Total paginated items count. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.total-payments-count}") long totalPaymentsCount; /** * List of items on this page. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.payments}") List<SinglePaymentsInfoByOperator> payments; @Value @Builder @JsonIgnoreProperties({"refunded", "chargedback"}) public static class SinglePaymentsInfoByOperator { /** * Datetime that tells when the payment was inserted into the database. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.payment-timestamp}") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime paymentTimestamp; /** * Clean Air Zone name. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.caz-name}") String cazName; /** * The amount of money paid to enter the CAZ. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.total-paid}") int totalPaid; /** * Internal identifier of this payment. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.payment-id}") UUID paymentId; /** * Customer-friendly payment reference number. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.payment-reference}") long paymentReference; /** * Collection of VRNs against which the payment was made. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.vrns}") Set<String> vrns; /** * External status of this payment. */ @ApiModelProperty(value = "${swagger.model.descriptions.payments-info-by-operator-id-response.status}") String paymentProviderStatus; @ApiModelProperty(value = "${swagger.model.payments-info-by-operator-id-response.isRefunded") @JsonProperty(value = "isRefunded") boolean isRefunded; @ApiModelProperty(value = "${swagger.model.payments-info-by-operator-id-response.isChargedback") @JsonProperty(value = "isChargedback") boolean isChargedback; } }
[ "james.cruddas@informed.com" ]
james.cruddas@informed.com
a49d69fba969c350d9399901246123940f9b4ff4
1bdd58fd87e940c5d34238202ba5c015272c6d63
/core/src/com/tj/odata/service/SecurityAwareDAOService.java
5aaa36986deda92c4a058835bba8577d1fb5012d
[]
no_license
tbiegner99/ODataFramework
ba74bcca53f8d4574e68d91402f25c3ea1491226
3109614009c9940a61b37241ecdb2a81c9859e03
refs/heads/master
2021-01-23T22:38:40.911230
2016-03-06T04:30:49
2016-03-06T04:30:49
32,660,393
0
0
null
null
null
null
UTF-8
Java
false
false
3,694
java
package com.tj.odata.service; import java.lang.reflect.Field; import java.util.Collection; import org.odata4j.producer.QueryInfo; import org.springframework.transaction.annotation.Transactional; import com.tj.dao.DAOBase; import com.tj.dao.SecurityAwareDAO; import com.tj.exceptions.IllegalRequestException; import com.tj.producer.KeyMap; import com.tj.producer.RequestContext; import com.tj.producer.ResponseContext; import com.tj.producer.util.ReflectionUtil; import com.tj.security.SecurityManager; import com.tj.security.user.User; @Transactional public class SecurityAwareDAOService<T> extends AbstractService<T> implements Service<T> { private SecurityAwareDAO<T> dao; public SecurityAwareDAOService(SecurityAwareDAO<T> dao) { this.dao = dao; } @SuppressWarnings("unchecked") @Override public T createEntity(Class<?> type, RequestContext request, ResponseContext response, T object) { return dao.createEntity(object, (SecurityManager<T, ?>) request.getSecurityManager(type), request.getUser()); } @SuppressWarnings("unchecked") @Override public T mergeEntity(Class<?> type, RequestContext request, ResponseContext response, T object, KeyMap keys) { return dao.getEntity(keys, (SecurityManager<T, ?>) request.getSecurityManager(type), request.getUser()); } @SuppressWarnings("unchecked") @Override public T updateEntity(Class<?> type, RequestContext request, ResponseContext response, T object, KeyMap keys) { return dao.updateEntity(object, keys, (SecurityManager<T, ?>) request.getSecurityManager(type), request.getUser()); } @SuppressWarnings("unchecked") @Override public T deleteEntity(Class<?> type, RequestContext request, ResponseContext response, KeyMap keys) { return dao.deleteEntity(keys, (SecurityManager<T, ?>) request.getSecurityManager(type), request.getUser()); } @SuppressWarnings("unchecked") @Override public T getEntity(Class<?> type, RequestContext request, ResponseContext response, KeyMap keys) { return dao.getEntity(keys, (SecurityManager<T, ?>) request.getSecurityManager(type), request.getUser()); } @SuppressWarnings("unchecked") @Override public Collection<T> getEntities(Class<?> type, RequestContext request, ResponseContext response, KeyMap keys, QueryInfo info) { return dao.getEntities(request.getContextObjectOfType(QueryInfo.class), (SecurityManager<T, ?>) request.getSecurityManager(type), request.getUser()); } @SuppressWarnings("unchecked") @Override public Long getEntitiesCount(Class<?> type, RequestContext request, ResponseContext response, KeyMap keys, QueryInfo info) { return (long) dao.countEntities(request.getContextObjectOfType(QueryInfo.class), (SecurityManager<T, ?>) request.getSecurityManager(type), request.getUser()); } public DAOBase<T> getDAO() { return dao; } @Override public Class<? extends T> getServiceType() { return dao.getDAOType(); } @Override public T linkNewEntity(Class<?> type, RequestContext request, ResponseContext response, KeyMap objectKey, String property, Object newLink) { try { SecurityManager<T, ?> security = (SecurityManager<T, ?>) request.getSecurityManager(type); User user = request.getUser(); T object = dao.getEntity(objectKey, security, user); Field f = ReflectionUtil.getFieldForType(object.getClass(), property); if (Collection.class.isAssignableFrom(f.getType())) { ((Collection) ReflectionUtil.invokeGetter(object, property)).add(newLink); } else { ReflectionUtil.invokeSetter(object, property, newLink); } dao.updateEntity(object, objectKey, security, user); return object; } catch (NoSuchFieldException e) { throw new IllegalRequestException(""); } } }
[ "tbiegner99@gmail.com" ]
tbiegner99@gmail.com
7ef28f8a34e40a118194c270471eb78a3b308afc
52081696c148f78a840be42c5a6a3bd539cbab13
/src/main/java/com/cjkj/insurance/utils/CookieTool.java
fe05ebf29f85fd3e4b3645b5591f9c985f5d7662
[]
no_license
XDFHTY/insurance
bdad3b3d0291b0c1fd7af637bc6760dcd6019b3b
aff6ba4df66a5a42816c1918f159e3d165c1fbb1
refs/heads/master
2020-03-16T21:28:50.511529
2018-08-01T11:01:23
2018-08-01T11:01:23
132,997,057
0
0
null
null
null
null
UTF-8
Java
false
false
2,557
java
package com.cjkj.insurance.utils; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.HashMap; import java.util.Map; public class CookieTool { /** * 添加cookie * * @param response * @param name Key * @param value Value * @param maxAge 有效时间 */ public static void addCookie(HttpServletResponse response, String name, String value, int maxAge) { // // 1.创建Cookie对象 // Cookie cookie1 = new Cookie("token", (String)request.getSession().getAttribute("Token")); // // 2.配置Cookie对象 // cookie1.setComment("Web Host Name"); // Cookie描述 // cookie1.setMaxAge(30*60); // Cookie有效时间30分 // //cookie1.setPath("/"); // Cookie有效路径 // // // 3.通过response对象将Cookie写入浏览器,当然需要解决中文乱码问题,否则会抛出异常 // // java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value // response.addCookie(cookie1); Cookie cookie = new Cookie(name, value); cookie.setPath("/"); // Cookie有效路径 cookie.setMaxAge(maxAge); // Cookie有效时间(S) // cookie.setDomain(".jsoft.me"); // cookie作用域 response.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=UTF-8"); response.addCookie(cookie); } /** * 检索所有Cookie封装到Map集合 * * @param request * @return */ public static Map<String, String> readCookieMap(HttpServletRequest request) { Map<String, String> cookieMap = new HashMap<String, String>(); Cookie[] cookies = request.getCookies(); if (null != cookies) { for (Cookie cookie : cookies) { cookieMap.put(cookie.getName(), cookie.getValue()); } } return cookieMap; } /** * 通过Key获取Value * * @param request * @param name Key * @return Value */ public static String getCookieValueByName(HttpServletRequest request, String name) { Map<String, String> cookieMap = readCookieMap(request); if (cookieMap.containsKey(name)) { String cookieValue = (String) cookieMap.get(name); return cookieValue; } else { return null; } } }
[ "a1668281642@gmail.com" ]
a1668281642@gmail.com
a73b267eafe016da93d2cc57b262465660560ef6
19a8feef92bc49add7e21889a90ac0084052e65e
/dwbi/src/main/java/br/com/dwbi/dwbi/servico/ServicoPainel_Diretor_VendaSubgrupo.java
5e6115208a3aedeef7207674a010e3de19dd4175
[]
no_license
diegowvalerio/dw-bi
f71795a9cf836e35e5312d4ef77e6d3cc392bdc1
9407dda42b89625b34c725b20c8d98b27bbd1dce
refs/heads/master
2022-12-03T23:43:00.480504
2022-10-28T13:26:34
2022-10-28T13:26:34
180,370,668
0
0
null
2022-11-24T08:17:16
2019-04-09T13:15:57
JavaScript
UTF-8
Java
false
false
530
java
package br.com.dwbi.dwbi.servico; import java.io.Serializable; import java.util.List; import javax.enterprise.context.Dependent; import javax.inject.Inject; import br.com.dwbi.classe.Venda_Subgrupo; import br.com.dwbi.dwbi.dao.DAOVenda_SubGrupo; @Dependent public class ServicoPainel_Diretor_VendaSubgrupo implements Serializable{ private static final long serialVersionUID = 1L; @Inject private DAOVenda_SubGrupo dao_vendagrupo; public List<Venda_Subgrupo> subgrupos(){ return dao_vendagrupo.subgrupos(); } }
[ "33626159+diegowvalerio@users.noreply.github.com" ]
33626159+diegowvalerio@users.noreply.github.com
55bced9680b2a49b7a5809e3e994928b9ec0cf90
dfd7e70936b123ee98e8a2d34ef41e4260ec3ade
/analysis/reverse-engineering/decompile-fitts-20191031-2200/sources/com/google/android/gms/internal/firebase_remote_config/zzcm.java
96722e142b530db70d2b4af64158b17a470b3cda
[ "Apache-2.0" ]
permissive
skkuse-adv/2019Fall_team2
2d4f75bc793368faac4ca8a2916b081ad49b7283
3ea84c6be39855f54634a7f9b1093e80893886eb
refs/heads/master
2020-08-07T03:41:11.447376
2019-12-21T04:06:34
2019-12-21T04:06:34
213,271,174
5
5
Apache-2.0
2019-12-12T09:15:32
2019-10-07T01:18:59
Java
UTF-8
Java
false
false
221
java
package com.google.android.gms.internal.firebase_remote_config; import java.io.IOException; import java.io.OutputStream; public interface zzcm { void writeTo(OutputStream outputStream) throws IOException; }
[ "33246398+ajid951125@users.noreply.github.com" ]
33246398+ajid951125@users.noreply.github.com
4e14aceaf6d4aad745dff3e605a4900dc24aba44
388241a3173c5e228627fbd00ff5d02b372cb9d9
/anan-cloudadviced/anan-platformserver/src/main/java/top/fosin/anan/platform/dto/res/AnanOrganizationAuthRespDto.java
6194d6c9237182215c5ea64192453dbbbae447a5
[ "Apache-2.0" ]
permissive
open-framework/anan-cloud
bdf65bd5f78b01235d56ffdbc3038ee8222107ac
945e62c1b8c7254dae03c58eb1c6447136937a86
refs/heads/master
2023-08-07T12:57:08.256544
2021-10-03T04:40:46
2021-10-03T04:40:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,772
java
package top.fosin.anan.platform.dto.res; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import top.fosin.anan.model.dto.IdDto; import java.io.Serializable; /** * 系统机构授权表(AnanOrganizationAuth)响应DTO * * @author fosin * @date 2021-05-16 14:32:14 * @since 2.6.0 */ @Data @ToString @EqualsAndHashCode(callSuper = true) @ApiModel(value = "机构授权表响应DTO", description = "机构授权的响应DTO") public class AnanOrganizationAuthRespDto extends IdDto<Long> implements Serializable { private static final long serialVersionUID = -14631872198139889L; @ApiModelProperty(value = "机构ID", example = "Long") private Long organizId; @ApiModelProperty(value = "版本ID", example = "Long") private Long versionId; @ApiModelProperty(value = "订单ID", example = "Long") private Long orderId; @ApiModelProperty(value = "授权码", example = "String") private String authorizationCode; @ApiModelProperty(value = "有效期:一般按天计算", example = "Integer") private Integer validity; @ApiModelProperty(value = "到期后保护期", example = "Integer") private Integer protectDays; @ApiModelProperty(value = "最大机构数:0=无限制 n=限制数", example = "Integer") private Integer maxOrganizs; @ApiModelProperty(value = "最大机构数:0=无限制 n=限制数", example = "Integer") private Integer maxUsers; @ApiModelProperty(value = "是否试用:0=不试用 1=试用", example = "Integer") private Integer tryout; @ApiModelProperty(value = "试用天数", example = "Integer") private Integer tryoutDays; }
[ "28860823@qq.com" ]
28860823@qq.com
af4db16d5b149707a1b43be66aa0cfcfe5334a9d
81d61e58e813e2ea2cfa1ae1186fa2c103090804
/core/target/generated-sources/messages/quickfix/field/CustDirectedOrder.java
3c6cfbba2a40659f9c8daa4797bbff78be1ae283
[ "BSD-2-Clause" ]
permissive
donglinworld/simplefix
125f421ce4371e31465359e936482b77ab7e7958
8d9ab9200d508ba1ca441a34a5b0748e6a8ef9f8
refs/heads/master
2022-07-15T13:54:06.988916
2019-10-24T12:39:12
2019-10-24T12:39:12
34,051,037
0
0
NOASSERTION
2022-06-29T15:51:14
2015-04-16T11:07:10
Java
UTF-8
Java
false
false
1,146
java
/******************************************************************************* * Copyright (c) quickfixengine.org All rights reserved. * * This file is part of the QuickFIX FIX Engine * * This file may be distributed under the terms of the quickfixengine.org * license as defined by quickfixengine.org and appearing in the file * LICENSE included in the packaging of this file. * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. * * See http://www.quickfixengine.org/LICENSE for licensing information. * * Contact ask@quickfixengine.org if any conditions of this licensing * are not clear to you. ******************************************************************************/ package quickfix.field; import quickfix.BooleanField; public class CustDirectedOrder extends BooleanField { static final long serialVersionUID = 20050617; public static final int FIELD = 1029; public CustDirectedOrder() { super(1029); } public CustDirectedOrder(boolean data) { super(1029, data); } }
[ "donglin_world@hotmail.com@b05cb261-0605-1b5b-92d6-37ff6522ea18" ]
donglin_world@hotmail.com@b05cb261-0605-1b5b-92d6-37ff6522ea18
bdec2f678b9867cd38ffd915b100ba11e439e973
e13e58fa4cd7de3ee498c9a4d9cbf0e32bcb73ed
/src/main/java/com/rekoe/quartz/job/ReloadServerJob.java
e74b95bb268a5b9a97e5024d2ad65f4c4751aff2
[]
no_license
Rekoe/hm_cms
45fa4a4023e6ceec08f57a9a0031a28be4964569
7d76761025cff0a2843a9df1fe238a9eda6f770e
refs/heads/master
2021-01-11T03:38:08.931952
2016-10-26T06:32:59
2016-10-26T06:32:59
71,408,811
0
1
null
null
null
null
UTF-8
Java
false
false
936
java
package com.rekoe.quartz.job; import org.nutz.integration.quartz.annotation.Scheduled; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import com.rekoe.service.ServerCacheService; @IocBean @Scheduled(cron = "0 */10 * * * ?") public class ReloadServerJob implements Job { @Inject protected ServerCacheService serverCacheService; @Override public void execute(JobExecutionContext context) throws JobExecutionException { try { //serverCacheService.loadWeb(); } catch (Exception e) { throw new JobExecutionException(e); } try { //serverCacheService.loadMobileChannel(); } catch (Exception e) { throw new JobExecutionException(e); } try { //serverCacheService.loadMobileServers(); } catch (Exception e) { throw new JobExecutionException(e); } } }
[ "koukou890@qq.com" ]
koukou890@qq.com
c1399a64225da1e4a44f4d2f1446da3d747edd77
15c93b5f08e062a53789e81236acc6a5144468d8
/src/main/java/com/newland/posmall/bean/basebusi/Tmaintenance.java
030fa3c30d67459b437050fd5e0d94ef1823298a
[]
no_license
itowne/posmall
85e3d0ce96f7576483addfbad0e94bc870494ae8
ea8cf8b503b1f8f7349672de5ffd0363a0448ccc
refs/heads/master
2021-01-20T21:59:11.331002
2015-08-30T15:56:34
2015-08-30T15:56:34
41,634,193
0
0
null
null
null
null
UTF-8
Java
false
false
977
java
package com.newland.posmall.bean.basebusi; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.TableGenerator; /** * 维保协议表 * * @author Administrator * */ @Entity @Table(name = "t_maintenance") public class Tmaintenance implements Serializable { private static final long serialVersionUID = -9187917966003339059L; @Id @TableGenerator(name = "i_maintenance", initialValue = 10000, allocationSize = 100) @GeneratedValue(strategy = GenerationType.TABLE, generator = "i_maintenance") @Column(name = "i_maintenance") private Long imaintenance; // public Long getImaintenance() { return imaintenance; } public void setImaintenance(Long imaintenance) { this.imaintenance = imaintenance; } }
[ "17525543@qq.com" ]
17525543@qq.com
f4a2442af55bb020cc78d16b42f08f36af10a851
ba74038a0d3a24d93e6dbd1f166530f8cb1dd641
/teamclock/src/java/com/fivesticks/time/customer/xwork/CustomerProjectModifyActionTest.java
a519efef9a3e438015375a60ea5d64a0966b4627
[]
no_license
ReidCarlberg/teamclock
63ce1058c62c0a00d63a429bac275c4888ada79a
4ac078610be86cf0902a73b1ba2a697f9dcf4e3c
refs/heads/master
2016-09-05T23:46:28.600606
2009-09-18T07:25:37
2009-09-18T07:25:37
32,190,901
0
0
null
null
null
null
UTF-8
Java
false
false
4,866
java
/* * Created on Sep 22, 2005 * */ package com.fivesticks.time.customer.xwork; import com.fivesticks.time.customer.Project; import com.fivesticks.time.customer.ProjectTestFactory; import com.fivesticks.time.testutil.AbstractTimeTestCase; import com.opensymphony.xwork.ActionSupport; public class CustomerProjectModifyActionTest extends AbstractTimeTestCase { protected void setUp() throws Exception { super.setUp(); } public void testBasic() throws Exception { CustomerProjectModifyAction action = new CustomerProjectModifyAction(); action.setSessionContext(this.sessionContext); action.setCustomerModifyContext(new CustomerModifyContext()); action.getCustomerModifyContext().setTargetCustomer(this.customer); action.setProjectModifyContext(new ProjectModifyContext()); String s = action.execute(); assertEquals(ActionSupport.INPUT, s); } public void testBasicAdd() throws Exception { CustomerProjectModifyAction action = new CustomerProjectModifyAction(); action.setSessionContext(this.sessionContext); action.setCustomerModifyContext(new CustomerModifyContext()); action.getCustomerModifyContext().setTargetCustomer(this.customer); action.setProjectModifyContext(new ProjectModifyContext()); action.setTargetProject(new Project()); action.getTargetProject().setShortName("junitShort"); action.getTargetProject().setLongName("Short test from witin Junit."); action.getTargetProject().setPostable(new Boolean(true)); action.getTargetProject().setActive(true); action.setSaveProject("save"); String s = action.execute(); assertEquals(ActionSupport.SUCCESS, s); } public void testBasicAdd_Fails_MissingData() throws Exception { CustomerProjectModifyAction action = new CustomerProjectModifyAction(); action.setSessionContext(this.sessionContext); action.setCustomerModifyContext(new CustomerModifyContext()); action.getCustomerModifyContext().setTargetCustomer(this.customer); action.setProjectModifyContext(new ProjectModifyContext()); action.setTargetProject(new Project()); // action.getTargetProject().setShortName("junitShort"); // action.getTargetProject().setLongName("Short test from witin // Junit."); // action.getTargetProject().setPostable(new Boolean(true)); // action.getTargetProject().setActive(true); action.setSaveProject("save"); String s = action.execute(); assertTrue(action.hasErrors()); assertEquals(ActionSupport.INPUT, s); } public void testBasicAdd_Fails_DuplicateShortName() throws Exception { CustomerProjectModifyAction action = new CustomerProjectModifyAction(); action.setSessionContext(this.sessionContext); action.setCustomerModifyContext(new CustomerModifyContext()); action.getCustomerModifyContext().setTargetCustomer(this.customer); action.setProjectModifyContext(new ProjectModifyContext()); action.setTargetProject(new Project()); action.getTargetProject().setShortName(project.getShortName()); action.getTargetProject().setLongName("Short test from witin Junit."); action.getTargetProject().setPostable(new Boolean(true)); action.getTargetProject().setActive(true); action.setSaveProject("save"); String s = action.execute(); assertTrue(action.hasErrors()); assertEquals(ActionSupport.INPUT, s); } public void testBasicEdit_Succeeds() throws Exception { Project project2 = ProjectTestFactory.getPersisted( this.systemOwner, this.customer); CustomerProjectModifyAction action = new CustomerProjectModifyAction(); action.setSessionContext(this.sessionContext); action.setCustomerModifyContext(new CustomerModifyContext()); action.getCustomerModifyContext().setTargetCustomer(this.customer); action.setProjectModifyContext(new ProjectModifyContext()); action.setTargetProject(project2); action.getProjectModifyContext().setTargetProject(project2); action.getTargetProject().setShortName(project2.getShortName()); action.getTargetProject().setLongName(project2.getLongName()+"1"); action.getTargetProject().setPostable(project2.isPostable()); action.getTargetProject().setActive(project2.isActive()); action.setSaveProject("save"); String s = action.execute(); assertTrue(!action.hasErrors()); assertEquals(ActionSupport.SUCCESS, s); } }
[ "reidcarlberg@c917f71e-a3f3-11de-ba6e-69e41c8db662" ]
reidcarlberg@c917f71e-a3f3-11de-ba6e-69e41c8db662
4f73884903741891aed89759fa666a3c3ebee298
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_253/Testnull_25213.java
126e01570bcabcafda2719461eedf7f7342b312f
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_253; import static org.junit.Assert.*; public class Testnull_25213 { private final Productionnull_25213 production = new Productionnull_25213("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
ff3af74e5dc44474754b1388f761f9ad2a7f5baf
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/85_shop-umd.cs.shop.JSListPlanningProblem-1.0-2/umd/cs/shop/JSListPlanningProblem_ESTest_scaffolding.java
dd654ddc03494d9cb540c957208bda875ed9657e
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
539
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Oct 25 16:49:48 GMT 2019 */ package umd.cs.shop; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class JSListPlanningProblem_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
33e82f6b4430e6f0831ccb1ef0f211b0dd532658
76c9271f0fd3672cac64313a076241004ec3763d
/Object Communication and Events/01. Logger/ErrorLogger.java
873a8eafe36438070f3a8aca27f3287142eb9bce
[]
no_license
vanshianec/Java-OOP-Advanced
4229c2960efe6ff3b8fdb8db7ce3f3f45a7e4246
543fa20ae223f5cd2ab39265ad7cf2723b1c3450
refs/heads/master
2020-04-03T22:50:20.816377
2019-06-26T18:21:38
2019-06-26T18:21:38
155,611,113
1
0
null
null
null
null
UTF-8
Java
false
false
339
java
package src; import src.BaseClasses.Logger; import src.Enums.LogType; public class ErrorLogger extends Logger { @Override public void handle(LogType type, String message) { if(type == LogType.ERROR){ System.out.println(type.name()+": "+message); } super.passToSuccessor(type,message); } }
[ "ivaniovov@abv.bg" ]
ivaniovov@abv.bg
8d9452afa31ec335fbbb1b06e684e2296cab6e0a
1cf48cae99501879c9970502d393cf8b77c5d820
/model/src/main/java/org/jotserver/configuration/ConfigurationProvider.java
142585c90bdba40cc0cf5ba5340cdaa285c5b8e3
[]
no_license
BenDol/jOTServer
4145888acf82a05ffdd48497a4941975b17ebe70
b4ef1fe315d06aee21089bcb85338505942059a5
refs/heads/master
2021-01-22T05:54:10.482209
2015-10-21T22:57:25
2015-10-21T22:57:25
27,660,695
15
24
null
null
null
null
UTF-8
Java
false
false
181
java
package org.jotserver.configuration; public interface ConfigurationProvider { String getString(String key); boolean getBoolean(String key); int getInt(String key); }
[ "dolb90@gmail.com" ]
dolb90@gmail.com
498f32041d167e2fe760258c108d95e7b9d18604
8921ad0262cb571f467d8486f26292c090570dd1
/src/main/java/com/shuyan/source/org/omg/CORBA/WStringSeqHelper.java
0e0f455d5aff2e546d16769316e58def416de03a
[]
no_license
Chqishuyan/javaSourceLearn
13821950792c7db27e7b2c7d25491c34b302c7e2
b57ea08dbd9ba2dbe888b961f6cadf3cad180cf6
refs/heads/master
2023-03-27T01:11:47.176051
2021-03-22T09:47:35
2021-03-22T09:47:35
350,286,369
0
0
null
null
null
null
UTF-8
Java
false
false
1,849
java
package org.omg.CORBA; /** * org/omg/CORBA/WStringSeqHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u121/8372/corba/src/share/classes/org/omg/PortableInterceptor/CORBAX.idl * Monday, December 12, 2016 8:41:12 PM PST */ /** An array of WStrings */ abstract public class WStringSeqHelper { private static String _id = "IDL:omg.org/CORBA/WStringSeq:1.0"; public static void insert (org.omg.CORBA.Any a, String[] that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static String[] extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init ().create_wstring_tc (0); __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.WStringSeqHelper.id (), "WStringSeq", __typeCode); } return __typeCode; } public static String id () { return _id; } public static String[] read (org.omg.CORBA.portable.InputStream istream) { String value[] = null; int _len0 = istream.read_long (); value = new String[_len0]; for (int _o1 = 0;_o1 < value.length; ++_o1) value[_o1] = istream.read_wstring (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, String[] value) { ostream.write_long (value.length); for (int _i0 = 0;_i0 < value.length; ++_i0) ostream.write_wstring (value[_i0]); } }
[ "18205601657@163.com" ]
18205601657@163.com
a50cc2a9b64db4ddf0b3d31a45487bcd71d1b5da
241bc9dfca7a141322ea1c346d68b13da7052844
/Demo/test/src/main/java/per/eicho/demo/leetcode/q2001_2100/Q2058.java
feddb290b6015eadbffee66923bd63935990b0d4
[]
no_license
EICHOSAMA/Demonstration
2c9368576b96aaae7321023a2ba051c5e8703311
945bc68e326403cdf4836d97e5576f1011b56e74
refs/heads/master
2023-08-08T13:56:06.549053
2023-08-02T15:55:44
2023-08-02T15:55:44
239,741,584
0
0
null
2023-08-02T15:55:45
2020-02-11T11:05:21
null
UTF-8
Java
false
false
1,728
java
package per.eicho.demo.leetcode.q2001_2100; import per.eicho.demo.leetcode.datastructure.ListNode; /** * <p>2058. Find the Minimum and Maximum Number of Nodes Between Critical Points 的题解代码 </p> * * @see <a href="https://leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/">2058. Find the Minimum and Maximum Number of Nodes Between Critical Points</a> */ public final class Q2058 { public int[] nodesBetweenCriticalPoints(ListNode head) { int minDistance = Integer.MAX_VALUE; int maxDistance = -1; ListNode previousNode = null; int index = 0; ListNode cursor = head; int firstCPIndex = -1; int previousCPIndex = -1; while (cursor.next != null) { if (isCriticalPoint(cursor, previousNode)) { if (firstCPIndex == -1) { firstCPIndex = index; } else { maxDistance = index - firstCPIndex; minDistance = Math.min(minDistance, index - previousCPIndex); } previousCPIndex = index; } // move cursor index++; previousNode = cursor; cursor = cursor.next; } return new int[]{minDistance == Integer.MAX_VALUE ? -1 : minDistance, maxDistance}; } private boolean isCriticalPoint(ListNode node, ListNode previousNode) { if (previousNode == null || node.next == null) return false; if (node.val < previousNode.val && node.val < node.next.val) return true; if (node.val > previousNode.val && node.val > node.next.val) return true; return false; } }
[ "793951781@qq.com" ]
793951781@qq.com
6daea3e22febd6ee3876cbb69202a1ece3322424
32d81b4b9db2b6ea4e5c046688cfa43740500bed
/src/com/netty/io/netty/handler/codec/http/multipart/DiskFileUpload.java
c9696e22777ea9e1686df03636533dd0637fc950
[]
no_license
zymap/zytest
f1ce4cf0e6c735d35f68ea8c89df98ae6d035821
b8d9eb6cf46490958d20ebb914d543af50d1b862
refs/heads/master
2021-04-03T01:15:30.946483
2018-03-24T14:10:57
2018-03-24T14:10:57
124,623,152
0
0
null
null
null
null
UTF-8
Java
false
false
6,698
java
/* * Copyright 2012 The Netty Project * * The Netty Project licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.netty.io.netty.handler.codec.http.multipart; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelException; import io.netty.handler.codec.http.HttpHeaderNames; import io.netty.handler.codec.http.HttpHeaderValues; import io.netty.handler.codec.http.multipart.*; import io.netty.handler.codec.http.multipart.AbstractDiskHttpData; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; /** * Disk FileUpload implementation that stores file into real files */ public class DiskFileUpload extends AbstractDiskHttpData implements FileUpload { public static String baseDirectory; public static boolean deleteOnExitTemporaryFile = true; public static final String prefix = "FUp_"; public static final String postfix = ".tmp"; private String filename; private String contentType; private String contentTransferEncoding; public DiskFileUpload(String name, String filename, String contentType, String contentTransferEncoding, Charset charset, long size) { super(name, charset, size); setFilename(filename); setContentType(contentType); setContentTransferEncoding(contentTransferEncoding); } @Override public HttpDataType getHttpDataType() { return HttpDataType.FileUpload; } @Override public String getFilename() { return filename; } @Override public void setFilename(String filename) { if (filename == null) { throw new NullPointerException("filename"); } this.filename = filename; } @Override public int hashCode() { return FileUploadUtil.hashCode(this); } @Override public boolean equals(Object o) { return o instanceof FileUpload && FileUploadUtil.equals(this, (FileUpload) o); } @Override public int compareTo(InterfaceHttpData o) { if (!(o instanceof FileUpload)) { throw new ClassCastException("Cannot compare " + getHttpDataType() + " with " + o.getHttpDataType()); } return compareTo((FileUpload) o); } public int compareTo(FileUpload o) { return FileUploadUtil.compareTo(this, o); } @Override public void setContentType(String contentType) { if (contentType == null) { throw new NullPointerException("contentType"); } this.contentType = contentType; } @Override public String getContentType() { return contentType; } @Override public String getContentTransferEncoding() { return contentTransferEncoding; } @Override public void setContentTransferEncoding(String contentTransferEncoding) { this.contentTransferEncoding = contentTransferEncoding; } @Override public String toString() { File file = null; try { file = getFile(); } catch (IOException e) { // Should not occur. } return HttpHeaderNames.CONTENT_DISPOSITION + ": " + HttpHeaderValues.FORM_DATA + "; " + HttpHeaderValues.NAME + "=\"" + getName() + "\"; " + HttpHeaderValues.FILENAME + "=\"" + filename + "\"\r\n" + HttpHeaderNames.CONTENT_TYPE + ": " + contentType + (getCharset() != null? "; " + HttpHeaderValues.CHARSET + '=' + getCharset().name() + "\r\n" : "\r\n") + HttpHeaderNames.CONTENT_LENGTH + ": " + length() + "\r\n" + "Completed: " + isCompleted() + "\r\nIsInMemory: " + isInMemory() + "\r\nRealFile: " + (file != null ? file.getAbsolutePath() : "null") + " DefaultDeleteAfter: " + deleteOnExitTemporaryFile; } @Override protected boolean deleteOnExit() { return deleteOnExitTemporaryFile; } @Override protected String getBaseDirectory() { return baseDirectory; } @Override protected String getDiskFilename() { return "upload"; } @Override protected String getPostfix() { return postfix; } @Override protected String getPrefix() { return prefix; } @Override public FileUpload copy() { final ByteBuf content = content(); return replace(content != null ? content.copy() : null); } @Override public FileUpload duplicate() { final ByteBuf content = content(); return replace(content != null ? content.duplicate() : null); } @Override public FileUpload retainedDuplicate() { ByteBuf content = content(); if (content != null) { content = content.retainedDuplicate(); boolean success = false; try { FileUpload duplicate = replace(content); success = true; return duplicate; } finally { if (!success) { content.release(); } } } else { return replace(null); } } @Override public FileUpload replace(ByteBuf content) { io.netty.handler.codec.http.multipart.DiskFileUpload upload = new io.netty.handler.codec.http.multipart.DiskFileUpload( getName(), getFilename(), getContentType(), getContentTransferEncoding(), getCharset(), size); if (content != null) { try { upload.setContent(content); } catch (IOException e) { throw new ChannelException(e); } } return upload; } @Override public FileUpload retain(int increment) { super.retain(increment); return this; } @Override public FileUpload retain() { super.retain(); return this; } @Override public FileUpload touch() { super.touch(); return this; } @Override public FileUpload touch(Object hint) { super.touch(hint); return this; } }
[ "734206637@qq.com" ]
734206637@qq.com
f82378d3a3b81bd965a31e8d3a1cc5b670ef22b3
59b62899bacc0aed8ffd7c74160f091d795a1760
/CT25-GameServer/java/ct25/xtreme/gameserver/model/actor/instance/L2ControllableMobInstance.java
a70d1eea9817ebdec917e4eb6e8e27863c45f20b
[]
no_license
l2jmaximun/RenerFreya
2f8d303942a80cb3d9c7381e54af049a0792061b
c0c13f48003b96b38012d20539b35aba09e25ac7
refs/heads/master
2021-08-31T19:39:30.116727
2017-12-22T15:20:03
2017-12-22T15:20:03
114,801,613
0
0
null
null
null
null
UTF-8
Java
false
false
2,784
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package ct25.xtreme.gameserver.model.actor.instance; import ct25.xtreme.gameserver.ai.CtrlIntention; import ct25.xtreme.gameserver.ai.L2CharacterAI; import ct25.xtreme.gameserver.ai.L2ControllableMobAI; import ct25.xtreme.gameserver.model.actor.L2Character; import ct25.xtreme.gameserver.templates.chars.L2NpcTemplate; /** * @author littlecrow * */ public class L2ControllableMobInstance extends L2MonsterInstance { private boolean _isInvul; private L2ControllableMobAI _aiBackup; // to save ai, avoiding beeing detached protected class ControllableAIAcessor extends AIAccessor { @Override public void detachAI() { // do nothing, AI of controllable mobs can't be detached automatically } } @Override public boolean isAggressive() { return true; } @Override public int getAggroRange() { // force mobs to be aggro return 500; } public L2ControllableMobInstance(int objectId, L2NpcTemplate template) { super(objectId, template); setInstanceType(InstanceType.L2ControllableMobInstance); } @Override public L2CharacterAI getAI() { L2CharacterAI ai = _ai; // copy handle if (ai == null) { synchronized(this) { if (_ai == null && _aiBackup == null) { _ai = new L2ControllableMobAI(new ControllableAIAcessor()); _aiBackup = (L2ControllableMobAI)_ai; } else { _ai = _aiBackup; } return _ai; } } return ai; } @Override public boolean isInvul() { return _isInvul; } public void setInvul(boolean isInvul) { _isInvul = isInvul; } @Override public boolean doDie(L2Character killer) { if (!super.doDie(killer)) return false; removeAI(); return true; } @Override public void deleteMe() { removeAI(); super.deleteMe(); } /** * Definitively remove AI */ protected void removeAI() { synchronized (this) { if (_aiBackup != null) { _aiBackup.setIntention(CtrlIntention.AI_INTENTION_IDLE); _aiBackup = null; _ai = null; } } } }
[ "Rener@Rener-PC" ]
Rener@Rener-PC
23820d009d3006ab3bb1515c314ce99f9250e61b
8ead5ff8d527e4b4d98cd54e9b84f50ea824f2be
/cj.lns.chip.sos.website/src/cj/lns/chip/sos/website/framework/Hub.java
d05939f8f5229a9674a025a05cdfcb2b49014acc
[]
no_license
911Steven/cj.lns.sos
9976efcf28418094e315324a4ce145c56bb57478
af82a5e7555b99780a9606b5e848861ce1ae5503
refs/heads/master
2020-07-05T16:22:11.341767
2018-10-12T02:13:41
2018-10-12T02:13:41
202,696,541
1
0
null
2019-08-16T09:10:35
2019-08-16T09:10:35
null
UTF-8
Java
false
false
3,609
java
package cj.lns.chip.sos.website.framework; import cj.lns.chip.sos.website.framework.sink.DirectSink; import cj.lns.chip.sos.website.framework.sink.PartSink; import cj.lns.chip.sos.website.framework.sink.RenderSink; import cj.studio.ecm.annotation.CjService; import cj.studio.ecm.annotation.CjServiceRef; import cj.studio.ecm.graph.IPin; import cj.studio.ecm.graph.IPlug; import cj.studio.ecm.graph.ISink; import cj.studio.ecm.plugins.moduleable.IModule; import cj.studio.ecm.plugins.moduleable.IModuleContainer; @CjService(name = "hub") public class Hub implements IHub { @CjServiceRef(refByName = "serviceosModuleContainer") IModuleContainer container; @Override public void refresh() { IModule sos = container.module("serviceos"); sos.in().unPlug("renderSink"); IPlug renderPlug = sos.in().plugLast("renderSink", createRenderSink());//renderSink仅调度到portal,sws IPin portalDown=sos.downriver("portal"); renderPlug.plugBranch(portalDown.name(), portalDown); IPin swsDown=sos.downriver("servicews");//渲染是先flow到视窗,在视窗内为session设置视窗上下文,如果成功则回来flow portal renderPlug.plugBranch(swsDown.name(), swsDown); sos.site().in().unPlug("partSink");//partsink专门处理外部来的http协议,因此独立一个sink类型 IPlug partPlug = sos.site().in().plugLast("partSink", createPartSink());//除sos模块端子之外的所有其它模块的上下游输入端子 //检出一级模块及其下模块的要插入directsink的输出端子,设为集合a //检出一级模块及其下模块的内核输入端子,设为集合b //将b集合插入到a的任一元素,但排除b集合中与a中该元素同名的端子,且,如果是partPlug退出,如果非则对a的元素再插入remotePin和fetchPin String[] names = container.enumModuleName(); for (String name : names) { if ("serviceos".equals(name)){ String[] chipids=sos.enumSubordinateChipId(); for(String upOut:chipids){//将一级模块的芯片的上下游输出端子接下directsink IModule m=container.module(upOut); m.out().unPlug("directSink"); IPlug outPlug=m.out().plugLast("directSink", createDirectSink()); plugDirectSink(outPlug,sos,container); } continue; } //以下插入内核输入端子 IModule m = container.module(name); partPlug.plugBranch(name, m.site().in());//插入部件分支 //其后将各个模块的内核输出端子插入directSink m.site().out().unPlug("directSink"); IPlug outPlug=m.site().out().plugLast("directSink", createDirectSink()); plugDirectSink(outPlug,sos,container); } } private void plugDirectSink(IPlug outPlug, IModule sos, IModuleContainer container) { //插入各模块中所有的内核输入端子,而除去模块自身的内核输入端子 //最后插入远程端子和抓取端子 String[] names = container.enumModuleName(); for (String name : names) { if ("serviceos".equals(name)){ continue; } if(name.equals(outPlug.owner())){//忽略自身内核输出再接入自身的内核输入端子 continue; } IModule m = container.module(name); outPlug.plugBranch(name, m.site().in()); } //将两个外部输出端子插入ß outPlug.plugBranch("$.remoteOut", sos.out()); outPlug.plugBranch("$.snsOut", sos.site().out()); outPlug.plugBranch("$.cscOut", sos.site().out()); } protected ISink createPartSink() { return new PartSink(); } protected ISink createDirectSink() { return new DirectSink(); } protected ISink createRenderSink() { return new RenderSink(); } }
[ "carocean.jofers@icloud.com" ]
carocean.jofers@icloud.com
d3215b016005ed25dd3287d67ce91720a718e434
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/notification/model/b.java
138252119f4d7b097d14df06909210973f13386a
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
212
java
// INTERNAL ERROR // /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes4.jar * Qualified Name: com.tencent.mm.plugin.notification.model.b * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
09c55e393f0cdf97c296eedf975abfa01a45a2c5
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2012-05-19/seasar2-2.4.46/s2jdbc-gen/s2jdbc-gen/src/main/java/org/seasar/extension/jdbc/gen/task/DumpDataTask.java
7796880a0bf225de5ffeb6f2f1315f44dbe5d9f9
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
7,058
java
/* * Copyright 2004-2012 the Seasar Foundation and the Others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.seasar.extension.jdbc.gen.task; import java.io.File; import org.apache.tools.ant.Task; import org.seasar.extension.jdbc.JdbcManager; import org.seasar.extension.jdbc.gen.command.Command; import org.seasar.extension.jdbc.gen.dialect.GenDialect; import org.seasar.extension.jdbc.gen.internal.command.DumpDataCommand; /** * エンティティに対応するデータベースのデータをテキストファイルにダンプする{@link Task}です。 * * @author taedium * @see DumpDataCommand */ public class DumpDataTask extends AbstractTask { /** コマンド */ protected DumpDataCommand command = new DumpDataCommand(); @Override protected Command getCommand() { return command; } /** * 設定ファイルのパスを設定します。 * * @param configPath * 設定ファイルのパス */ public void setConfigPath(String configPath) { command.setConfigPath(configPath); } /** * 環境名を設定します。 * * @param env * 環境名 */ public void setEnv(String env) { command.setEnv(env); } /** * {@link JdbcManager}のコンポーネント名を設定します。 * * @param jdbcManagerName * {@link JdbcManager}のコンポーネント名 */ public void setJdbcManagerName(String jdbcManagerName) { command.setJdbcManagerName(jdbcManagerName); } /** * {@link Factory}の実装クラス名を設定します。 * * @param factoryClassName * {@link Factory}の実装クラス名 */ public void setFactoryClassName(String factoryClassName) { command.setFactoryClassName(factoryClassName); } /** * クラスパスのディレクトリを設定します。 * * @param classpathDir * クラスパスのディレクトリ */ public void setClasspathDir(File classpathDir) { command.setClasspathDir(classpathDir); } /** * ダンプディレクトリを設定します。 * * @param dumpDir * ダンプディレクトリ */ public void setDumpDir(File dumpDir) { command.setDumpDir(dumpDir); } /** * ダンプファイルのエンコーディングを設定します。 * * @param dumpFileEncoding * ダンプファイルのエンコーディング */ public void setDumpFileEncoding(String dumpFileEncoding) { command.setDumpFileEncoding(dumpFileEncoding); } /** * 対象とするエンティティクラス名の正規表現を設定します。 * * @param entityClassNamePattern * 対象とするエンティティクラス名の正規表現 */ public void setEntityClassNamePattern(String entityClassNamePattern) { command.setEntityClassNamePattern(entityClassNamePattern); } /** * エンティティクラスのパッケージ名を設定します。 * * @param entityPackageName * エンティティクラスのパッケージ名 */ public void setEntityPackageName(String entityPackageName) { command.setEntityPackageName(entityPackageName); } /** * 対象としないエンティティクラス名の正規表現を設定します。 * * @param ignoreEntityClassNamePattern * 対象としないエンティティクラス名の正規表現 */ public void setIgnoreEntityClassNamePattern( String ignoreEntityClassNamePattern) { command.setIgnoreEntityClassNamePattern(ignoreEntityClassNamePattern); } /** * ルートパッケージ名を設定します。 * * @param rootPackageName * ルートパッケージ名 */ public void setRootPackageName(String rootPackageName) { command.setRootPackageName(rootPackageName); } /** * {@link GenDialect}の実装クラス名を設定します。 * * @param genDialectClassName * {@link GenDialect}の実装クラス名 */ public void setGenDialectClassName(String genDialectClassName) { command.setGenDialectClassName(genDialectClassName); } /** * DDL情報ファイルを設定します。 * * @param ddlInfoFile * DDL情報ファイル */ public void setDdlInfoFile(File ddlInfoFile) { command.setDdlInfoFile(ddlInfoFile); } /** * ダンプディレクトリ名を設定します。 * * @param dumpDirName * ダンプディレクトリ名 */ public void setDumpDirName(String dumpDirName) { command.setDumpDirName(dumpDirName); } /** * マイグレーションのディレクトリを設定します。 * * @param migrateDir * マイグレーションのディレクトリ */ public void setMigrateDir(File migrateDir) { command.setMigrateDir(migrateDir); } /** * バージョン番号のパターンを設定します。 * * @param versionNoPattern * バージョン番号のパターン */ public void setVersionNoPattern(String versionNoPattern) { command.setVersionNoPattern(versionNoPattern); } /** * 環境名をバージョンに適用する場合{@code true}を設定します。 * * @param applyEnvToVersion * 環境名をバージョンに適用する場合{@code true} */ public void setApplyEnvToVersion(boolean applyEnvToVersion) { command.setApplyEnvToVersion(applyEnvToVersion); } /** * トランザクション内で実行する場合{@code true}、そうでない場合{@code false}を設定します。 * * @param transactional * トランザクション内で実行する場合{@code true}、そうでない場合{@code false} */ public void setTransactional(boolean transactional) { command.setTransactional(transactional); } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
312cceede9e5dc8e2688ed708bf8d1df3091ba5f
f059ad43f87cc059429e7994eff81905bb66e15e
/src-old/main/java/ch/unine/zkpartitioned/CmdGetChildren.java
e93a455ac46e00bb86d7387f83a187fe61e0267a
[]
no_license
ralucah/ZooFence
c5c08a553cb67b5948886752eaa116c9d82ede8e
a790c3035246e8f50350b18af6b4b353c28e81e5
refs/heads/master
2021-01-17T21:26:35.975025
2016-01-21T09:42:36
2016-01-21T09:42:36
50,059,369
0
0
null
2016-01-20T20:49:51
2016-01-20T20:49:50
null
UTF-8
Java
false
false
1,420
java
package ch.unine.zkpartitioned; import java.util.ArrayList; import java.util.List; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.Watcher; import org.apache.zookeeper.ZooKeeper; public class CmdGetChildren extends Command { private static final long serialVersionUID = 1L; private Object watcher; private String watcherType; public CmdGetChildren(String id, String path, Watcher watcher) { super(id, path, CmdType.GET_CHILDREN); this.watcher = watcher; watcherType = "Watcher"; } public CmdGetChildren(String id, String path, boolean watcher) { super(id, path, CmdType.GET_CHILDREN); this.watcher = watcher; watcherType = "boolean"; } @Override public Object execute(ZooKeeper zk) throws KeeperException, InterruptedException { if (ZooKeeperPartitioned.logger.isTraceEnabled()) ZooKeeperPartitioned.logger.trace("GetChildren.execute"); List<String> children = new ArrayList<String>(); if (watcherType == "Watcher") { Watcher w = (Watcher) watcher; List<String> crtChildren = zk.getChildren(path, w); for (String child : crtChildren) { if (!children.contains(child)) children.add(child); } } else { boolean w = (boolean) watcher; List<String> crtChildren = zk.getChildren(path, w); for (String child : crtChildren) { if (!children.contains(child)) children.add(child); } } return children; } }
[ "0track@gmail.com" ]
0track@gmail.com
638432d7b00e0a6a31dc4376f84a8710df82b612
d05ac0e945576eb8e51cb38dcf7350296bacdba1
/jbossws-core/src/org/jboss/ws/metadata/wsdl/XSModelTypes.java
5bb4af446f9ae537b254b6b00bdcc79575770b7c
[]
no_license
Arckman/CBPM
9b6a125ea2bebe44749c09cfc37f89fdc15d69b7
10663b40abf151c90d0b20878f8f7f20c8077b30
refs/heads/master
2016-09-06T09:02:15.819806
2014-05-22T02:40:16
2014-05-22T02:40:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,550
java
/* * JBoss, Home of Professional Open Source * Copyright 2005, 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.ws.metadata.wsdl; import javax.xml.namespace.QName; import org.apache.xerces.xs.XSElementDeclaration; import org.apache.xerces.xs.XSTypeDefinition; import org.jboss.logging.Logger; import org.jboss.ws.WSException; import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel; /** * A JBossXSModel based type definition. * * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a> * @version $Revision: 1757 $ */ public class XSModelTypes extends WSDLTypes { private static final Logger log = Logger.getLogger(XSModelTypes.class); private JBossXSModel schemaModel; public XSModelTypes() { this.schemaModel = new JBossXSModel(); } /** * Add a schema model for a given namespaceURI * @param nsURI the namespaceURI under which the model has been generated * @param schema the Schema Model that needs to be added to existing schema * model in WSDLTypes * <dt>Warning:</dd> * <p>Passing a null nsURI will replace the internal schema model * held by WSDLTypes by the model passed as an argument.</p> */ public void addSchemaModel(String nsURI, JBossXSModel schema) { if(nsURI == null) { log.trace("nsURI passed to addSchemaModel is null. Replacing Schema Model"); schemaModel = schema; } else schemaModel.merge(schema); } /** * Return the global Schema Model * @return */ public JBossXSModel getSchemaModel() { return schemaModel; } /** Get the xmlType from a given element xmlName */ public QName getXMLType(QName xmlName) { QName xmlType = null; String nsURI = xmlName.getNamespaceURI(); String localPart = xmlName.getLocalPart(); XSElementDeclaration xsel = schemaModel.getElementDeclaration(localPart, nsURI); if (xsel != null) { XSTypeDefinition xstype = xsel.getTypeDefinition(); if (xstype == null) throw new WSException("Cannot obtain XSTypeDefinition for: " + xmlName); if (xstype.getAnonymous() == false) { xmlType = new QName(xstype.getNamespace(), xstype.getName()); } else { xmlType = new QName(xstype.getNamespace(), ">" + localPart); } } return xmlType; } public String toString() { StringBuilder buffer = new StringBuilder("WSDLTypes:\n"); buffer.append(schemaModel != null ? schemaModel.serialize() : "<schema/>"); return buffer.toString(); } }
[ "fengrj1989@gmail.com" ]
fengrj1989@gmail.com
0a571f37f1ee2febfbb9854dc640bb1b7fc418e1
c2fb6846d5b932928854cfd194d95c79c723f04c
/java_backup/java.jimut/new tution/pattern15.java
f1855e8f7324ca7d27a89be4757f65ae35f8b303
[ "MIT" ]
permissive
Jimut123/code-backup
ef90ccec9fb6483bb6dae0aa6a1f1cc2b8802d59
8d4c16b9e960d352a7775786ea60290b29b30143
refs/heads/master
2022-12-07T04:10:59.604922
2021-04-28T10:22:19
2021-04-28T10:22:19
156,666,404
9
5
MIT
2022-12-02T20:27:22
2018-11-08T07:22:48
Jupyter Notebook
UTF-8
Java
false
false
205
java
import java .io.*; public class pattern15 { public static void main(String args[]) { int i,j; for (i=1;i<=5;i++) { for (j=i;j<=5;j++) { System.out.print(i+" "); } System.out.println(); } } }
[ "jimutbahanpal@yahoo.com" ]
jimutbahanpal@yahoo.com
d3621cc4f955d1b40a74baa6f979018b04963997
f28d1b8398af9ac3889173b72153946f9baf8e6e
/mafs-core-data/src/main/java/com/mikealbert/data/entity/VrbDiscountTypeCode.java
a02ce197c522b3fc27ee446dc30d59c65bced42b
[]
no_license
rajnishkg/Java_study
ab76f81bd2ce5e33b7e3056c1821cb0d543881ee
1f5b88fa0bafb5f30f035c7f1d024edbef90f0e4
refs/heads/master
2021-10-08T22:33:34.195637
2018-12-18T14:17:31
2018-12-18T14:17:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,818
java
package com.mikealbert.data.entity; import java.io.Serializable; import javax.persistence.*; import java.math.BigDecimal; import java.util.Set; /** * The persistent class for the VRB_DISCOUNT_TYPE_CODES database table. * */ @Entity @Table(name="VRB_DISCOUNT_TYPE_CODES") public class VrbDiscountTypeCode extends BaseEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name="VRB_TYPE_CODE") private String vrbTypeCode; @Column(name="ASC_FLAG_INDEX") private BigDecimal ascFlagIndex; private String description; //bi-directional many-to-one association to VrbDiscount @OneToMany(mappedBy="vrbDiscountTypeCode") private Set<VrbDiscount> vrbDiscounts; //bi-directional many-to-one association to VrbDiscountTypeFlag @OneToMany(mappedBy="vrbDiscountTypeCode") private Set<VrbDiscountTypeFlag> vrbDiscountTypeFlags; public VrbDiscountTypeCode() { } public String getVrbTypeCode() { return this.vrbTypeCode; } public void setVrbTypeCode(String vrbTypeCode) { this.vrbTypeCode = vrbTypeCode; } public BigDecimal getAscFlagIndex() { return this.ascFlagIndex; } public void setAscFlagIndex(BigDecimal ascFlagIndex) { this.ascFlagIndex = ascFlagIndex; } public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } public Set<VrbDiscount> getVrbDiscounts() { return this.vrbDiscounts; } public void setVrbDiscounts(Set<VrbDiscount> vrbDiscounts) { this.vrbDiscounts = vrbDiscounts; } public Set<VrbDiscountTypeFlag> getVrbDiscountTypeFlags() { return this.vrbDiscountTypeFlags; } public void setVrbDiscountTypeFlags(Set<VrbDiscountTypeFlag> vrbDiscountTypeFlags) { this.vrbDiscountTypeFlags = vrbDiscountTypeFlags; } }
[ "amritrajsingh13@gmail.com" ]
amritrajsingh13@gmail.com
49144481bae426038bab2d1095a4cf6a08835bf0
5173401b07057d0a873500f9b2fdc791c107652a
/SiaSoft/src/pt/inescporto/siasoft/go/aa/ejb/session/ECritCategoryHome.java
a187d6b7e9da3b99becf1e7ade3871ca395a441c
[]
no_license
pedrocleto/Java
3d273f08414f9f4135855900840ca01cae64988e
b144bd57bd8c55b2b24452284b72754a518dd9e3
refs/heads/master
2021-01-01T16:31:29.972484
2013-08-10T09:49:34
2013-08-10T09:49:34
12,018,789
1
0
null
null
null
null
UTF-8
Java
false
false
599
java
package pt.inescporto.siasoft.go.aa.ejb.session; import javax.ejb.EJBHome; import java.util.Vector; import javax.ejb.CreateException; import java.rmi.RemoteException; /** * <p>Title: SIASoft</p> * * <p>Description: </p> * * <p>Copyright: Copyright (c) 2005</p> * * <p>Company: INESC Porto</p> * * @author not attributable * @version 0.1 */ public interface ECritCategoryHome extends EJBHome { ECritCategory create() throws CreateException, RemoteException; ECritCategory create(String linkCondition, Vector binds) throws CreateException, RemoteException; }
[ "pedrovsky@gmail.com" ]
pedrovsky@gmail.com
1f5dc4c7d22ab2addaa4201d0b6e21b23a520068
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/ui/bizchat/BizChatroomInfoUI$11.java
5f01de967d23508f344e309cabd6b28c2c8b677c
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
463
java
package com.tencent.mm.ui.bizchat; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; class BizChatroomInfoUI$11 implements OnCancelListener { final /* synthetic */ BizChatroomInfoUI yoK; BizChatroomInfoUI$11(BizChatroomInfoUI bizChatroomInfoUI) { this.yoK = bizChatroomInfoUI; } public final void onCancel(DialogInterface dialogInterface) { BizChatroomInfoUI.e(this.yoK); } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
c461f0a1567a743b7832c847ac19b5743cc07655
6fa701cdaa0d83caa0d3cbffe39b40e54bf3d386
/google/ads/googleads/v6/googleads-java/gapic-googleads-java/src/test/java/com/google/ads/googleads/v6/services/MockExtensionFeedItemServiceImpl.java
736ff0f012c50b2e0184ec472e3146eaa723a295
[ "Apache-2.0" ]
permissive
oltoco/googleapis-gen
bf40cfad61b4217aca07068bd4922a86e3bbd2d5
00ca50bdde80906d6f62314ef4f7630b8cdb6e15
refs/heads/master
2023-07-17T22:11:47.848185
2021-08-29T20:39:47
2021-08-29T20:39:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,699
java
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.ads.googleads.v6.services; import com.google.ads.googleads.v6.resources.ExtensionFeedItem; import com.google.ads.googleads.v6.services.ExtensionFeedItemServiceGrpc.ExtensionFeedItemServiceImplBase; import com.google.api.core.BetaApi; import com.google.protobuf.AbstractMessage; import io.grpc.stub.StreamObserver; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; import javax.annotation.Generated; @BetaApi @Generated("by gapic-generator-java") public class MockExtensionFeedItemServiceImpl extends ExtensionFeedItemServiceImplBase { private List<AbstractMessage> requests; private Queue<Object> responses; public MockExtensionFeedItemServiceImpl() { requests = new ArrayList<>(); responses = new LinkedList<>(); } public List<AbstractMessage> getRequests() { return requests; } public void addResponse(AbstractMessage response) { responses.add(response); } public void setResponses(List<AbstractMessage> responses) { this.responses = new LinkedList<Object>(responses); } public void addException(Exception exception) { responses.add(exception); } public void reset() { requests = new ArrayList<>(); responses = new LinkedList<>(); } @Override public void getExtensionFeedItem( GetExtensionFeedItemRequest request, StreamObserver<ExtensionFeedItem> responseObserver) { Object response = responses.poll(); if (response instanceof ExtensionFeedItem) { requests.add(request); responseObserver.onNext(((ExtensionFeedItem) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { responseObserver.onError( new IllegalArgumentException( String.format( "Unrecognized response type %s for method GetExtensionFeedItem, expected %s or %s", response == null ? "null" : response.getClass().getName(), ExtensionFeedItem.class.getName(), Exception.class.getName()))); } } @Override public void mutateExtensionFeedItems( MutateExtensionFeedItemsRequest request, StreamObserver<MutateExtensionFeedItemsResponse> responseObserver) { Object response = responses.poll(); if (response instanceof MutateExtensionFeedItemsResponse) { requests.add(request); responseObserver.onNext(((MutateExtensionFeedItemsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { responseObserver.onError( new IllegalArgumentException( String.format( "Unrecognized response type %s for method MutateExtensionFeedItems, expected %s or %s", response == null ? "null" : response.getClass().getName(), MutateExtensionFeedItemsResponse.class.getName(), Exception.class.getName()))); } } }
[ "bazel-bot-development[bot]@users.noreply.github.com" ]
bazel-bot-development[bot]@users.noreply.github.com
c3c9a5b63f9d34242d9fb9bebaf569b81b029958
b634de75a070612d159c91865872a38ce4333718
/kie-remote/kie-remote-services/src/test/java/org/kie/remote/services/rest/PaginatorTest.java
61bff8cfc516af953b54335d6e23c0556e650c31
[ "Apache-2.0" ]
permissive
garmanli/droolsjbpm-integration
2b9046a0d65269cc7b0f470826a181e714e07413
4fb2e41a776546b7251c932fb2f1abbf57861c2c
refs/heads/master
2021-01-23T20:40:11.341046
2014-08-12T16:00:45
2014-08-12T16:00:45
23,016,006
1
0
null
null
null
null
UTF-8
Java
false
false
2,313
java
package org.kie.remote.services.rest; import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.Test; public class PaginatorTest extends ResourceBase { @Test public void testPaginate() { List<Integer> results = new ArrayList<Integer>(); for( int i = 0; i < 100; ++i ) { results.add(i); } String oper = "/test/paginate"; Map<String, String[]> params = new HashMap<String, String[]>(); int [] pageInfo = getPageNumAndPageSize(params, oper); List<Integer> pagedList = paginate(pageInfo, results); assertEquals( results, pagedList ); String [] pageValues = {"2"}; String [] sizeValues = {"3"}; params.put("page", pageValues ); params.put("pageSize", sizeValues ); pageInfo = getPageNumAndPageSize(params, oper); pagedList = paginate(pageInfo, results); assertEquals( new Integer(3), pagedList.get(0)); assertEquals( 3, pagedList.size() ); pageValues[0] = "4"; sizeValues[0] = "5"; params.put("p", pageValues ); params.put("s", sizeValues ); pageInfo = getPageNumAndPageSize(params, oper); pagedList = paginate(pageInfo, results); assertEquals( new Integer(15), pagedList.get(0)); assertEquals( 5, pagedList.size() ); pageInfo[PAGE_NUM] = 0; pageInfo[PAGE_SIZE] = 0; pagedList = paginate(pageInfo, results); assertEquals( pagedList.size(), results.size()); } @Test public void pageSize10ReturnsAllTasks() { String oper = "/test/paginate"; List<Integer> results = new ArrayList<Integer>(); for( int i = 0; i < 100; ++i ) { results.add(i); } int pageSize = 10; String [] sizeValues = {String.valueOf(pageSize)}; Map<String, String[]> params = new HashMap<String, String[]>(); params.put("pageSize", sizeValues ); List<Integer> pagedResults = paginate(getPageNumAndPageSize(params, oper), results); assertEquals( "Paginated results", pageSize, pagedResults.size()); } }
[ "mrietvel@redhat.com" ]
mrietvel@redhat.com
e3869bb784df572133d59d07d3fdf0b1dd7eb44f
f1572d3a826ced3a778dd378ab52fa22d1ec3ec9
/democode/xsd2javacreate/src/com/beyondbit/smartbox/request/QuerySendSMSIDV2Request.java
f524cb4b871d0377abe86c54ec562435750b4a65
[]
no_license
txc1223/helloworld
0a3ae2cdf675e940816bcfba8a611de2b3aa4434
c0db8c4a9eaa923c995e7aec239db35ef6ed498a
refs/heads/master
2021-01-25T10:29:11.002995
2015-12-15T03:26:14
2015-12-15T03:26:14
31,292,917
0
0
null
null
null
null
UTF-8
Java
false
false
728
java
package com.beyondbit.smartbox.request; public class QuerySendSMSIDV2Request extends Request { private int beginID; private boolean hasBeginID=false; public boolean getHasBeginID(){ return hasBeginID; } public void setHasBeginID(boolean hasBeginID){ this.hasBeginID=hasBeginID; } public void setBeginID(int beginID){ this.hasBeginID=true; this.beginID=beginID; } public int getBeginID(){ return beginID; } private int endID; private boolean hasEndID=false; public boolean getHasEndID(){ return hasEndID; } public void setHasEndID(boolean hasEndID){ this.hasEndID=hasEndID; } public void setEndID(int endID){ this.hasEndID=true; this.endID=endID; } public int getEndID(){ return endID; } }
[ "tangxucheng@shbeyondbit.com" ]
tangxucheng@shbeyondbit.com
64253fc31d399a132d91ed226147d3c37a1b35f8
76d925e0ce1f60ac5eb363eb99775dbed06a2c46
/bitcamp-java-project/src15/main/java/bitcamp/java106/pms/controller/TeamMemberController.java
f05042368d3974ddc762f71a60216a42d2bbf4af
[]
no_license
psk041e/bitcamp
44750dbf9644773b1822db31301d8f55218d9256
66e69439d00f989246a2866ecccab796ebce6997
refs/heads/master
2021-01-24T10:28:06.712161
2018-08-10T07:50:42
2018-08-10T07:50:42
123,054,168
1
0
null
null
null
null
UTF-8
Java
false
false
5,651
java
// 팀 멤버 관리 기능을 모아둔 클래스 package bitcamp.java106.pms.controller; import java.sql.Date; import java.util.Scanner; import bitcamp.java106.pms.dao.MemberDao; import bitcamp.java106.pms.dao.TeamDao; import bitcamp.java106.pms.domain.Member; import bitcamp.java106.pms.domain.Team; import bitcamp.java106.pms.util.Console; public class TeamMemberController { Scanner keyScan; TeamDao teamDao; // 자체적으로 만들지 않도록 해주고 생성할때 반드시 넘기도록 한다. MemberDao memberDao; //TeamDao teamDao = new TeamDao(); // App에서 한번만 new해주어야 한다. public TeamMemberController(Scanner scanner, TeamDao teamDao, MemberDao memberDao) { this.keyScan = scanner; this.teamDao = teamDao; this.memberDao = memberDao; } public void service(String menu, String option) { if (menu.equals("team/member/add")) { this.onTeamMemberAdd(option); } else if (menu.equals("team/member/list")) { this.onTeamMemberList(option); } else if (menu.equals("team/member/delete")) { this.onTeamMemberDelete(option); } else { System.out.println("명령어가 올바르지 않습니다."); } } void onTeamMemberAdd(String teamName) { if (teamName == null) { System.out.println("팀명을 입력하시기 바랍니다."); return; } Team team = teamDao.get(teamName); if (team == null) { System.out.printf("%s 팀은 존재하지 않습니다.", teamName); return; // void 이기 때문에 return 다음에 값을 주지 않는다. } System.out.println("[팀 멤버 추가]"); System.out.print("추가할 멤버의 아이디는? "); String memberId = keyScan.nextLine(); Member member = memberDao.get(memberId); if (member == null) { System.out.printf("%s 회원은 없습니다.\n", memberId); return; } // 기존에 등록된 회원인지 검사 // 존재하는 팀에 대해서 다음 반복문을 수행한다. boolean exist = false; for (int i = 0; i < team.members.length; i++) { // 팀 객체 안의 members배열 길이만큼 반복 if (team.members[i] == null) continue; if (team.members[i].id.equals(memberId)) { exist = true; break; // 해당 if문이 true가 아니면 실행하지 않고 넘어간 // 따라서 exist는 false값인 채로 넘어가는 것이다. } } if (exist) { System.out.println("이미 등록된 회원입니다."); return; } // 팀 멤버 배열에서 빈 방을 찾아 그 방에 멤버 객체(의 주소)를 넣는다. for (int i = 0; i < team.members.length; i++) { // 팀 객체 안의 members배열 길이만큼 반복 if (team.members[i] == null) { team.members[i] = member; System.out.println("추가하였습니다."); break; } } } // 팀 멤버 목록 void onTeamMemberList(String teamName) { if (teamName == null) { System.out.println("팀명을 입력하시기 바랍니다."); return; } Team team = teamDao.get(teamName); // 팀 이름으로 팀 정보를 찾는다. if (team == null) { System.out.printf("%s 팀은 존재하지 않습니다.", teamName); return; // void 이기 때문에 return 다음에 값을 주지 않는다. } System.out.println("[팀 멤버 목록]"); System.out.print("회원들: "); for (int i = 0; i < team.members.length; i++) { if (team.members[i] == null) continue; System.out.printf("%s, ", team.members[i].id); } System.out.println(); } void onTeamMemberDelete(String teamName) { if (teamName == null) { System.out.println("팀명을 입력하시기 바랍니다."); return; } Team team = teamDao.get(teamName); if (team == null) { System.out.printf("%s 팀은 존재하지 않습니다.", teamName); return; } System.out.print("삭제할 팀원은? "); String memberId = keyScan.nextLine(); // 팀 멤버 삭제 System.out.println("[팀 멤버 삭제]"); for (int i = 0; i < team.members.length; i++) { if (team.members[i] == null) continue; if (team.members[i].id.equals(memberId)) { team.members[i] = null; System.out.println("삭제하였습니다."); return; // 더이상 작업하지 않고 함수를 끝낸다. // break시 반복문을 멈추고 다음 라인으로 가서 "이 팀의 회원이 아닙니다"를 출력해버린다. } } System.out.println("이 팀의 회원이 아닙니다."); } } //ver 15 - 팀 멤버를 등록, 조회, 삭제할 수 있는 기능 추가. //ver 14 - TeamDao를 사용하여 팀 데이터를 관리한다. //ver 13 - 시작일, 종료일을 문자열로 입력 받아 Date 객체로 변환하여 저장.
[ "tjrud64@gmail.com" ]
tjrud64@gmail.com
36dc3aae5ab5b869a0075751bc7c6edbc9619de3
498dd2daff74247c83a698135e4fe728de93585a
/clients/google-api-services-vision/v1/1.30.1/com/google/api/services/vision/v1/model/GoogleCloudVisionV1p6beta1BatchAnnotateFilesResponse.java
515217be10d5edf4832cc95ea46e19e2c29de427
[ "Apache-2.0" ]
permissive
googleapis/google-api-java-client-services
0e2d474988d9b692c2404d444c248ea57b1f453d
eb359dd2ad555431c5bc7deaeafca11af08eee43
refs/heads/main
2023-08-23T00:17:30.601626
2023-08-20T02:16:12
2023-08-20T02:16:12
147,399,159
545
390
Apache-2.0
2023-09-14T02:14:14
2018-09-04T19:11:33
null
UTF-8
Java
false
false
3,072
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. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.vision.v1.model; /** * A list of file annotation responses. * * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Vision API. For a detailed explanation see: * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> * </p> * * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class GoogleCloudVisionV1p6beta1BatchAnnotateFilesResponse extends com.google.api.client.json.GenericJson { /** * The list of file annotation responses, each response corresponding to each AnnotateFileRequest * in BatchAnnotateFilesRequest. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List<GoogleCloudVisionV1p6beta1AnnotateFileResponse> responses; static { // hack to force ProGuard to consider GoogleCloudVisionV1p6beta1AnnotateFileResponse used, since otherwise it would be stripped out // see https://github.com/google/google-api-java-client/issues/543 com.google.api.client.util.Data.nullOf(GoogleCloudVisionV1p6beta1AnnotateFileResponse.class); } /** * The list of file annotation responses, each response corresponding to each AnnotateFileRequest * in BatchAnnotateFilesRequest. * @return value or {@code null} for none */ public java.util.List<GoogleCloudVisionV1p6beta1AnnotateFileResponse> getResponses() { return responses; } /** * The list of file annotation responses, each response corresponding to each AnnotateFileRequest * in BatchAnnotateFilesRequest. * @param responses responses or {@code null} for none */ public GoogleCloudVisionV1p6beta1BatchAnnotateFilesResponse setResponses(java.util.List<GoogleCloudVisionV1p6beta1AnnotateFileResponse> responses) { this.responses = responses; return this; } @Override public GoogleCloudVisionV1p6beta1BatchAnnotateFilesResponse set(String fieldName, Object value) { return (GoogleCloudVisionV1p6beta1BatchAnnotateFilesResponse) super.set(fieldName, value); } @Override public GoogleCloudVisionV1p6beta1BatchAnnotateFilesResponse clone() { return (GoogleCloudVisionV1p6beta1BatchAnnotateFilesResponse) super.clone(); } }
[ "chingor@google.com" ]
chingor@google.com
8f755a39b5ff60a95bd8e92ef210dfd12fefbed9
313cac74fe44fa4a08c50b2f251e4167f637c049
/retail-fas-1.1.2/retail-fas/retail-fas-dal/src/main/java/cn/wonhigh/retail/fas/dal/database/BillShopBalanceDeductMapper.java
3eb35e4183663183e853fbeed09a4f86eb3ca454
[]
no_license
gavin2lee/spring-projects
a1d6d495f4a027b5896e39f0de2765aaadc8a9de
6e4a035ae3c9045e880a98e373dd67c8c81bfd36
refs/heads/master
2020-04-17T04:52:41.492652
2016-09-29T16:07:40
2016-09-29T16:07:40
66,710,003
0
3
null
null
null
null
UTF-8
Java
false
false
1,519
java
package cn.wonhigh.retail.fas.dal.database; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Param; import cn.wonhigh.retail.fas.common.dto.BillShopBalanceDeductFooterDto; import cn.wonhigh.retail.fas.common.dto.GatherBillShopBalanceDeductDto; import cn.wonhigh.retail.fas.common.model.BillShopBalanceDeduct; import com.yougou.logistics.base.dal.database.BaseCrudMapper; /** * 请写出类的用途 * @author chen.mj * @date 2014-11-27 19:22:11 * @version 1.0.0 * @copyright (C) 2013 YouGou Information Technology Co.,Ltd * All Rights Reserved. * * The software for the YouGou technology development, without the * company's written consent, and any other individuals and * organizations shall not be used, Copying, Modify or distribute * the software. * */ public interface BillShopBalanceDeductMapper extends BaseCrudMapper { public <ModelType> int deleteBalanceNoForModel(ModelType record); public <ModelType> int updateBalanceNoForModel(ModelType record); public int updateBalanceDeductBalanceNo(@Param("params")Map<String,Object> params); public BillShopBalanceDeduct getSumAmount(@Param("params")Map<String,Object> params); public GatherBillShopBalanceDeductDto gatherBalanceDeduct(@Param("params")Map<String, Object> params); /** * 获取页脚汇总对象 * @param params 查询参数 * @return 页脚汇总对象 */ public List<BillShopBalanceDeductFooterDto> getFooterDto(@Param("params")Map<String, Object> params); }
[ "gavin2lee@163.com" ]
gavin2lee@163.com
0259152e78a5b9a73603169d4752715dd8d9ddae
d00af6c547e629983ff777abe35fc9c36b3b2371
/jboss-all/jmx/src/main/javax/management/OrQueryExp.java
d0620e965bebb666e7070582c1d26246abe93318
[]
no_license
aosm/JBoss
e4afad3e0d6a50685a55a45209e99e7a92f974ea
75a042bd25dd995392f3dbc05ddf4bbf9bdc8cd7
refs/heads/master
2023-07-08T21:50:23.795023
2013-03-20T07:43:51
2013-03-20T07:43:51
8,898,416
1
1
null
null
null
null
UTF-8
Java
false
false
2,144
java
/* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.management; import java.io.Serializable; /** * An OR Query Expression.<p> * * Returns true when either expression is true. * * <p><b>Revisions:</b> * <p><b>20020314 Adrian Brock:</b> * <ul> * <li>Fix the human readable expression * </ul> * <p><b>20020317 Adrian Brock:</b> * <ul> * <li>Make queries thread safe * </ul> * * @author <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>. * @version $Revision: 1.3 $ */ /*package*/ class OrQueryExp extends QueryExpSupport { // Constants --------------------------------------------------- // Attributes -------------------------------------------------- /** * The first query expression */ QueryExp first; /** * The second query expression */ QueryExp second; // Static ------------------------------------------------------ // Constructors ------------------------------------------------ /** * Create a new OR query Expression * * @param first the first query expression * @param second the second query expression */ public OrQueryExp(QueryExp first, QueryExp second) { this.first = first; this.second = second; } // Public ------------------------------------------------------ // QueryExp implementation ------------------------------------- public boolean apply(ObjectName name) throws BadStringOperationException, BadBinaryOpValueExpException, BadAttributeValueExpException, InvalidApplicationException { return first.apply(name) || second.apply(name); } // Object overrides -------------------------------------------- public String toString() { return new String("(" + first.toString() + ") || (" + second.toString()) + ")"; } // Protected --------------------------------------------------- // Private ----------------------------------------------------- // Inner classes ----------------------------------------------- }
[ "rasmus@dll.nu" ]
rasmus@dll.nu
75f2c6ab8c283a36e6ea5578af88118518eeb28e
8ccd1c071b19388f1f2e92c5e5dbedc78fead327
/src/main/java/ohos/wifi/p2p/WifiP2pProxy.java
f02995d0a30e1ae06a3f473816c980e31c5291da
[]
no_license
yearsyan/Harmony-OS-Java-class-library
d6c135b6a672c4c9eebf9d3857016995edeb38c9
902adac4d7dca6fd82bb133c75c64f331b58b390
refs/heads/main
2023-06-11T21:41:32.097483
2021-06-24T05:35:32
2021-06-24T05:35:32
379,816,304
6
3
null
null
null
null
UTF-8
Java
false
false
3,598
java
package ohos.wifi.p2p; import ohos.hiviewdfx.HiLogLabel; import ohos.rpc.IRemoteObject; import ohos.rpc.MessageParcel; import ohos.rpc.RemoteException; import ohos.utils.Sequenceable; import ohos.utils.system.safwk.java.SystemAbilityDefinition; import ohos.wifi.InnerUtils; import ohos.wifi.WifiCommProxy; class WifiP2pProxy extends WifiCommProxy implements IWifiP2pController { private static final int COMMAND_DELETE_PERSISTENT_GROUP = 3; private static final int COMMAND_P2P_INIT = 1; private static final int COMMAND_P2P_REQUEST = 2; private static final int COMMAND_SET_DEVICE_NAME = 4; private static final int ERR_OK = 0; private static final HiLogLabel LABEL = new HiLogLabel(3, InnerUtils.LOG_ID_WIFI, "WifiP2pProxy"); private static final int MIN_TRANSACTION_ID = 1; private static final Object PROXY_LOCK = new Object(); private static volatile WifiP2pProxy sInstance = null; private WifiP2pProxy(int i) { super(i); } public static WifiP2pProxy getInstance() { if (sInstance == null) { synchronized (PROXY_LOCK) { if (sInstance == null) { sInstance = new WifiP2pProxy(SystemAbilityDefinition.WIFI_P2P_SYS_ABILITY_ID); } } } return sInstance; } @Override // ohos.wifi.p2p.IWifiP2pController public IRemoteObject init(IRemoteObject iRemoteObject, String str) throws RemoteException { MessageParcel create = MessageParcel.create(); create.writeString(InnerUtils.P2P_INTERFACE_TOKEN); create.writeRemoteObject(iRemoteObject); create.writeString(str); return request(1, create).readRemoteObject(); } @Override // ohos.wifi.p2p.IWifiP2pController public void sendP2pRequest(int i, IRemoteObject iRemoteObject, IRemoteObject iRemoteObject2, Sequenceable sequenceable, int i2, String str) throws RemoteException { MessageParcel create = MessageParcel.create(); create.writeString(InnerUtils.P2P_INTERFACE_TOKEN); create.writeInt(i); create.writeRemoteObject(iRemoteObject); create.writeRemoteObject(iRemoteObject2); create.writeSequenceable(sequenceable); create.writeInt(i2); create.writeString(str); request(2, create).reclaim(); } @Override // ohos.wifi.p2p.IWifiP2pController public void deletePersistentGroup(int i, IRemoteObject iRemoteObject, IRemoteObject iRemoteObject2, int i2, int i3, String str) throws RemoteException { MessageParcel create = MessageParcel.create(); create.writeString(InnerUtils.P2P_INTERFACE_TOKEN); create.writeInt(i); create.writeRemoteObject(iRemoteObject); create.writeRemoteObject(iRemoteObject2); create.writeInt(i2); create.writeInt(i3); create.writeString(str); request(3, create).reclaim(); } @Override // ohos.wifi.p2p.IWifiP2pController public void setDeviceName(int i, IRemoteObject iRemoteObject, IRemoteObject iRemoteObject2, String str, int i2, String str2) throws RemoteException { MessageParcel create = MessageParcel.create(); create.writeString(InnerUtils.P2P_INTERFACE_TOKEN); create.writeInt(i); create.writeRemoteObject(iRemoteObject); create.writeRemoteObject(iRemoteObject2); create.writeString(str); create.writeInt(i2); create.writeString(str2); request(4, create).reclaim(); } }
[ "yearsyan@gmail.com" ]
yearsyan@gmail.com
b7c0a7c37db9f12bc29a20b10818983f5f3f709a
985980cd69949832cfb7a7102417c813dd4f94e5
/baselibrary/src/main/java/com/haozi/baselibrary/interfaces/IFileControl.java
94217f2fd5ae6231f7c10c9393449098d1fee9a5
[]
no_license
jackyflame/ArcgisApp
cacef026f961230bee7ca05cdaf26afc6d91202b
77846c830a9f4c479634d4981f4195418bf73c4f
refs/heads/master
2021-06-24T19:16:36.638949
2017-09-14T07:11:08
2017-09-14T07:11:08
103,422,848
1
0
null
null
null
null
UTF-8
Java
false
false
551
java
package com.haozi.baselibrary.interfaces; import com.haozi.baselibrary.interfaces.listeners.OnDataLoaded; public interface IFileControl { <T> T get(String key); <T> T get(String key, T defaultValue); <T> void put(String key, T value); <T> void asyncPut(final String key, final T value); <T> void asyncGet(final String key, final OnDataLoaded<T> onDataLoaded); int remove(String key); boolean exists(String key); void cacheCheck(); void cleanCacheUpdateVersion(); String requestCacheFloderPath(); }
[ "263667227@qq.com" ]
263667227@qq.com
de1769ede179bbcf8c7b8d60a7caa58750e6064f
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.5.1/sources/io/reactivex/internal/subscriptions/SubscriptionArbiter.java
cbfbb8d20ae86bcd35b263f3a6606815a8aa762b
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
5,771
java
package io.reactivex.internal.subscriptions; import io.reactivex.internal.a.b; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; import org.a.d; public class SubscriptionArbiter extends AtomicInteger implements d { private static final long serialVersionUID = -2189523197179400958L; d actual; volatile boolean cancelled; final AtomicLong missedProduced = new AtomicLong(); final AtomicLong missedRequested = new AtomicLong(); final AtomicReference<d> missedSubscription = new AtomicReference(); long requested; protected boolean unbounded; public final void b(d dVar) { if (this.cancelled) { dVar.cancel(); return; } b.requireNonNull(dVar, "s is null"); if (get() == 0 && compareAndSet(0, 1)) { d dVar2 = this.actual; if (dVar2 != null) { dVar2.cancel(); } this.actual = dVar; long j = this.requested; if (decrementAndGet() != 0) { aWG(); } if (j != 0) { dVar.request(j); } return; } dVar = (d) this.missedSubscription.getAndSet(dVar); if (dVar != null) { dVar.cancel(); } drain(); } public final void request(long j) { if (SubscriptionHelper.validate(j) && !this.unbounded) { if (get() == 0 && compareAndSet(0, 1)) { long j2 = this.requested; if (j2 != Long.MAX_VALUE) { j2 = io.reactivex.internal.util.b.y(j2, j); this.requested = j2; if (j2 == Long.MAX_VALUE) { this.unbounded = true; } } d dVar = this.actual; if (decrementAndGet() != 0) { aWG(); } if (dVar != null) { dVar.request(j); } return; } io.reactivex.internal.util.b.a(this.missedRequested, j); drain(); } } public final void cX(long j) { if (!this.unbounded) { if (get() == 0 && compareAndSet(0, 1)) { long j2 = this.requested; if (j2 != Long.MAX_VALUE) { long j3 = j2 - j; j = 0; if (j3 < 0) { SubscriptionHelper.reportMoreProduced(j3); } else { j = j3; } this.requested = j; } if (decrementAndGet() != 0) { aWG(); return; } return; } io.reactivex.internal.util.b.a(this.missedProduced, j); drain(); } } public void cancel() { if (!this.cancelled) { this.cancelled = true; drain(); } } final void drain() { if (getAndIncrement() == 0) { aWG(); } } final void aWG() { d dVar = null; long j = 0; int i = 1; do { int i2; d dVar2; d dVar3 = (d) this.missedSubscription.get(); if (dVar3 != null) { dVar3 = (d) this.missedSubscription.getAndSet(null); } long j2 = this.missedRequested.get(); if (j2 != 0) { j2 = this.missedRequested.getAndSet(0); } long j3 = this.missedProduced.get(); if (j3 != 0) { j3 = this.missedProduced.getAndSet(0); } d dVar4 = this.actual; if (this.cancelled) { if (dVar4 != null) { dVar4.cancel(); this.actual = null; } if (dVar3 != null) { dVar3.cancel(); } i2 = i; dVar2 = dVar; } else { long j4 = this.requested; if (j4 != Long.MAX_VALUE) { j4 = io.reactivex.internal.util.b.y(j4, j2); if (j4 != Long.MAX_VALUE) { i2 = i; dVar2 = dVar; long j5 = j4 - j3; if (j5 < 0) { SubscriptionHelper.reportMoreProduced(j5); j5 = 0; } j4 = j5; } else { i2 = i; dVar2 = dVar; } this.requested = j4; } else { i2 = i; dVar2 = dVar; } if (dVar3 != null) { if (dVar4 != null) { dVar4.cancel(); } this.actual = dVar3; if (j4 != 0) { j = io.reactivex.internal.util.b.y(j, j4); dVar = dVar3; } } else if (!(dVar4 == null || j2 == 0)) { j = io.reactivex.internal.util.b.y(j, j2); dVar = dVar4; } i = i2; i = addAndGet(-i); } i = i2; dVar = dVar2; i = addAndGet(-i); } while (i != 0); if (j != 0) { dVar.request(j); } } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
4ccc5dd955e22d12eb853d290ce63b14d43d840a
6b4125b3d69cbc8fc291f93a2025f9f588d160d3
/components/gnutella-core/src/main/java/com/limegroup/gnutella/version/UpdateMessageVerifierImpl.java
a7e6ca99e4fcbe25007005ec86ce9153fde3e5cc
[]
no_license
mnutt/limewire5-ruby
d1b079785524d10da1b9bbae6fe065d461f7192e
20fc92ea77921c83069e209bb045b43b481426b4
refs/heads/master
2022-02-10T12:20:02.332362
2009-09-11T15:47:07
2009-09-11T15:47:07
89,669
2
3
null
2022-01-27T16:18:46
2008-12-12T19:40:01
Java
UTF-8
Java
false
false
1,517
java
package com.limegroup.gnutella.version; import java.io.IOException; import org.limewire.io.IOUtils; import org.limewire.security.SignatureVerifier; import com.google.inject.Singleton; /** * An implementation of UpdateMessageVerifier that uses * SignatureVerifier.getVerifiedData(data, publicKey, "DSA", "SHA1") to verify, * where public key is the key. */ @Singleton public class UpdateMessageVerifierImpl implements UpdateMessageVerifier { /** The public key. */ private final String KEY = "GCBADNZQQIASYBQHFKDERTRYAQATBAQBD4BIDAIA7V7VHAI5OUJCSUW7JKOC53HE473BDN2SHTXUIAGDDY7YBNSREZUUKXKAEJI7WWJ5RVMPVP6F6W5DB5WLTNKWZV4BHOAB2NDP6JTGBN3LTFIKLJE7T7UAI6YQELBE7O5J277LPRQ37A5VPZ6GVCTBKDYE7OB7NU6FD3BQENKUCNNBNEJS6Z27HLRLMHLSV37SEIBRTHORJAA4OAQVACLWAUEPCURQXTFSSK4YFIXLQQF7AWA46UBIDAIA67Q2BBOWTM655S54VNODNOCXXF4ZJL537I5OVAXZK5GAWPIHQJTVCWKXR25NIWKP4ZYQOEEBQC2ESFTREPUEYKAWCO346CJSRTEKNYJ4CZ5IWVD4RUUOBI5ODYV3HJTVSFXKG7YL7IQTKYXR7NRHUAJEHPGKJ4N6VBIZBCNIQPP6CWXFT4DJFC3GL2AHWVJFMQAUYO76Z5ESUA4BQQAAFAMAGKQF4ZHEOIG3ZEQPBBGLRNPGPJYF3B2YXD44YQ3TQPICPKFQO5TLPDWSCCUL4YHWYMLO43FRT4L5EBICT7J4EWUVSFFUHB244HFDWEKWD3LV3XXCZONDFTFKGNUUKQJTKWJA7GF3DNDEUHWEECM4WW2HMRYOGQWMYQVXWB3BC7GUNEXRQOYWWBTDWSOLI73KZRDUGND52UVJG"; public String getVerifiedData(byte[] data) { return SignatureVerifier.getVerifiedData(data, KEY, "DSA", "SHA1"); } public byte[] inflateNetworkData(byte[] input) throws IOException { return IOUtils.inflate(input); } }
[ "michael@nuttnet.net" ]
michael@nuttnet.net
f300d6dd430f13a521b3686f5ca088f7924ee27f
b59bfff6b8933e3ad203269e71c1a4007e93e1d2
/arquillian-service-container-spring/src/main/java/org/jboss/arquillian/container/spring/embedded/SpringEmbeddedApplicationContextProducer.java
9788331cb974eb7a410522a9e4e024ba0b735e96
[]
no_license
kurlenda/arquillian-extension-spring
3565813f967d3c77838d7367b53a260d8913485b
03d942192a3461ac11c7683c65cbff1a5b0fd3ed
refs/heads/master
2021-01-16T20:51:13.084450
2013-03-11T16:35:34
2013-03-11T16:35:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,382
java
/* * JBoss, Home of Professional Open Source * Copyright 2012, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.arquillian.container.spring.embedded; import org.jboss.arquillian.core.api.Instance; import org.jboss.arquillian.core.api.InstanceProducer; import org.jboss.arquillian.core.api.annotation.ApplicationScoped; import org.jboss.arquillian.core.api.annotation.Inject; import org.jboss.arquillian.core.api.annotation.Observes; import org.jboss.arquillian.core.spi.ServiceLoader; import org.jboss.arquillian.spring.integration.context.ApplicationContextProducer; import org.jboss.arquillian.spring.integration.context.RemoteApplicationContextProducer; import org.jboss.arquillian.spring.integration.context.RemoteTestScopeApplicationContext; import org.jboss.arquillian.test.spi.event.suite.BeforeClass; import java.util.List; /** * <p>An application context producer that scans for registered {@link ApplicationContextProducer} and invokes the one * that is capable of creating the application context for the test class.</p> * * @author <a href="mailto:jmnarloch@gmail.com">Jakub Narloch</a> * @version $Revision: $ */ public class SpringEmbeddedApplicationContextProducer { /** * <p>Service loader used for retrieving extensions.</p> */ @Inject private Instance<ServiceLoader> serviceLoader; /** * <p>Producer proxy for {@link RemoteTestScopeApplicationContext}.</p> */ @Inject @ApplicationScoped private InstanceProducer<RemoteTestScopeApplicationContext> testApplicationContext; /** * <p>Builds the application context before the test suite is being executed.</p> * * @param beforeClass the event fired before execution of test case */ public void initApplicationContext(@Observes BeforeClass beforeClass) { ServiceLoader loader = serviceLoader.get(); // retrieves the list of all registered application context producers List<RemoteApplicationContextProducer> applicationContextProducers = (List<RemoteApplicationContextProducer>) loader.all(RemoteApplicationContextProducer.class); for (RemoteApplicationContextProducer applicationContextProducer : applicationContextProducers) { if (applicationContextProducer.supports(beforeClass.getTestClass())) { RemoteTestScopeApplicationContext applicationContext = applicationContextProducer.createApplicationContext(beforeClass.getTestClass()); if (applicationContext != null) { testApplicationContext.set(applicationContext); break; } } } } }
[ "aslak@redhat.com" ]
aslak@redhat.com
61f50800144174171b3e7283189a73bf6379e8ad
206d15befecdfb67a93c61c935c2d5ae7f6a79e9
/platformCMS/src/org/javaside/cms/web/admin/DownloadTypeAction.java
9c095964eae471ee6e83abe32f8ce715559cc8bb
[]
no_license
MarkChege/micandroid
2e4d2884929548a814aa0a7715727c84dc4dcdab
0b0a6dee39cf7e258b6f54e1103dcac8dbe1c419
refs/heads/master
2021-01-10T19:15:34.994670
2013-05-16T05:56:21
2013-05-16T05:56:21
34,704,029
0
1
null
null
null
null
UTF-8
Java
false
false
4,149
java
package org.javaside.cms.web.admin; import java.util.List; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.convention.annotation.Results; import org.javaside.cms.core.CRUDActionSupport; import org.javaside.cms.core.Page; import org.javaside.cms.entity.DownloadType; import org.javaside.cms.service.DownloadTypeManager; import org.springframework.beans.factory.annotation.Autowired; @SuppressWarnings("serial") @Results( { @Result(name = CRUDActionSupport.RELOAD, location = "download-type.action?page.pageRequest=${page.pageRequest}&id=${entity.parent.id}", type = "redirect") }) public class DownloadTypeAction extends CRUDActionSupport<DownloadType> { @Autowired private DownloadTypeManager typeManager; private DownloadType entity; //下载分类实体 private Long id; //分类ID private Long[] ids; //分类ID数组 private Integer[] sorts; //分类排序值 private Long[] sortids; //分类排序ID数组 private Page<DownloadType> page = new Page<DownloadType>(10); //每页10条记录 private List<DownloadType> tree; //下载分类菜单树 private String action = "download-type"; //点击分类时要转发的ACTION private String actionParam = "id"; //点击分类时要转发的ACTION的参数 public String sort() throws Exception { typeManager.updateSort(sortids, sorts); return RELOAD; } /** * 栏目菜单树 * * @return * @throws Exception */ public String tree() throws Exception { tree = typeManager.getDownloadTypeRoot(); return "tree"; } @Override public String delete() throws Exception { typeManager.delete(id); return RELOAD; } /** * 批量删除 * * @return * @throws Exception */ public String deleteBatch() throws Exception { typeManager.deleteBatch(ids); return RELOAD; } /** * 执行ececute方法前进行二次绑定,execute默认执行list方法 * * @throws Exception */ public void prepareExecute() throws Exception { prepareModel(); } @Override public String list() throws Exception { page.setOrderBy("sort"); page = typeManager.getDownloadTypeList(entity, page); return SUCCESS; } @Override protected void prepareModel() throws Exception { if (id != null) { entity = typeManager.get(id); } else { entity = new DownloadType(); } } @Override public String input() throws Exception { //新增下载分类时重新导入父下载分类 if (entity.getId() == null && entity.getParent() != null && entity.getParent().getId() != null) { entity.setParent(typeManager.get(entity.getParent().getId())); } return INPUT; } @Override public String save() throws Exception { if (entity.getParent().getId() == null) { entity.setParent(null); } typeManager.save(entity); return RELOAD; } public DownloadType getModel() { // TODO Auto-generated method stub return entity; } public DownloadType getEntity() { return entity; } public void setEntity(DownloadType entity) { this.entity = entity; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long[] getIds() { return ids; } public void setIds(Long[] ids) { this.ids = ids; } public Integer[] getSorts() { return sorts; } public void setSorts(Integer[] sorts) { this.sorts = sorts; } public Long[] getSortids() { return sortids; } public void setSortids(Long[] sortids) { this.sortids = sortids; } public Page<DownloadType> getPage() { return page; } public void setPage(Page<DownloadType> page) { this.page = page; } public List<DownloadType> getTree() { return tree; } public void setTree(List<DownloadType> tree) { this.tree = tree; } public String getAction() { return action; } public void setAction(String action) { this.action = action; } public String getActionParam() { return actionParam; } public void setActionParam(String actionParam) { this.actionParam = actionParam; } }
[ "zoopnin@29cfa68c-37ae-8048-bc30-ccda835e92b1" ]
zoopnin@29cfa68c-37ae-8048-bc30-ccda835e92b1
a6a030a2474dbf57caefc0607762a07b2c33120c
83cf9c0e45276dcfaeb52d7e6b0cecc004f63888
/src/main/java/org/easybatch/bench/BenchmarkUtil.java
6a5b12b4e803f5b9e0ac642193b98250f2af5150
[]
no_license
GurdeepSS/easybatch-benchmarks
f6b51576cac3c71cf8834d4b462a59e4e46fc995
1756b5234ef6e3194abd768feb1d83b826cf416a
refs/heads/master
2021-01-12T21:45:45.922622
2015-03-28T23:16:13
2015-03-28T23:16:13
34,281,761
1
0
null
2015-04-20T19:32:56
2015-04-20T19:32:55
Java
UTF-8
Java
false
false
7,221
java
/* * The MIT License * * Copyright (c) 2015, Mahmoud Ben Hassine (mahmoud@benhassine.fr) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.easybatch.bench; import io.github.benas.jpopulator.api.Populator; import io.github.benas.jpopulator.api.Randomizer; import io.github.benas.jpopulator.impl.PopulatorBuilder; import io.github.benas.jpopulator.randomizers.*; import org.easybatch.core.impl.Engine; import org.easybatch.core.impl.EngineBuilder; import org.easybatch.flatfile.FlatFileRecordReader; import org.easybatch.flatfile.dsv.DelimitedRecordMapper; import org.easybatch.xml.XmlRecordMapper; import org.easybatch.xml.XmlRecordReader; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.io.StringWriter; import java.text.MessageFormat; import java.util.Date; import java.util.Random; /** * Utility class used to generate customer data and build a batch instance definition. * * @author Mahmoud Ben Hassine (mahmoud@benhassine.fr) */ public class BenchmarkUtil { public static Populator customerPopulator; public static Marshaller customerMarshaller; static { customerPopulator = buildCustomerPopulator(); customerMarshaller = buildCustomerMarshaller(); } public static Customer generateCustomer() { return customerPopulator.populateBean(Customer.class); } public static void generateCsvCustomers(String customersFile, int customersCount) throws Exception { FileWriter fileWriter = new FileWriter(customersFile); for (int i = 0; i < customersCount; i++) { Customer customer = BenchmarkUtil.generateCustomer(); fileWriter.write(BenchmarkUtil.toCsv(customer) + "\n"); fileWriter.flush(); } fileWriter.close(); } public static void generateXmlCustomers(String customersFile, int customersCount) throws Exception { FileWriter fileWriter = new FileWriter(customersFile); fileWriter.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); fileWriter.write("<customers>\n"); fileWriter.flush(); for (int i = 0; i < customersCount; i++) { Customer customer = BenchmarkUtil.generateCustomer(); fileWriter.write(BenchmarkUtil.toXml(customer) + "\n"); fileWriter.flush(); } fileWriter.write("</customers>"); fileWriter.flush(); fileWriter.close(); } public static Engine buildCsvEngine(String customersFile) throws Exception { return new EngineBuilder() .reader(new FlatFileRecordReader(new File(customersFile))) .mapper(new DelimitedRecordMapper<Customer>(Customer.class, new String[]{"id", "firstName", "lastName", "birthDate", "email", "phone", "street", "zipCode", "city", "country"})) .build(); } public static Engine buildXmlEngine(String customersFile) throws Exception { return new EngineBuilder() .reader(new XmlRecordReader("customer", new FileInputStream(customersFile))) .mapper(new XmlRecordMapper<Customer>(Customer.class)) .build(); } public static Marshaller buildCustomerMarshaller() { try { JAXBContext jaxbContext = JAXBContext.newInstance(Customer.class); Marshaller jaxbMarshaller = jaxbContext.createMarshaller(); jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); jaxbMarshaller.setProperty("com.sun.xml.bind.xmlDeclaration", Boolean.FALSE); return jaxbMarshaller; } catch (JAXBException e) { e.printStackTrace(); return null; } } public static Populator buildCustomerPopulator() { Date today = new Date(); Date nextYear = new Date();nextYear.setYear(today.getYear() + 1); return new PopulatorBuilder() .registerRandomizer(Customer.class, Integer.TYPE, "id", new Randomizer() { Random random = new Random(); @Override public Integer getRandomValue() { return Math.abs(random.nextInt(1000000)); } }) .registerRandomizer(Customer.class, String.class, "firstName", new FirstNameRandomizer()) .registerRandomizer(Customer.class, String.class, "lastName", new LastNameRandomizer()) .registerRandomizer(Customer.class, Date.class, "birthDate", new DateRangeRandomizer(today, nextYear)) .registerRandomizer(Customer.class, String.class, "email", new EmailRandomizer()) .registerRandomizer(Customer.class, String.class, "phone", new GenericStringRandomizer( new String[]{"0102030405","0607080910","0504030201","0610090807"})) .registerRandomizer(Customer.class, String.class, "street", new StreetRandomizer()) .registerRandomizer(Customer.class, String.class, "zipCode", new GenericStringRandomizer( new String[]{"54321", "12345", "98765", "56789"})) .registerRandomizer(Customer.class, String.class, "city", new CityRandomizer()) .registerRandomizer(Customer.class, String.class, "country", new CountryRandomizer()) .build(); } public static String toCsv(Customer customer) { return MessageFormat.format("{0},{1},{2},{3,date,yyyy-MM-dd},{4},{5},{6},{7},{8},{9}", String.valueOf(customer.getId()), customer.getFirstName(), customer.getLastName(), customer.getBirthDate(), customer.getEmail(), customer.getPhone(), customer.getStreet(), customer.getZipCode(), customer.getCity(), customer.getCountry()); } public static String toXml(Customer customer) throws Exception { StringWriter stringWriter = new StringWriter(); customerMarshaller.marshal(customer, stringWriter); return stringWriter.toString(); } }
[ "md.benhassine@gmail.com" ]
md.benhassine@gmail.com
7f293d63ff7dbe5ecf8c73bd804810ac3b9738de
5598faaaaa6b3d1d8502cbdaca903f9037d99600
/code_changes/Apache_projects/MAPREDUCE-5/ccde4aed18f24ae7e0cd1c2ccfe653548f5057c6/~JobACLsManager.java
27dd3fd36e5aa176f504539cdaa9b972a4b46844
[]
no_license
SPEAR-SE/LogInBugReportsEmpirical_Data
94d1178346b4624ebe90cf515702fac86f8e2672
ab9603c66899b48b0b86bdf63ae7f7a604212b29
refs/heads/master
2022-12-18T02:07:18.084659
2020-09-09T16:49:34
2020-09-09T16:49:34
286,338,252
0
2
null
null
null
null
UTF-8
Java
false
false
4,424
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.mapred; import java.util.HashMap; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.JobACL; import org.apache.hadoop.mapreduce.MRConfig; import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.authorize.AccessControlList; @InterfaceAudience.Private public class JobACLsManager { static final Log LOG = LogFactory.getLog(JobACLsManager.class); Configuration conf; private final AccessControlList adminAcl; public JobACLsManager(Configuration conf) { adminAcl = new AccessControlList(conf.get(MRConfig.MR_ADMINS, " ")); this.conf = conf; } public boolean areACLsEnabled() { return conf.getBoolean(MRConfig.MR_ACLS_ENABLED, false); } /** * Construct the jobACLs from the configuration so that they can be kept in * the memory. If authorization is disabled on the JT, nothing is constructed * and an empty map is returned. * * @return JobACL to AccessControlList map. */ public Map<JobACL, AccessControlList> constructJobACLs(Configuration conf) { Map<JobACL, AccessControlList> acls = new HashMap<JobACL, AccessControlList>(); // Don't construct anything if authorization is disabled. if (!areACLsEnabled()) { return acls; } for (JobACL aclName : JobACL.values()) { String aclConfigName = aclName.getAclName(); String aclConfigured = conf.get(aclConfigName); if (aclConfigured == null) { // If ACLs are not configured at all, we grant no access to anyone. So // jobOwner and cluster administrator _only_ can do 'stuff' aclConfigured = " "; } acls.put(aclName, new AccessControlList(aclConfigured)); } return acls; } /** * Is the calling user an admin for the mapreduce cluster * i.e. member of mapreduce.cluster.administrators * @return true, if user is an admin */ boolean isMRAdmin(UserGroupInformation callerUGI) { if (adminAcl.isUserAllowed(callerUGI)) { return true; } return false; } /** * If authorization is enabled, checks whether the user (in the callerUGI) * is authorized to perform the operation specified by 'jobOperation' on * the job by checking if the user is jobOwner or part of job ACL for the * specific job operation. * <ul> * <li>The owner of the job can do any operation on the job</li> * <li>For all other users/groups job-acls are checked</li> * </ul> * @param callerUGI * @param jobOperation * @param jobOwner * @param jobACL * @throws AccessControlException */ public boolean checkAccess(UserGroupInformation callerUGI, JobACL jobOperation, String jobOwner, AccessControlList jobACL) { if (LOG.isDebugEnabled()) { LOG.debug("checkAccess job acls, jobOwner: " + jobOwner + " jobacl: " + jobOperation.toString() + " user: " + callerUGI.getShortUserName()); } String user = callerUGI.getShortUserName(); if (!areACLsEnabled()) { return true; } // Allow Job-owner for any operation on the job if (isMRAdmin(callerUGI) || user.equals(jobOwner) || jobACL.isUserAllowed(callerUGI)) { return true; } return false; } }
[ "archen94@gmail.com" ]
archen94@gmail.com
bccadb537c8db43976e95dadab5128b6a64ce07d
fb079e82c42cea89a3faea928d4caf0df4954b05
/Физкультура/ВДНХ/VelnessBMSTU_v1.2b_apkpure.com_source_from_JADX/com/google/api/client/extensions/android/AndroidUtils.java
73cf5eb967128bc8ce0b49944dfcad6c7dc60398
[]
no_license
Belousov-EA/university
33c80c701871379b6ef9aa3da8f731ccf698d242
6ec7303ca964081c52f259051833a045f0c91a39
refs/heads/master
2022-01-21T17:46:30.732221
2022-01-10T20:27:15
2022-01-10T20:27:15
123,337,018
1
1
null
null
null
null
UTF-8
Java
false
false
644
java
package com.google.api.client.extensions.android; import android.os.Build.VERSION; import com.google.api.client.util.Beta; import com.google.api.client.util.Preconditions; @Beta public class AndroidUtils { public static boolean isMinimumSdkLevel(int minimumSdkLevel) { return VERSION.SDK_INT >= minimumSdkLevel; } public static void checkMinimumSdkLevel(int minimumSdkLevel) { Preconditions.checkArgument(isMinimumSdkLevel(minimumSdkLevel), "running on Android SDK level %s but requires minimum %s", Integer.valueOf(VERSION.SDK_INT), Integer.valueOf(minimumSdkLevel)); } private AndroidUtils() { } }
[ "Belousov.EA98@gmail.com" ]
Belousov.EA98@gmail.com
5290f1f07d9d5998b87ca36f659448ec7495f95d
07e483bda34e91a43cc517933beab1133c7cb59c
/src/com/reason/lang/core/psi/PsiInterpolation.java
57d35f6d36acbee86dba429742d4d5284d06a079
[ "MIT" ]
permissive
samdfonseca/reasonml-idea-plugin
02a95d19ab7b6f3da730423ddebbc3a900615c33
a3cb65f2b60aaeacb307b458d1838dad185458d3
refs/heads/master
2020-12-02T11:05:59.749358
2019-12-20T15:57:12
2019-12-20T15:58:00
230,992,461
0
0
MIT
2019-12-30T23:14:10
2019-12-30T23:14:09
null
UTF-8
Java
false
false
388
java
package com.reason.lang.core.psi; import com.intellij.extapi.psi.ASTWrapperPsiElement; import com.intellij.lang.ASTNode; import org.jetbrains.annotations.NotNull; public class PsiInterpolation extends ASTWrapperPsiElement { public PsiInterpolation(@NotNull ASTNode node) { super(node); } @Override public boolean canNavigate() { return false; } }
[ "giraud.contact@yahoo.fr" ]
giraud.contact@yahoo.fr
fd0e6c4f9b27df5a68188e47028912e7b9fb767f
d8316b9ab36e8f7fbb1b6e7b457d7f0386b97908
/SendOtpFirebase/app/src/main/java/fpt/edu/sendotpfirebase/VerifyPhoneNumberActivity.java
6d8905264eaa51258552cdacc3e18537556d838e
[]
no_license
huyhue/learnAndroid
97ed677b3eca14d71d163ddfd884dcc6da22471e
b0e01501f3f703d27dca8ae0732baf55b54ac958
refs/heads/main
2023-09-04T19:10:59.972031
2021-11-09T11:34:06
2021-11-09T11:34:06
418,296,842
0
0
null
null
null
null
UTF-8
Java
false
false
5,470
java
package fpt.edu.sendotpfirebase; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.FirebaseException; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseAuthInvalidCredentialsException; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.auth.PhoneAuthCredential; import com.google.firebase.auth.PhoneAuthOptions; import com.google.firebase.auth.PhoneAuthProvider; import java.util.concurrent.TimeUnit; public class VerifyPhoneNumberActivity extends AppCompatActivity { public static final String TAG = VerifyPhoneNumberActivity.class.getName(); private EditText edt; private Button btnVerify; private FirebaseAuth mAuth; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_verify_phone_number); setTitleToolbar(); initUi(); mAuth = FirebaseAuth.getInstance(); btnVerify.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { String strPhone = edt.getText().toString().trim(); onClickVerifyPhoneNumber(strPhone); } }); } private void onClickVerifyPhoneNumber(String strPhone) { PhoneAuthOptions options = PhoneAuthOptions.newBuilder(mAuth) .setPhoneNumber(strPhone) // Phone number to verify .setTimeout(60L, TimeUnit.SECONDS) // Timeout and unit .setActivity(this) // Activity (for callback binding) .setCallbacks(new PhoneAuthProvider.OnVerificationStateChangedCallbacks() { @Override public void onVerificationCompleted(@NonNull PhoneAuthCredential phoneAuthCredential) { signInWithPhoneAuthCredential(phoneAuthCredential); } @Override public void onVerificationFailed(@NonNull FirebaseException e) { Toast.makeText(VerifyPhoneNumberActivity.this, "The verification Failed", Toast.LENGTH_SHORT).show(); } @Override public void onCodeSent(@NonNull String s, @NonNull PhoneAuthProvider.ForceResendingToken forceResendingToken) { super.onCodeSent(s, forceResendingToken); goToEnterOtpActivity(strPhone, s); } }) // OnVerificationStateChangedCallbacks .build(); PhoneAuthProvider.verifyPhoneNumber(options); } private void signInWithPhoneAuthCredential(PhoneAuthCredential credential) { mAuth.signInWithCredential(credential) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()) { // Sign in success, update UI with the signed-in user's information Log.e(TAG, "signInWithCredential:success"); FirebaseUser user = task.getResult().getUser(); // Update UI goToMainActivity(user.getPhoneNumber()); } else { // Sign in failed, display a message and update the UI Log.w(TAG, "signInWithCredential:failure", task.getException()); if (task.getException() instanceof FirebaseAuthInvalidCredentialsException) { // The verification code entered was invalid Toast.makeText(VerifyPhoneNumberActivity.this, "The verification code entered was invalid", Toast.LENGTH_SHORT).show(); } } } }); } private void goToMainActivity(String phoneNumber) { Intent intent = new Intent(this, MainActivity.class); intent.putExtra("phone_number", phoneNumber); startActivity(intent); } private void goToEnterOtpActivity(String strPhone, String s) { Intent intent = new Intent(this, EnterOtpActivity.class); intent.putExtra("phone_number", strPhone); intent.putExtra("verification_id", s); startActivity(intent); } private void initUi() { edt = findViewById(R.id.edt); btnVerify = findViewById(R.id.btnVerify); } private void setTitleToolbar(){ if (getSupportActionBar() != null){ getSupportActionBar().setTitle("VerifyPhoneNumber Activity"); } } }
[ "tpgiahuy5@gmail.com" ]
tpgiahuy5@gmail.com
f4b81a4afc4936197418087d769d235f95ad66c9
e14e25c5b4c7c1ffcb4b8af588d811a1ca8791ec
/src/class0303/CostPlots.java
86736e2e286514f2b9221e8589a7f0f9a5c08a0c
[]
no_license
BurningBright/algorithms-fourth-edition
6ecd434ebc42449f5f05da1e6d6a94ef64eaab57
46ad5a29154b8094a2cd169308b9922131a74587
refs/heads/master
2021-01-24T07:13:27.408150
2021-01-08T02:42:30
2021-01-08T02:42:30
55,818,397
0
0
null
null
null
null
UTF-8
Java
false
false
2,307
java
package class0303; import java.awt.Color; import java.awt.Font; import class0104.Adjustable2DChart; import class0301.AmortizedCostPlots; import stdlib.StdDraw; /** * @Description 3.3.43 * Instrument RedBlackBST * @author Leon * @date 2017-08-10 13:06:13 */ public class CostPlots extends AmortizedCostPlots{ CostPlots() { super(); } private void redBlackPlot() { BSTRedBlackPlot<String, Object> sst = new BSTRedBlackPlot<String, Object>(); Adjustable2DChart a2d; StdDraw.setFont(new Font("consolas", Font.PLAIN, 15)); a2d = new Adjustable2DChart(0.1, 0.1, 0, 0); a2d.setAxisDescDistanceChart(-.3); a2d.setAxisDescDistanceY(.12); a2d.setRadius(.0005); a2d.setChartDesc("sequential plot avg-12"); a2d.setAxisXDesc("operations"); a2d.setAxisYDesc("compares"); a2d.setColorForChar(Color.RED); a2d.setColorForData(Color.GRAY); Object obj = new Object(); for (int i=0; i<txt.length; i++) { int cpTime = sst.put4Cmp(txt[i], obj); calcAvg[i] = cpTime; a2d.addChartData(false, false, i, cpTime); if(i>0 && i%100 == 0) { int sum = 0; for (int j=i-100; j<i; j++) { sum += calcAvg[j]; } a2d.addChartData(false, false, i, sum/100, Color.RED); } if(i == txt.length - 1) { int sum = 0; for (int j=i-100; j<i; j++) { sum += calcAvg[j]; } a2d.addChartData(false, false, i, sum/100, Color.RED); a2d.addAxisDataY(sum/100.0, sum/100+""); } /* if(!sst.contains(txt[j])) { int cpTime = sst.put(txt[j]); a2d.addChartData(false, false, j, cpTime); } */ } a2d.addAxisDataX((double)txt.length, txt.length+""); a2d.addAxisDataY((double)calcAvg[txt.length-1], calcAvg[txt.length-1]+""); a2d.reDraw(); } public static void main(String[] args) { new CostPlots().redBlackPlot(); } }
[ "lcg51271@gmail.com" ]
lcg51271@gmail.com
513651d69acb06d1c9588e1f542f2aa1402270ae
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.alpenglow-EnterpriseServer/sources/com/oculus/alpenglow/http/Constants.java
01e8aff070f1183cdb786a34852c524f148f4673
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
550
java
package com.oculus.alpenglow.http; public class Constants { public static final String GRAPHQL_DOC_KEY = "doc"; public static final String GRAPHQL_ENDPOINT = "/graphql"; public static final String GRAPHQL_MUTATION_ROOT_NAME = "Mutation"; public static final String GRAPHQL_QUERY_ROOT_NAME = "Query"; public static final String GRAPHQL_RESPONSE_DATA_KEY = "data"; public static final String GRAPHQL_VARIABLES_KEY = "variables"; public static final String HARDWARE_GRAPH_ENDPOINT = "https://graph.facebook-hardware.com"; }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
4f2b32f7669048fac6f1a21ff60b7c91cb128be7
7b1d2847f338a0ce718e873597cb2d7b6308e78e
/src/hesp/gui/JobRequestTask.java
8439b5b54d2790bf14facd443f94fb204d2df1a1
[]
no_license
marcinlos/Hespherides
0b463c824f7a652f6102beaaaad669946ab8b8db
272395202a23cc40bbf8b152347b0bf42117ac3f
refs/heads/master
2021-01-01T16:30:26.967314
2013-01-19T17:44:49
2013-01-19T17:44:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,184
java
package hesp.gui; import hesp.protocol.Job; import hesp.protocol.JobParameters; import hesp.traffic.JobGenerator; import hesp.traffic.TimeDistribution; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Timer; /** * Class responsible for generating job requests. This process is described * by job parameter generator and time distribution. * * @author marcinlos */ public class JobRequestTask { /** * Constant to be used as number of repeats in {@link #JobRequestTask(int, * JobGenerator, TimeDistribution, JobRequestListener)} to denote lack * of upper limit of number of repeats. */ public static final int INDEFINITELY = -1; private int repeats = INDEFINITELY; private JobGenerator jobGen; private TimeDistribution time; private Timer timer; private JobRequestListener listener; public JobRequestTask(int repeats, JobGenerator jobs, TimeDistribution time, JobRequestListener listener) { this.repeats = repeats; this.jobGen = jobs; this.time = time; this.listener = listener; double delay = time.nextDelay(); this.timer = new Timer((int) (1000 * delay), action); } /** * Begins generating requests. */ public void start() { timer.start(); } /** * Ends generating requests. */ public void stop() { timer.stop(); } private ActionListener action = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { JobParameters params = jobGen.nextJob(); long id = Job.generateId(this, 0); Job job = new Job(id, params); listener.requestIssued(job); if (repeats != INDEFINITELY) { -- repeats; if (repeats <= 0) { timer.stop(); } } // sec -> milisec int delay = (int) (1000 * time.nextDelay()); timer.setDelay(delay); } }; }
[ "losiu99@gazeta.pl" ]
losiu99@gazeta.pl
85b3b7628b6567899bb69a670ce6794cc36bbe34
a8c47a4f7ea6503c093efce41f755cfe42b1cc27
/HammerMod-DZ/com/jtrent238/hammermod/items/hammers/ItemVyroxeresHammer.java
7e616f4cdb81983727c2e65a56342e078eed25c6
[]
no_license
hidalgoarlene60/HammerMod-DangerZone
1e9cc43772397829adb9a95d8dae6b8db7d19dc7
c8a1cefa975547e2b575c1d12163c7c55532a2dd
refs/heads/master
2020-03-30T00:00:36.381768
2018-09-06T14:21:25
2018-09-06T14:21:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
571
java
package com.jtrent238.hammermod.items.hammers; import dangerzone.gui.InventoryMenus; import dangerzone.items.Item; public class ItemVyroxeresHammer extends Item { public ItemVyroxeresHammer(String n, String txt) { //TODO: Fill in INFO!!! super(n, txt); maxstack = 1; attackstrength = 2; stonestrength = Math.round(attackstrength / 2); maxuses = Math.round((attackstrength * stonestrength) * 2); burntime = 15; hold_straight = true; flopped = false; menu = InventoryMenus.HARDWARE; this.showInInventory = true; } }
[ "jtrent238@outlook.com" ]
jtrent238@outlook.com
544740acf258fe1475e550007ad04bb00454b255
fe49bebdae362679d8ea913d97e7a031e5849a97
/bqerpweb/src/power/web/manage/stat/action/BpStatReportItemAction.java
e777c4e12d4ba17de642a9dbd3d37a4015263585
[]
no_license
loveyeah/BQMIS
1f87fad2c032e2ace7e452f13e6fe03d8d09ce0d
a3f44db24be0fcaa3cf560f9d985a6ed2df0b46b
refs/heads/master
2020-04-11T05:21:26.632644
2018-03-08T02:13:18
2018-03-08T02:13:18
124,322,652
0
2
null
null
null
null
UTF-8
Java
false
false
3,961
java
package power.web.manage.stat.action; import java.util.ArrayList; import java.util.List; import java.util.Map; import com.googlecode.jsonplugin.JSONException; import com.googlecode.jsonplugin.JSONUtil; import power.ear.comm.ejb.PageObject; import power.ejb.manage.stat.BpCStatReportItem; import power.ejb.manage.stat.BpCStatReportItemFacadeRemote; import power.ejb.manage.stat.BpCStatReportItemId; import power.web.comm.AbstractAction; @SuppressWarnings("serial") public class BpStatReportItemAction extends AbstractAction{ protected BpCStatReportItemFacadeRemote remote; private int start; private int limit; private long code; public BpStatReportItemAction() { remote = (BpCStatReportItemFacadeRemote)factory.getFacadeRemote("BpCStatReportItemFacade"); } /** * 保存操作 */ @SuppressWarnings("unchecked") public void saveStatReportItem() { try { String str = request.getParameter("isUpdate"); String deleteIds = request.getParameter("isDelete"); String code = request.getParameter("isCode"); Object obj = JSONUtil.deserialize(str); List<BpCStatReportItem> addList = new ArrayList<BpCStatReportItem>(); List<BpCStatReportItem> updateList = new ArrayList<BpCStatReportItem>(); List<Map> list = (List<Map>) obj; for (Map data : list) { String itemCode = null; String reportCode = null; String displayNo = null; if (data.get("model.id.reportCode") != null&& !data.get("model.id.reportCode").equals("")) { reportCode = data.get("model.id.reportCode").toString(); } if (data.get("model.id.itemCode") != null&&!data.get("model.id.itemCode").equals("")) { itemCode = data.get("model.id.itemCode").toString(); } if (data.get("model.displayNo") != null&&!data.get("model.displayNo").equals("")) { displayNo = data.get("model.displayNo").toString(); } BpCStatReportItem model = new BpCStatReportItem(); BpCStatReportItemId id = new BpCStatReportItemId(); // 增加 if (remote.isNew(reportCode, itemCode) == 0) { id.setReportCode(Long.parseLong(reportCode)); id.setItemCode(itemCode); model.setId(id); if(displayNo != null && !displayNo.equals("")){ model.setDisplayNo(Long.parseLong(displayNo)); } model.setEnterpriseCode(employee.getEnterpriseCode()); addList.add(model); } else { id.setReportCode(Long.parseLong(reportCode)); id.setItemCode(itemCode); model = remote.findById(id); if(displayNo != null && !displayNo.equals("")) { model.setDisplayNo(Long.parseLong(displayNo)); } updateList.add(model); } } if (addList.size() > 0||updateList.size() > 0||(deleteIds != null && !deleteIds.trim().equals(""))) remote.save(addList,updateList,deleteIds,Long.parseLong(code)); // if (updateList.size() > 0) // remote.update(updateList); // if (deleteIds != null && !deleteIds.trim().equals("")) // remote.deleteMuti(deleteIds,Long.parseLong(code)); write("{success: true,msg:'保存成功!'}"); } catch (Exception exc) { exc.printStackTrace(); write("{success: false,msg:'保存失败!'}"); } } /** * 根据统计报表编码查找记录 * @throws JSONException */ public void findStatReportItemList() throws JSONException { String reportCode = request.getParameter("reportCode"); PageObject obj = remote.findAll(employee.getEnterpriseCode(), reportCode, start,limit); String str = JSONUtil.serialize(obj); write(str); } public int getStart() { return start; } public void setStart(int start) { this.start = start; } public int getLimit() { return limit; } public void setLimit(int limit) { this.limit = limit; } public long getCode() { return code; } public void setCode(long code) { this.code = code; } }
[ "yexinhua@rtdata.cn" ]
yexinhua@rtdata.cn
a1db44b39089d3edfa8ceabc9abb52ee6f9053f3
e9d1b2db15b3ae752d61ea120185093d57381f73
/mytcuml-src/src/java/components/uml_model_-_core_dependencies/trunk/src/java/tests/com/topcoder/uml/model/core/dependencies/failuretests/FailureTests.java
2928ce92fa387e5f933c3a6b969f7bd6f005f728
[]
no_license
kinfkong/mytcuml
9c65804d511ad997e0c4ba3004e7b831bf590757
0786c55945510e0004ff886ff01f7d714d7853ab
refs/heads/master
2020-06-04T21:34:05.260363
2014-10-21T02:31:16
2014-10-21T02:31:16
25,495,964
1
0
null
null
null
null
UTF-8
Java
false
false
724
java
/* * Copyright (C) 2006 TopCoder Inc., All Rights Reserved. */ package com.topcoder.uml.model.core.dependencies.failuretests; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * <p>This test case aggregates all Failure test cases.</p> * * @author iamajia * @version 1.0 */ public class FailureTests extends TestCase { /** * Aggregates all tests in this class. * * @return Test suite aggregating all tests. */ public static Test suite() { final TestSuite suite = new TestSuite(); suite.addTestSuite(BindingImplFailureTest.class); suite.addTestSuite(DependencyImplFailureTest.class); return suite; } }
[ "kinfkong@126.com" ]
kinfkong@126.com
48dae2bb74a344676eb90abc54598047dd828c47
e977c424543422f49a25695665eb85bfc0700784
/benchmark/icse15/1231248/buggy-version/lucene/dev/branches/lucene3453/lucene/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java
5ee7961a7cf6144abe2394b29ee363e64a247051
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,860
java
package org.apache.lucene.document; /** * 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. */ import java.io.IOException; import java.util.Set; import java.util.HashSet; import org.apache.lucene.index.FieldInfo; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.StoredFieldVisitor; /** A {@link StoredFieldVisitor} that creates a {@link * Document} containing all stored fields, or only specific * requested fields provided to {@link #DocumentStoredFieldVisitor(Set)} * This is used by {@link IndexReader#document(int)} to load a * document. * * @lucene.experimental */ public class DocumentStoredFieldVisitor extends StoredFieldVisitor { private final Document doc = new Document(); private final Set<String> fieldsToAdd; /** Load only fields named in the provided <code>Set&lt;String&gt;</code>. */ public DocumentStoredFieldVisitor(Set<String> fieldsToAdd) { this.fieldsToAdd = fieldsToAdd; } /** Load only fields named in the provided <code>Set&lt;String&gt;</code>. */ public DocumentStoredFieldVisitor(String... fields) { fieldsToAdd = new HashSet<String>(fields.length); for(String field : fields) { fieldsToAdd.add(field); } } /** Load all stored fields. */ public DocumentStoredFieldVisitor() { this.fieldsToAdd = null; } @Override public void binaryField(FieldInfo fieldInfo, byte[] value, int offset, int length) throws IOException { doc.add(new BinaryField(fieldInfo.name, value)); } @Override public void stringField(FieldInfo fieldInfo, String value) throws IOException { final FieldType ft = new FieldType(TextField.TYPE_STORED); ft.setStoreTermVectors(fieldInfo.storeTermVector); ft.setStoreTermVectors(fieldInfo.storeTermVector); ft.setIndexed(fieldInfo.isIndexed); ft.setOmitNorms(fieldInfo.omitNorms); ft.setIndexOptions(fieldInfo.indexOptions); doc.add(new Field(fieldInfo.name, value, ft)); } @Override public void intField(FieldInfo fieldInfo, int value) { FieldType ft = NumericField.getFieldType(NumericField.DataType.INT, true); doc.add(new NumericField(fieldInfo.name, Integer.valueOf(value), ft)); } @Override public void longField(FieldInfo fieldInfo, long value) { FieldType ft = NumericField.getFieldType(NumericField.DataType.LONG, true); doc.add(new NumericField(fieldInfo.name, Long.valueOf(value), ft)); } @Override public void floatField(FieldInfo fieldInfo, float value) { FieldType ft = NumericField.getFieldType(NumericField.DataType.FLOAT, true); doc.add(new NumericField(fieldInfo.name, Float.valueOf(value), ft)); } @Override public void doubleField(FieldInfo fieldInfo, double value) { FieldType ft = NumericField.getFieldType(NumericField.DataType.DOUBLE, true); doc.add(new NumericField(fieldInfo.name, Double.valueOf(value), ft)); } @Override public Status needsField(FieldInfo fieldInfo) throws IOException { return fieldsToAdd == null || fieldsToAdd.contains(fieldInfo.name) ? Status.YES : Status.NO; } public Document getDocument() { return doc; } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
b8270a16dee972124733ad1a3210c735ade7d965
a140fe1560acdea8e00551e6a3b4956560ff44b1
/script/androidextra/HttpClientAndroidLog.java
db379edc35885ae72c55cf37bea1f2fd5224fa0e
[ "Apache-2.0" ]
permissive
zodsoft/httpclientandroidlib
cfd27a7a9d1a221c050a6f480b006ccee2e427b7
4ada7825758d15b33a41d6688cbd6351842d2b07
refs/heads/master
2020-12-25T23:37:35.275226
2014-10-30T21:01:10
2014-10-30T21:01:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,204
java
package sedpackagename.androidextra; import android.util.Log; public class HttpClientAndroidLog { private String logTag; private boolean debugEnabled; private boolean errorEnabled; private boolean traceEnabled; private boolean warnEnabled; private boolean infoEnabled; public HttpClientAndroidLog(Object tag) { logTag=tag.toString(); debugEnabled=false; errorEnabled=false; traceEnabled=false; warnEnabled=false; infoEnabled=false; } public void enableDebug(boolean enable) { debugEnabled=enable; } public boolean isDebugEnabled() { return debugEnabled; } public void debug(Object message) { if(isDebugEnabled()) Log.d(logTag, message.toString()); } public void debug(Object message, Throwable t) { if(isDebugEnabled()) Log.d(logTag, message.toString(), t); } public void enableError(boolean enable) { errorEnabled=enable; } public boolean isErrorEnabled() { return errorEnabled; } public void error(Object message) { if(isErrorEnabled()) Log.e(logTag, message.toString()); } public void error(Object message, Throwable t) { if(isErrorEnabled()) Log.e(logTag, message.toString(), t); } public void enableWarn(boolean enable) { warnEnabled=enable; } public boolean isWarnEnabled() { return warnEnabled; } public void warn(Object message) { if(isWarnEnabled()) Log.w(logTag, message.toString()); } public void warn(Object message, Throwable t) { if(isWarnEnabled()) Log.w(logTag, message.toString(), t); } public void enableInfo(boolean enable) { infoEnabled=enable; } public boolean isInfoEnabled() { return infoEnabled; } public void info(Object message) { if(isInfoEnabled()) Log.i(logTag, message.toString()); } public void info(Object message, Throwable t) { if(isInfoEnabled()) Log.i(logTag, message.toString(), t); } public void enableTrace(boolean enable) { traceEnabled=enable; } public boolean isTraceEnabled() { return traceEnabled; } public void trace(Object message) { if(isTraceEnabled()) Log.i(logTag, message.toString()); } public void trace(Object message, Throwable t) { if(isTraceEnabled()) Log.i(logTag, message.toString(), t); } }
[ "drummer.aidan@gmail.com" ]
drummer.aidan@gmail.com
6a91f3d1b383a0d3fccc8a738e3ea8dd173b651e
d0c2357f5aba245ba00836995d1e5c28b2b682d0
/algos/HashTable2d.java
ba2853ca3253279e98342b409a32bd704790584d
[]
no_license
Instructor-Devon/Java-February-2020
a66f8f2f0e98fe182a90ae9061d63acff018dfe8
d793275a9ac349901c440cb6efb2dbf37e028c00
refs/heads/master
2020-12-27T20:57:32.009909
2020-02-27T23:30:07
2020-02-27T23:30:07
238,050,105
1
0
null
null
null
null
UTF-8
Java
false
false
1,088
java
public class HashTable2d { // things hash table has! int capacity; String[][] table; public HashTable2d(int capacity) { this.capacity = capacity; this.table = new String[capacity][]; } private int getIndex(String key) { int code = Math.abs(key.hashCode()); return code%this.capacity; } // getter // ht.get("firstName") => "Lee" public String get(String key) { // convert hashCode into index for our table int i = getIndex(key); // return value in table at index if(this.table[i] == null) { return "No Key here!"; } return this.table[i][1]; } // setter public void set(String key, String value) { String[] kvp = {key, value}; int i = getIndex(key); this.table[i] = kvp; } @Override public String toString() { String output = "{"; for(String[] kvp:this.table) { if(kvp!=null) { output += kvp[0] + ": " + kvp[1] + ", "; } } output += "}"; return output; } // { "Lee", "Douglas" } }
[ "=" ]
=
cbeaefdc7876ee6c4fc0832f778724b9d9916557
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/plugin/qqmail/p486b/C46150w.java
95300c41b8531f7273a56be9eac8f401eaf266a8
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,449
java
package com.tencent.p177mm.plugin.qqmail.p486b; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.p177mm.p205bt.C1331a; import p690e.p691a.p692a.C6092b; import p690e.p691a.p692a.p693a.C6086a; import p690e.p691a.p692a.p695b.p697b.C6091a; import p690e.p691a.p692a.p698c.C6093a; /* renamed from: com.tencent.mm.plugin.qqmail.b.w */ public final class C46150w extends C1331a { public String ptN; /* renamed from: op */ public final int mo4669op(int i, Object... objArr) { AppMethodBeat.m2504i(68024); C6092b c6092b; int f; if (i == 0) { C6093a c6093a = (C6093a) objArr[0]; if (this.ptN == null) { c6092b = new C6092b("Not all required fields were included: subject"); AppMethodBeat.m2505o(68024); throw c6092b; } if (this.ptN != null) { c6093a.mo13475e(1, this.ptN); } AppMethodBeat.m2505o(68024); return 0; } else if (i == 1) { if (this.ptN != null) { f = C6091a.m9575f(1, this.ptN) + 0; } else { f = 0; } AppMethodBeat.m2505o(68024); return f; } else if (i == 2) { C6086a c6086a = new C6086a((byte[]) objArr[0], unknownTagHandler); for (f = C1331a.getNextFieldNumber(c6086a); f > 0; f = C1331a.getNextFieldNumber(c6086a)) { if (!super.populateBuilderWithField(c6086a, this, f)) { c6086a.ems(); } } if (this.ptN == null) { c6092b = new C6092b("Not all required fields were included: subject"); AppMethodBeat.m2505o(68024); throw c6092b; } AppMethodBeat.m2505o(68024); return 0; } else if (i == 3) { C6086a c6086a2 = (C6086a) objArr[0]; C46150w c46150w = (C46150w) objArr[1]; switch (((Integer) objArr[2]).intValue()) { case 1: c46150w.ptN = c6086a2.BTU.readString(); AppMethodBeat.m2505o(68024); return 0; default: AppMethodBeat.m2505o(68024); return -1; } } else { AppMethodBeat.m2505o(68024); return -1; } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
78d8a0625b328190c773fffb359b1ccb94248879
ef736637e7e98dcf4b0d19b8990dd42fdcc15c18
/app/src/main/java/in/enzen/taskforum/services/MessageService.java
1ea5a6e7a561d8fb9037e1c04f53f90c22d9ea7f
[]
no_license
ranjansingh1991/TaskForum
7ccf076574d84d2aa929a4443331093ea686abf6
3e04461c42b7541463b91130dea4a921343683ca
refs/heads/master
2020-04-28T00:47:31.223990
2019-03-10T13:44:59
2019-03-10T13:44:59
174,829,097
0
0
null
null
null
null
UTF-8
Java
false
false
7,073
java
package in.enzen.taskforum.services; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.graphics.BitmapFactory; import android.graphics.Color; import android.os.Binder; import android.os.CountDownTimer; import android.os.IBinder; import android.support.annotation.Nullable; import android.support.v4.app.NotificationCompat; import android.util.Log; import com.android.volley.AuthFailureError; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.HashMap; import java.util.Map; import in.enzen.taskforum.R; import in.enzen.taskforum.activities.NotificationActivity; import in.enzen.taskforum.utils.PreferencesManager; import static in.enzen.taskforum.rest.BaseUrl.sNotification; /** * Created by Rupesh on 4/28/2018. */ @SuppressWarnings("ALL") public class MessageService extends Service { private static final String TAG = "MessageService"; private final IBinder mBinder = new MessageServiceBinder(); private NotificationManager notifyMgr; private NotificationCompat.Builder nBuilder; private NotificationCompat.InboxStyle inboxStyle; public class MessageServiceBinder extends Binder { public MessageService getService() { return MessageService.this; } } @Nullable @Override public IBinder onBind(Intent intent) { return mBinder; } @Override public boolean onUnbind(Intent intent) { return super.onUnbind(intent); } @Override public void onCreate() { super.onCreate(); checkNewMessage(); new CountDownTimer(59000, 1000) { @Override public void onTick(long millisUntilFinished) { } @Override public void onFinish() { checkNewMessage(); start(); } }.start(); } @Override public void onDestroy() { super.onDestroy(); startService(new Intent(getApplicationContext(), MessageService.class)); } @Override public int onStartCommand(Intent intent, int flags, int startId) { Log.i(TAG, "onStartCommand Called"); return START_STICKY; //START_REDELIVER_INTENT; } private void checkNewMessage() { final StringRequest stringRequest = new StringRequest(Request.Method.POST, sNotification, new Response.Listener<String>() { @Override public void onResponse(String sResult) { if (sResult != null) { // mProgressDialog.dismiss(); PreferencesManager mPreferencesManager = new PreferencesManager(getApplicationContext()); try { JSONObject jsonObject = new JSONObject(sResult); if (jsonObject.getBoolean("status")) { JSONArray jsonArray = jsonObject.getJSONArray("records"); //} if (jsonArray.length() > 0) { String data = ""; for (int i = 0; i < jsonArray.length(); i++) { if (data.length() < 1) { data = jsonArray.getJSONObject(i).getString("title") + jsonArray.getJSONObject(i).getString("date") + jsonArray.getJSONObject(i).getString("description"); } else { data = data + "\n" + jsonArray.getJSONObject(i).getString("title") + jsonArray.getJSONObject(i).getString("date") + jsonArray.getJSONObject(i).getString("description"); } } notifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); Intent attractionIntent = new Intent(MessageService.this, NotificationActivity.class); PendingIntent resultPendingIntent = PendingIntent.getActivity(getApplicationContext(), 1, attractionIntent, PendingIntent.FLAG_UPDATE_CURRENT); nBuilder = (NotificationCompat.Builder) new NotificationCompat.Builder(MessageService. this).setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.enzen_launcher)) .setSmallIcon(R.drawable.enzen_logo) .setDefaults(Notification.DEFAULT_ALL) .setVibrate(new long[]{1000}) .setLights(Color.RED, 3000, 3000) .setContentTitle(getString(R.string.app_name) + " - " + getString(R.string.notify_msg_text)) .setContentText(data) .setOnlyAlertOnce(true) .setPriority(Notification.PRIORITY_MAX); // Allows notification to be cancelled when user clicks it nBuilder.setAutoCancel(true); nBuilder.setStyle(inboxStyle); nBuilder.setContentIntent(resultPendingIntent); notifyMgr.notify(1, nBuilder.build()); } } } catch (JSONException e) { e.printStackTrace(); } } else { } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError volleyError) { //Dismiss the progress dialog //mProgressDialog.dismiss(); Log.e("status Response", String.valueOf(volleyError)); } }) { @Override protected Map<String, String> getParams() throws AuthFailureError { //Creating parameters Map<String, String> params = new HashMap<>(); params.put("token", new PreferencesManager(getApplicationContext()).getString("token")); return params; } }; RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext()); requestQueue.add(stringRequest); } }
[ "ranjansingh1991" ]
ranjansingh1991
269cce07c2e1011e8d75f74041ed77db2db6fa79
288151cf821acf7fe9430c2b6aeb19e074a791d4
/mfoyou-agent-server/mfoyou-agent-web/src/main/java/com/mfoyou/agent/web/utils/fastdfs/FastDfsUtil.java
963ebc43788facbdaf96769a0d7dd0230810d130
[]
no_license
jiningeast/distribution
60022e45d3a401252a9c970de14a599a548a1a99
c35bfc5923eaecf2256ce142955ecedcb3c64ae5
refs/heads/master
2020-06-24T11:27:51.899760
2019-06-06T12:52:59
2019-06-06T12:52:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,365
java
package com.mfoyou.agent.web.utils.fastdfs; import java.net.SocketTimeoutException; import java.util.UUID; import org.mfoyou.agent.common.fastDfs.common.NameValuePair; import org.mfoyou.agent.common.fastDfs.fastdfs.StorageClient1; import org.mfoyou.agent.common.fastDfs.fastdfs.StorageServer; import org.mfoyou.agent.common.fastDfs.fastdfs.TrackerServer; import org.mfoyou.agent.utils.common.Logger; import org.springframework.stereotype.Service; @Service public class FastDfsUtil { private static final Logger LOGGER = Logger.getLogger(FastDfsUtil.class); /** 连接池 */ private ConnectionPool connectionPool = null; /** 连接池默认最小连接数 */ private long minPoolSize = 10; /** 连接池默认最大连接数 */ private long maxPoolSize = 30; /** 当前创建的连接数 */ private volatile long nowPoolSize = 0; /** 默认等待时间(单位:秒) */ private long waitTimes = 1000; public FastDfsUtil(){ init(); } /** * 初始化线程池 * * @Description: * */ private void init() { String logId = UUID.randomUUID().toString(); LOGGER.info("[初始化线程池(Init)][" + logId + "][默认参数:minPoolSize=" + minPoolSize + ",maxPoolSize=" + maxPoolSize + ",waitTimes=" + waitTimes + "]"); connectionPool = new ConnectionPool(minPoolSize, maxPoolSize, waitTimes); } /** * * @Description: TODO(这里用一句话描述这个方法的作用) * @param groupName * 组名如group0 * @param fileBytes * 文件字节数组 * @param extName * 文件扩展名:如png * @param linkUrl * 访问地址:http://image.xxx.com * @return 图片上传成功后地址 * @throws AppException * */ public String upload(String groupName, byte[] fileBytes, String extName, String linkUrl) throws AppException { String logId = UUID.randomUUID().toString(); /** 封装文件信息参数 */ NameValuePair[] metaList = new NameValuePair[] { new NameValuePair( "fileName", "") }; TrackerServer trackerServer = null; try { /** 获取fastdfs服务器连接 */ trackerServer = connectionPool.checkout(logId); StorageServer storageServer = null; StorageClient1 client1 = new StorageClient1(trackerServer, storageServer); /** 以文件字节的方式上传 */ String[] results = client1.upload_file(groupName, fileBytes, extName, metaList); /** 上传完毕及时释放连接 */ connectionPool.checkin(trackerServer, logId); LOGGER.info("[上传文件(upload)-fastdfs服务器相应结果][" + logId + "][result:results=" + results + "]"); //ResultDto result = null; /** results[0]:组名,results[1]:远程文件名 */ if (results != null && results.length == 2) { return linkUrl + "/" + results[0] + "/" + results[1]; } else { /** 文件系统上传返回结果错误 */ throw ERRORS.UPLOAD_RESULT_ERROR.ERROR(); } } catch (AppException e) { LOGGER.error("[上传文件(upload)][" + logId + "][异常:" + e + "]"); throw e; } catch (SocketTimeoutException e) { LOGGER.error("[上传文件(upload)][" + logId + "][异常:" + e + "]"); throw ERRORS.WAIT_IDLECONNECTION_TIMEOUT.ERROR(); } catch (Exception e) { LOGGER.error("[上传文件(upload)][" + logId + "][异常:" + e + "]"); connectionPool.drop(trackerServer, logId); throw ERRORS.SYS_ERROR.ERROR(); } } /** * * @Description: 删除fastdfs服务器中文件 * @param group_name * 组名 * @param remote_filename * 远程文件名称 * @throws AppException * */ public void deleteFile(String group_name, String remote_filename) throws AppException { String logId = UUID.randomUUID().toString(); LOGGER.info("[ 删除文件(deleteFile)][" + logId + "][parms:group_name=" + group_name + ",remote_filename=" + remote_filename + "]"); TrackerServer trackerServer = null; try { /** 获取可用的tracker,并创建存储server */ trackerServer = connectionPool.checkout(logId); StorageServer storageServer = null; StorageClient1 client1 = new StorageClient1(trackerServer, storageServer); /** 删除文件,并释放 trackerServer */ int result = client1.delete_file(group_name, remote_filename); /** 上传完毕及时释放连接 */ connectionPool.checkin(trackerServer, logId); LOGGER.info("[ 删除文件(deleteFile)--调用fastdfs客户端返回结果][" + logId + "][results:result=" + result + "]"); /** 0:文件删除成功,2:文件不存在 ,其它:文件删除出错 */ if (result == 2) { throw ERRORS.NOT_EXIST_FILE.ERROR(); } else if (result != 0) { throw ERRORS.DELETE_RESULT_ERROR.ERROR(); } } catch (AppException e) { LOGGER.error("[ 删除文件(deleteFile)][" + logId + "][异常:" + e + "]"); throw e; } catch (SocketTimeoutException e) { LOGGER.error("[ 删除文件(deleteFile)][" + logId + "][异常:" + e + "]"); throw ERRORS.WAIT_IDLECONNECTION_TIMEOUT.ERROR(); } catch (Exception e) { LOGGER.error("[ 删除文件(deleteFile)][" + logId + "][异常:" + e + "]"); connectionPool.drop(trackerServer, logId); throw ERRORS.SYS_ERROR.ERROR(); } } public ConnectionPool getConnectionPool() { return connectionPool; } public void setConnectionPool(ConnectionPool connectionPool) { this.connectionPool = connectionPool; } public long getMinPoolSize() { return minPoolSize; } public void setMinPoolSize(long minPoolSize) { this.minPoolSize = minPoolSize; } public long getMaxPoolSize() { return maxPoolSize; } public void setMaxPoolSize(long maxPoolSize) { this.maxPoolSize = maxPoolSize; } public long getNowPoolSize() { return nowPoolSize; } public void setNowPoolSize(long nowPoolSize) { this.nowPoolSize = nowPoolSize; } public long getWaitTimes() { return waitTimes; } public void setWaitTimes(long waitTimes) { this.waitTimes = waitTimes; } }
[ "15732677882@163.com" ]
15732677882@163.com
f5272338417060e47f68d3494805b05a975213d3
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/56/org/apache/commons/math/stat/inference/ChiSquareTest_chiSquare_54.java
5836ea46f10e6bba236cf25fcd018f622c0e2030
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,132
java
org apach common math stat infer chi squar test handl distribut distribut unknown provid sampl link unknown distribut chi squar test unknowndistributionchisquaretest unknown distribut chi squar test unknowndistributionchisquaretest extend version revis date chi squar test chisquaretest comput href http www itl nist gov div898 handbook eda section3 eda35f htm chi squar statist compar code observ code code expect code frequenc count statist perform chi squar test evalu hypothesi observ count follow expect distribut strong precondit strong expect count posit observ count observ expect arrai length common length precondit met code illeg argument except illegalargumentexcept code thrown param observ arrai observ frequenc count param expect arrai expect frequenc count chi squar chisquar statist illeg argument except illegalargumentexcept precondit met chi squar chisquar expect observ illeg argument except illegalargumentexcept
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
740f28f05c3e7a40d55318a8243b9be9b6965081
f96269d67df0ce4cfdeecb70675b171a4b2971f4
/src/test/java/org/ojalgo/optimisation/integer/KnapsackItem.java
39711e9d186faa3c368ab02cc4f6b87257a35603
[ "MIT" ]
permissive
optimatika/ojAlgo
74e0c1577f2ed9eb880becaf4c3ebc7c9c4ede5e
9fa88beb01598cc7930c37d6f0c8c8aab77ab686
refs/heads/develop
2023-08-31T06:44:40.310788
2023-08-26T17:29:00
2023-08-26T17:29:00
13,365,821
458
372
MIT
2023-08-03T20:30:39
2013-10-06T17:20:10
Java
UTF-8
Java
false
false
1,427
java
/* * Copyright 1997-2023 Optimatika * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.ojalgo.optimisation.integer; import java.math.BigDecimal; class KnapsackItem { final BigDecimal value; final BigDecimal weight; public KnapsackItem(final int value, final int weight) { this.value = new BigDecimal(value); this.weight = new BigDecimal(weight); } }
[ "apete@optimatika.se" ]
apete@optimatika.se
b7d716d042022f380727eb8b797f3b27936f0842
c19cb77e3958a194046d6f84ca97547cc3a223c3
/pkix/src/main/java/org/bouncycastle/tsp/ers/ERSEvidenceRecordStore.java
a1dbcf8d7ba210bd7d24213e8f807073d684bc60
[ "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
5,554
java
package org.bouncycastle.tsp.ers; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.bouncycastle.asn1.tsp.ArchiveTimeStamp; import org.bouncycastle.asn1.tsp.PartialHashtree; import org.bouncycastle.operator.DigestCalculator; import org.bouncycastle.operator.DigestCalculatorProvider; import org.bouncycastle.operator.OperatorCreationException; import org.bouncycastle.util.Arrays; import org.bouncycastle.util.Selector; import org.bouncycastle.util.Store; import org.bouncycastle.util.StoreException; public class ERSEvidenceRecordStore implements Store<ERSEvidenceRecord> { private Map<HashNode, List<ERSEvidenceRecord>> recordMap = new HashMap<HashNode, List<ERSEvidenceRecord>>(); private DigestCalculator digCalc = null; public ERSEvidenceRecordStore(Collection<ERSEvidenceRecord> records) throws OperatorCreationException { for (Iterator it = records.iterator(); it.hasNext(); ) { ERSEvidenceRecord record = (ERSEvidenceRecord)it.next(); ArchiveTimeStamp archiveTimeStamp = record.getArchiveTimeStamps()[0]; if (digCalc == null) { DigestCalculatorProvider digProv = record.getDigestAlgorithmProvider(); digCalc = digProv.get(archiveTimeStamp.getDigestAlgorithmIdentifier()); } PartialHashtree dataLeaf = archiveTimeStamp.getHashTreeLeaf(); if (dataLeaf != null) { byte[][] dataHashes = dataLeaf.getValues(); if (dataHashes.length > 1) { // a data group for (int i = 0; i != dataHashes.length; i++) { addRecord(new HashNode(dataHashes[i]), record); } addRecord(new HashNode(ERSUtil.computeNodeHash(digCalc, dataLeaf)), record); } else { addRecord(new HashNode(dataHashes[0]), record); } } else { // only one object - use timestamp imprint addRecord(new HashNode(archiveTimeStamp.getTimeStampDigestValue()), record); } } } private void addRecord(HashNode hashNode, ERSEvidenceRecord record) { List<ERSEvidenceRecord> recs = (List<ERSEvidenceRecord>)recordMap.get(hashNode); if (recs != null) { List<ERSEvidenceRecord> newRecs = new ArrayList<ERSEvidenceRecord>(recs.size() + 1); newRecs.addAll(recs); newRecs.add(record); recordMap.put(hashNode, newRecs); } else { recordMap.put(hashNode, Collections.singletonList(record)); } } public Collection<ERSEvidenceRecord> getMatches(Selector<ERSEvidenceRecord> selector) throws StoreException { if (selector instanceof ERSEvidenceRecordSelector) { HashNode node = new HashNode(((ERSEvidenceRecordSelector)selector).getData().getHash(digCalc, null)); List<ERSEvidenceRecord> records = (List<ERSEvidenceRecord>)recordMap.get(node); if (records != null) { List<ERSEvidenceRecord> rv = new ArrayList<ERSEvidenceRecord>(records.size()); for (int i = 0; i != records.size(); i++) { ERSEvidenceRecord record = (ERSEvidenceRecord)records.get(i); if (selector.match(record)) { rv.add(record); } } return Collections.unmodifiableList(rv); } return Collections.emptyList(); } if (selector == null) { // match all - use a set to avoid repeats Set<ERSEvidenceRecord> rv = new HashSet<ERSEvidenceRecord>(recordMap.size()); for (Iterator it = recordMap.values().iterator(); it.hasNext(); ) { rv.addAll((List<ERSEvidenceRecord>)it.next()); } return Collections.unmodifiableList(new ArrayList<ERSEvidenceRecord>(rv)); } Set<ERSEvidenceRecord> rv = new HashSet<ERSEvidenceRecord>(); for (Iterator it = recordMap.values().iterator(); it.hasNext(); ) { List<ERSEvidenceRecord> next = (List<ERSEvidenceRecord>)it.next(); for (int i = 0; i != next.size(); i++) { if (selector.match(next.get(i))) { rv.add(next.get(i)); } } } return Collections.unmodifiableList(new ArrayList<ERSEvidenceRecord>(rv)); } private static class HashNode { private final byte[] dataHash; private final int hashCode; public HashNode(byte[] dataHash) { this.dataHash = dataHash; this.hashCode = Arrays.hashCode(dataHash); } public int hashCode() { return hashCode; } public boolean equals(Object o) { if (o instanceof HashNode) { return Arrays.areEqual(dataHash, ((HashNode)o).dataHash); } return false; } } }
[ "dgh@cryptoworkshop.com" ]
dgh@cryptoworkshop.com
5027f6d65dbe95a526ccc1f761564d3f9a4fc010
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project171/src/main/java/org/gradle/test/performance/largejavamultiproject/project171/p856/Production17125.java
0b589c01eb1c147aa611f0cf77546f840f9d67f0
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,061
java
package org.gradle.test.performance.largejavamultiproject.project171.p856; import org.gradle.test.performance.largejavamultiproject.project171.p855.Production17116; public class Production17125 { private Production17116 property0; public Production17116 getProperty0() { return property0; } public void setProperty0(Production17116 value) { property0 = value; } private Production17120 property1; public Production17120 getProperty1() { return property1; } public void setProperty1(Production17120 value) { property1 = value; } private Production17124 property2; public Production17124 getProperty2() { return property2; } public void setProperty2(Production17124 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
48f9ee33aeb0a30b96d2f596fb83e2fa602514ce
f3d078fbe6b1009757284dd6496c633073c1aef4
/history/code/solutions/acmp_ru/solutions/_336.java
57d9ac3c50d5c559922e4ced57ee8e657d3c526b
[]
no_license
kabulov/code
7b944b394ad2d0289a0f62c4a5647370cdceba84
47021d99fabdc1558a0aee3196be83dad783801b
refs/heads/master
2020-04-05T07:28:31.037806
2015-05-06T16:18:41
2015-05-06T16:18:41
26,828,215
0
0
null
null
null
null
UTF-8
Java
false
false
1,175
java
import java.io.File; //import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; //import java.io.StreamTokenizer; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { // in = new StreamTokenizer(new FileReader("input.txt")); Scanner in = new Scanner(new File("input.txt")); PrintWriter out = new PrintWriter("output.txt"); String str = ""; if (in.hasNext()) str = in.next(); int left = 150; int right = 150; int pos = 150; int len = str.length(); for (int i = 0; i < len; i++) switch(str.charAt(i)) { case '1': pos++; if (pos > right) right = pos; break; case '2': pos--; if (pos < left) left = pos; break; } out.println(right - left + 1); out.close(); } // static StreamTokenizer in; // public static long nextLong() { // return (long)in.nval; // } // public static boolean hasNext() throws IOException { // in.nextToken(); // if (in.ttype == StreamTokenizer.TT_EOL || in.ttype == StreamTokenizer.TT_EOF) // return false; // return true; // } }
[ "kazim.kabulov@gmail.com" ]
kazim.kabulov@gmail.com
a6e5c0dd7c63ade6d11f50ccd207505750bda082
096ed1c0fcb792330966ee3b8b695b1d09cc1cbe
/src/main/java/ch/ethz/idsc/owl/math/region/Regions.java
3f1134e5791a9a325351b2ff0aa015f6d778e950
[]
no_license
LCM-projects/owl
0d0927a6cab3369337cc88ea65d4d8485da17c64
6750ab513d2ef35477ae2dbbcbfbb5d48fed6cc5
refs/heads/master
2021-04-06T19:36:48.234240
2018-02-23T07:13:41
2018-02-23T07:13:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
936
java
// code by jph package ch.ethz.idsc.owl.math.region; /** class design stolen from java.util.Collections */ public enum Regions { ; private static class EmptyRegion<T> implements Region<T> { @Override // from Region public boolean isMember(T type) { return false; } } @SuppressWarnings("rawtypes") private static final Region EMPTY_REGION = new EmptyRegion<>(); @SuppressWarnings("unchecked") public static final <T> Region<T> emptyRegion() { return EMPTY_REGION; } /***************************************************/ private static class CompleteRegion<T> implements Region<T> { @Override public boolean isMember(T type) { return true; } } @SuppressWarnings("rawtypes") private static final Region COMPLETE_REGION = new CompleteRegion<>(); @SuppressWarnings("unchecked") public static final <T> Region<T> completeRegion() { return COMPLETE_REGION; } }
[ "jan.hakenberg@gmail.com" ]
jan.hakenberg@gmail.com
026927a08848e529801b71b25764278244a1cde9
9410ef0fbb317ace552b6f0a91e0b847a9a841da
/src/main/java/com/tencentcloudapi/faceid/v20180301/models/ApplySdkVerificationTokenResponse.java
08ad268667cfdbff3aa5997c5f2ad518b2a37f60
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java-intl-en
274de822748bdb9b4077e3b796413834b05f1713
6ca868a8de6803a6c9f51af7293d5e6dad575db6
refs/heads/master
2023-09-04T05:18:35.048202
2023-09-01T04:04:14
2023-09-01T04:04:14
230,567,388
7
4
Apache-2.0
2022-05-25T06:54:45
2019-12-28T06:13:51
Java
UTF-8
Java
false
false
3,871
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.faceid.v20180301.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class ApplySdkVerificationTokenResponse extends AbstractModel{ /** * The token used to identify an SDK-based verification process. It is valid for 7,200s and can be used to get the verification result after the process is completed. */ @SerializedName("SdkToken") @Expose private String SdkToken; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get The token used to identify an SDK-based verification process. It is valid for 7,200s and can be used to get the verification result after the process is completed. * @return SdkToken The token used to identify an SDK-based verification process. It is valid for 7,200s and can be used to get the verification result after the process is completed. */ public String getSdkToken() { return this.SdkToken; } /** * Set The token used to identify an SDK-based verification process. It is valid for 7,200s and can be used to get the verification result after the process is completed. * @param SdkToken The token used to identify an SDK-based verification process. It is valid for 7,200s and can be used to get the verification result after the process is completed. */ public void setSdkToken(String SdkToken) { this.SdkToken = SdkToken; } /** * Get The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @return RequestId The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ public String getRequestId() { return this.RequestId; } /** * Set The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @param RequestId The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } public ApplySdkVerificationTokenResponse() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public ApplySdkVerificationTokenResponse(ApplySdkVerificationTokenResponse source) { if (source.SdkToken != null) { this.SdkToken = new String(source.SdkToken); } if (source.RequestId != null) { this.RequestId = new String(source.RequestId); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "SdkToken", this.SdkToken); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com