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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
857897c6112cc49854d0542e2cb21c1c86eb33b0
|
1b002ae0da4bdc03cb2a6921fecea024aa4b92de
|
/components/common/src/main/java/org/limewire/util/StringBuilderWriter.java
|
03f56bbccff03f10afd31b259f652d5e090e3729
|
[] |
no_license
|
jeromemorignot/frostwire-desktop
|
afd4928381423a075cd2685be7ed875181ed3f84
|
efa422b9f56b4ebfcbe102f553138ccd204bd3c9
|
refs/heads/master
| 2021-01-18T14:38:47.078912
| 2013-08-31T22:05:34
| 2013-08-31T22:05:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,511
|
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.limewire.util;
import java.io.Serializable;
import java.io.Writer;
/**
* {@link Writer} implementation that outputs to a {@link StringBuilder}.
* <p>
* <strong>NOTE:</strong> This implementation, as an alternative to
* <code>java.io.StringWriter</code>, provides an <i>un-synchronized</i>
* (i.e. for use in a single thread) implementation for better performance.
* For safe usage with multiple {@link Thread}s then
* <code>java.io.StringWriter</code> should be used.
*
* @version $Id$
* @since 2.0
*/
public class StringBuilderWriter extends Writer implements Serializable {
private static final long serialVersionUID = 8362333228424878505L;
private final StringBuilder builder;
/**
* Construct a new {@link StringBuilder} instance with default capacity.
*/
public StringBuilderWriter() {
this.builder = new StringBuilder();
}
/**
* Construct a new {@link StringBuilder} instance with the specified capacity.
*
* @param capacity The initial capacity of the underlying {@link StringBuilder}
*/
public StringBuilderWriter(int capacity) {
this.builder = new StringBuilder(capacity);
}
/**
* Construct a new instance with the specified {@link StringBuilder}.
*
* @param builder The String builder
*/
public StringBuilderWriter(StringBuilder builder) {
this.builder = builder != null ? builder : new StringBuilder();
}
/**
* Append a single character to this Writer.
*
* @param value The character to append
* @return This writer instance
*/
@Override
public Writer append(char value) {
builder.append(value);
return this;
}
/**
* Append a character sequence to this Writer.
*
* @param value The character to append
* @return This writer instance
*/
@Override
public Writer append(CharSequence value) {
builder.append(value);
return this;
}
/**
* Append a portion of a character sequence to the {@link StringBuilder}.
*
* @param value The character to append
* @param start The index of the first character
* @param end The index of the last character + 1
* @return This writer instance
*/
@Override
public Writer append(CharSequence value, int start, int end) {
builder.append(value, start, end);
return this;
}
/**
* Closing this writer has no effect.
*/
@Override
public void close() {
}
/**
* Flushing this writer has no effect.
*/
@Override
public void flush() {
}
/**
* Write a String to the {@link StringBuilder}.
*
* @param value The value to write
*/
@Override
public void write(String value) {
if (value != null) {
builder.append(value);
}
}
/**
* Write a portion of a character array to the {@link StringBuilder}.
*
* @param value The value to write
* @param offset The index of the first character
* @param length The number of characters to write
*/
@Override
public void write(char[] value, int offset, int length) {
if (value != null) {
builder.append(value, offset, length);
}
}
/**
* Return the underlying builder.
*
* @return The underlying builder
*/
public StringBuilder getBuilder() {
return builder;
}
/**
* Returns {@link StringBuilder#toString()}.
*
* @return The contents of the String builder.
*/
@Override
public String toString() {
return builder.toString();
}
}
|
[
"aldenml@gmail.com"
] |
aldenml@gmail.com
|
0f93baa4244ea97ae8c26be4d5c9e6cbb6dcf753
|
6a1c8540e81a34e315e10c1a33a1202d2f8db8ce
|
/AdControl/src/cn/adwalker/ad/control/service/DevIncomeTaskService.java
|
8bb4a91ac6d8ac73e411bd716ec2e42c09c64cd4
|
[] |
no_license
|
springwindyike/ad-server
|
7624a3129c705ce5cd97bfe983704d1f29b09889
|
c2878216505e5aea7222e830ad759a22fc6a22da
|
refs/heads/master
| 2021-12-11T05:29:26.909006
| 2016-10-24T02:48:55
| 2016-10-24T02:48:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,287
|
java
|
package cn.adwalker.ad.control.service;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Repository;
import cn.adwalker.ad.control.dao.OperationDevIncomeAuditDao;
import cn.adwalker.ad.control.util.DateUtils;
@Repository("devIncomeTaskService")
public class DevIncomeTaskService {
private static Logger log = Logger.getLogger(DevIncomeTaskService.class);
@Resource
private OperationDevIncomeAuditDao devIncomeAuditDao;
//生成四天前开发者收入数据
//1、当天内根据应用、广告分组
//2、取出成本金额、效果数据
//3、对现有数据进行merge操作,如果存在更新判断状态,是否已经确认,如果没确认,更新数据,已经确认原值不变。
//系统定时任务调用
public void tranceDevIncome() throws Exception {
log.info("开始----tranceDevIncome");
dataMain(DateUtils.getBeforeDay(-4));
log.info("结束----tranceDevIncome");
}
//测试调用
public void tranceDevIncome(String date) throws Exception {
dataMain(date);
}
//开发者收入定时器
public void dataMain(String date) throws Exception {
if (date != null) {
devIncomeAuditDao.updateDevIncome(new Object[] {date + " 00:00:00",date + " 00:00:00",0,date});
}
}
}
|
[
"13565644@qq.com"
] |
13565644@qq.com
|
355e059a2135e53a53872232b112851269d96746
|
e682fa3667adce9277ecdedb40d4d01a785b3912
|
/internal/fischer/mangf/A129372.java
|
fda2ed46654c8c090f8eb06d857e56bf8991ed3f
|
[
"Apache-2.0"
] |
permissive
|
gfis/joeis-lite
|
859158cb8fc3608febf39ba71ab5e72360b32cb4
|
7185a0b62d54735dc3d43d8fb5be677734f99101
|
refs/heads/master
| 2023-08-31T00:23:51.216295
| 2023-08-29T21:11:31
| 2023-08-29T21:11:31
| 179,938,034
| 4
| 1
|
Apache-2.0
| 2022-06-25T22:47:19
| 2019-04-07T08:35:01
|
Roff
|
UTF-8
|
Java
| false
| false
| 574
|
java
|
package irvine.oeis.a129;
// Generated by gen_seq4.pl trisumm/trisimple at 2023-06-09 19:35
import irvine.math.z.Z;
import irvine.oeis.triangle.BaseTriangle;
/**
* A129372 Triangle read by rows: T(n,k) = 1 if k divides n and n/k is odd, T(n,k) = 0 otherwise.
* @author Georg Fischer
*/
public class A129372 extends BaseTriangle {
/** Construct the sequence. */
public A129372() {
super(1, 1, 1);
hasRAM(true);
}
@Override
public Z triangleElement(final int n, final int k) {
return (n % k == 0 && (((n / k) & 1) == 1)) ? Z.ONE : Z.ZERO;
}
}
|
[
"dr.Georg.Fischer@gmail.com"
] |
dr.Georg.Fischer@gmail.com
|
bf938bb0015f85a32e06cd91cef51291918412b3
|
a500b8f800fe0b1df31cdea70358d9c1186d0de9
|
/src/org/obinject/sbbd2013/uniprot/EntityProtein.java
|
e8028c5c78ab0827e24b86551458249f6a100c47
|
[] |
no_license
|
joaorenno/obinject
|
e1c0d40e64b88e3eaa5114a0a9875524bbbf7c3a
|
e79a7993e5cdd308e3e6bafe11788807038bc4a2
|
refs/heads/master
| 2021-01-01T15:24:01.136442
| 2017-08-01T00:01:55
| 2017-08-01T00:18:02
| 20,874,558
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,280
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.obinject.sbbd2013.uniprot;
import org.obinject.meta.Entity;
import org.obinject.block.PullPage;
import org.obinject.block.PushPage;
import org.obinject.block.Page;
import org.obinject.meta.Uuid;
import org.obinject.storage.AbstractEntityStructure;
/**
*
* @author luiz
*/
public class EntityProtein extends Protein implements Entity<EntityProtein>
{
public static final Uuid classId = Uuid.fromString("5151145E-6155-4E28-88A0-A227207F2C02");
private Uuid uuid = Uuid.generator();
@Override
public boolean isEqual(EntityProtein entity)
{
return this.getAminoAcids().equals(entity.getAminoAcids());
}
@Override
public Uuid getUuid()
{
return uuid;
}
@Override
public boolean pullEntity(byte[] array, int position)
{
PullPage pull = new PullPage(array, position);
Uuid storedClass = pull.pullUuid();
if (classId.equals(storedClass) == true)
{
uuid = pull.pullUuid();
this.setAminoAcids(pull.pullString());
return true;
}
return false;
}
@Override
public void pushEntity(byte[] array, int position)
{
PushPage push = new PushPage(array, position);
push.pushUuid(classId);
push.pushUuid(uuid);
push.pushString(this.getAminoAcids());
}
@Override
public int sizeOfEntity()
{
return 2 * Page.sizeOfUuid
+ Page.sizeOfString(this.getAminoAcids());
}
@Override
public boolean inject() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public AbstractEntityStructure<EntityProtein> getEntityStructure() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean reject() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public boolean modify() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
}
|
[
"administrator@JOAORENNO-MacBook-Air.local"
] |
administrator@JOAORENNO-MacBook-Air.local
|
02beb97386c0e644b0d773a7a8718171874b2be4
|
c98c71bb5c1d63d0a7d96ef5d89f39ce304e754a
|
/andbase3x/andbase/src/main/java/com/andbase/library/view/recycler/AbSpaceItemHorizontalDecoration.java
|
c2d7a1841e8c7802519c765e6a13b0605d79d23e
|
[] |
no_license
|
edd1225/andbase3x
|
53e487f25c1944b77c158046645571c40357ec05
|
d9fc0db6cc10d58c7e52439a8713208e09924182
|
refs/heads/master
| 2020-03-21T01:57:41.542635
| 2018-05-28T10:22:28
| 2018-05-28T10:22:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 752
|
java
|
package com.andbase.library.view.recycler;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;
/**
* Copyright upu173.com
* Author 还如一梦中
* Date 2017/6/16 13:27
* Email 396196516@qq.com
* Info 水平 RecyclerView 边距设置
*/
public class AbSpaceItemHorizontalDecoration extends RecyclerView.ItemDecoration {
private int space;
public AbSpaceItemHorizontalDecoration(int space) {
this.space = space;
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
outRect.left = space/2;
outRect.top = space;
outRect.bottom = space;
outRect.right = space/2;
}
}
|
[
"zhaoqp2010@163.com"
] |
zhaoqp2010@163.com
|
e777b8359e2f5305386bba62fa084f1e96b390a4
|
7c87a85b35e47d4640283d12c40986e7b8a78e6f
|
/moneyfeed-user/moneyfeed-user-dal/src/main/java/com/newhope/moneyfeed/user/dal/dao/client/UcEbsOrganizesDao.java
|
1140b1a953fbf2f0d475310c1940644a27c42f0d
|
[] |
no_license
|
newbigTech/moneyfeed
|
191b0bd4c98b49fa6be759ed16817b96c6e853b3
|
2bd8bdd10ddfde3f324060f7b762ec3ed6e25667
|
refs/heads/master
| 2020-04-24T13:05:44.308618
| 2019-01-15T07:59:03
| 2019-01-15T07:59:03
| 171,975,920
| 0
| 3
| null | 2019-02-22T01:53:12
| 2019-02-22T01:53:12
| null |
UTF-8
|
Java
| false
| false
| 252
|
java
|
package com.newhope.moneyfeed.user.dal.dao.client;
import com.newhope.moneyfeed.user.api.bean.client.UcEbsOrganizesModel;
import com.newhope.moneyfeed.user.dal.BaseDao;
public interface UcEbsOrganizesDao extends BaseDao<UcEbsOrganizesModel> {
}
|
[
"505235893@qq.com"
] |
505235893@qq.com
|
2de910437b7f8bbdf1a4c1069a22979defa61c00
|
e3c912687a56e48fc7c6db2e95b644183f40b8f0
|
/src/test/java/iurii/job/interview/sorting/quick/QuickSortTest.java
|
8ac5a58489da1e7fa40f0b66211868738760fff0
|
[
"MIT"
] |
permissive
|
dataronio/algorithms-1
|
00e11b0483eef96ab1b39bd39e00ab412d8e1e2c
|
ab3e08bd16203b077f4a600e31794d6d73303d68
|
refs/heads/master
| 2022-02-06T19:43:57.936282
| 2021-09-18T22:47:01
| 2021-09-18T22:47:01
| 158,045,329
| 0
| 0
|
MIT
| 2020-03-09T22:06:21
| 2018-11-18T03:07:59
|
Java
|
UTF-8
|
Java
| false
| false
| 523
|
java
|
package iurii.job.interview.sorting.quick;
import iurii.job.interview.sorting.Utilities;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Created by iurii.dziuban on 01/08/2017.
*/
public class QuickSortTest {
@Test
public void test() {
int[] array = new QuickSort().sort(new int[]{9, 3, 6, 1, 4, 2, 5, 7, 8});
Utilities.println(array);
assertThat(array).containsExactly(1, 2, 3, 4, 5, 6, 7, 8, 9);
}
}
|
[
"ydzyuban@gmail.com"
] |
ydzyuban@gmail.com
|
572e15dee30e39c5fe8bf88cb8123a7e6c806b90
|
88f036937e330c5c111df0aa681f8a6339bdb644
|
/src/main/java/org/openstack4j/model/compute/Image.java
|
18a9523d2217c877fcf7e0eda0ea3e00981bdfe3
|
[
"MIT"
] |
permissive
|
esasisa/openstack4j
|
00009c5120383802ea4e3ae55decaba840c4e893
|
5554f598ada64517689e8a300a96a189871187cc
|
refs/heads/master
| 2020-12-24T17:54:41.138406
| 2014-07-23T07:27:30
| 2014-07-23T07:27:30
| 22,135,650
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,822
|
java
|
package org.openstack4j.model.compute;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.codehaus.jackson.annotate.JsonCreator;
import org.openstack4j.model.ModelEntity;
import org.openstack4j.model.common.Link;
/**
* An OpenStack image is a collection of files used to create a Server. Users provide pre-built OS images by default and or custom
* images can be built
*
* @author Jeremy Unruh
*/
public interface Image extends ModelEntity {
/**
* Status can be used while an image is being saved. It provides state of the progress indicator. Images with ACTIVE status
* are available for install.
*/
enum Status {
UNRECOGNIZED, UNKNOWN, ACTIVE, SAVING, ERROR, DELETED;
@JsonCreator
public static Status forValue(String value) {
if (value != null)
{
for (Status s : Status.values()) {
if (s.name().equalsIgnoreCase(value))
return s;
}
}
return Status.UNKNOWN;
}
}
/**
* @return the identifier of this image
*/
String getId();
/**
* @return the descriptive name of the image
*/
String getName();
/**
* @return the size in bytes
*/
long getSize();
/**
* @return the minimum disk in bytes
*/
int getMinDisk();
/**
* @return the minimum ram in bytes
*/
int getMinRam();
/**
* @return the progress of the image during upload or setup
*/
int getProgress();
/**
* @return the status of this image
*/
Status getStatus();
/**
* @return the date the image was created
*/
Date getCreated();
/**
* @return the date the image was last updated
*/
Date getUpdated();
/**
* @return external reference links for the image
*/
List<? extends Link> getLinks();
/**
* @return extra metadata/specs associated with the image
*/
Map<String, String> getMetaData();
}
|
[
"jeremyunruh@sbcglobal.net"
] |
jeremyunruh@sbcglobal.net
|
302c7cd58c72bf4e8593f6e3ed78dd1d6c07ed3d
|
2ab03c4f54dbbb057beb3a0349b9256343b648e2
|
/JavaOOPAdvanced/OpenClosedLiskov/src/interfaces/Logger.java
|
d4273d764064e4844682837802a6b866c015b2db
|
[
"MIT"
] |
permissive
|
tabria/Java
|
8ef04c0ec5d5072d4e7bf15e372e7c2b600a1cea
|
9bfc733510b660bc3f46579a1cc98ff17fb955dd
|
refs/heads/master
| 2021-05-05T11:50:05.175943
| 2018-03-07T06:53:54
| 2018-03-07T06:53:54
| 104,714,168
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 318
|
java
|
package interfaces;
public interface Logger {
void logError(String dateTime, String message);
void logInfo(String dateTime, String message);
void logCritical(String dateTime, String message);
void logFatal(String dateTime, String message);
void logWarning(String dateTime, String message);
}
|
[
"forexftg@yahoo.com"
] |
forexftg@yahoo.com
|
9b5258314ae61d1c08fad881b6a451f747ecfcf7
|
d7130fdaf51db9b45347aeb77188c1ee26d8e56e
|
/SecTweaks/app/src/main/java/com/leo/salt/fragment/EdgeScreen.java
|
5f68a2e8d19c39087bb9da024375a395b61ae47f
|
[] |
no_license
|
FusionPlmH/Fusion-Project
|
317af268c8bcb2cc6e7c30cf39a9cc3bc62cb84e
|
19ac1c5158bc48f3013dce82fe5460d988206103
|
refs/heads/master
| 2022-04-07T00:36:40.424705
| 2020-03-16T16:06:28
| 2020-03-16T16:06:28
| 247,745,495
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,329
|
java
|
package com.leo.salt.fragment;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.provider.Settings;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.util.SparseBooleanArray;
import android.view.MenuItem;
import android.widget.Toast;
import com.leo.salt.R;
import com.leo.salt.activity.SubActivity;
import com.leo.salt.base.BaseActivity;
import com.leo.salt.base.BasePreferenceFragment;
import com.leo.salt.preference.MyListPreference;
import com.leo.salt.preference.MyPreference;
import com.leo.salt.preference.MyPreferenceAlerts;
import com.leo.salt.utils.AndroidUtils;
import com.leo.salt.widget.LogDialog;
import static com.leo.salt.utils.Constants.safety;
import static com.leo.salt.utils.Utils.isLunarSetting;
import static com.leo.salt.utils.Utils.showKillPackageDialog;
public class EdgeScreen extends BasePreferenceFragment {
public String mod="leo_tweaks_update_mods_edge";
private MyPreferenceAlerts mMods;
@Override
public void onCreate(Bundle savedInstanceState ) {
super.onCreate(savedInstanceState);
// addPreferencesFromResource(R.xml.edge_screen_prefs);
BasePreferenceFragment( mContext , this, "edge_screen_prefs");
mMods = (MyPreferenceAlerts)findPreference(mod);
if(!isProKeyInstalled(getActivity().getApplicationContext())) disablePreferences();
}
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
Preference preference) {
if (preference == mMods) {
com.leo.salt.utils.Utils.killPackage("com.samsung.android.app.cocktailbarservice");
return true;
} else {
return super.onPreferenceTreeClick(preferenceScreen, preference);
}
}
@Override
public void onResume() {
super.onResume();
onResumeFragment();
}
@Override
public void onPause() {
super.onPause();
onPauseFragment();
}
public boolean isProKeyInstalled(Context context){
boolean isInstalled;
PackageManager packageManager = context.getPackageManager();
try {
PackageInfo pInfo1 = packageManager.getPackageInfo("", PackageManager.GET_SIGNATURES);
PackageInfo pInfo2 = packageManager.getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES);
isInstalled = pInfo1.signatures[0].toCharsString().equals(pInfo2.signatures[0].toCharsString());
} catch (PackageManager.NameNotFoundException e) {
isInstalled = false;
e.printStackTrace();
}
return isInstalled;
}
public void disablePreferences(){
if (AndroidUtils.getCustomOTA().equals(safety)) {
getPreferenceManager().findPreference("leo_tweaks_edge_apps").setEnabled(true);
getPreferenceManager().findPreference("leo_tweaks_edge_wifi").setEnabled(true);
getPreferenceManager().findPreference("leo_tweaks_edge_autostarts").setEnabled(true);
getPreferenceManager().findPreference("leo_tweaks_edge_floating").setEnabled(true);
getPreferenceManager().findPreference("leo_tweaks_edge_mipop").setEnabled(true);
getPreferenceManager().findPreference("leo_tweaks_edge_img").setEnabled(true);
getPreferenceManager().findPreference("leo_tweaks_edge_leo").setEnabled(true);
getPreferenceManager().findPreference("leo_tweaks_edge_clear").setEnabled(true);
getPreferenceManager().findPreference("leo_tweaks_edge_lock").setEnabled(true);
getPreferenceManager().findPreference("leo_tweaks_edge_text_color").setEnabled(true);
getPreferenceManager().findPreference("leo_tweaks_edge_text_size").setEnabled(true);
}else {
getPreferenceManager().findPreference("leo_tweaks_edge_apps").setEnabled(false);
getPreferenceManager().findPreference("leo_tweaks_edge_wifi").setEnabled(false);
getPreferenceManager().findPreference("leo_tweaks_edge_autostarts").setEnabled(false);
getPreferenceManager().findPreference("leo_tweaks_edge_floating").setEnabled(false);
getPreferenceManager().findPreference("leo_tweaks_edge_mipop").setEnabled(false);
getPreferenceManager().findPreference("leo_tweaks_edge_img").setEnabled(false);
getPreferenceManager().findPreference("leo_tweaks_edge_leo").setEnabled(false);
getPreferenceManager().findPreference("leo_tweaks_edge_clear").setEnabled(false);
getPreferenceManager().findPreference("leo_tweaks_edge_lock").setEnabled(false);
getPreferenceManager().findPreference("leo_tweaks_edge_text_color").setEnabled(false);
getPreferenceManager().findPreference("leo_tweaks_edge_text_size").setEnabled(false);
}
}
}
|
[
"1249014784@qq.com"
] |
1249014784@qq.com
|
271a5f79fc72f7e9e5755f926735e926a5d528a4
|
896cca57024190fc3fbb62f2bd0188fff24b24c8
|
/2.7.x/choicemaker-cm/choicemaker-common/com.choicemaker.cm.compiler/src/main/java/com/choicemaker/cm/compiler/gen/SrcNames.java
|
47e26b7f6689168e1bdd065462ee1d3fd97202a2
|
[] |
no_license
|
fgregg/cm
|
0d4f50f92fde2a0bed465f2bec8eb7f2fad8362c
|
c0ab489285938f14cdf0a6ed64bbda9ac4d04532
|
refs/heads/master
| 2021-01-10T11:27:00.663407
| 2015-08-11T19:35:00
| 2015-08-11T19:35:00
| 55,807,163
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,355
|
java
|
/*
* Copyright (c) 2001, 2009 ChoiceMaker Technologies, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License
* v1.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* ChoiceMaker Technologies, Inc. - initial API and implementation
*/
package com.choicemaker.cm.compiler.gen;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import com.choicemaker.cm.core.Constants;
/**
*
* @author
* @version $Revision: 1.1.1.1 $ $Date: 2009/05/03 16:02:36 $
*/
class SrcNames {
private int c;
private Map m;
SrcNames() {
c = 0;
m = new HashMap();
}
int getId(String name) {
if(name == null) {
name = "all";
}
Object o = m.get(name);
if (o != null) {
return ((Integer) o).intValue();
} else {
m.put(name, new Integer(++c));
return c;
}
}
String getDeclarations() {
StringBuffer b = new StringBuffer();
Iterator i = m.entrySet().iterator();
while (i.hasNext()) {
Map.Entry e = (Map.Entry) i.next();
b.append(
"private static DerivedSource __src"
+ e.getValue()
+ " = DerivedSource.valueOf(\""
+ e.getKey()
+ "\");" + Constants.LINE_SEPARATOR);
}
return b.toString();
}
}
|
[
"rick@rphall.com"
] |
rick@rphall.com
|
c71cd93c746de6a3508e5a9a6191dd6652bf1d82
|
e8c7dea8f2a5273becf9507b6b7a9026f2726009
|
/app/src/main/java/id/co/myproject/nicepos/adapter/LaporanTransaksiAdapter.java
|
7475e02ee8d63f9e26ca56f0f4ebecc1f36f9562
|
[] |
no_license
|
raihanArman/Nice-POS
|
2918e8e7c2eabd819b798fe5f4e63a3a6fb1426f
|
c8d67e9c36ee028f26b8be2d153ef0c2df1c9924
|
refs/heads/master
| 2022-11-25T15:32:07.780750
| 2020-07-28T10:48:27
| 2020-07-28T10:48:27
| 283,182,933
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,747
|
java
|
package id.co.myproject.nicepos.adapter;
import android.text.format.DateFormat;
import android.widget.TextView;
import com.app.feng.fixtablelayout.inter.IDataAdapter;
import java.util.List;
import id.co.myproject.nicepos.model.StrukTransaksi;
import static id.co.myproject.nicepos.util.Helper.rupiahFormat;
public class LaporanTransaksiAdapter implements IDataAdapter {
public String[] title = {"Tanggal","Kasir","Total Transaksi", "Total Bayar", "Total Kembalian"};
public List<StrukTransaksi> pesananList;
public static final String TAG = LaporanTransaksiAdapter.class.getSimpleName();
public LaporanTransaksiAdapter(List<StrukTransaksi> pesananList) {
this.pesananList = pesananList;
}
public void setPesananList(List<StrukTransaksi> pesananList) {
this.pesananList = pesananList;
}
@Override
public String getTitleAt(int i) {
return title[i];
}
@Override
public int getTitleCount() {
return title.length;
}
@Override
public int getItemCount() {
return pesananList.size();
}
@Override
public void convertData(int i, List<TextView> list) {
StrukTransaksi pesanan = pesananList.get(i);
list.get(1).setText(pesanan.getNamaKasir());
list.get(2).setText(rupiahFormat(Integer.parseInt(pesanan.getTotal())));
list.get(3).setText(rupiahFormat(Integer.parseInt(pesanan.getUangBayar())));
list.get(4).setText(rupiahFormat(Integer.parseInt(pesanan.getUangKembali())));
}
@Override
public void convertLeftData(int i, TextView textView) {
String date = DateFormat.format("dd MMM yyyy", pesananList.get(i).getTanggal()).toString();
textView.setText(date);
}
}
|
[
"raihanarman8@gmail.com"
] |
raihanarman8@gmail.com
|
49bd0cc5eafbbbfb3bf38116846a0a20b92005db
|
c673d3e107bdcb7e986c5074d6f7fd587e7e44e3
|
/gmall-MBG/src/main/java/com/duheng/gmall/ums/mapper/MemberStatisticsInfoMapper.java
|
0777608c87a8a92df89491b3fa1b015b831787d0
|
[] |
no_license
|
UserJustins/Gmalls
|
2f47a195b529fb1c10ac8d7248d314b90cf3dc08
|
7c7b28dcad50a842b805ea32999d4029a647afa5
|
refs/heads/master
| 2022-06-23T07:03:26.384770
| 2020-02-23T08:16:33
| 2020-02-23T08:16:33
| 234,525,787
| 0
| 0
| null | 2022-06-21T02:50:45
| 2020-01-17T10:26:25
|
Java
|
UTF-8
|
Java
| false
| false
| 343
|
java
|
package com.duheng.gmall.ums.mapper;
import com.duheng.gmall.ums.entity.MemberStatisticsInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 会员统计信息 Mapper 接口
* </p>
*
* @author DuHeng
* @since 2020-01-20
*/
public interface MemberStatisticsInfoMapper extends BaseMapper<MemberStatisticsInfo> {
}
|
[
"DuHeng@sina.com"
] |
DuHeng@sina.com
|
0d5693ec131dd7139a5cc71b9f3c51014125a202
|
956dc8dd670f9ec086cc526255af1b4f9f52b232
|
/Projectawt/src/awt/ButtonTest.java
|
3d1ae44f045635cfcaa6a60e61cf4580995627b6
|
[] |
no_license
|
taejoo1990/JavaPractice
|
5e0f64cad40dd96525aa282fcdd6d57914465e9b
|
220faecac05e3ea3262256ba107447075443f6cb
|
refs/heads/master
| 2023-03-07T17:35:15.448476
| 2021-02-17T09:15:52
| 2021-02-17T09:15:52
| 339,667,477
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 3,213
|
java
|
package awt;
import java.awt.Button;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class ButtonTest {
/*public static void main(String[] args) {
Frame f = new Frame("버튼 테스트");
f.setBounds(200, 200, 400, 400);
f.setLayout(null); //자동배치를 끈다.
//그 순간 frame에 추가되는 각각의 컴포넌트는 고유의 size()와
//location()을 갖고 있어야 한다.
Button btnOk = new Button("확인");
btnOk.setBounds(70, 90, 100, 50);
Button btnClose = new Button("닫기");
btnClose.setBounds(btnOk.getBounds());//btnOK와 같은 Bounds로 만든다
//btnOK와 같은 Bounds라면 버튼 두개가 겹쳐져서 표시되므로
//닫기버튼은 OK버튼의 오른쪽에 붙여 준다.
btnClose.setLocation(btnOk.getWidth()+btnOk.getX() + 60, btnOk.getY());
//버튼은 먼저 add할수록 화면 위쪽에 보여진다
f.add(btnOk);
f.add(btnClose);
f.setVisible(true);
//종료버튼 감지
f.addWindowListener( new WindowAdapter(){
@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
}
} );
}
}*/
public static void main(String[] args) {
Frame f = new Frame();
f.setBounds(800, 100, 1000, 500);
f.setLayout( new FlowLayout() );
Button btn1 = new Button("1");
Button btn2 = new Button("2");
Button btn3 = new Button("3");
Button btn4 = new Button("4");
//FlowLayout에서의 버튼 크기 변경은 이렇게 해줘야 한다.
//그냥 btn1.setSize(200, 100) 로는 변경 안됨
btn1.setPreferredSize(new Dimension(200, 100));
btn2.setPreferredSize(new Dimension(200, 100));
btn3.setPreferredSize(new Dimension(200, 100));
btn4.setPreferredSize(new Dimension(200, 100));
f.add(btn1);
f.add(btn2);
f.add(btn3);
f.add(btn4);
f.setVisible(true);
//이벤트 감지자 등록
btn1.addActionListener(al);
btn2.addActionListener(al);
btn3.addActionListener(al);
btn4.addActionListener(al);
//종료버튼 감지
f.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}//main
static ActionListener al = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
System.out.println( e.getActionCommand() ); //버튼에 부착되어 있는 제목
//System.out.println(e);
//System.out.println(e.getID());
//System.out.println( ((Button)e.getSource()).getWidth());
//버튼에 부착되어 있는 제목을 통해 어떤 버튼이 클릭되었는지 구별
if(e.getActionCommand().equals("1")){
System.out.println("1번 눌렀음");
}else if(e.getActionCommand().equals("2")){
System.out.println("2번 눌렀음");
}else if(e.getActionCommand().equals("3")){
System.out.println("3번 눌렀음");
}else if(e.getActionCommand().equals("4")){
System.out.println("4번 눌렀음");
}
System.out.println("--------------------------------");
}
};
}
|
[
"taejoo1990@google.com"
] |
taejoo1990@google.com
|
53d103c791383ac68c7e933e86714392b4617958
|
cb98c8b0caa9a5a768f4b5327b212ea7206aacec
|
/src/main/java/com/beifeng/transformer/mr/locations/LocationMapper.java
|
c414fae6a5568a8a6836a68ccea7b53666bafc06
|
[] |
no_license
|
yangzilong1986/bf_transformer
|
f8967aaa60c0ccbc0448d40c9d9866dd72d84ce4
|
42e083f73c89237ce864a105b9678e584af7a110
|
refs/heads/master
| 2021-04-26T23:47:12.333322
| 2017-11-27T11:56:29
| 2017-11-27T11:56:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,563
|
java
|
package com.beifeng.transformer.mr.locations;
import com.beifeng.common.DateEnum;
import com.beifeng.common.KpiType;
import com.beifeng.transformer.model.dim.StatsCommonDimension;
import com.beifeng.transformer.model.dim.StatsLocationDimension;
import com.beifeng.transformer.model.dim.base.DateDimension;
import com.beifeng.transformer.model.dim.base.KpiDimension;
import com.beifeng.transformer.model.dim.base.LocationDimension;
import com.beifeng.transformer.model.dim.base.PlatformDimension;
import com.beifeng.transformer.model.value.map.TextsOutputValue;
import com.beifeng.transformer.mr.TransformerBaseMapper;
import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.log4j.Logger;
import java.io.IOException;
import java.util.List;
/**
* Created by zhouning on 2017/11/21.
* desc:统计location维度信息的mapper类<br/>
* 输入:country, province, city, platform, serverTime, uuid, sid<br/>
* 一个输入对应6条输出
*/
public class LocationMapper extends TransformerBaseMapper<StatsLocationDimension, TextsOutputValue> {
private static final Logger logger = Logger.getLogger(LocationMapper.class);
private StatsLocationDimension outputKey = new StatsLocationDimension();
private TextsOutputValue outputValue = new TextsOutputValue();
private KpiDimension locationKpiDimension = new KpiDimension(KpiType.LOCATION.name);
@Override
protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException {
this.inputRecords++;
//获取平台名称,服务器时间,用户id,会话id
String platform = this.getPlatform(value);
String serverTime = this.getServerTime(value);
String uuid = this.getUuid(value);
String sid = this.getSessionId(value);
//过滤无效数据
if (StringUtils.isBlank(platform) || StringUtils.isBlank(uuid) || StringUtils.isBlank(sid) || StringUtils.isBlank(serverTime) || !StringUtils.isNumeric(serverTime.trim())) {
logger.warn("平台&uuid&&会话id&服务器时间不能为空,而且服务器时间必须为时间戳类型");
this.filterRecords++;
}
//时间维度创建
long longOfServerTime = Long.valueOf(serverTime);
DateDimension dateDimension = DateDimension.buildDate(longOfServerTime, DateEnum.DAY);
//platform维度创建
List<PlatformDimension> platformDimensions = PlatformDimension.buildList(platform);
//location维度创建
String country = this.getCountry(value);
String province = this.getProvince(value);
String city = this.getCity(value);
List<LocationDimension> locationDimensions = LocationDimension.buildList(country, province, city);
//进行输出定义
this.outputValue.setUuid(uuid);
this.outputValue.setSid(sid);
StatsCommonDimension statsCommon = this.outputKey.getStatsCommon();
statsCommon.setDate(dateDimension);
statsCommon.setKpi(this.locationKpiDimension);
for (PlatformDimension pf : platformDimensions) {
statsCommon.setPlatform(pf);
for (LocationDimension location : locationDimensions) {
this.outputKey.setLocation(location);
context.write(this.outputKey, this.outputValue);
this.outputRecrods++;
}
}
}
}
|
[
"ncutits@163.com"
] |
ncutits@163.com
|
d61a9d74ae545b6766265fef9ca36d0b5e83c4ce
|
107a4169de6501dc551b6575f3495240069484f2
|
/chapter10/src/pk10/Guide.java
|
7ccda9e84197511183aa403c1cfb9c92fcd7bde5
|
[] |
no_license
|
chaerim612/Java_1
|
816dc423ad76a84512be7f8430741b8fa1f65d2c
|
b927a583ecc0514005de205c80c521efd9c9e4e5
|
refs/heads/master
| 2023-06-16T12:44:20.990465
| 2021-07-14T08:06:22
| 2021-07-14T08:06:22
| 379,836,077
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,367
|
java
|
package pk10;
/*
스테틱 변수 point를 가지는 Guide클래스를 만들고,
이름과 성별 정보를 갖는 Guest 클래스를 만들어 아래의 결과가 나오도록 하는 로직을 구현
최초 실행시 등록할 관광객 수를 지정.
지정한 수 만큼 Guest클래스의 배열로 만듬
결과 :
관광객 수 : 2 (사용자가 입력)
관광객 등록
1. 이름 : 홍길동
1. 성별 : 남
--------------------------
2. 이름 : 홍길순
2. 성별 : 여
1. 관광객 정보
2. 목적지 변경
3. 종료
선택 >> 1
1. 이름 : 홍길동
1. 성별 : 남
1. 목적지 : 가거도
--------------------------------------
2. 이름 : 홍길순
2. 성별 : 여
2. 목적지 : 가거도
========================================
1. 관광객 정보
2. 목적지 변경
3. 종료
선택 >> 2
어디로 변경하시겠습니까 : 오이도
오이도로 목적지 변경
========================================
1. 관광객 정보
2. 목적지 변경
3. 종료
선택 >> 3
종료
*/
public class Guide {
static String point;
Guest[] guest;
//생성자에서 초기화
public Guide(int n) {
point="가거도";
// Guest의 배열 메모리 확보
guest=new Guest[n];
for(int i=0;i<guest.length;i++) {
guest[i]=new Guest(); //Guest n개의 객체생성
}
}
}
|
[
"86398466+chaerim612@users.noreply.github.com"
] |
86398466+chaerim612@users.noreply.github.com
|
311340b041afdd2df137f206df1b5b55ae59e954
|
dccab834482ae40ced7350d4510b9d07d38805f0
|
/app/src/main/java/com/databox/mirror/function/login_passward/LoginPassWordPresenter.java
|
ec8f916f0f334389d633d6f2cdf0f423f7fbe546
|
[] |
no_license
|
zhangzzqq/mirror
|
f2811ae1df257819946b0c15c1abf2d53f493028
|
792ea777db972aabddc84428292923537d6efa7e
|
refs/heads/master
| 2023-04-20T14:41:46.262523
| 2021-05-12T15:15:10
| 2021-05-12T15:15:10
| 365,433,456
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 806
|
java
|
package com.databox.mirror.function.login_passward;
import android.view.View;
import android.view.WindowManager;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
public class LoginPassWordPresenter implements LoginPassWordContract.Presenter {
private LoginPassWordContract.View mView ;
public LoginPassWordPresenter(LoginPassWordContract.View view) {
this.mView = view;
mView.setPresenter(this);
}
@Override
public void userLogin(String phone, String password) {
}
@Override
public void riderLogin(String phone, String password) {
}
@Override
public void merchantLogin(String phone, String password) {
}
@Override
public void getVerificationcode(String phone, int timeOut, int type) {
}
}
|
[
"zhangqihappyzq@163.com"
] |
zhangqihappyzq@163.com
|
cbeacc3c7006e8a1b83eec0ea9197554e0d6946d
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project41/src/test/java/org/gradle/test/performance41_1/Test41_48.java
|
d7abe15a3a155d6d45b3416e63fcb43d85c5f72f
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 289
|
java
|
package org.gradle.test.performance41_1;
import static org.junit.Assert.*;
public class Test41_48 {
private final Production41_48 production = new Production41_48("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
e4484e769c56d8f87ca7eaa36459bade33185e3e
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/61/org/apache/commons/math/linear/BlockRealMatrix_getEntry_1192.java
|
b729896f2866b98eb9acf528fd4f746eedc8065f
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 3,296
|
java
|
org apach common math linear
cach friendli implement real matrix realmatrix flat arrai store
squar block matrix
implement special design cach friendli squar block
store small arrai effici travers data row major direct
column major direct block time greatli increas perform
algorithm cross direct loop multipl transposit
size squar block paramet tune cach
size target comput processor rule thumb largest
block simultan cach
matrix multipl 52x52 block suit
processor 64k cach block hold valu byte
lower 36x36 processor 32k cach
regular block repres link block size link block size squar block
hand side bottom side smaller fit matrix dimens squar
block flatten row major order singl dimens arrai
link block size element regular block block
organ row major order
block size 52x52 100x60 matrix store block
block arrai hold upper left 52x52 squar block
arrai hold upper 52x8 rectangl block
arrai hold lower left 48x52 rectangl block arrai
hold lower 48x8 rectangl
layout complex overhead versu simpl map matric java
arrai neglig small matric gain cach effici lead
fold improv matric moder larg size
version revis date
block real matrix blockrealmatrix abstract real matrix abstractrealmatrix serializ
inherit doc inheritdoc
overrid
entri getentri row column
matrix index except matrixindexexcept
block iblock row block size
block jblock column block size
row block iblock block size block width blockwidth block jblock
column block jblock block size
block block iblock block column blockcolumn block jblock
arrai index bound except arrayindexoutofboundsexcept
matrix index except matrixindexexcept
local format localizedformat matrix entri
row column row dimens getrowdimens column dimens getcolumndimens
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
d6f58cd9bb68075ab15c2ba158040a05639e6534
|
9d93eadf80abc6f6e441451bbc1594161eedced6
|
/src/java/hrms/dao/master/VillageDAOImpl.java
|
fb7ff5ffbaa5121700955de4df20a4b6860c38b7
|
[] |
no_license
|
durgaprasad2882/HRMSOpenSourceFor466anydesk
|
1bac7eb2e231a4fb3389b6b1cb8fb4384a757522
|
e7ef76f77d7ecf98464e9bcccc2246b2091efeb4
|
refs/heads/main
| 2023-06-29T16:26:04.663376
| 2021-08-05T09:19:02
| 2021-08-05T09:19:02
| 392,978,868
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,853
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package hrms.dao.master;
import hrms.common.DataBaseFunctions;
import hrms.model.master.Village;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import javax.annotation.Resource;
import javax.sql.DataSource;
/**
*
* @author lenovo pc
*/
public class VillageDAOImpl implements VillageDAO {
@Resource(name = "dataSource")
protected DataSource dataSource;
public DataSource getDataSource() {
return dataSource;
}
public void setDataSource(DataSource dataSource) {
this.dataSource = dataSource;
}
@Override
public ArrayList getVillageList(String distCode, String psCode) {
Connection con = null;
ResultSet rs = null;
PreparedStatement st = null;
ArrayList villList = new ArrayList();
Village vill = null;
try {
con = dataSource.getConnection();
st = con.prepareStatement("SELECT VILL_CODE,VILLAGE_NAME FROM G_VILLAGE WHERE DIST_CODE=? AND PS_CODE=? ORDER BY VILLAGE_NAME");
st.setString(1, distCode);
st.setString(2, psCode);
rs = st.executeQuery();
while (rs.next()) {
vill = new Village();
vill.setVillageCode(rs.getString("VILL_CODE"));
vill.setVillageName(rs.getString("VILLAGE_NAME"));
villList.add(vill);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
DataBaseFunctions.closeSqlObjects(rs, st);
DataBaseFunctions.closeSqlObjects(con);
}
return villList;
}
}
|
[
"dm.prasad@hotmail.com"
] |
dm.prasad@hotmail.com
|
3b14ebc5b87db35ed0995531d829808087ab9e9f
|
ac433ec090c23e54eb23947f578da69a59fbd509
|
/deepJava7/ch01/TestHashcode.java
|
280d5fcc1308d2451fc3b3748dcd07b10601c6b7
|
[] |
no_license
|
JasonSCTT/java-learning-guogai
|
18df07d3506f8b1df28dbbfce8aac7feb67b1cca
|
ff58e0ee9fad6be6ad3b7b5eb49e24e4ca4b1d0a
|
refs/heads/master
| 2020-03-17T06:46:15.412165
| 2018-04-02T12:22:22
| 2018-04-02T12:22:22
| 133,368,948
| 1
| 0
| null | 2018-05-14T13:57:23
| 2018-05-14T13:57:23
| null |
GB18030
|
Java
| false
| false
| 604
|
java
|
public class TestHashcode {
public static void main(String[] args) {
//System.out.println("男".testHashcode().toString());
//String str = "男";
//str.testHashcode().toString();
}
public static int testhashCode() {
int h = hash;
if (h == 0 && value.length > 0) {
char val[] = value;
for (int i = 0; i < value.length; i++) {
h = 31 * h + val[i]; //这里的31是一个素数。
}
hash = h; //返回给hash
}
return h;
}
}
|
[
"gxx632364@gmail.com"
] |
gxx632364@gmail.com
|
aabf0534eecf977c80a774b4b7e7658b505914f8
|
3dbb116801aceb97cb75f67d78baf88b7135763f
|
/src/main/freesql/cn/com/ebmp/freesql/ognl/TypeConverter.java
|
4a7ced8c3fb51021dacbdcf73bc9d27d91cb9948
|
[
"Apache-2.0"
] |
permissive
|
hanpang8983/zswxsqxt
|
92050a7c6387565e73f65427cdfcc6902281a991
|
b752d8b6658f8141423331516910ca09de40360e
|
refs/heads/master
| 2021-01-18T12:10:52.341573
| 2014-08-04T05:09:01
| 2014-08-04T05:09:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,099
|
java
|
//--------------------------------------------------------------------------
// Copyright (c) 1998-2004, Drew Davidson and Luke Blanshard
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// Neither the name of the Drew Davidson nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//--------------------------------------------------------------------------
package cn.com.ebmp.freesql.ognl;
import java.lang.reflect.Member;
import java.util.Map;
/**
* Interface for accessing the type conversion facilities within a context.
*
* @author Luke Blanshard (blanshlu@netscape.net)
* @author Drew Davidson (drew@ognl.org)
*/
public interface TypeConverter {
/**
* Converts the given value to a given type. The OGNL context, target,
* member and name of property being set are given. This method should be
* able to handle conversion in general without any context, target, member
* or property name specified.
*
* @param context
* OGNL context under which the conversion is being done
* @param target
* target object in which the property is being set
* @param member
* member (Constructor, Method or Field) being set
* @param propertyName
* property name being set
* @param value
* value to be converted
* @param toType
* type to which value is converted
* @return Converted value of type toType or
* TypeConverter.NoConversionPossible to indicate that the
* conversion was not possible.
*/
public Object convertValue(Map context, Object target, Member member, String propertyName, Object value, Class toType);
}
|
[
"545473750@qq.com"
] |
545473750@qq.com
|
7c7c3df6a85d68f818eb91ce617e540e49e04c5e
|
834af57501eb527f29bef53099ce6701bc8be39b
|
/src/com/spaceman/terrainGenerator/commands/terrain/biomeSettings/size/Get.java
|
1bd9fc06c92ac17454bbba44fab51137e0af60a6
|
[
"MIT"
] |
permissive
|
JasperBouwman/TerrainGenerator
|
4f1e2a5e02e9bc29ce6e1cebe69c0639858ad9c7
|
668dbcd9016554f355c28ff6843bc09118e0ab7a
|
refs/heads/master
| 2021-06-10T05:03:45.642964
| 2021-03-24T20:39:44
| 2021-03-24T20:39:44
| 142,590,085
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,679
|
java
|
package com.spaceman.terrainGenerator.commands.terrain.biomeSettings.size;
import com.spaceman.terrainGenerator.ColorFormatter;
import com.spaceman.terrainGenerator.commandHander.ArgumentType;
import com.spaceman.terrainGenerator.commandHander.EmptyCommand;
import com.spaceman.terrainGenerator.commandHander.SubCommand;
import com.spaceman.terrainGenerator.fancyMessage.TextComponent;
import com.spaceman.terrainGenerator.terrain.TerrainGenData;
import org.bukkit.entity.Player;
import java.util.Collection;
import static com.spaceman.terrainGenerator.ColorFormatter.formatError;
import static com.spaceman.terrainGenerator.ColorFormatter.formatInfo;
import static com.spaceman.terrainGenerator.commands.TabCompletes.availableGenerators;
import static com.spaceman.terrainGenerator.terrain.TerrainCore.getGen;
public class Get extends SubCommand {
public Get() {
EmptyCommand emptyCommand = new EmptyCommand();
emptyCommand.setCommandName("name", ArgumentType.REQUIRED);
emptyCommand.setCommandDescription(TextComponent.textComponent("This command is used to get the biome size of the last given TerrainGenerator of the biome settings" +
" of the first given TerrainGenerator", ColorFormatter.infoColor));
addAction(emptyCommand);
}
@Override
public Collection<String> tabList(Player player, String[] args) {
return availableGenerators();
}
@Override
public void run(String[] args, Player player) {
//terrain biomeSettings size <name> get <name>
if (args.length == 5) {
TerrainGenData genData = getGen(args[2]);
if (genData != null) {
TerrainGenData getData = getGen(args[4]);
if (getData != null) {
if (genData.getBiomeSettings().containsBiome(getData.getName())) {
player.sendMessage(formatInfo("The size of TerrainGenerator %s is %s", getData.getName(), String.valueOf(genData.getBiomeSettings().getBiomeSize(getData.getName()))));
} else {
player.sendMessage(formatError("TerrainGenerator %s is not a biomeGenerator in %s", getData.getName(), genData.getName()));
}
} else {
player.sendMessage(formatError("TerrainGenerator %s does not exist", args[4]));
}
} else {
player.sendMessage(formatError("TerrainGenerator %s does not exist", args[2]));
}
} else {
player.sendMessage(formatError("Usage: %s", "/terrain biomeSettings size <name> get <name>"));
}
}
}
|
[
"jphbouwman@gmail.com"
] |
jphbouwman@gmail.com
|
1bded0ee311e7b45e2209025c8bf561fb89760c9
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/hd/vaca/rec/HD_VACA_1611_500_LCURLIST2Record.java
|
d8af0e2856a08d259d1cb8fe9e4b59f7fb8fd138
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 3,560
|
java
|
/***************************************************************************************************
* 파일명 : .java
* 기능 : 독자우대-구독신청
* 작성일자 : 2007-05-22
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.hd.vaca.rec;
import java.sql.*;
import chosun.ciis.hd.vaca.dm.*;
import chosun.ciis.hd.vaca.ds.*;
/**
*
*/
public class HD_VACA_1611_500_LCURLIST2Record extends java.lang.Object implements java.io.Serializable{
public String emp_no;
public String proc_stat;
public String proc_stat_nm;
public String delchk;
public String vaca_clsf;
public String vaca_clsf_nm;
public String vaca_dtls_clsf;
public String vaca_dtls_clsf_nm;
public String alvc_use_dt;
public String vaca_frdt;
public String vaca_todt;
public String vaca_dds;
public String remk;
public String occr_dt;
public String seq;
public HD_VACA_1611_500_LCURLIST2Record(){}
public void setEmp_no(String emp_no){
this.emp_no = emp_no;
}
public void setProc_stat(String proc_stat){
this.proc_stat = proc_stat;
}
public void setProc_stat_nm(String proc_stat_nm){
this.proc_stat_nm = proc_stat_nm;
}
public void setDelchk(String delchk){
this.delchk = delchk;
}
public void setVaca_clsf(String vaca_clsf){
this.vaca_clsf = vaca_clsf;
}
public void setVaca_clsf_nm(String vaca_clsf_nm){
this.vaca_clsf_nm = vaca_clsf_nm;
}
public void setVaca_dtls_clsf(String vaca_dtls_clsf){
this.vaca_dtls_clsf = vaca_dtls_clsf;
}
public void setVaca_dtls_clsf_nm(String vaca_dtls_clsf_nm){
this.vaca_dtls_clsf_nm = vaca_dtls_clsf_nm;
}
public void setAlvc_use_dt(String alvc_use_dt){
this.alvc_use_dt = alvc_use_dt;
}
public void setVaca_frdt(String vaca_frdt){
this.vaca_frdt = vaca_frdt;
}
public void setVaca_todt(String vaca_todt){
this.vaca_todt = vaca_todt;
}
public void setVaca_dds(String vaca_dds){
this.vaca_dds = vaca_dds;
}
public void setRemk(String remk){
this.remk = remk;
}
public void setOccr_dt(String occr_dt){
this.occr_dt = occr_dt;
}
public void setSeq(String seq){
this.seq = seq;
}
public String getEmp_no(){
return this.emp_no;
}
public String getProc_stat(){
return this.proc_stat;
}
public String getProc_stat_nm(){
return this.proc_stat_nm;
}
public String getDelchk(){
return this.delchk;
}
public String getVaca_clsf(){
return this.vaca_clsf;
}
public String getVaca_clsf_nm(){
return this.vaca_clsf_nm;
}
public String getVaca_dtls_clsf(){
return this.vaca_dtls_clsf;
}
public String getVaca_dtls_clsf_nm(){
return this.vaca_dtls_clsf_nm;
}
public String getAlvc_use_dt(){
return this.alvc_use_dt;
}
public String getVaca_frdt(){
return this.vaca_frdt;
}
public String getVaca_todt(){
return this.vaca_todt;
}
public String getVaca_dds(){
return this.vaca_dds;
}
public String getRemk(){
return this.remk;
}
public String getOccr_dt(){
return this.occr_dt;
}
public String getSeq(){
return this.seq;
}
}
/* 작성시간 : Wed Mar 13 19:54:35 KST 2013 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
9a75a94eea4235e5df207514c4573c198a165078
|
3977031d8600d1ee3bdb27a577742aca866a5ddd
|
/mybatis-spring-plus/src/main/java/com/ddblock/mybatis/spring/plus/mapper/support/Order.java
|
e5b1d12ad06581a7c4955dfc8738e89408334b32
|
[] |
no_license
|
githubFaction/mybatis-spring-plus-parent
|
14682ee6a1fbd499e9bcb8c07e48587d572d2933
|
114e92476362c3a8c1a8090078efcb28cafc3d49
|
refs/heads/master
| 2020-04-28T02:34:25.979512
| 2019-03-09T15:55:52
| 2019-03-09T15:55:52
| 174,903,850
| 1
| 0
| null | 2019-03-11T01:26:29
| 2019-03-11T01:26:29
| null |
UTF-8
|
Java
| false
| false
| 1,134
|
java
|
package com.ddblock.mybatis.spring.plus.mapper.support;
import java.io.Serializable;
/**
* 用来定义Order By规则
*
* Author XiaoJia
* Date 2019-03-04 17:57
*/
public class Order implements Serializable {
private boolean ascending;
private String propertyName;
public Order(String propertyName, boolean ascending) {
this.propertyName = propertyName;
this.ascending = ascending;
}
public static Order asc(String propertyName) {
return new Order(propertyName, true);
}
public static Order desc(String propertyName) {
return new Order( propertyName, false);
}
public String getPropertyName() {
return propertyName;
}
public boolean isAscending() {
return ascending;
}
public String toSqlString() {
StringBuilder fragment = new StringBuilder();
fragment.append(this.propertyName).append(( ascending ? " ASC " : " DESC " ));
return fragment.toString();
}
@Override
public String toString() {
return propertyName + ' '
+ ( ascending ? "ASC" : "DESC" );
}
}
|
[
"504283451@qq.com"
] |
504283451@qq.com
|
a8cf7f39e0e109898cfe3bd749ce2689f4672215
|
a0e4f155a7b594f78a56958bca2cadedced8ffcd
|
/plugin/localstorage/src/main/java/org/zstack/storage/primary/local/LocalStorageHostRefVOFinder.java
|
65047d22658fd50f10273026950563cd37ce55e6
|
[
"Apache-2.0"
] |
permissive
|
zhao-qc/zstack
|
e67533eabbbabd5ae9118d256f560107f9331be0
|
b38cd2324e272d736f291c836f01966f412653fa
|
refs/heads/master
| 2020-08-14T15:03:52.102504
| 2019-10-14T03:51:12
| 2019-10-14T03:51:12
| 215,187,833
| 3
| 0
|
Apache-2.0
| 2019-10-15T02:27:17
| 2019-10-15T02:27:16
| null |
UTF-8
|
Java
| false
| false
| 1,335
|
java
|
package org.zstack.storage.primary.local;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.zstack.core.db.DatabaseFacade;
import org.zstack.core.db.SimpleQuery;
/**
* Created by miao on 16-10-18.
*/
@Configurable(preConstruction = true, autowire = Autowire.BY_TYPE)
public class LocalStorageHostRefVOFinder {
@Autowired
private DatabaseFacade dbf;
public LocalStorageHostRefVO findByPrimaryKey(String hostUuid, String primaryStorageUuid) {
SimpleQuery<LocalStorageHostRefVO> hq = dbf.createQuery(LocalStorageHostRefVO.class);
hq.add(LocalStorageHostRefVO_.hostUuid, SimpleQuery.Op.EQ, hostUuid);
hq.add(LocalStorageHostRefVO_.primaryStorageUuid, SimpleQuery.Op.EQ, primaryStorageUuid);
LocalStorageHostRefVO ref = hq.find();
return ref;
}
public boolean isExist(String hostUuid, String primaryStorageUuid) {
SimpleQuery<LocalStorageHostRefVO> hq = dbf.createQuery(LocalStorageHostRefVO.class);
hq.add(LocalStorageHostRefVO_.hostUuid, SimpleQuery.Op.EQ, hostUuid);
hq.add(LocalStorageHostRefVO_.primaryStorageUuid, SimpleQuery.Op.EQ, primaryStorageUuid);
return hq.isExists();
}
}
|
[
"xuexuemiao@yeah.net"
] |
xuexuemiao@yeah.net
|
5e35a330cef5b5807a4ce369fbc5476ac803f2c4
|
69badf5c96698b7dc72e57130f3c871091747299
|
/components/camel-service/src/main/java/org/apache/camel/component/service/ServiceEndpoint.java
|
bd6b52ec998028e1b28d6cf349298a00c6516292
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
mzipay/camel
|
5629e6c604fbdfd36ac2e6e2448f599353b3b257
|
188b51abcace90763803791bcc21f44e13d36103
|
refs/heads/master
| 2023-01-12T08:56:47.188614
| 2018-07-02T20:09:12
| 2018-07-02T20:09:12
| 61,210,397
| 0
| 0
|
Apache-2.0
| 2023-01-02T22:14:31
| 2016-06-15T13:33:30
|
Java
|
UTF-8
|
Java
| false
| false
| 4,542
|
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.camel.component.service;
import java.util.HashMap;
import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.Consumer;
import org.apache.camel.DelegateEndpoint;
import org.apache.camel.Endpoint;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
import org.apache.camel.api.management.ManagedAttribute;
import org.apache.camel.api.management.ManagedResource;
import org.apache.camel.cloud.DiscoverableService;
import org.apache.camel.cloud.ServiceDefinition;
import org.apache.camel.cloud.ServiceRegistry;
import org.apache.camel.cluster.CamelClusterView;
import org.apache.camel.impl.DefaultEndpoint;
import org.apache.camel.impl.cloud.DefaultServiceDefinition;
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriPath;
/**
* Represents an endpoint which only becomes active when the {@link CamelClusterView}
* has the leadership.
*/
@ManagedResource(description = "Managed Service Endpoint")
@UriEndpoint(
firstVersion = "2.22.0",
scheme = "service",
syntax = "service:serviceName:delegateUri",
consumerClass = ServiceConsumer.class,
consumerOnly = true,
title = "Service",
lenientProperties = true,
label = "cloud")
public class ServiceEndpoint extends DefaultEndpoint implements DelegateEndpoint {
private final Endpoint delegateEndpoint;
private final ServiceRegistry serviceRegistry;
private final Map<String, String> serviceParameters;
private final ServiceDefinition serviceDefinition;
@UriPath(description = "The endpoint uri to expose as service")
@Metadata(required = "true")
private final String delegateUri;
public ServiceEndpoint(String uri, ServiceComponent component, ServiceRegistry serviceRegistry, Map<String, String> serviceParameters, String delegateUri) {
super(uri, component);
this.serviceRegistry = serviceRegistry;
this.serviceParameters = serviceParameters;
this.delegateUri = delegateUri;
this.delegateEndpoint = getCamelContext().getEndpoint(delegateUri);
// The service properties set on uri override parameter provided by a
// an endpoint of type DiscoverableService.
this.serviceDefinition = computeServiceDefinition(component.getCamelContext(), delegateEndpoint);
}
@Override
public Endpoint getEndpoint() {
return this.delegateEndpoint;
}
@ManagedAttribute(description = "The consumer endpoint to expose as a service", mask = true)
public String getDelegateEndpointUri() {
return this.delegateEndpoint.getEndpointUri();
}
public ServiceDefinition getServiceDefinition() {
return this.serviceDefinition;
}
@Override
public Producer createProducer() throws Exception {
throw new UnsupportedOperationException("Not yet implemented");
}
@Override
public Consumer createConsumer(Processor processor) throws Exception {
return new ServiceConsumer(this, processor, serviceRegistry);
}
@Override
public boolean isSingleton() {
return true;
}
private ServiceDefinition computeServiceDefinition(CamelContext context, Endpoint delegateEndpoint) {
Map<String, String> parameters = new HashMap<>();
if (delegateEndpoint instanceof DiscoverableService) {
parameters.putAll(((DiscoverableService)delegateEndpoint).getServiceProperties());
}
parameters.putAll(serviceParameters);
parameters.computeIfAbsent(ServiceDefinition.SERVICE_META_ID, k -> context.getUuidGenerator().generateUuid());
return DefaultServiceDefinition.builder().from(parameters).build();
}
}
|
[
"lburgazzoli@gmail.com"
] |
lburgazzoli@gmail.com
|
af105e9038a3c40f924a053845c6eb17eaaa206f
|
df4d6594d2e70b5a1bfe9e5f21e8d48d7f82ef8c
|
/wechat-model/src/main/java/com/czyl/entity/Field.java
|
5a980a4d24d176f3c419921348961e251a1dcbe5
|
[] |
no_license
|
liaozuyao/wechat
|
cfead1ea0d3e61a1574c9e767a056d6a3510f998
|
f3ad99a0ee469b03a9d50b0edaaa639d7ab29f25
|
refs/heads/master
| 2021-09-15T03:59:39.857859
| 2018-05-25T08:57:12
| 2018-05-25T08:57:12
| 119,945,045
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 241
|
java
|
package com.czyl.entity;
/**
* 领域
*/
public class Field extends BaseEntity{
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"you@example.com"
] |
you@example.com
|
3954e617d96f9b08553251ce21df208140c5ccbc
|
764389c5cecffedd7ad8e0b4a2c536593b091e3a
|
/ObjectBuilder/src/search/SerializableSearchSpace.java
|
4f78ee5be340a588639a4085c52cb527bfd60470
|
[] |
no_license
|
DanGrew/Portfolio
|
684422e7c59213f825f83dc8b3c9a7c299a221c7
|
f42c128f8d09d0d4680990dd29d1079613281477
|
refs/heads/master
| 2021-01-20T05:14:18.897770
| 2016-02-04T20:44:23
| 2016-02-04T20:44:23
| 25,519,945
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,286
|
java
|
/*
* ----------------------------------------
* Object Builder
* ----------------------------------------
* Produced by Dan Grew
* ----------------------------------------
*/
package search;
import java.util.List;
import model.data.SerializedSingleton;
import search.SearchSpace.SearchCriteria;
/**
* {@link Serializable} form of {@link SearchSpace}.
*/
public interface SerializableSearchSpace extends SerializedSingleton< SearchSpace >{
/**
* Method to serialize a {@link SearchCriteria} inclusion.
* @param criteria the {@link SearchCriteria} to be serialized.
*/
public void addInclusion( SearchCriteria criteria );
/**
* Method to resolve the {@link SearchCriteria} inclusion.
* @return a {@link List} of resolved {@link SearchCriteria}s.
*/
public List< SearchCriteria > resolveInclusions();
/**
* Method to serialize a {@link SearchCriteria} exclusion.
* @param criteria the {@link SearchCriteria} to be serialized.
*/
public void addExclusion( SearchCriteria criteria );
/**
* Method to resolve the {@link SearchCriteria} exclusion.
* @return a {@link List} of resolved {@link SearchCriteria}s.
*/
public List< SearchCriteria > resolveExclusions();
}// End Interface
|
[
"danielanthonygrew@gmail.com"
] |
danielanthonygrew@gmail.com
|
a0d84d7aa73a07f948f9bd59a9575e52060157e6
|
2a90ca658eef730cf860d83339d87d6e393afa2b
|
/zhb/src/main/java/com/zhb/vue/params/IconInfoParam.java
|
0943e5ce5a5cf4a8e1392f67f5f6d0642b760f24
|
[] |
no_license
|
ZHB1024/zhb-vue-thymeleaf
|
2d79ec449019b8bcb2ed7a34c0c18589ae5cc6ea
|
e5512c22a6a71f3ef86ac76556932071334e046d
|
refs/heads/master
| 2021-06-12T12:41:47.212696
| 2021-03-06T14:29:01
| 2021-03-06T14:29:01
| 158,174,164
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 722
|
java
|
package com.zhb.vue.params;
public class IconInfoParam {
private String id;
private String name;
private String value;
private Integer deleteFlag;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
}
|
[
"zhb20111503@126.com"
] |
zhb20111503@126.com
|
970a09ca4c8e89e91a1bb53e82424123a0df49ad
|
d0cdb1837b25057ca2d1ecf78a1ec4f65c882d5c
|
/src/ru/komiss77/commands/WorldCmd.java
|
a0d86b5f4a264052ea8a2594996af13ff6d9d761
|
[] |
no_license
|
komiss77/Ostrov
|
7486a434e21815df835ea2129fda8fe5c91055ad
|
6c5a5a45640188861761d59438ee06c2bb230592
|
refs/heads/master
| 2023-08-22T10:14:14.946666
| 2023-08-19T05:39:03
| 2023-08-19T05:39:03
| 440,251,096
| 0
| 1
| null | 2022-04-30T19:31:02
| 2021-12-20T17:19:40
|
Java
|
UTF-8
|
Java
| false
| false
| 1,910
|
java
|
package ru.komiss77.commands;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import ru.komiss77.ApiOstrov;
import ru.komiss77.Config;
import ru.komiss77.modules.world.WorldSetupMenu;
import ru.komiss77.utils.inventory.SmartInventory;
public class WorldCmd implements Listener, CommandExecutor {
@Override
public boolean onCommand(CommandSender cs, Command cmd, String string, String[] arg) {
if ( ! (cs instanceof Player) ) {
cs.sendMessage("§cНе консольная команда!");
return true;
}
final Player p = (Player) cs;
if (ApiOstrov.isLocalBuilder(cs, false)) {
SmartInventory.builder()
.id("Worlds"+p.getName())
.provider(new WorldSetupMenu())
.size(6, 9)
.title("§2Миры сервера")
.build().open(p);
return true;
}
if ( Config.world_command ) {
if ( p.hasPermission("ostrov.world")) {
SmartInventory.builder()
.id("Worlds"+p.getName())
.provider(new WorldSetupMenu())
.size(3, 9)
.title("§2Миры сервера")
.build().open(p);
} else {
p.sendMessage("§cУ Вас нет пава ostrov.world !");
}
} else {
p.sendMessage( "§cСмена мира командой world отключён на этом сервере!");
}
//if (!ApiOstrov.isLocalBuilder(cs, true)) return false;
return true;
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
3f1cccd54404e8fdb1e5b78c42bf495007c837d9
|
bf842c0f05fe27f0652e09edb5645528a2e94205
|
/KeywordCollection/src/static_nonstatic/StaticMethod2.java
|
a738d2977afb1323d7c84363be94173f3734e1a3
|
[] |
no_license
|
chamanbharti/core-java-project
|
804dd3fce33823308bf08b2cad47380ae08aa3ba
|
6bc9f5cfe0466e2ae7fa78a6eb52eba69407610a
|
refs/heads/master
| 2021-01-21T16:18:12.232458
| 2017-05-20T11:08:15
| 2017-05-20T11:08:15
| 91,882,464
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 272
|
java
|
package static_nonstatic;
class StaticMethod2
{
static int cube(int x)
{
return x*x*x;
}
public static void main(String[] args)
{
int result=StaticMethod2.cube(5);
//StaticMethod2 result=new StaticMethod2();
System.out.println(result);
}
}
|
[
"chaman.bharti84@gmail.com"
] |
chaman.bharti84@gmail.com
|
f70b5790543f52bc735ab811eb41624803b11ac3
|
ead61e1e8fcb260aa16692fddd7b26dc264a2fc7
|
/sun/awt/X11/AwtGraphicsConfigData.java
|
73a36c4abcf826059fa7a44b025e578dcbe790d9
|
[] |
no_license
|
Gavin-U/Gavin-jdk-translate
|
b5bc1979e1d482b90c8e1382eafe9da971620626
|
288dbe473d5c89cf805e28f6a5327fc1b2ebf474
|
refs/heads/master
| 2020-05-15T23:04:47.016942
| 2019-04-22T15:04:54
| 2019-04-22T15:04:54
| 182,522,438
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,565
|
java
|
// This file is an automatically generated file, please do not edit this file, modify the WrapperGenerator.java file instead !
package sun.awt.X11;
import sun.misc.*;
import sun.util.logging.PlatformLogger;
public class AwtGraphicsConfigData extends XWrapperBase {
private Unsafe unsafe = XlibWrapper.unsafe;
private final boolean should_free_memory;
public static int getSize() { return 128; }
public int getDataSize() { return getSize(); }
long pData;
public long getPData() { return pData; }
public AwtGraphicsConfigData(long addr) {
log.finest("Creating");
pData=addr;
should_free_memory = false;
}
public AwtGraphicsConfigData() {
log.finest("Creating");
pData = unsafe.allocateMemory(getSize());
should_free_memory = true;
}
public void dispose() {
log.finest("Disposing");
if (should_free_memory) {
log.finest("freeing memory");
unsafe.freeMemory(pData);
}
}
public int get_awt_depth() { log.finest("");return (Native.getInt(pData+0)); }
public void set_awt_depth(int v) { log.finest(""); Native.putInt(pData+0, v); }
public long get_awt_cmap() { log.finest("");return (Native.getLong(pData+4)); }
public void set_awt_cmap(long v) { log.finest(""); Native.putLong(pData+4, v); }
public XVisualInfo get_awt_visInfo() { log.finest("");return new XVisualInfo(pData + 8); }
public int get_awt_num_colors() { log.finest("");return (Native.getInt(pData+48)); }
public void set_awt_num_colors(int v) { log.finest(""); Native.putInt(pData+48, v); }
public awtImageData get_awtImage(int index) { log.finest(""); return (Native.getLong(pData+52) != 0)?(new awtImageData(Native.getLong(pData+52)+index*304)):(null); }
public long get_awtImage() { log.finest("");return Native.getLong(pData+52); }
public void set_awtImage(long v) { log.finest(""); Native.putLong(pData + 52, v); }
public long get_AwtColorMatch(int index) { log.finest(""); return Native.getLong(pData+56)+index*Native.getLongSize(); }
public long get_AwtColorMatch() { log.finest("");return Native.getLong(pData+56); }
public void set_AwtColorMatch(long v) { log.finest(""); Native.putLong(pData + 56, v); }
public long get_monoImage(int index) { log.finest(""); return Native.getLong(pData+60)+index*Native.getLongSize(); }
public long get_monoImage() { log.finest("");return Native.getLong(pData+60); }
public void set_monoImage(long v) { log.finest(""); Native.putLong(pData + 60, v); }
public long get_monoPixmap() { log.finest("");return (Native.getLong(pData+64)); }
public void set_monoPixmap(long v) { log.finest(""); Native.putLong(pData+64, v); }
public int get_monoPixmapWidth() { log.finest("");return (Native.getInt(pData+68)); }
public void set_monoPixmapWidth(int v) { log.finest(""); Native.putInt(pData+68, v); }
public int get_monoPixmapHeight() { log.finest("");return (Native.getInt(pData+72)); }
public void set_monoPixmapHeight(int v) { log.finest(""); Native.putInt(pData+72, v); }
public long get_monoPixmapGC() { log.finest("");return (Native.getLong(pData+76)); }
public void set_monoPixmapGC(long v) { log.finest(""); Native.putLong(pData+76, v); }
public int get_pixelStride() { log.finest("");return (Native.getInt(pData+80)); }
public void set_pixelStride(int v) { log.finest(""); Native.putInt(pData+80, v); }
public ColorData get_color_data(int index) { log.finest(""); return (Native.getLong(pData+84) != 0)?(new ColorData(Native.getLong(pData+84)+index*44)):(null); }
public long get_color_data() { log.finest("");return Native.getLong(pData+84); }
public void set_color_data(long v) { log.finest(""); Native.putLong(pData + 84, v); }
public long get_glxInfo(int index) { log.finest(""); return Native.getLong(pData+88)+index*Native.getLongSize(); }
public long get_glxInfo() { log.finest("");return Native.getLong(pData+88); }
public void set_glxInfo(long v) { log.finest(""); Native.putLong(pData + 88, v); }
public int get_isTranslucencySupported() { log.finest("");return (Native.getInt(pData+92)); }
public void set_isTranslucencySupported(int v) { log.finest(""); Native.putInt(pData+92, v); }
public XRenderPictFormat get_renderPictFormat() { log.finest("");return new XRenderPictFormat(pData + 96); }
String getName() {
return "AwtGraphicsConfigData";
}
String getFieldsAsString() {
StringBuilder ret = new StringBuilder(640);
ret.append("awt_depth = ").append( get_awt_depth() ).append(", ");
ret.append("awt_cmap = ").append( get_awt_cmap() ).append(", ");
ret.append("awt_visInfo = ").append( get_awt_visInfo() ).append(", ");
ret.append("awt_num_colors = ").append( get_awt_num_colors() ).append(", ");
ret.append("awtImage = ").append( get_awtImage() ).append(", ");
ret.append("AwtColorMatch = ").append( get_AwtColorMatch() ).append(", ");
ret.append("monoImage = ").append( get_monoImage() ).append(", ");
ret.append("monoPixmap = ").append( get_monoPixmap() ).append(", ");
ret.append("monoPixmapWidth = ").append( get_monoPixmapWidth() ).append(", ");
ret.append("monoPixmapHeight = ").append( get_monoPixmapHeight() ).append(", ");
ret.append("monoPixmapGC = ").append( get_monoPixmapGC() ).append(", ");
ret.append("pixelStride = ").append( get_pixelStride() ).append(", ");
ret.append("color_data = ").append( get_color_data() ).append(", ");
ret.append("glxInfo = ").append( get_glxInfo() ).append(", ");
ret.append("isTranslucencySupported = ").append( get_isTranslucencySupported() ).append(", ");
ret.append("renderPictFormat = ").append( get_renderPictFormat() ).append(", ");
return ret.toString();
}
}
|
[
"17645861358@163.com"
] |
17645861358@163.com
|
a740363c72ba607d9954512087d012b0cb45e8fc
|
63152c4f60c3be964e9f4e315ae50cb35a75c555
|
/core/target/java/org/apache/spark/metrics/OffHeapStorageMemory.java
|
6eac37eed4fe32f695f614f6980cadb3174fffad
|
[
"EPL-1.0",
"Classpath-exception-2.0",
"LicenseRef-scancode-unicode",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",
"GCC-exception-3.1",
"LGPL-2.0-or-later",
"CDDL-1.0",
"MIT",
"CC-BY-SA-3.0",
"NAIST-2003",
"LGPL-2.1-only",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"CPL-1.0",
"CC-PDDC",
"EPL-2.0",
"CDDL-1.1",
"BSD-2-Clause",
"CC0-1.0",
"Python-2.0",
"LicenseRef-scancode-unknown"
] |
permissive
|
PowersYang/spark-cn
|
76c407d774e35d18feb52297c68c65889a75a002
|
06a0459999131ee14864a69a15746c900e815a14
|
refs/heads/master
| 2022-12-11T20:18:37.376098
| 2020-03-30T09:48:22
| 2020-03-30T09:48:22
| 219,248,341
| 0
| 0
|
Apache-2.0
| 2022-12-05T23:46:17
| 2019-11-03T03:55:17
|
HTML
|
UTF-8
|
Java
| false
| false
| 837
|
java
|
package org.apache.spark.metrics;
public class OffHeapStorageMemory {
static scala.collection.Seq<java.lang.String> names () { throw new RuntimeException(); }
static long[] getMetricValues (org.apache.spark.memory.MemoryManager memoryManager) { throw new RuntimeException(); }
static long getMetricValue (org.apache.spark.memory.MemoryManager memoryManager) { throw new RuntimeException(); }
static public abstract boolean canEqual (Object that) ;
static public abstract boolean equals (Object that) ;
static public abstract Object productElement (int n) ;
static public abstract int productArity () ;
static public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
static public java.lang.String productPrefix () { throw new RuntimeException(); }
}
|
[
"577790911@qq.com"
] |
577790911@qq.com
|
bfd58a46e49a6ed0939daed520e470adbbc77c22
|
2c669ccff008612f6e12054d9162597f2088442c
|
/MEVO_apkpure.com_source_from_JADX/sources/com/google/android/gms/maps/model/Marker.java
|
93297bf657775db2b9e2aaaca2c2e6e8dfeb649c
|
[] |
no_license
|
PythonicNinja/mevo
|
e97fb27f302cb3554a69b27022dada2134ff99c0
|
cab7cea9376085caead1302b93e62e0d34a75470
|
refs/heads/master
| 2020-05-02T22:32:46.764930
| 2019-03-28T23:37:51
| 2019-03-28T23:37:51
| 178,254,526
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,975
|
java
|
package com.google.android.gms.maps.model;
import android.os.RemoteException;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.dynamic.ObjectWrapper;
import com.google.android.gms.internal.maps.zzt;
public final class Marker {
private final zzt zzdl;
public Marker(zzt zzt) {
this.zzdl = (zzt) Preconditions.checkNotNull(zzt);
}
public final boolean equals(Object obj) {
if (!(obj instanceof Marker)) {
return false;
}
try {
return this.zzdl.zzj(((Marker) obj).zzdl);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final float getAlpha() {
try {
return this.zzdl.getAlpha();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final String getId() {
try {
return this.zzdl.getId();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final LatLng getPosition() {
try {
return this.zzdl.getPosition();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final float getRotation() {
try {
return this.zzdl.getRotation();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final String getSnippet() {
try {
return this.zzdl.getSnippet();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
@Nullable
public final Object getTag() {
try {
return ObjectWrapper.unwrap(this.zzdl.zzj());
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final String getTitle() {
try {
return this.zzdl.getTitle();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final float getZIndex() {
try {
return this.zzdl.getZIndex();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final int hashCode() {
try {
return this.zzdl.zzi();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void hideInfoWindow() {
try {
this.zzdl.hideInfoWindow();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final boolean isDraggable() {
try {
return this.zzdl.isDraggable();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final boolean isFlat() {
try {
return this.zzdl.isFlat();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final boolean isInfoWindowShown() {
try {
return this.zzdl.isInfoWindowShown();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final boolean isVisible() {
try {
return this.zzdl.isVisible();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void remove() {
try {
this.zzdl.remove();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setAlpha(float f) {
try {
this.zzdl.setAlpha(f);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setAnchor(float f, float f2) {
try {
this.zzdl.setAnchor(f, f2);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setDraggable(boolean z) {
try {
this.zzdl.setDraggable(z);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setFlat(boolean z) {
try {
this.zzdl.setFlat(z);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setIcon(@Nullable BitmapDescriptor bitmapDescriptor) {
if (bitmapDescriptor == null) {
try {
this.zzdl.zzg(null);
return;
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
this.zzdl.zzg(bitmapDescriptor.zza());
}
public final void setInfoWindowAnchor(float f, float f2) {
try {
this.zzdl.setInfoWindowAnchor(f, f2);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setPosition(@NonNull LatLng latLng) {
if (latLng == null) {
throw new IllegalArgumentException("latlng cannot be null - a position is required.");
}
try {
this.zzdl.setPosition(latLng);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setRotation(float f) {
try {
this.zzdl.setRotation(f);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setSnippet(@Nullable String str) {
try {
this.zzdl.setSnippet(str);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setTag(@Nullable Object obj) {
try {
this.zzdl.zze(ObjectWrapper.wrap(obj));
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setTitle(@Nullable String str) {
try {
this.zzdl.setTitle(str);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setVisible(boolean z) {
try {
this.zzdl.setVisible(z);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void setZIndex(float f) {
try {
this.zzdl.setZIndex(f);
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
public final void showInfoWindow() {
try {
this.zzdl.showInfoWindow();
} catch (RemoteException e) {
throw new RuntimeRemoteException(e);
}
}
}
|
[
"mail@pythonic.ninja"
] |
mail@pythonic.ninja
|
f3db631abb07079f725c89f467dca6481893bf5e
|
f0ba56521edc9f75af9bab7b7453b49ccab9e970
|
/blueprints-core/src/main/java/com/tinkerpop/blueprints/pgm/impls/event/EventEdge.java
|
6d916755e0901d80d6dfc328a77e7ad4e4af938d
|
[
"BSD-3-Clause"
] |
permissive
|
rjurney/blueprints
|
a84c044b576d4fbe6c3f25c46d11f82d9431b9e9
|
ffdf51a03a271fdda3c5b6d3fb9c2cd6cb4645e4
|
refs/heads/master
| 2021-01-16T21:53:02.203421
| 2011-06-24T01:01:27
| 2011-06-24T01:01:27
| 1,835,120
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,031
|
java
|
package com.tinkerpop.blueprints.pgm.impls.event;
import com.tinkerpop.blueprints.pgm.Edge;
import com.tinkerpop.blueprints.pgm.Vertex;
import com.tinkerpop.blueprints.pgm.impls.event.listener.GraphChangedListener;
import java.util.List;
/**
* An edge with a GraphChangedListener attached. Those listeners are notified when changes occur to
* the properties of the edge.
*/
public class EventEdge extends EventElement implements Edge {
public EventEdge(final Edge edge, final List<GraphChangedListener> graphChangedListeners) {
super(edge, graphChangedListeners);
}
public Vertex getOutVertex() {
return new EventVertex(((Edge) this.element).getOutVertex(), this.graphChangedListeners);
}
public Vertex getInVertex() {
return new EventVertex(((Edge) this.element).getInVertex(), this.graphChangedListeners);
}
public String getLabel() {
return ((Edge) this.element).getLabel();
}
public Edge getRawEdge() {
return (Edge) this.element;
}
}
|
[
"spmva@genoprime.com"
] |
spmva@genoprime.com
|
680740a1c1b573d0b566c5e01c69f8c0fa10ccf3
|
30fa5cdc647818f9d47347d6b5ffced5c01b7bfe
|
/sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/config/RegistryCenterConfigurationUtil.java
|
8e15644c27edbf4c69cbbcdf69695f52a416fea8
|
[
"Apache-2.0"
] |
permissive
|
LiyiW/incubator-shardingsphere-example
|
482b5ef7ada01d322f0e9e80a7a790c5f0fb7f9f
|
1a74ca8916f16d7dad223d5341605e46bc559441
|
refs/heads/master
| 2020-11-25T21:47:35.909796
| 2019-12-22T10:18:19
| 2019-12-22T10:18:19
| 228,859,819
| 0
| 0
|
Apache-2.0
| 2019-12-18T14:41:49
| 2019-12-18T14:41:48
| null |
UTF-8
|
Java
| false
| false
| 1,578
|
java
|
/*
* Copyright 2016-2018 shardingsphere.io.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* </p>
*/
package io.shardingsphere.example.jdbc.orche.config;
import io.shardingsphere.orchestration.reg.api.RegistryCenterConfiguration;
public class RegistryCenterConfigurationUtil {
private static final String ZOOKEEPER_CONNECTION_STRING = "localhost:2181";
private static final String NAMESPACE = "orchestration-java-demo";
private static final String ETCD_CONNECTION_STRING = "http://localhost:2379";
public static RegistryCenterConfiguration getZooKeeperConfiguration() {
RegistryCenterConfiguration result = new RegistryCenterConfiguration();
result.setServerLists(ZOOKEEPER_CONNECTION_STRING);
result.setNamespace(NAMESPACE);
return result;
}
public static RegistryCenterConfiguration getEtcdConfiguration() {
RegistryCenterConfiguration result = new RegistryCenterConfiguration();
result.setServerLists(ETCD_CONNECTION_STRING);
return result;
}
}
|
[
"terrymanu@163.com"
] |
terrymanu@163.com
|
073848e81164e15659f75e60a3cbe20fa4345c42
|
6c75bc3f0b09f3d01765f973020b0b2a5af35deb
|
/sdk_framework/src/main/java/com/enjoy/sdk/framework/utils/ShellUtils.java
|
fab0103bf0e4a47b2c8298a4cf47add0dce646f9
|
[] |
no_license
|
luckkiss/enjoySDK
|
40d15593b2e31fedcdb7ca18e58381469bbc1037
|
7ccd4bd4a13ecf7a4376ebe0dc0ef41c7ee67c81
|
refs/heads/main
| 2023-08-31T12:34:59.553328
| 2021-11-08T10:28:00
| 2021-11-08T10:28:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,251
|
java
|
package com.enjoy.sdk.framework.utils;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.util.List;
/**
* Shell相关工具类
*/
public final class ShellUtils {
private ShellUtils() {
throw new UnsupportedOperationException("u can't instantiate me...");
}
/**
* check whether has root permission
*
* @return
*/
public static boolean checkRootPermission() {
return execCmd("echo root", true, false).result == 0;
}
/**
* 是否是在root下执行命令
*
* @param command 命令
* @param isRoot 是否需要root权限执行
* @return CommandResult
*/
public static CommandResult execCmd(String command, boolean isRoot) {
return execCmd(new String[]{command}, isRoot, true);
}
/**
* 是否是在root下执行命令
*
* @param commands 多条命令链表
* @param isRoot 是否需要root权限执行
* @return CommandResult
*/
public static CommandResult execCmd(List<String> commands, boolean isRoot) {
return execCmd(commands == null ? null : commands.toArray(new String[]{}), isRoot, true);
}
/**
* 是否是在root下执行命令
*
* @param commands 多条命令数组
* @param isRoot 是否需要root权限执行
* @return CommandResult
*/
public static CommandResult execCmd(String[] commands, boolean isRoot) {
return execCmd(commands, isRoot, true);
}
/**
* 是否是在root下执行命令
*
* @param command 命令
* @param isRoot 是否需要root权限执行
* @param isNeedResultMsg 是否需要结果消息
* @return CommandResult
*/
public static CommandResult execCmd(String command, boolean isRoot, boolean isNeedResultMsg) {
return execCmd(new String[]{command}, isRoot, isNeedResultMsg);
}
/**
* 是否是在root下执行命令
*
* @param commands 命令链表
* @param isRoot 是否需要root权限执行
* @param isNeedResultMsg 是否需要结果消息
* @return CommandResult
*/
public static CommandResult execCmd(List<String> commands, boolean isRoot, boolean isNeedResultMsg) {
return execCmd(commands == null ? null : commands.toArray(new String[]{}), isRoot, isNeedResultMsg);
}
/**
* 是否是在root下执行命令
*
* @param commands 命令数组
* @param isRoot 是否需要root权限执行
* @param isNeedResultMsg 是否需要结果消息
* @return CommandResult
*/
public static CommandResult execCmd(String[] commands, boolean isRoot, boolean isNeedResultMsg) {
int result = -1;
if (commands == null || commands.length == 0) {
return new CommandResult(result, null, null);
}
Process process = null;
BufferedReader successResult = null;
BufferedReader errorResult = null;
StringBuilder successMsg = null;
StringBuilder errorMsg = null;
DataOutputStream os = null;
try {
process = Runtime.getRuntime().exec(isRoot ? "su" : "sh");
os = new DataOutputStream(process.getOutputStream());
for (String command : commands) {
if (command == null) continue;
os.write(command.getBytes());
os.writeBytes("\n");
os.flush();
}
os.writeBytes("exit\n");
os.flush();
result = process.waitFor();
if (isNeedResultMsg) {
successMsg = new StringBuilder();
errorMsg = new StringBuilder();
successResult = new BufferedReader(new InputStreamReader(process.getInputStream(), "UTF-8"));
errorResult = new BufferedReader(new InputStreamReader(process.getErrorStream(), "UTF-8"));
String s;
while ((s = successResult.readLine()) != null) {
successMsg.append(s);
}
while ((s = errorResult.readLine()) != null) {
errorMsg.append(s);
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
CloseUtils.closeIO(os, successResult, errorResult);
if (process != null) {
process.destroy();
}
}
return new CommandResult(
result,
successMsg == null ? null : successMsg.toString(),
errorMsg == null ? null : errorMsg.toString()
);
}
/**
* 返回的命令结果
*/
public static class CommandResult {
/**
* 结果码
**/
public int result;
/**
* 成功信息
**/
public String successMsg;
/**
* 错误信息
**/
public String errorMsg;
public CommandResult(int result, String successMsg, String errorMsg) {
this.result = result;
this.successMsg = successMsg;
this.errorMsg = errorMsg;
}
}
}
|
[
"1628103949@qq.com"
] |
1628103949@qq.com
|
16cb6aa8dcd1b85fb767814129032f1fc8f0d0b1
|
1b33bb4e143b18de302ccd5f107e3490ea8b31aa
|
/learn.java/src/main/java/oc/p/_8/_8_IO/understandingFileAndDirectories/introducingTheFileClass/workingWithAFileObject/methods/Test.java
|
3ad5118638ef8855661f6899e5fec3d724d853ab
|
[] |
no_license
|
cip-git/learn
|
db2e4eb297e36db475c734a89d18e98819bdd07f
|
b6d97f529ed39f25e17b602c00ebad01d7bc2d38
|
refs/heads/master
| 2022-12-23T16:39:56.977803
| 2022-12-18T13:57:37
| 2022-12-18T13:57:37
| 97,759,022
| 0
| 1
| null | 2020-10-13T17:06:36
| 2017-07-19T20:37:29
|
Java
|
UTF-8
|
Java
| false
| false
| 1,308
|
java
|
package oc.p._8._8_IO.understandingFileAndDirectories.introducingTheFileClass.workingWithAFileObject.methods;
import utils.print.Print;
import utils.resources.files.ResourcesOld;
import java.io.File;
import java.io.IOException;
import static utils.resources.files.ResourcesOld.SRC_MAIN_RESOURCES;
import static utils.resources.files.Separation.FILE_SEPARATOR;
class Test {
static File dir = new File(FILE_SEPARATOR.separationOf(SRC_MAIN_RESOURCES) + File.separator + FILE_SEPARATOR.separationOf(new Test().getClass().getPackage().getName()));
static File file = new File(dir.getPath(), "file");
static File file2 = new File(FILE_SEPARATOR.separationOf(ResourcesOld.SRC_MAIN_RESOURCES) + File.separator + "file");
static {
System.out.println("dir creation: " + dir.mkdirs());
try {
System.out.println("file creation: " + file.createNewFile());
} catch (IOException e) {
e.printStackTrace();
}
Print.Delimitators.equal();
}
static void m() {
System.out.println(dir);
System.out.println(dir.getPath());
System.out.println(dir.getAbsolutePath());
System.out.println(dir.toPath());
}
public static void main(String[] args) {
m();
ResourcesOld.clean();
}
}
|
[
"ciprian.dorin.tanase@ibm.com"
] |
ciprian.dorin.tanase@ibm.com
|
83fcaa24266a9e58132721540608eb84ab055104
|
712a5e8475b6c9276bd4f8f857be95fdf6f30b9f
|
/com/google/android/exoplayer2/p063i/FileDataSource.java
|
bdec22385e98499ef6546f2d9ed9e8dc710c14e2
|
[] |
no_license
|
swapnilsen/OCR_2
|
b29bd22a51203b4d39c2cc8cb03c50a85a81218f
|
1889d208e17e94a55ddeae91336fe92110e1bd2d
|
refs/heads/master
| 2021-01-20T08:46:03.508508
| 2017-05-03T19:50:52
| 2017-05-03T19:50:52
| 90,187,623
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,937
|
java
|
package com.google.android.exoplayer2.p063i;
import android.net.Uri;
import java.io.EOFException;
import java.io.IOException;
import java.io.RandomAccessFile;
/* renamed from: com.google.android.exoplayer2.i.o */
public final class FileDataSource implements DataSource {
private final TransferListener<? super FileDataSource> f3769a;
private RandomAccessFile f3770b;
private Uri f3771c;
private long f3772d;
private boolean f3773e;
/* renamed from: com.google.android.exoplayer2.i.o.a */
public static class FileDataSource extends IOException {
public FileDataSource(IOException iOException) {
super(iOException);
}
}
public FileDataSource() {
this(null);
}
public FileDataSource(TransferListener<? super FileDataSource> transferListener) {
this.f3769a = transferListener;
}
public long m4380a(DataSpec dataSpec) {
try {
this.f3771c = dataSpec.f3710a;
this.f3770b = new RandomAccessFile(dataSpec.f3710a.getPath(), "r");
this.f3770b.seek(dataSpec.f3713d);
this.f3772d = dataSpec.f3714e == -1 ? this.f3770b.length() - dataSpec.f3713d : dataSpec.f3714e;
if (this.f3772d < 0) {
throw new EOFException();
}
this.f3773e = true;
if (this.f3769a != null) {
this.f3769a.m4353a((Object) this, dataSpec);
}
return this.f3772d;
} catch (IOException e) {
throw new FileDataSource(e);
}
}
public int m4379a(byte[] bArr, int i, int i2) {
if (i2 == 0) {
return 0;
}
if (this.f3772d == 0) {
return -1;
}
try {
int read = this.f3770b.read(bArr, i, (int) Math.min(this.f3772d, (long) i2));
if (read <= 0) {
return read;
}
this.f3772d -= (long) read;
if (this.f3769a == null) {
return read;
}
this.f3769a.m4352a((Object) this, read);
return read;
} catch (IOException e) {
throw new FileDataSource(e);
}
}
public void m4381a() {
this.f3771c = null;
try {
if (this.f3770b != null) {
this.f3770b.close();
}
this.f3770b = null;
if (this.f3773e) {
this.f3773e = false;
if (this.f3769a != null) {
this.f3769a.m4351a(this);
}
}
} catch (IOException e) {
throw new FileDataSource(e);
} catch (Throwable th) {
this.f3770b = null;
if (this.f3773e) {
this.f3773e = false;
if (this.f3769a != null) {
this.f3769a.m4351a(this);
}
}
}
}
}
|
[
"swasen@cisco.com"
] |
swasen@cisco.com
|
ff45aac6c5c8bb219b48c10668aafba40213518f
|
b4475175e3454d306875a6ab424c6c1924fcb369
|
/algorithm/programmers/src/beakjoon/dice1.java
|
96ce03f957a7cb95aac19290d9d272d11c5a8b02
|
[] |
no_license
|
yangfriendship/algorithm
|
11cad5981124da00a1ffa2c5ba2aa0306289ad9e
|
4941b5dfb014d47e4d244c113799b7fd50e6978b
|
refs/heads/master
| 2022-12-28T09:03:08.021140
| 2020-10-16T15:16:20
| 2020-10-16T15:16:20
| 292,990,187
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 666
|
java
|
package beakjoon;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class dice1 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int[] arr = new int[n + 1];
dfs(arr, 0, n);
}
public static void dfs(int[] arr, int depth, int n) {
if (depth == n) {
for (int i = 0; i < arr.length - 1; i++) {
System.out.printf("%d ", arr[i]);
}
System.out.println();
return;
}
for (int i = 1; i <= 6; i++) {
arr[depth] = i;
dfs(arr, depth + 1, n);
}
}
}
|
[
"yangfriendship@naver.com"
] |
yangfriendship@naver.com
|
0cf15e2ba2185687df803b2e56fd077dd122f786
|
e368d9adb1fe3b2d6e20c31835ff4abeea77e4ee
|
/workspace_8/LTM/src/onTap/CloneCopyFile.java
|
6b367139fd7f5a302933b07a78fa9a3f9b6cce0d
|
[] |
no_license
|
thanghoang07/java
|
29edf868f79318672707be626d9105935fd83478
|
41d62d5e9f206f0459b9c3d42a8581fc5395b223
|
refs/heads/master
| 2020-05-07T13:45:13.479039
| 2019-04-10T09:59:34
| 2019-04-10T09:59:34
| 180,541,189
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 676
|
java
|
package onTap;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class CloneCopyFile {
public void copyFile(String source, String dest) throws IOException {
byte[] data = new byte[10240];
int i;
File file = new File(source);
if (file.exists()) {
BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(dest));
while ((i = in.read(data)) != -1) {
out.write(data, 0, i);
}
in.close();
out.close();
}
}
}
|
[
"thanghoang07@outlook.com"
] |
thanghoang07@outlook.com
|
d0224309f5c683073aa412d97025acb8388aa0eb
|
6279ac4986a5a240fe44a7a33d9b208fccf1135a
|
/hub.sam.mof.browser/src/hub/sam/mof/plugin/modelview/actions/ShowDetailsAction.java
|
12af8505ca69a09eb4c2f0f68880b777f6d8d01a
|
[] |
no_license
|
markus1978/amof2
|
3e0c84adc66826dae6133d8a1f54817db3a8fd64
|
a0cdcc01527473fca378116f2e831c27a0c00f94
|
refs/heads/master
| 2021-01-19T12:58:28.711200
| 2009-12-16T13:38:14
| 2009-12-16T13:38:14
| 25,520,630
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 835
|
java
|
package hub.sam.mof.plugin.modelview.actions;
import hub.sam.mof.plugin.modelview.tree.TreeObject;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.TreeViewer;
public class ShowDetailsAction extends ContextAction {
public ShowDetailsAction(TreeViewer view) {
super(view, "Show Details", IAction.AS_CHECK_BOX);
}
@Override
protected boolean isEnabledFor(TreeObject obj) {
boolean isEnabledFor = obj.getContext() instanceof IShowDetailsContext;
if (isEnabledFor) {
setChecked(((IShowDetailsContext)obj.getContext()).isShowingDetails(obj));
}
return isEnabledFor;
}
@Override
protected void runFor(TreeObject obj) {
IShowDetailsContext context = (IShowDetailsContext)obj.getContext();
context.switchShowDetails(obj);
view.refresh(obj);
}
}
|
[
"do@not.use"
] |
do@not.use
|
e884324a4f3bc43acac3c036d5180353d84e80cd
|
7864deb90f15318e2a0ac08bae943f6716ca3a35
|
/shop-user/src/main/java/quick/pager/shop/user/controller/UserCodeController.java
|
c1d57fa9572c3dd8ea9f3e2f63f841ccadd20f59
|
[
"MIT"
] |
permissive
|
hhy5277/spring-cloud-shop
|
0d5cb28b3a8ef81d1f2d5f82d72af6b2e6e92cc6
|
2a56846b57a83a9a4d6240cb3ad0e43fdf197f22
|
refs/heads/master
| 2020-05-02T10:57:15.724740
| 2019-03-13T08:36:17
| 2019-03-13T08:36:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,503
|
java
|
package quick.pager.shop.user.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import quick.pager.common.constants.Constants;
import quick.pager.common.constants.RedisKeys;
import quick.pager.common.dto.SmsDTO;
import quick.pager.common.response.Response;
import quick.pager.common.service.RedisService;
import quick.pager.common.utils.VerifyCodeUtils;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* 用户验证码方面的接口
*
* @author siguiyang
*/
@RestController
@Api(description = "用户验证码方面的接口")
@RequestMapping(Constants.Module.USER)
public class UserCodeController {
@Autowired
private RedisService redisService;
/**
* 发送短信验证码
*/
@RequestMapping(value = "/code/sendSMS", method = RequestMethod.POST)
@ApiOperation("发送短信验证码")
public Response sendSMS(SmsDTO dto) {
return null;
}
/**
* 发送图形验证码
*
* @param phone 手机号码
* @param response response
*/
@RequestMapping(value = "/send/code/graphic", method = RequestMethod.GET)
@ApiOperation("发送图形验证码")
@ApiImplicitParams({
@ApiImplicitParam(name = "phone", value = "手机号码", required = true, dataType = "Long", paramType = "query")})
public void sendGraphic(@RequestParam String phone, HttpServletResponse response) throws IOException {
// 设置响应的类型格式为图片格式
response.setContentType("image/jpeg");
// 禁止图像缓存。
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
//实例生成验证码对象
VerifyCodeUtils instance = new VerifyCodeUtils();
//将验证码存入session
redisService.set(RedisKeys.UserKeys.SHOP_GRAPHICS_CODE + phone, instance.getCode(), 2 * 60);
//向页面输出验证码图片
instance.write(response.getOutputStream());
}
}
|
[
"siguiyang1992@outlook.com"
] |
siguiyang1992@outlook.com
|
51becae0e7100c3bc4ef4140537592d4618ebb00
|
06bb1087544f7252f6a83534c5427975f1a6cfc7
|
/modules/ejbca-ws-cli/src-gen/org/ejbca/core/protocol/ws/client/gen/RolloverCACert.java
|
da3386c95fc4a58b5d6558d71c247d3f1208fb77
|
[] |
no_license
|
mvilche/ejbca-ce
|
65f2b54922eeb47aa7a132166ca5dfa862cee55b
|
a89c66218abed47c7b310c3999127409180969dd
|
refs/heads/master
| 2021-03-08T08:51:18.636030
| 2020-03-12T18:53:18
| 2020-03-12T18:53:18
| 246,335,702
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,339
|
java
|
package org.ejbca.core.protocol.ws.client.gen;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for rolloverCACert complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="rolloverCACert">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "rolloverCACert", propOrder = {
"arg0"
})
public class RolloverCACert {
protected String arg0;
/**
* Gets the value of the arg0 property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getArg0() {
return arg0;
}
/**
* Sets the value of the arg0 property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg0(String value) {
this.arg0 = value;
}
}
|
[
"mfvilche@gmail.com"
] |
mfvilche@gmail.com
|
c12fd6de476d4089640c1df8d93211009aa4c72e
|
b7429cb7d9f3197d33121d366050183dd7447111
|
/app/src/main/java/com/hex/express/iwant/activities/NewSearchActivity.java
|
de1e93aa438d56bc5feb197c349022d69a301dbb
|
[] |
no_license
|
hexiaoleione/biaowang_studio
|
28c719909667f131637205de79bb8cc72fc52545
|
1735f31cd4e25ba5e08dd117ba7492186dcee8b0
|
refs/heads/master
| 2021-07-10T00:03:42.022656
| 2019-02-12T03:35:51
| 2019-02-12T03:35:51
| 144,809,142
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,804
|
java
|
package com.hex.express.iwant.activities;
import java.util.List;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import butterknife.Bind;
import butterknife.ButterKnife;
import com.hex.express.iwant.R;
import com.hex.express.iwant.iWantApplication;
import com.hex.express.iwant.adapters.NewSearchAdpa;
import com.hex.express.iwant.adapters.ProvinceAdapter;
import com.hex.express.iwant.adapters.ProvincetownAdapter;
import com.hex.express.iwant.bean.CitySelectBean;
import com.hex.express.iwant.helper.CheckDbUtils;
import com.hex.express.iwant.helper.CitySelectOperation;
import com.hex.express.iwant.helper.DbManager;
import com.hex.express.iwant.views.TitleBarView;
public class NewSearchActivity extends Activity{
private String aName;
private String pCode;
private String cCode;
private String tCode;
private ListView provList;
private ListView cityList;
private ListView townList;
private NewSearchAdpa adapter;
private List<CitySelectBean> resultPro;
private List<CitySelectBean> resultCity;
private List<CitySelectBean> resultTown;
@Bind(R.id.btnLeft)
Button btnLeft;
@Bind(R.id.btnright)
Button btnright;
private Intent intent;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_newsearchcity);
ButterKnife.bind(this);
initProvince();
initData();
}
private void initData() {
btnLeft.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
private void initProvince(){
boolean isCopySuccess = CheckDbUtils.checkDb();
intent = new Intent();
//成功的将数据库copy到data 中
if(isCopySuccess){
iWantApplication.getInstance().mDbManager = new DbManager(iWantApplication.getInstance());
}
cityList = null;
provList = (ListView) findViewById(R.id.listProvince);
provList.setOnItemClickListener(new OnItemClickListener(){
@Override
public void onItemClick(AdapterView<?> arg0, View v, int index,
long arg3) {
CitySelectBean citySelectBean = resultPro.get(index);
aName = citySelectBean.getName();
pCode = citySelectBean.getCode();
intent.putExtra("pro", aName);
// btnright.setOnClickListener(new OnClickListener() {
// @Override
// public void onClick(View arg0) {
// // TODO Auto-generated method stub
intent.putExtra("citytwo", aName);
intent.putExtra("type", 2);
NewSearchActivity.this.setResult(RESULT_OK, intent);
finish();
// }
// });
// initCity(pCode);
}
});
resultPro = getProviceData();
adapter = new NewSearchAdpa(NewSearchActivity.this,resultPro);
NewSearchActivity.this.provList.setAdapter(adapter);
}
private void initCity(String provCode){
boolean isCopySuccess = CheckDbUtils.checkDb();
//成功的将数据库copy到data 中
if(isCopySuccess){
iWantApplication.getInstance().mDbManager = new DbManager(iWantApplication.getInstance());
}
if(resultTown!=null){
resultTown.clear();
}
cityList = (ListView) findViewById(R.id.listCity);
cityList.setOnItemClickListener(new OnItemClickListener(){
@Override
public void onItemClick(AdapterView<?> arg0, View v, int index,
long arg3) {
CitySelectBean citySelectBean = resultCity.get(index);
aName = aName+citySelectBean.getName();
cCode = citySelectBean.getCode();
intent.putExtra("city", citySelectBean.getName());
intent.putExtra("code", cCode);
// btnright.setOnClickListener(new OnClickListener() {
// @Override
// public void onClick(View arg0) {
// TODO Auto-generated method stub
intent.putExtra("type", 3);
NewSearchActivity.this.setResult(RESULT_OK, intent);
finish();
// }
// });
// ProvCityTownAcrivity.this.setResult(RESULT_OK, intent);
// finish();
// initTown(cCode);
// adapter.setSelectItem(index);
}
});
resultCity = getCityData(provCode);
adapter = new NewSearchAdpa(NewSearchActivity.this,resultCity);
NewSearchActivity.this.cityList.setAdapter(adapter);
}
private void initTown(String cityCode){
boolean isCopySuccess = CheckDbUtils.checkDb();
//成功的将数据库copy到data 中
if(isCopySuccess){
iWantApplication.getInstance().mDbManager = new DbManager(iWantApplication.getInstance());
}
townList = (ListView) findViewById(R.id.listTown);
townList.setOnItemClickListener(new OnItemClickListener(){
@Override
public void onItemClick(AdapterView<?> arg0, View v, int index,
long arg3) {
CitySelectBean citySelectBean = resultTown.get(index);
aName = aName+citySelectBean.getName();
tCode = citySelectBean.getCode();
//返回cityCode和aName
// ArrayList<String> back = new ArrayList<String>();
// back.add(cCode);
// back.add(aName);
String ba = cCode+"&"+aName;
// intent.putStringArrayListExtra("area", back);
intent.putExtra("distract",citySelectBean.getName());
intent.putExtra("name", aName);
intent.putExtra("code", cCode);
NewSearchActivity.this.setResult(RESULT_OK, intent);
finish();
}
});
resultTown = getTownData(cityCode);
adapter = new NewSearchAdpa(NewSearchActivity.this,resultTown);
NewSearchActivity.this.townList.setAdapter(adapter);
}
private List<CitySelectBean> getProviceData(){
CitySelectOperation selectOpeation = new CitySelectOperation();
List<CitySelectBean> mProvices = selectOpeation.selectDataFromDb("select * from provice","pro_name","pro_code");
return mProvices;
}
private List<CitySelectBean> getCityData(String provCode){
CitySelectOperation selectOpeation = new CitySelectOperation();
List<CitySelectBean> mProvices = selectOpeation.selectDataFromDb("select * from city where pro_code='"+provCode+"'","city_name","city_code");
return mProvices;
}
private List<CitySelectBean> getTownData(String cityCode){
CitySelectOperation selectOpeation = new CitySelectOperation();
List<CitySelectBean> mProvices = selectOpeation.selectDataFromDb("select * from area where pro_code='"+cityCode+"'","area_name","area_code");
return mProvices;
}
/**
* 返回键关闭本页面
*/
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK
&& event.getAction() == KeyEvent.ACTION_DOWN) {
finish();
return true;
}
return super.dispatchKeyEvent(event);
}
}
|
[
"798711147@qq.com"
] |
798711147@qq.com
|
0d59c3b02793333b9b91499ef1314622a6c1b51a
|
cf1fecbb47fb2634485bb17995adf796d2b5c04f
|
/workstation-spring/src/main/java/com/qing/niu/workstation/spring/springboot/autoconfig/version3/GjkImportSelector.java
|
b09a3560ba998515792e083ae96905aa6d7097d5
|
[] |
no_license
|
alangui/communication
|
c19c1c5a0e99b7cacaab5493d76579a481735f18
|
2a73672400d0f0d8694eec8c390627a039f1c2d2
|
refs/heads/master
| 2022-12-23T00:33:18.747065
| 2021-01-19T03:10:17
| 2021-01-19T03:10:17
| 155,523,863
| 0
| 0
| null | 2022-12-15T23:34:39
| 2018-10-31T08:31:46
|
Java
|
UTF-8
|
Java
| false
| false
| 1,808
|
java
|
package com.qing.niu.workstation.spring.springboot.autoconfig.version3;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.core.io.support.SpringFactoriesLoader;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import java.util.List;
/**
* <p>
* </p>
*
* @Author Gui Jin Kang
* @Date 2020/3/9 14:11
* @ProjectName communication
* @Version 1.0.0
*/
public class GjkImportSelector implements ImportSelector{
/**
* 硬编码
*/
// @Override
// public String[] selectImports(AnnotationMetadata importingClassMetadata) {
// return new String[]{
// "TestConfig"};
// }
// /**
// * 读取文件
// */
// @Override
// public String[] selectImports(AnnotationMetadata importingClassMetadata) {
// Properties properties = new Properties();
// try {
// properties = PropertiesLoaderUtils.loadAllProperties("myautoconfig.properties");
// } catch (IOException e) {
// System.err.println(e);
// }
// String value = properties.getProperty(GjkEnableAutoConfig.class.getName());
// return new String[]{value};
// }
/**
* spring boot方式
*/
@Override
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
List<String> configurations = SpringFactoriesLoader.loadFactoryNames(
ObjectAutoConfig.class,GjkImportSelector.class.getClassLoader());
Assert.notEmpty(configurations,"No auto configuration classes found in META-INF/spring.factories");
return StringUtils.toStringArray(configurations);
}
}
|
[
"2516394328@qq.com"
] |
2516394328@qq.com
|
57314911276922bfa66e4a5a8ea834a52160a9e1
|
3df0d1c29c3d936cf5bc94659bf7db2d76c9f80e
|
/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TextView.java
|
c42584fbfda0200699ad76ebcf7c34e67a76ee35
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
lalithsuresh/Scaling-HDFS-NameNode
|
657046f0a6c15a1ff4acd79f87768c0238c06544
|
84c1f946fecad3449e47b6f4c529425ee757d894
|
HEAD
| 2016-09-10T12:57:33.128309
| 2012-01-02T23:48:03
| 2012-01-02T23:48:03
| 2,349,183
| 22
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,672
|
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.yarn.webapp.view;
import java.io.PrintWriter;
import org.apache.hadoop.yarn.webapp.View;
public abstract class TextView extends View {
private final String contentType;
protected TextView(ViewContext ctx, String contentType) {
super(ctx);
this.contentType = contentType;
}
@Override public PrintWriter writer() {
response().setContentType(contentType);
return super.writer();
}
/**
* Print strings as is (no newline, a la php echo).
* @param args the strings to print
*/
public void echo(Object... args) {
PrintWriter out = writer();
for (Object s : args) {
out.print(s);
}
}
/**
* Print strings as a line (new line appended at the end, a la C/Tcl puts).
* @param args the strings to print
*/
public void puts(Object... args) {
echo(args);
writer().println();
}
}
|
[
"vinodkv@apache.org"
] |
vinodkv@apache.org
|
589e1719e7b37b4c5da6c1b902371affa0e86a7b
|
bfe555829c44521696bab62ebc5e374698f74cfe
|
/webapi-sponge/src/main/java/valandur/webapi/link/redis/RedisClient.java
|
c6ba1ac34b889f11f187dcf7560f40fcac071ca0
|
[
"MIT"
] |
permissive
|
jxsd1234a/Web-API
|
464b38a909d2349d7ac1a655d3f93861f3c4334c
|
8ec9e41e58b6655adfd1343069dccc3feb1469c4
|
refs/heads/master
| 2022-11-10T14:53:37.403195
| 2020-07-01T02:51:40
| 2020-07-01T02:51:40
| 267,387,574
| 0
| 0
|
MIT
| 2020-05-27T17:46:23
| 2020-05-27T17:46:22
| null |
UTF-8
|
Java
| false
| false
| 2,292
|
java
|
package valandur.webapi.link.redis;
import com.fasterxml.jackson.databind.ObjectMapper;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPubSub;
import valandur.webapi.WebAPI;
import valandur.webapi.link.LinkClient;
import valandur.webapi.link.message.*;
import java.io.IOException;
public class RedisClient extends LinkClient {
private Jedis jedis;
public RedisClient(String privateKey) {
super(privateKey);
}
@Override
public void connect(String target) {
try {
jedis = new Jedis(target);
// Send welcome message
sendConnect(new ConnectMessage(privateKey));
jedis.subscribe(new JedisPubSub() {
@Override
public void onMessage(String channel, String message) {
ObjectMapper mapper = new ObjectMapper();
try {
RequestMessage req = mapper.readValue(message, RequestMessage.class);
ResponseMessage res = WebAPI.emulateRequest(req);
sendResponse(res);
} catch (IOException e) {
e.printStackTrace();
}
}
}, "request-" + id);
} catch (Exception e) {
e.printStackTrace();
jedis = null;
}
}
@Override
public void disconnect() {
if (jedis == null) {
return;
}
try {
sendDisconnect(new DisconnectMessage(privateKey));
jedis.close();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
protected void sendConnect(ConnectMessage message) {
send("connect", message);
}
@Override
protected void sendDisconnect(DisconnectMessage message) {
send("disconnect", message);
}
@Override
protected void sendResponse(ResponseMessage message) {
send("response", message);
}
private void send(String channel, BaseMessage msg) {
try {
ObjectMapper mapper = new ObjectMapper();
jedis.publish(channel, mapper.writeValueAsString(msg));
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
[
"inithilian@gmail.com"
] |
inithilian@gmail.com
|
308fb3ab08ad60b8629120e5349109955ad9a18c
|
2322058e3391abe9d1d0ac3e5a1187e29139ac1e
|
/src/test/java/edj/LineParserTest.java
|
a1b7e67f6caed5f3f84fb2e84d0e78e8170d278d
|
[
"BSD-2-Clause"
] |
permissive
|
Kytech/edj
|
fda41db968547c5366b185884a4a0eafb7b73b07
|
89a24c55fa7d10185476fac9cb0bd05c35e40246
|
refs/heads/master
| 2023-03-08T02:11:00.069251
| 2021-02-10T03:30:31
| 2021-02-10T03:30:31
| 319,211,300
| 0
| 0
| null | 2020-12-07T05:15:23
| 2020-12-07T05:15:23
| null |
UTF-8
|
Java
| false
| false
| 3,299
|
java
|
package edj;
import static edj.LineParser.LNUM_NONE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@RunWith(value=Parameterized.class)
public class LineParserTest {
private boolean expected;
private String input; // the entire command as a String
private int lnum1, lnum2;
private String operands; // The operand part, e.g, "foo" of "r foo"
private final static boolean verbose = false;
private static BufferPrims buffHandler = new AbstractBufferPrims() {
public int getCurrentLineNumber() {
return 3;
};
public int size() {
return 6;
}
@Override
public void addLine(String newLine) {
// not used
}
@Override
public void addLines(int start, List<String> newLines) {
// notused
}
@Override
public void readBuffer(String fileName) {
// notused
}
public void writeBuffer(String fileName) {
// notused
}
@Override
public List<String> getLines(int i, int j) {
// notused
return null;
}
@Override
public void undo() {
// notused
}
@Override
public boolean isUndoSupported() {
return false;
}
};
@Before
public void setUp() throws Exception {
}
/** This method provides data to the constructor for use in tests */
@Parameters(name="{1}")
public static List<Object[]> data() {
final int current = buffHandler.getCurrentLineNumber();
final int size = buffHandler.size();
return Arrays.asList(new Object[][] {
// exp-bool, input-str, line1, line2, arguments
{ true, "1,2p", 1, 2, null },
{ true, "2p", 2, 2, null },
{ true, "3s/Line/Foo/", 3, 3, "/Line/Foo/" },
{ true, "3,3s/Line/Foo/", 3, 3, "/Line/Foo/" },
{ true, "3,6s/Line/Foo/", 3, 6, "/Line/Foo/" },
{ true, ",p", 1, buffHandler.size(), null }, // print all
{ true, ".p", current, current, null }, // print current
{ true, "p", current, current, null },
{ true, "$p", size, size, null },
{ true, "e 3lines.txt", current, current , "3lines.txt" },
{ true, "g/foo/s//bar/", current, current, "/foo/s//bar/" },
// Test some failure modes
{ false, "?", LNUM_NONE, LNUM_NONE, null }, // ?patt? not implemented
{ false, "*", 0, 0, null }, // random char
});
}
/** Constructor, gets arguments from data array; cast as needed */
public LineParserTest(Boolean expected, String input, int lnum1, int lnum2, String operands) {
this.expected = expected;
this.input = input;
this.lnum1 = lnum1;
this.lnum2 = lnum2;
this.operands = operands;
}
@Test
public void testPositive() {
final ParsedCommand parsed = LineParser.parse(input, buffHandler);
if (expected && parsed == null) {
fail("Did not parse " + input);
}
if (!expected && parsed != null) {
fail("Should not have parsed " + input);
}
if (parsed == null) {
return;
}
if (verbose)
System.out.println("LineParserTest.testPositive: " + input + " ==> " + parsed);
assertEquals(lnum1, parsed.startNum);
assertEquals(lnum2, parsed.endNum);
if (operands != null) {
assertEquals(operands, parsed.operands);
}
}
}
|
[
"ian@darwinsys.com"
] |
ian@darwinsys.com
|
701ab7c823ed6f791d6149492f00372b4aafe0c2
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/CityZenApp_Android-Development/CityZenApp/app/src/main/java/com/cityzen/cityzen/Utils/MapUtils/Search/nominatimparser/Place.java
|
809bd96938442fcf6a77dda933aed9c63a93ca4b
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
|
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
|
0564143d92f8024ff5fa6b659c2baebf827582b1
|
refs/heads/master
| 2020-07-13T13:53:40.297493
| 2019-01-11T11:51:18
| 2019-01-11T11:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,864
|
java
|
// isComment
package com.cityzen.cityzen.Utils.MapUtils.Search.nominatimparser;
import android.content.Context;
import android.os.Parcel;
import java.util.HashMap;
import java.util.Map;
public class isClassOrIsInterface extends Adress {
private long isVariable, isVariable;
private float isVariable;
private String isVariable, isVariable, isVariable, isVariable, isVariable;
private BoundingBox isVariable;
private Map<String, String> isVariable = new HashMap<>();
public isConstructor(long isParameter, long isParameter, double isParameter, double isParameter, float isParameter, String isParameter, String isParameter, String isParameter, String isParameter, String isParameter, BoundingBox isParameter, Map<String, String> isParameter) {
super(isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr, isNameExpr);
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
}
public isConstructor(Parcel isParameter) {
super(isNameExpr);
isNameExpr = isNameExpr.isMethod();
isNameExpr = isNameExpr.isMethod();
isNameExpr = isNameExpr.isMethod();
isNameExpr = isNameExpr.isMethod();
isNameExpr = isNameExpr.isMethod();
isNameExpr = isNameExpr.isMethod();
isNameExpr = isNameExpr.isMethod();
isNameExpr = isNameExpr.isMethod();
}
@Override
public String isMethod(Context isParameter) {
String[] isVariable = isNameExpr.isMethod("isStringConstant");
return isNameExpr[isIntegerConstant] + "isStringConstant" + isNameExpr[isIntegerConstant];
}
public Map<String, String> isMethod() {
return isNameExpr;
}
public void isMethod(Map<String, String> isParameter) {
this.isFieldAccessExpr = isNameExpr;
}
public long isMethod() {
return isNameExpr;
}
public long isMethod() {
return isNameExpr;
}
public double isMethod() {
return isNameExpr;
}
public double isMethod() {
return isNameExpr;
}
public float isMethod() {
return isNameExpr;
}
public String isMethod() {
return isNameExpr;
}
public String isMethod() {
return isNameExpr;
}
public String isMethod() {
return isNameExpr;
}
public String isMethod() {
return isNameExpr;
}
public String isMethod() {
return isNameExpr;
}
public String isMethod() {
return isNameExpr;
}
@Override
public String isMethod() {
return isNameExpr;
}
@Override
public int isMethod() {
return isIntegerConstant;
}
@Override
public void isMethod(Parcel isParameter, int isParameter) {
super.isMethod(isNameExpr, isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
}
public static final Creator isVariable = new Creator() {
public Place isMethod(Parcel isParameter) {
return new Place(isNameExpr);
}
public Place[] isMethod(int isParameter) {
return new Place[isNameExpr];
}
};
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
02468f271afc3732d879acbabd5e279d12c8ac57
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_1/src/j/f/h/Calc_1_1_9574.java
|
ee9e4168bb060e562a9787e597eccf640aec146a
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 131
|
java
|
package j.f.h;
public class Calc_1_1_9574 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
c94f9f98e4219a9d78424f45b70e32f8100c4ba3
|
eace11a5735cfec1f9560e41a9ee30a1a133c5a9
|
/CMT/cptiscas/程序变异体的backup/改名前/SequentialHeap/sequentialHeap1/SequentialHeap.java
|
8e42cdd4bed08ce6f68b73b659093a2897916a8e
|
[] |
no_license
|
phantomDai/mypapers
|
eb2fc0fac5945c5efd303e0206aa93d6ac0624d0
|
e1aa1236bbad5d6d3b634a846cb8076a1951485a
|
refs/heads/master
| 2021-07-06T18:27:48.620826
| 2020-08-19T12:17:03
| 2020-08-19T12:17:03
| 162,563,422
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,363
|
java
|
/*
* SequentialHeap.java
*
* Created on March 10, 2007, 10:45 AM
*
* From "Multiprocessor Synchronization and Concurrent Data Structures",
* by Maurice Herlihy and Nir Shavit.
* Copyright 2007 Elsevier Inc. All rights reserved.
*/
package mutants.SequentialHeap.sequentialHeap1;
/**
* Sequential heap.
* @param T type manged by heap
* @author mph
*/
public class SequentialHeap<T> implements PQueue<T> {
private static final int ROOT = 1;
int next;
HeapNode<T>[] heap;
/**
* Constructor
* @param capacity maximum number of items heap can hold
*/
public SequentialHeap(int capacity) {
next = 0;
heap = (HeapNode<T>[]) new HeapNode[capacity + 1];
for (int i = 0; i < capacity + 1; i++) {
heap[i] = new HeapNode<T>();
}
}
/**
* Add item to heap.
* @param item Uninterpreted item.
* @param priority item priority
*/
public void add(T item, int priority) {
int child = next++;
heap[child].init(item, priority);
while (child > ROOT) {
int parent = child / 2;
int oldChild = child;
if (heap[child].priority < heap[parent].priority) {
swap(child, parent);
child = parent;
} else {
return;
}
}
}
/**
* Returns (does not remove) least item in heap.
* @return least item.
*/
public T getMin() {
return heap[ROOT].item;
}
/**
* Returns and removes least item in heap.
* @return least item.
*/
public T removeMin() {
int bottom = --next;
T item = heap[ROOT].item;
swap(ROOT, bottom);
if (bottom == ROOT) {
return item;
}
int child = 0;
int parent = ROOT;
while (parent < heap.length / 2) {
int left = parent * 2; int right = (parent * 2) + 1;
if (left >= next) {
break;
} else if (right >= next || heap[left].priority < heap[right].priority) {
child = left;
} else {
child = right;
}
// If child higher priority than parent swap then else stop
if (heap[child].priority < heap[parent].priority) {
swap(parent, child); // Swap item, key, and tag of heap[i] and heap[child]
parent = child;
} else {
break;
}
}
return item;
}
private void swap(int i, int j) {
HeapNode<T> node = heap[i];
heap[i] = heap[j];
heap[j] = node;
}
public boolean isEmpty() {
return next == 0;
}
public void sanityCheck() {
int stop = next;
for (int i = ROOT; i < stop; i++) {
int left = i * 2; int right = (i * 2) + 1;
if (left < stop && heap[left].priority < heap[i].priority) {
System.out.println("Heap property violated:");
System.out.printf("\theap[%d] = %d, left child heap[%d] = %d\n",
i, heap[i].priority, left, heap[left].priority);
}
if (right < stop && heap[right].priority < heap[i].priority) {
System.out.println("Heap property violated:");
System.out.printf("\theap[%d] = %d, right child heap[%d] = %d\n",
i, heap[i].priority, right, heap[right].priority);
}
}
}
private static class HeapNode<S> {
int priority;
S item;
/**
* initialize node
* @param myItem
* @param myPriority
*/
public void init(S myItem, int myPriority) {
item = myItem;
priority = myPriority;
}
}
}
|
[
"daihepeng@sina.cn"
] |
daihepeng@sina.cn
|
989ac7bd101eb936eb7686af638916dea35331cd
|
93a3e92f2c94e94ceded1e1e60c371562c39e1e9
|
/loving-activity/src/main/java/cn/lovingliu/loving/model/ActivityItem.java
|
23fa4e24236e5f80bb6fdfa4df3c6d4954cebe5f
|
[] |
no_license
|
LovingLiuMeMe/loving_cloud
|
54a0e81b6de3a4ecea165d34f7f4321edc629e34
|
a5fd70fdef4dfaebd262a71e6c29dba688076fc2
|
refs/heads/master
| 2022-12-22T21:26:09.868657
| 2019-12-12T16:56:17
| 2019-12-12T16:56:17
| 227,389,196
| 0
| 0
| null | 2022-12-10T05:23:50
| 2019-12-11T14:47:03
|
Java
|
UTF-8
|
Java
| false
| false
| 2,839
|
java
|
package cn.lovingliu.loving.model;
import java.io.Serializable;
import java.util.Date;
public class ActivityItem implements Serializable {
/**
* 主页活动关联商品id
*
* @mbg.generated
*/
private Long activityItemId;
/**
* 主页活动id
*
* @mbg.generated
*/
private Long activityId;
/**
* 关联商品id
*
* @mbg.generated
*/
private Long goodsId;
/**
* 商品的名称(订单快照)
*
* @mbg.generated
*/
private String goodsName;
/**
* 商品的主图(订单快照)
*
* @mbg.generated
*/
private String goodsCoverImg;
/**
* 活动价格
*
* @mbg.generated
*/
private Integer sellingPrice;
/**
* 创建时间
*
* @mbg.generated
*/
private Date createTime;
private static final long serialVersionUID = 1L;
public Long getActivityItemId() {
return activityItemId;
}
public void setActivityItemId(Long activityItemId) {
this.activityItemId = activityItemId;
}
public Long getActivityId() {
return activityId;
}
public void setActivityId(Long activityId) {
this.activityId = activityId;
}
public Long getGoodsId() {
return goodsId;
}
public void setGoodsId(Long goodsId) {
this.goodsId = goodsId;
}
public String getGoodsName() {
return goodsName;
}
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
public String getGoodsCoverImg() {
return goodsCoverImg;
}
public void setGoodsCoverImg(String goodsCoverImg) {
this.goodsCoverImg = goodsCoverImg;
}
public Integer getSellingPrice() {
return sellingPrice;
}
public void setSellingPrice(Integer sellingPrice) {
this.sellingPrice = sellingPrice;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", activityItemId=").append(activityItemId);
sb.append(", activityId=").append(activityId);
sb.append(", goodsId=").append(goodsId);
sb.append(", goodsName=").append(goodsName);
sb.append(", goodsCoverImg=").append(goodsCoverImg);
sb.append(", sellingPrice=").append(sellingPrice);
sb.append(", createTime=").append(createTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
|
[
"cmds12345678@163.com"
] |
cmds12345678@163.com
|
53b5e9868a55a3c3ccbb5150c3c1d17e3f240300
|
dfb8b54fa16a4c0532b7863723c661258f21f2bb
|
/src/main/java/com/tong/practices/y2020/m03/day09/ClassTest.java
|
d6233ff7fc6e4abfdfe86e069d2f00d19ebbd470
|
[] |
no_license
|
Tong-c/javaBasic
|
86c52e2bb5b9e0eabe7f77ed675cda999cc32255
|
6cfb9e0e8f43d74fd5c2677cd251fec3cce799c4
|
refs/heads/master
| 2021-06-01T11:53:53.672254
| 2021-01-05T03:58:10
| 2021-01-05T03:58:10
| 130,291,741
| 2
| 0
| null | 2020-10-13T02:37:08
| 2018-04-20T01:28:16
|
Java
|
UTF-8
|
Java
| false
| false
| 365
|
java
|
package com.tong.practices.y2020.m03.day09;
public class ClassTest {
public static void main(String[] args) throws ClassNotFoundException {
Class.forName("com.tong.practices.y2020.m03.day09.InitClassOne");
Class initClassTwo = InitClassTwo.class;
System.out.println(StaticFinal.a);
System.out.println(StaticNonFinal.b);
}
}
|
[
"1972376180@qq.com"
] |
1972376180@qq.com
|
ef6b8f860ecb990e44eececc9bc89d1d1370d7ef
|
f66e2ad3fc0f8c88278c0997b156f5c6c8f77f28
|
/Android/HotPluginAndHotFix/understand-plugin-framework/intercept-activity/src/main/java/com/weishu/intercept_activity/app/hook/IActivityManagerHandler.java
|
3bd2a34bd6adfaf0952a2458824869cba84b7079
|
[
"Apache-2.0"
] |
permissive
|
flyfire/Programming-Notes-Code
|
3b51b45f8760309013c3c0cc748311d33951a044
|
4b1bdd74c1ba0c007c504834e4508ec39f01cd94
|
refs/heads/master
| 2020-05-07T18:00:49.757509
| 2019-04-10T11:15:13
| 2019-04-10T11:15:13
| 180,750,568
| 1
| 0
|
Apache-2.0
| 2019-04-11T08:40:38
| 2019-04-11T08:40:38
| null |
UTF-8
|
Java
| false
| false
| 2,268
|
java
|
package com.weishu.intercept_activity.app.hook;
import android.content.ComponentName;
import android.content.Intent;
import android.util.Log;
import com.weishu.intercept_activity.app.StubActivity;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
/**
* @author weishu
* @dete 16/1/7.
*/
class IActivityManagerHandler implements InvocationHandler {
private static final String TAG = "IActivityManagerHandler";
Object mBase;
public IActivityManagerHandler(Object base) {
mBase = base;
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if ("startActivity".equals(method.getName())) {
// 只拦截这个方法
// 替换参数, 任你所为;甚至替换原始Activity启动别的Activity偷梁换柱
// API 23:
// public final Activity startActivityNow(Activity parent, String id,
// Intent intent, ActivityInfo activityInfo, IBinder token, Bundle state,
// Activity.NonConfigurationInstances lastNonConfigurationInstances) {
// 找到参数里面的第一个Intent 对象
Intent raw;
int index = 0;
for (int i = 0; i < args.length; i++) {
if (args[i] instanceof Intent) {
index = i;
break;
}
}
raw = (Intent) args[index];
Intent newIntent = new Intent();
// 替身Activity的包名, 也就是我们自己的包名
String stubPackage = "com.weishu.intercept_activity.app";
// 这里我们把启动的Activity临时替换为 StubActivity
ComponentName componentName = new ComponentName(stubPackage, StubActivity.class.getName());
newIntent.setComponent(componentName);
// 把我们原始要启动的TargetActivity先存起来
newIntent.putExtra(AMSHookHelper.EXTRA_TARGET_INTENT, raw);
// 替换掉Intent, 达到欺骗AMS的目的
args[index] = newIntent;
Log.d(TAG, "hook success");
return method.invoke(mBase, args);
}
return method.invoke(mBase, args);
}
}
|
[
"ztiany3@gmail.com"
] |
ztiany3@gmail.com
|
8fd49372cba21fb364a86b75c004f696fa3f6b1b
|
747a9fbd3ea6a3d3e469d63ade02b7620d970ca6
|
/gmsm/src/main/java/com/getui/gmsm/bouncycastle/asn1/esf/OtherHashAlgAndValue.java
|
c35598f79197d6e4e4cc09beab02e2bcd63cf0ca
|
[] |
no_license
|
xievxin/GitWorkspace
|
3b88601ebb4718dc34a2948c673367ba79c202f0
|
81f4e7176daa85bf8bf5858ca4462e9475227aba
|
refs/heads/master
| 2021-01-21T06:18:33.222406
| 2019-01-31T01:28:50
| 2019-01-31T01:28:50
| 95,727,159
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,153
|
java
|
package com.getui.gmsm.bouncycastle.asn1.esf;
import com.getui.gmsm.bouncycastle.asn1.ASN1Encodable;
import com.getui.gmsm.bouncycastle.asn1.ASN1EncodableVector;
import com.getui.gmsm.bouncycastle.asn1.ASN1OctetString;
import com.getui.gmsm.bouncycastle.asn1.ASN1Sequence;
import com.getui.gmsm.bouncycastle.asn1.DERObject;
import com.getui.gmsm.bouncycastle.asn1.DERSequence;
import com.getui.gmsm.bouncycastle.asn1.x509.AlgorithmIdentifier;
public class OtherHashAlgAndValue
extends ASN1Encodable
{
private AlgorithmIdentifier hashAlgorithm;
private ASN1OctetString hashValue;
public static OtherHashAlgAndValue getInstance(
Object obj)
{
if (obj instanceof OtherHashAlgAndValue)
{
return (OtherHashAlgAndValue) obj;
}
else if (obj != null)
{
return new OtherHashAlgAndValue(ASN1Sequence.getInstance(obj));
}
throw new IllegalArgumentException("null value in getInstance");
}
private OtherHashAlgAndValue(
ASN1Sequence seq)
{
if (seq.size() != 2)
{
throw new IllegalArgumentException("Bad sequence size: " + seq.size());
}
hashAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(0));
hashValue = ASN1OctetString.getInstance(seq.getObjectAt(1));
}
public OtherHashAlgAndValue(
AlgorithmIdentifier hashAlgorithm,
ASN1OctetString hashValue)
{
this.hashAlgorithm = hashAlgorithm;
this.hashValue = hashValue;
}
public AlgorithmIdentifier getHashAlgorithm()
{
return hashAlgorithm;
}
public ASN1OctetString getHashValue()
{
return hashValue;
}
/**
* <pre>
* OtherHashAlgAndValue ::= SEQUENCE {
* hashAlgorithm AlgorithmIdentifier,
* hashValue OtherHashValue }
*
* OtherHashValue ::= OCTET STRING
* </pre>
*/
public DERObject toASN1Object()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(hashAlgorithm);
v.add(hashValue);
return new DERSequence(v);
}
}
|
[
"xiex@getui.com"
] |
xiex@getui.com
|
cdf26ee9c93d5086c8e7d92444fb8c4bba45510f
|
b66bdee811ed0eaea0b221fea851f59dd41e66ec
|
/src/com/urbanairship/push/ADMPushReceiver.java
|
7acf44061aee3f30d82285158d3e9943244bf494
|
[] |
no_license
|
reverseengineeringer/com.grubhub.android
|
3006a82613df5f0183e28c5e599ae5119f99d8da
|
5f035a4c036c9793483d0f2350aec2997989f0bb
|
refs/heads/master
| 2021-01-10T05:08:31.437366
| 2016-03-19T20:41:23
| 2016-03-19T20:41:23
| 54,286,207
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,989
|
java
|
package com.urbanairship.push;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Build.VERSION;
import android.support.v4.content.WakefulBroadcastReceiver;
import com.urbanairship.Autopilot;
import com.urbanairship.Logger;
public class ADMPushReceiver
extends WakefulBroadcastReceiver
{
@SuppressLint({"NewApi"})
public void onReceive(Context paramContext, Intent paramIntent)
{
Autopilot.automaticTakeOff(paramContext);
if ((paramIntent == null) || (paramIntent.getAction() == null)) {
return;
}
Logger.verbose("ADMPushReceiver - Received intent: " + paramIntent.getAction());
if (Build.VERSION.SDK_INT < 15)
{
Logger.error("ADMPushReceiver - Received intent from ADM transport on an unsupported API version.");
return;
}
String str = paramIntent.getAction();
label92:
int i;
switch (str.hashCode())
{
default:
i = -1;
label94:
switch (i)
{
}
break;
}
while (isOrderedBroadcast())
{
setResultCode(-1);
return;
if (!str.equals("com.amazon.device.messaging.intent.RECEIVE")) {
break label92;
}
i = 0;
break label94;
if (!str.equals("com.amazon.device.messaging.intent.REGISTRATION")) {
break label92;
}
i = 1;
break label94;
startWakefulService(paramContext, new Intent(paramContext, PushService.class).setAction("com.urbanairship.push.ACTION_RECEIVE_ADM_MESSAGE").putExtra("com.urbanairship.push.EXTRA_INTENT", paramIntent));
continue;
startWakefulService(paramContext, new Intent(paramContext, PushService.class).setAction("com.urbanairship.push.ACTION_ADM_REGISTRATION_FINISHED").putExtra("com.urbanairship.push.EXTRA_INTENT", paramIntent));
}
}
}
/* Location:
* Qualified Name: com.urbanairship.push.ADMPushReceiver
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
ed639cb644f2400205b82d9af6435ed65ce86570
|
6e23b8c300927653ad20f1f4e9fa0ca4fcde1130
|
/grafikon-net/src/net/parostroj/timetable/net/TrackedCheckVisitor.java
|
08afccd258f9c99c40e1e1b32bd6df6a34413d49
|
[] |
no_license
|
ranou712/grafikon.grafikon-old
|
ba573724c0f7265d56e87891e3fe7dff2807be0f
|
238acc31dab4dfcba804d8ba8eac57ef2e2bbdda
|
refs/heads/master
| 2016-09-05T15:15:50.343851
| 2010-03-02T09:43:30
| 2010-03-02T09:43:30
| 33,311,918
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,709
|
java
|
package net.parostroj.timetable.net;
import net.parostroj.timetable.model.events.*;
import net.parostroj.timetable.visitors.EventVisitor;
/**
* Visitor that checks if the event belongs to tracked events.
*
* @author jub
*/
public class TrackedCheckVisitor implements EventVisitor {
private boolean tracked = false;
public void clear() {
tracked = false;
}
public boolean isTracked() {
return tracked;
}
@Override
public void visit(TrainDiagramEvent event) {
tracked = true;
}
@Override
public void visit(NetEvent event) {
tracked = true;
}
@Override
public void visit(NodeEvent event) {
switch (event.getType()) {
case ATTRIBUTE: case TRACK_ADDED: case TRACK_ATTRIBUTE: case TRACK_REMOVED:
tracked = true;
break;
default:
tracked = false;
}
}
@Override
public void visit(LineEvent event) {
switch(event.getType()) {
case ATTRIBUTE: case TRACK_ADDED: case TRACK_ATTRIBUTE: case TRACK_REMOVED:
tracked = true;
break;
default:
tracked = false;
}
}
@Override
public void visit(TrainEvent event) {
switch(event.getType()) {
case ATTRIBUTE: case TECHNOLOGICAL: case TIME_INTERVAL_LIST:
tracked = true;
break;
default:
tracked = false;
}
}
@Override
public void visit(TrainTypeEvent event) {
tracked = true;
}
@Override
public void visit(TrainsCycleEvent event) {
tracked = true;
}
}
|
[
"jub@parostroj.net"
] |
jub@parostroj.net
|
ebfb2b80919d5225d780d3d179d96c03fbd4c9a3
|
16335f39a9e0133e9b7e651d180242169b06dfec
|
/src/main/java-gen/io/dronefleet/mavlink/ardupilotmega/RallyFetchPoint.java
|
eb7affd6cff5dc4b6072e2039266569a7510dd19
|
[
"MIT"
] |
permissive
|
dronefleet/mavlink
|
31db89a9fa40049e1de4d90395c2d1ea79ba64eb
|
0db2044ac302ce32303535a5e2a5911c451b6574
|
refs/heads/master
| 2023-03-04T10:16:33.280266
| 2023-02-27T18:18:53
| 2023-02-27T18:18:53
| 136,013,354
| 106
| 68
|
MIT
| 2023-02-14T19:17:20
| 2018-06-04T11:10:22
|
Java
|
UTF-8
|
Java
| false
| false
| 4,273
|
java
|
package io.dronefleet.mavlink.ardupilotmega;
import io.dronefleet.mavlink.annotations.MavlinkFieldInfo;
import io.dronefleet.mavlink.annotations.MavlinkMessageBuilder;
import io.dronefleet.mavlink.annotations.MavlinkMessageInfo;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
/**
* Request a current rally point from MAV. MAV should respond with a {@link io.dronefleet.mavlink.ardupilotmega.RallyPoint RALLY_POINT} message. MAV
* should not respond if the request is invalid.
*/
@MavlinkMessageInfo(
id = 176,
crc = 234,
description = "Request a current rally point from MAV. MAV should respond with a RALLY_POINT message. MAV should not respond if the request is invalid."
)
public final class RallyFetchPoint {
private final int targetSystem;
private final int targetComponent;
private final int idx;
private RallyFetchPoint(int targetSystem, int targetComponent, int idx) {
this.targetSystem = targetSystem;
this.targetComponent = targetComponent;
this.idx = idx;
}
/**
* Returns a builder instance for this message.
*/
@MavlinkMessageBuilder
public static Builder builder() {
return new Builder();
}
/**
* System ID.
*/
@MavlinkFieldInfo(
position = 1,
unitSize = 1,
description = "System ID."
)
public final int targetSystem() {
return this.targetSystem;
}
/**
* Component ID.
*/
@MavlinkFieldInfo(
position = 2,
unitSize = 1,
description = "Component ID."
)
public final int targetComponent() {
return this.targetComponent;
}
/**
* Point index (first point is 0).
*/
@MavlinkFieldInfo(
position = 3,
unitSize = 1,
description = "Point index (first point is 0)."
)
public final int idx() {
return this.idx;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || !getClass().equals(o.getClass())) return false;
RallyFetchPoint other = (RallyFetchPoint)o;
if (!Objects.deepEquals(targetSystem, other.targetSystem)) return false;
if (!Objects.deepEquals(targetComponent, other.targetComponent)) return false;
if (!Objects.deepEquals(idx, other.idx)) return false;
return true;
}
@Override
public int hashCode() {
int result = 0;
result = 31 * result + Objects.hashCode(targetSystem);
result = 31 * result + Objects.hashCode(targetComponent);
result = 31 * result + Objects.hashCode(idx);
return result;
}
@Override
public String toString() {
return "RallyFetchPoint{targetSystem=" + targetSystem
+ ", targetComponent=" + targetComponent
+ ", idx=" + idx + "}";
}
public static final class Builder {
private int targetSystem;
private int targetComponent;
private int idx;
/**
* System ID.
*/
@MavlinkFieldInfo(
position = 1,
unitSize = 1,
description = "System ID."
)
public final Builder targetSystem(int targetSystem) {
this.targetSystem = targetSystem;
return this;
}
/**
* Component ID.
*/
@MavlinkFieldInfo(
position = 2,
unitSize = 1,
description = "Component ID."
)
public final Builder targetComponent(int targetComponent) {
this.targetComponent = targetComponent;
return this;
}
/**
* Point index (first point is 0).
*/
@MavlinkFieldInfo(
position = 3,
unitSize = 1,
description = "Point index (first point is 0)."
)
public final Builder idx(int idx) {
this.idx = idx;
return this;
}
public final RallyFetchPoint build() {
return new RallyFetchPoint(targetSystem, targetComponent, idx);
}
}
}
|
[
"benbarkay@gmail.com"
] |
benbarkay@gmail.com
|
4bf67c41c2f1821114882d25f7df9bee409e53cc
|
761f1cba1b8d8b4f4cce85fd231ff4d00ead9f77
|
/day4/homework/Test2.java
|
1b43e7ed2f041479053dcd3a0a40be19a7e64bd1
|
[] |
no_license
|
BinYangXian/pri
|
e817f070c8a2c75cc7edeed44770d4ed8956e0a2
|
e904f7c09a301e18d7d5fb62de7e63f41600fe5b
|
refs/heads/master
| 2021-01-20T10:13:30.844032
| 2017-05-05T04:01:16
| 2017-05-05T04:01:16
| 82,458,048
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,412
|
java
|
public class Test2{
public static void main(String args[]){
dome2();
}
public static void dome2(){
/**
2、输出1-1000之间能被5整除的数,且每行输出3个。
思路分析
a)找到1-1000里所有的数-》利用for循环-》循环变量 1增加到1000
b)循环内-判断当前数-被5整除-打印
c)定义打印数字的次数变量-》每次打印-变量+1,每打印3次(模3==0)换一次行
*/
//打印数字的次数
int printNumCount=0;
for(int num=1;num<=1000;num++){//a
//b
if(num%5==0){
//打印
System.out.print(num+"\t");
//打印次数+1
printNumCount++;
}
//c-当前的数被5整除-且打印次数刚好是3的倍数换行
if(printNumCount%3==0&&num%5==0){
System.out.print("\n");
//System.out.println();
}
}
}
/**
1、逆序输出a---z的全部小写英文字母。提示-字母和整数有对应关系。
思路分析
a)得到z-a所有的字母-先得到122到97整数-》(整数可以转换为字母)
b)得到122到97整数--》利用 for循环 -循环变量从122减少到97
c)循环内容把整数转换为字母-》打印
*/
public static void dome1(){
int maxNum='z';
int minNum='a';
for(int charNum=maxNum;charNum>=minNum; charNum--){//得到22到97整数
//整数转字母
char curChar=(char)charNum;
System.out.print(curChar);
}
}
}
|
[
"350852832@qq.com"
] |
350852832@qq.com
|
c373e9c90b86e32100dd87b779a726202a444845
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/plugin/appbrand/jsapi/d/d$2.java
|
2b0a17dfe6ce7a4f4db6120b550e1fcb5f5ad607
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,807
|
java
|
package com.tencent.mm.plugin.appbrand.jsapi.d;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.jsapi.m;
import com.tencent.mm.plugin.appbrand.jsapi.p;
import com.tencent.mm.plugin.appbrand.page.u;
import com.tencent.mm.plugin.appbrand.s.e;
import com.tencent.mm.plugin.appbrand.widget.input.h;
import com.tencent.mm.plugin.appbrand.widget.input.x;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
final class d$2 extends x
{
d$2(d paramd, WeakReference paramWeakReference, int paramInt, String paramString)
{
}
private void aDC()
{
AppMethodBeat.i(123533);
u localu = (u)this.hKr.get();
if ((localu == null) || (localu.aJz() == null))
AppMethodBeat.o(123533);
while (true)
{
return;
h.aQx().d(localu.aJz());
AppMethodBeat.o(123533);
}
}
public final void Ba(String paramString)
{
AppMethodBeat.i(123531);
u localu = (u)this.hKr.get();
if (localu == null)
AppMethodBeat.o(123531);
while (true)
{
return;
try
{
int i = this.jdU;
h.a locala = new com/tencent/mm/plugin/appbrand/jsapi/d/h$a;
locala.<init>();
JSONObject localJSONObject = new org/json/JSONObject;
localJSONObject.<init>();
paramString = localJSONObject.put("value", e.Ei(paramString)).put("data", d.ol(i)).put("cursor", 0).put("inputId", i).put("keyCode", 8);
locala.a(localu.getRuntime().xT(), localu.hashCode()).AL(paramString.toString()).aCj();
AppMethodBeat.o(123531);
}
catch (Exception paramString)
{
ab.e("MicroMsg.JsApiInsertTextArea", "onBackspacePressedWhileValueNoChange, e = %s", new Object[] { paramString });
AppMethodBeat.o(123531);
}
}
}
public final void aDA()
{
AppMethodBeat.i(123530);
if (this.hKr.get() != null)
{
int i = this.jdU;
HashMap localHashMap = new HashMap(1);
localHashMap.put("inputId", Integer.valueOf(i));
((u)this.hKr.get()).M(this.eIl, this.hKq.j("ok", localHashMap));
d.S(i, this.hKs);
d.a(i, (u)this.hKr.get());
}
AppMethodBeat.o(123530);
}
public final void aDB()
{
AppMethodBeat.i(123532);
if (this.hKr.get() != null)
{
((u)this.hKr.get()).M(this.eIl, this.hKq.j("fail", null));
aDC();
}
AppMethodBeat.o(123532);
}
public final void b(String paramString, int paramInt, boolean paramBoolean1, boolean paramBoolean2)
{
AppMethodBeat.i(123529);
if (this.hKr.get() != null);
try
{
paramString = e.Ei(paramString);
JSONObject localJSONObject = new org/json/JSONObject;
localJSONObject.<init>();
paramString = localJSONObject.put("value", paramString).put("inputId", this.jdU).put("cursor", paramInt).toString();
if (paramBoolean1)
((u)this.hKr.get()).h("onKeyboardConfirm", paramString, 0);
if (!paramBoolean2)
((u)this.hKr.get()).h("onKeyboardComplete", paramString, 0);
if (!paramBoolean2)
aDC();
AppMethodBeat.o(123529);
return;
}
catch (JSONException paramString)
{
while (true)
ab.e("MicroMsg.JsApiInsertTextArea", "dispatch input done, exp = %s", new Object[] { bo.l(paramString) });
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes6-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.appbrand.jsapi.d.d.2
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
fb37e919aee806ce2117ed008da7e9ef1326512f
|
167de922121ef88fb7fcbfd9a954cea7b45da63b
|
/Code/com/bokecc/platform/playkernel/model/player/monitor/FlareDuration.java
|
d5a25d1106dbfa5a16aeb6253b5e0800e50d9211
|
[] |
no_license
|
404neko/PCF2
|
a60ea7c0f2e18629bd75feb20c18cbbb3b45387b
|
8d420c22b2146702065cac808c4dd9d29966acac
|
refs/heads/master
| 2021-01-13T00:37:55.964347
| 2013-08-26T18:06:58
| 2013-08-26T18:06:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,750
|
java
|
package com.bokecc.platform.playkernel.model.player.monitor {
public class FlareDuration {
private var _begin:FlarePosition;
private var _end:FlarePosition;
public function FlareDuration(_arg1:FlarePosition, _arg2:FlarePosition){
if (37 == 34){
return;
/*not popped
this
*/
};
super();
this._begin = _arg1;
this._end = _arg2;
}
public function get begin():FlarePosition{
if (37 == 34){
return;
/*not popped
this
*/
};
return (this._begin);
}
public function get end():FlarePosition{
if (37 == 34){
return;
/*not popped
this
*/
};
return (this._end);
}
public function get duration():Number{
if (37 == 34){
return;
/*not popped
this
*/
};
return ((this.end.time - this.begin.time));
}
public function get loadSize():Number{
if (37 == 34){
return;
/*not popped
this
*/
};
return ((this.end.size - this.begin.size));
}
if (37 == 34){
return;
/*not popped
FlareDuration
*/
};
//unresolved jump
}
if (37 == 34){
return;
/*not popped
this
*/
};
}//package com.bokecc.platform.playkernel.model.player.monitor
|
[
"you@example.com"
] |
you@example.com
|
bd246cafcda2d1b4732a942551e7d57bfeda60c1
|
6367716b8dc38b4d735344233fd9817d244f1f58
|
/src/main/java/com/alipay/api/response/AlipayUserInfoAuthResponse.java
|
17aaf38684dffb89e722b04a86334d0c6d4dfad4
|
[] |
no_license
|
xuejike/alipay_sdk
|
c7db3d1bd9e9cae03513bde8e69995ecc3f2cd56
|
a96782df615b340a4515e7758f55a1232be63389
|
refs/heads/master
| 2021-01-12T03:49:09.482092
| 2017-01-07T09:17:59
| 2017-01-07T09:17:59
| 78,266,945
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 334
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.user.info.auth response.
*
* @author auto create
* @since 1.0, 2016-12-13 17:20:12
*/
public class AlipayUserInfoAuthResponse extends AlipayResponse {
private static final long serialVersionUID = 2473779449131672688L;
}
|
[
"xuejike2004@126.com"
] |
xuejike2004@126.com
|
c8c884a565c99c4355f271b60ce1148c8af56404
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/platform/core-impl/src/com/intellij/util/graph/impl/Bfs.java
|
b64cd9d9c9568b4780769aaef4a58142ecfc5bc2
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 1,394
|
java
|
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.util.graph.impl;
import com.intellij.util.graph.OutboundSemiGraph;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayDeque;
import java.util.HashSet;
import java.util.Queue;
import java.util.Set;
import java.util.function.BiConsumer;
public final class Bfs {
private Bfs() { }
public static <Node> void performBfs(
@NotNull OutboundSemiGraph<Node> graph,
@NotNull Node root,
@NotNull BiConsumer<? super Node, ? super Integer> visitor
) {
final Set<Node> visited = new HashSet<>();
final Queue<WithIndex<Node>> queue = new ArrayDeque<>();
queue.add(new WithIndex<>(root, 0));
while (!queue.isEmpty()) {
final WithIndex<Node> curr = queue.poll();
if (!visited.contains(curr)) {
visitor.accept(curr.node, curr.index);
visited.add(curr.node);
}
graph.getOut(curr.node).forEachRemaining(next -> {
if (!visited.contains(next)) {
queue.add(new WithIndex<>(next, curr.index + 1));
}
});
}
}
private static final class WithIndex<Node> {
private final @NotNull Node node;
private final int index;
private WithIndex(@NotNull Node node, int index) {
this.node = node;
this.index = index;
}
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
5503dc1b67583222613b9472e3cc3cc9eb5c7a42
|
932d9efcdd9c799b7fb2597487f1b6866851fe70
|
/cn.ieclipse.aorm.example/src/cn/ieclipse/aorm/example/ExampleContentProvider.java
|
2953b427785d8854c41b4faa19c287f5dce24fe3
|
[
"Apache-2.0"
] |
permissive
|
yushaorong/Android-ORM
|
f0fe62f9db9cbf16de036d6c5e5189f5a43bf920
|
2ad4def85c8f8cb2538e8c89969c238f9156a163
|
refs/heads/master
| 2021-01-15T15:16:16.319368
| 2014-11-16T05:19:53
| 2014-11-16T05:19:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,633
|
java
|
/**
*
*/
package cn.ieclipse.aorm.example;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.net.Uri;
import cn.ieclipse.aorm.Session;
/**
* @author Jamling
*
*/
public class ExampleContentProvider extends ContentProvider {
public static final String AUTH = "cn.ieclipse.aorm.example.provider";
public static final Uri URI = Uri.parse("content://" + AUTH);
private SQLiteOpenHelper mOpenHelper;
private static Session session;
/*
* (non-Javadoc)
*
* @see android.content.ContentProvider#delete(android.net.Uri,
* java.lang.String, java.lang.String[])
*/
@Override
public int delete(Uri arg0, String arg1, String[] arg2) {
// TODO Auto-generated method stub
return 0;
}
/*
* (non-Javadoc)
*
* @see android.content.ContentProvider#getType(android.net.Uri)
*/
@Override
public String getType(Uri arg0) {
// TODO Auto-generated method stub
return null;
}
/*
* (non-Javadoc)
*
* @see android.content.ContentProvider#insert(android.net.Uri,
* android.content.ContentValues)
*/
@Override
public Uri insert(Uri arg0, ContentValues arg1) {
// TODO Auto-generated method stub
return null;
}
/*
* (non-Javadoc)
*
* @see android.content.ContentProvider#query(android.net.Uri,
* java.lang.String[], java.lang.String, java.lang.String[],
* java.lang.String)
*/
@Override
public Cursor query(Uri arg0, String[] arg1, String arg2, String[] arg3,
String arg4) {
// TODO Auto-generated method stub
return null;
}
/*
* (non-Javadoc)
*
* @see android.content.ContentProvider#update(android.net.Uri,
* android.content.ContentValues, java.lang.String, java.lang.String[])
*/
@Override
public int update(Uri arg0, ContentValues arg1, String arg2, String[] arg3) {
// TODO Auto-generated method stub
return 0;
}
public static Session getSession() {
return session;
}
/*
* (non-Javadoc)
*
* @see android.content.ContentProvider#onCreate()
*/
@Override
public boolean onCreate() {
mOpenHelper = new SQLiteOpenHelper(this.getContext(), "example.db",
null, 1) {
public void onCreate(SQLiteDatabase db) {
String sql = "";
sql = "create TABLE grade ( ";
sql += "_id Integer Primary key autoincrement, ";
sql += "_sid Integer, ";
sql += "_cid Integer, ";
sql += "_score Float)";
db.execSQL(sql);
sql = "create TABLE student ( ";
sql += "_id Integer Primary key autoincrement, ";
sql += "_name String, ";
sql += "_age Integer, ";
sql += "_phone String)";
db.execSQL(sql);
sql = "create TABLE course ( ";
sql += "_id Integer Primary key autoincrement, ";
sql += "_name String)";
db.execSQL(sql);
}
public void onUpgrade(SQLiteDatabase db, int oldVersion,
int newVersion) {
}
};
session = new Session(mOpenHelper, getContext().getContentResolver());
return true;
}
}
|
[
"li.jamling@gmail.com"
] |
li.jamling@gmail.com
|
24740787c7d4b49098fb7b4c8584fc3dd844d958
|
98c48f0c67f92a18cbca1d58a5aff18cfb8cf8e3
|
/src/main/java/com/authsvc/client/parameters/ParametersProvider.java
|
50885a42143cc28da3bb87d868cefec6038989c3
|
[] |
no_license
|
poshjosh/authsvcclient
|
a1290d151153ee74cef559cf6877a0bcb16e9615
|
c8c626606175e5274c381990cda3238bc5557d96
|
refs/heads/master
| 2021-06-20T09:18:04.775792
| 2019-11-03T11:24:32
| 2019-11-03T11:24:32
| 96,935,215
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 511
|
java
|
package com.authsvc.client.parameters;
import java.util.Map;
/**
* @(#)NewInterface.java 22-Jan-2015 12:43:30
*
* Copyright 2011 NUROX Ltd, Inc. All rights reserved.
* NUROX Ltd PROPRIETARY/CONFIDENTIAL. Use is subject to license
* terms found at http://www.looseboxes.com/legal/licenses/software.html
*/
/**
* @author chinomso bassey ikwuagwu
* @version 2.0
* @since 2.0
*/
public interface ParametersProvider {
Map<String, String> getParameters();
String getServletPath();
}
|
[
"posh.bc@gmail.com"
] |
posh.bc@gmail.com
|
19d241f81659ff764ea733d149b6ddb4e22d44c7
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project37/src/main/java/org/gradle/test/performance37_5/Production37_480.java
|
213cb4dbda3f004116790b58a53ad62965e4dbbe
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package org.gradle.test.performance37_5;
public class Production37_480 extends org.gradle.test.performance13_5.Production13_480 {
private final String property;
public Production37_480() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
4d956333998ee55ade0f546a6006ecf69a196eed
|
a1385d076aba4a103e5973233c3425203c056a58
|
/MyProject/BFUBChannels/src/com/misys/ub/datacenter/CustomerStatusMsgCorrection.java
|
b968b77e30f4d15abcdf3b3064949a42fa725042
|
[] |
no_license
|
Singhmnish1947/java1.8
|
8ff0a83392b051e5614e49de06556c684ff4283e
|
6b2d4dcf06c5fcbb13c2c2578706a825aaa4dc03
|
refs/heads/master
| 2021-07-10T17:38:55.581240
| 2021-04-08T12:36:02
| 2021-04-08T12:36:02
| 235,827,640
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,542
|
java
|
/* ***********************************************************************************
* Copyright (c) 2005, 2008 Misys International Banking Systems Ltd. All Rights Reserved.
*
* This software is the proprietary information of Misys Financial Systems Ltd.
* Use is subject to license terms.
*
* ********************************************************************************
* $Id: BranchPowerAccountRefreshAccumulator.java,v.1.1.2.3,Aug 21, 2008 2:58:06 PM KrishnanRR
*
* $Log: BranchPowerAccountRefreshAccumulator.java,v $
* Revision 1.1.2.4 2008/08/21 23:24:57 krishnanr
* Updated CVS Header Log
*
*
*/
package com.misys.ub.datacenter;
import java.math.BigDecimal;
import java.sql.Timestamp;
import com.trapedza.bankfusion.core.CommonConstants;
import bf.com.misys.cbs.msgs.v1r0.ReadAccountRs;
/**
* @author amanjuna
*
*/
public class CustomerStatusMsgCorrection implements
IUB_TXN_DCPostingMsgCorrection {
String flagIndicator=CommonConstants.EMPTY_STRING;;
String value=CommonConstants.EMPTY_STRING;;
String eventCode=CommonConstants.EMPTY_STRING;;
DCTxnPostingLogger logDetails=new DCTxnPostingLogger();
/* (non-Javadoc)
* @see com.misys.ub.datacenter.IUB_TXN_DCPostingMsgCorrection#msgCorrection(bf.com.misys.cbs.msgs.v1r0.ReadAccountRs, java.lang.String, java.lang.String, java.lang.String, java.sql.Timestamp, java.lang.String, java.lang.String, java.lang.Integer, java.lang.Boolean, java.lang.Integer, java.math.BigDecimal)
*/
public boolean msgCorrection(ReadAccountRs rs, String hostTxnCode,
String postingAction,String txnRef,Timestamp postingDateTime,String sourceBranchId,String channelId,Integer serialNo,Boolean writeToLog,Long chqNumber,BigDecimal chqAmount) {
String accountId=rs.getAccountDetails().getAccountInfo().getAcctBasicDetails().getAccountKeys().getStandardAccountId();
String customerCode=rs.getAccountDetails().getAccountInfo().getAcctBasicDetails().getCustomerShortDetails().getCustomerId();
Boolean isCustomerBlackListed=DataCenterCommonUtils.readKYCStatusOfCustomer(customerCode);
boolean postToSuspense = false;
if(isCustomerBlackListed){
postToSuspense=Boolean.TRUE;
//log in table
flagIndicator=DataCenterCommonConstants.PARTY_STATUS;
value=DataCenterCommonConstants.BLACK_LISTED;
eventCode=DataCenterCommonConstants.E_CUSTOMER_IS_BLACKLISTED;
if(writeToLog){
logDetails.setLogStatus(accountId, txnRef, postingDateTime,flagIndicator, value, eventCode,sourceBranchId, channelId,serialNo);
}
}
return postToSuspense;
}
}
|
[
"manish.kumar1@finastra.com"
] |
manish.kumar1@finastra.com
|
adfce53f292b4e302daf3ccf830be4eb56a174e4
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/ui/chatting/c/b/x.java
|
a6852875bf16bc26391260dd7ad1bc017199596a
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 147
|
java
|
package com.tencent.mm.ui.chatting.c.b;
import com.tencent.mm.ay.a.b;
import com.tencent.mm.ui.chatting.c.v;
public interface x extends b, v {
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
6841b48f70da2cea09329e42c27d50500f833e30
|
e75be673baeeddee986ece49ef6e1c718a8e7a5d
|
/submissions/blizzard/Corpus/eclipse.jdt.core/2548.java
|
8d19b96c28858ff52dad18d9ec50b3316df25fb9
|
[
"MIT"
] |
permissive
|
zhendong2050/fse18
|
edbea132be9122b57e272a20c20fae2bb949e63e
|
f0f016140489961c9e3c2e837577f698c2d4cf44
|
refs/heads/master
| 2020-12-21T11:31:53.800358
| 2018-07-23T10:10:57
| 2018-07-23T10:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,740
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.core;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.internal.core.util.Messages;
/**
* This operation moves elements from their current
* container to a specified destination container, optionally renaming the
* elements.
* A move operation is equivalent to a copy operation, where
* the source elements are deleted after the copy.
* <p>This operation can be used for reorganizing elements within the same container.
*
* @see CopyElementsOperation
*/
public class MoveElementsOperation extends CopyElementsOperation {
/**
* When executed, this operation will move the given elements to the given containers.
*/
public MoveElementsOperation(IJavaElement[] elementsToMove, IJavaElement[] destContainers, boolean force) {
super(elementsToMove, destContainers, force);
}
/**
* Returns the <code>String</code> to use as the main task name
* for progress monitoring.
*/
protected String getMainTaskName() {
return Messages.operation_moveElementProgress;
}
/**
* @see CopyElementsOperation#isMove()
*/
protected boolean isMove() {
return true;
}
}
|
[
"tim.menzies@gmail.com"
] |
tim.menzies@gmail.com
|
ae82a6ff0ee214a68b613b6aa03707e34f05ed50
|
de6b03d812bc011b18cb652863568fe35933a8e0
|
/src/main/java/org/support/project/knowledge/logic/hook/HookFactory.java
|
cdd4f02989592bcc5b4bd669fa0159627ae8d913
|
[
"Apache-2.0"
] |
permissive
|
support-project/knowledge
|
e53a51b276ad9787cc44c136811ad027163ab12c
|
bee4efe436eb3798cb546a60b948ebd8f7907ec0
|
refs/heads/v1
| 2023-08-15T00:08:45.372764
| 2018-07-22T02:49:21
| 2018-07-22T02:49:21
| 28,609,126
| 790
| 295
|
Apache-2.0
| 2022-09-08T00:38:37
| 2014-12-29T22:44:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,593
|
java
|
package org.support.project.knowledge.logic.hook;
import java.util.ArrayList;
import java.util.List;
import org.support.project.di.Container;
import org.support.project.knowledge.entity.KnowledgesEntity;
import org.support.project.knowledge.logic.TemplateLogic;
import org.support.project.knowledge.vo.KnowledgeData;
public class HookFactory {
public static List<BeforeSaveHook> getBeforeSaveHookInstance(KnowledgeData knowledgeData, KnowledgesEntity db) {
List<BeforeSaveHook> hooks = new ArrayList<BeforeSaveHook>();
if (knowledgeData.getKnowledge().getTypeId() != null
&& TemplateLogic.TYPE_ID_EVENT == knowledgeData.getKnowledge().getTypeId()) {
hooks.add(Container.getComp(BeforeSaveEventHook.class));
}
if (db != null) {
if (TemplateLogic.TYPE_ID_EVENT == db.getTypeId()
&& TemplateLogic.TYPE_ID_EVENT != knowledgeData.getKnowledge().getTypeId()) {
hooks.add(Container.getComp(BeforeSaveOldEventRemoveHook.class));
}
}
hooks.add(Container.getComp(BeforeSavePointHook.class));
return hooks;
}
public static List<AfterSaveHook> getAfterSaveHookInstance(KnowledgeData knowledgeData) {
List<AfterSaveHook> hooks = new ArrayList<AfterSaveHook>();
if (knowledgeData.getKnowledge().getTypeId() != null
&& TemplateLogic.TYPE_ID_EVENT == knowledgeData.getKnowledge().getTypeId()) {
hooks.add(Container.getComp(AfterSaveEventHook.class));
}
return hooks;
}
}
|
[
"koda.masaru3@gmail.com"
] |
koda.masaru3@gmail.com
|
662e5b528ca194120c060d6c3121df755e8d1fb8
|
b12d7f21ca9bd5346aabd18058d7a270a62f704f
|
/src/main/java/me/ialistannen/mimadebugger/gui/util/TableHelper.java
|
66a4e264135ec9c201a3d0b3e4b640fa0dae4c0c
|
[] |
no_license
|
I-Al-Istannen/MiMaInterpreter
|
2bfe8e6a5207be9e02612acb4bbc25c4906cced2
|
e4866d8f86200c058efc1c6ad183850c72f7c154
|
refs/heads/master
| 2022-12-28T04:55:54.513365
| 2022-12-13T21:16:34
| 2022-12-13T21:43:08
| 158,928,593
| 10
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,981
|
java
|
package me.ialistannen.mimadebugger.gui.util;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import javafx.beans.property.SimpleObjectProperty;
import javafx.scene.Node;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import me.ialistannen.mimadebugger.gui.util.AutoSizableTableViewSkin.ColumnHeader;
public final class TableHelper {
private TableHelper() {
throw new UnsupportedOperationException("No instantiation");
}
/**
* Creates a column with the given name and the provided value extraction function. It will create
* a new {@link SimpleObjectProperty} for the result of the value function.
*
* @param name the name of the column
* @param valueFunction the function used to extract a value from the row object
* @param <S> the type of the row object
* @param <T> the type of the column's result
* @return a column with the given name and value extraction function
*/
public static <S, T> TableColumn<S, T> column(String name, Function<S, T> valueFunction) {
TableColumn<S, T> column = new TableColumn<>(name);
column.setCellValueFactory(
param -> new SimpleObjectProperty<>(valueFunction.apply(param.getValue()))
);
return column;
}
/**
* Creates a new {@link TableCell} with the given mutation function. This method takes care of all
* the default emptying and resetting of the cell,
* <em>but does not null the graphic.</em>
*
* @param creation the supplier to create a graphic
* @param clear the consumer to clear a graphic's value
* @param set the function to set a graphic's value
* @param <S> the type of the row object
* @param <T> the type of the column's result
* @param <D> the type of the graphic
* @return a new table cell with the given mutation function
*/
public static <S, T, D extends Node> TableCell<S, T> cell(Function<T, D> creation,
Consumer<D> clear, BiConsumer<T, D> set) {
return new TableCell<>() {
@Override
protected void updateItem(T item, boolean empty) {
super.updateItem(item, empty);
@SuppressWarnings("unchecked")
D graphic = (D) getGraphic();
if (item == null || empty) {
setText(null);
if (graphic != null) {
clear.accept(graphic);
}
return;
}
if (graphic == null) {
graphic = creation.apply(item);
setGraphic(graphic);
}
set.accept(item, graphic);
}
};
}
/**
* Sizes the columns of the table view to fit.
*
* @param tableView the table view to resize
*/
public static void autoSizeColumns(TableView<?> tableView) {
for (TableColumn<?, ?> column : tableView.getColumns()) {
ColumnHeader header = (ColumnHeader) column.getStyleableNode();
header.resizeColumnToFitContent();
}
}
}
|
[
"i-al-istannen@users.noreply.github.com"
] |
i-al-istannen@users.noreply.github.com
|
7603f4fc4ece87e973f0efb9ae2caa032d77868b
|
18de7fe35869c7866c1421d88b80291532a8a0bc
|
/src/main/java/com/gzq/structural/flyweight/BeautifulWaitress.java
|
8844d12af62c1c722f0bc01c3d092d10b0721cf5
|
[] |
no_license
|
gzqnb/design-parttens
|
cbaca9e3e9bf1a6bef4d1ad0108a716578d27222
|
dc60db9304f912c2d6bd61c82d18e0da15edc39b
|
refs/heads/master
| 2023-08-06T18:06:48.152154
| 2021-10-01T14:08:55
| 2021-10-01T14:08:55
| 410,865,060
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 640
|
java
|
package com.gzq.structural.flyweight;
import lombok.AllArgsConstructor;
import lombok.ToString;
/**
* 具体享元类
*/
@AllArgsConstructor
@ToString
public class BeautifulWaitress extends AbstractWaitressFlyweight {
String id;//工号
String name;//名字
int age;//年龄
//以上是不变的
@Override
void service() {
System.out.println("工号"+id+":"+name+" "+age+"为您服务");
//改变外部状态
this.canService = false;
}
@Override
void end() {
System.out.println("工号"+id+":"+name+" "+age+"服务结束");
this.canService = true;
}
}
|
[
"905351828@qq.com"
] |
905351828@qq.com
|
dd7a994d26ccd853b3ea8b8962dd09b48b3dc360
|
740296eeb8dcd42b43a160714433a9cbf368ddfd
|
/src/main/java/com/mybus/service/SuppliersManager.java
|
d59587b01a44b8e2692a3e511fc14f2a3d6650ad
|
[] |
no_license
|
kalyani7/MybusWithJWT
|
261a1a838ea4a393e847a04509dbc637e40d86f2
|
b29dba3c829d8f95118cae73937d137a4e22e492
|
refs/heads/master
| 2022-11-30T08:06:59.560563
| 2020-04-14T05:09:42
| 2020-04-14T05:09:42
| 229,047,616
| 0
| 2
| null | 2022-11-16T09:24:10
| 2019-12-19T12:13:38
|
Java
|
UTF-8
|
Java
| false
| false
| 2,331
|
java
|
package com.mybus.service;
import com.google.common.base.Preconditions;
import com.mybus.dao.SupplierDAO;
import com.mybus.exception.BadRequestException;
import com.mybus.model.Supplier;
import org.apache.commons.collections.IteratorUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class SuppliersManager {
private static final Logger LOGGER = LoggerFactory.getLogger(SuppliersManager.class);
@Autowired
private SupplierDAO supplierDAO;
@Autowired
private SessionManager sessionManager;
public Iterable<Supplier> findAll(){
if(sessionManager.getOperatorId() == null){
throw new BadRequestException("No operator found in session");
}
return supplierDAO.findByOperatorId(sessionManager.getOperatorId());
}
public Map<String, String> findNames(){
Map<String, String> namesMap = new HashMap<>();
List<Supplier> suppliers = IteratorUtils.toList(findAll().iterator());
for(Supplier supplier:suppliers){
namesMap.put(supplier.getId(), supplier.getName());
}
return namesMap;
}
public Supplier save(Supplier supplier){
supplier.validate();
supplier.setOperatorId(sessionManager.getOperatorId());
return supplierDAO.save(supplier);
}
public Supplier upate(Supplier supplier){
Preconditions.checkNotNull(supplier, "The Supplier can not be null");
Preconditions.checkNotNull(supplier.getId(), "The Supplier id can not be null");
Supplier a = supplierDAO.findById(supplier.getId()).get();
try {
a.merge(supplier);
supplierDAO.save(a);
} catch (Exception e) {
LOGGER.error("Error updating the Route ", e);
throw new RuntimeException(e);
}
return a;
}
public boolean delete(String id){
Preconditions.checkNotNull(id, "The Supplier id can not be null");
supplierDAO.deleteById(id);
return true;
}
public void deleteAll() {
supplierDAO.deleteAll();
}
public long count() {
return supplierDAO.count();
}
public Supplier findOne(String id) {
return supplierDAO.findById(id).get();
}
public List<Supplier> getAll(String partyType) {
List<Supplier> suppliers = supplierDAO.findByPartyType(partyType);
return suppliers;
}
}
|
[
"email@email.com"
] |
email@email.com
|
a06cbfd79d3efd3900971ba06133b00a3c54e5bc
|
f539bfda3a620f76177f7812391d6d25df26f47b
|
/AppCode/src/main/java/com/creativewidgetworks/goldparser/parser/Variable.java
|
82af710532ba17e63a1791e8d4d81f46742e3c69
|
[
"Apache-2.0"
] |
permissive
|
Epi-Info/Epi-Info-Android
|
c5f8efb8c6434249a46cf50fd82d935ca6035d19
|
e293bbc204c29bff591c5df164361724750ae45a
|
refs/heads/master
| 2023-09-01T03:08:18.344846
| 2023-08-21T20:37:19
| 2023-08-21T20:37:19
| 112,626,339
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,821
|
java
|
package com.creativewidgetworks.goldparser.parser;
import java.math.BigDecimal;
import java.sql.Timestamp;
/**
* Variable
*
* Represents a program variable or interim result. Methods are provided to return the
* variable as a specified object to avoid external casting.
*
* Dependencies: None
*
* @author Ralph Iden (http://www.creativewidgetworks.com)
* @version 5.0.0
*/
public class Variable {
private static final String TRUE = "1,true,";
private static final String FALSE = "0,false,";
final Object value;
public Variable(Object theValue) {
value = theValue;
}
public Object asObject() {
return value;
}
public Boolean asBoolean() {
Boolean b = null;
if (value != null) {
if (value instanceof String) {
String str = ((String)value).toLowerCase() + ",";
if (TRUE.contains(str)) {
b = Boolean.TRUE;
} else if (FALSE.contains(str)) {
b = Boolean.FALSE;
}
} else if (value instanceof Boolean) {
b = (Boolean)value;
}
}
return b;
}
public boolean asBool() {
Boolean b = asBoolean();
return b != null && b.booleanValue();
}
public double asDouble() {
BigDecimal bd = asNumber();
return bd != null ? bd.doubleValue() : Double.NaN;
}
public int asInt() {
BigDecimal bd = asNumber();
return bd != null ? bd.intValue() : Integer.MIN_VALUE;
}
public BigDecimal asNumber() {
BigDecimal bd = null;
if (value != null) {
if (value instanceof String) {
try {
bd = new BigDecimal((String)value);
} catch (NumberFormatException nfe) {
// null will be returned as type can't be coerced
}
} else if (value instanceof BigDecimal) {
bd = (BigDecimal)value;
}
}
return bd;
}
public String asString() {
return value != null && value instanceof String ? value.toString() : null;
}
public Timestamp asTimestamp() {
Timestamp ts = null;
if (value != null) {
if (value instanceof String) {
try {
ts = Timestamp.valueOf((String)value);
} catch (IllegalArgumentException iae) {
// null will be returned as type can't be coerced
}
} else if (value instanceof Timestamp) {
ts = (Timestamp)value;
}
}
return ts;
}
public String toString() {
return value != null ? value.toString() : "";
}
}
|
[
"mii0@cdc.gov"
] |
mii0@cdc.gov
|
ab1e483c35f07b53de930cc96549bd7b52ce70b9
|
365dd8ebb72f54cedeed37272d4db23d139522f4
|
/src/main/java/thaumcraft/api/wands/IWandTriggerManager.java
|
9741cb85f1c51ea77ab3593784f68a2c66838734
|
[] |
no_license
|
Bogdan-G/ThaumicHorizons
|
c05b1fdeda0bdda6d427a39b74cac659661c4cbe
|
83caf754f51091c6b7297c0c68fe8df309d7d7f9
|
refs/heads/master
| 2021-09-10T14:13:54.532269
| 2018-03-27T16:58:15
| 2018-03-27T16:58:15
| 122,425,516
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 328
|
java
|
package thaumcraft.api.wands;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public interface IWandTriggerManager {
boolean performTrigger(World var1, ItemStack var2, EntityPlayer var3, int var4, int var5, int var6, int var7, int var8);
}
|
[
"bogdangtt@gmail.com"
] |
bogdangtt@gmail.com
|
39da1c69709641f5aec59afdbfa301e026353aa7
|
014861644d830c13c7f1c947fed94e18bc22c25d
|
/tm-tool/textmapper/src/org/textmapper/tool/compiler/UniqueNameHelper.java
|
8dc4f98f8d2fb591ef935e75eca1fb4ac4cd41d9
|
[
"Apache-2.0"
] |
permissive
|
aputman/textmapper
|
5b863bf6095c8925898ed22051f12f737b19c73f
|
754131ecaa32d30bcbe4d372ab3cc0f0a65823ea
|
refs/heads/main
| 2023-08-28T13:58:07.468577
| 2021-11-01T14:45:09
| 2021-11-01T14:45:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,206
|
java
|
/**
* Copyright 2002-2020 Evgeny Gryaznov
*
* 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.textmapper.tool.compiler;
import org.textmapper.lapg.api.Symbol;
import org.textmapper.lapg.api.Terminal;
import org.textmapper.lapg.common.FormatUtil;
import java.util.*;
import java.util.Map.Entry;
class UniqueNameHelper {
private final Map<String, Integer> desiredNameUsage = new HashMap<>();
private final Map<Symbol, String> desiredNames = new LinkedHashMap<>();
private final Set<String> usedIdentifiers = new HashSet<>();
private final boolean tokensAllCaps;
UniqueNameHelper(boolean tokensAllCaps) {
this.tokensAllCaps = tokensAllCaps;
}
void add(Symbol s) {
String desiredName = desiredName(s);
desiredNames.put(s, desiredName);
Integer count = desiredNameUsage.get(desiredName);
desiredNameUsage.put(desiredName, count == null ? 1 : count + 1);
}
void apply() {
for (Entry<Symbol, String> entry : desiredNames.entrySet()) {
Integer count = desiredNameUsage.get(entry.getValue());
if (count == 1) {
TMDataUtil.putId(entry.getKey(), entry.getValue());
usedIdentifiers.add(entry.getValue());
}
}
for (Entry<Symbol, String> entry : desiredNames.entrySet()) {
Integer count = desiredNameUsage.get(entry.getValue());
if (count != 1) {
TMDataUtil.putId(entry.getKey(), generateSymbolId(entry.getValue()));
}
}
}
private String generateSymbolId(String desiredName) {
String result = desiredName;
int i1 = 1;
while (usedIdentifiers.contains(result)) {
result = desiredName + i1++;
}
usedIdentifiers.add(result);
return result;
}
private String desiredName(Symbol s) {
String name = s.getNameText();
String desiredName;
if (FormatUtil.isIdentifier(name)) {
desiredName = name;
} else if (s.isTerm() && ((Terminal)s).isConstant()) {
desiredName = toIdentifier(((Terminal) s).getConstantValue(), s.getIndex());
if (desiredName.length() == 1 && FormatUtil.isIdentifier(desiredName)) {
desiredName = "char_" + desiredName;
}
} else {
desiredName = toIdentifier(name, s.getIndex());
}
if (this.tokensAllCaps && s.isTerm()) {
desiredName = desiredName.toUpperCase();
}
return desiredName;
}
private static String toIdentifier(String original, int uniqueID) {
String s = original;
// handle symbol names
if (s.startsWith("\'") && s.endsWith("\'") && s.length() > 2) {
s = s.substring(1, s.length() - 1);
if (s.length() == 1 && FormatUtil.isIdentifier(s)) {
s = "char_" + s;
}
} else if (s.equals("{}")) {
s = "_sym" + uniqueID;
}
if (FormatUtil.isIdentifier(s)) {
return s;
}
// convert
return FormatUtil.toIdentifier(s);
}
}
|
[
"egryaznov@gmail.com"
] |
egryaznov@gmail.com
|
7eba54f13f35c3f7c431fa86a8905ef207f715e1
|
6d60a8adbfdc498a28f3e3fef70366581aa0c5fd
|
/codebase/dataset/t1/1408_frag2.java
|
23c1365c00a6204ab74777c31bd6f7cf7ed452b4
|
[] |
no_license
|
rayhan-ferdous/code2vec
|
14268adaf9022d140a47a88129634398cd23cf8f
|
c8ca68a7a1053d0d09087b14d4c79a189ac0cf00
|
refs/heads/master
| 2022-03-09T08:40:18.035781
| 2022-02-27T23:57:44
| 2022-02-27T23:57:44
| 140,347,552
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,027
|
java
|
public static void main(String args[]) throws Exception {
Getopt g = new Getopt("dcmdir", args, "c:t:q:a:x:X:z:P:", LONG_OPTS);
Properties cfg = loadConfig();
int cmd = 0;
File dirfile = null;
int c;
while ((c = g.getopt()) != -1) {
switch(c) {
case 2:
cfg.put(LONG_OPTS[g.getLongind()].getName(), g.getOptarg());
break;
case 3:
cfg.put(LONG_OPTS[g.getLongind()].getName(), "<yes>");
break;
case 'c':
case 't':
case 'q':
case 'a':
case 'x':
case 'X':
case 'P':
case 'z':
cmd = c;
dirfile = new File(g.getOptarg());
break;
case 'p':
patientIDs.add(g.getOptarg());
break;
case 's':
studyUIDs.add(g.getOptarg());
break;
case 'e':
seriesUIDs.add(g.getOptarg());
break;
case 'o':
sopInstUIDs.add(g.getOptarg());
break;
case 'y':
putKey(cfg, g.getOptarg());
break;
case 'v':
exit(messages.getString("version"), false);
case 'h':
exit(messages.getString("usage"), false);
case '?':
exit(null, true);
break;
}
}
if (cmd == 0) {
exit(messages.getString("missing"), true);
}
try {
DcmDir dcmdir = new DcmDir(dirfile, cfg);
switch(cmd) {
case 0:
exit(messages.getString("missing"), true);
break;
case 'c':
dcmdir.create(args, g.getOptind());
break;
case 't':
dcmdir.list();
break;
case 'q':
dcmdir.query();
break;
case 'a':
dcmdir.append(args, g.getOptind());
break;
case 'x':
case 'X':
dcmdir.remove(args, g.getOptind(), cmd == 'X');
break;
case 'z':
dcmdir.compact();
break;
case 'P':
dcmdir.purge();
break;
default:
throw new RuntimeException();
}
} catch (IllegalArgumentException e) {
e.printStackTrace();
exit(e.getMessage(), true);
}
}
|
[
"aaponcseku@gmail.com"
] |
aaponcseku@gmail.com
|
c5edde481feec8bafbea2c701f59ced852907ec7
|
1fd05b32e1858a7a5a19f1804c32cb7f797443f6
|
/trunk/netx-shopping-mall/src/main/java/com/netx/shopping/vo/QueryStateRequestDto.java
|
5c4b0e75ee337cb9e0659ffac307be791758ff3a
|
[] |
no_license
|
biantaiwuzui/netx
|
089a81cf53768121f99cb54a3daf2f6a1ec3d4c7
|
56c6e07864bd199befe90f8475bf72988c647392
|
refs/heads/master
| 2020-03-26T22:57:06.970782
| 2018-09-13T02:25:48
| 2018-09-13T02:25:48
| 145,498,445
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 789
|
java
|
package com.netx.shopping.vo;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;
public class QueryStateRequestDto {
@ApiModelProperty("商家id")
@NotBlank(message = "商家id不能为空")
private String merchantId;
@ApiModelProperty("请求里的父商家id")
@NotBlank(message = "请求里的父商家id不能为空")
private String parentMerchant;
public String getMerchantId() {
return merchantId;
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
public String getParentMerchant() {
return parentMerchant;
}
public void setParentMerchant(String parentMerchant) {
this.parentMerchant = parentMerchant;
}
}
|
[
"3043168786@qq.com"
] |
3043168786@qq.com
|
bb38f1a27e20c5f001320e2331910e1573dc6b66
|
012af20870157a3c84623e09eadf636b1c3b793b
|
/audiotools/src/main/java/ipsk/audio/player/event/PlayerOpenEvent.java
|
2cfac009e3369264b7c01e256e5a6282f1d0d194
|
[] |
no_license
|
naseem91/SpeechRecorderSBT
|
77c7e129676ffe39da28cc39e1ddc4bb3cfc6407
|
002fd9fb341ca162495c274da94d0e348a283b52
|
refs/heads/master
| 2020-03-19T18:36:42.967724
| 2018-06-10T14:51:30
| 2018-06-10T14:51:30
| 136,816,898
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,223
|
java
|
// IPS Java Audio Tools
// (c) Copyright 2009-2011
// Institute of Phonetics and Speech Processing,
// Ludwig-Maximilians-University, Munich, Germany
//
//
// This file is part of IPS Java Audio Tools
//
//
// IPS Java Audio Tools is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, version 3 of the License.
//
// IPS Java Audio Tools is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with IPS Java Audio Tools. If not, see <http://www.gnu.org/licenses/>.
/*
* Date : Sep 14, 2005
* Author: K.Jaensch, klausj@phonetik.uni-muenchen.de
*/
package ipsk.audio.player.event;
/**
* @author K.Jaensch, klausj@phonetik.uni-muenchen.de
*
*/
public class PlayerOpenEvent extends PlayerEvent {
/**
* @param source
*/
public PlayerOpenEvent(Object source) {
super(source);
}
}
|
[
"naseemmahasneh1991@gmail.com"
] |
naseemmahasneh1991@gmail.com
|
0f7ead45e9ee9358d711356f58e0d735cd5aeee5
|
e9cf19b8f88d91e91775435a7c689554a0bfb947
|
/src/main/java/android/androidVNC/MouseMover.java
|
db10b20850743b6c6866a84846e9608d9832a7c4
|
[] |
no_license
|
dmillerw/always-on-vnc
|
f4a258075cdae3b0cc24b052606ced4e7363b7fc
|
cb63f1e1a3d2d6f1281a5611a9ed03acc568cc65
|
refs/heads/main
| 2023-03-04T05:51:01.842381
| 2021-02-11T18:50:33
| 2021-02-11T18:50:33
| 338,121,041
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 957
|
java
|
package android.androidVNC;
import android.os.Handler;
import android.os.SystemClock;
/* access modifiers changed from: package-private */
public class MouseMover extends Panner {
public MouseMover(VncCanvasActivity act, Handler hand) {
super(act, hand);
}
@Override // android.androidVNC.Panner
public void run() {
long interval = SystemClock.uptimeMillis() - this.lastSent;
this.lastSent += interval;
double scale = ((double) interval) / 50.0d;
VncCanvas canvas = this.activity.vncCanvas;
if (!canvas.processPointerEvent((int) (((double) canvas.mouseX) + (((double) this.velocity.x) * scale)), (int) (((double) canvas.mouseY) + (((double) this.velocity.y) * scale)), 2, 0, false, false)) {
stop();
} else if (this.updater.updateVelocity(this.velocity, interval)) {
this.handler.postDelayed(this, 50);
} else {
stop();
}
}
}
|
[
"dmillerw@gmail.com"
] |
dmillerw@gmail.com
|
b67c854186e827ec9a174b1991cd32d412fc9bf1
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2009-05-29/seasar2-2.4.38/s2jdbc-gen/s2jdbc-gen/src/main/java/org/seasar/extension/jdbc/gen/internal/util/FileUtil.java
|
1ccf54d77c462f0e2a911e89bb96e16201878065
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,904
|
java
|
/*
* Copyright 2004-2009 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.extension.jdbc.gen.internal.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.util.Arrays;
import java.util.Comparator;
import org.seasar.framework.exception.IORuntimeException;
/**
* {@link File}に関するユーティリティクラスです。
*
* @author taedium
*/
public class FileUtil {
/**
*
*/
protected FileUtil() {
}
/**
* ファイルをコピーします。
*
* @param src
* コピー元ファイル
* @param dest
* コピー先ファイル
*/
public static void copy(File src, File dest) {
FileInputStream in = null;
FileOutputStream out = null;
try {
in = new FileInputStream(src);
out = new FileOutputStream(dest);
copyInternal(in, out);
} catch (IOException e) {
throw new IORuntimeException(e);
} finally {
CloseableUtil.close(in);
CloseableUtil.close(out);
}
}
/**
* ファイルをコピーし追加します。
*
* @param src
* コピー元ファイル
* @param dest
* コピー先ファイル
*/
public static void append(File src, File dest) {
FileInputStream in = null;
FileOutputStream out = null;
try {
in = new FileInputStream(src);
out = new FileOutputStream(dest, true);
copyInternal(in, out);
} catch (IOException e) {
throw new IORuntimeException(e);
} finally {
CloseableUtil.close(in);
CloseableUtil.close(out);
}
}
/**
* 内部的にコピーします。
*
* @param in
* コピー元
* @param out
* コピー先
* @throws IOException
* IO例外が発生した場合
*/
protected static void copyInternal(FileInputStream in, FileOutputStream out)
throws IOException {
FileChannel src = in.getChannel();
FileChannel dest = out.getChannel();
src.transferTo(0, src.size(), dest);
}
/**
* ファイルの正規のパス名文字列を返します。
*
* @param file
* ファイル
* @return ファイルの正規パス名文字列
*/
public static String getCanonicalPath(File file) {
try {
return file.getCanonicalPath();
} catch (IOException e) {
throw new IORuntimeException(e);
}
}
/**
* 新しいファイルを不可分 (atomic) に生成します。
*
* @param file
* ファイル
* @return 指定されたファイルが存在せず、ファイルの生成に成功した場合は{@code true}、示されたファイルがすでに存在する場合は
* {@code false}
*/
public static boolean createNewFile(File file) {
try {
return file.createNewFile();
} catch (IOException e) {
throw new IORuntimeException(e);
}
}
/**
* 一時ファイルを作成します。
*
* @param prefix
* 接頭辞文字列。3 文字以上の長さが必要である
* @param suffix
* 接尾辞文字列。null も指定でき、その場合は、接尾辞 ".tmp" が使用される
* @return
*/
public static File createTempFile(String prefix, String suffix) {
try {
return File.createTempFile(prefix, suffix);
} catch (IOException e) {
throw new IORuntimeException(e);
}
}
/**
* ファイルの正規の形式を返します。
*
* @param file
* ファイル
* @return 正規の形式
*/
public static File getCanonicalFile(File file) {
try {
return file.getCanonicalFile();
} catch (IOException e) {
throw new IORuntimeException(e);
}
}
/**
* ディレクトリを横断します。
*
* @param dir
* ディレクトリ
* @param filter
* フィルタ
* @param comparator
* コンパレータ
* @param handler
* ハンドラ
*/
public static void traverseDirectory(File dir, FilenameFilter filter,
Comparator<File> comparator, FileHandler handler) {
if (!dir.exists()) {
return;
}
File[] files = dir.listFiles(filter);
if (files == null) {
return;
}
Arrays.sort(files, comparator);
for (File file : files) {
if (file.isDirectory()) {
traverseDirectory(file, filter, comparator, handler);
}
handler.handle(file);
}
}
/**
* Javaファイルを作成します。
*
* @param baseDir
* ベースディレクトリ
* @param packageName
* パッケージ名
* @param shortClassName
* クラスの単純名
* @return Javaファイル
*/
public static File createJavaFile(File baseDir, String packageName,
String shortClassName) {
File packageDir;
if (packageName == null) {
packageDir = baseDir;
} else {
packageDir = new File(baseDir, packageName.replace('.',
File.separatorChar));
}
return new File(packageDir, shortClassName + ".java");
}
/**
* ファイルを扱うインタフェースです・
*
* @author taedium
*/
public interface FileHandler {
/**
* 処理します。
*
* @param file
*/
void handle(File file);
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
b7abba715db0327a210b7d6e129b4746e0c80745
|
d2402ea937a0330e92ccaf6e1bfd8fc02e1b29c9
|
/src/com/ms/silverking/cloud/dht/client/impl/PutMessageEstimate.java
|
1257eef56f55d72a3f8be5c09165ce5b7c463060
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
duyangzhou/SilverKing
|
b8880e0527eb6b5d895da4dbcf7a600b8a7786d8
|
b1b582f96d3771c01bf8239c64e99869f54bb3a1
|
refs/heads/master
| 2020-04-29T19:34:13.958262
| 2019-07-25T17:48:17
| 2019-07-25T17:48:17
| 176,359,498
| 0
| 0
|
Apache-2.0
| 2019-03-18T19:55:08
| 2019-03-18T19:55:08
| null |
UTF-8
|
Java
| false
| false
| 961
|
java
|
package com.ms.silverking.cloud.dht.client.impl;
public class PutMessageEstimate extends KeyedMessageEstimate {
private int numBytes;
//public final RuntimeException re;
public PutMessageEstimate(int numKeys, int numBytes) {
super(numKeys);
this.numBytes = numBytes;
/*
try {
throw new RuntimeException();
} catch (RuntimeException re) {
this.re = re;
}
*/
}
public PutMessageEstimate() {
this(0, 0);
}
public void addBytes(int delta) {
numBytes += delta;
//sb.append(" +b:"+ delta);
}
public void add(PutMessageEstimate oEstimate) {
super.add(oEstimate);
numBytes += oEstimate.numBytes;
}
public int getNumBytes() {
return numBytes;
}
@Override
public String toString() {
return super.toString() +":"+ numBytes;// +"\t"+ sb.toString();
}
}
|
[
"Benjamin.Holst@morganstanley.com"
] |
Benjamin.Holst@morganstanley.com
|
91d2fc54bd0f2609f295fb046ccffd0f908ea3e5
|
cfe621e8c36e6ac5053a2c4f7129a13ea9f9f66b
|
/AndroidApplications/com.zeptolab.ctr.ads-912244/src/com/admarvel/android/ads/y.java
|
ed7635a57515a4241845d0fe09baa7cd6e5d181c
|
[] |
no_license
|
linux86/AndoirdSecurity
|
3165de73b37f53070cd6b435e180a2cb58d6f672
|
1e72a3c1f7a72ea9cd12048d9874a8651e0aede7
|
refs/heads/master
| 2021-01-11T01:20:58.986651
| 2016-04-05T17:14:26
| 2016-04-05T17:14:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,481
|
java
|
package com.admarvel.android.ads;
import android.annotation.SuppressLint;
import android.content.Context;
import android.webkit.WebSettings.PluginState;
import android.webkit.WebView;
import java.util.concurrent.atomic.AtomicBoolean;
class y {
@SuppressLint({"SetJavaScriptEnabled"})
static void a(WebView webView, Context context, AtomicBoolean atomicBoolean, boolean z) {
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setPluginState(PluginState.OFF);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setAppCacheEnabled(true);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setAllowFileAccessFromFileURLs(true);
webView.getSettings().setAllowUniversalAccessFromFileURLs(true);
webView.getSettings().setAllowContentAccess(true);
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setMediaPlaybackRequiresUserGesture(false);
if (Utils.detectDeviceForWebViewCrash() && z) {
webView.setLayerType(1, null);
}
if (atomicBoolean.get()) {
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setSupportZoom(true);
}
}
}
|
[
"jack.luo@mail.utoronto.ca"
] |
jack.luo@mail.utoronto.ca
|
9c58095d96ef23e1b9de2a0350b31be88d766ad7
|
d85eea278f53c2d60197a0b479c074b5a52bdf1e
|
/Services/msk-so-stock/src/main/java/com/msk/stock/rest/ISO151433RsController.java
|
7e173444de095d1dc13aa5b53afdd4b437a73023
|
[] |
no_license
|
YuanChenM/xcdv1.5
|
baeaab6e566236d0f3e170ceae186b6d2999c989
|
77bf0e90102f5704fe186140e1792396b7ade91d
|
refs/heads/master
| 2021-05-26T04:51:12.441499
| 2017-08-14T03:06:07
| 2017-08-14T03:06:07
| 100,221,981
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,958
|
java
|
package com.msk.stock.rest;
import com.hoperun.core.consts.SystemConst;
import com.hoperun.plug.spring.annotation.Validator;
import com.msk.common.base.BaseRsController;
import com.msk.common.bean.RsRequest;
import com.msk.common.bean.RsResponse;
import com.msk.stock.bean.ISO151433RsParam;
import com.msk.stock.bean.ISO151433RsResult;
import com.msk.stock.logic.ISO151433Logic;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
*
* 库存查询接口
*
* @author zhang_qiang1
*/
@RestController
public class ISO151433RsController extends BaseRsController {
/** logger */
private static Logger logger = LoggerFactory.getLogger(ISO151433RsController.class);
@Autowired
private ISO151433Logic iSO151433Logic;
/**
*
* @param param
* @return
*/
@RequestMapping(value = "/so/sotckByPdTypeCode/list",method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
@Validator(validatorClass = "com.msk.stock.validator.ISO151433Validator")
public RsResponse<ISO151433RsResult> getUsedStock(@RequestBody RsRequest<ISO151433RsParam> param) {
logger.info("查询可用库存");
RsResponse<ISO151433RsResult> rs = new RsResponse<ISO151433RsResult>();
ISO151433RsParam iso151433RsParam=param.getParam();
String message="查询成功";
ISO151433RsResult result= this.iSO151433Logic.queryUsedStock(iso151433RsParam);
rs.setStatus(SystemConst.RsStatus.SUCCESS);
rs.setResult(result);
rs.setMessage(message);
return rs;
}
}
|
[
"yuan_chen1@hoperun.com"
] |
yuan_chen1@hoperun.com
|
848f9449ebacf2ca11afb64363c07bd9d479b01e
|
bdfa99d23b8d531a6b851057e374210879800601
|
/src/stms/model/DomesOutWarehouse.java
|
0aac9f656274618c58e8fbee7d75082bb5d43102
|
[] |
no_license
|
NanCarp/sdys
|
10af79a0d83a7ffae776ae78b2782e20d7443c49
|
77f51f17972a7253e03263f0d10f12d9ff81e891
|
refs/heads/master
| 2021-01-22T10:56:41.344011
| 2017-07-28T00:13:48
| 2017-07-28T00:13:48
| 92,661,907
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 299
|
java
|
package stms.model;
import stms.model.base.BaseDomesOutWarehouse;
/**
* Generated by JFinal.
*/
@SuppressWarnings("serial")
public class DomesOutWarehouse extends BaseDomesOutWarehouse<DomesOutWarehouse> {
public static final DomesOutWarehouse dao = new DomesOutWarehouse().dao();
}
|
[
"nancarpli@163.com"
] |
nancarpli@163.com
|
8d7de1f5a876ed4c556f79803382f22f4494246b
|
2b0694f0563192e2d148d130164e94faf3b4e12f
|
/Android应用开发揭秘-杨丰盛/第5章/Examples_05_03/src/com/yarin/android/Examples_05_03/Activity01.java
|
9b61e2aec6b74a4d22ba074bec47a769a71c3e1f
|
[] |
no_license
|
bxh7425014/BookCode
|
4757956275cf540e9996b9064d981f6da75c9602
|
8996b36e689861d55662d15c5db8b0eb498c864b
|
refs/heads/master
| 2020-05-23T00:48:51.430340
| 2017-02-06T01:04:25
| 2017-02-06T01:04:25
| 84,735,079
| 9
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 390
|
java
|
package com.yarin.android.Examples_05_03;
import android.app.Activity;
import android.os.Bundle;
public class Activity01 extends Activity
{
private GameView mGameView;
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
mGameView = new GameView(this);
setContentView(mGameView);
}
}
|
[
"bxh7425014@163.com"
] |
bxh7425014@163.com
|
1d1e93b2eaf2338a31867971f8fda06b65c06623
|
dea3ba99bb48a5d0841cd99c325ee26b7d1a0207
|
/app/src/main/java/com/example/fenghaogoxiangmu/interfaces/home/activity/ICart.java
|
b44f4960b7f7cbaf05d34636c41818f95fc906a0
|
[] |
no_license
|
liukai0305/shop
|
f854394b8564b54fd7e31b710ba3efd21e927802
|
2f37659a7c5112251ad907ce5b66f0525c3975d8
|
refs/heads/master
| 2022-07-30T04:37:11.544146
| 2020-09-21T11:47:07
| 2020-09-21T11:47:07
| 297,322,383
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,236
|
java
|
package com.example.fenghaogoxiangmu.interfaces.home.activity;
import com.example.fenghaogoxiangmu.bean.home.activitybean.AddCartInfoBean;
import com.example.fenghaogoxiangmu.bean.shopping.CartBean;
import com.example.fenghaogoxiangmu.bean.home.activitybean.DeleteCartBean;
import com.example.fenghaogoxiangmu.bean.home.activitybean.GoodDetailBean;
import com.example.fenghaogoxiangmu.interfaces.IBasePersenter;
import com.example.fenghaogoxiangmu.interfaces.IBaseView;
public interface ICart {
interface View extends IBaseView {
void getGoodDetailReturn(GoodDetailBean result);
void addCartInfoReturn(AddCartInfoBean result);
}
interface Persenter extends IBasePersenter<ICart.View> {
void getGoodDetail(int id);
void addCart(int goodsId,int number,int productId);
}
/**
* 购物车接口
*/
interface ICartView extends IBaseView{
void getCartListReturn(CartBean result);
void deleteCartListReturn(DeleteCartBean result);
}
interface ICartPersenter extends IBasePersenter<ICartView>{
//获取购物车的数据
void getCartList();
//删除购物车数据
void deleteCartList(String productIds);
}
}
|
[
"1603952180@qq.com"
] |
1603952180@qq.com
|
36dd6da181a2248b643563b60f550642ea1352f4
|
9c1b583175e0c41e7541300fb5342d3149a53c21
|
/vaibhavi/struts-project/spring-struts-layered-app/src/com/techlabs/repository/HibernateCustomerRepositoryImpl.java
|
fa8e878e389fdd44572bf624f8e99eb5980ac3e4
|
[] |
no_license
|
mohan08p/java_students
|
90c8da05f8ddd1834e1b4a23b3f1e0e2b0fd363f
|
edb069b962ceaf80c052336db36fc0bd8c3261dd
|
refs/heads/master
| 2021-01-25T14:11:11.782720
| 2018-01-29T08:56:09
| 2018-01-29T08:56:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 536
|
java
|
package com.techlabs.repository;
import java.util.ArrayList;
import java.util.List;
import com.techlabs.model.Customer;
public class HibernateCustomerRepositoryImpl implements ICustomerRepository {
@Override
public List<Customer> findAll() {
System.out.println("in findAll of HibernateCu...");
List<Customer> customers = new ArrayList<Customer>();
customers.add(new Customer("Pankaj","Gosavi"));
customers.add(new Customer("Sachin","Tendulkar"));
customers.add(new Customer("Rahul","Dravid"));
return customers;
}
}
|
[
"kannan@swabhavtechlabs.com"
] |
kannan@swabhavtechlabs.com
|
15f14c48a17150cc5e20a4567063c737a3721458
|
c017d7f8bfa77d19c455925476fbf91e8c41b7a0
|
/src/test/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/collectors/MasterThrottlingMetricsCollectorTests.java
|
96b013c6d17338c189825c8b83014016859d1f34
|
[
"Apache-2.0"
] |
permissive
|
YANG-DB/prefmon-open-distro
|
6843dcb973f748e5bfbcee343791cbb59d9f8bea
|
b36aa558b7d11d52b376f5ae639606e317d06c77
|
refs/heads/main
| 2023-01-22T09:19:21.648982
| 2020-11-15T14:39:24
| 2020-11-15T14:39:24
| 313,011,810
| 1
| 0
|
Apache-2.0
| 2020-11-15T11:02:22
| 2020-11-15T11:02:10
| null |
UTF-8
|
Java
| false
| false
| 3,004
|
java
|
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazon.opendistro.elasticsearch.performanceanalyzer.collectors;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.CustomMetricsLocationTestBase;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.config.PerformanceAnalyzerController;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.config.overrides.ConfigOverridesWrapper;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.metrics.MetricsConfiguration;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.metrics.PerformanceAnalyzerMetrics;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.reader_writer_shared.Event;
import org.junit.Test;
import org.mockito.Mockito;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class MasterThrottlingMetricsCollectorTests extends CustomMetricsLocationTestBase {
@Test
public void testMasterThrottlingMetrics() {
MetricsConfiguration.CONFIG_MAP.put(MasterThrottlingMetricsCollector.class, MetricsConfiguration.cdefault);
System.setProperty("performanceanalyzer.metrics.log.enabled", "False");
long startTimeInMills = 1153721339;
PerformanceAnalyzerController controller = Mockito.mock(PerformanceAnalyzerController.class);
ConfigOverridesWrapper configOverrides = Mockito.mock(ConfigOverridesWrapper.class);
Mockito.when(controller.isCollectorEnabled(configOverrides, "MasterThrottlingMetricsCollector"))
.thenReturn(true);
MasterThrottlingMetricsCollector throttlingMetricsCollectorCollector = new MasterThrottlingMetricsCollector(
controller, configOverrides);
throttlingMetricsCollectorCollector.saveMetricValues("testMetric", startTimeInMills);
List<Event> metrics = new ArrayList<>();
PerformanceAnalyzerMetrics.metricQueue.drainTo(metrics);
assertEquals(1, metrics.size());
assertEquals("testMetric", metrics.get(0).value);
try {
throttlingMetricsCollectorCollector.saveMetricValues("throttled_pending_tasks", startTimeInMills, "123");
assertTrue("Negative scenario test: Should have been a RuntimeException", true);
} catch (RuntimeException ex) {
//- expecting exception...1 values passed; 0 expected
}
}
}
|
[
"yang.db.dev@gmail.com"
] |
yang.db.dev@gmail.com
|
07cc6f595dd29763edbd39462c770e5a667a3864
|
479d9471a522e64f9d12eef6dec15558c8ee82cd
|
/android/helloworld/animation/src/main/java/com/example/animation/PieActivity.java
|
8348c4abe4e94ee280a7966b245a7f8ea6bc836a
|
[
"MIT"
] |
permissive
|
mario2100/Spring_All
|
fd76f6b9cca2276d1c308f7d9167930a304dcaf5
|
e32a74293926a5110f7329af5d3d2c0e4f7ad2a5
|
refs/heads/master
| 2023-08-27T17:07:43.238356
| 2021-11-05T06:54:07
| 2021-11-05T06:54:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,146
|
java
|
package com.example.animation;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import androidx.appcompat.app.AppCompatActivity;
import com.example.animation.widget.PieAnimation;
/**
* 饼图动画
*/
public class PieActivity extends AppCompatActivity implements OnClickListener {
private PieAnimation pa_circle; // 声明一个饼图动画对象
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pie);
// 从布局文件中获取名叫pa_circle的饼图动画
pa_circle = findViewById(R.id.pa_circle);
// 设置饼图动画的点击监听器
pa_circle.setOnClickListener(this);
// 开始播放饼图动画
pa_circle.start();
}
@Override
public void onClick(View v) {
if (v.getId() == R.id.pa_circle) {
if (!pa_circle.isRunning()) { // 判断饼图动画是否正在播放
// 不在播放,则开始播放饼图动画
pa_circle.start();
}
}
}
}
|
[
"jjh_steed@163.com"
] |
jjh_steed@163.com
|
800de12a181b8c510a9523d0cda8a7ab297fd1f2
|
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
|
/schemaOrgDomaConv/src/org/kyojo/schemaorg/m3n5/doma/healthLifesci/clazz/DietarySupplementConverter.java
|
3170a974da20d62b41096561abd363976552c8f4
|
[
"Apache-2.0"
] |
permissive
|
nagaikenshin/schemaOrg
|
3dec1626781913930da5585884e3484e0b525aea
|
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
|
refs/heads/master
| 2021-06-25T04:52:49.995840
| 2019-05-12T06:22:37
| 2019-05-12T06:22:37
| 134,319,974
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 635
|
java
|
package org.kyojo.schemaorg.m3n5.doma.healthLifesci.clazz;
import org.seasar.doma.ExternalDomain;
import org.seasar.doma.jdbc.domain.DomainConverter;
import org.kyojo.schemaorg.m3n5.healthLifesci.impl.DIETARY_SUPPLEMENT;
import org.kyojo.schemaorg.m3n5.healthLifesci.Clazz.DietarySupplement;
@ExternalDomain
public class DietarySupplementConverter implements DomainConverter<DietarySupplement, String> {
@Override
public String fromDomainToValue(DietarySupplement domain) {
return domain.getNativeValue();
}
@Override
public DietarySupplement fromValueToDomain(String value) {
return new DIETARY_SUPPLEMENT(value);
}
}
|
[
"nagai@nagaikenshin.com"
] |
nagai@nagaikenshin.com
|
8fab29ee40176300f741241a87cd148ceff3b2cf
|
71c826ffa53ac8af9760f4443ba0dc0d78b4a8e9
|
/src/main/java/oasis/names/specification/ubl/schema/xsd/commonbasiccomponents_2/InstructionIDType.java
|
7c51a549d51a511fc6976ffa31ed1b2f0e7676fd
|
[] |
no_license
|
yosmellopez/xml-dependencies
|
5fc4df3b40ea9af6d6815d64a55aa02cbbe2fb45
|
ad2404c11ae9982e9500692f2173261b2f258796
|
refs/heads/master
| 2022-09-25T15:03:45.927106
| 2020-05-27T03:20:13
| 2020-05-27T03:20:13
| 267,195,324
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,245
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.04.19 at 09:27:25 AM COT
//
package oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2;
import un.unece.uncefact.data.specification.unqualifieddatatypesschemamodule._2.IdentifierType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for InstructionIDType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="InstructionIDType">
* <simpleContent>
* <extension base="<urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2>IdentifierType">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "InstructionIDType")
public class InstructionIDType
extends IdentifierType {
}
|
[
"yosmellopez@gmail.com"
] |
yosmellopez@gmail.com
|
a01e923e25f1a1de6ee41842a4a6265091712d71
|
95c49f466673952b465e19a5ee3ae6eff76bee00
|
/src/main/java/com/zhihu/android/answer/module/bar/AnswerToolBarAnimation$executeTransform$$inlined$apply$lambda$1.java
|
3fe18b92f50a24340fb849182a84faf09a20594d
|
[] |
no_license
|
Phantoms007/zhihuAPK
|
58889c399ae56b16a9160a5f48b807e02c87797e
|
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
|
refs/heads/main
| 2023-01-24T01:34:18.716323
| 2020-11-25T17:14:55
| 2020-11-25T17:14:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,058
|
java
|
package com.zhihu.android.answer.module.bar;
import android.animation.ValueAnimator;
import android.view.View;
import com.secneo.apkwrapper.C6969H;
import com.zhihu.android.answer.module.bar.AnswerToolBarAnimation;
import com.zhihu.android.answer.utils.ExtensionKt;
import kotlin.Metadata;
import kotlin.TypeCastException;
import kotlin.p2243e.p2245b.C32569u;
@Metadata
/* compiled from: AnswerToolBarAnimation.kt */
final class AnswerToolBarAnimation$executeTransform$$inlined$apply$lambda$1 implements ValueAnimator.AnimatorUpdateListener {
final /* synthetic */ AnswerToolBarAnimation.ACTION $action$inlined;
final /* synthetic */ View $from$inlined;
final /* synthetic */ View $other$inlined;
final /* synthetic */ View $to$inlined;
final /* synthetic */ AnswerToolBarAnimation this$0;
AnswerToolBarAnimation$executeTransform$$inlined$apply$lambda$1(AnswerToolBarAnimation answerToolBarAnimation, View view, View view2, View view3, AnswerToolBarAnimation.ACTION action) {
this.this$0 = answerToolBarAnimation;
this.$other$inlined = view;
this.$from$inlined = view2;
this.$to$inlined = view3;
this.$action$inlined = action;
}
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
C32569u.m150519b(valueAnimator, C6969H.m41409d("G688DDC17BE24A226E8"));
this.$other$inlined.setAlpha(0.0f);
this.$other$inlined.setTranslationY(0.0f);
Object animatedValue = valueAnimator.getAnimatedValue();
if (animatedValue != null) {
float floatValue = ((Float) animatedValue).floatValue();
float f = (float) 1;
float f2 = f - floatValue;
this.$from$inlined.setAlpha(f2);
this.$to$inlined.setAlpha(floatValue);
switch (AnswerToolBarAnimation.WhenMappings.$EnumSwitchMapping$2[this.$action$inlined.ordinal()]) {
case 1:
this.$to$inlined.setTranslationY(((float) ExtensionKt.getDp2px((Number) 9)) * f2);
if (!C32569u.m150517a(this.$from$inlined, this.this$0.getContainerView2().getPartitionView())) {
this.$from$inlined.setTranslationY(((float) ExtensionKt.getDp2px((Number) 9)) * floatValue);
return;
}
return;
case 2:
this.$from$inlined.setTranslationY(((float) ExtensionKt.getDp2px((Number) 9)) * floatValue);
if (!C32569u.m150517a(this.$to$inlined, this.this$0.getContainerView2().getPartitionView())) {
this.$to$inlined.setTranslationY(((float) ExtensionKt.getDp2px((Number) 9)) * (floatValue - f));
return;
}
return;
default:
return;
}
} else {
throw new TypeCastException(C6969H.m41409d("G6796D916FF33AA27E8018408F0E083D46890C15AAB3FEB27E900DD46E7E9CF977D9AC51FFF3BA43DEA079E06D4E9CCD67D"));
}
}
}
|
[
"seasonpplp@qq.com"
] |
seasonpplp@qq.com
|
1cad8839a0908b7eadf3cbd0430acd4873a50c75
|
79a6cf43828280dde4a8957ab2878def495cde95
|
/platform/platform-api/src/main/java/com/asiainfo/rms/system/dto/ReverseAuthenticateDTO.java
|
3e0296f0c57fe2ec972b61c67fe23c1538158322
|
[] |
no_license
|
zostudy/cb
|
aeee90afde5f83fc8fecb02073c724963cf3c44f
|
c18b3d6fb078d66bd45f446707e67d918ca57ae0
|
refs/heads/master
| 2020-05-17T22:24:44.910256
| 2019-05-07T09:29:39
| 2019-05-07T09:29:39
| 183,999,895
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 350
|
java
|
package com.asiainfo.rms.system.dto;
import lombok.Data;
@Data
public class ReverseAuthenticateDTO {
private Long staffId;
private String account4aMain;
private String account;
private String systemType;
private String ssoinfo;
private String menuUrl;
private String ticketId;
private String testUrl;
private String crmEntryUrl;
}
|
[
"wangrupeng@foxmail.com"
] |
wangrupeng@foxmail.com
|
7ca5d034198a7a9996addd11841296b56eaacb48
|
f4b6422703af7534867f90f2902aa3baa7b72416
|
/2018/hackover/sources/com/google/crypto/tink/mac/HmacKeyManager.java
|
034ed2d092fce8d95d0eb8b5f5e06b4c7e3ec84d
|
[] |
no_license
|
b04902036/ctf
|
d1eac85b915057e0961ad862d7bf2da106515321
|
fac16cd79440a9c0fc870578d5c80b1491bb8eae
|
refs/heads/master
| 2020-03-18T16:23:02.321424
| 2019-11-22T03:34:25
| 2019-11-22T03:34:25
| 134,962,628
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,401
|
java
|
package com.google.crypto.tink.mac;
import com.google.crypto.tink.KeyManager;
import com.google.crypto.tink.Mac;
import com.google.crypto.tink.proto.HashType;
import com.google.crypto.tink.proto.HmacKey;
import com.google.crypto.tink.proto.HmacKeyFormat;
import com.google.crypto.tink.proto.HmacParams;
import com.google.crypto.tink.proto.KeyData;
import com.google.crypto.tink.proto.KeyData.KeyMaterialType;
import com.google.crypto.tink.subtle.MacJce;
import com.google.crypto.tink.subtle.Random;
import com.google.crypto.tink.subtle.Validators;
import com.google.protobuf.ByteString;
import com.google.protobuf.MessageLite;
import java.security.GeneralSecurityException;
import java.security.Key;
import javax.crypto.spec.SecretKeySpec;
class HmacKeyManager implements KeyManager<Mac> {
private static final int MIN_KEY_SIZE_IN_BYTES = 16;
private static final int MIN_TAG_SIZE_IN_BYTES = 10;
public static final String TYPE_URL = "type.googleapis.com/google.crypto.tink.HmacKey";
private static final int VERSION = 0;
public String getKeyType() {
return "type.googleapis.com/google.crypto.tink.HmacKey";
}
public int getVersion() {
return 0;
}
HmacKeyManager() {
}
public Mac getPrimitive(ByteString byteString) throws GeneralSecurityException {
try {
return getPrimitive(HmacKey.parseFrom(byteString));
} catch (Throwable e) {
throw new GeneralSecurityException("expected serialized HmacKey proto", e);
}
}
public Mac getPrimitive(MessageLite messageLite) throws GeneralSecurityException {
if (messageLite instanceof HmacKey) {
HmacKey hmacKey = (HmacKey) messageLite;
validate(hmacKey);
HashType hash = hmacKey.getParams().getHash();
Key secretKeySpec = new SecretKeySpec(hmacKey.getKeyValue().toByteArray(), "HMAC");
int tagSize = hmacKey.getParams().getTagSize();
switch (hash) {
case SHA1:
return new MacJce("HMACSHA1", secretKeySpec, tagSize);
case SHA256:
return new MacJce("HMACSHA256", secretKeySpec, tagSize);
case SHA512:
return new MacJce("HMACSHA512", secretKeySpec, tagSize);
default:
throw new GeneralSecurityException("unknown hash");
}
}
throw new GeneralSecurityException("expected HmacKey proto");
}
public MessageLite newKey(ByteString byteString) throws GeneralSecurityException {
try {
return newKey(HmacKeyFormat.parseFrom(byteString));
} catch (Throwable e) {
throw new GeneralSecurityException("expected serialized HmacKeyFormat proto", e);
}
}
public MessageLite newKey(MessageLite messageLite) throws GeneralSecurityException {
if (messageLite instanceof HmacKeyFormat) {
HmacKeyFormat hmacKeyFormat = (HmacKeyFormat) messageLite;
validate(hmacKeyFormat);
return HmacKey.newBuilder().setVersion(0).setParams(hmacKeyFormat.getParams()).setKeyValue(ByteString.copyFrom(Random.randBytes(hmacKeyFormat.getKeySize()))).build();
}
throw new GeneralSecurityException("expected HmacKeyFormat proto");
}
public KeyData newKeyData(ByteString byteString) throws GeneralSecurityException {
return (KeyData) KeyData.newBuilder().setTypeUrl("type.googleapis.com/google.crypto.tink.HmacKey").setValue(((HmacKey) newKey(byteString)).toByteString()).setKeyMaterialType(KeyMaterialType.SYMMETRIC).build();
}
public boolean doesSupport(String str) {
return str.equals("type.googleapis.com/google.crypto.tink.HmacKey");
}
private void validate(HmacKey hmacKey) throws GeneralSecurityException {
Validators.validateVersion(hmacKey.getVersion(), 0);
if (hmacKey.getKeyValue().size() >= 16) {
validate(hmacKey.getParams());
return;
}
throw new GeneralSecurityException("key too short");
}
private void validate(HmacKeyFormat hmacKeyFormat) throws GeneralSecurityException {
if (hmacKeyFormat.getKeySize() >= 16) {
validate(hmacKeyFormat.getParams());
return;
}
throw new GeneralSecurityException("key too short");
}
private void validate(HmacParams hmacParams) throws GeneralSecurityException {
if (hmacParams.getTagSize() >= 10) {
switch (hmacParams.getHash()) {
case SHA1:
if (hmacParams.getTagSize() > 20) {
throw new GeneralSecurityException("tag size too big");
}
return;
case SHA256:
if (hmacParams.getTagSize() > 32) {
throw new GeneralSecurityException("tag size too big");
}
return;
case SHA512:
if (hmacParams.getTagSize() > 64) {
throw new GeneralSecurityException("tag size too big");
}
return;
default:
throw new GeneralSecurityException("unknown hash type");
}
}
throw new GeneralSecurityException("tag size too small");
}
}
|
[
"b04902036@ntu.edu.tw"
] |
b04902036@ntu.edu.tw
|
12c127b94e9152754ae218bc9fda9bd5cf0d31dc
|
ee00cea819879bd97b681b0ce0d0569aea5fc5f7
|
/efcs/src/main/java/com/wxzd/efcs/business/domain/enums/InstructionMovePolicy.java
|
17b7d1312baa1093273cd64669d207fcefbbf866
|
[] |
no_license
|
developTiger/sy-efcs
|
3eb2c17b3f3a32c842b5201ac484647cdff142ab
|
8952145e05a2ba66fb3838198beff7cf8486dc06
|
refs/heads/master
| 2020-12-03T09:26:19.250381
| 2017-06-28T02:43:13
| 2017-06-28T02:43:13
| 95,620,688
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 618
|
java
|
package com.wxzd.efcs.business.domain.enums;
/**
* 指令的移动策略。在某些情况下,电气会根据实际的情况临时调整移动的目标位置。通过移动策略,可以强制要求电气必须按照下发指令要求将货物移动指定位置。
*
* @author Leon Regulus on 2017/4/16.
* @version 1.0
* @since 1.0
*/
public enum InstructionMovePolicy {
/**
* 必须按照下发的指定移动,目标位置不能发生变化
*/
Static,
/**
* 可以根据实际情况微调,目标位置可能发生变化,位置的选择由电气决定
*/
Dynamic
}
|
[
"1366812446@qq.com"
] |
1366812446@qq.com
|
72255e38d40367efe7bbbeb4da2c2461ae1f6587
|
44896ae384f87f0a258c5b09f68475032d75a522
|
/dominate/dominate-core/src/main/java/it/amattioli/dominate/validation/DefaultConstraint.java
|
d3151d9ab0bdffb7ee6abdd2498e51b5ec5d324c
|
[] |
no_license
|
andyglick/javATE
|
ecfd3f4e2c2451afd79844811cda3a3b838da295
|
195534d21c58851963b2e8a5a8c1f0723f5b19be
|
refs/heads/master
| 2023-07-08T12:43:32.430134
| 2013-08-04T15:40:48
| 2013-08-04T15:40:48
| 98,358,214
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 545
|
java
|
package it.amattioli.dominate.validation;
import java.util.HashMap;
import java.util.Map;
public class DefaultConstraint implements Constraint {
private String name;
private Map<String, Object> parameters = new HashMap<String, Object>();
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public void addParameter(String name, Object value) {
parameters.put(name, value);
}
public Object getParameter(String name) {
return parameters.get(name);
}
}
|
[
"andreamattioli@yahoo.it"
] |
andreamattioli@yahoo.it
|
767ad84f49b7845d698c91135cf1c6d36d137b7c
|
f70a61c454be09757309eb6817c289971dd50cef
|
/test-work/Fragment/gen/com/example/fragment/R.java
|
802bd154e165fc3ca573fe93d92da7b9d4bbbcd8
|
[] |
no_license
|
ace0625/Android-work
|
02cf8db7ed5fdc0df04fed0b6638b744feee9602
|
5c2491a0e5642294b9f764b80a7950bf9c428c3d
|
refs/heads/master
| 2021-01-01T05:19:14.765823
| 2016-05-25T21:16:04
| 2016-05-25T21:16:04
| 59,698,057
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,716
|
java
|
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.example.fragment;
public final class R {
public static final class attr {
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
*/
public static final int activity_horizontal_margin=0x7f040000;
public static final int activity_vertical_margin=0x7f040001;
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
public static final int action_settings=0x7f080003;
public static final int button1=0x7f080001;
public static final int fragment1=0x7f080002;
public static final int textView1=0x7f080000;
}
public static final class layout {
public static final int activity_main=0x7f030000;
public static final int fragmenttest=0x7f030001;
}
public static final class menu {
public static final int main=0x7f070000;
}
public static final class string {
public static final int action_settings=0x7f050001;
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050002;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f060000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f060001;
}
}
|
[
"hckim0625@gmail.com"
] |
hckim0625@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.