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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
92918cad394de9a2a4cbdd5299b3b8d2fbe08efd | eaa897ad0613cc6d3b90be6098a39103fb9e0918 | /activity-dao/src/main/java/cn/acyou/diana/activity/mapper/StudentMapper.java | c36f5c11d13bb5b141d44c39454415de8f805fda | [] | no_license | f981545521/diana-activity | c7a77bc20eb2090bb2e616bb2a9bcab62f1ead53 | 53ed26d3e92cfe9320b8f23ab5be8b7cb0a5c90d | refs/heads/master | 2020-04-24T13:57:22.524259 | 2019-02-22T06:26:41 | 2019-02-22T06:26:41 | 172,004,833 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 281 | java | package cn.acyou.diana.activity.mapper;
import cn.acyou.diana.activity.entity.Student;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author youfang
* @version [1.0.0, 2019-02-22 下午 01:55]
**/
public interface StudentMapper extends BaseMapper<Student> {
} | [
"981545521@qq.com"
] | 981545521@qq.com |
abbc4235bc26ca0fac3029c8fb3c4c1b12419002 | 6280cfc16aa98221d74fc44964a6f98ecfd21de8 | /src/main/java/com/formento/jhipsterspringboot/domain/util/JSR310LocalDateDeserializer.java | 0fd88c4abb1d739aa099845842e17b8e61a8f592 | [] | no_license | andreformento/JhipsterSpringBoot | 5a4d43e844e94f26e14ee1ff2358da3e4ad310f8 | 4c30950ab92450059f54d398d6fb78e050171670 | refs/heads/master | 2021-01-10T14:30:39.061355 | 2016-02-29T22:55:23 | 2016-02-29T22:55:23 | 52,228,852 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,295 | java | package com.formento.jhipsterspringboot.domain.util;
import java.io.IOException;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
/**
* Custom Jackson deserializer for transforming a JSON object (using the ISO 8601 date formatwith optional time)
* to a JSR310 LocalDate object.
*/
public class JSR310LocalDateDeserializer extends JsonDeserializer<LocalDate> {
public static final JSR310LocalDateDeserializer INSTANCE = new JSR310LocalDateDeserializer();
private JSR310LocalDateDeserializer() {}
private static final DateTimeFormatter ISO_DATE_OPTIONAL_TIME;
static {
ISO_DATE_OPTIONAL_TIME = new DateTimeFormatterBuilder()
.append(DateTimeFormatter.ISO_LOCAL_DATE)
.optionalStart()
.appendLiteral('T')
.append(DateTimeFormatter.ISO_OFFSET_TIME)
.toFormatter();
}
@Override
public LocalDate deserialize(JsonParser parser, DeserializationContext context) throws IOException {
switch(parser.getCurrentToken()) {
case START_ARRAY:
if(parser.nextToken() == JsonToken.END_ARRAY) {
return null;
}
int year = parser.getIntValue();
parser.nextToken();
int month = parser.getIntValue();
parser.nextToken();
int day = parser.getIntValue();
if(parser.nextToken() != JsonToken.END_ARRAY) {
throw context.wrongTokenException(parser, JsonToken.END_ARRAY, "Expected array to end.");
}
return LocalDate.of(year, month, day);
case VALUE_STRING:
String string = parser.getText().trim();
if(string.length() == 0) {
return null;
}
return LocalDate.parse(string, ISO_DATE_OPTIONAL_TIME);
}
throw context.wrongTokenException(parser, JsonToken.START_ARRAY, "Expected array or string.");
}
}
| [
"andreformento.sc@gmail.com"
] | andreformento.sc@gmail.com |
c43d6396f4b1ece314fb06b6cdcbae1a63588aed | 08249a62bc476c11e8e72400542cdd871c37e643 | /app/src/main/java/android/com/dadabase/activities/DatabaseHelper.java | 096d308d4c0a13f9070eac8ecedbc96699bf2e3f | [] | no_license | 007shahzeb/FastAdapterLatestCode | 25214b539110cee84f8c8b23e3236a7d71c98f3e | 36572e0ecc6d709aeb62cb72945044b76b7333fe | refs/heads/master | 2020-04-04T09:44:16.693951 | 2018-12-31T12:18:23 | 2018-12-31T12:18:23 | 155,829,789 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,398 | java | package android.com.dadabase.activities;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DatabaseHelper extends SQLiteOpenHelper {
private static final String DATABASE_NAME = "Student.db";
private static final String TABLE_NAME = "student_table";
private static final String COL_1 = "ID";
private static final String COL_2 = "NAME";
private static final String COL_3 = "SURNAME";
private static final String COL_4 = "MARKS";
public DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, 1);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("create table " + TABLE_NAME + " (ID INTEGER PRIMARY KEY AUTOINCREMENT,NAME TEXT,SURNAME TEXT,MARKS INTEGER)");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
onCreate(db);
}
public boolean insertData(String name, String surname, String marks) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(COL_2, name);
contentValues.put(COL_3, surname);
contentValues.put(COL_4, marks);
long result = db.insert(TABLE_NAME, null, contentValues);
if (result == -1)
return false;
else
return true;
}
public Cursor getAllData() {
SQLiteDatabase db = this.getWritableDatabase();
Cursor res = db.rawQuery("select * from " + TABLE_NAME, null);
return res;
}
public boolean updateData(String id, String name, String surname, String marks) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(COL_1, id);
contentValues.put(COL_2, name);
contentValues.put(COL_3, surname);
contentValues.put(COL_4, marks);
db.update(TABLE_NAME, contentValues, "ID = ?", new String[]{id});
return true;
}
public Integer deleteData(String id) {
SQLiteDatabase db = this.getWritableDatabase();
return db.delete(TABLE_NAME, "ID = ?", new String[]{id});
}
} | [
"dharamveer.smartitventures@gmail.com"
] | dharamveer.smartitventures@gmail.com |
8381341f9f23f64e39dfd9515f6810e6ab0bf82e | c5ffd87d0bf52f92da63571adcf6f2ec63f5d303 | /module-map/src/main/java/com/minlia/module/map/district/constants/GadConstants.java | 640429220449ce8d4b6fd03fac141a405ae40586 | [] | no_license | 1016280226/minlia-modules | 8a6297a319d0f2e87aab05a5171cb25c49b8865d | 760e582db1e20a000935dd551372f8c4a30aaef4 | refs/heads/master | 2020-03-23T15:15:29.743997 | 2018-07-20T02:42:50 | 2018-07-20T02:42:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 817 | java | package com.minlia.module.map.district.constants;
/**
* Created by Calvin On 2017/12/17.
* 高德地图
*/
public class GadConstants {
/**
* 高德地图 WebApi_key
*/
public static final String WEB_API_MAP_KEY = "fa0889a5259072ff43a169e8c87cc560";
/**
* 高德地图 小程序_key
*/
public static final String MINIAPP_MAP_KEY = "178b2f1914203033d8dd1ea0f3ad4745";
/**
* 根据key, 获取高德地图 国家-省 URL
*/
public static final String GAODE_MAP_URL_MAP_KEY = "http://restapi.amap.com/v3/config/district?key=%s";
/**
* 获取高德地图-省下的子级、 市下的子级、区下的子级 URL
*/
public static final String GAODE_MAP_URL_MAP_CHILDREN = "http://restapi.amap.com/v3/config/district?subdistrict=%s&key=%s";
}
| [
"191285052@qq.com"
] | 191285052@qq.com |
33bb4cca6b74dbf95fdd63cf37f81d4526d97343 | a7c4c9d2c7bc263d71ba48856052ed6d0e0efb2f | /simple-services-example/src/main/java/com/zhuinden/simpleservicesexample/presentation/paths/b/BView.java | ea5c782118279423aac496466f3f064ae92957bf | [] | no_license | Zhuinden/flow-services | f3b04eedd49136b642ff114d57d781e10253dcf1 | 607af73accdf39075b9ac06555a44ae272303214 | refs/heads/master | 2021-06-13T14:12:14.620442 | 2017-03-02T11:12:23 | 2017-03-02T11:12:23 | 81,845,518 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,124 | java | package com.zhuinden.simpleservicesexample.presentation.paths.b;
import android.annotation.TargetApi;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import com.zhuinden.simpleservices.Services;
import com.zhuinden.simpleservicesexample.R;
import com.zhuinden.simpleservicesexample.application.Key;
import com.zhuinden.simpleservicesexample.application.MainActivity;
import com.zhuinden.simpleservicesexample.utils.Preconditions;
import com.zhuinden.simpleservicesexample.utils.ViewPagerAdapter;
import com.zhuinden.simplestack.Backstack;
import java.util.Collections;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* Created by Zhuinden on 2017.02.14..
*/
public class BView
extends RelativeLayout {
public BView(Context context) {
super(context);
}
public BView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public BView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@TargetApi(21)
public BView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@BindView(R.id.b_viewpager)
ViewPager viewPager;
@BindView(R.id.b_viewpager_2)
ViewPager viewPager2;
ViewPagerAdapter adapter;
ViewPagerAdapter adapter2;
List<Key> keys;
@Override
protected void onFinishInflate() {
super.onFinishInflate();
Preconditions.checkNotNull(MainActivity.getServices(getContext()).findServices(Backstack.getKey(getContext())).getService("A"),
"Service should not be null");
Preconditions.checkNotNull(MainActivity.getServices(getContext()).findServices(Backstack.getKey(getContext())).getService("B"),
"Service should not be null");
ButterKnife.bind(this);
B b = Backstack.getKey(getContext());
keys = b.keys();
viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
viewPager2.setAdapter(null);
adapter2.updateKeys(getNestedKeys(keys.get(position)));
viewPager2.setAdapter(adapter2);
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
adapter = new ViewPagerAdapter(keys);
adapter2 = new ViewPagerAdapter(Collections.emptyList());
viewPager.setAdapter(adapter = new ViewPagerAdapter(keys));
}
List<Key> getNestedKeys(Key key) {
if(key instanceof Services.Composite) {
// noinspection unchecked
return (List<Key>) ((Services.Composite) key).keys();
} else {
return Collections.emptyList();
}
}
}
| [
"zhuinden@gmail.com"
] | zhuinden@gmail.com |
d86d811c3d6eecbf29d5969e6db1be04e08e279e | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/com/zhihu/android/notification/model/viewmodel/NotiAggregatedModelV4.java | 757b3d7dec1a485d504636db4ecdef3af1d3efa2 | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 697 | java | package com.zhihu.android.notification.model.viewmodel;
import com.secneo.apkwrapper.C6969H;
import com.zhihu.android.notification.model.TimeLineNotification;
import kotlin.Metadata;
import kotlin.p2243e.p2245b.C32569u;
@Metadata
/* compiled from: NotiAggregatedModel.kt */
public final class NotiAggregatedModelV4 extends NotiAggregatedModel {
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public NotiAggregatedModelV4(String str, TimeLineNotification timeLineNotification) {
super(str, timeLineNotification);
C32569u.m150519b(str, C6969H.m41409d("G6F82DE1F8A22A7"));
C32569u.m150519b(timeLineNotification, "nt");
}
}
| [
"seasonpplp@qq.com"
] | seasonpplp@qq.com |
1a0a5aa97ddf0b3ea207a844cb9a609f2ffc6c3d | 548a1b731709a376e079e1f0417cc401cce70aaf | /src/main/java/statements/TimeT.java | 21b073bee22ba261bbfc17e9cd99096a5f689e8d | [] | no_license | egydGIT/javaBackend | 0e96c6b2bab639ccdb4631b481b69a2205d3963c | be22a7148e10fb6da019a74e916dcd353fb53e70 | refs/heads/master | 2023-06-25T00:41:32.443210 | 2021-07-11T12:33:10 | 2021-07-11T12:33:10 | 309,369,092 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 725 | java | package statements;
public class TimeT {
private int hour;
private int minute;
private int second;
public TimeT(int hour, int minute, int second) {
this.hour = hour;
this.minute = minute;
this.second = second;
}
public int getInMinutes() {
return 60 * hour + minute;
}
public int getInSeconds() {
return getInMinutes() * 60 + second;
}
public boolean earlierThan(TimeT other) {
int thisTimeInSeconds = this.getInSeconds();
int otherTimeInSeconds = other.getInSeconds();
return thisTimeInSeconds < otherTimeInSeconds;
}
public String toString() {
return hour + ":" + minute + ":" + second;
}
}
| [
"egyd.eszter@gmail.com"
] | egyd.eszter@gmail.com |
4ebe831122ea77e84121947a2093f6d05e7d4822 | a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9 | /src/main/java/com/alipay/api/response/MybankCreditSceneprodRepayDeputyApplyResponse.java | bb3ae1bcbb847a48304f59736aee7864e35058a1 | [
"Apache-2.0"
] | permissive | cc-shifo/alipay-sdk-java-all | 38b23cf946b73768981fdeee792e3dae568da48c | 938d6850e63160e867d35317a4a00ed7ba078257 | refs/heads/master | 2022-12-22T14:06:26.961978 | 2020-09-23T04:00:10 | 2020-09-23T04:00:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,707 | java | package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.SceneProdDeputyPaymentBillQuery;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: mybank.credit.sceneprod.repay.deputy.apply response.
*
* @author auto create
* @since 1.0, 2020-02-27 16:25:03
*/
public class MybankCreditSceneprodRepayDeputyApplyResponse extends AlipayResponse {
private static final long serialVersionUID = 2241238317818927611L;
/**
* 网商分配的申请单号
*/
@ApiField("app_seqno")
private String appSeqno;
/**
* 代客还款账单详情
*/
@ApiListField("bill_list")
@ApiField("scene_prod_deputy_payment_bill_query")
private List<SceneProdDeputyPaymentBillQuery> billList;
/**
* 网商分配的支用号
*/
@ApiField("drawdown_no")
private String drawdownNo;
/**
* 网商traceId,便于查询日志内容
*/
@ApiField("trace_id")
private String traceId;
public void setAppSeqno(String appSeqno) {
this.appSeqno = appSeqno;
}
public String getAppSeqno( ) {
return this.appSeqno;
}
public void setBillList(List<SceneProdDeputyPaymentBillQuery> billList) {
this.billList = billList;
}
public List<SceneProdDeputyPaymentBillQuery> getBillList( ) {
return this.billList;
}
public void setDrawdownNo(String drawdownNo) {
this.drawdownNo = drawdownNo;
}
public String getDrawdownNo( ) {
return this.drawdownNo;
}
public void setTraceId(String traceId) {
this.traceId = traceId;
}
public String getTraceId( ) {
return this.traceId;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
74dfc6baad94f04aec840ecf553cdefb5414b1f4 | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/com/zhihu/android/app/share/$$Lambda$ShareEventListenerImpl$fZ47ZlT4az8lV_wPK4sn6pFcLlo.java | e4243c06d690e7eb24a634ecc59a9ec9ae145c76 | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 959 | java | package com.zhihu.android.app.share;
import com.zhihu.android.p2132za.C30167Za;
import com.zhihu.p2177za.proto.DetailInfo;
import com.zhihu.p2177za.proto.ExtraInfo;
/* renamed from: com.zhihu.android.app.share.-$$Lambda$ShareEventListenerImpl$fZ47ZlT4az8lV_wPK4sn6pFcLlo reason: invalid class name */
/* compiled from: lambda */
public final /* synthetic */ class $$Lambda$ShareEventListenerImpl$fZ47ZlT4az8lV_wPK4sn6pFcLlo implements C30167Za.AbstractC30168a {
public static final /* synthetic */ $$Lambda$ShareEventListenerImpl$fZ47ZlT4az8lV_wPK4sn6pFcLlo INSTANCE = new $$Lambda$ShareEventListenerImpl$fZ47ZlT4az8lV_wPK4sn6pFcLlo();
private /* synthetic */ $$Lambda$ShareEventListenerImpl$fZ47ZlT4az8lV_wPK4sn6pFcLlo() {
}
@Override // com.zhihu.android.p2132za.C30167Za.AbstractC30168a
public final void build(DetailInfo axVar, ExtraInfo bjVar) {
ShareEventListenerImpl.lambda$onClickPosterShare$23(axVar, bjVar);
}
}
| [
"seasonpplp@qq.com"
] | seasonpplp@qq.com |
ab3cc1384a7953a3cdcabf89c4642e92203b669e | e75be673baeeddee986ece49ef6e1c718a8e7a5d | /submissions/blizzard/Corpus/ecf/2734.java | 1b801e8ad776b082727faf7878b01a8a85b1fc11 | [
"MIT"
] | permissive | zhendong2050/fse18 | edbea132be9122b57e272a20c20fae2bb949e63e | f0f016140489961c9e3c2e837577f698c2d4cf44 | refs/heads/master | 2020-12-21T11:31:53.800358 | 2018-07-23T10:10:57 | 2018-07-23T10:10:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,538 | java | /*******************************************************************************
* Copyright (c) 2007, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ecf.internal.mylyn.ui;
import java.io.ByteArrayOutputStream;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.identity.IDCreateException;
import org.eclipse.ecf.datashare.IChannel;
import org.eclipse.ecf.datashare.IChannelContainerAdapter;
import org.eclipse.ecf.presence.IPresenceContainerAdapter;
import org.eclipse.ecf.presence.roster.IRosterEntry;
import org.eclipse.ecf.presence.ui.menu.AbstractRosterMenuContributionItem;
import org.eclipse.ecf.presence.ui.menu.AbstractRosterMenuHandler;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.viewers.*;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.handlers.HandlerUtil;
public class SendContextContributionItem extends AbstractRosterMenuContributionItem {
public SendContextContributionItem() {
setTopMenuName("Send Context");
setTopMenuImageDescriptor(Activator.getDefault().getImageRegistry().getDescriptor("IMG_SHARED_TASK"));
}
protected IContributionItem[] createContributionItemsForPresenceContainer(IPresenceContainerAdapter presenceContainerAdapter) {
// if this IPCA doesn't support the datashare APIs, we should not create any contribution items
IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) presenceContainerAdapter.getAdapter(IChannelContainerAdapter.class);
if (channelAdapter == null) {
return new IContributionItem[0];
}
return super.createContributionItemsForPresenceContainer(presenceContainerAdapter);
}
protected AbstractRosterMenuHandler createRosterEntryHandler(final IRosterEntry rosterEntry) {
return new AbstractRosterMenuHandler(rosterEntry) {
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchPart part = HandlerUtil.getActivePart(event);
if (part == null) {
return null;
}
IWorkbenchSite site = part.getSite();
if (site == null) {
return null;
}
ISelectionProvider provider = site.getSelectionProvider();
if (provider == null) {
return null;
}
ISelection selection = provider.getSelection();
if (selection instanceof IStructuredSelection) {
IChannelContainerAdapter icca = (IChannelContainerAdapter) rosterEntry.getRoster().getPresenceContainerAdapter().getAdapter(IChannelContainerAdapter.class);
ID channelID;
try {
channelID = icca.getChannelNamespace().createInstance(new Object[] { Activator.PLUGIN_ID });
} catch (IDCreateException e1) {
return null;
}
final IChannel channel = icca.getChannel(channelID);
if (channel == null) {
return null;
}
Object element = ((IStructuredSelection) selection).getFirstElement();
if (element instanceof ITask) {
final ITask task = (ITask) element;
Job job = new Job("Send Task") {
protected IStatus run(IProgressMonitor monitor) {
monitor.beginTask("Sending task...", 5);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
TasksUiPlugin.getTaskListManager().getTaskListWriter().writeTask((AbstractTask) task, stream);
monitor.worked(2);
try {
channel.sendMessage(getRosterEntry().getUser().getID(), stream.toByteArray());
monitor.worked(3);
} catch (Exception e) {
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An error occurred while sending the task.", e);
} finally {
monitor.done();
}
return Status.OK_STATUS;
}
};
job.schedule();
}
}
return null;
}
};
}
}
| [
"tim.menzies@gmail.com"
] | tim.menzies@gmail.com |
0d12a7bae4d3e98bc74578a56a0e98cc97ff069a | 963599f6f1f376ba94cbb504e8b324bcce5de7a3 | /sources/p042cz/msebera/android/httpclient/message/ParserCursor.java | a0ed1cacb738edb04e57cf4dd2441018903acda9 | [] | no_license | NikiHard/cuddly-pancake | 563718cb73fdc4b7b12c6233d9bf44f381dd6759 | 3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4 | refs/heads/main | 2023-04-09T06:58:04.403056 | 2021-04-20T00:45:08 | 2021-04-20T00:45:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,537 | java | package p042cz.msebera.android.httpclient.message;
import kotlin.text.Typography;
/* renamed from: cz.msebera.android.httpclient.message.ParserCursor */
public class ParserCursor {
private final int lowerBound;
private int pos;
private final int upperBound;
public ParserCursor(int i, int i2) {
if (i < 0) {
throw new IndexOutOfBoundsException("Lower bound cannot be negative");
} else if (i <= i2) {
this.lowerBound = i;
this.upperBound = i2;
this.pos = i;
} else {
throw new IndexOutOfBoundsException("Lower bound cannot be greater then upper bound");
}
}
public int getLowerBound() {
return this.lowerBound;
}
public int getUpperBound() {
return this.upperBound;
}
public int getPos() {
return this.pos;
}
public void updatePos(int i) {
if (i < this.lowerBound) {
throw new IndexOutOfBoundsException("pos: " + i + " < lowerBound: " + this.lowerBound);
} else if (i <= this.upperBound) {
this.pos = i;
} else {
throw new IndexOutOfBoundsException("pos: " + i + " > upperBound: " + this.upperBound);
}
}
public boolean atEnd() {
return this.pos >= this.upperBound;
}
public String toString() {
return '[' + Integer.toString(this.lowerBound) + Typography.greater + Integer.toString(this.pos) + Typography.greater + Integer.toString(this.upperBound) + ']';
}
}
| [
"a.amirovv@mail.ru"
] | a.amirovv@mail.ru |
c63122741cc4566f9b7bd05662bff304db815fbb | aaabffe8bf55973bfb1390cf7635fd00ca8ca945 | /src/main/java/com/microsoft/graph/requests/generated/IBaseReportRootGetOffice365ActivationCountsRequest.java | c19dc1632ef05a250c010a738743433bc0f32ebd | [
"MIT"
] | permissive | rgrebski/msgraph-sdk-java | e595e17db01c44b9c39d74d26cd925b0b0dfe863 | 759d5a81eb5eeda12d3ed1223deeafd108d7b818 | refs/heads/master | 2020-03-20T19:41:06.630857 | 2018-03-16T17:31:43 | 2018-03-16T17:31:43 | 137,648,798 | 0 | 0 | null | 2018-06-17T11:07:06 | 2018-06-17T11:07:05 | null | UTF-8 | Java | false | false | 3,119 | java | // ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.requests.generated;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.models.extensions.*;
import com.microsoft.graph.models.generated.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.requests.extensions.*;
import com.microsoft.graph.requests.generated.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.EnumSet;
import com.google.gson.JsonObject;
import com.google.gson.annotations.*;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The interface for the Base Report Root Get Office365Activation Counts Request.
*/
public interface IBaseReportRootGetOffice365ActivationCountsRequest {
/**
* Patches the ReportRootGetOffice365ActivationCounts
*
* @param srcReport the Report with which to PATCH
* @param callback the callback to be called after success or failure
*/
void patch(Report srcReport, final ICallback<Report> callback);
/**
* Patches the ReportRootGetOffice365ActivationCounts
*
* @param srcReport the Report with which to PATCH
* @return the Report
* @throws ClientException an exception occurs if there was an error while the request was sent
*/
Report patch(Report srcReport) throws ClientException;
/**
* Puts the ReportRootGetOffice365ActivationCounts
*
* @param srcReport the Report to PUT
* @param callback the callback to be called after success or failure
*/
void put(Report srcReport, final ICallback<Report> callback);
/**
* Puts the ReportRootGetOffice365ActivationCounts
*
* @param srcReport the Report to PUT
* @return the Report
* @throws ClientException an exception occurs if there was an error while the request was sent
*/
Report put(Report srcReport) throws ClientException;
/**
* Gets the Report
*
* @param callback the callback to be called after success or failure
*/
void get(final ICallback<Report> callback);
/**
* Gets the Report
*
* @return the Report
* @throws ClientException an exception occurs if there was an error while the request was sent
*/
Report get() throws ClientException;
/**
* Sets the select clause for the request
*
* @param value the select clause
* @return the updated request
*/
IReportRootGetOffice365ActivationCountsRequest select(final String value);
/**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/
IReportRootGetOffice365ActivationCountsRequest expand(final String value);
}
| [
"caitbal@microsoft.com"
] | caitbal@microsoft.com |
162c39431fb143ceff09d4f6908abd6b2262a743 | e29115b4454e388c96276231969b6d377b811411 | /src/main/java/io/github/jhipster/application/web/rest/RoutePerformanceResource.java | 172a598c9bd1c073c301646e5ac634ebb49ccd85 | [] | no_license | Kopezaur/MentorCarpatin | 3b80003fac4efffe068a7b2d0493896dc527dc04 | 9235125eb5f0f3d6ba6cdcc7c271be1d3040ed48 | refs/heads/master | 2020-06-11T22:47:04.323861 | 2019-06-27T14:37:28 | 2019-06-27T14:37:28 | 163,965,200 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,164 | java | package io.github.jhipster.application.web.rest;
import io.github.jhipster.application.domain.RoutePerformance;
import io.github.jhipster.application.service.RoutePerformanceService;
import io.github.jhipster.application.web.rest.errors.BadRequestAlertException;
import io.github.jhipster.web.util.HeaderUtil;
import io.github.jhipster.web.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Optional;
import java.util.stream.StreamSupport;
import static org.elasticsearch.index.query.QueryBuilders.*;
/**
* REST controller for managing {@link io.github.jhipster.application.domain.RoutePerformance}.
*/
@RestController
@RequestMapping("/api")
public class RoutePerformanceResource {
private final Logger log = LoggerFactory.getLogger(RoutePerformanceResource.class);
private static final String ENTITY_NAME = "routePerformance";
@Value("${jhipster.clientApp.name}")
private String applicationName;
private final RoutePerformanceService routePerformanceService;
public RoutePerformanceResource(RoutePerformanceService routePerformanceService) {
this.routePerformanceService = routePerformanceService;
}
/**
* {@code POST /route-performances} : Create a new routePerformance.
*
* @param routePerformance the routePerformance to create.
* @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new routePerformance, or with status {@code 400 (Bad Request)} if the routePerformance has already an ID.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PostMapping("/route-performances")
public ResponseEntity<RoutePerformance> createRoutePerformance(@RequestBody RoutePerformance routePerformance) throws URISyntaxException {
log.debug("REST request to save RoutePerformance : {}", routePerformance);
if (routePerformance.getId() != null) {
throw new BadRequestAlertException("A new routePerformance cannot already have an ID", ENTITY_NAME, "idexists");
}
RoutePerformance result = routePerformanceService.save(routePerformance);
return ResponseEntity.created(new URI("/api/route-performances/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(applicationName, true, ENTITY_NAME, result.getId().toString()))
.body(result);
}
/**
* {@code PUT /route-performances} : Updates an existing routePerformance.
*
* @param routePerformance the routePerformance to update.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated routePerformance,
* or with status {@code 400 (Bad Request)} if the routePerformance is not valid,
* or with status {@code 500 (Internal Server Error)} if the routePerformance couldn't be updated.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PutMapping("/route-performances")
public ResponseEntity<RoutePerformance> updateRoutePerformance(@RequestBody RoutePerformance routePerformance) throws URISyntaxException {
log.debug("REST request to update RoutePerformance : {}", routePerformance);
if (routePerformance.getId() == null) {
throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
}
RoutePerformance result = routePerformanceService.save(routePerformance);
return ResponseEntity.ok()
.headers(HeaderUtil.createEntityUpdateAlert(applicationName, true, ENTITY_NAME, routePerformance.getId().toString()))
.body(result);
}
/**
* {@code GET /route-performances} : get all the routePerformances.
*
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and the list of routePerformances in body.
*/
@GetMapping("/route-performances")
public List<RoutePerformance> getAllRoutePerformances() {
log.debug("REST request to get all RoutePerformances");
return routePerformanceService.findAll();
}
/**
* {@code GET /route-performances/:id} : get the "id" routePerformance.
*
* @param id the id of the routePerformance to retrieve.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the routePerformance, or with status {@code 404 (Not Found)}.
*/
@GetMapping("/route-performances/{id}")
public ResponseEntity<RoutePerformance> getRoutePerformance(@PathVariable Long id) {
log.debug("REST request to get RoutePerformance : {}", id);
Optional<RoutePerformance> routePerformance = routePerformanceService.findOne(id);
return ResponseUtil.wrapOrNotFound(routePerformance);
}
/**
* {@code DELETE /route-performances/:id} : delete the "id" routePerformance.
*
* @param id the id of the routePerformance to delete.
* @return the {@link ResponseEntity} with status {@code 204 (NO_CONTENT)}.
*/
@DeleteMapping("/route-performances/{id}")
public ResponseEntity<Void> deleteRoutePerformance(@PathVariable Long id) {
log.debug("REST request to delete RoutePerformance : {}", id);
routePerformanceService.delete(id);
return ResponseEntity.noContent().headers(HeaderUtil.createEntityDeletionAlert(applicationName, true, ENTITY_NAME, id.toString())).build();
}
/**
* {@code SEARCH /_search/route-performances?query=:query} : search for the routePerformance corresponding
* to the query.
*
* @param query the query of the routePerformance search.
* @return the result of the search.
*/
@GetMapping("/_search/route-performances")
public List<RoutePerformance> searchRoutePerformances(@RequestParam String query) {
log.debug("REST request to search RoutePerformances for query {}", query);
return routePerformanceService.search(query);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
4662001875fd3a80673c207ffd8128902167d27b | 3c45a5f2aaef7951be8769a28fa28e05d6d3fbb4 | /interfaces/src/main/java/com/logica/ndk/tm/utilities/transformation/UpdateFoxmlMetadata.java | fbc72b826d83976592e61dd84b43aee67b536cbe | [] | no_license | NLCR/NDK-validator-2012-legacy | 99c51442655b5a9c872fc9b4cb57d98138d6c8e0 | 3ddcf34131f2f0e8366297c4ad7738f651d7a340 | refs/heads/master | 2021-05-28T17:10:32.391360 | 2014-11-10T10:18:47 | 2014-11-10T10:18:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,345 | java | /**
*
*/
package com.logica.ndk.tm.utilities.transformation;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import com.logica.ndk.tm.utilities.BusinessException;
import com.logica.ndk.tm.utilities.SystemException;
/**
* @author kovalcikm
*/
@WebService(targetNamespace = "http://wwww.logica.com/ndk/tm/process")
public interface UpdateFoxmlMetadata {
@WebMethod
@WebResult(name = "result")
public String executeSync(
@WebParam(name = "cdmId") final String cdmId,
@WebParam(name = "metadataPartsString") final List<String> metadataParts,
@WebParam(name = "locality") final String locality,
@WebParam(name = "policyFilePath") final String policyFilePath,
@WebParam(name = "processPages") final Boolean processPages) throws BusinessException, SystemException;
@WebMethod
public void executeAsync(
@WebParam(name = "cdmId") final String cdmId,
@WebParam(name = "metadataPartsString") final List<String> metadataParts,
@WebParam(name = "locality") final String locality,
@WebParam(name = "policyFilePath") final String policyFilePath,
@WebParam(name = "processPages") final Boolean processPages) throws BusinessException, SystemException;
}
| [
"rudolf@m2117.nkp.cz"
] | rudolf@m2117.nkp.cz |
e2b44e67905e65818704e3bff985ce55d5c9cef2 | 17e8438486cb3e3073966ca2c14956d3ba9209ea | /dso/tags/3.6.0/dso-crash-tests/src/test/java/com/tctest/TreeMapL2ReconnectActivePassiveTest.java | a92b217c37f6369062efbb476e21db0646a76463 | [] | 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 | 1,923 | java | /*
* All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright
* notice. All rights reserved.
*/
package com.tctest;
import com.tc.test.MultipleServersCrashMode;
import com.tc.test.MultipleServersPersistenceMode;
import com.tc.test.MultipleServersSharedDataMode;
import com.tc.test.activepassive.ActivePassiveTestSetupManager;
import com.tc.test.proxyconnect.ProxyConnectManager;
import com.tc.util.runtime.Os;
public class TreeMapL2ReconnectActivePassiveTest extends ActivePassiveTransparentTestBase {
private static final int NODE_COUNT = 2;
public TreeMapL2ReconnectActivePassiveTest() {
if (Os.isWindows()) {
// System.err.println("Disabling it for windows only for now");
// disableAllUntil("2008-05-21");
}
}
public void doSetUp(TransparentTestIface t) throws Exception {
t.getTransparentAppConfig().setClientCount(NODE_COUNT).setIntensity(1);
t.initializeTestRunner();
}
protected Class getApplicationClass() {
return TreeMapTestApp.class;
}
protected boolean enableL2Reconnect() {
return true;
}
protected boolean canRunL2ProxyConnect() {
return true;
}
protected void setupL2ProxyConnectTest(ProxyConnectManager[] managers) {
/*
* subclass can overwrite to change the test parameters.
*/
for (int i = 0; i < managers.length; ++i) {
managers[i].setProxyWaitTime(20 * 1000);
managers[i].setProxyDownTime(100);
}
}
public void setupActivePassiveTest(ActivePassiveTestSetupManager setupManager) {
setupManager.setServerCount(2);
setupManager.setServerCrashMode(MultipleServersCrashMode.CONTINUOUS_ACTIVE_CRASH);
setupManager.setServerCrashWaitTimeInSec(30);
setupManager.setServerShareDataMode(MultipleServersSharedDataMode.NETWORK);
setupManager.setServerPersistenceMode(MultipleServersPersistenceMode.TEMPORARY_SWAP_ONLY);
}
}
| [
"hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864"
] | hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864 |
b8f5fb2bec043fbc68917cf299c56dd918f55028 | 5e5576c73dd39d827a9cb6269e2aef9db3edcded | /kernel/base/src/test/java/com/twosigma/beaker/chart/serializer/XYGraphicsSerializerTest.java | a2f73cbf18cba5acbd40f053d057cc1f3d1a4120 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | gmsardane/beakerx | d922d80d46bfdbc942d4533fb26675cac31e8dfd | 68a7965cb6e16adedb4c9b853117214bef0c3a05 | refs/heads/master | 2020-12-30T15:08:06.235103 | 2017-05-11T18:54:45 | 2017-05-11T18:54:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,849 | java | /*
* Copyright 2014 TWO SIGMA OPEN SOURCE, 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
*
* 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.twosigma.beaker.chart.serializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider;
import com.twosigma.beaker.chart.Filter;
import com.twosigma.beaker.chart.xychart.NanoPlot;
import com.twosigma.beaker.chart.xychart.plotitem.Line;
import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.IOException;
import java.io.StringWriter;
import java.math.BigInteger;
import java.util.Arrays;
public class XYGraphicsSerializerTest {
static ObjectMapper mapper;
static XYGraphicsSerializer xyGraphicsSerializer;
JsonGenerator jgen;
StringWriter sw;
Line line;
@BeforeClass
public static void initClassStubData() {
mapper = new ObjectMapper();
xyGraphicsSerializer = new LineSerializer();
}
@Before
public void initTestStubData() throws IOException {
sw = new StringWriter();
jgen = mapper.getJsonFactory().createJsonGenerator(sw);
line = new Line();
}
@Test
public void serializeXOfXYGraphicsLine_resultJsonHasX() throws IOException {
//when
line.setX(Arrays.asList(1, 2, 3));
xyGraphicsSerializer.serialize(line, jgen, new DefaultSerializerProvider.Impl());
jgen.flush();
//then
JsonNode actualObj = mapper.readTree(sw.toString());
Assertions.assertThat(actualObj.has("x")).isTrue();
Assertions.assertThat(actualObj.get("x")).isNotEmpty();
}
@Test
public void serializeBigIntXWithNanoPlotType_resultJsonHasStringX() throws IOException {
//when
line.setX(
Arrays.asList(
new BigInteger("12345678901234567891000"), new BigInteger("12345678901234567891000")));
line.setPlotType(NanoPlot.class);
xyGraphicsSerializer.serialize(line, jgen, new DefaultSerializerProvider.Impl());
jgen.flush();
//then
JsonNode actualObj = mapper.readTree(sw.toString());
Assertions.assertThat(actualObj.has("x")).isTrue();
ArrayNode arrayNode = (ArrayNode) actualObj.get("x");
Assertions.assertThat(arrayNode.get(1).isTextual()).isTrue();
}
@Test
public void serializeYOfXYGraphicsLine_resultJsonHasY() throws IOException {
//when
line.setY(Arrays.asList(1, 2, 3));
xyGraphicsSerializer.serialize(line, jgen, new DefaultSerializerProvider.Impl());
jgen.flush();
//then
JsonNode actualObj = mapper.readTree(sw.toString());
Assertions.assertThat(actualObj.has("y")).isTrue();
Assertions.assertThat(actualObj.get("y")).isNotEmpty();
}
@Test
public void serializeDisplayNameOfXYGraphicsLine_resultJsonHasDisplayName() throws IOException {
//when
line.setDisplayName("some display name");
xyGraphicsSerializer.serialize(line, jgen, new DefaultSerializerProvider.Impl());
jgen.flush();
//then
JsonNode actualObj = mapper.readTree(sw.toString());
Assertions.assertThat(actualObj.has("display_name")).isTrue();
Assertions.assertThat(actualObj.get("display_name").asText()).isEqualTo("some display name");
}
@Test
public void serializeLodFilterOfXYGraphicsLine_resultJsonHasLodFilter() throws IOException {
//when
line.setLodFilter(Filter.LINE);
xyGraphicsSerializer.serialize(line, jgen, new DefaultSerializerProvider.Impl());
jgen.flush();
//then
JsonNode actualObj = mapper.readTree(sw.toString());
Assertions.assertThat(actualObj.has("lod_filter")).isTrue();
Assertions.assertThat(actualObj.get("lod_filter").asText()).isEqualTo("line");
}
@Test
public void serializeTooltipsOfXYGraphicsLine_resultJsonHastooltips() throws IOException {
//when
line.setToolTip(Arrays.asList("one", "two"));
xyGraphicsSerializer.serialize(line, jgen, new DefaultSerializerProvider.Impl());
jgen.flush();
//then
JsonNode actualObj = mapper.readTree(sw.toString());
Assertions.assertThat(actualObj.has("tooltips")).isTrue();
ArrayNode arrayNode = (ArrayNode) actualObj.get("tooltips");
Assertions.assertThat(arrayNode.get(1).asText()).isEqualTo("two");
}
}
| [
"spot@draves.org"
] | spot@draves.org |
fbedbcf426cd02cef8b6b1cea5c9be8e7913f982 | 6ef9e3af31a5e448b34eb85535324c670480541c | /clougence-schema/src/main/java/com/clougence/schema/metadata/domain/rdb/kudu/KuduPartition.java | 1f774889ae7f4489bc0229e65b4ef21fa6a5dad3 | [] | no_license | ClouGence/clougence-schema | 712ee6cb1fce9cb85ab3872001873f1d857c69b6 | cf18862ad6eb1532a6343e7c8af38fd5984eaabd | refs/heads/master | 2023-06-25T04:21:59.359114 | 2021-07-28T04:06:06 | 2021-07-28T04:06:06 | 383,728,734 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,039 | java | /*
* Copyright 2008-2009 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
*
* 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.clougence.schema.metadata.domain.rdb.kudu;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
/**
* Kudu Partition
* @version : 2021-04-01
* @author 赵永春 (zyc@hasor.net)
*/
@Getter
@Setter
public class KuduPartition {
private List<String> columns;
private int numBuckets;
private Integer seed;
private KuduPartitionType partitionType;
}
| [
"zyc@hasor.net"
] | zyc@hasor.net |
bfd3b1855290afe242bc8aec4ab21195dccebced | 23b9cf65e3377c2e91445503a9f2bbfd1c93be22 | /Java/jfop/ch07/labs/Pow2.java | b1b6d2720634b7dccd3f0b951a1e5408e2b19f0b | [] | no_license | TravisWay/Skill-Distillery | 6d596529664e9e492d40d0e92f081fe6e32cf473 | 153ae2cbb070761e7accc0ca291f41c608ecefb1 | refs/heads/master | 2021-01-23T10:43:27.491949 | 2017-07-14T01:03:29 | 2017-07-14T01:03:29 | 93,082,758 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 209 | java | public class Pow2{
public static void main(String[] args) {
int a = 2;
for(int i =1; i<=16; i++){
System.out.print(a*i);
System.out.println(" " + (Math.pow(a,i)));
}
}
}
| [
"travis_sti@yahoo.com"
] | travis_sti@yahoo.com |
00b3b60e6ace442d98c92445f3e4d099c6833cbf | 115c5fdfc8177db8718150b6fa5f6957f8f7bee2 | /docs/src/docs/asciidoc/examples/src/main/java/sample/extgrant/CustomCodeGrantAuthenticationToken.java | c706731540ddc3db05917cfff877dfd3a4783f31 | [
"Apache-2.0"
] | permissive | thomasdarimont/spring-authorization-server | aa72877130542dd5831249614f5c8e742053adf9 | 00c114cc12cb233fb6bab6c4ff6ad440a11723cf | refs/heads/master | 2023-06-08T04:04:18.070244 | 2023-05-26T14:12:59 | 2023-05-26T20:02:16 | 257,103,835 | 0 | 0 | Apache-2.0 | 2020-04-19T21:15:56 | 2020-04-19T21:15:55 | null | UTF-8 | Java | false | false | 1,536 | java | /*
* Copyright 2020-2023 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 sample.extgrant;
import java.util.Map;
import org.springframework.lang.Nullable;
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.core.AuthorizationGrantType;
import org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken;
import org.springframework.util.Assert;
public class CustomCodeGrantAuthenticationToken extends OAuth2AuthorizationGrantAuthenticationToken {
private final String code;
public CustomCodeGrantAuthenticationToken(String code, Authentication clientPrincipal,
@Nullable Map<String, Object> additionalParameters) {
super(new AuthorizationGrantType("urn:ietf:params:oauth:grant-type:custom_code"),
clientPrincipal, additionalParameters);
Assert.hasText(code, "code cannot be empty");
this.code = code;
}
public String getCode() {
return this.code;
}
}
| [
"jgrandja@vmware.com"
] | jgrandja@vmware.com |
d8dfb13ee2585c8ecaa2d57728e2d70bbc78a1df | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /drds-20171016/src/main/java/com/aliyun/drds20171016/models/DeleteDrdsDBRequest.java | 27de1159661dce1bb81beb7989e873117f320e6d | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 912 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.drds20171016.models;
import com.aliyun.tea.*;
public class DeleteDrdsDBRequest extends TeaModel {
@NameInMap("DbName")
public String dbName;
@NameInMap("DrdsInstanceId")
public String drdsInstanceId;
public static DeleteDrdsDBRequest build(java.util.Map<String, ?> map) throws Exception {
DeleteDrdsDBRequest self = new DeleteDrdsDBRequest();
return TeaModel.build(map, self);
}
public DeleteDrdsDBRequest setDbName(String dbName) {
this.dbName = dbName;
return this;
}
public String getDbName() {
return this.dbName;
}
public DeleteDrdsDBRequest setDrdsInstanceId(String drdsInstanceId) {
this.drdsInstanceId = drdsInstanceId;
return this;
}
public String getDrdsInstanceId() {
return this.drdsInstanceId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
77f9de0170748d1442a399f4badf82ee2c148129 | 2e1590adfb2c7c738fd10db663e6a3b9bd42199b | /src/main/java/com/infy/openbanklocal/config/DefaultProfileUtil.java | bdc6bccb5d26870493491730b6bb722d421cac91 | [] | no_license | abhinav-goyall/openbanklocal | b47bd000598bf0edd617cfec81880a0494f59aa8 | 97823a45431cf318da116a0db355378183b28b3d | refs/heads/master | 2020-06-15T04:09:12.444397 | 2019-07-04T08:21:59 | 2019-07-04T08:21:59 | 195,199,877 | 0 | 0 | null | 2019-10-30T17:23:59 | 2019-07-04T08:21:58 | Java | UTF-8 | Java | false | false | 1,717 | java | package com.infy.openbanklocal.config;
import io.github.jhipster.config.JHipsterConstants;
import org.springframework.boot.SpringApplication;
import org.springframework.core.env.Environment;
import java.util.*;
/**
* Utility class to load a Spring profile to be used as default
* when there is no <code>spring.profiles.active</code> set in the environment or as command line argument.
* If the value is not available in <code>application.yml</code> then <code>dev</code> profile will be used as default.
*/
public final class DefaultProfileUtil {
private static final String SPRING_PROFILE_DEFAULT = "spring.profiles.default";
private DefaultProfileUtil() {
}
/**
* Set a default to use when no profile is configured.
*
* @param app the Spring application
*/
public static void addDefaultProfile(SpringApplication app) {
Map<String, Object> defProperties = new HashMap<>();
/*
* The default profile to use when no other profiles are defined
* This cannot be set in the <code>application.yml</code> file.
* See https://github.com/spring-projects/spring-boot/issues/1219
*/
defProperties.put(SPRING_PROFILE_DEFAULT, JHipsterConstants.SPRING_PROFILE_DEVELOPMENT);
app.setDefaultProperties(defProperties);
}
/**
* Get the profiles that are applied else get default profiles.
*
* @param env spring environment
* @return profiles
*/
public static String[] getActiveProfiles(Environment env) {
String[] profiles = env.getActiveProfiles();
if (profiles.length == 0) {
return env.getDefaultProfiles();
}
return profiles;
}
}
| [
"default"
] | default |
4be4d1d73eea1bc6d1302ca00fbcc3cf7149e480 | 6ae84f0dafcf310d8253641de99dbd9922fcaf95 | /spring-boot-spock/src/main/java/com/jojoldu/spock/domain/CustomerService.java | 3269bc8cb6d7501ab21cde2e63b5b274b0764f4d | [] | no_license | seokWonYoon/blog-code | 39121299838ccb632be2db931701024e46587fbc | d7fe6412c2aa3227f7b0e2bc7c96a7cfc20dddcf | refs/heads/master | 2020-03-27T23:05:50.444663 | 2018-09-01T06:04:15 | 2018-09-01T06:04:15 | 147,290,110 | 1 | 0 | null | 2018-09-04T04:55:14 | 2018-09-04T04:55:14 | null | UTF-8 | Java | false | false | 835 | java | package com.jojoldu.spock.domain;
import org.springframework.stereotype.Service;
/**
* Created by jojoldu@gmail.com on 2017. 9. 29.
* Blog : http://jojoldu.tistory.com
* Github : https://github.com/jojoldu
*/
@Service
public class CustomerService {
private CustomerRepository customerRepository;
public CustomerService(CustomerRepository customerRepository) {
this.customerRepository = customerRepository;
}
public String getCustomerName(long id){
return customerRepository.findOne(id).getName();
}
public void joinEvent(long customerId, long point){
Customer customer = customerRepository.findOne(customerId);
customerRepository.savePoint(customer, point);
if(customer.isVip()){
customerRepository.savePoint(customer, point);
}
}
}
| [
"jojoldu@gmail.com"
] | jojoldu@gmail.com |
b9597baa3cb8b65950d47ac378c56a1b8fec9d07 | 17578d0cc25e6c5c9c2ac4711a49ae2bff73fc70 | /src/main/java/com/covens/common/item/equipment/baubles/ItemWrathfulEye.java | d639578e69951531d578aa7cfba769e1d5f7dd3c | [
"MIT"
] | permissive | Sunconure11/Covens-reborn | ab5d0925283fafd04a2291cf55ebbe3736eafb8e | 45faba858bd9b9491c9e222dfecaefb3fed90e1b | refs/heads/master | 2020-04-17T20:47:25.102337 | 2019-01-18T16:01:08 | 2019-01-18T16:58:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,054 | java | package com.covens.common.item.equipment.baubles;
import java.util.List;
import javax.annotation.Nullable;
import com.covens.common.core.statics.ModCreativeTabs;
import com.covens.common.item.ItemMod;
import com.covens.common.lib.LibItemName;
import baubles.api.BaubleType;
import baubles.api.BaublesApi;
import baubles.api.IBauble;
import baubles.api.cap.IBaublesItemHandler;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Enchantments;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class ItemWrathfulEye extends ItemMod implements IBauble {
public ItemWrathfulEye() {
super(LibItemName.WRATHFUL_EYE);
this.setMaxStackSize(1);
this.setCreativeTab(ModCreativeTabs.ITEMS_CREATIVE_TAB);
MinecraftForge.EVENT_BUS.register(this);
}
@Override
public boolean isDamageable() {
return true;
}
public String getNameInefficiently(ItemStack stack) {
return this.getTranslationKey().substring(5);
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, ITooltipFlag advanced) {
tooltip.add(TextFormatting.RED + I18n.format("witch.tooltip." + this.getNameInefficiently(stack) + "_description.name"));
}
@Override
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
if (!world.isRemote) {
IBaublesItemHandler baubles = BaublesApi.getBaublesHandler(player);
for (int i = 0; i < baubles.getSlots(); i++) {
if (baubles.getStackInSlot(i).isEmpty() && baubles.isItemValidForSlot(i, player.getHeldItem(hand), player)) {
baubles.setStackInSlot(i, player.getHeldItem(hand).copy());
if (!player.capabilities.isCreativeMode) {
player.setHeldItem(hand, ItemStack.EMPTY);
}
this.onEquipped(player.getHeldItem(hand), player);
break;
}
}
}
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
}
@Override
public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) {
return enchantment == Enchantments.BINDING_CURSE;
}
@Override
public void onEquipped(ItemStack itemstack, EntityLivingBase player) {
player.playSound(SoundEvents.ENTITY_BLAZE_AMBIENT, .75F, 1.9f);
}
@Override
public BaubleType getBaubleType(ItemStack itemStack) {
return BaubleType.AMULET;
}
@SuppressWarnings("unused")
private boolean doesPlayerHaveAmulet(EntityPlayer e) {
return BaublesApi.isBaubleEquipped(e, this) > 0;
}
}
| [
"zabi94@gmail.com"
] | zabi94@gmail.com |
d3e36e1665f7d3051f6cd4ea959d1dcbc0b8ebc4 | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /ice-20201109/src/main/java/com/aliyun/ice20201109/models/GetCategoriesRequest.java | 98ec3e6557b0f90eaa75430750e1e57ad06994c1 | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 1,540 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ice20201109.models;
import com.aliyun.tea.*;
public class GetCategoriesRequest extends TeaModel {
@NameInMap("CateId")
public Long cateId;
@NameInMap("PageNo")
public Long pageNo;
@NameInMap("PageSize")
public Long pageSize;
@NameInMap("SortBy")
public String sortBy;
@NameInMap("Type")
public String type;
public static GetCategoriesRequest build(java.util.Map<String, ?> map) throws Exception {
GetCategoriesRequest self = new GetCategoriesRequest();
return TeaModel.build(map, self);
}
public GetCategoriesRequest setCateId(Long cateId) {
this.cateId = cateId;
return this;
}
public Long getCateId() {
return this.cateId;
}
public GetCategoriesRequest setPageNo(Long pageNo) {
this.pageNo = pageNo;
return this;
}
public Long getPageNo() {
return this.pageNo;
}
public GetCategoriesRequest setPageSize(Long pageSize) {
this.pageSize = pageSize;
return this;
}
public Long getPageSize() {
return this.pageSize;
}
public GetCategoriesRequest setSortBy(String sortBy) {
this.sortBy = sortBy;
return this;
}
public String getSortBy() {
return this.sortBy;
}
public GetCategoriesRequest setType(String type) {
this.type = type;
return this;
}
public String getType() {
return this.type;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
1ee047f0411330af3d1e80b05b3be94a75b3741a | 6a85531d2cda586adbfdccb63e70c56dfaf461dd | /core/src/test/java/io/doov/core/dsl/impl/num/NumericConditionTest.java | b0e193bff14df0b36b6e5e01db4c75902002d458 | [
"Apache-2.0"
] | permissive | JustinRudat/doov | a9dc512b650410bc8f1c39947e4060213d0f5c6c | 7726e62cf5ed31e5686414d255ee02efe3521f52 | refs/heads/master | 2020-03-28T01:14:50.495870 | 2019-02-04T15:09:36 | 2019-02-04T15:09:36 | 147,489,609 | 1 | 0 | null | 2018-09-05T09:00:36 | 2018-09-05T09:00:36 | null | UTF-8 | Java | false | false | 4,077 | java | /*
* Copyright (C) by Courtanet, All Rights Reserved.
*/
package io.doov.core.dsl.impl.num;
import static io.doov.core.dsl.DOOV.when;
import static io.doov.core.dsl.lang.ReduceType.FAILURE;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertFalse;
import java.util.Locale;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import io.doov.core.dsl.field.types.IntegerFieldInfo;
import io.doov.core.dsl.lang.Result;
import io.doov.core.dsl.lang.ValidationRule;
import io.doov.core.dsl.meta.Metadata;
import io.doov.core.dsl.runtime.GenericModel;
/**
* @see NumericCondition
*/
public class NumericConditionTest {
private static Locale LOCALE = Locale.US;
private ValidationRule rule;
private GenericModel model = new GenericModel();
private IntegerFieldInfo A = model.intField(1, "A"),
B = model.intField(2, "B");
private Result result;
private Metadata reduce;
@Test
void lesserThan_value() {
rule = when(A.lesserThan(0)).validate();
result = rule.executeOn(model);
reduce = result.reduce(FAILURE);
assertFalse(result.value());
assertThat(rule.readable(LOCALE)).isEqualTo("rule when A < 0 validate");
assertThat(result.getFailureCause(LOCALE)).isEqualTo("A < 0");
}
@Test
void lesserThan_field() {
rule = when(B.lesserThan(A)).validate();
result = rule.executeOn(model);
reduce = result.reduce(FAILURE);
assertFalse(result.value());
assertThat(rule.readable(LOCALE)).isEqualTo("rule when B < A validate");
assertThat(result.getFailureCause(LOCALE)).isEqualTo("B < A");
}
@Test
void lesserOrEquals_value() {
rule = when(A.lesserOrEquals(0)).validate();
result = rule.executeOn(model);
reduce = result.reduce(FAILURE);
assertFalse(result.value());
assertThat(rule.readable(LOCALE)).isEqualTo("rule when A <= 0 validate");
assertThat(result.getFailureCause(LOCALE)).isEqualTo("A <= 0");
}
@Test
void lesserOrEquals_field() {
rule = when(B.lesserOrEquals(A)).validate();
result = rule.executeOn(model);
reduce = result.reduce(FAILURE);
assertFalse(result.value());
assertThat(rule.readable(LOCALE)).isEqualTo("rule when B <= A validate");
assertThat(result.getFailureCause(LOCALE)).isEqualTo("B <= A");
}
@Test
void greaterThan_value() {
rule = when(A.greaterThan(2)).validate();
result = rule.executeOn(model);
reduce = result.reduce(FAILURE);
assertFalse(result.value());
assertThat(rule.readable(LOCALE)).isEqualTo("rule when A > 2 validate");
assertThat(result.getFailureCause(LOCALE)).isEqualTo("A > 2");
}
@Test
void greaterThan_field() {
rule = when(A.greaterThan(B)).validate();
result = rule.executeOn(model);
reduce = result.reduce(FAILURE);
assertFalse(result.value());
assertThat(rule.readable(LOCALE)).isEqualTo("rule when A > B validate");
assertThat(result.getFailureCause(LOCALE)).isEqualTo("A > B");
}
@Test
void greaterOrEquals_value() {
rule = when(A.greaterOrEquals(2)).validate();
result = rule.executeOn(model);
reduce = result.reduce(FAILURE);
assertFalse(result.value());
assertThat(rule.readable(LOCALE)).isEqualTo("rule when A >= 2 validate");
assertThat(result.getFailureCause(LOCALE)).isEqualTo("A >= 2");
}
@Test
void greaterOrEquals_field() {
rule = when(A.greaterOrEquals(B)).validate();
result = rule.executeOn(model);
reduce = result.reduce(FAILURE);
assertFalse(result.value());
assertThat(rule.readable(LOCALE)).isEqualTo("rule when A >= B validate");
assertThat(result.getFailureCause(LOCALE)).isEqualTo("A >= B");
}
@AfterEach
void afterEach() {
System.out.println(rule + " -> " + reduce);
}
}
| [
"ozangunalp@gmail.com"
] | ozangunalp@gmail.com |
a69a3731ac94bbb2f35c94d554849dddc6f8ae4a | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/p090c/p091a/p093b/ViewEvent.java | ba5ba9af699e7b514b39c047e1b3d5ca399d1bcc | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 793 | java | package p090c.p091a.p093b;
import android.view.View;
/* renamed from: c.a.b.i */
/* compiled from: ViewEvent */
public class ViewEvent {
/* renamed from: a */
private Object f4178a;
/* renamed from: b */
private String f4179b;
/* renamed from: c */
private View f4180c;
public String toString() {
StringBuilder sb = new StringBuilder(this.f4179b);
if (this.f4178a != null) {
sb.append(", ");
sb.append(this.f4178a.getClass().getName());
}
if (this.f4180c != null) {
sb.append(", page=");
sb.append(this.f4180c.getContext().getClass().getName());
sb.append(", view=");
sb.append(C0889k.m4074a(this.f4180c));
}
return sb.toString();
}
}
| [
"seasonpplp@qq.com"
] | seasonpplp@qq.com |
cb7d81bc229818257ef6c85d0e60f6bdc5c505fa | bfe4cc4bb945ab7040652495fbf1e397ae1b72f7 | /apis/swift/src/main/java/org/jclouds/openstack/swift/domain/internal/DelegatingMutableObjectInfoWithMetadata.java | 9f2c2001223f7989c3c1f7a5c0feda73c48c2fa3 | [
"Apache-2.0"
] | permissive | dllllb/jclouds | 348d8bebb347a95aa4c1325590c299be69804c7d | fec28774da709e2189ba563fc3e845741acea497 | refs/heads/master | 2020-12-25T11:42:31.362453 | 2011-07-30T22:32:07 | 2011-07-30T22:32:07 | 1,571,863 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,594 | java | /**
*
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.jclouds.openstack.swift.domain.internal;
import java.net.URI;
import java.util.Date;
import java.util.Map;
import org.jclouds.io.payloads.BaseMutableContentMetadata;
import org.jclouds.openstack.swift.domain.MutableObjectInfoWithMetadata;
import org.jclouds.openstack.swift.domain.ObjectInfo;
/**
*
* @author Adrian Cole
*
*/
public class DelegatingMutableObjectInfoWithMetadata extends BaseMutableContentMetadata implements
MutableObjectInfoWithMetadata {
/** The serialVersionUID */
private static final long serialVersionUID = 5280642704532078500L;
private final MutableObjectInfoWithMetadata delegate;
public DelegatingMutableObjectInfoWithMetadata(MutableObjectInfoWithMetadata delegate) {
this.delegate = delegate;
}
@Override
public Long getContentLength() {
return delegate.getBytes();
}
@Override
public String getContentType() {
return delegate.getContentType();
}
@Override
public byte[] getContentMD5() {
return delegate.getHash();
}
@Override
public int hashCode() {
return delegate.hashCode();
}
@Override
public void setContentLength(Long bytes) {
if (bytes != null)
delegate.setBytes(bytes);
}
@Override
public void setContentType(String contentType) {
delegate.setContentType(contentType);
}
@Override
public void setContentMD5(byte[] hash) {
delegate.setHash(hash);
}
public MutableObjectInfoWithMetadata getDelegate() {
return delegate;
}
@Override
public Map<String, String> getMetadata() {
return delegate.getMetadata();
}
@Override
public void setBytes(Long bytes) {
delegate.setBytes(bytes);
}
@Override
public void setHash(byte[] hash) {
delegate.setHash(hash);
}
@Override
public void setLastModified(Date lastModified) {
delegate.setLastModified(lastModified);
}
@Override
public void setName(String name) {
delegate.setName(name);
}
@Override
public Long getBytes() {
return delegate.getBytes();
}
@Override
public byte[] getHash() {
return delegate.getHash();
}
@Override
public Date getLastModified() {
return delegate.getLastModified();
}
@Override
public String getName() {
return delegate.getName();
}
@Override
public int compareTo(ObjectInfo o) {
return delegate.compareTo(o);
}
@Override
public void setContainer(String container) {
delegate.setContainer(container);
}
@Override
public String getContainer() {
return delegate.getContainer();
}
@Override
public void setUri(URI uri) {
delegate.setUri(uri);
}
@Override
public URI getUri() {
return delegate.getUri();
}
}
| [
"adrian@jclouds.org"
] | adrian@jclouds.org |
1cd714adeb3ae09f2b5ef17561348bdbe6b2894a | fd2917c5728d6e62745a62bb9bbd7b67f9fe5899 | /ai-classification/src/main/java/ao/ai/classify/decision/impl/input/processed/example/LocalContext.java | 7f6a2418065f070762d636d7b284482643b016ad | [] | no_license | alexoooo/datamine-ai | 25300480419c9d23f9695bb51bff627a92b92b70 | 10aa77cf7afc214b932e4e755aa57af946688bd4 | refs/heads/master | 2022-02-26T17:02:24.595416 | 2019-10-20T16:38:23 | 2019-10-20T16:38:23 | 166,341,636 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 592 | java | package ao.ai.classify.decision.impl.input.processed.example;
import ao.ai.classify.decision.impl.input.processed.attribute.Attribute;
import ao.ai.classify.decision.impl.input.processed.data.LocalDatum;
import java.util.Collection;
import java.util.List;
/**
*
*/
public interface LocalContext
{
public LocalExample withTarget(LocalDatum target);
public List<Attribute> dataAttributes();
public Collection<LocalDatum> data();
public void add(LocalDatum datum);
public void addAll(LocalContext dataFrom);
public LocalDatum datumOfType(Attribute attribute);
}
| [
"ostrovsky.alex@gmail.com"
] | ostrovsky.alex@gmail.com |
c485f9d4c1f0d35e4a6eb54fbb2ba35f910bcd19 | 60a6a97e33382fd1d19ca74c2c17700122f9d2ff | /nuts/src/uk/dangrew/nuts/apis/tesco/model/api/GuidelineDailyAmountReference.java | 490ef7e783f78fabfc02954971ef43b1be141f62 | [
"Apache-2.0"
] | permissive | DanGrew/Nuts | 19b946672a00651c1b36b4dc4b99dbedc6c08786 | e0f6835f376dc911c630122c2b21c7130c437bfd | refs/heads/master | 2021-06-03T08:23:02.295355 | 2021-02-10T08:04:59 | 2021-02-10T08:04:59 | 97,559,046 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,138 | java | package uk.dangrew.nuts.apis.tesco.model.api;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
public class GuidelineDailyAmountReference {
private final ObjectProperty< String > description;
private final ObservableList< String > headers;
private final ObservableList< String > footers;
private final GuidelineDailyAmounts gdaValue;
public GuidelineDailyAmountReference() {
this.description = new SimpleObjectProperty<>();
this.headers = FXCollections.observableArrayList();
this.footers = FXCollections.observableArrayList();
this.gdaValue = new GuidelineDailyAmounts();
}//End Constructor
public ObjectProperty< String > description() {
return description;
}//End Method
public ObservableList< String > headers() {
return headers;
}//End Method
public ObservableList< String > footers() {
return footers;
}//End Method
public GuidelineDailyAmounts gda() {
return gdaValue;
}//End Method
}//End Class
| [
"danielanthonygrew@gmail.com"
] | danielanthonygrew@gmail.com |
27c13121408cf8a766d3b408e17cf0d5e846526b | d7e46c63e3d281645df10c1a98dbbce42cfd4a0b | /src/main/java/edu/hm/hafner/util/NoSuchElementException.java | b73b3bd5fd154dbde07d918f0d79f5e64d0fbbfe | [
"MIT"
] | permissive | spatlla/analysis-model | b0034cf7c632f702b04ba6ad95dcfc22917e4782 | 962a96ffb27322d4c78bdc0e4442e28dc86d5dc2 | refs/heads/master | 2020-04-14T04:41:43.515656 | 2018-12-29T15:16:03 | 2018-12-29T15:16:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,589 | java | package edu.hm.hafner.util;
import java.util.Formatter;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
* Thrown by various accessor methods to indicate that the element being requested does not exist. Enhances the
* exception {@link java.util.NoSuchElementException} by providing a constructor with format string.
*
* @author Ullrich Hafner
*/
@SuppressFBWarnings("NM")
public class NoSuchElementException extends java.util.NoSuchElementException {
private static final long serialVersionUID = -355717274596010159L;
/**
* Constructs a {@code NoSuchElementException}, saving a reference to the error message for later retrieval by the
* {@link #getMessage()} method.
*
* @param format
* A format string as described in <a href="../util/Formatter.html#syntax">Format string syntax</a>
* @param args
* Arguments referenced by the format specifiers in the format string. If there are more arguments than
* format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.
* The maximum number of arguments is limited by the maximum dimension of a Java array as defined by
* <cite>The Java™ Virtual Machine Specification</cite>. The behaviour on a {@code null} argument
* depends on the <a href="../util/Formatter.html#syntax">conversion</a>.
*
* @see Formatter
*/
public NoSuchElementException(final String format, final Object... args) {
super(String.format(format, args));
}
}
| [
"ullrich.hafner@gmail.com"
] | ullrich.hafner@gmail.com |
7b075b773d3bca59ea728f8fe1b559a371af2237 | 425dca0e6ddef32e871458a070b6f242804269be | /src/icom/yh/wish/controller/WishController.java | e2fd6a29d09c23d6ffbbb3065f4d2a8e2cbe4759 | [] | no_license | gulangzai/wish | 94f20b9ecf65b889140f0c8cbda010affb9cfb09 | 898c46d3ee23538ff764763d5597b0c76da1f9af | refs/heads/master | 2021-01-01T06:56:59.950558 | 2017-07-18T06:13:21 | 2017-07-18T06:21:27 | 97,556,141 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,407 | java | package icom.yh.wish.controller;
import java.io.File;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.commons.io.FileUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import icom.yh.wish.entity.WishSimpleData;
import icom.yh.wish.service.WishService;
@Controller
@RequestMapping("/wish")
public class WishController {
@Resource
private WishService wishService;
/**
* 搜索产品列表
* @param currentPage
* @param pageSize
* @param key
* @param model
* @return
*/
@RequestMapping(value="/wishDataList", method=RequestMethod.GET)
public String wishDataList(@RequestParam(defaultValue="1") int currentPage,
@RequestParam(defaultValue="24")int pageSize,
@RequestParam(defaultValue="")String key, /*@RequestParam(defaultValue="")String[] itemIds,*/ Model model){
model = wishService.wishDataList(currentPage,pageSize,key, /*itemIds,*/ model);
return "search";
}
@RequestMapping(value="/simpleDataSave" ,method=RequestMethod.POST)
@ResponseBody
public Map<String,String> simpleDataSave(WishSimpleData simpleData){
return wishService.simpleDataSave(simpleData);
}
@RequestMapping(value="/search", method=RequestMethod.POST)
public String wishSearch(String query, int start){
return "";
}
/*@RequestMapping(value="/simpleDataDel/{itemId}" ,method=RequestMethod.GET)
public String simpleDataDel(@PathVariable String itemId,
@RequestParam(defaultValue="1")int currentPage,
@RequestParam(defaultValue="magnets")String key,
@RequestParam(defaultValue="search")String t,
@RequestParam(defaultValue="")String params){
wishService.simpleDataDel(itemId);
if(t.equals("select"))
return "redirect:/wish/selectWishData?currentPage="+currentPage+"&"+params;
else if(t.equals("search"))
return "redirect:/wish/wishDataList?currentPage="+currentPage+"&key="+key;
else
return "redirect:/wish/add";
}*/
@RequestMapping(value="/simpleDataDel/{itemId}" ,method=RequestMethod.GET)
@ResponseBody
public Map<String,Object> simpleDataDel(@PathVariable String itemId, String type){
return wishService.simpleDataDel(itemId, type);
}
@RequestMapping("/wishDataDownLoad")
public ResponseEntity<byte[]> wishDataDownLoad(@RequestParam(defaultValue="0")int isC,@RequestParam(defaultValue="1")int type) throws Exception{
String path= wishService.myWishData(isC, type);
File file=new File(path);
HttpHeaders headers = new HttpHeaders();
// String fileName=new String("wish.xlsx".getBytes("UTF-8"),"iso-8859-1");//Ϊ�˽������������������
// String fileName = "wish.xls";
headers.setContentDispositionFormData("attachment", "wish.zip");
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),
headers, HttpStatus.CREATED);
}
@RequestMapping(value="/add", method=RequestMethod.GET)
public String add(Model model){
model = wishService.add(model);
return "add";
}
@RequestMapping(value="/add", method=RequestMethod.POST)
public String add(@RequestParam(value = "itemIds")String[] itemIds,Model model){
wishService.myProIdAdd(itemIds, model);
return "add";
}
@RequestMapping(value="/list", method=RequestMethod.GET)
public String list(@RequestParam(defaultValue="1")int type,
@RequestParam(defaultValue="0")int isC,
@RequestParam(defaultValue="0")int isS,
@RequestParam(defaultValue="1")int currentPage,
@RequestParam(defaultValue="25")int pageSize,Model model){
model = wishService.myWishDataList(type,isC, isS, currentPage, pageSize, model);
return "list";
}
@RequestMapping(value="/proDel/{itemId}/{currentPage}", method=RequestMethod.GET)
public String proDel(@PathVariable String itemId, @PathVariable int currentPage){
wishService.simpleDataDel(itemId);
return "redirect:/wish/list?currentPage="+currentPage;
}
@RequestMapping(value="/proDelAll", method=RequestMethod.GET)
public String proDelAll(){
wishService.simpleDataDelAll();
return "redirect:/wish/list?currentPage=1";
}
@RequestMapping(value="/selectWishData", method=RequestMethod.GET)
public String selectWishData(@RequestParam(defaultValue="1") int hot,
@RequestParam(defaultValue="0")int fly,
@RequestParam(defaultValue="0")int newhot,
@RequestParam(defaultValue="0")int newfly,
@RequestParam(defaultValue="0")int newshophot,
@RequestParam(defaultValue="0")int newshopfly,
@RequestParam(defaultValue="1")int currentPage,
@RequestParam(defaultValue="25")int pageSize,Model model){
model = wishService.selectWishData(hot,fly,newhot,newfly,newshophot,newshopfly,currentPage,pageSize,model);
return "select";
}
/**
* 归档
* @param itemId
* @param currentPage
* @return
*/
@RequestMapping(value="/dataC/{itemId}/{currentPage}")
public String dataCatch(@PathVariable String itemId, @PathVariable int currentPage){
wishService.dataC(itemId);
return "redirect:/wish/list?currentPage="+currentPage;
}
@RequestMapping(value="/dataCAll")
public String dataCAll(){
wishService.dataCAll();
return "redirect:/wish/list?currentPage=1";
}
@RequestMapping(value="/keyWordsTask", method=RequestMethod.POST)
@ResponseBody
public Map<String,String> keyWordsTask(@RequestParam(value="keyWords[]", defaultValue="")String[] keyWords,@RequestParam(defaultValue="2")int num){
return wishService.keyWordsTask(keyWords, num);
}
@RequestMapping(value="/keyWordsTask", method=RequestMethod.GET)
public String _keyWordsTask(){
return "keywordstask";
}
@RequestMapping(value="/taskList", method=RequestMethod.GET)
public String taskList(@RequestParam(defaultValue="1")int currentPage,
@RequestParam(defaultValue="20")int pageSize, Model model){
model = wishService.taskList(currentPage, pageSize, model);
return "tasklist";
}
@RequestMapping(value="/taskDataList/{taskId}", method=RequestMethod.GET)
public String taskDataList(@PathVariable int taskId,
@RequestParam(defaultValue="1")int currentPage,
@RequestParam(defaultValue="30")int pageSize, Model model){
model = wishService.taskDataList(taskId, currentPage, pageSize, model);
return "taskdatalist";
}
@RequestMapping(value="/taskDel/{sdId}/{taskId}/{currentPage}", method=RequestMethod.GET)
public String taskDel(@PathVariable int sdId,@PathVariable int taskId,@PathVariable int currentPage){
wishService.taskDel(sdId, taskId);
return "redirect:/wish/taskDataList/"+taskId+"?currentPage="+currentPage;
}
@RequestMapping(value="/listAdd/{sdId}/{taskId}/{currentPage}")
public String listAdd(@PathVariable int sdId,@PathVariable int taskId, @PathVariable int currentPage){
wishService.listAdd(sdId);
return "redirect:/wish/taskDataList/"+taskId+"?currentPage="+currentPage;
}
}
| [
"1871710810@qq.com"
] | 1871710810@qq.com |
78f48644b998b9fd488c1a6a4e05c936821b1873 | ab2678c3d33411507d639ff0b8fefb8c9a6c9316 | /jgralab/src/de/uni_koblenz/jgralab/greql2/schema/IsSequenceElementOf.java | f57ef24d9c1c87a5fb954e2df0fc9df756aad954 | [] | no_license | dmosen/wiki-analysis | b58c731fa2d66e78fe9b71699bcfb228f4ab889e | e9c8d1a1242acfcb683aa01bfacd8680e1331f4f | refs/heads/master | 2021-01-13T01:15:10.625520 | 2013-10-28T13:27:16 | 2013-10-28T13:27:16 | 8,741,553 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,106 | java | /*
* This code was generated automatically.
* Do NOT edit this file, changes will be lost.
* Instead, change and commit the underlying schema.
*/
package de.uni_koblenz.jgralab.greql2.schema;
import de.uni_koblenz.jgralab.EdgeDirection;
import de.uni_koblenz.jgralab.greql2.schema.PathDescription;
import de.uni_koblenz.jgralab.greql2.schema.SequentialPathDescription;
/**
* FromVertexClass: PathDescription
* FromRoleName : sequenceElement
* ToVertexClass: SequentialPathDescription
* ToRoleName :
*/
public interface IsSequenceElementOf extends de.uni_koblenz.jgralab.greql2.schema.IsPathDescriptionOf {
public static final de.uni_koblenz.jgralab.schema.EdgeClass EC = de.uni_koblenz.jgralab.greql2.schema.Greql2Schema.instance().ec_IsSequenceElementOf;
/**
* @return the next de.uni_koblenz.jgralab.greql2.schema.Greql2Aggregation edge in the global edge sequence
*/
public de.uni_koblenz.jgralab.greql2.schema.Greql2Aggregation getNextGreql2AggregationInGraph();
/**
* @return the next de.uni_koblenz.jgralab.greql2.schema.IsPathDescriptionOf edge in the global edge sequence
*/
public de.uni_koblenz.jgralab.greql2.schema.IsPathDescriptionOf getNextIsPathDescriptionOfInGraph();
/**
* @return the next de.uni_koblenz.jgralab.greql2.schema.IsSequenceElementOf edge in the global edge sequence
*/
public de.uni_koblenz.jgralab.greql2.schema.IsSequenceElementOf getNextIsSequenceElementOfInGraph();
/**
* @return the next edge of class de.uni_koblenz.jgralab.greql2.schema.Greql2Aggregation at the "this" vertex
*/
public de.uni_koblenz.jgralab.greql2.schema.Greql2Aggregation getNextGreql2AggregationIncidence();
/**
* @return the next edge of class de.uni_koblenz.jgralab.greql2.schema.Greql2Aggregation at the "this" vertex
* @param orientation the orientation of the edge
*/
public de.uni_koblenz.jgralab.greql2.schema.Greql2Aggregation getNextGreql2AggregationIncidence(EdgeDirection orientation);
/**
* @return the next edge of class de.uni_koblenz.jgralab.greql2.schema.IsPathDescriptionOf at the "this" vertex
*/
public de.uni_koblenz.jgralab.greql2.schema.IsPathDescriptionOf getNextIsPathDescriptionOfIncidence();
/**
* @return the next edge of class de.uni_koblenz.jgralab.greql2.schema.IsPathDescriptionOf at the "this" vertex
* @param orientation the orientation of the edge
*/
public de.uni_koblenz.jgralab.greql2.schema.IsPathDescriptionOf getNextIsPathDescriptionOfIncidence(EdgeDirection orientation);
/**
* @return the next edge of class de.uni_koblenz.jgralab.greql2.schema.IsSequenceElementOf at the "this" vertex
*/
public de.uni_koblenz.jgralab.greql2.schema.IsSequenceElementOf getNextIsSequenceElementOfIncidence();
/**
* @return the next edge of class de.uni_koblenz.jgralab.greql2.schema.IsSequenceElementOf at the "this" vertex
* @param orientation the orientation of the edge
*/
public de.uni_koblenz.jgralab.greql2.schema.IsSequenceElementOf getNextIsSequenceElementOfIncidence(EdgeDirection orientation);
public PathDescription getAlpha();
public SequentialPathDescription getOmega();
}
| [
"dmosen@uni-koblenz.de"
] | dmosen@uni-koblenz.de |
da0a108d20553a5cbbaf4a8f6112bbf06935c2ea | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-ws/results/XWIKI-13196-5-30-Single_Objective_GGA-WeightedSum/org/xwiki/search/solr/internal/reference/DocumentSolrReferenceResolver_ESTest.java | 84bb033f955e7edceb52c10eabf5953596997bab | [
"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 | 605 | java | /*
* This file was automatically generated by EvoSuite
* Tue Mar 31 09:34:42 UTC 2020
*/
package org.xwiki.search.solr.internal.reference;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DocumentSolrReferenceResolver_ESTest extends DocumentSolrReferenceResolver_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
5697d86281a9435062460b6d431573c8d0d59edc | 6ac207167b74de32018fed6bb36edb0c80b864b2 | /src/main/java/com/perye/imagesearch/util/Util.java | cb6581f1e3de0c4320f4021f4d4d6a0e61d6f0c8 | [] | no_license | linxigal/ImageSearch | 002bf9d607240b34ebea6d3eaa99d806e89b998f | e2d61a29572687eff4a693a120d7dc9206488f05 | refs/heads/master | 2021-04-11T01:57:05.034771 | 2019-03-24T14:05:28 | 2019-03-24T14:05:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,148 | java | package com.perye.imagesearch.util;
import org.json.JSONObject;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.BitSet;
import java.util.Date;
import java.util.Iterator;
import java.util.TimeZone;
import java.util.regex.Pattern;
/**
* @Author: Perye
* @Date: 2019-03-23
*/
public class Util {
private static BitSet URI_UNRESERVED_CHARACTERS = new BitSet();
private static String[] PERCENT_ENCODED_STRINGS = new String[256];
static {
for (int i = 'a'; i <= 'z'; i++) {
URI_UNRESERVED_CHARACTERS.set(i);
}
for (int i = 'A'; i <= 'Z'; i++) {
URI_UNRESERVED_CHARACTERS.set(i);
}
for (int i = '0'; i <= '9'; i++) {
URI_UNRESERVED_CHARACTERS.set(i);
}
URI_UNRESERVED_CHARACTERS.set('-');
URI_UNRESERVED_CHARACTERS.set('.');
URI_UNRESERVED_CHARACTERS.set('_');
URI_UNRESERVED_CHARACTERS.set('~');
for (int i = 0; i < PERCENT_ENCODED_STRINGS.length; ++i) {
PERCENT_ENCODED_STRINGS[i] = String.format("%%%02X", i);
}
}
public static String mkString(Iterator<String> iter, char seprator) {
if (!iter.hasNext()) {
return "";
}
StringBuilder builder = new StringBuilder();
while (iter.hasNext()) {
String item = iter.next();
builder.append(item);
builder.append(seprator);
}
builder.deleteCharAt(builder.length() - 1); // remove last sep
return builder.toString();
}
/**
* Normalize a string for use in BCE web service APIs. The normalization algorithm is:
* <ol>
* <li>Convert the string into a UTF-8 byte array.</li>
* <li>Encode all octets into percent-encoding, except all URI unreserved characters per the RFC 3986.</li>
* </ol>
*
* All letters used in the percent-encoding are in uppercase.
*
* @param value the string to normalize.
* @param encodeSlash if encode '/'
* @return the normalized string.
*/
public static String uriEncode(String value, boolean encodeSlash) {
try {
StringBuilder builder = new StringBuilder();
for (byte b : value.getBytes(AipClientConst.DEFAULT_ENCODING)) {
if (URI_UNRESERVED_CHARACTERS.get(b & 0xFF)) {
builder.append((char) b);
} else {
builder.append(PERCENT_ENCODED_STRINGS[b & 0xFF]);
}
}
String encodeString = builder.toString();
if (!encodeSlash) {
return encodeString.replace("%2F", "/");
}
return encodeString;
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
public static String getCanonicalTime() {
SimpleDateFormat utcDayFormat = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat utcHourFormat = new SimpleDateFormat("hh:mm:ss");
utcDayFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
utcHourFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
Date now = new Date();
return String.format("%sT%sZ", utcDayFormat.format(now), utcHourFormat.format(now));
}
/**
*
* @param filePath 文件路径
* @return file bytes
* @throws IOException 读取文件错误
*/
public static byte[] readFileByBytes(String filePath) throws IOException {
File file = new File(filePath);
if (!file.exists()) {
throw new FileNotFoundException(filePath);
}
ByteArrayOutputStream bos = new ByteArrayOutputStream(((int) file.length()));
BufferedInputStream in = null;
try {
in = new BufferedInputStream(new FileInputStream(file));
int bufSize = 1024;
byte[] buffer = new byte[bufSize];
int len = 0;
while (-1 != (len = in.read(buffer, 0, bufSize))) {
bos.write(buffer, 0, len);
}
return bos.toByteArray();
} finally {
try {
if (in != null) {
in.close();
}
} catch (IOException e) {
e.printStackTrace();
}
bos.close();
}
}
public static void writeBytesToFileSystem(byte[] data, String output) throws IOException {
DataOutputStream out = null;
try {
out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(output)));
out.write(data);
} finally {
if (out != null) {
out.close();
}
}
}
public static JSONObject getGeneralError(int errorCode, String errorMsg) {
JSONObject json = new JSONObject();
json.put("error_code", errorCode);
json.put("error_msg", errorMsg);
return json;
}
public static boolean isLiteral(String input) {
Pattern pattern = Pattern.compile("[0-9a-zA-Z_]*");
return pattern.matcher(input).matches();
}
} | [
"11143526@qq.com"
] | 11143526@qq.com |
ae1fd4b48d2d1644974c241615a91d31065bc415 | 89e1811c3293545c83966995cb000c88fc95fa79 | /MCHH-boss/src/main/java/com/threefiveninetong/mchh/sys/vo/ResourcesVO.java | 7b9ebc4037cc37bf9b556e2eb9e1c2fa4105972c | [] | no_license | wxddong/MCHH-parent | 9cafcff20d2f36b5d528fd8dd608fa9547327486 | 2898fdf4e778afc01b850d003899f25005b8e415 | refs/heads/master | 2021-01-01T17:25:29.109072 | 2017-07-23T02:28:59 | 2017-07-23T02:28:59 | 96,751,862 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,652 | java | package com.threefiveninetong.mchh.sys.vo;
/**
*
* @author xuyh
* @date 2013-7-16上午11:19:37
* @description 资源视图对象
*/
public class ResourcesVO {
private String id;
private String name;
private String uri;// 资源uri
private int type;// 类型
private int menu;//是否为菜单,0不是1是
private int grantFlag;// 是否受权限控制
private String parentId;// 父id
private int flag;// 可用标识
private int onum;// 顺序
private String remark;
private int logFlag;// 是否记录日志
private String logUri;// 日志url
private int logMethod;// 日志方法:0 GET,1 POST
private int checked;// 在关联查询角色对应的资源有没有选中时用,该属性不与数据库中具体字段对应
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getFlag() {
return flag;
}
public void setFlag(int flag) {
this.flag = flag;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public int getOnum() {
return onum;
}
public void setOnum(int onum) {
this.onum = onum;
}
public int getLogFlag() {
return logFlag;
}
public void setLogFlag(int logFlag) {
this.logFlag = logFlag;
}
public String getLogUri() {
return logUri;
}
public void setLogUri(String logUri) {
this.logUri = logUri;
}
public int getLogMethod() {
return logMethod;
}
public void setLogMethod(int logMethod) {
this.logMethod = logMethod;
}
public int getGrantFlag() {
return grantFlag;
}
public void setGrantFlag(int grantFlag) {
this.grantFlag = grantFlag;
}
public String getUri() {
return uri;
}
public void setUri(String uri) {
this.uri = uri;
}
public int getChecked() {
return checked;
}
public void setChecked(int checked) {
this.checked = checked;
}
public int getMenu() {
return menu;
}
public void setMenu(int menu) {
this.menu = menu;
}
@Override
public String toString() {
return "ResourcesVO [flag=" + flag + ", grantFlag=" + grantFlag + ", id=" + id + ", logFlag=" + logFlag
+ ", logMethod=" + logMethod + ", logUri=" + logUri + ", name=" + name + ", onum=" + onum
+ ", parentId=" + parentId + ", remark=" + remark + ", type=" + type + ", uri=" + uri + "]";
}
}
| [
"wxd_1024@163.com"
] | wxd_1024@163.com |
5e66c596835fa2af8adb89b6eaef91f9663e9f1e | 63da595a4e74145e86269e74e46c98ad1c1bcad3 | /java/com/genscript/gsscm/epicorwebservice/stub/salesorder/CheckOrderLinkToInterCompanyPOResponse.java | 96223a9346854a40a4c96f0811a3d10d84d2015c | [] | 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 | 3,304 | java |
package com.genscript.gsscm.epicorwebservice.stub.salesorder;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="CheckOrderLinkToInterCompanyPOResult" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="cICPOLinkMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="callContextOut" type="{http://epicor.com/schemas}CallContextDataSetType" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"checkOrderLinkToInterCompanyPOResult",
"cicpoLinkMessage",
"callContextOut"
})
@XmlRootElement(name = "CheckOrderLinkToInterCompanyPOResponse")
public class CheckOrderLinkToInterCompanyPOResponse {
@XmlElement(name = "CheckOrderLinkToInterCompanyPOResult", namespace = "http://epicor.com/webservices/")
protected boolean checkOrderLinkToInterCompanyPOResult;
@XmlElement(name = "cICPOLinkMessage", namespace = "http://epicor.com/webservices/")
protected String cicpoLinkMessage;
@XmlElement(namespace = "http://epicor.com/webservices/")
protected CallContextDataSetType callContextOut;
/**
* Gets the value of the checkOrderLinkToInterCompanyPOResult property.
*
*/
public boolean isCheckOrderLinkToInterCompanyPOResult() {
return checkOrderLinkToInterCompanyPOResult;
}
/**
* Sets the value of the checkOrderLinkToInterCompanyPOResult property.
*
*/
public void setCheckOrderLinkToInterCompanyPOResult(boolean value) {
this.checkOrderLinkToInterCompanyPOResult = value;
}
/**
* Gets the value of the cicpoLinkMessage property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCICPOLinkMessage() {
return cicpoLinkMessage;
}
/**
* Sets the value of the cicpoLinkMessage property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCICPOLinkMessage(String value) {
this.cicpoLinkMessage = value;
}
/**
* Gets the value of the callContextOut property.
*
* @return
* possible object is
* {@link CallContextDataSetType }
*
*/
public CallContextDataSetType getCallContextOut() {
return callContextOut;
}
/**
* Sets the value of the callContextOut property.
*
* @param value
* allowed object is
* {@link CallContextDataSetType }
*
*/
public void setCallContextOut(CallContextDataSetType value) {
this.callContextOut = value;
}
}
| [
"253479240@qq.com"
] | 253479240@qq.com |
cbc42d911ac3f9c5fd4c86d4285b1c55b74ce143 | 629e581abf705662c5c860d1b39504bb8cf06853 | /src/creational_fasbp/builderPattern/PackingBottle.java | 67819da1f094a892cb97158d2f838e770386b086 | [] | no_license | icterguru/DesignPatternsMadeEasy | 80c22a5a4cedc8b35190010e002d197d740becea | a9ab042aa4e9ee7f5feed469fb4d7509baca1498 | refs/heads/master | 2021-08-23T18:30:23.178343 | 2017-12-06T02:28:01 | 2017-12-06T02:28:01 | 113,257,604 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 166 | java | package creational_fasbp.builderPattern;
public class PackingBottle implements Packing {
@Override
public String pack() {
return "Bottle Pack";
}
}
| [
"mokter@gmail.com"
] | mokter@gmail.com |
d5cb4c155ec1c5cd85ddf964525e42817f6222b2 | 181e52bfb47be455b27553f670f57f3d9447d3b2 | /src/java/cd4017be/circuits/gui/GuiBlockSensor.java | fea3ad78f68fba342484975f591f6dbc0307b345 | [] | no_license | CD4017BE/AutomatedRedstone | 99b734832fac00f18ffc095abbb259aaeaf87a8d | f6889fa9dd33adc8627132400b74fd34caae25a1 | refs/heads/master-1.11.2 | 2021-01-17T07:08:57.584228 | 2018-03-25T16:31:20 | 2018-03-25T16:31:20 | 49,724,731 | 12 | 8 | null | 2017-10-02T18:47:08 | 2016-01-15T14:49:45 | Java | UTF-8 | Java | false | false | 2,188 | java | package cd4017be.circuits.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.ResourceLocation;
import cd4017be.circuits.tileEntity.BlockSensor;
import cd4017be.lib.BlockGuiHandler;
import cd4017be.lib.Gui.DataContainer.IGuiData;
import cd4017be.lib.Gui.AdvancedGui;
import cd4017be.lib.Gui.TileContainer;
public class GuiBlockSensor extends AdvancedGui {
private final BlockSensor tile;
public GuiBlockSensor(IGuiData tile, EntityPlayer player) {
super(new TileContainer(tile, player));
this.tile = (BlockSensor) tile;
this.MAIN_TEX = new ResourceLocation("circuits", "textures/gui/sensor.png");
}
@Override
public void initGui() {
this.xSize = 176;
this.ySize = 132;
this.tabsY = 15 - 63;
super.initGui();
guiComps.add(new TextField(0, 87, 16, 63, 8, 11).color(0xff40c0c0, 0xffff4040).setTooltip("sensor.mult"));
guiComps.add(new TextField(1, 87, 24, 63, 8, 11).color(0xff40c0c0, 0xffff4040).setTooltip("sensor.add"));
guiComps.add(new NumberSel(2, 7, 15, 36, 18, "", 1, 1200, 20).setup(8, 0xff404040, 2, true).around());
guiComps.add(new Text<Float>(3, 8, 20, 34, 8, "sensor.tick").center().setTooltip("sensor.timer"));
guiComps.add(new Tooltip<Integer>(4, 152, 16, 16, 16, "sensor.out"));
guiComps.add(new InfoTab(5, 7, 6, 7, 8, "sensor.info"));
}
@Override
protected Object getDisplVar(int id) {
switch(id) {
case 0: return Float.toString(tile.mult);
case 1: return Float.toString(tile.ofs);
case 2: return tile.tickInt;
case 3: return (float)tile.tickInt / 20F;
case 4: return tile.output;
default: return null;
}
}
@Override
protected void setDisplVar(int id, Object obj, boolean send) {
PacketBuffer dos = BlockGuiHandler.getPacketTargetData(tile.pos());
switch(id) {
case 0: case 1:
try {
dos.writeByte(id);
dos.writeFloat(Float.parseFloat((String)obj));
} catch(NumberFormatException e){return;}
break;
case 2: dos.writeByte(2).writeShort(tile.tickInt = (Integer)obj); break;
default: return;
}
if (send) BlockGuiHandler.sendPacketToServer(dos);
}
}
| [
"cd4017be@gmail.com"
] | cd4017be@gmail.com |
eec837d5699a95148e6f3519d42e63fe9f222a09 | bacd2beb8d5f9c3d19e6219d24c5d8dc73245d08 | /library/src/main/java/com/fanchen/chat/emoji/adapter/EmoticonsAdapter.java | e04eeab568713b691b20f5e7a167638adeab3018 | [] | no_license | nino9012/Imui | aa5a3d1037835dcb1d63b0d62cb9872ab32057a1 | 0750fa0f68fdb3ed637065c77ab40e70b015ca84 | refs/heads/master | 2022-12-06T00:11:24.866824 | 2020-08-25T01:59:11 | 2020-08-25T01:59:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,203 | java | package com.fanchen.chat.emoji.adapter;
import android.content.Context;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import java.util.ArrayList;
import com.fanchen.ui.R;
import com.fanchen.chat.emoji.data.EmoticonPageEntity;
import com.fanchen.chat.emoji.listener.EmoticonClickListener;
import com.fanchen.chat.emoji.listener.EmoticonDisplayListener;
public class EmoticonsAdapter<T> extends BaseAdapter {
protected final int DEF_HEIGHTMAXTATIO = 2;
protected final int mDefalutItemHeight;
protected Context mContext;
protected LayoutInflater mInflater;
protected ArrayList<T> mData = new ArrayList<>();
protected EmoticonPageEntity mEmoticonPageEntity;
protected double mItemHeightMaxRatio;
protected int mItemHeightMax;
protected int mItemHeightMin;
protected int mItemHeight;
protected int mDelbtnPosition;
protected EmoticonDisplayListener<T> mOnDisPlayListener;
protected EmoticonClickListener mOnEmoticonClickListener;
public EmoticonsAdapter(Context context, EmoticonPageEntity emoticonPageEntity, EmoticonClickListener onEmoticonClickListener) {
this.mContext = context;
this.mInflater = LayoutInflater.from(context);
this.mEmoticonPageEntity = emoticonPageEntity;
this.mOnEmoticonClickListener = onEmoticonClickListener;
this.mItemHeightMaxRatio = DEF_HEIGHTMAXTATIO;
this.mDelbtnPosition = -1;
this.mDefalutItemHeight = this.mItemHeight = (int) context.getResources().getDimension(R.dimen.item_emoticon_size_default);
this.mData.addAll(emoticonPageEntity.getEmoticonList());
checkDelBtn(emoticonPageEntity);
}
private void checkDelBtn(EmoticonPageEntity entity) {
EmoticonPageEntity.DelBtnStatus delBtnStatus = entity.getDelBtnStatus();
if (EmoticonPageEntity.DelBtnStatus.GONE.equals(delBtnStatus)) {
return;
}
if (EmoticonPageEntity.DelBtnStatus.FOLLOW.equals(delBtnStatus)) {
mDelbtnPosition = getCount();
mData.add(null);
} else if (EmoticonPageEntity.DelBtnStatus.LAST.equals(delBtnStatus)) {
int max = entity.getLine() * entity.getRow();
while (getCount() < max) {
mData.add(null);
}
mDelbtnPosition = getCount() - 1;
}
}
@Override
public int getCount() {
return mData == null ? 0 : mData.size();
}
@Override
public Object getItem(int position) {
return mData == null ? null : mData.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if (convertView == null) {
viewHolder = new ViewHolder();
LinearLayout linearLayout = new LinearLayout(parent.getContext());
linearLayout.setGravity(Gravity.CENTER);
ImageView imageView = new ImageView(parent.getContext());
int padding = dpToPx(parent.getContext(), 7);
imageView.setPadding(padding,0,padding,0);
linearLayout.addView(imageView);
convertView = linearLayout;
viewHolder.iv_emoticon = imageView;
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
bindView(position, parent, viewHolder);
updateUI(viewHolder, parent);
return convertView;
}
protected void bindView(int position, ViewGroup parent, ViewHolder viewHolder) {
if (mOnDisPlayListener != null) {
mOnDisPlayListener.onBindView(position, parent, viewHolder, mData.get(position), position == mDelbtnPosition);
}
}
protected boolean isDelBtn(int position) {
return position == mDelbtnPosition;
}
protected void updateUI(final ViewHolder viewHolder, final ViewGroup parent) {
final View newParent = (View) parent.getParent();
int measuredHeight = newParent.getMeasuredHeight();
if (mDefalutItemHeight != mItemHeight) {
viewHolder.iv_emoticon.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, mItemHeight));
}
mItemHeightMax = this.mItemHeightMax != 0 ? this.mItemHeightMax : (int) (mItemHeight * mItemHeightMaxRatio);
mItemHeightMin = this.mItemHeightMin != 0 ? this.mItemHeightMin : mItemHeight;
int realItemHeight = measuredHeight / mEmoticonPageEntity.getLine();
realItemHeight = Math.min(realItemHeight, mItemHeightMax);
realItemHeight = Math.max(realItemHeight, mItemHeightMin);
viewHolder.iv_emoticon.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, realItemHeight));
}
public void setOnDisPlayListener(EmoticonDisplayListener mOnDisPlayListener) {
this.mOnDisPlayListener = mOnDisPlayListener;
}
public void setItemHeightMaxRatio(double mItemHeightMaxRatio) {
this.mItemHeightMaxRatio = mItemHeightMaxRatio;
}
public void setItemHeightMax(int mItemHeightMax) {
this.mItemHeightMax = mItemHeightMax;
}
public void setItemHeightMin(int mItemHeightMin) {
this.mItemHeightMin = mItemHeightMin;
}
public void setItemHeight(int mItemHeight) {
this.mItemHeight = mItemHeight;
}
public void setDelbtnPosition(int mDelbtnPosition) {
this.mDelbtnPosition = mDelbtnPosition;
}
public static class ViewHolder {
public ImageView iv_emoticon;
}
/***
* DP 转 PX
* @param c
* @param dipValue
* @return
*/
public int dpToPx(Context c, float dipValue) {
DisplayMetrics metrics = c.getResources().getDisplayMetrics();
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dipValue, metrics);
}
} | [
"happy1993_chen@sina.cn"
] | happy1993_chen@sina.cn |
50bc164c48c78611f802417a365587976483003d | 2ebe6e87a7f96bbee2933103a4f43f46ea239996 | /samples/testsuite-xlt/src/action/modules/check_actions/double_uncheck.java | d9752be198c025529ddfd020954093fedad12573 | [
"Apache-2.0",
"LGPL-2.0-or-later",
"BSD-3-Clause",
"EPL-1.0",
"CDDL-1.1",
"EPL-2.0",
"MPL-2.0",
"MIT",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Xceptance/XLT | b4351c915d8c66d918b02a6c71393a151988be46 | c6609f0cd9315217727d44b3166f705acc4da0b4 | refs/heads/develop | 2023-08-18T18:20:56.557477 | 2023-08-08T16:04:16 | 2023-08-08T16:04:16 | 237,251,821 | 56 | 12 | Apache-2.0 | 2023-09-01T14:52:25 | 2020-01-30T16:13:24 | Java | UTF-8 | Java | false | false | 1,982 | java | /*
* Copyright (c) 2005-2023 Xceptance Software Technologies GmbH
*
* 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 action.modules.check_actions;
import org.junit.Assert;
import com.xceptance.xlt.api.actions.AbstractHtmlPageAction;
import com.xceptance.xlt.api.engine.scripting.AbstractHtmlUnitScriptAction;
import org.htmlunit.html.HtmlPage;
/**
* TODO: Add class description
*/
public class double_uncheck extends AbstractHtmlUnitScriptAction
{
/**
* Constructor.
* @param prevAction The previous action.
*/
public double_uncheck(final AbstractHtmlPageAction prevAction)
{
super(prevAction);
}
/**
* {@inheritDoc}
*/
@Override
public void preValidate() throws Exception
{
final HtmlPage page = getPreviousAction().getHtmlPage();
Assert.assertNotNull("Failed to get page from previous action", page);
}
/**
* {@inheritDoc}
*/
@Override
protected void execute() throws Exception
{
HtmlPage page = getPreviousAction().getHtmlPage();
page = uncheck("id=in_chk_6");
page = uncheck("id=in_chk_6");
setHtmlPage(page);
}
/**
* {@inheritDoc}
*/
@Override
protected void postValidate() throws Exception
{
final HtmlPage page = getHtmlPage();
Assert.assertNotNull("Failed to load page", page);
assertText("id=cc_change", "change (in_chk_6) false");
}
} | [
"4639399+jowerner@users.noreply.github.com"
] | 4639399+jowerner@users.noreply.github.com |
a6ccd38b7ae10953e2398048ad566761a522f06d | 592b0e0ad07e577e2510723519c0c603d3eb2808 | /src/main/java/com/jst/prodution/common/serviceBean/BankModel.java | a1bd4716427d822819d89290b6df431060fccf9d | [] | no_license | huangleisir/api-js180323 | 494d7a1d9b07385fc95e9927195e70727e626e53 | 7cc5d16e12cbe6c56b48831bab3736e8477d7360 | refs/heads/master | 2021-04-15T05:25:32.061201 | 2018-06-30T15:12:31 | 2018-06-30T15:12:31 | 126,464,555 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 722 | java | package com.jst.prodution.common.serviceBean;
import com.jst.prodution.base.bean.BaseBean;
/**
* 银行信息bean(公共元素)
* @author 彭则华
*
* */
public class BankModel implements java.io.Serializable{
private static final long serialVersionUID = 1L;
private String id;//序号
private String name;//银行名称
private String abbreviation;//简称
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAbbreviation() {
return abbreviation;
}
public void setAbbreviation(String abbreviation) {
this.abbreviation = abbreviation;
}
}
| [
"lei.huang@jieshunpay.cn"
] | lei.huang@jieshunpay.cn |
24f1d4087e1ef50a9b476c6367faf5c5ea2d18a6 | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes4.dex_source_from_JADX/com/facebook/abtest/qe/protocol/sync/user/SyncMultiQuickExperimentUserInfoResultHelper.java | a6ecc12f5ca8dce072f77be7aebf8dcd48fd7ddc | [] | 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 | 2,868 | java | package com.facebook.abtest.qe.protocol.sync.user;
import com.facebook.abtest.qe.protocol.sync.SyncMultiQuickExperimentParams;
import com.facebook.abtest.qe.protocol.sync.SyncQuickExperimentParams;
import com.facebook.abtest.qe.protocol.sync.user.SyncMultiQuickExperimentUserInfoResult.Builder;
import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.RegularImmutableBiMap;
import java.util.Iterator;
import java.util.Map.Entry;
import javax.annotation.Nullable;
/* compiled from: thumbnail_scale_factor */
public class SyncMultiQuickExperimentUserInfoResultHelper {
@Nullable
public final SyncMultiQuickExperimentUserInfoResult m1368a(JsonNode jsonNode, SyncMultiQuickExperimentParams syncMultiQuickExperimentParams) {
if (jsonNode == null) {
return null;
}
Builder builder = new Builder();
ImmutableList immutableList = syncMultiQuickExperimentParams.f1110a;
for (int i = 0; i < jsonNode.e(); i++) {
builder.f1115a.add(m1366a(jsonNode.a(i), (SyncQuickExperimentParams) immutableList.get(i)));
}
return new SyncMultiQuickExperimentUserInfoResult(builder);
}
@Nullable
private static SyncQuickExperimentUserInfoResult m1366a(JsonNode jsonNode, SyncQuickExperimentParams syncQuickExperimentParams) {
if (jsonNode == null || syncQuickExperimentParams == null) {
return null;
}
JsonNode b = jsonNode.b("data");
if (b == null) {
return null;
}
if (b.n()) {
if (b.C() != 0) {
return null;
}
return new SyncQuickExperimentUserInfoResult(syncQuickExperimentParams.f1108a, "local_default_group", false, false, "", RegularImmutableBiMap.a);
} else if (b.e() == 0) {
return null;
} else {
String s = b.a(0).b("group").s();
if (s == null) {
s = "local_default_group";
}
JsonNode b2 = b.a(0).b("params");
return new SyncQuickExperimentUserInfoResult(syncQuickExperimentParams.f1108a, s, b.a(0).b("in_experiment").u(), b.a(0).b("in_deploy_group").u(), b.a(0).b("hash").s(), m1367a(b2));
}
}
private static ImmutableMap<String, String> m1367a(JsonNode jsonNode) {
ImmutableMap.Builder builder = new ImmutableMap.Builder();
Iterator H = jsonNode.H();
while (H.hasNext()) {
Entry entry = (Entry) H.next();
JsonNode b = ((JsonNode) entry.getValue()).b("type");
if (b != null && (b.C() == 1 || b.C() == 2)) {
builder.b(entry.getKey(), ((JsonNode) entry.getValue()).b("value").B());
}
}
return builder.b();
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
39284f8ec043368dafb139b1dd950ad7caa28070 | 3becd05372c5681346dbb3d6230cd2ff17bb8577 | /temp/src/minecraft/net/minecraft/client/renderer/entity/RenderWolf.java | c95c888cc79b8113ef69192ce78ed0bbffb1ab9b | [] | no_license | payton/learn-to-save | 0e5a2cc4b56148a1b1ed9a0999eae94bb3abd97a | b308bce374ea66925d0e60af2df1ea73e7b44440 | refs/heads/master | 2022-01-29T14:38:44.649052 | 2017-04-16T15:15:19 | 2017-04-16T15:15:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,744 | java | package net.minecraft.client.renderer.entity;
import net.minecraft.client.model.ModelWolf;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.layers.LayerWolfCollar;
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.util.ResourceLocation;
public class RenderWolf extends RenderLiving<EntityWolf> {
private static final ResourceLocation field_110917_a = new ResourceLocation("textures/entity/wolf/wolf.png");
private static final ResourceLocation field_110915_f = new ResourceLocation("textures/entity/wolf/wolf_tame.png");
private static final ResourceLocation field_110916_g = new ResourceLocation("textures/entity/wolf/wolf_angry.png");
public RenderWolf(RenderManager p_i47187_1_) {
super(p_i47187_1_, new ModelWolf(), 0.5F);
this.func_177094_a(new LayerWolfCollar(this));
}
protected float func_77044_a(EntityWolf p_77044_1_, float p_77044_2_) {
return p_77044_1_.func_70920_v();
}
public void func_76986_a(EntityWolf p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
if(p_76986_1_.func_70921_u()) {
float f = p_76986_1_.func_70013_c(p_76986_9_) * p_76986_1_.func_70915_j(p_76986_9_);
GlStateManager.func_179124_c(f, f, f);
}
super.func_76986_a(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
protected ResourceLocation func_110775_a(EntityWolf p_110775_1_) {
return p_110775_1_.func_70909_n()?field_110915_f:(p_110775_1_.func_70919_bu()?field_110916_g:field_110917_a);
}
}
| [
"pgarland2@wisc.edu"
] | pgarland2@wisc.edu |
b2c5d889999067627d4b3cea53d77d286965719c | 0aec358a788904671c46b82ef2a4e95b283dcd18 | /src/main/java/br/edu/infnet/bootaluno/controller/TurmaController.java | b205a829cd40b3bd7a6a262239e5bda4d77a9122 | [] | no_license | edveloso/bootaluno | 170a8191660b2762826e5a29ac1caf4d490c2912 | 9b4ed1ea91c61b2dc633c2c3616d3ba6a711a2ae | refs/heads/master | 2023-08-10T10:38:00.955711 | 2021-08-31T21:10:03 | 2021-08-31T21:10:03 | 397,435,741 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,727 | java | package br.edu.infnet.bootaluno.controller;
import java.util.List;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import br.edu.infnet.bootaluno.modelo.Turma;
import br.edu.infnet.bootaluno.service.TurmaService;
@Controller
@RequestMapping(value = "/turma")
public class TurmaController {
@Autowired
private TurmaService turmaService;
@RequestMapping(value = "/cadastro", method = RequestMethod.GET)
public String cadastro() {
return "turma/form";
}
@RequestMapping(value = "/salvar", method = RequestMethod.POST)
public String salvar(Turma turma) {
//executar a ação de salvar
turmaService.salvar(turma);
return "redirect:/turma/";
}
@RequestMapping(value = "/", method = RequestMethod.GET)
public String listaTurmas(Model model) {
List<Turma> turmas = turmaService.listAll();
model.addAttribute("turmas", turmas);
return "turma/index";
}
@RequestMapping(value = "/formedit/{codigo}", method = RequestMethod.GET)
public String formEdit(@PathVariable("codigo") Integer codigo, Model model) {
Optional<Turma> byId = turmaService.getById(codigo);
if(byId.isPresent()) {
model.addAttribute("turma", byId.get());
}
return "turma/edit";
}
@RequestMapping(value = "/delete/{codigo}", method = RequestMethod.GET)
public String delete(@PathVariable("codigo") Integer codigo) {
turmaService.delete(codigo);
return "redirect:/turma/";
}
}
| [
"gogs@fake.local"
] | gogs@fake.local |
58cbd3f42906fcebf16d8a24ba345a8db63d2c12 | 473b76b1043df2f09214f8c335d4359d3a8151e0 | /benchmark/bigclonebenchdata_completed/16475859.java | 32521308c6e763f1de8e9bcb9086b7509c61c59c | [] | no_license | whatafree/JCoffee | 08dc47f79f8369af32e755de01c52d9a8479d44c | fa7194635a5bd48259d325e5b0a190780a53c55f | refs/heads/master | 2022-11-16T01:58:04.254688 | 2020-07-13T20:11:17 | 2020-07-13T20:11:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,189 | java | import java.io.*;
import java.lang.*;
import java.util.*;
class c16475859 {
public MyHelperClass password;
public MyHelperClass filename;
public MyHelperClass port;
public void ftpUpload() {
FTPClient ftpclient = null;
InputStream is = null;
try {
ftpclient = new FTPClient();
MyHelperClass host = new MyHelperClass();
ftpclient.connect(host, port);
MyHelperClass logger = new MyHelperClass();
if ((boolean)(Object)logger.isDebugEnabled()) {
// MyHelperClass host = new MyHelperClass();
logger.debug("FTP连接远程服务器:" + host);
}
MyHelperClass user = new MyHelperClass();
ftpclient.login(user, password);
// MyHelperClass logger = new MyHelperClass();
if ((boolean)(Object)logger.isDebugEnabled()) {
// MyHelperClass user = new MyHelperClass();
logger.debug("登陆用户:" + user);
}
MyHelperClass FTP = new MyHelperClass();
ftpclient.setFileType(FTP.BINARY_FILE_TYPE);
MyHelperClass remotePath = new MyHelperClass();
ftpclient.changeWorkingDirectory(remotePath);
MyHelperClass localPath = new MyHelperClass();
is = new FileInputStream(localPath + File.separator + filename);
MyHelperClass filename = new MyHelperClass();
ftpclient.storeFile(filename, is);
// MyHelperClass remotePath = new MyHelperClass();
logger.info("上传文件结束...路径:" + remotePath + ",文件名:" + filename);
is.close();
ftpclient.logout();
} catch (IOException e) {
MyHelperClass logger = new MyHelperClass();
logger.error("上传文件失败", e);
} finally {
if ((boolean)(Object)ftpclient.isConnected()) {
try {
ftpclient.disconnect();
} catch (UncheckedIOException e) {
MyHelperClass logger = new MyHelperClass();
logger.error("断开FTP出错",(IOException)(Object) e);
}
}
ftpclient = null;
}
}
}
// Code below this line has been added to remove errors
class MyHelperClass {
public MyHelperClass BINARY_FILE_TYPE;
public MyHelperClass info(String o0){ return null; }
public MyHelperClass error(String o0, IOException o1){ return null; }
public MyHelperClass isDebugEnabled(){ return null; }
public MyHelperClass debug(String o0){ return null; }}
class FTPClient {
public MyHelperClass changeWorkingDirectory(MyHelperClass o0){ return null; }
public MyHelperClass logout(){ return null; }
public MyHelperClass setFileType(MyHelperClass o0){ return null; }
public MyHelperClass isConnected(){ return null; }
public MyHelperClass login(MyHelperClass o0, MyHelperClass o1){ return null; }
public MyHelperClass disconnect(){ return null; }
public MyHelperClass connect(MyHelperClass o0, MyHelperClass o1){ return null; }
public MyHelperClass storeFile(MyHelperClass o0, InputStream o1){ return null; }}
| [
"piyush16066@iiitd.ac.in"
] | piyush16066@iiitd.ac.in |
1ecd295646a79b85130dc909d6fa24a0ed786333 | 1ecbfb90b48d57e0d82becb7feb897af4588bb94 | /sweagle-api/src/main/java/com/syntax/sweagleapi/db/performance_schema/enums/EventsTransactionsHistoryLongNestingEventType.java | 0e512357137465dbce9e0edd76965bd5611edd8e | [] | no_license | stavpap/sweagle | 85b7c24358e3e98d630811143e7c559d0066c782 | 29225d69d4574423e2cd7790afd50c764d3e0144 | refs/heads/master | 2023-01-27T10:57:52.284480 | 2019-10-21T11:09:29 | 2019-10-21T11:09:29 | 216,532,301 | 0 | 0 | null | 2023-01-07T10:54:50 | 2019-10-21T09:42:46 | Java | UTF-8 | Java | false | true | 1,290 | java | /*
* This file is generated by jOOQ.
*/
package com.syntax.sweagleapi.db.performance_schema.enums;
import javax.annotation.Generated;
import org.jooq.Catalog;
import org.jooq.EnumType;
import org.jooq.Schema;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.11.7"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public enum EventsTransactionsHistoryLongNestingEventType implements EnumType {
TRANSACTION("TRANSACTION"),
STATEMENT("STATEMENT"),
STAGE("STAGE"),
WAIT("WAIT");
private final String literal;
private EventsTransactionsHistoryLongNestingEventType(String literal) {
this.literal = literal;
}
/**
* {@inheritDoc}
*/
@Override
public Catalog getCatalog() {
return null;
}
/**
* {@inheritDoc}
*/
@Override
public Schema getSchema() {
return null;
}
/**
* {@inheritDoc}
*/
@Override
public String getName() {
return "events_transactions_history_long_NESTING_EVENT_TYPE";
}
/**
* {@inheritDoc}
*/
@Override
public String getLiteral() {
return literal;
}
}
| [
"stavroula.papalouka@gmail.com"
] | stavroula.papalouka@gmail.com |
f280ae1aff588c686eda98ad841679ff5c59deb4 | 0d4edfbd462ed72da9d1e2ac4bfef63d40db2990 | /app/src/main/java/com/dvc/mybilibili/mvp/model/api/service/bangumi/entity/BangumiHome.java | 342e9162723a48a61c6073a1b82b4b563153b9b9 | [] | no_license | dvc890/MyBilibili | 1fc7e0a0d5917fb12a7efed8aebfd9030db7ff9f | 0483e90e6fbf42905b8aff4cbccbaeb95c733712 | refs/heads/master | 2020-05-24T22:49:02.383357 | 2019-11-23T01:14:14 | 2019-11-23T01:14:14 | 187,502,297 | 31 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,351 | java | package com.dvc.mybilibili.mvp.model.api.service.bangumi.entity;
import android.support.annotation.Keep;
import com.alibaba.fastjson.annotation.JSONField;
import java.util.List;
@Keep
/* compiled from: BL */
public class BangumiHome {
@JSONField(name = "ad")
/* renamed from: ad */
public C1823Ad f5639ad;
@JSONField(name = "editor_recommend")
public List<BangumiRecommend> editorRecommendList;
@JSONField(name = "end_recommend")
public List<BangumiBrief> finishedBangumis;
@JSONField(name = "serializing")
public List<BangumiBrief> latestBangumis;
@JSONField(name = "sections")
public List<HomeSection> mSections;
public BangumiPrevious previous;
@Keep
/* compiled from: BL */
/* renamed from: com.bilibili.bangumi.api.BangumiHome$Ad */
public static class C1823Ad {
@JSONField(name = "body")
public List<BangumiBanner> body;
@JSONField(name = "head")
public List<BangumiBanner> head;
}
@Keep
/* compiled from: BL */
public static class HomeSection {
@JSONField(name = "falls")
public List<BangumiRecommend> mFalls;
@JSONField(name = "icon")
public String mIconUrl;
@JSONField(name = "title")
public String mTitle;
@JSONField(name = "wid")
public String mWid;
}
}
| [
"dvc890@139.com"
] | dvc890@139.com |
bba2b76613967b810ef0a54759b881ae838f17e3 | 7226792532a3d3913278999697a767cdfc30eba5 | /7.2.0-alpha01/com.android.tools.analytics-library/protos/com/google/wireless/android/sdk/stats/BuildAttributionPluginIdentifierOrBuilder.java | 6911361f5cbe49b4e5cbed810bb340287dcda52f | [
"Apache-2.0"
] | permissive | 670832188/agp-sources-1 | 09c6c9e4eae3986cf01347e1122b04a4b9ead5ee | e77c2edb0110fee3943cefb21ee5c29570645c0c | refs/heads/master | 2023-08-27T18:50:23.757070 | 2021-11-10T07:55:09 | 2021-11-10T07:55:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | true | 3,008 | java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: studio_stats.proto
package com.google.wireless.android.sdk.stats;
public interface BuildAttributionPluginIdentifierOrBuilder extends
// @@protoc_insertion_point(interface_extends:android_studio.BuildAttributionPluginIdentifier)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Either a binary plugin or a build script plugin
* </pre>
*
* <code>optional .android_studio.BuildAttributionPluginIdentifier.PluginType type = 1;</code>
* @return Whether the type field is set.
*/
boolean hasType();
/**
* <pre>
* Either a binary plugin or a build script plugin
* </pre>
*
* <code>optional .android_studio.BuildAttributionPluginIdentifier.PluginType type = 1;</code>
* @return The type.
*/
com.google.wireless.android.sdk.stats.BuildAttributionPluginIdentifier.PluginType getType();
/**
* <pre>
* The display name of the plugin, that is the string used in the build script
* when calling apply. ex: com.android.application, kotlin-android
* Should not be set in the case of a build script
* </pre>
*
* <code>optional string plugin_display_name = 2;</code>
* @return Whether the pluginDisplayName field is set.
*/
boolean hasPluginDisplayName();
/**
* <pre>
* The display name of the plugin, that is the string used in the build script
* when calling apply. ex: com.android.application, kotlin-android
* Should not be set in the case of a build script
* </pre>
*
* <code>optional string plugin_display_name = 2;</code>
* @return The pluginDisplayName.
*/
java.lang.String getPluginDisplayName();
/**
* <pre>
* The display name of the plugin, that is the string used in the build script
* when calling apply. ex: com.android.application, kotlin-android
* Should not be set in the case of a build script
* </pre>
*
* <code>optional string plugin_display_name = 2;</code>
* @return The bytes for pluginDisplayName.
*/
com.google.protobuf.ByteString
getPluginDisplayNameBytes();
/**
* <pre>
* The class name of the gradle plugin.
* ex: org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPluginWrapper
* </pre>
*
* <code>optional string plugin_class_name = 3;</code>
* @return Whether the pluginClassName field is set.
*/
boolean hasPluginClassName();
/**
* <pre>
* The class name of the gradle plugin.
* ex: org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPluginWrapper
* </pre>
*
* <code>optional string plugin_class_name = 3;</code>
* @return The pluginClassName.
*/
java.lang.String getPluginClassName();
/**
* <pre>
* The class name of the gradle plugin.
* ex: org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPluginWrapper
* </pre>
*
* <code>optional string plugin_class_name = 3;</code>
* @return The bytes for pluginClassName.
*/
com.google.protobuf.ByteString
getPluginClassNameBytes();
}
| [
"john.rodriguez@gmail.com"
] | john.rodriguez@gmail.com |
6062766fc1c9935765544f3a69c8d389253ce4b8 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/25/25_48b33eff0cae8e74b21c530b19517ba0f72ba2f0/MethodBindingTest/25_48b33eff0cae8e74b21c530b19517ba0f72ba2f0_MethodBindingTest_t.java | d22cfb92d15ae0be9bf423def99da5bb3afcd9fa | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 2,226 | java | package org.seasar.struts.pojo;
import org.apache.struts.action.ActionMapping;
import org.seasar.extension.unit.S2TestCase;
import org.seasar.framework.container.ComponentNotFoundRuntimeException;
import org.seasar.struts.mock.MockActionMapping;
/**
*
* @author Katsuhiko Nagashima
*
*/
public class MethodBindingTest extends S2TestCase {
private ActionMapping mapping = new MockActionMapping();
protected void setUp() throws Exception {
super.setUp();
include("MethodBindingTest.dicon");
}
public void testExecute() {
MethodBinding methodBinding = new MethodBinding("#{bindingAction.exe}");
String forward = (String) methodBinding.invoke(this.mapping);
assertEquals("success", forward);
}
public void testMethodBindingDownload() {
MethodBinding methodBinding = new MethodBinding("#{bindingAction.download}");
String forward = (String) methodBinding.invoke(this.mapping);
assertNull(forward);
}
public void testNoRegisteredComponent() {
MethodBinding methodBinding = new MethodBinding("#{noregisteredAction.download}");
try {
methodBinding.invoke(this.mapping);
fail();
} catch (ComponentNotFoundRuntimeException e) {
// success
}
}
public void testIndexedExecute() {
MethodBinding methodBinding = new MethodBinding("#{bindingAction.exe}", 10);
String forward = (String) methodBinding.invoke(this.mapping);
assertEquals("success10", forward);
}
public void testGetComponent() {
MethodBinding methodBinding = new MethodBinding("#{bindingAction.exe}");
assertNotNull(methodBinding.getComponentClass());
}
public void testGetMethod() {
MethodBinding methodBinding = new MethodBinding("#{bindingAction.exe}");
assertNotNull(methodBinding.getMethod());
}
public void testGetIndexedMethod() {
MethodBinding methodBinding = new MethodBinding("#{bindingAction.exe}", 10);
assertNotNull(methodBinding.getMethod());
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
0265dc3de087762c91eafd266c846d3de53e8bbc | cba543b732a9a5ad73ddb2e9b20125159f0e1b2e | /sikuli/IDE/src/main/java/org/jdesktop/swingx/Mnemonicable.java | 11d0b81db4cc1815779afce7fc891824fbe9d761 | [] | no_license | wsh231314/IntelligentOperation | e6266e1ae79fe93f132d8900ee484a4db0da3b24 | a12aca5c5c67e6a2dddcd2d8420ca8a64af476f2 | refs/heads/master | 2020-04-05T13:31:55.376669 | 2017-07-28T05:59:05 | 2017-07-28T05:59:05 | 94,863,918 | 1 | 2 | null | 2017-07-27T02:44:17 | 2017-06-20T07:45:10 | Java | UTF-8 | Java | false | false | 3,167 | java | package org.jdesktop.swingx;
/**
* An interface that describes an object that is capable of being accessed/used via a mnemonic
* keystroke.
*
* @author Karl George Schaefer
*/
// TODO this describes the mnemonic feature but not what is used,
// ie. what String returning method is called
interface Mnemonicable {
/**
* Returns the keyboard mnemonic for this component.
*
* @return the keyboard mnemonic
*/
int getMnemonic();
/**
* Sets the keyboard mnemonic on this component. The mnemonic is the key
* which when combined with the look and feel's mouseless modifier (usually
* Alt) will activate this component.
* <p>
* A mnemonic must correspond to a single key on the keyboard and should be
* specified using one of the <code>VK_XXX</code> keycodes defined in
* <code>java.awt.event.KeyEvent</code>. Mnemonics are case-insensitive,
* therefore a key event with the corresponding keycode would cause the
* button to be activated whether or not the Shift modifier was pressed.
*
* @param mnemonic
* the key code which represents the mnemonic
* @see java.awt.event.KeyEvent
* @see #setDisplayedMnemonicIndex
*
* @beaninfo bound: true attribute: visualUpdate true description: the
* keyboard character mnemonic
*/
void setMnemonic(int mnemonic);
/**
* Returns the character, as an index, that the look and feel should
* provide decoration for as representing the mnemonic character.
*
* @since 1.4
* @return index representing mnemonic character
* @see #setDisplayedMnemonicIndex
*/
int getDisplayedMnemonicIndex();
/**
* Provides a hint to the look and feel as to which character in the
* text should be decorated to represent the mnemonic. Not all look and
* feels may support this. A value of -1 indicates either there is no
* mnemonic, the mnemonic character is not contained in the string, or
* the developer does not wish the mnemonic to be displayed.
* <p>
* The value of this is updated as the properties relating to the
* mnemonic change (such as the mnemonic itself, the text...).
* You should only ever have to call this if
* you do not wish the default character to be underlined. For example, if
* the text was 'Save As', with a mnemonic of 'a', and you wanted the 'A'
* to be decorated, as 'Save <u>A</u>s', you would have to invoke
* <code>setDisplayedMnemonicIndex(5)</code> after invoking
* <code>setMnemonic(KeyEvent.VK_A)</code>.
*
* @since 1.4
* @param index Index into the String to underline
* @exception IllegalArgumentException will be thrown if <code>index</code>
* is >= length of the text, or < -1
* @see #getDisplayedMnemonicIndex
*
* @beaninfo
* bound: true
* attribute: visualUpdate true
* description: the index into the String to draw the keyboard character
* mnemonic at
*/
void setDisplayedMnemonicIndex(int index) throws IllegalArgumentException;
}
| [
"hjpq0@163.com"
] | hjpq0@163.com |
e31416ba8db6349ad9045f313ca1a7ff5945e8a9 | f164b56ed542b35b257c947b59ff79c708c72009 | /JavaIO/src/shihab/example8/Simplify8.java | ad6e457d9064ccb38aa3cd29b15115216bc5ba0a | [] | no_license | MAYURIGAURAV/CoreJavaNew | f1593b27cb8800e1bd8833aec8ba495d53e21f90 | e1cd5825acde15c797c6ce9c777758a5db01bcfa | refs/heads/master | 2020-03-24T04:59:17.180787 | 2017-10-30T12:26:30 | 2017-10-30T12:26:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 589 | java | package shihab.example8;
import java.io.*;
public class Simplify8 {
public static void main(String[] args) {
File file = new File("D:/shamim/");
FileFilter filter = new FileFilter(){
@Override
public boolean accept(File pathname) {
if(pathname.getName().endsWith(".html")){
return true;
}else{
return false;
}
}
};
for(File f : file.listFiles(filter)){
System.out.println(f.getPath());
}
}
}
| [
"shamimsjava@gmail.com"
] | shamimsjava@gmail.com |
efb5858be523801d7d772a4fd5cc7073af374980 | 765c8ae871b65da04396d4a3f8b856a11eedeb11 | /Testing/src/main/java/org/lobobrowser/lobo_testing/LoboTestFrame.java | 6d8143d66b57e50678d4afe31515aa64d01c5df9 | [] | no_license | sridhar-newsdistill/Loboevolution | 5ef7d36aae95707e1ab76d7bf1ce872ddd6f6355 | a93de9bea470e3996a4afb2f73d9be77037644b6 | refs/heads/master | 2020-06-13T12:26:03.979017 | 2016-11-26T16:58:29 | 2016-11-26T16:58:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,845 | java | /*
GNU GENERAL LICENSE
Copyright (C) 2006 The Lobo Project. Copyright (C) 2014 - 2016 Lobo Evolution
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
verion 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General License for more details.
You should have received a copy of the GNU General Public
along with this program. If not, see <http://www.gnu.org/licenses/>.
Contact info: lobochief@users.sourceforge.net; ivan.difrancesco@yahoo.it
*/
package org.lobobrowser.lobo_testing;
import javax.swing.JFrame;
import javax.swing.WindowConstants;
import org.lobobrowser.gui.FramePanel;
import org.lobobrowser.main.PlatformInit;
/**
* The Class LoboTestFrame.
*/
public class LoboTestFrame extends JFrame {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 1L;
public static void main(String[] args) throws Exception {
// This optional step initializes logging so only.warns
// are printed out.
PlatformInit.getInstance().initLogging();
// This step is necessary for extensions to work:
PlatformInit.getInstance().init(false);
// Create frame with a specific size.
JFrame frame = new LoboTestFrame();
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
frame.setSize(600, 400);
frame.setVisible(true);
}
public LoboTestFrame() throws Exception {
FramePanel framePanel = new FramePanel();
this.getContentPane().add(framePanel);
framePanel.navigate("www.google.com");
}
}
| [
"ivan.difrancesco@yahoo.it"
] | ivan.difrancesco@yahoo.it |
6fbadc3031f0ee2eb6b2e54abb0300a98da46456 | d9477e8e6e0d823cf2dec9823d7424732a7563c4 | /plugins/SVNPlugin/tags/1.5.0/src/ise/plugin/svn/command/Cleanup.java | ffd00126a9720029f9b0e81abf1d433442259ef7 | [] | no_license | RobertHSchmidt/jedit | 48fd8e1e9527e6f680de334d1903a0113f9e8380 | 2fbb392d6b569aefead29975b9be12e257fbe4eb | refs/heads/master | 2023-08-30T02:52:55.676638 | 2018-07-11T13:28:01 | 2018-07-11T13:28:01 | 140,587,948 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,721 | java | /*
Copyright (c) 2007, Dale Anson
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 author 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 ise.plugin.svn.command;
import java.io.*;
import java.util.*;
import org.tmatesoft.svn.core.wc.SVNWCClient;
import org.tmatesoft.svn.core.wc.ISVNOptions;
import org.tmatesoft.svn.core.wc.SVNClientManager;
import org.tmatesoft.svn.core.wc.SVNWCUtil;
import org.tmatesoft.svn.core.SVNException;
import ise.plugin.svn.data.SVNData;
import ise.plugin.svn.io.ConsolePrintStream;
public class Cleanup {
/**
* @return a list of paths that were scheduled to be added.
*/
public String cleanup( SVNData cd ) throws CommandInitializationException, SVNException {
SVNKit.setupLibrary();
// validate data values
if ( cd.getPaths() == null ) {
return ""; // nothing to do
}
if ( cd.getOut() == null ) {
throw new CommandInitializationException( "Invalid output stream." );
}
if ( cd.getErr() == null ) {
cd.setErr( cd.getOut() );
}
// convert paths to Files
List<String> paths = cd.getPaths();
File[] localPaths = new File[ paths.size() ];
for ( int i = 0; i < paths.size(); i++ ) {
localPaths[ i ] = new File( paths.get( i ) );
// check for file existence?
}
// use default svn config options
ISVNOptions options = SVNWCUtil.createDefaultOptions( true );
// use the svnkit client manager
SVNClientManager clientManager = SVNClientManager.newInstance( options, SVNWCUtil.createDefaultAuthenticationManager(cd.getUsername(), cd.getDecryptedPassword()) );
// get a client
SVNWCClient client = clientManager.getWCClient();
// set an event handler so that messages go to the commit data streams for display
client.setEventHandler( new SVNCommandEventProcessor( cd.getOut(), cd.getErr(), false ) );
ConsolePrintStream out = cd.getOut();
// do the cleanup
for ( File file : localPaths ) {
try {
client.doCleanup(file);
}
catch(Exception e) {
out.printError(e.getMessage());
}
}
out.println("Done.");
out.flush();
out.close();
return "Done.";
}
}
| [
"daleanson@6b1eeb88-9816-0410-afa2-b43733a0f04e"
] | daleanson@6b1eeb88-9816-0410-afa2-b43733a0f04e |
dc733c08a483fd220c509d8e568fdcc1ad0048ac | 9254e7279570ac8ef687c416a79bb472146e9b35 | /r-kvstore-20150101/src/main/java/com/aliyun/r_kvstore20150101/models/DescribeDBInstanceNetInfoRequest.java | de1af95e65e910b1d7fb0c914c672e5886d39729 | [
"Apache-2.0"
] | permissive | lquterqtd/alibabacloud-java-sdk | 3eaa17276dd28004dae6f87e763e13eb90c30032 | 3e5dca8c36398469e10cdaaa34c314ae0bb640b4 | refs/heads/master | 2023-08-12T13:56:26.379027 | 2021-10-19T07:22:15 | 2021-10-19T07:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,235 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.r_kvstore20150101.models;
import com.aliyun.tea.*;
public class DescribeDBInstanceNetInfoRequest extends TeaModel {
@NameInMap("SecurityToken")
public String securityToken;
@NameInMap("OwnerId")
public Long ownerId;
@NameInMap("ResourceOwnerAccount")
public String resourceOwnerAccount;
@NameInMap("ResourceOwnerId")
public Long resourceOwnerId;
@NameInMap("OwnerAccount")
public String ownerAccount;
@NameInMap("InstanceId")
public String instanceId;
public static DescribeDBInstanceNetInfoRequest build(java.util.Map<String, ?> map) throws Exception {
DescribeDBInstanceNetInfoRequest self = new DescribeDBInstanceNetInfoRequest();
return TeaModel.build(map, self);
}
public DescribeDBInstanceNetInfoRequest setSecurityToken(String securityToken) {
this.securityToken = securityToken;
return this;
}
public String getSecurityToken() {
return this.securityToken;
}
public DescribeDBInstanceNetInfoRequest setOwnerId(Long ownerId) {
this.ownerId = ownerId;
return this;
}
public Long getOwnerId() {
return this.ownerId;
}
public DescribeDBInstanceNetInfoRequest setResourceOwnerAccount(String resourceOwnerAccount) {
this.resourceOwnerAccount = resourceOwnerAccount;
return this;
}
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
public DescribeDBInstanceNetInfoRequest setResourceOwnerId(Long resourceOwnerId) {
this.resourceOwnerId = resourceOwnerId;
return this;
}
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
public DescribeDBInstanceNetInfoRequest setOwnerAccount(String ownerAccount) {
this.ownerAccount = ownerAccount;
return this;
}
public String getOwnerAccount() {
return this.ownerAccount;
}
public DescribeDBInstanceNetInfoRequest setInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
public String getInstanceId() {
return this.instanceId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
2dbdc677e7e3c6ed647914f3c1864ebedb8a38a0 | fbcf2fc4163d583b3c74b85d1477b06abc02302b | /kira-common/src/main/java/com/yihaodian/architecture/zkclient/ZkConnection.java | 9c97340722d34b305f8a3825edc6b1d14feee53f | [
"Apache-2.0"
] | permissive | sbxiaobao/Kira | 02837d5a362b89fb28533b2983222aa59799916c | a44c8a1f90971b4e267bfe4e029da8a52bafda4f | refs/heads/master | 2020-04-06T12:52:27.644740 | 2018-07-12T05:55:38 | 2018-07-12T05:55:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,346 | java | /**
* Copyright 2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* 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.yihaodian.architecture.zkclient;
import com.yihaodian.architecture.zkclient.exception.ZkException;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.log4j.Logger;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooDefs.Ids;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.ZooKeeper.States;
import org.apache.zookeeper.data.Stat;
public class ZkConnection implements IZkConnection {
private static final Logger LOG = Logger.getLogger(ZkConnection.class);
/**
* It is recommended to use quite large sessions timeouts for ZooKeeper.
*/
private static final int DEFAULT_SESSION_TIMEOUT = 30000;
private final String _servers;
private final int _sessionTimeOut;
private ZooKeeper _zk = null;
private Lock _zookeeperLock = new ReentrantLock();
public ZkConnection(String zkServers) {
this(zkServers, DEFAULT_SESSION_TIMEOUT);
}
public ZkConnection(String zkServers, int sessionTimeOut) {
_servers = zkServers;
_sessionTimeOut = sessionTimeOut;
}
@Override
public void connect(Watcher watcher) {
_zookeeperLock.lock();
try {
if (_zk != null) {
throw new IllegalStateException("zk client has already been started");
}
try {
LOG.debug("Creating new ZookKeeper instance to connect to " + _servers + ".");
_zk = new ZooKeeper(_servers, _sessionTimeOut, watcher);
} catch (IOException e) {
throw new ZkException("Unable to connect to " + _servers, e);
}
} finally {
_zookeeperLock.unlock();
}
}
public void close() throws InterruptedException {
_zookeeperLock.lock();
try {
if (_zk != null) {
LOG.debug("Closing ZooKeeper connected to " + _servers);
_zk.close();
_zk = null;
}
} finally {
_zookeeperLock.unlock();
}
}
public String create(String path, byte[] data, CreateMode mode)
throws KeeperException, InterruptedException {
return _zk.create(path, data, Ids.OPEN_ACL_UNSAFE, mode);
}
public void delete(String path) throws InterruptedException, KeeperException {
_zk.delete(path, -1);
}
public boolean exists(String path, boolean watch) throws KeeperException, InterruptedException {
return _zk.exists(path, watch) != null;
}
@Override
public Stat existsWithStat(String path, boolean watch)
throws KeeperException, InterruptedException {
return _zk.exists(path, watch);
}
public List<String> getChildren(final String path, final boolean watch)
throws KeeperException, InterruptedException {
return _zk.getChildren(path, watch);
}
public byte[] readData(String path, Stat stat, boolean watch)
throws KeeperException, InterruptedException {
return _zk.getData(path, watch, stat);
}
public Stat writeData(String path, byte[] data) throws KeeperException, InterruptedException {
return writeData(path, data, -1);
}
public Stat writeData(String path, byte[] data, int version)
throws KeeperException, InterruptedException {
return _zk.setData(path, data, version);
}
public States getZookeeperState() {
return _zk != null ? _zk.getState() : null;
}
public ZooKeeper getZookeeper() {
return _zk;
}
@Override
public long getCreateTime(String path) throws KeeperException, InterruptedException {
Stat stat = _zk.exists(path, false);
if (stat != null) {
return stat.getCtime();
}
return -1;
}
@Override
public String getServers() {
return _servers;
}
}
| [
"zhoufeiqiang1@yhd.com"
] | zhoufeiqiang1@yhd.com |
cb1db59658d369c1ae10843365d32041bce3266e | 98f443875c16b7306f874a5cb58dd50b5149b6b7 | /src/com/almasb/chat/Server.java | 44eb8e535d6e284a00ff04e2c01768de64ec517d | [
"MIT"
] | permissive | mirstein/FXTutorials | abb086b2a891597f18cfca2073a7973fe596ef09 | 0652fd694adbf91b56a65f5cece914f560cb7b7f | refs/heads/master | 2020-09-13T20:06:55.247951 | 2019-11-29T07:31:56 | 2019-11-29T07:31:56 | 222,890,519 | 0 | 0 | MIT | 2019-11-20T08:41:57 | 2019-11-20T08:41:56 | null | UTF-8 | Java | false | false | 526 | java | package com.almasb.chat;
import java.io.Serializable;
import java.util.function.Consumer;
public class Server extends NetworkConnection {
private int port;
public Server(int port, Consumer<Serializable> onReceiveCallback) {
super(onReceiveCallback);
this.port = port;
}
@Override
protected boolean isServer() {
return true;
}
@Override
protected String getIP() {
return null;
}
@Override
protected int getPort() {
return port;
}
}
| [
"almaslvl@gmail.com"
] | almaslvl@gmail.com |
ff4252f2aa386523c6c32ad055e80a0a81b975f8 | 60c7e9a630268931c57bf6d4eb2272d151fe783c | /src/main/java/com/townz/web/rest/errors/EmailAlreadyUsedException.java | 96a3fc67c6a61a477340435bf707bed8d38c4c3b | [] | no_license | MayankDembla/Townz-jhipster-app | 1024f0c5018d0a4f478a1084d70a41a5a9294905 | a0d86144de46261199da1a23c7fe85157b8571a2 | refs/heads/main | 2023-03-19T23:58:58.015594 | 2021-03-08T10:50:50 | 2021-03-08T10:50:50 | 345,618,026 | 0 | 0 | null | 2021-03-08T10:50:50 | 2021-03-08T10:32:02 | Java | UTF-8 | Java | false | false | 329 | java | package com.townz.web.rest.errors;
public class EmailAlreadyUsedException extends BadRequestAlertException {
private static final long serialVersionUID = 1L;
public EmailAlreadyUsedException() {
super(ErrorConstants.EMAIL_ALREADY_USED_TYPE, "Email is already in use!", "userManagement", "emailexists");
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
b989ae9adadc2814d26a3ca2b696912e8617f4cc | 9060e27259ff745e0ad80b5c28ad7f39b6a35e6c | /src/com/zgy/goldmonitor/logic/PlatformLogic.java | 7320a0b5e5692bff1deb3c526f5f849c8d3c5e8f | [] | no_license | craining/future-goods-alarm | 001159bb1fe02ec9f89753afd87f960ed6f2acf3 | ec57b9037df383241fb2df11a88efa025325ab1c | refs/heads/master | 2020-05-16T22:06:17.496613 | 2014-06-13T05:03:12 | 2014-06-13T05:03:12 | 20,674,963 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,103 | java | package com.zgy.goldmonitor.logic;
import java.util.ArrayList;
import java.util.HashMap;
import org.json.JSONObject;
import android.app.Activity;
import android.os.Bundle;
import android.text.TextUtils;
import cn.sharesdk.framework.Platform;
import cn.sharesdk.framework.Platform.ShareParams;
import cn.sharesdk.framework.PlatformActionListener;
import cn.sharesdk.framework.ShareSDK;
import cn.sharesdk.sina.weibo.SinaWeibo;
import cn.sharesdk.tencent.qzone.QZone;
import cn.sharesdk.wechat.friends.Wechat;
import com.tencent.connect.share.QzoneShare;
import com.tencent.tauth.IUiListener;
import com.tencent.tauth.Tencent;
import com.tencent.tauth.UiError;
import com.zgy.goldmonitor.Debug;
import com.zgy.goldmonitor.MainApp;
public class PlatformLogic {
private static PlatformLogic instance;
private PlatformLogic() {
}
public static PlatformLogic getInstance() {
if (instance == null) {
instance = new PlatformLogic();
}
return instance;
}
/**
* 分享到新浪微博
*
* @param @param title
* @param @param content
* @param @param img
* @param @param imgLocalOrOnline
* @param @param listener
* @author zhuanggy
* @date 2014-4-25
*/
public void shareToSina(String title, String content, String img, boolean imgLocalOrOnline) {
Platform platform = ShareSDK.getPlatform(MainApp.getInstance(), SinaWeibo.NAME);
platform.setPlatformActionListener(new PlatformActionListener() {
@Override
public void onError(Platform arg0, int arg1, Throwable arg2) {
arg2.printStackTrace();
}
@Override
public void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {
}
@Override
public void onCancel(Platform arg0, int arg1) {
}
});
int shareType = Platform.SHARE_TEXT;
ShareParams sp = new ShareParams();
sp.setText(content);
sp.setTitle(title);
if (!TextUtils.isEmpty(img)) {
shareType = Platform.SHARE_IMAGE;
if (imgLocalOrOnline) {
sp.setImagePath(img);
} else {
sp.setImageUrl(img);
}
}
sp.setShareType(shareType);
// platform.SSOSetting(true);//暂不使用sso方式绑定,签名未设置正确
platform.share(sp);
}
/**
* 此分享操作用tencent_open_sdk.jar类库
*
* @param @param activity
* @param @param title
* @param @param content
* @param @param img
* @param @param imgLocalOrOnline
* @param @param jumpUrl
* @param @param listener
* @author zhuanggy
* @date 2014-4-25
*/
public void shareToQzone(final Activity activity, String title, String content, String img, boolean imgLocalOrOnline, String jumpUrl) {
int shareType = QzoneShare.SHARE_TO_QZONE_TYPE_NO_TYPE;
final Bundle params = new Bundle();
if (!TextUtils.isEmpty(img)) {
shareType = QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT;
if (!imgLocalOrOnline) {
// 支持传多个imageUrl
ArrayList<String> imageUrls = new ArrayList<String>();
imageUrls.add(img);
params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imageUrls);
} else {
//本地image TODO
}
}
params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, shareType);
params.putString(QzoneShare.SHARE_TO_QQ_TITLE, title);
params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, content);
params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, jumpUrl);
new Thread(new Runnable() {
@Override
public void run() {
Tencent.createInstance("1101501719", MainApp.getInstance()).shareToQzone(activity, params, new IUiListener() {
@Override
public void onCancel() {
}
@Override
public void onError(UiError arg0) {
Debug.e("", "onError");
Debug.e("arg0.errorCode", arg0.errorCode + "");
Debug.e("arg0.errorDetail", arg0.errorDetail + "");
Debug.e("arg0.errorMessage", arg0.errorMessage + "");
}
@Override
public void onComplete(Object arg0) {
Debug.e("", "onComplete");
Debug.e("arg0.toString", ((JSONObject) arg0).toString());
}
});
}
}).start();
}
public void shareToQzone2() {
ShareParams sp = new ShareParams();
sp.setTitle("测试分享的标题");
sp.setTitleUrl("http://sharesdk.cn"); // 标题的超链接
sp.setText("测试分享的文本");
sp.setImageUrl("http://www.baidu.com/img/baidu_sylogo1.gif");
sp.setSite("发布分享的网站名称");
sp.setSiteUrl("发布分享网站的地址");
Platform qzone = ShareSDK.getPlatform (MainApp.getInstance(), QZone.NAME);
// qzone. setPlatformActionListener (paListener); // 设置分享事件回调
// 执行图文分享
qzone.share(sp);
}
public static final String WECHAT_SHARE_TYPE_FRIEND = "Wechat";//微信好友
public static final String WECHAT_SHARE_TYPE_MOMENT = "WechatMoments";//微信朋友圈
// public static final String WECHAT_SHARE_TYPE_FAVOURITE = "WechatFavorite"; //微信收藏
/**
* 分享到微信
* @param @param type {@link #WECHAT_SHARE_TYPE_FAVOURITE} OR {@link #WECHAT_SHARE_TYPE_MOMENT} OR {@link #WECHAT_SHARE_TYPE_MOMENT}
* @param @param title
* @param @param content
* @param @param img
* @param @param imgLocalOrOnline
* @param @param listener
* @author zhuanggy
* @date 2014-5-20
*/
public void shareToWeChat(String type, String title, String content, String img, boolean imgLocalOrOnline) {
Platform platform = ShareSDK.getPlatform(MainApp.getInstance(), type);
platform.setPlatformActionListener(new PlatformActionListener() {
@Override
public void onError(Platform arg0, int arg1, Throwable arg2) {
arg2.printStackTrace();
}
@Override
public void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {
}
@Override
public void onCancel(Platform arg0, int arg1) {
}
});
int shareType = Platform.SHARE_TEXT;
ShareParams sp = new ShareParams();
sp.setText(content);
sp.setTitle(title);
if (!TextUtils.isEmpty(img)) {
shareType = Platform.SHARE_IMAGE;
if (imgLocalOrOnline) {
sp.setImagePath(img);
} else {
sp.setImageUrl(img);
}
}
sp.setShareType(shareType);
platform.SSOSetting(false);
platform.share(sp);
}
}
| [
"craining@163.com"
] | craining@163.com |
2949acc86366dcc26c7e0d37c17a67b397fb70c1 | 263b9556d76279459ab9942b0005a911e2b085c5 | /src/main/java/com/alipay/api/response/AlipayEcoMycarViolationVehicleQueryResponse.java | 475b85249367b5eb39c3cb292105c3fdbfed403c | [
"Apache-2.0"
] | permissive | getsgock/alipay-sdk-java-all | 1c98ffe7cb5601c715b4f4b956e6c2b41a067647 | 1ee16a85df59c08fb9a9b06755743711d5cd9814 | refs/heads/master | 2020-03-30T05:42:59.554699 | 2018-09-19T06:17:22 | 2018-09-19T06:17:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,267 | java | package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.eco.mycar.violation.vehicle.query response.
*
* @author auto create
* @since 1.0, 2018-06-25 14:52:42
*/
public class AlipayEcoMycarViolationVehicleQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 4888826583458296817L;
/**
* 用户车辆发动机号
*/
@ApiField("engine_no")
private String engineNo;
/**
* 用户车辆ID,支付宝系统唯一
*/
@ApiField("vi_id")
private String viId;
/**
* 用户车辆车牌号
*/
@ApiField("vi_number")
private String viNumber;
/**
* 用户车辆识别码
*/
@ApiField("vin_no")
private String vinNo;
public void setEngineNo(String engineNo) {
this.engineNo = engineNo;
}
public String getEngineNo( ) {
return this.engineNo;
}
public void setViId(String viId) {
this.viId = viId;
}
public String getViId( ) {
return this.viId;
}
public void setViNumber(String viNumber) {
this.viNumber = viNumber;
}
public String getViNumber( ) {
return this.viNumber;
}
public void setVinNo(String vinNo) {
this.vinNo = vinNo;
}
public String getVinNo( ) {
return this.vinNo;
}
}
| [
"liuqun.lq@alibaba-inc.com"
] | liuqun.lq@alibaba-inc.com |
61caed44290042437687b9fae28893dfb93646ed | dcf8f26d0b7d3f3c249e0296069148d3adac0acf | /src/main/java/Books_exercises/JavaReceptury/strings/ForEachChar.java | 48275ce618084d0534040c8365d08def96e73d47 | [] | no_license | Jacci19/Various-projects | 466b0fcd44f6b51e00369248cd1657c07c8302ee | fb930cf3ec899a8f77c840c4eb3814f32a541ff2 | refs/heads/master | 2020-03-29T06:03:22.440862 | 2019-02-15T12:17:24 | 2019-02-15T12:17:50 | 149,606,856 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 336 | java | package Books_exercises.JavaReceptury.strings;
// BEGIN main
public class ForEachChar {
public static void main(String[] args) {
String s = "Witaj, świecie";
// for (char ch : s) {...} Nie działa w Java 7
for (char ch : s.toCharArray()) {
System.out.println(ch);
}
}
}
// END main
| [
"jacek205@wp.pl"
] | jacek205@wp.pl |
9d46c5cc10ae8a099678f39f9d4d79de559e7faa | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/3/org/apache/commons/math3/dfp/Dfp_intValue_1141.java | cca93bed1f19834d47265c041f195eb60b48b026 | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 4,454 | java |
org apach common math3 dfp
decim float point librari java
float point built radix
decim
design goal
decim math close
settabl precis mix number set
portabl code portabl
perform
accuraci result ulp basic
algebra oper
compli ieee
ieee note
trade off
memori foot print memori
repres number perform
digit bigger round greater loss
decim digit base digit
partial fill
number repres form
pre
sign time mant time radix exp
pre
sign plusmn mantissa repres fraction number
mant signific digit
exp rang
ieee note differ
ieee requir radix radix
requir met
subclass made make behav radix
number opinion behav radix
number requir met
radix chosen faster oper
decim digit time radix behavior
realiz ad addit round step ensur
number decim digit repres constant
ieee standard specif leav intern data encod
reason conclud subclass radix
system encod radix system
ieee specifi exist normal number
entiti signific radix
digit support gradual underflow
rais underflow flag number expon
exp min expmin flush expon reach min exp digit
smallest number repres
min exp digit digit min exp
ieee defin impli radix point li
signific digit left remain digit
implement put impli radix point left
digit includ signific signific digit
radix point fine
detail matter definit side effect
render invis subclass
dfp field dfpfield
version
dfp real field element realfieldel dfp
convert integ
greater return 2147483648 return 2147483648
convert number
intvalu
dfp round
result
round rint
round greater greaterthan instanc newinst
round lessthan instanc newinst 2147483648
2147483648
mant length mant length round exp
result result radix round mant
round sign
result result
result
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
2707e612e9d943a1f7d5b65e929968227c594290 | 139960e2d7d55e71c15e6a63acb6609e142a2ace | /mobile_app1/module216/src/main/java/module216packageJava0/Foo42.java | 329bfa2cc9d4f153bd1595ec398e9b0323e6683c | [
"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 | 389 | java | package module216packageJava0;
import java.lang.Integer;
public class Foo42 {
Integer int0;
Integer int1;
public void foo0() {
new module216packageJava0.Foo41().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
| [
"oliviern@uber.com"
] | oliviern@uber.com |
f1471344e16cf4c0996241d7147672383015f799 | e296fb26b0d0bf4de2a10add72b53e19ce4b774b | /src/main/java/com/paladin/qos/dynamic/mapper/yiyuan/RehospitalzationAnalysisPneumoniaMapper.java | fd0b464f24f7873599734cc1115eb7d25b207f13 | [] | no_license | health-program/qos-support | 89c8c150a145bf22b077ca6b23a1420de7c6169b | e6f79e10bea264b75ad97481081a8151aef13138 | refs/heads/master | 2020-08-01T12:09:28.152273 | 2020-01-14T09:29:46 | 2020-01-14T09:29:46 | 210,991,994 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 229 | java | package com.paladin.qos.dynamic.mapper.yiyuan;
import java.util.Map;
public interface RehospitalzationAnalysisPneumoniaMapper {
long getTotalNum(Map<String, Object> params);
long getEventNum(Map<String, Object> params);
}
| [
"823498927@qq.com"
] | 823498927@qq.com |
b1692b997a841e5ec9e406925ccba8b6fd63f415 | d4d3fbf19e954c844dba06b8bce68ddf2c59ab03 | /source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentDataSetSection.java | 080771dcea276a5503e8585f3a8667ada1f70363 | [] | no_license | BackupTheBerlios/sciradama-svn | 134adf98632d2ad023b768e410177b6e87a5e967 | 310a45a1ade1223892e38bbf366122523664d779 | refs/heads/master | 2020-04-06T04:02:15.210182 | 2009-09-23T06:55:24 | 2009-09-23T06:55:24 | 40,805,698 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,381 | java | /*
* Copyright 2009 ETH Zuerich, CISD
*
* 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 ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.experiment;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.BrowserSectionPanel;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment;
/**
* @author Franz-Josef Elmer
*/
class ExperimentDataSetSection extends BrowserSectionPanel
{
ExperimentDataSetSection(Experiment experiment, IViewContext<?> viewContext)
{
super("Data Sets", ExperimentDataSetBrowser.create(viewContext, TechId.create(experiment),
experiment.getExperimentType()));
}
}
| [
"felmer@a9a122e8-2d74-0410-b01f-b93345715403"
] | felmer@a9a122e8-2d74-0410-b01f-b93345715403 |
49916f3f538012020d972eb84993d53b4b361d87 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/shardingjdbc--sharding-jdbc/07843a3064b8856cbd3b0909b0abdaa414d54d4a/after/ShardingStrategyTest.java | 9a423cefc83219e33e973d100947265fc9ba465c | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,470 | java | /**
* Copyright 1999-2015 dangdang.com.
* <p>
* 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.
* </p>
*/
package com.dangdang.ddframe.rdb.sharding.api.strategy.common;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import com.dangdang.ddframe.rdb.sharding.api.ShardingValue;
import com.dangdang.ddframe.rdb.sharding.api.strategy.fixture.TestMultipleKeysShardingAlgorithm;
import com.dangdang.ddframe.rdb.sharding.api.strategy.fixture.TestSingleKeyShardingAlgorithm;
import com.dangdang.ddframe.rdb.sharding.parser.result.router.SQLStatementType;
import com.google.common.collect.Range;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public final class ShardingStrategyTest {
private final Collection<String> targets = Arrays.asList("1", "2", "3");
@Test
public void assertDoShardingWithoutShardingColumns() {
ShardingStrategy strategy = new ShardingStrategy(Collections.singletonList("column"), null);
assertThat(strategy.doSharding(SQLStatementType.SELECT, targets, Collections.<ShardingValue<?>>emptyList()), is(targets));
}
@Test
public void assertDoShardingForEqualSingleKey() {
ShardingStrategy strategy = new ShardingStrategy("column", new TestSingleKeyShardingAlgorithm());
assertThat(strategy.doSharding(SQLStatementType.SELECT, targets, createShardingValues(new ShardingValue<>("column", "1"))), is((Collection<String>) Collections.singletonList("1")));
}
@Test
public void assertDoShardingForInSingleKey() {
ShardingStrategy strategy = new ShardingStrategy("column", new TestSingleKeyShardingAlgorithm());
assertThat(strategy.doSharding(SQLStatementType.SELECT, targets, createShardingValues(new ShardingValue<>("column", Arrays.asList("1", "3")))),
is((Collection<String>) Arrays.asList("1", "3")));
}
@Test
public void assertDoShardingForBetweenSingleKey() {
ShardingStrategy strategy = new ShardingStrategy("column", new TestSingleKeyShardingAlgorithm());
assertThat(strategy.doSharding(SQLStatementType.SELECT, targets, createShardingValues(new ShardingValue<>("column", Range.open("1", "3")))),
is((Collection<String>) Arrays.asList("1", "2", "3")));
}
@Test
public void assertDoShardingForMultipleKeys() {
ShardingStrategy strategy = new ShardingStrategy("column", new TestMultipleKeysShardingAlgorithm());
assertThat(strategy.doSharding(SQLStatementType.SELECT, targets, createShardingValues(new ShardingValue<>("column", "1"))), is((Collection<String>) Arrays.asList("1", "2", "3")));
}
private Collection<ShardingValue<?>> createShardingValues(final ShardingValue<String> shardingValue) {
Collection<ShardingValue<?>> result = new ArrayList<>(1);
result.add(shardingValue);
return result;
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
55ac737398fffb74194bb28c0fab81c9edc27abb | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-418-34-20-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/xhtml/XhtmlParser_ESTest_scaffolding.java | d232deaf57aee771c091d454b9a5d1d985ca61c7 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 451 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Apr 08 04:52:24 UTC 2020
*/
package org.xwiki.rendering.wikimodel.xhtml;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class XhtmlParser_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
d8c11f1d3f94597b884332af80c65dc78b9e7eb2 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13138-3-25-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/XWikiHibernateStore_ESTest.java | f64e03eb19acceaf39a20f112ae566d3e09e5549 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 564 | java | /*
* This file was automatically generated by EvoSuite
* Thu Apr 09 10:01:46 UTC 2020
*/
package com.xpn.xwiki.store;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class XWikiHibernateStore_ESTest extends XWikiHibernateStore_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
6f79c547f90af17a9a1038e62049c4db63709666 | 114433842ca5ea98ecc45384a2c676ef26cf1213 | /src/main/java/com/diego/garagem/config/DatabaseConfiguration.java | 14a6d614cdf323e19194445b10b13978cceeeba5 | [] | no_license | diekof/garagem-app | 0cb87e1b3c09de3fa8c3b331165ef2df41aaca3e | dbefceb035d3545a423608e2e6e533396b51b115 | refs/heads/main | 2023-06-03T23:34:34.639562 | 2021-06-21T16:37:56 | 2021-06-21T16:37:56 | 378,997,725 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,170 | java | package com.diego.garagem.config;
import java.sql.SQLException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.core.env.Environment;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import tech.jhipster.config.JHipsterConstants;
import tech.jhipster.config.h2.H2ConfigurationHelper;
@Configuration
@EnableJpaRepositories("com.diego.garagem.repository")
@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware")
@EnableTransactionManagement
@EnableElasticsearchRepositories("com.diego.garagem.repository.search")
public class DatabaseConfiguration {
private final Logger log = LoggerFactory.getLogger(DatabaseConfiguration.class);
private final Environment env;
public DatabaseConfiguration(Environment env) {
this.env = env;
}
/**
* Open the TCP port for the H2 database, so it is available remotely.
*
* @return the H2 database TCP server.
* @throws SQLException if the server failed to start.
*/
@Bean(initMethod = "start", destroyMethod = "stop")
@Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)
public Object h2TCPServer() throws SQLException {
String port = getValidPortForH2();
log.debug("H2 database is available on port {}", port);
return H2ConfigurationHelper.createServer(port);
}
private String getValidPortForH2() {
int port = Integer.parseInt(env.getProperty("server.port"));
if (port < 10000) {
port = 10000 + port;
} else {
if (port < 63536) {
port = port + 2000;
} else {
port = port - 2000;
}
}
return String.valueOf(port);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
488e2012808f84a0f0f61f2c4a9a4ae32a67e61b | 780a683bbf02bec1d46d430b94219e64cff8b0fe | /aireTalkPH/src/main/java/com/pingshow/qrcode/PlanarYUVLuminanceSource.java | ce627a2f0542b11331c35c7eea2c756610cd2f2f | [] | no_license | ZouXinkang/AireTalk_AS | 65c326873258fad9de2a5dd433b7d28c83108b82 | 21ef6aaea048e0079a65c256a0ff62f148a52a77 | refs/heads/master | 2021-07-22T01:42:24.463487 | 2016-08-15T06:15:06 | 2016-08-15T06:15:06 | 108,798,933 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,070 | java | /*
* Copyright 2009 ZXing 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
*
* 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.pingshow.qrcode;
import com.google.zxing.LuminanceSource;
import android.graphics.Bitmap;
/**
* This object extends LuminanceSource around an array of YUV data returned from the camera driver,
* with the option to crop to a rectangle within the full data. This can be used to exclude
* superfluous pixels around the perimeter and speed up decoding.
*
* It works for any pixel format where the Y channel is planar and appears first, including
* YCbCr_420_SP and YCbCr_422_SP.
*
* @author dswitkin@google.com (Daniel Switkin)
*/
public final class PlanarYUVLuminanceSource extends LuminanceSource {
private final byte[] yuvData;
private final int dataWidth;
private final int dataHeight;
private final int left;
private final int top;
public PlanarYUVLuminanceSource(byte[] yuvData, int dataWidth, int dataHeight, int left, int top,
int width, int height) {
super(width, height);
if (left + width > dataWidth || top + height > dataHeight) {
throw new IllegalArgumentException("Crop rectangle does not fit within image data.");
}
this.yuvData = yuvData;
this.dataWidth = dataWidth;
this.dataHeight = dataHeight;
this.left = left;
this.top = top;
}
@Override
public byte[] getRow(int y, byte[] row) {
if (y < 0 || y >= getHeight()) {
throw new IllegalArgumentException("Requested row is outside the image: " + y);
}
int width = getWidth();
if (row == null || row.length < width) {
row = new byte[width];
}
int offset = (y + top) * dataWidth + left;
System.arraycopy(yuvData, offset, row, 0, width);
return row;
}
@Override
public byte[] getMatrix() {
int width = getWidth();
int height = getHeight();
// If the caller asks for the entire underlying image, save the copy and give them the
// original data. The docs specifically warn that result.length must be ignored.
if (width == dataWidth && height == dataHeight) {
return yuvData;
}
int area = width * height;
byte[] matrix = new byte[area];
int inputOffset = top * dataWidth + left;
// If the width matches the full width of the underlying data, perform a single copy.
if (width == dataWidth) {
System.arraycopy(yuvData, inputOffset, matrix, 0, area);
return matrix;
}
// Otherwise copy one cropped row at a time.
byte[] yuv = yuvData;
for (int y = 0; y < height; y++) {
int outputOffset = y * width;
System.arraycopy(yuv, inputOffset, matrix, outputOffset, width);
inputOffset += dataWidth;
}
return matrix;
}
@Override
public boolean isCropSupported() {
return true;
}
public int getDataWidth() {
return dataWidth;
}
public int getDataHeight() {
return dataHeight;
}
public Bitmap renderCroppedGreyscaleBitmap() {
int width = getWidth();
int height = getHeight();
int[] pixels = new int[width * height];
byte[] yuv = yuvData;
int inputOffset = top * dataWidth + left;
for (int y = 0; y < height; y++) {
int outputOffset = y * width;
for (int x = 0; x < width; x++) {
int grey = yuv[inputOffset + x] & 0xff;
pixels[outputOffset + x] = 0xFF000000 | (grey * 0x00010101);
}
inputOffset += dataWidth;
}
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
bitmap.setPixels(pixels, 0, width, 0, 0, width, height);
return bitmap;
}
}
| [
"xwf@XWFdeMacBook-Pro.local"
] | xwf@XWFdeMacBook-Pro.local |
96516ee3904154a2d93be0b3c062f59e34a4a6ee | baa8117a4f91d78bef30bb008bfb9a34cd323dbb | /OOP Advanced/Exam/src/test/java/rgp_tests/OneVsOneTests.java | 4219111477fef830ad306c4c36c7b9641848c886 | [] | no_license | stefanliydov/Java-Fundamentals | 1ca68fb8c4101bd1a9b26fc58ef35b352c072e23 | 89d81cbe70bb95f22418e830f0eec97c94305b63 | refs/heads/master | 2021-03-24T11:06:50.503463 | 2018-01-09T17:53:15 | 2018-01-09T17:53:15 | 103,289,671 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,023 | java | package rgp_tests;
import app.contracts.Action;
import app.contracts.Targetable;
import app.models.actions.OneVsOne;
import app.models.participants.Warrior;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
public class OneVsOneTests {
private Action action;
private List<Targetable> targetableList;
private Targetable dummy1;
private Targetable dummy2;
@Before
public void atStart(){
this.action = new OneVsOne();
dummy1 = new Warrior();
dummy1.setName("Pesho");
dummy2 = new Warrior();
dummy2.setName("Gosho");
dummy2.takeDamage(10);
targetableList = new ArrayList<>();
}
@Test
public void testWithEmptyList(){
String message = this.action.executeAction(this.targetableList);
Assert.assertEquals("There should be exactly 2 participants for OneVsOne!",message);
}
@Test
public void testWithOneParticipantList(){
this.targetableList.add(dummy1);
String message = this.action.executeAction(this.targetableList);
Assert.assertEquals("There should be exactly 2 participants for OneVsOne!",message);
}
@Test
public void testWithMoreThanTwoList(){
this.targetableList.add(dummy1);
this.targetableList.add(dummy2);
this.targetableList.add(dummy1);
String message = this.action.executeAction(this.targetableList);
Assert.assertEquals("There should be exactly 2 participants for OneVsOne!",message);
}
@Test
public void fight() throws NoSuchFieldException, IllegalAccessException {
this.targetableList.add(dummy1);
this.targetableList.add(dummy2);
this.action.executeAction(targetableList);
Field field = dummy1.getClass().getDeclaredField("level");
field.setAccessible(true);
int level = (int) field.get(dummy1);
Assert.assertEquals(2,level);
}
}
| [
"stefanlyudov@abv.bg"
] | stefanlyudov@abv.bg |
e80a56ba9eef48dc97807229589625be402a537d | 7f53ff59587c1feea58fb71f7eff5608a5846798 | /src/minecraft/net/minecraft/src/EntityEnchantmentTableParticleFX.java | f5f7ea13032a199415fcd9875c529d831046a572 | [] | no_license | Orazur66/Minecraft-Client | 45c918d488f2f9fca7d2df3b1a27733813d957a5 | 70a0b63a6a347fd87a7dbe28c7de588f87df97d3 | refs/heads/master | 2021-01-15T17:08:18.072298 | 2012-02-14T21:29:14 | 2012-02-14T21:29:14 | 3,423,624 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,409 | java | package net.minecraft.src;
import java.util.Random;
public class EntityEnchantmentTableParticleFX extends EntityFX
{
private float field_40107_a;
private double field_40109_aw;
private double field_40108_ax;
private double field_40106_ay;
public EntityEnchantmentTableParticleFX(World world, double d, double d1, double d2,
double d3, double d4, double d5)
{
super(world, d, d1, d2, d3, d4, d5);
motionX = d3;
motionY = d4;
motionZ = d5;
field_40109_aw = posX = d;
field_40108_ax = posY = d1;
field_40106_ay = posZ = d2;
float f = rand.nextFloat() * 0.6F + 0.4F;
field_40107_a = particleScale = rand.nextFloat() * 0.5F + 0.2F;
particleRed = particleGreen = particleBlue = 1.0F * f;
particleGreen *= 0.9F;
particleRed *= 0.9F;
particleMaxAge = (int)(Math.random() * 10D) + 30;
noClip = true;
setParticleTextureIndex((int)(Math.random() * 26D + 1.0D + 224D));
}
public void renderParticle(Tessellator tessellator, float f, float f1, float f2, float f3, float f4, float f5)
{
super.renderParticle(tessellator, f, f1, f2, f3, f4, f5);
}
public int getEntityBrightnessForRender(float f)
{
int i = super.getEntityBrightnessForRender(f);
float f1 = (float)particleAge / (float)particleMaxAge;
f1 *= f1;
f1 *= f1;
int j = i & 0xff;
int k = i >> 16 & 0xff;
k += (int)(f1 * 15F * 16F);
if (k > 240)
{
k = 240;
}
return j | k << 16;
}
public float getEntityBrightness(float f)
{
float f1 = super.getEntityBrightness(f);
float f2 = (float)particleAge / (float)particleMaxAge;
f2 *= f2;
f2 *= f2;
return f1 * (1.0F - f2) + f2;
}
public void onUpdate()
{
prevPosX = posX;
prevPosY = posY;
prevPosZ = posZ;
float f = (float)particleAge / (float)particleMaxAge;
f = 1.0F - f;
float f1 = 1.0F - f;
f1 *= f1;
f1 *= f1;
posX = field_40109_aw + motionX * (double)f;
posY = (field_40108_ax + motionY * (double)f) - (double)(f1 * 1.2F);
posZ = field_40106_ay + motionZ * (double)f;
if (particleAge++ >= particleMaxAge)
{
setEntityDead();
}
}
}
| [
"Ninja_Buta@hotmail.fr"
] | Ninja_Buta@hotmail.fr |
54a468570580245a0d0ba5c07de1b7d7c207a066 | 3180c5a659d5bfdbf42ab07dfcc64667f738f9b3 | /src/unk/com/zing/zalo/a/af.java | ec71479122452d343d2a9641729a7a8cf850c02c | [] | no_license | tinyx3k/ZaloRE | 4b4118c789310baebaa060fc8aa68131e4786ffb | fc8d2f7117a95aea98a68ad8d5009d74e977d107 | refs/heads/master | 2023-05-03T16:21:53.296959 | 2013-05-18T14:08:34 | 2013-05-18T14:08:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 507 | java | package unk.com.zing.zalo.a;
import android.view.View;
import android.view.View.OnLongClickListener;
import com.zing.zalo.ui.hg;
class af
implements View.OnLongClickListener
{
af(m paramm, int paramInt)
{
}
public boolean onLongClick(View paramView)
{
if (m.a(this.ns) != null)
m.a(this.ns).b(this.mP, paramView);
return true;
}
}
/* Location: /home/danghvu/0day/Zalo/Zalo_1.0.8_dex2jar.jar
* Qualified Name: com.zing.zalo.a.af
* JD-Core Version: 0.6.2
*/ | [
"danghvu@gmail.com"
] | danghvu@gmail.com |
0a85c914e165aa2bf36f5033d5ac39c2bdf357e4 | a0e4f155a7b594f78a56958bca2cadedced8ffcd | /compute/src/main/java/org/zstack/compute/vm/VmInstanceDeletionPolicyManagerImpl.java | fbf47bf823b02b0f5d1d57c2996ee1839e406ad8 | [
"Apache-2.0"
] | permissive | zhao-qc/zstack | e67533eabbbabd5ae9118d256f560107f9331be0 | b38cd2324e272d736f291c836f01966f412653fa | refs/heads/master | 2020-08-14T15:03:52.102504 | 2019-10-14T03:51:12 | 2019-10-14T03:51:12 | 215,187,833 | 3 | 0 | Apache-2.0 | 2019-10-15T02:27:17 | 2019-10-15T02:27:16 | null | UTF-8 | Java | false | false | 417 | java | package org.zstack.compute.vm;
import org.zstack.header.vm.VmInstanceDeletionPolicyManager;
/**
* Created by frank on 11/12/2015.
*/
public class VmInstanceDeletionPolicyManagerImpl implements VmInstanceDeletionPolicyManager {
@Override
public VmInstanceDeletionPolicy getDeletionPolicy(String vmUuid) {
return VmInstanceDeletionPolicy.valueOf(VmGlobalConfig.VM_DELETION_POLICY.value());
}
}
| [
"xuexuemiao@yeah.net"
] | xuexuemiao@yeah.net |
39241d4547e89850213afe55e5bd51bd320f0f02 | 55b93ddeb025281f1e5bdfa165cb5074ec622544 | /graphsdk/src/androidTest/java/com/microsoft/graph/functional/OutlookTests.java | add23099a242c50f7415e4000dff885d504c86a4 | [
"MIT"
] | permissive | Glennmen/msgraph-sdk-android | 7c13e8367fb6cb7bb9a655860a4c14036601296b | cb774abbaa1abde0c63229a70256b3d97f212a3e | refs/heads/master | 2020-03-30T15:56:29.622277 | 2018-10-03T09:07:00 | 2018-10-03T09:07:00 | 151,386,422 | 1 | 0 | NOASSERTION | 2018-10-03T09:03:00 | 2018-10-03T09:02:59 | null | UTF-8 | Java | false | false | 2,960 | java | package com.microsoft.graph.functional;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.Suppress;
import com.microsoft.graph.extensions.EmailAddress;
import com.microsoft.graph.extensions.Message;
import com.microsoft.graph.extensions.Recipient;
import com.microsoft.graph.extensions.User;
import org.junit.Test;
//import com.microsoft.graph.extensions.IDirectoryDeletedItemsCollectionPage;
import com.microsoft.graph.extensions.*;
import org.junit.Assert;
import org.junit.Test;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.Duration;
import java.lang.reflect.Array;
import java.util.ArrayList;
@Suppress
public class OutlookTests extends AndroidTestCase {
@Test
public void testQueryDeletedItems() {
TestBase testBase = new TestBase();
//IDirectoryDeletedItemsCollectionPage deletedItems = testBase.graphClient.getDirectory().getDeletedItemsByType("microsoft.graph.group").buildRequest().get();
//assertNotNull(deletedItems);
}
@Test
public void testSendMail() {
TestBase testBase = new TestBase();
User me = testBase.graphClient.getMe().buildRequest().get();
Recipient r = new Recipient();
EmailAddress address = new EmailAddress();
address.address = me.mail;
r.emailAddress = address;
Message message = new Message();
message.subject = "Test E-Mail";
message.from = r;
ArrayList<Recipient> recipients = new ArrayList<Recipient>();
recipients.add(r);
message.toRecipients = recipients;
testBase.graphClient.getMe().getSendMail(message, true).buildRequest().post();
}
@Test
public void testGetFindMeetingTimes() {
TestBase testBase = new TestBase();
// Get the first user in the tenant
User me = testBase.graphClient.getMe().buildRequest().get();
IUserCollectionPage users = testBase.graphClient.getUsers().buildRequest().get();
User tenantUser = users.getCurrentPage().get(0);
//Ensure that the user grabbed is not the logged-in user
if (tenantUser.mail.equals(me.mail)) {
tenantUser = users.getCurrentPage().get(1);
}
ArrayList<AttendeeBase> attendees = new ArrayList<AttendeeBase>();
AttendeeBase attendeeBase = new AttendeeBase();
EmailAddress email = new EmailAddress();
email.address = tenantUser.mail;
attendeeBase.emailAddress = email;
attendees.add(attendeeBase);
try {
Duration duration = DatatypeFactory.newInstance().newDuration("PT30M");
MeetingTimeSuggestionsResult result = testBase.graphClient.getMe().getFindMeetingTimes(attendees, null, null, duration, 10, true, false, 10.0).buildRequest().post();
assertNotNull(result);
} catch (Exception e) {
Assert.fail("Duration could not be created from String");
}
}
} | [
"c.bales@outlook.com"
] | c.bales@outlook.com |
ce0475b53812410fddc21a36132cfd68ff1c725d | e63363389e72c0822a171e450a41c094c0c1a49c | /Mate20_9_0_0/src/main/java/com/huawei/android/pushagent/utils/c/g.java | 1dac125aee28f66968f051df9f0ad8c01c7351e8 | [] | no_license | solartcc/HwFrameWorkSource | fc23ca63bcf17865e99b607cc85d89e16ec1b177 | 5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad | refs/heads/master | 2022-12-04T21:14:37.581438 | 2020-08-25T04:30:43 | 2020-08-25T04:30:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 288 | java | package com.huawei.android.pushagent.utils.c;
class g implements b<Short, Number> {
/* synthetic */ g(g gVar) {
this();
}
private g() {
}
/* renamed from: bz */
public Short bu(Number number) {
return Short.valueOf(number.shortValue());
}
}
| [
"lygforbs0@mail.com"
] | lygforbs0@mail.com |
0ca87be086322c53946aa856ab8a9b9bd79b8669 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /src/irvine/oeis/a166/A166740.java | 1213918f56831e579ea9fa23a205f8b3f90c6e22 | [] | 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 | 443 | java | package irvine.oeis.a166;
// Generated by gen_pattern.pl - DO NOT EDIT here!
import irvine.oeis.CoxeterSequence;
/**
* A166740 Number of reduced words of length n in Coxeter group on 47 generators <code>S_i</code> with relations <code>(S_i)^2 = (S_i S_j)^12 =</code> I.
* @author Georg Fischer
*/
public class A166740 extends CoxeterSequence {
/** Construct the sequence. */
public A166740() {
super(
12,
47);
}
}
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
37811487c15bb658ba021cbda158b1492d5b4f83 | 6368e6932686b285d18e34056f2d5ca55e2e8108 | /src/main/java/simple/project/oabg/dto/GzjhDto.java | 883498a7b61542becb4c1a132f05a7c23e88253e | [] | no_license | BeHappyWsz/OABG | 2908c8500c70b52a22ff3847d1ca151edcb768c1 | d1818cc90c496a92fa2175e6887d8be496097343 | refs/heads/master | 2021-05-08T06:32:43.931873 | 2017-10-12T02:13:37 | 2017-10-12T02:14:02 | 106,631,765 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,184 | java | package simple.project.oabg.dto;
import java.util.Date;
import simple.system.simpleweb.platform.annotation.Des;
import simple.system.simpleweb.platform.annotation.search.CondtionExpression;
import simple.system.simpleweb.platform.annotation.search.CondtionType;
import simple.system.simpleweb.platform.annotation.search.Paged;
import simple.system.simpleweb.platform.annotation.search.SearchBean;
import simple.system.simpleweb.platform.annotation.search.Sorted;
import simple.system.simpleweb.platform.dao.jpa.SearchIsdeleteDto;
/**
* 用户管理dto
* @author wsz
* @created 2017年8月21日
*/
@SearchBean
@Paged
@Sorted("createTime desc")
public class GzjhDto extends SearchIsdeleteDto{
private static final long serialVersionUID = 1L;
@Des("开始时间")
@CondtionExpression(value="kssj",type=CondtionType.greaterthanOrequal)
private Date kssj;
@Des("会议时间起")
@CondtionExpression(value="jssj",type=CondtionType.lessthanOrequal)
private Date jssj;
@Des("姓名")
@CondtionExpression(value="name",type=CondtionType.like)
private String name;
@Des("姓名")
@CondtionExpression(value="sftj.code",type=CondtionType.like)
private String sftj;
}
| [
"865744553@qq.com"
] | 865744553@qq.com |
71c83396a518d4f1923cc1b753587cef87b836e6 | 34b662f2682ae9632060c2069c8b83916d6eecbd | /android/support/v4/content/ModernAsyncTask.java | d66e3ec0ff7a447e7bba276d1c6e0bd4f688f90d | [] | no_license | mattshapiro/fc40 | 632c4df2d7e117100705325544fc709cd38bb0a9 | b47ee545260d3e0de66dd05a973b457a3c03f5cf | refs/heads/master | 2021-01-19T00:25:32.311567 | 2015-03-07T00:48:51 | 2015-03-07T00:48:51 | 31,795,769 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 222 | java | // INTERNAL ERROR //
/* Location: /Users/mattshapiro/Downloads/dex2jar/com.dji.smartphone.downloader-dex2jar.jar
* Qualified Name: android.support.v4.content.ModernAsyncTask
* JD-Core Version: 0.6.2
*/ | [
"typorrhea@gmail.com"
] | typorrhea@gmail.com |
656a1f3fa1f6aa549ff6ac1469a73191b760857d | c0df90985041fc51d6fac83c379a9c3c5078f194 | /src/main/java/com/lyj/multithread/conrandom/Main.java | 702904f197c976011469e0ae7964509042235dd4 | [] | no_license | Ja0ck5/multithread-examples | de041221047d7d7e7a3dc8f936ff695449d2cda1 | 28d5e0e496ba0b0bfd2ee6a52e7d9980aa502988 | refs/heads/master | 2021-01-19T04:02:58.677237 | 2017-05-05T08:15:17 | 2017-05-05T08:15:17 | 84,426,605 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 303 | java | package com.lyj.multithread.conrandom;
public class Main {
public static void main(String[] args) {
Thread[] threads = new Thread[3];
for (int i = 0; i < 3; i++) {
TaskLocalRandom task = new TaskLocalRandom();
threads[i] = new Thread(task);
threads[i].start();
}
}
}
| [
"975117619@qq.com"
] | 975117619@qq.com |
42dd64aa9bd7386e4cbb52f2a99518ee86f52a25 | c7e4b099987185521f9526a68278ba603257fbd7 | /src/main/java/noobanidus/mods/lootr/mixins/MixinChestBlock.java | f774df8fc9591e8002ba27ad94fd433ca2b5d34e | [
"MIT"
] | permissive | mallrat208/Lootr | 7d00212c6f9bd4daeb50623561b7d0c7faace07e | f28124d6d4d1782f858acc951bbc78ad1259f8f4 | refs/heads/master | 2020-12-28T04:58:10.372688 | 2020-02-04T11:04:37 | 2020-02-04T11:04:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,432 | java | /*package noobanidus.mods.lootr.mixins;
import net.minecraft.block.BlockState;
import net.minecraft.block.ChestBlock;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.container.INamedContainerProvider;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.properties.ChestType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import noobanidus.mods.lootr.tiles.SpecialLootChestTile;
import noobanidus.mods.lootr.util.ChestUtil;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
// TODO: Handle loot chest removal when block is actually replaced
@Mixin(value = ChestBlock.class)
public abstract class MixinChestBlock {
*//* @Inject(
method = "createNewTileEntity",
at = @At("HEAD"),
cancellable = true
)
private void createNewTileEntity(IBlockReader worldIn, CallbackInfoReturnable<TileEntity> cir) {
cir.setReturnValue(new SpecialLootChestTile());
cir.cancel();
}*//*
*//* @Inject(
method = "getDirectionToAttach",
at = @At("HEAD"),
cancellable = true
)
private Object getDirectionToAttach(BlockItemUseContext context, Direction direction, CallbackInfoReturnable<Direction> cir) {
if (ChestUtil.isLootChest(context, direction)) {
return null;
}
return new Object();
}*//*
*//* @Inject(
method = "updatePostPlacement",
at = {@At(value = "RETURN", ordinal = 0),
@At(value = "RETURN", ordinal = 2)},
cancellable = true
)
private void updatePostPlacement1(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos, CallbackInfoReturnable<BlockState> cir) {
if (ChestUtil.isLootChest(worldIn, currentPos) || ChestUtil.isLootChest(worldIn, currentPos.offset(facing))) {
cir.setReturnValue(stateIn.with(ChestBlock.TYPE, ChestType.SINGLE));
cir.cancel();
}
}*//*
*//* @Inject(
method = "onBlockActivated",
at = @At("HEAD"),
cancellable = true
)
public void onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit, CallbackInfoReturnable<Boolean> ci) {
if (!worldIn.isRemote && ChestUtil.isLootChest(worldIn, pos)) {
INamedContainerProvider inamedcontainerprovider = ChestUtil.getLootContainer(worldIn, pos, (ServerPlayerEntity) player);
if (inamedcontainerprovider != null) {
player.openContainer(inamedcontainerprovider);
ci.setReturnValue(true);
} else {
ci.setReturnValue(false);
}
ci.cancel();
}
}*//*
@Inject(
method = "getContainer",
at = @At("HEAD"),
cancellable = true
)
public void getContainer(BlockState state, World world, BlockPos pos, CallbackInfoReturnable<INamedContainerProvider> cir) {
if (ChestUtil.isLootChest(world, pos)) {
cir.setReturnValue(null);
cir.cancel();
}
}
}*/
| [
"due@wxwhatever.com"
] | due@wxwhatever.com |
afabe91b47468a1088c50c96af3a15fa96ed232f | ffd5057874b1c1d1450de4071b5c58f37c2263b5 | /web/src/main/java/org/sdrc/ess/web/controller/VideoGalleryController.java | d132d704da265e2bcb3dd6fa41eef08a79bd771e | [] | no_license | SDRC-India/eSupportive-Supervision | 9fab06ffd9f2deb717b90e2bf5f12840ed51aa0a | 6b968ce685ad8dcff120ed3d91accf14402bd8b9 | refs/heads/main | 2023-05-27T21:20:03.311706 | 2021-06-09T10:24:37 | 2021-06-09T10:24:37 | 375,313,377 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,034 | java | package org.sdrc.ess.web.controller;
import java.io.IOException;
import java.util.List;
import org.sdrc.ess.core.Authorize;
import org.sdrc.ess.model.web.ErrorClass;
import org.sdrc.ess.model.web.VideoGalleryModel;
import org.sdrc.ess.service.VideoGalleryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
*
* @author Sourav Keshari Nath (souravnath@sdrc.co.in)
*
*/
@Controller
public class VideoGalleryController {
@Autowired
VideoGalleryService videoGalleryService;
@Authorize(feature="videoEntry",permission="view")
@RequestMapping("videoEntry")
public String videoEntry() {
return "videoEntry";
}
@RequestMapping(value = "/saveVideoGallery", method = RequestMethod.POST)
@ResponseBody
public ErrorClass saveReport(@RequestBody String videoDetails) {
VideoGalleryModel obj = new VideoGalleryModel();
ObjectMapper mapper = new ObjectMapper();
try {
obj = mapper.readValue(videoDetails, VideoGalleryModel.class);
} catch (JsonParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JsonMappingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return videoGalleryService.saveVideoGallery(obj);
}
@RequestMapping("getVideoGallery")
@ResponseBody
public List<VideoGalleryModel> getVideoGallery() {
return videoGalleryService.getAllVideoGallery();
}
@RequestMapping("updatesVideoGalleryIsLive")
@ResponseBody
public ErrorClass updatesVideoGalleryIsLive(@RequestParam("Id") Integer id) {
return videoGalleryService.updatesVideoGalleryIsLive(id);
}
@RequestMapping(value = "/editVideoGallery", method = RequestMethod.POST)
@ResponseBody
public ErrorClass editVideoGallery(@RequestBody String newsUpdates,
@RequestParam("id") Integer id) {
VideoGalleryModel obj = new VideoGalleryModel();
ObjectMapper mapper = new ObjectMapper();
try {
obj = mapper.readValue(newsUpdates, VideoGalleryModel.class);
} catch (JsonParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JsonMappingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return videoGalleryService.editVideoGallery(obj,id);
}
}
| [
"ratikanta131@gmail.com"
] | ratikanta131@gmail.com |
c2f1fc9ad268ed8de8b714d84c308e5b7971b11e | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/32/32_ff49d520c336fd62efce19b15bee1d8f26078d0a/LLVM_Optimization/32_ff49d520c336fd62efce19b15bee1d8f26078d0a_LLVM_Optimization_s.java | 5a4a8ccba69918d018228e19ecaed3586fb72ccc | [] | 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 | 8,125 | java | package de.fuberlin.optimierung;
import java.io.*;
import java.util.LinkedList;
public class LLVM_Optimization implements ILLVM_Optimization {
private String code = "";
private String beforeFunc = "";
private LinkedList<LLVM_Function> functions;
public static final boolean DEBUG = false;
public static final boolean STATISTIC = true;
public LLVM_Optimization(){
functions = new LinkedList<LLVM_Function>();
}
private void parseCode() throws LLVM_OptimizationException{
// Splitte in Funktionen
String[] functions = this.code.split("define ");
this.beforeFunc = functions[0];
for (int i = 1; i < functions.length; i++) {
this.functions.add(new LLVM_Function(functions[i]));
}
}
private String optimizeCode() throws LLVM_OptimizationException{
// Code steht als String in this.code
// Starte Optimierung
this.parseCode();
String outputLLVM = this.beforeFunc;
if(STATISTIC) {
System.out.println("Before optimization\n"+getStatistic());
}
int i = 0;
// Gehe Funktionen durch
for(LLVM_Function tmp : this.functions) {
// Erstelle Flussgraph
tmp.createFlowGraph();
//createGraph("func"+i, tmp);
// Optimierungsfunktionen
tmp.createRegisterMaps();
//Constant Folding
tmp.constantFolding();
// Reaching vor Lebendigkeitsanalyse
// Koennen tote Stores entstehen, also vor live variable analysis
tmp.reachingAnalysis();
// Dead register elimination
// Reaching ruft folding/propagtion auf
// Dadurch kann neuer unerreichbarer Block entstehen
// Also tote Register/Blöcke nach reaching
tmp.eliminateDeadRegisters();
tmp.eliminateDeadBlocks();
tmp.reachingAnalysis();
// CommonExpressions
// Store/Load-Paare muessen vorher eliminiert werden, also nach reaching analysis
// Wenn getelementptr zusammengefasst wird, so kann ein neues store/load-paar
// entstehen. Dieses arbeitet aber auf Arrays/Structs und wird daher nicht
// zusammengefasst.
tmp.removeCommonExpressions();
// Globale Lebendigkeitsanalyse fuer Store, Load
tmp.globalLiveVariableAnalysis();
// Entferne Bloecke, die nur unbedingten Sprungbefehl enthalten
tmp.deleteEmptyBlocks();
tmp.strengthReduction();
// Optimierte Ausgabe
tmp.updateUnnamedLabelNames();
outputLLVM += tmp.toString();
//createGraph("opt_func"+i++, tmp);
}
if(STATISTIC) {
System.out.println("After optimization\n"+getStatistic());
}
return outputLLVM;
}
private void createGraph(String filename, LLVM_Function func) {
try{
FileWriter fstream = new FileWriter(System.getProperty("user.home")+"/"+filename+".dot");
BufferedWriter out = new BufferedWriter(fstream);
out.write(func.toGraph());
out.close();
Runtime r = Runtime.getRuntime();
String[] cmds = {"/bin/sh", "-c", "/opt/local/bin/dot -Tjpg "+System.getProperty("user.home")+"/"+filename+".dot -o "+System.getProperty("user.home")+"/"+filename+".jpg"};
Process proc = r.exec(cmds);
InputStream stderr = proc.getErrorStream();
InputStreamReader isr = new InputStreamReader(stderr);
BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
String line = null;
while((line = br.readLine()) != null) {
System.out.println(line);
}
BufferedReader brerr = new BufferedReader(isr);
while((line = brerr.readLine()) != null) {
System.err.println(line);
}
}catch(Exception e){
System.err.println(e.getMessage());
}
}
private void readCodeFromFile(String fileName){
try {
BufferedReader fileReader = new BufferedReader(new FileReader(fileName));
String line = "";
while((line = fileReader.readLine()) != null) {
this.code = this.code + line;
this.code = this.code + "\n";
}
fileReader.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public String optimizeCodeFromString(String code) throws LLVM_OptimizationException{
this.code = code;
return this.optimizeCode();
}
public String optimizeCodeFromFile(String fileName) throws LLVM_OptimizationException{
this.readCodeFromFile(fileName);
return this.optimizeCode();
}
public String getCode(){
return this.code;
}
private int getBlockCount(){
int count = 0;
for (LLVM_Function f : functions) {
count += f.getBlocks().size();
}
return count;
}
private int getCommandsCount(){
int count = 0;
for (LLVM_Function f : functions) {
for(LLVM_Block c : f.getBlocks()) {
count += c.countCommands();
}
}
return count;
}
public String getStatistic(){
String out = "";
out += "############################\n";
out += "Count Functions: "+functions.size()+"\n";
out += "Count Blocks: "+getBlockCount()+"\n";
out += "Count Commands: "+getCommandsCount()+"\n";
out += "############################\n";
return out;
}
public static void main(String args[]) {
ILLVM_Optimization optimization = new LLVM_Optimization();
try{
if(args.length>0) {
String optimizedCode = optimization.optimizeCodeFromFile(args[0]);
System.out.println(optimizedCode);
}
else {
optimization = new LLVM_Optimization();
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/llvm_test.llvm");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/llvm_constant_folding1");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/llvm_cf_prop_deadb");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/llvm_lebendigkeit_global1");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/llvm_dag");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/llvm_dead_block");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/llvm_localsub_registerprop");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/llvm_clangdemo");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/strength_reduction_argv.s");//test_new.ll");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/llvm_maschco");//test_new.ll");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/srem_test.ll");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/emptyBlocksTest.s");
//String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/test.s");
String optimizedCode = optimization.optimizeCodeFromFile("input/de/fuberlin/optimierung/doubleTest1.s");
System.out.println("###########################################################");
System.out.println("################## Optimization Input #####################");
System.out.println("###########################################################");
System.out.println(optimization.getCode());
System.out.println("###########################################################");
System.out.println("################## Optimization Output ####################");
System.out.println("###########################################################");
System.out.println(optimizedCode);
}
}
catch (LLVM_OptimizationException e){
// Unoptimierten Code weiterleiten
System.out.println("; OPTIMIZATION-ERROR: " + e.getMessage());
System.out.println(optimization.getCode());
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
fabe2fb732da1a89589c0a6b5e7d02e6407fc78f | 395a1bf01f089acc5a5f7710f3f19d6326bbba64 | /argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PropPanelArgument.java | 1323f8ac4dd5cf6deee4c08d509b88a5f4c58871 | [
"LicenseRef-scancode-other-permissive",
"BSD-3-Clause"
] | permissive | but4reuse/argouml-spl-benchmark | a75724017a5986cef914df6f16341886a0997258 | 64c5e441492257542f15ce4f73355f9375d12929 | refs/heads/master | 2022-03-10T21:55:03.578933 | 2022-02-17T20:39:56 | 2022-02-17T20:39:56 | 118,929,949 | 5 | 3 | null | null | null | null | UTF-8 | Java | false | false | 3,349 | java | // $Id: PropPanelArgument.java 41 2010-04-03 20:04:12Z marcusvnac $
// Copyright (c) 2003-2007 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph appear in all copies. This software program and
// documentation are copyrighted by The Regents of the University of
// California. The software program and documentation are supplied "AS
// IS", without any accompanying services from The Regents. The Regents
// does not warrant that the operation of the program will be
// uninterrupted or error-free. The end-user understands that the program
// was developed for research purposes and is advised not to rely
// exclusively on the program for any reason. IN NO EVENT SHALL THE
// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
package org.argouml.uml.ui.behavior.common_behavior;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import org.argouml.i18n.Translator;
import org.argouml.ui.LookAndFeelMgr;
import org.argouml.uml.ui.ActionNavigateAction;
import org.argouml.uml.ui.UMLExpressionBodyField;
import org.argouml.uml.ui.UMLExpressionExpressionModel;
import org.argouml.uml.ui.UMLExpressionLanguageField;
import org.argouml.uml.ui.UMLExpressionModel2;
import org.argouml.uml.ui.foundation.core.PropPanelModelElement;
/**
*
* @since aug 10, 2003
* @author Decki, Endi, Yayan. Polytechnic of Bandung Indonesia, Computer
* Engineering Departement
*/
public class PropPanelArgument extends PropPanelModelElement {
/**
* Constructor.
*/
public PropPanelArgument() {
super("label.argument", lookupIcon("Argument"));
addField(Translator.localize("label.name"), getNameTextField());
UMLExpressionModel2 expressionModel =
new UMLExpressionExpressionModel(
this, "expression");
JTextArea ebf = new UMLExpressionBodyField(expressionModel, true);
ebf.setFont(LookAndFeelMgr.getInstance().getStandardFont());
ebf.setRows(3); // make it take up all remaining height
addField(Translator.localize("label.value"),
new JScrollPane(ebf));
addField(Translator.localize("label.language"),
new UMLExpressionLanguageField(expressionModel, true));
addAction(new ActionNavigateAction());
addAction(getDeleteAction());
}
/**
* The UID.
*/
private static final long serialVersionUID = 6737211630130267264L;
}
| [
"jabiercoding@gmail.com"
] | jabiercoding@gmail.com |
592399b1b1355df5fe57d90858c57179a9417f06 | 9ae5463f17f8864e39dafd194fb29a726a9c0823 | /dyn3rdparts/src/main/java/com/dylan/dyn3rdparts/photoview/OnSingleFlingListener.java | cf48b50a40f12348daec631fc3ec79698189e54c | [
"MIT"
] | permissive | yunsean/SharedLibrary | b065b992d861ed5fcf1c68ebfa317d1a8b0c0815 | e3236a8daa7677d93b0aa011881838ad0ff82f77 | refs/heads/master | 2021-08-16T16:21:22.020057 | 2021-07-31T14:33:00 | 2021-07-31T14:33:00 | 143,262,412 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 695 | java | package com.dylan.dyn3rdparts.photoview;
import android.view.MotionEvent;
/**
* A callback to be invoked when the ImageView is flung with a single
* touch
*/
public interface OnSingleFlingListener {
/**
* A callback to receive where the user flings on a ImageView. You will receive a callback if
* the user flings anywhere on the view.
*
* @param e1 MotionEvent the user first touch.
* @param e2 MotionEvent the user last touch.
* @param velocityX distance of user's horizontal fling.
* @param velocityY distance of user's vertical fling.
*/
boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY);
}
| [
"yunsean@163.com"
] | yunsean@163.com |
f791caa5bbd2930e7117f50af4884395d9b85992 | e682fa3667adce9277ecdedb40d4d01a785b3912 | /internal/fischer/mangf/A173544.java | 9dc31ad5981559bc6c5ff2e34725adaf2a1c6bf0 | [
"Apache-2.0"
] | permissive | gfis/joeis-lite | 859158cb8fc3608febf39ba71ab5e72360b32cb4 | 7185a0b62d54735dc3d43d8fb5be677734f99101 | refs/heads/master | 2023-08-31T00:23:51.216295 | 2023-08-29T21:11:31 | 2023-08-29T21:11:31 | 179,938,034 | 4 | 1 | Apache-2.0 | 2022-06-25T22:47:19 | 2019-04-07T08:35:01 | Roff | UTF-8 | Java | false | false | 535 | java | package irvine.oeis.a173;
import irvine.math.z.Z;
import irvine.oeis.Sequence1;
import irvine.oeis.a002.A002858;
/**
* A173544 Ulam numbers that are fourth powers.
* @author Georg Fischer
*/
public class A173544 extends Sequence1 {
private final A002858 mSeq = new A002858();
@Override
public Z next() {
while (true) {
final Z result = mSeq.next();
final Z[] sq = result.sqrtAndRemainder();
if (sq[1].isZero()) {
if (sq[0].isSquare()) {
return result;
}
}
}
}
}
| [
"dr.Georg.Fischer@gmail.com"
] | dr.Georg.Fischer@gmail.com |
9befa2d80315bf6c0045d10561590ad6612ca288 | 32b72e1dc8b6ee1be2e80bb70a03a021c83db550 | /ast_results/Kaljurand_Diktofon/app/src/kaljurand_at_gmail_dot_com/diktofon/NetSpeechApiUtils.java | 7a7265f0db819d4978f8a4b569942ab34cd8eda8 | [] | no_license | cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning | d90c41a17e88fcd99d543124eeb6e93f9133cb4a | 0564143d92f8024ff5fa6b659c2baebf827582b1 | refs/heads/master | 2020-07-13T13:53:40.297493 | 2019-01-11T11:51:18 | 2019-01-11T11:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,576 | java | // isComment
package kaljurand_at_gmail_dot_com.diktofon;
import java.io.File;
import java.io.IOException;
import org.apache.http.client.ClientProtocolException;
import ee.ioc.phon.netspeechapi.AudioUploader;
import ee.ioc.phon.netspeechapi.TranscriptionDownloader;
/**
* isComment
*/
public class isClassOrIsInterface {
// isComment
public static final int isVariable = isIntegerConstant;
// isComment
public static final String isVariable = "isStringConstant";
private static final int isVariable = isIntegerConstant;
// isComment
private isConstructor() {
}
/**
* isComment
*/
public static String isMethod(String isParameter) throws TransException {
// isComment
TranscriptionDownloader isVariable = new TranscriptionDownloader();
isNameExpr.isMethod(isNameExpr);
String isVariable = null;
try {
isNameExpr = isNameExpr.isMethod(isNameExpr);
} catch (IOException isParameter) {
throw new TransException(isNameExpr.isMethod());
}
return isNameExpr;
}
public static String isMethod(File isParameter, String isParameter, String isParameter) throws TransException {
String isVariable = null;
try {
isNameExpr = isMethod(isNameExpr, isNameExpr, isNameExpr);
} catch (ClientProtocolException isParameter) {
throw new TransException("isStringConstant" + isNameExpr);
} catch (IOException isParameter) {
throw new TransException("isStringConstant" + isNameExpr);
}
if (!isMethod(isNameExpr)) {
throw new TransException("isStringConstant" + isNameExpr);
}
return isNameExpr;
}
public static String isMethod(File isParameter, String isParameter, String isParameter) throws ClientProtocolException, IOException {
// isComment
AudioUploader isVariable = new AudioUploader(isNameExpr);
isNameExpr.isMethod(isNameExpr);
return isNameExpr.isMethod(isNameExpr, isNameExpr, isNameExpr);
}
private static boolean isMethod(String isParameter) {
return isNameExpr.isFieldAccessExpr.isFieldAccessExpr.isFieldAccessExpr.isFieldAccessExpr.isMethod(isNameExpr);
}
public static String isMethod(File isParameter, String isParameter, String isParameter) throws ClientProtocolException, IOException {
return "isStringConstant";
}
public static String isMethod(String isParameter) throws TransException {
return "isStringConstant";
}
}
| [
"matheus@melsolucoes.net"
] | matheus@melsolucoes.net |
8815e3e438385e2575ee507e2bf64ae27a2cdad8 | 48bc511009b7d0e1f7ab69881cbc90840f585da3 | /src/main/java/com/unclecloud/service/impl/ProductServiceImpl.java | f35b3994f57fc0c3dda8fa2ed5abfb6ac22168b3 | [] | no_license | yxxcrtd/unclecloud.com | 01a7a4a20c4a6ec63e605e3ad99febfd5cee1d99 | 3c298039b244d51b151bbaa6abc9bfd2c70165e8 | refs/heads/master | 2022-11-07T02:41:05.120314 | 2020-06-23T23:32:18 | 2020-06-23T23:32:18 | 254,832,380 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 351 | java | package com.unclecloud.service.impl;
import com.unclecloud.domain.Product;
import com.unclecloud.service.ProductService;
import org.springframework.stereotype.Service;
@Service
public class ProductServiceImpl extends BaseServiceImpl<Product, Long> implements ProductService {
// @Resource
// private ProductRepository productRepository;
}
| [
"yxxcrtd@gmail.com"
] | yxxcrtd@gmail.com |
4061e37e9f122b769b86e5a6a1e83148054c7461 | 5e987be80b50789aecc3729a15ab948b990b287a | /PossiblePoint.java | 7dd15957d6ed86f5be9c584f7c870f96ce46bce1 | [] | no_license | sjaqjwor/Alogo-study | 8bdf7bd58b121531b992d65edacc6cb90466b260 | 3cd6aba918d330cbdb3c6a02dcaa1ab4193ab026 | refs/heads/master | 2021-07-09T12:09:52.866654 | 2019-03-17T06:35:59 | 2019-03-17T06:35:59 | 115,249,288 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,323 | java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class PossiblePoint {
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine());
StringBuilder sb;
for(int a=0;a<t;a++){
sb=new StringBuilder();;
int num = Integer.parseInt(br.readLine());
int arr[] = new int[num];
StringTokenizer st = new StringTokenizer(br.readLine());
int sum=0;
for(int b=0;b<num;b++){
arr[b]=Integer.parseInt(st.nextToken());
sum+=arr[b];
}
boolean check[] = new boolean[sum+1];
check[0]=true;
for(int b=0;b<num;b++){
for(int c=sum;c>=0;c--){
if(check[c]){
check[arr[b]+c]=true;
}
}
}
int result=0;
for(int b=0;b<check.length;b++){
if(check[b]){
result++;
}
}
sb.append("#").append(a+1).append(" ").append(result);
System.out.println(sb.toString());
}
}
}
| [
"lsklsk45@naver.com"
] | lsklsk45@naver.com |
f81ca478789a36b93c1fddad6a8a43d06064b796 | 323c723bdbdc9bdf5053dd27a11b1976603609f5 | /nssicc/nssicc_dao/src/main/java/biz/belcorp/ssicc/dao/sisicc/EstructuraArchivoDAO.java | 4f64f51c69b41e9f4b49821229b23ea79f8cadb7 | [] | no_license | cbazalar/PROYECTOS_PROPIOS | adb0d579639fb72ec7871334163d3fef00123a1c | 3ba232d1f775afd07b13c8246d0a8ac892e93167 | refs/heads/master | 2021-01-11T03:38:06.084970 | 2016-10-24T01:33:00 | 2016-10-24T01:33:00 | 71,429,267 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,459 | java | /*
* Created on 25-nov-2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package biz.belcorp.ssicc.dao.sisicc;
import java.util.List;
import biz.belcorp.ssicc.dao.framework.DAO;
import biz.belcorp.ssicc.dao.model.Usuario;
import biz.belcorp.ssicc.dao.sisicc.model.EstructuraArchivo;
import biz.belcorp.ssicc.dao.sisicc.model.EstructuraArchivoPK;
import biz.belcorp.ssicc.dao.sisicc.model.InterfazPK;
/**
* TODO Include class description here.
*
* <p>
* <a href="EstructuraArchivoDAO.java.html"> <i>View Source </i> </a>
* </p>
*
* @author <a href="mailto:itocto@belcorp.biz">Victorino Ivan Tocto Jaimes</a>
*
*/
public interface EstructuraArchivoDAO extends DAO {
/**
* Obtiene un listado de toda la estructura del archvo de la interfaz
* en base a la llave primaria de la interfaz.
*/
public List getEstructuraArchivo(InterfazPK interfazPK);
/**
* Obtiene una lista de la estructura de un archivo de interfaz en base
* a un conjunto de parametros que son pasados en objeto EstructuraArchivo.
*
* @param criteria
* Parametros de criterio de busqueda.
*
* @return
* Lista de objetos de tipo EstructuraArchivo, poblados.
*/
public List getEstructuraArchivoByCriteria(EstructuraArchivo criteria);
/**
* Obtiene un item de la estructura del archivo de interfaz, en base a su llave primaria.
*
* @param estructuraArchivoPK
* Llave primaria.
*
* @return
* Objeto Tipo EstructuraArchivo, poblado.
*/
public EstructuraArchivo getItemEstructuraArchivo(EstructuraArchivoPK estructuraArchivoPK);
/**
* Registra la informacin de un nuevo Item de la estructura del archivo de la Interfaz.
*
* @param estructuraArchivo
* Objeto de tipo EstructuraArchivo, donde va toda la informacion
* de un item de la estructura del archivo de la interfaz.
*
* @param usuario
* Objeto de tipo Usuario, quien hace la invocacin.
*/
public void insertEstructuraArchivo(EstructuraArchivo estructuraArchivo, Usuario usuario);
/**
* Actualiza la informacin un Item de la estructura del archivo de la Interfaz.
*
* @param estructuraArchivo
* Objeto de tipo EstructuraArchivo, donde va toda la informacion
* de un item de la estructura del archivo de la interfaz.
*
* @param usuario
* Objeto de tipo Usuario, quien hace la invocacin.
*/
public void updateEstructuraArchivo(EstructuraArchivo estructuraArchivo, Usuario usuario);
/**
* Elimina un item de la Estructura del archivo de la Interfaz en base a su llave primaria.
*
* @param primaryKey
* Llave primaria del item.
*/
public void removeEstructuraArchivo(final EstructuraArchivoPK primaryKey);
/**
* Obtiene el siguiente codigo de una entrada en la estructura del archivo.
*
* @param pk
* Llave primaria de la interfaz.
*
* @return
* siguiente codigo.
*/
public String getSiguienteCodigo(InterfazPK pk);
/**
* Obtiene la siguiente posicion del campo, de la estructura del archivo de interfaz.
*
* @param pk
* Llave primaria de la interfaz.
*
* @return
* Siguiente posicion.
*/
public int getSiguientePosicion(InterfazPK pk);
}
| [
"cbazalarlarosa@gmail.com"
] | cbazalarlarosa@gmail.com |
8d7e8d372eb5d54da93f37014a3547c8b9f041f8 | 8430cd0a92af431fa85e92a7c5ea20b8efda949f | /Java Advanced/Abstraction-Lab/src/Pr1CalculateTriangleAreaMethod.java | 06b3d1405407d5477c1cbf81d70df1f512670135 | [] | no_license | Joret0/Exercises-with-Java | 9a93e39236b88bb55335e6cff62d2e774f78b054 | a1b2f64aafdf8ce8b28fb20f31aa5e37b9643652 | refs/heads/master | 2021-09-16T04:28:49.605116 | 2018-06-16T14:32:52 | 2018-06-16T14:32:52 | 71,498,826 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 735 | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Pr1CalculateTriangleAreaMethod {
public static void main(String[] args) throws IOException {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
double[] arrayDouble = Arrays.stream(bufferedReader.readLine().split("\\s+")).mapToDouble(Double::parseDouble).toArray();
double area = getArea(arrayDouble);
System.out.printf("Area = %.2f%n", area);
}
private static double getArea(double[] arrayDouble) {
double base = arrayDouble[0];
double height = arrayDouble[1];
return (base * height) / 2;
}
}
| [
"georgi_stalev@abv.bg"
] | georgi_stalev@abv.bg |
9aa8f814643bdbd1bb694a170300b29277241843 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-481-66-2-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest_scaffolding.java | f438fa1e9a7cf65f7cdde0f47ec53c802c771bd3 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 459 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Apr 04 12:39:22 UTC 2020
*/
package com.xpn.xwiki.internal.template;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class InternalTemplateManager_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
1fdd34a3cd9247e003665ff1dcbbb5a852ade696 | 2cf1e5a7e3532b1db2d28074f57123c9f75619ef | /src/main/java/practice/problem/RobotRoomCleaner.java | 2e0596e178ed34cfdacbda63df1df890b549ad84 | [] | no_license | jimty0511/algorithmPractice | 33f15c828a1463d7a1ea247b424e577fde37e1dd | dd524388e9d5c70ee97869b63465f3cd171f9460 | refs/heads/master | 2020-03-20T14:57:01.722957 | 2020-02-19T19:43:39 | 2020-02-19T19:43:39 | 137,497,450 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,593 | java | package practice.problem;
import java.util.HashSet;
import java.util.Set;
public class RobotRoomCleaner {
interface Robot {
// Returns true if the cell in front is open and robot moves into the cell.
// Returns false if the cell in front is blocked and robot stays in the current cell.
public boolean move();
// Robot will stay in the same cell after calling turnLeft/turnRight.
// Each turn will be 90 degrees.
public void turnLeft();
public void turnRight();
// Clean the current cell.
public void clean();
}
public void cleanRoom(Robot robot) {
Set<String> visited = new HashSet<>();
helper(robot, visited, 0, 0, 0);
}
private int[][] dirs = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
private void helper(Robot robot, Set<String> visited, int x, int y, int arrow) {
String path = x + "-" + y;
if (visited.contains(path)) return;
visited.add(path);
robot.clean();
for (int i = 0; i < 4; i++) {
if (robot.move()) {
//go all the way till cannot move, then back one step
int nx = x + dirs[arrow][0];
int ny = y + dirs[arrow][1];
helper(robot, visited, nx, ny, arrow);
//trace back
robot.turnLeft();
robot.turnLeft();
robot.move();
robot.turnLeft();
robot.turnLeft();
}
robot.turnRight();
arrow = (arrow + 1) % 4;
}
}
}
| [
"ty90511@gmail.com"
] | ty90511@gmail.com |
4b320d78b74685931d4252360263bbf89a307e59 | ff79e46531d5ad204abd019472087b0ee67d6bd5 | /common/api/src/och/api/remote/chats/GetUnblockedAccsReq.java | c2371b2243eac53c3d3e9db3a16705a72cbc834e | [
"Apache-2.0"
] | permissive | Frankie-666/live-chat-engine | 24f927f152bf1ef46b54e3d55ad5cf764c37c646 | 3125d34844bb82a34489d05f1dc5e9c4aaa885a0 | refs/heads/master | 2020-12-25T16:36:00.156135 | 2015-08-16T09:16:57 | 2015-08-16T09:16:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,173 | java | /*
* Copyright 2015 Evgeny Dolganov (evgenij.dolganov@gmail.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package och.api.remote.chats;
import static och.util.Util.*;
import java.util.Collection;
import java.util.List;
import och.api.model.BaseBean;
import och.api.model.ValidationProcess;
public class GetUnblockedAccsReq extends BaseBean {
public List<String> fromAccs;
public GetUnblockedAccsReq() {
super();
}
public GetUnblockedAccsReq(Collection<String> fromAccs) {
super();
this.fromAccs = toList(fromAccs);
}
@Override
protected void checkState(ValidationProcess v) {
v.checkForEmpty(fromAccs, "fromAccs");
}
}
| [
"evgenij.dolganov@gmail.com"
] | evgenij.dolganov@gmail.com |
110990205ce0f7efe213f1e7f10bb9be43fbb182 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a303/A303704Test.java | 9e66f08c7227f0c497adff6dde1d75540e8ce596 | [] | 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 | 195 | java | package irvine.oeis.a303;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A303704Test extends AbstractSequenceTest {
}
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
955e66730ded919b32cfc7b9eb454eb0ca2b9a22 | effe406f996f30db95d569df18bb8faa1472c12a | /source/model/libraryHelpers-c/com/java2c/libraryHelpers/c/RegularFileDescriptor.java | 91172483b8d1d5cffe45ff24459b23875d91cb42 | [
"MIT"
] | permissive | gridgentoo/JavaToC | 40d0aebc87828536f3ec5d03a24b6ba0ef190aef | 30beb8632928fc9eefa7e32d4be54eef1af0eaf4 | refs/heads/master | 2020-04-23T14:11:28.723371 | 2019-02-18T15:48:17 | 2019-02-18T15:48:17 | 171,223,037 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 936 | java | /*
* This file is part of java2c. It is subject to the licence terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/raphaelcohn/java2c/master/COPYRIGHT. No part of compilerUser, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
* Copyright © 2014-2015 The developers of java2c. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/raphaelcohn/java2c/master/COPYRIGHT.
*/
package com.java2c.libraryHelpers.c;
import org.jetbrains.annotations.NotNull;
import java.nio.file.Path;
public class RegularFileDescriptor extends FileDescriptor
{
// // Uses open() or creat()
// public RegularFileDescriptor(@NotNull final Path name, @NotNull final c_number flags, @NotNull final mode_t mode)
// {
// super(value);
// }
}
| [
"raphael.cohn@stormmq.com"
] | raphael.cohn@stormmq.com |
b94a727e6f5418b3d918a63b5d0977896c633565 | 0b4844d550c8e77cd93940e4a1d8b06d0fbeabf7 | /JavaSource/dream/invt/rpt/invtprecon/service/InvtRptInvtPreConListService.java | 399f4aaec9d83611fc51efb9eb223303129be5be | [] | no_license | eMainTec-DREAM/DREAM | bbf928b5c50dd416e1d45db3722f6c9e35d8973c | 05e3ea85f9adb6ad6cbe02f4af44d941400a1620 | refs/heads/master | 2020-12-22T20:44:44.387788 | 2020-01-29T06:47:47 | 2020-01-29T06:47:47 | 236,912,749 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 960 | java | package dream.invt.rpt.invtprecon.service;
import java.util.List;
import common.bean.User;
import dream.invt.rpt.invtprecon.dto.InvtRptInvtPreConCommonDTO;
/**
* InvtRptInvtPreCon Page - List Service
* @author youngjoo38
* @version $Id: InvtRptInvtPreConListService.java,v 1.0 2017/08/22 15:19:40 youngjoo38 Exp $
* @since 1.0
*/
public interface InvtRptInvtPreConListService
{
/**
* FIND LIST
* @param invtRptInvtPreConCommonDTO
* @param user
* @return
* @throws Exception
*/
public List findList(InvtRptInvtPreConCommonDTO invtRptInvtPreConCommonDTO, User user) throws Exception;
/**
* find Total Count
* @author youngjoo38
* @version $Id:$
* @since 1.0
*
* @param invtRptInvtPreConCommonDTO
* @return
*/
public String findTotalCount(InvtRptInvtPreConCommonDTO invtRptInvtPreConCommonDTO, User user) throws Exception;
}
| [
"HN4741@10.31.0.185"
] | HN4741@10.31.0.185 |
ad22c6d6e1a6c1ddfb6eb2f7e244b41a406587ef | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/mapstruct/learning/2415/CalendarToXmlGregorianCalendar.java | b16ed115e1f76c8ccc3a7cb9d57067ace38d013b | [] | 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,323 | 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.Calendar;
import java.util.GregorianCalendar;
import java.util.Set;
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 static org.mapstruct.ap.internal.util.Collections.asSet;
/**
* @author Sjaak Derksen
*/
public class CalendarToXmlGregorianCalendar extends AbstractToXmlGregorianCalendar {
private final Parameter parameter;
private final Set<Type> importTypes;
public CalendarToXmlGregorianCalendar(TypeFactory typeFactory) {
super( typeFactory );
this.parameter = new Parameter( "cal ", typeFactory.getType( Calendar.class ) );
this.importTypes = asSet(
parameter.getType(),
typeFactory.getType( GregorianCalendar.class )
);
}
@Override
public Set< Type> getImportTypes() {
Set<Type> result = super.getImportTypes();
result.addAll( this.importTypes );
return result;
}
@Override
public Parameter getParameter() {
return parameter;
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
bde0889392dc4fa956c429cadbe7ac3cf6323237 | 26f21f68db13dbdd8e6063cca01f1b0fa958c3cc | /PortletV3Demo/src/main/java/basic/portlet/HeaderPortlet.java | e034f750bf91c08bab206c4b0223966f6a05451c | [
"Apache-2.0"
] | permissive | michaelhashimoto/portals-pluto | 380ab9c393f8b447d988f22023147219f33cc623 | 0efe7097e62f8c8e752dc64102fa8004c4ebd55a | refs/heads/master | 2021-01-01T16:04:19.900385 | 2017-05-05T09:34:05 | 2017-08-11T19:16:31 | 97,768,543 | 0 | 0 | Apache-2.0 | 2019-07-19T22:06:05 | 2017-07-19T23:03:41 | Java | UTF-8 | Java | false | false | 5,747 | 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 basic.portlet;
import static basic.portlet.Constants.ATTRIB_PROPS;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.GenericPortlet;
import javax.portlet.HeaderRequest;
import javax.portlet.HeaderResponse;
import javax.portlet.MimeResponse;
import javax.portlet.PortalContext;
import javax.portlet.PortletException;
import javax.portlet.PortletRequest;
import javax.portlet.PortletRequestDispatcher;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.ResourceRequest;
import javax.portlet.ResourceResponse;
import javax.portlet.annotations.PortletConfiguration;
import javax.portlet.annotations.LocaleString;
import javax.servlet.http.Cookie;
import org.w3c.dom.Element;
/**
* Portlet for testing the redirect funtionality, including the new getRedirectURL API.
*/
@PortletConfiguration(portletName="V3HeaderPortlet",
title=@LocaleString("Header Phase Test Portlet"))
public class HeaderPortlet extends GenericPortlet {
private static final Logger LOGGER = Logger.getLogger(HeaderPortlet.class.getName());
private static final boolean isDebug = LOGGER.isLoggable(Level.FINE);
@Override
public void renderHeaders(HeaderRequest req, HeaderResponse resp) throws PortletException, IOException {
if (isDebug) {
StringBuilder txt = new StringBuilder(128);
txt.append("Doing the headers. ");
txt.append("portal ctx prop names: ");
txt.append(Collections.list(req.getPortalContext().getPropertyNames()).toString());
txt.append(", markup head prop: ");
txt.append(req.getPortalContext().getProperty(PortalContext.MARKUP_HEAD_ELEMENT_SUPPORT));
txt.append(", RENDER_PART: ");
txt.append((String)req.getAttribute(PortletRequest.RENDER_PART));
LOGGER.fine(txt.toString());
}
// Add link tag to head section to include the style sheet
Element link = resp.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
String contextRoot = req.getContextPath();
link.setAttribute("href", contextRoot + "/resources/css/styles.css");
resp.addProperty(MimeResponse.MARKUP_HEAD_ELEMENT, link);
// Add cookies
Cookie c = new Cookie(this.getPortletName(), "something special");
c.setMaxAge(60);
resp.addProperty(c);
c = new Cookie("Author", "Scott");
c.setComment("test cookie");
resp.addProperty(c);
// Set header
resp.addProperty("Portlet", this.getPortletName());
resp.setProperty("Portal", "Pluto");
resp.addProperty("Portal", "Apache");
// get header info
Collection<String> names = resp.getPropertyNames();
List<String> hdrInfo = new ArrayList<String>();
for (String name: names) {
StringBuilder txt = new StringBuilder(128);
txt.append("Property name: ").append(name);
txt.append(", value: ").append(resp.getProperty(name));
txt.append(", values: ").append(resp.getPropertyValues(name));
hdrInfo.add(txt.toString());
}
req.getPortletSession().setAttribute(ATTRIB_PROPS, hdrInfo);
PrintWriter writer = resp.getWriter();
writer.println("<!-- before JSP include -->");
PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/headSectionMarkup.jsp");
rd.include(req, resp);
writer.println("<!-- after JSP include -->");
}
@Override
protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, IOException {
if (isDebug) {
StringBuilder txt = new StringBuilder(128);
txt.append("Rendering. ");
txt.append("RENDER_PART: ");
txt.append((String)req.getAttribute(PortletRequest.RENDER_PART));
LOGGER.fine(txt.toString());
}
resp.setContentType("text/html");
PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/view-hdp.jsp");
rd.include(req, resp);
}
/*
* (non-Javadoc)
*
* @see javax.portlet.GenericPortlet#serveResource(javax.portlet.ResourceRequest, javax.portlet.ResourceResponse)
*/
@Override
public void serveResource(ResourceRequest req, ResourceResponse resp) throws PortletException, IOException {
}
public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, IOException {
}
}
| [
"msnicklous@apache.org"
] | msnicklous@apache.org |
f6fc6194ce46394aecb1a89f63aa1bca26e7e7cc | 564e9aff2cad3a4c6c48ee562008cb564628e8e8 | /src/net/minecraft/bnc.java | 56c138c5012938d42a6225742527a0cb57e3efa5 | [] | no_license | BeYkeRYkt/MinecraftServerDec | efbafd774cf5c68bde0dd60b7511ac91d3f1bd8e | cfb5b989abb0e68112f7d731d0d79e0d0021c94f | refs/heads/master | 2021-01-10T19:05:30.104737 | 2014-09-28T10:42:47 | 2014-09-28T10:42:47 | 23,732,504 | 1 | 0 | null | 2014-09-28T10:32:16 | 2014-09-06T10:46:05 | Java | UTF-8 | Java | false | false | 2,813 | java | package net.minecraft;
import java.util.List;
import java.util.Random;
public class bnc extends bnn {
private Block a;
private Block b;
public bnc() {
}
public bnc(bnk var1, int var2, Random var3, CuboidArea var4, BlockFace var5) {
super(var1, var2);
this.m = var5;
this.l = var4;
this.a = this.a(var3);
this.b = this.a(var3);
}
protected void a(NBTCompoundTag var1) {
super.a(var1);
var1.put("CA", Block.BLOCKREGISTRY.getBlockId(this.a));
var1.put("CB", Block.BLOCKREGISTRY.getBlockId(this.b));
}
protected void b(NBTCompoundTag var1) {
super.b(var1);
this.a = Block.getBlockById(var1.getInt("CA"));
this.b = Block.getBlockById(var1.getInt("CB"));
}
private Block a(Random var1) {
switch (var1.nextInt(5)) {
case 0:
return Blocks.CARROTS;
case 1:
return Blocks.POTATOES;
default:
return Blocks.WHEAT;
}
}
public static bnc a(bnk var0, List var1, Random var2, int var3, int var4, int var5, BlockFace var6, int var7) {
CuboidArea var8 = CuboidArea.a(var3, var4, var5, 0, 0, 0, 7, 4, 9, var6);
return a(var8) && StructurePiece.a(var1, var8) == null ? new bnc(var0, var7, var2, var8, var6) : null;
}
public boolean a(World var1, Random var2, CuboidArea var3) {
if (this.h < 0) {
this.h = this.b(var1, var3);
if (this.h < 0) {
return true;
}
this.l.a(0, this.h - this.l.maxY + 4 - 1, 0);
}
this.a(var1, var3, 0, 1, 0, 6, 4, 8, Blocks.AIR.getBlockState(), Blocks.AIR.getBlockState(), false);
this.a(var1, var3, 1, 0, 1, 2, 0, 7, Blocks.FARMLAND.getBlockState(), Blocks.FARMLAND.getBlockState(), false);
this.a(var1, var3, 4, 0, 1, 5, 0, 7, Blocks.FARMLAND.getBlockState(), Blocks.FARMLAND.getBlockState(), false);
this.a(var1, var3, 0, 0, 0, 0, 0, 8, Blocks.LOG.getBlockState(), Blocks.LOG.getBlockState(), false);
this.a(var1, var3, 6, 0, 0, 6, 0, 8, Blocks.LOG.getBlockState(), Blocks.LOG.getBlockState(), false);
this.a(var1, var3, 1, 0, 0, 5, 0, 0, Blocks.LOG.getBlockState(), Blocks.LOG.getBlockState(), false);
this.a(var1, var3, 1, 0, 8, 5, 0, 8, Blocks.LOG.getBlockState(), Blocks.LOG.getBlockState(), false);
this.a(var1, var3, 3, 0, 1, 3, 0, 7, Blocks.WATER.getBlockState(), Blocks.WATER.getBlockState(), false);
int var4;
for (var4 = 1; var4 <= 7; ++var4) {
this.a(var1, this.a.setData(MathHelper.a(var2, 2, 7)), 1, 1, var4, var3);
this.a(var1, this.a.setData(MathHelper.a(var2, 2, 7)), 2, 1, var4, var3);
this.a(var1, this.b.setData(MathHelper.a(var2, 2, 7)), 4, 1, var4, var3);
this.a(var1, this.b.setData(MathHelper.a(var2, 2, 7)), 5, 1, var4, var3);
}
for (var4 = 0; var4 < 9; ++var4) {
for (int var5 = 0; var5 < 7; ++var5) {
this.b(var1, var5, 4, var4, var3);
this.b(var1, Blocks.DIRT.getBlockState(), var5, -1, var4, var3);
}
}
return true;
}
}
| [
"Shev4ik.den@gmail.com"
] | Shev4ik.den@gmail.com |
818fb4d3e394e079509683baa49fc62a2904f999 | 957df103da596b5d9febd77d37608e4d72520658 | /AM L08 Interfaces I/src/p1_introduction/Demo.java | c9b1634b193f6360fff3bcc579aec5d732e97d6a | [] | no_license | evanlockw/CSE148 | 0712ed77e8394d30736e450d564108b51e6735e9 | bad45d121c7cb0b3c1ca7d70287a747d2db65770 | refs/heads/main | 2023-04-15T15:56:43.588767 | 2021-04-27T15:34:10 | 2021-04-27T15:34:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 176 | java | package p1_introduction;
public class Demo {
public static void main(String[] args) {
MallardDuck md1 = new MallardDuck();
md1.fly();
md1.swim();
md1.quack();
}
}
| [
"chenb@sunysuffolk.edu"
] | chenb@sunysuffolk.edu |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.