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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b3c4c318723b251d92e95deebf13514519846e35 | d5f09c7b0e954cd20dd613af600afd91b039c48a | /sources/com/coolapk/market/view/photo/QRCodeActivity$init$5.java | 2a03bee3854b8dd417c5b192c7fddfb56eb5e30c | [] | no_license | t0HiiBwn/CoolapkRelease | af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3 | a6a2b03e32cde0e5163016e0078391271a8d33ab | refs/heads/main | 2022-07-29T23:28:35.867734 | 2021-03-26T11:41:18 | 2021-03-26T11:41:18 | 345,290,891 | 5 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,056 | java | package com.coolapk.market.view.photo;
import android.graphics.Rect;
import com.coolapk.market.widget.DrawSystemBarFrameLayout;
import kotlin.Metadata;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "", "insets", "Landroid/graphics/Rect;", "kotlin.jvm.PlatformType", "onInsetChange"}, k = 3, mv = {1, 4, 2})
/* compiled from: QRCodeActivity.kt */
final class QRCodeActivity$init$5 implements DrawSystemBarFrameLayout.OnInsetChangeListener {
final /* synthetic */ QRCodeActivity this$0;
QRCodeActivity$init$5(QRCodeActivity qRCodeActivity) {
this.this$0 = qRCodeActivity;
}
@Override // com.coolapk.market.widget.DrawSystemBarFrameLayout.OnInsetChangeListener
public final void onInsetChange(Rect rect) {
QRCodeActivity.access$getBinding$p(this.this$0).appBar.setPadding(0, rect.top, 0, 0);
}
}
| [
"test@gmail.com"
] | test@gmail.com |
44df11b3d5c39dd8e8e4cf566787f8a42f2c472e | f0568343ecd32379a6a2d598bda93fa419847584 | /modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201302/ContactServiceInterfacecreateContactResponse.java | 7f280659e2c2e4e851fc6ab7d48e934a560a4b8f | [
"Apache-2.0"
] | permissive | frankzwang/googleads-java-lib | bd098b7b61622bd50352ccca815c4de15c45a545 | 0cf942d2558754589a12b4d9daa5902d7499e43f | refs/heads/master | 2021-01-20T23:20:53.380875 | 2014-07-02T19:14:30 | 2014-07-02T19:14:30 | 21,526,492 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,546 | java |
package com.google.api.ads.dfp.jaxws.v201302;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for createContactResponse element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="createContactResponse">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="rval" type="{https://www.google.com/apis/ads/publisher/v201302}Contact" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"rval"
})
@XmlRootElement(name = "createContactResponse")
public class ContactServiceInterfacecreateContactResponse {
protected Contact rval;
/**
* Gets the value of the rval property.
*
* @return
* possible object is
* {@link Contact }
*
*/
public Contact getRval() {
return rval;
}
/**
* Sets the value of the rval property.
*
* @param value
* allowed object is
* {@link Contact }
*
*/
public void setRval(Contact value) {
this.rval = value;
}
}
| [
"jradcliff@google.com"
] | jradcliff@google.com |
9663e575d9a1ea125fa4fc224a1d19bd023b0638 | 97b46ff38b675d934948ff3731cf1607a1cc0fc9 | /Server/java/pk/elfo/gameserver/network/clientpackets/RequestRefineCancel.java | 53faf0991a374e840cdb3d6373c19e280876af22 | [] | no_license | l2brutal/pk-elfo_H5 | a6703d734111e687ad2f1b2ebae769e071a911a4 | 766fa2a92cb3dcde5da6e68a7f3d41603b9c037e | refs/heads/master | 2020-12-28T13:33:46.142303 | 2016-01-20T09:53:10 | 2016-01-20T09:53:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,364 | java | /*
* Copyright (C) 2004-2013 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package pk.elfo.gameserver.network.clientpackets;
import pk.elfo.Config;
import pk.elfo.gameserver.model.actor.instance.L2PcInstance;
import pk.elfo.gameserver.model.items.L2Item;
import pk.elfo.gameserver.model.items.instance.L2ItemInstance;
import pk.elfo.gameserver.network.SystemMessageId;
import pk.elfo.gameserver.network.serverpackets.ExVariationCancelResult;
import pk.elfo.gameserver.network.serverpackets.InventoryUpdate;
import pk.elfo.gameserver.util.Util;
/**
* Format(ch) d
* @author -Wooden-
*/
public final class RequestRefineCancel extends L2GameClientPacket
{
private static final String _C__D0_43_REQUESTREFINECANCEL = "[C] D0:43 RequestRefineCancel";
private int _targetItemObjId;
@Override
protected void readImpl()
{
_targetItemObjId = readD();
}
@Override
protected void runImpl()
{
L2PcInstance activeChar = getClient().getActiveChar();
if (activeChar == null)
{
return;
}
L2ItemInstance targetItem = activeChar.getInventory().getItemByObjectId(_targetItemObjId);
if (targetItem == null)
{
activeChar.sendPacket(new ExVariationCancelResult(0));
return;
}
if (targetItem.getOwnerId() != activeChar.getObjectId())
{
Util.handleIllegalPlayerAction(getClient().getActiveChar(), "Warning!! Character " + getClient().getActiveChar().getName() + " of account " + getClient().getActiveChar().getAccountName() + " tryied to augment item that doesn't own.", Config.DEFAULT_PUNISH);
return;
}
// cannot remove augmentation from a not augmented item
if (!targetItem.isAugmented())
{
activeChar.sendPacket(SystemMessageId.AUGMENTATION_REMOVAL_CAN_ONLY_BE_DONE_ON_AN_AUGMENTED_ITEM);
activeChar.sendPacket(new ExVariationCancelResult(0));
return;
}
// get the price
int price = 0;
switch (targetItem.getItem().getCrystalType())
{
case L2Item.CRYSTAL_C:
if (targetItem.getCrystalCount() < 1720)
{
price = 95000;
}
else if (targetItem.getCrystalCount() < 2452)
{
price = 150000;
}
else
{
price = 210000;
}
break;
case L2Item.CRYSTAL_B:
if (targetItem.getCrystalCount() < 1746)
{
price = 240000;
}
else
{
price = 270000;
}
break;
case L2Item.CRYSTAL_A:
if (targetItem.getCrystalCount() < 2160)
{
price = 330000;
}
else if (targetItem.getCrystalCount() < 2824)
{
price = 390000;
}
else
{
price = 420000;
}
break;
case L2Item.CRYSTAL_S:
price = 480000;
break;
case L2Item.CRYSTAL_S80:
case L2Item.CRYSTAL_S84:
price = 920000;
break;
// any other item type is not augmentable
default:
activeChar.sendPacket(new ExVariationCancelResult(0));
return;
}
// try to reduce the players adena
if (!activeChar.reduceAdena("RequestRefineCancel", price, null, true))
{
activeChar.sendPacket(new ExVariationCancelResult(0));
activeChar.sendPacket(SystemMessageId.YOU_NOT_ENOUGH_ADENA);
return;
}
// unequip item
if (targetItem.isEquipped())
{
activeChar.disarmWeapons();
}
// remove the augmentation
targetItem.removeAugmentation();
// send ExVariationCancelResult
activeChar.sendPacket(new ExVariationCancelResult(1));
// send inventory update
InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(targetItem);
activeChar.sendPacket(iu);
}
@Override
public String getType()
{
return _C__D0_43_REQUESTREFINECANCEL;
}
}
| [
"PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba"
] | PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba |
a031c41d5f33bfd0db9fbcc61ec577725f1124cb | fc2adb6b2ce808e405c14c0a2e101d5285751365 | /app/src/main/java/com/bsoft/hospital/pub/suzhoumh/view/CountDownHelper.java | 4fd5479253d5b952c519d6c08a038b310758f9d3 | [] | no_license | soon14/szsl_pub | 0330c9f671a79aa9d228ff21e10fdcea18405a63 | 1eac951ba4395b7ecfee0f2f35040eba7b40026a | refs/heads/master | 2020-07-26T16:14:41.265256 | 2019-03-14T09:23:16 | 2019-03-14T09:23:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,924 | java | package com.bsoft.hospital.pub.suzhoumh.view;
import android.os.CountDownTimer;
/**
* 倒计时帮助类
*
* Author: 嘿嘿抛物线
* Email: 497635745@qq.com
* Date: 2016-8-15 10:41
*/
public class CountDownHelper {
//倒计时timer
private CountDownTimer countDownTimer;
private boolean isCounting = false;
public CountDownHelper(int max, int interval) {
// 由于CountDownTimer并不是准确计时,在onTick方法调用的时候,time会有1-10ms左右的误差,这会导致最后一秒不会调用onTick()
// 因此,设置间隔的时候,默认减去了10ms,从而减去误差。
// 经过以上的微调,最后一秒的显示时间会由于10ms延迟的积累,导致显示时间比1s长max*10ms的时间,其他时间的显示正常,总时间正常
countDownTimer = new CountDownTimer(max * 1000, interval * 1000 - 10) {
@Override
public void onTick(long time) {
isCounting=true;
// 第一次调用会有1-10ms的误差,因此需要+15ms,防止第一个数不显示,第二个数显示2s
if (countDownListener != null) {
countDownListener.onCounting((time + 15) / 1000);
}
}
@Override
public void onFinish() {
isCounting=false;
countDownListener.onFinish();
}
};
}
/**
* 开始倒计时
*/
public void start() {
countDownTimer.start();
}
public boolean isCounting() {
return isCounting;
}
public interface CountDownListener {
void onCounting(long time);
void onFinish();
}
private CountDownListener countDownListener;
public void setCountDownListener(CountDownListener countDownListener) {
this.countDownListener = countDownListener;
}
}
| [
"1111"
] | 1111 |
f2b29d3c81285d89a024394956d59f1566002e8c | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project42/src/test/java/org/gradle/test/performance42_4/Test42_321.java | 1c55588901837a038b783e2cdb8bba4043665ee9 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 292 | java | package org.gradle.test.performance42_4;
import static org.junit.Assert.*;
public class Test42_321 {
private final Production42_321 production = new Production42_321("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
9def60e645892d668324b46ef174e96f417452d7 | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/mapstruct/learning/6459/XmlGregorianCalendarToJodaLocalDateTime.java | e80477927f4f94efb73326679ee5736fb04255cb | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,524 | java | /*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.internal.model.source.builtin;
import java.util.Set;
import javax.xml.datatype.DatatypeConstants;
import javax.xml.datatype.XMLGregorianCalendar;
import org.mapstruct.ap.internal.model.common.Parameter;
import org.mapstruct.ap.internal.model.common.Type;
import org.mapstruct.ap.internal.model.common.TypeFactory;
import org.mapstruct.ap.internal.util.JodaTimeConstants;
import static org.mapstruct.ap.internal.util.Collections.asSet;
/**
* @author Sjaak Derksen
*/
public class XmlGregorianCalendarToJodaLocalDateTime extends BuiltInMethod {
private final Parameter parameter;
private final Type returnType;
private final Set<Type> importTypes;
public XmlGregorianCalendarToJodaLocalDateTime(TypeFactory typeFactory) {
this.parameter = new Parameter( "xcal", typeFactory.getType( XMLGregorianCalendar.class ) );
this.returnType = typeFactory.getType( JodaTimeConstants.LOCAL_DATE_TIME_FQN );
this.importTypes = asSet(
typeFactory.getType( DatatypeConstants.class ),
returnType,
parameter.getType() );
}
@Override
public Parameter getParameter() {
return parameter;
}
@Override
public Type getReturnType() {
return returnType;
}
@Override
public Set<Type> getImportTypes() {
return importTypes;
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
b013e15b3c190c7bea95e6b8473a2c7751b5dd31 | 56032ac87277d98895f5e47ee6069b6297101961 | /src/main/java/org/azkfw/munchkin/database/model/entity/TypeEntity.java | 5c777330e49c2782ad4b59ef8e61ada46d7abf10 | [
"Apache-2.0"
] | permissive | azuki-framework/munchkin | ec2318591ed82e3929c20f37e3a5d29fda9c6825 | 13f6feede91fb36ba4913dee08fa5d996fded1a7 | refs/heads/master | 2021-01-10T14:01:25.798272 | 2018-04-16T14:32:32 | 2018-04-16T14:32:32 | 52,443,715 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,399 | 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.azkfw.munchkin.database.model.entity;
import java.io.Serializable;
/**
* タイプ情報を保持するエンティティクラス
*
* @author Kawakicchi
*/
public class TypeEntity implements Serializable {
/** serialVersionUID */
private static final long serialVersionUID = -5097017395641671202L;
private final String name;
private final String label;
public TypeEntity(final String name, final String label) {
super();
this.name = name;
this.label = label;
}
public String getName() {
return name;
}
public String getLabel() {
return label;
}
}
| [
"kawakicchi@gmail.com"
] | kawakicchi@gmail.com |
5f96ea1e517b90b58456bbbd466ef0c348eb99f2 | f8a14fec331ec56dd7e070fc032604117f155085 | /dataparser/src/main/java/ru/l2/dataparser/parser/ItemDataParser.java | fe998cacb0792f948c34fe6679d5ba20420591ca | [] | no_license | OFRF/BladeRush | c2f06d050a1f2d79a9b50567b9f1152d6d755149 | 87329d131c0fcc8417ed15479298fdb90bc8f1d2 | refs/heads/master | 2023-03-25T13:51:04.404738 | 2020-05-04T14:37:23 | 2020-05-04T14:37:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 612 | java | package ru.l2.dataparser.parser;
import ru.l2.dataparser.common.AbstractDataParser;
import ru.l2.dataparser.holder.ItemDataHolder;
/**
* @author : Camelion
* @date : 27.08.12 17:09
*/
public class ItemDataParser extends AbstractDataParser<ItemDataHolder> {
private static final ItemDataParser ourInstance = new ItemDataParser();
private ItemDataParser() {
super(ItemDataHolder.getInstance());
}
public static ItemDataParser getInstance() {
return ourInstance;
}
@Override
protected String getFileName() {
return "data/pts_scripts/itemdata.txt";
}
} | [
"yadrov995@gmail.com"
] | yadrov995@gmail.com |
3ae797a7dddca110b96d9799755447265f7b0b6c | 072216667ef59e11cf4994220ea1594538db10a0 | /googleplay/android/support/v7/app/ActionBarActivity.java | 3f301c73c78b159be46c7a6112bcccbba02ceab0 | [] | no_license | jackTang11/REMIUI | 896037b74e90f64e6f7d8ddfda6f3731a8db6a74 | 48d65600a1b04931a510e1f036e58356af1531c0 | refs/heads/master | 2021-01-18T05:43:37.754113 | 2015-07-03T04:01:06 | 2015-07-03T04:01:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,288 | java | package android.support.v7.app;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.NavUtils;
import android.support.v4.app.TaskStackBuilder;
import android.support.v4.app.TaskStackBuilder.SupportParentable;
import android.support.v7.app.ActionBarDrawerToggle.Delegate;
import android.support.v7.view.ActionMode;
import android.support.v7.widget.Toolbar;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
public class ActionBarActivity extends FragmentActivity implements SupportParentable, TmpDelegateProvider {
private ActionBarActivityDelegate mDelegate;
public ActionBar getSupportActionBar() {
return getDelegate().getSupportActionBar();
}
public void setSupportActionBar(Toolbar toolbar) {
getDelegate().setSupportActionBar(toolbar);
}
public MenuInflater getMenuInflater() {
return getDelegate().getMenuInflater();
}
public void setContentView(int layoutResID) {
getDelegate().setContentView(layoutResID);
}
public void setContentView(View view) {
getDelegate().setContentView(view);
}
public void setContentView(View view, LayoutParams params) {
getDelegate().setContentView(view, params);
}
public void addContentView(View view, LayoutParams params) {
getDelegate().addContentView(view, params);
}
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getDelegate().onCreate(savedInstanceState);
}
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
getDelegate().onPostCreate(savedInstanceState);
}
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
getDelegate().onConfigurationChanged(newConfig);
}
protected void onStop() {
super.onStop();
getDelegate().onStop();
}
protected void onPostResume() {
super.onPostResume();
getDelegate().onPostResume();
}
public final boolean onMenuItemSelected(int featureId, MenuItem item) {
if (super.onMenuItemSelected(featureId, item)) {
return true;
}
ActionBar ab = getSupportActionBar();
if (item.getItemId() != 16908332 || ab == null || (ab.getDisplayOptions() & 4) == 0) {
return false;
}
return onSupportNavigateUp();
}
protected void onDestroy() {
super.onDestroy();
getDelegate().destroy();
}
protected void onTitleChanged(CharSequence title, int color) {
super.onTitleChanged(title, color);
getDelegate().onTitleChanged(title);
}
public void supportInvalidateOptionsMenu() {
getDelegate().supportInvalidateOptionsMenu();
}
public void invalidateOptionsMenu() {
getDelegate().supportInvalidateOptionsMenu();
}
public void onSupportActionModeStarted(ActionMode mode) {
}
public void onSupportActionModeFinished(ActionMode mode) {
}
public boolean onCreatePanelMenu(int featureId, Menu menu) {
return getDelegate().onCreatePanelMenu(featureId, menu);
}
public boolean onPreparePanel(int featureId, View view, Menu menu) {
return getDelegate().onPreparePanel(featureId, view, menu);
}
public void onPanelClosed(int featureId, Menu menu) {
getDelegate().onPanelClosed(featureId, menu);
}
public boolean onMenuOpened(int featureId, Menu menu) {
return getDelegate().onMenuOpened(featureId, menu);
}
protected boolean onPrepareOptionsPanel(View view, Menu menu) {
return getDelegate().onPrepareOptionsPanel(view, menu);
}
void superSetContentView(View v) {
super.setContentView(v);
}
boolean superOnCreatePanelMenu(int featureId, Menu frameworkMenu) {
return super.onCreatePanelMenu(featureId, frameworkMenu);
}
boolean superOnPreparePanel(int featureId, View view, Menu menu) {
return super.onPreparePanel(featureId, view, menu);
}
boolean superOnPrepareOptionsPanel(View view, Menu menu) {
return super.onPrepareOptionsPanel(view, menu);
}
void superOnPanelClosed(int featureId, Menu menu) {
super.onPanelClosed(featureId, menu);
}
boolean superOnMenuOpened(int featureId, Menu menu) {
return super.onMenuOpened(featureId, menu);
}
public void onBackPressed() {
if (!getDelegate().onBackPressed()) {
super.onBackPressed();
}
}
public void onCreateSupportNavigateUpTaskStack(TaskStackBuilder builder) {
builder.addParentStack((Activity) this);
}
public void onPrepareSupportNavigateUpTaskStack(TaskStackBuilder builder) {
}
public boolean onSupportNavigateUp() {
Intent upIntent = getSupportParentActivityIntent();
if (upIntent == null) {
return false;
}
if (supportShouldUpRecreateTask(upIntent)) {
TaskStackBuilder b = TaskStackBuilder.create(this);
onCreateSupportNavigateUpTaskStack(b);
onPrepareSupportNavigateUpTaskStack(b);
b.startActivities();
try {
ActivityCompat.finishAffinity(this);
} catch (IllegalStateException e) {
finish();
}
} else {
supportNavigateUpTo(upIntent);
}
return true;
}
public Intent getSupportParentActivityIntent() {
return NavUtils.getParentActivityIntent(this);
}
public boolean supportShouldUpRecreateTask(Intent targetIntent) {
return NavUtils.shouldUpRecreateTask(this, targetIntent);
}
public void supportNavigateUpTo(Intent upIntent) {
NavUtils.navigateUpTo(this, upIntent);
}
public Delegate getV7DrawerToggleDelegate() {
return getDelegate().getV7DrawerToggleDelegate();
}
public boolean onKeyShortcut(int keyCode, KeyEvent event) {
return getDelegate().onKeyShortcut(keyCode, event);
}
public boolean dispatchKeyEvent(KeyEvent event) {
if (getDelegate().dispatchKeyEvent(event)) {
return true;
}
return super.dispatchKeyEvent(event);
}
public final void onContentChanged() {
getDelegate().onContentChanged();
}
public void onSupportContentChanged() {
}
public View onCreateView(String name, Context context, AttributeSet attrs) {
View result = super.onCreateView(name, context, attrs);
return result != null ? result : getDelegate().createView(name, context, attrs);
}
private ActionBarActivityDelegate getDelegate() {
if (this.mDelegate == null) {
this.mDelegate = ActionBarActivityDelegate.createDelegate(this);
}
return this.mDelegate;
}
}
| [
"songjd@putao.com"
] | songjd@putao.com |
24e906aac96543c94ed8e760b1ad5caa7f7c067a | c781625bc0dd846bce9bfd58cda430b79318ad8d | /app/src/main/java/com/cnitpm/financial/Base/BaseFragment.java | 9c1db357995ad3231074265ee0c13f3012283885 | [] | no_license | zengwei123/financial | 48e7956752d135499df7f398d8ba404fa918a46b | 1f9d94d60af880675535c886b76076f2a6a4fabb | refs/heads/master | 2020-06-06T08:36:07.773770 | 2020-03-14T01:16:10 | 2020-03-14T01:16:10 | 192,691,302 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,833 | java | package com.cnitpm.financial.Base;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.View;
import java.lang.reflect.Field;
/**
* Created by zengwei on 2018/8/23.
*/
public class BaseFragment extends Fragment {
private static Intent intent;
public Activity activity;
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
activity=getActivity();
}
/**
* 跳转activity 方法
* @param context
* @param iclass
*/
public void JumpActivity(Context context, Class iclass){
intent=new Intent(context,iclass);
startActivity(intent);
}
/**
* 传参数跳转activity 方法
* @param context
* @param iclass
*/
public void JumpBundleActivity(Context context, Class iclass,Bundle bundle){
intent=new Intent(context,iclass);
intent.putExtra("KEY",bundle);
startActivity(intent);
}
/**控件绑定**/
public void injectViews(View view){
Field[] fields=this.getClass().getDeclaredFields();
for (Field field:fields){
if (field.isAnnotationPresent(ViewBind.class)) {
ViewBind inject=field.getAnnotation(ViewBind.class);
int id = inject.value();
if (id>0){
field.setAccessible(true);
try {
field.set(this,view.findViewById(id));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
}
}
| [
"13085486819@163.com"
] | 13085486819@163.com |
f09a9469bceb34faf298ca09f0c725caa75180cd | 187b211464d5a30a6865fcc4a00986ec02243d49 | /luckwine-goods/luckwine-goods-api/src/main/java/com/luckwine/goods/model/enums/StockOperate.java | 304fba2be024271e02e49c26a4bcdf764be07066 | [] | no_license | guangtong-information/luckwine-mall | 3b7fa3d809d9b1e9575e2643ea6915aedcb781e8 | a564126d8a9b63e6650f72590f63af834822bf2e | refs/heads/master | 2022-06-27T07:12:17.243240 | 2020-09-04T09:35:54 | 2020-09-04T09:35:54 | 171,574,799 | 10 | 10 | null | 2022-06-21T00:56:34 | 2019-02-20T00:53:24 | TSQL | UTF-8 | Java | false | false | 232 | java | package com.luckwine.goods.model.enums;
import lombok.Getter;
public enum StockOperate {
INCR("添加"), DECR("减少");
@Getter
private String desc;
StockOperate(String desc) {
this.desc = desc;
}
}
| [
"th15817161961@gmail.com"
] | th15817161961@gmail.com |
ddd331d26f56cf83ace79d0ed8c068384b195c21 | bccb412254b3e6f35a5c4dd227f440ecbbb60db9 | /hl7/model/V2_3/table/Table0162.java | 170f571f29d89f9a8a910ef9caa171e213e7279f | [] | no_license | nlp-lap/Version_Compatible_HL7_Parser | 8bdb307aa75a5317265f730c5b2ac92ae430962b | 9977e1fcd1400916efc4aa161588beae81900cfd | refs/heads/master | 2021-03-03T15:05:36.071491 | 2020-03-09T07:54:42 | 2020-03-09T07:54:42 | 245,967,680 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,224 | java | package hl7.model.V2_3.table;
import hl7.bean.table.Table;
public class Table0162 extends Table{
private static final String VERSION = "2.3";
public static Table getInstance(){
if(table==null) new Table0162();
return table;
}
public static final String AP = "AP";
public static final String B = "B";
public static final String DT = "DT";
public static final String EP = "EP";
public static final String ET = "ET";
public static final String GTT = "GTT";
public static final String GU = "GU";
public static final String IA = "IA";
public static final String IB = "IB";
public static final String IC = "IC";
public static final String ICV = "ICV";
public static final String ID = "ID";
public static final String IH = "IH";
public static final String IMR = "IMR";
public static final String MM = "MM";
public static final String NG = "NG";
public static final String NP = "NP";
public static final String NS = "NS";
public static final String NT = "NT";
public static final String OP = "OP";
public static final String OT = "OT";
public static final String OTH = "OTH";
public static final String PF = "PF";
public static final String PO = "PO";
public static final String PR = "PR";
public static final String RM = "RM";
public static final String SC = "SC";
public static final String SD = "SD";
public static final String SL = "SL";
public static final String TD = "TD";
public static final String TL = "TL";
public static final String TP = "TP";
public static final String TRA = "TRA";
public static final String UR = "UR";
public static final String VG = "VG";
public static final String VM = "VM";
public static final String WND = "WND";
private Table0162(){
setTableName("Route of Administration");
setOID("2.16.840.1.113883.12.162");
putMap("AP", "Apply Externally");
putMap("B", "Buccal");
putMap("DT", "Dental");
putMap("EP", "Epidural");
putMap("ET", "Endotrachial Tube (Used primarily for respiratory therapy and anesthesia delivery)");
putMap("GTT", "Gastronomy Tube");
putMap("GU", "GU Irrigant");
putMap("IA", "Intra-arterial");
putMap("IB", "Intrabursal");
putMap("IC", "Intracardiac");
putMap("ICV", "Intracervical (uterus)");
putMap("ID", "Intradermal");
putMap("IH", "Inhalation");
putMap("IMR", "Immerse (Soak) Body Part");
putMap("MM", "Mucous Membrane");
putMap("NG", "Nasogastric");
putMap("NP", "Nasal Prongs (Used primarily for respiratory therapy and anesthesia delivery)");
putMap("NS", "Nasal");
putMap("NT", "Nasotrachial Tube");
putMap("OP", "Ophthalmic");
putMap("OT", "Otic");
putMap("OTH", "Other/Miscellaneous");
putMap("PF", "Perfusion");
putMap("PO", "Oral");
putMap("PR", "Rectal");
putMap("RM", "Rebreather Mask (Used primarily for respiratory therapy and anesthesia delivery)");
putMap("SC", "Subcutaneous");
putMap("SD", "Soaked Dressing");
putMap("SL", "Sublingual");
putMap("TD", "Transdermal");
putMap("TL", "Translingual");
putMap("TP", "Topical");
putMap("TRA", "Tracheostomy (Used primarily for respiratory therapy and anesthesia delivery)");
putMap("UR", "Urethral");
putMap("VG", "Vaginal");
putMap("VM", "Ventimask");
putMap("WND", "Wound");
}
}
| [
"terminator800@hanmail.net"
] | terminator800@hanmail.net |
ebfa254bc90e47960592b61d7d2a0f6425debc80 | 63da595a4e74145e86269e74e46c98ad1c1bcad3 | /java/com/genscript/gsscm/accounting/entity/ArInvoicePaymentView.java | ceacb3e255335974805a18cef990ec5ad0798466 | [] | no_license | qcamei/scm | 4f2cec86fedc3b8dc0f1cc1649e9ef3be687f726 | 0199673fbc21396e3077fbc79eeec1d2f9bd65f5 | refs/heads/master | 2020-04-27T19:38:19.460288 | 2012-09-18T07:06:04 | 2012-09-18T07:06:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,221 | java | package com.genscript.gsscm.accounting.entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
public class ArInvoicePaymentView {
int transactionId;
String transactionNo;
int custNo;
String transactionType;
Date transactionDate;
String paymentType;
String currency;
String amount;
String transactionFee;
String balance;
String tenderType;
String accountName;
String accountNo;
String routingNo;
String chkNo;
String ccType;
String ccCardHolder;
String ccCvc;
String ccExpiration;
String description;
String status;
Date creationDate;
int createdBy;
String createdByName;
Date modifyDate;
int modifiedBy;
int invoiceId;
String invoiceNo;
String orderNo;
String applyAmount;
String statusUpReason;
String firstName;
String lastName;
Date approveDate;
int approvedBy;
String symbol;
public int getTransactionId() {
return transactionId;
}
public void setTransactionId(int transactionId) {
this.transactionId = transactionId;
}
public String getTransactionNo() {
return transactionNo;
}
public void setTransactionNo(String transactionNo) {
this.transactionNo = transactionNo;
}
public int getCustNo() {
return custNo;
}
public void setCustNo(int custNo) {
this.custNo = custNo;
}
public String getTransactionType() {
return transactionType;
}
public void setTransactionType(String transactionType) {
this.transactionType = transactionType;
}
public Date getTransactionDate() {
return transactionDate;
}
public void setTransactionDate(Date transactionDate) {
this.transactionDate = transactionDate;
}
public String getPaymentType() {
return paymentType;
}
public void setPaymentType(String paymentType) {
this.paymentType = paymentType;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getTransactionFee() {
return transactionFee;
}
public void setTransactionFee(String transactionFee) {
this.transactionFee = transactionFee;
}
public String getBalance() {
return balance;
}
public void setBalance(String balance) {
this.balance = balance;
}
public String getTenderType() {
return tenderType;
}
public void setTenderType(String tenderType) {
this.tenderType = tenderType;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getAccountNo() {
return accountNo;
}
public void setAccountNo(String accountNo) {
this.accountNo = accountNo;
}
public String getRoutingNo() {
return routingNo;
}
public void setRoutingNo(String routingNo) {
this.routingNo = routingNo;
}
public String getChkNo() {
return chkNo;
}
public void setChkNo(String chkNo) {
this.chkNo = chkNo;
}
public String getCcType() {
return ccType;
}
public void setCcType(String ccType) {
this.ccType = ccType;
}
public String getCcCardHolder() {
return ccCardHolder;
}
public void setCcCardHolder(String ccCardHolder) {
this.ccCardHolder = ccCardHolder;
}
public String getCcCvc() {
return ccCvc;
}
public void setCcCvc(String ccCvc) {
this.ccCvc = ccCvc;
}
public String getCcExpiration() {
return ccExpiration;
}
public void setCcExpiration(String ccExpiration) {
this.ccExpiration = ccExpiration;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getCreationDate() {
return creationDate;
}
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}
public int getCreatedBy() {
return createdBy;
}
public void setCreatedBy(int createdBy) {
this.createdBy = createdBy;
}
public String getCreatedByName() {
return createdByName;
}
public void setCreatedByName(String createdByName) {
this.createdByName = createdByName;
}
public Date getModifyDate() {
return modifyDate;
}
public void setModifyDate(Date modifyDate) {
this.modifyDate = modifyDate;
}
public int getModifiedBy() {
return modifiedBy;
}
public void setModifiedBy(int modifiedBy) {
this.modifiedBy = modifiedBy;
}
public int getInvoiceId() {
return invoiceId;
}
public void setInvoiceId(int invoiceId) {
this.invoiceId = invoiceId;
}
public String getInvoiceNo() {
return invoiceNo;
}
public void setInvoiceNo(String invoiceNo) {
this.invoiceNo = invoiceNo;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getApplyAmount() {
return applyAmount;
}
public void setApplyAmount(String applyAmount) {
this.applyAmount = applyAmount;
}
public String getStatusUpReason() {
return statusUpReason;
}
public void setStatusUpReason(String statusUpReason) {
this.statusUpReason = statusUpReason;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public Date getApproveDate() {
return approveDate;
}
public void setApproveDate(Date approveDate) {
this.approveDate = approveDate;
}
public int getApprovedBy() {
return approvedBy;
}
public void setApprovedBy(int approvedBy) {
this.approvedBy = approvedBy;
}
public String getSymbol() {
return symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}
}
| [
"253479240@qq.com"
] | 253479240@qq.com |
58f87e9ba8f112b5ba93359d2cfc5410907c0e0a | 7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b | /Crawler/data/InjectByType.java | fc07cdbf8e3d4bd46f729bb130f2dda83e01fadb | [] | no_license | NayrozD/DD2476-Project | b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0 | 94dfb3c0a470527b069e2e0fd9ee375787ee5532 | refs/heads/master | 2023-03-18T04:04:59.111664 | 2021-03-10T15:03:07 | 2021-03-10T15:03:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 328 | java | 60
https://raw.githubusercontent.com/Jeka1978/coronadesinfectorlifedemo/master/src/main/java/com/epam/InjectByType.java
package com.epam;/**
* @author Evgeny Borisov
*/
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Retention(RUNTIME)
public @interface InjectByType {
}
| [
"veronika.cucorova@gmail.com"
] | veronika.cucorova@gmail.com |
368a6bdcc5ff902cd02e5d2636d6075cabb31e76 | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-ws/results/XWIKI-13544-81-18-Single_Objective_GGA-WeightedSum/org/xwiki/container/servlet/filters/internal/SavedRequestRestorerFilter_ESTest_scaffolding.java | d8baf9f3d502656200a31a08952cd2e4c8d2db4e | [
"MIT",
"CC-BY-4.0"
] | permissive | STAMP-project/Botsing-basic-block-coverage-application | 6c1095c6be945adc0be2b63bbec44f0014972793 | 80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da | refs/heads/master | 2022-07-28T23:05:55.253779 | 2022-04-20T13:54:11 | 2022-04-20T13:54:11 | 285,771,370 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 475 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Jan 18 02:39:44 UTC 2020
*/
package org.xwiki.container.servlet.filters.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class SavedRequestRestorerFilter_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
02827fe0b5386f9b4861b11f9dfda190b9208795 | f86938ea6307bf6d1d89a07b5b5f9e360673d9b8 | /CodeComment_Data/Code_Jam/train/Counting_Sheep/S/Main(635).java | 12eebc0e91990f2807b6080b58589899721c08da | [] | no_license | yxh-y/code_comment_generation | 8367b355195a8828a27aac92b3c738564587d36f | 2c7bec36dd0c397eb51ee5bd77c94fa9689575fa | refs/heads/master | 2021-09-28T18:52:40.660282 | 2018-11-19T14:54:56 | 2018-11-19T14:54:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,176 | java | package methodEmbedding.Counting_Sheep.S.LYD1080;
import java.util.*;
import java.io.*;
public class Main {
public static void main(String[]args){
try{
Scanner sc=new Scanner(new File("A-small-attempt10.in.txt"));
int t=sc.nextInt();
String []s=new String[t];
for(int i=1;i<=t;i++)
{long c=1;boolean b=true;
long n=sc.nextShort();
int[]x=new int[10];
if(n<=200&&n>=0){
if(n==0){
s[i-1]="Case #"+i+": INSOMNIA";
}
else {
b=true;
long n2=n;
while(b)
{long n1=n2;
while(n1!=0){
if(x[(int)(n1%10)]==0)
x[(int)(n1%10)]++;
n1=(n1/10); }
if(x[0]+x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+x[7]+x[8]+x[9]==10)
{
s[i-1]="Case #"+i+": "+n2;
b=false;
break;
}
else{
c++;
n2=(n*c);
}}
}
}
else
s[i-1]="Case #"+i+": INSOMNIA";}
try{
PrintStream out = new PrintStream(new FileOutputStream("java.txt"));
System.setOut(out);
for(int i=0;i<t;i++)
{
out.println(s[i]);
}}
catch(IOException fx) {
System.out.println(fx);
}
}
catch(IOException fx) {
System.out.println(fx);
}
}
}
| [
"liangyuding@sjtu.edu.cn"
] | liangyuding@sjtu.edu.cn |
329db4e286bca1cc172d861cd0355349e94cf36a | b6d8265c45af8b69b25d396f1ea64dcb9ac3de4a | /src/main/java/com/github/kiulian/downloader/model/search/field/UploadDateField.java | 7c338f9052a028d219d256ca0f565890aeb57ca3 | [
"Apache-2.0"
] | permissive | andang72/architecture-community-studio | b6d474576b297f797bcc0dd2a8ad546caaa68ba9 | 052a36130116d550f11fb87c5db07a09316a2f70 | refs/heads/master | 2023-05-10T18:20:38.459905 | 2023-04-08T02:44:07 | 2023-04-08T02:44:07 | 270,558,984 | 1 | 0 | Apache-2.0 | 2023-05-05T22:58:37 | 2020-06-08T06:39:49 | Java | UTF-8 | Java | false | false | 393 | java | package com.github.kiulian.downloader.model.search.field;
public enum UploadDateField implements SearchField {
HOUR(1, 1),
DAY(1, 2),
WEEK(1, 3),
MONTH(1, 4),
YEAR(1, 5);
private final byte[] data;
private UploadDateField(int... data) {
this.data = SearchField.convert(data);
}
@Override
public byte[] data() {
return data;
}
}
| [
"andang.son@gmail.com"
] | andang.son@gmail.com |
2f0e35eadf59a25b80e4f4e063bb98ecb755f4c9 | 06ea1e1ec656bb145b3e05b7312aeed3ce9a0be9 | /graduation-course/graduation-course-service/src/main/java/com/graduation/education/course/service/feign/biz/FeignCourseChapterPeriodBiz.java | ffd8b4dd3ab86d7b0d9db434c2d74543cbf03113 | [] | no_license | CATTechnology/graduation_parent | 11473733372e196ba5390a857d88030faf340b35 | be0229f28a56b390a66b8128b4ddd90dca7681aa | refs/heads/master | 2023-06-22T09:45:11.603346 | 2020-04-01T08:18:57 | 2020-04-01T08:18:57 | 252,122,429 | 0 | 1 | null | 2023-03-27T22:19:41 | 2020-04-01T08:55:28 | Java | UTF-8 | Java | false | false | 2,266 | java | package com.graduation.education.course.service.feign.biz;
import com.graduation.education.course.feign.qo.CourseChapterPeriodQO;
import com.graduation.education.course.feign.vo.CourseChapterPeriodVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.graduation.education.course.service.dao.CourseChapterPeriodDao;
import com.graduation.education.course.service.dao.impl.mapper.entity.CourseChapterPeriod;
import com.graduation.education.course.service.dao.impl.mapper.entity.CourseChapterPeriodExample;
import com.graduation.education.util.base.Page;
import com.graduation.education.util.base.PageUtil;
import com.graduation.education.util.tools.BeanUtil;
/**
* 课时信息
*
* @author wujing
*/
@Component
public class FeignCourseChapterPeriodBiz {
@Autowired
private CourseChapterPeriodDao dao;
public Page<CourseChapterPeriodVO> listForPage(CourseChapterPeriodQO qo) {
CourseChapterPeriodExample example = new CourseChapterPeriodExample();
example.setOrderByClause(" id desc ");
Page<CourseChapterPeriod> page = dao.listForPage(qo.getPageCurrent(), qo.getPageSize(), example);
return PageUtil.transform(page, CourseChapterPeriodVO.class);
}
public int save(CourseChapterPeriodQO qo) {
CourseChapterPeriod record = BeanUtil.copyProperties(qo, CourseChapterPeriod.class);
return dao.save(record);
}
public int deleteById(Long id) {
return dao.deleteById(id);
}
public CourseChapterPeriodVO getById(Long id) {
CourseChapterPeriod record = dao.getById(id);
return BeanUtil.copyProperties(record, CourseChapterPeriodVO.class);
}
public int updateById(CourseChapterPeriodQO qo) {
CourseChapterPeriod record = BeanUtil.copyProperties(qo, CourseChapterPeriod.class);
return dao.updateById(record);
}
/**
* 根据视频编号查询课时正式表信息
*
* @param videoNo
* @return
* @author wuyun
*/
public CourseChapterPeriodVO getByVideoNo(Long videoNo) {
CourseChapterPeriod record = dao.getByVideoNo(videoNo);
return BeanUtil.copyProperties(record, CourseChapterPeriodVO.class);
}
}
| [
"2221734739@qq.com"
] | 2221734739@qq.com |
e449415bf17fe325637ddbb2af9745f4dc46d13a | 3d9592eaa5a8cc1da686caa98b4cbdbaf9cb5d52 | /code/java-basic/src/kr/ac/kopo/day09/homework/StringUtilMain.java | eed000edf142a0b941b667f698212458736e30fb | [] | no_license | hennylee/kopo-02-java | a2b980c77a25527162c5d18af0cf44f074a3b591 | 0adf492c5d98af74382372236d424cbfbec60eb2 | refs/heads/main | 2023-06-21T05:45:40.107515 | 2021-07-28T06:31:15 | 2021-07-28T06:31:15 | 345,571,951 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 355 | java | package kr.ac.kopo.day09.homework;
import java.util.Arrays;
public class StringUtilMain {
public static void main(String[] args) {
String oriStr = "abcdANDaJdil";
char delChar = 'a';
String change = "";
for(int i = 0; i < oriStr.length(); i++) {
if(oriStr.charAt(i) != delChar) {
change += oriStr.charAt(i);
}
}
}
}
| [
"haenyilee@kakao.com"
] | haenyilee@kakao.com |
440d025b2f829baff0835c3cd876740455d62be9 | 9e89bbb5fe80d42dcd54fcaa9788725d3ad83b6c | /src/tgs/tg3/TestServices.java | 2fe77f1686988bc431a5c587ff756d019094999d | [] | no_license | UnitecSPS/Programacion2_1_2_2014 | b69a3261b9383ed3b4d12796b7d052ae8fdf9d77 | f0c6851c4c77e3089e0a04714cd71c4def13668a | refs/heads/master | 2020-05-27T04:36:01.751999 | 2014-06-12T14:04:50 | 2014-06-12T14:04:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 800 | 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 tgs.tg3;
/**
*
* @author Docente 17082011
*/
public class TestServices {
public static void main(String[] args) {
Sky sky = new Sky();
sky.agregarServicio(1,"Carlos", "TV");
sky.agregarServicio(1,"Carlos", "INTERNET");//ya existe, no se agrega
sky.agregarServicio(2,"Carlos", "INTERNET");
sky.agregarCanalATvService(1, "HBO");
sky.agregarCanalATvService(2, "HBO"); //no haria nada
sky.imprimirServicios();
sky.cobrarPlan(1);
sky.cobrarPlan(2);
sky.cobrarPlan(3);//no existe
}
}
| [
"cgotcha@gmail.com"
] | cgotcha@gmail.com |
514ac6e09198c84350646866b347356d0844f083 | 01ec23b3aaca01d610623a62ca55ec572d15e4da | /spring-annotation/src/main/java/com/qjx/config/MainConfigOfLifeCycle.java | c82e1bec9c48d9a681e2575dc8c192787ac8be97 | [
"Apache-2.0"
] | permissive | qincasin/spring-demo | b2b7bbe31a7eca7c89d7b06c8a18087f73d45f27 | 7e001b346c48a0390aebad9de183902bc841555b | refs/heads/master | 2022-11-30T20:07:12.901471 | 2022-09-06T15:58:23 | 2022-09-06T15:58:23 | 250,000,993 | 2 | 0 | Apache-2.0 | 2023-09-05T21:58:38 | 2020-03-25T14:28:48 | Java | UTF-8 | Java | false | false | 2,916 | java | package com.qjx.config;
/**
* Created by qincasin on 2020/3/28.
*/
import com.qjx.bean.Car;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
/**
* <pre>
* bean的生命周期
* bean创建 --- 初始化---销毁的过程
* 容器管理 bean的声明周期
* 我们可以自定义初始化和销毁的方法
* 容器在bean进行到当前生命周期的时候来调用我们自定义的初始化和销毁方法
* 构造(对象创建)
* 单实例:在容器启动的时候创建对象
* 多实例:在每次获取的时候创建对象
* BeanPostProcessor.postProcessBeforeInitialization 执行
* 初始化
* 对象创建完成,并赋值好,调用初始化方法
* 多实例只有在获取的时候才会初始化
* BeanPostProcessor.postProcessAfterInitialization 执行
* 销毁
* 单实例 容器关闭的时候
* 多实例 容器不会管理这个bean,容器不会调用销毁方法
*
* BeanPostProcessor原理:
* 遍历得到容器中的 BeanPostProcessor 挨个执行postProcessBeforeInitialization ,
* 一旦返回null 跳出for循环,不会执行后面BeanPostProcessor.postProcessBeforeInitialization方法
*
* populateBean(beanName, mbd, instanceWrapper); 给bean进行属性赋值
* initializeBean->{
* wrappedBean = applyBeanPostProcessorsBeforeInitialization(wrappedBean, beanName);
* invokeAwareMethods(beanName, bean); 执行自定义初始化
* wrappedBean = applyBeanPostProcessorsAfterInitialization(wrappedBean, beanName);
* }
*
*
*
* //bean初始化方法
* 1. 指定初始化和销毁方法
* 执行init-method和destroy-method
* 2. 通过实现 InitializingBean 来进行实现方法的初始化,
* 通过实现 DisposableBean来实现方法的销毁
* 3.可以调用JSR250:
* @PostConstruct 在bean创建完成并且属性赋值完成,来执行初始化方法
* @PreDestroy 在容器销毁bean之前通知我们进行清理工作
* 4.BeanPostProcessor[interface] bean的后置处理器
* 在bean初始化前后进行一些处理工作
* postProcessBeforeInitialization:在初始化之前工作
* postProcessAfterInitialization:在初始化之后工作
*
* spring 大量使用 @BeanPostProcessor
* ApplicationContextAwareProcessor 注入 ioc 容器
* InitDestroyAnnotationBeanPostProcessor 处理@PreDestroy 和 @PostConstruct
* AutowiredAnnotationBeanPostProcessor 处理@Autowired 可以自动装配值 在对象创建完之后对所有的标记该注解的进行注入
*
* </pre>
*/
@ComponentScan("com.qjx.bean")
@Configuration
public class MainConfigOfLifeCycle {
// @Scope("prototype")
@Bean(initMethod = "init", destroyMethod = "destroy")
public Car car() {
return new Car();
}
}
| [
"qincasin@163.com"
] | qincasin@163.com |
1e2bda071518297642059f5c40ec739f119423fd | 87c0070912ab90fcc9705e77c112505d5faaeec9 | /dimdwarf-core/src/main/java/net/orfjackal/dimdwarf/server/Main.java | fcc10731460c79b7f5bc4c22189bb45496ff5207 | [
"Apache-2.0"
] | permissive | thaingo/dimdwarf | 74be43193959bda1d1100a3fd0e13264816489b9 | e5a42cf09d86db49508be4b0dab35324e10c0dbe | refs/heads/master | 2020-04-05T23:39:34.778293 | 2011-10-07T15:55:51 | 2011-10-07T16:02:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,957 | java | // Copyright © 2008-2010 Esko Luontola <www.orfjackal.net>
// This software is released under the Apache License 2.0.
// The license text is at http://dimdwarf.sourceforge.net/LICENSE
package net.orfjackal.dimdwarf.server;
import com.google.inject.*;
import net.orfjackal.dimdwarf.actors.ActorStarter;
import net.orfjackal.dimdwarf.modules.*;
import net.orfjackal.dimdwarf.util.MavenUtil;
import org.kohsuke.args4j.*;
import org.slf4j.*;
import java.io.*;
import java.util.*;
public class Main {
private static final Logger logger = LoggerFactory.getLogger(Main.class);
// TODO: speed up startup by loading classes in parallel
// Loading the classes is what takes most of the time in startup - on JDK 7 it can be speeded up
// by loading the classes in parallel. Preliminary tests promise 50% speedup (and 15% slowdown on JDK 6).
// Doing the following operations in different threads might be able to parallelize the class loading:
// - create a Guice injector for an empty module (loads Guice's classes)
// - open a MINA socket acceptor in a random port and close it (loads MINA's classes)
// - instantiate and run Dimdwarf's modules outside Guice (loads some of Dimdwarf's classes)
// - create the actual injector with Dimdwarf's modules and return it via a Future (what we really wanted)
public static void main(String[] args) throws InterruptedException, IOException {
Thread.setDefaultUncaughtExceptionHandler(new KillProcessOnUncaughtException());
ServerOptions options = parseArguments(args);
logger.info("Dimdwarf {} starting up", getVersion());
try {
Module appModule = loadApplication(options.applicationDir.getCanonicalFile());
List<Module> modules = configureServerModules(options.port, appModule);
logger.info("Modules configured");
Injector injector = Guice.createInjector(Stage.PRODUCTION, modules);
logger.info("Modules loaded");
injector.getInstance(ActorStarter.class).start();
logger.info("Server started");
} catch (ConfigurationException e) {
logger.error(e.getMessage(), e);
System.exit(1);
}
}
private static ServerOptions parseArguments(String[] args) {
ServerOptions options = new ServerOptions();
CmdLineParser parser = new CmdLineParser(options);
try {
parser.parseArgument(args);
} catch (CmdLineException e) {
// TODO: do not hard code the launcher file name?
System.err.println(e.getMessage());
System.err.println("java -jar launcher.jar" + parser.printExample(ExampleMode.REQUIRED));
parser.printUsage(System.err);
System.exit(1);
}
return options;
}
private static String getVersion() {
String version = MavenUtil.getPom("net.orfjackal.dimdwarf", "dimdwarf-core").getProperty("version");
return version != null ? version : "<unknown version>";
}
private static Module loadApplication(File applicationDir) throws ConfigurationException {
logger.info("Opening application directory {}", applicationDir);
ApplicationLoader loader = new ApplicationLoader(applicationDir, Main.class.getClassLoader());
logger.info("Found application {}", loader.getApplicationName());
logger.info("Loading application module {}", loader.getApplicationModule());
return loader.newModuleInstance();
}
public static List<Module> configureServerModules(int port, Module appModule) {
List<Module> modules = new ArrayList<Module>();
modules.add(new ActorInstallerModule(
new ControllerModule(),
new AuthenticatorModule(),
new NetworkModule(port)
));
modules.add(new TimestampModule());
modules.add(appModule);
return modules;
}
}
| [
"esko.luontola@gmail.com"
] | esko.luontola@gmail.com |
4b5c6f306b1d07c9843f063c869b3ac5ab757bdf | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/12/12_19cd5d550dc5acc277bf6c50f2361728e6529840/EMA/12_19cd5d550dc5acc277bf6c50f2361728e6529840_EMA_t.java | a969322c3e3242833d599c4c52ea1a66a9e0f352 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 4,340 | java | package com.runetooncraft.plugins.EasyMobArmory;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Item;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import com.runetooncraft.plugins.EasyMobArmory.SpawnerHandler.SpawnerConfig;
import com.runetooncraft.plugins.EasyMobArmory.SpawnerHandler.SpawnerHandler;
import com.runetooncraft.plugins.EasyMobArmory.core.Config;
import com.runetooncraft.plugins.EasyMobArmory.core.Messenger;
import com.runetooncraft.plugins.EasyMobArmory.egghandler.EggHandler;
import com.runetooncraft.plugins.EasyMobArmory.egghandler.Eggs;
public class EMA extends JavaPlugin {
public static Config config = null;
public static Eggs eggs = null;
public static SpawnerConfig Spawners = null;
public static List<ItemStack> Helmets = new ArrayList<ItemStack>();
public static List<ItemStack> Chestplates = new ArrayList<ItemStack>();
public static List<ItemStack> Leggings = new ArrayList<ItemStack>();
public static List<ItemStack> Boots = new ArrayList<ItemStack>();
public void onEnable() {
getBKCommonLib();
loadconfig();
loadEggs();
loadSpawners();
getServer().getPluginManager().registerEvents(new EMAListener(config), this);
getCommand("easymobarmory").setExecutor(new Commandlistener());
getCommand("ema").setExecutor(new Commandlistener());
Messenger m = new Messenger(config);
SetItemStacks();
LoadSpawnerTimers();
}
private void LoadSpawnerTimers() {
List<String> RunningList = Spawners.getList("Spawners.Running.List");
if(!RunningList.isEmpty()) {
int Size = RunningList.size();
for(int i = 0; i<=Size;) {
SpawnerHandler.StartAlreadyExistingSpawnerTimer(RunningList.get(i));
}
Messenger.info("A total of " + Size + " spawner timers were loaded.");
}
}
private void getBKCommonLib() {
if(getServer().getPluginManager().getPlugin("BKCommonLib") != null) {
Messenger.info("Found BKCommonLib");
}else{
Messenger.info("Please install BKCommonLib.");
Messenger.info("This is a new dependency for EMA");
Messenger.info("http://dev.bukkit.org/bukkit-plugins/bkcommonlib");
Bukkit.getPluginManager().disablePlugin(this);
}
}
private void SetItemStacks() {
List<Integer> helmetints = config.getConfig().getIntegerList("List.Helmets");
List<Integer> chestplateints = config.getConfig().getIntegerList("List.Chestplates");
List<Integer> leggingints = config.getConfig().getIntegerList("List.Leggings");
List<Integer> Bootints = config.getConfig().getIntegerList("List.Boots");
for(int i : helmetints) {
Helmets.add(new ItemStack(Material.getMaterial(i)));
}
for(int i : chestplateints) {
Chestplates.add(new ItemStack(Material.getMaterial(i)));
}
for(int i : leggingints) {
Leggings.add(new ItemStack(Material.getMaterial(i)));
}
for(int i : Bootints) {
Boots.add(new ItemStack(Material.getMaterial(i)));
}
}
private void loadconfig() {
File dir = this.getDataFolder();
if (!dir.exists()) dir.mkdir();
File file = new File(this.getDataFolder(), "config.yml");
config = new Config(file);
if (!config.load()) {
this.getServer().getPluginManager().disablePlugin(this);
throw new IllegalStateException("The config-file was not loaded correctly!");
}
}
private void loadEggs() {
File dir = this.getDataFolder();
if (!dir.exists()) dir.mkdir();
File file = new File(this.getDataFolder(), "eggs.yml");
eggs = new Eggs(file);
if (!eggs.load()) {
this.getServer().getPluginManager().disablePlugin(this);
throw new IllegalStateException("The Eggs data file was not loaded correctly!");
}
}
private void loadSpawners() {
File dir = this.getDataFolder();
if (!dir.exists()) dir.mkdir();
File file = new File(this.getDataFolder(), "spawners.yml");
Spawners = new SpawnerConfig(file);
if (!Spawners.load()) {
this.getServer().getPluginManager().disablePlugin(this);
throw new IllegalStateException("The Spawners data file was not loaded correctly!");
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
63f3c230dd4d49050a90841dc0aa85942b69ae06 | e8fbab6b9fa8b3ade4261b321e6f52716aa05077 | /springboot-spider-fusionchart/src/main/java/com/example/demo/util/SpiderUtil.java | 15309c099469d0fbb129fee834c67d51f9e1d872 | [] | no_license | lmm222/spring-boot-all | d7b73974ad657bf2b60cec772845b18ae0b5204c | b6c214ef03f30472d04ef50d6d531cddaff955ad | refs/heads/master | 2021-08-08T00:45:56.845657 | 2017-11-09T07:31:05 | 2017-11-09T07:31:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,063 | java | package com.example.demo.util;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Created by jiaozhiguang on 2017/10/31.
* 爬虫 根据业务需求 抓取特定的
*/
public class SpiderUtil {
public static void main(String[] args) throws IOException {
String uri = "http://search.51job.com/list/010000,000000,0000,00,9,${page},${keyword},2,1.html?lang=c&stype=1&postchannel=0000&workyear=99&cotype=99°reefrom=99&jobterm=99&companysize=99&lonlat=0%2C0&radius=-1&ord_field=0&confirmdate=9&fromType=21&dibiaoid=0&address=&line=&specialarea=00&from=&welfare=";
uri = uri.replace("${keyword}", "java"); System.out.println(uri);
Map<String, Integer> results1 = getRange(uri);System.out.println(results1);
uri = uri.replace("${keyword}", "php");System.out.println(uri);
Map<String, Integer> results2 = getRange(uri); System.out.println(results2);
// uri = uri.replace("${keyword}", "python");
// Map<String, Integer> results3 = getRange(uri);System.out.println(results3);
// uri = uri.replace("${keyword}", "ruby");
// Map<String, Integer> results4 = getRange(uri);System.out.println(results4 );
}
public static String getHtml(String uri, String encoding) throws IOException {
URL url = new URL(uri);
URLConnection conn = url.openConnection();
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "GBK"));
StringBuilder html = new StringBuilder();
String tmp = "";
while ( (tmp = reader.readLine()) != null) {
html.append(tmp);
}
reader.close();
return html.toString();
}
public static Map<String, Integer> getRange(String url) throws IOException {
Map<String, Integer> results = new LinkedHashMap<>();
for (int i = 1; i <= 12; i++) {
String tempUrl = "";
if (i > 9) {
//10 11
tempUrl = url.replace("${page}", i+"");
} else {
tempUrl = url.replace("${page}", "0" + i);
}
String html = getHtml(tempUrl, "gbk");
Document document = Jsoup.parse(html.toString());
Elements elements = document.getElementsByClass("rt");
String str = elements.get(0).text();
Pattern pattern = Pattern.compile("[^0-9]");
Matcher mathcer = pattern.matcher(str);
String num = mathcer.replaceAll("").trim();
String type = document.getElementsByClass("dw_c_orange").get(0).text();
// System.out.println(type +" " + num +"条岗位");
results.put(type, Integer.valueOf(num));
}
return results;
}
}
| [
"jiaozhiguang@126.com"
] | jiaozhiguang@126.com |
266991f4e395c13e3cf97616dc0f1e841dc37221 | 13f6652c77abd41d4bc944887e4b94d8dff40dde | /archstudio/src/archstudio/comp/booleannotation/SimpleNode.java | e03dfcb1b5e311ae300822f990d6bc3f74202049 | [] | no_license | isr-uci-edu/ArchStudio3 | 5bed3be243981d944577787f3a47c7a94c8adbd3 | b8aeb7286ea00d4b6c6a229c83b0ee0d1c9b2960 | refs/heads/master | 2021-01-10T21:01:43.330204 | 2014-05-31T16:15:53 | 2014-05-31T16:15:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,183 | java | package archstudio.comp.booleannotation;
/* Generated By:JJTree: Do not edit this line. SimpleNode.java */
import edu.uci.ics.xarchutils.*;
public abstract class SimpleNode implements Node, IBooleanGuard
{
public SimpleNode( int i )
{
id = i;
}
public SimpleNode( Boolean p, int i )
{
this( i );
parser = p;
}
public void jjtOpen()
{ }
public void jjtClose()
{ }
public void jjtSetParent( Node n )
{
parent = n;
}
public Node jjtGetParent()
{
return parent;
}
public void jjtAddChild( Node n, int i )
{
if ( children == null )
{
children = new Node[ i + 1 ];
}
else if ( i >= children.length )
{
Node c[] = new Node[ i + 1 ];
System.arraycopy( children, 0, c, 0, children.length );
children = c;
}
children[ i ] = n;
}
public Node jjtGetChild( int i )
{
return children[ i ];
}
public int jjtGetNumChildren()
{
return ( children == null ) ? 0 : children.length;
}
/* You can override these two methods in subclasses of SimpleNode to
customize the way the node appears when the tree is dumped. If
your output uses more than one line you should override
toString(String), otherwise overriding toString() is probably all
you need to do. */
/*
public String toString()
{
return BooleanTreeConstants.jjtNodeName[id];
}
*/
/* Override this method if you want to customize how the node dumps
out its children. */
public void dump( String prefix )
{
//System.out.println(toString(prefix));
if ( children != null )
{
for ( int i = 0; i < children.length; ++i )
{
SimpleNode n = ( SimpleNode ) children[ i ];
if ( n != null )
{
n.dump( prefix + " " );
}
}
}
}
protected Node parent;
protected Node[] children;
protected int id;
protected Boolean parser;
}
| [
"sahendrickson@gmail.com"
] | sahendrickson@gmail.com |
ab8dae313fb82d14d36e416c3d073a595d6cdec7 | e2942cf3d75c3df0f2c8cca08ef0fcce9e22d518 | /src/main/java/svenhjol/charm/base/enums/ICharmEnum.java | db278779358add3273499cc605110d8e925f98ba | [
"MIT"
] | permissive | noobanidus/CharmForge | 2ceabf217bdd5b8499af984c288dccb4ad3dd4e1 | 6a91090e650d06560d57828c1df0f928e621042f | refs/heads/master | 2023-07-18T11:47:56.379978 | 2021-07-31T14:38:05 | 2021-07-31T14:38:05 | 400,651,804 | 0 | 0 | MIT | 2021-08-28T22:44:37 | 2021-08-27T22:47:22 | null | UTF-8 | Java | false | false | 494 | java | package svenhjol.charm.base.enums;
import net.minecraft.util.IStringSerializable;
import java.util.Locale;
@SuppressWarnings({"NullableProblems", "rawtypes"})
public interface ICharmEnum extends IStringSerializable {
@Override
default String getString() {
return ((Enum)this).name().toLowerCase(Locale.ENGLISH);
}
default String getCapitalizedName() {
String name = getString();
return name.substring(0, 1).toUpperCase() + name.substring(1);
}
}
| [
"sven.hjol@protonmail.com"
] | sven.hjol@protonmail.com |
00e7c599b01086cac60eef7ab076f87eba42d1d7 | c78e0cc12cf115ec92f27f6c4577b25425943cad | /Chapter_17/jms/src/main/java/spittr/JMSMain.java | eecd788b4c67654ed5a85510b9c7b9cc6fff397e | [
"Apache-2.0"
] | permissive | sunjiecheng/SpringiA4_SourceCode | c691e298b40b9cca42c11e97687a42707f0e2007 | afc72fedaabfc909678ca87f625c459f6c359a0d | refs/heads/master | 2022-12-25T00:06:08.073345 | 2019-12-16T09:31:17 | 2019-12-16T09:31:17 | 208,525,554 | 0 | 0 | Apache-2.0 | 2022-12-16T04:23:59 | 2019-09-15T01:24:46 | Java | UTF-8 | Java | false | false | 500 | java | package spittr;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jms.core.JmsOperations;
public class JMSMain {
public static void main(String[] args) {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("META-INF/spring/messaging.xml");
JmsOperations jms = context.getBean(JmsOperations.class);
for(int i=0; i< 10; i++) {
jms.convertAndSend("hello.queue", "Hello");
}
context.close();
}
}
| [
"tojiecheng@163.com"
] | tojiecheng@163.com |
25825d6efba8685e292ac9681bca70bf85c60f1e | 139960e2d7d55e71c15e6a63acb6609e142a2ace | /mobile_app1/module1200/src/main/java/module1200packageJava0/Foo2.java | 353939db606f937a89989bf4b88570fba3643d36 | [
"Apache-2.0"
] | permissive | uber-common/android-build-eval | 448bfe141b6911ad8a99268378c75217d431766f | 7723bfd0b9b1056892cef1fef02314b435b086f2 | refs/heads/master | 2023-02-18T22:25:15.121902 | 2023-02-06T19:35:34 | 2023-02-06T19:35:34 | 294,831,672 | 83 | 7 | Apache-2.0 | 2021-09-24T08:55:30 | 2020-09-11T23:27:37 | Java | UTF-8 | Java | false | false | 292 | java | package module1200packageJava0;
import java.lang.Integer;
public class Foo2 {
Integer int0;
public void foo0() {
new module1200packageJava0.Foo1().foo3();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
}
| [
"oliviern@uber.com"
] | oliviern@uber.com |
3cfe4b54acd7818d4586e971ed5ca1521d963b8f | e0f0948915a93484e062b4e87848cb23f03f0406 | /hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/ITerminologySvc.java | 5903ddbb732353652c8444ea353051881536e7cd | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | songchao168/hapi-fhir | f7808b99dd4169532bbf48e59c298e3c0027fa29 | 6ddf91d9e237b244f0b2b15dd6e76ab86fbf1c09 | refs/heads/master | 2021-01-20T03:57:03.455236 | 2016-03-12T20:10:02 | 2016-03-12T20:10:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 398 | java | package ca.uhn.fhir.jpa.term;
import java.util.Set;
import ca.uhn.fhir.jpa.entity.TermCodeSystemVersion;
import ca.uhn.fhir.jpa.entity.TermConcept;
public interface ITerminologySvc {
void storeNewCodeSystemVersion(String theSystemUri, TermCodeSystemVersion theCodeSytem);
Set<TermConcept> findCodesBelow(Long theCodeSystemResourcePid, Long theCodeSystemResourceVersion, String theCode);
}
| [
"jamesagnew@gmail.com"
] | jamesagnew@gmail.com |
f1fcd959706104c98db60f985f43adbff6a8273c | cec1602d23034a8f6372c019e5770773f893a5f0 | /sources/com/iwown/sport_module/pojo/data/TodayEcgItem.java | b5df6aba4eb3a5b0c33e15ee337cf38c7a436097 | [] | no_license | sengeiou/zeroner_app | 77fc7daa04c652a5cacaa0cb161edd338bfe2b52 | e95ae1d7cfbab5ca1606ec9913416dadf7d29250 | refs/heads/master | 2022-03-31T06:55:26.896963 | 2020-01-24T09:20:37 | 2020-01-24T09:20:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 476 | java | package com.iwown.sport_module.pojo.data;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.iwown.data_link.ecg.EcgData;
public class TodayEcgItem implements MultiItemEntity {
private EcgData ecgData;
public void setEcgData(EcgData ecgData2) {
this.ecgData = ecgData2;
}
public EcgData getEcgData() {
return this.ecgData;
}
public int getItemType() {
return BaseTraningItem.UI_TYPE_TODAY_ECG;
}
}
| [
"johan@sellstrom.me"
] | johan@sellstrom.me |
390d11dccf345c2f80a210052f48fc6b9435d56b | 332113dabc48b15e48fc915e2d9e446b115dddac | /base/sort/java/BubbleSort.java | 8c3aa887e6119285f5368014a92f25cc10c614c3 | [] | no_license | wolfworld6/AlgorithmNote | 447ee12c58d2fb832d0b1054848fe93a4fee00b4 | 3995b4bce23c7c31b4dbcc6fe5ba488085b13fbf | refs/heads/master | 2022-02-25T23:13:33.691782 | 2019-11-08T10:36:19 | 2019-11-08T10:36:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 702 | java | package sort.java;
//冒泡排序
public class BubbleSort {
public static void bubbleSort(int[] array) {
boolean didSwap = false;
for (int i = 0; i < array.length - 1; i++) {
//每轮比较完,最大的数沉到底部
for (int j = 0; j < array.length - i - 1; j++) {
if (array[j] > array[j + 1]) {
swap(array, j, j + 1);
didSwap = true;
}
}
if(!didSwap) {
return;
}
}
}
private static void swap(int[] array, int i, int j) {
int tmp = array[i];
array[i] = array[j];
array[j] = tmp;
}
}
| [
"1398738509@qq.com"
] | 1398738509@qq.com |
5dc5868d8752ba8900d3d7960fdc1192475bc708 | 7d2b200db2c005f39edbe6e85facf2d2f308b550 | /app/src/main/java/com/xuechuan/xcedu/vo/HomePageVo.java | 5cd1283f7f1098b38ac84c87952fbe815aa73f99 | [] | no_license | yufeilong92/tushday | 872f54cd05d3cf8441d6f47d2a35ffda96f19edf | 7d463709de92e6c719557f4c5cba13676ed4b988 | refs/heads/master | 2020-04-13T08:38:43.435530 | 2018-12-25T14:02:12 | 2018-12-25T14:02:12 | 163,087,412 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,071 | java | package com.xuechuan.xcedu.vo;
import com.google.gson.annotations.SerializedName;
import com.xuechuan.xcedu.base.BaseVo;
import java.util.List;
/**
* @version V 1.0 xxxxxxxx
* @Title: xcedu
* @Package com.xuechuan.xcedu.vo
* @Description: 主界面Vo
* @author: L-BackPacker
* @date: 2018/4/18 16:41
* @verdescript 版本号 修改时间 修改人 修改的概要说明
* @Copyright: 2018
*/
public class HomePageVo extends BaseVo {
private DataBean data;
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public static class DataBean {
private List<AdvisoryBean> advisory;
private List<ArticleBean> article;
private List<BannerBean> banner;
@SerializedName("class")
private List<ClassBean> classX;
private List<PolyvliveBean> polyvlive;
private List<BookBean> book;
public List<PolyvliveBean> getPolyvlive() {
return polyvlive;
}
public void setPolyvlive(List<PolyvliveBean> polyvlive) {
this.polyvlive = polyvlive;
}
public List<BookBean> getBook() {
return book;
}
public void setBook(List<BookBean> book) {
this.book = book;
}
public List<ClassBean> getClassX() {
return classX;
}
public void setClassX(List<ClassBean> classX) {
this.classX = classX;
}
public List<AdvisoryBean> getAdvisory() {
return advisory;
}
public void setAdvisory(List<AdvisoryBean> advisory) {
this.advisory = advisory;
}
public List<ArticleBean> getArticle() {
return article;
}
public void setArticle(List<ArticleBean> article) {
this.article = article;
}
public List<BannerBean> getBanner() {
return banner;
}
public void setBanner(List<BannerBean> banner) {
this.banner = banner;
}
}
}
| [
"931697478@qq.com"
] | 931697478@qq.com |
beb575bb835fd05d32af378f2ced05de74c1e23b | a6e01b5b5edbc7e292c06bea4d2afdee7501940d | /src/test/java/org/apache/camel/demo/MyCamelRouteReplaceFromWithTest.java | 5ec4eac86b6bb3123a07a7a99d1287aa71fba880 | [
"Apache-2.0"
] | permissive | qqzhang0303/camel-test-framework-demo | d82ff0e79af3f4c9cfa03e0454d40e09abfd5c2b | 1b24863611980dfe6fae9dd79fdce2a4972941da | refs/heads/master | 2022-02-14T15:37:45.529734 | 2019-08-06T06:32:07 | 2019-08-06T06:32:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,981 | java | package org.apache.camel.demo;
import org.apache.camel.Exchange;
import org.apache.camel.Predicate;
import org.apache.camel.builder.AdviceWithRouteBuilder;
import org.junit.Test;
public class MyCamelRouteReplaceFromWithTest extends MyCamelRouteAdviceWithTest {
private static final String TEST_FIRST_MESSAGE = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<person user=\"hiram\">\n" +
" <firstName>Hiram</firstName>\n" +
" <lastName>Chirino</lastName>\n" +
" <city>Tampa</city>\n" +
"</person>";
private static final String TEST_SECOND_MESSAGE = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<person user=\"willem\">\n" +
" <firstName>Willem</firstName>\n" +
" <lastName>Jiang</lastName>\n" +
" <city>Beijing</city>\n" +
"</person>";
protected void doPostSetup() throws Exception {
super.doPostSetup();
// If we don't want to feed the route with some other message you can redefine the route with AdviceWith
context.getRouteDefinitions().get(0).adviceWith(context, new AdviceWithRouteBuilder() {
@Override
public void configure() throws Exception {
// Here we replace the from endpoint to do more work
replaceFromWith("direct:start");
}
});
}
@Test
public void testCRBMessage() throws Exception {
uk.expectedMessageCount(0);
others.expectedMessageCount(2);
others.expectedMessagesMatches((Exchange exchange)->{
String message = exchange.getIn().getBody(String.class);
return !message.contains("London");
});
// sending the message to the direct:start
template.sendBody("direct:start", TEST_FIRST_MESSAGE);
template.sendBody("direct:start", TEST_SECOND_MESSAGE);
assertMockEndpointsSatisfied();
}
}
| [
"willem.jiang@gmail.com"
] | willem.jiang@gmail.com |
d1aa81b95cb735c5240a62f1961503e0744ece50 | d90c016fa3cb052bdd240d1a6307de7d242fa90c | /gameserver/src/main/java/org/jts/dataparser/data/holder/FreewayInfoHolder.java | 585aac13fa9c7fcdc40a969eb9eeba5210a2f727 | [] | no_license | netvirus/JTS_Src | 124bf1dc6dc488e83c6905d4f314a58ba4488e2f | 3e40ce37147b0e6be056d3a739bf32f586789bc5 | refs/heads/master | 2023-02-19T23:22:36.909600 | 2021-01-25T07:29:44 | 2021-01-25T07:29:44 | 332,664,391 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 873 | java | package org.jts.dataparser.data.holder;
import org.jts.dataparser.data.annotations.Element;
import org.jts.dataparser.data.holder.freeway.Freeway;
import org.mmocore.commons.data.AbstractHolder;
import java.util.List;
/**
* @author : Camelion
* @date : 27.08.12 13:14
*/
public class FreewayInfoHolder extends AbstractHolder {
private static FreewayInfoHolder ourInstance = new FreewayInfoHolder();
@Element(start = "freeway_begin", end = "freeway_end")
private List<Freeway> freeways;
private FreewayInfoHolder() {
}
public static FreewayInfoHolder getInstance() {
return ourInstance;
}
@Override
public int size() {
return freeways.size();
}
public List<Freeway> getFreeways() {
return freeways;
}
@Override
public void clear() {
// TODO Auto-generated method stub
}
} | [
"yariknetvirus@gmail.com"
] | yariknetvirus@gmail.com |
a325d58aabb146e002bfc2754f08b0bfaf093996 | d4896a7eb2ee39cca5734585a28ca79bd6cc78da | /sources/androidx/media2/exoplayer/external/extractor/ogg/StreamReader.java | 58b19c9ed3e60cea9ee44bceb9c5838048e39f64 | [] | no_license | zadweb/zadedu.apk | a235ad005829e6e34ac525cbb3aeca3164cf88be | 8f89db0590333929897217631b162e39cb2fe51d | refs/heads/master | 2023-08-13T03:03:37.015952 | 2021-10-12T21:22:59 | 2021-10-12T21:22:59 | 416,498,604 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,181 | java | package androidx.media2.exoplayer.external.extractor.ogg;
import androidx.media2.exoplayer.external.Format;
import androidx.media2.exoplayer.external.extractor.ExtractorInput;
import androidx.media2.exoplayer.external.extractor.ExtractorOutput;
import androidx.media2.exoplayer.external.extractor.PositionHolder;
import androidx.media2.exoplayer.external.extractor.SeekMap;
import androidx.media2.exoplayer.external.extractor.TrackOutput;
import androidx.media2.exoplayer.external.util.ParsableByteArray;
import java.io.IOException;
/* access modifiers changed from: package-private */
public abstract class StreamReader {
private long currentGranule;
private ExtractorOutput extractorOutput;
private boolean formatSet;
private long lengthOfReadPacket;
private final OggPacket oggPacket = new OggPacket();
private OggSeeker oggSeeker;
private long payloadStartPosition;
private int sampleRate;
private boolean seekMapSet;
private SetupData setupData;
private int state;
private long targetGranule;
private TrackOutput trackOutput;
/* access modifiers changed from: protected */
public abstract long preparePayload(ParsableByteArray parsableByteArray);
/* access modifiers changed from: protected */
public abstract boolean readHeaders(ParsableByteArray parsableByteArray, long j, SetupData setupData2) throws IOException, InterruptedException;
/* access modifiers changed from: package-private */
public static class SetupData {
Format format;
OggSeeker oggSeeker;
SetupData() {
}
}
/* access modifiers changed from: package-private */
public void init(ExtractorOutput extractorOutput2, TrackOutput trackOutput2) {
this.extractorOutput = extractorOutput2;
this.trackOutput = trackOutput2;
reset(true);
}
/* access modifiers changed from: protected */
public void reset(boolean z) {
if (z) {
this.setupData = new SetupData();
this.payloadStartPosition = 0;
this.state = 0;
} else {
this.state = 1;
}
this.targetGranule = -1;
this.currentGranule = 0;
}
/* access modifiers changed from: package-private */
public final void seek(long j, long j2) {
this.oggPacket.reset();
if (j == 0) {
reset(!this.seekMapSet);
} else if (this.state != 0) {
this.targetGranule = this.oggSeeker.startSeek(j2);
this.state = 2;
}
}
/* access modifiers changed from: package-private */
public final int read(ExtractorInput extractorInput, PositionHolder positionHolder) throws IOException, InterruptedException {
int i = this.state;
if (i == 0) {
return readHeaders(extractorInput);
}
if (i == 1) {
extractorInput.skipFully((int) this.payloadStartPosition);
this.state = 2;
return 0;
} else if (i == 2) {
return readPayload(extractorInput, positionHolder);
} else {
throw new IllegalStateException();
}
}
private int readHeaders(ExtractorInput extractorInput) throws IOException, InterruptedException {
boolean z = true;
while (z) {
if (!this.oggPacket.populate(extractorInput)) {
this.state = 3;
return -1;
}
this.lengthOfReadPacket = extractorInput.getPosition() - this.payloadStartPosition;
z = readHeaders(this.oggPacket.getPayload(), this.payloadStartPosition, this.setupData);
if (z) {
this.payloadStartPosition = extractorInput.getPosition();
}
}
this.sampleRate = this.setupData.format.sampleRate;
if (!this.formatSet) {
this.trackOutput.format(this.setupData.format);
this.formatSet = true;
}
if (this.setupData.oggSeeker != null) {
this.oggSeeker = this.setupData.oggSeeker;
} else if (extractorInput.getLength() == -1) {
this.oggSeeker = new UnseekableOggSeeker();
} else {
OggPageHeader pageHeader = this.oggPacket.getPageHeader();
this.oggSeeker = new DefaultOggSeeker(this.payloadStartPosition, extractorInput.getLength(), this, (long) (pageHeader.headerSize + pageHeader.bodySize), pageHeader.granulePosition, (pageHeader.type & 4) != 0);
}
this.setupData = null;
this.state = 2;
this.oggPacket.trimPayload();
return 0;
}
private int readPayload(ExtractorInput extractorInput, PositionHolder positionHolder) throws IOException, InterruptedException {
long read = this.oggSeeker.read(extractorInput);
if (read >= 0) {
positionHolder.position = read;
return 1;
}
if (read < -1) {
onSeekEnd(-(read + 2));
}
if (!this.seekMapSet) {
this.extractorOutput.seekMap(this.oggSeeker.createSeekMap());
this.seekMapSet = true;
}
if (this.lengthOfReadPacket > 0 || this.oggPacket.populate(extractorInput)) {
this.lengthOfReadPacket = 0;
ParsableByteArray payload = this.oggPacket.getPayload();
long preparePayload = preparePayload(payload);
if (preparePayload >= 0) {
long j = this.currentGranule;
if (j + preparePayload >= this.targetGranule) {
long convertGranuleToTime = convertGranuleToTime(j);
this.trackOutput.sampleData(payload, payload.limit());
this.trackOutput.sampleMetadata(convertGranuleToTime, 1, payload.limit(), 0, null);
this.targetGranule = -1;
}
}
this.currentGranule += preparePayload;
return 0;
}
this.state = 3;
return -1;
}
/* access modifiers changed from: protected */
public long convertGranuleToTime(long j) {
return (j * 1000000) / ((long) this.sampleRate);
}
/* access modifiers changed from: protected */
public long convertTimeToGranule(long j) {
return (((long) this.sampleRate) * j) / 1000000;
}
/* access modifiers changed from: protected */
public void onSeekEnd(long j) {
this.currentGranule = j;
}
/* access modifiers changed from: private */
public static final class UnseekableOggSeeker implements OggSeeker {
@Override // androidx.media2.exoplayer.external.extractor.ogg.OggSeeker
public long read(ExtractorInput extractorInput) throws IOException, InterruptedException {
return -1;
}
@Override // androidx.media2.exoplayer.external.extractor.ogg.OggSeeker
public long startSeek(long j) {
return 0;
}
private UnseekableOggSeeker() {
}
@Override // androidx.media2.exoplayer.external.extractor.ogg.OggSeeker
public SeekMap createSeekMap() {
return new SeekMap.Unseekable(-9223372036854775807L);
}
}
}
| [
"midoekid@gmail.com"
] | midoekid@gmail.com |
e7316a5ef7d90a7d1287708a9ae6ac68996f414a | 6b5d11cfbc73d5b96e9495240115cb9b75f94e03 | /app/src/main/java/com/howell/utils/DetectIfHasFrameUtils.java | 88dc7b4de706149647b0c18dcf9c91deaf248f5a | [] | no_license | appsigma/EcamCompanyAS | d4b6d6b835733f705572c0601c1400135f07518e | e490356317fa5b0d6a9290a377576c6939366932 | refs/heads/master | 2021-05-12T16:42:41.774259 | 2017-12-12T05:04:41 | 2017-12-12T05:04:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 864 | java | package com.howell.utils;
public class DetectIfHasFrameUtils {
private int currentFrameCount;
private int lastMonmentFrameCount;
public DetectIfHasFrameUtils() {
super();
this.currentFrameCount = 0;
this.lastMonmentFrameCount = 0;
}
public synchronized int getCurrentFrames(){
return currentFrameCount;
}
public synchronized void addFrames(){
currentFrameCount += 1;
// System.out.println("currentFrameCount:"+currentFrameCount);
}
public synchronized int getLastMonmentFrameCount() {
return lastMonmentFrameCount;
}
public synchronized void setLastMonmentFrameCount() {
this.lastMonmentFrameCount = currentFrameCount;
}
public boolean hasFrame(){
return lastMonmentFrameCount == currentFrameCount ? false : true;
}
public synchronized void clearCount(){
currentFrameCount = 0;
}
}
| [
"elijah@live.cn"
] | elijah@live.cn |
1064c8097f4791364df8e6f5c5e6b24747a6d836 | 85cfc652459ca2f015aa8c8dc55240721632cee0 | /bin/platform/bootstrap/gensrc/de/hybris/platform/promotions/model/CachedPromotionOrderChangeDeliveryModeActionModel.java | 67fba3027b601ed0c25ec4d6143f39a4a4c5a3f6 | [] | no_license | varshadhamal/Hybris-test | 43e5479b9909e41e6276dfde6b4f4ff1cdae9b0e | a29c6090680110ab733e2077772c9c477d497df6 | refs/heads/master | 2020-03-18T06:31:01.940494 | 2018-05-22T11:58:12 | 2018-05-22T11:58:12 | 134,400,503 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,940 | java | /*
* ----------------------------------------------------------------
* --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! ---
* --- Generated at May 4, 2018 2:52:03 AM ---
* ----------------------------------------------------------------
*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* Hybris ("Confidential Information"). You shall not disclose such
* Confidential Information and shall use it only in accordance with the
* terms of the license agreement you entered into with SAP Hybris.
*
*/
package de.hybris.platform.promotions.model;
import de.hybris.platform.core.model.ItemModel;
import de.hybris.platform.core.model.order.delivery.DeliveryModeModel;
import de.hybris.platform.promotions.model.PromotionOrderChangeDeliveryModeActionModel;
import de.hybris.platform.servicelayer.model.ItemModelContext;
/**
* Generated model class for type CachedPromotionOrderChangeDeliveryModeAction first defined at extension promotions.
*/
@SuppressWarnings("all")
public class CachedPromotionOrderChangeDeliveryModeActionModel extends PromotionOrderChangeDeliveryModeActionModel
{
/**<i>Generated model type code constant.</i>*/
public final static String _TYPECODE = "CachedPromotionOrderChangeDeliveryModeAction";
/**
* <i>Generated constructor</i> - Default constructor for generic creation.
*/
public CachedPromotionOrderChangeDeliveryModeActionModel()
{
super();
}
/**
* <i>Generated constructor</i> - Default constructor for creation with existing context
* @param ctx the model context to be injected, must not be null
*/
public CachedPromotionOrderChangeDeliveryModeActionModel(final ItemModelContext ctx)
{
super(ctx);
}
/**
* <i>Generated constructor</i> - Constructor with all mandatory attributes.
* @deprecated Since 4.1.1 Please use the default constructor without parameters
* @param _deliveryMode initial attribute declared by type <code>PromotionOrderChangeDeliveryModeAction</code> at extension <code>promotions</code>
*/
@Deprecated
public CachedPromotionOrderChangeDeliveryModeActionModel(final DeliveryModeModel _deliveryMode)
{
super();
setDeliveryMode(_deliveryMode);
}
/**
* <i>Generated constructor</i> - for all mandatory and initial attributes.
* @deprecated Since 4.1.1 Please use the default constructor without parameters
* @param _deliveryMode initial attribute declared by type <code>PromotionOrderChangeDeliveryModeAction</code> at extension <code>promotions</code>
* @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code>
*/
@Deprecated
public CachedPromotionOrderChangeDeliveryModeActionModel(final DeliveryModeModel _deliveryMode, final ItemModel _owner)
{
super();
setDeliveryMode(_deliveryMode);
setOwner(_owner);
}
}
| [
"varsha.d.saste@accenture.com"
] | varsha.d.saste@accenture.com |
95c855a4927a172484ee586c5827268372963c3b | 1ac7c0b64853f2ebd57923b569a95f4eed56f71b | /open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceableProperties.java | 92e140fb87679d1fd39204f8484e6c5d197bdedb | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | adinhtdsibm/egeria | 8f4cae22716f74608ea982270c781a2d9fe69caf | 6c174226e3245f061813ce905a8ef3985d756d45 | refs/heads/master | 2023-07-07T17:15:45.530811 | 2021-09-01T14:38:24 | 2021-09-01T14:38:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,561 | java | /* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.digitalarchitecture.properties;
import com.fasterxml.jackson.annotation.*;
import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ElementClassification;
import java.io.Serializable;
import java.util.*;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
/**
* Many open metadata entities are referenceable. It means that they have a qualified name and additional
* properties.
*/
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY,
property = "class")
@JsonSubTypes(
{
@JsonSubTypes.Type(value = ValidValueProperties.class, name = "ValidValueProperties"),
@JsonSubTypes.Type(value = ReferenceDataAssetProperties.class, name = "ReferenceDataAssetProperties"),
@JsonSubTypes.Type(value = MeaningProperties.class, name = "MeaningProperties")
})
public class ReferenceableProperties implements Serializable
{
private static final long serialVersionUID = 1L;
private String qualifiedName = null;
private Map<String, String> additionalProperties = null;
private List<ElementClassification> classifications = null;
private String typeName = null;
private Map<String, Object> extendedProperties = null;
/**
* Default constructor
*/
public ReferenceableProperties()
{
super();
}
/**
* Copy/clone constructor. Retrieves values from the supplied template
*
* @param template element to copy
*/
public ReferenceableProperties(ReferenceableProperties template)
{
if (template != null)
{
qualifiedName = template.getQualifiedName();
additionalProperties = template.getAdditionalProperties();
classifications = template.getClassifications();
typeName = template.getTypeName();
extendedProperties = template.getExtendedProperties();
}
}
/**
* Set up the fully qualified name.
*
* @param qualifiedName String name
*/
public void setQualifiedName(String qualifiedName)
{
this.qualifiedName = qualifiedName;
}
/**
* Returns the stored qualified name property for the metadata entity.
* If no qualified name is available then the empty string is returned.
*
* @return qualifiedName
*/
public String getQualifiedName()
{
return qualifiedName;
}
/**
* Set up additional properties.
*
* @param additionalProperties Additional properties object
*/
public void setAdditionalProperties(Map<String, String> additionalProperties)
{
this.additionalProperties = additionalProperties;
}
/**
* Return a copy of the additional properties. Null means no additional properties are available.
*
* @return AdditionalProperties
*/
public Map<String, String> getAdditionalProperties()
{
if (additionalProperties == null)
{
return null;
}
else if (additionalProperties.isEmpty())
{
return null;
}
else
{
return additionalProperties;
}
}
/**
* Return the list of classifications associated with the asset. This is an list and the
* pointers are set to the start of the list of classifications
*
* @return Classifications list of classifications
*/
public List<ElementClassification> getClassifications()
{
if (classifications == null)
{
return null;
}
else if (classifications.isEmpty())
{
return null;
}
else
{
return new ArrayList<>(classifications);
}
}
/**
* Set up the classifications associated with this connection.
*
* @param classifications list of classifications
*/
public void setClassifications(List<ElementClassification> classifications)
{
this.classifications = classifications;
}
/**
* Return the name of the open metadata type for this element.
*
* @return string name
*/
public String getTypeName()
{
return typeName;
}
/**
* Set up the name of the open metadata type for this element.
*
* @param typeName string name
*/
public void setTypeName(String typeName)
{
this.typeName = typeName;
}
/**
* Return the properties that have been defined for a subtype of this object that are not supported explicitly
* by this bean.
*
* @return property map
*/
public Map<String, Object> getExtendedProperties()
{
if (extendedProperties == null)
{
return null;
}
else if (extendedProperties.isEmpty())
{
return null;
}
else
{
return extendedProperties;
}
}
/**
* Set up the properties that have been defined for a subtype of this object that are not supported explicitly
* by this bean.
*
* @param extendedProperties property map
*/
public void setExtendedProperties(Map<String, Object> extendedProperties)
{
this.extendedProperties = extendedProperties;
}
/**
* Standard toString method.
*
* @return print out of variables in a JSON-style
*/
@Override
public String toString()
{
return "Referenceable{" +
"qualifiedName='" + qualifiedName + '\'' +
", additionalProperties=" + additionalProperties +
", typeName=" + typeName +
", extendedProperties=" + getExtendedProperties() +
", classifications=" + getClassifications() +
'}';
}
/**
* Compare the values of the supplied object with those stored in the current object.
*
* @param objectToCompare supplied object
* @return boolean result of comparison
*/
@Override
public boolean equals(Object objectToCompare)
{
if (this == objectToCompare)
{
return true;
}
if (objectToCompare == null || getClass() != objectToCompare.getClass())
{
return false;
}
ReferenceableProperties that = (ReferenceableProperties) objectToCompare;
return Objects.equals(qualifiedName, that.qualifiedName) &&
Objects.equals(additionalProperties, that.additionalProperties) &&
Objects.equals(classifications, that.classifications) &&
Objects.equals(typeName, that.typeName) &&
Objects.equals(extendedProperties, that.extendedProperties);
}
/**
* Return has code based on properties.
*
* @return int
*/
@Override
public int hashCode()
{
return Objects.hash(qualifiedName, additionalProperties, classifications, typeName, extendedProperties);
}
} | [
"mandy_chessell@uk.ibm.com"
] | mandy_chessell@uk.ibm.com |
879309be9a46db332ae4b639fa5a8dc95cb490fc | d39ccf65250d04d5f7826584a06ee316babb3426 | /wb-mmb/wb-foundation/src/main/java/org/dwfa/tapi/I_Extend.java | 71577095aa0597d91d524312d8b1e7bfc9994979 | [
"Apache-2.0"
] | permissive | va-collabnet-archive/workbench | ab4c45504cf751296070cfe423e39d3ef2410287 | d57d55cb30172720b9aeeb02032c7d675bda75ae | refs/heads/master | 2021-01-10T02:02:09.685099 | 2012-01-25T19:15:44 | 2012-01-25T19:15:44 | 47,691,158 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 896 | java | /**
* Copyright (c) 2009 International Health Terminology Standards Development
* Organisation
*
* 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.dwfa.tapi;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
public interface I_Extend extends I_Manifest {
public PropertyDescriptor[] getDataDescriptors() throws IntrospectionException;
}
| [
"wsmoak"
] | wsmoak |
41c8cc9af93e08977967c4224fb4aca2660a37c7 | 08648d8fe512996872c86ccc1857923371d4e27a | /code/de.quamoco.adaptation.view.history/src/de/quamoco/adaptation/view/history/sorter/AdaptationHistoryViewerSorter.java | b7c15349f9314b46932eaca9e37e0a8c25a76e6d | [] | no_license | SoftwareEngineeringToolDemos/ICSE-2011-Quamoco | 09d8a1a096df962ee930cba6d57bba733af93627 | e20756ec54ba759fcf8c24c1a78a9a0c5f6adb30 | refs/heads/master | 2021-01-17T06:54:37.025507 | 2016-06-24T21:57:23 | 2016-06-24T21:57:23 | 44,106,743 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,856 | java | /*-------------------------------------------------------------------------+
| |
| Copyright 2012 Technische Universitaet Muenchen and |
| Fraunhofer-Institut fuer Experimentelles Software Engineering (IESE) |
| |
| 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 de.quamoco.adaptation.view.history.sorter;
import java.util.Date;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.Viewer;
import de.quamoco.adaptation.model.status.AdaptationHistoryItem;
import de.quamoco.adaptation.view.history.AdaptationHistoryView;
import de.quamoco.adaptation.view.history.util.ViewConstants.TableColumns;
import de.quamoco.adaptation.view.sorter.AdaptationViewerSorter;
/**
* Implements the sorter for the {@link AdaptationHistoryView}
* @author Franz becker
*/
// TODO
public class AdaptationHistoryViewerSorter extends AdaptationViewerSorter {
/** The index of the column which is currently used for sorting.
* Default = {@link TableColumns.DEFAULT_SORT_COLUMN} */
private int propertyIndex = TableColumns.DEFAULT_SORT_COLUMN;
/** Constant for ascending sort direction. */
private static final int ASCENDING = 0;
/** Constant for descending sort direction. */
private static final int DESCENDING = 1;
/** Current sort direction, default = {@link #ASCENDING} */
private int direction = ASCENDING;
/**
* Sets the column which shall be used for sorting and
* toggles the search direction if the passed column is
* already the sort column.
* @param column the column which shall be used for sorting
*/
@Override
public void setColumn(int column) {
if (column == this.propertyIndex) {
// Same column as last sort; toggle the direction
direction = 1 - direction;
} else {
// New column; do an ascending sort
this.propertyIndex = column;
direction = ASCENDING;
}
}
/**
* Implements the comparison, calls helper methods based on
* case distinction.
*/
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
if (propertyIndex == TableColumns.NO_DEFAULT_SORTING) {
// default sorting shall not be applied => return zero
return 0;
}
if (propertyIndex == TableColumns.TIMESTAMP.INDEX) {
// completed column
return flipIfDescending(compareTimestamp((AdaptationHistoryItem) e1, (AdaptationHistoryItem) e2));
} else {
// rest => compare based on label
return flipIfDescending(compareBasedOnLabel(viewer, e1, e2));
}
}
private int compareTimestamp(AdaptationHistoryItem e1, AdaptationHistoryItem e2) {
Date d1 = e1.getTimestamp();
Date d2 = e2.getTimestamp();
return d1.compareTo(d2);
}
/**
* Compares the two objects based on their labels provided by the label provider
* that is attached to the passed viewer.
* @param viewer the viewer
* @param e1 first object
* @param e2 second object
* @return an int indicating the less or equals relation
*/
private int compareBasedOnLabel(Viewer viewer, Object e1, Object e2) {
// sort by the label provided by the label provider
ITableLabelProvider labelProvider = (ITableLabelProvider) ((StructuredViewer) viewer).getLabelProvider();
String l1 = labelProvider.getColumnText(e1, propertyIndex);
String l2 = labelProvider.getColumnText(e2, propertyIndex);
if (l1 == null) {
l1 = "";
}
if (l2 == null) {
l2 = "";
}
return l1.compareTo(l2);
}
/**
* Flips the result if {@link #direction} is {@link #DESCENDING}
* @param value the sort result
* @return the sort result flipped if sort direction is {@link #DESCENDING}
*/
private int flipIfDescending(int value) {
if (direction == DESCENDING) {
return -value;
}
return value;
}
}
| [
"stefan.wagner@informatik.uni-stuttgart.de"
] | stefan.wagner@informatik.uni-stuttgart.de |
345de6308f7fc2c7a41d1589b63e14e86f3bf37d | 78c24aae9a1d334f85287cfbbc85dc6c36c148fb | /src/main/java/class758.java | 48ded48a4e4a6b42134044edea3db0a4fc39f155 | [] | no_license | jjordantb/bliss | 4cdfb563482df71df820c2cbdbbaaf772d8de658 | 72580e09bcbd897567405eac7a93333fce28f958 | refs/heads/master | 2020-04-10T18:56:44.939402 | 2018-12-14T18:15:54 | 2018-12-14T18:15:54 | 161,218,036 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,897 | java | public class class758 {
public int field4334 = -1;
public int field4335;
public boolean field4336 = true;
public int field4337 = 512;
public int field4338;
public boolean field4339 = true;
public int field4340;
public int field4341;
int field4333 = 0;
static void method2734(Widget var0, class23 var1, int var2, int var3, int var4, int var5, class48 var6, byte var7) {
try {
if (var6 != null) {
int var8;
if (class563.field1083 == 2) {
var8 = (int) class730.field2931 & 16383;
} else {
var8 = (int) class730.field2931 + class730.field2782 & 16383;
}
int var9 = Math.max(var0.field881 / 2, var0.field887 / 2) + 10;
int var10 = var5 * var5 + var4 * var4;
if (var10 <= var9 * var9) {
int var11 = class703.field3413[var8];
int var12 = class703.field3404[var8];
if (2 != class563.field1083) {
var11 = 256 * var11 / (256 + class730.field2730);
var12 = 256 * var12 / (class730.field2730 + 256);
}
int var13 = var5 * var11 + var4 * var12 >> 14;
int var14 = var12 * var5 - var4 * var11 >> 14;
var6.method3137(var13 + var0.field881 / 2 + var2 - var6.method5594() / 2, var0.field887 / 2 + var3 - var14 - var6.method3109() / 2, var1, var2, var3);
}
}
} catch (RuntimeException var15) {
throw class158.method3445(var15, "sh.t(" + ')');
}
}
static final void method2735(int var0, int var1) {
try {
if (class215.method3835(var0, (int[]) null, -1926955800)) {
class469.method4020(class382.widgetContainers[var0].widgetsCopy, -1, (byte) 1);
}
} catch (RuntimeException var3) {
throw class158.method3445(var3, "sh.lf(" + ')');
}
}
static final void method2736(class744 var0, int var1) {
try {
var0.field3161[++var0.field3156 - 1] = class811.field4653;
} catch (RuntimeException var3) {
throw class158.method3445(var3, "sh.ami(" + ')');
}
}
static final void method2737(class744 var0, short var1) {
try {
String var2 = (String) var0.field3157[--var0.field3158];
class273.method6597(var2, 1988988347);
} catch (RuntimeException var3) {
throw class158.method3445(var3, "sh.vk(" + ')');
}
}
static final void method2738(Widget var0, WidgetContainer var1, class744 var2, int var3) {
try {
var2.field3156 -= 3;
int var4 = var2.field3161[var2.field3156] - 1;
int var5 = var2.field3161[var2.field3156 + 1];
int var6 = var2.field3161[2 + var2.field3156];
if (var4 >= 0 && var4 <= 9) {
class576.method71(var0, var4, var5, var6, var2, 890851226);
} else {
throw new RuntimeException();
}
} catch (RuntimeException var7) {
throw class158.method3445(var7, "sh.ke(" + ')');
}
}
void method2731(int var1, byte var2) {
try {
double var3 = (double) (var1 >> 16 & 255) / 256.0D;
double var5 = (double) (var1 >> 8 & 255) / 256.0D;
double var7 = (double) (var1 & 255) / 256.0D;
double var9 = var3;
if (var5 < var3) {
var9 = var5;
}
if (var7 < var9) {
var9 = var7;
}
double var11 = var3;
if (var5 > var3) {
var11 = var5;
}
if (var7 > var11) {
var11 = var7;
}
double var13 = 0.0D;
double var15 = 0.0D;
double var17 = (var9 + var11) / 2.0D;
if (var9 != var11) {
if (var17 < 0.5D) {
var15 = (var11 - var9) / (var9 + var11);
}
if (var17 >= 0.5D) {
var15 = (var11 - var9) / (2.0D - var11 - var9);
}
if (var3 == var11) {
var13 = (var5 - var7) / (var11 - var9);
} else if (var11 == var5) {
var13 = 2.0D + (var7 - var3) / (var11 - var9);
} else if (var11 == var7) {
var13 = (var3 - var5) / (var11 - var9) + 4.0D;
}
}
var13 /= 6.0D;
this.field4335 = (int) (256.0D * var15);
this.field4340 = (int) (var17 * 256.0D);
if (this.field4335 < 0) {
this.field4335 = 0;
} else if (this.field4335 > 255) {
this.field4335 = 255;
}
if (this.field4340 < 0) {
this.field4340 = 0;
} else if (this.field4340 > 255) {
this.field4340 = 255;
}
if (var17 > 0.5D) {
this.field4341 = (int) (512.0D * var15 * (1.0D - var17));
} else {
this.field4341 = (int) (512.0D * var15 * var17);
}
if (this.field4341 < 1) {
this.field4341 = 1;
}
this.field4338 = (int) ((double) this.field4341 * var13);
} catch (RuntimeException var20) {
throw class158.method3445(var20, "sh.b(" + ')');
}
}
void method2732(InputStream var1, int var2, int var3) {
try {
if (1 == var2) {
this.field4333 = var1.method6390((byte) -8);
this.method2731(this.field4333, (byte) -123);
} else if (2 == var2) {
this.field4334 = var1.method6374();
if (65535 == this.field4334) {
this.field4334 = -1;
}
} else if (var2 == 3) {
this.field4337 = var1.method6374() << 2;
} else if (4 == var2) {
this.field4339 = false;
} else if (5 == var2) {
this.field4336 = false;
}
} catch (RuntimeException var5) {
throw class158.method3445(var5, "sh.f(" + ')');
}
}
void method2733(InputStream var1, byte var2) {
try {
while (true) {
int var3 = var1.method6371();
if (var3 == 0) {
if (var2 != 7) {
;
}
return;
}
this.method2732(var1, var3, 1088681663);
}
} catch (RuntimeException var4) {
throw class158.method3445(var4, "sh.a(" + ')');
}
}
}
| [
"jordan.florchinger@uleth.ca"
] | jordan.florchinger@uleth.ca |
4ee64adc5fa6f99c055c6c6b5ac06671b65e00a9 | 07cd428c9a5f17c99573ba4ec813b8d6b3365b48 | /src/test/java/com/github/wz2cool/dynamic/mybatis/db/model/entity/table/Product.java | 2edc1d1035c1ce876b0525b42bd84014496bd749 | [
"Apache-2.0"
] | permissive | tianxianglan/mybatis-dynamic-query | 4744f986902944aec5cd23ac21b3e2f900c2cad6 | 0334582e78394c26da97af7c01d1f17536ef1567 | refs/heads/master | 2020-04-27T04:32:37.124338 | 2019-02-24T01:10:09 | 2019-02-24T01:10:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,097 | java | package com.github.wz2cool.dynamic.mybatis.db.model.entity.table;
import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
/**
* Created by Frank on 2017/7/15.
*/
@Table(name = "product")
public class Product {
@Column(name = "product_id", insertable = false, updatable = false)
private Integer productID;
private String productName;
private BigDecimal price;
private Integer categoryID;
public Integer getCategoryID() {
return categoryID;
}
public void setCategoryID(Integer categoryID) {
this.categoryID = categoryID;
}
public Integer getProductID() {
return productID;
}
public void setProductID(Integer productID) {
this.productID = productID;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
}
| [
"wz2cool@live.cn"
] | wz2cool@live.cn |
4ecec3404d6d7eb48ee06778f9f331d094f890d5 | 71007018bfae36117fd2f779dbe6e6d7bb9bde9c | /src/test/java/com/magento/test/dao/CatalogProductIndexEavDecimalTmpDaoTestIt.java | c6d5402baedf478baab44893ddd668103dbffaf9 | [] | no_license | gmai2006/magentotest | 819201760b720a90d55ef853be964651ace125ac | ca67d16d6280ddaefbf57fa1129b6ae7bd80408f | refs/heads/main | 2023-09-03T05:14:27.788984 | 2021-10-17T06:25:09 | 2021-10-17T06:25:09 | 418,040,494 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,296 | java | /**
* %% Copyright (C) 2021 DataScience 9 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
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>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. #L%
*
* <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or
* function or changes please update the templates then submit the template through our web
* interface.
*/
package com.magento.test.dao;
import java.nio.charset.Charset;
import java.util.Arrays;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Arrays;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import com.magento.test.entity.CatalogProductIndexEavDecimalTmp;
import com.magento.test.entity.CatalogProductIndexEavDecimalTmpId;
import com.magento.test.utils.FileUtils;
import com.magento.test.utils.ByteArrayToBase64TypeAdapter;
public class CatalogProductIndexEavDecimalTmpDaoTestIt {
static final String inputFile = "CatalogProductIndexEavDecimalTmp.json";
static CatalogProductIndexEavDecimalTmpDao dao;
static Gson gson =
new GsonBuilder()
.registerTypeHierarchyAdapter(byte[].class, new ByteArrayToBase64TypeAdapter())
.setDateFormat("yyyy-MM-dd HH:mm:ss.S")
.create();
private CatalogProductIndexEavDecimalTmp[] records;
/** Run when the class is loaded. */
@BeforeClass
public static void beforeClass() {
EntityManagerFactory factory = Persistence.createEntityManagerFactory("testpersistence");
JpaDao jpa = new StandaloneJpaDao(factory.createEntityManager());
dao = new DefaultCatalogProductIndexEavDecimalTmpDao(jpa);
}
/** Run before the test. */
@Before
public void before() {
try {
String json = FileUtils.readFileFromResource2String(inputFile, Charset.defaultCharset());
records = gson.fromJson(json, CatalogProductIndexEavDecimalTmp[].class);
json = null;
Arrays.stream(records).skip(1).forEach(o -> dao.create(o));
} catch (IOException ex) {
ex.printStackTrace();
}
}
@After
public void after() {
records = null;
}
@Test
public void testSelect() {
final CatalogProductIndexEavDecimalTmpId id =
new CatalogProductIndexEavDecimalTmpId(
this.records[1].getStoreId(),
this.records[1].getAttributeId(),
this.records[1].getSourceId(),
this.records[1].getEntityId(),
this.records[1].getValue());
CatalogProductIndexEavDecimalTmp testResult = dao.find(id);
assertNotNull("expect result", testResult);
}
}
| [
"gmai2006@gmail.com"
] | gmai2006@gmail.com |
9f477675eb58a931e1c66dcddc8a376ad852c6a0 | ac6ad631fb6c1747ec39145935cb1902f6ff2449 | /isBunkerArray.java | c58f03d4bc803a454be0271902c59148cd62614c | [] | no_license | posakya/MUMQuestionsSolution | 89692d46eb891e8b8027a219d48eb6c558f59006 | 0775784a8e4f35188dfee59fae587524d44b6f75 | refs/heads/master | 2021-06-13T14:31:43.664072 | 2021-05-04T13:36:25 | 2021-05-04T13:36:25 | 190,034,595 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,220 | 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 sampledatastructure;
/**
*
* @author lokesh
*/
public class isBunkerArray {
public static void main (String [] args){
int[] a ={7,6,10,1,5};
System.out.println(isBunkerPrime(a));
}
static int isBunkerPrime(int[] a){
// int isBunker = 0;
for(int i=0; i<a.length-1; i++){
if(a[i] %2 != 0){
boolean isPrime = IsPrime(a[i+1]);
if(isPrime){
return 1;
}
}
}
return 0;
}
static int isBunkerSquare(int[] a){
int isBunker = 0;
for(int i=0; i<a.length-1; i++){
if(a[i] %2 != 0){
boolean isSquare = IsSquare(a[i+1]);
if(isSquare){
isBunker = 1;
break;
}
}
}
return isBunker;
}
static int isBunker(int[] a){
int isBunker = 0;
for(int i=0; i<a.length;i++){
boolean isPrime = IsPrime(a[i]);
if(isPrime){
for(int j=0;j<a.length;j++){
if(a[j] == 1){
return 1;
}
}
}
}
return 0;
}
static boolean IsSquare(int n){
if(n<=1)
return false;
for(int i=2; i<=n; i++){
if(i*i == n){
return true;
}
}
return false;
}
static boolean IsPrime(int n)
{
// Corner case
if (n <= 1)
return false;
// Check from 2 to n-1
for (int i = 2; i < n; i++)
if (n % i == 0)
return false;
return true;
}
}
| [
"roshanposakya07@gmail.com"
] | roshanposakya07@gmail.com |
6b0fd172fbab7fc818da2ed907686c1128dcd0ce | d9dabcecc7e4a188b657d10102a81b3a2fbbe822 | /src/main/java/org/redisson/client/RedisTimeoutException.java | fe950c59a4081efde1d9a972a7376eb67fe9048d | [
"Apache-2.0"
] | permissive | wenbo2018/redisson | 25e698cb5dbb01fdd57b19ca16da63c4fec5b675 | eb56d72b9b19d24907e19c2edc7fea167d71449a | refs/heads/master | 2020-12-28T17:23:39.422742 | 2016-08-06T13:11:52 | 2016-08-06T13:11:52 | 64,439,339 | 1 | 0 | null | 2016-08-06T13:11:53 | 2016-07-29T01:13:04 | Java | UTF-8 | Java | false | false | 892 | java | /**
* Copyright 2016 Nikita Koksharov
*
* 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.redisson.client;
public class RedisTimeoutException extends RedisException {
private static final long serialVersionUID = -8418769175260962404L;
public RedisTimeoutException() {
}
public RedisTimeoutException(String message) {
super(message);
}
}
| [
"abracham.mitchell@gmail.com"
] | abracham.mitchell@gmail.com |
84baaab0b943dc8cb6b59fe083a47ce88e13784b | eab084584e34ec065cd115139c346180e651c1c2 | /src/main/java/v1/t600/T669.java | 5430c49e545e3009c83c075e073f5c774308afef | [] | no_license | zhouyuan93/leetcode | 5396bd3a01ed0f127553e1e175bb1f725d1c7919 | cc247bc990ad4d5aa802fc7a18a38dd46ed40a7b | refs/heads/master | 2023-05-11T19:11:09.322348 | 2023-05-05T09:12:53 | 2023-05-05T09:12:53 | 197,735,845 | 0 | 0 | null | 2020-04-05T09:17:34 | 2019-07-19T08:38:17 | Java | UTF-8 | Java | false | false | 691 | java | package v1.t600;
import common.tree.TreeNode;
/**
* @author yuan.zhou
*/
public class T669 {
public TreeNode trimBST(TreeNode root, int low, int high) {
if (root == null) {
return null;
}
TreeNode rLeft = trimBST(root.left, low, high);
TreeNode rRight = trimBST(root.right, low, high);
if (root.val >= low && root.val <= high) {
root.left = rLeft;
root.right = rRight;
}else{
root = null;
if (rLeft != null) {
root = rLeft;
}
if (rRight != null) {
root = rRight;
}
}
return root;
}
}
| [
"492407250@qq.com"
] | 492407250@qq.com |
5fc6a3fbcbe5e5349cc71437dd66a5f75351ad58 | acef3734b40f00c3db23455883d2610dfbb41f7e | /spring-webflux/src/main/java/org/springframework/web/reactive/socket/adapter/StandardWebSocketSession.java | 202f6e88dc03d59e6845991cc1c988c8d3874f4c | [
"Apache-2.0"
] | permissive | soaryang/spring | 50ff0e1b138307aee999c183938150e32aa87a83 | dba1b0d3498c07f9bad6a1e856120c4f009c4edc | refs/heads/master | 2023-01-07T18:42:41.622736 | 2020-10-14T17:07:40 | 2020-10-14T17:07:40 | 295,474,567 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,863 | java | /*
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.reactive.socket.adapter;
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.lang.Nullable;
import org.springframework.web.reactive.socket.CloseStatus;
import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.WebSocketMessage;
import org.springframework.web.reactive.socket.WebSocketSession;
import reactor.core.publisher.Mono;
import reactor.core.publisher.MonoProcessor;
import javax.websocket.CloseReason;
import javax.websocket.CloseReason.CloseCodes;
import javax.websocket.SendHandler;
import javax.websocket.SendResult;
import javax.websocket.Session;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
/**
* Spring {@link WebSocketSession} adapter for a standard Java (JSR 356)
* {@link javax.websocket.Session}.
*
* @author Violeta Georgieva
* @author Rossen Stoyanchev
* @since 5.0
*/
public class StandardWebSocketSession extends AbstractListenerWebSocketSession<Session> {
public StandardWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory) {
this(session, info, factory, null);
}
public StandardWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory,
@Nullable MonoProcessor<Void> completionMono) {
super(session, session.getId(), info, factory, completionMono);
}
@Override
protected boolean canSuspendReceiving() {
return false;
}
@Override
protected void suspendReceiving() {
// no-op
}
@Override
protected void resumeReceiving() {
// no-op
}
@Override
protected boolean sendMessage(WebSocketMessage message) throws IOException {
ByteBuffer buffer = message.getPayload().asByteBuffer();
if (WebSocketMessage.Type.TEXT.equals(message.getType())) {
getSendProcessor().setReadyToSend(false);
String text = new String(buffer.array(), StandardCharsets.UTF_8);
getDelegate().getAsyncRemote().sendText(text, new SendProcessorCallback());
} else if (WebSocketMessage.Type.BINARY.equals(message.getType())) {
getSendProcessor().setReadyToSend(false);
getDelegate().getAsyncRemote().sendBinary(buffer, new SendProcessorCallback());
} else if (WebSocketMessage.Type.PING.equals(message.getType())) {
getDelegate().getAsyncRemote().sendPing(buffer);
} else if (WebSocketMessage.Type.PONG.equals(message.getType())) {
getDelegate().getAsyncRemote().sendPong(buffer);
} else {
throw new IllegalArgumentException("Unexpected message type: " + message.getType());
}
return true;
}
@Override
public Mono<Void> close(CloseStatus status) {
try {
CloseReason.CloseCode code = CloseCodes.getCloseCode(status.getCode());
getDelegate().close(new CloseReason(code, status.getReason()));
} catch (IOException e) {
return Mono.error(e);
}
return Mono.empty();
}
private final class SendProcessorCallback implements SendHandler {
@Override
public void onResult(SendResult result) {
if (result.isOK()) {
getSendProcessor().setReadyToSend(true);
getSendProcessor().onWritePossible();
} else {
getSendProcessor().cancel();
getSendProcessor().onError(result.getException());
}
}
}
}
| [
"asdasd"
] | asdasd |
fce343e0717694c4d85d84d3c149f3454d3b8a95 | 93239f19469d0406f04aa5a0d1aa0e79e45aebd2 | /baseweb/src/main/java/com/hust/baseweb/config/BasicAuthenticationEndPoint.java | fd4860a646db84d0d906ab927a14b80c7e04dc87 | [] | no_license | dungkhmt/learnspringboot | f9589fe95ca99bc3e77c88ec9bb7d51055dd5d9a | a327eddd45acd850f05d287210e56bc903ec7277 | refs/heads/main | 2023-08-25T15:30:33.083628 | 2021-10-15T08:58:19 | 2021-10-15T08:58:19 | 407,817,671 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 904 | java | package com.hust.baseweb.config;
import org.springframework.http.HttpStatus;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@Component
public class BasicAuthenticationEndPoint extends BasicAuthenticationEntryPoint {
@Override
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authEx)
throws IOException {
response.sendError(HttpStatus.UNAUTHORIZED.value(), HttpStatus.UNAUTHORIZED.getReasonPhrase());
}
@Override
public void afterPropertiesSet() {
setRealmName("Realm");
super.afterPropertiesSet();
}
}
| [
"dungkhmt@gmail.com"
] | dungkhmt@gmail.com |
b2c177ea5042468d302d1025a4f76c590b2aa35c | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /src/irvine/oeis/a133/A133641.java | 359b7eb1c41a8cbade77e74e1e4b96b77e5c0754 | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 516 | java | package irvine.oeis.a133;
// Generated by gen_pattern.pl - DO NOT EDIT here!
import irvine.oeis.GeneratingFunctionSequence;
/**
* A133641 <code>a(n) = 2*L(n) + L(n-1) -</code> n, <code>L(n) = n-th</code> Lucas number of <code>A000032</code> starting <code>(1,3,4,...). =</code>.
* @author Georg Fischer
*/
public class A133641 extends GeneratingFunctionSequence {
/** Construct the sequence. */
public A133641() {
super(1, new long[] {0, -1, -2, 5, -1, -2},
new long[] {-1, 3, -2, -1, 1});
}
}
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
051c3f6fa0cd43e399c51bc40b7361b56d4f0ac7 | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes5.dex_source_from_JADX/com/facebook/graphql/model/GraphQLNotificationStoriesDeltaDeserializer.java | cc4bf91061e01ffeb7a0e27ebe21dc33055bbe21 | [] | 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,422 | java | package com.facebook.graphql.model;
import com.facebook.common.json.FbJsonDeserializer;
import com.facebook.common.json.GlobalAutoGenDeserializerCache;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.DeserializationContext;
/* compiled from: offers_space */
public class GraphQLNotificationStoriesDeltaDeserializer extends FbJsonDeserializer {
public Object m9368a(JsonParser jsonParser, DeserializationContext deserializationContext) {
GraphQLNotificationStoriesDelta graphQLNotificationStoriesDelta = new GraphQLNotificationStoriesDelta();
if (jsonParser.g() != JsonToken.START_OBJECT) {
jsonParser.f();
graphQLNotificationStoriesDelta = null;
} else {
while (jsonParser.c() != JsonToken.END_OBJECT) {
String i = jsonParser.i();
jsonParser.c();
GraphQLNotificationStoriesDelta__JsonHelper.m9370a(graphQLNotificationStoriesDelta, i, jsonParser);
jsonParser.f();
}
}
return graphQLNotificationStoriesDelta;
}
static {
GlobalAutoGenDeserializerCache.a(GraphQLNotificationStoriesDelta.class, new GraphQLNotificationStoriesDeltaDeserializer());
}
public GraphQLNotificationStoriesDeltaDeserializer() {
a(GraphQLNotificationStoriesDelta.class);
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
3c07725860bbaa10940aeffc162f3aa297fee929 | 8f87065bc3cb6d96ea2e398a98aacda4fc4bbe43 | /src/Class00000613Better.java | f2c9a5d4f88f7cd20c6b2eea7f8c40de7eb6b5b4 | [] | no_license | fracz/code-quality-benchmark | a243d345441582473532f9b013993f77d59e19ae | c23e76fe315f43bea899beabb856e61348c34e09 | refs/heads/master | 2020-04-08T23:40:36.408828 | 2019-07-31T17:54:53 | 2019-07-31T17:54:53 | 159,835,188 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 230 | java | // original filename: 00039422.txt
// before
public class Class00000613Better {
@Override
protected void startUpMaster() {
master = new MasterImpl(new EmbeddedGraphDatabase(MASTER_PATH.getAbsolutePath()));
}
}
| [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
653b6ccfebb8275c1e4d0966c4b92a11f5ecc9fe | 67cf5b3e7afaa31b1fe8fd4c64392b2a0184cc0a | /server/src/main/java/br/com/auster/tim/billcheckout/param/UsageGroupLDVO.java | aa041b5f9d7be277e490c1a7d5399a48a18effe3 | [] | no_license | m-rossini/bck_tim | 65dabf697d18074363dce2ad21f725daf7482525 | b5a3120de65c4a70f68ac2b546c0e5dab99c16ba | refs/heads/master | 2020-05-17T17:03:51.098974 | 2015-09-18T17:09:49 | 2015-09-18T17:09:49 | 42,735,673 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,807 | java | /*
* Copyright (c) 2004-2007 Auster Solutions. All Rights Reserved.
*
* 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.
*
* Created on 29/10/2007
*/
package br.com.auster.tim.billcheckout.param;
import br.com.auster.billcheckout.caches.CacheableKey;
import br.com.auster.billcheckout.caches.CacheableVO;
import br.com.auster.om.reference.CustomizableEntity;
/**
* TODO What this class is responsible for
*
* @author William Soares
* @version $Id$
* @since JDK1.4
*/
public class UsageGroupLDVO extends CustomizableEntity implements CacheableVO {
// ---------------------------
// atributes
// ---------------------------
private static final long serialVersionUID = 1L;
private String name;
private String cspId;
private CacheableKey logicKey;
private CacheableKey naturalKey;
/**
*
*/
// ---------------------------
// Constructors
// ---------------------------
public UsageGroupLDVO() {
this(0);
}
/**
* @param uid
*/
public UsageGroupLDVO(long _uid) {
setUid(_uid);
}
// ---------------------------
// Accessors
// ---------------------------
public String getName() {
return name;
}
public void setName(String _name) {
this.name = _name;
}
public String getCspId() {
return cspId;
}
public void setCspId(String cspId) {
this.cspId = cspId;
}
// ---------------------------
// CacheableVO interface methods
// ---------------------------
/**
* @see br.com.auster.billcheckout.caches.CacheableVO#getAlternateKey()
*/
public CacheableKey getAlternateKey() {
if (this.naturalKey == null) {
// creates alternate key using Usage Group name
this.naturalKey = createAlternateKey( this.getName(), this.getCspId() );
}
return this.naturalKey;
}
/**
* Inner class to handle the alternate key for UsageGroupVO instances
*/
protected static final class InnerAlternateKey implements CacheableKey {
private String groupName;
private String cspId;
public InnerAlternateKey(String groupName, String cspId) {
this.groupName = groupName;
this.cspId = cspId;
}
public boolean equals(Object _other) {
if ( _other instanceof InnerAlternateKey ) {
InnerAlternateKey other = (InnerAlternateKey) _other;
boolean result = this.groupName.equals(other.groupName);
if (result && (this.cspId == null)) {
return (other.cspId == null);
} else if (result && (this.cspId != null)) {
return this.cspId.equals(other.cspId);
}
return result;
}
else
return false;
}
public int hashCode() {
int hashcode = this.groupName.hashCode();
hashcode =+ (this.cspId != null ? this.cspId.hashCode() : 0);
return hashcode;
}
public String getGroupName() { return this.groupName; }
public String getCspId() {
return cspId;
}
}
/**
* @see br.com.auster.billcheckout.caches.CacheableVO#getKey()
*/
public CacheableKey getKey() {
if (this.logicKey == null) {
this.logicKey = createKey( this.getUid() );
}
return this.logicKey;
}
/**
* Inner class to handle the alternate key for ServicePlan instances
*/
protected static final class InnerKey implements CacheableKey {
private long uid;
public InnerKey(long _uid ) {
this.uid = _uid;
}
public boolean equals(Object _other) {
if ( _other instanceof InnerKey ) {
InnerKey other = (InnerKey) _other;
return (this.uid == other.uid);
}
else
return false;
}
public int hashCode() {
int hashcode = 37 + ((int) (17*this.uid));
return hashcode;
}
public long getUid() { return this.uid; }
}
// ---------------------------
// Helper methods
// ---------------------------
public static final CacheableKey createKey(long _uid ) {
return new InnerKey(_uid);
}
public static final CacheableKey createAlternateKey(String groupName, String cspId) {
return new InnerAlternateKey(groupName, cspId);
}
} | [
"marcos.tengelmann@gmail.com"
] | marcos.tengelmann@gmail.com |
8e83e0d862e638ce7a3df21119e2b1c169fcefb0 | 2f4b7e9f9348b058dccad69409da5a6763be7a19 | /app/src/main/java/suncere/shanxi/androidapp/ui/HomeSelectFollowCityActivity.java | a281dd62818c21777dbf07df65d516ff58c7a187 | [] | no_license | laiyongshan/SX | e73fab413007c8ef6ef91b292f799c81c7bc305e | e7de196a1051595e99d54eb7d39f03a53da2b022 | refs/heads/master | 2020-04-24T14:27:48.783602 | 2019-02-22T08:09:09 | 2019-02-22T08:09:09 | 172,021,658 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,122 | java | package suncere.shanxi.androidapp.ui;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.mcxtzhang.indexlib.IndexBar.widget.IndexBar;
import com.mcxtzhang.indexlib.suspension.SuspensionDecoration;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import suncere.shanxi.androidapp.BR;
import suncere.shanxi.androidapp.R;
import suncere.shanxi.androidapp.adapter.CityAdapter;
import suncere.shanxi.androidapp.customview.DividerItemDecoration;
import suncere.shanxi.androidapp.model.entity.CityBean;
import suncere.shanxi.androidapp.utils.Tools;
/**
* Created by HJO on 2017/9/2.
*/
public class HomeSelectFollowCityActivity extends BaseActivity implements CityAdapter.RecyclerViewOnItmeClickListener ,CityAdapter.OnItmeViewBinding{
@BindView(R.id.homeselectfollow_recyclerview)
RecyclerView mRv;
@BindView(R.id.homeselectfollow_index_indexBar)
IndexBar mIndexBar;
@BindView(R.id.homeselectfollow_index_tv)
TextView mTvSideBarHint;
private CityAdapter<CityBean> mAdapter;
private LinearLayoutManager mManager;
private List<CityBean> mDatas;
private SuspensionDecoration mDecoration;
Tools mTools;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.homeselectfollow_activity);
ButterKnife.bind(this);
initView();
}
private void initView(){
mTools=new Tools(this);
mDatas = new ArrayList<>();
mRv.setLayoutManager(mManager = new LinearLayoutManager(this));
mAdapter = new CityAdapter(this, R.layout.homeselctfollow_recycler_itme, BR.SeachBean);
mAdapter.setOnItmeClickListener(this);
mRv.setAdapter(mAdapter);
mRv.addItemDecoration(mDecoration = new SuspensionDecoration(this, mDatas));
//如果add两个,那么按照先后顺序,依次渲染。
mRv.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
//indexbar初始化
mIndexBar.setmPressedShowTextView(mTvSideBarHint)//设置HintTextView
.setNeedRealIndex(true)//设置需要真实的索引
.setmLayoutManager(mManager);//设置RecyclerView的LayoutManager
String[]Cities=mTools.getAllCities().split(",");
initDatas(Cities);
}
/**
* 组织数据源
*
* @param data
* @return
*/
private void initDatas(final String[] data) {
mDatas.clear();
String[]followies=mTools.getFollowCities().split(",");
for (int i = 0; i < data.length; i++) {
CityBean cityBean = new CityBean();
cityBean.setCity(data[i]);//设置城市名称
cityBean.setSelect(false);
for (int k=0;k<followies.length;k++){
if (data[i].equals(followies[k])){
cityBean.setSelect(true);
break;
}
}
mDatas.add(cityBean);
}
mAdapter.setData(mDatas);
mIndexBar.setmSourceDatas(mDatas)//设置数据
.invalidate();
mDecoration.setmDatas(mDatas);
}
@OnClick({R.id.homeselectfollow_back, R.id.homeselectfollow_sall})
public void on_click(View view){
switch (view.getId()){
case R.id.homeselectfollow_back:
finish();
break;
case R.id.homeselectfollow_sall:
// 保存操作
saveFollowCity();
break;
}
}
private void selectAll(){
for (int i=0;i<mDatas.size();i++){
mDatas.get(i).setSelect(true);
}
mAdapter.notifyDataSetChanged();
}
private void unselectAll(){
for (int i=0;i<mDatas.size();i++){
mDatas.get(i).setSelect(false);
}
mAdapter.notifyDataSetChanged();
}
@Override
public void OnItemClick(Object obejct, int position) {
CityBean bean= (CityBean) obejct;
bean.setSelect(!bean.isSelect());
mAdapter.notifyDataSetChanged();
}
private void saveFollowCity(){
StringBuilder stringBuilder=new StringBuilder();
for (CityBean bean : mDatas){
if (bean.isSelect())stringBuilder.append(bean.getCity()+",");
}
String cities=stringBuilder.toString();
if (cities.length()>0){
cities=cities.substring(0,cities.length()-1);// 去掉最后一个逗号
mTools.setFollowCities(cities);
finish();
}else{
Toast.makeText(this,"至少选择一个城市!", Toast.LENGTH_LONG).show();
}
}
@Override
public void OnItmeView(View view, Object obejct, int position) {
// TextView cittTV= MyViewHolder.getView(view,R.id.homeselectfollow_city);
}
}
| [
"850422483@qq.com"
] | 850422483@qq.com |
1b7dc019a6ba5dfd2dbd0fb275b14d40fc3f5726 | cdaed51b91fee9d81a385c2a480b2cbf7f290b1c | /carcv-core/src/test/java/org/carcv/impl/core/io/FFMPEGVideoHandlerTest.java | 42a516afc8f26c1e193b685bbabbe882712b9ac4 | [
"Apache-2.0",
"BSD-2-Clause"
] | permissive | pribism/carcv | 423d83dbfc0b335b49c74e5a0381dcc439b94ee1 | 4660cb307ad80b9399e5e5e8679f2dd9c1f19777 | refs/heads/master | 2020-12-26T02:09:40.595171 | 2013-11-25T16:10:30 | 2013-11-25T16:10:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,579 | java | /*
* Copyright 2013 CarCV Development Team
*
* 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.carcv.impl.core.io;
import static org.junit.Assert.fail;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
/**
* Test for {@link FFMPEGVideoHandler}.
*/
@Ignore
public class FFMPEGVideoHandlerTest {
/**
* @throws java.lang.Exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
}
/**
* @throws java.lang.Exception
*/
@AfterClass
public static void tearDownAfterClass() throws Exception {
}
/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
}
/**
* @throws java.lang.Exception
*/
@After
public void tearDown() throws Exception {
}
/**
* Test method for {@link org.carcv.impl.core.io.FFMPEGVideoHandler#splitIntoFrames(java.nio.file.Path, int)}.
*/
@Test
public void testSplitIntoFramesPathInt() {
fail("Not yet implemented");
}
/**
* Test method for
* {@link org.carcv.impl.core.io.FFMPEGVideoHandler#splitIntoFrames(java.nio.file.Path, int, java.nio.file.Path)}.
*/
@Test
public void testSplitIntoFramesPathIntPath() {
fail("Not yet implemented");
}
/**
* Test method for
* {@link org.carcv.impl.core.io.FFMPEGVideoHandler#generateVideo(java.nio.file.Path, int, java.nio.file.Path)}.
*/
@Test
public void testGenerateVideoPathIntPath() {
fail("Not yet implemented");
}
/**
* Test method for {@link org.carcv.impl.core.io.FFMPEGVideoHandler#generateVideo(java.nio.file.Path, int)}.
*/
@Test
public void testGenerateVideoPathInt() {
fail("Not yet implemented");
}
/**
* Test method for {@link org.carcv.impl.core.io.FFMPEGVideoHandler#generateVideoAsStream(java.nio.file.Path, int)}.
*/
@Test
public void testGenerateVideoAsStreamPathInt() {
fail("Not yet implemented");
}
/**
* Test method for {@link org.carcv.impl.core.io.FFMPEGVideoHandler#FFMPEGVideoHandler()}.
*/
@Test
public void testFFMPEGVideoHandler() {
fail("Not yet implemented");
}
/**
* Test method for {@link org.carcv.impl.core.io.FFMPEGVideoHandler#splitIntoFrames(java.nio.file.Path)}.
*/
@Test
public void testSplitIntoFramesPath() {
fail("Not yet implemented");
}
/**
* Test method for {@link org.carcv.impl.core.io.FFMPEGVideoHandler#generateVideoAsStream(java.nio.file.Path)}.
*/
@Test
public void testGenerateVideoAsStreamPath() {
fail("Not yet implemented");
}
/**
* Test method for
* {@link org.carcv.impl.core.io.FFMPEGVideoHandler#generateVideoAsStream(org.carcv.core.model.file.FileEntry, java.io.OutputStream)}
* .
*/
@Test
public void testGenerateVideoAsStreamFileEntryOutputStream() {
fail("Not yet implemented");
}
/**
* Test method for {@link org.carcv.impl.core.io.FFMPEGVideoHandler#copyCarImagesToDir(java.util.List, java.nio.file.Path)}.
*/
@Test
public void testCopyCarImagesToDir() {
fail("Not yet implemented");
}
/**
* Test method for {@link org.carcv.impl.core.io.FFMPEGVideoHandler#getSuffix(java.nio.file.Path)}.
*/
@Test
public void testGetSuffix() {
fail("Not yet implemented");
}
/**
* Test method for
* {@link org.carcv.impl.core.io.FFMPEGVideoHandler#generateVideoAsStream(java.nio.file.Path, int, java.io.OutputStream)}.
*/
@Test
public void testGenerateVideoAsStreamPathIntOutputStream() {
fail("Not yet implemented");
}
/**
* Test method for {@link org.carcv.impl.core.io.FFMPEGVideoHandler#createVideo(java.nio.file.Path, int)}.
*/
@Test
public void testCreateVideo() {
fail("Not yet implemented");
}
} | [
"skopekondrej@gmail.com"
] | skopekondrej@gmail.com |
a1bc9e399cc7adbb71a97d77b1268dfe022cc3da | 067eb6bde5d5570a120534ff8b8992e9236d5dd7 | /kcp-aop/src/main/java/com/github/kuangcp/aop/util/ArrayUtil.java | e237d6da282817b82aef3e142a8881f110fec49b | [
"Apache-2.0"
] | permissive | Kuangcp/kcp-tool-java | f29c08ca0e279cd16c773d080bdb187cbe4faac1 | 7ca06d35ca84dc2a66a93a7f47ccd7697e5cfa33 | refs/heads/master | 2020-04-22T14:15:30.481598 | 2020-03-27T09:26:11 | 2020-03-27T09:26:11 | 170,437,381 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 359 | java | package com.github.kuangcp.aop.util;
/**
* @author https://github.com/kuangcp on 2019-10-06 18:22
*/
public class ArrayUtil {
/**
* 数组是否为空
*
* @param <T> 数组元素类型
* @param array 数组
* @return 是否为空
*/
public static <T> boolean isEmpty(T[] array) {
return array == null || array.length == 0;
}
}
| [
"kuangcp@aliyun.com"
] | kuangcp@aliyun.com |
a368f6dc903090a8d6635999c312114b402c5a63 | 0ed6c551eae3c0f6bea38e8a64fd821c690670cf | /src/com/structuraldesignpattern/decorator/Chinese.java | 64ba7febb21b0c61134d9d498910585f997f1cf4 | [] | no_license | sameershrestha333/designpattern | e57d1f2bfad71a6ac3f834979d30ba814481141c | 929d945bc4579be5dc5098a7763a22459c794148 | refs/heads/master | 2021-01-20T04:00:12.872538 | 2017-04-27T16:41:11 | 2017-04-27T16:41:11 | 89,619,342 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 349 | java | package com.structuraldesignpattern.decorator;
public class Chinese extends FoodDecorator{
public Chinese(Food food) {
super(food);
}
@Override
public String getFoodDescripton() {
return super.getFoodDescripton()+" With Fried Rice and Manchurian ";
}
@Override
public double getPrice() {
return super.getPrice()+ 5.0;
}
}
| [
"sameershrestha333@gmail.com"
] | sameershrestha333@gmail.com |
35bae9bf7ca3f731aa359d840f39bf867d1c31a5 | 5479e441b1430b5301298119b3ad637b5e9a9a9a | /openapi-sdk-message/src/main/java/com/yiji/openapi/message/product/ypos/YiposCachierOrderSynRequest.java | 5cc91543439e051b078f97be3734f1158c62264d | [] | no_license | weichk/yiji-sdk | 4e3c0252a10eec91c6f14220994e9be903b68317 | 7715e3feabb3aef32ea8ee0103cafa774204d928 | refs/heads/master | 2022-12-22T12:47:16.898108 | 2019-06-20T07:56:23 | 2019-06-20T07:56:23 | 192,875,193 | 0 | 0 | null | 2022-12-15T23:31:31 | 2019-06-20T07:53:07 | Java | UTF-8 | Java | false | false | 2,382 | java | /*
* www.yiji.com Inc.
* Copyright (c) 2014 All Rights Reserved.
*/
/*
* 修订记录:
* xiyang@yiji.com 2014年12月8日 上午10:57:06 创建
*/
package com.yiji.openapi.message.product.ypos;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.NotBlank;
import com.yiji.openapi.sdk.common.annotation.OpenApiField;
import com.yiji.openapi.sdk.common.annotation.OpenApiMessage;
import com.yiji.openapi.sdk.common.enums.ApiMessageType;
import com.yiji.openapi.sdk.common.message.ApiRequest;
import com.yiji.openapi.sdk.common.utils.Money;
/**
*
*
* @author xiyang
*
*/
@OpenApiMessage(service = "yiposCachierOrderSyn", type = ApiMessageType.Request)
public class YiposCachierOrderSynRequest extends ApiRequest {
@NotBlank
@OpenApiField(desc = "外部订单号")
private String outOrderNo;
@NotBlank
@OpenApiField(desc = "pos机商户号")
private String merchantId;
@NotBlank
@OpenApiField(desc = "pos机终端号")
private String terminalId;
@NotBlank
@OpenApiField(desc = "受保人身份证号码")
private String targetIdNo;
@NotBlank
@OpenApiField(desc = "受保人姓名")
private String targetName;
@NotNull
@OpenApiField(desc = "金额")
private Money amount;
@OpenApiField(desc = "目标卡号")
private String targetCardNumber;
public String getMerchantId() {
return this.merchantId;
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
public String getTerminalId() {
return this.terminalId;
}
public void setTerminalId(String terminalId) {
this.terminalId = terminalId;
}
public String getTargetIdNo() {
return this.targetIdNo;
}
public void setTargetIdNo(String targetIdNo) {
this.targetIdNo = targetIdNo;
}
public String getTargetName() {
return this.targetName;
}
public void setTargetName(String targetName) {
this.targetName = targetName;
}
public Money getAmount() {
return this.amount;
}
public void setAmount(Money amount) {
this.amount = amount;
}
public String getTargetCardNumber() {
return this.targetCardNumber;
}
public void setTargetCardNumber(String targetCardNumber) {
this.targetCardNumber = targetCardNumber;
}
public String getOutOrderNo() {
return this.outOrderNo;
}
public void setOutOrderNo(String outOrderNo) {
this.outOrderNo = outOrderNo;
}
}
| [
"539603511@qq.com"
] | 539603511@qq.com |
89d51914e6d9ea7804b4ada444e5ccd8684d8191 | 46f0d8511a43a442d403095c0da83d7f10946279 | /kmn/src/id/ac/idu/administrasi/dao/MpegawaiDAO.java | 1f40928234a5afec578fb34f58ec0eeb06463ec0 | [] | no_license | gopichaithanya/kmn-med-equip-int | 6d26c258f94dd7cd1232da3cf6bdb3329e4dc283 | d20c3dfb9552a85ef5c9157f058677474cf2ad26 | refs/heads/master | 2021-01-10T22:06:58.175568 | 2015-03-09T10:07:21 | 2015-03-09T10:07:21 | 35,512,139 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,914 | java | package id.ac.idu.administrasi.dao;
import id.ac.idu.backend.model.Mpegawai;
import java.util.List;
/**
* Created by IntelliJ IDEA.
* User: siak
* Date: 3/9/12
* Time: 4:37 PM
* To change this template use File | Settings | File Templates.
*/
public interface MpegawaiDAO {
public Mpegawai getNewMpegawai();
public Mpegawai getMpegawaiById(Long filId);
/**
* EN: Get an Mpegawai object by its ID.<br>
* DE: Gibt ein Mpegawai Objekt anhand seiner ID zurueck.<br>
*
* @param fil_nr
* / the mpegawai number / die Niederlassungs Nummer
* @return Mpegawai / Mpegawai
*/
public Mpegawai getMpegawaiByFilNr(String fil_nr);
/**
* EN: Get a list of all Mpegawais.<br>
* DE: Gibt eine Liste aller Mpegawais zurueck.<br>
*
* @return List of Mpegawais / Liste von Mpegawais
*/
public List<Mpegawai> getAllMpegawais();
/**
* EN: Get the count of all Mpegawais.<br>
* DE: Gibt die Anzahl aller Mpegawais zurueck.<br>
*
* @return int
*/
public int getCountAllMpegawais();
/**
* EN: Gets a list of Mpegawais where the city name contains the %string% .<br>
* DE: Gibt eine Liste aller Mpegawais zurueck bei denen der Stadtname
* %string% enthaelt.<br>
*
* @param string
* Name of the city / Stadtnamen
* @return List of Mpegawais / Liste of Mpegawais
*/
public List<Mpegawai> getMpegawaisLikeCity(String string);
/**
* EN: Gets a list of Mpegawais where the mpegawai name1 contains the %string% .<br>
* DE: Gibt eine Liste aller Mpegawais zurueck bei denen der Mpegawai Name1
* %string% enthaelt.<br>
*
* @param string
* Name1 of the mpegawai / Name1 vom Mpegawai
* @return List of Mpegawais / Liste of Mpegawais
*/
public List<Mpegawai> getMpegawaisLikeName1(String string);
/**
* EN: Gets a list of Mpegawais where the mpegawai number contains the %string%
* .<br>
* DE: Gibt eine Liste aller Mpegawais zurueck bei denen die Mpegawai Nummer
* %string% enthaelt.<br>
*
* @param string
* Number of the mpegawai / Nummer vom Mpegawai
* @return List of Mpegawais / Liste of Mpegawais
*/
public List<Mpegawai> getMpegawaisLikeNo(String string);
/**
* EN: Deletes an Mpegawai by its Id.<br>
* DE: Loescht ein Mpegawai anhand seiner Id.<br>
*
* @param id
* / the persistence identifier / der PrimaerKey
*/
public void deleteMpegawaiById(long id);
/**
* EN: Saves new or updates an Mpegawai.<br>
* DE: Speichert neu oder aktualisiert ein Mpegawai.<br>
*/
public void saveOrUpdate(Mpegawai entity);
/**
* EN: Deletes an Mpegawai.<br>
* DE: Loescht ein Mpegawai.<br>
*/
public void delete(Mpegawai entity);
/**
* EN: Saves an Mpegawai.<br>
* DE: Speichert ein Mpegawai.<br>
*/
public void save(Mpegawai entity);
}
| [
"valeo.gumilang@gmail.com@72968348-e250-7342-0a59-a134bd1d5c99"
] | valeo.gumilang@gmail.com@72968348-e250-7342-0a59-a134bd1d5c99 |
13b4410947467dfb0df1e0dc450c34e0679be4ca | 3b85db026f3aa749cff2a7ccf8cca2b62246140a | /src/rewriter/com/newrelic/org/dom4j/NodeFilter.java | 7eedf22a030df18e20330ab9b4514e1afca1cb1b | [] | no_license | chenhq/newrelic_ref | 9255cf81572d89309a17989c09e42b0d00db126d | 792d7c84dd231fec170894b233996c744f8c318d | refs/heads/master | 2021-01-10T19:01:40.257458 | 2014-12-26T08:39:09 | 2014-12-26T08:39:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 308 | java | package com.newrelic.org.dom4j;
public abstract interface NodeFilter
{
public abstract boolean matches(Node paramNode);
}
/* Location: /home/think/Downloads/newrelic-android-4.120.0/lib/class.rewriter.jar
* Qualified Name: com.newrelic.org.dom4j.NodeFilter
* JD-Core Version: 0.6.2
*/ | [
"hongqing.chen@gmail.com"
] | hongqing.chen@gmail.com |
e6dfa220ff5cd88d9f0c95f51feeb0e862af53d8 | 2de14e91146f0af41206ca0f6969b13887eaaf0a | /src/main/java/com/github/fge/jsonschema/examples/Example6.java | 75b93c73d52a7857ccccf2554478d17fdaa2889b | [] | no_license | dawidcha/json-schema-validator | 51ac895dd6b758c7ca8beee5ccc314298f65281d | 3b8dfa0bb2e292b5312c2625997b0ed973d77c9e | refs/heads/master | 2020-04-05T18:33:02.448174 | 2014-02-08T11:55:09 | 2014-02-08T11:56:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,714 | java | /*
* Copyright (c) 2012, Francis Galiegue <fgaliegue@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Lesser GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.github.fge.jsonschema.examples;
import com.fasterxml.jackson.databind.JsonNode;
import com.github.fge.jsonschema.exceptions.ProcessingException;
import com.github.fge.jsonschema.load.configuration.LoadingConfiguration;
import com.github.fge.jsonschema.load.configuration.LoadingConfigurationBuilder;
import com.github.fge.jsonschema.load.uri.URITransformer;
import com.github.fge.jsonschema.main.JsonSchema;
import com.github.fge.jsonschema.main.JsonSchemaFactory;
import com.github.fge.jsonschema.ref.JsonRef;
import com.github.fge.jsonschema.report.ProcessingReport;
import java.io.IOException;
/**
* Sixth example: URI redirection
*
* <p><a href="doc-files/Example6.java">link to source code</a></p>
*
* <p>In this example, the same schema file is used as in {@link Example1}. This
* time, though, it is assumed that the base URI used for addressing this schema
* is {@code http://my.site/schemas/fstab.json#}. But instead of trying to
* fetch it from the web directly, we want to use the local copy, which is
* located under URI {@code
* resource:/org/eel/kitchen/jsonschema/examples/fstab.json#}.</p>
*
* <p>The solution is here again to build a custom {@link LoadingConfiguration},
* which allows to add schema redirections (using {@link
* LoadingConfigurationBuilder#addSchemaRedirect(String, String)}. This method
* can be called for as many schemas as you wish to redirect.</p>
*
* <p>The effect is that if you required a schema via URI {@code
* http://my.site/schemas/fstab.json#}, it will silently transform this URI into
* {@code resource:/org/eel/kitchen/jsonschema/examples/fstab.json#}
* internally.</p>
*
* <p>Note that URIs must be absolute JSON references (see {@link JsonRef}).</p>
*/
public final class Example6
{
private static final String FROM = "http://my.site/schemas/fstab.json#";
private static final String TO
= "resource:/com/github/fge/jsonschema/examples/fstab.json#";
public static void main(final String... args)
throws IOException, ProcessingException
{
final JsonNode good = Utils.loadResource("/fstab-good.json");
final JsonNode bad = Utils.loadResource("/fstab-bad.json");
final JsonNode bad2 = Utils.loadResource("/fstab-bad2.json");
final URITransformer transformer = URITransformer.newBuilder()
.addSchemaRedirect(FROM, TO).freeze();
final LoadingConfiguration cfg = LoadingConfiguration.newBuilder()
.setURITransformer(transformer).freeze();
final JsonSchemaFactory factory = JsonSchemaFactory.newBuilder()
.setLoadingConfiguration(cfg).freeze();
final JsonSchema schema = factory.getJsonSchema(FROM);
ProcessingReport report;
report = schema.validate(good);
System.out.println(report);
report = schema.validate(bad);
System.out.println(report);
report = schema.validate(bad2);
System.out.println(report);
}
}
| [
"fgaliegue@gmail.com"
] | fgaliegue@gmail.com |
62267c6d48073515c0a4a17760364f7f6b42be0f | 31f043184e2839ad5c3acbaf46eb1a26408d4296 | /src/main/java/com/github/highcharts4gwt/model/highcharts/option/api/seriesbubble/point/MouseOverEvent.java | e33c7a76f4789e60acf564e6e67f2d5756782297 | [] | no_license | highcharts4gwt/highchart-wrapper | 52ffa84f2f441aa85de52adb3503266aec66e0ac | 0a4278ddfa829998deb750de0a5bd635050b4430 | refs/heads/master | 2021-01-17T20:25:22.231745 | 2015-06-30T15:05:01 | 2015-06-30T15:05:01 | 24,794,406 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 211 | java |
package com.github.highcharts4gwt.model.highcharts.option.api.seriesbubble.point;
import com.github.highcharts4gwt.model.highcharts.object.api.Point;
public interface MouseOverEvent {
Point point();
}
| [
"ronan.quillevere@gmail.com"
] | ronan.quillevere@gmail.com |
df829915cd3658c6f5dbdd15edbea25242031681 | 19490fcc6f396eeb35a9234da31e7b615abf6d04 | /JDownloader/src/org/jdownloader/controlling/packagizer/DisableRevFilesPackageRule.java | 316f6955e0156cf798b58d45b41c654292da0cef | [] | no_license | amicom/my-project | ef72026bb91694e74bc2dafd209a1efea9deb285 | 951c67622713fd89448ffe6e0983fe3f934a7faa | refs/heads/master | 2021-01-02T09:15:45.828528 | 2015-09-06T15:57:01 | 2015-09-06T15:57:01 | 41,953,961 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,328 | java | package org.jdownloader.controlling.packagizer;
import jd.gui.swing.jdgui.views.settings.panels.linkgrabberfilter.editdialog.OnlineStatusFilter;
import jd.gui.swing.jdgui.views.settings.panels.linkgrabberfilter.editdialog.OnlineStatusFilter.OnlineStatus;
import jd.gui.swing.jdgui.views.settings.panels.linkgrabberfilter.editdialog.OnlineStatusFilter.OnlineStatusMatchtype;
import org.jdownloader.controlling.filter.FiletypeFilter;
import org.jdownloader.controlling.filter.FiletypeFilter.TypeMatchType;
import org.jdownloader.translate._JDT;
public class DisableRevFilesPackageRule extends PackagizerRule {
public static final String ID = "DisableRevFilesPackageRule";
public DisableRevFilesPackageRule() {
super();
// setFilenameFilter(new RegexFilter(true, MatchType.EQUALS, "*.rev", false));
}
public void init() {
setFiletypeFilter(new FiletypeFilter(TypeMatchType.IS, true, false, false, false, false, false, "rev", false));
setOnlineStatusFilter(new OnlineStatusFilter(OnlineStatusMatchtype.IS, true, OnlineStatus.ONLINE));
setIconKey(org.jdownloader.gui.IconKey.ICON_COMPRESS);
setName(_JDT._.DisableRevFilesPackageRulee_rule_name());
setLinkEnabled(false);
setEnabled(true);
setId(ID);
setStaticRule(true);
}
}
| [
"amicom.pro@gmail.com"
] | amicom.pro@gmail.com |
a8d554095d818d2d4ac0ac517e668df93759ad7f | 76ad20d5dcc8b2174ba0098b3c6418ad4e2df5f2 | /api-gateway/src/main/java/br/com/caelum/cine/ApiGatewayApplication.java | fcaca365814fe1fed7a5f865d4dfad34fb11fdf1 | [] | no_license | jsnp2/cine-microservices | 66588d68de03ba05b0f0de2f568e5830182e401d | 27da3bff2524b7e246201dbfbfe93559c458b120 | refs/heads/master | 2020-04-26T10:18:15.471714 | 2019-03-02T05:36:15 | 2019-03-02T05:36:15 | 173,482,184 | 1 | 0 | null | 2019-03-02T18:09:51 | 2019-03-02T18:09:51 | null | UTF-8 | Java | false | false | 499 | java | package br.com.caelum.cine;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
@EnableZuulProxy
@EnableEurekaClient
@SpringBootApplication
public class ApiGatewayApplication {
public static void main(String[] args) {
SpringApplication.run(ApiGatewayApplication.class, args);
}
}
| [
"feh.wilinando@gmail.com"
] | feh.wilinando@gmail.com |
137f7d2f182c6fd60fad47d94dd441381bb1204d | 6960f3b8c06f31b75a76f1a743416723e03b61fb | /ChapterTen/src/Interfaces/Invoice.java | 1a0c144671cb09419e07dcb86cd210ca0043292f | [] | no_license | teevyne/java-codes-and-examples | 9db26b5149266fd5f67396dcc9ac5d0596cdb8a6 | d41dac3c424c56eb0419266bdf8361a127468a79 | refs/heads/master | 2022-11-12T16:51:37.078491 | 2020-06-25T13:48:16 | 2020-06-25T13:48:16 | 274,659,578 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,729 | java | package Interfaces;
public class Invoice implements Payable {
private final String partNumber;
private final String partDescription;
private int quantity;
private double pricePerItem;
public Invoice(String partNumber, String partDescription, int quantity, double pricePerItem) {
if (quantity < 0) // validate quantity
throw new IllegalArgumentException("Quantity must be >= 0");
if (pricePerItem < 0.0) // validate pricePerItem
throw new IllegalArgumentException("Price per item must be >= 0");
this.partNumber = partNumber;
this.partDescription = partDescription;
this.quantity = quantity;
this.pricePerItem = pricePerItem;
}
public String getPartNumber() {
return partNumber;
}
public String getPartDescription() {
return partDescription;
}
public int getQuantity() {
return quantity;
}
public double getPricePerItem() {
return pricePerItem;
}
public void setQuantity(int quantity) {
if (quantity < 0) // validate quantity
throw new IllegalArgumentException("Quantity must be >= 0");
this.quantity = quantity;
}
public void setPricePerItem(double pricePerItem){
if (pricePerItem < 0.0) // validate pricePerItem
throw new IllegalArgumentException("Price per item must be >= 0");
this.pricePerItem = pricePerItem;
}
@Override
public String toString() {
return String.format("%n%s: %n%s: %s (%s) %n%s: %d %n%s: $%,.2f", "An Invoice", "Part Number", getPartNumber(), getPartDescription(), "Quantity", getQuantity(), "Price per item", getPricePerItem());
}
// method required to carry out contract with interface Payable
@Override
public double getPaymentAmount()
{
return getQuantity() * getPricePerItem(); // calculate total cost
}
}
| [
"ayemobolatolulope@gmail.com"
] | ayemobolatolulope@gmail.com |
44d1226a0e3bdf3db09b417f9e31079d33686486 | 0fc4aa42cf1609231bd5a59a4860f89c96878252 | /stackoverflow/dynamicreports-core/src/main/java/net/sf/dynamicreports/report/base/component/DRBreak.java | a710257727d8bf731492360ba8095ffd1d12c5ca | [] | no_license | qiaoyunlai66/JOE | 6a7dbd3075df55ac2f90e4373b4765b1c37d83e3 | deadacbae9a06246946de8230c30daa063fe3124 | refs/heads/master | 2021-09-12T07:06:01.971653 | 2018-04-15T08:30:02 | 2018-04-15T08:30:02 | 113,730,225 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,507 | java | /**
* DynamicReports - Free Java reporting library for creating reports dynamically
*
* Copyright (C) 2010 - 2016 Ricardo Mariaca
* http://www.dynamicreports.org
*
* This file is part of DynamicReports.
*
* DynamicReports is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DynamicReports is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with DynamicReports. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.dynamicreports.report.base.component;
import net.sf.dynamicreports.report.constant.BreakType;
import net.sf.dynamicreports.report.constant.Constants;
import net.sf.dynamicreports.report.definition.component.DRIBreak;
/**
* @author Ricardo Mariaca (r.mariaca@dynamicreports.org)
*/
public class DRBreak extends DRComponent implements DRIBreak {
private static final long serialVersionUID = Constants.SERIAL_VERSION_UID;
private BreakType breakType;
@Override
public BreakType getType() {
return breakType;
}
public void setType(BreakType breakType) {
this.breakType = breakType;
}
}
| [
"joeqiao@fortinet.com"
] | joeqiao@fortinet.com |
38ee6a9fd5c0e4271636185e9958b3314316f87e | 1f90b86cb54987c53397d8b57295d291ba512d02 | /examples/smartmeter/ReductionMessage.java | 03af562b6ddc0b3f734afbf4c81a7a93e0e6f21a | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | BillZaumen/libbzdev | 2bd97fc98b92320f079e4615e0aad700813c0a53 | 948f0a1fa2bdba91d55b2a2f792f3c89679742af | refs/heads/master | 2023-09-01T11:24:14.811257 | 2023-08-25T03:04:17 | 2023-08-25T03:04:17 | 459,379,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 191 | java | public class ReductionMessage {
private double fraction;
public ReductionMessage(Double value) {
fraction = value;
}
public double getFraction() {
return fraction;
}
}
| [
"bzdev.org@gmail.com"
] | bzdev.org@gmail.com |
7a4c339c3695f94722f089098c21dc2e6cd5c1d0 | fea4c2fb250ba1c90bc9e17ebbe089a6de318771 | /sources/com/google/android/apps/nexuslauncher/clock/AutoUpdateClock.java | 63fc21600499c82520e557801dd3e01b6567fc45 | [] | no_license | revanthstrakz/vx | d7234ea9c8ff36d9e62dfd23218181a830db810f | 7e8cef0f0da9830246d3362341725b8e3c25e0fa | refs/heads/master | 2022-11-13T11:16:21.849058 | 2020-06-27T20:39:20 | 2020-06-27T20:39:20 | 275,443,477 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,996 | java | package com.google.android.apps.nexuslauncher.clock;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.os.SystemClock;
import com.android.launcher3.FastBitmapDrawable;
import java.util.TimeZone;
public class AutoUpdateClock extends FastBitmapDrawable implements Runnable {
private ClockLayers mLayers;
AutoUpdateClock(Bitmap bitmap, ClockLayers clockLayers) {
super(bitmap);
this.mLayers = clockLayers;
}
private void rescheduleUpdate() {
unscheduleSelf(this);
long uptimeMillis = SystemClock.uptimeMillis();
scheduleSelf(this, (uptimeMillis - (uptimeMillis % 1000)) + 1000);
}
/* access modifiers changed from: 0000 */
public void updateLayers(ClockLayers clockLayers) {
this.mLayers = clockLayers;
if (this.mLayers != null) {
this.mLayers.mDrawable.setBounds(getBounds());
}
invalidateSelf();
}
/* access modifiers changed from: 0000 */
public void setTimeZone(TimeZone timeZone) {
if (this.mLayers != null) {
this.mLayers.setTimeZone(timeZone);
invalidateSelf();
}
}
public void draw(Canvas canvas) {
super.draw(canvas);
if (this.mLayers != null) {
this.mLayers.updateAngles();
Rect bounds = getBounds();
canvas.scale(this.mLayers.scale, this.mLayers.scale, bounds.exactCenterX(), bounds.exactCenterY());
this.mLayers.mDrawable.draw(canvas);
rescheduleUpdate();
}
}
/* access modifiers changed from: protected */
public void onBoundsChange(Rect rect) {
super.onBoundsChange(rect);
if (this.mLayers != null) {
this.mLayers.mDrawable.setBounds(rect);
}
}
public void run() {
if (this.mLayers.updateAngles()) {
invalidateSelf();
} else {
rescheduleUpdate();
}
}
}
| [
"dr.revanthstrakz@gmail.com"
] | dr.revanthstrakz@gmail.com |
acc9fdfb12926bcf65b939f72e437143fbd054ea | aa6997aba1475b414c1688c9acb482ebf06511d9 | /src/javax/xml/ws/RespectBindingFeature.java | 7fc464268f5b9dda52741897dcd41559fb8ecf22 | [] | no_license | yueny/JDKSource1.8 | eefb5bc88b80ae065db4bc63ac4697bd83f1383e | b88b99265ecf7a98777dd23bccaaff8846baaa98 | refs/heads/master | 2021-06-28T00:47:52.426412 | 2020-12-17T13:34:40 | 2020-12-17T13:34:40 | 196,523,101 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,581 | java | /*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javax.xml.ws;
import javax.xml.ws.soap.AddressingFeature;
/**
* This feature clarifies the use of the <code>wsdl:binding</code>
* in a JAX-WS runtime.
*
* This feature can be used during the creation of SEI proxy, and
* {@link Dispatch} instances on the client side and {@link Endpoint}
* instances on the server side. This feature cannot be used for {@link Service}
* instance creation on the client side.
* <p>
* This feature is only useful with web services that have an
* associated WSDL. Enabling this feature requires that a JAX-WS
* implementation inspect the <code>wsdl:binding</code> for an
* endpoint at runtime to make sure that all <code>wsdl:extensions</code>
* that have the <code>required</code> attribute set to <code>true</code>
* are understood and are being used.
* <p>
* The following describes the affects of this feature with respect
* to be enabled or disabled:
* <ul>
* <li> ENABLED: In this Mode, a JAX-WS runtime MUST assure that all
* required <code>wsdl:binding</code> extensions(including policies) are
* either understood and used by the runtime, or explicitly disabled by the
* web service application. A web service can disable a particular
* extension if there is a corresponding {@link WebServiceFeature} or annotation.
* Similarly, a web service client can disable
* particular extension using the corresponding <code>WebServiceFeature</code> while
* creating a proxy or Dispatch instance.
* The runtime MUST also make sure that binding of
* SEI parameters/return values respect the <code>wsdl:binding</code>.
* With this feature enabled, if a required (<code>wsdl:required="true"</code>)
* <code>wsdl:binding</code> extension is in the WSDL and it is not
* supported by a JAX-WS runtime and it has not
* been explicitly turned off by the web service developer, then
* that JAX-WS runtime MUST behave appropriately based on whether it is
* on the client or server:
* <UL>
* <li>Client: runtime MUST throw a
* {@link WebServiceException} no sooner than when one of the methods
* above is invoked but no later than the first invocation of an endpoint
* operation.
* <li>Server: throw a {@link WebServiceException} and the endpoint MUST fail to deploy
* </ul>
*
* <li> DISABLED: In this Mode, an implementation may choose whether
* to inspect the <code>wsdl:binding</code> or not and to what degree
* the <code>wsdl:binding</code> will be inspected. For example,
* one implementation may choose to behave as if this feature is enabled,
* another implementation may only choose to verify the SEI's
* parameter/return type bindings.
* </ul>
*
* @see AddressingFeature
* @since JAX-WS 2.1
*/
public final class RespectBindingFeature extends WebServiceFeature {
/**
* Constant value identifying the RespectBindingFeature
*/
public static final String ID = "javax.xml.ws.RespectBindingFeature";
/**
* Creates an <code>RespectBindingFeature</code>.
* The instance created will be enabled.
*/
public RespectBindingFeature() {
this.enabled = true;
}
/**
* Creates an RespectBindingFeature
*
* @param enabled specifies whether this feature should be enabled or not.
*/
public RespectBindingFeature(boolean enabled) {
this.enabled = enabled;
}
/**
* {@inheritDoc}
*/
public String getID() {
return ID;
}
}
| [
"yueny09@163.com"
] | yueny09@163.com |
e94136eaccd749bf56f50abe99432dd39da9baa1 | 74d6851a26bd3a63b2daa6fe25fc95c80855897a | /upic-common/src/main/java/com/upic/common/utils/string/Sign.java | 83723e8e808e305a083efaa563b1b016f27a9640 | [] | no_license | UPIC/sutuo | ec25721e8be6ee0f4f816f72aa1b3b5069ba39b7 | 13f2da2d281562060a0832a723db3ac1c5e5ec7d | refs/heads/master | 2021-07-08T23:08:56.450293 | 2017-10-07T05:06:20 | 2017-10-07T05:06:20 | 104,146,391 | 0 | 4 | null | 2017-10-07T05:06:21 | 2017-09-20T00:52:35 | Java | UTF-8 | Java | false | false | 3,775 | java | package com.upic.common.utils.string;
import java.io.UnsupportedEncodingException;
import java.security.SignatureException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.codec.digest.DigestUtils;
/**
* 功能:公用函数类(生成签名数据)
*
* @author huqian
*
*/
public class Sign {
// 字符编码格式 目前支持 gbk 或 utf-8
public static String input_charset = "utf-8";
// 签名方式
public static String sign_type = "MD5";
/**
* 生成要请求给支付的秘钥
*
* @param sParaTemp
* 请求前的参数数组
* @return String
*/
public static String buildRequestPara(Map<String, String> sParaTemp, String key) {
// 除去数组中的空值和签名参数
Map<String, String> sPara = Sign.paraFilter(sParaTemp);
// 生成签名结果
String mysign = buildRequestMysign(sPara, key);
return mysign;
}
/**
* 生成签名结果
*
* @param sPara
* 要签名的数组
* @return 签名结果字符串
*/
public static String buildRequestMysign(Map<String, String> sPara, String key) {
String prestr = Sign.createLinkString(sPara); // 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
String mysign = "";
if (Sign.sign_type.equals("MD5")) {
mysign = Sign.sign(prestr, key, Sign.input_charset);
}
return mysign;
}
/**
* 除去数组中的空值和签名参数
*
* @param sArray
* 签名参数组
* @return 去掉空值与签名参数后的新签名参数组
*/
public static Map<String, String> paraFilter(Map<String, String> sArray) {
Map<String, String> result = new LinkedHashMap<String, String>();
if (sArray == null || sArray.size() <= 0) {
return result;
}
for (String key : sArray.keySet()) {
String value = sArray.get(key);
if (value == null || "".equals(value)) {
continue;
}
result.put(key, value);
}
return result;
}
/**
* 把数组所有元素排序,并按照“参数=参数值”的模式用“&”字符拼接成字符串
*
* @param params
* 需要排序并参与字符拼接的参数组
* @return 拼接后字符串
*/
public static String createLinkString(Map<String, String> params) {
List<String> keys = new ArrayList<String>(params.keySet());
Collections.sort(keys);
StringBuffer prestr = new StringBuffer("");
for (int i = 0; i < keys.size(); i++) {
String key = keys.get(i);
String value = params.get(key);
if (i == keys.size() - 1) {// 拼接时,不包括最后一个&字符
prestr.append(key)//
.append("=")//
.append(value);
} else {
prestr.append(key)//
.append("=")//
.append(value)//
.append("&");
}
}
return prestr.toString();
}
/**
* 签名字符串
*
* @param text
* 需要签名的字符串
* @param key
* 密钥
* @param input_charset
* 编码格式
* @return 签名结果
*/
public static String sign(String text, String key, String input_charset) {
text = text + key;
return DigestUtils.md5Hex(getContentBytes(text, input_charset));
}
/**
* @param content
* @param charset
* @return
* @throws SignatureException
* @throws UnsupportedEncodingException
*/
private static byte[] getContentBytes(String content, String charset) {
if (charset == null || "".equals(charset)) {
return content.getBytes();
}
try {
return content.getBytes(charset);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("MD5签名过程中出现错误,指定的编码集不对,您目前指定的编码集是:" + charset);
}
}
}
| [
"729535800@qq.com"
] | 729535800@qq.com |
f78a02400a9b9c1846682b3e54395f3b8f3c4780 | 5a22e1d1792a6e61fc45be684e6bd1c33eb17900 | /icecaptools/src/test/icecaptools/TestCompiler.java | cf57453619edd79505a2014b4a8c3057f08ccfeb | [] | no_license | Gudui/hvm-scj | cfe9fb3d59f9243b40eacf831798aa79034eb35a | b805cb3d98ac37b329422ffa039c73fa4db592df | refs/heads/master | 2021-01-17T18:37:49.075537 | 2015-11-14T10:09:49 | 2015-11-14T10:09:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,311 | java | package test.icecaptools;
import icecaptools.AnalysisObserver;
import icecaptools.CompilationSequence;
import icecaptools.DefaultObserver;
import icecaptools.compiler.DefaultIcecapCodeFormatter;
import icecaptools.compiler.DefaultIcecapProgressMonitor;
import icecaptools.compiler.DefaultMethodObserver;
import icecaptools.compiler.IDGenerator;
import icecaptools.compiler.VirtualTable;
import icecaptools.conversion.ConversionConfiguration;
import icecaptools.conversion.Converter;
import java.io.File;
import org.apache.bcel.Repository;
import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.util.ClassPath;
import org.apache.bcel.util.SyntheticRepository;
import org.junit.Assert;
import org.junit.Test;
public class TestCompiler {
@Test
public void testFullCompilation() {
ConversionConfiguration config = new ConversionConfiguration();
config.setClassPath("/home/skr/icecapvm/tools/bin");
config.setInputPackage("test");
config.setInputClass("TestI2B");
CompilationSequence sequencer = new CompilationSequence();
config.setCodeFormatter(new DefaultIcecapCodeFormatter());
try {
sequencer.startCompilation(System.out, new DefaultMethodObserver(), config, new DefaultIcecapProgressMonitor(), new DefaultCompilationRegistry(), "", true);
} catch (Throwable e2) {
Assert.fail();
}
File classesFile = new File("classes.c");
Assert.assertTrue(classesFile.exists());
Assert.assertTrue(classesFile.length() > 0);
classesFile.delete();
classesFile = null;
File methodsFile = new File("methods.c");
Assert.assertTrue(methodsFile.exists());
Assert.assertTrue(methodsFile.length() > 0);
methodsFile.delete();
methodsFile = null;
}
@Test
public void testVTable() throws Exception {
ClassPath classPath = new ClassPath("/home/skr/icecapvm/tools/bin");
SyntheticRepository repository = SyntheticRepository.getInstance(classPath);
Repository.setRepository(repository);
JavaClass clazz = Repository.lookupClass("test.icecaptools.minitests.Sub2");
AnalysisObserver observer = new DefaultObserver();
Converter converter = new Converter(System.out, new DefaultMethodObserver(), new DefaultCompilationRegistry(), false);
converter.setObserver(observer);
VirtualTable vtable = VirtualTable.createVTable(clazz.getClassName(), observer);
System.out.println(vtable.toString());
}
@Test
public void testMethoID() {
String className;
String methodName;
String signature;
IDGenerator idGen = new IDGenerator();
String id1, id2;
className = "java.util.HashMap";
methodName = "<init>";
signature = "()V";
id1 = idGen.getUniqueId(className, methodName, signature);
className = "java.util.HashMap";
methodName = "init";
signature = "()V";
id2 = idGen.getUniqueId(className, methodName, signature);
Assert.assertFalse(id1.equals(id2));
}
}
| [
"sek@viauc.dk"
] | sek@viauc.dk |
09691024b75fc81bf8a937a291666092099237c9 | 05402fc0ffd11a84bb9619152d2a28f1b2e10047 | /fase3/ine5609/programasEmJava/estruturasDeDados/modelo/execoes/execoesDeFila/ExecaoAbstrataDeFila.java | 9146c14844fdb6bfcc0c22b5e9d33f180f62077c | [] | no_license | grazipauluka/cienciasDaComputacaoUfsc | 61c14d724e6852529e5d8b0a576be819a1a1547d | 13357b174f9d520874514194efd446747e11be5b | refs/heads/master | 2023-07-24T12:45:42.635201 | 2015-12-09T20:42:27 | 2015-12-09T20:42:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 252 | java | package modelo.execoes.execoesDeFila;
public abstract class ExecaoAbstrataDeFila extends RuntimeException
{
private static final long serialVersionUID = 6962383325530575504L;
public ExecaoAbstrataDeFila(String mensagem)
{
super(mensagem);
}
}
| [
"lucas@dominiol.com.br"
] | lucas@dominiol.com.br |
74886110438e7a61a8ad784c38a89ac8ee4006dd | efca31989acc42ccbf1141d3caf06ba15db8687f | /user-service/src/main/java/com/clickyman/GlobalExceptionHandler.java | 97fc41bab7ba49df0c17a160fc73b10e0222ccec | [] | no_license | clickyman1142/clickyman | 334e9eb9e8c72d8403cee82609591fc11d498dd7 | 281fe9bf79dcd0e6e4b04a8629256d27f6b8f877 | refs/heads/master | 2023-02-08T05:07:28.231985 | 2019-09-09T16:06:53 | 2019-09-09T16:06:53 | 196,676,956 | 0 | 0 | null | 2023-01-24T00:41:13 | 2019-07-13T04:13:17 | Java | UTF-8 | Java | false | false | 2,844 | java | package com.clickyman;
import java.time.LocalDateTime;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
import com.clickyman.constant.SystemCode;
import com.clickyman.dto.ExceptionDetails;
import com.clickyman.dto.PropertyError;
import com.clickyman.dto.RequestValidateError;
import com.clickyman.exception.ClickymanException;
@RestControllerAdvice
public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
@Value("${app.debug}")
private boolean debugMode;
@ExceptionHandler(value = { ClickymanException.class })
protected ResponseEntity<ExceptionDetails> handleException(ClickymanException ex, WebRequest request) {
ExceptionDetails exceptionDetails = ExceptionDetails.builder()
.message(ex.getMessage())
.debugMessage(debugMode ? ex.getDebugMessage() : null)
.systemCode(ex.getSystemCode())
.dateTime(LocalDateTime.now())
.status(ex.getStatus() != null ? ex.getStatus() : HttpStatus.INTERNAL_SERVER_ERROR)
.build();
return new ResponseEntity<ExceptionDetails>(exceptionDetails, exceptionDetails.getStatus());
}
/**
* Handler @Valid response
*/
@Override
protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex,
HttpHeaders headers, HttpStatus status, WebRequest request) {
RequestValidateError responseError = RequestValidateError.builder()
.dateTime(LocalDateTime.now())
.systemCode(SystemCode.BAD_REQUEST)
.status(HttpStatus.BAD_REQUEST)
.propertyErrors(ex.getBindingResult().getFieldErrors().stream().map(error -> {
return PropertyError.builder().propertyName(error.getField()).messageCode(error.getDefaultMessage()).build();
}).collect(Collectors.toList()))
.build();
return new ResponseEntity<>(responseError, responseError.getStatus());
}
/**
* Just for production mode
* @param ex
* @param request
*/
// @ExceptionHandler(value = { Exception.class })
// protected ResponseEntity<ExceptionDetails> handleAllException(Exception ex, WebRequest request) {
// ExceptionDetails exception = ExceptionDetails.builder()
// .status(HttpStatus.INTERNAL_SERVER_ERROR)
// .systemCode(SystemCode.UNEXPECTED_ERROR)
// .dateTime(LocalDateTime.now()).build();
// return new ResponseEntity<ExceptionDetails>(exception, HttpStatus.INTERNAL_SERVER_ERROR);
// }
}
| [
"baotoan.95@gmail.com"
] | baotoan.95@gmail.com |
748221fa51324a0331168016f3da12520772d677 | d523206fce46708a6fe7b2fa90e81377ab7b6024 | /com/google/android/gms/tagmanager/zzbq.java | 10974850cf2a63edf1eb2b425b5afcf04a27fe91 | [] | no_license | BlitzModder/BlitzJava | 0ee94cc069dc4b7371d1399ff5575471bdc88aac | 6c6d71d2847dfd5f9f4f7c716cd820aeb7e45f2c | refs/heads/master | 2021-06-11T15:04:05.571324 | 2017-02-04T16:04:55 | 2017-02-04T16:04:55 | 77,459,517 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 457 | java | package com.google.android.gms.tagmanager;
import com.google.android.gms.internal.zzag.zza;
class zzbq
implements zzch
{
public void zzd(zzag.zza paramzza) {}
public zzcj zzfv(String paramString)
{
return new zzbr();
}
}
/* Location: /Users/subdiox/Downloads/dex2jar-2.0/net.wargaming.wot.blitz-dex2jar.jar!/com/google/android/gms/tagmanager/zzbq.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"subdiox@gmail.com"
] | subdiox@gmail.com |
e39f7526972c8b8dbdca8e283668c6c0bcfaf687 | 84e064c973c0cc0d23ce7d491d5b047314fa53e5 | /latest10/samples/java/ee/JDOM2Example.java | 57bf91495dab2fda760c174bc149d46755d635fc | [] | no_license | orbeon/saxon-he | 83fedc08151405b5226839115df609375a183446 | 250c5839e31eec97c90c5c942ee2753117d5aa02 | refs/heads/master | 2022-12-30T03:30:31.383330 | 2020-10-16T15:21:05 | 2020-10-16T15:21:05 | 304,712,257 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,005 | java | package ee;
import com.saxonica.config.ProfessionalConfiguration;
import net.sf.saxon.TransformerFactoryImpl;
import net.sf.saxon.option.jdom2.JDOM2DocumentWrapper;
import net.sf.saxon.xpath.XPathEvaluator;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;
import javax.xml.transform.Templates;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathExpressionException;
import java.io.File;
import java.io.IOException;
import java.util.List;
/**
* A simple example to show how SAXON can be used with a JDOM2 tree.
* It is designed to be used with the source document books.xml and the
* stylesheet total.xsl
*/
public class JDOM2Example {
private JDOM2Example() {}
/**
* Method main
*/
public static void main(String argv[])
throws TransformerException, XPathExpressionException,
JDOMException, IOException {
if (argv.length == 2) {
transform(argv[0], argv[1]);
} else {
System.err.println("Usage: JDOM2Example source.xml style.xsl >out.xml");
}
}
/**
* Show (a) use of freestanding XPath expressions against the JDOM document, and
* (b) the simplest possible transformation from system id to output stream.
*/
public static void transform(String sourceID, String xslID)
throws TransformerException, XPathExpressionException, JDOMException, IOException {
// Get a TransformerFactory
System.setProperty("javax.xml.transform.TransformerFactory",
"com.saxonica.config.ProfessionalTransformerFactory");
TransformerFactory tfactory = TransformerFactory.newInstance();
ProfessionalConfiguration config = (ProfessionalConfiguration)((TransformerFactoryImpl)tfactory).getConfiguration();
// Build the JDOM document
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(new File(sourceID));
// Give it a Saxon wrapper
JDOM2DocumentWrapper docw =
new JDOM2DocumentWrapper(doc, config);
// Retrieve all the ITEM elements
XPathEvaluator xpath = new XPathEvaluator(config);
XPathExpression exp = xpath.compile("//ITEM");
List<Element> list = (List<Element>)exp.evaluate(docw, XPathConstants.NODESET);
// For each of these, compute an additional attribute
for (Element item : list) {
String price = item.getChildText("PRICE");
String quantity = item.getChildText("QUANTITY");
try {
double priceval = Double.parseDouble(price);
double quantityval = Double.parseDouble(quantity);
double value = priceval * quantityval;
item.setAttribute("VALUE", "" + value);
} catch (NumberFormatException err) {
item.setAttribute("VALUE", "?");
}
}
// Un-comment the following lines to get trace output from the transformation
// tfactory.setAttribute(net.sf.saxon.lib.FeatureKeys.TRACE_LISTENER,
// new net.sf.saxon.trace.XSLTTraceListener());
// Compile the stylesheet
Templates templates = tfactory.newTemplates(new StreamSource(xslID));
Transformer transformer = templates.newTransformer();
// Now do a transformation
transformer.transform(docw, new StreamResult(System.out));
}
/**
* Here is an extension function you can try calling from the XSLT stylesheet
*/
public static int elementContentSize(Element element) {
return element.getContentSize();
}
}
| [
"oneil@saxonica.com"
] | oneil@saxonica.com |
4b4f1e95790eb17e4a2d793d2727d460428bb362 | 6e221fdfe75008ec333e5378cd8eb29d117c56f9 | /services/esoko-payload/src/main/java/com/iexceed/esoko/jaxb/ns/QueryPeopleProfilesResWrap.java | 266a2b7c4738340815e937746ae001273747aca0 | [] | no_license | siddhartha-Infy01/my-ref-code | 3a7b90162681d4e499375567ef0811752d054a20 | 1b321808a6c8d66a6ccd21dc86b57277d14b1162 | refs/heads/master | 2021-01-21T12:30:48.304123 | 2017-05-19T10:41:54 | 2017-05-19T10:41:54 | 91,796,009 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,239 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.11.12 at 07:00:16 PM IST
//
package com.iexceed.esoko.jaxb.ns;
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 queryPeopleProfilesResWrap element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="queryPeopleProfilesResWrap">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="queryPeopleProfilesRes" type="{http://www.iexceed.com/queryPeopleProfiles}queryPeopleProfilesRes"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"queryPeopleProfilesRes"
})
@XmlRootElement(name = "queryPeopleProfilesResWrap")
public class QueryPeopleProfilesResWrap {
@XmlElement(namespace = "http://www.iexceed.com/queryPeopleProfiles", required = true)
protected QueryPeopleProfilesRes queryPeopleProfilesRes;
/**
* Gets the value of the queryPeopleProfilesRes property.
*
* @return
* possible object is
* {@link QueryPeopleProfilesRes }
*
*/
public QueryPeopleProfilesRes getQueryPeopleProfilesRes() {
return queryPeopleProfilesRes;
}
/**
* Sets the value of the queryPeopleProfilesRes property.
*
* @param value
* allowed object is
* {@link QueryPeopleProfilesRes }
*
*/
public void setQueryPeopleProfilesRes(QueryPeopleProfilesRes value) {
this.queryPeopleProfilesRes = value;
}
}
| [
"spatasha@cisco.com"
] | spatasha@cisco.com |
f032cb625ba130be8703ca640e5735bf5a056fc4 | b5ee21a9438e4ab6203489e9483102e157a8d1c0 | /JRaw/src/JRaw/PlainFileFilter.java | 6392e35be71c7dbacd657e5ad8a1920222dd2033 | [
"BSD-3-Clause"
] | permissive | YvesBoyadjian/JRaw | 30fda179226cac86be6bf682457f448fbf3d092f | 53829ecb296dde3285c895d75f22404dd63d61a0 | refs/heads/main | 2022-12-24T07:09:55.465348 | 2020-10-04T08:35:11 | 2020-10-04T08:35:11 | 301,077,220 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 725 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package JRaw;
import java.io.File;
import java.io.FileFilter;
/**
*
* @author Yves
*/
public class PlainFileFilter implements FileFilter {
public boolean accept(File pathname) {
String filename = pathname.getName().toLowerCase();
if ( filename.endsWith(".nef")
|| filename.endsWith(".pef")
|| filename.endsWith(".crw")
|| filename.endsWith(".cr2")
|| filename.endsWith(".raf")
|| filename.endsWith(".raw")) {
if ( pathname.isFile()) {
return true;
}
}
return false;
}
}
| [
"yboyadjian@hotmail.fr"
] | yboyadjian@hotmail.fr |
6e891fa5ed9204b5e0cdeadcb4319e1072750fb1 | ca0e9689023cc9998c7f24b9e0532261fd976e0e | /src/com/tencent/mm/app/plugin/b/a$a.java | 70ea1267c12230aac2e61d718a2b2dfb06b0519d | [] | no_license | honeyflyfish/com.tencent.mm | c7e992f51070f6ac5e9c05e9a2babd7b712cf713 | ce6e605ff98164359a7073ab9a62a3f3101b8c34 | refs/heads/master | 2020-03-28T15:42:52.284117 | 2016-07-19T16:33:30 | 2016-07-19T16:33:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 431 | java | package com.tencent.mm.app.plugin.b;
import com.tencent.mm.e.a.di;
import com.tencent.mm.sdk.c.c;
public final class a$a
extends c<di>
{
a.i aah;
a.e aai;
a.f aaj;
a.d aak;
a.h aal;
a.g aam;
a.c aan;
a.b aao;
public a$a()
{
kum = di.class.getName().hashCode();
}
}
/* Location:
* Qualified Name: com.tencent.mm.app.plugin.b.a.a
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
2ee38527095a7729dd554b74697a10abac5b8ee4 | 5e2cab8845e635b75f699631e64480225c1cf34d | /modules/core/org.jowidgets.impl/src/main/java/org/jowidgets/impl/convert/UnitConverter.java | def55da7e2f8eae319ff2666fdfc72a2c8d42854 | [
"BSD-3-Clause"
] | permissive | alec-liu/jo-widgets | 2277374f059500dfbdb376333743d5507d3c57f4 | a1dde3daf1d534cb28828795d1b722f83654933a | refs/heads/master | 2022-04-18T02:36:54.239029 | 2018-06-08T13:08:26 | 2018-06-08T13:08:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,164 | java | /*
* Copyright (c) 2014, grossmann
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the jo-widgets.org 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 jo-widgets.org 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 org.jowidgets.impl.convert;
import org.jowidgets.tools.converter.AbstractObjectStringConverter;
import org.jowidgets.unit.api.IUnit;
final class UnitConverter extends AbstractObjectStringConverter<IUnit> {
@Override
public String convertToString(final IUnit value) {
if (value != null) {
return value.getAbbreviation();
}
return null;
}
@Override
public String getDescription(final IUnit value) {
if (value != null) {
return value.getName();
}
return null;
}
}
| [
"herrgrossmann@users.noreply.github.com"
] | herrgrossmann@users.noreply.github.com |
05147c013d0cc22f37122a413d200612c88d7a38 | ab6c0bc74dff2b522618ae4192b63ca879f3d07a | /utp-manage-ht/utp-manage-api/src/main/java/com/scenetec/upf/operation/web/trade/TradeFlowCashController.java | f1c69552c3c5c2d7bf470a25cc3583c6008407a9 | [] | no_license | exyangbang/learngit | 9669cb329c9686db96bd250a6ceceaf44f02e945 | 12c92df41a6b778a9db132c37dd136bedfd5b56f | refs/heads/master | 2023-02-16T20:49:57.437363 | 2021-01-16T07:45:17 | 2021-01-16T07:45:17 | 330,107,905 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,076 | java | package com.scenetec.upf.operation.web.trade;
import com.scenetec.upf.operation.service.trade.TradeFlowCashService;
import com.scenetec.zeus.daogenerator.model.Query;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
/**
* @author LIFA
* @date 2018/07/24
*/
@ApiIgnore
@Api(value="交易流水接口",tags={"交易流水"})
@RestController
public class TradeFlowCashController {
@Resource
TradeFlowCashService service;
@ApiOperation(value = "分页获取交易流水列表", notes = "分页获取交易流水列表")
@RequestMapping(value = "/api/tradeFlowCash/list", method = RequestMethod.POST)
public String list(@RequestBody Query query) {
return service.list(query);
}
}
| [
"945288603@qq.com"
] | 945288603@qq.com |
5ab490f29911f9106ac94736b58b716261ce5802 | 63e0cd899972adbb117a17d8d40eef8fefb56d62 | /spring_framework/spring3_project02/src/main/java/com/sc/spring3/aop/Drummer.java | 4755b4624170cfd0a4976a17662fb15aa0cfb26f | [] | no_license | sherazc/playground | 8b90e1f7b624a77a3f3e9cf5f71eecf984aa8180 | 7fe926d2564b12d96f237b253511dd7c2a302b64 | refs/heads/master | 2023-08-16T17:22:29.564713 | 2023-08-16T04:34:52 | 2023-08-16T04:34:52 | 87,116,642 | 2 | 1 | null | 2023-05-04T18:25:45 | 2017-04-03T20:15:15 | PHP | UTF-8 | Java | false | false | 301 | java | package com.sc.spring3.aop;
public class Drummer implements Performer {
public void perform(int count) {
if (count < 1) {
throw new RuntimeException("Can not perform less then one time.");
}
for (int i = 1; i <= count; i++) {
System.out.println("Druming: " + i);
}
}
}
| [
"sheraz@mbp.com"
] | sheraz@mbp.com |
bc4389fd8a439b8cf3fb554a3ed68c0da10f7a25 | 1fda1cd4e396bf7c2bfcd8cf1fa4e87c6aaec047 | /src/main/java/top/zywork/controller/GoodsSkuAttributeValueController.java | 2a26bca9e9b9be663c86a4f9f3791a3667aa913e | [] | no_license | ICLYJ/zywork-app | cdd5bae97da49ccbca882196f2c4e5d523edebba | ab5d9a3107b90c891707e0153dab89134565cd59 | refs/heads/master | 2020-06-19T14:06:01.626421 | 2019-07-13T09:05:00 | 2019-07-13T09:05:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,236 | java | package top.zywork.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import top.zywork.common.BeanUtils;
import top.zywork.dto.PagerDTO;
import top.zywork.query.GoodsSkuAttributeValueQuery;
import top.zywork.service.GoodsSkuAttributeValueService;
import top.zywork.vo.GoodsSkuAttributeValueVO;
import top.zywork.vo.PagerVO;
import top.zywork.vo.ResponseStatusVO;
/**
* GoodsSkuAttributeValueController控制器类<br/>
*
* 创建于2019-07-12<br/>
*
* @author http://zywork.top 王振宇
* @version 1.0
*/
@RestController
@RequestMapping("/goods-sku-attr-val")
@Slf4j
public class GoodsSkuAttributeValueController extends BaseController {
private GoodsSkuAttributeValueService goodsSkuAttributeValueService;
@GetMapping("admin/multi/{id}")
public ResponseStatusVO listById(@PathVariable("id") Long id) {
PagerDTO pagerDTO = goodsSkuAttributeValueService.listById(id);
PagerVO pagerVO = BeanUtils.copy(pagerDTO, PagerVO.class);
pagerVO.setRows(BeanUtils.copyList(pagerDTO.getRows(), GoodsSkuAttributeValueVO.class));
return ResponseStatusVO.ok("查询成功", pagerVO);
}
@GetMapping("admin/all")
public ResponseStatusVO listAll() {
PagerDTO pagerDTO = goodsSkuAttributeValueService.listAll();
PagerVO pagerVO = BeanUtils.copy(pagerDTO, PagerVO.class);
pagerVO.setRows(BeanUtils.copyList(pagerDTO.getRows(), GoodsSkuAttributeValueVO.class));
return ResponseStatusVO.ok("查询成功", pagerVO);
}
@PostMapping("admin/all-cond")
public ResponseStatusVO listAllByCondition(@RequestBody GoodsSkuAttributeValueQuery goodsSkuAttributeValueQuery) {
PagerDTO pagerDTO = goodsSkuAttributeValueService.listAllByCondition(goodsSkuAttributeValueQuery);
PagerVO pagerVO = BeanUtils.copy(pagerDTO, PagerVO.class);
pagerVO.setRows(BeanUtils.copyList(pagerDTO.getRows(), GoodsSkuAttributeValueVO.class));
return ResponseStatusVO.ok("查询成功", pagerVO);
}
@PostMapping("admin/pager-cond")
public ResponseStatusVO listPageByCondition(@RequestBody GoodsSkuAttributeValueQuery goodsSkuAttributeValueQuery) {
PagerDTO pagerDTO = goodsSkuAttributeValueService.listPageByCondition(goodsSkuAttributeValueQuery);
PagerVO pagerVO = BeanUtils.copy(pagerDTO, PagerVO.class);
pagerVO.setRows(BeanUtils.copyList(pagerDTO.getRows(), GoodsSkuAttributeValueVO.class));
return ResponseStatusVO.ok("查询成功", pagerVO);
}
/**
* 根据一级类目编号和相关查询条件获取商品的SKU信息,包含标题,价格,图片,销量等
* @param categoryId
* @param goodsSkuAttributeValueQuery
* @return
*/
@PostMapping("any/goods-sku-attr/{categoryId}")
public ResponseStatusVO anyListPageByCondition(@PathVariable("categoryId") Long categoryId, @RequestBody GoodsSkuAttributeValueQuery goodsSkuAttributeValueQuery) {
PagerDTO pagerDTO = goodsSkuAttributeValueService.listGoodsSkuAttrByCondition(categoryId, goodsSkuAttributeValueQuery);
PagerVO pagerVO = BeanUtils.copy(pagerDTO, PagerVO.class);
pagerVO.setRows(BeanUtils.copyList(pagerDTO.getRows(), GoodsSkuAttributeValueVO.class));
return ResponseStatusVO.ok("查询成功", pagerVO);
}
/**
* 根据查询条件获取热门商品的SKU信息,包含标题,价格,图片,销量等
* @param goodsSkuAttributeValueQuery
* @return
*/
@PostMapping("any/hot-goods-sku-attr")
public ResponseStatusVO anyListHotPageByCondition(@RequestBody GoodsSkuAttributeValueQuery goodsSkuAttributeValueQuery) {
PagerDTO pagerDTO = goodsSkuAttributeValueService.listHotGoodsSkuAttrByCondition(goodsSkuAttributeValueQuery);
PagerVO pagerVO = BeanUtils.copy(pagerDTO, PagerVO.class);
pagerVO.setRows(BeanUtils.copyList(pagerDTO.getRows(), GoodsSkuAttributeValueVO.class));
return ResponseStatusVO.ok("查询成功", pagerVO);
}
/**
* 根据三级类目编号和相关查询条件获取商品的SKU信息,包含标题,价格,图片,销量等
* @param categoryId
* @param goodsSkuAttributeValueQuery
* @return
*/
@PostMapping("any/category-goods-sku-attr/{categoryId}")
public ResponseStatusVO anyCategoryListPageByCondition(@PathVariable("categoryId") Long categoryId, @RequestBody GoodsSkuAttributeValueQuery goodsSkuAttributeValueQuery) {
PagerDTO pagerDTO = goodsSkuAttributeValueService.listCategoryGoodsSkuAttrByCondition(categoryId, goodsSkuAttributeValueQuery);
PagerVO pagerVO = BeanUtils.copy(pagerDTO, PagerVO.class);
pagerVO.setRows(BeanUtils.copyList(pagerDTO.getRows(), GoodsSkuAttributeValueVO.class));
return ResponseStatusVO.ok("查询成功", pagerVO);
}
@Autowired
public void setGoodsSkuAttributeValueService(GoodsSkuAttributeValueService goodsSkuAttributeValueService) {
this.goodsSkuAttributeValueService = goodsSkuAttributeValueService;
}
}
| [
"847315251@qq.com"
] | 847315251@qq.com |
ecd9aedde8383fb1c78d99a5619b4c05e7b6b73b | ef7b7ebd6470c0857a5ee7af4f1416fba54866e3 | /choco-kernel/src/main/java/choco/kernel/common/util/bitmask/IBitMask.java | 52a43e3a33edfc6589dc1e2d5f682574fec51354 | [] | no_license | JLiangWaterloo/choco2 | 4ba197bb0ad13c419d0fe2344be7dc3e05b6b528 | b6cbd88f942b2090b6860c6fe82c186c2b1b436d | refs/heads/master | 2020-05-31T21:12:24.875908 | 2013-03-17T16:38:08 | 2013-03-17T16:38:08 | 8,834,140 | 0 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,808 | java | /**
* Copyright (c) 1999-2010, Ecole des Mines de Nantes
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Ecole des Mines de Nantes 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 REGENTS 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 REGENTS AND 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 choco.kernel.common.util.bitmask;
// TODO - Replace by Enum and EnumSet ? - created 10 juil. 2011 by Arnaud Malapert
public interface IBitMask {
long getBitMask();
}
| [
"paradoxical.reasoning@gmail.com"
] | paradoxical.reasoning@gmail.com |
e1dd3240ca0fb3be5e7fd625f4f7510b322bc24a | 17e8438486cb3e3073966ca2c14956d3ba9209ea | /dso/tags/2.2-stable/code/base/dso-l2/src/com/tc/objectserver/managedobject/SetManagedObjectState.java | 26e17e4548fb6ce4a04ff269688841c77a35866e | [] | no_license | sirinath/Terracotta | fedfc2c4f0f06c990f94b8b6c3b9c93293334345 | 00a7662b9cf530dfdb43f2dd821fa559e998c892 | refs/heads/master | 2021-01-23T05:41:52.414211 | 2015-07-02T15:21:54 | 2015-07-02T15:21:54 | 38,613,711 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,287 | java | /*
* All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
*/
package com.tc.objectserver.managedobject;
import com.tc.object.ObjectID;
import com.tc.object.SerializationUtil;
import com.tc.object.dna.api.DNACursor;
import com.tc.object.dna.api.DNAWriter;
import com.tc.object.dna.api.LogicalAction;
import com.tc.objectserver.mgmt.LogicalManagedObjectFacade;
import com.tc.objectserver.mgmt.ManagedObjectFacade;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
/**
* ManagedObjectState for sets.
*/
public class SetManagedObjectState extends LogicalManagedObjectState {
protected Set references;
SetManagedObjectState(long classID) {
super(classID);
this.references = new LinkedHashSet(1, 0.75f); // Accommodating LinkedHashSet.
}
protected SetManagedObjectState(ObjectInput in) throws IOException {
super(in);
}
public void apply(ObjectID objectID, DNACursor cursor, BackReferences includeIDs) throws IOException {
while (cursor.next()) {
LogicalAction action = cursor.getLogicalAction();
int method = action.getMethod();
Object[] params = action.getParameters();
apply(objectID, method, params, includeIDs);
}
}
protected void apply(ObjectID objectID, int method, Object[] params, BackReferences includeIDs) {
switch (method) {
case SerializationUtil.ADD:
Object v = getValue(params);
addChangeToCollector(objectID, v, includeIDs);
references.add(v);
break;
case SerializationUtil.REMOVE:
references.remove(params[0]);
break;
case SerializationUtil.REMOVE_ALL:
references.removeAll(Arrays.asList(params));
break;
case SerializationUtil.CLEAR:
references.clear();
break;
default:
throw new AssertionError("Invalid action:" + method);
}
}
private Object getValue(Object[] params) {
// hack for trove sets which replace the old set value (java ones do the opposite) clean this up
return params.length == 2 ? params[1] : params[0];
}
private void addChangeToCollector(ObjectID objectID, Object newValue, BackReferences includeIDs) {
if (newValue instanceof ObjectID) {
getListener().changed(objectID, null, (ObjectID) newValue);
includeIDs.addBackReference((ObjectID) newValue, objectID);
}
}
public void dehydrate(ObjectID objectID, DNAWriter writer) {
for (Iterator i = references.iterator(); i.hasNext();) {
Object value = i.next();
writer.addLogicalAction(SerializationUtil.ADD, new Object[] { value });
}
}
protected Collection getAllReferences() {
return Collections.unmodifiableSet(this.references);
}
public ManagedObjectFacade createFacade(ObjectID objectID, String className, int limit) {
final int size = references.size();
if (limit < 0) {
limit = size;
} else {
limit = Math.min(limit, size);
}
Object[] data = new Object[limit];
int index = 0;
for (Iterator iter = references.iterator(); iter.hasNext() && index < limit; index++) {
data[index] = iter.next();
}
return LogicalManagedObjectFacade.createSetInstance(objectID, className, data, size);
}
public byte getType() {
return SET_TYPE;
}
protected void basicWriteTo(ObjectOutput out) throws IOException {
out.writeInt(references.size());
for (Iterator i = references.iterator(); i.hasNext();) {
out.writeObject(i.next());
}
}
protected boolean basicEquals(LogicalManagedObjectState o) {
SetManagedObjectState mo = (SetManagedObjectState) o;
return references.equals(mo.references);
}
static SetManagedObjectState readFrom(ObjectInput in) throws IOException, ClassNotFoundException {
SetManagedObjectState setmo = new SetManagedObjectState(in);
int size = in.readInt();
Set set = new LinkedHashSet(size, 0.75f);
for (int i = 0; i < size; i++) {
set.add(in.readObject());
}
setmo.references = set;
return setmo;
}
}
| [
"jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864"
] | jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864 |
ce2a81ee21f9566574aa669bada5121795ce4aa6 | de077e29e6f63f6df43ec119d9b2a3318563e221 | /core/src/main/java/xdi2/core/util/iterators/MappingContextNodeXriIterator.java | 2e22b9d40a424f3dad1e5ca856e4a9012e3944e3 | [
"MIT"
] | permissive | prashaantt/xdi2 | 8a0eb292355118218fb06aa28c2c5857d58b8933 | 48c0d4d0fa554120294ebe59676bfa574495881e | refs/heads/master | 2021-01-18T16:50:48.042723 | 2012-11-06T09:55:31 | 2012-11-06T09:55:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 552 | java | package xdi2.core.util.iterators;
import java.util.Iterator;
import xdi2.core.ContextNode;
import xdi2.core.xri3.impl.XRI3Segment;
/**
* A MappingIterator that maps XDI context nodes to their XRIs.
*
* @author markus
*/
public class MappingContextNodeXriIterator extends MappingIterator<ContextNode, XRI3Segment> {
public MappingContextNodeXriIterator(Iterator<ContextNode> contextNodes) {
super(contextNodes);
}
@Override
public XRI3Segment map(ContextNode contextNode) {
return contextNode.getXri();
}
}
| [
"markus.sabadello@gmail.com"
] | markus.sabadello@gmail.com |
8b200071ba2534506ea211481e121bcb75ba9f46 | ba07b506d508edd0a615de542595ad1346404143 | /Trunk/40 - Source/oneConnect/OneConnect/OneConnect/MsbPackager/src/vn/com/msb/as400/dsp/packager/DSP15311IPackager.java | b29fea4232ef10108251cef52e7ddb4ae3ab80d2 | [] | no_license | liuning587/ESB-MSB | 14f5b8086be39ed1c2b43dec509ce272fa282ff5 | 9a5be312bd17abf8208c3b82409c927de1da9d93 | refs/heads/master | 2021-01-18T00:42:53.520872 | 2015-05-25T01:27:13 | 2015-05-25T01:27:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 739 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: DSP15311IPackager.java
package vn.com.msb.as400.dsp.packager;
import vn.com.msb.as400.dsp.*;
public class DSP15311IPackager extends DSPPackager
{
public DSP15311IPackager()
{
}
public void declare()
{
DSPField fld[] = null;
fld = (new DSPField[] {
new DSPPackedField(10, 0, "Description for field 1"), new DSPCharField(12, "Description for field 2"), new DSPCharField(1, "Description for field 3"), new DSPCharField(19, "Description for field 4")
});
addBody("15311I".toUpperCase(), fld);
}
}
| [
"manhdungkhmt1k3@gmail.com"
] | manhdungkhmt1k3@gmail.com |
8329828b5a7e6eea6490c812c5e08b0bbb4c0315 | 7b73756ba240202ea92f8f0c5c51c8343c0efa5f | /classes/com/tencent/mobileqq/activity/aio/item/ShortVideoPTVItemBuilder$PtvPlayConfig.java | 1523c1dd9d179208f5f4d54f800af9c47d5af14a | [] | no_license | meeidol-luo/qooq | 588a4ca6d8ad579b28dec66ec8084399fb0991ef | e723920ac555e99d5325b1d4024552383713c28d | refs/heads/master | 2020-03-27T03:16:06.616300 | 2016-10-08T07:33:58 | 2016-10-08T07:33:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,528 | java | package com.tencent.mobileqq.activity.aio.item;
import android.text.TextUtils;
import com.tencent.mobileqq.app.DeviceProfileManager;
import com.tencent.mobileqq.app.DeviceProfileManager.DpcNames;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
import com.tencent.qphone.base.util.QLog;
public class ShortVideoPTVItemBuilder$PtvPlayConfig
{
public static int a = 0;
private static final String a = "ShortVideo.PtvPlayConfig";
public static boolean a;
public static int b;
public static boolean b;
static
{
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
jdField_b_of_type_Boolean = true;
jdField_a_of_type_Int = 15;
jdField_b_of_type_Int = 20;
}
public static void a()
{
Object localObject;
if (!jdField_a_of_type_Boolean)
{
localObject = DeviceProfileManager.a().a(DeviceProfileManager.DpcNames.PtvConfig.name(), null);
if (QLog.isColorLevel()) {
QLog.d("ShortVideo.PtvPlayConfig", 2, "initConfig(), ptvConfig=" + (String)localObject);
}
if (TextUtils.isEmpty((CharSequence)localObject)) {
break label211;
}
localObject = ((String)localObject).split("\\|");
if ((localObject != null) && (localObject.length >= 3) && (TextUtils.isEmpty(localObject[0]))) {}
}
try
{
jdField_b_of_type_Int = Integer.parseInt(localObject[0]);
if (!TextUtils.isEmpty(localObject[1])) {
jdField_b_of_type_Boolean = localObject[1].equals("1");
}
if (!TextUtils.isEmpty(localObject[2])) {}
for (;;)
{
try
{
jdField_a_of_type_Int = Integer.parseInt(localObject[2]);
jdField_a_of_type_Boolean = true;
if (QLog.isColorLevel()) {
QLog.d("ShortVideo.PtvPlayConfig", 2, "initConfig(), sReadFromDPC=" + jdField_a_of_type_Boolean + ", sAutoPlayInAIO:" + jdField_b_of_type_Boolean + ", sRequestedFPS:" + jdField_a_of_type_Int + ",sPtvMaxTime:" + jdField_b_of_type_Int);
}
return;
}
catch (Exception localException1)
{
jdField_a_of_type_Int = 15;
continue;
}
label211:
jdField_b_of_type_Boolean = true;
jdField_a_of_type_Int = 15;
}
}
catch (Exception localException2)
{
for (;;) {}
}
}
}
/* Location: E:\apk\QQ_91\classes-dex2jar.jar!\com\tencent\mobileqq\activity\aio\item\ShortVideoPTVItemBuilder$PtvPlayConfig.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"1776098770@qq.com"
] | 1776098770@qq.com |
091baf423e35fd18eb39d0a1f4433bd27062466f | 40ded5811fc9113d0f6657e7a19800ca562fcd00 | /com/faw_qm/jferp/ejb/entity/RouteAndBomYiQiHomeDelegate.java | 588ad1dd6f155f007bc0177b2e16488a7c9b52ed | [] | no_license | jlcczzj/chengduCode | 9ba3001654e02bd099e7f702e441d171b726549b | 7de3580e5650e8674b9cf14583367bec82bd5801 | refs/heads/master | 2020-03-23T16:08:04.366204 | 2018-01-28T02:55:26 | 2018-01-28T02:55:26 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,484 | java | /**
* 生成程序MaterialStructureHomeDelegate.java 1.0 2007-9-25
* 版权归启明信息技术股份有限公司所有
* 本程序属启明信息技术股份有限公司的私有机要资料
* 未经本公司授权不得非法传播和盗用
* 可在本公司授权范围内使用本程序
* 保留所有权利
*/
package com.faw_qm.jferp.ejb.entity;
import java.sql.Timestamp;
import javax.ejb.CreateException;
import javax.ejb.FinderException;
import com.faw_qm.framework.exceptions.QMRuntimeException;
import com.faw_qm.framework.service.BaseValueIfc;
import com.faw_qm.framework.service.BsoHomeDelegate;
import com.faw_qm.framework.service.BsoReference;
/**
* <p>Title: 。</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2007</p>
* <p>Company: 启明信息技术股份有限公司</p>
* @author 谢斌
* @version 1.0
*/
public class RouteAndBomYiQiHomeDelegate implements BsoHomeDelegate
{
/**
*
*/
public RouteAndBomYiQiHomeDelegate()
{
super();
}
private RouteAndBomYiQiHome home = null;
/* (非 Javadoc)
* @see com.faw_qm.framework.service.BsoHomeDelegate#create(com.faw_qm.framework.service.BaseValueIfc)
*/
public BsoReference create(BaseValueIfc info) throws CreateException
{
return home.create(info);
}
/* (非 Javadoc)
* @see com.faw_qm.framework.service.BsoHomeDelegate#create(com.faw_qm.framework.service.BaseValueIfc, java.sql.Timestamp, java.sql.Timestamp)
*/
public BsoReference create(BaseValueIfc info, Timestamp ct, Timestamp mt)
throws CreateException
{
return home.create(info, ct, mt);
}
/* (非 Javadoc)
* @see com.faw_qm.framework.service.BsoHomeDelegate#findByPrimaryKey(java.lang.String)
*/
public BsoReference findByPrimaryKey(String bsoID) throws FinderException
{
return home.findByPrimaryKey(bsoID);
}
/* (非 Javadoc)
* @see com.faw_qm.framework.service.HomeDelegate#init(java.lang.Object)
*/
public void init(Object obj)
{
if(!(obj instanceof RouteAndBomYiQiHome))
{
Object[] objs = {obj.getClass(), "JFRouteAndBomYiQiHome"};
throw new QMRuntimeException(
"com.faw_qm.framework.util.FrameworkResource", "70", objs);
}
home = (RouteAndBomYiQiHome) obj;
}
}
| [
"mario@Mario-PC"
] | mario@Mario-PC |
6cd8b148c477b90983027881904f323c4501bd5a | b66bdee811ed0eaea0b221fea851f59dd41e66ec | /src/com/google/gson/DefaultDateTypeAdapter.java | f3a242e0331d97bca2d55492c052e169155b85f5 | [] | no_license | reverseengineeringer/com.grubhub.android | 3006a82613df5f0183e28c5e599ae5119f99d8da | 5f035a4c036c9793483d0f2350aec2997989f0bb | refs/heads/master | 2021-01-10T05:08:31.437366 | 2016-03-19T20:41:23 | 2016-03-19T20:41:23 | 54,286,207 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,035 | java | package com.google.gson;
import java.lang.reflect.Type;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Locale;
final class DefaultDateTypeAdapter
implements JsonDeserializer<java.util.Date>, JsonSerializer<java.util.Date>
{
private final DateFormat enUsFormat;
private final DateFormat localFormat;
DefaultDateTypeAdapter()
{
this(DateFormat.getDateTimeInstance(2, 2, Locale.US), DateFormat.getDateTimeInstance(2, 2));
}
DefaultDateTypeAdapter(int paramInt)
{
this(DateFormat.getDateInstance(paramInt, Locale.US), DateFormat.getDateInstance(paramInt));
}
public DefaultDateTypeAdapter(int paramInt1, int paramInt2)
{
this(DateFormat.getDateTimeInstance(paramInt1, paramInt2, Locale.US), DateFormat.getDateTimeInstance(paramInt1, paramInt2));
}
DefaultDateTypeAdapter(String paramString)
{
this(new SimpleDateFormat(paramString, Locale.US), new SimpleDateFormat(paramString));
}
DefaultDateTypeAdapter(DateFormat paramDateFormat1, DateFormat paramDateFormat2)
{
enUsFormat = paramDateFormat1;
localFormat = paramDateFormat2;
}
private java.util.Date deserializeToDate(JsonElement paramJsonElement)
{
java.util.Date localDate2;
synchronized (localFormat)
{
try
{
java.util.Date localDate1 = localFormat.parse(paramJsonElement.getAsString());
return localDate1;
}
catch (ParseException localParseException1) {}
}
}
public java.util.Date deserialize(JsonElement paramJsonElement, Type paramType, JsonDeserializationContext paramJsonDeserializationContext)
throws JsonParseException
{
if (!(paramJsonElement instanceof JsonPrimitive)) {
throw new JsonParseException("The date should be a string value");
}
paramJsonElement = deserializeToDate(paramJsonElement);
if (paramType == java.util.Date.class) {
return paramJsonElement;
}
if (paramType == Timestamp.class) {
return new Timestamp(paramJsonElement.getTime());
}
if (paramType == java.sql.Date.class) {
return new java.sql.Date(paramJsonElement.getTime());
}
throw new IllegalArgumentException(getClass() + " cannot deserialize to " + paramType);
}
public JsonElement serialize(java.util.Date paramDate, Type arg2, JsonSerializationContext paramJsonSerializationContext)
{
synchronized (localFormat)
{
paramDate = new JsonPrimitive(enUsFormat.format(paramDate));
return paramDate;
}
}
public String toString()
{
StringBuilder localStringBuilder = new StringBuilder();
localStringBuilder.append(DefaultDateTypeAdapter.class.getSimpleName());
localStringBuilder.append('(').append(localFormat.getClass().getSimpleName()).append(')');
return localStringBuilder.toString();
}
}
/* Location:
* Qualified Name: com.google.gson.DefaultDateTypeAdapter
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
0c4ec9dd3dc6c71d60bd1a3e06b34a61df4b121b | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/Cli-36/org.apache.commons.cli.OptionGroup/BBC-F0-opt-100/29/org/apache/commons/cli/OptionGroup_ESTest.java | 5e57583d6318c35739b0b91c3b068d9336736841 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 5,106 | java | /*
* This file was automatically generated by EvoSuite
* Sat Oct 23 05:02:29 GMT 2021
*/
package org.apache.commons.cli;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Collection;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionGroup;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class OptionGroup_ESTest extends OptionGroup_ESTest_scaffolding {
@Test(timeout = 4000)
public void test00() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
optionGroup0.setRequired(true);
boolean boolean0 = optionGroup0.isRequired();
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test01() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("_", "_");
optionGroup0.setSelected(option0);
String string0 = optionGroup0.getSelected();
assertEquals("_", string0);
}
@Test(timeout = 4000)
public void test02() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("", true, "");
optionGroup0.setSelected(option0);
String string0 = optionGroup0.getSelected();
assertEquals("", string0);
}
@Test(timeout = 4000)
public void test03() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
// Undeclared exception!
// try {
optionGroup0.addOption((Option) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.cli.OptionGroup", e);
// }
}
@Test(timeout = 4000)
public void test04() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Collection<Option> collection0 = optionGroup0.getOptions();
assertNotNull(collection0);
}
@Test(timeout = 4000)
public void test05() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option((String) null, false, "'");
OptionGroup optionGroup1 = optionGroup0.addOption(option0);
Option option1 = new Option("G", "G", true, "]");
optionGroup1.addOption(option1);
String string0 = optionGroup1.toString();
assertEquals("[--null ', -G ]]", string0);
}
@Test(timeout = 4000)
public void test06() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("", "", false, (String) null);
optionGroup0.addOption(option0);
String string0 = optionGroup0.toString();
assertEquals("[-]", string0);
}
@Test(timeout = 4000)
public void test07() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("", "", false, (String) null);
optionGroup0.setSelected(option0);
Option option1 = new Option((String) null, "");
// try {
optionGroup0.setSelected(option1);
// fail("Expecting exception: Exception");
// } catch(Exception e) {
// //
// // The option 'null' was specified but an option from this group has already been selected: ''
// //
// verifyException("org.apache.commons.cli.OptionGroup", e);
// }
}
@Test(timeout = 4000)
public void test08() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
optionGroup0.setSelected((Option) null);
assertNull(optionGroup0.getSelected());
}
@Test(timeout = 4000)
public void test09() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("_", "_");
optionGroup0.setSelected(option0);
optionGroup0.setSelected(option0);
assertNull(option0.getValue());
}
@Test(timeout = 4000)
public void test10() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
String string0 = optionGroup0.getSelected();
assertNull(string0);
}
@Test(timeout = 4000)
public void test11() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Collection<String> collection0 = optionGroup0.getNames();
assertNotNull(collection0);
}
@Test(timeout = 4000)
public void test12() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
optionGroup0.setRequired(true);
Option option0 = new Option("_", "_");
optionGroup0.addOption(option0);
assertTrue(optionGroup0.isRequired());
}
@Test(timeout = 4000)
public void test13() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
boolean boolean0 = optionGroup0.isRequired();
assertFalse(boolean0);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
a3fa0bee0ff9f86c78e19ce63eb91cf4ee4e4da4 | add554d49171aecfb2ca4d504db7c6e9c50e9124 | /app/src/main/java/com/csjbot/blackgaga/util/AudioUtil.java | d5984fad95af16294aa500d958b2a91a2a2b9f63 | [] | no_license | iamkhan001/RoboDemo | 2a9ae5e359bafdfc5cd991ddde7c14067b8de088 | 11b5e4a7a0bc45c34af593b369cd85dcc74b7a67 | refs/heads/master | 2020-05-25T10:23:25.479284 | 2019-05-21T03:53:30 | 2019-05-21T03:53:30 | 187,757,641 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,953 | java | package com.csjbot.blackgaga.util;
import android.media.MediaPlayer;
import android.text.TextUtils;
/**
* Created by jingwc on 2017/7/20.
*/
public class AudioUtil {
private MediaPlayer mediaPlayer = null;
public AudioUtil() {
if (mediaPlayer == null) {
mediaPlayer = new MediaPlayer();
}
}
public void play(String path, PlayCompleteListener playCompleteListener) {
if(TextUtils.isEmpty(path)){
return;
}
if (mediaPlayer != null) {
try {
//重用MediaPlayer对象
mediaPlayer.reset();
mediaPlayer.setOnCompletionListener(mediaPlayer1 -> {
if(playCompleteListener != null) {
playCompleteListener.complete();
}
});
mediaPlayer.setDataSource (path);
mediaPlayer.prepareAsync();
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mediaPlayer) {
mediaPlayer.start();
}
});
} catch (Exception e) {
}
}
}
public void pause() {
if (mediaPlayer != null && mediaPlayer.isPlaying()) {
mediaPlayer.pause();
}
}
public void restart() {
if (mediaPlayer != null) {
mediaPlayer.start();
}
}
public void stop(){
if(mediaPlayer != null) {
mediaPlayer.stop();
}
}
public void release() {
if (mediaPlayer != null) {
if (mediaPlayer.isPlaying()) {
mediaPlayer.stop();
}
mediaPlayer.release();
mediaPlayer = null;
}
}
public interface PlayCompleteListener {
void complete();
}
}
| [
"imran.k@in.adoroi.com"
] | imran.k@in.adoroi.com |
cf9164eb8945af81c95aa9a7f230570a7cf0f56b | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava13/Foo455Test.java | f1d75d457b7bb9a5d8600f109b86ae7c3baee68f | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 482 | java | package applicationModulepackageJava13;
import org.junit.Test;
public class Foo455Test {
@Test
public void testFoo0() {
new Foo455().foo0();
}
@Test
public void testFoo1() {
new Foo455().foo1();
}
@Test
public void testFoo2() {
new Foo455().foo2();
}
@Test
public void testFoo3() {
new Foo455().foo3();
}
@Test
public void testFoo4() {
new Foo455().foo4();
}
@Test
public void testFoo5() {
new Foo455().foo5();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
fa8a24cd16e1785b549bb72386b9a6676d82b074 | cf1fecbb47fb2634485bb17995adf796d2b5c04f | /workstation-web/src/main/java/com/qing/niu/workstation/web/jdk/concurrency/executors/ExecutorsDemo1.java | 308958d90e34e6a5c2d9427788ed0261ee4df8bf | [] | no_license | alangui/communication | c19c1c5a0e99b7cacaab5493d76579a481735f18 | 2a73672400d0f0d8694eec8c390627a039f1c2d2 | refs/heads/master | 2022-12-23T00:33:18.747065 | 2021-01-19T03:10:17 | 2021-01-19T03:10:17 | 155,523,863 | 0 | 0 | null | 2022-12-15T23:34:39 | 2018-10-31T08:31:46 | Java | UTF-8 | Java | false | false | 2,640 | java | package com.qing.niu.workstation.web.jdk.concurrency.executors;
import java.sql.Time;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.stream.IntStream;
/**
* <p>
* </p>
*
* @Author Gui Jin Kang
* @Date 2020/7/5 17:41
* @ProjectName communication
* @Version 1.0.0
*/
public class ExecutorsDemo1 {
public static void main(String[] args) throws InterruptedException {
// useCacheThreadPool();
// useFixedSizePool();
useSinglePool();
}
private static void useCacheThreadPool() throws InterruptedException {
ExecutorService executorService = Executors.newCachedThreadPool();
System.out.println(((ThreadPoolExecutor)executorService).getActiveCount());
executorService.execute(() -> System.out.println("====================="));
System.out.println(((ThreadPoolExecutor)executorService).getActiveCount());
IntStream.range(0,100).boxed().forEach(i -> executorService.execute(() -> {
try {
TimeUnit.SECONDS.sleep(10);
} catch (InterruptedException e) {
}
System.out.println(Thread.currentThread().getName() + " [" + i + "] ");
}));
TimeUnit.SECONDS.sleep(1);
System.out.println(((ThreadPoolExecutor)executorService).getActiveCount());
}
private static void useFixedSizePool(){
ExecutorService executorService = Executors.newFixedThreadPool(10);
System.out.println(((ThreadPoolExecutor)executorService).getActiveCount());
IntStream.range(0,10).forEach(i -> executorService.execute(() -> {
try {
TimeUnit.SECONDS.sleep(10);
System.out.println("========" + i + "=========");
} catch (InterruptedException e) {
}
}));
System.out.println(((ThreadPoolExecutor)executorService).getActiveCount());
}
private static void useSinglePool(){
/**
* 对ThreadPoolExecutor进行了包装, 该线程池对像类屏蔽了ThreadPoolExecutor方法
*/
ExecutorService executorService = Executors.newSingleThreadExecutor();
IntStream.range(0,10).forEach(i -> executorService.execute(() -> {
try {
TimeUnit.SECONDS.sleep(10);
System.out.println("========" + i + "=========");
} catch (InterruptedException e) {
}
}));
System.out.println(((ThreadPoolExecutor)executorService).getActiveCount());
}
}
| [
"2516394328@qq.com"
] | 2516394328@qq.com |
cd9785768d48cb9e36f3aa7e31e0724e9e0ae8ea | 1aef4669e891333de303db570c7a690c122eb7dd | /src/main/java/com/alipay/api/domain/BaseInfo.java | 7362b66e5a16aeb774ca9b1f296b881cfb085b6e | [
"Apache-2.0"
] | permissive | fossabot/alipay-sdk-java-all | b5d9698b846fa23665929d23a8c98baf9eb3a3c2 | 3972bc64e041eeef98e95d6fcd62cd7e6bf56964 | refs/heads/master | 2020-09-20T22:08:01.292795 | 2019-11-28T08:12:26 | 2019-11-28T08:12:26 | 224,602,331 | 0 | 0 | Apache-2.0 | 2019-11-28T08:12:26 | 2019-11-28T08:12:25 | null | UTF-8 | Java | false | false | 4,032 | java | package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 企业基础信息
*
* @author auto create
* @since 1.0, 2016-10-26 17:43:41
*/
public class BaseInfo extends AlipayObject {
private static final long serialVersionUID = 3837542282653759417L;
/**
* 支付宝服务窗名称
*/
@ApiField("alipay_fuwu_name")
private String alipayFuwuName;
/**
* 如果商户的app需要签约使用移动快捷支付产品,需要上传该app的名称
*/
@ApiField("app_name")
private String appName;
/**
* 企业联系人信息
*/
@ApiListField("contact_info")
@ApiField("contact_person_info")
private List<ContactPersonInfo> contactInfo;
/**
* 企业logo图片
*/
@ApiField("logo_pic")
private String logoPic;
/**
* 所属MCCCode,详情可参考
<a href="https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.59bgD2&treeId=222&articleId=105364&docType=1#s1
">商家经营类目</a>
*/
@ApiField("mcc_code")
private String mccCode;
/**
* 企业别称,例如浙江飞猪网络有限公司别称为阿里旅行。需要签约芝麻信用产品必须要传入该字段
*/
@ApiField("short_name")
private String shortName;
/**
* 企业特殊资质图片,可参考
<a href="https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.59bgD2&treeId=222&articleId=105364&docType=1#s1
">商家经营类目</a>
*/
@ApiListField("special_license_pic")
@ApiField("string")
private List<String> specialLicensePic;
/**
* 使用场景,签约芝麻信用产品必须传入该参数,比如用于放贷风险防控、免押金租车等
*/
@ApiField("usage_scenario")
private String usageScenario;
/**
* 企业网址信息
*/
@ApiListField("web_address")
@ApiField("string")
private List<String> webAddress;
/**
* 网址授权函图片
*/
@ApiField("web_auth_pic")
private String webAuthPic;
/**
* 微信公众号名称
*/
@ApiField("weixin_public_name")
private String weixinPublicName;
public String getAlipayFuwuName() {
return this.alipayFuwuName;
}
public void setAlipayFuwuName(String alipayFuwuName) {
this.alipayFuwuName = alipayFuwuName;
}
public String getAppName() {
return this.appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public List<ContactPersonInfo> getContactInfo() {
return this.contactInfo;
}
public void setContactInfo(List<ContactPersonInfo> contactInfo) {
this.contactInfo = contactInfo;
}
public String getLogoPic() {
return this.logoPic;
}
public void setLogoPic(String logoPic) {
this.logoPic = logoPic;
}
public String getMccCode() {
return this.mccCode;
}
public void setMccCode(String mccCode) {
this.mccCode = mccCode;
}
public String getShortName() {
return this.shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
public List<String> getSpecialLicensePic() {
return this.specialLicensePic;
}
public void setSpecialLicensePic(List<String> specialLicensePic) {
this.specialLicensePic = specialLicensePic;
}
public String getUsageScenario() {
return this.usageScenario;
}
public void setUsageScenario(String usageScenario) {
this.usageScenario = usageScenario;
}
public List<String> getWebAddress() {
return this.webAddress;
}
public void setWebAddress(List<String> webAddress) {
this.webAddress = webAddress;
}
public String getWebAuthPic() {
return this.webAuthPic;
}
public void setWebAuthPic(String webAuthPic) {
this.webAuthPic = webAuthPic;
}
public String getWeixinPublicName() {
return this.weixinPublicName;
}
public void setWeixinPublicName(String weixinPublicName) {
this.weixinPublicName = weixinPublicName;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
418f37225a43f1a1ffaba5cf22969dfccc9fd6c4 | 0b93651bf4c4be26f820702985bd41089026e681 | /modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201802/LineItemCreativeAssociationServiceInterfacegetPreviewUrlsForNativeStyles.java | a170a3470562242aecbb1aeeb5383758628a34e2 | [
"Apache-2.0"
] | permissive | cmcewen-postmedia/googleads-java-lib | adf36ccaf717ab486e982b09d69922ddd09183e1 | 75724b4a363dff96e3cc57b7ffc443f9897a9da9 | refs/heads/master | 2021-10-08T16:50:38.364367 | 2018-12-14T22:10:58 | 2018-12-14T22:10:58 | 106,611,378 | 0 | 0 | Apache-2.0 | 2018-12-14T22:10:59 | 2017-10-11T21:26:49 | Java | UTF-8 | Java | false | false | 4,287 | java | // Copyright 2018 Google 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 com.google.api.ads.dfp.jaxws.v201802;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Returns a list of URLs that reference the specified site URL with the specified creative from
* the association served to it. For Creative Set previewing you may specify the master creative
* Id. Each URL corresponds to one available native style for previewing the specified creative.
*
* @param lineItemId the ID of the line item, which must already exist
* @param creativeId the ID of the creative, which must already exist and must be a native
* creative
* @param siteUrl the URL of the site that the creative should be previewed in
* @return the URLs that references the specified site URL and can be used to preview the
* specified creative with the available native styles
*
*
* <p>Java class for getPreviewUrlsForNativeStyles element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="getPreviewUrlsForNativeStyles">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="lineItemId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* <element name="creativeId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* <element name="siteUrl" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"lineItemId",
"creativeId",
"siteUrl"
})
@XmlRootElement(name = "getPreviewUrlsForNativeStyles")
public class LineItemCreativeAssociationServiceInterfacegetPreviewUrlsForNativeStyles {
protected Long lineItemId;
protected Long creativeId;
protected String siteUrl;
/**
* Gets the value of the lineItemId property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getLineItemId() {
return lineItemId;
}
/**
* Sets the value of the lineItemId property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setLineItemId(Long value) {
this.lineItemId = value;
}
/**
* Gets the value of the creativeId property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getCreativeId() {
return creativeId;
}
/**
* Sets the value of the creativeId property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setCreativeId(Long value) {
this.creativeId = value;
}
/**
* Gets the value of the siteUrl property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSiteUrl() {
return siteUrl;
}
/**
* Sets the value of the siteUrl property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSiteUrl(String value) {
this.siteUrl = value;
}
}
| [
"api.cseeley@gmail.com"
] | api.cseeley@gmail.com |
45aeea5d9434b50ed12d9df50456d2020a10edc6 | 0d00a54c7954e3b202a373158cb64b0386ef809b | /src/main/java/guru/springframework/controllers/IngredientController.java | 648219e26c61e3723743714d93095eb08169b1fa | [] | no_license | alexeyltd/SpringRecipeApplication | 677c88fa3c42fd37f2faf5df5ecac3b5af1109b0 | 91dac3e71fce50d44025685157acbb6da8347be8 | refs/heads/master | 2021-01-16T18:47:58.639678 | 2017-08-17T11:04:48 | 2017-08-17T11:04:48 | 100,117,598 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,781 | java | package guru.springframework.controllers;
import guru.springframework.commands.IngredientCommand;
import guru.springframework.commands.RecipeCommand;
import guru.springframework.commands.UnitOfMeasureCommand;
import guru.springframework.services.IngredientService;
import guru.springframework.services.RecipeService;
import guru.springframework.services.UnitOfMeasureService;
import jdk.nashorn.internal.objects.annotations.Getter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
@Slf4j
@Controller
public class IngredientController {
private final RecipeService recipeService;
private final IngredientService ingredientService;
private final UnitOfMeasureService unitOfMeasureService;
public IngredientController(final RecipeService recipeService, final IngredientService ingredientService, final UnitOfMeasureService unitOfMeasureService) {
this.recipeService = recipeService;
this.ingredientService = ingredientService;
this.unitOfMeasureService = unitOfMeasureService;
}
@GetMapping
@RequestMapping("/recipe/{recipeId}/ingredients")
public String ListIngredients(@PathVariable String recipeId, Model model) {
log.debug("Getting ingredient list for recipe id : " + recipeId);
model.addAttribute("recipe", recipeService.findCommandById(Long.valueOf(recipeId)));
return "recipe/ingredient/list";
}
@GetMapping
@RequestMapping("/recipe/{recipeId}/ingredient/{id}/show")
public String showRecipeIngredient(@PathVariable String recipeId,
@PathVariable String id,
Model model) {
model.addAttribute("ingredient", ingredientService.findByRecipeIdAndIngredientId(Long.valueOf(recipeId), Long.valueOf(id)));
return "recipe/ingredient/show";
}
@GetMapping
@RequestMapping("/recipe/{recipeId}/ingredient/{id}/update")
public String updateRecipeIngredient(@PathVariable String recipeId,
@PathVariable String id,
Model model) {
model.addAttribute("ingredient", ingredientService.findByRecipeIdAndIngredientId(Long.valueOf(recipeId), Long.valueOf(id)));
model.addAttribute("uomList", unitOfMeasureService.listAllUoms());
return "recipe/ingredient/ingredientform";
}
@GetMapping
@RequestMapping("/recipe/{recipeId}/ingredient/new")
public String newRecipeIngredient(@PathVariable String recipeId, Model model) {
RecipeCommand recipeCommand = recipeService.findCommandById(Long.valueOf(recipeId));
// todo exception if null
IngredientCommand ingredientCommand = new IngredientCommand();
ingredientCommand.setRecipeId(Long.valueOf(recipeId));
model.addAttribute("ingredient", ingredientCommand);
ingredientCommand.setUom(new UnitOfMeasureCommand());
model.addAttribute("uomList", unitOfMeasureService.listAllUoms());
return "recipe/ingredient/ingredientform";
}
@PostMapping
@RequestMapping("/recipe/{recipeId}/ingredient")
public String saveOrUpdate(@ModelAttribute IngredientCommand command) {
IngredientCommand savedIngredientCommand = ingredientService.saveIngredientCommand(command);
log.debug("Saved recipe id " + savedIngredientCommand.getRecipeId());
log.debug("Saved ingredient id " + savedIngredientCommand.getId());
return "redirect:/recipe/" + savedIngredientCommand.getRecipeId() + "/ingredient/" + savedIngredientCommand.getId() + "/show";
}
@GetMapping
@RequestMapping("/recipe/{recipeId}/ingredient/{ingredientId}/delete")
public String deleteIngredient(@PathVariable String recipeId, @PathVariable String ingredientId) {
log.debug("Deleting ingredient id " + ingredientId);
ingredientService.deleteById(Long.valueOf(recipeId), Long.valueOf(ingredientId));
return "redirect:/recipe/" + recipeId + "/ingredients";
}
}
| [
"sk.alexey.pavlenko@gmail.com"
] | sk.alexey.pavlenko@gmail.com |
264aec6fc37408528ea0bf8f134dd48a4f4db5f2 | a34095918027369dfd795040243fe161f5ce0847 | /app/src/main/java/com/hamitao/kids/ui/fragment/ContactsFragment.java | 020495a8ce4913d8e69af12edb7f888ad3ed6e9a | [] | no_license | lfzzj/Robot | 1d25bb10144ba5c71e43bb778c74208472765b5d | a591ca3547d31e94cf3feedd8b1bcfed1d22dd1d | refs/heads/master | 2020-04-23T15:02:23.150381 | 2019-02-18T09:35:20 | 2019-02-18T09:35:20 | 171,251,247 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 4,308 | java | package com.hamitao.kids.ui.fragment;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.hamitao.aispeech.engine.TTSEngine;
import com.hamitao.aispeech.util.InstructUtils;
import com.hamitao.framework.enums.FuncTitle;
import com.hamitao.framework.utils.MobileUtil;
import com.hamitao.kids.R;
import com.hamitao.kids.adapter.ContactAdapter;
import com.hamitao.kids.app.MyApp;
import com.hamitao.kids.manager.SystemContacts;
import com.hamitao.kids.mvp.ipresenter.IDevicePresenter;
import com.hamitao.kids.mvp.presenter.DevicePresenterImpl;
import com.hamitao.kids.ui.activity.ContactActivity;
import com.hamitao.kids.utils.PlayHint;
import com.hamitao.requestframe.entity.QueryContactInfo;
import com.hamitao.requestframe.view.QueryContactView;
import java.util.ArrayList;
import java.util.List;
/**
* @data on 2018/6/7 17:36
* @describe: 联系人
*/
@SuppressLint("ValidFragment")
public class ContactsFragment extends Fragment {
private RecyclerView mRecyclerView;
private List<QueryContactInfo.ResponseDataObjBean.ContactsBean> contactsInfos = new ArrayList<>();//联系人列表
private ContactActivity contactActivity = (ContactActivity) getActivity();
private ContactAdapter mContactAdapter;//联系人
private ContactActivity activity;
private IDevicePresenter devicePresenter;
private int layout = R.layout.item_phone_book;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_contacts, container, false);
activity = (ContactActivity) getActivity();
mRecyclerView = view.findViewById(R.id.rv_contacts);
initPresenter();
initContact();
return view;
}
private void initPresenter() {
devicePresenter = new DevicePresenterImpl(activity, mQueryContactView);
devicePresenter.queryContact(MyApp.getInstance().getSpManager().getTerminalId());
}
//初始化联系人列表
private void initContact() {
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(contactActivity);
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRecyclerView.setLayoutManager(linearLayoutManager);
mContactAdapter = new ContactAdapter(mRecyclerView,R.layout.item_phone_book );
mRecyclerView.setAdapter(mContactAdapter);
mContactAdapter.setOnPhoneBookListener(mOnPhoneBookListener);
}
private ContactAdapter.OnPhoneBookListener mOnPhoneBookListener = new ContactAdapter.OnPhoneBookListener() {
@Override
public void onClickListener(int position) {
String loginName = contactsInfos.get(position).getPhonenum();
((ContactActivity) getActivity()).publicPresenter.callPhone(loginName);
if( !MobileUtil.ishasSimCard( getActivity())){
((ContactActivity) getActivity()).speak(FuncTitle.CONTENT_VOICE_HINT_INSTALL_SIM.toString());
}
}
};
private QueryContactView mQueryContactView = new QueryContactView() {
@Override
public void onSuccess(QueryContactInfo info) {
contactsInfos = info.getResponseDataObj().getContacts();
SystemContacts.refreshContacts(getActivity(), info.getResponseDataObj().getContacts());
if (contactsInfos != null && contactsInfos.size() > 0) {
mContactAdapter.setData(contactsInfos);
mContactAdapter.notifyDataSetChanged();
}else if (contactsInfos != null && contactsInfos.size() <= 0){
//数据搜索到 但未添加联系人
PlayHint.stopVoice();
TTSEngine.getSingleton().speak(InstructUtils.respondNoAddContact(), TTSEngine.TTS_FLAG_COMP_NO_RESULT);
// TuringEngine.getSingleton().speak(InstructUtils.respondNoAddContact(), TTSEngine.TTS_FLAG_COMP_NO_RESULT);
}
}
@Override
public void onError(String result) {
}
};
}
| [
"you@example.com"
] | you@example.com |
96d0929bc41447f3c45a2bc9a3ffe90846ceb682 | 417b0e3d2628a417047a7a70f28277471d90299f | /proxies/com/microsoft/bingads/v10/campaignmanagement/GetMediaAssociationsRequest.java | 841a55ce495f8a28a11cef17b766e4cb7d6448c5 | [
"MIT"
] | permissive | jpatton14/BingAds-Java-SDK | 30e330a5d950bf9def0c211ebc5ec677d8e5fb57 | b928a53db1396b7e9c302d3eba3f3cc5ff7aa9de | refs/heads/master | 2021-07-07T08:28:17.011387 | 2017-10-03T14:44:43 | 2017-10-03T14:44:43 | 105,914,216 | 0 | 0 | null | 2017-10-05T16:33:39 | 2017-10-05T16:33:39 | null | UTF-8 | Java | false | false | 2,750 | java |
package com.microsoft.bingads.v10.campaignmanagement;
import java.util.Collection;
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.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <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="MediaEnabledEntities" type="{https://bingads.microsoft.com/CampaignManagement/v10}MediaEnabledEntityFilter" minOccurs="0"/>
* <element name="MediaIds" type="{http://schemas.microsoft.com/2003/10/Serialization/Arrays}ArrayOflong" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"mediaEnabledEntities",
"mediaIds"
})
@XmlRootElement(name = "GetMediaAssociationsRequest")
public class GetMediaAssociationsRequest {
@XmlElement(name = "MediaEnabledEntities", type = String.class)
@XmlJavaTypeAdapter(Adapter9 .class)
@XmlSchemaType(name = "anySimpleType")
protected Collection<MediaEnabledEntityFilter> mediaEnabledEntities;
@XmlElement(name = "MediaIds", nillable = true)
protected ArrayOflong mediaIds;
/**
* Gets the value of the mediaEnabledEntities property.
*
* @return
* possible object is
* {@link String }
*
*/
public Collection<MediaEnabledEntityFilter> getMediaEnabledEntities() {
return mediaEnabledEntities;
}
/**
* Sets the value of the mediaEnabledEntities property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMediaEnabledEntities(Collection<MediaEnabledEntityFilter> value) {
this.mediaEnabledEntities = value;
}
/**
* Gets the value of the mediaIds property.
*
* @return
* possible object is
* {@link ArrayOflong }
*
*/
public ArrayOflong getMediaIds() {
return mediaIds;
}
/**
* Sets the value of the mediaIds property.
*
* @param value
* allowed object is
* {@link ArrayOflong }
*
*/
public void setMediaIds(ArrayOflong value) {
this.mediaIds = value;
}
}
| [
"jiaj@microsoft.com"
] | jiaj@microsoft.com |
76930b07ea9d05a312a073a5f9424aa36d58f6df | 5f28587ddd696e0dd79c8c9258c9b061475953e1 | /src/leetcode/P131.java | 9c284058262369304e4ea932b11c3ae947e00411 | [] | no_license | gunannan1/algorithm-problems | bb530ecedc6dad788bbf3e49405db54ef4a4ec24 | 9616b08a90094389832c0d4ad1f915dede816bb4 | refs/heads/master | 2020-04-14T02:26:37.324503 | 2019-05-04T10:33:29 | 2019-05-04T10:33:29 | 124,362,089 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,340 | java | package leetcode;
import java.util.ArrayList;
import java.util.List;
/**
*
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
Example:
Input: "aab"
Output:
[
["aa","b"],
["a","a","b"]
]
分割字符串使得每个部分都是回文数
*/
public class P131 {
public List<List<String>> partition(String s) {
List<List<String>> partitions = new ArrayList<>();
doPartition(s, partitions, new ArrayList<>());
return partitions;
}
private void doPartition(String s, List<List<String>> partitions, List<String> tempPartition) {
if (s.length() == 0) {
partitions.add(new ArrayList<>(tempPartition));
return;
}
for (int i = 0; i < s.length(); i++) {
if (isPalindrome(s, 0, i)) {
tempPartition.add(s.substring(0, i + 1));
doPartition(s.substring(i + 1), partitions, tempPartition);
tempPartition.remove(tempPartition.size() - 1);
}
}
}
private boolean isPalindrome(String s, int begin, int end) {
while (begin < end) {
if (s.charAt(begin++) != s.charAt(end--)) {
return false;
}
}
return true;
}
}
| [
"396426364@qq.com"
] | 396426364@qq.com |
9a2309f486a21fac51ec5e4575689fb356ef20cd | 3dd35c0681b374ce31dbb255b87df077387405ff | /generated/com/guidewire/_generated/entity/NonRenewalExplanationInternal.java | d2f66a47da357567656c90e9a22484b69e2206a6 | [] | no_license | walisashwini/SBTBackup | 58b635a358e8992339db8f2cc06978326fed1b99 | 4d4de43576ec483bc031f3213389f02a92ad7528 | refs/heads/master | 2023-01-11T09:09:10.205139 | 2020-11-18T12:11:45 | 2020-11-18T12:11:45 | 311,884,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,552 | java | package com.guidewire._generated.entity;
@javax.annotation.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "NonRenewalExplanation.eti;NonRenewalExplanation.eix;NonRenewalExplanation.etx")
@java.lang.SuppressWarnings(value = {"deprecation", "unchecked"})
public interface NonRenewalExplanationInternal extends com.guidewire._generated.entity.RetireableInternal, com.guidewire._generated.entity.ExtractableInternal, com.guidewire._generated.entity.FrozenSetMemberInternal {
/**
* Gets the value of the Body field.
* Explanation for the non-renewal
*/
@gw.internal.gosu.parser.ExtendedProperty
public java.lang.String getBody();
/**
* Gets the value of the Code field.
* The concise name of the non-renewal explanation pattern
*/
@gw.internal.gosu.parser.ExtendedProperty
public java.lang.String getCode();
/**
* Gets the value of the PolicyTerm field.
* The policy term to which this non-renewal explanation belongs
*/
@gw.internal.gosu.parser.ExtendedProperty
public entity.PolicyTerm getPolicyTerm();
public gw.pl.persistence.core.Key getPolicyTermID();
/**
* Sets the value of the Body field.
*/
public void setBody(java.lang.String value);
/**
* Sets the value of the Code field.
*/
public void setCode(java.lang.String value);
/**
* Sets the value of the PolicyTerm field.
*/
public void setPolicyTerm(entity.PolicyTerm value);
public void setPolicyTermID(gw.pl.persistence.core.Key value);
} | [
"ashwini@cruxxtechnologies.com"
] | ashwini@cruxxtechnologies.com |
9fa3753cfaf3d82cf1c61f8503d6f324c18603ab | cec628def1aad94ccbefa814d2a0dbd51588e9bd | /performance.java/test/qa-functional/data/PerformanceTestFoldersData/src/folders/javaFolder1000/SampleJavaClass899.java | 553feaf109ec4390c58b45500457d930e146c686 | [] | no_license | emilianbold/netbeans-releases | ad6e6e52a896212cb628d4522a4f8ae685d84d90 | 2fd6dc84c187e3c79a959b3ddb4da1a9703659c7 | refs/heads/master | 2021-01-12T04:58:24.877580 | 2017-10-17T14:38:27 | 2017-10-17T14:38:27 | 78,269,363 | 30 | 15 | null | 2020-10-13T08:36:08 | 2017-01-07T09:07:28 | null | UTF-8 | Java | false | false | 3,335 | java | /*
* Copyright (c) 2010, Oracle.
* 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 Oracle 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 folders.javaFolder1000;
/**
* Implementation of the logic for the Anagram Game application.
*/
public class SampleJavaClass899 extends Object {
private static final String[] WORD_LIST = {
"abstraction",
"ambiguous",
"arithmetic",
"backslash",
"bitmap",
"circumstance",
"combination",
"consequently",
"traditional"};
private static final String[] SCRAMBLED_WORD_LIST = {
"batsartcoin",
"maibuguos",
"ratimhteci",
"abkclssha",
"ibmtpa",
"iccrmutsnaec",
"ocbmnitaoni",
"ocsnqeeutnyl",
"rtdatioialn"
};
/**
* Gets the word at a given index.
*
* @param idx index of required word
* @return word at that index in its natural form
*/
public String getWord(int idx) {
return WORD_LIST[idx];
}
/**
* Gets the word at a given index in its scrambled form.
*
* @param idx index of required word
* @return word at that index in its scrambled form
*/
public String getScrambledWord(int idx) {
return SCRAMBLED_WORD_LIST[idx];
}
/**
* Gets the number of words in the library.
*
* @return the total number of plain/scrambled word pairs in the library
*/
public int getSize() {
return WORD_LIST.length;
}
/**
* Checks whether a user's guess for a word at the given index is correct.
*
* @param idx index of the word guessed
* @param userGuess the user's guess for the actual word
* @return true if the guess was correct; false otherwise
*/
public boolean isCorrect(int idx, String userGuess) {
return userGuess.equals(getWord(idx));
}
}
| [
"jskrivanek@netbeans.org"
] | jskrivanek@netbeans.org |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.