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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b83cd5502ecc81a92c52328ff6a02f3cee36aa67 | 7c76db8235ca9aeff01ec0431aa3c9f733756cb0 | /src/main/java/swing/windows/Win13LoginWindow.java | a6b74cf9fdf3d3b038e6502a78dc011056d195e1 | [] | no_license | jezhische/TrainingTasks | f98e94617b8c280ae3f715d66b350e37265d1aa8 | 03c1241bf76878248d24aef796006439b91f7dfd | refs/heads/master | 2020-05-21T19:52:09.674832 | 2017-08-22T01:56:23 | 2017-08-22T01:56:23 | 62,608,297 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,526 | java | package swing.windows;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
/**
* Created by Ежище on 30.09.2016.
*/
public class Win13LoginWindow extends JFrame {
/* Для того, чтобы впоследствии обращаться к содержимому текстовых полей, рекомендуется сделать их членами класса окна */
JTextField loginField;
JPasswordField passwordField;
Win13LoginWindow() {
super("Вход в систему");
setDefaultCloseOperation(EXIT_ON_CLOSE);
// Настраиваем первую горизонтальную панель (для ввода логина)
Box box1 = Box.createHorizontalBox();
JLabel loginLabel = new JLabel("Логин:");
loginField = new JTextField(15);
box1.add(loginLabel);
box1.add(Box.createHorizontalStrut(6));
box1.add(loginField);
// Настраиваем вторую горизонтальную панель (для ввода пароля)
Box box2 = Box.createHorizontalBox();
JLabel passwordLabel = new JLabel("Пароль:");
passwordField = new JPasswordField(15);
box2.add(passwordLabel);
box2.add(Box.createHorizontalStrut(6));
box2.add(passwordField);
// Настраиваем третью горизонтальную панель (с кнопками)
Box box3 = Box.createHorizontalBox();
JButton ok = new JButton("OK");
JButton cancel = new JButton("Отмена");
box3.add(Box.createHorizontalGlue());
box3.add(ok);
box3.add(Box.createHorizontalStrut(12));
box3.add(cancel);
// Уточняем размеры компонентов
loginLabel.setPreferredSize(passwordLabel.getPreferredSize());
// Размещаем три горизонтальные панели на одной вертикальной
Box mainBox = Box.createVerticalBox();
mainBox.setBorder(new EmptyBorder(12, 12, 12, 12));
mainBox.add(box1);
mainBox.add(Box.createVerticalStrut(12));
mainBox.add(box2);
mainBox.add(Box.createVerticalStrut(17));
mainBox.add(box3);
setContentPane(mainBox);
pack();
setResizable(false);
}
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> new Win13LoginWindow().setVisible(true));
}
}
| [
"jezhische@gmail.com"
] | jezhische@gmail.com |
ec441fafe10f7d6db54398cabac25d457bb59c2a | 7ce021205687faad6654e04623b3cd49bdad452d | /hvacrepo/master-data-feature/src/main/java/com/key2act/dao/LaborRateGroupDAO.java | 47a6293b36266a3d1e1c68711cf6411e7eeb236a | [] | no_license | venkateshm383/roibackupprojects | 4ad9094d25dad9fe60da5f557069ecb36f627e4d | a78467028950c8eafdd662113870f633e61304d2 | refs/heads/master | 2020-04-18T21:52:10.308611 | 2016-09-02T04:32:21 | 2016-09-02T04:32:21 | 67,107,627 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,664 | java | package com.key2act.dao;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.key2act.pojo.LaborRateGroup;
import com.key2act.service.InvalidLaborRateGroupException;
import com.key2act.service.LaborRateGroupNotFoundException;
import com.key2act.util.ErrorCodeConstant;
import com.key2act.util.PropertyFileLoader;
/**
* this class is used to perform all dao operation of labor rate group
* @author bizruntime
*
*/
public class LaborRateGroupDAO {
private static final Logger logger = LoggerFactory.getLogger(LaborRateGroupDAO.class);
private static Properties prop = PropertyFileLoader.getProperties();
/**
* this method is used to get labor groups data
* @param laborRateGroupName
* based on laborRateGroupName laborRateGroup data will be fetched
* @return
* return the list of LaborRateGroup objects
* @throws LaborRateGroupNotFoundException If labor rate group is not found then it throw LaborRateGroupNotFoundException
*/
public List<LaborRateGroup> getLaborRateGroup(String laborRateGroupName) throws LaborRateGroupNotFoundException, InvalidLaborRateGroupException {
logger.debug("Inside getLaborRateGroup method of LaborRateGroupDao");
if(laborRateGroupName == null)
throw new InvalidLaborRateGroupException("Invalid Labor Rate Group Exception");
List<LaborRateGroup> resultGroups = new ArrayList<LaborRateGroup>();
List<LaborRateGroup> groupsData = getLaborRateGroupData();
for(LaborRateGroup group : groupsData) {
if(group.getLaborRateGroupName().equalsIgnoreCase(laborRateGroupName.trim()))
resultGroups.add(group);
}
if(resultGroups.isEmpty()) {
logger.info(prop.getProperty(ErrorCodeConstant.LABOR_RATE_GROUP_ERROR_CODE) + laborRateGroupName);
throw new LaborRateGroupNotFoundException("Error Code:" + ErrorCodeConstant.LABOR_RATE_GROUP_ERROR_CODE + ", " + prop.getProperty(ErrorCodeConstant.LABOR_RATE_GROUP_ERROR_CODE) + laborRateGroupName);
}
return resultGroups;
}
/**
* this method is used to get labor groups data
* @return
* return the list of LaborRateGroup objects
* @throws LaborRateGroupNotFoundException If labor rate group is not found then it throw LaborRateGroupNotFoundException
*/
public List<LaborRateGroup> getAllLaborRateGroup() throws LaborRateGroupNotFoundException {
logger.debug("Inside getLaborRateGroup method of LaborRateGroupDao");
List<LaborRateGroup> resultGroups = new ArrayList<LaborRateGroup>();
if(resultGroups.isEmpty()) {
logger.info(prop.getProperty(ErrorCodeConstant.LABOR_RATE_GROUP_ERROR_CODE));
throw new LaborRateGroupNotFoundException("Error Code:" + ErrorCodeConstant.LABOR_RATE_GROUP_ERROR_CODE + ", " + prop.getProperty(ErrorCodeConstant.LABOR_RATE_GROUP_ERROR_CODE));
}
return resultGroups;
}
/**
* this method contains all hard coded data, once we used database then we will fetched data from db
* @return It return the list of hardcoded values
*/
public List<LaborRateGroup> getLaborRateGroupData() {
List<LaborRateGroup> laborRateGroups = new ArrayList<LaborRateGroup>();
LaborRateGroup group = new LaborRateGroup("10001", "A", "50", "Male");
laborRateGroups.add(group);
group = new LaborRateGroup("10002", "A", "40", "Male");
laborRateGroups.add(group);
group = new LaborRateGroup("10003", "C", "30", "Female");
laborRateGroups.add(group);
group = new LaborRateGroup("10004", "B", "50", "Male");
laborRateGroups.add(group);
group = new LaborRateGroup("10005", "A", "50", "Female");
laborRateGroups.add(group);
return laborRateGroups;
}//end of method
}
| [
"you@example.com"
] | you@example.com |
cfaf417164df912bc4a1444705603c6bc1a1daec | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes4.dex_source_from_JADX/com/facebook/video/engine/AbstractVideoPlayerListener.java | 44622049fe55b1caacf6c27cb5a4eec9b1bae87c | [] | no_license | pxson001/facebook-app | 87aa51e29195eeaae69adeb30219547f83a5b7b1 | 640630f078980f9818049625ebc42569c67c69f7 | refs/heads/master | 2020-04-07T20:36:45.758523 | 2018-03-07T09:04:57 | 2018-03-07T09:04:57 | 124,208,458 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,492 | java | package com.facebook.video.engine;
import android.graphics.Bitmap;
import com.facebook.video.analytics.VideoAnalytics.EventTriggerType;
import com.facebook.video.engine.Constants.VideoError;
import com.facebook.video.engine.VideoPlayer.PlayerState;
/* compiled from: perf_name */
public class AbstractVideoPlayerListener implements VideoPlayerListener {
public void mo444a() {
}
public void mo445a(int i) {
}
public void mo461b(int i) {
}
public void mo446a(int i, int i2) {
}
public void mo460b() {
}
public void mo463c() {
}
public void mo447a(Bitmap bitmap) {
}
public void mo465d() {
}
public void mo449a(EventTriggerType eventTriggerType, boolean z) {
}
public void mo462b(EventTriggerType eventTriggerType, boolean z) {
}
public void mo464c(EventTriggerType eventTriggerType, boolean z) {
}
public void mo448a(EventTriggerType eventTriggerType) {
}
public void mo454b(EventTriggerType eventTriggerType) {
}
public void mo456c(EventTriggerType eventTriggerType) {
}
public void mo450a(PlayerState playerState) {
}
public void mo455b(PlayerState playerState) {
}
public void mo453a(String str, VideoError videoError) {
}
public void mo452a(String str) {
}
public void mo457e() {
}
public void mo458f() {
}
public void mo451a(VideoResolution videoResolution) {
}
public void mo459g() {
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
4111f3285b1efc9925ad3e6de7abd7f798a8c751 | 5622d518bac15a05590055a147628a728ca19b23 | /jcore-mallet-0.4/src/main/java/edu/umass/cs/mallet/base/types/StringEditVector.java | a5b99089e78652ad8ee3d8c2f84c0a56ce04815b | [
"BSD-2-Clause",
"CPL-1.0"
] | permissive | JULIELab/jcore-dependencies | e51349ccf6f26c7b7dab777a9e6baacd7068b853 | a303c6a067add1f4b05c4d2fe31c1d81ecaa7073 | refs/heads/master | 2023-03-19T20:26:55.083193 | 2023-03-09T20:32:13 | 2023-03-09T20:32:13 | 44,806,492 | 4 | 2 | BSD-2-Clause | 2022-11-16T19:48:08 | 2015-10-23T10:32:10 | Java | UTF-8 | Java | false | false | 3,668 | java | /* Copyright (C) 2002 Univ. of Massachusetts Amherst, Computer Science Dept.
This file is part of "MALLET" (MAchine Learning for LanguagE Toolkit).
http://www.cs.umass.edu/~mccallum/mallet
This software is provided under the terms of the Common Public License,
version 1.0, as published by http://www.opensource.org. For further
information, see the file `LICENSE' included with this distribution. */
/**
@author Andrew McCallum <a href="mailto:mccallum@cs.umass.edu">mccallum@cs.umass.edu</a>
*/
package edu.umass.cs.mallet.base.types;
import edu.umass.cs.mallet.base.util.MalletLogger;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.StringTokenizer;
import java.util.logging.Logger;
public class StringEditVector implements Serializable
{
private static Logger logger = MalletLogger.getLogger(StringEditVector.class.getName());
String _delimiter;
String _string1 = null, _string2 = null;
int _match = -2;
public static final int MATCH = 1;
public static final int NONMATCH = 0;
public StringEditVector(String delimiter) {
if (delimiter == null || delimiter.equals(""))
_delimiter = " ";
else
_delimiter = delimiter;
}
public StringEditVector() {
this (" ");
}
public String formatString() {
return "<String1>" + _delimiter + "<String2>" + _delimiter + "<BooleanMatch>";
}
public boolean parseString(String line) {
StringTokenizer stok = new StringTokenizer(line, _delimiter);
boolean success = true;
// First String
if (stok.hasMoreTokens()) _string1 = stok.nextToken();
else success = false;
// Second String
if (stok.hasMoreTokens()) _string2 = stok.nextToken();
else success = false;
// Match/non-Match
if (stok.hasMoreTokens())
try {
_match = Integer.parseInt(stok.nextToken());
}
catch (Exception e) {
logger.info ("Error while returning third integer - " + e.getMessage());
_match = -1;
success = false;
}
else success = false;
return success;
}
public void setFirstString(String s1) {
_string1 = s1;
}
public String getFirstString() {
return _string1;
}
public char getFirstStringChar(int index) {
index = index - 1;
if (index < 0 || index >= _string1.length()) return (char) 0;
else return _string1.charAt(index);
}
public int getLengthFirstString() {
return _string1.length();
}
public void setSecondString(String s2) {
_string2 = s2;
}
public String getSecondString() {
return _string2;
}
public char getSecondStringChar(int index) {
index = index - 1;
if (index < 0 || index >= _string2.length()) return (char) 0;
else return _string2.charAt(index);
}
public int getLengthSecondString() {
return _string2.length();
}
public void setMatch(int match) {
_match = match;
}
public int getMatch() {
return _match;
}
//Serialization
private static final long serialVersionUID = 1;
private static final int CURRENT_SERIAL_VERSION = 0;
private void writeObject (ObjectOutputStream out) throws IOException {
out.writeInt (CURRENT_SERIAL_VERSION);
out.writeObject (_delimiter);
out.writeObject (_string1);
out.writeObject (_string2);
out.writeInt (_match);
}
private void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException {
int version = in.readInt ();
_delimiter = (String) in.readObject();
_string1 = (String) in.readObject();
_string2 = (String) in.readObject();
_match = in.readInt();
}
}
| [
"chew@gmx.net"
] | chew@gmx.net |
82b5f914cb83c3a83f3fd120b8b246c6521d8867 | 3ca19886f74721466d070583cbac4caeab0b212c | /src/test/java/reactor/core/publisher/FluxDeferTest.java | 2d462206c498105119d6aa03b1ba7bdcf99436c4 | [
"Apache-2.0"
] | permissive | snicoll/reactor-core | e3086d00f501f7dba9a624682e806c4915c11ac1 | d316d7f3df7efb13e45ac348f801dddf51df5769 | refs/heads/master | 2021-01-13T08:09:20.694865 | 2016-09-23T10:35:59 | 2016-09-23T10:35:59 | 69,872,415 | 0 | 0 | null | 2016-10-03T13:20:07 | 2016-10-03T13:20:07 | null | UTF-8 | Java | false | false | 1,913 | java | /*
* Copyright (c) 2011-2016 Pivotal Software Inc, 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 reactor.core.publisher;
import java.util.function.Supplier;
import org.junit.Assert;
import org.junit.Test;
import org.reactivestreams.Publisher;
import reactor.test.TestSubscriber;
public class FluxDeferTest {
@Test(expected = NullPointerException.class)
public void supplierNull() {
Flux.<Integer>defer(null);
}
@Test
public void deferAssigned() {
Supplier<Publisher<?>> defer = () -> null;
Assert.assertTrue(new FluxDefer<>(defer).upstream().equals(defer));
}
@Test
public void supplierReturnsNull() {
TestSubscriber<Integer> ts = TestSubscriber.create();
Flux.<Integer>defer(() -> null).subscribe(ts);
ts.assertNoValues()
.assertNotComplete()
.assertError(NullPointerException.class);
}
@Test
public void supplierThrows() {
TestSubscriber<Integer> ts = TestSubscriber.create();
Flux.<Integer>defer(() -> {
throw new RuntimeException("forced failure");
}).subscribe(ts);
ts.assertNoValues()
.assertNotComplete()
.assertError(RuntimeException.class)
.assertErrorMessage("forced failure");
}
@Test
public void normal() {
TestSubscriber<Integer> ts = TestSubscriber.create();
Flux.defer(() -> Flux.just(1)).subscribe(ts);
ts.assertValues(1)
.assertNoError()
.assertComplete();
}
}
| [
"smaldini@pivotal.io"
] | smaldini@pivotal.io |
16195aaca16ade5d1472fc64f78651d77041c8e1 | 028d6009f3beceba80316daa84b628496a210f8d | /core/com.nokia.carbide.cpp.codescanner/src/com/nokia/carbide/cpp/internal/codescanner/gen/Kbdata/TranslateType26.java | cfecd95ef1729f5e0bd0684d305886e27d454cf4 | [] | no_license | JamesLinus/oss.FCL.sftools.dev.ide.carbidecpp | fa50cafa69d3e317abf0db0f4e3e557150fd88b3 | 4420f338bc4e522c563f8899d81201857236a66a | refs/heads/master | 2020-12-30T16:45:28.474973 | 2010-10-20T16:19:31 | 2010-10-20T16:19:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,122 | java | /*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/
package com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Translate Type26</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getTranslateType26()
* @model extendedMetaData="name='translate_._26_._type'"
* @generated
*/
public enum TranslateType26 implements Enumerator {
/**
* The '<em><b>Yes</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #YES_VALUE
* @generated
* @ordered
*/
YES(0, "yes", "yes"),
/**
* The '<em><b>No</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NO_VALUE
* @generated
* @ordered
*/
NO(1, "no", "no"),
/**
* The '<em><b>Dita Use Conref Target</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #DITA_USE_CONREF_TARGET_VALUE
* @generated
* @ordered
*/
DITA_USE_CONREF_TARGET(2, "ditaUseConrefTarget", "-dita-use-conref-target");
/**
* The '<em><b>Yes</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Yes</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #YES
* @model name="yes"
* @generated
* @ordered
*/
public static final int YES_VALUE = 0;
/**
* The '<em><b>No</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>No</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #NO
* @model name="no"
* @generated
* @ordered
*/
public static final int NO_VALUE = 1;
/**
* The '<em><b>Dita Use Conref Target</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Dita Use Conref Target</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #DITA_USE_CONREF_TARGET
* @model name="ditaUseConrefTarget" literal="-dita-use-conref-target"
* @generated
* @ordered
*/
public static final int DITA_USE_CONREF_TARGET_VALUE = 2;
/**
* An array of all the '<em><b>Translate Type26</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final TranslateType26[] VALUES_ARRAY =
new TranslateType26[] {
YES,
NO,
DITA_USE_CONREF_TARGET,
};
/**
* A public read-only list of all the '<em><b>Translate Type26</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<TranslateType26> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Translate Type26</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static TranslateType26 get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
TranslateType26 result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Translate Type26</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static TranslateType26 getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
TranslateType26 result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Translate Type26</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static TranslateType26 get(int value) {
switch (value) {
case YES_VALUE: return YES;
case NO_VALUE: return NO;
case DITA_USE_CONREF_TARGET_VALUE: return DITA_USE_CONREF_TARGET;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private TranslateType26(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //TranslateType26
| [
"Deepak.Modgil@Nokia.com"
] | Deepak.Modgil@Nokia.com |
e0ce96d332a38ae2d00fa9b5c35405e2bf56e77c | c7caae2f14d6d11980aaa286784c5a591f7b7592 | /lcms-common/src/main/java/com/ljb/cache/SimpleKey.java | 4f38780c4493d1dd98499742481a01324c0bc3cd | [] | no_license | longjinbing/lcms | aabeb6e399ff48f2bdd34780e5b53a59a8454954 | 0a8784016f498a42dff211f81cafceb26b0d0310 | refs/heads/master | 2022-07-12T06:09:07.901339 | 2019-09-15T10:50:01 | 2019-09-15T10:50:01 | 159,462,412 | 0 | 0 | null | 2022-06-29T17:05:01 | 2018-11-28T07:35:54 | JavaScript | UTF-8 | Java | false | false | 1,868 | java | package com.ljb.cache;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.util.ClassUtils;
import java.lang.reflect.Array;
import java.lang.reflect.Method;
/**
* 作者: @author longjinbin <br>
* 时间: 2018/11/11<br>
* 描述: <br>
*/
public class SimpleKey implements KeyGenerator {
/**
* (非 Javadoc)
* <p>
* Title: generate
* </p>
*
* @param target
* @param method
* @param params
* @return
* @see KeyGenerator#generate(Object,
* Method, Object[])
*/
@Override
public Object generate(Object target, Method method, Object... params) {
StringBuilder key = new StringBuilder();
key.append(target.getClass().getSimpleName()).append(":").append(method.getName()).append(":");
if (params.length == 0) {
return key.toString();
}
for (int i = 0; i < params.length; i++) {
Object param = params[i];
if (param == null) {
del(key);
} else if (ClassUtils.isPrimitiveArray(param.getClass())) {
int length = Array.getLength(param);
for (int j = 0; j < length; j++) {
key.append(Array.get(param, j));
key.append(',');
}
} else if (ClassUtils.isPrimitiveOrWrapper(param.getClass()) || param instanceof String) {
key.append(param);
} else {
key.append(param.toString());
}
key.append('-');
}
del(key);
return key.toString();
}
private StringBuilder del(StringBuilder stringBuilder) {
if (stringBuilder.toString().endsWith("-")) {
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
}
return stringBuilder;
}
}
| [
"longjinbin@yeah.net"
] | longjinbin@yeah.net |
47258320a16a43317beb6e8d77e1b5abf12e4466 | 40d844c1c780cf3618979626282cf59be833907f | /src/testcases/CWE113_HTTP_Response_Splitting/s01/CWE113_HTTP_Response_Splitting__database_addCookieServlet_67b.java | d87140c64b8af02aa46453f91dc294b1ebd352b6 | [] | no_license | rubengomez97/juliet | f9566de7be198921113658f904b521b6bca4d262 | 13debb7a1cc801977b9371b8cc1a313cd1de3a0e | refs/heads/master | 2023-06-02T00:37:24.532638 | 2021-06-23T17:22:22 | 2021-06-23T17:22:22 | 379,676,259 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,397 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE113_HTTP_Response_Splitting__database_addCookieServlet_67b.java
Label Definition File: CWE113_HTTP_Response_Splitting.label.xml
Template File: sources-sinks-67b.tmpl.java
*/
/*
* @description
* CWE: 113 HTTP Response Splitting
* BadSource: database Read data from a database
* GoodSource: A hardcoded string
* Sinks: addCookieServlet
* GoodSink: URLEncode input
* BadSink : querystring to addCookie()
* Flow Variant: 67 Data flow: data passed in a class from one method to another in different source files in the same package
*
* */
package testcases.CWE113_HTTP_Response_Splitting.s01;
import testcasesupport.*;
import javax.servlet.http.*;
import java.net.URLEncoder;
public class CWE113_HTTP_Response_Splitting__database_addCookieServlet_67b
{
public void badSink(CWE113_HTTP_Response_Splitting__database_addCookieServlet_67a.Container dataContainer , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = dataContainer.containerOne;
if (data != null)
{
Cookie cookieSink = new Cookie("lang", data);
/* POTENTIAL FLAW: Input not verified before inclusion in the cookie */
response.addCookie(cookieSink);
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(CWE113_HTTP_Response_Splitting__database_addCookieServlet_67a.Container dataContainer , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = dataContainer.containerOne;
if (data != null)
{
Cookie cookieSink = new Cookie("lang", data);
/* POTENTIAL FLAW: Input not verified before inclusion in the cookie */
response.addCookie(cookieSink);
}
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(CWE113_HTTP_Response_Splitting__database_addCookieServlet_67a.Container dataContainer , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = dataContainer.containerOne;
if (data != null)
{
Cookie cookieSink = new Cookie("lang", URLEncoder.encode(data, "UTF-8"));
/* FIX: use URLEncoder.encode to hex-encode non-alphanumerics */
response.addCookie(cookieSink);
}
}
}
| [
"you@example.com"
] | you@example.com |
5b4a06b22a7d7f56d8f3c3d88307a0c502f2ec12 | dae1fcdfc2870eecb0d5b5890a3116c83fe528a7 | /examples/blogging/src/java/com/blogging/domain/AbstractEntity.java | 27bb4c101369c729aef39bcf2235a77f804601e1 | [
"Apache-2.0"
] | permissive | code7day/RestExpress | 2645167ae829d09f4925ea57b55f13acdb0e669e | 4e26dd54fe9b99063ddb892280670cba4a7b3766 | refs/heads/master | 2021-05-27T07:23:13.276482 | 2012-10-25T21:48:49 | 2012-10-25T21:48:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,004 | java | package com.blogging.domain;
import java.util.Date;
import org.bson.types.ObjectId;
import com.google.code.morphia.annotations.Id;
import com.google.code.morphia.annotations.Indexed;
import com.strategicgains.repoexpress.domain.TimestampedIdentifiable;
import com.strategicgains.syntaxe.AbstractValidatable;
public abstract class AbstractEntity
extends AbstractValidatable
implements TimestampedIdentifiable
{
@Id
private ObjectId id;
@Indexed
private Date createdAt;
private Date updatedAt;
@Override
public String getId()
{
return (id == null ? null : id.toString());
}
@Override
public void setId(String id)
{
this.id = (id == null ? null : new ObjectId(id));
}
@Override
public Date getCreatedAt()
{
return createdAt;
}
@Override
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
@Override
public Date getUpdatedAt()
{
return updatedAt;
}
@Override
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
}
| [
"tfredrich@gmail.com"
] | tfredrich@gmail.com |
89737da02867bc645812e48c46af78a2982c50f9 | 269bc44e58b7516be2999759367194f18afdd76a | /aliyun-spring-boot-starters/aliyun-context-spring-boot-starter/src/main/java/com/alibaba/cloud/spring/boot/context/condition/ConditionalOnRequiredProperties.java | 1e84eeb11eb49946213305151f9d4855e630ce25 | [
"Apache-2.0"
] | permissive | alibaba/aliyun-spring-boot | d3782f53f05e3a4fb673a820510d48a38bb69da0 | 425a36d149f082919fb3c41bd042c8615b426ad9 | refs/heads/master | 2023-08-20T04:45:25.125521 | 2023-03-08T06:58:56 | 2023-03-08T06:58:56 | 247,595,825 | 436 | 122 | Apache-2.0 | 2023-03-08T06:58:58 | 2020-03-16T02:46:07 | Java | UTF-8 | Java | false | false | 1,466 | java | /*
* Copyright 2013-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.cloud.spring.boot.context.condition;
import org.springframework.context.annotation.Conditional;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* The annotation to combine the multiple {@link ConditionalOnRequiredProperty}
*
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
* @since 1.0.0
* @see ConditionalOnRequiredProperty
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD, ElementType.TYPE })
@Documented
@Conditional(OnRequiredPropertiesCondition.class)
public @interface ConditionalOnRequiredProperties {
/**
* @return the multiple {@link ConditionalOnRequiredProperty}
*/
ConditionalOnRequiredProperty[] value();
}
| [
"mercyblitz@gmail.com"
] | mercyblitz@gmail.com |
48057b3d54b8132c5091ab7316ad2b9ee3472aae | 625b87d8a86ea049c2fba665936a1f91cbb27135 | /src/main/java/com/nbcuni/test/cms/pageobjectutils/Page.java | 810ddc19a0dea115b68198a827cf5d1f4ec7dded | [] | no_license | coge9/ott | fd8c362aeff267783b73f31d4620c08515cfad23 | edd929d1c70555ebab33a02b2c8d5a981608a636 | refs/heads/master | 2020-12-02T22:56:01.568675 | 2017-07-04T11:29:00 | 2017-07-04T11:29:00 | 96,206,363 | 1 | 0 | null | 2017-07-04T11:29:01 | 2017-07-04T10:30:32 | Java | UTF-8 | Java | false | false | 3,630 | java | package com.nbcuni.test.cms.pageobjectutils;
import com.nbcuni.test.cms.backend.tvecms.block.messages.ErrorMessage;
import com.nbcuni.test.cms.backend.tvecms.block.messages.StatusMessage;
import com.nbcuni.test.cms.backend.tvecms.block.messages.WarningMessage;
import com.nbcuni.test.cms.elements.Label;
import com.nbcuni.test.cms.utils.AppLib;
import com.nbcuni.test.cms.utils.fielddecorator.ExtendedFieldDecorator;
import com.nbcuni.test.webdriver.CustomWebDriver;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import java.util.List;
import java.util.Random;
public abstract class Page {
protected CustomWebDriver webDriver;
protected AppLib aid;
protected StatusMessage messageStatus;
protected ErrorMessage errorMessage;
protected WarningMessage warningMessage;
protected Random random = new Random();
// designed for admin pages to get their title on page.
@FindBy(xpath = ".//h1[@class='page-title']")
protected Label adminPageTitle;
public Page(final CustomWebDriver webDriver, final AppLib aid) {
this.webDriver = webDriver;
this.aid = aid;
messageStatus = new StatusMessage(webDriver);
errorMessage = new ErrorMessage(webDriver);
warningMessage = new WarningMessage(webDriver);
init(webDriver);
}
// return titles for Admin pages.
public String getAdminPageTitle() {
return adminPageTitle.getText().trim();
}
public String getPageUrl() {
return webDriver.getCurrentUrl();
}
public boolean isStatusMessageShown() {
return messageStatus.isShown();
}
public void waitForStatusMessage(final int timeoutSec) {
messageStatus.waitForStatusMessageShown(timeoutSec);
}
public String getStatusMessage() {
return messageStatus.getMessage();
}
public String getStatusMessage(final int index) {
return messageStatus.getStatusMessage(index);
}
public List<String> getAllStatusMessages() {
return messageStatus.getAllStatusMessages();
}
public boolean isErrorMessagePresent() {
if (errorMessage.isPresent()) {
return !(errorMessage.getMessage().contains(MessageConstants.ERROR_PAGE_LOCKING) || errorMessage.getMessage().contains(MessageConstants.ERROR_NOTIOS_PAGE_PUBLISHING));
} else {
return false;
}
}
public String getErrorMessage() {
return errorMessage.getMessage();
}
public String getErrorMessage(final int index) {
return errorMessage.getMessage(index);
}
public boolean isWarningMessagePresent() {
return warningMessage.isPresent();
}
public String getWarningMessage() {
return warningMessage.getMessage();
}
public List<String> getAllWarningMessages() {
return warningMessage.getAllWarningMessages();
}
public void pause(int seconds) {
pauseInMilliseconds(seconds * 1000);
}
public void pauseInMilliseconds(int milliseconds) {
try {
Thread.sleep(milliseconds);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public String getExpectedPageTitle(String pageTitle) {
return String.format(MessageConstants.TITLE_EDIT_PAGE, pageTitle);
}
public abstract List<String> verifyPage();
public void init(final WebDriver driver) {
PageFactory.initElements(new ExtendedFieldDecorator(driver), this);
}
public boolean isPageOpened() {
return true;
}
} | [
"Enrique.Cortes@nbcuni.com"
] | Enrique.Cortes@nbcuni.com |
42d48a5ec950fa65b51c320a622908728b57bad5 | 7c7584a694e11b216f2feb98582d11180729c5e1 | /app/src/main/java/com/androiddeveloper/webprog26/chordsgenerator_0_3/engine/commands/LoadFullChordShapesFromLocalDbCommand.java | 6c961bfe6561d5bec16200de83f024d08cc5b7b6 | [] | no_license | webprog26/Guitar_Chords_3_0 | 0016a85f486531e4d4b1150a07d3c8d2abd1da3d | 1177233c214bf761123f8a9cf671eeb334ddcbd8 | refs/heads/master | 2020-12-02T17:44:39.434465 | 2017-07-19T07:24:23 | 2017-07-19T07:24:23 | 96,419,405 | 0 | 0 | null | 2017-07-19T07:24:24 | 2017-07-06T10:37:33 | Java | UTF-8 | Java | false | false | 892 | java | package com.androiddeveloper.webprog26.chordsgenerator_0_3.engine.commands;
import com.androiddeveloper.webprog26.chordsgenerator_0_3.engine.eventbus.events.LoadFullChordShapesFromLocalDbEvent;
import com.androiddeveloper.webprog26.chordsgenerator_0_3.engine.helpers.ChordShapesTableNameHelper;
import org.greenrobot.eventbus.EventBus;
/**
* Created by webprog on 14.07.17.
*/
public class LoadFullChordShapesFromLocalDbCommand implements Command{
private final String chordTitle;
public LoadFullChordShapesFromLocalDbCommand(String chordTitle) {
this.chordTitle = chordTitle;
}
@Override
public void execute() {
EventBus.getDefault().post(new LoadFullChordShapesFromLocalDbEvent(ChordShapesTableNameHelper
.getChordShapesTableName(getChordTitle())));
}
private String getChordTitle() {
return chordTitle;
}
}
| [
"webprog26@gmail.com"
] | webprog26@gmail.com |
995b9cf30e51b27b7fecc2d507260bba20174a59 | 088cad7c00db1e05ad2ab219e393864f3bf7add6 | /classes/bkn.java | ccec5bd038696f9b96ed0c22a8bc501d746c1312 | [] | no_license | devidwfreitas/com-santander-app.7402 | 8e9f344f5132b1c602d80929f1ff892293f4495d | e9a92b20dc3af174f9b27ad140643b96fb78f04d | refs/heads/main | 2023-05-01T09:33:58.835056 | 2021-05-18T23:54:43 | 2021-05-18T23:54:43 | 368,692,384 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 569 | java | import java.io.Serializable;
class bkn implements Serializable {
private static final long a = -2488473066578201069L;
private final String b;
private final boolean c;
private bkn(String paramString, boolean paramBoolean) {
this.b = paramString;
this.c = paramBoolean;
}
private Object readResolve() {
return new bkl(this.b, this.c, null, null);
}
}
/* Location: C:\Users\devid\Downloads\SAST\Santander\dex2jar-2.0\classes-dex2jar.jar!\bkn.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"devid.wfreitas@gmail.com"
] | devid.wfreitas@gmail.com |
acfc5e34acc77f049668a97dd370d2f56e894ff5 | 76d82b3c0e25f91ff37bbe198b15a65a70c37f02 | /src/com/cbedoy/apprende/interfaces/IRestService.java | ec7731791cc6eb9215087181c4ba20c801fe14ff | [] | no_license | cbedoy/ApprendeV2 | 87d2bf31cd23a00c36e7ba8c9a68c755de1260cf | 66053485577f4dcaf2dbca269e41d8134e0fb6f3 | refs/heads/master | 2021-01-23T08:39:17.199586 | 2015-01-02T17:45:18 | 2015-01-02T17:45:18 | 26,739,944 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 422 | java | package com.cbedoy.apprende.interfaces;
/**
* Created by Carlos on 14/10/2014.
*/
import java.util.HashMap;
public interface IRestService {
public void setPort(int port);
public void setURL(String url);
public void request(String url, HashMap<String, Object> parameters, IRestCallback callback);
public interface IRestCallback {
public void run(HashMap<String, Object> response);
}
} | [
"carlos.bedoy@gmail.com"
] | carlos.bedoy@gmail.com |
735a58d42530660103ad2764eef49219a6c63209 | 07ac433d94ef68715b5f18b834ac4dc8bb5b8261 | /Implementation/jpf-git/jpf-core/src/main/gov/nasa/jpf/vm/JPFOutputStream.java | 71dfb9f7c076ea621de9e230bab1d79d1f8550c7 | [
"MIT",
"Apache-2.0"
] | permissive | shrBadihi/ARDiff_Equiv_Checking | a54fb2908303b14a5a1f2a32b69841b213b2c999 | e8396ae4af2b1eda483cb316c51cd76949cd0ffc | refs/heads/master | 2023-04-03T08:40:07.919031 | 2021-02-05T04:44:34 | 2021-02-05T04:44:34 | 266,228,060 | 4 | 4 | MIT | 2020-11-26T01:34:08 | 2020-05-22T23:39:32 | Java | UTF-8 | Java | false | false | 5,085 | java | /*
* Copyright (C) 2014, United States Government, as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All rights reserved.
*
* The Java Pathfinder core (jpf-core) platform is 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 gov.nasa.jpf.vm;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import gov.nasa.jpf.util.FinalBitSet;
import gov.nasa.jpf.util.PrintUtils;
/**
* stream to write program state info in a readable and diff-able format.
* This is mostly intended for debugging, but could also at some point be
* used to restore such states.
*
* Currently supports heap objects, classes (static fields), threads and stack frames
*/
public class JPFOutputStream extends OutputStream {
PrintStream ps;
boolean useSid = false;
int maxElements = -1;
public JPFOutputStream (OutputStream os){
ps = new PrintStream(os);
}
public JPFOutputStream (PrintStream ps){
this.ps = ps;
}
public JPFOutputStream (){
this(System.out);
}
@Override
public void close(){
ps.flush();
if (ps != System.err && ps != System.out){
ps.close();
}
}
public void printCommentLine(String msg){
ps.print("// ");
ps.println(msg);
}
public void print (ElementInfo ei, FieldInfo fi, boolean isFiltered){
ps.print(fi.getName());
ps.print(':');
if (isFiltered){
ps.print("X");
} else {
switch (fi.getTypeCode()) {
case Types.T_BOOLEAN:
ps.print(ei.getBooleanField(fi));
break;
case Types.T_BYTE:
ps.print(ei.getByteField(fi));
break;
case Types.T_CHAR:
PrintUtils.printCharLiteral(ps, ei.getCharField(fi));
break;
case Types.T_SHORT:
ps.print(ei.getShortField(fi));
break;
case Types.T_INT:
ps.print(ei.getIntField(fi));
break;
case Types.T_LONG:
ps.print(ei.getLongField(fi));
break;
case Types.T_FLOAT:
ps.print(ei.getFloatField(fi));
break;
case Types.T_DOUBLE:
ps.print(ei.getDoubleField(fi));
break;
case Types.T_REFERENCE:
case Types.T_ARRAY:
PrintUtils.printReference(ps, ei.getReferenceField(fi));
break;
}
}
}
protected void printFields (ElementInfo ei, FieldInfo[] fields, FinalBitSet filterMask){
if (fields != null){
for (int i = 0; i < fields.length; i++) {
if (i > 0) {
ps.print(',');
}
print(ei, fields[i], (filterMask != null && filterMask.get(i)));
}
}
}
public void print (ElementInfo ei, FinalBitSet filterMask){
boolean isObject = ei.isObject();
ClassInfo ci = ei.getClassInfo();
int ref = (useSid) ? ei.getSid() : ei.getObjectRef();
ps.printf("@%x ", ref);
if (isObject){
ps.print("object ");
if (ei.isArray()){
ps.print( Types.getTypeName(ci.getName()));
} else {
ps.print(ci.getName());
}
} else {
ps.print("class ");
ps.print(ci.getName());
}
ps.print(':');
if (isObject){
if (ei.isArray()){
ps.print('[');
ei.getArrayFields().printElements(ps, maxElements);
ps.print(']');
} else {
ps.print('{');
printFields(ei, ci.getInstanceFields(), filterMask);
ps.print('}');
}
} else {
ps.print('{');
printFields( ei, ci.getDeclaredStaticFields(), filterMask);
ps.print('}');
}
}
public void print (ThreadInfo ti){
PrintUtils.printReference(ps, ti.getThreadObjectRef());
ps.print(' ');
ps.print(ti.getStateDescription());
}
public void print (StackFrame frame){
MethodInfo mi = frame.getMethodInfo();
ps.print('@');
ps.print(frame.getDepth());
ps.print(" frame ");
ps.print( mi.getFullName());
ps.print( ":{" );
if (!mi.isStatic()){
ps.print("this:");
PrintUtils.printReference(ps, frame.getThis());
ps.print(',');
}
ps.print("pc:");
ps.print(frame.getPC().getInstructionIndex());
ps.print(",slots:[");
frame.printSlots(ps);
ps.print(']');
ps.print('}');
}
public void println(){
ps.println();
}
public void print (NativeStateHolder nsh){
ps.print(nsh);
ps.print(":");
ps.print(nsh.getHash());
}
@Override
public void write(int b) throws IOException {
ps.write(b);
}
}
| [
"shr.badihi@gmail.com"
] | shr.badihi@gmail.com |
03c06f83261667f633bf6f611adba442f01acd68 | 05948ca1cd3c0d2bcd65056d691c4d1b2e795318 | /classes/cn/sharesdk/framework/PlatformDb.java | 16fd49c8b66236376befd83cce34f5a1cf64ae41 | [] | no_license | waterwitness/xiaoenai | 356a1163f422c882cabe57c0cd3427e0600ff136 | d24c4d457d6ea9281a8a789bc3a29905b06002c6 | refs/heads/master | 2021-01-10T22:14:17.059983 | 2016-10-08T08:39:11 | 2016-10-08T08:39:11 | 70,317,042 | 0 | 8 | null | null | null | null | UTF-8 | Java | false | false | 6,205 | java | package cn.sharesdk.framework;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import com.mob.tools.b.e;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
public class PlatformDb
{
private static final String DB_NAME = "cn_sharesdk_weibodb";
private SharedPreferences db;
private String platformNname;
private int platformVersion;
public PlatformDb(Context paramContext, String paramString, int paramInt)
{
this.db = paramContext.getSharedPreferences("cn_sharesdk_weibodb_" + paramString + "_" + paramInt, 0);
this.platformNname = paramString;
this.platformVersion = paramInt;
}
public String exportData()
{
try
{
Object localObject = new HashMap();
((HashMap)localObject).putAll(this.db.getAll());
localObject = new e().a((HashMap)localObject);
return (String)localObject;
}
catch (Throwable localThrowable)
{
cn.sharesdk.framework.utils.d.a().w(localThrowable);
}
return null;
}
public String get(String paramString)
{
return this.db.getString(paramString, "");
}
public long getExpiresIn()
{
try
{
long l = this.db.getLong("expiresIn", 0L);
return l;
}
catch (Throwable localThrowable1)
{
try
{
int i = this.db.getInt("expiresIn", 0);
return i;
}
catch (Throwable localThrowable2) {}
}
return 0L;
}
public long getExpiresTime()
{
return this.db.getLong("expiresTime", 0L) + getExpiresIn() * 1000L;
}
public String getPlatformNname()
{
return this.platformNname;
}
public int getPlatformVersion()
{
return this.platformVersion;
}
public String getToken()
{
return this.db.getString("token", "");
}
public String getTokenSecret()
{
return this.db.getString("secret", "");
}
public String getUserGender()
{
String str = this.db.getString("gender", "2");
if ("0".equals(str)) {
return "m";
}
if ("1".equals(str)) {
return "f";
}
return null;
}
public String getUserIcon()
{
return this.db.getString("icon", "");
}
public String getUserId()
{
return this.db.getString("weibo", "");
}
public String getUserName()
{
return this.db.getString("nickname", "");
}
public void importData(String paramString)
{
for (;;)
{
Map.Entry localEntry;
Object localObject2;
try
{
Object localObject1 = new e().a(paramString);
if (localObject1 != null)
{
paramString = this.db.edit();
localObject1 = ((HashMap)localObject1).entrySet().iterator();
if (!((Iterator)localObject1).hasNext()) {
break;
}
localEntry = (Map.Entry)((Iterator)localObject1).next();
localObject2 = localEntry.getValue();
if ((localObject2 instanceof Boolean))
{
paramString.putBoolean((String)localEntry.getKey(), ((Boolean)localObject2).booleanValue());
continue;
}
}
else
{
return;
}
}
catch (Throwable paramString)
{
cn.sharesdk.framework.utils.d.a().w(paramString);
}
if ((localObject2 instanceof Float)) {
paramString.putFloat((String)localEntry.getKey(), ((Float)localObject2).floatValue());
} else if ((localObject2 instanceof Integer)) {
paramString.putInt((String)localEntry.getKey(), ((Integer)localObject2).intValue());
} else if ((localObject2 instanceof Long)) {
paramString.putLong((String)localEntry.getKey(), ((Long)localObject2).longValue());
} else {
paramString.putString((String)localEntry.getKey(), String.valueOf(localObject2));
}
}
paramString.commit();
}
public boolean isValid()
{
boolean bool2 = true;
String str = getToken();
boolean bool1;
if ((str == null) || (str.length() <= 0)) {
bool1 = false;
}
do
{
do
{
return bool1;
bool1 = bool2;
} while (getExpiresIn() == 0L);
bool1 = bool2;
} while (getExpiresTime() > System.currentTimeMillis());
return false;
}
public void put(String paramString1, String paramString2)
{
SharedPreferences.Editor localEditor = this.db.edit();
localEditor.putString(paramString1, paramString2);
localEditor.commit();
}
public void putExpiresIn(long paramLong)
{
SharedPreferences.Editor localEditor = this.db.edit();
localEditor.putLong("expiresIn", paramLong);
localEditor.putLong("expiresTime", System.currentTimeMillis());
localEditor.commit();
}
public void putToken(String paramString)
{
SharedPreferences.Editor localEditor = this.db.edit();
localEditor.putString("token", paramString);
localEditor.commit();
}
public void putTokenSecret(String paramString)
{
SharedPreferences.Editor localEditor = this.db.edit();
localEditor.putString("secret", paramString);
localEditor.commit();
}
public void putUserId(String paramString)
{
SharedPreferences.Editor localEditor = this.db.edit();
localEditor.putString("weibo", paramString);
localEditor.commit();
}
public void removeAccount()
{
Object localObject1 = new ArrayList();
Object localObject2 = this.db.getAll().entrySet().iterator();
while (((Iterator)localObject2).hasNext()) {
((ArrayList)localObject1).add(((Map.Entry)((Iterator)localObject2).next()).getKey());
}
localObject2 = this.db.edit();
localObject1 = ((ArrayList)localObject1).iterator();
while (((Iterator)localObject1).hasNext()) {
((SharedPreferences.Editor)localObject2).remove((String)((Iterator)localObject1).next());
}
((SharedPreferences.Editor)localObject2).commit();
}
}
/* Location: E:\apk\xiaoenai2\classes-dex2jar.jar!\cn\sharesdk\framework\PlatformDb.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"1776098770@qq.com"
] | 1776098770@qq.com |
fdf6e5788a562c5bd21980f1b805ae47f86f429b | a825eaec802a3094101d3876e47cadb544e15414 | /core/src/net/wohlfart/neutron/scene/node/RootNode.java | 9413a59c643121a6c6cb577cc1c6ec4e6e1381f7 | [] | no_license | mwohlf/neutron | 360965594c1da759952efb7a50b38e5c03145fc2 | b71ff36b4eeb532c6ceb7231d4f332e8a68ee20c | refs/heads/master | 2021-03-12T23:26:04.412154 | 2014-07-28T16:06:53 | 2014-07-28T16:06:53 | 21,766,674 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,468 | java | package net.wohlfart.neutron.scene.node;
import java.util.Iterator;
import net.wohlfart.neutron.scene.IGraph.INode;
import net.wohlfart.neutron.scene.IRenderContext;
import net.wohlfart.neutron.scene.ITree;
import net.wohlfart.neutron.scene.graph.ISortToken;
import net.wohlfart.neutron.scene.graph.NodeSortStrategy;
import net.wohlfart.neutron.shader.ShaderLoader;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
import com.badlogic.gdx.math.Matrix4;
public class RootNode implements INode {
public static final String ROOT = "root";
private ShaderProgram shader;
private Matrix4 matrix = new Matrix4();
public RootNode() {
this.shader = ShaderLoader.load("root");
}
@Override
public String getId() {
return ROOT;
}
@Override
public ISortToken getSortToken() {
return NodeSortStrategy.NEG_INF_TOKEN;
}
@Override
public Matrix4 getModel2World() {
return matrix;
}
@Override
public void render(IRenderContext ctx, Iterable<ITree<INode>> children) {
assert ctx != null : "context is null";
assert shader != null : "shader is null";
assert ctx.getCamera() != null : "cam is null";
ctx.setRenderConfig(IRenderConfig.CLEAR);
ctx.begin(shader);
shader.setUniformMatrix("u_worldToClip", ctx.getCamera().getViewMatrix());
Iterator<ITree<INode>> iter = children.iterator();
while (iter.hasNext()) {
final ITree<INode> child = iter.next();
child.getValue().render(ctx, child);
}
ctx.end();
}
}
| [
"michael@wohlfart.net"
] | michael@wohlfart.net |
c4d5903acfa96748e469cd0261d80c2f6c4611f2 | 2d523b86ea557cc2e034ec9af595f7f370f98a6c | /src/injection/InstructionSearcher.java | 72b5198f70d1ef83cb396bbc9581a5e5559e8318 | [] | no_license | Phynvi/rsloader | 0319b2806c7606cd8646b14419cf56ec7d6492ed | 7bf37433fe3ec2c2fa7d2e625a99f87a7db110f8 | refs/heads/master | 2020-12-09T01:23:50.966975 | 2016-12-01T15:30:07 | 2016-12-01T15:30:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,602 | java | package injection;
import org.apache.bcel.generic.*;
import org.apache.bcel.classfile.Method;
public class InstructionSearcher {
public static interface Constraint {
public boolean accept(Instruction instr);
}
private InstructionList list;
private Instruction[] instructions;
private ConstantPoolGen cpg;
private int index;
public InstructionSearcher(ClassGen cg, Method m) {
cpg = cg.getConstantPool();
list = new InstructionList(m.getCode().getCode());
instructions = list.getInstructions();
index = -1;
}
public void index(int index) {
this.index = index;
}
public Instruction current() {
return (index < 0 || index >= instructions.length) ? null : instructions[index];
}
public InstructionHandle currentHandle() {
return list.getInstructionHandles()[index];
}
public Instruction next() {
++index;
return current();
}
public Instruction previous() {
--index;
return current();
}
public <T> T next(Class<T> type, Constraint constr) {
while (++index < instructions.length) {
Instruction instr = instructions[index];
if (type.isAssignableFrom(instr.getClass()) && (constr == null || constr.accept(instr))) {
return type.cast(instr);
}
}
return null;
}
public <T> T previous(Class<T> type, Constraint constr) {
while (--index >= 0) {
Instruction instr = instructions[index];
if (type.isAssignableFrom(instr.getClass()) && (constr == null || constr.accept(instr))) {
return type.cast(instr);
}
}
return null;
}
public LDC nextLDC(final Object val) {
Constraint constraint = new Constraint() {
public boolean accept(Instruction instr) {
LDC ldc = (LDC) instr;
return ldc.getValue(cpg).equals(val);
}
};
return next(LDC.class, constraint);
}
public ConstantPushInstruction nextConstant(final int... values) {
Constraint constraint = new Constraint() {
public boolean accept(Instruction instr) {
ConstantPushInstruction cpi = (ConstantPushInstruction) instr;
for (int val : values) {
if (cpi.getValue().equals(val)) {
return true;
}
}
return false;
}
};
return next(ConstantPushInstruction.class, constraint);
}
public ConstantPushInstruction previousConstant(final int... values) {
Constraint constraint = new Constraint() {
public boolean accept(Instruction instr) {
ConstantPushInstruction cpi = (ConstantPushInstruction) instr;
for (int val : values) {
if (cpi.getValue().equals(val)) {
return true;
}
}
return false;
}
};
return previous(ConstantPushInstruction.class, constraint);
}
}
| [
"andrew@codeusa523.org"
] | andrew@codeusa523.org |
4418f85a43a69a466c9d7e7921b974426665cafa | 445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602 | /aliyun-java-sdk-retailadvqa-public/src/main/java/com/aliyuncs/retailadvqa_public/model/v20200515/RecreateTableResponse.java | eee541122272915616810bab9314177637b35de0 | [
"Apache-2.0"
] | permissive | caojiele/aliyun-openapi-java-sdk | b6367cc95469ac32249c3d9c119474bf76fe6db2 | ecc1c949681276b3eed2500ec230637b039771b8 | refs/heads/master | 2023-06-02T02:30:02.232397 | 2021-06-18T04:08:36 | 2021-06-18T04:08:36 | 172,076,930 | 0 | 0 | NOASSERTION | 2019-02-22T14:08:29 | 2019-02-22T14:08:29 | null | UTF-8 | Java | false | false | 2,155 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.retailadvqa_public.model.v20200515;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.retailadvqa_public.transform.v20200515.RecreateTableResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class RecreateTableResponse extends AcsResponse {
private String errorCode;
private String errorDesc;
private String data;
private Boolean success;
private String traceId;
private String requestId;
public String getErrorCode() {
return this.errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public String getErrorDesc() {
return this.errorDesc;
}
public void setErrorDesc(String errorDesc) {
this.errorDesc = errorDesc;
}
public String getData() {
return this.data;
}
public void setData(String data) {
this.data = data;
}
public Boolean getSuccess() {
return this.success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public String getTraceId() {
return this.traceId;
}
public void setTraceId(String traceId) {
this.traceId = traceId;
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
@Override
public RecreateTableResponse getInstance(UnmarshallerContext context) {
return RecreateTableResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
b481dbbf2e4327ac6a8f58ce1c78a89cde236023 | 71b919749069accbdbfc35f7dba703dd5c5780a6 | /learn-test/src/main/java/com/xp/basics/thread/DeadLock/RearrangementDeadLock.java | bf7e8eb2a47ab1bbf76f71259644f704394694dd | [
"MIT"
] | permissive | xp-zhao/learn-java | 489f811acf20649b773032a6831fbfc72dc4c418 | 108dcf1e4e02ae76bfd09e7c2608a38a1216685c | refs/heads/master | 2023-09-01T03:07:23.795372 | 2023-08-25T08:28:59 | 2023-08-25T08:28:59 | 118,060,929 | 2 | 0 | MIT | 2022-06-21T04:16:08 | 2018-01-19T01:39:11 | Java | UTF-8 | Java | false | false | 804 | java | package com.xp.basics.thread.DeadLock;
/**
* Created by xp-zhao on 2018/10/9.
*/
public class RearrangementDeadLock
{
private boolean flag = false;
private int a = 1;
private int result = -1;
public void write(){
a = 2;
flag = true;
}
public void read()
{
if(flag){
result = a * 3;
}
System.out.println("result: "+result);
}
private class ReadWriteThread extends Thread{
private boolean flag;
public ReadWriteThread(boolean flag){
this.flag = flag;
}
@Override
public void run(){
if(flag){
write();
}else {
read();
}
}
}
public static void main(String[] args)
{
RearrangementDeadLock deadLock = new RearrangementDeadLock();
deadLock.new ReadWriteThread(true).start(); // 写
deadLock.new ReadWriteThread(false).start(); // 读
}
}
| [
"13688396271@163.com"
] | 13688396271@163.com |
81f3ff259a656b4ff31e4c8b345a2d247ec9d3ef | a770e95028afb71f3b161d43648c347642819740 | /sources/org/telegram/ui/Cells/ChatMessageCell$$ExternalSyntheticLambda0.java | 051274f239c11b1ad6c298034615588169710c80 | [] | no_license | Edicksonjga/TGDecompiledBeta | d7aa48a2b39bbaefd4752299620ff7b72b515c83 | d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b | refs/heads/master | 2023-08-25T04:12:15.592281 | 2021-10-28T20:24:07 | 2021-10-28T20:24:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 641 | java | package org.telegram.ui.Cells;
import android.animation.ValueAnimator;
public final /* synthetic */ class ChatMessageCell$$ExternalSyntheticLambda0 implements ValueAnimator.AnimatorUpdateListener {
public final /* synthetic */ ChatMessageCell f$0;
public final /* synthetic */ boolean f$1;
public /* synthetic */ ChatMessageCell$$ExternalSyntheticLambda0(ChatMessageCell chatMessageCell, boolean z) {
this.f$0 = chatMessageCell;
this.f$1 = z;
}
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
this.f$0.lambda$createStatusDrawableAnimator$1(this.f$1, valueAnimator);
}
}
| [
"fabian_pastor@msn.com"
] | fabian_pastor@msn.com |
a65debd2c6f3a2bee94b72ba70c164b01e04d1e1 | f8158ef2ac4eb09c3b2762929e656ba8a7604414 | /google-ads/src/test/java/com/google/ads/googleads/v1/services/MockCampaignCriterionSimulationService.java | 686c0331d1ca9bd292300b30ab3d8b8264a1cc72 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | alejagapatrick/google-ads-java | 12e89c371c730a66a7735f87737bd6f3d7d00e07 | 75591caeabcb6ea716a6067f65501d3af78804df | refs/heads/master | 2020-05-24T15:50:40.010030 | 2019-05-13T12:10:17 | 2019-05-13T12:10:17 | 187,341,544 | 1 | 0 | null | 2019-05-18T09:56:19 | 2019-05-18T09:56:19 | null | UTF-8 | Java | false | false | 1,679 | java | /*
* Copyright 2019 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.v1.services;
import com.google.api.core.BetaApi;
import com.google.api.gax.grpc.testing.MockGrpcService;
import com.google.protobuf.GeneratedMessageV3;
import io.grpc.ServerServiceDefinition;
import java.util.List;
@javax.annotation.Generated("by GAPIC")
@BetaApi
public class MockCampaignCriterionSimulationService implements MockGrpcService {
private final MockCampaignCriterionSimulationServiceImpl serviceImpl;
public MockCampaignCriterionSimulationService() {
serviceImpl = new MockCampaignCriterionSimulationServiceImpl();
}
@Override
public List<GeneratedMessageV3> getRequests() {
return serviceImpl.getRequests();
}
@Override
public void addResponse(GeneratedMessageV3 response) {
serviceImpl.addResponse(response);
}
@Override
public void addException(Exception exception) {
serviceImpl.addException(exception);
}
@Override
public ServerServiceDefinition getServiceDefinition() {
return serviceImpl.bindService();
}
@Override
public void reset() {
serviceImpl.reset();
}
}
| [
"nbirnie@google.com"
] | nbirnie@google.com |
c364d326b815e27f9194e0b81b17164a4df01e0d | 96f50632c678f7a6232e9fdb5ccd9b5de2288279 | /app/src/main/java/com/tshang/peipei/activity/mine/MineDirctorySdcPhotosListActivity.java | d4ae0750c36255cfdd95590d9ac6cd5a9cf9f097 | [] | no_license | iuvei/peipei | 629c17c2f8ddee98d4747d2cbec37b2209e78af4 | 0497dc9389287664e96e9d14381cd6078e114979 | refs/heads/master | 2020-11-26T22:20:32.990823 | 2019-03-16T07:19:40 | 2019-03-16T07:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,908 | java | package com.tshang.peipei.activity.mine;
import java.util.List;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.TextView;
import com.path.android.jobqueue.JobManager;
import com.tshang.peipei.R;
import com.tshang.peipei.activity.BAApplication;
import com.tshang.peipei.activity.BaseActivity;
import com.tshang.peipei.base.BaseUtils;
import com.tshang.peipei.base.babase.BAConstants;
import com.tshang.peipei.model.biz.jobs.ListAPathPhotosJob;
import com.tshang.peipei.model.entity.AlbumEntity;
import de.greenrobot.event.EventBus;
/**
* @Title: 上传相片
*
* @Description: 读取SDC 所有相片列表,很多界面都会共用到该类
*
* @author allen
*
* @version V1.0
*/
public class MineDirctorySdcPhotosListActivity extends BaseActivity implements OnItemClickListener {
// private static final int ERROR = -1;
// private static final int CREATE_ALBUM = 1;
// private static final int GET_ALBUM_LIST = 2;
private boolean isWrite;//是否为写贴
private ListView mListView;
private TextView mTitle;
private JobManager mJobManager;
private MineDirectorySdcPhotosListAdapter mAdapter = null;
private int mAlbumId;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
mAlbumId = intent.getIntExtra(BAConstants.IntentType.ALBUMACTIVITY_ALBUMID, mAlbumId);
isWrite = intent.getBooleanExtra(BAConstants.IntentType.SPACEWRITEACTIVITY_PHOTOLIST, false);
initUI();
mAdapter = new MineDirectorySdcPhotosListAdapter(this);
mListView.setAdapter(mAdapter);
setListener();
// File path = Environment.getExternalStorageDirectory();// 获得SD卡路径
mJobManager = BAApplication.getInstance().getJobManager();
// final File[] files = path.listFiles();// 读取
mJobManager.addJobInBackground(new ListAPathPhotosJob(this));
}
@Override
protected void onDestroy() {
super.onDestroy();
}
private void initUI() {
mBackText = (TextView) findViewById(R.id.title_tv_left);
mBackText.setText(R.string.chose_album);
mBackText.setOnClickListener(this);
mTitle = (TextView) findViewById(R.id.title_tv_mid);
mTitle.setText(R.string.chose_album);
mTitle.setText(R.string.photo_album);
mListView = (ListView) findViewById(R.id.sdc_photos_listview);
}
private void setListener() {
mListView.setOnItemClickListener(this);
}
@Override
public void onClick(View v) {
super.onClick(v);
switch (v.getId()) {
case R.id.photo_album_manage:
clickManage();
break;
case R.id.photo_album_delete:
clickDelete();
break;
case R.id.photo_album_cancel:
clickCancel();
break;
default:
break;
}
}
//由于多个界面会共用一个相片选择类,所以会有比较多的传值,根据不同的传值判断是上传还是写贴,或者其它操作
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
List<AlbumEntity> lists = mAdapter.getList();
if (lists != null && !lists.isEmpty()) {
Intent intent = new Intent(this, MineAllSdcPhotosActivity.class);
//*********************上传相片******************************//
//传相册ID
intent.putExtra(BAConstants.IntentType.ALBUMACTIVITY_ALBUMID, mAlbumId);
//传相片列表
intent.putExtra(BAConstants.IntentType.DIRECTORYSDCPHOTOLISTACTIVITY_PHOTOLIST, lists.get(position));
//*********************上传相片******************************//
//*********************写贴*********************************//
intent.putExtra(BAConstants.IntentType.SPACEWRITEACTIVITY_PHOTOLIST, isWrite);
int size = this.getIntent().getIntExtra(MineWriteActivity.SIZE, 0);
intent.putExtra(MineWriteActivity.SIZE, size);
//*********************写贴*********************************//
startActivity(intent);
overridePendingTransition(R.anim.popwin_bottom_in, R.anim.popwin_bottom_out);
}
}
public void onEventMainThread(String loading) {
BaseUtils.showDialog(this, R.string.loading);
}
public void onEventMainThread(List<AlbumEntity> list) {
mAdapter.setList(list);
BaseUtils.cancelDialog();
}
private void clickManage() {
setBottomTab(true);
}
private void clickDelete() {
}
private void clickCancel() {
setBottomTab(false);
}
private void setBottomTab(boolean b) {}
@Override
protected void initData() {
// TODO Auto-generated method stub
}
@Override
protected void initRecourse() {
// TODO Auto-generated method stub
}
@Override
protected int initView() {
return R.layout.activity_sdc_photos_listview;
}
}
| [
"xumin2@evergrande.com"
] | xumin2@evergrande.com |
972b804d11e7ffdd3bdd3a2d73864950e31b5ec6 | 28782d17391ff43d9e23e43302969ea8f3a4f284 | /java/com/bumptech/glide/i/g.java | 769d262e42e7a81b93ff21373b743b2f1f3bd5f3 | [] | no_license | UltraSoundX/Fucking-AJN-APP | 115f7c2782e089c48748516b77e37266438f998b | 11354917502f442ab212e5cada168a8031b48436 | refs/heads/master | 2021-05-19T11:05:42.588930 | 2020-03-31T16:27:26 | 2020-03-31T16:27:26 | 251,662,642 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 941 | java | package com.bumptech.glide.i;
/* compiled from: MultiClassKey */
public class g {
private Class<?> a;
private Class<?> b;
public g() {
}
public g(Class<?> cls, Class<?> cls2) {
a(cls, cls2);
}
public void a(Class<?> cls, Class<?> cls2) {
this.a = cls;
this.b = cls2;
}
public String toString() {
return "MultiClassKey{first=" + this.a + ", second=" + this.b + '}';
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
g gVar = (g) obj;
if (!this.a.equals(gVar.a)) {
return false;
}
if (!this.b.equals(gVar.b)) {
return false;
}
return true;
}
public int hashCode() {
return (this.a.hashCode() * 31) + this.b.hashCode();
}
}
| [
"haroldxin@foxmail.com"
] | haroldxin@foxmail.com |
e6fd0472bb31fb5e5c9b0541b7d043e77b2196af | b1777cdd32220245bda08ac0a57146baf41a615a | /app/src/main/java/spinfotech/androidresearchdev/spm/adapters/amitAdapters/CommonAdapter.java | 0901523d26eb68eb41c66f74bb2cd37860583f54 | [] | no_license | spdobest/Androoid-RND | 74899367c3d2f9ae2351f582eb2c6906d53b3fae | c4f8bf0c7b6ab36d32f5917a19d8ee0de04d9336 | refs/heads/master | 2021-07-01T11:32:42.733526 | 2017-09-22T14:01:19 | 2017-09-22T14:01:19 | 100,625,130 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,647 | java | package spinfotech.androidresearchdev.spm.adapters.amitAdapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
import spinfotech.androidresearchdev.R;
import spinfotech.androidresearchdev.spm.adapters.viewholders.ViewHolderDefault;
import spinfotech.androidresearchdev.spm.adapters.viewholders.ViewHolderFooter;
import spinfotech.androidresearchdev.spm.adapters.viewholders.ViewHolderHeader;
import spinfotech.androidresearchdev.spm.adapters.viewholders.ViewHolderManager;
import spinfotech.androidresearchdev.spm.adapters.viewholders.ViewHolderPopularImage;
import spinfotech.androidresearchdev.spm.listeners.OnRecyclerItemClickListener;
import spinfotech.androidresearchdev.spm.model.ModelHeader;
import spinfotech.androidresearchdev.spm.utility.Constants;
/**
* Created by sibaprasad on 23/06/17.
*/
public class CommonAdapter extends RecyclerView.Adapter< RecyclerView.ViewHolder > {
private static final String TAG = "CommonRecyclerViewAdapt";
int rowType = -1;
List< Object > objectList;
boolean isRowPreFixed = true;
OnRecyclerItemClickListener onRecyclerItemClickListener;
int visiblePosition = -1;
LayoutInflater mInflater;
public CommonAdapter( Context context, List< Object > listData, int rowType, OnRecyclerItemClickListener onRecyclerItemClickListener ) {
super();
this.objectList = listData;
this.rowType = rowType;
this.isRowPreFixed = isRowPreFixed;
this.onRecyclerItemClickListener = onRecyclerItemClickListener;
mInflater = LayoutInflater.from( context );
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder( ViewGroup parent, int viewType ) {
RecyclerView.ViewHolder holder = null;
View view;
switch ( viewType ) {
case Constants.ROW_PENDING:
view = mInflater
.inflate( R.layout.row_item_header, parent, false );
holder = new ViewHolderHeader( view );
break;
case Constants.ROW_COMPLETED:
view = mInflater
.inflate( R.layout.row_item_footer, parent, false );
holder = new ViewHolderFooter( view );
break;
case Constants.ROW_UPCOMMING:
view = mInflater
.inflate( R.layout.row_item_popular_image, parent, false );
holder = new ViewHolderPopularImage( view );
break;
default:
view = mInflater
.inflate( R.layout.row_item_default, parent, false );
holder = new ViewHolderDefault( view );
}
return holder;
}
@Override
public void onBindViewHolder( RecyclerView.ViewHolder holder, int position ) {
Object object = objectList.get( position );
switch ( holder.getItemViewType() ) {
case Constants.ROW_PENDING:
ViewHolderHeader viewHolderHeader = (ViewHolderHeader)holder;
/*ModelHeader modelHeader = (ModelHeader )object;
viewHolderHeader.setData( modelHeader );*/
break;
case Constants.ROW_COMPLETED:
break;
case Constants.ROW_UPCOMMING:
break;
}
}
@Override
public int getItemViewType( int position ) {
return rowType;
/*int TYPE = 0;
if ( isRowPreFixed ) {
return rowType;
}
else {
rowType = ViewHolderManager.getRowType( objectList.get( position ) );
}
return rowType;*/
}
@Override
public int getItemCount() {
return objectList.size();
}
public void setVisiblePosition( int completelyVisibleposition ) {
this.visiblePosition = completelyVisibleposition;
notifyDataSetChanged();
}
public void setDataAndRow( List< Object > listData, int rowType ) {
this.objectList = listData;
this.rowType = rowType;
notifyDataSetChanged();
}
} | [
"sp.dobest@gmail.com"
] | sp.dobest@gmail.com |
c24507ff8405bc565f50ef51ac18677f363f2728 | cbed3c6638413ef324d4477622208d199ee69c15 | /app/src/main/java/org/lasque/tusdkvideodemo/views/cosmetic/panel/eyebrow/EyebrowAdapter.java | f93b4544ab8a01908717993a8a29db69ce19e4e5 | [] | no_license | upkool/Android-short-video | 9236a50f515bd6f82a3e49a893b89c86bee84bd8 | e22a4f22cda2e1c2a524c4f79926f6598b726e50 | refs/heads/master | 2023-02-20T03:50:03.511862 | 2021-01-21T01:41:49 | 2021-01-21T01:41:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,111 | java | package org.lasque.tusdkvideodemo.views.cosmetic.panel.eyebrow;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.upyun.shortvideo.R;
import org.lasque.tusdkvideodemo.views.cosmetic.BaseCosmeticAdapter;
import org.lasque.tusdkvideodemo.views.cosmetic.CosmeticTypes;
import java.util.List;
/**
* TuSDK
* org.lasque.tusdkvideodemo.views.cosmetic.panel.eyebrow
* droid-sdk-video-refresh
*
* @author H.ys
* @Date 2020/10/20 16:26
* @Copyright (c) 2020 tusdk.com. All rights reserved.
*/
public class EyebrowAdapter extends BaseCosmeticAdapter<CosmeticTypes.EyebrowType, EyebrowAdapter.EyebrowViewHolder> {
private CosmeticTypes.EyebrowState mCurrentState = CosmeticTypes.EyebrowState.MistEyebrow;
protected EyebrowAdapter(List<CosmeticTypes.EyebrowType> itemList, Context context) {
super(itemList, context);
}
@Override
protected EyebrowViewHolder onChildCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new EyebrowViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_lipstrick_layout, parent,false));
}
@Override
protected void onChildBindViewHolder(@NonNull final EyebrowViewHolder holder, final int position, final CosmeticTypes.EyebrowType item) {
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mOnClickListener != null){
mOnClickListener.onItemClick(position,holder,item);
}
}
});
Glide.with(mContext).load(
mCurrentState == CosmeticTypes.EyebrowState.MistEyebrow ?
item.mMistIconId:item.mMistyIconId
).apply(RequestOptions.circleCropTransform()).into(holder.mIcon);
holder.mTitle.setText(item.mTitleId);
if (mCurrentPos == position){
holder.mSelect.setVisibility(View.VISIBLE);
holder.mIcon.setColorFilter(Color.parseColor("#ffcc00"));
} else {
holder.mSelect.setVisibility(View.GONE);
holder.mIcon.clearColorFilter();
}
}
public void setState(CosmeticTypes.EyebrowState state){
this.mCurrentState = state;
notifyDataSetChanged();
}
public static class EyebrowViewHolder extends RecyclerView.ViewHolder{
public ImageView mIcon;
public TextView mTitle;
public ImageView mSelect;
public EyebrowViewHolder(@NonNull View itemView) {
super(itemView);
mIcon = itemView.findViewById(R.id.lsq_cosmetic_item_icon);
mTitle = itemView.findViewById(R.id.lsq_cosmetic_item_title);
mSelect = itemView.findViewById(R.id.lsq_cosmetic_item_sel);
}
}
}
| [
"mingming.ye@upai.com"
] | mingming.ye@upai.com |
389251dce0f985a87fd6854c366a580c0227387c | 5cb1edecfd5fadb32a5c780bf2b8d41f97169267 | /Themes/05. Arrays/Program.java | c5bc8e00c246f9de2a65a9df6f9f04c26927e099 | [] | no_license | MarselSidikov/ARSLAN_REPO | fa6818611dda89022b53624343ae8cb3fe8a2793 | dc93b6b379f323816258a7900e1e6c8fe247ba6a | refs/heads/master | 2020-03-23T05:39:42.727584 | 2018-07-27T14:29:26 | 2018-07-27T14:29:26 | 141,158,924 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,050 | java | import java.util.Scanner;
import java.util.Arrays;
class Program {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// вводим размер массива
int arraySize = scanner.nextInt();
// объявили массив элементов
int array[] = new int[arraySize];
// какие элементы хранятся в массиве сейчас?
// array[0] = 0
// array[1] = 0
// array[2] = 0 и т.д.
// то есть изначально массив 0
// считать несколько элементов в массив
/**
int i = 0;
while (i < 5) {
array[i] = scanner.nextInt();
i++;
}
**/
for (int i = 0; i < array.length; i++) {
array[i] = scanner.nextInt();
}
// обнулить все четные элементы
for (int i = 0; i < array.length; i++) {
if (array[i] % 2 != 0) {
System.out.print(array[i] + " ");
}
}
// вывод массива на экран
// System.out.println(Arrays.toString(array));
}
} | [
"sidikov.marsel@gmail.com"
] | sidikov.marsel@gmail.com |
d20037f01dbdfdc4ea1a7a6b27eb3de29db18e01 | e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f | /MazeMode/src/com/puttysoftware/mazemode/game/ScoreTracker.java | c6eb45721aefa31ba1f32807eb78c65df3e24649 | [
"Unlicense"
] | permissive | retropipes/older-java-games | 777574e222f30a1dffe7936ed08c8bfeb23a21ba | 786b0c165d800c49ab9977a34ec17286797c4589 | refs/heads/master | 2023-04-12T14:28:25.525259 | 2021-05-15T13:03:54 | 2021-05-15T13:03:54 | 235,693,016 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,451 | java | /* MazeMode: A Maze-Solving Game
Copyright (C) 2008-2010 Eric Ahnell
Any questions should be directed to the author via email at: products@puttysoftware.com
*/
package com.puttysoftware.mazemode.game;
import java.io.File;
import com.puttysoftware.mazemode.CommonDialogs;
import com.puttysoftware.mazemode.maze.Extension;
import com.puttysoftware.scoremanager.SavedScoreManager;
import com.puttysoftware.scoremanager.ScoreManager;
public class ScoreTracker {
// Fields
private String scoresFile;
private SavedScoreManager ssMgr;
private long score;
private static final String MAC_PREFIX = "HOME";
private static final String WIN_PREFIX = "APPDATA";
private static final String UNIX_PREFIX = "HOME";
private static final String MAC_DIR = "/Library/Application Support/Putty Software/MazeMode/Scores/";
private static final String WIN_DIR = "\\Putty Software\\MazeMode\\Scores\\";
private static final String UNIX_DIR = "/.mazemode/scores/";
// Constructors
public ScoreTracker() {
this.scoresFile = "";
this.score = 0L;
this.ssMgr = null;
}
// Methods
public boolean checkScore() {
return this.ssMgr.checkScore(this.score);
}
public void commitScore() {
final boolean result = this.ssMgr.addScore(this.score);
if (result) {
this.ssMgr.viewTable();
}
}
public void resetScore() {
this.score = 0L;
}
public void resetScore(final String filename) {
this.setScoreFile(filename);
this.score = 0L;
}
public void setScoreFile(final String filename) {
// Check filename argument
if (filename != null) {
if (filename.equals("")) {
throw new IllegalArgumentException("Filename cannot be empty!");
}
} else {
throw new IllegalArgumentException("Filename cannot be null!");
}
// Make sure the needed directories exist first
final File sf = ScoreTracker.getScoresFile(filename);
final File parent = new File(sf.getParent());
if (!parent.exists()) {
final boolean success = parent.mkdirs();
if (!success) {
throw new RuntimeException(
"Couldn't make directories for scores file!");
}
}
this.scoresFile = sf.getAbsolutePath();
this.ssMgr = new SavedScoreManager(1, 10,
ScoreManager.SORT_ORDER_ASCENDING, 0L, "MazeMode High Scores",
new String[] { "points" }, this.scoresFile);
}
public void addToScore(final long value) {
this.score += value;
}
public long getScore() {
return this.score;
}
public void setScore(final long newScore) {
this.score = newScore;
}
public String getScoreUnits() {
return "points";
}
public void showCurrentScore() {
CommonDialogs
.showDialog("Your current score: " + this.score + " points");
}
public void showScoreTable() {
this.ssMgr.viewTable();
}
private static String getScoreDirPrefix() {
final String osName = System.getProperty("os.name");
if (osName.indexOf("Mac OS X") != -1) {
// Mac OS X
return System.getenv(ScoreTracker.MAC_PREFIX);
} else if (osName.indexOf("Windows") != -1) {
// Windows
return System.getenv(ScoreTracker.WIN_PREFIX);
} else {
// Other - assume UNIX-like
return System.getenv(ScoreTracker.UNIX_PREFIX);
}
}
private static String getScoreDirectory() {
final String osName = System.getProperty("os.name");
if (osName.indexOf("Mac OS X") != -1) {
// Mac OS X
return ScoreTracker.MAC_DIR;
} else if (osName.indexOf("Windows") != -1) {
// Windows
return ScoreTracker.WIN_DIR;
} else {
// Other - assume UNIX-like
return ScoreTracker.UNIX_DIR;
}
}
private static File getScoresFile(final String filename) {
final StringBuilder b = new StringBuilder();
b.append(ScoreTracker.getScoreDirPrefix());
b.append(ScoreTracker.getScoreDirectory());
b.append(filename);
b.append(Extension.getScoresExtensionWithPeriod());
return new File(b.toString());
}
}
| [
"eric.ahnell@puttysoftware.com"
] | eric.ahnell@puttysoftware.com |
66806d5f1411423d4d195db9ceb3f344363c40f5 | cbd295c2ec9bfe30bf2213295c52131b17655452 | /GCMDemo/src/com/antoinecampbell/gcmdemo/AccountDialogFragment.java | 732c42e98cb4723829bfb10b153898bcd2b194d4 | [] | no_license | ramazanfirin/GcmDemo | 937e8f046f852e22bfa0e568ce0b2dc20abb5f90 | d56384b2f81d61b4960d4b83d0ef80e45029188f | refs/heads/master | 2020-04-07T06:17:50.547624 | 2015-05-11T06:47:46 | 2015-05-11T06:47:46 | 35,407,077 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,113 | java | package com.antoinecampbell.gcmdemo;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
/**
* Example dialog that can be used to retrieve an Account from the user's device
*
* @author Antoine
*
*/
public class AccountDialogFragment extends DialogFragment
{
private Account[] mAccounts;
private AccountSelectionListener mListener;
public interface AccountSelectionListener
{
public void onAccountSelected(Account account);
public void onDialogCanceled();
}
static AccountDialogFragment newInstance(AccountSelectionListener listener)
{
AccountDialogFragment dialogFragment = new AccountDialogFragment();
dialogFragment.setAccountSelectedListener(listener);
Bundle bundle = new Bundle();
dialogFragment.setArguments(bundle);
return dialogFragment;
}
/**
* Set the {@code AccountSelectionListener}
*
* @param listener
*/
public void setAccountSelectedListener(AccountSelectionListener listener)
{
mListener = listener;
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState)
{
mAccounts = AccountManager.get(getActivity()).getAccounts();
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle("Select an account");
builder.setCancelable(false);
int size = mAccounts.length;
String[] names = new String[size];
for (int i = 0; i < size; i++)
{
names[i] = mAccounts[i].name;
}
builder.setItems(names, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
// When the user selects an Account inform the listener
if (mListener != null)
{
mListener.onAccountSelected(mAccounts[which]);
}
}
});
return builder.create();
}
@Override
public void onCancel(DialogInterface dialog)
{
super.onCancel(dialog);
if (mListener != null)
{
mListener.onDialogCanceled();
}
}
}
| [
"ramazan_firin@hotmail.com"
] | ramazan_firin@hotmail.com |
e26979c897e84c0fb18c3ec0b329dff19184ed29 | d67f6450b24fb08f2f61b74dcdecce3025ee3efc | /gemp-swccg-logic/src/main/java/com/gempukku/swccgo/logic/effects/CancelGameTextUntilEndOfBattleEffect.java | 125fb5839c2d5c8c5d947fd557479fac99221b39 | [
"MIT"
] | permissive | cburyta/gemp-swccg-public | 00a974d042195e69d3c104e61e9ee5bd48728f9a | 05529086de91ecb03807fda820d98ec8a1465246 | refs/heads/master | 2023-01-09T12:45:33.347296 | 2020-10-26T14:39:28 | 2020-10-26T14:39:28 | 309,400,711 | 0 | 0 | MIT | 2020-11-07T04:57:04 | 2020-11-02T14:47:59 | null | UTF-8 | Java | false | false | 2,688 | java | package com.gempukku.swccgo.logic.effects;
import com.gempukku.swccgo.filters.Filter;
import com.gempukku.swccgo.filters.Filters;
import com.gempukku.swccgo.game.ActionsEnvironment;
import com.gempukku.swccgo.game.PhysicalCard;
import com.gempukku.swccgo.game.SwccgGame;
import com.gempukku.swccgo.game.state.GameState;
import com.gempukku.swccgo.logic.GameUtils;
import com.gempukku.swccgo.logic.modifiers.CancelsGameTextModifier;
import com.gempukku.swccgo.logic.modifiers.ModifiersEnvironment;
import com.gempukku.swccgo.logic.modifiers.ModifiersQuerying;
import com.gempukku.swccgo.logic.timing.AbstractSuccessfulEffect;
import com.gempukku.swccgo.logic.timing.Action;
import com.gempukku.swccgo.logic.timing.results.CanceledGameTextResult;
/**
* An effect to cancel the game text of a card until the end of the turn.
*/
public class CancelGameTextUntilEndOfBattleEffect extends AbstractSuccessfulEffect {
private PhysicalCard _targetCard;
/**
* Creates an effect that cancels the game text of a card until end of the turn.
* @param action the action performing this effect
* @param targetCard the card whose game text is canceled
*/
public CancelGameTextUntilEndOfBattleEffect(Action action, PhysicalCard targetCard) {
super(action);
_targetCard = targetCard;
}
@Override
protected void doPlayEffect(SwccgGame game) {
GameState gameState = game.getGameState();
ModifiersQuerying modifiersQuerying = game.getModifiersQuerying();
// Check if card's game text may not be canceled
if (modifiersQuerying.isProhibitedFromHavingGameTextCanceled(gameState, _targetCard)) {
gameState.sendMessage(GameUtils.getCardLink(_targetCard) + "'s game text is not allowed to being canceled");
return;
}
ActionsEnvironment actionsEnvironment = game.getActionsEnvironment();
ModifiersEnvironment modifiersEnvironment = game.getModifiersEnvironment();
PhysicalCard source = _action.getActionSource();
gameState.sendMessage(GameUtils.getCardLink(_targetCard) + "'s game text is canceled until end of the turn");
gameState.cardAffectsCard(_action.getPerformingPlayer(), source, _targetCard);
// Filter for same card while it is in play
Filter cardFilter = Filters.and(Filters.sameCardId(_targetCard), Filters.in_play);
_targetCard.setGameTextCanceled(true);
modifiersEnvironment.addUntilEndOfBattleModifier(
new CancelsGameTextModifier(source, cardFilter));
actionsEnvironment.emitEffectResult(new CanceledGameTextResult(_action.getPerformingPlayer(), _targetCard));
}
}
| [
"andrew@bender.io"
] | andrew@bender.io |
168b098db67d16fbb5a22f6796abe1b84f2c0300 | 82c0ce2a316363a4109b7ee843dc4c2ab0e2b77f | /src/main/java/jene/rna/ExpressionModelType.java | ca95c40ef372b09c1f29ce1dcd4db02c79132474 | [
"Apache-2.0"
] | permissive | tipplerow/jene | 360fca68b4b2e1e1cdf1148bb3f6095bfff20179 | 15e01e12bd0ebf35831a8159c7830d3d19ffe465 | refs/heads/master | 2023-01-25T01:49:37.360666 | 2020-12-05T18:29:58 | 2020-12-05T18:29:58 | 291,793,348 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 547 | java |
package jene.rna;
/**
* Enumerates types of RNA expression profile models.
*/
public enum ExpressionModelType {
/**
* One aggregate expression profile applies to an entire cohort
* (typically the median expression within another proxy cohort).
*/
AGGREGATE,
/**
* Expression profiles are uniform within a cancer type (typically
* computed as the median expression of a cancer-specific cohort).
*/
CANCER_TYPE,
/**
* Each tumor has a unique expression profile.
*/
INDIVIDUAL;
}
| [
"jsshaff@berkeley.edu"
] | jsshaff@berkeley.edu |
2e37fc4086e4b082e11b1227afc908dbae4ab7b6 | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/appbrand/m/c/f.java | 88e936278d0fb3bd32d22e454eae4f732fa4c4af | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,514 | java | package com.tencent.mm.plugin.appbrand.m.c;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.aa.g;
import com.tencent.mm.aa.i;
import com.tencent.mm.plugin.appbrand.m.a.b;
import com.tencent.mm.plugin.appbrand.m.a.c;
import com.tencent.mm.sdk.platformtools.ab;
public final class f extends b
{
public final void a(i parami, c paramc)
{
AppMethodBeat.i(102197);
try
{
int i = parami.getInt("level");
parami = parami.optString("message");
switch (i)
{
default:
ab.d("MicroMsg.NodeJs", parami);
AppMethodBeat.o(102197);
case 2:
while (true)
{
return;
ab.i("MicroMsg.NodeJs", parami);
AppMethodBeat.o(102197);
}
case 3:
case 4:
}
}
catch (g parami)
{
while (true)
{
ab.e("MicroMsg.NodeToXLog", "execute exception : %s", new Object[] { parami });
paramc.aIU();
AppMethodBeat.o(102197);
continue;
ab.w("MicroMsg.NodeJs", parami);
AppMethodBeat.o(102197);
continue;
ab.e("MicroMsg.NodeJs", parami);
AppMethodBeat.o(102197);
}
}
}
public final int aIT()
{
return 4;
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.appbrand.m.c.f
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
38c5414c8bb753ece3cc719dd3a273d2d67fe9c4 | 7b3651fd7af9697566257e4849ce9e109b01fb29 | /src/main/java/com/homurax/chapter05/indexing/serial/SerialIndexing.java | 5cac86300ec659ef559085caf5a280e1296997f2 | [] | no_license | lixiangqi-github/concurrency-learn | 812ac4e20aef9996894db5905ef32605786cd82d | b904d5e9f12e1dadf3e8e99adcf2a6c844f5e453 | refs/heads/master | 2022-02-20T19:16:08.240239 | 2019-10-22T02:08:24 | 2019-10-22T02:08:24 | 256,743,981 | 1 | 0 | null | 2020-04-18T12:07:14 | 2020-04-18T12:07:14 | null | UTF-8 | Java | false | false | 1,480 | java | package com.homurax.chapter05.indexing.serial;
import com.homurax.chapter05.indexing.common.DocumentParser;
import java.io.File;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class SerialIndexing {
public static void main(String[] args) {
File source = new File("src\\main\\java\\com\\homurax\\chapter05\\indexing\\data");
File[] files = source.listFiles();
Map<String, StringBuffer> invertedIndex = new HashMap<>();
long start = System.currentTimeMillis();
for (File file : files) {
DocumentParser parser = new DocumentParser();
if (file.getName().endsWith(".txt")) {
Map<String, Integer> voc = parser.parse(file.getAbsolutePath());
updateInvertedIndex(voc, invertedIndex, file.getName());
}
}
long end = System.currentTimeMillis();
System.out.println("Execution Time: " + (end - start));
System.out.println("invertedIndex: " + invertedIndex.size());
}
private static void updateInvertedIndex(Map<String, Integer> voc,
Map<String, StringBuffer> invertedIndex,
String fileName) {
for (String word : voc.keySet()) {
if (word.length() >= 3) {
invertedIndex.computeIfAbsent(word, k -> new StringBuffer()).append(fileName).append(";");
}
}
}
}
| [
"homuraxenoblade@gmail.com"
] | homuraxenoblade@gmail.com |
ded156b4bde86856b18f0a7537c7ae51c9407d95 | 84fbc1625824ba75a02d1777116fe300456842e5 | /Engagement_Challenges/Engagement_4/airplan_2/source/com/networkapex/chart/BasicData.java | a55b49ffe9d685d298844f7c2563b5d06cdbf6f2 | [] | no_license | unshorn-forks/STAC | bd41dee06c3ab124177476dcb14a7652c3ddd7b3 | 6919d7cc84dbe050cef29ccced15676f24bb96de | refs/heads/master | 2023-03-18T06:37:11.922606 | 2018-04-18T17:01:03 | 2018-04-18T17:01:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,432 | java | package com.networkapex.chart;
import com.networkapex.sort.DefaultComparator;
import com.networkapex.sort.Orderer;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
public class BasicData implements Data {
private HashMap<String, String> data;
public BasicData() {
data = new HashMap<>();
}
public BasicData(int weight) {
this();
data.put("weight", Integer.toString(weight));
}
public BasicData(double weight) {
this();
data.put("weight", Double.toString(weight));
}
public BasicData(BasicData other) {
this.data = new HashMap<>(other.data);
}
public String pull(String key) {
return data.get(key);
}
public void place(String key, String value) {
data.put(key, value);
}
public void delete(String key) {
data.remove(key);
}
public boolean containsKey(String key) {
return data.containsKey(key);
}
public boolean hasData() {
return !data.isEmpty();
}
public Set<String> keyAssign() {
return Collections.unmodifiableSet(data.keySet());
}
@Override
public int size() {
return data.size();
}
public Data copy() {
return new BasicData(this);
}
/**
* Takes in a Document and constructs an Element that characterizes this BasicData
* in XML
*
* @param dom
* @return Element of BasicData
*/
public Element generateXMLElement(Document dom) {
Element basicDataEle = dom.createElement("data");
for (String key : data.keySet()) {
generateXMLElementHome(dom, basicDataEle, key);
}
return basicDataEle;
}
private void generateXMLElementHome(Document dom, Element basicDataEle, String key) {
Element dataEle = dom.createElement("entry");
dataEle.setTextContent(data.get(key));
dataEle.setAttribute("key", key);
basicDataEle.appendChild(dataEle);
}
@Override
public String toString() {
StringBuilder ret = new StringBuilder();
ret.append("\n {");
Orderer<String> sorter = new Orderer<>(DefaultComparator.STRING);
List<String> sortedKeys = sorter.rank(data.keySet());
for (int p = 0; p < sortedKeys.size(); p++) {
toStringExecutor(ret, sortedKeys, p);
}
ret.append("}");
return ret.toString();
}
private void toStringExecutor(StringBuilder ret, List<String> sortedKeys, int q) {
String key = sortedKeys.get(q);
ret.append(" ");
ret.append(key);
ret.append(" : ");
ret.append(data.get(key));
ret.append(",");
}
@Override
public int hashCode() {
return data.hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj.getClass() != this.getClass()) {
return false;
}
BasicData other = (BasicData) obj;
if (size() == other.size()) {
return equalsEngine(other);
}
return false;
}
private boolean equalsEngine(BasicData other) {
for (String key : data.keySet()) {
if (!data.get(key).equals(other.data.get(key))) {
return false;
}
}
return true;
}
}
| [
"rborbely@cyberpointllc.com"
] | rborbely@cyberpointllc.com |
2578421e4a0e89c0b48bf2746f8f9018138bf1bd | 47e4d883a939b4b9961ba2a9387b1d4616bbc653 | /src/org/sxb/config/Interceptors.java | c159a1660d3d0a0a681ce793fa519224d542541e | [] | no_license | jeffson1985/sxb | 196f5e4e29072bf060467f2f8cd312b76b2af124 | addf8debad2449cf1bc5920c7fd7ea87ab0855f0 | refs/heads/master | 2020-05-29T16:56:44.582291 | 2015-09-09T01:18:04 | 2015-09-09T01:18:04 | 42,148,048 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,099 | java | /**
* Copyright (c) 2011-2015, Jeff Son (jeffson.app@gmail.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.sxb.config;
import java.util.ArrayList;
import java.util.List;
import org.sxb.aop.Interceptor;
import org.sxb.aop.InterceptorBuilder;
/**
* The Interceptors is used to config global action interceptors and global service interceptors.
*/
final public class Interceptors {
private final List<Interceptor> globalActionInterceptor = new ArrayList<Interceptor>();
/**
* The same as addGlobalActionInterceptor. It is used to compatible with earlier version of sxb
*/
public Interceptors add(Interceptor globalActionInterceptor) {
if (globalActionInterceptor != null)
this.globalActionInterceptor.add(globalActionInterceptor);
return this;
}
/**
* Add the global action interceptor to intercept all the actions.
*/
public void addGlobalActionInterceptor(Interceptor globalActionInterceptor) {
if (globalActionInterceptor != null)
this.globalActionInterceptor.add(globalActionInterceptor);
}
/**
* Add the global service interceptor to intercept all the method enhanced by aop Enhancer.
*/
public void addGlobalServiceInterceptor(Interceptor globalServiceInterceptor) {
if (globalServiceInterceptor != null)
InterceptorBuilder.addGlobalServiceInterceptor(globalServiceInterceptor);
}
public Interceptor[] getGlobalActionInterceptor() {
return globalActionInterceptor.toArray(new Interceptor[globalActionInterceptor.size()]);
}
}
| [
"kevionsun@gmail.com"
] | kevionsun@gmail.com |
2e4f94c6bf4143e58a006c4033ef6bba0698ae6a | 8a8254c83cc2ec2c401f9820f78892cf5ff41384 | /instrumented-nappa-tfpr/AntennaPod/core/src/main/java/nappatfpr/de/danoeh/antennapod/core/export/html/HtmlWriter.java | 9da96c5bf2f292214b57b11ec75fb26c32e58d29 | [
"MIT"
] | permissive | VU-Thesis-2019-2020-Wesley-Shann/subjects | 46884bc6f0f9621be2ab3c4b05629e3f6d3364a0 | 14a6d6bb9740232e99e7c20f0ba4ddde3e54ad88 | refs/heads/master | 2022-12-03T05:52:23.309727 | 2020-08-19T12:18:54 | 2020-08-19T12:18:54 | 261,718,101 | 0 | 0 | null | 2020-07-11T12:19:07 | 2020-05-06T09:54:05 | Java | UTF-8 | Java | false | false | 2,810 | java | package nappatfpr.de.danoeh.antennapod.core.export.html;
import android.text.TextUtils;
import android.util.Log;
import android.util.Xml;
import org.xmlpull.v1.XmlSerializer;
import java.io.IOException;
import java.io.Writer;
import java.util.List;
import nappatfpr.de.danoeh.antennapod.core.export.ExportWriter;
import nappatfpr.de.danoeh.antennapod.core.feed.Feed;
/** Writes HTML documents. */
public class HtmlWriter implements ExportWriter {
private static final String TAG = "HtmlWriter";
private static final String ENCODING = "UTF-8";
private static final String HTML_TITLE = "AntennaPod Subscriptions";
/**
* Takes a list of feeds and a writer and writes those into an HTML
* document.
*
* @throws IOException
* @throws IllegalStateException
* @throws IllegalArgumentException
*/
@Override
public void writeDocument(List<Feed> feeds, Writer writer)
throws IllegalArgumentException, IllegalStateException, IOException {
Log.d(TAG, "Starting to write document");
XmlSerializer xs = Xml.newSerializer();
xs.setFeature(HtmlSymbols.XML_FEATURE_INDENT_OUTPUT, true);
xs.setOutput(writer);
xs.startDocument(ENCODING, false);
xs.startTag(null, HtmlSymbols.HTML);
xs.startTag(null, HtmlSymbols.HEAD);
xs.startTag(null, HtmlSymbols.TITLE);
xs.text(HTML_TITLE);
xs.endTag(null, HtmlSymbols.TITLE);
xs.endTag(null, HtmlSymbols.HEAD);
xs.startTag(null, HtmlSymbols.BODY);
xs.startTag(null, HtmlSymbols.HEADING);
xs.text(HTML_TITLE);
xs.endTag(null, HtmlSymbols.HEADING);
xs.startTag(null, HtmlSymbols.ORDERED_LIST);
for (Feed feed : feeds) {
xs.startTag(null, HtmlSymbols.LIST_ITEM);
xs.text(feed.getTitle());
if (!TextUtils.isEmpty(feed.getLink())) {
xs.text(" [");
xs.startTag(null, HtmlSymbols.LINK);
xs.attribute(null, HtmlSymbols.LINK_DESTINATION, feed.getLink());
xs.text("Website");
xs.endTag(null, HtmlSymbols.LINK);
xs.text("]");
}
xs.text(" [");
xs.startTag(null, HtmlSymbols.LINK);
xs.attribute(null, HtmlSymbols.LINK_DESTINATION, feed.getDownload_url());
xs.text("Feed");
xs.endTag(null, HtmlSymbols.LINK);
xs.text("]");
xs.endTag(null, HtmlSymbols.LIST_ITEM);
}
xs.endTag(null, HtmlSymbols.ORDERED_LIST);
xs.endTag(null, HtmlSymbols.BODY);
xs.endTag(null, HtmlSymbols.HTML);
xs.endDocument();
Log.d(TAG, "Finished writing document");
}
public String fileExtension() {
return "html";
}
}
| [
"sshann95@outlook.com"
] | sshann95@outlook.com |
91c4ede3d255968d2a6a864c580e7fb82c150f2e | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava7/Foo659Test.java | d8bdbc2206596a2d2509ec5e6ce5f52dc5cc2382 | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 481 | java | package applicationModulepackageJava7;
import org.junit.Test;
public class Foo659Test {
@Test
public void testFoo0() {
new Foo659().foo0();
}
@Test
public void testFoo1() {
new Foo659().foo1();
}
@Test
public void testFoo2() {
new Foo659().foo2();
}
@Test
public void testFoo3() {
new Foo659().foo3();
}
@Test
public void testFoo4() {
new Foo659().foo4();
}
@Test
public void testFoo5() {
new Foo659().foo5();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
4850a5bbd85573e34f0932094207a62550409898 | 447520f40e82a060368a0802a391697bc00be96f | /apks/comparison_qark/com_db_pwcc_dbmobile/classes_dex2jar/android/support/v7/widget/ShareActionProvider.java | a3c19e9a31bf54d2c035d8e3f5c863bb66af5ca7 | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 6,441 | java | package android.support.v7.widget;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources.Theme;
import android.os.Build.VERSION;
import android.support.v4.view.ActionProvider;
import android.support.v7.appcompat.R.attr;
import android.support.v7.appcompat.R.string;
import android.support.v7.content.res.AppCompatResources;
import android.util.TypedValue;
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
import android.view.SubMenu;
import android.view.View;
public class ShareActionProvider
extends ActionProvider
{
private static final int DEFAULT_INITIAL_ACTIVITY_COUNT = 4;
public static final String DEFAULT_SHARE_HISTORY_FILE_NAME = "share_history.xml";
final Context mContext;
private int mMaxShownActivityCount = 4;
private ActivityChooserModel.OnChooseActivityListener mOnChooseActivityListener;
private final ShareMenuItemOnMenuItemClickListener mOnMenuItemClickListener = new ShareMenuItemOnMenuItemClickListener();
OnShareTargetSelectedListener mOnShareTargetSelectedListener;
String mShareHistoryFileName = "share_history.xml";
public ShareActionProvider(Context paramContext)
{
super(paramContext);
this.mContext = paramContext;
}
private void setActivityChooserPolicyIfNeeded()
{
if (this.mOnShareTargetSelectedListener == null) {
return;
}
if (this.mOnChooseActivityListener == null) {
this.mOnChooseActivityListener = new ShareActivityChooserModelPolicy();
}
ActivityChooserModel.get(this.mContext, this.mShareHistoryFileName).setOnChooseActivityListener(this.mOnChooseActivityListener);
}
public boolean hasSubMenu()
{
return true;
}
public View onCreateActionView()
{
ActivityChooserView localActivityChooserView = new ActivityChooserView(this.mContext);
if (!localActivityChooserView.isInEditMode()) {
localActivityChooserView.setActivityChooserModel(ActivityChooserModel.get(this.mContext, this.mShareHistoryFileName));
}
TypedValue localTypedValue = new TypedValue();
this.mContext.getTheme().resolveAttribute(R.attr.actionModeShareDrawable, localTypedValue, true);
localActivityChooserView.setExpandActivityOverflowButtonDrawable(AppCompatResources.getDrawable(this.mContext, localTypedValue.resourceId));
localActivityChooserView.setProvider(this);
localActivityChooserView.setDefaultActionButtonContentDescription(R.string.abc_shareactionprovider_share_with_application);
localActivityChooserView.setExpandActivityOverflowButtonContentDescription(R.string.abc_shareactionprovider_share_with);
return localActivityChooserView;
}
public void onPrepareSubMenu(SubMenu paramSubMenu)
{
paramSubMenu.clear();
ActivityChooserModel localActivityChooserModel = ActivityChooserModel.get(this.mContext, this.mShareHistoryFileName);
PackageManager localPackageManager = this.mContext.getPackageManager();
int i = localActivityChooserModel.getActivityCount();
int j = Math.min(i, this.mMaxShownActivityCount);
for (int k = 0; k < j; k++)
{
ResolveInfo localResolveInfo2 = localActivityChooserModel.getActivity(k);
paramSubMenu.add(0, k, k, localResolveInfo2.loadLabel(localPackageManager)).setIcon(localResolveInfo2.loadIcon(localPackageManager)).setOnMenuItemClickListener(this.mOnMenuItemClickListener);
}
if (j < i)
{
SubMenu localSubMenu = paramSubMenu.addSubMenu(0, j, j, this.mContext.getString(R.string.abc_activity_chooser_view_see_all));
for (int m = 0; m < i; m++)
{
ResolveInfo localResolveInfo1 = localActivityChooserModel.getActivity(m);
localSubMenu.add(0, m, m, localResolveInfo1.loadLabel(localPackageManager)).setIcon(localResolveInfo1.loadIcon(localPackageManager)).setOnMenuItemClickListener(this.mOnMenuItemClickListener);
}
}
}
public void setOnShareTargetSelectedListener(OnShareTargetSelectedListener paramOnShareTargetSelectedListener)
{
this.mOnShareTargetSelectedListener = paramOnShareTargetSelectedListener;
setActivityChooserPolicyIfNeeded();
}
public void setShareHistoryFileName(String paramString)
{
this.mShareHistoryFileName = paramString;
setActivityChooserPolicyIfNeeded();
}
public void setShareIntent(Intent paramIntent)
{
if (paramIntent != null)
{
String str = paramIntent.getAction();
if (("android.intent.action.SEND".equals(str)) || ("android.intent.action.SEND_MULTIPLE".equals(str))) {
updateIntent(paramIntent);
}
}
ActivityChooserModel.get(this.mContext, this.mShareHistoryFileName).setIntent(paramIntent);
}
void updateIntent(Intent paramIntent)
{
if (Build.VERSION.SDK_INT >= 21)
{
paramIntent.addFlags(134742016);
return;
}
paramIntent.addFlags(524288);
}
public static abstract interface OnShareTargetSelectedListener
{
public abstract boolean onShareTargetSelected(ShareActionProvider paramShareActionProvider, Intent paramIntent);
}
private class ShareActivityChooserModelPolicy
implements ActivityChooserModel.OnChooseActivityListener
{
ShareActivityChooserModelPolicy() {}
public boolean onChooseActivity(ActivityChooserModel paramActivityChooserModel, Intent paramIntent)
{
if (ShareActionProvider.this.mOnShareTargetSelectedListener != null) {
ShareActionProvider.this.mOnShareTargetSelectedListener.onShareTargetSelected(ShareActionProvider.this, paramIntent);
}
return false;
}
}
private class ShareMenuItemOnMenuItemClickListener
implements MenuItem.OnMenuItemClickListener
{
ShareMenuItemOnMenuItemClickListener() {}
public boolean onMenuItemClick(MenuItem paramMenuItem)
{
Intent localIntent = ActivityChooserModel.get(ShareActionProvider.this.mContext, ShareActionProvider.this.mShareHistoryFileName).chooseActivity(paramMenuItem.getItemId());
if (localIntent != null)
{
String str = localIntent.getAction();
if (("android.intent.action.SEND".equals(str)) || ("android.intent.action.SEND_MULTIPLE".equals(str))) {
ShareActionProvider.this.updateIntent(localIntent);
}
ShareActionProvider.this.mContext.startActivity(localIntent);
}
return true;
}
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
bd14e06ca25ca0626787cbd98f0d2c0ec6409739 | b3cfd16b04870cbdfc356b621b4eb580cc20abb0 | /currency-conversion-service/src/test/java/com/vinay/currencyconversionservice/CurrencyConversionServiceApplicationTests.java | e150bb0774a50334cb1cec29797b0b66744c24ae | [] | no_license | VinayagamD/spring-microservice-cloud | 00a4bf02e3cd35dc7c67ae54be96e0bdc0dfd787 | 417960721c44232498dd6aaee3c57fc347f60f12 | refs/heads/master | 2021-01-15T00:51:52.814897 | 2020-03-02T12:49:21 | 2020-03-02T12:49:21 | 242,819,049 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 246 | java | package com.vinay.currencyconversionservice;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class CurrencyConversionServiceApplicationTests {
@Test
void contextLoads() {
}
}
| [
"vinayagam.d.ganesh@gmail.com"
] | vinayagam.d.ganesh@gmail.com |
617134fd7a20cf3f83817d5676ad7fdd1ff6d4f6 | 879c7c01b1d3cd98fbc40768001ebcd3c94bcc52 | /src/combit/ListLabel24/Dom/ObjectDataGraphic.java | 3c10d68041a6eaabbe9b5552771a951dd7c65255 | [] | no_license | Javonet-io-user/7d825c3a-6d32-4c9b-9e58-43c503f77adb | c63f350b2754ef6c7fbdf42c9b8fa2a7ab45faf8 | e5826d95ac9e013f9907aa75e16cec840d6ef276 | refs/heads/master | 2020-04-21T08:01:21.991093 | 2019-02-06T13:06:19 | 2019-02-06T13:06:19 | 169,407,296 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,945 | java | package combit.ListLabel24.Dom;
import Common.Activation;
import static Common.JavonetHelper.Convert;
import static Common.JavonetHelper.getGetObjectName;
import static Common.JavonetHelper.getReturnObjectName;
import static Common.JavonetHelper.ConvertToConcreteInterfaceImplementation;
import Common.JavonetHelper;
import com.javonet.Javonet;
import com.javonet.JavonetException;
import com.javonet.JavonetFramework;
import com.javonet.api.NObject;
import com.javonet.api.NEnum;
import com.javonet.api.keywords.NRef;
import com.javonet.api.keywords.NOut;
import com.javonet.api.NControlContainer;
import java.util.concurrent.atomic.AtomicReference;
import java.util.Iterator;
import java.lang.*;
import combit.ListLabel24.Dom.*;
public class ObjectDataGraphic extends ObjectBase {
protected NObject javonetHandle;
/** SetProperty */
public void setExportAsPicture(java.lang.String value) {
try {
javonetHandle.set("ExportAsPicture", value);
} catch (JavonetException _javonetException) {
_javonetException.printStackTrace();
}
}
/** GetProperty */
public java.lang.String getExportAsPicture() {
try {
java.lang.String res = javonetHandle.get("ExportAsPicture");
if (res == null) return "";
return (java.lang.String) res;
} catch (JavonetException _javonetException) {
_javonetException.printStackTrace();
return "";
}
}
/** GetProperty */
public PropertyDataGraphicDefinition getDefinition() {
try {
Object res = javonetHandle.<NObject>get("Definition");
if (res == null) return null;
return new PropertyDataGraphicDefinition((NObject) res);
} catch (JavonetException _javonetException) {
_javonetException.printStackTrace();
return null;
}
}
public ObjectDataGraphic(CollectionObjectBases objectCollection) {
super((NObject) null);
try {
javonetHandle = Javonet.New("combit.ListLabel24.Dom.ObjectDataGraphic", objectCollection);
super.setJavonetHandle(javonetHandle);
} catch (JavonetException _javonetException) {
_javonetException.printStackTrace();
}
}
public ObjectDataGraphic(CollectionObjectBases objectCollection, java.lang.Integer index) {
super((NObject) null);
try {
javonetHandle =
Javonet.New("combit.ListLabel24.Dom.ObjectDataGraphic", objectCollection, index);
super.setJavonetHandle(javonetHandle);
} catch (JavonetException _javonetException) {
_javonetException.printStackTrace();
}
}
public ObjectDataGraphic(NObject handle) {
super(handle);
this.javonetHandle = handle;
}
public void setJavonetHandle(NObject handle) {
this.javonetHandle = handle;
}
static {
try {
Activation.initializeJavonet();
} catch (java.lang.Exception e) {
e.printStackTrace();
}
}
}
| [
"support@javonet.com"
] | support@javonet.com |
cc08bcdc9fca84f0bd3c1a73788735ae35266386 | ff05965a1216a8b5f17285f438558e6ed06e0db4 | /tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java | b4151323548810ee2b76bf2c0cdc6552f4c7011c | [] | no_license | liucong/jms4cxf2 | 5ba89e857e9c6a4c542dffe0a13b3f704a19be77 | 56f6d8211dba6704348ee7e7551aa1a1f2c4d889 | refs/heads/master | 2023-01-09T18:08:51.730922 | 2009-09-16T03:16:48 | 2009-09-16T03:16:48 | 194,633 | 1 | 4 | null | 2023-01-02T21:54:29 | 2009-05-07T03:43:06 | Java | UTF-8 | Java | false | false | 6,476 | 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.cxf.tools.java2ws;
import java.util.HashSet;
import java.util.logging.Logger;
import org.apache.cxf.common.i18n.Message;
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.tools.common.AbstractCXFToolContainer;
import org.apache.cxf.tools.common.Processor;
import org.apache.cxf.tools.common.ToolConstants;
import org.apache.cxf.tools.common.ToolContext;
import org.apache.cxf.tools.common.ToolException;
import org.apache.cxf.tools.common.toolspec.ToolSpec;
import org.apache.cxf.tools.common.toolspec.parser.BadUsageException;
import org.apache.cxf.tools.common.toolspec.parser.CommandDocument;
import org.apache.cxf.tools.common.toolspec.parser.ErrorVisitor;
import org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor;
import org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.JAXWSFrontEndProcessor;
import org.apache.cxf.tools.java2wsdl.processor.internal.simple.SimpleFrontEndProcessor;
public class JavaToWSContainer extends AbstractCXFToolContainer {
private static final Logger LOG = LogUtils.getL7dLogger(JavaToWSContainer.class);
private static final String TOOL_NAME = "java2ws";
public JavaToWSContainer(ToolSpec toolspec) throws Exception {
super(TOOL_NAME, toolspec);
}
public void execute(boolean exitOnFinish) throws ToolException {
//ErrorVisitor errors = new ErrorVisitor();
try {
super.execute(exitOnFinish);
//checkParams(errors);
if (!hasInfoOption()) {
ToolContext env = new ToolContext();
env.setParameters(getParametersMap(new HashSet()));
if (env.get(ToolConstants.CFG_OUTPUTDIR) == null) {
env.put(ToolConstants.CFG_OUTPUTDIR, ".");
}
if (env.get(ToolConstants.CFG_SOURCEDIR) == null) {
env.put(ToolConstants.CFG_SOURCEDIR, ".");
}
if (isVerboseOn()) {
env.put(ToolConstants.CFG_VERBOSE, Boolean.TRUE);
}
String ft = (String)env.get(ToolConstants.CFG_FRONTEND);
if (ft == null || ToolConstants.JAXWS_FRONTEND.equals(ft)) {
ft = ToolConstants.JAXWS_FRONTEND;
} else {
ft = ToolConstants.SIMPLE_FRONTEND;
//use aegis databinding for simple front end by default
env.put(ToolConstants.CFG_DATABINDING, ToolConstants.AEGIS_DATABINDING);
}
env.put(ToolConstants.CFG_FRONTEND, ft);
processWSDL(env, ft);
}
} catch (ToolException ex) {
if (ex.getCause() instanceof BadUsageException) {
printUsageException(TOOL_NAME, (BadUsageException)ex.getCause());
if (isVerboseOn()) {
ex.printStackTrace(err);
}
}
throw ex;
} catch (Exception ex) {
err.println("Error: " + ex.getMessage());
err.println();
if (isVerboseOn()) {
ex.printStackTrace(err);
}
throw new ToolException(ex.getMessage(), ex.getCause());
} finally {
tearDown();
}
}
private void processWSDL(ToolContext env, String ft) {
Processor processor = new JavaToWSDLProcessor();
processor.setEnvironment(env);
processor.process();
if (ft.equals(ToolConstants.JAXWS_FRONTEND)) {
if (env.optionSet(ToolConstants.CFG_SERVER) || env.optionSet(ToolConstants.CFG_CLIENT)) {
processor = new JAXWSFrontEndProcessor();
processor.setEnvironment(env);
processor.process();
}
} else {
processor = new SimpleFrontEndProcessor();
processor.setEnvironment(env);
processor.process();
}
}
public void checkParams(ErrorVisitor errs) throws ToolException {
super.checkParams(errs);
CommandDocument doc = super.getCommandDocument();
if (doc.hasParameter(ToolConstants.CFG_FRONTEND)) {
String ft = doc.getParameter(ToolConstants.CFG_FRONTEND);
if (!ToolConstants.JAXWS_FRONTEND.equals(ft)
&& !ToolConstants.SIMPLE_FRONTEND.equals(ft)) {
Message msg = new Message("INVALID_FRONTEND", LOG, new Object[] {ft});
errs.add(new ErrorVisitor.UserError(msg.toString()));
}
if (ToolConstants.SIMPLE_FRONTEND.equals(ft)
&& doc.getParameter(ToolConstants.CFG_DATABINDING) != null
&& !ToolConstants.
AEGIS_DATABINDING.equals(doc.getParameter(ToolConstants.CFG_DATABINDING))) {
Message msg = new Message("INVALID_DATABINDING_FOR_SIMPLE", LOG);
errs.add(new ErrorVisitor.UserError(msg.toString()));
}
}
if (doc.hasParameter(ToolConstants.CFG_WRAPPERBEAN)) {
String ft = doc.getParameter(ToolConstants.CFG_FRONTEND);
if (ft != null && !ToolConstants.JAXWS_FRONTEND.equals(ft)) {
Message msg = new Message("WRAPPERBEAN_WITHOUT_JAXWS", LOG);
errs.add(new ErrorVisitor.UserError(msg.toString()));
}
}
if (errs.getErrors().size() > 0) {
Message msg = new Message("PARAMETER_MISSING", LOG);
throw new ToolException(msg, new BadUsageException(getUsage(), errs));
}
}
}
| [
"liucong07@gmail.com"
] | liucong07@gmail.com |
e0d067e3edc8567f4167003022e875b0592761fc | e91b6f25ea849f44f5834ba8f9bfc8c0742722a1 | /source/1_Java/ch05_array/src/com/tj/ex/Ex07.java | bc1198489d9f4901296fe8389138f33fcc04f4ab | [] | no_license | AsnemBlue/mega_IT | c1e7ede26515a981179e1986a18144da0646d33f | 710236379ec2c2cf5baac7c9dc9253cb4197bf39 | refs/heads/master | 2021-05-26T09:03:32.138726 | 2020-04-08T05:53:52 | 2020-04-08T05:53:52 | 254,068,727 | 1 | 0 | null | 2020-04-08T11:28:53 | 2020-04-08T11:28:52 | null | UHC | Java | false | false | 314 | java | package com.tj.ex;
// 일반for vs. 확장for
public class Ex07 {
public static void main(String[] args) {
int[] arr = {10,20,30};
// 일반 for문
for(int idx = 0 ; idx < arr.length ; idx++) {
System.out.println(arr[idx]);
}
// 확장 for 문
for(int a : arr) {
System.out.println(a);
}
}
}
| [
"spacenyi@naver.com"
] | spacenyi@naver.com |
6249ceee181956a0d7a281c23c5ee1137dca7870 | b280a34244a58fddd7e76bddb13bc25c83215010 | /scmv6/center-batch/src/main/java/com/smate/center/batch/service/pub/PubKeyWordsService.java | cf376f0ff6bf69388dfb7e0c22c059d458bd49ca | [] | no_license | hzr958/myProjects | 910d7b7473c33ef2754d79e67ced0245e987f522 | d2e8f61b7b99a92ffe19209fcda3c2db37315422 | refs/heads/master | 2022-12-24T16:43:21.527071 | 2019-08-16T01:46:18 | 2019-08-16T01:46:18 | 202,512,072 | 2 | 3 | null | 2022-12-16T05:31:05 | 2019-08-15T09:21:04 | Java | UTF-8 | Java | false | false | 1,352 | java | package com.smate.center.batch.service.pub;
import java.io.Serializable;
import java.util.List;
import com.smate.center.batch.exception.pub.ServiceException;
import com.smate.center.batch.model.sns.pub.PubKeyWords;
/**
* 成果关键词service.
*
* @author liqinghua
*
*/
public interface PubKeyWordsService extends Serializable {
/**
* 保存成果关键词.
*
* @param pubId
* @param psnId
* @param zhKeywords
* @param enKeywords
* @throws ServiceException
*/
public void savePubKeywords(Long pubId, Long psnId, String zhKeywords, String enKeywords) throws ServiceException;
/**
* 删除成果关键词.
*
* @param pubId
* @throws ServiceException
*/
public void delPubKeywords(Long pubId) throws ServiceException;
/**
* 删除人员成果关键词.
*
* @param pubId
* @throws ServiceException
*/
public void delPsnPubKw(Long pubId) throws ServiceException;
/**
* 保存成果关键词到人员成果关键词.
*
* @param pubId
* @param psnId
* @throws ServiceException
*/
public void savePubKwToPsnPubKw(Long pubId, Long psnId) throws ServiceException;
/**
* 获取成果关键词列表.
*
* @param pubId
* @return
* @throws ServiceException
*/
public List<PubKeyWords> getPubKws(Long pubId) throws ServiceException;
}
| [
"zhiranhe@irissz.com"
] | zhiranhe@irissz.com |
12871b46ddff67b860b52addb9b3922457238a51 | 058eb0f0265470f6c88c32f0b1fb4c6d0f9b4b21 | /src/main/java/com/thoughtworks/rslist/service/impl/VoteServiceImpl.java | d859327ccb72c96a70dde26235c662e2d4b6e7ef | [] | no_license | ghjhhyuyuy/basic-api-implementation | 19533cc546dab52bca338af4e0a3cc460e510526 | 8e1b15d35230edaf654c8604eae49e01eff90198 | refs/heads/master | 2022-11-28T15:26:33.183333 | 2020-08-09T13:38:46 | 2020-08-09T13:38:46 | 284,890,815 | 0 | 0 | null | 2020-08-04T05:59:08 | 2020-08-04T05:59:07 | null | UTF-8 | Java | false | false | 1,789 | java | package com.thoughtworks.rslist.service.impl;
import com.thoughtworks.rslist.domain.Vote;
import com.thoughtworks.rslist.dto.RsEventDto;
import com.thoughtworks.rslist.dto.UserDto;
import com.thoughtworks.rslist.dto.VoteDto;
import com.thoughtworks.rslist.repository.RsEventRepository;
import com.thoughtworks.rslist.repository.UserRepository;
import com.thoughtworks.rslist.repository.VoteRepository;
import com.thoughtworks.rslist.service.VoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.sql.Timestamp;
import java.util.List;
import java.util.Optional;
/**
* Created by wzw on 2020/8/9.
*/
@Service
public class VoteServiceImpl implements VoteService {
@Autowired
private VoteRepository voteRepository;
@Autowired
private UserRepository userRepository;
@Autowired
private RsEventRepository rsEventRepository;
@Override
public void addVote(int rsEventId, Vote vote) {
VoteDto voteDto = new VoteDto();
voteDto.setVoteNum(vote.getVoteNum());
voteDto.setVoteTime(vote.getVoteTime());
Optional<RsEventDto> optionalRsEventDto = rsEventRepository.findById(vote.getRsEventId());
optionalRsEventDto.ifPresent(voteDto::setRsEventDto);
Optional<UserDto> optionalUserDto = userRepository.findById(vote.getUserId());
optionalUserDto.ifPresent(voteDto::setUserDto);
voteRepository.save(voteDto);
}
@Override
public List<VoteDto> getVoteBeforeStartAndEnd(Timestamp startTime, Timestamp endTime) throws Exception {
if(startTime.after(endTime)){
throw new Exception("invalid request param");
}
return voteRepository.findVotesByStartAndEnd(startTime,endTime);
}
}
| [
"your@email.com"
] | your@email.com |
286ecc28d73e472baccaec94625b16885f82bd45 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/netty/2015/12/HashingStrategy.java | f2d01e482acdbc2b69c77754f2059b1bb6805a1e | [] | 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 | 3,429 | java | /*
* Copyright 2015 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 io.netty.util;
import io.netty.util.internal.ObjectUtil;
/**
* Abstraction for hash code generation and equality comparison.
*/
public interface HashingStrategy<T> {
/**
* Generate a hash code for {@code obj}.
* <p>
* This method must obey the same relationship that {@link java.lang.Object#hashCode()} has with
* {@link java.lang.Object#equals(Object)}:
* <ul>
* <li>Calling this method multiple times with the same {@code obj} should return the same result</li>
* <li>If {@link #equals(Object, Object)} with parameters {@code a} and {@code b} returns {@code true}
* then the return value for this method for parameters {@code a} and {@code b} must return the same result</li>
* <li>If {@link #equals(Object, Object)} with parameters {@code a} and {@code b} returns {@code false}
* then the return value for this method for parameters {@code a} and {@code b} does <strong>not</strong> have to
* return different results results. However this property is desirable.</li>
* <li>if {@code obj} is {@code null} then this method return {@code 0}</li>
* </ul>
*/
int hashCode(T obj);
/**
* Returns {@code true} if the arguments are equal to each other and {@code false} otherwise.
* This method has the following restrictions:
* <ul>
* <li><i>reflexive</i> - {@code equals(a, a)} should return true</li>
* <li><i>symmetric</i> - {@code equals(a, b)} returns {@code true} iff {@code equals(b, a)} returns
* {@code true}</li>
* <li><i>transitive</i> - if {@code equals(a, b)} returns {@code true} and {@code equals(a, c)} returns
* {@code true} then {@code equals(b, c)} should also return {@code true}</li>
* <li><i>consistent</i> - {@code equals(a, b)} should return the same result when called multiple times
* assuming {@code a} and {@code b} remain unchanged relative to the comparison criteria</li>
* <li>if {@code a} and {@code b} are both {@code null} then this method returns {@code true}</li>
* <li>if {@code a} is {@code null} and {@code b} is non-{@code null}, or {@code a} is non-{@code null} and
* {@code b} is {@code null} then this method returns {@code false}</li>
* </ul>
*/
boolean equals(T a, T b);
/**
* A {@link HashingStrategy} which delegates to java's {@link Object#hashCode()}
* and {@link Object#equals(Object)}.
*/
@SuppressWarnings("rawtypes")
HashingStrategy JAVA_HASHER = new HashingStrategy() {
@Override
public int hashCode(Object obj) {
return obj != null ? obj.hashCode() : 0;
}
@Override
public boolean equals(Object a, Object b) {
return (a == b) || (a != null && a.equals(b));
}
};
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
427f94cfbaab6244709ffca0dc8c7811c1322925 | fbf2141ffac10d2a661961f34321929a86acd7b0 | /src/test/java/com/bergerkiller/bukkit/common/ChatTextTest.java | 6bc9d065e8999662b73ebb62e1ef3f53e85b5fbc | [
"LicenseRef-scancode-other-permissive"
] | permissive | Andre601/BKCommonLib | 0fbd1afec6a680f5acead434e2b761b3aad4c9c3 | 31f4ddf0da60fa08f8ae1897f170e0931c025286 | refs/heads/master | 2023-03-20T04:58:04.468533 | 2020-06-27T13:33:11 | 2020-06-27T13:33:11 | 275,436,563 | 0 | 0 | null | 2020-06-27T19:05:14 | 2020-06-27T19:05:13 | null | UTF-8 | Java | false | false | 2,591 | java | package com.bergerkiller.bukkit.common;
import static org.junit.Assert.*;
import org.bukkit.ChatColor;
import org.junit.Test;
import com.bergerkiller.bukkit.common.internal.CommonCapabilities;
import com.bergerkiller.bukkit.common.wrappers.ChatText;
public class ChatTextTest {
@Test
public void testChatText() {
String msg = "Hello, " + ChatColor.RED + "World!";
ChatText text = ChatText.fromMessage(msg);
assertEquals(msg, text.getMessage());
String expected;
if (CommonCapabilities.CHAT_TEXT_JSON_VER2) {
expected = "{\"extra\":[{\"text\":\"Hello, \"},{\"color\":\"red\",\"text\":\"World!\"}],\"text\":\"\"}";
} else {
expected = "{\"extra\":[\"Hello, \",{\"color\":\"red\",\"text\":\"World!\"}],\"text\":\"\"}";
}
String result = text.getJson();
if (!expected.equals(result)) {
System.out.println("EXPECTED: " + expected);
System.out.println("INSTEAD : " + result);;
fail("Chat text conversion to JSON is not working correctly");
}
}
@Test
public void testSuffixStyle() {
// Test that a String with a suffix chat style character preserves the style
String msg = "Prefix" + ChatColor.RED.toString();
ChatText text = ChatText.fromMessage(msg);
assertEquals(msg, text.getMessage());
}
@Test
public void testPrefixStyle() {
// Test that a String with a prefix chat style character preserves the style
String msg = ChatColor.RED.toString() + "Postfix";
ChatText text = ChatText.fromMessage(msg);
assertEquals(msg, text.getMessage());
}
@Test
public void testStyleOnly() {
String msg = ChatColor.RED.toString();
ChatText text = ChatText.fromMessage(msg);
assertEquals("{\"extra\":[{\"color\":\"red\",\"text\":\"\"}],\"text\":\"\"}", text.getJson());
assertEquals(msg, text.getMessage());
}
@Test
public void testFromChatColor() {
for (ChatColor color : ChatColor.values()) {
ChatText text = ChatText.fromMessage(color.toString());
if (color == ChatColor.RESET) {
assertEquals("", text.getMessage());
} else {
assertEquals(color.toString(), text.getMessage());
}
}
}
@Test
public void testEmpty() {
// Test empty chat text
ChatText text = ChatText.empty();
assertEquals("", text.getMessage());
assertEquals("{\"text\":\"\"}", text.getJson());
}
}
| [
"irmo.vandenberge@ziggo.nl"
] | irmo.vandenberge@ziggo.nl |
5153aed9eaceeabf8225c7fe4aefdde20aa9d07a | 9d32980f5989cd4c55cea498af5d6a413e08b7a2 | /A72n_10_0_0/src/main/java/com/mediatek/internal/telephony/FemtoCellInfo.java | 3fc949100364c01e2337c088e9c89bafab73e713 | [] | no_license | liuhaosource/OppoFramework | e7cc3bcd16958f809eec624b9921043cde30c831 | ebe39acabf5eae49f5f991c5ce677d62b683f1b6 | refs/heads/master | 2023-06-03T23:06:17.572407 | 2020-11-30T08:40:07 | 2020-11-30T08:40:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,618 | java | package com.mediatek.internal.telephony;
import android.os.Parcel;
import android.os.Parcelable;
public class FemtoCellInfo implements Parcelable {
public static final Parcelable.Creator<FemtoCellInfo> CREATOR = new Parcelable.Creator<FemtoCellInfo>() {
/* class com.mediatek.internal.telephony.FemtoCellInfo.AnonymousClass1 */
@Override // android.os.Parcelable.Creator
public FemtoCellInfo createFromParcel(Parcel in) {
return new FemtoCellInfo(in.readInt(), in.readInt(), in.readString(), in.readString(), in.readString(), in.readInt());
}
@Override // android.os.Parcelable.Creator
public FemtoCellInfo[] newArray(int size) {
return new FemtoCellInfo[size];
}
};
public static final int CSG_ICON_TYPE_ALLOWED = 1;
public static final int CSG_ICON_TYPE_NOT_ALLOWED = 0;
public static final int CSG_ICON_TYPE_OPERATOR = 2;
public static final int CSG_ICON_TYPE_OPERATOR_UNAUTHORIZED = 3;
private int csgIconType;
private int csgId;
private String homeNodeBName;
private String operatorAlphaLong;
private String operatorNumeric;
private int rat = 0;
public int getCsgId() {
return this.csgId;
}
public int getCsgIconType() {
return this.csgIconType;
}
public String getHomeNodeBName() {
return this.homeNodeBName;
}
public int getCsgRat() {
return this.rat;
}
public String getOperatorNumeric() {
return this.operatorNumeric;
}
public String getOperatorAlphaLong() {
return this.operatorAlphaLong;
}
public FemtoCellInfo(int csgId2, int csgIconType2, String homeNodeBName2, String operatorNumeric2, String operatorAlphaLong2, int rat2) {
this.csgId = csgId2;
this.csgIconType = csgIconType2;
this.homeNodeBName = homeNodeBName2;
this.operatorNumeric = operatorNumeric2;
this.operatorAlphaLong = operatorAlphaLong2;
this.rat = rat2;
}
public String toString() {
return "FemtoCellInfo " + this.csgId + "/" + this.csgIconType + "/" + this.homeNodeBName + "/" + this.operatorNumeric + "/" + this.operatorAlphaLong + "/" + this.rat;
}
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.csgId);
dest.writeInt(this.csgIconType);
dest.writeString(this.homeNodeBName);
dest.writeString(this.operatorNumeric);
dest.writeString(this.operatorAlphaLong);
dest.writeInt(this.rat);
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
85918af000a328842d2572e2e7ae1dfc0da8cf14 | a0dd8e242e01ac68cf20385050a9432102e374ad | /org.eclipse.om2m/org.eclipse.om2m.client.java/src/main/java/org/eclipse/om2m/client/java/AEMN.java | d5033d6792213917042b0e0e1ed620773f26190c | [] | no_license | cb508136/UE63 | 442fb04ad446009cf064a30725ed5bc7b227911e | 0dc0c861ad2d58ceb85cd73a56294b6130b587e8 | refs/heads/master | 2022-11-29T06:21:45.020446 | 2020-03-12T08:40:39 | 2020-03-12T08:40:39 | 245,387,551 | 0 | 0 | null | 2022-11-16T03:18:06 | 2020-03-06T10:09:25 | Java | UTF-8 | Java | false | false | 3,050 | java | /*******************************************************************************
* Copyright (c) 2016- 2017 SENSINOV (www.sensinov.com)
* 41 Rue de la découverte 31676 Labège - France
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.om2m.client.java;
import org.eclipse.om2m.client.java.tools.RestHttpClient;
import org.json.JSONArray;
import org.json.JSONObject;
public class AEMN extends TestConfig {
private static String aeRN = "gateway_ae";
private static String aeRId = "Cgateway_ae";
private static String aeRN_1 = "light_ae1";
private static String aeRId_1 = "Clight_ae1";
private static String aeRN_2 = "light_ae2";
private static String aeRId_2 = "Clight_ae2";
private static String aeRId_3 = "Csmartphone_ae";
private static String cnRN = "light";
private static String acpRN = "MN-CSEAcp";
private static String groupRN = "containers_grp";
public static void main(String[] args) throws Exception {
/** Application Registry **/
JSONObject obj = new JSONObject();
obj.put("rn", aeRN);
obj.put("api", "A01.com.company.gatewayApp");
obj.put("rr", false);
JSONObject resource = new JSONObject();
resource.put("m2m:ae", obj);
RestHttpClient.post(originator, csePoa+"/~/"+remoteCseId+"/"+remoteCseName+"?rcn=1", resource.toString(), 2);
/** Access right resource creation **/
JSONArray acor = new JSONArray();
acor.put(aeRId);
acor.put(aeRId_1);
acor.put(aeRId_2);
acor.put(aeRId_3);
acor.put("admin:admin");
JSONObject item = new JSONObject();
item.put("acor", acor);
item.put("acop", 63);
JSONObject acr_1 = new JSONObject();
acr_1.put("acr",item);
acor = new JSONArray();
acor.put(aeRN);
acor.put("admin:admin");
item = new JSONObject();
item.put("acor", acor);
item.put("acop", 63);
JSONObject acr_2 = new JSONObject();
acr_2.put("acr",item);
JSONObject obj_1 = new JSONObject();
obj_1.put("rn", acpRN);
obj_1.put("pv", acr_1);
obj_1.put("pvs", acr_2);
resource = new JSONObject();
resource.put("m2m:acp", obj_1);
RestHttpClient.post(originator, csePoa+"/~/"+remoteCseId+"/"+remoteCseName+"/", resource.toString(), 1);
/** Group resource creation **/
JSONArray array = new JSONArray();
array.put("/"+remoteCseId+"/"+remoteCseName+"/"+aeRN_1+"/"+cnRN);
array.put("/"+remoteCseId+"/"+remoteCseName+"/"+aeRN_2+"/"+cnRN);
obj = new JSONObject();
obj.put("mid", array);
obj.put("rn", groupRN);
obj.put("mnm", 3);
resource = new JSONObject();
resource.put("m2m:grp", obj);
RestHttpClient.post(originator, csePoa+"/~/"+remoteCseId+"/"+remoteCseName, resource.toString(), 9);
}
}
| [
"benoit.cavallo@etu.unice.fr"
] | benoit.cavallo@etu.unice.fr |
f95471e840aae78d7f3417a217918ec965e22542 | 4e9c06ff59fe91f0f69cb3dd80a128f466885aea | /src/o/ー.java | dab110dd0d4e9a90cd402b449d403995a6e03a58 | [] | no_license | reverseengineeringer/com.eclipsim.gpsstatus2 | 5ab9959cc3280d2dc96f2247c1263d14c893fc93 | 800552a53c11742c6889836a25b688d43ae68c2e | refs/heads/master | 2021-01-17T07:26:14.357187 | 2016-07-21T03:33:07 | 2016-07-21T03:33:07 | 63,834,134 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,829 | java | package o;
import android.support.design.widget.NavigationView;
import android.support.design.widget.NavigationView.if;
import android.util.Base64;
import android.util.Log;
import android.view.MenuItem;
import java.security.InvalidKeyException;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import java.security.Signature;
import java.security.SignatureException;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.X509EncodedKeySpec;
public final class ー
implements ণ.if
{
ー() {}
public ー(NavigationView paramNavigationView) {}
public static PublicKey ʻ(String paramString)
{
try
{
paramString = Base64.decode(paramString, 0);
paramString = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(paramString));
return paramString;
}
catch (NoSuchAlgorithmException paramString)
{
throw new RuntimeException(paramString);
}
catch (InvalidKeySpecException paramString)
{
Log.e("IABUtil/Security", "Invalid key specification.");
throw new IllegalArgumentException(paramString);
}
catch (IllegalArgumentException paramString)
{
Log.e("IABUtil/Security", "Base64 decoding failed.");
throw paramString;
}
}
public static boolean ˋ(PublicKey paramPublicKey, String paramString1, String paramString2)
{
try
{
Signature localSignature = Signature.getInstance("SHA1withRSA");
localSignature.initVerify(paramPublicKey);
localSignature.update(paramString1.getBytes());
if (!localSignature.verify(Base64.decode(paramString2, 0)))
{
Log.e("IABUtil/Security", "Signature verification failed.");
return false;
}
return true;
}
catch (NoSuchAlgorithmException paramPublicKey)
{
for (;;) {}
}
catch (InvalidKeyException paramPublicKey)
{
for (;;) {}
}
catch (SignatureException paramPublicKey)
{
for (;;) {}
}
catch (IllegalArgumentException paramPublicKey)
{
label84:
for (;;) {}
}
Log.e("IABUtil/Security", "NoSuchAlgorithmException.");
break label84;
Log.e("IABUtil/Security", "Invalid key specification.");
break label84;
Log.e("IABUtil/Security", "Signature exception.");
break label84;
Log.e("IABUtil/Security", "Base64 decoding failed.");
return false;
}
public final boolean ˊ(ণ paramণ, MenuItem paramMenuItem)
{
if (NavigationView.ˊ(氵) != null)
{
NavigationView.ˊ(氵).ˊ(paramMenuItem);
return true;
}
return false;
}
public final void ˋ(ণ paramণ) {}
}
/* Location:
* Qualified Name: o.ー
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
bdefa4f44a61b38bf44aa44fee43d71aa897031c | 4e8d52f594b89fa356e8278265b5c17f22db1210 | /WebServiceArtifacts/FinanceService/org/tempuri/dotnet/financeservice/PaymentResponse.java | 0d6f9e5007e6c197609ce669dcba515728b964de | [] | no_license | ouniali/WSantipatterns | dc2e5b653d943199872ea0e34bcc3be6ed74c82e | d406c67efd0baa95990d5ee6a6a9d48ef93c7d32 | refs/heads/master | 2021-01-10T05:22:19.631231 | 2015-05-26T06:27:52 | 2015-05-26T06:27:52 | 36,153,404 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,366 | java |
package org.tempuri.dotnet.financeservice;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="PaymentResult" type="{http://www.w3.org/2001/XMLSchema}double"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"paymentResult"
})
@XmlRootElement(name = "PaymentResponse")
public class PaymentResponse {
@XmlElement(name = "PaymentResult")
protected double paymentResult;
/**
* Gets the value of the paymentResult property.
*
*/
public double getPaymentResult() {
return paymentResult;
}
/**
* Sets the value of the paymentResult property.
*
*/
public void setPaymentResult(double value) {
this.paymentResult = value;
}
}
| [
"ouni_ali@yahoo.fr"
] | ouni_ali@yahoo.fr |
8672389c57ef43e804d8666551e08861cda58286 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/discover/model/Position.java | 7380cf566c9196508288f64d1bdd62501161061f | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 464 | java | package com.p280ss.android.ugc.aweme.discover.model;
import com.google.gson.p276a.C6593c;
import java.io.Serializable;
/* renamed from: com.ss.android.ugc.aweme.discover.model.Position */
public class Position implements Serializable {
@C6593c(mo15949a = "begin")
public int begin;
@C6593c(mo15949a = "end")
public int end;
public int getBegin() {
return this.begin;
}
public int getEnd() {
return this.end;
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
421bf1c58fc47e8d8d3ff0dafd962860e326d2b7 | 14d949373a4b826d6ef2decd690ac22372d7c173 | /ps_lib/src/main/java/com/beautystudiocn/allsale/picture/scene/transform/ITransform.java | 716734e27fb8b333aacc1fefe2c111979e4c8885 | [] | no_license | mjmandroid/HoneyRepo | bec63311b1878b4b06292a44ab3b803b6c01de61 | b5be814b44e7494c11250bb2aae6dd6c572057c1 | refs/heads/master | 2021-03-25T17:28:10.721812 | 2020-03-18T03:24:14 | 2020-03-18T03:24:14 | 247,635,658 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,528 | java | package com.beautystudiocn.allsale.picture.scene.transform;
/**
* <br> ClassName: ITransform
* <br> Description: 图片变换接口
* <br>
* <br> Author: yexiaochuan
* <br> Date: 2017/9/22 10:22
*/
public interface ITransform {
/**
*<br> Description: 中心适应
*<br> Author: yexiaochuan
*<br> Date: 2017/9/22 9:17
*/
Object fitCenter();
/**
*<br> Description: 铺满xy
*<br> Author: yexiaochuan
*<br> Date: 2017/9/22 9:17
*/
Object fitXY();
/**
*<br> Description: 中心裁剪
*<br> Author: yexiaochuan
*<br> Date: 2017/9/11 15:01
*/
Object centerCrop();
/**
*<br> Description: 中心包裹
*<br> Author: yexiaochuan
*<br> Date: 2017/9/11 15:02
*/
Object centerInside();
/**
*<br> Description: 圆角裁剪
*<br> Author: yexiaochuan
*<br> Date: 2017/9/11 15:02
* @param radius
* 角度
* @return
*/
Object connerCrop(int radius);
/**
*<br> Description: 圆角裁剪
*<br> Author: yexiaochuan
*<br> Date: 2017/9/11 15:02
* @param radius
* 角度
* @return
*/
Object connerCrop(int radius, int margin, RoundedCorner.CornerType cornerType);
/**
*<br> Description: 圆形裁剪
*<br> Author: yexiaochuan
*<br> Date: 2017/9/11 15:02
*/
Object circleCrop();
}
| [
"mjmmast2012@163.com"
] | mjmmast2012@163.com |
b738aee00732847077ac1ed2e775c2bd2111432e | 6252c165657baa6aa605337ebc38dd44b3f694e2 | /org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-400-Files/boiler-To-Generate-400-Files/syncregions-400Files/TemperatureController1446.java | 2182fc7be07181fa92b78cdb5d84b4d846cea2d5 | [] | no_license | soha500/EglSync | 00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638 | 55101bc781349bb14fefc178bf3486e2b778aed6 | refs/heads/master | 2021-06-23T02:55:13.464889 | 2020-12-11T19:10:01 | 2020-12-11T19:10:01 | 139,832,721 | 0 | 1 | null | 2019-05-31T11:34:02 | 2018-07-05T10:20:00 | Java | UTF-8 | Java | false | false | 367 | java | package syncregions;
public class TemperatureController1446 {
public execute(int temperature1446, int targetTemperature1446) {
//sync _bfpnFUbFEeqXnfGWlV1446, behaviour
1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0;
//endSync
}
}
| [
"sultanalmutairi@172.20.10.2"
] | sultanalmutairi@172.20.10.2 |
22146141282325ab298f6f682a3731ab6fff148f | 9272784a4043bb74a70559016f5ee09b0363f9d3 | /modules/xiaomai-service/src/main/java/com/antiphon/xiaomai/modules/service/cate/MemebershipCardService.java | bf57e77bab448a5da84d537e5a752d1fe786e138 | [] | no_license | sky8866/test | dd36dad7e15a5d878e599119c87c1b50bd1f2b93 | 93e1826846d83a5a1d25f069dadd169a747151af | refs/heads/master | 2021-01-20T09:27:12.080227 | 2017-08-29T09:33:19 | 2017-08-29T09:33:19 | 101,595,198 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,188 | java | package com.antiphon.xiaomai.modules.service.cate;
import java.io.Serializable;
import java.util.List;
import com.antiphon.xiaomai.modules.bean.PageView;
import com.antiphon.xiaomai.modules.bean.PropertyFilter;
import com.antiphon.xiaomai.modules.bean.QueryResult;
import com.antiphon.xiaomai.modules.entity.cate.MemebershipCard;
public interface MemebershipCardService {
/**
* 根据ID查询
* @param id
* @return
*/
public MemebershipCard findMemebershipCard(Long id);
/**
* 保存
* @param id
* @return
*/
public void saveMemebershipCard(MemebershipCard r);
/**
* 更新
* @param id
* @return
*/
public void updateMemebershipCard(MemebershipCard r);
/**
* 删除
* @param id
* @return
*/
public void delMemebershipCard(Serializable... entityids);
/**
* 根据某属性查询
* @param p
* @param v
* @return
*/
public MemebershipCard findMemebershipCard(Object p,Object v);
/**
* 根据条件查询
* @param pv
* @param filters
* @return
*/
public QueryResult<MemebershipCard> findPage(PageView<MemebershipCard> pv,List<PropertyFilter> filters );
}
| [
"286549429@qq.com"
] | 286549429@qq.com |
1bca2b2a6acc6cc3e36de637e954d0fc173db703 | c36b3bacc4cf0d268d63d351b51a8a2517d571d1 | /OM/test/com/rr/om/exchange/DummyOrderBook.java | 00af8f466199413eb8c72d85e638bab3572566dd | [] | no_license | renicl/alphaProject | e4ced0c8de85b933f8b3af1903577bd0143a9acf | 1785ecc8c7d930fda2c60452504a141e417712b6 | refs/heads/master | 2021-05-15T09:02:55.542649 | 2017-12-03T16:32:05 | 2017-12-03T16:32:05 | 108,066,861 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,737 | java | /*******************************************************************************
* Copyright (c) 2015 Low Latency Trading Limited : Author Richard Rose
* 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.rr.om.exchange;
import com.rr.core.lang.ZString;
import com.rr.core.model.ExchangeBook;
import com.rr.model.generated.internal.events.interfaces.TradeNew;
import com.rr.model.generated.internal.type.OrdType;
import com.rr.model.generated.internal.type.Side;
// @NOTE only generates one sided fill
// @TODO implement proper book and generate fills for both sides as appropriate
public class DummyOrderBook implements ExchangeBook {
public DummyOrderBook() {
//
}
public TradeNew add( final ZString mktOrdId, final int orderQty, final double price, final OrdType ordType, final Side side ) {
return null;
}
public TradeNew amend( ZString marketOrderId, int newQty, int origQty, int fillQty, double newPrice, double origPrice, OrdType ordType, Side side ) {
return null;
}
public void remove( ZString marketOrderId, int openQty, double price, OrdType ordType, Side side ) {
//
}
}
| [
"lucasrenick@lucass-mbp.fios-router.home"
] | lucasrenick@lucass-mbp.fios-router.home |
74d7286db4191e65211579fad8ffdfec3072a3ff | 2d1230a8fef33d76e5abb591766e505b564e7a6d | /src/me/david/timbernocheat/util/CheckUtils.java | 9ed7af9cbc49c22773ad346b1c4346eae773386d | [] | no_license | SplotyCode/TimberNoCheat | 2e01487b7361b5b92fed92c0ad3849ca12b4926b | 45c4775f5cb723dc149e884e389372a54b06259d | refs/heads/master | 2020-05-24T23:44:21.394312 | 2018-10-29T18:26:37 | 2018-10-29T18:26:37 | 187,518,207 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,795 | java | package me.david.timbernocheat.util;
import me.david.api.Api;
import me.david.api.nms.AABBBox;
import me.david.api.utils.ServerWorldUtil;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Entity;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
public final class CheckUtils {
public static boolean frostWalkers(final Player player) {
final ItemStack boots = player.getInventory().getBoots();
return ServerWorldUtil.getMinecraftVersionInt() >= 190 && boots.containsEnchantment(Enchantment.getByName("FROST_WALKER"));
}
public static boolean onGround(final Player player){
return checkSurroundings(player, CheckMode.FEED, (location, block, playerBox, blockBox) -> {
return block.getType().isSolid() && playerBox.intersectsWith(blockBox);
});
}
public static boolean headCollidate(final Player player){
return checkSurroundings(player, CheckMode.HEAD, (location, block, playerBox, blockBox) -> {
return block.getType().isSolid() && playerBox.intersectsWith(blockBox);
});
}
public static boolean collidate(final Player player){
return checkSurroundings(player, CheckMode.BODY, (location, block, playerBox, blockBox) -> {
return block.getType().isSolid() && playerBox.intersectsWith(blockBox);
});
}
public static boolean collidateLiquid(final Player player){
return checkSurroundings(player, CheckMode.BODY, (location, block, playerBox, blockBox) -> {
return (block.getType() == Material.LAVA ||
block.getType() == Material.STATIONARY_LAVA ||
block.getType() == Material.WATER ||
block.getType() == Material.STATIONARY_WATER) && playerBox.intersectsWith(blockBox);
});
}
public static boolean onGround(final Location location){
return checkSurroundings(location, CheckMode.FEED, (location2, block, playerBox, blockBox) -> {
return block.getType().isSolid() && playerBox.intersectsWith(blockBox);
});
}
public static boolean headCollidate(final Location location){
return checkSurroundings(location, CheckMode.HEAD, (location2, block, playerBox, blockBox) -> {
return block.getType().isSolid() && playerBox.intersectsWith(blockBox);
});
}
public static boolean doesColidateWithMaterial(Material material, Player player){
return checkSurroundings(player, CheckMode.BODY, (location, block, playerBox, blockBox) -> {
return block.getType() == material && playerBox.intersectsWith(blockBox);
});
}
public static boolean doesColidateWithMaterial(Material material, Location location){
return checkSurroundings(location, CheckMode.BODY, (location2, block, playerBox, blockBox) -> {
return block.getType() == material && playerBox.intersectsWith(blockBox);
});
}
public static int getKnockbag(Entity entity){
if(!(entity instanceof HumanEntity)) return 0;
ItemStack is = ((HumanEntity) entity).getItemInHand();
return (is == null?0:is.getEnchantmentLevel(Enchantment.KNOCKBACK));
}
public static boolean checkSurroundings(Player player, CheckMode checkMode, BlockValidator validator) {
AABBBox playerBox = Api.getNms().getBoundingBox(player).expand(0, 0.15, 0);
return checkSurroundings(player.getLocation(), playerBox, checkMode, validator);
}
public static boolean checkSurroundings(Location location, CheckMode checkMode, BlockValidator validator) {
AABBBox playerBox = new AABBBox(location.getX()-0.3, location.getY(), location.getZ()-0.3, location.getX()+0.3, location.getY()+1.8, location.getZ()+0.3).expand(0, 0.15, 0);
return checkSurroundings(location, playerBox, checkMode, validator);
}
//TODO not 1.9 save because of this flying chestplate thingy
//TODO add sneaking (Height: 1.65 Blocks Width: 0.6 Blocks)
public static boolean checkSurroundings(Location location, AABBBox playerBox, CheckMode checkMode, BlockValidator validator) {
for(int x = location.getBlockX()-1; x<location.getBlockX()+3; x++)
for(int z = location.getBlockZ()-1; z<location.getBlockZ()+3; z++) {
switch (checkMode) {
case HEAD:
for (double y = 0.1; y < 1.2; y += 0.1) {
Location loc = new Location(location.getWorld(), x, location.getY() - y, z);
Block block = loc.getBlock();
AABBBox blockBox = Api.getNms().getBoundingBox(block);
if (blockBox != null && validator.check(loc, block, playerBox, blockBox))
return true;
}
break;
case BODY:
for (int y = location.getBlockY()-1; y<location.getBlockY()+3; y++) {
Location loc = new Location(location.getWorld(), x, y, z);
Block block = loc.getBlock();
AABBBox blockBox = Api.getNms().getBoundingBox(block);
if (blockBox != null && validator.check(loc, block, playerBox, blockBox))
return true;
}
break;
case FEED:
for (double y = 0.2;y > -1.1;y-=0.1) {
Location loc = new Location(location.getWorld(), x, location.getY() - y, z);
Block block = loc.getBlock();
AABBBox blockBox = Api.getNms().getBoundingBox(block);
if (blockBox != null && validator.check(loc, block, playerBox, blockBox))
return true;
}
break;
}
}
return false;
}
/* Return the Level of a Affect */
public static int getPotionEffectLevel(Player p, PotionEffectType pet) {
for (PotionEffect pe : p.getActivePotionEffects())
if (pe.getType().getName().equals(pet.getName()))
return pe.getAmplifier() + 1;
return 0;
}
public enum CheckMode {
BODY,
HEAD,
FEED
}
public interface BlockValidator {
boolean check(Location location, Block block, AABBBox playerBox, AABBBox blockBox);
}
}
| [
"davidscandurra@gmail.com"
] | davidscandurra@gmail.com |
9a410670c5365e8e22c3bc9ebdc7e6bcb5b2cfd8 | 61602d4b976db2084059453edeafe63865f96ec5 | /com/xunlei/downloadprovider/download/create/widget/c.java | 3a9c38c953cd5cf64ca4dbad9d87c383992fa54c | [] | no_license | ZoranLi/thunder | 9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0 | 0778679ef03ba1103b1d9d9a626c8449b19be14b | refs/heads/master | 2020-03-20T23:29:27.131636 | 2018-06-19T06:43:26 | 2018-06-19T06:43:26 | 137,848,886 | 12 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,775 | java | package com.xunlei.downloadprovider.download.create.widget;
import com.xunlei.common.businessutil.XLFileTypeUtil.EFileCategoryType;
/* compiled from: FileManagerListView */
final /* synthetic */ class c {
static final /* synthetic */ int[] a = new int[EFileCategoryType.values().length];
static {
/* JADX: method processing error */
/*
Error: java.lang.NullPointerException
*/
/*
r0 = com.xunlei.common.businessutil.XLFileTypeUtil.EFileCategoryType.values();
r0 = r0.length;
r0 = new int[r0];
a = r0;
r0 = a; Catch:{ NoSuchFieldError -> 0x0014 }
r1 = com.xunlei.common.businessutil.XLFileTypeUtil.EFileCategoryType.E_MUSIC_CATEGORY; Catch:{ NoSuchFieldError -> 0x0014 }
r1 = r1.ordinal(); Catch:{ NoSuchFieldError -> 0x0014 }
r2 = 1; Catch:{ NoSuchFieldError -> 0x0014 }
r0[r1] = r2; Catch:{ NoSuchFieldError -> 0x0014 }
L_0x0014:
r0 = a; Catch:{ NoSuchFieldError -> 0x001f }
r1 = com.xunlei.common.businessutil.XLFileTypeUtil.EFileCategoryType.E_VIDEO_CATEGORY; Catch:{ NoSuchFieldError -> 0x001f }
r1 = r1.ordinal(); Catch:{ NoSuchFieldError -> 0x001f }
r2 = 2; Catch:{ NoSuchFieldError -> 0x001f }
r0[r1] = r2; Catch:{ NoSuchFieldError -> 0x001f }
L_0x001f:
r0 = a; Catch:{ NoSuchFieldError -> 0x002a }
r1 = com.xunlei.common.businessutil.XLFileTypeUtil.EFileCategoryType.E_SOFTWARE_CATEGORY; Catch:{ NoSuchFieldError -> 0x002a }
r1 = r1.ordinal(); Catch:{ NoSuchFieldError -> 0x002a }
r2 = 3; Catch:{ NoSuchFieldError -> 0x002a }
r0[r1] = r2; Catch:{ NoSuchFieldError -> 0x002a }
L_0x002a:
r0 = a; Catch:{ NoSuchFieldError -> 0x0035 }
r1 = com.xunlei.common.businessutil.XLFileTypeUtil.EFileCategoryType.E_ZIP_CATEGORY; Catch:{ NoSuchFieldError -> 0x0035 }
r1 = r1.ordinal(); Catch:{ NoSuchFieldError -> 0x0035 }
r2 = 4; Catch:{ NoSuchFieldError -> 0x0035 }
r0[r1] = r2; Catch:{ NoSuchFieldError -> 0x0035 }
L_0x0035:
r0 = a; Catch:{ NoSuchFieldError -> 0x0040 }
r1 = com.xunlei.common.businessutil.XLFileTypeUtil.EFileCategoryType.E_BOOK_CATEGORY; Catch:{ NoSuchFieldError -> 0x0040 }
r1 = r1.ordinal(); Catch:{ NoSuchFieldError -> 0x0040 }
r2 = 5; Catch:{ NoSuchFieldError -> 0x0040 }
r0[r1] = r2; Catch:{ NoSuchFieldError -> 0x0040 }
L_0x0040:
r0 = a; Catch:{ NoSuchFieldError -> 0x004b }
r1 = com.xunlei.common.businessutil.XLFileTypeUtil.EFileCategoryType.E_PICTURE_CATEGORY; Catch:{ NoSuchFieldError -> 0x004b }
r1 = r1.ordinal(); Catch:{ NoSuchFieldError -> 0x004b }
r2 = 6; Catch:{ NoSuchFieldError -> 0x004b }
r0[r1] = r2; Catch:{ NoSuchFieldError -> 0x004b }
L_0x004b:
r0 = a; Catch:{ NoSuchFieldError -> 0x0056 }
r1 = com.xunlei.common.businessutil.XLFileTypeUtil.EFileCategoryType.E_TORRENT_CATEGORY; Catch:{ NoSuchFieldError -> 0x0056 }
r1 = r1.ordinal(); Catch:{ NoSuchFieldError -> 0x0056 }
r2 = 7; Catch:{ NoSuchFieldError -> 0x0056 }
r0[r1] = r2; Catch:{ NoSuchFieldError -> 0x0056 }
L_0x0056:
r0 = a; Catch:{ NoSuchFieldError -> 0x0062 }
r1 = com.xunlei.common.businessutil.XLFileTypeUtil.EFileCategoryType.E_OTHER_CATEGORY; Catch:{ NoSuchFieldError -> 0x0062 }
r1 = r1.ordinal(); Catch:{ NoSuchFieldError -> 0x0062 }
r2 = 8; Catch:{ NoSuchFieldError -> 0x0062 }
r0[r1] = r2; Catch:{ NoSuchFieldError -> 0x0062 }
L_0x0062:
return;
*/
throw new UnsupportedOperationException("Method not decompiled: com.xunlei.downloadprovider.download.create.widget.c.<clinit>():void");
}
}
| [
"lizhangliao@xiaohongchun.com"
] | lizhangliao@xiaohongchun.com |
dcea63dfc4c6e836a8efaa4096c8b4c3a93cffb8 | 234499eb92966fb2cccc93bab4e5e09c15aa725e | /src/main/java/com/yoxiang/multi_thread_programming/chapter02/sample27/MyThreadB.java | c19a8f06e837c9614d287e931d7aaedf0d045c75 | [] | no_license | RiversLau/concurrent-study | b8d7dbf0599a9eae6ffb31c175001c29669d60bb | c43a763bd2098e431ad7e9b4789889eb1cdd0419 | refs/heads/master | 2021-09-14T09:38:43.815287 | 2018-05-11T12:46:02 | 2018-05-11T12:46:02 | 115,006,276 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 377 | java | package com.yoxiang.multi_thread_programming.chapter02.sample27;
/**
* Author: Rivers
* Date: 2018/1/3 06:34
*/
public class MyThreadB extends Thread {
private IService service;
public MyThreadB(IService service) {
super();
this.service = service;
}
@Override
public void run() {
super.run();
service.methodB();
}
}
| [
"zhaoxiang0805@hotmail.com"
] | zhaoxiang0805@hotmail.com |
2596b5d2716f719c89216def52af4b0488839c7e | 8ae12e614deeda5a2ba8ecad3422b5f5da76eeb0 | /src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidLibraryAarInfoApi.java | df4a4c892c2e16e941d2df24dc7967348d6b4a02 | [
"Apache-2.0"
] | permissive | dilbrent/bazel | c3372b0a994ae9fe939620b307a4ae70d2b786ff | 7b73c5f6abc9e9b574849f760873252ee987e184 | refs/heads/master | 2020-03-22T03:16:33.241314 | 2018-08-09T12:17:29 | 2018-08-09T12:18:55 | 139,422,574 | 2 | 0 | Apache-2.0 | 2018-07-02T09:39:10 | 2018-07-02T09:39:08 | null | UTF-8 | Java | false | false | 1,197 | java | // Copyright 2018 The Bazel Authors. 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.google.devtools.build.lib.skylarkbuildapi.android;
import com.google.devtools.build.lib.skylarkbuildapi.StructApi;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
/** A target that can provide the aar artifact of Android libraries */
@SkylarkModule(
name = "AndroidLibraryAarInfo",
doc = "Android AARs provided by a library rule and its dependencies",
category = SkylarkModuleCategory.PROVIDER)
public interface AndroidLibraryAarInfoApi extends StructApi {}
| [
"copybara-piper@google.com"
] | copybara-piper@google.com |
dd2ce74d16773bbbaf8b1a05cb680411ba2217a9 | e0d01559725c2de2c7abf1223f44f047a31002e1 | /javase/src/main/java/com/gaopal/java/c01_advance/jvm/c4_RuntimeDataAreaAndInstructionSet/Hello_01.java | 66155582af7554881f9026aa6ae622ed3104f62a | [] | no_license | warfu/source-code-analysis | 699f31457809ef93cbd5abb98e6cfd38aafa27b8 | e02bd99028ae6292f77174df8e6cc1633a3138ba | refs/heads/main | 2023-07-16T16:15:06.024381 | 2021-08-15T12:33:24 | 2021-08-15T12:33:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 419 | java | package com.gaopal.java.c01_advance.jvm.c4_RuntimeDataAreaAndInstructionSet;
public class Hello_01 {
public static void main(String[] args) {
int i = 100;
}
public void m1() {
int i = 200;
}
public void m2(int k) {
int i = 300;
}
public void add(int a, int b) {
int c = a + b;
}
public void m3() {
Object o = null;
}
public void m4() {
Object o = new Object();
}
}
| [
"ftd.gaopal@gmail.com"
] | ftd.gaopal@gmail.com |
ae5d7b091262e451622661ad94d3683993436ae8 | ebfe59284c7379182e2ecf4adba9b5969e598888 | /Plugins/appcenter/src/com/taobao/android/gamecenter/GameStaticReceiver.java | 61077b99068c53417890cc16b000556bce724a92 | [
"MIT"
] | permissive | entrodace/AtlasForAndroid | 612407784a93094ead8620469a1a7da0851e9562 | 2e37a0bd8ebe5e1a866b76debbf842632bd4295e | refs/heads/master | 2021-01-18T06:55:59.422730 | 2015-03-28T06:01:58 | 2015-03-28T06:01:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 498 | java | package com.taobao.android.gamecenter;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class GameStaticReceiver extends BroadcastReceiver {
public GameStaticReceiver() {
}
@Override
public void onReceive(Context context, Intent intent) {
// TODO: This method is called when the BroadcastReceiver is receiving
// an Intent broadcast.
System.out.println("GameStaticReceiver.onReceive()"+intent.getStringExtra("msg"));
}
}
| [
"bunnyblueair@gmail.com"
] | bunnyblueair@gmail.com |
da591470803b9833478d54e1d47be21724a83b41 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/24/24_0af43fe0231c8e2099d30a781619868ecdf21f11/BoardLocalLayout/24_0af43fe0231c8e2099d30a781619868ecdf21f11_BoardLocalLayout_t.java | a247a5d26943ab9564734033b8e112a3319e87cc | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 1,714 | java | package org.kompiro.jamcircle.kanban.ui.internal.editpart.policy;
import java.util.Map;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.*;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
import org.kompiro.jamcircle.kanban.ui.internal.editpart.CardEditPart;
import org.kompiro.jamcircle.kanban.ui.internal.figure.CardFigureLayer;
public class BoardLocalLayout {
private EditPartViewer viewer;
public BoardLocalLayout(EditPartViewer viewer) {
this.viewer = viewer;
}
public synchronized void calc(Rectangle targetRect,
Rectangle containerRect) {
Point start = targetRect.getLocation();
if(!containerRect.contains(targetRect)){
start.x = 0;
}
EditPart editPart = getCardEditPart(start);
while(editPart != null) {
start.x += CardFigureLayer.CARD_WIDTH + 5;
Dimension cardSize = new Dimension(CardFigureLayer.CARD_WIDTH,CardFigureLayer.CARD_HEIGHT);
Rectangle localRect = new Rectangle(start,cardSize);
if(!containerRect.contains(localRect)){
start.y += CardFigureLayer.CARD_HEIGHT + 5;
start.x = 0;
}
editPart = getCardEditPart(start);
}
targetRect.setLocation(start);
}
private EditPart getCardEditPart(Point start) {
Map<?,?> visualPartMap = viewer.getVisualPartMap();
for(Object key :visualPartMap.keySet()){
IFigure fig = (IFigure) key;
Rectangle cardRect = fig.getBounds().getCopy();
cardRect.height = cardRect.height - CardFigureLayer.FOOTER_SECTION_HEIGHT;
if(cardRect.contains(start)){
EditPart editPart = (EditPart) visualPartMap.get(key);
if(editPart instanceof CardEditPart) return editPart;
}
}
return null;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
2ef665a6d5a3929e396b870fe0bef42d2bca8a79 | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava1/Foo112.java | 6ab18f5a930a29d90315cb509772cb814319a55b | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package applicationModulepackageJava1;
public class Foo112 {
public void foo0() {
new applicationModulepackageJava1.Foo111().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
83309064da7dee01bb29e5d444eafd62d7bcc18b | 82eba08b9a7ee1bd1a5f83c3176bf3c0826a3a32 | /ZmailSoap/src/wsdl-test/generated/zcsclient/adminext/testPurgeBulkIMAPImportTasksRequest.java | 2b4c13b2ce20366daa61dc148b5b3bbbbb11185e | [
"MIT"
] | permissive | keramist/zmailserver | d01187fb6086bf3784fe180bea2e1c0854c83f3f | 762642b77c8f559a57e93c9f89b1473d6858c159 | refs/heads/master | 2021-01-21T05:56:25.642425 | 2013-10-21T11:27:05 | 2013-10-22T12:48:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,356 | java | /*
* ***** BEGIN LICENSE BLOCK *****
*
* Zimbra Collaboration Suite Server
* Copyright (C) 2011, 2012 VMware, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
*
* ***** END LICENSE BLOCK *****
*/
package generated.zcsclient.adminext;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for purgeBulkIMAPImportTasksRequest complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="purgeBulkIMAPImportTasksRequest">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "purgeBulkIMAPImportTasksRequest")
public class testPurgeBulkIMAPImportTasksRequest {
}
| [
"bourgerie.quentin@gmail.com"
] | bourgerie.quentin@gmail.com |
803caf678daed7eb470ca8ccd0c1d97a68f2a93c | ff2b36022a57ff1e276e42b432478ebacb880c5c | /src/main/java/org/sikuli/slides/api/actions/DisplayLabelAction.java | e50b38d6121a0aa9d4efcb65750902fede9fcc55 | [
"MIT"
] | permissive | fellam/sikuli-slides | d1798ef8ba98ea6d530a91ffe66411c6302f8cee | 8751ca516962678ba11b2c82e52076d1d88064cb | refs/heads/master | 2021-01-17T07:34:51.208664 | 2014-04-24T22:33:06 | 2014-04-24T22:33:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,614 | java | package org.sikuli.slides.api.actions;
import java.awt.Color;
import org.sikuli.api.ScreenRegion;
import org.sikuli.api.visual.Canvas;
import org.sikuli.api.visual.ScreenRegionCanvas;
import org.sikuli.slides.api.Context;
import com.google.common.base.Objects;
public class DisplayLabelAction implements Action {
private String text = "";
private int fontSize = 12;
private int duration = 3000;
private Color backgroundColor = Color.yellow;
private Canvas canvas;
@Override
public void execute(Context context){
ScreenRegion targetRegion = context.getScreenRegion();
String textToDisplay = context.render(text);
canvas = new ScreenRegionCanvas(targetRegion);
canvas.addLabel(targetRegion, textToDisplay)
.withColor(Color.black).withFontSize((int)fontSize).withLineWidth(2)
.withBackgroundColor(backgroundColor)
.withHorizontalAlignmentCenter().withVerticalAlignmentMiddle();
canvas.show();
}
@Override
public void stop(){
canvas.hide();
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public int getFontSize() {
return fontSize;
}
public void setFontSize(int fontSize) {
this.fontSize = fontSize;
}
public int getDuration() {
return duration;
}
public void setDuration(int duration) {
this.duration = duration;
}
public Color getBackgroundColor() {
return backgroundColor;
}
public void setBackgroundColor(Color backgroundColor) {
this.backgroundColor = backgroundColor;
}
public String toString(){
return Objects.toStringHelper(this).add("text", text).toString();
}
}
| [
"doubleshow@gmail.com"
] | doubleshow@gmail.com |
666c75e968dc73b02f9544932faf5c98e1804f9e | 3c4425d520faeaa78a24ade0673da6cff431671e | /开奖程序/src/lottery/domains/content/vo/bets/UserBetsSettleUpPoint.java | 03eece528561ad1632b271d78201e03608aa434f | [] | no_license | yuruyigit/lotteryServer | de5cc848b9c7967817a33629efef4e77366b74c0 | 2cc97c54a51b9d76df145a98d72d3fe097bdd6af | refs/heads/master | 2020-06-17T03:39:24.838151 | 2019-05-25T11:32:00 | 2019-05-25T11:32:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 949 | java | /* */ package lottery.domains.content.vo.bets;
/* */
/* */ import lottery.domains.content.entity.User;
/* */
/* */
/* */
/* */ public class UserBetsSettleUpPoint
/* */ {
/* */ private User user;
/* */ private Double lotteryMoney;
/* */
/* */ public User getUser()
/* */ {
/* 14 */ return this.user;
/* */ }
/* */
/* */ public void setUser(User user) {
/* 18 */ this.user = user;
/* */ }
/* */
/* */ public Double getLotteryMoney() {
/* 22 */ return this.lotteryMoney;
/* */ }
/* */
/* */ public void setLotteryMoney(Double lotteryMoney) {
/* 26 */ this.lotteryMoney = lotteryMoney;
/* */ }
/* */ }
/* Location: /Users/vincent/Downloads/至尊程序/lotteryOpen/lotteryOpen.jar!/lottery/domains/content/vo/bets/UserBetsSettleUpPoint.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 0.7.1
*/ | [
"nengbowan@163.com"
] | nengbowan@163.com |
4b64238a940cd22eaed3b9e5f781dadd5eb18eac | 29acc5b6a535dfbff7c625f5513871ba55554dd2 | /aws-java-sdk-elasticsearch/src/main/java/com/amazonaws/services/elasticsearch/model/DescribeElasticsearchDomainConfigResult.java | e3b2c2aa2bbb8c30997a2ad1ccc4c95aecb0bb9a | [
"JSON",
"Apache-2.0"
] | permissive | joecastro/aws-sdk-java | b2d25f6a503110d156853836b49390d2889c4177 | fdbff1d42a73081035fa7b0f172b9b5c30edf41f | refs/heads/master | 2021-01-21T16:52:46.982971 | 2016-01-11T22:55:28 | 2016-01-11T22:55:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,560 | java | /*
* Copyright 2010-2016 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.elasticsearch.model;
import java.io.Serializable;
/**
* <p>
* The result of a <code>DescribeElasticsearchDomainConfig</code> request.
* Contains the configuration information of the requested domain.
* </p>
*/
public class DescribeElasticsearchDomainConfigResult implements Serializable,
Cloneable {
/**
* <p>
* The configuration information of the domain requested in the
* <code>DescribeElasticsearchDomainConfig</code> request.
* </p>
*/
private ElasticsearchDomainConfig domainConfig;
/**
* <p>
* The configuration information of the domain requested in the
* <code>DescribeElasticsearchDomainConfig</code> request.
* </p>
*
* @param domainConfig
* The configuration information of the domain requested in the
* <code>DescribeElasticsearchDomainConfig</code> request.
*/
public void setDomainConfig(ElasticsearchDomainConfig domainConfig) {
this.domainConfig = domainConfig;
}
/**
* <p>
* The configuration information of the domain requested in the
* <code>DescribeElasticsearchDomainConfig</code> request.
* </p>
*
* @return The configuration information of the domain requested in the
* <code>DescribeElasticsearchDomainConfig</code> request.
*/
public ElasticsearchDomainConfig getDomainConfig() {
return this.domainConfig;
}
/**
* <p>
* The configuration information of the domain requested in the
* <code>DescribeElasticsearchDomainConfig</code> request.
* </p>
*
* @param domainConfig
* The configuration information of the domain requested in the
* <code>DescribeElasticsearchDomainConfig</code> request.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeElasticsearchDomainConfigResult withDomainConfig(
ElasticsearchDomainConfig domainConfig) {
setDomainConfig(domainConfig);
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getDomainConfig() != null)
sb.append("DomainConfig: " + getDomainConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeElasticsearchDomainConfigResult == false)
return false;
DescribeElasticsearchDomainConfigResult other = (DescribeElasticsearchDomainConfigResult) obj;
if (other.getDomainConfig() == null ^ this.getDomainConfig() == null)
return false;
if (other.getDomainConfig() != null
&& other.getDomainConfig().equals(this.getDomainConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime
* hashCode
+ ((getDomainConfig() == null) ? 0 : getDomainConfig()
.hashCode());
return hashCode;
}
@Override
public DescribeElasticsearchDomainConfigResult clone() {
try {
return (DescribeElasticsearchDomainConfigResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
} | [
"aws@amazon.com"
] | aws@amazon.com |
212a6b9e09455a9efb2354bd0afcfd15d98ac265 | dff1127ec023fa044a90eb6a2134e8d93b25d23a | /cache/trunk/coconut-cache-api/src/main/java/org/coconut/cache/spi/IllegalCacheConfigurationException.java | bbc03250f3e15f482003541c59dadcb77fe484b1 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | codehaus/coconut | 54d98194e401bd98659de4bb72e12b7e24ba71e4 | f2bc1fc516c65a9d0fd76ffb3bb148309ef1ba76 | refs/heads/master | 2023-08-31T00:18:48.501510 | 2008-04-24T09:28:52 | 2008-04-24T09:28:52 | 36,364,856 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,191 | java | /* Copyright 2004 - 2007 Kasper Nielsen <kasper@codehaus.org> Licensed under
* the Apache 2.0 License, see http://coconut.codehaus.org/license.
*/
package org.coconut.cache.spi;
import org.coconut.cache.Cache;
import org.coconut.cache.CacheConfiguration;
import org.coconut.cache.CacheException;
/**
* This method is thrown by the constructor of a {@link Cache} if the
* {@link CacheConfiguration} is invalid in some way.
*
* @author <a href="mailto:kasper@codehaus.org">Kasper Nielsen</a>
* @version $Id$
*/
public class IllegalCacheConfigurationException extends CacheException {
/** serialVersionUID. */
private static final long serialVersionUID = -1695400915732143052L;
/**
* Constructs a new IllegalCacheConfigurationException exception with
* <code>null</code> as its detail message. The cause is not initialized, and may
* subsequently be initialized by a call to {@link Throwable#initCause}.
*/
public IllegalCacheConfigurationException() {}
/**
* Constructs a new IllegalCacheConfigurationException exception with the specified
* detail message. The cause is not initialized, and may subsequently be initialized
* by a call to {@link Throwable#initCause}.
*
* @param message
* the detail message. The detail message is saved for later retrieval by
* the {@link #getMessage()} method.
*/
public IllegalCacheConfigurationException(final String message) {
super(message);
}
/**
* Constructs a new IllegalCacheConfigurationException exception with the specified
* detail message and cause.
* <p>
* Note that the detail message associated with <code>cause</code> is <i>not </i>
* automatically incorporated in this cache exception's detail message.
*
* @param message
* the detail message (which is saved for later retrieval by the
* {@link #getMessage()} method).
* @param cause
* the cause (which is saved for later retrieval by the {@link #getCause()}
* method). (A<tt>null</tt> value is permitted, and indicates that the
* cause is nonexistent or unknown.)
*/
public IllegalCacheConfigurationException(final String message, final Throwable cause) {
super(message, cause);
}
/**
* Constructs a new IllegalCacheConfigurationException exception with the specified
* cause and a detail message of <tt>(cause==null ? null : cause.toString())</tt>
* (which typically contains the class and detail message of <tt>cause</tt>). This
* constructor is useful for cache exceptions that are little more than wrappers for
* other throwables.
*
* @param cause
* the cause (which is saved for later retrieval by the {@link #getCause()}
* method). (A <tt>null</tt> value is permitted, and indicates that the
* cause is nonexistent or unknown.)
*/
public IllegalCacheConfigurationException(final Throwable cause) {
super(cause);
}
}
| [
"kasper@0b154b62-a015-0410-9c24-a35e082c6f94"
] | kasper@0b154b62-a015-0410-9c24-a35e082c6f94 |
81762ca9d8308acf1e61f3838fffdee61472a91d | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /newEvaluatedBugs/Mockito_17_buggy/mutated/9/ClassImposterizer.java | df3222973707fc415689508b9a00f959346b9c28 | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,155 | java | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.creation.jmock;
import java.lang.reflect.*;
import java.util.List;
import org.mockito.cglib.core.*;
import org.mockito.cglib.proxy.*;
import org.mockito.exceptions.base.MockitoException;
import org.mockito.internal.creation.cglib.MockitoNamingPolicy;
import org.objenesis.ObjenesisStd;
/**
* Thanks to jMock guys for this handy class that wraps all the cglib magic.
*/
public class ClassImposterizer {
public static final ClassImposterizer INSTANCE = new ClassImposterizer();
private ClassImposterizer() {}
//TODO: after 1.8, in order to provide decent exception message when objenesis is not found,
//have a constructor in this class that tries to instantiate ObjenesisStd and if it fails then show decent exception that dependency is missing
//TODO: after 1.8, for the same reason catch and give better feedback when hamcrest core is not found.
private ObjenesisStd objenesis = new ObjenesisStd();
private static final NamingPolicy NAMING_POLICY_THAT_ALLOWS_IMPOSTERISATION_OF_CLASSES_IN_SIGNED_PACKAGES = new MockitoNamingPolicy() {
@Override
public String getClassName(String prefix, String source, Object key, Predicate names) {
return "codegen." + super.getClassName(prefix, source, key, names);
}
};
private static final CallbackFilter IGNORE_BRIDGE_METHODS = new CallbackFilter() {
public int accept(Method method) {
return method.isBridge() ? 1 : 0;
}
};
public boolean canImposterise(Class<?> type) {
return !type.isPrimitive() && !Modifier.isFinal(type.getModifiers());
}
public <T> T imposterise(final MethodInterceptor interceptor, Class<T> mockedType, Class<?>... ancillaryTypes) {
try {
setConstructorsAccessible(mockedType, true);
Class<?> proxyClass = createProxyClass(mockedType, ancillaryTypes);
return mockedType.cast(createProxy(proxyClass, interceptor));
} finally {
setConstructorsAccessible(mockedType, false);
}
}
private void setConstructorsAccessible(Class<?> mockedType, boolean accessible) {
for (Constructor<?> constructor : mockedType.getDeclaredConstructors()) {
constructor.setAccessible(accessible);
}
}
private Class<?> createProxyClass(Class<?> mockedType, Class<?>...interfaces) {
if (mockedType == Object.class) {
mockedType = ClassWithSuperclassToWorkAroundCglibBug.class;
}
Enhancer enhancer = new Enhancer() {
@Override
@SuppressWarnings("unchecked")
protected void filterConstructors(Class sc, List constructors) {
// Don't filter
}
};
enhancer.setClassLoader(SearchingClassLoader.combineLoadersOf(mockedType));
enhancer.setUseFactory(true);
if (mockedType.isInterface()) {
enhancer.setSuperclass(Object.class);
enhancer.setInterfaces(prepend(mockedType, interfaces));
} else {
enhancer.setSuperclass(mockedType);
enhancer.setInterfaces(interfaces);
}
enhancer.setCallbackTypes(new Class[]{MethodInterceptor.class, NoOp.class});
enhancer.setCallbackFilter(IGNORE_BRIDGE_METHODS);
if (mockedType.getSigners() != null) {
enhancer.setNamingPolicy(NAMING_POLICY_THAT_ALLOWS_IMPOSTERISATION_OF_CLASSES_IN_SIGNED_PACKAGES);
} else {
enhancer.setNamingPolicy(MockitoNamingPolicy.INSTANCE);
}
try {
return enhancer.createClass();
} catch (CodeGenerationException e) {
if (Modifier.isPrivate(mockedType.getModifiers())) {
throw new MockitoException("\n"
+ "Mockito cannot mock this class: " + mockedType
+ ".\n"
+ "Most likely it is a private class that is not visible by Mockito");
}
throw new MockitoException("\n"
+ "Mockito cannot mock this class: " + mockedType
+ "\n"
+ "Mockito can only mock visible & non-final classes."
+ "\n"
+ "If you're not sure why you're getting this error, please report to the mailing list.", e);
}
}
private Object createProxy(Class<?> proxyClass, final MethodInterceptor interceptor) {
Factory proxy = (Factory) objenesis.newInstance(proxyClass);
proxy.setCallbacks(new Callback[] {interceptor, SerializableNoOp.SERIALIZABLE_INSTANCE });
return proxy;
}
private Class<?>[] prepend(Class<?> first, Class<?>... rest) {
Class<?>[] all = new Class<?>[rest.length+1];
all[0] = first;
System.arraycopy(rest, 0, rest, 1, rest.length);
return all;
}
public static class ClassWithSuperclassToWorkAroundCglibBug {}
}
| [
"justinwm@163.com"
] | justinwm@163.com |
d00eadf8164ad71ab59e857c6e92ae66e9e12f54 | 318c1a1d99323f421fe9c2c2770f49afb87366df | /sw-common/src/main/java/com/zsCat/common/kafka/client/exception/ProducerRuntimeException.java | 96e5ea739adc55201a80adf894b125cb62a5a859 | [] | no_license | narci2010/zscat | e4ec9cf22967bcfca377712263109238c751eccf | e2bf16aa804caff1594a6a81666bdf7d62f8c1c2 | refs/heads/master | 2021-01-21T22:35:27.978743 | 2017-09-01T10:24:46 | 2017-09-01T10:24:46 | 102,163,734 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 592 | java | package com.zsCat.common.kafka.client.exception;
/**
* @author lixu
* @version 1.0
* @created 15-12-23
*/
public class ProducerRuntimeException extends RuntimeException {
private static final long serialVersionUID = 5222623760553747260L;
public ProducerRuntimeException() {
super();
}
public ProducerRuntimeException(String message) {
super(message);
}
public ProducerRuntimeException(String message, Throwable cause) {
super(message, cause);
}
public ProducerRuntimeException(Throwable cause) {
super(cause);
}
}
| [
"1439226817@qq.com"
] | 1439226817@qq.com |
eef7a85003005ceb39dca507b5bcedd219ddf41d | 51aef8e206201568d04fb919bf54a3009c039dcf | /trunk/src/com/jmex/game/state/GameState.java | b58675ff8993ecb56a50a6d5185d8ff1e0603298 | [] | no_license | lihak/fairytale-soulfire-svn-to-git | 0b8bdbfcaf774f13fc3d32cc3d3a6fae64f29c81 | a85eb3fc6f4edf30fef9201902fcdc108da248e4 | refs/heads/master | 2021-02-11T15:25:47.199953 | 2015-12-28T14:48:14 | 2015-12-28T14:48:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,430 | java | /*
* Copyright (c) 2003-2008 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'jMonkeyEngine' nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.jmex.game.state;
/**
* A GameState is used to encapsulate a certain state of a game, e.g. "ingame" or
* "main menu".
* <p>
* A GameState can be attached to a GameStateNode, forming a tree structure
* similar to jME's scenegraph.
* <p>
* It contains two important methods: update(float) and render(float),
* which gets called by the parent GameStateNode, e.g. the GameStateManager.
*
* @see GameStateManager
* @see GameStateNode
* @see BasicGameState
* @see CameraGameState
*
* @author Per Thulin
*/
public abstract class GameState {
/** The name of this GameState. */
protected String name;
/** Flags whether or not this GameState should be processed. */
protected boolean active;
/** GameState's parent, or null if it has none (is the root node). */
protected GameStateNode parent;
/**
* Gets called every frame before render(float) by the parent
* <code>GameStateNode</code>.
*
* @param tpf The elapsed time since last frame.
*/
public abstract void update(float tpf);
/**
* Gets called every frame after update(float) by the
* <code>GameStateManager</code>.
*
* @param tpf The elapsed time since last frame.
*/
public abstract void render(float tpf);
/**
* Gets performed when cleanup is called on a parent GameStateNode (e.g.
* the GameStateManager).
*/
public abstract void cleanup();
/**
* Sets whether or not you want this GameState to be updated and rendered.
*
* @param active
* Whether or not you want this GameState to be updated and rendered.
*/
public void setActive(boolean active) {
this.active = active;
}
/**
* Returns whether or not this GameState is updated and rendered.
*
* @return Whether or not this GameState is updated and rendered.
*/
public boolean isActive() {
return active;
}
/**
* Returns the name of this GameState.
*
* @return The name of this GameState.
*/
public String getName() {
return name;
}
/**
* Sets the name of this GameState.
*
* @param name The new name of this GameState.
*/
public void setName(String name) {
this.name = name;
}
/**
* Sets the parent of this node. <b>The user should never touch this method,
* instead use the attachChild method of the wanted parent.</b>
*
* @param parent The parent of this GameState.
*/
public void setParent(GameStateNode parent) {
this.parent = parent;
}
/**
* Retrieves the parent of this GameState. If the parent is null, this is
* the root node.
*
* @return The parent of this node.
*/
public GameStateNode getParent() {
return parent;
}
}
| [
"you@example.com"
] | you@example.com |
35e6a8684d448cc7a8e226dc9c661aa24fe80e6c | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /rds-20140815/src/main/java/com/aliyun/rds20140815/models/ModifyADInfoResponseBody.java | 5e078c67087de67774ce2f6dbe699676c3fcf167 | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 715 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.rds20140815.models;
import com.aliyun.tea.*;
public class ModifyADInfoResponseBody extends TeaModel {
/**
* <p>The ID of the request.</p>
*/
@NameInMap("RequestId")
public String requestId;
public static ModifyADInfoResponseBody build(java.util.Map<String, ?> map) throws Exception {
ModifyADInfoResponseBody self = new ModifyADInfoResponseBody();
return TeaModel.build(map, self);
}
public ModifyADInfoResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
cc56cb071dc3f3996f89fcc9064e7a82b81586bd | 5339ff90bca6386b0f756b48fec8a2d16921b659 | /SSM/src/main/java/top/zywork/dos/UserRoleDO.java | ff77d4cdf1e015b6c27b0f63c5795dea788ccfc7 | [] | no_license | GZWgssmart/QDHotelManagementSystem | 75dc633842ebafa669661b8871c094ba886f4272 | 00eb62fbd06e68c471e3bbac2ed4dcab6c84dbf3 | refs/heads/master | 2021-09-04T03:11:07.625069 | 2018-01-15T04:00:32 | 2018-01-15T04:00:32 | 105,750,923 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,126 | java | package top.zywork.dos;
import java.util.Date;
/**
* 用户角色关系DO<br />
* 创建于2017-09-11
*
* @author 王振宇
* @version 1.0
*/
public class UserRoleDO extends BaseDO {
private static final long serialVersionUID = 3252944515496189529L;
private Date createTime;
private Integer isActive;
/**
* 一个用户角色关系对应一个用户对象
*/
private UserDO userDO;
/**
* 一个用户角色关系对应一个角色对象
*/
private RoleDO roleDO;
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
public UserDO getUserDO() {
return userDO;
}
public void setUserDO(UserDO userDO) {
this.userDO = userDO;
}
public RoleDO getRoleDO() {
return roleDO;
}
public void setRoleDO(RoleDO roleDO) {
this.roleDO = roleDO;
}
}
| [
"847315251@qq.com"
] | 847315251@qq.com |
33fb4804455e3bfdacf84248be808ed33fd844a2 | a13ab684732add3bf5c8b1040b558d1340e065af | /java6-src/com/sun/corba/se/PortableActivationIDL/InvalidORBidHelper.java | 35dc83a6830e9e1020977c2163634b593907d047 | [] | no_license | Alivop/java-source-code | 554e199a79876343a9922e13ccccae234e9ac722 | f91d660c0d1a1b486d003bb446dc7c792aafd830 | refs/heads/master | 2020-03-30T07:21:13.937364 | 2018-10-25T01:49:39 | 2018-10-25T01:51:38 | 150,934,150 | 5 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,319 | java | package com.sun.corba.se.PortableActivationIDL;
/**
* com/sun/corba/se/PortableActivationIDL/InvalidORBidHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Friday, March 1, 2013 2:27:32 AM PST
*/
abstract public class InvalidORBidHelper
{
private static String _id = "IDL:PortableActivationIDL/InvalidORBid:1.0";
public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.PortableActivationIDL.InvalidORBid 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 com.sun.corba.se.PortableActivationIDL.InvalidORBid extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
private static boolean __active = false;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
synchronized (org.omg.CORBA.TypeCode.class)
{
if (__typeCode == null)
{
if (__active)
{
return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
}
__active = true;
org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [0];
org.omg.CORBA.TypeCode _tcOf_members0 = null;
__typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (com.sun.corba.se.PortableActivationIDL.InvalidORBidHelper.id (), "InvalidORBid", _members0);
__active = false;
}
}
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static com.sun.corba.se.PortableActivationIDL.InvalidORBid read (org.omg.CORBA.portable.InputStream istream)
{
com.sun.corba.se.PortableActivationIDL.InvalidORBid value = new com.sun.corba.se.PortableActivationIDL.InvalidORBid ();
// read and discard the repository ID
istream.read_string ();
return value;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.PortableActivationIDL.InvalidORBid value)
{
// write the repository ID
ostream.write_string (id ());
}
}
| [
"liulp@zjhjb.com"
] | liulp@zjhjb.com |
607007cc72e930ee8292128a2fb8187a83e15947 | f38099e6e5997b89e03e074a84891f9b5b16b1d2 | /src/main/java/com/hlsii/service/IAARetrieveService.java | b9b011672e55aff52fee737dc6bf05b74eb02657 | [] | no_license | ScXin/hdars_v2.2. | 4eccec1707ce3af053eafa7dff06b155d582b942 | 328b1b3608dcf438074d8c18545dca60b8260362 | refs/heads/master | 2023-02-18T22:46:19.558411 | 2021-01-13T03:42:44 | 2021-01-13T03:42:44 | 328,621,807 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,259 | java | package com.hlsii.service;
import cls.stat_information_plugin.StatInformation;
import com.hlsii.commdef.PVDataFromStore;
import com.hlsii.commdef.PVDataStore;
import com.hlsii.commdef.RetrieveParms;
import com.hlsii.vo.RetrieveData;
import org.epics.archiverappliance.Event;
import org.epics.archiverappliance.config.PVTypeInfo;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.List;
import java.util.Set;
public interface IAARetrieveService {
/**
* Initialize a Hazelcast client connected to the ArchivingAppliance.
* @return
* true is everything is ok, false if any error.
* @throws IOException
*/
boolean initialize() throws IOException;
/**
* Retrieve data from AA over PB/HTTP
*
* @param pvName
* the PV name.
* @param parms
* the {@link RetrieveParms}
* @return the {@link RetrieveData}
*/
RetrieveData retrieveData(String pvName, RetrieveParms parms);
/**
* Retrieve data from AA over PB/HTTP
*
* @param pvName
* the PV name.
* @param parms
* the {@link RetrieveParms}
* @return the {@link RetrieveData}
*/
PVDataFromStore getData(String pvName, RetrieveParms parms);
/**
* Resolve data stores (AA, Hadoop) for retrieval.
*
* @param pvName
* the PV name.
* @param start
* the start timestamp.
* @param end
* the end timestamp.
* @param firstKnownEventInHadoop
* the first known Event in Hadoop (Long Term Storage).
* @return
* a list of {@link PVDataStore}
*/
List<PVDataStore> resolveDataStore(String pvName, Timestamp start, Timestamp end, Event firstKnownEventInHadoop);
/**
* Get the PV event rate (events/second).
*
* @param pvName
* the PV name.
* @return
*/
float getEventRate(String pvName);
/**
* Get the PV sample period (second).
*
* @param pvName
* the PV name.
* @return
*/
float getSamplePeriod(String pvName);
/**
* Calculate the size when PV event value is translated to a string.
*
* @param pvName
* the PV name.
* @return
*/
long calculateEventValueSize(String pvName);
/**
* Check whether the PV is V4.
*
* @param pvName
* the PV name.
* @return true if the PV is V4, false if the PV is V3.
*/
boolean isV4(String pvName);
/**
* Get available AA (ip:port)
*
* @return a set of {@link String}, or null if any exception.
*/
Set<String> getAvailableAA();
/**
* Get all archiving PV info
*
* @return a collection of all PV {@link PVTypeInfo}
*/
Collection<PVTypeInfo> getAllPVInfo();
/**
* Get the statistical information for a PV
* @param pvName - the PV name
* @param startTime - the start time.
* @param endTime - the end time
* @return state information
* @throws IOException if access HBase failed.
*/
StatInformation getStat(String pvName, Timestamp startTime, Timestamp endTime);
} | [
"980425123@qq.com"
] | 980425123@qq.com |
a432f7fbb4dd265cf4c76670ed1e6fd19e836a20 | e55c0510cd98919a1568b44ca94862ea6ececf7b | /src/main/java/com/papsukis/CardSimulator/Login/payload/response/JwtResponse.java | 42c29424897ac0496df99303eefbcab299b7b69b | [] | no_license | papsukis/cards-simulator-back-end | 6f123672595c95b840d9b7d42f963eba42d43a9b | f6a90d65271470c65a4637b96df9295141a49ef0 | refs/heads/master | 2021-01-27T06:34:36.814992 | 2020-03-27T15:31:06 | 2020-03-27T15:31:06 | 243,474,843 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 367 | java | package com.papsukis.CardSimulator.Login.payload.response;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;
@Data
@AllArgsConstructor
public class JwtResponse {
private String token;
private String type = "Bearer";
private Long id;
private String username;
private String email;
private List<String> roles;
}
| [
"ali.belemlih@gmail.com"
] | ali.belemlih@gmail.com |
bd2d0a7d7bf1a089156e15fe48e47af28fb6237e | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/legoImp/task/SetupDebugLevel.java | 758f12c7993e766cc611b315f32a3a0a463d6d24 | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,574 | java | package com.p280ss.android.ugc.aweme.legoImp.task;
import android.content.Context;
import android.os.Environment;
import com.bytedance.common.utility.C6312h;
import com.p280ss.android.ugc.aweme.lego.C32337d;
import com.p280ss.android.ugc.aweme.lego.LegoTask;
import com.p280ss.android.ugc.aweme.lego.ProcessType;
import com.p280ss.android.ugc.aweme.lego.WorkType;
import com.p280ss.android.ugc.aweme.p331m.C7163a;
import java.io.File;
/* renamed from: com.ss.android.ugc.aweme.legoImp.task.SetupDebugLevel */
public class SetupDebugLevel implements LegoTask {
public ProcessType process() {
return C32337d.m104906a(this);
}
public WorkType type() {
return WorkType.BOOT_FINISH;
}
public void run(Context context) {
boolean z;
if (C7163a.m22363a()) {
z = true;
} else {
try {
String packageName = context.getPackageName();
StringBuilder sb = new StringBuilder();
sb.append(Environment.getExternalStorageDirectory().getPath());
sb.append("/Android/data/");
sb.append(packageName);
sb.append("/cache/");
String sb2 = sb.toString();
StringBuilder sb3 = new StringBuilder();
sb3.append(sb2);
sb3.append("debug.flag");
z = new File(sb3.toString()).exists();
} catch (Exception unused) {
z = false;
}
}
if (z) {
C6312h.m19576a(2);
}
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
de90e0bfd83fb86da4fb2d13a7e13e2f243fe15f | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_292b9d54422a4f1a16d642d6e08d66a706dada43/GuardTest/2_292b9d54422a4f1a16d642d6e08d66a706dada43_GuardTest_t.java | e2628c2aac1d1de326f6ce7a2d04db06a760b9c2 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,821 | java | /*
* (C) Copyright 2006-2008 Nuxeo SAS (http://nuxeo.com/) and contributors.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser General Public License
* (LGPL) version 2.1 which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl.html
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* Contributors:
* bstefanescu
*
* $Id$
*/
package org.nuxeo.ecm.webengine.tests.security;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.nuxeo.ecm.core.api.NuxeoPrincipal;
import org.nuxeo.ecm.core.api.impl.DocumentModelImpl;
import org.nuxeo.ecm.core.api.impl.UserPrincipal;
import org.nuxeo.ecm.core.api.local.LocalSession;
import org.nuxeo.ecm.webengine.ObjectDescriptor;
import org.nuxeo.ecm.webengine.WebEngine;
import org.nuxeo.ecm.webengine.actions.ActionDescriptor;
import org.nuxeo.ecm.webengine.security.Guard;
import org.nuxeo.runtime.api.Framework;
import org.nuxeo.runtime.test.NXRuntimeTestCase;
/**
* @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a>
*
*/
public class GuardTest extends NXRuntimeTestCase {
protected void setUp() throws Exception {
super.setUp();
deployBundle("nuxeo-runtime-scripting");
deployBundle("nuxeo-core-schema");
deployBundle("nuxeo-core-query");
deployBundle("nuxeo-core-api");
deployBundle("nuxeo-core");
deployBundle("nuxeo-webengine-core");
deployContrib("OSGI-INF/DemoRepository.xml");
deployContrib("OSGI-INF/site-manager-framework.xml");
deployContrib("OSGI-INF/site-manager-framework.xml");
deployContrib("OSGI-INF/test-security-guards.xml");
}
public void testGuardRegistration() throws Exception {
WebEngine mgr = Framework.getLocalService(WebEngine.class);
assertNotNull(mgr);
ObjectDescriptor od = mgr.getObject("siteFolder2");
assertNotNull(od);
ActionDescriptor ad = od.getAction("view");
assertNotNull(ad);
assertNotNull(ad.getGuard());
ad = od.getAction("myAction1");
Guard g = ad.getGuard();
assertNotNull(g);
LocalSession session = new LocalSession();
DocumentModelImpl doc = new DocumentModelImpl("/", "test", "Folder");
assertTrue(g.check(null, doc));
doc = new DocumentModelImpl("/", "test", "File");
assertFalse(g.check(null, doc));
doc = new DocumentModelImpl("/", "test", "Workspace");
assertTrue(g.check(null, doc));
ad = od.getAction("myAction2");
g = ad.getGuard();
Map<String, Serializable> ctx = new HashMap<String, Serializable>();
NuxeoPrincipal principal = new UserPrincipal("bogdan");
ctx.put("principal", principal);
session.connect("demo", ctx);
assertTrue(g.check(session, doc));
ad = od.getAction("myAction3");
g = ad.getGuard();
doc.setProperty("dublincore", "title", "test");
assertEquals("test", doc.getTitle());
assertTrue(g.check(session, doc));
doc.setProperty("dublincore", "title", "test3");
assertFalse(g.check(session, doc));
ad = od.getAction("myAction4");
g = ad.getGuard();
assertFalse(g.check(session, doc));
doc.setProperty("dublincore", "title", "test.py");
assertEquals("test.py", doc.getTitle());
assertTrue(g.check(session, doc));
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
20ab014bb8b2891ceee3f80c5fa37196817d1487 | ceeacb5157b67b43d40615daf5f017ae345816db | /generated/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppserviceGithubTokenImpl.java | 23cdf3503d59aa42b1c47a32c8aeb2462c72f0e5 | [
"LicenseRef-scancode-generic-cla"
] | no_license | ChenTanyi/autorest.java | 1dd9418566d6b932a407bf8db34b755fe536ed72 | 175f41c76955759ed42b1599241ecd876b87851f | refs/heads/ci | 2021-12-25T20:39:30.473917 | 2021-11-07T17:23:04 | 2021-11-07T17:23:04 | 218,717,967 | 0 | 0 | null | 2020-11-18T14:14:34 | 2019-10-31T08:24:24 | Java | UTF-8 | Java | false | false | 1,558 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.appservice.generated.implementation;
import com.azure.resourcemanager.appservice.generated.fluent.models.AppserviceGithubTokenInner;
import com.azure.resourcemanager.appservice.generated.models.AppserviceGithubToken;
public final class AppserviceGithubTokenImpl implements AppserviceGithubToken {
private AppserviceGithubTokenInner innerObject;
private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager;
AppserviceGithubTokenImpl(
AppserviceGithubTokenInner innerObject,
com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
public String accessToken() {
return this.innerModel().accessToken();
}
public String scope() {
return this.innerModel().scope();
}
public String tokenType() {
return this.innerModel().tokenType();
}
public Boolean gotToken() {
return this.innerModel().gotToken();
}
public String errorMessage() {
return this.innerModel().errorMessage();
}
public AppserviceGithubTokenInner innerModel() {
return this.innerObject;
}
private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() {
return this.serviceManager;
}
}
| [
"actions@github.com"
] | actions@github.com |
367d03a5ccc6a95a11b99d1234059c6f0b9aa17c | 346698242d16e1380ecc03d70e8281f576f6c4c8 | /Building/src/com/e1858/building/holder/OrderCompleteHolder.java | db5083c48d3f471703266ecacf79ea1060bd9db7 | [] | no_license | wangzhongli/building | 100544995b353b6b621ce52afabf6e4b2a33fd4c | eb6367c3f9a0c7c7406c60c70e5a2b0927d073e1 | refs/heads/master | 2020-05-07T05:52:39.676658 | 2015-03-30T02:16:05 | 2015-03-30T02:16:05 | 33,098,517 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,087 | java | package com.e1858.building.holder;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.e1858.building.R;
import com.e1858.building.bean.OrderInfo;
import com.e1858.building.order.OrderDetailActivity;
import com.e1858.building.persondata.CommentActivity;
import com.e1858.building.persondata.GetPhotoActivity;
import com.e1858.building.utils.AppUtil;
import com.e1858.building.utils.DialogUtil;
import com.hg.android.ormlite.extra.OrmLiteIteratorAdapterExt;
public class OrderCompleteHolder extends BaseViewHolder {
private LinearLayout content_layout;
private LinearLayout order_content_reserve_buyer_ll;
private LinearLayout order_content_cancel_order_ll;
private TextView order_content_tv_service_type;
private TextView order_content_tv_service_time;
private TextView order_content_tv_buyer_name;
private TextView order_content_tv_buyer_mobile;
private TextView order_content_tv_buyer_add;
private TextView order_content_tv_order_from;
private TextView order_content_tv_accept_time;
private TextView order_content_tv_photo;
private ImageView order_content_iv_photo;
private TextView roborder_list_item_tv_sn;
public OrderCompleteHolder(Context context, View view, int layoutID) {
super(context, view, layoutID);
}
@Override
protected void initSubviews() {
content_layout = (LinearLayout) findViewById(R.id.content_layout);
order_content_reserve_buyer_ll = (LinearLayout) findViewById(R.id.order_content_reserve_buyer_ll);
order_content_cancel_order_ll = (LinearLayout) findViewById(R.id.order_content_cancel_order_ll);
order_content_tv_service_type = (TextView) findViewById(R.id.order_content_tv_service_type);
order_content_tv_service_time = (TextView) findViewById(R.id.order_content_tv_service_time);
order_content_tv_buyer_name = (TextView) findViewById(R.id.order_content_tv_buyer_name);
order_content_tv_buyer_mobile = (TextView) findViewById(R.id.order_content_tv_buyer_mobile);
order_content_tv_buyer_add = (TextView) findViewById(R.id.order_content_tv_buyer_add);
order_content_tv_order_from = (TextView) findViewById(R.id.order_content_tv_order_from);
order_content_tv_accept_time = (TextView) findViewById(R.id.order_content_tv_accept_time);
order_content_tv_photo = (TextView) findViewById(R.id.order_content_tv_photo);
order_content_iv_photo = (ImageView) findViewById(R.id.order_content_iv_photo);
roborder_list_item_tv_sn = (TextView) findViewById(R.id.roborder_list_item_tv_sn);
}
public void bindDate(final OrderInfo orderInfo, final OrmLiteIteratorAdapterExt adapter) {
if (orderInfo.getServiceType() != null) {
order_content_tv_service_type.setText(orderInfo.getServiceType());
}
if (orderInfo.getServiceTime() != null) {
order_content_tv_service_time.setText(orderInfo.getServiceTime());
}
if (orderInfo.getOrderTime() != null) {
order_content_tv_accept_time.setText(orderInfo.getOrderTime());
}
if (orderInfo.getBuyerName() != null) {
order_content_tv_buyer_name.setText(orderInfo.getBuyerName());
}
if (orderInfo.getBuyerMobile() != null) {
order_content_tv_buyer_mobile.setText(orderInfo.getBuyerMobile());
}
if (orderInfo.getOrderAddress() != null) {
order_content_tv_buyer_add.setText(orderInfo.getOrderAddress() + "");
// order_content_tv_buyer_add.setText(orderInfo.getTakesAddress());
}
if (orderInfo.getOrigin() != null) {
order_content_tv_order_from.setText(orderInfo.getOrigin());
}
if (orderInfo.getOrderSN() != null) {
roborder_list_item_tv_sn.setText("订单编号: " + orderInfo.getOrderSN());
}
// if (orderInfo.isUploadPicture()) {
// order_content_tv_photo.setText("查看照片");
// order_content_iv_photo.setBackgroundResource(R.drawable.complete_picture);
// } else {
// order_content_tv_photo.setText("拍照");
// order_content_iv_photo.setBackgroundResource(R.drawable.complete_take_pic);
// }
order_content_reserve_buyer_ll.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// if (!orderInfo.isUploadPicture()) {
// Intent intent = new Intent(context, UploadPicActivity.class);
// intent.putExtra(UploadPicActivity.ACTIVITY_FROM, "OrderCompleteActivity");
// intent.putExtra(UploadPicActivity.ORDER_ID, orderInfo.getOrderID());
// int[] types = { 1, 2 };
// intent.putExtra(UploadPicActivity.TYPES, (Serializable) types);
// intent.putExtra(UploadPicActivity.FLAG, Constant.UPDATEPICFLAG.FLAG_COMPLETE);
// context.startActivity(intent);
// } else {
// Intent intent = new Intent(context, GetPhotoActivity.class);
// intent.putExtra(GetPhotoActivity.ORDERID, orderInfo.getOrderID());
// context.startActivity(intent);
// }
Intent intent = new Intent(context, GetPhotoActivity.class);
intent.putExtra(GetPhotoActivity.ORDERID, orderInfo.getOrderID());
context.startActivity(intent);
}
});
order_content_cancel_order_ll.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(context, CommentActivity.class);
intent.putExtra(CommentActivity.ORDERID, orderInfo.getOrderID());
context.startActivity(intent);
}
});
order_content_tv_buyer_mobile.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
DialogUtil.dialogOpen(context, "呼叫确认", "您确定要拨打" + orderInfo.getBuyerMobile(),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
AppUtil.call(context, orderInfo.getBuyerMobile());
}
});
}
});
content_layout.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
OrderDetailActivity.action(context, orderInfo.getOrderID(), OrderDetailActivity.TYPE_ACTION_NO_CANCEL);
}
});
}
}
| [
"wangzhongli@gmail.com"
] | wangzhongli@gmail.com |
0b2742c7f4426d9a80aaa21c667bcc213eb716ba | 1067898863878254f94339b26481f41e17387b22 | /Interfaces/Registry/CropType.java | 8d57505299d37022217739d2be15b5e90dc67977 | [] | no_license | KookykraftMC/DragonAPI | 4c3ecda1b4e84c6b14ad36451fd9f99f3a45ecec | ac4b97fe30ed22f1b755543c31e07cb9cbdc3273 | refs/heads/master | 2021-01-17T14:03:10.013105 | 2016-03-07T18:35:44 | 2016-03-07T18:35:44 | 53,346,083 | 1 | 1 | null | 2016-03-07T17:49:04 | 2016-03-07T17:49:03 | null | UTF-8 | Java | false | false | 1,494 | java | /*******************************************************************************
* @author Reika Kalseki
*
* Copyright 2015
*
* All rights reserved.
* Distribution of the software in any form is only allowed with
* explicit, prior permission from the owner.
******************************************************************************/
package Reika.DragonAPI.Interfaces.Registry;
import java.util.ArrayList;
import java.util.Iterator;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public interface CropType extends RegistryType {
public boolean isRipe(World world, int x, int y, int z);
public void setHarvested(World world, int x, int y, int z);
public void makeRipe(World world, int x, int y, int z);
public int getGrowthState(World world, int x, int y, int z);
public boolean isSeedItem(ItemStack is);
public boolean destroyOnHarvest();
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int fortune);
public boolean isCrop(Block id, int meta);
public boolean neverDropsSecondSeed();
public static class CropMethods {
public static void removeOneSeed(CropType c, ArrayList<ItemStack> li) {
if (c.neverDropsSecondSeed())
return;
Iterator<ItemStack> it = li.iterator();
while (it.hasNext()) {
ItemStack is = it.next();
if (c.isSeedItem(is)) {
if (is.stackSize > 1)
is.stackSize--;
else
it.remove();
return;
}
}
}
}
}
| [
"reikasminecraft@gmail.com"
] | reikasminecraft@gmail.com |
4655bab7333e52a79b12702784a0dc60bb6f2d3e | 9d28e794ccf1906c8660f02e666c6105ccce49c8 | /trunk/src/main/java/com/tresbu/trakeye/service/mapper/LocationLogMapper.java | 7b536c771989df5c78e70e45bc678106015da6bf | [] | no_license | pillelajagadeesh/trakuALL | 0839ea889cddbaf70c29ed2b60eb5928e0abf405 | 3a45bdef84d0e6b3d2c6b045abe247b3dd35dce5 | refs/heads/master | 2021-01-23T05:35:52.631711 | 2017-03-27T10:27:32 | 2017-03-27T10:27:32 | 86,320,940 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,012 | java | package com.tresbu.trakeye.service.mapper;
import com.tresbu.trakeye.domain.*;
import com.tresbu.trakeye.service.dto.LatLongDTO;
import com.tresbu.trakeye.service.dto.LocationLogCreateDTO;
import com.tresbu.trakeye.service.dto.LocationLogDTO;
import com.tresbu.trakeye.service.dto.LocationLogUpdateDTO;
import org.mapstruct.*;
import java.util.List;
/**
* Mapper for the entity LocationLog and its DTO LocationLogDTO.
*/
@Mapper(componentModel = "spring", uses = {UserMapper.class, })
public interface LocationLogMapper {
@Mapping(source = "user.id", target = "userId")
@Mapping(source = "user.login", target = "userName")
LocationLogDTO locationLogToLocationLogDTO(LocationLog locationLog);
List<LocationLogDTO> locationLogsToLocationLogDTOs(List<LocationLog> locationLogs);
@Mapping(source = "latitude", target = "lat")
@Mapping(source = "longitude", target = "lng")
LatLongDTO locationLogToLatLongDTO(LocationLog locationLog);
List<LatLongDTO> locationLogsToLatLongDTOs(List<LocationLog> locationLog);
@Mapping(source = "userId", target = "user")
LocationLog locationLogDTOToLocationLog(LocationLogDTO locationLogDTO);
List<LocationLog> locationLogDTOsToLocationLogs(List<LocationLogDTO> locationLogDTOs);
@Mapping(source = "userId", target = "user")
@Mapping(target = "id",ignore = true)
@Mapping(target = "distanceTravelled",ignore = true)
@Mapping(target = "updatedDateTime",ignore = true)
LocationLog createLocationLogDTOToLocationLog(LocationLogCreateDTO createLocationLogDTO);
@Mapping(target = "distanceTravelled",ignore = true)
@Mapping(target = "updatedDateTime",ignore = true)
@Mapping(target = "longitude",ignore = true)
@Mapping(target = "latitude",ignore = true)
@Mapping(target = "address",ignore = true)
@Mapping(target = "user",ignore = true)
void updateLocationLogFromLocationLogDTO(LocationLogUpdateDTO updateLocationLogDTO,@MappingTarget LocationLog locationLog);
}
| [
"pillelajagadeesh@gmail.com"
] | pillelajagadeesh@gmail.com |
6b8037fd5d2f36d0f40185dba59d61b005e7b462 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/spring-framework/2015/12/package-info.java | 56e9fbd1877725fb0c39e5d3e27ba06ff87a3a9f | [] | 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 | 223 | java | /**
* This package contains temporary interfaces and classes for running embedded servers.
* They are expected to be replaced by an upcoming Spring Boot support.
*/
package org.springframework.http.server.reactive.boot;
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
505950519540b74ffd3df28c11d57826c72a1a20 | d593ad37a82a6396effceaf11679e70fddcabc06 | /winapi/src/andexam/ver4_1/c33_multimedia/LoadComplete.java | 9115580942e9b85dfa5b07670d061e1b2eeb41bb | [] | no_license | psh667/android | 8a18ea22c8c977852ba2cd9361a8489586e06f05 | 8f7394de8e26ce5106d9828cf95eb1617afca757 | refs/heads/master | 2018-12-27T23:30:46.988404 | 2013-09-09T13:16:46 | 2013-09-09T13:16:46 | 12,700,292 | 3 | 5 | null | null | null | null | UTF-8 | Java | false | false | 1,226 | java | package andexam.ver4_1.c33_multimedia;
import andexam.ver4_1.*;
import android.app.*;
import android.media.*;
import android.os.*;
import android.view.*;
import android.widget.*;
public class LoadComplete extends Activity {
SoundPool pool;
int stream;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.loadcomplete);
pool = new SoundPool(1, AudioManager.STREAM_MUSIC, 0);
}
SoundPool.OnLoadCompleteListener mListener =
new SoundPool.OnLoadCompleteListener() {
public void onLoadComplete(SoundPool soundPool, int sampleId, int status) {
if (status == 0) {
stream = soundPool.play(sampleId, 1, 1, 0, 0, 1);
}
}
};
public void mOnClick(View v) {
MediaPlayer player;
switch (v.getId()) {
case R.id.load1:
int song = pool.load(this, R.raw.goodtime, 1);
pool.play(song, 1, 1, 0, 0, 1);
break;
case R.id.load2:
pool.setOnLoadCompleteListener(mListener);
pool.load(this, R.raw.goodtime, 1);
break;
case R.id.pause:
//pool.pause(stream);
pool.autoPause();
break;
case R.id.resume:
//pool.resume(stream);
pool.autoResume();
break;
}
}
}
| [
"paksan@daum.net"
] | paksan@daum.net |
0436e725ad17688b87a6bfbb735c1572fee0015d | 8022511ad71cf4b1eccbc4ce6ce6af1dd7c88bec | /oim-fx/src/main/java/com/oim/fx/ui/BaseFrame.java | 91ed2fcbb9e826491d3381b7eb64d346b5480f4e | [] | no_license | softfn/im-for-pc | f5411d88c172adbda75099582ae70dcd18e08958 | e34a62c337e1b7f0c0fd39286353a8c71d5864ad | refs/heads/master | 2020-07-16T23:53:31.585700 | 2016-11-17T01:59:15 | 2016-11-17T01:59:15 | 73,938,576 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,500 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.oim.fx.ui;
import com.oim.fx.common.box.ImageBox;
import com.oim.swing.UIBox;
import com.only.fx.OnlyFrame;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.image.Image;
import javafx.stage.Modality;
/**
*
* @author Only
*/
public class BaseFrame extends OnlyFrame {
Alert information = new Alert(AlertType.INFORMATION);
public BaseFrame() {
init();
}
private void init() {
this.setBackground("Resources/Images/Wallpaper/14.jpg");
this.setRadius(5);
Image image = ImageBox.getImagePath("Resources/Images/Logo/logo_64.png");
this.getIcons().add(image);
getRootPane().getStylesheets().add(this.getClass().getResource("/resources/common/css/base.css").toString());
getTitlePane().addOnCloseAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
BaseFrame.this.hide();
}
});
initPrompt();
UIBox.add(this);
}
private void initPrompt() {
information.initModality(Modality.APPLICATION_MODAL);
information.initOwner(this);
information.getDialogPane().setHeaderText(null);
}
public void showPrompt(String text) {
information.getDialogPane().setContentText(text);
information.showAndWait();
}
}
| [
"softfn@hotmail.com"
] | softfn@hotmail.com |
d759cc92a46e47f8782b6ef3972106a1bfa01854 | 09d0ddd512472a10bab82c912b66cbb13113fcbf | /TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/JADX/src/main/java/org/telegram/messenger/camera/C1092-$$Lambda$CameraController$swHPhGP8pVLLDtYLp0Z-CfPjXX4.java | 51f7ba78cde34f8b4a1c3b21a1ac3798c29534ab | [] | no_license | sgros/activity_flow_plugin | bde2de3745d95e8097c053795c9e990c829a88f4 | 9e59f8b3adacf078946990db9c58f4965a5ccb48 | refs/heads/master | 2020-06-19T02:39:13.865609 | 2019-07-08T20:17:28 | 2019-07-08T20:17:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 604 | java | package org.telegram.messenger.camera;
/* compiled from: lambda */
/* renamed from: org.telegram.messenger.camera.-$$Lambda$CameraController$swHPhGP8pVLLDtYLp0Z-CfPjXX4 */
public final /* synthetic */ class C1092-$$Lambda$CameraController$swHPhGP8pVLLDtYLp0Z-CfPjXX4 implements Runnable {
private final /* synthetic */ CameraController f$0;
public /* synthetic */ C1092-$$Lambda$CameraController$swHPhGP8pVLLDtYLp0Z-CfPjXX4(CameraController cameraController) {
this.f$0 = cameraController;
}
public final void run() {
this.f$0.lambda$null$2$CameraController();
}
}
| [
"crash@home.home.hr"
] | crash@home.home.hr |
44617f67b0f9d58f6e5e4263c5ae713e7a2254bb | e4eb547141929d5c61b3335c09904f258a65f5ea | /desktop/glfw_gui/java/src/test/java/test/Shader1.java | b0361c17d4b3ca2b68383d84dd082d90c34ba941 | [
"MIT"
] | permissive | digitalgust/miniJVM | 14e11fa518e965ebe6c6b8172b2cacffde7a46d7 | aa504d6c3c17a365a8f8f2ea91eb580d6ec94711 | refs/heads/master | 2023-08-22T12:55:31.981267 | 2023-08-10T07:09:28 | 2023-08-10T07:09:28 | 101,243,754 | 269 | 78 | null | 2023-03-08T06:50:54 | 2017-08-24T02:10:21 | C | UTF-8 | Java | false | false | 7,733 | java | package test;
import org.mini.gl.GL;
import static org.mini.gl.GL.*;
import static org.mini.glfw.Glfw.*;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author gust
*/
public class Shader1 {
boolean exit = false;
long curWin;
int mx, my;
class CallBack extends GlfwCallbackAdapter {
@Override
public void key(long window, int key, int scancode, int action, int mods) {
System.out.println("key:" + key + " action:" + action);
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) {
glfwSetWindowShouldClose(window, GLFW_TRUE);
}
}
@Override
public void mouseButton(long window, int button, boolean pressed) {
if (window == curWin) {
String bt = button == GLFW_MOUSE_BUTTON_LEFT ? "LEFT" : button == GLFW_MOUSE_BUTTON_2 ? "RIGHT" : "OTHER";
String press = pressed ? "pressed" : "released";
System.out.println(bt + " " + mx + " " + my + " " + press);
}
}
@Override
public void cursorPos(long window, int x, int y) {
curWin = window;
mx = x;
my = y;
}
@Override
public boolean windowClose(long window) {
System.out.println("byebye");
return true;
}
@Override
public void windowSize(long window, int width, int height) {
System.out.println("resize " + width + " " + height);
}
@Override
public void framebufferSize(long window, int x, int y) {
}
}
String VertexShaderT = "#version 330 \n" +
"\n" +
"in vec3 vertexPosition_modelspace;\n" +
"\n" +
"\n" +
"void main(){\n" +
"\n" +
" gl_Position = vec4(vertexPosition_modelspace,1);\n" +
"\n" +
"}\n" +
"\0";
String FragmentShaderT = "#version 330 \n" +
"\n" +
"out vec3 color;\n" +
"\n" +
"void main()\n" +
"{\n" +
"\n" +
"\tcolor = vec3(1,0,0);\n" +
"}\0";
float[] g_VertexBufferDataT = {
-1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f, 0.0f,
};
int loadShader(String vss, String fss) {
int[] return_val = {0};
//编译顶点着色器
int vertexShader;
vertexShader = glCreateShader(GL_VERTEX_SHADER);
glShaderSource(vertexShader, 1, new byte[][]{GToolkit.toCstyleBytes(vss)}, null, 0);
glCompileShader(vertexShader);
int success;
GL.glGetShaderiv(vertexShader, GL.GL_COMPILE_STATUS, return_val, 0);
if (return_val[0] == GL_FALSE) {
GL.glGetShaderiv(vertexShader, GL.GL_INFO_LOG_LENGTH, return_val, 0);
byte[] szLog = new byte[return_val[0] + 1];
GL.glGetShaderInfoLog(vertexShader, szLog.length, return_val, 0, szLog);
System.out.println("Compile Shader fail error :" + new String(szLog, 0, return_val[0]) + "\n" + vss + "\n");
return 0;
}
int fragmentShader;
fragmentShader = glCreateShader(GL_FRAGMENT_SHADER);
glShaderSource(fragmentShader, 1, new byte[][]{GToolkit.toCstyleBytes(fss)}, null, 0);
glCompileShader(fragmentShader);
GL.glGetShaderiv(fragmentShader, GL.GL_COMPILE_STATUS, return_val, 0);
if (return_val[0] == GL_FALSE) {
GL.glGetShaderiv(fragmentShader, GL.GL_INFO_LOG_LENGTH, return_val, 0);
byte[] szLog = new byte[return_val[0] + 1];
GL.glGetShaderInfoLog(fragmentShader, szLog.length, return_val, 0, szLog);
System.out.println("Compile Shader fail error :" + new String(szLog, 0, return_val[0]) + "\n" + fss + "\n");
return 0;
}
//着色器程序
int shaderProgram;
shaderProgram = glCreateProgram();
glAttachShader(shaderProgram, vertexShader);
glAttachShader(shaderProgram, fragmentShader);
glLinkProgram(shaderProgram);
GL.glGetProgramiv(shaderProgram, GL.GL_LINK_STATUS, return_val, 0);
if (return_val[0] == GL_FALSE) {
GL.glGetProgramiv(shaderProgram, GL.GL_INFO_LOG_LENGTH, return_val, 0);
byte[] szLog = new byte[return_val[0] + 1];
GL.glGetProgramInfoLog(shaderProgram, szLog.length, return_val, 0, szLog);
System.out.println("Link Shader fail error :" + new String(szLog, 0, return_val[0]) + "\n vertex shader:" + vertexShader + "\nfragment shader:" + fragmentShader + "\n");
return 0;
}
glDeleteShader(vertexShader);
glDeleteShader(fragmentShader);
return shaderProgram;
}
int[] VertexArrayID = {0};
int[] VertexBufferT = {0};
int ProgramIDT;
int VertexPositionIDT;
public void init() {
//===Generate the vertex array
glGenVertexArrays(1, VertexArrayID, 0);
glBindVertexArray(VertexArrayID[0]);
glGenBuffers(1, VertexBufferT, 0);
glBindBuffer(GL_ARRAY_BUFFER, VertexBufferT[0]);
glBufferData(GL_ARRAY_BUFFER, (long) (g_VertexBufferDataT.length * 4), g_VertexBufferDataT, 0, GL_STATIC_DRAW);
ProgramIDT = loadShader(VertexShaderT, FragmentShaderT);
}
//---------------------------------------------------------------------
void display() {
glClearColor(0, 0, 1, 1);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT|GL_ACCUM_BUFFER_BIT);
glEnable(GL_TEXTURE_2D);
glUseProgram(ProgramIDT);
glEnableVertexAttribArray(VertexPositionIDT);
glBindBuffer(GL_ARRAY_BUFFER, VertexBufferT[0]);
glVertexAttribPointer(VertexPositionIDT, 3, GL_FLOAT, GL_FALSE, 20, null, 0);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
glDisableVertexAttribArray(VertexPositionIDT);
try {
Thread.sleep(10);
} catch (InterruptedException ex) {
}
}
void t1() {
glfwInit();
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_DEPTH_BITS, 16);
// glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
long win = glfwCreateWindow(640, 480, "hello glfw".getBytes(), 0, 0);
if (win != 0) {
glfwSetCallback(win, new CallBack());
glfwMakeContextCurrent(win);
//glfwSwapInterval(1);
int w = glfwGetFramebufferWidth(win);
int h = glfwGetFramebufferHeight(win);
System.out.println("w=" + w + " ,h=" + h);
init();
long last = System.currentTimeMillis(), now;
int count = 0;
while (!glfwWindowShouldClose(win)) {
display();
glfwPollEvents();
glfwSwapBuffers(win);
count++;
now = System.currentTimeMillis();
if (now - last > 1000) {
System.out.println("fps:" + count);
last = now;
count = 0;
}
}
glfwTerminate();
}
}
public static void main(String[] args) {
Shader1 gt = new Shader1();
gt.t1();
}
}
| [
"digitalgust@163.com"
] | digitalgust@163.com |
4834cd4094b5abde5db6eeaac7ac8ab67ba45b0e | 2dc55280583e54cd3745fad4145eb7a0712eb503 | /stardust-engine-core/src/main/java/org/eclipse/stardust/engine/extensions/jaxws/addressing/AttributedQNameType.java | 4bc583ea783ea6c675bbeb88823c314e22248ed4 | [] | no_license | markus512/stardust.engine | 9d5f4fd7016a38c5b3a1fe09cc7a445c00a31b57 | 76e0b326446e440468b4ab54cfb8e26a6403f7d8 | refs/heads/master | 2022-02-06T23:03:21.305045 | 2016-03-09T14:56:01 | 2016-03-09T14:56:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,432 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2008.06.05 at 11:30:07 AM CEST
//
package org.eclipse.stardust.engine.extensions.jaxws.addressing;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.namespace.QName;
/**
* <p>Java class for AttributedQNameType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="AttributedQNameType">
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>QName">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AttributedQNameType", propOrder = {
"value"
})
public class AttributedQNameType {
@XmlValue
protected QName value;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link QName }
*
*/
public QName getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link QName }
*
*/
public void setValue(QName value) {
this.value = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
| [
"roland.stamm@sungard.com"
] | roland.stamm@sungard.com |
f5f090eeb5f863c285c24f0382a31ee479a4b030 | 4dd22e45d6216df9cd3b64317f6af953f53677b7 | /LMS/src/main/java/com/ulearning/ulms/organ/form/OrgUserForm.java | e0f6f92e2c7b61d4490b249989dc7f98e5b9b460 | [] | no_license | tianpeijun198371/flowerpp | 1325344032912301aaacd74327f24e45c32efa1e | 169d3117ee844594cb84b2114e3fd165475f4231 | refs/heads/master | 2020-04-05T23:41:48.254793 | 2008-02-16T18:03:08 | 2008-02-16T18:03:08 | 40,278,397 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,549 | java | /**
* OrgUserForm.java.
* User: dengj Date: 2004-5-21
*
* Copyright (c) 2000-2004.Huaxia Dadi Distance Learning Services Co.,Ltd.
* All rights reserved.
*/
package com.ulearning.ulms.organ.form;
import com.ulearning.ulms.organ.model.OrganUserModel;
import com.ulearning.ulms.organ.model.OrganUserModelPK;
public class OrgUserForm
{
private int orgID = 0;
private int userID = 0;
private int type = 0;
public OrgUserForm()
{
}
public OrgUserForm(int orgID, int userID, int type)
{
this.orgID = orgID;
this.userID = userID;
this.type = type;
}
public int getOrgID()
{
return orgID;
}
public void setOrgID(int orgID)
{
this.orgID = orgID;
}
public int getUserID()
{
return userID;
}
public void setUserID(int userID)
{
this.userID = userID;
}
public int getType()
{
return type;
}
public void setType(int type)
{
this.type = type;
}
public OrganUserModel getOrganUserModel()
{
OrganUserModel oum = new OrganUserModel();
OrganUserModelPK pk = new OrganUserModelPK(orgID, userID);
oum.setComp_id(pk);
return oum;
}
}
| [
"flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626"
] | flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626 |
38bd6e11138195450fba851acb9a1dee5903017e | dc4b5332f31493b9d8148c4576f261cdafb48dd9 | /workspace/01_HolaMundoRest/src/main/java/com/curso/microservicios/holamundo/Application.java | 7ed06ed0430e13c1162514b707effaf02e0517e4 | [] | no_license | victorherrerocazurro/CursoMicroserviciosAccentureJunio2018 | 775ce7b528bd5500bce8e75cf57c12082d413d24 | 3eebb17ab361eadf59b58bbefe42b772c361722b | refs/heads/master | 2020-03-21T17:39:56.509968 | 2018-06-28T15:13:29 | 2018-06-28T15:13:29 | 138,845,642 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 497 | java | package com.curso.microservicios.holamundo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
| [
"victorherrerocazurro@gmail.com"
] | victorherrerocazurro@gmail.com |
7ec414b86b8b49be30697e6f8c296607f43f2b8d | 243a31a30a60dbf7521e2e0d780177b5851d3b71 | /spring-modules/spring-di/src/test/java/com/tom/circulardependency/CircularDependencyIntegrationTest.java | b49c3b66f853d6991efbf77826b4317c4f932d62 | [] | no_license | tomlxq/tutorials | db6c5524d0324631c4b5d9338ed9e20b9efa87f7 | 3bd7739e89b6d5dff3e4518c0b8fe98425600809 | refs/heads/master | 2020-12-19T07:13:42.578910 | 2020-07-19T16:23:10 | 2020-07-19T16:23:10 | 235,655,480 | 0 | 0 | null | 2020-06-13T02:00:22 | 2020-01-22T20:00:48 | Java | UTF-8 | Java | false | false | 1,095 | java | package com.tom.circulardependency;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {TestConfig.class})
public class CircularDependencyIntegrationTest {
@Autowired
ApplicationContext context;
@Bean
public CircularDependencyA getCircularDependencyA() {
return new CircularDependencyA();
}
@Bean
public CircularDependencyB getCircularDependencyB() {
return new CircularDependencyB();
}
@Test
public void givenCircularDependency_whenSetterInjection_thenItWorks() {
final CircularDependencyA circA = context.getBean(CircularDependencyA.class);
Assert.assertEquals("Hi!", circA.getCircB().getMessage());
}
}
| [
"21429503@qq.com"
] | 21429503@qq.com |
3a31a5fb1861e774edb603a294a272518bfd8ae1 | 6567f7ac7eed8d213b4b8aa82622b8ddb2cc37eb | /src/com/test/aseutil/AseTestCase.java | 76258ffdfe04c767567e09d6cbf57ec42bbb9a27 | [] | no_license | ttgiang/central | 2a9e64244eb7341aab77ad5162fb8ba0b4888eb0 | 39785a654c739a1b20c87b91cc36a437241495a9 | refs/heads/main | 2023-02-13T08:28:33.333957 | 2021-01-08T04:39:52 | 2021-01-08T04:39:52 | 313,086,967 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,967 | java | /**
* Copyright 2007 Applied Software Engineering,LLC. All rights reserved. You may
* not modify,use,reproduce,or distribute this software except in compliance
* with the terms of the License made with Applied Software Engineernig
*
* @author ttgiang
*/
//
// AseTestCase.java
//
package com.test.aseutil;
import com.ase.aseutil.*;
import com.ase.aseutil.bundle.*;
import org.apache.log4j.Logger;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import java.util.*;
import java.sql.*;
/**
*
*/
public class AseTestCase extends TestCase {
static Logger logger = Logger.getLogger(AseTestCase.class.getName());
private Connection conn = null;
private String host = null;
private String campus = null;
private String user = null;
private String alpha = null;
private String num = null;
private String type = null;
private String kix = null;
private String parm1 = null; // tonum
private String parm2 = null; // approval sequence
private String parm3 = null; // true or false
private String parm4 = null;
boolean debug = false;
/**
* Sets up the test fixture.
* (Called before every test case method.)
*/
@Before
public void setUp() {
if (debug) logger.info("--> AseTestCase.setUp.START");
host = System.getProperty("host");
kix = System.getProperty("kix");
campus = System.getProperty("campus");
user = System.getProperty("user");
alpha = System.getProperty("alpha");
num = System.getProperty("num");
type = System.getProperty("type");
parm1 = System.getProperty("parm1");
parm2 = System.getProperty("parm2");
parm3 = System.getProperty("parm3");
parm4 = System.getProperty("parm4");
if (System.getProperty("debug").equals("1")){
debug = true;
}
else{
debug = false;
}
if (debug) logger.info("AseTestCase - setUp: got test system ant properties");
getConnection();
if (conn != null){
if (debug) logger.info("AseTestCase - setUp: got connection");
if (kix == null){
kix = Helper.getKix(conn,campus,alpha,num,type);
}
showParms();
}
if (debug) logger.info("--> AseTestCase.setUp.END");
}
/**
* Tears down the test fixture.
* (Called after every test case method.)
*/
@After
public void tearDown() {
if (debug) logger.info("--> AseTestCase.tearDown.START");
try{
if (conn != null){
conn.close();
conn = null;
}
}
catch(Exception e){
if (debug) logger.info("Connection release error");
}
if (debug) logger.info("--> AseTestCase.tearDown.END");
}
/**
*
*/
public Connection getConnection() {
if (conn == null){
try{
BundleDB bundleDB = new BundleDB();
com.ase.aseutil.bundle.Bundle bundle = bundleDB.getBundleForConnection();
AsePool asePool = AsePool.getInstance( bundle.getHost(),
bundle.getUid(),
bundle.getUpw());
if (asePool != null){
conn = asePool.createLongConnection();
} // asePool
bundle = null;
bundleDB = null;
}
catch(Exception e){
logger.fatal("AseTestCase: getConnection - " + e.toString());
}
} // conn = null
return conn;
}
/**
*
*/
public void releaseConnection() {
try{
if (conn != null){
conn.close();
conn = null;
if (debug) logger.info("AseTestCase - releaseConnection: Connection released");
}
}
catch(Exception e){
logger.fatal("AseTestCase: releaseConnection - " + e.toString());
}
}
/**
*
*/
public String getKix() {
return this.kix;
}
public void setKix(String value) {
this.kix = value;
}
/**
*
*/
public String getCampus() {
return this.campus;
}
public void setCampus(String value) {
this.campus = value;
}
/**
*
*/
public String getAlpha() {
return this.alpha;
}
public void setAlpha(String value) {
this.alpha = value;
}
/**
*
*/
public String getNum() {
return this.num;
}
public void setNum(String value) {
this.num = value;
}
/**
*
*/
public String getType() {
return this.type;
}
public void setType(String value) {
this.type = value;
}
/**
*
*/
public String getUser() {
return this.user;
}
public void setUser(String value) {
this.user = value;
}
/**
*
*/
public String getParm1() {
return this.parm1;
}
public void setParm1(String value) {
this.parm1 = value;
}
/**
*
*/
public String getParm2() {
return this.parm2;
}
public void setParm2(String value) {
this.parm2 = value;
}
/**
*
*/
public String getParm3() {
return this.parm3;
}
public void setParm3(String value) {
this.parm3 = value;
}
/**
*
*/
public String getParm4() {
return this.parm4;
}
public void setParm4(String value) {
this.parm4 = value;
}
/**
*
*/
public boolean getDebug() {
return this.debug;
}
public void setDebug(boolean value) {
this.debug = value;
}
/**
*
*/
public Logger getLogger() {
return this.logger;
}
/**
*
*/
public void gotConnection() {
if (debug) logger.info("got connection");
}
/**
*
*/
public void showParms() {
if (debug){
logger.info("campus: " + campus);
logger.info("user: " + user);
logger.info("kix: " + kix);
logger.info("alpha: " + alpha);
logger.info("num: " + num);
logger.info("type: " + type);
logger.info("parm1: " + parm1);
logger.info("parm2: " + parm2);
logger.info("parm3: " + parm3);
logger.info("parm4: " + parm4);
}
}
}
| [
"ttgiang@gmail.com"
] | ttgiang@gmail.com |
c9233bba712e52352047bf9da052adbef698612c | a4a51084cfb715c7076c810520542af38a854868 | /src/main/java/com/shopee/livequiz/c/e.java | 1619eb52f5c774138676260d01ebdfc88b12aeb5 | [] | no_license | BharathPalanivelu/repotest | ddaf56a94eb52867408e0e769f35bef2d815da72 | f78ae38738d2ba6c9b9b4049f3092188fabb5b59 | refs/heads/master | 2020-09-30T18:55:04.802341 | 2019-12-02T10:52:08 | 2019-12-02T10:52:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 493 | java | package com.shopee.livequiz.c;
import com.garena.android.appkit.d.a;
public abstract class e {
/* renamed from: a reason: collision with root package name */
private Runnable f29696a = new Runnable() {
public void run() {
try {
e.this.a();
} catch (Exception e2) {
a.a(e2);
}
}
};
public abstract void a() throws Exception;
public Runnable b() {
return this.f29696a;
}
}
| [
"noiz354@gmail.com"
] | noiz354@gmail.com |
7458dfa615798c424d9437b62443957f3701b89e | 14267231a0717c36801ff83d6405eb1608e5080e | /src/main/java/cn/jing/campusShop/service/ProductService.java | bcfb684b1a48a00c668f3150db2ca0b8ea5b2801 | [] | no_license | liangjingdev/SSM-campusShop | 73077c7415ecacfd2cb3d9fe434cd3f308a45dbf | b68f2ce0500d4d5ac7d20863d288ce55ba596d29 | refs/heads/master | 2021-04-12T04:30:03.238909 | 2018-12-11T02:26:28 | 2018-12-11T02:26:28 | 125,877,160 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,486 | java | package cn.jing.campusShop.service;
import java.util.List;
import cn.jing.campusShop.dto.ProductExecution;
import cn.jing.campusShop.entity.Product;
import cn.jing.campusShop.exceptions.ProductOperationException;
import cn.jing.campusShop.util.ImageHolder;
public interface ProductService {
/**
* function:添加商品信息以及图片的处理
*
* @param product
* @param thumbnail
* 商品缩略图
* @param productImgList
* 商品详情图片列表
* @return
* @throws ProductOperationException
*/
ProductExecution addProduct(Product product, ImageHolder thumbnail, List<ImageHolder> productImgHolderList)
throws ProductOperationException;
/**
* function:通过商品Id查询唯一的商品信息
*
* @param productId
* @return
*/
Product getProductById(long productId);
/**
* function:修改商品信息以及图片处理
*
* @param product
* @param thumbnail
* @param productImgs
* @return
* @throws ProductOperationException
*/
ProductExecution modifyProduct(Product product, ImageHolder thumbnail, List<ImageHolder> productImgHolderList)
throws ProductOperationException;
/**
* function:查询商品列表并分页,可输入的条件有: 商品名(模糊),商品状态,店铺Id,商品类别
*
* @param productCondition
* @param pageIndex
* @param pageSize
* @return
*/
ProductExecution getProductList(Product productCondition, int pageIndex, int pageSize);
}
| [
"1184106223@qq.com"
] | 1184106223@qq.com |
5827492cceac668c449b0c6b40c551c6ba58a29b | dc0919c9609f03f5b239ec0799cea22ed070f411 | /com/google/gson/MapTypeAdapter.java | 034d663db35ef1f31456d034894e70597171431d | [] | no_license | jjensn/milight-decompile | a8f98af475f452c18a74fd1032dce8680f23abc0 | 47c4b9eea53c279f6fab3e89091e2fef495c6159 | refs/heads/master | 2021-06-01T17:23:28.555123 | 2016-10-12T18:07:53 | 2016-10-12T18:07:53 | 70,721,205 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,524 | java | package com.google.gson;
import com.google.gson.internal..Gson.Types;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.Type;;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
final class MapTypeAdapter extends BaseMapTypeAdapter
{
MapTypeAdapter()
{
}
public Map deserialize(JsonElement paramJsonElement, Type paramType, JsonDeserializationContext paramJsonDeserializationContext)
throws JsonParseException
{
Map localMap = constructMapType(paramType, paramJsonDeserializationContext);
Type[] arrayOfType = .Gson.Types.getMapKeyAndValueTypes(paramType, .Gson.Types.getRawType(paramType));
Iterator localIterator = paramJsonElement.getAsJsonObject().entrySet().iterator();
while (localIterator.hasNext())
{
Map.Entry localEntry = (Map.Entry)localIterator.next();
localMap.put(paramJsonDeserializationContext.deserialize(new JsonPrimitive((String)localEntry.getKey()), arrayOfType[0]), paramJsonDeserializationContext.deserialize((JsonElement)localEntry.getValue(), arrayOfType[1]));
}
return localMap;
}
public JsonElement serialize(Map paramMap, Type paramType, JsonSerializationContext paramJsonSerializationContext)
{
JsonObject localJsonObject = new JsonObject();
boolean bool = paramType instanceof ParameterizedType;
Type localType = null;
if (bool)
localType = .Gson.Types.getMapKeyAndValueTypes(paramType, .Gson.Types.getRawType(paramType))[1];
Iterator localIterator = paramMap.entrySet().iterator();
while (localIterator.hasNext())
{
Map.Entry localEntry = (Map.Entry)localIterator.next();
Object localObject1 = localEntry.getValue();
Object localObject3;
if (localObject1 == null)
{
localObject3 = JsonNull.createJsonNull();
localJsonObject.add(String.valueOf(localEntry.getKey()), (JsonElement)localObject3);
}
else
{
if (localType == null);
for (Object localObject2 = localObject1.getClass(); ; localObject2 = localType)
{
localObject3 = serialize(paramJsonSerializationContext, localObject1, (Type)localObject2);
break;
}
}
}
return localJsonObject;
}
public String toString()
{
return MapTypeAdapter.class.getSimpleName();
}
}
/* Location:
* Qualified Name: com.google.gson.MapTypeAdapter
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.6.1-SNAPSHOT
*/ | [
"jjensen@GAM5YG3QC-MAC.local"
] | jjensen@GAM5YG3QC-MAC.local |
b24d2d1625b7c82014b5cc0ce7daa2687f8c3067 | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /cmn-20200825/src/main/java/com/aliyun/cmn20200825/models/CreateDevicesShrinkRequest.java | 8783a1f7aa53ac37ef6be66a25f5a13335c7aa16 | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 1,645 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.cmn20200825.models;
import com.aliyun.tea.*;
public class CreateDevicesShrinkRequest extends TeaModel {
@NameInMap("ClientToken")
public String clientToken;
@NameInMap("DeviceFormId")
public String deviceFormId;
@NameInMap("DeviceParamModelList")
public String deviceParamModelListShrink;
@NameInMap("InstanceId")
public String instanceId;
public static CreateDevicesShrinkRequest build(java.util.Map<String, ?> map) throws Exception {
CreateDevicesShrinkRequest self = new CreateDevicesShrinkRequest();
return TeaModel.build(map, self);
}
public CreateDevicesShrinkRequest setClientToken(String clientToken) {
this.clientToken = clientToken;
return this;
}
public String getClientToken() {
return this.clientToken;
}
public CreateDevicesShrinkRequest setDeviceFormId(String deviceFormId) {
this.deviceFormId = deviceFormId;
return this;
}
public String getDeviceFormId() {
return this.deviceFormId;
}
public CreateDevicesShrinkRequest setDeviceParamModelListShrink(String deviceParamModelListShrink) {
this.deviceParamModelListShrink = deviceParamModelListShrink;
return this;
}
public String getDeviceParamModelListShrink() {
return this.deviceParamModelListShrink;
}
public CreateDevicesShrinkRequest setInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
public String getInstanceId() {
return this.instanceId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
edb931465e271e39a9606723e46bac7c8e889581 | d31e0b420a6681524f00c607475fbf5c6063158c | /src/main/java/gov/hhs/acf/cb/nytd/models/helper/TableDatumBean.java | 8fd14c103e131e05d439657644595be78ee23c32 | [] | no_license | MichaelKilleenSandbox/nytd-incremental | 5dd5b851e91b2be8822f4455aeae4abf6bb8c64f | 517f57420af7452d123d92f2d78d7b31d8f6f944 | refs/heads/master | 2023-07-18T23:47:15.871204 | 2021-08-27T20:32:07 | 2021-08-27T20:32:07 | 400,630,077 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,400 | java | /**
* Filename: TableDatumBean.java
*
* Copyright 2009, ICF International
* Created: Aug 27, 2009
* Author: 18816
*
* COPYRIGHT STATUS: This work, authored by ICF International employees, was funded in whole or in part
* under U.S. Government contract, and is, therefore, subject to the following license: The Government is
* granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable worldwide
* license in this work to reproduce, prepare derivative works, distribute copies to the public, and perform
* publicly and display publicly, by or on behalf of the Government. All other rights are reserved by the
* copyright owner.
*/
package gov.hhs.acf.cb.nytd.models.helper;
import java.io.Serializable;
/**
* An individual datum to be stored in the DataTable.
*
* Unlike the current Datum class, this bean doesn't contain both the value
* and the note. It will contain one or the other, just as it would be
* represented as a cell in a spreadsheet-style table.
*
* The attributes of this bean are chosen to expedite the export of
* the DataTable into a JasperReport cross-tabulation.
*
* @author Adam Russell (18816)
*/
public class TableDatumBean implements Serializable
{
/**
* the name of the column
*/
public String column;
/**
* row number, to determine order
*/
public Integer rowNumber;
/**
* value of the cell/datum
*/
public String value;
public TableDatumBean()
{
super();
}
/**
* @param column the column to set
* @param rowNumber the rowNumber to set
* @param value the value to set
*/
public TableDatumBean(String column, Integer rowNumber, String value)
{
super();
this.column = column;
this.rowNumber = rowNumber;
this.value = value;
}
/**
* @return the column
*/
public String getColumn()
{
return column;
}
/**
* @param column the column to set
*/
public void setColumn(String column)
{
this.column = column;
}
/**
* @return the rowNumber
*/
public Integer getRowNumber()
{
return rowNumber;
}
/**
* @param rowNumber the rowNumber to set
*/
public void setRowNumber(Integer rowNumber)
{
this.rowNumber = rowNumber;
}
/**
* @return the value
*/
public String getValue()
{
return value;
}
/**
* @param value the value to set
*/
public void setValue(String value)
{
this.value = value;
}
}
| [
"michaeljkilleen@outlook.com"
] | michaeljkilleen@outlook.com |
3f3da0cab009b257ab0d707b0e5a322cba8f33ad | 2fd9d77d529e9b90fd077d0aa5ed2889525129e3 | /DecompiledViberSrc/app/src/main/java/com/google/android/gms/internal/ads/zzfh.java | 11a2c806e421a46d1e5c6ecb64fd826d0b18bd9b | [] | no_license | cga2351/code | 703f5d49dc3be45eafc4521e931f8d9d270e8a92 | 4e35fb567d359c252c2feca1e21b3a2a386f2bdb | refs/heads/master | 2021-07-08T15:11:06.299852 | 2021-05-06T13:22:21 | 2021-05-06T13:22:21 | 60,314,071 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,766 | java | package com.google.android.gms.internal.ads;
import android.content.Context;
import android.content.res.Resources;
import android.util.DisplayMetrics;
import android.view.View;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public final class zzfh extends zzfk
{
private final View zzze;
public zzfh(zzdy paramzzdy, String paramString1, String paramString2, zzbp.zza.zza paramzza, int paramInt1, int paramInt2, View paramView)
{
super(paramzzdy, paramString1, paramString2, paramzza, paramInt1, 57);
this.zzze = paramView;
}
protected final void zzcx()
throws IllegalAccessException, InvocationTargetException
{
if (this.zzze != null)
{
zzaci localzzaci = zzact.zzcrs;
Boolean localBoolean = (Boolean)zzyr.zzpe().zzd(localzzaci);
DisplayMetrics localDisplayMetrics = this.zzvd.getContext().getResources().getDisplayMetrics();
Method localMethod = this.zzzw;
Object[] arrayOfObject = new Object[3];
arrayOfObject[0] = this.zzze;
arrayOfObject[1] = localDisplayMetrics;
arrayOfObject[2] = localBoolean;
zzeg localzzeg = new zzeg((String)localMethod.invoke(null, arrayOfObject));
zzbp.zza.zzf.zza localzza = zzbp.zza.zzf.zzat();
localzza.zzdc(localzzeg.zzyn.longValue()).zzdd(localzzeg.zzyo.longValue()).zzde(localzzeg.zzyp.longValue());
if (localBoolean.booleanValue())
localzza.zzdf(localzzeg.zzyq.longValue());
this.zzzm.zzb((zzbp.zza.zzf)localzza.zzaya());
}
}
}
/* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_2_dex2jar.jar
* Qualified Name: com.google.android.gms.internal.ads.zzfh
* JD-Core Version: 0.6.2
*/ | [
"yu.liang@navercorp.com"
] | yu.liang@navercorp.com |
7b248d79bcf7876ef4349bb1cacbbd8c02842be4 | 4a8bcfa280c0aed245383150b66acf1a7550458d | /org.obeonetwork.dsl.spem/src/org/obeonetwork/dsl/spem/uma/impl/ReportImpl.java | ac7cd06d492659a46eb4a0ddb8ad9f2212a44835 | [] | no_license | SebastienAndreo/SPEM-Designer | f4eedad7e0d68403a1a3bddfddcfb2182796a222 | 532e71548fde8d73a78b471a8fd8dd402e92f58e | refs/heads/master | 2021-01-15T13:06:10.846652 | 2012-08-07T07:13:03 | 2012-08-07T07:13:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 774 | java | /**
* THALES (c)
*/
package org.obeonetwork.dsl.spem.uma.impl;
import org.eclipse.emf.ecore.EClass;
import org.obeonetwork.dsl.spem.impl.GuidanceImpl;
import org.obeonetwork.dsl.spem.uma.Report;
import org.obeonetwork.dsl.spem.uma.UmaPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Report</b></em>'.
* <!-- end-user-doc -->
* <p>
* </p>
*
* @generated
*/
public class ReportImpl extends GuidanceImpl implements Report {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ReportImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return UmaPackage.Literals.REPORT;
}
} //ReportImpl
| [
"Stephane.Drapeau@obeo.fr"
] | Stephane.Drapeau@obeo.fr |
45a3cb62e53ad972d268a4b24a29c6e59cfa1120 | 669217b5bf8184b5484f0dc813ce943ce0fe2eb5 | /src/openperipheral/core/adapter/forestry/AdapterBeeHousing.java | 173c8de2e98662b2708d923b27a7ff48773d8367 | [
"MIT"
] | permissive | ds84182/OpenPeripheral | 2492655b91996f0d95b4554220dd6fb37e478c4d | db61d392ce1fa064ac71c934d655f17dc932aca2 | refs/heads/master | 2021-01-25T02:29:44.469136 | 2013-09-15T21:40:24 | 2013-09-15T21:40:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,305 | java | package openperipheral.core.adapter.forestry;
import net.minecraft.item.ItemStack;
import openperipheral.api.IPeripheralAdapter;
import openperipheral.api.LuaMethod;
import openperipheral.api.LuaType;
import dan200.computer.api.IComputerAccess;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IIndividual;
public class AdapterBeeHousing implements IPeripheralAdapter {
@Override
public Class getTargetClass() {
return IBeeHousing.class;
}
@LuaMethod(returnType = LuaType.BOOLEAN, description = "Can the bees breed?")
public boolean canBreed(IComputerAccess computer, IBeeHousing beeHousing) {
return beeHousing.canBreed();
}
@LuaMethod(returnType = LuaType.TABLE, description = "Get the drone")
public IIndividual getDrone(IComputerAccess computer, IBeeHousing beeHousing) {
ItemStack drone = beeHousing.getDrone();
if (drone != null) { return AlleleManager.alleleRegistry.getIndividual(drone); }
return null;
}
@LuaMethod(returnType = LuaType.TABLE, description = "Get the queen")
public IIndividual getQueen(IComputerAccess computer, IBeeHousing beeHousing) {
ItemStack queen = beeHousing.getQueen();
if (queen != null) { return AlleleManager.alleleRegistry.getIndividual(queen); }
return null;
}
}
| [
"mikeefranklin@gmail.com"
] | mikeefranklin@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.