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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3e3f917dc0859c5f91fcac8f7704e6d59b428cac | 3d242b5e81e75fb82edb27fecd64f0222f50c3f3 | /subprojects/griffon-core-compile/src/main/java/griffon/metadata/PropertyEditorFor.java | 8545cfaa29143040d1f69bd69e775256536f751c | [
"Apache-2.0"
] | permissive | pgremo/griffon | d7105330ad5c3969bfa56d84d632a9d5bbcb9f59 | 4c19a3cc2af3dbb8e489e64f82bde99ff7e773e8 | refs/heads/master | 2022-12-07T02:42:49.102745 | 2018-11-06T13:12:10 | 2018-11-06T13:12:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,062 | java | /*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2008-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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 griffon.metadata;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Andres Almiray
*/
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
public @interface PropertyEditorFor {
Class<?>[] value();
}
| [
"aalmiray@gmail.com"
] | aalmiray@gmail.com |
b101ebba7f73ca24f1968cc4532e40b7c2931b19 | 1e4831a6648961bf75018538e990b42bee2b57c1 | /src/test/java/com/jhipster/firstapp/security/SecurityUtilsUnitTest.java | b6c3d9a5a9d9c20a0b0d9a7d7a6be301d3e4d646 | [] | no_license | lonwis/jhipster-sample-application | 3d23c377075d8ccb988f410061e19fe489a5c9d8 | 096fab5d7f7c6ebc7fc6abef5b3b0ccbc94192d3 | refs/heads/master | 2021-04-13T17:14:53.890438 | 2020-03-22T12:14:23 | 2020-03-22T12:14:23 | 249,176,153 | 0 | 0 | null | 2020-07-19T23:15:33 | 2020-03-22T12:14:05 | Java | UTF-8 | Java | false | false | 3,201 | java | package com.jhipster.firstapp.security;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Optional;
import org.junit.jupiter.api.Test;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
/**
* Test class for the {@link SecurityUtils} utility class.
*/
public class SecurityUtilsUnitTest {
@Test
public void testGetCurrentUserLogin() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin"));
SecurityContextHolder.setContext(securityContext);
Optional<String> login = SecurityUtils.getCurrentUserLogin();
assertThat(login).contains("admin");
}
@Test
public void testgetCurrentUserJWT() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "token"));
SecurityContextHolder.setContext(securityContext);
Optional<String> jwt = SecurityUtils.getCurrentUserJWT();
assertThat(jwt).contains("token");
}
@Test
public void testIsAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin"));
SecurityContextHolder.setContext(securityContext);
boolean isAuthenticated = SecurityUtils.isAuthenticated();
assertThat(isAuthenticated).isTrue();
}
@Test
public void testAnonymousIsNotAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
Collection<GrantedAuthority> authorities = new ArrayList<>();
authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS));
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("anonymous", "anonymous", authorities));
SecurityContextHolder.setContext(securityContext);
boolean isAuthenticated = SecurityUtils.isAuthenticated();
assertThat(isAuthenticated).isFalse();
}
@Test
public void testIsCurrentUserInRole() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
Collection<GrantedAuthority> authorities = new ArrayList<>();
authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.USER));
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("user", "user", authorities));
SecurityContextHolder.setContext(securityContext);
assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.USER)).isTrue();
assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.ADMIN)).isFalse();
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
f62583f01f88f5ad9139774146f1193077b15e2b | 254abc9ff62a53bae5336cb11236d095c2468cc6 | /ThreeCSSPay/src/server/Expand.java | 23d2750eee64ea0cb7376b2e7d077cb66f17e732 | [
"MIT"
] | permissive | sdgdsffdsfff/threecss-pay | 4d9d6d2376453669b80ca3471a1a8e9857edd4e6 | 85c6b8f8a336092cfe7e0ba269e9901f89cff610 | refs/heads/master | 2021-06-30T20:54:50.323731 | 2017-09-19T01:43:50 | 2017-09-19T01:43:50 | 104,543,060 | 0 | 1 | null | 2017-09-23T05:10:46 | 2017-09-23T05:10:46 | null | UTF-8 | Java | false | false | 952 | java | package server;
import java.util.TimeZone;
import config.CommonConfigPayCenter;
import http.HOpCodePayCenter;
import http.HOpCodeUCenter;
import init.IExpand;
import init.Init;
import msg.MsgOpCodePayCenter;
import service.AppService;
import service.LoginService;
import service.NotifyService;
import service.OrderRecordService;
import service.PayService;
public class Expand implements IExpand {
@Override
public void init() throws Exception {
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
CommonConfigPayCenter.init();
HOpCodePayCenter.init();
HOpCodeUCenter.init();
MsgOpCodePayCenter.init();
Init.registerService(AppService.class);
Init.registerService(OrderRecordService.class);
Init.registerService(PayService.class);
Init.registerService(LoginService.class);
}
@Override
public void threadInit() throws Exception {
Init.registerService(NotifyService.class);
}
}
| [
"232365732@qq.com"
] | 232365732@qq.com |
81af8a686890bd6a2d3e0d038164ab15a47c0400 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/protocal/protobuf/dyt.java | f3a6cadc5dd987fb7272a531cc576f1c6fac5b0d | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 2,907 | java | package com.tencent.mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
public final class dyt
extends com.tencent.mm.bx.a
{
public String Krl;
public String desc;
public String detail;
public String title;
public final int op(int paramInt, Object... paramVarArgs)
{
AppMethodBeat.i(72534);
if (paramInt == 0)
{
paramVarArgs = (i.a.a.c.a)paramVarArgs[0];
if (this.title != null) {
paramVarArgs.g(1, this.title);
}
if (this.desc != null) {
paramVarArgs.g(2, this.desc);
}
if (this.Krl != null) {
paramVarArgs.g(3, this.Krl);
}
if (this.detail != null) {
paramVarArgs.g(4, this.detail);
}
AppMethodBeat.o(72534);
return 0;
}
if (paramInt == 1) {
if (this.title == null) {
break label390;
}
}
label390:
for (int i = i.a.a.b.b.a.h(1, this.title) + 0;; i = 0)
{
paramInt = i;
if (this.desc != null) {
paramInt = i + i.a.a.b.b.a.h(2, this.desc);
}
i = paramInt;
if (this.Krl != null) {
i = paramInt + i.a.a.b.b.a.h(3, this.Krl);
}
paramInt = i;
if (this.detail != null) {
paramInt = i + i.a.a.b.b.a.h(4, this.detail);
}
AppMethodBeat.o(72534);
return paramInt;
if (paramInt == 2)
{
paramVarArgs = new i.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = com.tencent.mm.bx.a.getNextFieldNumber(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bx.a.getNextFieldNumber(paramVarArgs)) {
if (!super.populateBuilderWithField(paramVarArgs, this, paramInt)) {
paramVarArgs.kFT();
}
}
AppMethodBeat.o(72534);
return 0;
}
if (paramInt == 3)
{
i.a.a.a.a locala = (i.a.a.a.a)paramVarArgs[0];
dyt localdyt = (dyt)paramVarArgs[1];
switch (((Integer)paramVarArgs[2]).intValue())
{
default:
AppMethodBeat.o(72534);
return -1;
case 1:
localdyt.title = locala.ajGk.readString();
AppMethodBeat.o(72534);
return 0;
case 2:
localdyt.desc = locala.ajGk.readString();
AppMethodBeat.o(72534);
return 0;
case 3:
localdyt.Krl = locala.ajGk.readString();
AppMethodBeat.o(72534);
return 0;
}
localdyt.detail = locala.ajGk.readString();
AppMethodBeat.o(72534);
return 0;
}
AppMethodBeat.o(72534);
return -1;
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes5.jar
* Qualified Name: com.tencent.mm.protocal.protobuf.dyt
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
743a4b0787e64c6c6ea4acf4542de75de6c57398 | af469eadc26f70c7ad13df33eaa10502a966321a | /app/src/main/java/io/walter/manager/adapters/TemporaryOrdersListAdapter.java | 58f86274fe65d75db2620523ce8acd2de43c3b3f | [] | no_license | walteranyika/Manager | 0019e06ccf3d3e575423fd69585978cc383006c9 | 3d4e585f3205250296cb36a3eb4333797f6d22e6 | refs/heads/master | 2021-09-25T02:30:15.056505 | 2018-10-17T06:06:20 | 2018-10-17T06:06:20 | 109,239,274 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,550 | java | package io.walter.manager.adapters;
import android.app.Activity;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import java.util.ArrayList;
import io.realm.Realm;
import io.realm.RealmResults;
import io.walter.manager.ConfirmActivity;
import io.walter.manager.R;
import io.walter.manager.fragments.ReceiptFragment;
import io.walter.manager.models.TemporaryItem;
import io.walter.manager.models.TemporaryOrderItem;
/**
* Created by walter on 7/9/17.
*/
public class TemporaryOrdersListAdapter extends BaseAdapter {
Context mContext;
ArrayList<TemporaryOrderItem> data;
public TemporaryOrdersListAdapter(Context context, ArrayList<TemporaryOrderItem> data) {
this.mContext = context;
this.data = data;
}
@Override
public int getCount() {
return data.size();// # of items in your arraylist
}
@Override
public Object getItem(int position) {
return data.get(position);// get the actual movie
}
@Override
public long getItemId(int id) {
return id;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if (convertView == null) {
LayoutInflater inflater = ((Activity) mContext).getLayoutInflater();
convertView = inflater.inflate(R.layout.receipt_list_item, parent, false);
viewHolder = new ViewHolder();
viewHolder.titleTextView = (TextView) convertView.findViewById(R.id.purchaseTitle);
viewHolder.unitPriceTextView = (TextView) convertView.findViewById(R.id.purchaseUnitPrice);
viewHolder.quantityTextView = (TextView) convertView.findViewById(R.id.purchaseQuantity);
viewHolder.totalPriceTextView = (TextView) convertView.findViewById(R.id.purchaseTotalPrice);
viewHolder.purchaseDeleteItem=(ImageView)convertView.findViewById(R.id.purchaseDeleteItem) ;
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
final TemporaryOrderItem product = data.get(position);
viewHolder.titleTextView.setText(product.getTitle());
viewHolder.unitPriceTextView.setText("" + product.getPrice());
viewHolder.quantityTextView.setText("x " + product.getQuantity());
viewHolder.totalPriceTextView.setText("" + (product.getQuantity()*product.getPrice()));
viewHolder.purchaseDeleteItem.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new MaterialDialog.Builder(mContext)
.title("Delete " + product.getTitle())
.content("Are you sure you want to delete " + product.getTitle() + "? Your action will be irreversible.")
.positiveText("Delete")
.negativeText("Cancel")
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
int code =data.get(position).getCode();
Realm realm=Realm.getInstance(mContext);
RealmResults<TemporaryOrderItem> results = realm.where(TemporaryOrderItem.class).equalTo("code", code).findAll();
realm.beginTransaction();
results.remove(0);
realm.commitTransaction();
data.remove(position);
notifyDataSetChanged();
realm.close();
ConfirmActivity.getInstance().updateItems();
}
})
.show();
}
});
return convertView;
}
static class ViewHolder {
TextView titleTextView;
TextView quantityTextView;
TextView unitPriceTextView;
TextView totalPriceTextView;
ImageView purchaseDeleteItem;
}
}
| [
"walteranyika@gmail.com"
] | walteranyika@gmail.com |
3b7a7547a8e2decf0cabc4409f6a29d538d65960 | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /IntroClassJava/dataset/median/2c1556672751734adf9a561fbf88767c32224fca14a81e9d9c719f18d0b21765038acc16ecd8377f74d4f43e8c844538161d869605e3516cf797d0a6a59f1f8e/000/mutations/511/median_2c155667_000.java | 535176a16c6e6a99aff9b13b9b83851e45529d3a | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,364 | java | package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class median_2c155667_000 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
median_2c155667_000 mainClass = new median_2c155667_000 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj i1 = new IntObj (), i2 = new IntObj (), i3 = new IntObj ();
output +=
(String.format ("Please enter 3 numbers separated by spaces > "));
i1.value = scanner.nextInt ();
i2.value = scanner.nextInt ();
i3.value = scanner.nextInt ();
if ((i2.value) == (i3.value)
|| (i1.value == i2.value && i1.value == i3.value)
|| (i1.value > i2.value && i1.value < i3.value)) {
output += (String.format ("%d is the median\n", i1.value));
} else if ((i2.value >= i1.value && i2.value <= i3.value)
|| (i2.value == i1.value && i2.value == i3.value)
|| (i2.value > i1.value && i2.value < i3.value)) {
output += (String.format ("%d is the median\n", i2.value));
} else if ((i3.value >= i2.value && i3.value <= i1.value)
|| (i3.value == i2.value && i3.value == i1.value)
|| (i3.value > i2.value && i3.value < i1.value)) {
output += (String.format ("%d is the median\n", i3.value));
}
if (true)
return;;
}
}
| [
"justinwm@163.com"
] | justinwm@163.com |
a6bf4022bd9b60c022ac4dc45361fed259e05b7e | 48d61d9a951a9ce30a8ec178d9491f5b60160679 | /app/src/main/java/com/chengzi/app/ui/mine/activity/electronicinvoice/HistoryInvoiceActivity.java | 5b86a5e8f8d121193c0752b57fd91295a0cc960f | [] | no_license | led-os/yimeinew | 209387195be8d6b04e4ec06d3d79f3e265d8af7b | 3ee181f2440cf8809ddabd7ec4d73713124af277 | refs/heads/master | 2022-02-22T08:38:24.126333 | 2019-09-17T03:30:43 | 2019-09-17T03:30:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,867 | java | package com.chengzi.app.ui.mine.activity.electronicinvoice;
import android.arch.lifecycle.Observer;
import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.support.annotation.Nullable;
import android.os.Bundle;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.handong.framework.base.BaseActivity;
import com.handong.framework.utils.ClickEventHandler;
import com.nevermore.oceans.pagingload.PagingLoadHelper;
import com.chengzi.app.R;
import com.chengzi.app.databinding.ActivityHistoryInvoiceBindingImpl;
import com.chengzi.app.databinding.ItemHistoryInvoiceLayoutBinding;
import com.chengzi.app.ui.common.activity.PictureSwitcherActivity;
import com.chengzi.app.ui.mine.bean.HistoryInvoiceBean;
import com.chengzi.app.ui.mine.viewmodel.HistoryInvoiceViewModel;
import java.util.ArrayList;
import java.util.List;
import static com.chengzi.app.ui.common.activity.PictureSwitcherActivity.PICTURE_INDEX;
import static com.chengzi.app.ui.common.activity.PictureSwitcherActivity.PICTURE_URLS;
/**
* 开票历史
*
* @ClassName:HistoryInvoiceActivity
* @PackageName:com.yimei.app.ui.mine.activity.electronicinvoice
* @Create On 2019/4/8 0008 17:34
* @Site:http://www.handongkeji.com
* @author:pengjingjing
* @Copyrights 2019/4/8 0008 handongkeji All rights reserved.
*/
public class HistoryInvoiceActivity extends BaseActivity<ActivityHistoryInvoiceBindingImpl, HistoryInvoiceViewModel> {
private PagingLoadHelper helper;
@Override
public int getLayoutRes() {
return R.layout.activity_history_invoice;
}
@Override
public void initView(@Nullable Bundle savedInstanceState) {
HistoryInvoiceAdapter adapter = new HistoryInvoiceAdapter(cliclkListener);
mBinding.swipeRefreshView.setAdapter(adapter);
helper = new PagingLoadHelper(mBinding.swipeRefreshView, mViewModel);
helper.start();
/*开票历史*/
mViewModel.historyInvoiceLive.observe(this, new Observer<List<HistoryInvoiceBean>>() {
@Override
public void onChanged(@Nullable List<HistoryInvoiceBean> data) {
if (data != null && data.size() > 0) {
helper.onComplete(data);
} else {
helper.onComplete(new ArrayList<>());
}
}
});
}
private ClickEventHandler<HistoryInvoiceBean> cliclkListener = (view, bean) -> {
switch (view.getId()) {
case R.id.tv_look: //查看发票
ArrayList<String> strings = new ArrayList<>();
// strings.add("https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3764360916,1049130352&fm=26&gp=0.jpg");
strings.add(bean.getImage());
startActivity(new Intent(this, PictureSwitcherActivity.class)
.putExtra(PICTURE_URLS, strings)
.putExtra(PICTURE_INDEX, 1)
.putExtra("title", "开票历史")
);
break;
}
};
public class HistoryInvoiceAdapter extends BaseQuickAdapter<HistoryInvoiceBean, BaseViewHolder> {
private ClickEventHandler<HistoryInvoiceBean> clickEventHandler;
public HistoryInvoiceAdapter(ClickEventHandler<HistoryInvoiceBean> clickEventHandler) {
super(R.layout.item_history_invoice_layout);
this.clickEventHandler = clickEventHandler;
}
@Override
protected void convert(BaseViewHolder helper, HistoryInvoiceBean item) {
ItemHistoryInvoiceLayoutBinding binding = DataBindingUtil.bind(helper.itemView);
binding.setListener(clickEventHandler);
binding.setBean(item);
binding.executePendingBindings();
}
}
} | [
"869798794@qq.com"
] | 869798794@qq.com |
302e0040fce144123615653e5105d4a35b24284e | a1a6c1b700c9cd8cba1fd43fbc83af071dfd2800 | /kaixin_source/src/com/tencent/mm/sdk/platformtools/BluetoothUtil.java | 96740d8927954264232a93123d9bb3ec43d68834 | [] | no_license | jingshauizh/kaixin | 58c315f99dcdde09589471fcaa262e0a1598701c | 11b8d109862dba00b7a78f9002e47064f26a0175 | refs/heads/master | 2021-07-11T00:55:46.997368 | 2021-04-16T09:41:47 | 2021-04-16T09:41:47 | 25,718,738 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 998 | java | package com.tencent.mm.sdk.platformtools;
import android.media.AudioManager;
import android.os.Build.VERSION;
public class BluetoothUtil
{
public static boolean startBluetooth(AudioManager paramAudioManager)
{
if (Integer.valueOf(Build.VERSION.SDK).intValue() >= 8)
{
if ((!paramAudioManager.isBluetoothScoAvailableOffCall()) || (PhoneStatusWatcher.isCalling()))
return false;
paramAudioManager.startBluetoothSco();
paramAudioManager.setBluetoothScoOn(true);
return true;
}
return false;
}
public static void stopBluetooth(AudioManager paramAudioManager)
{
if ((Integer.valueOf(Build.VERSION.SDK).intValue() >= 8) && (!PhoneStatusWatcher.isCalling()))
paramAudioManager.stopBluetoothSco();
}
}
/* Location: C:\9exce\android\pj\kaixin_android_3.9.9_034_kaixin001\classes_dex2jar.jar
* Qualified Name: com.tencent.mm.sdk.platformtools.BluetoothUtil
* JD-Core Version: 0.6.0
*/ | [
"jingshuaizh@163.com"
] | jingshuaizh@163.com |
a37f9011d167c937f0b307f8ff6b41ae11cedfe7 | 83d781a9c2ba33fde6df0c6adc3a434afa1a7f82 | /MarketAlertsManager/test/com/newco/marketplace/persistence/daoImpl/EmailAlertDaoImplTest.java | ea1b52289e0fd34e707e7d3e975889fa2e64bfb6 | [] | no_license | ssriha0/sl-b2b-platform | 71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6 | 5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2 | refs/heads/master | 2023-01-06T18:32:24.623256 | 2020-11-05T12:23:26 | 2020-11-05T12:23:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,489 | java | package com.newco.marketplace.persistence.daoImpl;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapSession;
import com.newco.marketplace.business.businessImpl.alert.AlertTask;
import com.newco.marketplace.exception.core.DataServiceException;
public class EmailAlertDaoImplTest {
private SqlMapClientTemplate template = new SqlMapClientTemplate();
@Test
public void testInsertToAlertTask() throws DataServiceException {
AlertTask alertTask = new AlertTask();
alertTask.setAlertTo("");
alertTask.setAlertCc("");
alertTask.setAlertBcc("");
DataSource dataSource = mock(DataSource.class);
SqlMapClient sqlMapclient = mock(SqlMapClient.class);
SqlMapSession sqlMapSession = mock(SqlMapSession.class);
when(sqlMapclient.openSession()).thenReturn(sqlMapSession);
when(sqlMapclient.getDataSource()).thenReturn(dataSource);
EmailAlertDaoImpl emailAlertDaoImpl = new EmailAlertDaoImpl();
emailAlertDaoImpl.setSqlMapClient(sqlMapclient);
boolean inserted = emailAlertDaoImpl.insertToAlertTask(alertTask);
assertTrue(inserted);
}
public final SqlMapClientTemplate getSqlMapClientTemplate() {
return this.template;
}
}
| [
"Kunal.Pise@transformco.com"
] | Kunal.Pise@transformco.com |
9ade1a4394bb52f66746cc46d8b1dab047ba158b | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/13/13_d9c6727e87733c2beece6bed28cada1c3ae00c65/VideoHandler/13_d9c6727e87733c2beece6bed28cada1c3ae00c65_VideoHandler_s.java | 3dcedd9b96497c7dfa87093ae659061b5e140107 | [] | 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,947 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.dstvo.lobber.util;
import java.awt.Rectangle;
import javax.media.Control;
import javax.media.Player;
import javax.tv.media.AWTVideoSize;
import javax.tv.media.AWTVideoSizeControl;
import javax.tv.service.selection.ServiceContentHandler;
import javax.tv.service.selection.ServiceContext;
import javax.tv.service.selection.ServiceContextFactory;
/**
*
* @author Devadas.Vijayan
*/
public class VideoHandler
{
// Convert the graphics bounds to video bounds - Tackle Irdeto issue
private static boolean RESOLVE_RESOLUTION = true;
public static boolean resizeVideo(Rectangle newVideoBounds)
{
try
{
Player player = null;
ServiceContext serviceContext = ServiceContextFactory.getInstance().getServiceContexts()[0];
if (serviceContext != null && serviceContext.getService() != null && serviceContext.getServiceContentHandlers() != null)
{
ServiceContentHandler[] handlers = serviceContext.getServiceContentHandlers();
for (int i = 0; i < handlers.length; i++)
{
if (handlers[i] instanceof Player)
{
player = (Player) handlers[i];
break;
}
}
}
if (null == player)
{
System.out.println("Player is null...");
return false;
}
Control playerControl = player.getControl("javax.tv.media.AWTVideoSizeControl");
if (playerControl instanceof AWTVideoSizeControl)
{
AWTVideoSizeControl videoSizeControl = (AWTVideoSizeControl) playerControl;
Rectangle videoSizeSource = videoSizeControl.getSize().getSource();
Rectangle destination = getResolutionResolvedRect(newVideoBounds);
AWTVideoSize newVideoSize = new AWTVideoSize(videoSizeSource, destination);
return videoSizeControl.setSize(newVideoSize);
}
}
catch (Exception e)
{
System.out.println("Exception caught in video resize code. This is "
+ "expected in PC, but in STB, investigate the rootcause");
}
return false;
}
private static Rectangle getResolutionResolvedRect(Rectangle newVideoBounds)
{
int x_factor = RESOLVE_RESOLUTION ? (1280 / 720) : 1;
int y_factor = RESOLVE_RESOLUTION ? (720 / 576) : 1;
int x = newVideoBounds.x * x_factor;
int y = newVideoBounds.y * y_factor;
int width = newVideoBounds.width * x_factor;
int height = newVideoBounds.height * y_factor;
return new Rectangle(x, y, width, height);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
6ac66745e4e573d295cbeb6f8b1c383e3d989da0 | e63363389e72c0822a171e450a41c094c0c1a49c | /Mate20_9_0_0/src/main/java/android/hardware/location/-$$Lambda$ContextHubManager$3$hASoxw9hzmd9l2NpC91O5tXLzxU.java | 241357c0d757fe0efd1317b43bc91b84943594dc | [] | 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 | 811 | java | package android.hardware.location;
/* compiled from: lambda */
public final /* synthetic */ class -$$Lambda$ContextHubManager$3$hASoxw9hzmd9l2NpC91O5tXLzxU implements Runnable {
private final /* synthetic */ ContextHubClientCallback f$0;
private final /* synthetic */ ContextHubClient f$1;
private final /* synthetic */ long f$2;
private final /* synthetic */ int f$3;
public /* synthetic */ -$$Lambda$ContextHubManager$3$hASoxw9hzmd9l2NpC91O5tXLzxU(ContextHubClientCallback contextHubClientCallback, ContextHubClient contextHubClient, long j, int i) {
this.f$0 = contextHubClientCallback;
this.f$1 = contextHubClient;
this.f$2 = j;
this.f$3 = i;
}
public final void run() {
this.f$0.onNanoAppAborted(this.f$1, this.f$2, this.f$3);
}
}
| [
"lygforbs0@gmail.com"
] | lygforbs0@gmail.com |
c43b855c576c2d39fdf2dc4fe0240b3af0714d08 | 4901cda2ff40bea3a4dbe9c9a32ea7b43e5d5393 | /java02/src/step09/Exam062_0.java | e796d59a751d1593673d6363fce6dba06ad38743 | [] | no_license | Liamkimjihwan/java01 | 287adc817ba7c7c4e711c392cb78e965d967742c | 3e0c75e63b81acbb94c9e91a63251a252c18af77 | refs/heads/master | 2021-06-07T16:22:28.061338 | 2016-11-04T11:38:44 | 2016-11-04T11:38:44 | 72,842,529 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,172 | java | /* 자바 기본 도구 사용법 - 입력도구 Scanner
=> 키보드로부터 입력 받은 특정 타입의 데이터로 잘라주는 도구
*/
package step09;
import java.util.Scanner;
// java util에 있는 Scanner
public class Exam062_0 {
public static void main(String[] args) {
// 1) 키보드로부터 입력된 데이터를 우리가 원하는 형식으로 잘라주는 도구 준비
// java.util.Scanner keyScan = new java.util.Scanner(System.in);
Scanner keyScan = new java.util.Scanner(System.in);
// import java.util.Scanner 가 있으면 java.util은 빼도 됨
//2) 사용자가 입력한 데이터(값)을 줄 단위로 자른다.
String str = keyScan.nextLine(); // 리턴 값은 한 줄 문자열이 저장된 인스턴스의 주소이다.
//레퍼런스 // 그 문자열을 저장하기 위한 String 변수를 줘야함
// 3) 사용자가 입력한 값을 출력한다.
System.out.printf("=>%s\n", str);
}
}
/*
# System.in
- 시스템 기본 입력 장치(키보드)의 정보를 갖고 있는 변수 인스턴스
-
System.outd
시스템 기본 출력장치
*/
| [
"wwwwwwlghskdlekd@naver.com"
] | wwwwwwlghskdlekd@naver.com |
2f8b42889ee1d783c6a84dc56d6fbe8ba51a5e52 | 81b3984cce8eab7e04a5b0b6bcef593bc0181e5a | /android/CarLife/app/src/main/java/com/baidu/che/codriver/vr/p130a/C2757b.java | 40554c9af0856aabcd2a1ffac3dd548306b4b162 | [] | no_license | ausdruck/Demo | 20ee124734d3a56b99b8a8e38466f2adc28024d6 | e11f8844f4852cec901ba784ce93fcbb4200edc6 | refs/heads/master | 2020-04-10T03:49:24.198527 | 2018-07-27T10:14:56 | 2018-07-27T10:14:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,072 | java | package com.baidu.che.codriver.vr.p130a;
import android.content.Context;
import com.baidu.che.codriver.p121g.C2536a;
import com.baidu.che.codriver.ui.p124d.C2549b;
import com.baidu.che.codriver.ui.p124d.C2549b.C2695a;
import com.baidu.che.codriver.util.C2716c;
import com.baidu.che.codriver.vr.C2673m;
import com.baidu.che.codriver.vr.C2848p;
import org.json.JSONException;
import org.json.JSONObject;
/* compiled from: CalendarCommand */
/* renamed from: com.baidu.che.codriver.vr.a.b */
public class C2757b extends C2747a {
public C2757b(C2848p data, C2673m callback, Context context) {
super(data, callback, context);
}
/* renamed from: h */
public void mo1957h() {
JSONException e;
String objectStr = this.b.m10789d();
if (objectStr == null || objectStr.length() <= 0) {
this.c.mo1928a(null);
} else {
C2549b model = null;
try {
JSONObject object = new JSONObject(objectStr);
C2549b model2 = new C2549b();
try {
model2.f8464f = C2695a.TYPE_NORMAL_REQ;
model2.f8468j = 1;
model2.f8465g = object.optString("ANSWER");
if (model2.f8465g == null || model2.f8465g.length() == 0) {
model2.f8465g = object.optString("answer");
}
model = model2;
} catch (JSONException e2) {
e = e2;
model = model2;
e.printStackTrace();
this.c.mo1928a(model);
C2716c.m10143a(this.d, C2536a.f8315p);
}
} catch (JSONException e3) {
e = e3;
e.printStackTrace();
this.c.mo1928a(model);
C2716c.m10143a(this.d, C2536a.f8315p);
}
this.c.mo1928a(model);
}
C2716c.m10143a(this.d, C2536a.f8315p);
}
/* renamed from: j */
protected void mo1958j() {
}
}
| [
"objectyan@gmail.com"
] | objectyan@gmail.com |
bf3407d9f6102ad14a71f55f288c121c8ffbd658 | b4e0e50e467ee914b514a4f612fde6acc9a82ba7 | /hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/ExpressionExpander.java | 445b12f1dad36242297b2db50f344eec657c6de2 | [
"Apache-2.0",
"CPL-1.0",
"MPL-1.0"
] | permissive | tenggyut/HIndex | 5054b13118c3540d280d654cfa45ed6e3edcd4c6 | e0706e1fe48352e65f9f22d1f80038f4362516bb | refs/heads/master | 2021-01-10T02:58:08.439962 | 2016-03-10T01:15:18 | 2016-03-10T01:15:18 | 44,219,351 | 3 | 4 | Apache-2.0 | 2023-03-20T11:47:22 | 2015-10-14T02:34:53 | Java | UTF-8 | Java | false | false | 8,032 | java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.security.visibility;
import java.util.List;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.hbase.security.visibility.expression.ExpressionNode;
import org.apache.hadoop.hbase.security.visibility.expression.LeafExpressionNode;
import org.apache.hadoop.hbase.security.visibility.expression.NonLeafExpressionNode;
import org.apache.hadoop.hbase.security.visibility.expression.Operator;
@InterfaceAudience.Private
public class ExpressionExpander {
public ExpressionNode expand(ExpressionNode src) {
if (!src.isSingleNode()) {
NonLeafExpressionNode nlExp = (NonLeafExpressionNode) src;
List<ExpressionNode> childExps = nlExp.getChildExps();
Operator outerOp = nlExp.getOperator();
if (isToBeExpanded(childExps)) {
// Any of the child exp is a non leaf exp with & or | operator
NonLeafExpressionNode newNode = new NonLeafExpressionNode(nlExp.getOperator());
for (ExpressionNode exp : childExps) {
if (exp.isSingleNode()) {
newNode.addChildExp(exp);
} else {
newNode.addChildExp(expand(exp));
}
}
nlExp = expandNonLeaf(newNode, outerOp);
}
return nlExp;
}
if (src instanceof NonLeafExpressionNode
&& ((NonLeafExpressionNode) src).getOperator() == Operator.NOT) {
// Negate the exp
return negate((NonLeafExpressionNode) src);
}
return src;
}
private ExpressionNode negate(NonLeafExpressionNode nlExp) {
ExpressionNode notChild = nlExp.getChildExps().get(0);
if (notChild instanceof LeafExpressionNode) {
return nlExp;
}
NonLeafExpressionNode nlNotChild = (NonLeafExpressionNode) notChild;
if (nlNotChild.getOperator() == Operator.NOT) {
// negate the negate
return nlNotChild.getChildExps().get(0);
}
Operator negateOp = nlNotChild.getOperator() == Operator.AND ? Operator.OR : Operator.AND;
NonLeafExpressionNode newNode = new NonLeafExpressionNode(negateOp);
for (ExpressionNode expNode : nlNotChild.getChildExps()) {
NonLeafExpressionNode negateNode = new NonLeafExpressionNode(Operator.NOT);
negateNode.addChildExp(expNode.deepClone());
newNode.addChildExp(expand(negateNode));
}
return newNode;
}
private boolean isToBeExpanded(List<ExpressionNode> childExps) {
for (ExpressionNode exp : childExps) {
if (!exp.isSingleNode()) {
return true;
}
}
return false;
}
private NonLeafExpressionNode expandNonLeaf(NonLeafExpressionNode newNode, Operator outerOp) {
// Now go for the merge or expansion across brackets
List<ExpressionNode> newChildExps = newNode.getChildExps();
assert newChildExps.size() == 2;
ExpressionNode leftChild = newChildExps.get(0);
ExpressionNode rightChild = newChildExps.get(1);
if (rightChild.isSingleNode()) {
// Merge the single right node into the left side
assert leftChild instanceof NonLeafExpressionNode;
newNode = mergeChildNodes(newNode, outerOp, rightChild, (NonLeafExpressionNode) leftChild);
} else if (leftChild.isSingleNode()) {
// Merge the single left node into the right side
assert rightChild instanceof NonLeafExpressionNode;
newNode = mergeChildNodes(newNode, outerOp, leftChild, (NonLeafExpressionNode) rightChild);
} else {
// Both the child exp nodes are non single.
NonLeafExpressionNode leftChildNLE = (NonLeafExpressionNode) leftChild;
NonLeafExpressionNode rightChildNLE = (NonLeafExpressionNode) rightChild;
if (outerOp == leftChildNLE.getOperator() && outerOp == rightChildNLE.getOperator()) {
// Merge
NonLeafExpressionNode leftChildNLEClone = leftChildNLE.deepClone();
leftChildNLEClone.addChildExps(rightChildNLE.getChildExps());
newNode = leftChildNLEClone;
} else {
// (a | b) & (c & d) ...
if (outerOp == Operator.OR) {
// (a | b) | (c & d)
if (leftChildNLE.getOperator() == Operator.OR
&& rightChildNLE.getOperator() == Operator.AND) {
leftChildNLE.addChildExp(rightChildNLE);
newNode = leftChildNLE;
} else if (leftChildNLE.getOperator() == Operator.AND
&& rightChildNLE.getOperator() == Operator.OR) {
// (a & b) | (c | d)
rightChildNLE.addChildExp(leftChildNLE);
newNode = rightChildNLE;
}
// (a & b) | (c & d)
// This case no need to do any thing
} else {
// outer op is &
// (a | b) & (c & d) => (a & c & d) | (b & c & d)
if (leftChildNLE.getOperator() == Operator.OR
&& rightChildNLE.getOperator() == Operator.AND) {
newNode = new NonLeafExpressionNode(Operator.OR);
for (ExpressionNode exp : leftChildNLE.getChildExps()) {
NonLeafExpressionNode rightChildNLEClone = rightChildNLE.deepClone();
rightChildNLEClone.addChildExp(exp);
newNode.addChildExp(rightChildNLEClone);
}
} else if (leftChildNLE.getOperator() == Operator.AND
&& rightChildNLE.getOperator() == Operator.OR) {
// (a & b) & (c | d) => (a & b & c) | (a & b & d)
newNode = new NonLeafExpressionNode(Operator.OR);
for (ExpressionNode exp : rightChildNLE.getChildExps()) {
NonLeafExpressionNode leftChildNLEClone = leftChildNLE.deepClone();
leftChildNLEClone.addChildExp(exp);
newNode.addChildExp(leftChildNLEClone);
}
} else {
// (a | b) & (c | d) => (a & c) | (a & d) | (b & c) | (b & d)
newNode = new NonLeafExpressionNode(Operator.OR);
for (ExpressionNode leftExp : leftChildNLE.getChildExps()) {
for (ExpressionNode rightExp : rightChildNLE.getChildExps()) {
NonLeafExpressionNode newChild = new NonLeafExpressionNode(Operator.AND);
newChild.addChildExp(leftExp.deepClone());
newChild.addChildExp(rightExp.deepClone());
newNode.addChildExp(newChild);
}
}
}
}
}
}
return newNode;
}
private NonLeafExpressionNode mergeChildNodes(NonLeafExpressionNode newOuterNode,
Operator outerOp, ExpressionNode lChild, NonLeafExpressionNode nlChild) {
// Merge the single right/left node into the other side
if (nlChild.getOperator() == outerOp) {
NonLeafExpressionNode leftChildNLEClone = nlChild.deepClone();
leftChildNLEClone.addChildExp(lChild);
newOuterNode = leftChildNLEClone;
} else if (outerOp == Operator.AND) {
assert nlChild.getOperator() == Operator.OR;
// outerOp is & here. We need to expand the node here
// (a | b) & c -> (a & c) | (b & c)
// OR
// c & (a | b) -> (c & a) | (c & b)
newOuterNode = new NonLeafExpressionNode(Operator.OR);
for (ExpressionNode exp : nlChild.getChildExps()) {
newOuterNode.addChildExp(new NonLeafExpressionNode(Operator.AND, exp, lChild));
}
}
return newOuterNode;
}
} | [
"tengyutong0213@gmail.com"
] | tengyutong0213@gmail.com |
7f9b2601b297d7848c538bb25189c003dbb301d2 | ed38e1900c60ddf879dcc3fb3c50e34923046856 | /src/net/dev123/yibo/service/listener/MicroBlogCommentClickListener.java | 34c6e2ae42b6cf505d4ed195e96e3e72ebb9f4bf | [
"Apache-2.0"
] | permissive | NeoCN/yibo-android | dace800c39f1b1542f3dff5cc87211b759dbf6d3 | 26693f275d9c696c70154e24f7b642f5f53213fb | refs/heads/master | 2020-12-24T20:00:35.480266 | 2013-03-24T01:17:26 | 2013-03-24T01:17:26 | 8,929,575 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,252 | java | package net.dev123.yibo.service.listener;
import net.dev123.mblog.entity.Status;
import net.dev123.yibo.EditCommentActivity;
import net.dev123.yibo.common.Constants;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
public class MicroBlogCommentClickListener implements OnClickListener {
private Context context;
private Status status;
public MicroBlogCommentClickListener(Context context) {
this.context = context;
}
public MicroBlogCommentClickListener(Context context, Status status) {
this.context = context;
this.status = status;
}
@Override
public void onClick(View v) {
if (status == null) {
return;
}
Intent intent = new Intent();
Bundle bundle = new Bundle();
bundle.putInt("TYPE", Constants.EDIT_TYPE_COMMENT);
bundle.putSerializable("STATUS", status);
intent.putExtras(bundle);
intent.setClass(v.getContext(), EditCommentActivity.class);
((Activity)context).startActivityForResult(intent, Constants.REQUEST_CODE_COMMENT_OF_STATUS);
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
}
| [
"raise-0@163.com"
] | raise-0@163.com |
a76dfa0d8a32884230da2815c3a12e8a1c653ecd | 00835535a677c8ffd17fcb718d8d279ee4cc30dc | /app/src/main/java/com/xgr/wonderful/utils/ActivityManagerUtils.java | 3b83e9ac6934cf85ed6f60a87e110b962b93d2e9 | [] | no_license | lesliedou/Wonderful | 587d3e5a9a059f3db4f668a56cf3cf9d1790f524 | 40f6b2b9e9cf090b4afc410225518ce5936569be | refs/heads/master | 2021-05-30T03:23:44.908608 | 2015-10-07T08:49:04 | 2015-10-07T08:49:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,219 | java | package com.xgr.wonderful.utils;
import java.util.ArrayList;
import android.app.Activity;
/**
* @author kingofglory
* email: kingofglory@yeah.net
* blog: http:www.google.com
* @date 2014-2-21
* TODO Activity收集以及释放
*/
public class ActivityManagerUtils {
private ArrayList<Activity> activityList = new ArrayList<Activity>();
private static ActivityManagerUtils activityManagerUtils;
private ActivityManagerUtils() {
}
public static ActivityManagerUtils getInstance() {
if (null == activityManagerUtils) {
activityManagerUtils = new ActivityManagerUtils();
}
return activityManagerUtils;
}
public Activity getTopActivity() {
return activityList.get(activityList.size() - 1);
}
public void addActivity(Activity ac) {
activityList.add(ac);
}
public void removeAllActivity() {
for (Activity ac : activityList) {
if (null != ac) {
if (!ac.isFinishing()) {
ac.finish();
}
ac = null;
}
}
activityList.clear();
}
}
| [
"1573876303@qq.com"
] | 1573876303@qq.com |
e12d6a2c926cad3df20900b4d43c423dcf94b679 | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /DVC-AN20_EMUI10.1.1/src/main/java/android/app/role/IOnRoleHoldersChangedListener.java | 8ac8d372ff3ac2f8b65364c86d711765602799ca | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,267 | java | package android.app.role;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
public interface IOnRoleHoldersChangedListener extends IInterface {
void onRoleHoldersChanged(String str, int i) throws RemoteException;
public static class Default implements IOnRoleHoldersChangedListener {
@Override // android.app.role.IOnRoleHoldersChangedListener
public void onRoleHoldersChanged(String roleName, int userId) throws RemoteException {
}
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
}
public static abstract class Stub extends Binder implements IOnRoleHoldersChangedListener {
private static final String DESCRIPTOR = "android.app.role.IOnRoleHoldersChangedListener";
static final int TRANSACTION_onRoleHoldersChanged = 1;
public Stub() {
attachInterface(this, DESCRIPTOR);
}
public static IOnRoleHoldersChangedListener asInterface(IBinder obj) {
if (obj == null) {
return null;
}
IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (iin == null || !(iin instanceof IOnRoleHoldersChangedListener)) {
return new Proxy(obj);
}
return (IOnRoleHoldersChangedListener) iin;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
public static String getDefaultTransactionName(int transactionCode) {
if (transactionCode != 1) {
return null;
}
return "onRoleHoldersChanged";
}
@Override // android.os.Binder
public String getTransactionName(int transactionCode) {
return getDefaultTransactionName(transactionCode);
}
@Override // android.os.Binder
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
if (code == 1) {
data.enforceInterface(DESCRIPTOR);
onRoleHoldersChanged(data.readString(), data.readInt());
return true;
} else if (code != 1598968902) {
return super.onTransact(code, data, reply, flags);
} else {
reply.writeString(DESCRIPTOR);
return true;
}
}
/* access modifiers changed from: private */
public static class Proxy implements IOnRoleHoldersChangedListener {
public static IOnRoleHoldersChangedListener sDefaultImpl;
private IBinder mRemote;
Proxy(IBinder remote) {
this.mRemote = remote;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return Stub.DESCRIPTOR;
}
@Override // android.app.role.IOnRoleHoldersChangedListener
public void onRoleHoldersChanged(String roleName, int userId) throws RemoteException {
Parcel _data = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeString(roleName);
_data.writeInt(userId);
if (this.mRemote.transact(1, _data, null, 1) || Stub.getDefaultImpl() == null) {
_data.recycle();
} else {
Stub.getDefaultImpl().onRoleHoldersChanged(roleName, userId);
}
} finally {
_data.recycle();
}
}
}
public static boolean setDefaultImpl(IOnRoleHoldersChangedListener impl) {
if (Proxy.sDefaultImpl != null || impl == null) {
return false;
}
Proxy.sDefaultImpl = impl;
return true;
}
public static IOnRoleHoldersChangedListener getDefaultImpl() {
return Proxy.sDefaultImpl;
}
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
d66b8c6703c4683f3afbee7dea1225d26891afdb | a3eaa38e4b5f00dfc800710cc2019488d38600f8 | /src/main/java/com/cmz/concurrent/design/PutTakeConnector.java | 568344e9cb54897a341e350f74ccf4ba6e072a0b | [] | no_license | chmzh/utils | 60a98f497c315bfa54f3cb834f8ba58d7a348600 | 36e59b1b0a2894a21fa4a2d863b54382da843ca2 | refs/heads/master | 2020-12-24T19:50:36.563688 | 2017-05-13T04:27:49 | 2017-05-13T04:27:49 | 56,132,747 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,009 | java | package com.cmz.concurrent.design;public class PutTakeConnector {
boolean putting_ = false; // to disable concurrent puts
Object item_ = null; // require that actual items be non-null
public synchronized void put(Object e) {
if (e == null) return; // nulls are not items
while (putting_)
// wait for another put to complete
try { wait(); } catch (InterruptedException ex) {}
putting_ = true; // record execution state
item_ = e; // transfer item
notifyAll(); // allow take
while (item_ != null) // wait for take
try { wait(); } catch (InterruptedException ex) {}
putting_ = false;
notifyAll(); // enable another put
}
public synchronized Object take() {
while (item_ == null) // wait for put
try { wait(); } catch (InterruptedException ex) {}
Object e = item_; // transfer item
item_ = null;
notifyAll(); // release current put
return e;
}
}
| [
"sd@dfh.com"
] | sd@dfh.com |
fc93207313cb30828df1fe71760d715afe5f1ace | 86c01941aa884489dc81e480e27b77f47b77529f | /vista/src/vista/set/CollectionUtils.java | b398d98cacc34b3d32aedb8ea0c2675ce1101a0c | [] | no_license | CADWRDeltaModeling/dsm2-vista | cdcb3135a4bc8ed2af0d9a5242411b9aadf3e986 | 5115fbae9edae5fa1d90ed795687fd74e69d5051 | refs/heads/master | 2023-05-25T13:01:31.466663 | 2023-05-18T18:51:40 | 2023-05-18T18:51:40 | 32,541,476 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 791 | java | package vista.set;
import java.util.ArrayList;
import java.util.List;
public class CollectionUtils {
/**
* Filters a list, returning a copy of the elements for which the predicate apply
* returns true. If selecting then only matches are kept, else only matches are removed and
* the remaining elements returned.
* @param <T>
* @param list
* @param predicate
* @param selecting
* @return
*/
public static <T> List<T> filter(List<T> list, Predicate<T> predicate, boolean selecting){
List<T> filtered = new ArrayList<T>();
if (!selecting){
filtered.addAll(list);
}
for(T t: list){
if (predicate.apply(t)){
if (selecting){
filtered.add(t);
} else {
filtered.remove(t);
}
}
}
return filtered;
}
}
| [
"psandhu@water.ca.gov@103a348e-0cfb-11df-a5af-b38b39d06e06"
] | psandhu@water.ca.gov@103a348e-0cfb-11df-a5af-b38b39d06e06 |
aed7c30d6b21cd44a33bec1b55994c188d597d35 | 62e3f2e7c08c6e005c63f51bbfa61a637b45ac20 | /B-Genius_AdFree/app/src/main/java/com/badlogic/gdx/physics/box2d/FixtureDef.java | 44560f0a777b9c0e852d17aef85bdaf372d3a5db | [] | no_license | prasad-ankit/B-Genius | 669df9d9f3746e34c3e12261e1a55cf5c59dd1c6 | 1139ec152b743e30ec0af54fe1f746b57b0152bf | refs/heads/master | 2021-01-22T21:00:04.735938 | 2016-05-20T19:03:46 | 2016-05-20T19:03:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 500 | java | package com.badlogic.gdx.physics.box2d;
public class FixtureDef
{
public float density = 0.0F;
public final Filter filter = new Filter();
public float friction = 0.2F;
public boolean isSensor = false;
public float restitution = 0.0F;
public Shape shape;
}
/* Location: C:\Users\KSHITIZ GUPTA\Downloads\apktool-install-windws\dex2jar-0.0.9.15\dex2jar-0.0.9.15\classes_dex2jar.jar
* Qualified Name: com.badlogic.gdx.physics.box2d.FixtureDef
* JD-Core Version: 0.6.0
*/ | [
"kshitiz1208@gmail.com"
] | kshitiz1208@gmail.com |
65c6d7b13ac91caabd1345aebd10303cddd29b37 | faa86aa9f22245ed3fbcdc0bca5e6c1698bf0cae | /redemptive-core/src/main/java/tech/rayline/core/effect/Scoreboarder.java | 6bfc6b4f725cfa095079a4db92b1ee2ae6a357c1 | [] | no_license | Ichbinjoe/redemptive | 5f0be3dbd914019ad05bac4377a5df3fb6356ea1 | 574f0b104cd014139c3c893e5a7c3bd217c17eb3 | refs/heads/master | 2020-03-22T13:32:24.315538 | 2018-07-08T16:17:09 | 2018-07-08T16:17:09 | 140,114,784 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,392 | java | package tech.rayline.core.effect;
import com.google.common.base.Optional;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import lombok.AccessLevel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Setter;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Objective;
import org.bukkit.scoreboard.Scoreboard;
import rx.Subscription;
import rx.functions.Action1;
import rx.functions.Func1;
import tech.rayline.core.plugin.RedemptivePlugin;
import tech.rayline.core.util.RunnableShorthand;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ThreadLocalRandom;
/**
* This represents a "Scoreboard Type" which can be connected with a score boarding function which populates a scoreboard.
*
* This class is not to be extended, and simply instantiated with the function needed
*/
@Data
public final class Scoreboarder implements Runnable {
private final static String OBJECTIVE = "obj" + ThreadLocalRandom.current().nextInt(10000);
private final static int MAX_STRING_LENGTH = 64, MAX_ROWS = 15;
private final RedemptivePlugin plugin;
private final Action1<PlayerScoreboardState> scoreboardingFunction;
private final Set<PlayerScoreboardState> scoreboardStates = new HashSet<>();
private BukkitTask task;
public void disable() {
task.cancel();
task = null;
}
public Scoreboarder enable() {
if (task == null)
task = RunnableShorthand.forPlugin(plugin).with(this).repeat(1);
return this;
}
public void addPlayer(final Player player) {
if (getStateFor(player).isPresent())
return;
Subscription subscribe = plugin
.observeEvent(PlayerQuitEvent.class)
.filter(new Func1<PlayerQuitEvent, Boolean>() {
@Override
public Boolean call(PlayerQuitEvent event) {
return event.getPlayer().equals(player);
}
})
.take(1)
.subscribe(new Action1<PlayerQuitEvent>() {
@Override
public void call(PlayerQuitEvent event) {
Scoreboarder.this.removePlayer(player);
}
});
scoreboardStates.add(new PlayerScoreboardState(player, subscribe));
}
public Optional<PlayerScoreboardState> getStateFor(final Player player) {
for (PlayerScoreboardState scoreboardState : scoreboardStates)
if (scoreboardState.getPlayer().equals(player))
return Optional.of(scoreboardState);
return Optional.absent();
}
public void removePlayer(Player player) {
Optional<PlayerScoreboardState> stateFor = getStateFor(player);
if (stateFor.isPresent()) {
PlayerScoreboardState state = stateFor.get();
scoreboardStates.remove(state);
state.clear();
}
}
@Override
public void run() {
for (PlayerScoreboardState scoreboardState : scoreboardStates)
scoreboardState.update();
}
@Data
@Setter(AccessLevel.NONE)
@EqualsAndHashCode(of = {"player", "scoreboard"})
public final class PlayerScoreboardState {
private final Player player;
private final Subscription playerQuitSubscription;
private final BiMap<Integer, String> lines = HashBiMap.create();
private final Scoreboard scoreboard;
private final Objective scoreboardObjective;
private String title;
private int nullIndex = 0;
private transient int internalCounter;
public PlayerScoreboardState(Player player, Subscription playerQuitSubscription) {
this.player = player;
this.playerQuitSubscription = playerQuitSubscription;
scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
player.setScoreboard(scoreboard);
scoreboardObjective = scoreboard.registerNewObjective(OBJECTIVE, "dummy");
scoreboardObjective.setDisplaySlot(DisplaySlot.SIDEBAR);
}
private void update() {
internalCounter = MAX_ROWS + 1;
scoreboardingFunction.call(this);
for (int i = --internalCounter; i >= 0; i--)
removeLine(i);
}
public void removeLine(int x) {
if (lines.containsKey(x))
scoreboard.resetScores(lines.get(x));
lines.remove(x);
}
public void set(int id, String text) {
text = text.substring(0, Math.min(text.length(), MAX_STRING_LENGTH));
while (text.endsWith("§")) text = text.substring(0, text.length()-1);
if (lines.containsKey(id)) {
if (lines.get(id).equals(text) || (ChatColor.stripColor(lines.get(id)).trim().equals("") && ChatColor.stripColor(text).trim().equals(""))) return;
else removeLine(id);
}
if (lines.containsValue(text)) lines.inverse().remove(text);
lines.put(id, text);
scoreboardObjective.getScore(text).setScore(id);
}
public PlayerScoreboardState then(String message) {
set(--internalCounter, message);
return this;
}
public PlayerScoreboardState skipLine() {
set(--internalCounter, nextNull());
return this;
}
public PlayerScoreboardState setTitle(String title) {
if (this.title != null && this.title.equals(title)) return this;
this.title = title;
scoreboardObjective.setDisplayName(title);
player.setScoreboard(scoreboard);
return this;
}
public String nextNull() {
String s;
do {
nullIndex = (nullIndex + 1) % ChatColor.values().length;
s = ChatColor.values()[nullIndex].toString();
} while (lines.containsValue(s));
return s;
}
public void clear() {
player.setScoreboard(Bukkit.getScoreboardManager().getMainScoreboard());
}
}
}
| [
"joey.sacchini264@gmail.com"
] | joey.sacchini264@gmail.com |
f45bc8213a81758aa9bea6a6a6c0e14d31769720 | e56f8a02c22c4e9d851df4112dee0c799efd7bfe | /vip/trade/src/main/java/com/alipay/api/response/AlipayEcapiprodDrawndnPaymentscheduleGetResponse.java | 7f1dbb350f6629a3eca320c2754254d5826c9adf | [] | no_license | wu-xian-da/vip-server | 8a07e2f8dc75722328a3fa7e7a9289ec6ef1d1b1 | 54a6855224bc3ae42005b341a2452f25cfeac2c7 | refs/heads/master | 2020-12-31T00:29:36.404038 | 2017-03-27T07:00:02 | 2017-03-27T07:00:02 | 85,170,395 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,204 | 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.PaymentSchedule;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.ecapiprod.drawndn.paymentschedule.get response.
*
* @author auto create
* @since 1.0, 2015-04-02 16:46:23
*/
public class AlipayEcapiprodDrawndnPaymentscheduleGetResponse extends AlipayResponse {
private static final long serialVersionUID = 1856241751671739498L;
/**
* 返回的支用还款计划集合
*/
@ApiListField("payment_schedules")
@ApiField("payment_schedule")
private List<PaymentSchedule> paymentSchedules;
/**
* 唯一标识这次请求
*/
@ApiField("request_id")
private String requestId;
public void setPaymentSchedules(List<PaymentSchedule> paymentSchedules) {
this.paymentSchedules = paymentSchedules;
}
public List<PaymentSchedule> getPaymentSchedules( ) {
return this.paymentSchedules;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getRequestId( ) {
return this.requestId;
}
}
| [
"programboy@126.com"
] | programboy@126.com |
a866f76f7d74fcb6518ff12acecadcce49006bc8 | 8e1adbf6ab6784f9ba7dfe49e720a297ace972a7 | /src/main/java/eu/mihosoft/ext/velocity/legacy/runtime/log/NullLogChute.java | e8adc9679936f480c962b945676c777dc3e628cf | [
"Apache-2.0"
] | permissive | miho/velocity-legacy | 1b8e4752099cb03b5b4ee651a116104ad301392c | 18fa349539c99a50036b7be87113dee353ef70d9 | refs/heads/master | 2020-09-24T21:01:27.979201 | 2019-12-04T13:41:34 | 2019-12-04T13:41:34 | 225,843,071 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,210 | java | package eu.mihosoft.ext.velocity.legacy.runtime.log;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import eu.mihosoft.ext.velocity.legacy.runtime.RuntimeServices;
/**
* Logger used in case of failure. Does nothing.
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
* @author <a href="mailto:nbubna@optonline.net">Nathan Bubna.</a>
* @version $Id: NullLogChute.java 730039 2008-12-30 03:53:19Z byron $
* @since 1.5
*/
public class NullLogChute implements LogChute
{
/**
* @see eu.mihosoft.ext.velocity.legacy.runtime.log.LogChute#init(eu.mihosoft.ext.velocity.legacy.runtime.RuntimeServices)
*/
public void init(RuntimeServices rs) throws Exception
{
}
/**
* logs messages to the great Garbage Collector in the sky
*
* @param level severity level
* @param message complete error message
*/
public void log(int level, String message)
{
}
/**
* logs messages and their accompanying Throwables
* to the great Garbage Collector in the sky
*
* @param level severity level
* @param message complete error message
* @param t the java.lang.Throwable
*/
public void log(int level, String message, Throwable t)
{
}
/**
* @see eu.mihosoft.ext.velocity.legacy.runtime.log.LogChute#isLevelEnabled(int)
*/
public boolean isLevelEnabled(int level)
{
return false;
}
}
| [
"info@michaelhoffer.de"
] | info@michaelhoffer.de |
c12685667a0f836df7bdc87e1130b6ca991c93b2 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/plugin/performance/elf/ElfCallUpReceiver.java | 33a14d4193251008d12063fc40b748fc575dc0bd | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 895 | java | package com.tencent.mm.plugin.performance.elf;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.Log;
public class ElfCallUpReceiver
extends BroadcastReceiver
{
public static int MKW = -1;
public void onReceive(Context paramContext, Intent paramIntent)
{
AppMethodBeat.i(124973);
Log.i("MicroMsg.ElfCallUpReceiver", "[onReceive] call up! ");
if (getClass().getName().equals(paramIntent.getAction())) {
MKW = paramIntent.getIntExtra("processId", 0);
}
AppMethodBeat.o(124973);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: com.tencent.mm.plugin.performance.elf.ElfCallUpReceiver
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
9c5f60731e26afb45ba414d16a8327e07d651560 | 5f3747c6e5226ae66f128a65461d7d6251cb0689 | /src/cn/clickwise/liqi/file/uitls/JarFileReader.java | 8394ecda1a5438877f6bd2f01863895b42323899 | [] | no_license | genghaihua/user_click | 4a6071ad0e394040cd8db8599cf6cde4603dc2ba | ed0c58533f1c59e040f69a06f6d74124f117211f | refs/heads/master | 2020-05-18T19:40:16.852710 | 2015-05-19T07:38:27 | 2015-05-19T07:38:27 | 35,866,687 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,992 | java | package cn.clickwise.liqi.file.uitls;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.HashMap;
import java.util.Hashtable;
import cn.clickwise.liqi.str.basic.SSO;
/**
* 读取 classpath 的文本文件,转换成各种数据结构,输入是classpath下的文件名
* @author zkyz
*
*/
public class JarFileReader {
/**
* jarFile 转换为hashMap
* 输入文件为两列或一列
* 如果为两列,第一列为key、第二列为value
* 如果为一列,该列为key、value是自动编号
* @param fileName
* @return HashMap<String,String>
*/
public HashMap<String,String> jarFile2Hash(String fileName)
{
HashMap<String,String> ht=new HashMap<String,String>();
try
{
InputStream in=this.getClass().getResourceAsStream("/"+fileName);//读jar包根目录下的fileName</span><span>
Reader f = new InputStreamReader(in);
BufferedReader fb = new BufferedReader(f);
String line = fb.readLine();
line=line.trim();
int field_num=0;
String[] seg_arr=line.split("\001");
field_num=seg_arr.length;
String key="";
String value="";
int index=0;
while(SSO.tnoe(line))
{
if(field_num==2)
{
key=line.substring(0,line.indexOf("\001")).trim();
value=line.substring(line.indexOf("\001")+1).trim();
if(!(ht.containsKey(key)))
{
ht.put(key, value);
}
}
else if(field_num==1)
{
key=line;
value=(++index)+"";
if(!(ht.containsKey(key)))
{
ht.put(key, value);
}
}
line=fb.readLine();
}
fb.close();
f.close();
in.close();
}
catch (Exception e)
{
e.printStackTrace();
}
return ht;
}
}
| [
"genghaihua@yeah.net"
] | genghaihua@yeah.net |
6d3eddcf9c3e02768f2a4b21cb11208386223be4 | 6fc5612031f36427e720aea172ff551974079053 | /engine/src/main/java/org/terasology/input/binds/movement/ForwardsButton.java | 75469ef7168fe2e8db101c40200dd9e6185061d1 | [
"Apache-2.0"
] | permissive | mkienenb/Terasology | c56bac487d4ccfe823a3870d96337775b8184850 | 40a19e3d1c8473f1003cc4bb540e69236cef6a5c | refs/heads/develop | 2021-06-11T02:33:37.645087 | 2014-01-07T21:24:17 | 2014-01-07T21:24:17 | 15,494,659 | 0 | 0 | null | 2014-02-07T20:35:33 | 2013-12-28T15:46:53 | Java | UTF-8 | Java | false | false | 1,061 | java | /*
* Copyright 2013 MovingBlocks
*
* 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.terasology.input.binds.movement;
import org.lwjgl.input.Keyboard;
import org.terasology.input.BindButtonEvent;
import org.terasology.input.DefaultBinding;
import org.terasology.input.InputType;
import org.terasology.input.RegisterBindButton;
/**
* @author Immortius
*/
@RegisterBindButton(id = "forwards", description = "Forwards")
@DefaultBinding(type = InputType.KEY, id = Keyboard.KEY_W)
public class ForwardsButton extends BindButtonEvent {
}
| [
"immortius@gmail.com"
] | immortius@gmail.com |
e0c65f1c7d7ad8ef4dabe019db9ba2260c547796 | 7147c694b2917c716c3e3673a1055128bcb44586 | /app/src/main/java/com/hdmoviez/full/hdmoviez_network/model/ResponseStatus.java | ee3a0bbf61f996a7fb05346cfeebae44fd5d348d | [] | no_license | fandofastest/radjabarusinop | 64046864f02af9d5b03cb3223f10f23e6027a8b0 | e66794b0298073d772e2517ea75c87f11be17124 | refs/heads/master | 2021-01-14T22:24:42.044500 | 2020-02-24T16:01:55 | 2020-02-24T16:01:55 | 242,779,220 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 586 | java | package com.hdmoviez.full.hdmoviez_network.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class ResponseStatus {
@SerializedName("status")
@Expose
private String status;
@SerializedName("data")
@Expose
private String data;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}
| [
"fandofast@gmail.com"
] | fandofast@gmail.com |
3348bd46c5cfd0e5d6783b18867756f9c179b5a4 | 147dde749d6a344731c1eb1f4aad32878a77137a | /src/main/java/tech/logia/domain/AbstractAuditingEntity.java | 198a377b872346c61313100d0e0e9070bcd27a38 | [] | no_license | trexx101/SoulFood | d0a9dd541f2dc044fcd42bc388a4a1fa63934bc6 | 1b98c9645f4b1734ea7cfdc38bb87522739e15c4 | refs/heads/master | 2021-05-11T14:54:14.740921 | 2018-01-16T17:00:35 | 2018-01-16T17:00:35 | 117,713,543 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,850 | java | package tech.logia.domain;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.mongodb.core.mapping.Field;
import java.time.Instant;
/**
* Base abstract class for entities which will hold definitions for created, last modified by and created,
* last modified by date.
*/
public abstract class AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@CreatedBy
@Field("created_by")
@JsonIgnore
private String createdBy;
@CreatedDate
@Field("created_date")
@JsonIgnore
private Instant createdDate = Instant.now();
@LastModifiedBy
@Field("last_modified_by")
@JsonIgnore
private String lastModifiedBy;
@LastModifiedDate
@Field("last_modified_date")
@JsonIgnore
private Instant lastModifiedDate = Instant.now();
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Instant getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Instant createdDate) {
this.createdDate = createdDate;
}
public String getLastModifiedBy() {
return lastModifiedBy;
}
public void setLastModifiedBy(String lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
public Instant getLastModifiedDate() {
return lastModifiedDate;
}
public void setLastModifiedDate(Instant lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
d37f3c7099c0e2f6c3f75a76316390dee4a0a2d2 | f1f1b17696632d865251a4f952cfd8dd74e0cc63 | /IOCProj46Anno-WebRequestProcessing-FinalSoluton2-LMI-Java8Interface/src/main/java/com/nt/test/SolutionWithLMI.java | f18f59e8cb8948e63d8061207e9de6d2c7c54cf6 | [] | no_license | natarazworld/NTSP613Repo | 99c178580b6c1d098618f13f1c43cc01f0c0e164 | 554494d1e020502bd8ed25036b6b22813e0a09b0 | refs/heads/master | 2023-07-01T00:46:29.807313 | 2021-08-04T13:35:14 | 2021-08-04T13:35:14 | 320,582,195 | 17 | 18 | null | null | null | null | UTF-8 | Java | false | false | 1,290 | java | // SolutionWithLMI .java
package com.nt.test;
import java.util.Date;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.nt.beans.WebContainer;
import com.nt.beans.WishMessage;
public class SolutionWithLMI{
public static void main(String[] args) {
//create IOC container
ApplicationContext ctx=new ClassPathXmlApplicationContext("com/nt/cfgs/applicationContext.xml");
System.out.println(".......................");
//get Target Spring bean class obj
WebContainer container=ctx.getBean("container",WebContainer.class);
System.out.println("proxy obj class name::"+container.getClass()+"---->"+container.getClass().getSuperclass());
//invoke methods
container.handleRequest("hi");
System.out.println("..................");
container.handleRequest("hello");
System.out.println("..................");
container.handleRequest("take care");
System.out.println("====================");
WishMessage msg=ctx.getBean("wm",WishMessage.class);
System.out.println(msg.showWishMsg("raja"));
//close container
((AbstractApplicationContext) ctx).close();
}
}
| [
"Nareshit@DESKTOP-IUDAAVL"
] | Nareshit@DESKTOP-IUDAAVL |
866390a68c9c6e9117d2ed91f465cc2a5fd103c3 | 1415298bb91a5f88208c7c07ea56f30161a3edf6 | /src/test/java/com/j256/ormlite/dao/DoubleDbOpenTest.java | 96a7cd2ce83a36582dc2173d44bb613087bc080a | [
"ISC"
] | permissive | icanth/ormlite-jdbc | 055a97500f7fb27baf64aa27fc7d05578b75e65d | d1cf89da0661bfa7bab2ec07ccbfb4365a897ce4 | refs/heads/master | 2020-12-25T16:13:28.528342 | 2013-08-08T14:35:57 | 2013-08-08T14:35:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,991 | java | package com.j256.ormlite.dao;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.io.File;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.j256.ormlite.BaseCoreTest;
import com.j256.ormlite.dao.Dao;
import com.j256.ormlite.dao.DaoManager;
import com.j256.ormlite.jdbc.JdbcConnectionSource;
import com.j256.ormlite.support.ConnectionSource;
import com.j256.ormlite.table.TableUtils;
public class DoubleDbOpenTest extends BaseCoreTest {
private static final String DATABASE_DIR = "/var/tmp/";
private static final String DATABASE_NAME_PREFIX = DoubleDbOpenTest.class.getSimpleName();
@Override
@Before
public void before() throws Exception {
super.before();
clearDatabases();
}
@Override
@After
public void after() throws Exception {
super.after();
clearDatabases();
}
@Test
public void testDoubleDbOpen() throws Exception {
clearDatabases();
ConnectionSource cs =
new JdbcConnectionSource("jdbc:h2:file:" + DATABASE_DIR + "/" + DATABASE_NAME_PREFIX + ".1");
TableUtils.createTable(cs, Foo.class);
Dao<Foo, Integer> dao = DaoManager.createDao(cs, Foo.class);
Foo foo1 = new Foo();
foo1.val = 12312;
assertEquals(1, dao.create(foo1));
Foo result = dao.queryForId(foo1.id);
assertNotNull(result);
assertEquals(foo1.val, result.val);
// ==================================
cs = new JdbcConnectionSource("jdbc:h2:file:" + DATABASE_DIR + "/" + DATABASE_NAME_PREFIX + ".2");
DaoManager.clearCache();
TableUtils.createTable(cs, Foo.class);
dao = DaoManager.createDao(cs, Foo.class);
Foo foo2 = new Foo();
foo2.val = 12314;
assertEquals(1, dao.create(foo2));
result = dao.queryForId(foo2.id);
assertNotNull(result);
assertEquals(foo2.val, result.val);
}
private void clearDatabases() {
for (File file : new File(DATABASE_DIR).listFiles()) {
if (file.getName().startsWith(DATABASE_NAME_PREFIX)) {
file.delete();
}
}
}
}
| [
"gray.github@mailnull.com"
] | gray.github@mailnull.com |
0fcc0045e3141cf9e51e077286ffe736e30d113e | 421f0a75a6b62c5af62f89595be61f406328113b | /generated_tests/model_seeding/2_a4j-net.kencochrane.a4j.beans.SimilarProducts-0.5-5/net/kencochrane/a4j/beans/SimilarProducts_ESTest.java | b9113a5244188185d178ff03a5be441af4b89e24 | [] | no_license | tigerqiu712/evosuite-model-seeding-empirical-evaluation | c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6 | 11a920b8213d9855082d3946233731c843baf7bc | refs/heads/master | 2020-12-23T21:04:12.152289 | 2019-10-30T08:02:29 | 2019-10-30T08:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 661 | java | /*
* This file was automatically generated by EvoSuite
* Tue Oct 29 12:46:37 GMT 2019
*/
package net.kencochrane.a4j.beans;
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(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class SimilarProducts_ESTest extends SimilarProducts_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pderakhshanfar@bsr01.win.tue.nl"
] | pderakhshanfar@bsr01.win.tue.nl |
e2af454119d1e4cd67b456ab3446318b5d7a94ba | bf75298628d5df176029d3b055b3c4d28c6478de | /src/main/java/com/couchbase/client/core/message/binary/GetRequest.java | 8ecf5df62ac715b8c48ed973240b86e36de4df0e | [] | no_license | daschl/couchbase-jvm-core | b2d630279a3a6ffe873098917266a84116b1c85f | fa028a15971a18c909aa958380d29d79c27ab25c | refs/heads/master | 2021-01-22T10:51:25.418599 | 2014-05-20T05:23:47 | 2014-05-20T05:23:47 | 18,910,010 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,606 | java | /**
* Copyright (C) 2014 Couchbase, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALING
* IN THE SOFTWARE.
*/
package com.couchbase.client.core.message.binary;
/**
* Fetch a document from the cluster and return it if found.
*
* @author Michael Nitschinger
* @since 1.0
*/
public class GetRequest extends AbstractBinaryRequest {
/**
* Create a new {@link GetRequest}.
*
* @param key the key of the document.
* @param bucket the bucket of the document.
*/
public GetRequest(final String key, final String bucket) {
super(key, bucket, null);
}
}
| [
"michael@nitschinger.at"
] | michael@nitschinger.at |
3883571e2b88eef3d334135e9b7001dc8d0e8536 | 844ce61e1265ddacc83c767b1ae1936fe4f2edfe | /src/main/java/mhfc/net/common/util/parsing/exceptions/SyntaxErrorException.java | 207d1f58a40eefdcd37c5f4a1b758c0c8d2f9d66 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | ClaymanTwinkle/MHFC | 26e8955bdb98140591027cf32b56b6ab81871e53 | 738b7ffe2280b94fbebbd87b64f04d4eec701d12 | refs/heads/master | 2020-07-15T22:24:20.040638 | 2018-11-11T17:20:47 | 2018-11-11T17:20:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 498 | java | package mhfc.net.common.util.parsing.exceptions;
public class SyntaxErrorException extends IllegalArgumentException {
/**
*
*/
private static final long serialVersionUID = -6676150622443075182L;
public SyntaxErrorException() {
super();
}
public SyntaxErrorException(String message, Throwable cause) {
super(message, cause);
}
public SyntaxErrorException(String s) {
super(s);
}
public SyntaxErrorException(Throwable cause) {
super(cause);
}
}
| [
"jayrol_rante2006@yahoo.com"
] | jayrol_rante2006@yahoo.com |
1f506ad068993ddad1e68166f7a845bb18b95c85 | 955c4ee07d0a1835ba9fc453e7916afd0c132c7d | /src/senior/hrms/emps/dto/EmployeeContractsTrgParam.java | 409af9b9ee350384b5fb2e5a638c49ca3c5defa3 | [] | no_license | yahia-momtaz/HRMS | 7cdc7bb09521fdcf569fe42ed80e279790046e4f | 460f6c2d0b27dc95b58f0eb21b991360db915701 | refs/heads/master | 2021-01-13T08:13:54.656798 | 2016-10-23T12:41:59 | 2016-10-23T12:41:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 541 | java | /*
* This source file was generated by FireStorm/DAO.
*
* If you purchase a full license for FireStorm/DAO you can customize this header file.
*
* For more information please visit http://www.codefutures.com/products/firestorm
*/
package senior.hrms.emps.dto;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
public class EmployeeContractsTrgParam implements Serializable
{
/**
* Method 'EmployeeContractsTrgParam'
*
*/
public EmployeeContractsTrgParam()
{
}
}
| [
"Administrator@yahia-PC"
] | Administrator@yahia-PC |
0b33daa4adaa876c358f35767125b1ce2749f2a4 | 934eadecf67c2399f592f71adcd68107ab6bc227 | /src/test/java/org/apache/commons/io/ByteOrderMarkTestCase.java | c4a8683624dc18e8f9d747700c71f328dfce48a4 | [
"Apache-2.0"
] | permissive | sri-desai/Commons_IO_319 | 39d52693178eec372a4d93eb246bb9e23e718d0d | 745ff185ebdba38edabcdc3eca7a77f74359e58a | refs/heads/master | 2021-08-16T18:12:41.998972 | 2017-11-20T06:42:14 | 2017-11-20T06:42:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,820 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.io;
import java.nio.charset.Charset;
import java.util.Arrays;
import org.apache.commons.io.testtools.FileBasedTestCase;
/**
* Test for {@link ByteOrderMark}.
*
* @version $Id$
*/
public class ByteOrderMarkTestCase extends FileBasedTestCase {
private static final ByteOrderMark TEST_BOM_1 = new ByteOrderMark("test1", 1);
private static final ByteOrderMark TEST_BOM_2 = new ByteOrderMark("test2", 1, 2);
private static final ByteOrderMark TEST_BOM_3 = new ByteOrderMark("test3", 1, 2, 3);
public ByteOrderMarkTestCase(String name) {
super(name);
}
/** Test {@link ByteOrderMark#getCharsetName()} */
public void testCharsetName() {
assertEquals("test1 name", "test1", TEST_BOM_1.getCharsetName());
assertEquals("test2 name", "test2", TEST_BOM_2.getCharsetName());
assertEquals("test3 name", "test3", TEST_BOM_3.getCharsetName());
}
/** Tests that {@link ByteOrderMark#getCharsetName()} can be loaded as a {@link java.nio.charset.Charset} as advertised. */
public void testConstantCharsetNames() {
assertNotNull(Charset.forName(ByteOrderMark.UTF_8.getCharsetName()));
assertNotNull(Charset.forName(ByteOrderMark.UTF_16BE.getCharsetName()));
assertNotNull(Charset.forName(ByteOrderMark.UTF_16LE.getCharsetName()));
assertNotNull(Charset.forName(ByteOrderMark.UTF_32BE.getCharsetName()));
assertNotNull(Charset.forName(ByteOrderMark.UTF_32LE.getCharsetName()));
}
/** Test {@link ByteOrderMark#length()} */
public void testLength() {
assertEquals("test1 length", 1, TEST_BOM_1.length());
assertEquals("test2 length", 2, TEST_BOM_2.length());
assertEquals("test3 length", 3, TEST_BOM_3.length());
}
/** Test {@link ByteOrderMark#get(int)} */
public void testGet() {
assertEquals("test1 get(0)", 1, TEST_BOM_1.get(0));
assertEquals("test2 get(0)", 1, TEST_BOM_2.get(0));
assertEquals("test2 get(1)", 2, TEST_BOM_2.get(1));
assertEquals("test3 get(0)", 1, TEST_BOM_3.get(0));
assertEquals("test3 get(1)", 2, TEST_BOM_3.get(1));
assertEquals("test3 get(2)", 3, TEST_BOM_3.get(2));
}
/** Test {@link ByteOrderMark#getBytes()} */
public void testGetBytes() {
assertTrue("test1 bytes", Arrays.equals(TEST_BOM_1.getBytes(), new byte[] {(byte)1}));
assertTrue("test1 bytes", Arrays.equals(TEST_BOM_2.getBytes(), new byte[] {(byte)1, (byte)2}));
assertTrue("test1 bytes", Arrays.equals(TEST_BOM_3.getBytes(), new byte[] {(byte)1, (byte)2, (byte)3}));
}
/** Test {@link ByteOrderMark#equals(Object)} */
public void testEquals() {
assertTrue("test1 equals", TEST_BOM_1.equals(TEST_BOM_1));
assertTrue("test2 equals", TEST_BOM_2.equals(TEST_BOM_2));
assertTrue("test3 equals", TEST_BOM_3.equals(TEST_BOM_3));
assertFalse("Object not equal", TEST_BOM_1.equals(new Object()));
assertFalse("test1-1 not equal", TEST_BOM_1.equals(new ByteOrderMark("1a", 2)));
assertFalse("test1-2 not test2", TEST_BOM_1.equals(new ByteOrderMark("1b", 1, 2)));
assertFalse("test2 not equal", TEST_BOM_2.equals(new ByteOrderMark("2", 1, 1)));
assertFalse("test3 not equal", TEST_BOM_3.equals(new ByteOrderMark("3", 1, 2, 4)));
}
/** Test {@link ByteOrderMark#hashCode()} */
public void testHashCode() {
int bomClassHash = ByteOrderMark.class.hashCode();
assertEquals("hash test1 ", bomClassHash + 1, TEST_BOM_1.hashCode());
assertEquals("hash test2 ", bomClassHash + 3, TEST_BOM_2.hashCode());
assertEquals("hash test3 ", bomClassHash + 6, TEST_BOM_3.hashCode());
}
/** Test Erros */
public void testErrors() {
try {
new ByteOrderMark(null, 1,2,3);
fail("null charset name, expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
// expected
}
try {
new ByteOrderMark("", 1,2,3);
fail("no charset name, expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
// expected
}
try {
new ByteOrderMark("a", (int[])null);
fail("null bytes, expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
// expected
}
try {
new ByteOrderMark("b", new int[0]);
fail("empty bytes, expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
// expected
}
}
/** Test {@link ByteOrderMark#toString()} */
public void testToString() {
assertEquals("test1 ", "ByteOrderMark[test1: 0x1]", TEST_BOM_1.toString());
assertEquals("test2 ", "ByteOrderMark[test2: 0x1,0x2]", TEST_BOM_2.toString());
assertEquals("test3 ", "ByteOrderMark[test3: 0x1,0x2,0x3]", TEST_BOM_3.toString());
}
}
| [
"srinivas.desai491@gmail.com"
] | srinivas.desai491@gmail.com |
17ad72639c9c949f6775d127dde114fea1dee3d4 | 4eeb8cd4d2299f05d15cf6cb5ffdb28443d23b79 | /server/src/main/java/com/cezarykluczynski/stapi/server/trading_card_deck/endpoint/TradingCardDeckSoapEndpoint.java | f5d6ee9d1e9ddcd9a0c8c4496724c11e35897cf7 | [
"MIT"
] | permissive | jwcastillo/stapi | b546cb7d86dcafb3b7b4944e6874abee0c8392bd | 6e6549daa632c15e7cbcae34b5fa1ee0f1c9a68e | refs/heads/master | 2021-07-05T00:38:48.176347 | 2017-09-28T17:58:58 | 2017-09-28T17:58:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,650 | java | package com.cezarykluczynski.stapi.server.trading_card_deck.endpoint;
import com.cezarykluczynski.stapi.client.v1.soap.TradingCardDeckBaseRequest;
import com.cezarykluczynski.stapi.client.v1.soap.TradingCardDeckBaseResponse;
import com.cezarykluczynski.stapi.client.v1.soap.TradingCardDeckFullRequest;
import com.cezarykluczynski.stapi.client.v1.soap.TradingCardDeckFullResponse;
import com.cezarykluczynski.stapi.client.v1.soap.TradingCardDeckPortType;
import com.cezarykluczynski.stapi.server.trading_card_deck.reader.TradingCardDeckSoapReader;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
import javax.jws.WebParam;
@Service
public class TradingCardDeckSoapEndpoint implements TradingCardDeckPortType {
public static final String ADDRESS = "/v1/soap/tradingCardDeck";
private final TradingCardDeckSoapReader tradingCardDeckSoapReader;
@Inject
public TradingCardDeckSoapEndpoint(TradingCardDeckSoapReader tradingCardDeckSoapReader) {
this.tradingCardDeckSoapReader = tradingCardDeckSoapReader;
}
@Override
public TradingCardDeckBaseResponse getTradingCardDeckBase(@WebParam(partName = "request", name = "TradingCardDeckBaseRequest",
targetNamespace = "http://stapi.co/api/v1/soap/tradingCardDeck") TradingCardDeckBaseRequest request) {
return tradingCardDeckSoapReader.readBase(request);
}
@Override
public TradingCardDeckFullResponse getTradingCardDeckFull(@WebParam(partName = "request", name = "TradingCardDeckFullRequest",
targetNamespace = "http://stapi.co/api/v1/soap/tradingCardDeck") TradingCardDeckFullRequest request) {
return tradingCardDeckSoapReader.readFull(request);
}
}
| [
"cezary.kluczynski@gmail.com"
] | cezary.kluczynski@gmail.com |
6cd04d2be985638e705b3251ad5035f624af2950 | 8a8254c83cc2ec2c401f9820f78892cf5ff41384 | /baseline/AntennaPod/app/src/main/java/baseline/de/danoeh/antennapod/dialog/AuthenticationDialog.java | b6b5c76eb92e25a1866906cf3e102fc1c4f9c6c6 | [
"MIT"
] | permissive | VU-Thesis-2019-2020-Wesley-Shann/subjects | 46884bc6f0f9621be2ab3c4b05629e3f6d3364a0 | 14a6d6bb9740232e99e7c20f0ba4ddde3e54ad88 | refs/heads/master | 2022-12-03T05:52:23.309727 | 2020-08-19T12:18:54 | 2020-08-19T12:18:54 | 261,718,101 | 0 | 0 | null | 2020-07-11T12:19:07 | 2020-05-06T09:54:05 | Java | UTF-8 | Java | false | false | 2,926 | java | package baseline.de.danoeh.antennapod.dialog;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import baseline.de.danoeh.antennapod.R;
/**
* Displays a dialog with a username and password text field and an optional checkbox to save username and preferences.
*/
public abstract class AuthenticationDialog extends Dialog {
private final int titleRes;
private final boolean enableUsernameField;
private final boolean showSaveCredentialsCheckbox;
private final String usernameInitialValue;
private final String passwordInitialValue;
public AuthenticationDialog(Context context, int titleRes, boolean enableUsernameField, boolean showSaveCredentialsCheckbox, String usernameInitialValue, String passwordInitialValue) {
super(context);
this.titleRes = titleRes;
this.enableUsernameField = enableUsernameField;
this.showSaveCredentialsCheckbox = showSaveCredentialsCheckbox;
this.usernameInitialValue = usernameInitialValue;
this.passwordInitialValue = passwordInitialValue;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.authentication_dialog);
final EditText etxtUsername = findViewById(R.id.etxtUsername);
final EditText etxtPassword = findViewById(R.id.etxtPassword);
final CheckBox saveUsernamePassword = findViewById(R.id.chkSaveUsernamePassword);
final Button butConfirm = findViewById(R.id.butConfirm);
final Button butCancel = findViewById(R.id.butCancel);
if (titleRes != 0) {
setTitle(titleRes);
} else {
requestWindowFeature(Window.FEATURE_NO_TITLE);
}
etxtUsername.setEnabled(enableUsernameField);
if (showSaveCredentialsCheckbox) {
saveUsernamePassword.setVisibility(View.VISIBLE);
} else {
saveUsernamePassword.setVisibility(View.GONE);
}
if (usernameInitialValue != null) {
etxtUsername.setText(usernameInitialValue);
}
if (passwordInitialValue != null) {
etxtPassword.setText(passwordInitialValue);
}
setOnCancelListener(dialog -> onCancelled());
butCancel.setOnClickListener(v -> cancel());
butConfirm.setOnClickListener(v -> {
onConfirmed(etxtUsername.getText().toString(),
etxtPassword.getText().toString(),
showSaveCredentialsCheckbox && saveUsernamePassword.isChecked());
dismiss();
});
}
protected void onCancelled() {
}
protected abstract void onConfirmed(String username, String password, boolean saveUsernamePassword);
}
| [
"sshann95@outlook.com"
] | sshann95@outlook.com |
76c236f9a9b13841e0e985ece167d334475dab1a | c474b03758be154e43758220e47b3403eb7fc1fc | /apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/java8/util/stream/ReferencePipeline$9$1$$Lambda$1.java | 9cb66f9c19351d34b30d119ef25c16ac3d89576b | [] | no_license | EstebanDalelR/tinderAnalysis | f80fe1f43b3b9dba283b5db1781189a0dd592c24 | 941e2c634c40e5dbf5585c6876ef33f2a578b65c | refs/heads/master | 2020-04-04T09:03:32.659099 | 2018-11-23T20:41:28 | 2018-11-23T20:41:28 | 155,805,042 | 0 | 0 | null | 2018-11-18T16:02:45 | 2018-11-02T02:44:34 | null | UTF-8 | Java | false | false | 532 | java | package java8.util.stream;
import java8.util.function.DoubleConsumer;
final /* synthetic */ class ReferencePipeline$9$1$$Lambda$1 implements DoubleConsumer {
/* renamed from: a */
private final Sink f54632a;
private ReferencePipeline$9$1$$Lambda$1(Sink sink) {
this.f54632a = sink;
}
/* renamed from: a */
public static DoubleConsumer m64062a(Sink sink) {
return new ReferencePipeline$9$1$$Lambda$1(sink);
}
public void accept(double d) {
this.f54632a.accept(d);
}
}
| [
"jdguzmans@hotmail.com"
] | jdguzmans@hotmail.com |
909df3a68b28125e4299a18844ea78fd9b17bace | 8ef5dba87266ec527514fe14a79e23f10bd02a6e | /didn't work/TawseelReallyClone/app/src/main/java/com/google/android/gms/internal/zzabh.java | 01adb2260d45a8e1611c2b2ba3941160222177ac | [] | no_license | ahmedmgh67/What-s-Fatora | 4cfff6ae6c5b41f4b8fc23068d219f63251854ff | 53c90a17542ecca1fe267816219d9f0c78471c92 | refs/heads/master | 2020-04-28T06:14:33.730056 | 2019-02-15T21:41:28 | 2019-02-15T21:41:28 | 175,049,535 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,289 | java | package com.google.android.gms.internal;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.common.api.PendingResult.zza;
import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.api.ResultCallback;
import com.google.android.gms.common.api.ResultTransform;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.api.TransformedResult;
import com.google.android.gms.common.internal.zzac;
import java.util.concurrent.TimeUnit;
public class zzabh<R extends Result>
extends PendingResult<R>
{
private final Status zzahq;
public zzabh(Status paramStatus)
{
zzac.zzb(paramStatus, "Status must not be null");
if (!paramStatus.isSuccess()) {}
for (boolean bool = true;; bool = false)
{
zzac.zzb(bool, "Status must not be success");
this.zzahq = paramStatus;
return;
}
}
@NonNull
public R await()
{
throw new UnsupportedOperationException("Operation not supported on PendingResults generated by ResultTransform.createFailedResult()");
}
@NonNull
public R await(long paramLong, @NonNull TimeUnit paramTimeUnit)
{
throw new UnsupportedOperationException("Operation not supported on PendingResults generated by ResultTransform.createFailedResult()");
}
public void cancel()
{
throw new UnsupportedOperationException("Operation not supported on PendingResults generated by ResultTransform.createFailedResult()");
}
@NonNull
Status getStatus()
{
return this.zzahq;
}
public boolean isCanceled()
{
throw new UnsupportedOperationException("Operation not supported on PendingResults generated by ResultTransform.createFailedResult()");
}
public void setResultCallback(@NonNull ResultCallback<? super R> paramResultCallback)
{
throw new UnsupportedOperationException("Operation not supported on PendingResults generated by ResultTransform.createFailedResult()");
}
public void setResultCallback(@NonNull ResultCallback<? super R> paramResultCallback, long paramLong, @NonNull TimeUnit paramTimeUnit)
{
throw new UnsupportedOperationException("Operation not supported on PendingResults generated by ResultTransform.createFailedResult()");
}
@NonNull
public <S extends Result> TransformedResult<S> then(@NonNull ResultTransform<? super R, ? extends S> paramResultTransform)
{
throw new UnsupportedOperationException("Operation not supported on PendingResults generated by ResultTransform.createFailedResult()");
}
public void zza(@NonNull PendingResult.zza paramzza)
{
throw new UnsupportedOperationException("Operation not supported on PendingResults generated by ResultTransform.createFailedResult()");
}
@Nullable
public Integer zzuR()
{
throw new UnsupportedOperationException("Operation not supported on PendingResults generated by ResultTransform.createFailedResult()");
}
}
/* Location: H:\As A Bussines Man\confedince\App Dev Department\What's Fatora\Tawseel APK\Client\dex2jar-2.0\t-dex2jar.jar!\com\google\android\gms\internal\zzabh.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"ahmedmgh67@gmail.com"
] | ahmedmgh67@gmail.com |
4a179fed96c0fc7adc9d752e9ea77eda50ad3d8d | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.unifiedtelemetry-UnifiedTelemetry/sources/X/AnonymousClass8g.java | 37a65fcf3894bb2c024a7a639bc3d5ccd80a9179 | [] | no_license | phwd/quest-tracker | 286e605644fc05f00f4904e51f73d77444a78003 | 3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba | refs/heads/main | 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null | UTF-8 | Java | false | false | 2,095 | java | package X;
import android.content.Context;
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Set;
/* renamed from: X.8g reason: invalid class name */
public abstract class AnonymousClass8g extends AbstractC0096Hu {
@Override // X.AbstractC0247Xu
public abstract AbstractC0247Xu getApplicationInjector();
@Override // X.QD
public abstract <T> T getInstance(C0475qE<T> qEVar, Context context);
@Override // X.QD
public abstract <T> AbstractC0246Xt<T> getLazy(C0475qE<T> qEVar, Context context);
@Override // X.QD
public abstract <T> eJ<T> getProvider(C0475qE<T> qEVar, Context context);
@Override // X.QD
public final <T> AbstractC0246Xt<List<T>> getLazyList(C0475qE<T> qEVar, Context context) {
return getLazy(AbstractC0096Hu.A00(qEVar), context);
}
@Override // X.QD
public final <T> AbstractC0246Xt<Set<T>> getLazySet(C0475qE<T> qEVar, Context context) {
return getLazy(AbstractC0096Hu.A01(qEVar), context);
}
@Override // X.QD
public final <T> List<T> getList(C0475qE<T> qEVar, Context context) {
return (List) getInstance(AbstractC0096Hu.A00(qEVar), context);
}
@Override // X.QD
public final <T> eJ<List<T>> getListProvider(C0475qE<T> qEVar, Context context) {
return getProvider(AbstractC0096Hu.A00(qEVar), context);
}
@Override // X.QD
public final <T> Set<T> getSet(C0475qE<T> qEVar, Context context) {
return (Set) getInstance(AbstractC0096Hu.A01(qEVar), context);
}
@Override // X.QD
public final <T> eJ<Set<T>> getSetProvider(C0475qE<T> qEVar, Context context) {
return getProvider(AbstractC0096Hu.A01(qEVar), context);
}
@Override // X.QD
public final <T> T getInstance(Class<T> cls, Context context) {
return (T) getInstance(new C0475qE<>(cls, Rp.INSTANCE), context);
}
@Override // X.QD
public final <T> T getInstance(Class<T> cls, Class<? extends Annotation> cls2, Context context) {
return (T) getInstance(C0475qE.A01(cls, cls2), context);
}
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
a10df2ff2d030c5e56aa0ea0e79d3f2e5355b011 | 41f10481b60277d7f0db1018e7bcee3be550643c | /16KanYe/MyCrashTest/app/src/main/java/com/shixing/mycrashtest/crashhandler/MyCrashHandler.java | b24804654d58f81d2372add42a356b6c8e6ef733 | [] | no_license | shixinga/android_art | f39d2c2381f3b613881aedbab8a6131891907ec7 | b687f70b1bd278479f7d3dc29ebfe9693cc3e17c | refs/heads/master | 2021-09-23T17:58:42.315263 | 2018-09-26T05:18:48 | 2018-09-26T05:18:48 | 108,531,733 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,695 | java | package com.shixing.mycrashtest.crashhandler;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Debug;
import android.os.Environment;
import android.os.Process;
import android.util.Log;
import com.shixing.mycrashtest.MainActivity;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.file.Path;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by shixing on 2017/11/25.
*/
public class MyCrashHandler implements Thread.UncaughtExceptionHandler {
public static final boolean DEBUG = true;
public static final String PATH = Environment.getExternalStorageDirectory() + "/CrashTestMe/crashdir/";
public static final String FILE_NAME = "crash";
public static final String FILE_NAME_SUFFIX = ".trace";
private Context mContext;
private Thread.UncaughtExceptionHandler mDefaultUncaughtExceptionHandler;
private static MyCrashHandler sInstance = new MyCrashHandler();
private MyCrashHandler() {
}
public static MyCrashHandler getInstance() {
return sInstance;
}
public void init(Context context) {
mContext = context;
mDefaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(this);
}
@Override
public void uncaughtException(Thread thread, Throwable throwable) {
//把crash信息写到SDCard上
try {
dumpExceptionInfoToSDCard(thread, throwable);
uploadExceptionToServer(throwable);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
//上传crash信息到服务器
//if系统有默认处理异常的handler,就让信息处理,else我们自己把进程杀了!!!
if (mDefaultUncaughtExceptionHandler != null) {
mDefaultUncaughtExceptionHandler.uncaughtException(thread, throwable);
} else {
Process.killProcess(Process.myPid());
}
}
private void dumpExceptionInfoToSDCard(Thread thread, Throwable throwable) throws PackageManager.NameNotFoundException {
Log.d(MainActivity.TAG, "dumpExceptionInfoToSDCard: thread=" + thread.getName()
+ " currentThread()=" +Thread.currentThread().getName());
//SD卡不可读写
if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
if (DEBUG) {
Log.d(MainActivity.TAG, "dumpExceptionInfoToSDCard: sdCard can't read or write");
return;
}
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String currentTime = sdf.format(new Date());
File crashDir = new File(PATH);
if (!crashDir.exists()) {
crashDir.mkdirs();
}
Log.d(MainActivity.TAG, "dumpExceptionInfoToSDCard: "+PATH + FILE_NAME + currentTime + FILE_NAME_SUFFIX);
File crashFile = new File(PATH + FILE_NAME + currentTime + FILE_NAME_SUFFIX);
PrintWriter pw = null;
try {
pw = new PrintWriter(new BufferedWriter(new FileWriter(crashFile)));
pw.println(currentTime);
dumpSomePhoneInformation(pw);
pw.println();
throwable.printStackTrace(pw);
} catch (IOException e) {
e.printStackTrace();
Log.d(MainActivity.TAG, "dumpExceptionInfoToSDCard: dump crashfile failed!");
} finally {
if (pw != null) {
pw.close();
}
}
}
private void dumpSomePhoneInformation(PrintWriter pw) throws PackageManager.NameNotFoundException {
PackageManager pm = mContext.getPackageManager();
PackageInfo pi = pm.getPackageInfo(mContext.getPackageName(), PackageManager.GET_ACTIVITIES);
pw.print("app version name:");
pw.println(pi.versionName);
pw.print("app version code:");
pw.println(pi.versionCode);
//android版本号
pw.print("OS version:");
pw.println(Build.VERSION.RELEASE);
pw.print("SDK ersion:");
pw.println(Build.VERSION.SDK_INT);
//手机制造商
pw.print("vendor:");
pw.println(Build.MANUFACTURER);
//手机型号
pw.print("model:");
pw.println(Build.MODEL);
//CPU架构
pw.print("CPU ABI:");
pw.println(Build.CPU_ABI);
}
private void uploadExceptionToServer(Throwable throwable) {
}
}
| [
"2677950307@qq.com"
] | 2677950307@qq.com |
c793d74c0039669945b0ec4d77cd2f4a81e78b27 | 305e64233c32670c3b8522854142d59fe9c80167 | /baek/baek16719.java | 8074d04433d392ad37cdbf3831f77b8d2f99fa36 | [] | no_license | Kastori1206/algo | 144f7708ecd653c01a2c98d83d0406a90390ace8 | ea937ae3e4def01f7949c11254035a33f6aae6bb | refs/heads/master | 2023-01-08T11:11:24.155073 | 2022-12-28T04:41:45 | 2022-12-28T04:41:45 | 239,990,626 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,078 | java | package baek;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/**
* ZOAC
* https://www.acmicpc.net/problem/16719
*/
public class baek16719 {
static String str;
static boolean[] visited;
static StringBuilder sb;
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
sb = new StringBuilder();
str = br.readLine();
visited = new boolean[str.length()];
dfs(0, str.length() - 1);
System.out.println(sb);
}
static void dfs(int s, int e) {
if (s > e) {
return;
}
int idx = s;
for (int i = s; i <= e; i++) {
if (str.charAt(idx) > str.charAt(i)) {
idx = i;
}
}
visited[idx] = true;
for (int i = 0; i < str.length(); i++) {
if (visited[i]) {
sb.append(str.charAt(i));
}
}
sb.append('\n');
dfs(idx + 1, e);
dfs(s, idx - 1);
}
}
| [
"kastori1990@gmail.com"
] | kastori1990@gmail.com |
5de58e03ab5cbc1fabf0774c50b025c252d01d91 | dd978e493e9d700085b46f2b8d84d01067c05c76 | /src/main/java/org/nuxeo/ecm/platform/template/processors/jxls/JXLSBindingResolver.java | 6e5d2cbd6aeaa937dcff7aeec8bd746df460de3d | [] | no_license | amtech/nuxeo-platform-rendering-templates | f097f0e70128ff501f3e51c7c5116056d75ab226 | ff873fababb1bcf4c3895f349acf06aa54d81b3d | refs/heads/master | 2020-04-09T06:56:15.831386 | 2012-04-06T13:53:25 | 2012-04-06T13:53:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 784 | java | package org.nuxeo.ecm.platform.template.processors.jxls;
import org.nuxeo.ecm.core.api.Blob;
import org.nuxeo.ecm.platform.template.processors.AbstractBindingResolver;
public class JXLSBindingResolver extends AbstractBindingResolver {
@Override
protected Object handleLoop(String paramName, Object value) {
return value;
}
@Override
protected Object handlePictureField(String paramName, Blob blobValue) {
// TODO Auto-generated method stub
return null;
}
@Override
protected void handleBlobField(String paramName, Blob blobValue) {
// TODO Auto-generated method stub
}
@Override
protected void handleHtmlField(String paramName, String htmlValue) {
// TODO Auto-generated method stub
}
}
| [
"tdelprat@nuxeo.com"
] | tdelprat@nuxeo.com |
5ba871e8c3e5714179669107e2812537680b22d7 | d9e78246af5911628bd85fe705f8b9ea28a12408 | /src/main/java/com/note/base/netty/netty/pb/PbTest.java | 91533ce15cb003e9331636c2ef1265b14284e4be | [] | no_license | thinkal01/note02 | c2775d9c72f8f65a2bf771d5ec8606a4628e1bca | 33583112b1f52a3f49d61931a4f2f3189690dd61 | refs/heads/master | 2022-12-22T11:01:51.290414 | 2020-03-16T11:25:06 | 2020-03-16T11:25:06 | 164,791,160 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,196 | java | package com.note.base.netty.netty.pb;
import com.note.base.netty.netty.pb.protocol.EmailProbuf;
import com.note.base.netty.netty.pb.protocol.UserProbuf;
import com.note.base.netty.netty.user.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
// @ContextConfiguration(locations = "classpath:netty/applicationContext.xml")
// @RunWith(SpringJUnit4ClassRunner.class)
public class PbTest {
@Test
public void testAddUser() throws Exception {
UserService userService = new UserService();
UserProbuf.User user = userService.save();
System.out.println(user.getPhone());
}
@Test
public void getEmailByUser() throws Exception {
UserService userService = new UserService();
EmailProbuf.Email email = userService.getEmail();
System.out.println(email.getContent());
}
@Test
public void test02() {
ApplicationContext ctx = new ClassPathXmlApplicationContext("netty/applicationContext.xml");
String applicationName = ctx.getApplicationName();
System.out.println(applicationName);
}
}
| [
"875535828@qq.com"
] | 875535828@qq.com |
6706b6443c54508e25ab39ed198b94864dc4a77c | 7f69e2b6ec47fdfd7088f63eda64c80d9f1f1b0f | /Web2SMS_Reporting-Parent/Web2SMS_Reporting_Utils/src/main/java/com/edafa/web2sms/utils/configs/interfaces/ReportingConfigsManagerService.java | ce70f352fb986d5d7e5ccd326de54248aa92a7d9 | [] | no_license | MahmoudFouadMohamed/WEB2SMS | 53246564d5c0098737222aa602955238e60338c2 | 1693b5a1749a7f1ebfa0fc4d15d1e3117759efc9 | refs/heads/master | 2020-05-17T01:49:23.308128 | 2019-04-25T19:37:06 | 2019-04-25T19:37:06 | 183,435,780 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,020 | java | package com.edafa.web2sms.utils.configs.interfaces;
import java.util.List;
import javax.ejb.Local;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import com.edafa.web2sms.utils.configs.exception.FailedToReadConfigsException;
import com.edafa.web2sms.utils.configs.exception.FailedToSaveConfigsException;
import com.edafa.web2sms.utils.configs.exception.InvalidConfigsException;
import com.edafa.web2sms.utils.configs.model.ModuleConfigs;
@WebService(name = "ReportingConfigsManagerService", portName = "ReportingConfigsManagerServicePort", targetNamespace = "http://www.edafa.com/ws/utils/configs")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
//@SchemaValidation
@Local
public interface ReportingConfigsManagerService {
@WebMethod(operationName = "getModules")
@WebResult(name = "Modules", partName = "modules")
public List<String> getModules();
@WebMethod(operationName = "readConfigs")
@WebResult(name = "ModuleConfigs", partName = "moduleConfigs")
public List<ModuleConfigs> readConfigs() throws FailedToReadConfigsException;
@WebMethod(operationName = "readModuleConfigs")
@WebResult(name = "ModuleConfigs", partName = "moduleConfigs")
public ModuleConfigs readModuleConfigs(@WebParam(name = "Module", partName = "module") String module)
throws FailedToReadConfigsException;
@WebMethod(operationName = "refreshModuleConfigs")
public void refreshModuleConfigs(@WebParam(name = "Module", partName = "module") String module)
throws FailedToReadConfigsException, InvalidConfigsException;
@WebMethod(operationName = "refreshAllModuleConfigs")
public void refreshAllModuleConfigs() throws FailedToReadConfigsException, InvalidConfigsException;
@WebMethod(operationName = "saveConfigs")
public void saveConfigs(@WebParam(name = "ModuleConfigs", partName = "moduleConfigs") ModuleConfigs moduleConfigs)
throws FailedToSaveConfigsException, InvalidConfigsException;
}
| [
"mahmoud.fouad@edafa.com"
] | mahmoud.fouad@edafa.com |
8de92f4d8bdf50b190f8478e65de8da3b9446828 | bc283b9069e01ede980cc2fcf63fc846b10f56f3 | /Sx4/src/main/java/com/sx4/bot/events/ServerLogEvents.java | 483f4760eb37064fee5d2f973548f42df53554bf | [
"MIT"
] | permissive | TheoS02/Sx4 | 06104a75f4796aa92fc92c0f8d251b43c45f923d | e28081aa810f236c75519612d67e5320bebd88a5 | refs/heads/master | 2023-03-17T20:48:24.941119 | 2021-03-06T15:02:42 | 2021-03-06T15:02:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,472 | java | package com.sx4.bot.events;
import java.util.List;
import java.time.Duration;
import java.time.Instant;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;
import java.util.concurrent.TimeUnit;
import com.sx4.bot.core.Sx4Bot;
import com.sx4.bot.settings.Settings;
import com.sx4.bot.utils.ModUtils;
import com.sx4.bot.utils.TimeUtils;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.audit.ActionType;
import net.dv8tion.jda.api.audit.AuditLogEntry;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.events.guild.GuildJoinEvent;
import net.dv8tion.jda.api.events.guild.GuildLeaveEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import net.dv8tion.jda.api.sharding.ShardManager;
public class ServerLogEvents extends ListenerAdapter {
private int latestMilestone = 0;
private final int perMilestone = 100;
public void onGuildJoin(GuildJoinEvent event) {
ShardManager shardManager = Sx4Bot.getShardManager();
Guild supportServer = shardManager.getGuildById(Settings.SUPPORT_SERVER_ID);
EmbedBuilder embed = new EmbedBuilder();
embed.setColor(Settings.COLOR_GREEN);
embed.setThumbnail(event.getGuild().getIconUrl());
embed.setTimestamp(Instant.now());
embed.setDescription(String.format("I am now in %,d servers and connected to %,d users", shardManager.getGuilds().size(), shardManager.getUsers().size()));
embed.setAuthor("Joined Server!", null, event.getJDA().getSelfUser().getEffectiveAvatarUrl());
embed.addField("Server Name", event.getGuild().getName(), true);
embed.addField("Server ID", event.getGuild().getId(), true);
embed.addField("Server Owner", event.getGuild().getOwner().getUser().getAsTag() + "\n" + event.getGuild().getOwnerId(), true);
embed.addField("Server Members", String.format("%,d member%s", event.getGuild().getMembers().size(), event.getGuild().getMembers().size() == 1 ? "" : "s"), true);
supportServer.getTextChannelById(Settings.SERVER_LOGS_ID).sendMessage(embed.build()).queue();
if (event.getGuild().getSelfMember().hasPermission(Permission.VIEW_AUDIT_LOGS)) {
event.getGuild().retrieveAuditLogs().type(ActionType.BOT_ADD).queueAfter(500, TimeUnit.MILLISECONDS, audits -> {
AuditLogEntry audit = audits.stream()
.filter(auditLog -> auditLog.getTargetIdLong() == event.getJDA().getSelfUser().getIdLong())
.filter(auditLog -> Duration.between(auditLog.getTimeCreated(), ZonedDateTime.now(ZoneOffset.UTC)).toSeconds() <= 5)
.findFirst()
.orElse(null);
if (audit != null) {
audit.getUser().openPrivateChannel().queue(channel -> {
List<String> prefixes = ModUtils.getPrefixes(null, audit.getUser());
channel.sendMessageFormat("Thanks for adding me to your server!\nYour prefix%s `%s`\nAll my info and commands can be found in `%shelp`\nIf you need any help feel free to join the support server: https://discord.gg/PqJNcfB", prefixes.size() == 1 ? " is" : "es are", String.join("`, `", prefixes), prefixes.get(0)).queue();
});
}
});
}
if (this.latestMilestone == 0) {
this.latestMilestone = (int) Math.floor((double) shardManager.getGuilds().size() / this.perMilestone) * this.perMilestone;
}
if (shardManager.getGuilds().size() % this.perMilestone == 0) {
supportServer.getTextChannelById(Settings.MILESTONES_CHANNEL_ID).sendMessage(String.format("%,d servers :tada:", shardManager.getGuilds().size())).queue();
this.latestMilestone = shardManager.getGuilds().size();
}
}
public void onGuildLeave(GuildLeaveEvent event) {
ShardManager shardManager = Sx4Bot.getShardManager();
Guild supportServer = shardManager.getGuildById(Settings.SUPPORT_SERVER_ID);
EmbedBuilder embed = new EmbedBuilder();
embed.setColor(Settings.COLOR_RED);
embed.setThumbnail(event.getGuild().getIconUrl());
embed.setTimestamp(Instant.now());
embed.setDescription(String.format("I am now in %,d servers and connected to %,d users", shardManager.getGuilds().size(), shardManager.getUsers().size()));
embed.setAuthor("Left Server!", null, event.getJDA().getSelfUser().getEffectiveAvatarUrl());
embed.addField("Server Name", event.getGuild().getName(), true);
embed.addField("Server ID", event.getGuild().getId(), true);
embed.addField("Server Owner", event.getGuild().getOwner().getUser().getAsTag() + "\n" + event.getGuild().getOwnerId(), true);
embed.addField("Server Members", String.format("%,d member%s", event.getGuild().getMembers().size(), event.getGuild().getMembers().size() == 1 ? "" : "s"), true);
embed.addField("Stayed for", TimeUtils.toTimeString(Duration.between(event.getGuild().getSelfMember().getTimeJoined(), ZonedDateTime.now(ZoneOffset.UTC)).toSeconds(), ChronoUnit.SECONDS), false);
supportServer.getTextChannelById(Settings.SERVER_LOGS_ID).sendMessage(embed.build()).queue();
if (this.latestMilestone == 0) {
this.latestMilestone = (int) Math.floor((double) shardManager.getGuilds().size() / this.perMilestone) * this.perMilestone;
}
if (shardManager.getGuilds().size() < this.latestMilestone) {
supportServer.getTextChannelById(Settings.MILESTONES_CHANNEL_ID).getHistory().retrievePast(1).queue(messages -> {
messages.get(0).delete().queue();
});
this.latestMilestone -= this.perMilestone;
}
}
}
| [
"sc4gaming@gmail.com"
] | sc4gaming@gmail.com |
d51c7f356028769ce17c735bc023efa8d960d87c | 9f1c65d3a3a203a9ec9e663c22e47910afb2defb | /common.war/src/com/wiiy/park/dao/ParkDao.java | f6b45af04bb19db94431c52b4a68f5540bcafc43 | [] | no_license | qiandonghf/wiiy_work | 0bbcd56088134a6495cbbc9f133bd85049e0bd2a | 157a8c5449566b8bcfa4c007974a0aa286c2981e | refs/heads/master | 2020-06-01T10:11:26.696646 | 2015-05-07T01:46:12 | 2015-05-07T01:46:12 | 35,191,422 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 176 | java | package com.wiiy.park.dao;
import com.wiiy.hibernate.BaseDao;
import com.wiiy.park.entity.Park;
/**
* @author my
*/
public class ParkDao extends BaseDao<Park>{
} | [
"811208477@qq.com"
] | 811208477@qq.com |
a0177b56b3f9af4a7f14ca1569c5dcbae586cfb6 | f12b5e4b5a3defb517390d32ccb5bd8ee45b3bf0 | /cherry/src/main/java/com/youi/core/servlet/ServletFilter.java | 2e508c22b7f188b9804aee454a103f409af8d986 | [] | no_license | qq57694878/code | bbea5866b93c1c3a9a1e3f3593ad0d594d8aa177 | 24703f5da3cfb8fc82a3bccdece7798f178c3b99 | refs/heads/master | 2020-12-02T08:08:47.434437 | 2017-07-10T13:41:26 | 2017-07-10T13:41:30 | 96,774,251 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,688 | java | package com.youi.core.servlet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.PathMatcher;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class ServletFilter extends ProxyFilter {
private static Logger logger = LoggerFactory.getLogger(ServletFilter.class);
private Map<String, Servlet> servletMap = Collections.EMPTY_MAP;
private PathMatcher pathMatcher = new AntPathMatcher();
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse res = (HttpServletResponse) response;
String contextPath = req.getContextPath();
String requestUri = req.getRequestURI();
String path = requestUri.substring(contextPath.length());
logger.trace("path : {}", path);
for (Map.Entry<String, Servlet> entry : servletMap
.entrySet()) {
if (isNeedFilter(entry.getKey(),path)) {
logger.trace("{} match {}", entry.getKey(), path);
/*PathHttpServletRequestWrapper requestWrapper = new PathHttpServletRequestWrapper(
req, entry.getKey());*/
Servlet servlet = entry.getValue();
logger.trace("invoke {}", servlet);
//servlet.service(requestWrapper, response);
servlet.service(request,response);
return;
}
}
filterChain.doFilter(request, response);
}
private boolean isNeedFilter(String pattern, String path) {
if (pathMatcher.match(pattern, path)) {
return true;
}
return false;
}
public void init(FilterConfig filterConfig) throws ServletException {
for (Map.Entry<String, Servlet> entry : servletMap
.entrySet()) {
Servlet servlet = entry.getValue();
servlet.init(new ProxyServletConfig(filterConfig
.getServletContext()));
}
}
public void destroy() {
for (Map.Entry<String, Servlet> entry : servletMap
.entrySet()) {
Servlet servlet = entry.getValue();
servlet.destroy();
}
}
public void setServletMap(Map<String, Servlet> servletMap) {
this.servletMap = servletMap;
}
}
| [
"57694878@qq.com"
] | 57694878@qq.com |
5a553d15a471113a5e2716299cdc2b815895a917 | c54979cd1e8b971cf0416a8fcf72b8b1cf72573f | /src/main/java/com/brain/service/mapper/UserMapper.java | b884cb653f386073358e097372b7612168f4df9a | [] | no_license | BulkSecurityGeneratorProject/fisc | d1c743eb3c99dd9f1c879f4d6494c8cd10819206 | 80598bca9d2b37e52c40fd7d947d7376a0458715 | refs/heads/master | 2022-12-18T16:24:36.539662 | 2019-08-21T15:35:12 | 2019-08-21T15:35:12 | 296,603,894 | 0 | 0 | null | 2020-09-18T11:39:30 | 2020-09-18T11:39:29 | null | UTF-8 | Java | false | false | 2,433 | java | package com.brain.service.mapper;
import com.brain.domain.Authority;
import com.brain.domain.User;
import com.brain.service.dto.UserDTO;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
/**
* Mapper for the entity {@link User} and its DTO called {@link UserDTO}.
*
* Normal mappers are generated using MapStruct, this one is hand-coded as MapStruct
* support is still in beta, and requires a manual step with an IDE.
*/
@Service
public class UserMapper {
public List<UserDTO> usersToUserDTOs(List<User> users) {
return users.stream()
.filter(Objects::nonNull)
.map(this::userToUserDTO)
.collect(Collectors.toList());
}
public UserDTO userToUserDTO(User user) {
return new UserDTO(user);
}
public List<User> userDTOsToUsers(List<UserDTO> userDTOs) {
return userDTOs.stream()
.filter(Objects::nonNull)
.map(this::userDTOToUser)
.collect(Collectors.toList());
}
public User userDTOToUser(UserDTO userDTO) {
if (userDTO == null) {
return null;
} else {
User user = new User();
user.setId(userDTO.getId());
user.setLogin(userDTO.getLogin());
user.setFirstName(userDTO.getFirstName());
user.setLastName(userDTO.getLastName());
user.setEmail(userDTO.getEmail());
user.setImageUrl(userDTO.getImageUrl());
user.setActivated(userDTO.isActivated());
user.setLangKey(userDTO.getLangKey());
Set<Authority> authorities = this.authoritiesFromStrings(userDTO.getAuthorities());
user.setAuthorities(authorities);
return user;
}
}
private Set<Authority> authoritiesFromStrings(Set<String> authoritiesAsString) {
Set<Authority> authorities = new HashSet<>();
if(authoritiesAsString != null){
authorities = authoritiesAsString.stream().map(string -> {
Authority auth = new Authority();
auth.setName(string);
return auth;
}).collect(Collectors.toSet());
}
return authorities;
}
public User userFromId(Long id) {
if (id == null) {
return null;
}
User user = new User();
user.setId(id);
return user;
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
31b94d8abc5b872a2ef89e581f3150cb79041ea2 | 3171f8d20b105bb4a884ebd541c9987ce21c569e | /app/ems-equipmentinfo/src/main/java/cn/suntak/ems/completioncheck/dao/CompletionCheckDao.java | 84a3b9d6421ff17765306e78372149972fb0327f | [] | no_license | linpeiqin/suntak | d6726a690e5f4d5bfb3508bd9d8627d3f6b485cd | 6ca83f93fe9a852ad28c7ce81a16d620b316868e | refs/heads/master | 2021-01-21T20:49:38.698729 | 2017-05-24T11:19:57 | 2017-05-24T11:19:57 | 92,284,730 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 308 | java | package cn.suntak.ems.completioncheck.dao;
import cn.suntak.ems.common.dao.EMSCRUD2Dao;
import cn.suntak.ems.completioncheck.domain.CompletionCheck;
/**
*
*
* @author linking
* @version 1.0.0
* @since 1.0.0
*/
public interface CompletionCheckDao extends EMSCRUD2Dao<CompletionCheck, Long> {
} | [
"286513319@qq.com"
] | 286513319@qq.com |
07ebd12da374d4c0d5d882bea40ad2bc71f3489e | c0d55a71beae9a508d7e754f23e60303236d90e3 | /eventloop/src/test/java/io/datakernel/examples/UdpEchoServerClientExample.java | 4961c483bb1328dc4bf890297a06d70dc0774761 | [
"Apache-2.0"
] | permissive | vmykh/datakernel | 8bad072c55f81fa46a1cf6b40e73179da8b63f57 | 0380a9fec4bf2e5181a0a3149906a2b83b1dc6d2 | refs/heads/master | 2021-01-17T10:47:24.965107 | 2015-08-05T14:47:45 | 2015-08-05T19:12:21 | 40,474,902 | 0 | 0 | null | 2015-08-31T07:55:48 | 2015-08-10T09:40:04 | Java | UTF-8 | Java | false | false | 3,670 | java | /*
* Copyright (C) 2015 SoftIndex 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 io.datakernel.examples;
import io.datakernel.bytebuf.ByteBuf;
import io.datakernel.eventloop.NioEventloop;
import io.datakernel.eventloop.UdpPacket;
import io.datakernel.eventloop.UdpSocketConnection;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.DatagramChannel;
import static io.datakernel.eventloop.NioEventloop.createDatagramChannel;
import static io.datakernel.net.DatagramSocketSettings.defaultDatagramSocketSettings;
/**
* Example of creating UDP echo server and UDP client by subclassing `UDPSocketConnection`.
*/
public class UdpEchoServerClientExample {
private static final int SERVER_PORT = 45555;
private static final InetSocketAddress SERVER_ADDRESS = new InetSocketAddress("127.0.0.1", SERVER_PORT);
private static final byte[] bytesToSend = new byte[]{-127, 100, 0, 5, 11, 13, 17, 99};
/* UDP server, which sends received packets back to sender. */
private static class EchoServerUdpConnection extends UdpSocketConnection {
public EchoServerUdpConnection(NioEventloop eventloop, DatagramChannel datagramChannel) {
super(eventloop, datagramChannel);
}
@Override
protected void onRead(UdpPacket packet) {
System.out.println("Server read completed from port " + packet.getSocketAddress().getPort());
send(packet);
}
@Override
protected void onWriteFlushed() {
System.out.println("Server write completed");
close();
}
}
/* UDP client, which sends test UDP packet to server and outputs received bytes to console. */
private static class ClientUdpConnection extends UdpSocketConnection {
public ClientUdpConnection(NioEventloop eventloop, DatagramChannel datagramChannel) {
super(eventloop, datagramChannel);
}
@Override
protected void onRead(UdpPacket packet) {
System.out.println("Client read completed");
byte[] bytesReceived = packet.getBuf().array();
System.out.print("Received " + packet.getBuf().limit() + " bytes: ");
for (int i = 0; i < packet.getBuf().limit(); ++i) {
if (i > 0) {
System.out.print(", ");
}
System.out.print(bytesReceived[i]);
}
packet.recycle();
close();
}
@Override
protected void onWriteFlushed() {
System.out.println("Client write completed");
}
}
/* Run server and client in an event loop. */
public static void main(String[] args) {
NioEventloop eventloop = new NioEventloop();
try {
// server
DatagramChannel serverChannel = createDatagramChannel(defaultDatagramSocketSettings(),
SERVER_ADDRESS, null);
EchoServerUdpConnection serverConnection = new EchoServerUdpConnection(eventloop, serverChannel);
serverConnection.register();
// client
DatagramChannel clientChannel = createDatagramChannel(defaultDatagramSocketSettings(), null, null);
ClientUdpConnection clientConnection = new ClientUdpConnection(eventloop, clientChannel);
clientConnection.register();
clientConnection.send(new UdpPacket(ByteBuf.wrap(bytesToSend), SERVER_ADDRESS));
} catch (IOException e) {
e.printStackTrace();
}
eventloop.run();
}
} | [
"dmitry@datakernel.io"
] | dmitry@datakernel.io |
b830d7218b77199773aa7cae74cdbbfec06cec10 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/12/12_779a0c55c97feccb84e438426cd928a5836f1bb7/GFFToFeatures/12_779a0c55c97feccb84e438426cd928a5836f1bb7_GFFToFeatures_s.java | 566640d80d1017ba49cd4ff660559d968a113f8e | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,507 | java | /*
* BioJava development code
*
* This code may be freely distributed and modified under the
* terms of the GNU Lesser General Public Licence. This should
* be distributed with the code. If you do not have a copy,
* see:
*
* http://www.gnu.org/copyleft/lesser.html
*
* Copyright for this code is held jointly by the individual
* authors. These should be listed in @author doc comments.
*
* For more information on the BioJava project and its aims,
* or to join the biojava-l mailing list, visit the home page
* at:
*
* http://www.biojava.org/
*
*/
package gff;
import java.io.*;
import java.util.*;
import org.biojava.bio.*;
import org.biojava.bio.symbol.*;
import org.biojava.bio.seq.*;
import org.biojava.bio.seq.db.*;
import org.biojava.bio.seq.io.*;
import org.biojava.bio.program.gff.*;
/**
* This tests the gff code to check that we can read in features, add them to
* a sequence, and then print something out.
*/
public class GFFToFeatures {
public static void main(String [] args) throws Exception {
if(args.length != 2) {
throw new Exception("Use: GFFToFeatures sequence.fa features.gff");
}
try {
// load in the sequences
System.out.println("Loading sequences");
SequenceDB seqDB = loadSequences(new File(args[0]));
System.out.println("Sequences:");
for(SequenceIterator si = seqDB.sequenceIterator(); si.hasNext(); ) {
Sequence seq = si.nextSequence();
System.out.println("\t" + seq.getName());
}
// load in the GFF
System.out.println("Loading gff with 'hand_built' source");
GFFEntrySet gffEntries = new GFFEntrySet();
GFFRecordFilter.SourceFilter sFilter = new GFFRecordFilter.SourceFilter();
sFilter.setSource("hand_built");
GFFFilterer filterer = new GFFFilterer(gffEntries.getAddHandler(), sFilter);
GFFParser parser = new GFFParser();
parser.parse(
new BufferedReader(
new InputStreamReader(
new FileInputStream(
new File(args[1])))),
filterer);
// add the features to the sequences
System.out.println("Adding features from gff to sequences");
SequenceDB aSeqDB = new AnnotatedSequenceDB(seqDB, gffEntries.getAnnotator());
// now converting back to gff
System.out.println("Dumping sequence features as GFF");
PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
GFFWriter writer = new GFFWriter(out);
SequencesAsGFF seqsAsGFF = new SequencesAsGFF();
seqsAsGFF.processDB(aSeqDB, writer);
} catch (Exception e) {
e.printStackTrace();
}
}
private static SequenceDB loadSequences(File seqFile)
throws Exception {
HashSequenceDB seqDB = new HashSequenceDB(IDMaker.byName);
Alphabet alpha = AlphabetManager.alphabetForName("DNA");
SymbolParser rParser = alpha.getParser("token");
SequenceFactory sFact = new SimpleSequenceFactory();
SequenceFormat sFormat = new FastaFormat();
InputStream seqDBI = new FileInputStream(seqFile);
SequenceIterator seqI = new StreamReader(seqDBI, sFormat, rParser, sFact);
while(seqI.hasNext()) {
try {
seqDB.addSequence(seqI.nextSequence());
} catch (BioException se) {
se.printStackTrace();
}
}
return seqDB;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
46b10cb8277b4d80275f83cdafa2d200d5017d04 | b568015ac5670fbb747fe54f814f673256428fef | /br-order-redis-service/src/main/java/br/order/redis/impl/org/OrgIncomeRedisImpl.java | a684a6b60218bd25435bcdc55cb0a2df48ec6328 | [] | no_license | wangwenteng/br-order-redis-manager | 5ae1ff63764f991808f5787a4c0cf77b2d7f0c11 | f6f41b562540eadb3fd44271017ddf2d9ad665cf | refs/heads/master | 2022-03-07T19:30:16.686875 | 2017-05-05T08:59:52 | 2017-05-05T08:59:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,743 | java | package br.order.redis.impl.org;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
import br.crm.common.utils.JsonUtils;
import br.crm.common.utils.RedisConstant;
import br.crm.pojo.org.OrganizationIncome;
import br.crm.service.org.OrgIncomeService;
import br.order.redis.org.OrgIncomeRedis;
import br.order.redis.redis.RedisService;
/**
* (体检机构体检信息redis)
*
* @ClassName: OrgIncomeRedisImpl
* @Description: TODO
* @author 王文腾
* @date 2017年1月11日 下午4:47:42
*/
@Service
public class OrgIncomeRedisImpl implements OrgIncomeRedis {
@Autowired
@Qualifier("RedisInnerService")
private RedisService redisService;
public RedisService getRedisService() {
return redisService;
}
public void setRedisService(RedisService redisService) {
this.redisService = redisService;
}
@Autowired
private OrgIncomeService orgIncomeService;
@Override
public void initData() {
List<OrganizationIncome> list = orgIncomeService.getAll();
if (CollectionUtils.isNotEmpty(list)) {
for (OrganizationIncome organizationIncome : list) {
redisService.set(RedisConstant.br_order_orgIncome_orgIncomeId.concat(organizationIncome.getOrgIncomeId().toString()), JSONObject.toJSONString(organizationIncome));
}
}
}
@Override
public int setOrgIncome(OrganizationIncome organizationIncome) {
redisService.set(RedisConstant.br_order_orgIncome_orgIncomeId.concat(organizationIncome.getOrgIncomeId().toString()), JSONObject.toJSONString(organizationIncome));
return 1;
}
@Override
public OrganizationIncome getOrgIncome(Long orgIncomeId) {
OrganizationIncome organizationIncome = null;
if (redisService.exists(RedisConstant.br_order_orgIncome_orgIncomeId.concat(orgIncomeId.toString()))) {
organizationIncome = JsonUtils.jsonToPojo(redisService.get(RedisConstant.br_order_orgIncome_orgIncomeId.concat(orgIncomeId.toString())), OrganizationIncome.class);
}
return organizationIncome;
}
@Override
public int deleteOrgIncome(Long orgIncomeId) {
if (redisService.exists(RedisConstant.br_order_orgIncome_orgIncomeId.concat(orgIncomeId.toString()))) {
redisService.delete(RedisConstant.br_order_orgIncome_orgIncomeId.concat(orgIncomeId.toString()));
}
return 1;
}
}
| [
"120591516@qq.com"
] | 120591516@qq.com |
56eb04e8edc65e6aa6945d96b8a7f92506d63e25 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5765824346324992_0/java/notenote/Problem_B.java | 35646e372772c4eea347d7269ab0874a930f3256 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Java | false | false | 2,966 | java | package GoogleCodeJamRound1;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
public class Problem_B {
static class two {
int id;
int time;
two(int i, int t) {
id = i;
time = t;
}
}
public static int haircut(int a, int b, int[] v) {
int[] remain = new int[10000];
int max = 0;
int last = 0;
int sum = 0;
int min =10000;
if (b<=a) return b-1;
b = b-a;
for (int i = 0; i < a; i++) {
if (max < v[i])
max = v[i];
if (max == v[i]) {
last = i;
}
if (min >=v[i]) min =v[i];
sum += v[i];
}
int t = 0;
for (int k=min; k>=1; k--)
{
int count = 0;
for (int i=0; i<a; i++)
{
if (v[i]%k==0) count++;
}
if (count == a)
{
min = k;
break;
}
}
for (int i=0; i<a; i++) v[i]/=min;
int com=1;
for (int i=0; i<a; i++) com*=v[i];
for (int i = 0; i < a; i++)
{
t += com/v[i];
}
int la = b / t;
int present = b%t;
System.out.println( " " + present +" " +b);
if (present == 0) {
return last;
}
List<two> temp = new ArrayList<two>();
for (int i = 0; i < a; i++) {
for (int j = 1; j <=t; j++) {
int time;
{ time = remain[i] + v[i] * j;
}
temp.add(new two(i, time));
}
}
Collections.sort(temp, new Comparator<two>() {
public int compare(two i1, two i2) {
return i1.time - i2.time;
}
});
/*for (int i=0; i<a*(t-1); i++)
{
System.out.print(temp.get(i).id+" " +temp.get(i).time+" ");
System.out.println("");
}*/
return temp.get(present-1).id;
}
public static void main(String[] args) {
String inFile = "//Users//lixuefei//Documents//JavaWorkspace//Interview//src//GoogleCodeJamRound1//in.txt";
String outFile = "//Users//lixuefei//Documents//JavaWorkspace//Interview//src//GoogleCodeJamRound1//result.txt";
int n = 0;
String line;
try {
FileReader fileReader = new FileReader(inFile);
BufferedReader br = new BufferedReader(fileReader);
FileWriter fileWriter = new FileWriter(outFile);
BufferedWriter bw = new BufferedWriter(fileWriter);
line = br.readLine();
n = Integer.parseInt(line);
for (int i = 0; i < n; i++) {
line = br.readLine();
String[] parts = line.split(" ");
int B = Integer.parseInt(parts[0]);
int N = Integer.parseInt(parts[1]);
line = br.readLine();
String[] part = line.split(" ");
int[] M = new int[B];
for (int j = 0; j < B; j++) {
M[j] = Integer.parseInt(part[j]);
}
//for (N=1; N<=10; N++)
{
int result = haircut(B, N, M)+1;
bw.write("Case #" + (i + 1) + ": " + result + "\n");
}
}
br.close();
bw.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
| [
"eewestman@gmail.com"
] | eewestman@gmail.com |
e5ef13d523ca4f94386e8c8eec8a859b643bce8e | 6362a1b8b35fee61b1bd4a44f9829f1a645230f9 | /gen/me/serce/devkt/solidity/lang/psi/impl/SolFunctionCallArgumentsImpl.java | 820766fb1c7154e95c82adc1c27ef569e1b043bb | [
"MIT"
] | permissive | devkt-plugins/solidity-devkt | 83f3a8388ddac309b81d4ca6d457199a131e5a36 | 44814ff7943f582ac9ff4ff8abf5e01f2f638e45 | refs/heads/master | 2020-03-12T12:44:52.766137 | 2018-09-15T03:18:24 | 2018-09-15T03:18:24 | 130,625,656 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | true | 1,205 | java | // This is a generated file. Not intended for manual editing.
package me.serce.devkt.solidity.lang.psi.impl;
import java.util.List;
import org.jetbrains.annotations.*;
import org.jetbrains.kotlin.com.intellij.lang.ASTNode;
import org.jetbrains.kotlin.com.intellij.psi.PsiElement;
import org.jetbrains.kotlin.com.intellij.psi.PsiElementVisitor;
import org.jetbrains.kotlin.com.intellij.psi.util.PsiTreeUtil;
import static me.serce.devkt.solidity.lang.core.SolidityTokenTypes.*;
import org.jetbrains.kotlin.com.intellij.extapi.psi.ASTWrapperPsiElement;
import me.serce.devkt.solidity.lang.psi.*;
public class SolFunctionCallArgumentsImpl extends ASTWrapperPsiElement implements SolFunctionCallArguments {
public SolFunctionCallArgumentsImpl(ASTNode node) {
super(node);
}
public void accept(@NotNull SolVisitor visitor) {
visitor.visitFunctionCallArguments(this);
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof SolVisitor) accept((SolVisitor)visitor);
else super.accept(visitor);
}
@Override
@NotNull
public List<SolExpression> getExpressionList() {
return PsiTreeUtil.getChildrenOfTypeAsList(this, SolExpression.class);
}
}
| [
"ice1000kotlin@foxmail.com"
] | ice1000kotlin@foxmail.com |
dc56ef29baafa81da3938755a3985a7311d3f27b | b35fadf8d375525e320751e25893f6f69a04e37d | /leimingtech-core/src/main/java/com/leimingtech/core/hibernate/qbc/HqlQuery.java | f772abd7f83d29f80aa9e07d7eb6882b4e0a5816 | [] | no_license | dockercms/cms-4.0 | 8e41fca1142e121861a86006afaf378327f1917b | 8f390cc00848124daeb997b8c09aefa0f465572c | refs/heads/master | 2021-05-19T03:38:03.644558 | 2019-12-06T02:10:27 | 2019-12-06T02:10:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,914 | java | package com.leimingtech.core.hibernate.qbc;
import java.util.List;
import java.util.Map;
import org.hibernate.type.Type;
import com.leimingtech.core.datatable.DataGrid;
public class HqlQuery {
private int curPage =1;
private int pageSize = 10;
private String myaction;
private String myform;
private String queryString;
private Object[] param;
private Type[] types;
private Map<String, Object> map;
private DataGrid dataGrid;
private String field="";//查询需要显示的字段
private Class class1;
private List results;// 结果集
private int total;
public List getResults() {
return results;
}
public void setResults(List rsults) {
this.results = results;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public Class getClass1() {
return class1;
}
public void setClass1(Class class1) {
this.class1 = class1;
}
public DataGrid getDataGrid() {
return dataGrid;
}
public void setDataGrid(DataGrid dataGrid) {
this.dataGrid = dataGrid;
}
public String getField() {
return field;
}
public void setField(String field) {
this.field = field;
}
public Map<String, Object> getMap() {
return map;
}
public void setMap(Map<String, Object> map) {
this.map = map;
}
public HqlQuery(String queryString, Object[] param, Map<String, Object> map) {
this.queryString = queryString;
this.param = param;
this.map = map;
}
public HqlQuery(String queryString, Map<String, Object> map) {
this.queryString = queryString;
this.map = map;
}
public HqlQuery(String myaction) {
this.myaction = myaction;
}
public Object[] getParam() {
return param;
}
public HqlQuery(String myaction, String queryString, Object[] param, Type[] types) {
this.myaction = myaction;
this.queryString = queryString;
this.param = param;
this.types = types;
}
public HqlQuery(Class class1,String hqlString,DataGrid dataGrid) {
this.dataGrid=dataGrid;
this.queryString=hqlString;
this.pageSize=dataGrid.getRows();
this.field=dataGrid.getField();
this.class1=class1;
}
public void setParam(Object[] param) {
this.param = param;
}
public int getCurPage() {
return curPage;
}
public void setCurPage(int curPage) {
this.curPage = curPage;
}
public String getMyaction() {
return myaction;
}
public void setMyaction(String myaction) {
this.myaction = myaction;
}
public String getMyform() {
return myform;
}
public void setMyform(String myform) {
this.myform = myform;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public String getQueryString() {
return queryString;
}
public void setQueryString(String queryString) {
this.queryString = queryString;
}
public Type[] getTypes() {
return types;
}
public void setTypes(Type[] types) {
this.types = types;
}
}
| [
"pixiaoyong@leimingtech.com"
] | pixiaoyong@leimingtech.com |
114c0f0ca16a66d146c4e45e507bad3668cedf03 | f05d29ab5093f463a139c8e1db0da0cf754cfa86 | /Android Projects/ThePeoplesKitchen/src/com/example/thepeopleskitchen/FavouritesActivity.java | edd065c64e554f568fcefa9e85a9c43ec5ba509b | [] | no_license | skarpath/DevelopmentExamples | 2e2cf8f88a9c7e54320fc4d35a389d7f6c4962f0 | bf2bc615efcc1a7a7238150d84b52a2c4019e68a | refs/heads/master | 2021-01-10T03:22:25.688571 | 2018-10-30T19:58:14 | 2018-10-30T19:58:14 | 42,538,603 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,080 | java | package com.example.thepeopleskitchen;
import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.content.Intent;
import android.net.ParseException;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.parse.FindCallback;
import com.parse.ParseObject;
import com.parse.ParseQuery;
import com.parse.ParseUser;
public class FavouritesActivity extends Activity {
ArrayList<Recipe> reclist ;
ListView lv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_favourites);
lv = (ListView) findViewById(R.id.listView1);
reclist = new ArrayList<Recipe>();
loaddata();
}
public void loaddata() {
final ParseQuery<ParseObject> query = ParseQuery.getQuery("FavRecipe");
query.whereEqualTo("user", ParseUser.getCurrentUser());
query.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(List<ParseObject> list,
com.parse.ParseException ex) {
// TODO Auto-generated method stub
if (ex == null) {
for (ParseObject p : list) {
Recipe r = new Recipe();
r.setRecipe_id(p.getString("recipe_id"));
r.setTitle(p.getString("title"));
r.setImage_url(p.getString("image_url"));
r.setPublisher(p.getString("publisher"));
r.setPublisher_url(p.getString("publisher_url"));
r.setRank(p.getString("rank"));
r.setSource_url(p.getString("source_url"));
r.setRecipe_url(p.getString("recipe_url"));
reclist.add(r);
}
} else {
Log.d("logf", "Error: " + ex.getMessage());
}
}
});
RecipeAdapter adapter = new RecipeAdapter(FavouritesActivity.this,
R.layout.row_item, reclist);
adapter.setNotifyOnChange(true);
lv.setAdapter(adapter);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// TODO Auto-generated method stub
Recipe rr = reclist.get(position);
RecipesListActivity.rinfav(rr);
Intent intent = new Intent(FavouritesActivity.this,
PreviewActivity.class);
intent.putExtra("Rec", reclist.get(position));
startActivity(intent);
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.favourites, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
// if (id == R.id.action_settings) {
// return true;
// }
return super.onOptionsItemSelected(item);
}
}
| [
"="
] | = |
ec2a019451ebbc8bfba843a0b7228aecca40302a | 5765c87fd41493dff2fde2a68f9dccc04c1ad2bd | /Variant Programs/5-3/0/Sit.java | b72cf93930b2a5d614705cf60cbdef710f5148e6 | [
"MIT"
] | permissive | hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism | 42e4c2061c3f8da0dfce760e168bb9715063645f | a42ced1d5a92963207e3565860cac0946312e1b3 | refs/heads/master | 2020-08-09T08:10:08.888384 | 2019-11-25T01:14:23 | 2019-11-25T01:14:23 | 214,041,532 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,068 | java | import java.io.Serializable;
public class Sit implements Serializable {
public boolean procurable;
public java.lang.String loginIdentifier;
public java.lang.String messaging;
public java.lang.String direct;
public java.lang.String sound;
public java.lang.String hours;
public static final double make = 0.8537907753080728;
public Sit() {
this(null, null, null, null, null, true);
}
public Sit(
String period,
String earphone,
String accost,
String telefax,
String usernameDimidiate,
boolean availability) {
this.hours = period;
this.sound = earphone;
this.direct = accost;
this.messaging = telefax;
this.loginIdentifier = usernameDimidiate;
this.procurable = availability;
}
public synchronized java.lang.String generateYear() {
double sec;
sec = 0.4788118626220753;
return hours;
}
public synchronized void fixThing(java.lang.String year) {
String key;
key = "SdCS40m3Cj";
this.hours = year;
}
public synchronized void rigidVoice(java.lang.String mobile) {
int minh;
minh = -840115328;
this.sound = mobile;
}
public synchronized void adjustSolve(java.lang.String confronting) {
int fare;
fare = 1984652857;
this.direct = confronting;
}
public synchronized void determineElectronic(java.lang.String postal) {
int indentured;
indentured = -2139603013;
this.messaging = postal;
}
public synchronized java.lang.String produceWearerMap() {
double lessRestrict;
lessRestrict = 0.9692699099404161;
return loginIdentifier;
}
public synchronized void placePersonName(java.lang.String customersIbid) {
String netherTied;
netherTied = "PNc";
this.loginIdentifier = customersIbid;
}
public synchronized boolean isAccessible() {
String dept;
dept = "yICo1A4EXKt";
return procurable;
}
public synchronized void orderedGetable(boolean visible) {
double fionaComponents;
fionaComponents = 0.48186844571109344;
this.procurable = visible;
}
}
| [
"hayden.cheers@me.com"
] | hayden.cheers@me.com |
3e2e79d0c40e8c14f1dce7b870ffd60b8552967c | a5f06feb050fc0daeab331aa1eeda94069c1492c | /src/test/java/study/bytecode/ASMGenerator.java | fc2498fec74a297fa4a1c883884e2aa045111b9f | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | aiguoxin/mybatis-3-study | d8e6cb16e860f8c064bb9a82e8d295c8348f8f41 | 79128bab36613883777875546239b1d892bc84d3 | refs/heads/master | 2023-02-16T19:36:14.954704 | 2023-02-06T13:54:40 | 2023-02-06T13:54:40 | 221,410,454 | 0 | 0 | Apache-2.0 | 2022-09-08T01:04:01 | 2019-11-13T08:33:13 | Java | UTF-8 | Java | false | false | 1,843 | java | /**
* Copyright 2009-2020 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 study.bytecode;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import java.io.File;
import java.io.FileOutputStream;
/**
* 2020/8/8 下午4:54
* aiguoxin
* 说明:
*/
public class ASMGenerator {
public static void main(String[] args) throws Exception {
ClassReader classReader = new ClassReader("study/bytecode/ASMBase");
ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_MAXS);
ClassVisitor classVisitor = new MyClassVisitor(classWriter);
classReader.accept(classVisitor,ClassReader.SKIP_DEBUG);
byte[] data = classWriter.toByteArray();
File f = new File("/Users/liuruixue/Downloads/mybatis源码与脑图/mybatis-3-master/target/test-classes/study/bytecode/ASMBase.class");
// FileOutputStream fout = new FileOutputStream(f);
// fout.write(data);
// fout.close();
try(FileOutputStream out = new FileOutputStream(f)){
out.write(data);
}
Class<?> clz = Class.forName("study.bytecode.ASMBase");
ASMBase asmBase = (ASMBase) clz.newInstance();
asmBase.process();
}
}
| [
"aiguoxin@qiyi.com"
] | aiguoxin@qiyi.com |
706fa4578374582fc62db7a88e56d933486fb9ae | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MATH-51b-3-2-NSGA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/analysis/solvers/BaseSecantSolver_ESTest_scaffolding.java | 11557b9f57f0f1f8570191b88f1e918b5f126ccc | [] | 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 | 4,546 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Jan 18 21:35:27 UTC 2020
*/
package org.apache.commons.math.analysis.solvers;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class BaseSecantSolver_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.analysis.solvers.BaseSecantSolver";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BaseSecantSolver_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.math.exception.MathIllegalStateException",
"org.apache.commons.math.util.Incrementor",
"org.apache.commons.math.exception.NumberIsTooSmallException",
"org.apache.commons.math.exception.NullArgumentException",
"org.apache.commons.math.exception.util.ExceptionContext",
"org.apache.commons.math.analysis.solvers.BaseSecantSolver",
"org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils",
"org.apache.commons.math.exception.NonMonotonousSequenceException",
"org.apache.commons.math.util.FastMath",
"org.apache.commons.math.util.MathUtils",
"org.apache.commons.math.analysis.solvers.BaseSecantSolver$Method",
"org.apache.commons.math.analysis.solvers.AllowedSolution",
"org.apache.commons.math.analysis.solvers.UnivariateRealSolver",
"org.apache.commons.math.exception.NotStrictlyPositiveException",
"org.apache.commons.math.exception.NumberIsTooLargeException",
"org.apache.commons.math.exception.NotFiniteNumberException",
"org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction",
"org.apache.commons.math.exception.MathInternalError",
"org.apache.commons.math.analysis.UnivariateRealFunction",
"org.apache.commons.math.analysis.solvers.BaseUnivariateRealSolver",
"org.apache.commons.math.exception.TooManyEvaluationsException",
"org.apache.commons.math.analysis.solvers.BaseSecantSolver$1",
"org.apache.commons.math.exception.NotPositiveException",
"org.apache.commons.math.exception.util.Localizable",
"org.apache.commons.math.exception.MathIllegalArgumentException",
"org.apache.commons.math.analysis.Expm1Function",
"org.apache.commons.math.analysis.solvers.AbstractUnivariateRealSolver",
"org.apache.commons.math.exception.MaxCountExceededException",
"org.apache.commons.math.exception.MathUserException",
"org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver",
"org.apache.commons.math.exception.MathArithmeticException",
"org.apache.commons.math.exception.DimensionMismatchException",
"org.apache.commons.math.exception.util.LocalizedFormats",
"org.apache.commons.math.analysis.solvers.PegasusSolver",
"org.apache.commons.math.exception.MathIllegalNumberException",
"org.apache.commons.math.analysis.solvers.BracketedUnivariateRealSolver",
"org.apache.commons.math.exception.util.ExceptionContextProvider",
"org.apache.commons.math.exception.NoBracketingException",
"org.apache.commons.math.exception.util.ArgUtils"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
1de5a6c117bee035c889b53fb89a64ff1b84404e | 7389b83990792787033b81c7f908fe026f758500 | /app/src/main/java/com/endpoint/registerme/adapter/Spinner_Qulificatin_Adapter.java | fb62ba776481a69870dabad9917f7631738b2573 | [] | no_license | MotawroonProjects/RegisterMe | 3e7ccf909a53d641c052a97944833cf53a36828e | 7ab1b374a6f9ea262bc1c16c8b8254251c7c17ed | refs/heads/master | 2022-08-01T10:17:36.924666 | 2020-05-20T10:56:45 | 2020-05-20T10:56:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,856 | java | package com.endpoint.registerme.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.endpoint.registerme.R;
import com.endpoint.registerme.models.AllInFo_Model;
import java.util.List;
import java.util.Locale;
import io.paperdb.Paper;
public class Spinner_Qulificatin_Adapter extends BaseAdapter {
private List<AllInFo_Model.Data.Quallifcation> quallifcations;
private LayoutInflater inflater;
private String current_language;
public Spinner_Qulificatin_Adapter(Context context, List<AllInFo_Model.Data.Quallifcation> quallifcations) {
this.quallifcations = quallifcations;
inflater = LayoutInflater.from(context);
Paper.init(context);
current_language = Paper.book().read("lang", Locale.getDefault().getLanguage());
}
@Override
public int getCount() {
return quallifcations.size();
}
@Override
public Object getItem(int position) {
return null;
}
@Override
public long getItemId(int position) {
return position;
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
if (convertView == null) {
convertView = inflater.inflate(R.layout.spinner_row, parent, false);
}
TextView tv_name = convertView.findViewById(R.id.tv_name);
AllInFo_Model.Data.Quallifcation quallifcation = quallifcations.get(position);
if(current_language.equals("ar")){
tv_name.setText(quallifcation.getAr_title());
}
else {
tv_name.setText(quallifcation.getEn_title());
}
return convertView;
}
}
| [
"ahmedmohamed23345@gmail.com"
] | ahmedmohamed23345@gmail.com |
1fede2e885ad8f82a63260a6ce8f22bbccfd6173 | da68446ad3fa56c5d5f9a55b4428e21e0f0ed406 | /src/main/java/mac/applicationservices/struct/StyleTable.java | 2145699651ea98c476ec68987767fe38ee0d1bb7 | [] | no_license | multi-os-engine/moe-mac-core | 90d9764ab38807cac004aed70b68ca54c5c8a79b | 0ffb7b52af9cdd75f25b33d0c4723903a521d2f7 | refs/heads/master | 2020-04-06T06:58:01.357013 | 2016-08-09T18:57:05 | 2016-08-09T18:57:05 | 65,319,982 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,957 | java | /*
Copyright 2014-2016 Intel Corporation
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 mac.applicationservices.struct;
import org.moe.natj.c.StructObject;
import org.moe.natj.c.ann.Structure;
import org.moe.natj.c.ann.StructureField;
import org.moe.natj.general.NatJ;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Generated;
@Generated
@Structure(alignment = 2)
public final class StyleTable extends StructObject {
static {
NatJ.register();
}
private static long __natjCache;
@Generated
public StyleTable() {
super(StyleTable.class);
}
@Generated
protected StyleTable(Pointer peer) {
super(peer);
}
@Generated
@StructureField(order = 0, isGetter = true)
public native short fontClass();
@Generated
@StructureField(order = 0, isGetter = false)
public native void setFontClass(short value);
@Generated
@StructureField(order = 1, isGetter = true)
public native int offset();
@Generated
@StructureField(order = 1, isGetter = false)
public native void setOffset(int value);
@Generated
@StructureField(order = 2, isGetter = true)
public native int reserved();
@Generated
@StructureField(order = 2, isGetter = false)
public native void setReserved(int value);
@Generated
@StructureField(order = 3, isGetter = true, count = 48)
public native byte indexes(int field_idx);
@Generated
@StructureField(order = 3, isGetter = false, count = 48)
public native void setIndexes(byte value, int field_idx);
}
| [
"alexey.suhov@intel.com"
] | alexey.suhov@intel.com |
647c0f32afa0d5c12c6b31a1502471659fbc547a | 40fe638485a89b2305cf2a79d4d24e9ff8ef34a9 | /Java/sparkProject/src/main/java/com/chy/sql/datasources/redHive.java | 091f1a39f6f2461d1512010200b55d11d13d0e42 | [] | no_license | chy2z/spark | 544aab4404a33c949b2a4d780e465ab9afce4651 | c0cb454e16e01baf3fea043f66fac10dcabf8c6b | refs/heads/master | 2022-07-08T10:39:41.721104 | 2020-02-18T08:21:02 | 2020-02-18T08:21:02 | 156,400,817 | 0 | 1 | null | 2022-06-21T00:59:42 | 2018-11-06T15:01:19 | Java | UTF-8 | Java | false | false | 3,718 | java | package com.chy.sql.datasources;
import com.chy.util.SparkUtil;
import org.apache.spark.api.java.function.MapFunction;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Encoders;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SparkSession;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Title: redHive
* @Description: 读取hive
* @author chy
* @date 2018/11/19 0:43
*/
public class redHive {
public static void main(String[] args) {
test2();
}
/**
* 访问hive源
*/
public static void test1(){
SparkSession spark = SparkUtil.getSparkSessionForHive();
spark.sql("show tables").show();
spark.sql("select * from test1").show();
spark.stop();
}
/**
* 访问hive源
* 创建表
* 导入记录
* 统计就记录
*/
public static void test2(){
SparkSession spark = SparkUtil.getSparkSessionForHive();
spark.sql("CREATE TABLE IF NOT EXISTS kvsrc (key INT, value STRING) USING hive");
spark.sql("LOAD DATA LOCAL INPATH 'src/main/resources/kv1.txt' INTO TABLE kvsrc");
// Queries are expressed in HiveQL
spark.sql("SELECT * FROM kvsrc").show();
// +---+-------+
// |key| value|
// +---+-------+
// |238|val_238|
// | 86| val_86|
// |311|val_311|
// ...
// Aggregation queries are also supported.
spark.sql("SELECT COUNT(*) FROM kvsrc").show();
// +--------+
// |count(1)|
// +--------+
// | 500 |
// +--------+
// The results of SQL queries are themselves DataFrames and support all normal functions.
Dataset<Row> sqlDF = spark.sql("SELECT key, value FROM kvsrc WHERE key < 10 ORDER BY key");
// The items in DataFrames are of type Row, which lets you to access each column by ordinal.
Dataset<String> stringsDS = sqlDF.map(
(MapFunction<Row, String>) row -> "Key: " + row.get(0) + ", Value: " + row.get(1),
Encoders.STRING());
stringsDS.show();
// +--------------------+
// | value|
// +--------------------+
// |Key: 0, Value: val_0|
// |Key: 0, Value: val_0|
// |Key: 0, Value: val_0|
// ...
// You can also use DataFrames to create temporary views within a SparkSession.
List<Record> records = new ArrayList<>();
for (int key = 1; key < 100; key++) {
Record record = new Record();
record.setKey(key);
record.setValue("val_" + key);
records.add(record);
}
Dataset<Row> recordsDF = spark.createDataFrame(records, Record.class);
recordsDF.createOrReplaceTempView("records");
// Queries can then join DataFrames data with data stored in Hive.
spark.sql("SELECT * FROM records r JOIN kvsrc s ON r.key = s.key").show();
// +---+------+---+------+
// |key| value|key| value|
// +---+------+---+------+
// | 2| val_2| 2| val_2|
// | 2| val_2| 2| val_2|
// | 4| val_4| 4| val_4|
// ...
// $example off:spark_hive$
spark.stop();
}
public static class Record implements Serializable {
private int key;
private String value;
public int getKey() {
return key;
}
public void setKey(int key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
}
| [
"chenghy.js@eakay.cn"
] | chenghy.js@eakay.cn |
1cbb480512c886e020bbae1d48f0606e79d7b20e | e51de484e96efdf743a742de1e91bce67f555f99 | /Android/triviacrack_src/src/com/inmobi/commons/cache/RetryMechanism$RetryRunnable.java | 70ad118c70dc26d1c003366fab2595bf6a98792a | [] | no_license | adumbgreen/TriviaCrap | b21e220e875f417c9939f192f763b1dcbb716c69 | beed6340ec5a1611caeff86918f107ed6807d751 | refs/heads/master | 2021-03-27T19:24:22.401241 | 2015-07-12T01:28:39 | 2015-07-12T01:28:39 | 28,071,899 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 305 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.inmobi.commons.cache;
public interface
{
public abstract void completed();
public abstract void run();
}
| [
"klayderpus@chimble.net"
] | klayderpus@chimble.net |
1b447a5788106442f042f5ca614d18edaa1340c5 | 988c9b6eeb4589e3fd412f34a4bf92a16704b5d6 | /completed/uva/uva307.java | 458672ecdfdf9d319fad4794fa01cd3b117c7c1f | [] | no_license | greenstripes4/USACO | 3bf08c97767e457ace8f24c61117271028802693 | 24cd71c6d1cd168d76b27c2d6edd0c6abeeb7a83 | refs/heads/master | 2023-02-07T17:54:26.563040 | 2023-02-06T03:29:17 | 2023-02-06T03:29:17 | 192,225,457 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,424 | java | import java.io.*;
import java.util.*;
public class Main{
private static boolean canSplit(int[] sticks, boolean[] used, int target, int current, int built, int need, int start) {
if(built == need-1) {
return true;
}
if(current == target) {
return canSplit(sticks, used, target, 0, built+1, need, 0);
}
int lastInvalid = -1;
for(int i = start; i < sticks.length; i++) {
if(!used[i] && sticks[i] != lastInvalid && current+sticks[i] <= target) {
used[i] = true;
if(canSplit(sticks, used, target, current+sticks[i], built, need, i+1)) {
return true;
}
used[i] = false;
lastInvalid = sticks[i];
if(current==0)
return false;
}
}
return false;
}
public static void main(String[] args) throws IOException{
//Scanner f = new Scanner(new File("uva.in"));
//Scanner f = new Scanner(System.in);
//BufferedReader f = new BufferedReader(new FileReader("uva.in"));
BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
String input;
while(!(input = f.readLine()).equals("0")) {
long start = System.nanoTime();
int n = Integer.parseInt(input);
int[] sticks = new int[n];
StringTokenizer st = new StringTokenizer(f.readLine());
int sum = 0;
for(int i = 0; i < n; i++) {
sticks[i] = Integer.parseInt(st.nextToken());
sum += sticks[i];
}
Arrays.sort(sticks);
for(int i = 0; i < n/2; i++) {
int temp = sticks[i];
sticks[i] = sticks[n-i-1];
sticks[n-i-1] = temp;
}
for(int i = sticks[0]; i <= sum; i++) {
if(sum%i == 0 && canSplit(sticks, new boolean[n], i, 0, 0, sum/i, 0)) {
out.println(i);
break;
}
}
long end = System.nanoTime();
long ms = ((end - start) / 1000000);
//System.out.println("test passed in " + ms + "ms time");
}
f.close();
out.close();
}
}
| [
"strongheart404@gmail.com"
] | strongheart404@gmail.com |
935ac49a78d00ab71a8054e846144dbdc76ede42 | ea80be7c916654b2da85977d4876132f1e0fcd8c | /imal_admin_portal/src/service_client_common_src/com/path/dbmaps/vo/FASAST1VOKey.java | 64e71a94dce4ac08a6c5a23506d9b049db5cca61 | [] | no_license | jenil-shah135/imal_admin_portal | 1352b47aa38530d7ddcc56399f6f83b37d804d38 | fa47f0f45d486999eb30d58e7da6c0a79c236b1b | refs/heads/master | 2023-01-15T15:59:27.683025 | 2020-11-25T12:43:30 | 2020-11-25T12:43:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,042 | java | package com.path.dbmaps.vo;
import com.path.lib.vo.BaseVO;
import java.math.BigDecimal;
public class FASAST1VOKey extends BaseVO {
/**
* This field corresponds to the database column FASAST1.CATEGORY_CODE
*/
private BigDecimal CATEGORY_CODE;
/**
* This field corresponds to the database column FASAST1.CLASS_CODE
*/
private BigDecimal CLASS_CODE;
/**
* This field corresponds to the database column FASAST1.CODE
*/
private BigDecimal CODE;
/**
* This field corresponds to the database column FASAST1.COMP_CODE
*/
private BigDecimal COMP_CODE;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FASAST1.CATEGORY_CODE
*
* @return the value of FASAST1.CATEGORY_CODE
*/
public BigDecimal getCATEGORY_CODE() {
return CATEGORY_CODE;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FASAST1.CATEGORY_CODE
*
* @param CATEGORY_CODE the value for FASAST1.CATEGORY_CODE
*/
public void setCATEGORY_CODE(BigDecimal CATEGORY_CODE) {
this.CATEGORY_CODE = CATEGORY_CODE;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FASAST1.CLASS_CODE
*
* @return the value of FASAST1.CLASS_CODE
*/
public BigDecimal getCLASS_CODE() {
return CLASS_CODE;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FASAST1.CLASS_CODE
*
* @param CLASS_CODE the value for FASAST1.CLASS_CODE
*/
public void setCLASS_CODE(BigDecimal CLASS_CODE) {
this.CLASS_CODE = CLASS_CODE;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FASAST1.CODE
*
* @return the value of FASAST1.CODE
*/
public BigDecimal getCODE() {
return CODE;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FASAST1.CODE
*
* @param CODE the value for FASAST1.CODE
*/
public void setCODE(BigDecimal CODE) {
this.CODE = CODE;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FASAST1.COMP_CODE
*
* @return the value of FASAST1.COMP_CODE
*/
public BigDecimal getCOMP_CODE() {
return COMP_CODE;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FASAST1.COMP_CODE
*
* @param COMP_CODE the value for FASAST1.COMP_CODE
*/
public void setCOMP_CODE(BigDecimal COMP_CODE) {
this.COMP_CODE = COMP_CODE;
}
} | [
"aleem2k11@gmail.com"
] | aleem2k11@gmail.com |
befbeb738b1a751a00373603c1db2fab1be860e6 | 3386dd7e7be492cfb06912215e5ef222bbc7ce34 | /autocomment_netbeans/spooned/org/jbpm/process/builder/SubProcessNodeBuilder.java | 8276ea7fe598e6cfced368ce9a696470a0244db3 | [
"Apache-2.0"
] | permissive | nerzid/autocomment | cc1d3af05045bf24d279e2f824199ac8ae51b5fd | 5803cf674f5cadfdc672d4957d46130a3cca6cd9 | refs/heads/master | 2021-03-24T09:17:16.799705 | 2016-09-28T14:32:21 | 2016-09-28T14:32:21 | 69,360,519 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,566 | java | /**
* Copyright 2015 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jbpm.process.builder;
import org.jbpm.workflow.core.node.DataAssociation;
import org.kie.api.runtime.process.DataTransformer;
import org.jbpm.process.core.impl.DataTransformerRegistry;
import java.util.HashMap;
import java.util.Map;
import org.kie.api.definition.process.Node;
import org.drools.compiler.lang.descr.ProcessDescr;
import org.jbpm.workflow.core.node.SubProcessNode;
import org.jbpm.workflow.core.node.Transformation;
import org.jbpm.workflow.core.WorkflowProcess;
public class SubProcessNodeBuilder extends EventBasedNodeBuilder {
@Override
public void build(Process process, ProcessDescr processDescr, ProcessBuildContext context, Node node) {
super.build(process, processDescr, context, node);
WorkflowProcess wfProcess = ((WorkflowProcess) (process));
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("imports", wfProcess.getImports());
parameters.put("classloader", context.getConfiguration().getClassLoader());
for (DataAssociation dataAssociation : ((SubProcessNode) (node)).getInAssociations()) {
Transformation transformation = dataAssociation.getTransformation();
if (transformation != null) {
DataTransformer transformer = DataTransformerRegistry.get().find(transformation.getLanguage());
transformation.setCompiledExpression(transformer.compile(transformation.getExpression(), parameters));
}
}
for (DataAssociation dataAssociation : ((SubProcessNode) (node)).getOutAssociations()) {
Transformation transformation = dataAssociation.getTransformation();
if (transformation != null) {
DataTransformer transformer = DataTransformerRegistry.get().find(transformation.getLanguage());
transformation.setCompiledExpression(transformer.compile(transformation.getExpression(), parameters));
}
}
}
}
| [
"nerzid@gmail.com"
] | nerzid@gmail.com |
da9c7d780a3aafede5de5b34c923b05253350f6f | 8b57aee022a2c3509fe302a52accbb472005da50 | /src/main/java/com/qian/demo/modules/qian/service/QianRoleResourceRelationService.java | d375cf01c9f7f00472df25fb4b152385b61cc703 | [] | no_license | Me-to/qian_guanli | b0115c1d8c77ec4a6146262448dd72692f4ced2e | b0cb9aace76093b24d3fce2df7a8818bbbbe880b | refs/heads/main | 2023-01-03T01:55:08.287866 | 2020-10-09T15:08:25 | 2020-10-09T15:08:25 | 302,643,660 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 378 | java | package com.qian.demo.modules.qian.service;
import com.qian.demo.modules.qian.model.QianRoleResourceRelation;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 后台角色资源关系表 服务类
* </p>
*
* @author zhangqian
* @since 2020-10-09
*/
public interface QianRoleResourceRelationService extends IService<QianRoleResourceRelation> {
}
| [
"694656210@qq.com"
] | 694656210@qq.com |
adfbe28dceb73a3bb10047bb62553c565415f0fc | e12af772256dccc4f44224f68b7a3124673d9ced | /jitsi/src/net/java/sip/communicator/service/sysactivity/SystemActivityNotificationsService.java | 621f1eb296a0c66d5f43923898a80bf5c894f4aa | [] | no_license | leshikus/dataved | bc2f17d9d5304b3d7c82ccb0f0f58c7abcd25b2a | 6c43ab61acd08a25b21ed70432cd0294a5db2360 | refs/heads/master | 2021-01-22T02:33:58.915867 | 2016-11-03T08:35:22 | 2016-11-03T08:35:22 | 32,135,163 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,259 | java | /*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.sysactivity;
/**
* Listens for some system specific events such as sleep, wake, network change,
* desktop activity, screensaver etc. and informs the registered listeners.
*
* @author Damian Minkov
*/
public interface SystemActivityNotificationsService
{
/**
* Registers a listener that would be notified of changes that have occurred
* in the underlying system.
*
* @param listener the listener that we'd like to register for changes in
* the underlying system.
*/
public void addSystemActivityChangeListener(
SystemActivityChangeListener listener);
/**
* Remove the specified listener so that it won't receive further
* notifications of changes that occur in the underlying system
*
* @param listener the listener to remove.
*/
public void removeSystemActivityChangeListener(
SystemActivityChangeListener listener);
/**
* Registers a listener that would be notified for idle of the system
* for <tt>idleTime</tt>.
*
* @param idleTime the time in milliseconds after which we will consider
* system to be idle. This doesn't count when system seems idle as
* monitor is off or screensaver is on, or desktop is locked.
* @param listener the listener that we'd like to register for changes in
* the underlying system.
*/
public void addIdleSystemChangeListener(
long idleTime,
SystemActivityChangeListener listener);
/**
* Remove the specified listener so that it won't receive further
* notifications for idle system.
*
* @param listener the listener to remove.
*/
public void removeIdleSystemChangeListener(
SystemActivityChangeListener listener);
/**
* Can check whether an event id is supported on
* current operation system.
* @param eventID the event to check.
* @return whether the supplied event id is supported.
*/
public boolean isSupported(int eventID);
}
| [
"alexei.fedotov@917aa43a-1baf-11df-844d-27937797d2d2"
] | alexei.fedotov@917aa43a-1baf-11df-844d-27937797d2d2 |
9fe01f1337e5c8a6af018e5e3e649235c7e3354c | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava1/Foo518.java | 805986161254204ecd3408eef595f14cca1e659d | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package applicationModulepackageJava1;
public class Foo518 {
public void foo0() {
new applicationModulepackageJava1.Foo517().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
0a6f4ce400624d6e22bb9fe1cbaa3cea7fa87e22 | a159ab5cc3bc60e013c402f8e6b9bed57e916be0 | /4.27/src/Test5.java | b8d98c0d46c0d964e39de0f1ec14ab932cb25a12 | [] | no_license | chickeboy/java-Study | 919a8e8034fa2de6fe8ddc9aa4f39a1c267001a6 | 2ab9ba21ea44bc7ba48423921bbe9e4cb1b543ea | refs/heads/master | 2020-05-24T09:47:17.296617 | 2019-07-24T07:38:30 | 2019-07-24T07:38:30 | 187,210,908 | 1 | 0 | null | null | null | null | GB18030 | Java | false | false | 650 | java |
public class Test5 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Penguin penguin = new Penguin("海豚", 1);
penguin.eatfood();
penguin.myId();
}
}
class Animal1{
private String name;
private int id;
public Animal1(String name, int id) {
super();
this.name = name;
this.id = id;
}
public void eatfood() {
// TODO Auto-generated method stub
System.out.println(name +"吃东西");
}
public void myId() {
System.out.println("我的id是"+id);
}
}
class Penguin extends Animal1{
public Penguin(String name, int id) {
super(name, id);
// TODO Auto-generated constructor stub
}
}
| [
"1119644047@qq.com"
] | 1119644047@qq.com |
a1d155b3b05c8d50cd009db94155ee0d67824a16 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/29/29_0576f95b52d960fc01e5a0ccfcf285391c638743/Time/29_0576f95b52d960fc01e5a0ccfcf285391c638743_Time_s.java | 42e977aa6df4f5821a2cf3729396d6b182bbd2b1 | [] | 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 | 5,773 | java | package org.jacorb.util;
/*
* JacORB - a free Java ORB
*
* Copyright (C) 2002-2004 Gerald Brose
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
import org.jacorb.orb.CDRInputStream;
import org.jacorb.orb.CDROutputStream;
import org.omg.TimeBase.UtcT;
import org.omg.TimeBase.UtcTHelper;
/**
* Contains static methods to handle CORBA time values.
*
* @author Andre Spiegel <spiegel@gnu.org>
* @version $Id$
*/
public class Time
{
private Time()
{
// utility class
super();
}
/**
* Difference between the CORBA Epoch and the Unix Epoch: the time
* from 1582/10/15 00:00 until 1970/01/01 00:00 in 100 ns units.
*/
public static final long UNIX_OFFSET = 122192928000000000L;
/**
* Returns the current time as a CORBA UtcT.
*/
public static UtcT corbaTime()
{
return corbaTime(System.currentTimeMillis());
}
/**
* Converts the given unixTime into a CORBA UtcT.
* @param unixTime the number of milliseconds since 1970/01/01 00:00 UTC.
*/
public static UtcT corbaTime(long unixTime)
{
UtcT result = new UtcT();
result.time = (unixTime * 10000) + UNIX_OFFSET;
// unixTime is always UTC.
// Therefore, no time zone offset.
result.tdf = 0;
// nothing reasonable to put here
result.inacchi = 0;
result.inacclo = 0;
return result;
}
/**
* Converts the given Java date into a CORBA UtcT.
*/
public static UtcT corbaTime(java.util.Date date)
{
return corbaTime(date.getTime());
}
/**
* Returns a CORBA UtcT that represents an instant that lies
* a given number of CORBA time units (100 ns) in the future.
* If the argument is negative, returns null.
*/
public static UtcT corbaFuture(long corbaUnits)
{
if (corbaUnits < 0)
{
return null;
}
UtcT result = corbaTime();
result.time = result.time + corbaUnits;
return result;
}
/**
* Returns the number of milliseconds between now and the given CORBA
* time. The value is positive if that time is in the future, and
* negative otherwise.
*/
public static long millisTo(UtcT time)
{
long unixTime = (time.time - UNIX_OFFSET) / 10000;
// if the time is not UTC, correct time zone
if (time.tdf != 0)
{
unixTime = unixTime - (time.tdf * 60000);
}
return unixTime - System.currentTimeMillis();
}
/**
* Returns true if the instant represented by the given UtcT is
* already in the past, false otherwise. As a special convenience,
* this method also returns false if the argument is null.
*/
public static boolean hasPassed(UtcT time)
{
if (time != null)
{
return millisTo(time) < 0;
}
return false;
}
/**
* Compares two UtcT time values and returns that which is earlier.
* Either argument can be null; this is considered as a time that
* lies indefinitely in the future. If both arguments are null,
* this method returns null itself.
*/
public static UtcT earliest(UtcT timeA, UtcT timeB)
{
if (timeA == null)
{
if (timeB == null)
{
return null;
}
return timeB;
}
if (timeB == null || timeA.time <= timeB.time)
{
return timeA;
}
return timeB;
}
/**
* Returns a CDR encapsulation of the given UtcT.
*/
public static byte[] toCDR(UtcT time)
{
CDROutputStream out = new CDROutputStream(25);
out.beginEncapsulatedArray();
UtcTHelper.write(out, time);
return out.getBufferCopy();
}
/**
* Decodes a CDR encapsulation of a UtcT.
*/
public static UtcT fromCDR(byte[] buffer)
{
CDRInputStream in = new CDRInputStream(buffer);
in.openEncapsulatedArray();
return UtcTHelper.read(in);
}
/**
* This method blocks until the given time has been reached.
* If the time is null, or it has already passed,
* then this method returns immediately.
*/
public static void waitFor(UtcT time)
{
if (time != null)
{
long now = System.currentTimeMillis();
long delta = Time.millisTo(time);
long then = now + delta;
while(delta > 0)
{
try
{
Thread.sleep(delta);
}
catch (InterruptedException e)
{
// ignored
}
delta = then - System.currentTimeMillis();
}
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
86acfa37e4156ac7ab1def593c39e98573010977 | e0f13e1839adb80398fa8fd1b2df9d2d24b7fcfa | /chaos-algorithm/src/main/java/cn/amos/algorithm/BaseAlg.java | d6114a13ef85608dc02606d5aa02045ffbe0223e | [] | no_license | AmosWang0626/chaos | 617d41490d62bb7c7ac1743148b452bf17480842 | 4736fb9dc89d3ebd25ebbba4c377da9434a6d1ed | refs/heads/master | 2023-06-23T09:23:18.242936 | 2023-02-23T14:44:58 | 2023-02-23T14:44:58 | 118,746,909 | 1 | 0 | null | 2023-06-14T22:32:56 | 2018-01-24T10:01:04 | Java | UTF-8 | Java | false | false | 800 | java | package cn.amos.algorithm;
import java.util.Random;
public class BaseAlg {
public static void main(String[] args) {
powerTwo();
xor();
}
/**
* 判断数字是不是 2 的 n 次幂
*/
private static void powerTwo() {
for (int i = 0; i < 10; i++) {
int num = new Random().nextInt(20);
System.out.println(num + "\t--->\t" + (num & (num - 1)));
}
}
/**
* 异或 ^
* 相同为 0 ,不同为 1
*/
private static void xor() {
int result = 0;
for (int i = 0; i < 10; i++) {
int num = new Random().nextInt(10);
System.out.print(num + " ^ " + result + " = \t");
result = num ^ result;
System.out.println(result);
}
}
}
| [
"1833063210@qq.com"
] | 1833063210@qq.com |
936be0ce3b27d401ea3368754ab5d528d0344b5f | a9bf2a90a894af4a9b77a9cb3380b24494c6392a | /src/test/java/org/assertj/core/api/iterable/IterableAssert_hasAtLeastOneElementOfType_Test.java | 67c8ef4bbe579ffeb653bfb4169de3eb1bc3a62a | [
"Apache-2.0"
] | permissive | andyRokit/assertj-core | cc0e2fb50e43b2c752e3cb94af4513175b68e779 | 4d7dffe1a4f940952e5024a98686b6004f5184dc | refs/heads/master | 2020-03-23T12:36:07.003905 | 2018-07-20T08:08:58 | 2018-07-20T08:08:58 | 141,569,523 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,370 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Copyright 2012-2018 the original author or authors.
*/
package org.assertj.core.api.iterable;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.util.Lists.newArrayList;
import java.util.List;
import org.assertj.core.internal.ObjectArrays;
import org.junit.Test;
/**
* Only make one test since assertion is delegated to {@link ObjectArrays} which has its own tests.
*/
public class IterableAssert_hasAtLeastOneElementOfType_Test {
@Test
public void should_pass_if_actual_has_one_element_of_the_expected_type() {
List<Object> list = newArrayList();
list.add("string");
list.add(1);
assertThat(list).hasAtLeastOneElementOfType(Integer.class)
.hasAtLeastOneElementOfType(String.class)
.hasAtLeastOneElementOfType(Object.class);
}
} | [
"joel.costigliola@gmail.com"
] | joel.costigliola@gmail.com |
21b4a2823a4d8dceae944d53ddbbff971d7cfbcf | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /Honor5C-7.0/src/main/java/com/android/server/EntropyMixer.java | 0434934bbc67513b7bcd772b4a12439cd7fa0e0f | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,061 | java | package com.android.server;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Binder;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.os.SystemProperties;
import android.util.Slog;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
public class EntropyMixer extends Binder {
private static final int ENTROPY_WHAT = 1;
private static final int ENTROPY_WRITE_PERIOD = 10800000;
private static final long START_NANOTIME = 0;
private static final long START_TIME = 0;
private static final String TAG = "EntropyMixer";
private final String entropyFile;
private final String hwRandomDevice;
private final BroadcastReceiver mBroadcastReceiver;
private final Handler mHandler;
private final String randomDevice;
static {
/* JADX: method processing error */
/*
Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: com.android.server.EntropyMixer.<clinit>():void
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113)
at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256)
at jadx.core.ProcessClass.process(ProcessClass.java:34)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281)
at jadx.api.JavaClass.decompile(JavaClass.java:59)
at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161)
Caused by: jadx.core.utils.exceptions.DecodeException: in method: com.android.server.EntropyMixer.<clinit>():void
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46)
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98)
... 5 more
Caused by: java.lang.IllegalArgumentException: bogus opcode: 0073
at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1197)
at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212)
at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72)
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43)
... 6 more
*/
/*
// Can't load method instructions.
*/
throw new UnsupportedOperationException("Method not decompiled: com.android.server.EntropyMixer.<clinit>():void");
}
public EntropyMixer(Context context) {
this(context, getSystemDir() + "/entropy.dat", "/dev/urandom", "/dev/hw_random");
}
public EntropyMixer(Context context, String entropyFile, String randomDevice, String hwRandomDevice) {
this.mHandler = new Handler() {
public void handleMessage(Message msg) {
if (msg.what != EntropyMixer.ENTROPY_WHAT) {
Slog.e(EntropyMixer.TAG, "Will not process invalid message");
return;
}
EntropyMixer.this.addHwRandomEntropy();
EntropyMixer.this.writeEntropy();
EntropyMixer.this.scheduleEntropyWriter();
}
};
this.mBroadcastReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
EntropyMixer.this.writeEntropy();
}
};
if (randomDevice == null) {
throw new NullPointerException("randomDevice");
} else if (hwRandomDevice == null) {
throw new NullPointerException("hwRandomDevice");
} else if (entropyFile == null) {
throw new NullPointerException("entropyFile");
} else {
this.randomDevice = randomDevice;
this.hwRandomDevice = hwRandomDevice;
this.entropyFile = entropyFile;
loadInitialEntropy();
addDeviceSpecificEntropy();
addHwRandomEntropy();
writeEntropy();
scheduleEntropyWriter();
IntentFilter broadcastFilter = new IntentFilter("android.intent.action.ACTION_SHUTDOWN");
broadcastFilter.addAction("android.intent.action.ACTION_POWER_CONNECTED");
broadcastFilter.addAction("android.intent.action.REBOOT");
context.registerReceiver(this.mBroadcastReceiver, broadcastFilter);
}
}
private void scheduleEntropyWriter() {
this.mHandler.removeMessages(ENTROPY_WHAT);
this.mHandler.sendEmptyMessageDelayed(ENTROPY_WHAT, 10800000);
}
private void loadInitialEntropy() {
try {
RandomBlock.fromFile(this.entropyFile).toFile(this.randomDevice, false);
} catch (FileNotFoundException e) {
Slog.w(TAG, "No existing entropy file -- first boot?");
} catch (IOException e2) {
Slog.w(TAG, "Failure loading existing entropy file", e2);
}
}
private void writeEntropy() {
try {
Slog.i(TAG, "Writing entropy...");
RandomBlock.fromFile(this.randomDevice).toFile(this.entropyFile, true);
} catch (IOException e) {
Slog.w(TAG, "Unable to write entropy", e);
}
}
private void addDeviceSpecificEntropy() {
IOException e;
Throwable th;
PrintWriter printWriter = null;
try {
PrintWriter out = new PrintWriter(new FileOutputStream(this.randomDevice));
try {
out.println("Copyright (C) 2009 The Android Open Source Project");
out.println("All Your Randomness Are Belong To Us");
out.println(START_TIME);
out.println(START_NANOTIME);
out.println(SystemProperties.get("ro.serialno"));
out.println(SystemProperties.get("ro.bootmode"));
out.println(SystemProperties.get("ro.baseband"));
out.println(SystemProperties.get("ro.carrier"));
out.println(SystemProperties.get("ro.bootloader"));
out.println(SystemProperties.get("ro.hardware"));
out.println(SystemProperties.get("ro.revision"));
out.println(SystemProperties.get("ro.build.fingerprint"));
out.println(new Object().hashCode());
out.println(System.currentTimeMillis());
out.println(System.nanoTime());
if (out != null) {
out.close();
}
printWriter = out;
} catch (IOException e2) {
e = e2;
printWriter = out;
try {
Slog.w(TAG, "Unable to add device specific data to the entropy pool", e);
if (printWriter != null) {
printWriter.close();
}
} catch (Throwable th2) {
th = th2;
if (printWriter != null) {
printWriter.close();
}
throw th;
}
} catch (Throwable th3) {
th = th3;
printWriter = out;
if (printWriter != null) {
printWriter.close();
}
throw th;
}
} catch (IOException e3) {
e = e3;
Slog.w(TAG, "Unable to add device specific data to the entropy pool", e);
if (printWriter != null) {
printWriter.close();
}
}
}
private void addHwRandomEntropy() {
try {
RandomBlock.fromFile(this.hwRandomDevice).toFile(this.randomDevice, false);
Slog.i(TAG, "Added HW RNG output to entropy pool");
} catch (FileNotFoundException e) {
} catch (IOException e2) {
Slog.w(TAG, "Failed to add HW RNG output to entropy pool", e2);
}
}
private static String getSystemDir() {
File systemDir = new File(Environment.getDataDirectory(), "system");
systemDir.mkdirs();
return systemDir.toString();
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
1b494db2efc41603bc55941bab20acc6cbefc545 | 3e909d759fa6fb4694447064a80dfb185a77d907 | /XmnWeb/.svn/pristine/54/542ca89c8885765f7c4605e52aea248c42bd252d.svn-base | 7637195b5630a21da4d88ebbe878a815da614489 | [] | no_license | liveqmock/seeyouagain | 9703616f59ae0b9cd2e641d135170c84c18a257c | fae0cb3471f07520878e51358cfa5ea88e1d659c | refs/heads/master | 2020-04-04T14:47:00.192619 | 2017-11-14T12:47:31 | 2017-11-14T12:47:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,648 | package com.xmniao.xmn.core.user_terminal.dao;
import java.util.List;
import com.xmniao.xmn.core.base.BaseDao;
import com.xmniao.xmn.core.businessman.entity.TSeller;
import com.xmniao.xmn.core.user_terminal.entity.TPost;
import com.xmniao.xmn.core.util.proxy.annotation.DataSource;
/**
*
* @项目名称:XmnWeb
*
* @类名称:TpostDao
*
* @类描述:香蜜客圈子发帖表
*
* @创建人:zhou'dekun
*
* @创建时间:2014年12月08日20时07分10秒
*
* @Copyright:广东寻蜜鸟网络技术有限公司
*/
public interface TpostDao extends BaseDao<TPost> {
/**
* 帖子列表(状态0)
* @param tPost
* @return
*/
@DataSource("slave")
public List<TPost> getZeroList(TPost tPost);
/**
* 帖子列表count
* @param tPost
* @return
*/
@DataSource("slave")
public Long getZeroListCount(TPost tPost);
/**
* 举报列表(状态2)
* @param tPost
* @return
*/
@DataSource("slave")
public List<TPost> getTwoList(TPost tPost);
/**
* 举报列表count
* @param tPost
* @return
*/
@DataSource("slave")
public Long getTwoListCount(TPost tPost);
/**
* 回收站(状态1)
* @param tPost
* @return
*/
@DataSource("slave")
public List<TPost> getOneList(TPost tPost);
/**
* 回收站count
* @param tPost
* @return
*/
@DataSource("slave")
public Long getOneListCount(TPost tPost);
/**
* 删除(更改状态)
* @param tPost
* @return
*/
public Integer updatePostStatus(TPost tPost);
/**
* 根据tid查询帖子评论
* @param tid
* @return
*/
@DataSource("slave")
public List<TPost> getPostPostComment(Long tid);
}
| [
"641013587@qq.com"
] | 641013587@qq.com | |
ac110bed5e467529709dd6d62700bc32fbdc7c71 | 421f0a75a6b62c5af62f89595be61f406328113b | /generated_tests/no_seeding/110_firebird-org.firebirdsql.encodings.Encoding_OneByte-1.0-1/org/firebirdsql/encodings/Encoding_OneByte_ESTest.java | 84714c1e60644f9b35be417c88ceb4299a186d21 | [] | no_license | tigerqiu712/evosuite-model-seeding-empirical-evaluation | c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6 | 11a920b8213d9855082d3946233731c843baf7bc | refs/heads/master | 2020-12-23T21:04:12.152289 | 2019-10-30T08:02:29 | 2019-10-30T08:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 663 | java | /*
* This file was automatically generated by EvoSuite
* Mon Oct 28 14:10:51 GMT 2019
*/
package org.firebirdsql.encodings;
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(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class Encoding_OneByte_ESTest extends Encoding_OneByte_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pderakhshanfar@bsr01.win.tue.nl"
] | pderakhshanfar@bsr01.win.tue.nl |
8c86a77cbb62835fb82c181133067591ce82cffa | fbaf1fe2e54e9070cabb3c006472799ae254b65f | /printout7/app/src/main/java/com/example/printout/MenuActivity.java | 22fcde45262dcf55449293a69c3f0ca82da518a2 | [] | no_license | testkkj/Android-L | 15326224bf2a89162ac26358d3cd8a38e1284f1c | b6c3a35517b211774f4c4c0cefafb70b0c4dd085 | refs/heads/master | 2020-07-18T11:47:52.818728 | 2019-10-15T00:37:27 | 2019-10-15T00:37:27 | 171,922,561 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,511 | java | package com.example.printout;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MenuActivity extends AppCompatActivity {
TextView textView;
public static final String KEY_BOOK_DATA = "data";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_menu);
textView = findViewById(R.id.textView);
Button button = findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.putExtra("name", "mike");
setResult(RESULT_OK, intent);
finish();
}
});
Intent intent = getIntent();
processIntent(intent);
}
private void processIntent(Intent intent) {
if (intent != null) {
Bundle bundle = intent.getExtras();
BookData bookData = bundle.getParcelable(KEY_BOOK_DATA);
if (intent != null) {
textView.setText("전달받은데이터\n순번 : " + bookData.number + "\n제목 : " + bookData.title + "\n저자 : " + bookData.author + "\n출판사 : " + bookData.publisher + "\n가격 : " + bookData.price);
}
}
}
}
| [
"kimkj1212@naver.com"
] | kimkj1212@naver.com |
203ad41daab15ab02f9115e01d0d76a4cf73050b | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/tencent/mm/plugin/wallet/balance/a/a/p$c.java | 325b57f549ff55bcd4d9f1047468adf1c149a91f | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,720 | java | package com.tencent.mm.plugin.wallet.balance.a.a;
import com.tencent.mm.plugin.wallet.balance.a.a.o.4;
import com.tencent.mm.plugin.wallet_core.model.Bankcard;
import com.tencent.mm.protocal.c.bdm;
import com.tencent.mm.sdk.platformtools.x;
import com.tencent.mm.vending.g.g;
import com.tencent.mm.vending.h.e;
import com.tencent.mm.vending.j.d;
public class p$c implements e<bdm, d<Integer, Integer, Bankcard>> {
final /* synthetic */ p oZz;
public p$c(p pVar) {
this.oZz = pVar;
}
public final /* synthetic */ Object call(Object obj) {
d dVar = (d) obj;
o oVar = this.oZz.oZu;
int intValue = ((Integer) dVar.get(0)).intValue();
int intValue2 = ((Integer) dVar.get(1)).intValue();
Bankcard bankcard = (Bankcard) dVar.get(2);
String str = "MicroMsg.LqtSaveFetchLogic";
String str2 = "saveLqt, accountType: %s, bankcard: %s";
Object[] objArr = new Object[2];
objArr[0] = Integer.valueOf(intValue2);
objArr[1] = bankcard != null ? bankcard.field_bindSerial : "";
x.i(str, str2, objArr);
x.d("MicroMsg.LqtSaveFetchLogic", "saveLqt, amount: %s", new Object[]{Integer.valueOf(intValue)});
String stringExtra = oVar.oZm.getIntent().getStringExtra("lqt_save_fund_code");
str = oVar.oZm.getIntent().getStringExtra("lqt_fund_spid");
oVar.oZo = intValue;
oVar.accountType = intValue2;
oVar.oZm.jh(true);
g.a(g.a(stringExtra, str, Integer.valueOf(intValue), Integer.valueOf(intValue2)).c(oVar.oZl.oZd).c(new 4(oVar)).c(new o$3(oVar, bankcard)).a(new o$1(oVar)));
return null;
}
public final String xr() {
return "Vending.UI";
}
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
b6958f1b96f1d8ad06f662f4060d70c1e4b58e2f | 3c0a799ccd177bb4cec3060262f2fc699a94dc18 | /java8/java8-stream/src/lesson1/test.java | 3a8731b9d8c1224b727b2b72b9425d8b35e4eed1 | [] | no_license | gaohanghang/technology | 6c855a0b17c85940affdd67df807dd2106f5087c | f7de7153e1b9805a0cae5fea894bd9ba54627b97 | refs/heads/master | 2022-10-04T10:13:11.942340 | 2022-09-27T17:45:01 | 2022-09-27T17:45:01 | 125,711,791 | 1 | 2 | null | 2022-05-22T15:08:41 | 2018-03-18T09:58:35 | Java | UTF-8 | Java | false | false | 436 | java | package lesson1;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
/**
* @author: Gao HangHang
* @date 2018/10/07
*/
public class test {
public static void main(String[] args) {
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime time = LocalDateTime.now();
String localTime = df.format(time);
System.out.println(localTime);
}
}
| [
"1341947277@qq.com"
] | 1341947277@qq.com |
15f80cb6808f744d09ecb099fec012b26ea22946 | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /Honor5C-7.0/src/main/java/android/hardware/fmradio/FmRxEvCallbacks.java | 8a82447b176cfc6948b2d49e8da55307a471d2bc | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 595 | java | package android.hardware.fmradio;
interface FmRxEvCallbacks {
void FmRxEvDisableReceiver();
void FmRxEvEnableReceiver();
void FmRxEvRadioReset();
void FmRxEvRadioTuneStatus(int i);
void FmRxEvRdsAfInfo();
void FmRxEvRdsGroupData();
void FmRxEvRdsLockStatus(boolean z);
void FmRxEvRdsPsInfo();
void FmRxEvRdsRtInfo();
void FmRxEvSearchComplete(int i);
void FmRxEvSearchInProgress();
void FmRxEvSearchListComplete();
void FmRxEvServiceAvailable(boolean z);
void FmRxEvSignalUpdate();
void FmRxEvStereoStatus(boolean z);
}
| [
"dstmath@163.com"
] | dstmath@163.com |
275d00ef94056d06b84e65e95ca419a69e43bbe2 | b442604a86e5d3695fc060e8fa5d5fdaa2b666d2 | /1/nm-service-manage-course/src/main/java/com/ningmeng/manage_course/dao/CourseMapper.java | 3d0912c1616c5d4ac39fa1e252b8ad1892b3f570 | [] | no_license | 1704AClass/jiang | c57c4a75a7c002e2599e9c79d654591ec2a87a83 | dbd7b83f3c682f936a14f43297b3ef97b893959a | refs/heads/dev | 2022-12-12T03:26:27.321082 | 2020-03-18T03:10:17 | 2020-03-18T03:10:17 | 240,629,297 | 0 | 0 | null | 2022-11-24T06:27:37 | 2020-02-15T01:52:03 | Java | UTF-8 | Java | false | false | 542 | java | package com.ningmeng.manage_course.dao;
import com.github.pagehelper.Page;
import com.ningmeng.framework.domain.course.CourseBase;
import com.ningmeng.framework.domain.course.ext.CourseInfo;
import org.apache.ibatis.annotations.Mapper;
/**
* Created by Administrator.
*/
@Mapper
public interface CourseMapper {
CourseBase findCourseBaseById(String id);
/**
* 后台用户登录进来 根据公司不同区分课程区别
* @param companyId
* @return
*/
Page<CourseInfo> findCourseListPage(String companyId);
}
| [
"you@example.com"
] | you@example.com |
44759cc6b5cb11b131c765df1cbb8f75f4f80cd6 | e1e0795d53d1b1d4b6d5178825c8bcfbe8c44561 | /rxjava3/src/main/java/io/smallrye/mutiny/converters/uni/ToSingleWithDefault.java | 8c620962ea7559033ec982645bc9109afea3df43 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | geoand/smallrye-mutiny | 4d6e4c9ec8a8fa77ae1d2a4e106fdcc8c0d32852 | e4a6e411e5fea4dc54166e31f23ada5adcf680e3 | refs/heads/master | 2023-03-10T20:23:46.471279 | 2022-05-10T17:24:00 | 2022-05-10T17:24:00 | 228,791,542 | 0 | 0 | Apache-2.0 | 2023-03-10T09:02:57 | 2019-12-18T08:18:01 | Java | UTF-8 | Java | false | false | 539 | java | package io.smallrye.mutiny.converters.uni;
import java.util.function.Function;
import io.reactivex.rxjava3.core.Single;
import io.smallrye.mutiny.Uni;
public class ToSingleWithDefault<T> implements Function<Uni<T>, Single<T>> {
private final T defaultValue;
public ToSingleWithDefault(T defaultValue) {
this.defaultValue = defaultValue;
}
@Override
public Single<T> apply(Uni<T> uni) {
return Single.fromPublisher(uni.onItem().ifNull().continueWith(defaultValue).convert().toPublisher());
}
}
| [
"clement@apache.org"
] | clement@apache.org |
a28312900d05b253392df9216ade78fd8b451639 | 4e50a70c4513619e60e3ba6d5a50813b082bcaf5 | /ca-api/src/main/java/org/xipki/ca/api/mgmt/CtlogControl.java | b03988634b0403a2585e4c1c489d1e7130a2cf8d | [
"Apache-2.0"
] | permissive | hoggmania/xipki | e87dee2e86131aa0d062835d4e7090d3d8596861 | 93824ff1034f59c1bdd2ed6200398673581c604d | refs/heads/master | 2023-04-06T07:19:38.792670 | 2020-03-15T16:21:57 | 2020-03-15T16:21:57 | 247,776,526 | 0 | 0 | Apache-2.0 | 2023-04-04T00:54:59 | 2020-03-16T17:24:47 | null | UTF-8 | Java | false | false | 4,089 | java | /*
*
* Copyright (c) 2013 - 2020 Lijun Liao
*
* 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.xipki.ca.api.mgmt;
import java.util.Arrays;
import java.util.List;
import org.xipki.util.Args;
import org.xipki.util.ConfPairs;
import org.xipki.util.InvalidConfException;
import org.xipki.util.StringUtil;
/**
* Certificate Transparency Log control.
* Currently is only a place holder. Need to be implemented in a later version.
* @author Lijun Liao
*/
public class CtlogControl {
/**
* Whether CTLog is enabled: true or false.
*/
public static final String KEY_ENABLED = "enabled";
/**
* ';'-separated URL of the CT Log servers.
*/
public static final String KEY_SERVERS = "servers";
/**
* The name of SSL context.
*/
public static final String KEY_SSLCONTEXT_NAME = "sslcontext.name";
private boolean enabled;
private String sslContextName;
private List<String> servers;
private String conf;
public CtlogControl(String conf) throws InvalidConfException {
ConfPairs pairs = new ConfPairs(Args.notNull(conf, "conf"));
enabled = getBoolean(pairs, KEY_ENABLED, false);
// normalize the pairs
pairs.putPair(KEY_ENABLED, Boolean.toString(enabled));
sslContextName = pairs.value(KEY_SSLCONTEXT_NAME);
String serverList = pairs.value(KEY_SERVERS);
servers = serverList == null ? null : Arrays.asList(serverList.split(";"));
if (servers == null || servers.isEmpty()) {
throw new InvalidConfException(KEY_SERVERS + " is not specified");
}
this.conf = pairs.getEncoded();
} // constructor
public CtlogControl(Boolean enabled, List<String> servers, String sslContextName)
throws InvalidConfException {
Args.notEmpty(servers, "servers");
ConfPairs pairs = new ConfPairs();
this.enabled = (enabled == null) ? false : enabled;
pairs.putPair(KEY_ENABLED, Boolean.toString(this.enabled));
pairs.putPair(KEY_SERVERS, StringUtil.collectionAsString(servers, ";"));
this.servers = servers;
this.sslContextName = sslContextName;
if (sslContextName != null) {
pairs.putPair(KEY_SSLCONTEXT_NAME, sslContextName);
}
this.conf = pairs.getEncoded();
} // constructor
public boolean isEnabled() {
return enabled;
}
public String getConf() {
return conf;
}
public String getSslContextName() {
return sslContextName;
}
public void setSslContextName(String sslContextName) {
this.sslContextName = sslContextName;
}
public List<String> getServers() {
return servers;
}
public void setServers(List<String> servers) {
this.servers = servers;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public void setConf(String conf) {
this.conf = conf;
}
@Override
public int hashCode() {
return conf.hashCode();
}
@Override
public String toString() {
return StringUtil.concatObjects(
" enabled: ", enabled,
"\n SSL context name: ", sslContextName,
"\n Servers: ", servers);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
} else if (!(obj instanceof CtlogControl)) {
return false;
}
return conf.equals(((CtlogControl) obj).conf);
}
private static boolean getBoolean(ConfPairs pairs, String key, boolean defaultValue) {
String str = pairs.value(key);
boolean ret = StringUtil.isBlank(str) ? defaultValue : Boolean.parseBoolean(str);
pairs.putPair(key, Boolean.toString(ret));
return ret;
} // method getBoolean
}
| [
"lijun.liao@gmail.com"
] | lijun.liao@gmail.com |
0e673b3e8d16d4519fbf9d3937ca0c1fb15c9c35 | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.appsafety-AppSafety/sources/java/lang/IndexOutOfBoundsException.java | 0ace029ef181a4c028ebd2a9a956b7c007871700 | [] | no_license | phwd/quest-tracker | 286e605644fc05f00f4904e51f73d77444a78003 | 3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba | refs/heads/main | 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null | UTF-8 | Java | false | false | 280 | java | package java.lang;
public class IndexOutOfBoundsException extends RuntimeException {
private static final long serialVersionUID = 234122996006267687L;
public IndexOutOfBoundsException() {
}
public IndexOutOfBoundsException(String s) {
super(s);
}
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
8d1a17ebfbbc871613ea44759e5e6e251243a9ad | a18d32695523092bfc3957be0eb628d7483b7101 | /src/main/java/com/google/security/zynamics/reil/translators/arm/ARMRfeTranslator.java | b5b9e09ebcd08a269e2a6bdcd8ef81e20fe2e699 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | vbatts/binnavi | 9c37ac74dbe3d9d676ade04a6c181b1b1626cc3e | a2a3fa4ebe4c7953f648072afb26a34408256bbf | refs/heads/master | 2021-01-15T22:53:07.507135 | 2015-08-20T14:00:52 | 2015-08-20T14:10:03 | 41,112,676 | 2 | 0 | null | 2015-08-20T18:35:42 | 2015-08-20T18:35:42 | null | UTF-8 | Java | false | false | 1,710 | java | /*
Copyright 2015 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.google.security.zynamics.reil.translators.arm;
import com.google.security.zynamics.reil.ReilHelpers;
import com.google.security.zynamics.reil.ReilInstruction;
import com.google.security.zynamics.reil.translators.IInstructionTranslator;
import com.google.security.zynamics.reil.translators.ITranslationEnvironment;
import com.google.security.zynamics.reil.translators.InternalTranslationException;
import com.google.security.zynamics.reil.translators.TranslationHelpers;
import com.google.security.zynamics.zylib.disassembly.IInstruction;
import java.util.List;
public class ARMRfeTranslator implements IInstructionTranslator {
/**
* RFE<addressing_mode> <Rn>{!}
*/
@Override
public void translate(final ITranslationEnvironment environment, final IInstruction instruction,
final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "RFE");
long baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);
instructions.add(ReilHelpers.createUnknown(baseOffset++));
}
}
| [
"cblichmann@google.com"
] | cblichmann@google.com |
6b6feef458157c5e4736a30d0fcda1594e1e7d35 | f790a10a2153a996e7f42066fdbbf424d6202ba8 | /src/main/java/com/jungle/app/config/LoggingAspectConfiguration.java | 3a0a66dcb757070577bedfedbc3fc9f7339fffba | [] | no_license | bigjungle/testaudit | 17fc41bd689808bd890b20bff721f6b812d9070c | 9a6fdce4a745ea411ae806fadcf2a6c3d6feb285 | refs/heads/master | 2020-05-03T02:19:10.541189 | 2019-04-01T05:19:34 | 2019-04-01T05:19:34 | 178,366,084 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 490 | java | package com.jungle.app.config;
import com.jungle.app.aop.logging.LoggingAspect;
import io.github.jhipster.config.JHipsterConstants;
import org.springframework.context.annotation.*;
import org.springframework.core.env.Environment;
@Configuration
@EnableAspectJAutoProxy
public class LoggingAspectConfiguration {
@Bean
@Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)
public LoggingAspect loggingAspect(Environment env) {
return new LoggingAspect(env);
}
}
| [
"ccpitcmp@outlook.com"
] | ccpitcmp@outlook.com |
a3eefc14f31698b1bc825d1f1cd648a8e8db6949 | 3dc2c549a3d55d031d21553f63c20c5a955d08d6 | /core/server/clientProject/commonClient/src/main/java/com/home/commonClient/net/response/scene/unit/UnitRemoveBuffResponse.java | eb60012ec3e01ffdde6e0b5c280e240a9ff38c14 | [
"Apache-2.0"
] | permissive | tangxiaohui/home3 | b4f5d0d356c86f9c1830d7a4a3ec4e8cf2092355 | a96b96734b7ac6e52558bc25e2ac1df35bc32617 | refs/heads/master | 2022-11-19T02:59:48.401298 | 2020-05-09T13:49:08 | 2020-05-09T13:49:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,989 | java | package com.home.commonClient.net.response.scene.unit;
import com.home.commonClient.constlist.generate.GameResponseType;
import com.home.commonClient.constlist.generate.MGameResponseType;
import com.home.commonClient.net.response.scene.base.SceneSResponse;
import com.home.commonClient.net.response.scene.base.UnitSResponse;
import com.home.shine.bytes.BytesReadStream;
import com.home.shine.support.DataWriter;
import com.home.shine.support.pool.DataPool;
/** 单位移除buff(generated by shine) */
public class UnitRemoveBuffResponse extends UnitSResponse
{
/** 数据类型ID */
public static final int dataID=GameResponseType.UnitRemoveBuff;
/** buff实例ID */
public int buffInstanceID;
public UnitRemoveBuffResponse()
{
_dataID=GameResponseType.UnitRemoveBuff;
}
/** 执行 */
@Override
protected void execute()
{
scene.getFightUnitAbs(instanceID).fight.getBuffLogic().removeBuffByInstanceID(buffInstanceID);
}
/** 获取数据类名 */
@Override
public String getDataClassName()
{
return "UnitRemoveBuffResponse";
}
/** 读取字节流(完整版) */
@Override
protected void toReadBytesFull(BytesReadStream stream)
{
super.toReadBytesFull(stream);
stream.startReadObj();
this.buffInstanceID=stream.readInt();
stream.endReadObj();
}
/** 读取字节流(简版) */
@Override
protected void toReadBytesSimple(BytesReadStream stream)
{
super.toReadBytesSimple(stream);
this.buffInstanceID=stream.readInt();
}
/** 转文本输出 */
@Override
protected void toWriteDataString(DataWriter writer)
{
super.toWriteDataString(writer);
writer.writeTabs();
writer.sb.append("buffInstanceID");
writer.sb.append(':');
writer.sb.append(this.buffInstanceID);
writer.writeEnter();
}
/** 回池 */
@Override
protected void toRelease(DataPool pool)
{
super.toRelease(pool);
this.buffInstanceID=0;
}
}
| [
"359944951@qq.com"
] | 359944951@qq.com |
a279390be02a344cba5d25107e7045f2cfae9dbf | 8baf913bee8d5e840aa51f050bebc37b1e3c7506 | /剑指offer/no.65/solution.java | 66ca8498d2e9b9fe59e499621ab4cc9fcbd4e267 | [] | no_license | MoriatyC/code | 460aa431b56a9e7806e8f743e2e6b345de0a745a | b97a4b263689a5cad43d7051a630df8ea0f06afc | refs/heads/master | 2020-05-20T22:33:58.545806 | 2018-07-23T06:56:32 | 2018-07-23T06:56:32 | 84,533,271 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,137 | java | import java.util.LinkedList;
import java.util.ArrayList;
public class Solution {
public static ArrayList<Integer> maxInWindows(int [] num, int size)
{
if (num == null || num.length == 0 || num.length < size || size <= 0) {
return new ArrayList<Integer>();
}
LinkedList<Integer> queue = new LinkedList<>();
for (int i = 0; i < size; i++) {
while (!queue.isEmpty() && num[i] >= num[queue.peekLast()]) {
queue.pollLast();
}
queue.offer(i);
}
ArrayList<Integer> ret = new ArrayList<>();
ret.add(num[queue.peek()]);
for (int i = size; i < num.length; i++) {
if (num[i] < num[queue.peekLast()]) {
queue.offer(i);
} else {
while (!queue.isEmpty() && num[i] >= num[queue.peekLast()]) {
queue.pollLast();
}
queue.offer(i);
}
if (i - queue.peek() >= size) {
queue.poll();
}
ret.add(num[queue.peek()]);
}
return ret;
}
} | [
"119889525@qq.com"
] | 119889525@qq.com |
b1c3338bbd7915d5540e42dae1dc1b3e12c95f88 | c4a14d70951d7ec5aac7fe7ebb2db891cfe6c0b1 | /modulos/apps/LOCALGIS-piroPlugins/src/main/java/pirolPlugIns/utilities/FormulaParsing/FormulaValue.java | 1777d6bf1f51afbba22525ae0fc2ef3a7a5ae64c | [] | no_license | pepeysusmapas/allocalgis | 925756321b695066775acd012f9487cb0725fcde | c14346d877753ca17339f583d469dbac444ffa98 | refs/heads/master | 2020-09-14T20:15:26.459883 | 2016-09-27T10:08:32 | 2016-09-27T10:08:32 | null | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 2,469 | java | /**
* FormulaValue.java
* © MINETUR, Government of Spain
* This program is part of LocalGIS
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Created on 23.06.2005 for PIROL
*
* CVS header information:
* $RCSfile: FormulaValue.java,v $
* $Revision: 1.1 $
* $Date: 2009/07/03 12:32:06 $
* $Source: /usr/cvslocalgis/.CVSROOT/localgisdos/core/src/pirolPlugIns/utilities/FormulaParsing/FormulaValue.java,v $
*/
package pirolPlugIns.utilities.FormulaParsing;
import pirolPlugIns.utilities.debugOutput.DebugUserIds;
import pirolPlugIns.utilities.debugOutput.PersonalLogger;
import com.vividsolutions.jump.feature.Feature;
/**
* Base class for each sub-formula or value of a formula, since we don't want to parse the formula again and again for each value...
*
* @author Ole Rahn
* <br>
* <br>FH Osnabrück - University of Applied Sciences Osnabrück,
* <br>Project: PIROL (2005),
* <br>Subproject: Daten- und Wissensmanagement
*
* @version $Revision: 1.1 $
*
*/
public abstract class FormulaValue {
protected PersonalLogger logger = new PersonalLogger(DebugUserIds.USER_Ole);
/**
* Returns the value (as a double) of this part of the formula.
* It may be the rsult of a sub-formula, a feature-specific attribute value or just a constant value...
* Since the value may depend on a feature, we give the feature to the method to get a unified interface...
*@return value of this part of the formula
*/
public abstract double getValue(Feature feature);
/**
* Helps to determine, if the value depends on a feature's attribute value.
* @return true, if the value depends on a feature
*/
public abstract boolean isFeatureDependent();
/**
* @inheritDoc
*/
public String toString(){
return "";
}
}
| [
"jorge.martin@cenatic.es"
] | jorge.martin@cenatic.es |
3a9dafddfea63150d59ea6e18aff895edc81d903 | 83e7feacfbc0276f0dd2081b2ab810697a6e817e | /org/spongepowered/asm/mixin/injection/code/ReadOnlyInsnList.java | fa1b7d3b2d0a1237552c50c7a04831e8344d8ad2 | [
"MIT"
] | permissive | BriceRoles/future | 0546e4569f2f2b5a689f77a856b6ff5c8b9eb039 | 0b21d02f7952e5d87c40264c9df7a2d16d1dd945 | refs/heads/main | 2023-06-18T22:56:09.730199 | 2021-07-19T01:23:34 | 2021-07-19T01:23:34 | 387,303,718 | 0 | 0 | MIT | 2021-07-19T01:17:42 | 2021-07-19T01:17:41 | null | UTF-8 | Java | false | false | 2,479 | java | package org.spongepowered.asm.mixin.injection.code;
import java.util.ListIterator;
import org.spongepowered.asm.lib.tree.AbstractInsnNode;
import org.spongepowered.asm.lib.tree.InsnList;
class ReadOnlyInsnList extends InsnList {
private InsnList insnList;
public ReadOnlyInsnList(InsnList insns) {
this.insnList = insns;
}
void dispose() {
this.insnList = null;
}
public final void set(AbstractInsnNode location, AbstractInsnNode insn) {
throw new UnsupportedOperationException();
}
public final void add(AbstractInsnNode insn) {
throw new UnsupportedOperationException();
}
public final void add(InsnList insns) {
throw new UnsupportedOperationException();
}
public final void insert(AbstractInsnNode insn) {
throw new UnsupportedOperationException();
}
public final void insert(InsnList insns) {
throw new UnsupportedOperationException();
}
public final void insert(AbstractInsnNode location, AbstractInsnNode insn) {
throw new UnsupportedOperationException();
}
public final void insert(AbstractInsnNode location, InsnList insns) {
throw new UnsupportedOperationException();
}
public final void insertBefore(AbstractInsnNode location, AbstractInsnNode insn) {
throw new UnsupportedOperationException();
}
public final void insertBefore(AbstractInsnNode location, InsnList insns) {
throw new UnsupportedOperationException();
}
public final void remove(AbstractInsnNode insn) {
throw new UnsupportedOperationException();
}
public AbstractInsnNode[] toArray() {
return this.insnList.toArray();
}
public int size() {
return this.insnList.size();
}
public AbstractInsnNode getFirst() {
return this.insnList.getFirst();
}
public AbstractInsnNode getLast() {
return this.insnList.getLast();
}
public AbstractInsnNode get(int index) {
return this.insnList.get(index);
}
public boolean contains(AbstractInsnNode insn) {
return this.insnList.contains(insn);
}
public int indexOf(AbstractInsnNode insn) {
return this.insnList.indexOf(insn);
}
public ListIterator<AbstractInsnNode> iterator() {
return this.insnList.iterator();
}
public ListIterator<AbstractInsnNode> iterator(int index) {
return this.insnList.iterator(index);
}
public final void resetLabels() {
this.insnList.resetLabels();
}
}
| [
"66845682+chrispycreme420@users.noreply.github.com"
] | 66845682+chrispycreme420@users.noreply.github.com |
c0819aa12609459dd173743bd28b33b27bd70a20 | 5bf2dbe9972276b71bd478eb504ca1e21af62df0 | /src/com/vaadin/external/atmosphere/build/VaadinAtmospherePreprocessor.java | d7de70fec58825f2749ed19768fd4d66503cc566 | [] | no_license | Artur-/atmosphere-vaadin-build | 695a063fadb4fc82488ab23acf9d2e15d6e70243 | a3fde0b7e0b2a6aec29326b0f566192233e07146 | refs/heads/master | 2021-01-10T22:01:34.316408 | 2013-10-11T10:20:08 | 2013-10-11T10:22:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,340 | java | package com.vaadin.external.atmosphere.build;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import com.vaadin.external.atmosphere.build.filefilter.FileFilter;
import com.vaadin.external.atmosphere.build.filefilter.JavascriptVersionUpdater;
import com.vaadin.external.atmosphere.build.filefilter.SLF4JPackageReferenceUpdater;
import com.vaadin.external.atmosphere.build.xmlfilefilter.AtmosphereDependencyUpdater;
import com.vaadin.external.atmosphere.build.xmlfilefilter.DistributionManagementFilter;
import com.vaadin.external.atmosphere.build.xmlfilefilter.GPGReleaseKeyReader;
import com.vaadin.external.atmosphere.build.xmlfilefilter.ProjectGroupIdFilter;
import com.vaadin.external.atmosphere.build.xmlfilefilter.SLF4JDependencyUpdater;
import com.vaadin.external.atmosphere.build.xmlfilefilter.SLF4JRemovalValidator;
import com.vaadin.external.atmosphere.build.xmlfilefilter.XMLFileFilter;
public class VaadinAtmospherePreprocessor {
public static void main(String[] args) throws Exception {
for (String dir : args) {
new VaadinAtmospherePreprocessor().preprocess(new File(dir));
}
}
private void preprocess(File projectDir) throws Exception {
List<FileFilter> fileFilters = new ArrayList<FileFilter>();
List<XMLFileFilter> xmlFilters = new ArrayList<XMLFileFilter>();
List<XMLFileFilter> validationFilters = new ArrayList<XMLFileFilter>();
xmlFilters.add(new ProjectGroupIdFilter(projectDir));
xmlFilters.add(new AtmosphereDependencyUpdater(projectDir));
xmlFilters.add(new DistributionManagementFilter(projectDir));
xmlFilters.add(new SLF4JDependencyUpdater(projectDir));
xmlFilters.add(new GPGReleaseKeyReader(projectDir));
validationFilters.add(new SLF4JRemovalValidator(projectDir));
fileFilters.add(new SLF4JPackageReferenceUpdater(projectDir));
fileFilters.add(new JavascriptVersionUpdater(projectDir));
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
Collection<File> files = listRecursively(projectDir);
for (File f : files) {
for (FileFilter filter : fileFilters) {
if (filter.needsProcessing(f)) {
filter.process(f);
}
}
for (XMLFileFilter filter : xmlFilters) {
Document doc = null;
if (filter.needsProcessing(f)) {
if (doc == null) {
DocumentBuilder dBuilder = dbFactory
.newDocumentBuilder();
doc = dBuilder.parse(f);
}
filter.process(f, doc);
}
}
for (XMLFileFilter filter : validationFilters) {
Document doc = null;
if (filter.needsProcessing(f)) {
if (doc == null) {
DocumentBuilder dBuilder = dbFactory
.newDocumentBuilder();
doc = dBuilder.parse(f);
}
filter.process(f, doc);
}
}
}
}
private Collection<File> listRecursively(File dir)
throws FileNotFoundException {
if (!dir.exists()) {
throw new FileNotFoundException("Directory " + dir.getPath()
+ " does not exist");
}
Collection<File> found = new ArrayList<File>();
for (File f : dir.listFiles()) {
if (f.isDirectory()) {
found.addAll(listRecursively(f));
} else {
found.add(f);
}
}
return found;
}
}
| [
"artur@vaadin.com"
] | artur@vaadin.com |
7dbe682dbad1bf3de8917f7f558e188ccecaa75c | 722ff6b6ab7039ee4136df8637ab3edfb4349b92 | /spring-boot-project/spring-boot/src/test/java/org/springframework/boot/validation/beanvalidation/MethodValidationExcludeFilterTests.java | 3976d5bbbd9f2110cc1c63643abf685904fb4677 | [
"Apache-2.0"
] | permissive | BradOselo/spring-boot | 77ee69e549032a73c183a1983b1840dc07b4c65e | 8a0bfef9bbf3ab94998fb9a1d3470c8648bdf916 | refs/heads/main | 2023-05-30T00:21:54.593214 | 2021-06-10T18:18:29 | 2021-06-10T18:18:29 | 375,946,993 | 3 | 0 | Apache-2.0 | 2021-06-11T07:51:57 | 2021-06-11T07:51:56 | null | UTF-8 | Java | false | false | 1,581 | java | /*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.validation.beanvalidation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link MethodValidationExcludeFilter}.
*
* @author Andy Wilkinson
*/
class MethodValidationExcludeFilterTests {
@Test
void byAnnotationWhenClassIsAnnotatedExcludes() {
MethodValidationExcludeFilter filter = MethodValidationExcludeFilter.byAnnotation(Indicator.class);
assertThat(filter.isExcluded(Annotated.class)).isTrue();
}
@Test
void byAnnotationWhenClassIsNotAnnotatedIncludes() {
MethodValidationExcludeFilter filter = MethodValidationExcludeFilter.byAnnotation(Indicator.class);
assertThat(filter.isExcluded(Plain.class)).isFalse();
}
static class Plain {
}
@Indicator
static class Annotated {
}
@Retention(RetentionPolicy.RUNTIME)
@interface Indicator {
}
}
| [
"pwebb@vmware.com"
] | pwebb@vmware.com |
b76d0bcfc512310c46d15d623a7403bb3d0af28f | 0345fe20fe8a7933320d8756fddfe019dd23a1c6 | /virtdata-lib-basics/src/test/java/io/nosqlbench/virtdata/library/basics/shared/conversions/from_double/ToStringTest.java | e6ed687be936c4b5972d9c02916da6a8b890046a | [
"Apache-2.0"
] | permissive | justinchuch/nosqlbench | 4b206e786cf7b29a124147e45fa661a5e820baac | 0e6cf4db1ab759f29d1744cf8516e215641a09e4 | refs/heads/master | 2023-04-07T17:18:16.521293 | 2020-05-01T17:54:48 | 2020-05-01T17:54:48 | 260,615,880 | 0 | 1 | Apache-2.0 | 2023-03-29T18:12:34 | 2020-05-02T04:49:03 | null | UTF-8 | Java | false | false | 1,912 | java | package io.nosqlbench.virtdata.library.basics.shared.conversions.from_double;
import org.junit.Test;
import java.util.function.DoubleFunction;
import java.util.function.DoubleUnaryOperator;
import java.util.function.Function;
import static org.assertj.core.api.Assertions.assertThat;
public class ToStringTest {
@Test
public void TestNoFunc() {
io.nosqlbench.virtdata.library.basics.shared.conversions.from_long.ToString f = new io.nosqlbench.virtdata.library.basics.shared.conversions.from_long.ToString();
assertThat(f.apply(1L)).isEqualTo("1");
}
@Test
public void TestDoubleUnaryOp() {
io.nosqlbench.virtdata.library.basics.shared.conversions.from_double.ToString f = new io.nosqlbench.virtdata.library.basics.shared.conversions.from_double.ToString(new DoubleUnaryOperator() {
@Override
public double applyAsDouble(double operand) {
return operand;
}
});
assertThat(f.apply(2L)).isEqualTo("2.0");
}
@Test
public void TestDoubleFunction() {
io.nosqlbench.virtdata.library.basics.shared.conversions.from_double.ToString f = new io.nosqlbench.virtdata.library.basics.shared.conversions.from_double.ToString(new DoubleFunction<Double>() {
@Override
public Double apply(double value) {
return value;
}
});
assertThat(f.apply(3L)).isEqualTo("3.0");
}
@Test
public void TestFunctionDoubleDouble() {
io.nosqlbench.virtdata.library.basics.shared.conversions.from_double.ToString f = new io.nosqlbench.virtdata.library.basics.shared.conversions.from_double.ToString(new Function<Double,Double>() {
@Override
public Double apply(Double aDouble) {
return aDouble;
}
});
assertThat(f.apply(4L)).isEqualTo("4.0");
}
} | [
"jshook@gmail.com"
] | jshook@gmail.com |
1120bcc08b0b2816a862d456302ad0d8f9fb8fcc | aae251092c6701cabd6a4d82c3be6280871eb679 | /app/build/generated/source/apt/release/com/app/aadhi/dashboard/testimonial/TestimonialListAdapter$CurrentEventVH_ViewBinding.java | 1a63c2fade4a4aadea4997989fd00a2341be105c | [] | no_license | kapw001/Aadhi | 9de633959de1adff841fb80c0beb8aee3423d3b9 | 180390dea27290c9ad53884c7bd33e2f473cec6b | refs/heads/master | 2020-03-23T14:43:32.079361 | 2018-08-04T05:07:04 | 2018-08-04T05:07:04 | 141,695,340 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,407 | java | // Generated code from Butter Knife. Do not modify!
package com.app.aadhi.dashboard.testimonial;
import android.support.annotation.CallSuper;
import android.support.annotation.UiThread;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import butterknife.Unbinder;
import butterknife.internal.Utils;
import com.app.aadhi.R;
import java.lang.IllegalStateException;
import java.lang.Override;
public class TestimonialListAdapter$CurrentEventVH_ViewBinding implements Unbinder {
private TestimonialListAdapter.CurrentEventVH target;
@UiThread
public TestimonialListAdapter$CurrentEventVH_ViewBinding(TestimonialListAdapter.CurrentEventVH target,
View source) {
this.target = target;
target.mName = Utils.findRequiredViewAsType(source, R.id.rv_testimonial_name, "field 'mName'", TextView.class);
target.mContent = Utils.findRequiredViewAsType(source, R.id.rv_testimonial_content, "field 'mContent'", TextView.class);
target.letter = Utils.findRequiredViewAsType(source, R.id.image_view, "field 'letter'", ImageView.class);
}
@Override
@CallSuper
public void unbind() {
TestimonialListAdapter.CurrentEventVH target = this.target;
if (target == null) throw new IllegalStateException("Bindings already cleared.");
this.target = null;
target.mName = null;
target.mContent = null;
target.letter = null;
}
}
| [
"kapw001@gmail.com"
] | kapw001@gmail.com |
19c1cde2c1e98bf975db4b11731003d12dda64a0 | 57c51f5d694a2452b7ca0234b894c4cc0c14bf89 | /com.gcplot.api/src/main/java/com/gcplot/repository/RolesRepository.java | d11790febcb7f80a37f2fe09b0a5718af2963927 | [
"Apache-2.0"
] | permissive | bubble501/gcplot | bce65054dd0a3d32ab30f056b6d8cd664743c9c9 | 9f0896c63fcb74f1ba1e3f411fa45b20074b8487 | refs/heads/master | 2021-01-27T19:30:42.074610 | 2020-03-02T05:41:12 | 2020-03-02T05:41:12 | 243,486,372 | 0 | 0 | Apache-2.0 | 2020-02-27T09:57:09 | 2020-02-27T09:57:09 | null | UTF-8 | Java | false | false | 445 | java | package com.gcplot.repository;
import com.gcplot.Identifier;
import com.gcplot.model.role.Role;
import java.util.List;
import java.util.Optional;
/**
* @author <a href="mailto:art.dm.ser@gmail.com">Artem Dmitriev</a>
* 8/14/16
*/
public interface RolesRepository {
List<Role> roles();
List<Role> defaultRoles();
Optional<Role> role(Identifier identifier);
Role store(Role role);
void delete(Role role);
}
| [
"art.dm.ser@gmail.com"
] | art.dm.ser@gmail.com |
7233e44edd263521878df097f7fd02ba832f6f01 | 0acabd81d062e9b34ab172249ce3180bf55b526a | /src/main/java/com/huaxu/core/curr/basic/B_Future/ConnectionPool.java | afa635af6c8a2faac68bd99d5d2cef870ac3208b | [] | no_license | BlHole/core | 445f87c12a4c47f42aa0548b2a24342109d5b713 | 97441613c9c9e39738af22c7188c6b01e9044c17 | refs/heads/master | 2022-05-30T12:39:44.207637 | 2020-04-01T10:21:10 | 2020-04-01T10:21:10 | 229,370,125 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,309 | java | package com.huaxu.core.curr.basic.B_Future;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;
public class ConnectionPool {
private ConcurrentHashMap<String, FutureTask<Connection>> pool = new ConcurrentHashMap<String, FutureTask<Connection>>();
public Connection getConnection(String key) throws InterruptedException, ExecutionException {
FutureTask<Connection> connectionTask = pool.get(key);
if (connectionTask != null) {
return connectionTask.get();
} else {
Callable<Connection> callable = new Callable<Connection>() {
@Override
public Connection call() throws Exception {
return createConnection();
}
};
FutureTask<Connection> newTask = new FutureTask<>(callable);
connectionTask = pool.putIfAbsent(key, newTask);
if (connectionTask == null) {
connectionTask = newTask;
connectionTask.run();
}
return connectionTask.get();
}
}
public Connection createConnection() {
return new Connection();
}
class Connection {}
} | [
"tshy0425@hotmail.com"
] | tshy0425@hotmail.com |
93f2b50c5dfd9e7f658b85ca5ae4faa9869d1f93 | e8d17fe9fcba653d74ac538b793d8f9ae2fa6185 | /crm-customer/src/test/java/com/deppon/crm/module/customer/server/dao/impl/CustCreditDaoImplTest.java | 19fb2224b4efb92cf577f9e1736ff97955a884d1 | [] | no_license | xfu00013/crm-1 | 06ef85141dac69569e9fc2ef0ab7010cffbcbd53 | d809a722a3d8d06f643f3d96e02932539ce2212f | refs/heads/master | 2021-01-21T18:46:46.212043 | 2014-06-05T06:27:07 | 2014-06-05T06:27:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,588 | java | package com.deppon.crm.module.customer.server.dao.impl;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import com.deppon.crm.module.customer.server.util.BeanUtil;
import com.deppon.crm.module.customer.shared.domain.CustCredit;
import com.deppon.crm.module.customer.shared.domain.CustCreditConfig;
public class CustCreditDaoImplTest extends BeanUtil{
public void setUp(){
}
public void tearDown(){
}
@Test
public void testgetCustCreditByCustId(){
custCreditDao.getCustCreditByCustId("40001944");
}
@Test
public void testupdateCustCreditConfig(){
CustCreditConfig config =custCreditDao.getCustCreditConfig();
custCreditDao.updateCustCreditConfig(config);
}
@Test
public void testgetCustBadCreditList(){
custCreditDao.getCustBadCreditList();
}
@Test
public void testgetCustBadCreditExcelList(){
custCreditDao.getCustBadCreditExcelList();
}
@Test
public void testupdateEarlyWarnInfo(){
custCreditDao.updateEarlyWarnInfo("1",true);
}
@Test
public void testgetCustCreditListByCondition(){
CustCredit custCredit = new CustCredit();
custCredit.setId("1");
custCredit.setModifyUser("1");
custCreditDao.getCustCreditListByCondition(custCredit);
}
@Test
public void testgetManagementDeptList(){
custCreditDao.getManagementDeptList();
}
@Test
public void testgetBusDeptList(){
custCreditDao.getBusDeptList();
}
@Test
public void testgetBigAreaDeptList(){
custCreditDao.getBigAreaDeptList();
}
@Test
public void testgetAreaDeptList(){
custCreditDao.getAreaDeptList();
}
@Test
public void testgetResponsibilityDeptList(){
custCreditDao.getResponsibilityDeptList();
}
@Test
public void testgetCustCreditListByConditions(){
Map<String,String> map = new HashMap<String, String>();
custCreditDao.getCustCreditListByConditions(map, 0, 1);
custCreditDao.getCustCreditListByConditions(map, 0, -1);
}
@Test
public void testgetCustCreditListByOtherConditions(){
Map<String,String> map = new HashMap<String, String>();
map.put("deptId", "123");
map.put("beginDate", "2014-01-01");
map.put("endDate", "2014-01-01");
custCreditDao.getCustCreditListByOtherConditions(map, 0, 1);
}
@Test
public void testgetCustCreditListByBranch(){
Map<String, String> map = new HashMap<String, String>();
map.put("deptId", "123");
map.put("beginDate", "2014-01-01");
map.put("endDate", "2014-01-15");
custCreditDao.getCustCreditListByBranch(map);
}
@Test
public void testgetDeliverMoneyByCondtion(){
//TODO 太慢了
// custCreditDao.getDeliverMoneyByCondtion(new Date(), new Date());
}
}
| [
"605372707@qq.com"
] | 605372707@qq.com |
1ec1da387785f7c1fac70d3c1fb8b2a8ff0e11da | dc2a5e51eeb6961d1e5d0ebf5548ff7cd6be2cd6 | /gxt-gradle-app/src/main/theme/com/gawkat/customtheme/client/sliced/menu/SlicedMenuAppearance.java | 72519d0255c23f91f4cc28f3605fc2cf6716fdbe | [] | no_license | cgb-extjs-gwt/gxt-gradle | d3ebb801e351306337e1fc139596b9e5d315d279 | fc62bc82162f6d8b9fe535b5ed0b36e371d736c5 | refs/heads/master | 2023-07-31T14:22:13.850791 | 2017-03-28T23:19:27 | 2017-03-28T23:19:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,554 | java | /**
* Sencha GXT 4.0.2 - Sencha for GWT
* Copyright (c) 2006-2016, Sencha Inc.
*
* licensing@sencha.com
* http://www.sencha.com/products/gxt/license/
*
* ================================================================================
* Commercial License
* ================================================================================
* This version of Sencha GXT is licensed commercially and is the appropriate
* option for the vast majority of use cases.
*
* Please see the Sencha GXT Licensing page at:
* http://www.sencha.com/products/gxt/license/
*
* For clarification or additional options, please contact:
* licensing@sencha.com
* ================================================================================
*
*
*
*
*
*
*
*
* ================================================================================
* Disclaimer
* ================================================================================
* THIS SOFTWARE IS DISTRIBUTED "AS-IS" WITHOUT ANY WARRANTIES, CONDITIONS AND
* REPRESENTATIONS WHETHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE
* IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, MERCHANTABLE QUALITY,
* FITNESS FOR A PARTICULAR PURPOSE, DURABILITY, NON-INFRINGEMENT, PERFORMANCE AND
* THOSE ARISING BY STATUTE OR FROM CUSTOM OR USAGE OF TRADE OR COURSE OF DEALING.
* ================================================================================
*/
package com.gawkat.customtheme.client.sliced.menu;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.resources.client.ImageResource.ImageOptions;
import com.google.gwt.resources.client.ImageResource.RepeatStyle;
import com.gawkat.customtheme.client.base.menu.Css3MenuAppearance;
public class SlicedMenuAppearance extends Css3MenuAppearance {
public interface SlicedMenuResources extends Css3MenuResources {
@Override
@Source("SlicedMenu.gss")
SlicedMenuStyle style();
@Source("menu-bg.png")
@ImageOptions(repeatStyle = RepeatStyle.Vertical)
ImageResource background();
}
public interface SlicedMenuStyle extends Css3MenuStyle {
}
public SlicedMenuAppearance() {
this(GWT.<SlicedMenuResources>create(SlicedMenuResources.class));
}
public SlicedMenuAppearance(SlicedMenuResources resources) {
this(resources, GWT.<BaseMenuTemplate>create(BaseMenuTemplate.class));
}
public SlicedMenuAppearance(SlicedMenuResources resources, BaseMenuTemplate template) {
super(resources, template);
}
}
| [
"branflake2267@gmail.com"
] | branflake2267@gmail.com |
43bdfce23f14a171d42b5c7f153f18809d21ca60 | 5a5321d2c62ecd9db9417c82b49eb340ae065829 | /src/main/java/com/digitalpebble/storm/fetchqueue/ShardedQueue.java | 67e5f07a772756684bde8bb21a403254847a4a72 | [] | no_license | diogenesjf/storm-crawler | c5d8912a2e4a1499300c2ca4554a35702fe58445 | 904d2ba8f0723989dedcd8f987df716a3ab4238d | refs/heads/master | 2020-04-06T06:37:31.814975 | 2014-02-17T11:28:09 | 2014-02-17T11:28:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,391 | java | package com.digitalpebble.storm.fetchqueue;
import java.net.InetAddress;
import java.net.URL;
import java.util.concurrent.LinkedBlockingQueue;
import com.digitalpebble.storm.crawler.util.Configuration;
/**
* Generic wrapper for ShardedQueue implementations. This can be called by a URL
* injector or a bolt to mark URLs to be fetched and is consumed by
* a Spout. Ideally the implementations of this class must be sharded in order
* to ensure that the spout which will use it gets a good distribution of URLs.
* The method getHashForURL can be used for that.
**/
public abstract class ShardedQueue {
public static final String implementationparamName = "stormcrawler.shardedQueue.class";
protected abstract void init(Configuration conf) throws Exception;
public static int getHashForURL(String url, int queueNumber) {
String ip = null;
try {
URL target = new URL(url);
String host = target.getHost();
final InetAddress addr = InetAddress.getByName(host);
ip = addr.getHostAddress();
} catch (Exception e) {
return -1;
}
return (ip.hashCode() & Integer.MAX_VALUE) % queueNumber;
}
// push a URL to the queue
public abstract void add(String url);
/** Returns the number of shards used by this queue **/
public abstract int getNumShards();
// used for ack
public abstract void deleteMessage(int queueNumber, String msgID);
// used for fail
public abstract void releaseMessage(int queueNumber, String msgID);
public abstract void fillQueue(int queueNumber,
LinkedBlockingQueue<Message> currentQ);
public abstract void close();
/**
* Returns an instance of a ShardedQueue based on the classes specified in
* the configuration
*
* @throws IllegalAccessException
* @throws InstantiationException
**/
public static ShardedQueue getInstance(Configuration conf) throws Exception {
String className = conf.get(implementationparamName);
if (className == null)
throw new RuntimeException(
"'+implementationparamName+' undefined in config");
Class<?> queueClass = Class.forName(className);
boolean interfaceOK = ShardedQueue.class.isAssignableFrom(queueClass);
if (!interfaceOK) {
throw new RuntimeException("Class " + className
+ " does not extend ShardedQueue");
}
ShardedQueue queueInstance = (ShardedQueue) queueClass.newInstance();
queueInstance.init(conf);
return queueInstance;
}
}
| [
"julien@digitalpebble.com"
] | julien@digitalpebble.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.