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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38c7092d247bf15ee9aa0ea45be591bf26ce56f8 | 0b56b437df7e51ef6d0a9c754bf33c61b41f00f9 | /system-dao/src/main/java/com/cms/dao/userCenter/SysUserTradeDao.java | 561121c2b2ff8e4d1ad3f22bf34106f1d5060723 | [] | no_license | szdksconan/cms | 5374d827f61ebf062f8e7bb3f4c0a791c9b601f7 | a1a4e2459d88b2ccfc3e3e09a64d7b8822927ae2 | refs/heads/master | 2021-01-25T06:30:19.078300 | 2017-06-07T02:28:52 | 2017-06-07T02:28:52 | 93,583,136 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 581 | java | package com.cms.dao.userCenter;
import java.util.List;
import java.util.Map;
import com.cms.model.userCenter.SysUserTradeInfo;
import com.cms.model.userCenter.SysUserTradeInfoQuery;
public interface SysUserTradeDao {
/**
* 添加账户信息
* @param sysUserTradeInfo
*/
// void addTradeInfo(SysUserTradeInfo sysUserTradeInfo);
/**
* 根据时间对交易信息进行查询
* @param tempMap 里面可以存放一些查询信息
* @return 返回的是交易信息的集合
*/
List<Map<String,Object>> findTradeInfoByCreateTime(SysUserTradeInfoQuery query);
}
| [
"szdksconan@hotmail.com"
] | szdksconan@hotmail.com |
b51ba6c7a8d35817accbc117f5874d9c5fbe7d49 | 91297ffb10fb4a601cf1d261e32886e7c746c201 | /j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/ejb/EjbJar30DataLoader.java | 985674ff723dc086b629ab70237c38711b6374aa | [] | no_license | JavaQualitasCorpus/netbeans-7.3 | 0b0a49d8191393ef848241a4d0aa0ecc2a71ceba | 60018fd982f9b0c9fa81702c49980db5a47f241e | refs/heads/master | 2023-08-12T09:29:23.549956 | 2019-03-16T17:06:32 | 2019-03-16T17:06:32 | 167,005,013 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,221 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Contributor(s):
*
* The Original Software is NetBeans. The Initial Developer of the Original
* Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
* Microsystems, Inc. All Rights Reserved.
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*/
package org.netbeans.modules.j2ee.ddloaders.ejb;
/**
* Recognizes ejb-jar.xml for Java EE 5, ejb-jar with version number 3.0. Needed for
* providing a different set of actions than for older versions of ejb-jar.xml.
* See #76967.
*
* @author Erno Mononen
*/
public class EjbJar30DataLoader extends EjbJarDataLoader{
private static final long serialVersionUID = 1L;
private static final String REQUIRED_MIME_PREFIX_3 = "text/x-dd-ejbjar3.0"; // NOI18N
private static final String REQUIRED_MIME_PREFIX_3_1 = "text/x-dd-ejbjar3.1"; // NOI18N
public EjbJar30DataLoader () {
super ("org.netbeans.modules.j2ee.ddloaders.multiview.EjbJarMultiViewDataObject"); // NOI18N
}
protected String actionsContext() {
return "Loaders/text/x-dd-ejbjar3.0/Actions/"; // NOI18N
}
protected String[] getSupportedMimeTypes(){
return new String[]{REQUIRED_MIME_PREFIX_3, REQUIRED_MIME_PREFIX_3_1};
}
}
| [
"taibi@sonar-scheduler.rd.tut.fi"
] | taibi@sonar-scheduler.rd.tut.fi |
d92ef3fde34faa325bef7855477b7a868419417c | 30daa061cdc3081d31cea3f90660e696b9399038 | /NTSCMeetPeopleServer/src/com/vn/ntsc/presentationserver/server/request/Logout.java | a508a0f2727810fb00a224a159531dc23dd2dc2f | [] | no_license | PhanHuy247/coreGVN | 7ce7c9d4bcd1f9f95f228aed296efa934a45c594 | 383e35019fc884420e6c4398b74e03d8f05a4d0f | refs/heads/master | 2020-03-07T13:37:53.513725 | 2018-03-31T10:03:04 | 2018-03-31T10:03:04 | 127,506,076 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 742 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.vn.ntsc.presentationserver.server.request;
import eazycommon.constant.ParamKey;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
/**
*
* @author tuannxv00804
*/
public class Logout {
public String api;
public String email;
public Logout() {
}
public Logout(String s) throws Exception{
JSONObject jo = (JSONObject)(new JSONParser().parse(s));
api = (String)(jo.get(ParamKey.API_NAME));
email = (String)(jo.get(ParamKey.USER_ID));
}
public Logout(String api, String email) {
this.api = api;
this.email = email;
}
}
| [
"phandinhhuy95@gmail.com"
] | phandinhhuy95@gmail.com |
43c826ba01b8fcb1d116bd0151fa492dc4b0c833 | 8b9190a8c5855d5753eb8ba7003e1db875f5d28f | /sources/io/opencensus/stats/AutoValue_AggregationData_MeanData.java | fb6c647f37396ca3858d622991306a516eb22993 | [] | no_license | stevehav/iowa-caucus-app | 6aeb7de7487bd800f69cb0b51cc901f79bd4666b | e3c7eb39de0be6bbfa8b6b063aaa85dcbcee9044 | refs/heads/master | 2020-12-29T10:25:28.354117 | 2020-02-05T23:15:52 | 2020-02-05T23:15:52 | 238,565,283 | 21 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,401 | java | package io.opencensus.stats;
import io.opencensus.stats.AggregationData;
import javax.annotation.concurrent.Immutable;
@Immutable
@Deprecated
final class AutoValue_AggregationData_MeanData extends AggregationData.MeanData {
private final long count;
private final double mean;
AutoValue_AggregationData_MeanData(double d, long j) {
this.mean = d;
this.count = j;
}
public double getMean() {
return this.mean;
}
public long getCount() {
return this.count;
}
public String toString() {
return "MeanData{mean=" + this.mean + ", count=" + this.count + "}";
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AggregationData.MeanData)) {
return false;
}
AggregationData.MeanData meanData = (AggregationData.MeanData) obj;
if (Double.doubleToLongBits(this.mean) == Double.doubleToLongBits(meanData.getMean()) && this.count == meanData.getCount()) {
return true;
}
return false;
}
public int hashCode() {
long doubleToLongBits = (long) (((int) (((long) 1000003) ^ ((Double.doubleToLongBits(this.mean) >>> 32) ^ Double.doubleToLongBits(this.mean)))) * 1000003);
long j = this.count;
return (int) (doubleToLongBits ^ (j ^ (j >>> 32)));
}
}
| [
"steve@havelka.co"
] | steve@havelka.co |
8f86aa5346888247a8077f3829b29fd3bd35d8b4 | 8c66d7baaf31b691b020063adac2ef9d73793af8 | /src/POS/selling_type/S1_selling_type.java | 542d775c52c4e3b2ce708f79bccc36acee26b2be | [] | no_license | yespickmeup/Algorithm | b3b5eead52d1a9f29fa0a5752592e28d45468755 | 400491e9cdfa3675cf8e97263ec08ebfc0a9d6dc | refs/heads/master | 2022-01-19T15:32:27.189889 | 2022-01-07T08:02:53 | 2022-01-07T08:02:53 | 49,857,878 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,078 | 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 POS.selling_type;
import POS.util.MyConnection;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import mijzcx.synapse.desk.utils.Lg;
import mijzcx.synapse.desk.utils.SqlStringUtil;
/**
*
* @author Ronald
*/
public class S1_selling_type {
public static class to_selling_type {
public final int id;
public final String name;
public to_selling_type(int id, String name) {
this.id = id;
this.name = name;
}
}
public static void add_selling_type(to_selling_type to_selling_type) {
try {
Connection conn = MyConnection.connect();
String s0 = "insert into selling_type("
+ "name"
+ ")values("
+ ":name"
+ ")";
s0 = SqlStringUtil.parse(s0).
setString("name", to_selling_type.name).
ok();
PreparedStatement stmt = conn.prepareStatement(s0);
stmt.execute();
Lg.s(S1_selling_type.class, "Successfully Added");
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
MyConnection.close();
}
}
public static void edit_selling_type(to_selling_type to_selling_type) {
try {
Connection conn = MyConnection.connect();
String s0 = "update selling_type set "
+ "name= :name"
+ " where "
+ " id ='" + to_selling_type.id + "' "
+ " ";
s0 = SqlStringUtil.parse(s0).
setString("name", to_selling_type.name).
ok();
PreparedStatement stmt = conn.prepareStatement(s0);
stmt.execute();
Lg.s(S1_selling_type.class, "Successfully Updated");
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
MyConnection.close();
}
}
public static void delete_selling_type(to_selling_type to_selling_type) {
try {
Connection conn = MyConnection.connect();
String s0 = "delete from selling_type where "
+ " id ='" + to_selling_type.id + "' "
+ " ";
PreparedStatement stmt = conn.prepareStatement(s0);
stmt.execute();
Lg.s(S1_selling_type.class, "Successfully Deleted");
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
MyConnection.close();
}
}
public static List<to_selling_type> ret_data(String search) {
List<to_selling_type> datas = new ArrayList();
try {
Connection conn = MyConnection.connect();
String s0 = "select "
+ "id"
+ ",name"
+ " from selling_type where "
+ " name like'%" + search + "%' "
+ " ";
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(s0);
while (rs.next()) {
int id = rs.getInt(1);
String name = rs.getString(2);
to_selling_type to = new to_selling_type(id, name);
datas.add(to);
}
return datas;
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
MyConnection.close();
}
}
public static List<String> ret_data2(String search) {
List<String> datas = new ArrayList();
try {
Connection conn = MyConnection.connect();
String s0 = "select "
+ "id"
+ ",name"
+ " from selling_type where "
+ " name like'%" + search + "%' "
+ " ";
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(s0);
while (rs.next()) {
int id = rs.getInt(1);
String name = rs.getString(2);
datas.add(name);
}
return datas;
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
MyConnection.close();
}
}
public static void main(String[] args) {
to_selling_type to1 = new to_selling_type(1, "Regular");
to_selling_type to2 = new to_selling_type(2, "Assemble");
add_selling_type(to1);
add_selling_type(to2);
}
}
| [
"rpascua.synsoftech@gmail.com"
] | rpascua.synsoftech@gmail.com |
ebbdb2196f1257ff4248a509a172ef7c3d6ef042 | d6c041879c662f4882892648fd02e0673a57261c | /com/planet_ink/coffee_mud/Abilities/Spells/Spell_IceLance.java | 40b8f063b670fbf1e8784856b023222f25ebb3de | [
"Apache-2.0"
] | permissive | linuxshout/CoffeeMud | 15a2c09c1635f8b19b0d4e82c9ef8cd59e1233f6 | a418aa8685046b08c6d970083e778efb76fd3716 | refs/heads/master | 2020-04-14T04:17:39.858690 | 2018-12-29T20:50:15 | 2018-12-29T20:50:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,825 | java | package com.planet_ink.coffee_mud.Abilities.Spells;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2003-2018 Bo Zimmerman
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.
*/
public class Spell_IceLance extends Spell
{
@Override
public String ID()
{
return "Spell_IceLance";
}
private final static String localizedName = CMLib.lang().L("Ice Lance");
@Override
public String name()
{
return localizedName;
}
@Override
public int minRange()
{
return 1;
}
@Override
public int maxRange()
{
return adjustedMaxInvokerRange(5);
}
@Override
public int abstractQuality()
{
return Ability.QUALITY_MALICIOUS;
}
@Override
public int classificationCode()
{
return Ability.ACODE_SPELL|Ability.DOMAIN_EVOCATION;
}
@Override
public long flags()
{
return Ability.FLAG_WATERBASED;
}
@Override
public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel)
{
final MOB target=this.getTarget(mob,commands,givenTarget);
if(target==null)
return false;
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
// now see if it worked
final boolean success=proficiencyCheck(mob,0,auto);
if(success)
{
final CMMsg msg=CMClass.getMsg(mob,target,this,somanticCastCode(mob,target,auto),L((auto?"A ":"^S<S-NAME> incant(s) and point(s) at <T-NAMESELF>. A ")+"long shard of ice streaks through the air!^?")+CMLib.protocol().msp("spelldam2.wav",40));
final CMMsg msg2=CMClass.getMsg(mob,target,this,CMMsg.MSK_CAST_MALICIOUS_SOMANTIC|CMMsg.TYP_COLD|(auto?CMMsg.MASK_ALWAYS:0),null);
if((mob.location().okMessage(mob,msg))&&(mob.location().okMessage(mob,msg2)))
{
mob.location().send(mob,msg);
invoker=mob;
int damage = 0;
final int maxDie = (adjustedLevel(mob,asLevel)+(2*super.getX1Level(mob)))/2;
damage += CMLib.dice().roll(maxDie,6,15);
mob.location().send(mob,msg2);
if((msg2.value()>0)||(msg.value()>0))
damage = (int)Math.round(CMath.div(damage,2.0));
if(target.location()==mob.location())
CMLib.combat().postDamage(mob,target,this,damage,CMMsg.MASK_ALWAYS|CMMsg.TYP_COLD,Weapon.TYPE_FROSTING,L("The lance <DAMAGE> <T-NAME>!"));
}
}
else
return maliciousFizzle(mob,target,L("<S-NAME> incant(s) and point(s) at <T-NAMESELF>, but flub(s) the spell."));
// return whether it worked
return success;
}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
07c46fda02a5c280ce5f5cebcbd709f056ce7888 | 343c79e2c638fe5b4ef14de39d885bc5e1e6aca5 | /MyApplication/app/src/main/java/cmcm/com/myapplication/ag.java | 202a5df749823d0f565a2ed75d1e949096823548 | [] | no_license | Leonilobayang/AndroidDemos | 05a76647b8e27582fa56e2e15d4195c2ff9b9c32 | 6ac06c3752dfa9cebe81f7c796525a17df620663 | refs/heads/master | 2022-04-17T06:56:52.912639 | 2016-07-01T07:48:50 | 2016-07-01T07:48:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,161 | java | package cmcm.com.myapplication;
import android.content.Context;
import android.os.Parcelable;
import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;
class ag extends FrameLayout
{
public ag(Context paramContext)
{
super(paramContext);
}
static ViewGroup a(View paramView)
{
ag localag = new ag(paramView.getContext());
ViewGroup.LayoutParams localLayoutParams = paramView.getLayoutParams();
if (localLayoutParams != null)
localag.setLayoutParams(localLayoutParams);
paramView.setLayoutParams(new LayoutParams(-1, -1));
localag.addView(paramView);
return localag;
}
protected void dispatchRestoreInstanceState(SparseArray<Parcelable> paramSparseArray)
{
dispatchThawSelfOnly(paramSparseArray);
}
protected void dispatchSaveInstanceState(SparseArray<Parcelable> paramSparseArray)
{
dispatchFreezeSelfOnly(paramSparseArray);
}
}
/* Location: classes-dex2jar.jar
* Qualified Name: ag
* JD-Core Version: 0.6.2
*/ | [
"1004410930@qq.com"
] | 1004410930@qq.com |
8a718ccd0b207f95e3958f7074bbdbc3cd0a22ba | c913b42264701d0be3e4002ad81adb3c432cdd85 | /ontrack-core/src/main/java/net/ontrack/core/model/BranchCloneInfo.java | 4dd2dd94b76d8c31b03c1d545a9fe2750a46d71d | [
"MIT"
] | permissive | joansmith1/ontrack | aa8fd5c6ee2ae878a79c9f6bc7a06ffd18c0087c | ef31174d0310a35cbb011a950e1a7d81552cf216 | refs/heads/master | 2021-01-10T09:52:35.844888 | 2014-09-09T16:47:46 | 2014-09-09T16:47:46 | 52,032,050 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 431 | java | package net.ontrack.core.model;
import lombok.Data;
import java.util.Collection;
/**
* Information needed when cloning a branch.
*/
@Data
public class BranchCloneInfo {
private final BranchSummary summary;
private final Collection<EditableProperty> properties;
private final Collection<DisplayableProperty> validationStampProperties;
private final Collection<DisplayableProperty> promotionLevelProperties;
}
| [
"damien.coraboeuf@gmail.com"
] | damien.coraboeuf@gmail.com |
a78d1f5efd97827529f0d3e8e164f595fd4a89da | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /cloudapi-20160714/src/main/java/com/aliyun/cloudapi20160714/models/SetDomainCertificateResponse.java | 24e8e3a4101e25dbf885bf8ceb6f13f9584e5e72 | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 1,422 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.cloudapi20160714.models;
import com.aliyun.tea.*;
public class SetDomainCertificateResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public SetDomainCertificateResponseBody body;
public static SetDomainCertificateResponse build(java.util.Map<String, ?> map) throws Exception {
SetDomainCertificateResponse self = new SetDomainCertificateResponse();
return TeaModel.build(map, self);
}
public SetDomainCertificateResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public SetDomainCertificateResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public SetDomainCertificateResponse setBody(SetDomainCertificateResponseBody body) {
this.body = body;
return this;
}
public SetDomainCertificateResponseBody getBody() {
return this.body;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
0d575796cfba5115d4fc1e89ffe47549f52d2975 | f2e07fb613b378658ae1b458fc2b9f4149e9c324 | /lts-core/src/test/java/com/lts/core/failstore/mapdb/MapdbFailStoreTest.java | e04cc8c30e7e061311678329f5b7647a40ed0ecc | [
"Apache-2.0"
] | permissive | 654894017/light-task-scheduler | 565b3bc4f58423f171ab7ab8a733de75647cbef8 | 0deee06313bc997520f06b2c429612e784f03780 | refs/heads/master | 2021-01-12T13:48:32.201255 | 2016-03-27T04:38:41 | 2016-03-27T04:38:41 | 54,944,435 | 0 | 1 | null | 2016-03-29T03:54:45 | 2016-03-29T03:54:44 | null | UTF-8 | Java | false | false | 1,674 | java | package com.lts.core.failstore.mapdb;
import com.lts.core.cluster.Config;
import com.lts.core.cluster.NodeType;
import com.lts.core.commons.utils.CollectionUtils;
import com.lts.core.json.JSON;
import com.lts.core.constant.Constants;
import com.lts.core.domain.Job;
import com.lts.core.domain.Pair;
import com.lts.core.failstore.FailStore;
import com.lts.core.failstore.FailStoreException;
import org.junit.Before;
import org.junit.Test;
import java.util.List;
/**
* @author Robert HG (254963746@qq.com) on 11/10/15.
*/
public class MapdbFailStoreTest {
private String key = "23412x";
FailStore failStore;
@Before
public void setup() throws FailStoreException {
Config config = new Config();
config.setIdentity("testIdentity");
config.setDataPath(Constants.USER_HOME);
config.setNodeGroup("test");
config.setNodeType(NodeType.JOB_CLIENT);
failStore = new MapdbFailStoreFactory().getFailStore(config, config.getFailStorePath());
failStore.open();
}
@Test
public void put() throws FailStoreException {
Job job = new Job();
job.setTaskId("2131232");
for (int i = 0; i < 100; i++) {
failStore.put(key + "" + i, job);
}
System.out.println("这里debug测试多线程");
failStore.close();
}
@Test
public void fetchTop() throws FailStoreException {
List<Pair<String, Job>> pairs = failStore.fetchTop(5, Job.class);
if (CollectionUtils.isNotEmpty(pairs)) {
for (Pair<String, Job> pair : pairs) {
System.out.println(JSON.toJSONString(pair));
}
}
}
} | [
"254963746@qq.com"
] | 254963746@qq.com |
481200ced27e3542b024bae609dffcea41317ae1 | 2df5eb5ea398fda945207a381912a1ba9006fe8c | /src/main/java/com/util/MD5.java | 91bd384dfb5b6cab65a0309a97b2ecbf33464621 | [] | no_license | xiaotaoma/xiyou | bfc5a0b086c5c5c481937e361bfa7c35182ad9cf | 243edbdd85c661fef1fa19ebca1d82a329e8193e | refs/heads/master | 2021-01-10T01:18:51.378951 | 2016-03-24T06:29:44 | 2016-03-24T06:29:44 | 54,619,923 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,890 | java | package com.util;
import java.security.MessageDigest;
public class MD5 {
private final static String[] HE_STRINGS={"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"};
public static String md5(String input) {
return encodeByMD5(input);
}
public static String encodeByMD5(String s) {
if (s!=null) {
try {
MessageDigest digest = MessageDigest.getInstance("MD5");
byte[] result = digest.digest(s.getBytes());
String sss = byteArrayToString(result);
return sss;
} catch (Exception e) {
e.printStackTrace();
}
}
return null;
}
private static String byteArrayToString(byte[] b ) {
int len = b.length;
StringBuffer sb = new StringBuffer();
for (int i = 0; i < len; i++) {
sb.append(byteToString(b[i]));
}
return sb.toString();
}
private static String byteToString(byte b) {
int n = b;
if (n<0) {
n=256+n;
}
int d1=n/16;
int d2=n%16;
return HE_STRINGS[d1]+HE_STRINGS[d2];
}
public static void main(String[] args) {
String md5 = md5("2");//AAEB43CF39A306D6975D666F51377BCA
System.out.println(md5);
}
public final static String MD5(String s){
char hexDigits[] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd',
'e', 'f'};
try {
byte[] strTemp = s.getBytes();
MessageDigest mdTemp = MessageDigest.getInstance("MD5");
mdTemp.update(strTemp);
byte[] md = mdTemp.digest();
int j = md.length;
char str[] = new char[j * 2];
int k = 0;
for (int i = 0; i < j; i++) {
byte byte0 = md[i];
str[k++] = hexDigits[byte0 >>> 4 & 0xf];
str[k++] = hexDigits[byte0 & 0xf];
}
return new String(str);
}
catch (Exception e){
return null;
}
}
}
| [
"123456"
] | 123456 |
d4425fb3318d00d56555c5ed8436079e0029cfc1 | f72e36104162a25247acb48faeb26cdfc81ddf89 | /Printfile.java | edac6bbd8fab1a7cdd89efeabb4ef6730f715328 | [] | no_license | DhanyaaN/Workings | ce95a619949949428ec9fa97ce5e19c5a2d5cd9c | 2918a2490df8aea054bcc35ab659c47e65262948 | refs/heads/master | 2020-03-15T05:16:44.871893 | 2018-05-03T11:30:38 | 2018-05-03T11:30:38 | 131,985,502 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 818 | java | import java.io.*;
public class Printfile
{
public static void main(String[] input)
{
String line = null;
try
{
/* FileReader reads text files in the default encoding */
FileReader fileReader = new FileReader("D:/Dhanyaa/topics.txt");
/* always wrap the FileReader in BufferedReader */
BufferedReader bufferedReader = new BufferedReader(fileReader);
while((line = bufferedReader.readLine()) != null)
{
System.out.println(line);
}
/* always close the file after use */
bufferedReader.close();
}
catch(IOException ex)
{
System.out.println("Error reading file named");
}
}
} | [
"Trainee@KGFSL.COM"
] | Trainee@KGFSL.COM |
c27514405fc95819314a84e58fab0c7f90229ad6 | b877d6f1dbbc2ea6733f8f4e4acd981721a76a27 | /src/test/java/org/abqjug/MoreObjectsTest.java | aa13594cb28bc21959458d37592735d9e63d8275 | [
"Apache-2.0"
] | permissive | jylsoccer/usingguava | bfb1da16a246c1662c77ec30e61abeb45d0f3fcd | b704f7f5dd83f6db89dd8a9256c0fba4dad58157 | refs/heads/master | 2021-01-19T14:06:41.185994 | 2015-11-08T14:18:51 | 2015-11-08T14:18:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,313 | java | /**
* Copyright 2010-2013 Daniel Hinojosa
*
* 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.abqjug;
import com.google.common.base.MoreObjects;
import org.testng.annotations.Test;
import static org.fest.assertions.Assertions.assertThat;
public class MoreObjectsTest {
/** MoreObjects is to be used in conjunction with java.util.Objects,
* this exclusively to be used for Java 8
**/
@Test
public void testToStringHelper() {
Employee employee = new Employee("Bob", "Barker");
String result = MoreObjects.toStringHelper(Employee.class)
.add("firstName", employee.getFirstName())
.add("lastName",employee.getLastName())
.toString();
assertThat(result).isEqualTo("Employee{firstName=Bob, lastName=Barker}");
}
}
| [
"dhinojosa@evolutionnext.com"
] | dhinojosa@evolutionnext.com |
621a2c9285d0f9f3d9fa2e214419e125734457d7 | f525deacb5c97e139ae2d73a4c1304affb7ea197 | /gitv/src/main/java/com/qiyi/tv/client/impl/a/r.java | 778af75a06a639c36bf541cf89a44e85270a3311 | [] | no_license | AgnitumuS/gitv | 93b2359e1bf9f2b6c945298c61c5c6dbfeea49b3 | 242c9a10a0aeb41b9589de9f254e6ce9f57bd77a | refs/heads/master | 2021-08-08T00:50:10.630301 | 2017-11-09T08:10:33 | 2017-11-09T08:10:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,659 | java | package com.qiyi.tv.client.impl.a;
import android.content.Context;
import android.os.Bundle;
import com.qiyi.tv.client.Result;
import com.qiyi.tv.client.feature.a.a;
import com.qiyi.tv.client.feature.viprights.VipRightsManager;
import com.qiyi.tv.client.impl.Params.DataType;
import com.qiyi.tv.client.impl.Params.OperationType;
import com.qiyi.tv.client.impl.Params.TargetType;
import com.qiyi.tv.client.impl.ParamsHelper;
public final class r implements VipRightsManager {
private final Context a;
public r(Context context) {
this.a = context;
}
public final Result<Integer> getActivationState() {
int i = 0;
Bundle a = a.a(null, b.a(this.a, TargetType.TARGET_VIP_RIGHTS, 20003, DataType.DATA_ACTIVATION_STATE));
int parseResultCode = ParamsHelper.parseResultCode(a);
if (parseResultCode == 0) {
i = ParamsHelper.parseActivationState(a);
}
return new Result(parseResultCode, Integer.valueOf(i));
}
public final int openActivationPage() {
return ParamsHelper.parseResultCode(a.a(null, b.a(this.a, TargetType.TARGET_VIP_RIGHTS, OperationType.OP_OPEN_ACTIVATION_PAGE)));
}
public final Result<String> checkActivationCode(String code) {
Bundle bundle = new Bundle();
ParamsHelper.setActivateCode(bundle, code);
Bundle a = a.a(bundle, b.a(this.a, TargetType.TARGET_VIP_RIGHTS, 20003));
Object obj = "";
int parseResultCode = ParamsHelper.parseResultCode(a);
if (parseResultCode == 0) {
obj = ParamsHelper.parseString(a);
}
return new Result(parseResultCode, obj);
}
}
| [
"liuwencai@le.com"
] | liuwencai@le.com |
eda2dad7978549758fccbe7a5492309b05228d12 | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava4/Foo739Test.java | 96f0c5bee82b944dd28427cb25272aa5c90b7e15 | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 481 | java | package applicationModulepackageJava4;
import org.junit.Test;
public class Foo739Test {
@Test
public void testFoo0() {
new Foo739().foo0();
}
@Test
public void testFoo1() {
new Foo739().foo1();
}
@Test
public void testFoo2() {
new Foo739().foo2();
}
@Test
public void testFoo3() {
new Foo739().foo3();
}
@Test
public void testFoo4() {
new Foo739().foo4();
}
@Test
public void testFoo5() {
new Foo739().foo5();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
498079036ab4dec8d704bad65d90c773db634b24 | 130c8bb52e83d5c66b2727c7305336f8aab55d2b | /app/src/main/java/com/mymeatshop/model/response/CartitemsItem.java | 5583963453ba0596f6e8444c246cb9c07f65d166 | [] | no_license | changwng/MyMeatShopping | 0436fa250dd558d58e224812772c3a53a38f7891 | c399411693c55368c31a52bd3e106311cdd0d476 | refs/heads/master | 2022-11-05T09:48:23.054455 | 2020-06-18T04:39:35 | 2020-06-18T04:39:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,589 | java | package com.mymeatshop.model.response;
import com.google.gson.annotations.SerializedName;
public class CartitemsItem {
@SerializedName("product_type")
private String productType;
@SerializedName("item_id")
private int itemId;
@SerializedName("cat_name")
private String catName;
@SerializedName("price")
private int price;
@SerializedName("quote_id")
private String quoteId;
@SerializedName("qty")
private int qty;
@SerializedName("name")
private String name;
@SerializedName("sku")
private String sku;
@SerializedName("product_option")
private Object productOption;
public String getProductType() {
return productType;
}
public void setProductType(String productType) {
this.productType = productType;
}
public int getItemId() {
return itemId;
}
public void setItemId(int itemId) {
this.itemId = itemId;
}
public String getCatName() {
return catName;
}
public void setCatName(String catName) {
this.catName = catName;
}
public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
public String getQuoteId() {
return quoteId;
}
public void setQuoteId(String quoteId) {
this.quoteId = quoteId;
}
public int getQty() {
return qty;
}
public void setQty(int qty) {
this.qty = qty;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSku() {
return sku;
}
public void setSku(String sku) {
this.sku = sku;
}
public Object getProductOption() {
return productOption;
}
public void setProductOption(Object productOption) {
this.productOption = productOption;
}
@Override
public String toString() {
return
"CartitemsItem{" +
"product_type = '" + productType + '\'' +
",item_id = '" + itemId + '\'' +
",cat_name = '" + catName + '\'' +
",price = '" + price + '\'' +
",quote_id = '" + quoteId + '\'' +
",qty = '" + qty + '\'' +
",name = '" + name + '\'' +
",sku = '" + sku + '\'' +
",product_option = '" + productOption + '\'' +
"}";
}
} | [
"faizanmohd106@gmail.com"
] | faizanmohd106@gmail.com |
7452df0b839d9584821e66c8a8b37e14745becc2 | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/sns/ui/AtContactWidget.java | 14be22ade90a630dfb4eddab1252eba94d0fb588 | [] | 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 | 8,094 | java | package com.tencent.mm.plugin.sns.ui;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.R;
import com.tencent.mm.plugin.sns.c.a;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.mm.sdk.platformtools.d;
import com.tencent.mm.ui.ah;
import com.tencent.mm.ui.base.h;
import com.tencent.mm.ui.tools.r;
import com.tencent.mm.ui.v;
import com.tencent.smtt.sdk.WebView;
import java.util.LinkedList;
import java.util.List;
public class AtContactWidget extends LinearLayout {
private View contentView;
private Activity gNy;
private TextView iyE;
private ImageView rhd;
private TextView rhe;
private PreviewContactView rhf;
SnsUploadConfigView rhg;
private List<String> rhh = new LinkedList();
private boolean rhi = false;
@TargetApi(11)
public AtContactWidget(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
AppMethodBeat.i(38152);
init(context);
AppMethodBeat.o(38152);
}
public AtContactWidget(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
AppMethodBeat.i(38153);
init(context);
AppMethodBeat.o(38153);
}
public List<String> getAtList() {
AppMethodBeat.i(38154);
if (this.rhh == null) {
this.rhh = new LinkedList();
}
List list = this.rhh;
AppMethodBeat.o(38154);
return list;
}
public final void crA() {
AppMethodBeat.i(38155);
if (this.rhh == null) {
this.rhh = new LinkedList();
}
this.rhh.clear();
if (this.rhf != null) {
this.rhf.setList(this.rhh);
}
crB();
if (this.rhe != null) {
this.rhe.setVisibility(8);
}
if (this.iyE != null) {
this.iyE.setTextColor(getResources().getColor(R.color.w4));
}
AppMethodBeat.o(38155);
}
private void init(Context context) {
AppMethodBeat.i(38156);
this.gNy = (Activity) context;
this.contentView = v.hu(context).inflate(getLayoutResource(), this);
this.rhf = (PreviewContactView) this.contentView.findViewById(R.id.z9);
this.rhd = (ImageView) this.contentView.findViewById(R.id.z7);
this.rhe = (TextView) this.contentView.findViewById(R.id.edr);
this.iyE = (TextView) this.contentView.findViewById(R.id.z8);
this.contentView.setOnClickListener(new OnClickListener() {
public final void onClick(View view) {
AppMethodBeat.i(38150);
AtContactWidget.a(AtContactWidget.this);
AppMethodBeat.o(38150);
}
});
this.contentView.post(new Runnable() {
public final void run() {
AppMethodBeat.i(38151);
int i = (int) (d.anS().density * 36.0f);
if (i != 0) {
i = (((AtContactWidget.this.contentView.getWidth() - AtContactWidget.this.rhd.getWidth()) - AtContactWidget.this.iyE.getWidth()) - ((int) (d.anS().density * 32.0f))) / i;
if (i > 0 && i < 5) {
AtContactWidget.this.rhf.setLineNum(i);
LayoutParams layoutParams = (LayoutParams) AtContactWidget.this.rhf.getLayoutParams();
layoutParams.alignWithParent = true;
AtContactWidget.this.rhf.setLayoutParams(layoutParams);
}
}
AppMethodBeat.o(38151);
}
});
AppMethodBeat.o(38156);
}
public final boolean ao(Intent intent) {
AppMethodBeat.i(38157);
String stringExtra = intent.getStringExtra("Select_Contact");
LinkedList linkedList = new LinkedList();
if (stringExtra == null || stringExtra.equals("")) {
List linkedList2 = new LinkedList();
} else {
Object linkedList22 = bo.P(stringExtra.split(","));
}
if (this.rhh == null) {
this.rhh = new LinkedList();
}
this.rhh.clear();
for (String stringExtra2 : linkedList22) {
if (!this.rhh.contains(stringExtra2)) {
this.rhh.add(stringExtra2);
}
}
if (this.rhf != null) {
this.rhf.setList(this.rhh);
}
if (this.iyE != null) {
this.iyE.setTextColor(getResources().getColor(linkedList22.isEmpty() ? R.color.w4 : R.color.r8));
}
if (this.rhi) {
ab.d("MicroMsg.AtContactWiget", "withList count " + this.rhh.size());
if (!this.rhi || this.rhe == null || this.rhh.size() <= 0) {
this.rhe.setVisibility(8);
} else {
this.rhe.setVisibility(0);
if (this.rhh.size() < 100) {
this.rhe.setText(this.rhh.size());
this.rhe.setBackgroundResource(r.ik(getContext()));
} else {
this.rhe.setText("");
this.rhe.setBackgroundResource(R.raw.badge_count_more);
}
}
}
crB();
AppMethodBeat.o(38157);
return true;
}
private void crB() {
AppMethodBeat.i(38158);
if (this.rhh.size() > 0) {
this.rhd.setImageDrawable(ah.f(this.gNy, getWithDrawableId(), getContext().getResources().getColor(R.color.a61)));
AppMethodBeat.o(38158);
return;
}
this.rhd.setImageDrawable(ah.f(this.gNy, getWithEmptyDrawableId(), WebView.NIGHT_MODE_COLOR));
AppMethodBeat.o(38158);
}
public void setShowAtList(boolean z) {
AppMethodBeat.i(38159);
if (this.rhf != null) {
this.rhf.setVisibility(z ? 0 : 8);
}
AppMethodBeat.o(38159);
}
public void setShowAtTips(boolean z) {
AppMethodBeat.i(38160);
if (!(this.contentView == null || this.iyE == null)) {
this.iyE.setVisibility(z ? 0 : 8);
}
AppMethodBeat.o(38160);
}
public void setShowAtNum(boolean z) {
this.rhi = z;
}
/* Access modifiers changed, original: protected */
public int getLayoutResource() {
return R.layout.et;
}
/* Access modifiers changed, original: protected */
public int getWithDrawableId() {
return R.raw.album_mention_icon_pressed;
}
/* Access modifiers changed, original: protected */
public int getWithEmptyDrawableId() {
return R.raw.album_mention_icon_normal;
}
static /* synthetic */ void a(AtContactWidget atContactWidget) {
AppMethodBeat.i(38161);
if (atContactWidget.rhh == null) {
atContactWidget.rhh = new LinkedList();
}
if (atContactWidget.rhg == null || atContactWidget.rhg.getPrivated() <= 0) {
Intent intent = new Intent();
intent.putExtra("Contact_Compose", true);
intent.putExtra("List_Type", 1);
intent.putExtra("Add_address_titile", atContactWidget.gNy.getString(R.string.eqq));
intent.putExtra("Contact_GroupFilter_Type", "@micromsg.qq.com");
intent.putExtra("Block_list", com.tencent.mm.model.r.Yz());
intent.putExtra("Select_Contact", bo.c(atContactWidget.rhh, ","));
intent.putExtra("sns_address_count", 0);
a.gkE.a(intent, atContactWidget.gNy, 6);
AppMethodBeat.o(38161);
return;
}
h.g(atContactWidget.gNy, R.string.epa, R.string.tz);
AppMethodBeat.o(38161);
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
07cccf2eeb6f0c3c000792f5a345c18fd9edf616 | 27a13543c5a21811e696278b5212755ecdebca53 | /hsco/src/main/java/hsco/mis/acc/ACC050417/ACC050417Controller.java | 46ef176dd0274e28d96bf3faedb28ce260d90422 | [] | no_license | chaseDeveloper/hsco | 9dad73c971500c4bd98adfefa3e91a91d26ca318 | 7052d6da3ac772cd3b13ec391818139355935916 | refs/heads/master | 2023-06-15T23:55:10.592683 | 2021-07-06T07:46:07 | 2021-07-06T07:46:07 | 383,377,343 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,650 | java | package hsco.mis.acc.ACC050417;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import hsco.cmm.controller.BaseContoller;
import hsco.cmm.ria.nexacro.NexacroConstant;
import hsco.cmm.ria.nexacro.map.NexacroMapDTO;
/**
* <pre>
* @Project Name : 화성도시공사 차세대정보시스템
* @Class Name : ACC050417Controller.java
* @Description : 장기임대주택명세서 Controller 클래스
* @author : 이수지
* @since : 2016. 01. 05.
* @version : 1.0
* @see :
* @COPYRIGHT (c) 2017 NANUMICT, Inc. All Right Reserved.
* <pre>
* ------------------------------------------------------------------
* Modification Information
* ------------------------------------------------------------------
* 작성일 작성자 내용
* ------------------------------------------------------------------
* 2016. 01. 05. 이수지 최초생성
* </pre>
*/
@Controller
public class ACC050417Controller extends BaseContoller {
protected Logger log = LoggerFactory.getLogger(ACC050417Controller.class);
@Resource(name="ACC050417Service")
ACC050417ServiceImpl ACC050417Service;
/**
* 장기임대주택명세서
* @param xpDto
* @param model
* @return ModelAndView
* @throws Exception
*/
@RequestMapping("/hsco/mis/acc/ACC050417/select.do")
public ModelAndView select(NexacroMapDTO xpDto, Model model) throws Exception {
if(log.isInfoEnabled()) log.info("select Started!");
ModelAndView mav = new ModelAndView("nexacroMapView");
execService(ACC050417Service, "select", xpDto, mav);
mav.addObject(NexacroConstant.ERROR_CODE, "0");
mav.addObject(NexacroConstant.ERROR_MSG, "success.정상조회");
return mav;
}
/**
* 장기임대주택명세서 저장
* @param xpDto
* @param model
* @return
* @throws Exception
*/
@RequestMapping("/hsco/mis/acc/ACC050417/inorgRentHouseC.do")
public ModelAndView inorgRentHouseC(NexacroMapDTO xpDto, Model model) throws Exception {
ModelAndView mav = new ModelAndView("nexacroMapView");
execService(ACC050417Service, "inorgRentHouseC", xpDto, mav);
mav.addObject(NexacroConstant.ERROR_CODE, "0");
mav.addObject(NexacroConstant.ERROR_MSG, "success.정상조회");
return mav;
}
}
| [
"kdk@ichase.co.kr"
] | kdk@ichase.co.kr |
c2a01391518796ceaf9bada64dc13ec82c990d1e | 15b260ccada93e20bb696ae19b14ec62e78ed023 | /v2/src/main/java/com/alipay/api/domain/ApmobileUseApiDTO.java | dcbed406374ca08989da35e05401eb191110a22b | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-java-all | df461d00ead2be06d834c37ab1befa110736b5ab | 8cd1750da98ce62dbc931ed437f6101684fbb66a | refs/heads/master | 2023-08-27T03:59:06.566567 | 2023-08-22T14:54:57 | 2023-08-22T14:54:57 | 132,569,986 | 470 | 207 | Apache-2.0 | 2022-12-25T07:37:40 | 2018-05-08T07:19:22 | Java | UTF-8 | Java | false | false | 1,302 | java | package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 端权限检测报告-sdk调用隐私api具体情况DTO
*
* @author auto create
* @since 1.0, 2023-07-03 11:36:29
*/
public class ApmobileUseApiDTO extends AlipayObject {
private static final long serialVersionUID = 1557321875988888616L;
/**
* 具体api的调用次数
*/
@ApiField("api_used_num")
private Long apiUsedNum;
/**
* 使用apilist
*/
@ApiListField("app_used_api_dto_list")
@ApiField("apmobile_api_detail_d_t_o")
private List<ApmobileApiDetailDTO> appUsedApiDtoList;
/**
* api名称
*/
@ApiField("sdk_api_name")
private String sdkApiName;
public Long getApiUsedNum() {
return this.apiUsedNum;
}
public void setApiUsedNum(Long apiUsedNum) {
this.apiUsedNum = apiUsedNum;
}
public List<ApmobileApiDetailDTO> getAppUsedApiDtoList() {
return this.appUsedApiDtoList;
}
public void setAppUsedApiDtoList(List<ApmobileApiDetailDTO> appUsedApiDtoList) {
this.appUsedApiDtoList = appUsedApiDtoList;
}
public String getSdkApiName() {
return this.sdkApiName;
}
public void setSdkApiName(String sdkApiName) {
this.sdkApiName = sdkApiName;
}
}
| [
"auto-publish"
] | auto-publish |
5bd417362d6fd5552d0ff3f2586a434e0d03f201 | ddce3c1d623fc6887e288a4e5fa022abd2707761 | /src/com/mikemyzhao/simulate_reality_13/bigshua/LC_0038_CountAndSay.java | 85cefa79c0e4246fa7f9b2fb9013de4459b04648 | [] | no_license | tjzhaomengyi/DataStructure-java | e1632758761ab66f58dee6f84d81ac101d2a3289 | 7f1a95bd2918ea7a4763df7858d1ea28e538698d | refs/heads/master | 2023-07-07T19:09:21.349154 | 2023-06-27T02:59:12 | 2023-06-27T02:59:12 | 81,512,160 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 761 | java | package com.mikemyzhao.simulate_reality_13.bigshua;
/**
* @Author: zhaomengyi
* @Date: 2022-04-16 11:42
* @Description:
*/
public class LC_0038_CountAndSay {
public static String countAndSay(int n){
if(n < 1){
return "";
}
if(n == 1){
return "1";
}
char[] last = countAndSay(n - 1).toCharArray();
StringBuilder ans = new StringBuilder();
int times = 1;
for(int i = 1; i < last.length; i++){
if(last[i - 1] == last[i]){
times++;
} else {
ans.append(String.valueOf(times));
ans.append(String.valueOf(last[i - 1]));
times = 1;
}
}
ans.append(String.valueOf(times));
ans.append(String.valueOf(last[last.length - 1]));
return ans.toString();
}
}
| [
"tjzhaomengyi@163.com"
] | tjzhaomengyi@163.com |
85b5615cf47e419c53568b9715dec81510dcc0ef | 99c7c7b18a9d94f94f39a84120b4631c2545bbb3 | /services/dbscenarios1/src/com/angularjsdependencyinjection9_4/dbscenarios1/dao/TUcComposites2Dao.java | e5b7254c2b5c3c223105fac8d5f9c7d0dab41a6c | [] | no_license | SaraswathiRekhala/AngularJsDependencyInjection9_4 | f480a134996844979ea306951732e021b170664b | 1a84b9180978cfa1009c999a3e720c5fb699cba4 | refs/heads/master | 2020-05-07T13:46:10.562114 | 2019-04-10T10:51:50 | 2019-04-10T10:51:50 | 180,561,857 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,384 | java | /*Copyright (c) 2016-2017 wavemaker.com All Rights Reserved.
This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance
with the terms of the source code license agreement you entered into with wavemaker.com*/
package com.angularjsdependencyinjection9_4.dbscenarios1.dao;
/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.stereotype.Repository;
import com.wavemaker.runtime.data.dao.WMGenericDaoImpl;
import com.angularjsdependencyinjection9_4.dbscenarios1.TUcComposites2;
import com.angularjsdependencyinjection9_4.dbscenarios1.TUcComposites2Id;
/**
* Specifies methods used to obtain and modify TUcComposites2 related information
* which is stored in the database.
*/
@Repository("dbscenarios1.TUcComposites2Dao")
public class TUcComposites2Dao extends WMGenericDaoImpl<TUcComposites2, TUcComposites2Id> {
@Autowired
@Qualifier("dbscenarios1Template")
private HibernateTemplate template;
@Override
public HibernateTemplate getTemplate() {
return this.template;
}
} | [
"saraswathi.rekhala+8@wavemaker.com"
] | saraswathi.rekhala+8@wavemaker.com |
04cecb166cd58cfbb4a3eb852bade81cdfa9a260 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /plugins/gradle/tooling-extension-api/src/org/jetbrains/plugins/gradle/tooling/serialization/internal/adapter/events/task/InternalTaskFailureResult.java | 45fb3a74a90d5fc9e0fe94b5e833bad6696051c7 | [
"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,296 | java | // Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.gradle.tooling.serialization.internal.adapter.events.task;
import org.gradle.tooling.Failure;
import org.gradle.tooling.events.task.TaskFailureResult;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.plugins.gradle.tooling.serialization.internal.adapter.events.InternalOperationFailureResult;
import java.util.List;
@ApiStatus.Internal
public final class InternalTaskFailureResult extends InternalOperationFailureResult implements TaskFailureResult {
private final InternalTaskExecutionDetails taskExecutionDetails;
public InternalTaskFailureResult(long startTime,
long endTime,
List<? extends Failure> failures,
InternalTaskExecutionDetails taskExecutionDetails) {
super(startTime, endTime, failures);
this.taskExecutionDetails = taskExecutionDetails;
}
@Override
public boolean isIncremental() {
return this.taskExecutionDetails.isIncremental();
}
@Override
public List<String> getExecutionReasons() {
return this.taskExecutionDetails.getExecutionReasons();
}
}
| [
"intellij-monorepo-bot-no-reply@jetbrains.com"
] | intellij-monorepo-bot-no-reply@jetbrains.com |
12c48cbe7736a69125be9cf702a8be6a0afcbdb9 | 4917bcfe0f4d1b8a974ca02ba1a28e0dcad7aaaf | /src/main/java/com/google/schemaorg/core/Property.java | 898a57784c50d5c7859b46bcfb24029114e94035 | [
"Apache-2.0"
] | permissive | google/schemaorg-java | e9a74eb5c5a69014a9763d961103a32254e792b7 | d11c8edf686de6446c34e92f9b3243079d8cb76e | refs/heads/master | 2023-08-23T12:49:26.774277 | 2022-08-25T12:49:06 | 2022-08-25T12:49:06 | 58,669,416 | 77 | 48 | Apache-2.0 | 2022-08-06T11:35:15 | 2016-05-12T19:08:04 | Java | UTF-8 | Java | false | false | 7,326 | java | /*
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.schemaorg.core;
import com.google.common.collect.ImmutableList;
import com.google.schemaorg.JsonLdContext;
import com.google.schemaorg.SchemaOrgType;
import com.google.schemaorg.core.datatype.Text;
import com.google.schemaorg.core.datatype.URL;
import com.google.schemaorg.goog.PopularityScoreSpecification;
import javax.annotation.Nullable;
/** Interface of <a href="http://schema.org/Property}">http://schema.org/Property}</a>. */
public interface Property extends Intangible {
/** Builder interface of <a href="http://schema.org/Property}">http://schema.org/Property}</a>. */
public interface Builder extends Intangible.Builder {
@Override
Builder addJsonLdContext(@Nullable JsonLdContext context);
@Override
Builder addJsonLdContext(@Nullable JsonLdContext.Builder context);
@Override
Builder setJsonLdId(@Nullable String value);
@Override
Builder setJsonLdReverse(String property, Thing obj);
@Override
Builder setJsonLdReverse(String property, Thing.Builder builder);
/** Add a value to property additionalType. */
Builder addAdditionalType(URL value);
/** Add a value to property additionalType. */
Builder addAdditionalType(String value);
/** Add a value to property alternateName. */
Builder addAlternateName(Text value);
/** Add a value to property alternateName. */
Builder addAlternateName(String value);
/** Add a value to property description. */
Builder addDescription(Text value);
/** Add a value to property description. */
Builder addDescription(String value);
/** Add a value to property domainIncludes. */
Builder addDomainIncludes(Class value);
/** Add a value to property domainIncludes. */
Builder addDomainIncludes(Class.Builder value);
/** Add a value to property domainIncludes. */
Builder addDomainIncludes(String value);
/** Add a value to property image. */
Builder addImage(ImageObject value);
/** Add a value to property image. */
Builder addImage(ImageObject.Builder value);
/** Add a value to property image. */
Builder addImage(URL value);
/** Add a value to property image. */
Builder addImage(String value);
/** Add a value to property inverseOf. */
Builder addInverseOf(Property value);
/** Add a value to property inverseOf. */
Builder addInverseOf(Property.Builder value);
/** Add a value to property inverseOf. */
Builder addInverseOf(String value);
/** Add a value to property mainEntityOfPage. */
Builder addMainEntityOfPage(CreativeWork value);
/** Add a value to property mainEntityOfPage. */
Builder addMainEntityOfPage(CreativeWork.Builder value);
/** Add a value to property mainEntityOfPage. */
Builder addMainEntityOfPage(URL value);
/** Add a value to property mainEntityOfPage. */
Builder addMainEntityOfPage(String value);
/** Add a value to property name. */
Builder addName(Text value);
/** Add a value to property name. */
Builder addName(String value);
/** Add a value to property potentialAction. */
Builder addPotentialAction(Action value);
/** Add a value to property potentialAction. */
Builder addPotentialAction(Action.Builder value);
/** Add a value to property potentialAction. */
Builder addPotentialAction(String value);
/** Add a value to property rangeIncludes. */
Builder addRangeIncludes(Class value);
/** Add a value to property rangeIncludes. */
Builder addRangeIncludes(Class.Builder value);
/** Add a value to property rangeIncludes. */
Builder addRangeIncludes(String value);
/** Add a value to property sameAs. */
Builder addSameAs(URL value);
/** Add a value to property sameAs. */
Builder addSameAs(String value);
/** Add a value to property supersededBy. */
Builder addSupersededBy(Class value);
/** Add a value to property supersededBy. */
Builder addSupersededBy(Class.Builder value);
/** Add a value to property supersededBy. */
Builder addSupersededBy(Enumeration value);
/** Add a value to property supersededBy. */
Builder addSupersededBy(Property value);
/** Add a value to property supersededBy. */
Builder addSupersededBy(Property.Builder value);
/** Add a value to property supersededBy. */
Builder addSupersededBy(String value);
/** Add a value to property url. */
Builder addUrl(URL value);
/** Add a value to property url. */
Builder addUrl(String value);
/** Add a value to property detailedDescription. */
Builder addDetailedDescription(Article value);
/** Add a value to property detailedDescription. */
Builder addDetailedDescription(Article.Builder value);
/** Add a value to property detailedDescription. */
Builder addDetailedDescription(String value);
/** Add a value to property popularityScore. */
Builder addPopularityScore(PopularityScoreSpecification value);
/** Add a value to property popularityScore. */
Builder addPopularityScore(PopularityScoreSpecification.Builder value);
/** Add a value to property popularityScore. */
Builder addPopularityScore(String value);
/**
* Add a value to property.
*
* @param name The property name.
* @param value The value of the property.
*/
Builder addProperty(String name, SchemaOrgType value);
/**
* Add a value to property.
*
* @param name The property name.
* @param builder The schema.org object builder for the property value.
*/
Builder addProperty(String name, Thing.Builder builder);
/**
* Add a value to property.
*
* @param name The property name.
* @param value The string value of the property.
*/
Builder addProperty(String name, String value);
/** Build a {@link Property} object. */
Property build();
}
/**
* Returns the value list of property domainIncludes. Empty list is returned if the property not
* set in current object.
*/
ImmutableList<SchemaOrgType> getDomainIncludesList();
/**
* Returns the value list of property inverseOf. Empty list is returned if the property not set in
* current object.
*/
ImmutableList<SchemaOrgType> getInverseOfList();
/**
* Returns the value list of property rangeIncludes. Empty list is returned if the property not
* set in current object.
*/
ImmutableList<SchemaOrgType> getRangeIncludesList();
/**
* Returns the value list of property supersededBy. Empty list is returned if the property not set
* in current object.
*/
ImmutableList<SchemaOrgType> getSupersededByList();
}
| [
"yuanzh@google.com"
] | yuanzh@google.com |
e0af34e776e7fade419e7386fe1fe797ebf54132 | 60b887cd5746c8f7a55a4d9fd18eb7da1e32bc8e | /jumper-angel-admin/src/main/java/com/jumper/angel/home/information/entity/NewsChanelsLabel.java | 6dc8e550259642a763fa0349400846cd206f0bea | [] | no_license | cash2one/admin | c0f13a8b5fb85e8d9b7305fe1cfe4b474b939fce | 107966f89db7df97b49339eb26a577a139b10e8d | refs/heads/master | 2021-07-11T00:28:48.910578 | 2017-10-10T02:05:55 | 2017-10-10T02:05:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,024 | java | package com.jumper.angel.home.information.entity;
import java.io.Serializable;
import java.sql.Timestamp;
/**
* 新闻频道标签实体 entity
* @author gyx
* @time 2016年12月28日
*/
public class NewsChanelsLabel implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
/** 标签名称 **/
private String label;
/** 所属频道 **/
private Integer chanelId;
/** 添加时间 **/
private Timestamp addTime;
/*********************************getter and setter*************************************/
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public Integer getChanelId() {
return chanelId;
}
public void setChanelId(Integer chanelId) {
this.chanelId = chanelId;
}
public Timestamp getAddTime() {
return addTime;
}
public void setAddTime(Timestamp addTime) {
this.addTime = addTime;
}
}
| [
"1365018743@qq.com"
] | 1365018743@qq.com |
81a7cbd2accb490b162f83d5ab2043b911f8913d | e4a275672267b4067e5b9347afe835dc6a2e31bc | /gmall-web-util/src/main/java/com/atguigu/gmall/annotation/LoginRequire.java | 4965d05585fc6a895610bc659bd942eafb070743 | [] | no_license | HelloGsj/gmall | 57bcaf7e28719d1ded841ee8406fff9b273292c2 | 946902db71b0697da38d5a6a0e2c973aca05220e | refs/heads/master | 2020-03-30T07:08:34.117984 | 2018-12-19T06:12:12 | 2018-12-19T06:12:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 396 | java | package com.atguigu.gmall.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author shkstart
* @create 2018-09-18 15:00
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface LoginRequire {
boolean needSuccess() default true;
}
| [
"goodMorning_pro@atguigu.com"
] | goodMorning_pro@atguigu.com |
e1045e8cfd3d7582c071bc67acf23c1efb078a6a | f680094f6d14de8d3f57bd25013729f2d5578592 | /src/org/encog/parse/tags/read/ReadXML.java | 61af69b53fe673d704c7fd60a8aa8633ff79ef4d | [] | no_license | bernardobreder/demo-neural-network | 82dc070f04eb8995ece040274a9c04e06c5cb153 | adf4485064bc4c1cf9dbad2f54242e31e23bdcd2 | refs/heads/master | 2022-04-07T06:19:31.087748 | 2020-02-10T11:58:47 | 2020-02-10T11:58:47 | 104,338,038 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,476 | java | /*
* Encog(tm) Core v3.3 - Java Version
* http://www.heatonresearch.com/encog/
* https://github.com/encog/encog-java-core
* Copyright 2008-2014 Heaton Research, Inc.
*
* 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.
*
* For more information on Heaton Research copyrights, licenses
* and trademarks visit:
* http://www.heatonresearch.com/copyright
*/
package org.encog.parse.tags.read;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import org.encog.parse.ParseError;
import org.encog.parse.tags.Tag.Type;
/**
* This class is designed to read XML. It has several helper methods, beyond
* what the ReadTags class provides to assist in reading XML documents.
*
* @author jheaton
*
*/
public class ReadXML extends ReadTags {
/**
* Construct an XML reader.
*
* @param is
* The input stream to read from.
*/
public ReadXML(final InputStream is) {
super(is);
}
/**
* Advance until the specified tag is found.
*
* @param name
* The name of the tag we are looking for.
* @param beginTag
* True if this is a begin tage, false otherwise.
* @return True if the tag was found.
*/
public boolean findTag(final String name, final boolean beginTag) {
while (this.readToTag()) {
if (beginTag) {
if (this.getTag().getName().equals(name) && (this.getTag().getType() == Type.BEGIN)) {
return true;
}
} else {
if (this.getTag().getName().equals(name) && (this.getTag().getType() == Type.END)) {
return true;
}
}
}
return false;
}
/**
* Read an integer that is contained between the current position, and the
* next tag.
*
* @return The integer that was found.
*/
public int readIntToTag() {
try {
final String str = this.readTextToTag();
return Integer.parseInt(str);
} catch (final NumberFormatException e) {
throw new ParseError(e);
}
}
/**
* Read all property data until an end tag, which corrisponds to the current
* tag, is found. The properties found will be returned in a map.
*
* @return The properties found.
*/
public Map<String, String> readPropertyBlock() {
final Map<String, String> result = new HashMap<>();
final String endingBlock = this.getTag().getName();
while (this.readToTag()) {
if (this.getTag().getName().equals(endingBlock) && (this.getTag().getType() == Type.END)) {
break;
}
final String name = this.getTag().getName();
final String value = this.readTextToTag().trim();
result.put(name, value);
}
return result;
}
/**
* Read all text between the current position and the next tag.
*
* @return The string that was read.
*/
public String readTextToTag() {
final StringBuilder result = new StringBuilder();
boolean done = false;
while (!done) {
final int ch = this.read();
if ((ch == -1) || (ch == 0)) {
done = true;
} else {
result.append((char) ch);
}
}
return result.toString();
}
}
| [
"bernardobreder@gmail.com"
] | bernardobreder@gmail.com |
13b2fa843c1cb2ec70111e90dca2c278e3ebade9 | 005fcf8ac7bb289b0f97f842dcb4d07581eaedc0 | /src/repls/Print02.java | ebac87efe1334f9e24fc0be725472672b2c43867 | [] | no_license | VladislavShekhovsev/java-programming | 6b780641a4243071716d1fdebe9ce3689c56d4de | f2e3f87a8aee3e465e78deac741957ace794e164 | refs/heads/master | 2023-05-27T00:09:03.613616 | 2021-06-20T15:23:40 | 2021-06-20T15:23:40 | 365,674,623 | 0 | 0 | null | 2021-05-28T02:16:23 | 2021-05-09T05:27:57 | Java | UTF-8 | Java | false | false | 299 | java | package repls;
public class Print02 {
public static void main(String[] args) {
String[]arr = {"apple", "banana", "kiwi", "grape", "milk", "soda", "juice", "coffee"};
for (int i = 0; i <arr.length-1; i+=2) {
System.out.println(arr[i]+" "+arr[i+1]);
}
}
}
| [
"vladislav13457@gmail.com"
] | vladislav13457@gmail.com |
5df1f0fdb6aa667fbd0c594e56ceefe1245146f8 | 8b6856b3ec10fb77c8af5980bd9beb6aa2e2d4a3 | /common/util/src/main/java/com/alibaba/citrus/util/io/ByteArrayOutputStream.java | 23265431c575ff438955a650637ec11a00a12c7c | [
"Apache-2.0"
] | permissive | huxiaohang/citrus | 400a528895cd051ccd24b1ec690817c70aa067a5 | f915cc1bb0389899adaaabb2eaf4e301517dbfa1 | refs/heads/master | 2020-12-25T12:27:43.092996 | 2011-11-05T09:18:10 | 2011-11-05T09:18:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,498 | java | /*
* Copyright 2010 Alibaba Group Holding Limited.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.citrus.util.io;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* 非同步的<code>ByteArrayOutputStream</code>替换方案, 执行<code>toByteArray()</code>
* 方法时返回的是只读的内部字节数组, 避免了没有必要的字节复制. 本代码移植自IBM developer works文章:
* <ul>
* <li><a
* href="http://www.ibm.com/developerworks/cn/java/j-io1/index.shtml">彻底转变流,第 1
* 部分:从输出流中读取</a>
* <li><a
* href="http://www.ibm.com/developerworks/cn/java/j-io2/index.shtml">彻底转变流,第 2
* 部分:优化 Java 内部 I/O</a>
* </ul>
*
* @author Michael Zhou
*/
public class ByteArrayOutputStream extends OutputStream {
private static final int DEFAULT_INITIAL_BUFFER_SIZE = 8192;
// internal buffer
private byte[] buffer;
private int index;
private int capacity;
// is the stream closed?
private boolean closed;
// is the buffer shared?
private boolean shared;
public ByteArrayOutputStream() {
this(DEFAULT_INITIAL_BUFFER_SIZE);
}
public ByteArrayOutputStream(int initialBufferSize) {
capacity = initialBufferSize;
buffer = new byte[capacity];
}
@Override
public void write(int datum) throws IOException {
if (closed) {
throw new IOException("Stream closed");
} else {
if (index >= capacity) {
// expand the internal buffer
capacity = capacity * 2 + 1;
byte[] tmp = new byte[capacity];
System.arraycopy(buffer, 0, tmp, 0, index);
buffer = tmp;
// the new buffer is not shared
shared = false;
}
// store the byte
buffer[index++] = (byte) datum;
}
}
@Override
public void write(byte[] data, int offset, int length) throws IOException {
if (data == null) {
throw new NullPointerException();
} else if (offset < 0 || offset + length > data.length || length < 0) {
throw new IndexOutOfBoundsException();
} else if (closed) {
throw new IOException("Stream closed");
} else {
if (index + length > capacity) {
// expand the internal buffer
capacity = capacity * 2 + length;
byte[] tmp = new byte[capacity];
System.arraycopy(buffer, 0, tmp, 0, index);
buffer = tmp;
// the new buffer is not shared
shared = false;
}
// copy in the subarray
System.arraycopy(data, offset, buffer, index, length);
index += length;
}
}
@Override
public void close() {
closed = true;
}
public void writeTo(OutputStream out) throws IOException {
// write the internal buffer directly
out.write(buffer, 0, index);
}
public ByteArray toByteArray() {
shared = true;
return new ByteArray(buffer, 0, index);
}
public InputStream toInputStream() {
// return a stream reading from the shared internal buffer
shared = true;
return new ByteArrayInputStream(buffer, 0, index);
}
public void reset() throws IOException {
if (closed) {
throw new IOException("Stream closed");
} else {
if (shared) {
// create a new buffer if it is shared
buffer = new byte[capacity];
shared = false;
}
// reset index
index = 0;
}
}
}
| [
"yizhi@taobao.com"
] | yizhi@taobao.com |
ed77c2b564e8b2db4d0a6f2e7993d25632c9aa8d | 857f5b800b4efe5627393efd82467713e3cc1839 | /DMIT2015DynamicWebProject-SectionA01/src/dmit2015/demo04/Circle.java | 8e3ffc8da6b1e5c8f6298f6b4fdb0e5ab45bb0a6 | [] | no_license | swunait/dmit2015-winter2019term-A01 | 1026571c59c8bfd0250eec90bf00339a2f6f7440 | 9faa1fd1df28b13b85ab0f2c573d1eb874714321 | refs/heads/master | 2023-01-06T16:02:23.605307 | 2022-12-29T22:50:41 | 2022-12-29T22:50:41 | 166,113,031 | 0 | 4 | null | null | null | null | UTF-8 | Java | false | false | 906 | java | package dmit2015.demo04;
public class Circle {
/** The radius of the circle */
private double radius;
/** Construct a circle object */
public Circle(double newRadius) {
radius = newRadius;
}
/** Construct a circle object */
public Circle() {
radius = 1;
}
/** Return the area of this cirlce */
double area() {
return radius * radius * Math.PI;
}
/** Return the circumference of this circle */
double circumference() {
return 2 * radius * Math.PI;
}
public double getRadius() {
return radius;
}
// public void setRadius(double radius) throws Exception {
// if (radius > 0) {
// this.radius = radius;
// } else {
// throw new Exception("Radius value must be > 0");
// }
// }
public void setRadius(double radius) {
if (radius > 0) {
this.radius = radius;
} else {
throw new RuntimeException("Radius value must be > 0");
}
}
}
| [
"swu@nait.ca"
] | swu@nait.ca |
79feb137f4f51e1d67f4b5cb5a7432bbed55fc5d | b111b77f2729c030ce78096ea2273691b9b63749 | /db-example-large-multi-project/project77/src/test/java/org/gradle/test/performance/mediumjavamultiproject/project77/p388/Test7766.java | ace104eaf5a0b699e126422e6e4fea5366f02b2b | [] | no_license | WeilerWebServices/Gradle | a1a55bdb0dd39240787adf9241289e52f593ccc1 | 6ab6192439f891256a10d9b60f3073cab110b2be | refs/heads/master | 2023-01-19T16:48:09.415529 | 2020-11-28T13:28:40 | 2020-11-28T13:28:40 | 256,249,773 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,556 | java | package org.gradle.test.performance.mediumjavamultiproject.project77.p388;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test7766 {
Production7766 objectUnderTest = new Production7766();
@Test
public void testProperty0() throws Exception {
String value = "value";
objectUnderTest.setProperty0(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() throws Exception {
String value = "value";
objectUnderTest.setProperty1(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() throws Exception {
String value = "value";
objectUnderTest.setProperty2(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() throws Exception {
String value = "value";
objectUnderTest.setProperty3(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() throws Exception {
String value = "value";
objectUnderTest.setProperty4(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() throws Exception {
String value = "value";
objectUnderTest.setProperty5(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() throws Exception {
String value = "value";
objectUnderTest.setProperty6(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() throws Exception {
String value = "value";
objectUnderTest.setProperty7(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() throws Exception {
String value = "value";
objectUnderTest.setProperty8(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() throws Exception {
String value = "value";
objectUnderTest.setProperty9(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty9());
}
} | [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
1068b6b4bd474c79f60d86541b0dba3464515d6d | c3206f19b1608bbb5577cccbd029b085f6b874b3 | /src/main/java/com/mytests/micronaut/beanIntrospection/beans/Bean2.java | 43679ffc3a47c0d880648a0dbf72fecd44d27766 | [] | no_license | jb-tester/micronaut-introspection | 4c95098044b907cabaeeaedf4d3eb7fba2aa5e9f | 738aafdf3df6d26ef0702cf5bfb7456410fb3359 | refs/heads/master | 2020-12-21T18:11:56.236392 | 2020-01-27T15:09:12 | 2020-01-27T15:09:12 | 236,518,285 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,264 | java | package com.mytests.micronaut.beanIntrospection.beans;
import io.micronaut.core.annotation.Creator;
/**
* *******************************
* Created by irina on 1/27/2020.
* Project: micronaut-introspection
* *******************************
*/
public class Bean2 {
String p1;
String p2;
int p3;
private Bean2(final String p1) {
this.p1 = p1;
}
private Bean2(final int p3) {
this.p3 = p3;
}
private Bean2(final String p1, final String p2, final int p3) {
this.p1 = p1;
this.p2 = p2;
this.p3 = p3;
}
@Creator
public static Bean2 forP1(String p1){
return new Bean2(p1);
}
public String getP1() {
return p1;
}
public void setP1(final String p1) {
this.p1 = p1;
}
public String getP2() {
return p2;
}
public void setP2(final String p2) {
this.p2 = p2;
}
public int getP3() {
return p3;
}
public void setP3(final int p3) {
this.p3 = p3;
}
@Override
public String toString() {
return "Bean2: " +
"p1='" + p1 + '\'' +
", p2='" + p2 + '\'' +
", p3=" + p3 +
' ';
}
}
| [
"irina.petrovskaya@jetbrains.com"
] | irina.petrovskaya@jetbrains.com |
1715cd8f6885e3d0dceffdd459d8dc36573a9c35 | 447520f40e82a060368a0802a391697bc00be96f | /apks/obfuscation_and_logging/com_advantage_RaiffeisenBank/source/com/bumptech/glide/DrawableOptions.java | f72ee8fe23607547bf07677ba45845b3f5a719b6 | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 471 | java | package com.bumptech.glide;
import android.view.animation.Animation;
abstract interface DrawableOptions
{
public abstract GenericRequestBuilder<?, ?, ?, ?> crossFade();
public abstract GenericRequestBuilder<?, ?, ?, ?> crossFade(int paramInt);
public abstract GenericRequestBuilder<?, ?, ?, ?> crossFade(int paramInt1, int paramInt2);
@Deprecated
public abstract GenericRequestBuilder<?, ?, ?, ?> crossFade(Animation paramAnimation, int paramInt);
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
1bc520360fb1d368920278b70b9250136dc1b9a5 | edddd5f17dce0313be483a11cd3f27888aa4fd88 | /src/memento/Cliente.java | 774de7a8b0326da2cc5a39d2adf076485ab8faee | [] | no_license | Igorbrito77/Padroes-de-Projeto-GoF | bd85f8ca6d9420ad2d19f827e53d5d91dedfd2db | 3f59ffa5cbfd5de76942209afd4daff8f9e62c32 | refs/heads/master | 2022-12-31T09:13:01.851149 | 2020-10-12T19:12:54 | 2020-10-12T19:12:54 | 199,458,247 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 539 | java | package memento;
public class Cliente {
public static void main(String[] args) {
Texto texto = new Texto();
texto.escreverTexto("Primeira linha do texto\n");
texto.escreverTexto("Segunda linha do texto\n");
texto.escreverTexto("Terceira linha do texto\n");
texto.mostrarTexto();
texto.desfazerEscrita();
texto.mostrarTexto();
texto.desfazerEscrita();
texto.mostrarTexto();
texto.desfazerEscrita();
texto.mostrarTexto();
texto.desfazerEscrita();
texto.mostrarTexto();
}
}
| [
"="
] | = |
aeb2ff15223a30f05803ed815b69758d383addbf | 242b0492840a116aa2ca4d54774ea7f84fd7d142 | /renren-generator/src/main/java/io/renren/service/SysGeneratorService.java | b7fc12422add824c9bf4c884a94cc9cccb9349b7 | [
"Apache-2.0"
] | permissive | smileyuchang/security | 633df53c9eb147d26016e8d6456eb08c4a2d2d02 | d326b9d31ad18b4d9f7d0f4f50fe172cc430b12c | refs/heads/master | 2023-04-03T14:08:05.984555 | 2021-04-22T07:58:48 | 2021-04-22T07:58:48 | 361,603,658 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,689 | java |
package io.renren.service;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.renren.dao.GeneratorDao;
import io.renren.utils.GenUtils;
import io.renren.utils.PageUtils;
import io.renren.utils.Query;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.ByteArrayOutputStream;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipOutputStream;
/**
* 代码生成器
*
* @author Mark sunlightcs@gmail.com
*/
@Service
public class SysGeneratorService {
@Autowired
private GeneratorDao generatorDao;
public PageUtils queryList(Query query) {
Page<?> page = PageHelper.startPage(query.getPage(), query.getLimit());
List<Map<String, Object>> list = generatorDao.queryList(query);
return new PageUtils(list, (int)page.getTotal(), query.getLimit(), query.getPage());
}
public Map<String, String> queryTable(String tableName) {
return generatorDao.queryTable(tableName);
}
public List<Map<String, String>> queryColumns(String tableName) {
return generatorDao.queryColumns(tableName);
}
public byte[] generatorCode(String[] tableNames) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ZipOutputStream zip = new ZipOutputStream(outputStream);
for(String tableName : tableNames){
//查询表信息
Map<String, String> table = queryTable(tableName);
//查询列信息
List<Map<String, String>> columns = queryColumns(tableName);
//生成代码
GenUtils.generatorCode(table, columns, zip);
}
IOUtils.closeQuietly(zip);
return outputStream.toByteArray();
}
}
| [
"12345678"
] | 12345678 |
d73a113cf19a43e997ff3870754d052951955d25 | 1661886bc7ec4e827acdd0ed7e4287758a4ccc54 | /srv_unip_pub/src/main/java/com/sa/unip/ionicapp/ywsp/ctrlhandler/OA_YYSSQYYSSQ_W_MobWFMDViewMdctrlHandler.java | 7b59db5b6e11e564312f299c93855281d6b00ef6 | [
"MIT"
] | permissive | zhanght86/iBizSys_unip | baafb4a96920e8321ac6a1b68735bef376b50946 | a22b15ebb069c6a7432e3401bdd500a3ca37250e | refs/heads/master | 2020-04-25T21:20:23.830300 | 2018-01-26T06:08:28 | 2018-01-26T06:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,013 | java | /**
* iBizSys 5.0 机器人生产代码(不要直接修改当前代码)
* http://www.ibizsys.net
*/
package com.sa.unip.ionicapp.ywsp.ctrlhandler;
import java.util.ArrayList;
import java.util.List;
import net.ibizsys.paas.util.StringHelper;
import net.ibizsys.paas.web.WebContext;
import net.ibizsys.paas.demodel.DEModelGlobal;
import net.ibizsys.paas.demodel.IDataEntityModel;
import net.ibizsys.paas.service.IService;
import net.ibizsys.paas.service.ServiceGlobal;
import com.sa.unip.ionicapp.srv.ywsp.ctrlmodel.OA_YYSSQMobMOBMDCTRLModel;
import com.sa.unip.srv.ywsp.demodel.OA_YYSSQDEModel;
import com.sa.unip.srv.ywsp.service.OA_YYSSQService;
import com.sa.unip.srv.ywsp.dao.OA_YYSSQDAO;
import com.sa.unip.srv.ywsp.entity.OA_YYSSQ;
import net.ibizsys.paas.core.DEDataSetFetchContext;
import net.ibizsys.paas.ctrlmodel.IListModel;
import net.ibizsys.paas.db.DBFetchResult;
import net.ibizsys.paas.web.AjaxActionResult;
import net.ibizsys.paas.web.MDAjaxActionResult;
import net.ibizsys.paas.entity.IEntity;
/**
* 列表控件后台处理基类
*/
public class OA_YYSSQYYSSQ_W_MobWFMDViewMdctrlHandler extends net.ibizsys.paas.ctrlhandler.ListHandlerBase {
protected OA_YYSSQMobMOBMDCTRLModel listModel = null;
public OA_YYSSQYYSSQ_W_MobWFMDViewMdctrlHandler() {
super();
}
@Override
protected void onInit() throws Exception {
this.setMinorSortField("CREATEDATE");
this.setMinorSortDir("DESC");
listModel = (OA_YYSSQMobMOBMDCTRLModel)this.getViewController().getCtrlModel("mdctrl");
super.onInit();
}
@Override
protected IListModel getListModel() {
return this.getRealListModel();
}
protected OA_YYSSQMobMOBMDCTRLModel getRealListModel() {
return this.listModel;
}
protected OA_YYSSQService getRealService() {
return (OA_YYSSQService)this.getService();
}
@Override
protected DBFetchResult fetchDEDataSet(DEDataSetFetchContext deDataSetFetchContext) throws Exception {
return this.getRealService().fetchDefault(deDataSetFetchContext);
}
/**
* 准备部件操作数据访问能力
* @throws Exception
*/
@Override
protected void prepareDataAccessActions()throws Exception {
super.prepareDataAccessActions();
this.registerDataAccessAction("update","UPDATE");
this.registerDataAccessAction("remove","DELETE");
this.registerDataAccessAction("load","READ");
this.registerDataAccessAction("create","CREATE");
}
/* (non-Javadoc)
* @see net.ibizsys.paas.ctrlhandler.MDCtrlHandlerBase#getEntity(java.lang.Object)
*/
@Override
protected IEntity getEntity(Object objKeyValue)throws Exception {
OA_YYSSQ entity = new OA_YYSSQ();
entity.set(OA_YYSSQ.FIELD_OA_YYSSQID,objKeyValue);
this.getRealService().executeAction(OA_YYSSQService.ACTION_GET,entity);
return entity;
}
/* (non-Javadoc)
* @see net.ibizsys.paas.ctrlhandler.MDCtrlHandlerBase#createEntity(net.ibizsys.paas.entity.IEntity)
*/
@Override
protected IEntity createEntity(IEntity iEntity)throws Exception {
this.getRealService().executeAction(OA_YYSSQService.ACTION_CREATE,iEntity);
return iEntity;
}
/* (non-Javadoc)
* @see net.ibizsys.paas.ctrlhandler.MDCtrlHandlerBase#updateEntity(net.ibizsys.paas.entity.IEntity)
*/
@Override
protected IEntity updateEntity(IEntity iEntity)throws Exception {
this.getRealService().executeAction(OA_YYSSQService.ACTION_UPDATE,iEntity);
return iEntity;
}
/* (non-Javadoc)
* @see net.ibizsys.paas.ctrlhandler.MDCtrlHandlerBase#removeEntity(java.lang.Object)
*/
@Override
protected void removeEntity(Object objKeyValue)throws Exception {
OA_YYSSQ entity = new OA_YYSSQ();
entity.set(OA_YYSSQ.FIELD_OA_YYSSQID,objKeyValue);
this.getRealService().executeAction(OA_YYSSQService.ACTION_REMOVE,entity);
}
} | [
"dev@ibizsys.net"
] | dev@ibizsys.net |
d87bd508192fc03123ec4eaa0fb740d59aa86551 | 255494357301b5f0f187103dd791cdf4199642c5 | /Sqlitedatabase/app/src/main/java/com/coderbd/sqlitedatabase/Product.java | 06188e7e17936ba1857f5fcd55e5e9900dd76986 | [] | no_license | springapidev/android | 9f1e03d8192158804a5b58e96d2a67c624595751 | b330991e91b906e16dffa3135f3da5b24106750e | refs/heads/master | 2022-02-16T18:48:33.797401 | 2019-08-08T12:51:50 | 2019-08-08T12:51:50 | 104,208,108 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 935 | java | package com.coderbd.sqlitedatabase;
public class Product {
private int _id;
private String _productname;
private int _quantity;
public Product() {
}
public Product(int id, String productname, int quantity) {
this._id = id;
this._productname = productname;
this._quantity = quantity;
}
public Product(String productname, int quantity) {
this._productname = productname;
this._quantity = quantity;
}
public void setID(int id) {
this._id = id;
}
public int getID() {
return this._id;
}
public void setProductName(String productname) {
this._productname = productname;
}
public String getProductName() {
return this._productname;
}
public void setQuantity(int quantity) {
this._quantity = quantity;
}
public int getQuantity() {
return this._quantity;
}
}
| [
"springapidev@gmail.com"
] | springapidev@gmail.com |
0b86d68bd8d64d8828dab405dbf0ffbebf06d275 | 0ead89bb50c758109d01c477175c38ad238ce111 | /spring-framework/spring-aop/src/main/java/org/springframework/aop/framework/ProxyCreatorSupport.java | a5244bc9549fdce8ea55b1554ecc99222bb929da | [
"Apache-2.0"
] | permissive | shouwangyw/ssm | 95b2446ceb2e06e61290faada71526a6d61493bf | 97b77c41e0f65c76a64abd239c12b1523436a4d4 | refs/heads/main | 2023-06-07T11:28:46.702042 | 2021-06-28T07:26:40 | 2021-06-28T07:26:40 | 377,182,671 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,001 | java | /*
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.framework;
import java.util.LinkedList;
import java.util.List;
import org.springframework.util.Assert;
/**
* Base class for proxy factories.
* Provides convenient access to a configurable AopProxyFactory.
*
* @author Juergen Hoeller
* @since 2.0.3
* @see #createAopProxy()
*/
@SuppressWarnings("serial")
public class ProxyCreatorSupport extends AdvisedSupport {
private AopProxyFactory aopProxyFactory;
private final List<AdvisedSupportListener> listeners = new LinkedList<>();
/** Set to true when the first AOP proxy has been created */
private boolean active = false;
/**
* Create a new ProxyCreatorSupport instance.
*/
public ProxyCreatorSupport() {
this.aopProxyFactory = new DefaultAopProxyFactory();
}
/**
* Create a new ProxyCreatorSupport instance.
* @param aopProxyFactory the AopProxyFactory to use
*/
public ProxyCreatorSupport(AopProxyFactory aopProxyFactory) {
Assert.notNull(aopProxyFactory, "AopProxyFactory must not be null");
this.aopProxyFactory = aopProxyFactory;
}
/**
* Customize the AopProxyFactory, allowing different strategies
* to be dropped in without changing the core framework.
* <p>Default is {@link DefaultAopProxyFactory}, using dynamic JDK
* proxies or CGLIB proxies based on the requirements.
*/
public void setAopProxyFactory(AopProxyFactory aopProxyFactory) {
Assert.notNull(aopProxyFactory, "AopProxyFactory must not be null");
this.aopProxyFactory = aopProxyFactory;
}
/**
* Return the AopProxyFactory that this ProxyConfig uses.
*/
public AopProxyFactory getAopProxyFactory() {
return this.aopProxyFactory;
}
/**
* Add the given AdvisedSupportListener to this proxy configuration.
* @param listener the listener to register
*/
public void addListener(AdvisedSupportListener listener) {
Assert.notNull(listener, "AdvisedSupportListener must not be null");
this.listeners.add(listener);
}
/**
* Remove the given AdvisedSupportListener from this proxy configuration.
* @param listener the listener to deregister
*/
public void removeListener(AdvisedSupportListener listener) {
Assert.notNull(listener, "AdvisedSupportListener must not be null");
this.listeners.remove(listener);
}
/**
* Subclasses should call this to get a new AOP proxy. They should <b>not</b>
* create an AOP proxy with {@code this} as an argument.
*/
protected final synchronized AopProxy createAopProxy() {
if (!this.active) {
activate();
}
// 创建JDK方式的AOP代理或者CGLib方式的AOP代理
return getAopProxyFactory().createAopProxy(this);
}
/**
* Activate this proxy configuration.
* @see AdvisedSupportListener#activated
*/
private void activate() {
this.active = true;
for (AdvisedSupportListener listener : this.listeners) {
listener.activated(this);
}
}
/**
* Propagate advice change event to all AdvisedSupportListeners.
* @see AdvisedSupportListener#adviceChanged
*/
@Override
protected void adviceChanged() {
super.adviceChanged();
synchronized (this) {
if (this.active) {
for (AdvisedSupportListener listener : this.listeners) {
listener.adviceChanged(this);
}
}
}
}
/**
* Subclasses can call this to check whether any AOP proxies have been created yet.
*/
protected final synchronized boolean isActive() {
return this.active;
}
}
| [
"897900564@qq.com"
] | 897900564@qq.com |
5bc1941ea988f6f4d95bc4aa6a48290a48470345 | 0c0cc27767828a8b3bfef84683c8250d985f7ac6 | /chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastAudioManager.java | 394b2edd5577f023a08c322df92f1079c57e0881 | [
"BSD-3-Clause"
] | permissive | sharpie33/chromium | 1cb882b849fed8dcfd7f5375ebecc2ace82c4b81 | 82e92e2ad746093bebb73b807e44482dbf9d6695 | refs/heads/master | 2023-01-08T05:05:05.415432 | 2020-02-09T17:43:42 | 2020-02-09T17:43:42 | 238,395,399 | 1 | 0 | BSD-3-Clause | 2020-02-05T07:47:43 | 2020-02-05T07:47:42 | null | UTF-8 | Java | false | false | 6,374 | java | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chromecast.shell;
import android.content.Context;
import android.media.AudioManager;
import android.media.audiopolicy.AudioPolicy;
import android.os.Build;
import android.support.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import org.chromium.base.Log;
import org.chromium.chromecast.base.Controller;
import org.chromium.chromecast.base.Observable;
/**
* Wrapper for Cast code to use a single AudioManager instance.
*
* Encapsulates behavior that differs across SDK levels like muting and audio focus, and manages a
* singleton instance that ensures that all clients are using the same AudioManager.
*/
public class CastAudioManager {
private static final String TAG = "CastAudioManager";
private static CastAudioManager sInstance;
public static CastAudioManager getAudioManager(Context context) {
if (sInstance == null) {
sInstance = new CastAudioManager(
(AudioManager) context.getSystemService(Context.AUDIO_SERVICE));
}
return sInstance;
}
private final AudioManager mInternal;
@VisibleForTesting
CastAudioManager(AudioManager audioManager) {
mInternal = audioManager;
}
/**
* Requests audio focus whenever the given Observable is activated.
*
* The audio focus request is abandoned when the given Observable is deactivated.
*
* Returns an Observable that is activated whenever the audio focus is lost. The activation data
* of this Observable indicates the type of audio focus loss.
*
* The resulting Observable will be activated with AudioFocus.NORMAL when the focus request is
* abandoned.
*
* Observable<AudioFocusLoss> focusLoss = castAudioManager.requestFocusWhen(focusRequest);
* // Get an Observable of when focus is taken:
* Observable<?> gotFocus = Observable.not(focusLoss);
* // Get an Observable of when a specific request got focus:
* Observable<Both<CastAudioFocusRequest, AudioFocusLoss>> requestLost =
* focusRequest.andThen(focusLoss);
*
* The given Observable<CastAudioFocusRequest> should deactivate before it is garbage-collected,
* or else the Observable and anything it references will leak.
*/
public Observable<AudioFocusLoss> requestAudioFocusWhen(
Observable<CastAudioFocusRequest> event) {
Controller<AudioFocusLoss> audioFocusLossState = new Controller<>();
audioFocusLossState.set(AudioFocusLoss.NORMAL);
event.subscribe(focusRequest -> {
focusRequest.setAudioFocusChangeListener((int focusChange) -> {
audioFocusLossState.set(AudioFocusLoss.from(focusChange));
});
// Request audio focus when the source event is activated.
if (focusRequest.request(mInternal) == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {
audioFocusLossState.reset();
}
// Abandon audio focus when the source event is deactivated.
return () -> {
if (focusRequest.abandon(mInternal) != AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {
Log.e(TAG, "Failed to abandon audio focus");
}
audioFocusLossState.set(AudioFocusLoss.NORMAL);
};
});
return audioFocusLossState;
}
// Only called on Lollipop and below, in an Activity's onPause() event.
// On Lollipop and below, setStreamMute() calls are cumulative and per-application, and if
// Activities don't unmute the streams that they mute, the stream remains muted to other
// applications, which are unable to unmute the stream themselves. Therefore, when an Activity
// is paused, it must unmute any streams it had muted.
// More context in b/19964892 and b/22204758.
@SuppressWarnings("deprecation")
public void releaseStreamMuteIfNecessary(int streamType) {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) {
// On L, if we try to unmute a stream that is not muted, a warning Toast appears.
// Check the stream mute state to determine whether to unmute.
boolean isMuted = false;
try {
// isStreamMute() was only made public in M, but it can be accessed through
// reflection in L.
isMuted = (Boolean) mInternal.getClass()
.getMethod("isStreamMute", int.class)
.invoke(mInternal, streamType);
} catch (Exception e) {
Log.e(TAG, "Can not call AudioManager.isStreamMute().", e);
}
if (isMuted) {
// Note: this is a no-op on fixed-volume devices.
mInternal.setStreamMute(streamType, false);
}
}
}
public int getStreamMaxVolume(int streamType) {
return mInternal.getStreamMaxVolume(streamType);
}
public int registerAudioPolicy(AudioPolicy audioPolicy) {
return mInternal.registerAudioPolicy(audioPolicy);
}
public void unregisterAudioPolicyAsync(AudioPolicy audioPolicy) {
mInternal.unregisterAudioPolicyAsync(audioPolicy);
}
// TODO(sanfin): Do not expose this. All needed AudioManager methods can be adapted with
// CastAudioManager.
public AudioManager getInternal() {
return mInternal;
}
/**
* Disambiguates different audio focus loss types that can activate the result of
* requestAudioFocusWhen().
*/
public enum AudioFocusLoss {
NORMAL,
TRANSIENT,
TRANSIENT_CAN_DUCK;
private static @Nullable AudioFocusLoss from(int focusChange) {
switch (focusChange) {
case AudioManager.AUDIOFOCUS_LOSS:
return NORMAL;
case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT:
return TRANSIENT;
case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK:
return TRANSIENT_CAN_DUCK;
default:
return null;
}
}
}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
f205a8552576005319a8073a524c4d87218495e1 | 22e9aae293443a93d04192f9510bb6585c1f77c3 | /express28/express-server/src/main/java/express/data/stub/ReceiveInfoDataService_stub.java | c5c004a253467d1b5a048a565d9906689176f42c | [] | no_license | Goldenbullet/presentationCODE | 212ff5abe50ac5eb1b3406f4d4f542ce50e6483c | e5f172e1e95d8a3e646a02a9c50527285d959f93 | refs/heads/master | 2021-01-10T16:42:45.447261 | 2015-12-08T16:56:17 | 2015-12-08T16:56:17 | 46,796,185 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 604 | java | package express.data.stub;
import express.dataService.documentDataService.ReceiveInfoDataService;
import express.po.ReceiveInfoPO;
public class ReceiveInfoDataService_stub implements ReceiveInfoDataService{
public boolean createReceiveInfo(ReceiveInfoPO po){
System.out.println("Receive information has created");
return true;
}
public ReceiveInfoPO getReceiveInfo(String orderID){
ReceiveInfoPO x=new ReceiveInfoPO("Jack", "2015-02-01", "0000000001");
if(orderID.equals("0000000001")){
return x;
}
else{
System.out.println("NO SUCH ReceiveInfo");
return null;
}
}
}
| [
"hzluhailong@163.com"
] | hzluhailong@163.com |
0a644ebb62dd748bd1ecbbd73c9d5c5fa4c1c60c | 08a95d58927c426e515d7f6d23631abe734105b4 | /Project/bean/com/dimata/harisma/entity/outsource/OutsrcCostProv.java | 8507a18d09cbd0233e6fc4b5d0f9fd6c37d494e0 | [] | no_license | Bagusnanda90/javaproject | 878ce3d82f14d28b69b7ef20af675997c73b6fb6 | 1c8f105d4b76c2deba2e6b8269f9035c67c20d23 | refs/heads/master | 2020-03-23T15:15:38.449142 | 2018-07-21T00:31:47 | 2018-07-21T00:31:47 | 141,734,002 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,770 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.dimata.harisma.entity.outsource;
import com.dimata.qdep.entity.Entity;
/**
*
* @author khirayinnura
*/
public class OutsrcCostProv extends Entity {
private long positionId = 0;
private String positionName = "";
private long providerId = 0;
private String providerName = "";
private int numberOfPerson = 0;
private long outsourceCostId = 0;
public long getPositionId() {
return positionId;
}
public void setPositionId(long positionId) {
this.positionId = positionId;
}
public long getProviderId() {
return providerId;
}
public void setProviderId(long providerId) {
this.providerId = providerId;
}
public int getNumberOfPerson() {
return numberOfPerson;
}
public void setNumberOfPerson(int numberOfPerson) {
this.numberOfPerson = numberOfPerson;
}
public long getOutsourceCostId() {
return outsourceCostId;
}
public void setOutsourceCostId(long outsourceCostId) {
this.outsourceCostId = outsourceCostId;
}
/**
* @return the positionName
*/
public String getPositionName() {
return positionName;
}
/**
* @param positionName the positionName to set
*/
public void setPositionName(String positionName) {
this.positionName = positionName;
}
/**
* @return the providerName
*/
public String getProviderName() {
return providerName;
}
/**
* @param providerName the providerName to set
*/
public void setProviderName(String providerName) {
this.providerName = providerName;
}
}
| [
"agungbagusnanda90@gmai.com"
] | agungbagusnanda90@gmai.com |
5934e98133c6cd754fb01cbcd6cf01de2b069c7a | c3039d190f406d29a18a787e707c1cf3d4e11d0f | /hz-task-master/src/main/java/com/hz/task/master/core/service/QuestionMService.java | 7b557f3242de734248dc688f5b499d528a925ac7 | [] | no_license | hzhuazhi/hz-task | 3e6c2addbcf6cc0a398376ac96805d49d5d6058b | f3d554f0826788bc3b0a23931194aa5ead2bd27c | refs/heads/master | 2022-12-18T18:59:35.184254 | 2020-09-03T14:40:55 | 2020-09-03T14:40:55 | 271,976,042 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 286 | java | package com.hz.task.master.core.service;
import com.hz.task.master.core.common.service.BaseService;
/**
* @Description 百问百答问题类别的Service层
* @Author yoko
* @Date 2020/1/7 16:52
* @Version 1.0
*/
public interface QuestionMService<T> extends BaseService<T> {
}
| [
"duanfeng_1712@qq.com"
] | duanfeng_1712@qq.com |
59086ef9647a4a4483d0a97be8873c3a9d283158 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mobileqqi/classes.jar/com/tencent/mobileqq/contactsync/RawContact.java | 32b9eab104bf4168e30d1db2cbe8c96c43e9d409 | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 331 | java | package com.tencent.mobileqq.contactsync;
public class RawContact
{
public int a;
public long a;
public String a;
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes3.jar
* Qualified Name: com.tencent.mobileqq.contactsync.RawContact
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
9945e71f8819504e425f22c158da0c91d4c04655 | e17f8e9f5b7a4f813287ab20a90f066111913fe5 | /Xelenium_2_28/src/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSourceElement.java | 342df4ba24f8a3a8b2e0593ae5c189fee1a460e1 | [] | no_license | VVasanth/xelenium | df993684efae0900ca7c70c9d63e739608780760 | ad2b3902d4f9ecacc8063727c1a5f219d0f9bb98 | refs/heads/master | 2021-01-10T20:59:17.392193 | 2013-05-17T11:52:09 | 2013-05-17T11:52:09 | 10,121,359 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,306 | java | /*
* Copyright (c) 2002-2012 Gargoyle Software Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gargoylesoftware.htmlunit.javascript.host.html;
import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.CHROME;
import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.FF;
import com.gargoylesoftware.htmlunit.html.HtmlSource;
import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass;
import com.gargoylesoftware.htmlunit.javascript.configuration.WebBrowser;
/**
* The JavaScript object "HTMLSourceElement".
*
* @version $Revision: 7457 $
* @author Ahmed Ashour
*/
@JsxClass(domClasses = HtmlSource.class, browsers = { @WebBrowser(FF), @WebBrowser(CHROME) })
public class HTMLSourceElement extends HTMLElement {
}
| [
"vvk.victory@gmail.com"
] | vvk.victory@gmail.com |
94a72d0fbe36836715ad77e900fb223778b84a99 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/34/34_60e2cea66ecb2578dbd17039245a067c0c9f2048/SolidObject/34_60e2cea66ecb2578dbd17039245a067c0c9f2048_SolidObject_s.java | c60ac5ddc0b97e3c90a6e2a1e588f8cf8730f0f2 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 1,341 | java | package com.spotlightcoding.components;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.geom.Vector2f;
import com.spotlightcoding.Component;
import com.spotlightcoding.Entity;
import com.spotlightcoding.World;
public class SolidObject extends Component {
Entity rob;
public SolidObject(Entity rob) {
this.rob = rob;
}
public void update(GameContainer gc, StateBasedGame sb, int delta) {
if (((rob.getPosition().getX() + rob.getSize().getWidth()) > (owner.getPosition().getX() + owner.getSize().getWidth())) && ((rob.getPosition().getX()) <= owner.getPosition().getX() + owner.getSize().getWidth()) && ((rob.getPosition().getY() + rob.getSize().getHeight()) >= owner.getPosition().getY() + 6)) {
// Stop left movement
rob.setBarrier(Entity.BARRIER_LEFT);
} else if ((rob.getPosition().getX() < owner.getPosition().getX()) && (rob.getPosition().getX() + rob.getSize().getWidth()) >= owner.getPosition().getX() && ((rob.getPosition().getY() + rob.getSize().getHeight()) >= owner.getPosition().getY() + 6)) {
// Stop right movement
rob.setBarrier(Entity.BARRIER_RIGHT);
} else {
rob.setBarrier(Entity.BARRIER_NONE);
}
// System.out.println(rob.getPosition().getY() + " " + rob.getPosition().getX());
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
0d4cc4b395c3fc637d8d42e8c7bb2b974f35e9c6 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MATH-60b-4-9-PESA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/special/Erf_ESTest.java | 23064c139471801ae969b2a77a6d022c07dd5ae4 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 544 | java | /*
* This file was automatically generated by EvoSuite
* Sun Jan 19 18:05:03 UTC 2020
*/
package org.apache.commons.math.special;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class Erf_ESTest extends Erf_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
2f1a3b32dbc1aa404e2f2b22c277de880492566d | 91297ffb10fb4a601cf1d261e32886e7c746c201 | /groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/SourceCategory.java | 8e3e92fe98aac6bd56bd2adaff5513a86ad0c1c4 | [] | no_license | JavaQualitasCorpus/netbeans-7.3 | 0b0a49d8191393ef848241a4d0aa0ecc2a71ceba | 60018fd982f9b0c9fa81702c49980db5a47f241e | refs/heads/master | 2023-08-12T09:29:23.549956 | 2019-03-16T17:06:32 | 2019-03-16T17:06:32 | 167,005,013 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,013 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Contributor(s):
*
* Portions Copyrighted 2007 Sun Microsystems, Inc.
*/
package org.netbeans.modules.groovy.grailsproject;
/**
*
* @author schmidtm
* @author Martin Adamek
*/
public enum SourceCategory {
GRAILSAPP_CONF("grails-app/conf", null, null),
GRAILSAPP_CONTROLLERS("grails-app/controllers", "create-controller", "Controller.groovy"),
GRAILSAPP_DOMAIN("grails-app/domain", "create-domain-class", null),
GRAILSAPP_I18N("grails-app/i18n", null, null),
GRAILSAPP_SERVICES("grails-app/services", "create-service", "Service.groovy"),
GRAILSAPP_TAGLIB("grails-app/taglib", "create-tag-lib", "TagLib.groovy"),
GRAILSAPP_UTILS("grails-app/utils", null, null),
GRAILSAPP_VIEWS("grails-app/views", null, null),
PLUGINS("plugins", null, null),
TEST_INTEGRATION("test/integration", "create-integration-test", "Tests.groovy"),
TEST_UNIT("test/unit", "create-unit-test", "Tests.groovy"),
SCRIPTS("scripts", "create-script", null),
SRC_JAVA("src/java", null, null),
SRC_GWT("src/gwt", null, null),
SRC_GROOVY("src/groovy", null, null),
WEBAPP("web-app", null, null),
LIB("lib", null, null);
private final String relativePath;
private final String command;
private final String suffix;
SourceCategory(String relativePath, String command, String suffix) {
this.relativePath = relativePath;
this.command = command;
this.suffix = suffix;
}
public String getRelativePath() {
return relativePath;
}
public String getCommand() {
return command;
}
public String getSuffix() {
return suffix;
}
}
| [
"taibi@sonar-scheduler.rd.tut.fi"
] | taibi@sonar-scheduler.rd.tut.fi |
d341dab92d652dffc49478e602517feba394a0ad | 882e77219bce59ae57cbad7e9606507b34eebfcf | /mi2s_securitycenter_miui12/src/main/java/com/miui/gamebooster/globalgame/view/d.java | 905094c572e86dabdbbcdd57c489981bcb4f0c14 | [] | no_license | CrackerCat/XiaomiFramework | 17a12c1752296fa1a52f61b83ecf165f328f4523 | 0b7952df317dac02ebd1feea7507afb789cef2e3 | refs/heads/master | 2022-06-12T03:30:33.285593 | 2020-05-06T11:30:54 | 2020-05-06T11:30:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,231 | java | package com.miui.gamebooster.globalgame.view;
import android.widget.ImageView;
/* synthetic */ class d {
/* renamed from: a reason: collision with root package name */
static final /* synthetic */ int[] f4431a = new int[ImageView.ScaleType.values().length];
/* JADX WARNING: Can't wrap try/catch for region: R(14:0|1|2|3|4|5|6|7|8|9|10|11|12|(3:13|14|16)) */
/* JADX WARNING: Can't wrap try/catch for region: R(16:0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|16) */
/* JADX WARNING: Failed to process nested try/catch */
/* JADX WARNING: Missing exception handler attribute for start block: B:11:0x0040 */
/* JADX WARNING: Missing exception handler attribute for start block: B:13:0x004b */
/* JADX WARNING: Missing exception handler attribute for start block: B:3:0x0014 */
/* JADX WARNING: Missing exception handler attribute for start block: B:5:0x001f */
/* JADX WARNING: Missing exception handler attribute for start block: B:7:0x002a */
/* JADX WARNING: Missing exception handler attribute for start block: B:9:0x0035 */
static {
/*
android.widget.ImageView$ScaleType[] r0 = android.widget.ImageView.ScaleType.values()
int r0 = r0.length
int[] r0 = new int[r0]
f4431a = r0
int[] r0 = f4431a // Catch:{ NoSuchFieldError -> 0x0014 }
android.widget.ImageView$ScaleType r1 = android.widget.ImageView.ScaleType.CENTER // Catch:{ NoSuchFieldError -> 0x0014 }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x0014 }
r2 = 1
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x0014 }
L_0x0014:
int[] r0 = f4431a // Catch:{ NoSuchFieldError -> 0x001f }
android.widget.ImageView$ScaleType r1 = android.widget.ImageView.ScaleType.CENTER_CROP // Catch:{ NoSuchFieldError -> 0x001f }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x001f }
r2 = 2
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x001f }
L_0x001f:
int[] r0 = f4431a // Catch:{ NoSuchFieldError -> 0x002a }
android.widget.ImageView$ScaleType r1 = android.widget.ImageView.ScaleType.CENTER_INSIDE // Catch:{ NoSuchFieldError -> 0x002a }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x002a }
r2 = 3
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x002a }
L_0x002a:
int[] r0 = f4431a // Catch:{ NoSuchFieldError -> 0x0035 }
android.widget.ImageView$ScaleType r1 = android.widget.ImageView.ScaleType.FIT_CENTER // Catch:{ NoSuchFieldError -> 0x0035 }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x0035 }
r2 = 4
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x0035 }
L_0x0035:
int[] r0 = f4431a // Catch:{ NoSuchFieldError -> 0x0040 }
android.widget.ImageView$ScaleType r1 = android.widget.ImageView.ScaleType.FIT_END // Catch:{ NoSuchFieldError -> 0x0040 }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x0040 }
r2 = 5
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x0040 }
L_0x0040:
int[] r0 = f4431a // Catch:{ NoSuchFieldError -> 0x004b }
android.widget.ImageView$ScaleType r1 = android.widget.ImageView.ScaleType.FIT_START // Catch:{ NoSuchFieldError -> 0x004b }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x004b }
r2 = 6
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x004b }
L_0x004b:
int[] r0 = f4431a // Catch:{ NoSuchFieldError -> 0x0056 }
android.widget.ImageView$ScaleType r1 = android.widget.ImageView.ScaleType.FIT_XY // Catch:{ NoSuchFieldError -> 0x0056 }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x0056 }
r2 = 7
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x0056 }
L_0x0056:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.miui.gamebooster.globalgame.view.d.<clinit>():void");
}
}
| [
"sanbo.xyz@gmail.com"
] | sanbo.xyz@gmail.com |
1bad6786beea1ef6ab94d3c1f97a494de7e78447 | fa1408365e2e3f372aa61e7d1e5ea5afcd652199 | /src/testcases/CWE369_Divide_by_Zero/s03/CWE369_Divide_by_Zero__int_listen_tcp_divide_51b.java | fa568858b97a6994a4c61630890983405b7d57f7 | [] | no_license | bqcuong/Juliet-Test-Case | 31e9c89c27bf54a07b7ba547eddd029287b2e191 | e770f1c3969be76fdba5d7760e036f9ba060957d | refs/heads/master | 2020-07-17T14:51:49.610703 | 2019-09-03T16:22:58 | 2019-09-03T16:22:58 | 206,039,578 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,832 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__int_listen_tcp_divide_51b.java
Label Definition File: CWE369_Divide_by_Zero__int.label.xml
Template File: sources-sinks-51b.tmpl.java
*/
/*
* @description
* CWE: 369 Divide by zero
* BadSource: listen_tcp Read data using a listening tcp connection
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: divide
* GoodSink: Check for zero before dividing
* BadSink : Dividing by a value that may be zero
* Flow Variant: 51 Data flow: data passed as an argument from one function to another in different classes in the same package
*
* */
package testcases.CWE369_Divide_by_Zero.s03;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE369_Divide_by_Zero__int_listen_tcp_divide_51b
{
public void badSink(int data ) throws Throwable
{
/* POTENTIAL FLAW: Zero denominator will cause an issue. An integer division will
result in an exception. */
IO.writeLine("bad: 100/" + data + " = " + (100 / data) + "\n");
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(int data ) throws Throwable
{
/* POTENTIAL FLAW: Zero denominator will cause an issue. An integer division will
result in an exception. */
IO.writeLine("bad: 100/" + data + " = " + (100 / data) + "\n");
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(int data ) throws Throwable
{
/* FIX: test for a zero denominator */
if (data != 0)
{
IO.writeLine("100/" + data + " = " + (100 / data) + "\n");
}
else
{
IO.writeLine("This would result in a divide by zero");
}
}
}
| [
"bqcuong2212@gmail.com"
] | bqcuong2212@gmail.com |
e7380737cca9f72e9faff561a3ff82e62c26b833 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/1/1_316701135263223fa18efae15c05ffce6c155a41/Donkey/1_316701135263223fa18efae15c05ffce6c155a41_Donkey_s.java | 1f306a37f80d18609d7671ceda47422189493ca2 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 7,407 | java |
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
/**
* The grand strategy of the AI for the CTF game.
* @author kviiri
*/
public class Donkey {
private HashMap<String, Lion> expendables;
private ArrayList<Things.Enemy> charlies;
private ArrayList<Things.Grenade> grenades;
Scanner lue;
private float[][][][] dist; //fromX fromY toX toY
private ArrayList<ArrayList<Boolean>> wallMap; //true = passable, false = not passable
private boolean team; //true = A, false = B
private int ourScore;
private int theirScore;
public Things.Flag ourFlag;
public Things.EnemyFlag enemyFlag;
public Donkey() {
this.expendables = new HashMap<String, Lion>();
this.charlies = new ArrayList<Things.Enemy>();
lue = new Scanner(System.in);
parseInitialEngineOutput();
this.dist = floydWarshall(wallMap.get(0).size(), wallMap.size());
}
private void parseInitialEngineOutput() {
if (lue.nextLine().equals("A")) {
team = true;
} else {
team = false;
}
int rowNum = 0;
while (lue.hasNextLine()) {
String line = lue.nextLine();
if (line.length() < 2) {
break;
}
wallMap.add(rowNum, new ArrayList<Boolean>());
for (int i = 0; i < line.length(); i++) {
if (line.charAt(i) == '#') {
wallMap.get(rowNum).add(false);
}
}
rowNum++;
}
}
private void parseTurnEngineOutPut() {
String[] points = lue.nextLine().split(" "); //Ourpoints Enemypoints
ourScore = Integer.parseInt(points[0]);
theirScore = Integer.parseInt(points[1]);
String[] flag = lue.nextLine().split(" "); //ourFlag.x ourFlag.y
ourFlag = new Things.Flag(Integer.parseInt(flag[1]), Integer.parseInt(flag[2]));
//Next up - our soldiers
String[] next = lue.nextLine().split(" ");
do {
if (!next[0].equalsIgnoreCase("Soldier")) {
break;
}
if (expendables.containsKey(next[1])) {
expendables.get(next[1]).soldier = new Things.Soldier(next[1], Integer.parseInt(next[2]), Integer.parseInt(next[3]),
Integer.parseInt(next[4]), Boolean.parseBoolean(next[5]), next[6]);
}
else {
expendables.put(next[1], new Lion(Lion.STATE_RUSH, new Things.Soldier(next[1], Integer.parseInt(next[2]), Integer.parseInt(next[3]),
Integer.parseInt(next[4]), Boolean.parseBoolean(next[5]), next[6]), this));
}
next = lue.nextLine().split(" "); //"Soldier" name x y cooldown alive flag
} while (next[0].equalsIgnoreCase("Soldier"));
//Grenades
do {
if (!next[0].equalsIgnoreCase("Grenade")) {
break;
}
grenades.add(new Things.Grenade(Integer.parseInt(next[1]), Integer.parseInt(next[2]), Integer.parseInt(next[3])));
next = lue.nextLine().split(" ");
} while (next[0].equals("Grenade"));
charlies.clear();
enemyFlag = new Things.EnemyFlag(Integer.parseInt(next[1]), Integer.parseInt(next[2]));
do {
next = lue.nextLine().split(" ");
if (next.length == 0) {
break;
}
charlies.add(new Things.Enemy(next[1], Integer.parseInt(next[2]), Integer.parseInt(next[3]),
Boolean.parseBoolean(next[4]), next[5]));
} while (next.length > 0);
}
private float[][][][] floydWarshall(int xSize, int ySize) {
float[][][][] ret = new float[xSize][ySize][xSize][ySize];
for (int x1 = 0; x1 < xSize; x1++) {
for (int x2 = 0; x2 < xSize; x2++) {
for (int y1 = 0; y1 < ySize; y1++) {
for (int y2 = 0; y2 < ySize; y2++) {
if (x1 == x2 && y1 == y2) {
ret[x1][y1][x2][y2] = 0;
} else {
ret[x1][y1][x2][y2] = Float.POSITIVE_INFINITY;
}
}
}
}
}
//Yo dawg, I herd you like loops so I put loops inside the loops inside your loops, so you can loop while you loop the loop
for (int xBetween = 0; xBetween < xSize; xBetween++) {
for (int yBetween = 0; yBetween < ySize; yBetween++) {
for (int xAt = 0; xAt < xSize; xAt++) {
for (int yAt = 0; yAt < ySize; yAt++) {
for (int xDest = 0; xDest < xSize; xDest++) {
for (int yDest = 0; yDest < ySize; yDest++) {
//if blocked
if (!wallMap.get(yDest).get(xDest)) {
dist[xAt][yAt][xDest][yDest] = Float.POSITIVE_INFINITY;
continue;
} //if neighbor, distance is 1
else if (Math.abs(yAt - yDest) + Math.abs(xAt - xDest) == 1) {
dist[xAt][yAt][xDest][yDest] = 1;
continue;
} else {
dist[xAt][yAt][xDest][yDest] = Math.min(dist[xAt][yAt][xDest][yDest],
dist[xAt][yAt][xBetween][yBetween] + dist[xBetween][yBetween][xDest][yDest]);
}
}
}
}
}
}
}
return ret;
}
public static void main(String[] args) {
Donkey brain = new Donkey();
while(brain.lue.hasNextLine()) {
brain.parseTurnEngineOutPut();
for(Lion l : brain.expendables.values()) {
System.out.println(l.getAction());
}
}
}
//Returns the move direction from xAt, yAt to xDest, yDest
public String getMoveOrder(int xAt, int yAt, int xDest, int yDest) {
float best = Float.POSITIVE_INFINITY;
String ret = "S";
if(xAt > 0 && best > dist[xAt-1][yAt][xDest][yDest]) {
best = (int)dist[xAt-1][yAt][xDest][yDest];
ret = "L";
}
if(xAt < dist.length - 1 && best > dist[xAt+1][yAt][xDest][yDest]) {
best = (int)dist[xAt+1][yAt][xDest][yDest];
ret = "R";
}
if(yAt > 0 && best > dist[xAt][yAt-1][xDest][yDest]) {
best = (int)dist[xAt][yAt-1][xDest][yDest];
ret = "U";
}
if(yAt < dist.length - 1 && best > dist[xAt][yAt+1][xDest][yDest]) {
best = (int)dist[xAt][yAt+1][xDest][yDest];
ret = "D";
}
return ret;
}
public boolean weHaveFlag() {
for(Lion l : expendables.values()) {
if(l.soldier.flag.equals("A") || l.soldier.flag.equals("B")) return true;
}
return false;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
71094239878d02587e20430546c8e568f28b4c61 | 7c9072b5ca293f29b60acc5f9d7f14325cabc579 | /cms-common/src/main/java/com/design/cms/common/utils/HttpUtil.java | e6aa1ead4171dd05336fc97c827d2f21ff982bfa | [] | no_license | keepsilentc/designcmscode | 4fc5434bdb3a363963648928f1bcfc1c1c24124d | caf2d10de03abfa43ed83d5d3b5624c898df1b04 | refs/heads/master | 2021-01-21T06:59:35.824437 | 2017-02-27T11:19:45 | 2017-02-27T11:19:45 | 83,302,001 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,795 | java | package com.design.cms.common.utils;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Map;
import java.util.Map.Entry;
import com.design.cms.common.assist.DesignException;
public class HttpUtil {
public static final String DEF_CHATSET = "UTF-8";
public static final int DEF_CONN_TIMEOUT = 10000;
public static final int DEF_READ_TIMEOUT = 10000;
public static void post(String urlStr,Map<String,String> params){
StringBuilder builder = new StringBuilder();
for (Entry<String, String> i : params.entrySet()) {
builder.append(i.getKey()).append("=").append(i.getValue()).append("&");
}
post(urlStr,builder.toString());
}
public static String post(String urlStr, String param) {
try {
URL url = new URL(urlStr);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setDoInput(true);
con.setDoOutput(true);
con.setConnectTimeout(DEF_CONN_TIMEOUT);
OutputStream os = con.getOutputStream();
os.write(param.getBytes(DEF_CHATSET));
os.flush();
os.close();
int resultCode= con.getResponseCode();
if(HttpURLConnection.HTTP_OK==resultCode){
StringBuffer sb=new StringBuffer();
String readLine=null;
BufferedReader responseReader=new BufferedReader(new InputStreamReader(con.getInputStream(),"UTF-8"));
while((readLine=responseReader.readLine())!=null){
sb.append(readLine).append("\n");
}
responseReader.close();
return sb.toString();
}else{
throw new DesignException(con.getResponseMessage());
}
} catch (Exception e) {
throw new DesignException(e.getMessage());
}
}
}
| [
"783868970@qq.com"
] | 783868970@qq.com |
2e42d5839197214d773db650d9a076b44d249612 | 2527b80ae19f0ef78609122d240369ffa7713f16 | /Java I/Demos/Clase00/AppDemo01/src/appdemo01/Test02.java | a2189008ee42c0b03540d576e5714ce2436c9c6a | [] | no_license | gcoronelc/SISTUNI_PROG_JAVA_007 | 2fc359d2ad5b9600a3c28539846bef8ea89a6b7b | d13ca1ee33ca55d04ceb60540bcf41a4bd3c3aa3 | refs/heads/master | 2021-01-21T14:23:10.611755 | 2016-07-02T18:56:46 | 2016-07-02T18:56:46 | 57,597,174 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 325 | java | package appdemo01;
public class Test02 {
public static void main(String[] args) {
// declarar variables
double x = 6.789;
double y = 4.90;
//procesar
double su = x + y;
//imprimir resultado
System.out.println("La suma de " + x + " + " + y + " = " + su);
}
}
| [
"gcoronelc@gmail.com"
] | gcoronelc@gmail.com |
c28a2eaec2c8a645ddd764caeb76438936a40d4c | 04511c8cf98e18566bb197ee283e081566560d3c | /views/src/main/java/sac/model/GrupoSACDAO.java | d4ffd95fb64c5ff2775e162cc675f23c077c6a42 | [] | no_license | Software-tic/Workspace | 24d9f628f3d3887aecb6e8c4a4a39b277fbc6a23 | 048e5da9bb53f5296c4ae0388b26eb97a869e77b | refs/heads/master | 2016-09-06T19:18:39.028236 | 2015-07-15T21:22:38 | 2015-07-15T21:22:38 | 38,071,445 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,338 | java | package sac.model;
import java.util.List;
import javax.persistence.Entity;
import org.hibernate.LockOptions;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import connection.BaseHibernateDAOSAC;
/**
* A data access object (DAO) providing persistence and search support for Grupo
* entities. Transaction control of the save(), update() and delete() operations
* can directly support Spring container-managed transactions or they can be
* augmented to handle user-managed Spring transactions. Each of these methods
* provides additional information for how to configure it for the desired type
* of transaction control.
*
* @see sac.model.GrupoSAC
* @author MyEclipse Persistence Tools
*/
@Entity public class GrupoSACDAO extends BaseHibernateDAOSAC {
private static final Logger log = LoggerFactory.getLogger(GrupoSACDAO.class);
// property constants
public static final String AULA = "aula";
public static final String NOMBRE_GRUPO = "nombreGrupo";
public List findByExample(GrupoSAC instance) {
log.debug("finding GrupoSAC instance by example");
try {
List results = getSession().createCriteria("sac.model.GrupoSAC")
.add(Example.create(instance)).list();
log.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GrupoSAC instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from GrupoSAC as model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
public List findByAula(Object aula) {
return findByProperty(AULA, aula);
}
public List findByNombreGrupo(Object nombreGrupo) {
return findByProperty(NOMBRE_GRUPO, nombreGrupo);
}
public List findAll() {
log.debug("finding all GrupoSAC instances");
try {
String queryString = "from GrupoSAC";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public GrupoSAC merge(GrupoSAC detachedInstance) {
log.debug("merging GrupoSAC instance");
try {
GrupoSAC result = (GrupoSAC) getSession().merge(detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(GrupoSAC instance) {
log.debug("attaching dirty GrupoSAC instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GrupoSAC instance) {
log.debug("attaching clean GrupoSAC instance");
try {
getSession().buildLockRequest(LockOptions.NONE).lock(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
} | [
"software.tic@ustatunja.edu.co"
] | software.tic@ustatunja.edu.co |
9b0508303d5fcb2754f4ef6c4a2b13722c4743f4 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/7/7_f067039fde163107724a572a6376226b056ae60c/CheckThread/7_f067039fde163107724a572a6376226b056ae60c_CheckThread_s.java | 3b0e1cf5827fcb9316a42b552c67146042334c33 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 4,551 | java | package de.minestar.diehard.threads;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.bukkit.Bukkit;
import org.bukkit.scheduler.BukkitScheduler;
import de.minestar.diehard.core.DieHardCore;
import de.minestar.diehard.core.DateTimeHelper;
import de.minestar.diehard.core.Settings;
import de.minestar.minestarlibrary.utils.ConsoleUtils;
public class CheckThread implements Runnable {
private static long nextRestartTime;
private List<Long> warningTimes;
private int warningTimesIndex;
public CheckThread(List<Long> restartTimes, List<Long> warningTimes) {
CheckThread.nextRestartTime = getNextRestartTime(restartTimes);
this.warningTimes = warningTimes;
warningTimesIndex = 0;
}
public CheckThread(int minutesUntilRestart, List<Long> warningTimes) {
CheckThread.setNextRestart(minutesUntilRestart);
this.warningTimes = warningTimes;
warningTimesIndex = 0;
}
private long getNextRestartTime(List<Long> restartTimes) {
// read current time but remove everything
// but hours and minutes for compare
long nowOnlyTime = DateTimeHelper.getOnlyTime(new Date());
long possibleRestartTime = restartTimes.get(0);
// search restart times after current time or stick to the first in list
for (long date : restartTimes) {
if (date > nowOnlyTime) {
possibleRestartTime = date;
break;
}
}
ConsoleUtils.printInfo(DieHardCore.NAME, "Naechste Restart Zeit: " + DateTimeHelper.convertMillisToTime(possibleRestartTime));
return possibleRestartTime;
}
private long getNextWarningTime(List<Long> warnTimes, long minutesLeft) {
long nextWarnTime;
// find best fitting warning until restart from sorted list
if (warningTimesIndex < warnTimes.size()) {
nextWarnTime = TimeUnit.MILLISECONDS.toMinutes(warnTimes.get(warningTimesIndex));
if (nextWarnTime > minutesLeft) {
warningTimesIndex++;
return getNextWarningTime(warnTimes, minutesLeft);
}
} else {
nextWarnTime = 0;
}
return nextWarnTime;
}
private static void setNextRestart(int minutesUntilRestart) {
long nowOnlyTime = DateTimeHelper.getOnlyTime(new Date());
System.out.println(String.format("restart: %d", CheckThread.nextRestartTime));
System.out.println(String.format("24h: %d", TimeUnit.HOURS.toMillis(24)));
if (CheckThread.nextRestartTime >= TimeUnit.HOURS.toMillis(24)) {
CheckThread.nextRestartTime -= TimeUnit.HOURS.toMillis(24);
}
CheckThread.nextRestartTime = nowOnlyTime + TimeUnit.MINUTES.toMillis(minutesUntilRestart);
ConsoleUtils.printInfo(DieHardCore.NAME, "Restart Zeit geaendert auf: " + DateTimeHelper.convertMillisToTime(CheckThread.nextRestartTime));
}
@Override
public void run() {
int lastWarning;
long nextWarnTime;
// current time as milliseconds since epoch for compare
long nowOnlyTime = DateTimeHelper.getOnlyTime(new Date());
long diff = TimeUnit.MILLISECONDS.toMinutes(DateTimeHelper.getTimeDifference(nowOnlyTime, nextRestartTime));
nextWarnTime = getNextWarningTime(warningTimes, diff);
if (diff > 0) {
if (diff == nextWarnTime) {
// remaining time until restart equals next warning time
// --> broadcast message to players
MessageThread msg = new MessageThread(nextWarnTime);
BukkitScheduler sched = Bukkit.getScheduler();
sched.scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin(DieHardCore.NAME), msg, 1);
// take care to have next warning time at top of the list
warningTimes.remove(0);
}
} else {
// initiate server restart
lastWarning = Settings.getLastWarning();
StopThread stp = new StopThread();
BukkitScheduler sched = Bukkit.getScheduler();
sched.scheduleSyncRepeatingTask(Bukkit.getPluginManager().getPlugin(DieHardCore.NAME), stp, 1, DieHardCore.secondsToTicks(lastWarning));
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
fbb74e6334f2e2992caf021217b20c0ab13a4bc5 | 204ed7097c2eca124ba44a4b8ec32825bc61dcd0 | /nms-core-server/src/java/com/yuep/nms/core/server/synccore/module/SyncCoreServerModule.java | 56cc728c5c0105725976e94c524bce27f00283c4 | [] | no_license | frankggyy/YUEP | 8ee9a7d547f8fa471fda88a42c9e3a31ad3f94d2 | 827115c99b84b9cbfbc501802b18c06c62c1c507 | refs/heads/master | 2016-09-16T13:49:11.258476 | 2011-08-31T13:30:34 | 2011-08-31T13:30:34 | 2,299,133 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 4,115 | java | /*
* $Id: SyncModule.java, 2011-5-17 下午05:50:38 yangtao Exp $
*
* Copyright (c) 2008 Wuhan Yangtze Optical Technology Co., Ltd
* All rights reserved.
*
* This software is copyrighted and owned by YOTC or the copyright holder
* specified, unless otherwise noted, and may not be reproduced or distributed
* in whole or in part in any form or medium without express written permission.
*/
package com.yuep.nms.core.server.synccore.module;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import com.yuep.base.log.def.Logger;
import com.yuep.core.bootstrap.def.module.DefaultModule;
import com.yuep.core.container.def.CoreContext;
import com.yuep.nms.core.common.mocore.module.constants.MoCoreModuleConstants;
import com.yuep.nms.core.common.mocore.service.MoCore;
import com.yuep.nms.core.common.mocore.service.MoStaticInfoManager;
import com.yuep.nms.core.server.synccore.configuration.SyncConfigLoaderImpl;
import com.yuep.nms.core.server.synccore.execute.SyncExecutorImpl;
import com.yuep.nms.core.server.synccore.module.constants.SyncCoreServerModuleContants;
import com.yuep.nms.core.server.synccore.service.SyncCore;
import com.yuep.nms.core.server.synccore.service.SyncCoreImpl;
import com.yuep.nms.core.server.synccore.service.SyncMessageListener;
/**
* <p>
* Title: SyncModule
* </p>
* <p>
* Description:
* 同步模块定义
* </p>
*
* @author yangtao
* created 2011-5-17 下午05:50:38
* modified [who date description]
* check [who date description]
*/
public class SyncCoreServerModule extends DefaultModule {
private Logger logger;
private SyncConfigLoaderImpl syncConfigLoader;
public SyncCoreServerModule(){
super();
}
/**
* (non-Javadoc)
* @see com.yuep.core.bootstrap.def.module.Module4Container#start()
*/
@Override
public void start() {
logger=this.getLogger();
buildSyncConfig(getModuleParams());
buildSyncCore();
}
/**
* (non-Javadoc)
* @see com.yuep.core.bootstrap.def.module.Module4Container#stop()
*/
@Override
public void stop() {
}
private void buildSyncConfig(Map<String,String> moduleParams){
String syncConfigParam=moduleParams.get("configLocations");
if(StringUtils.isEmpty(syncConfigParam))
return;
String[] syncConfigFiles=syncConfigParam.split(",");
List<String> fullPathFiles=new ArrayList<String>();
for(String syncConfigFile:syncConfigFiles){
String temp=this.getModulePath()+syncConfigFile;
fullPathFiles.add(temp);
}
syncConfigLoader=new SyncConfigLoaderImpl(fullPathFiles.toArray(new String[0]));
MoStaticInfoManager moStaticInfoManager=CoreContext.getInstance().local().getService(MoCoreModuleConstants.MOSTATICINFOMANAGER_SERVICE, MoStaticInfoManager.class);
syncConfigLoader.setMoStaticInfoManager(moStaticInfoManager);
syncConfigLoader.init();
}
private void buildSyncCore(){
SyncCoreImpl syncCore=new SyncCoreImpl();
MoCore moCore=CoreContext.getInstance().local().getService(MoCoreModuleConstants.MOCORE_LOCAL_SERVICE, MoCore.class);
syncCore.setMoCore(moCore);
syncCore.setSyncConfigLoader(syncConfigLoader);
SyncExecutorImpl syncExecutor=new SyncExecutorImpl(5,10);
syncExecutor.setMoCore(moCore);
syncExecutor.setLogger(logger);
syncCore.setSyncExecutor(syncExecutor);
syncExecutor.start();
SyncMessageListener syncMessageListener=new SyncMessageListener();
syncMessageListener.setCoreContext(CoreContext.getInstance());
syncCore.addSyncListener(syncMessageListener);
CoreContext.getInstance().setLocalService(SyncCoreServerModuleContants.SYNCCORE_LOCAL_SERVICE, SyncCore.class, syncCore);
}
}
| [
"wanghu-520@163.com"
] | wanghu-520@163.com |
e074c8e9a0c88a5d9b4066830522e9d3c502859a | 79e0d9b45b7daefbcbc2a06cbbd595a29aae022c | /main/src/java/main/self/micromagic/eterna/model/ModelExport.java | 005801cc1250e31230d9e51a20e5a86c97841842 | [
"Apache-2.0"
] | permissive | biankudingcha/eterna | fd3863273008b370072129ed4a1ca8fb390cb503 | ab32d1b804dc5698a0f85bcf457d0c05b72e852c | refs/heads/master | 2023-03-18T15:46:29.987896 | 2020-04-29T01:41:53 | 2020-04-29T01:41:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,224 | java | /*
* Copyright 2015 xinjunli (micromagic@sina.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package self.micromagic.eterna.model;
import self.micromagic.eterna.share.EternaFactory;
import self.micromagic.eterna.share.EternaObject;
public class ModelExport
implements EternaObject
{
public static final String DEFAULT_NAME = "[default]";
private final String name;
private String modelName;
private String viewName;
private String path;
private final boolean redirect;
private boolean nextModel;
private boolean errorExport = false;
public ModelExport(String name, boolean redirect, String modelName)
{
this.name = name;
this.modelName = modelName;
this.redirect = redirect;
this.nextModel = true;
}
public ModelExport(String name, String path, boolean redirect)
{
this.name = name;
this.path = path;
this.redirect = redirect;
}
public ModelExport(String name, String path, String viewName, boolean redirect)
{
this.name = name;
this.path = path;
this.viewName = viewName;
this.redirect = redirect;
}
public boolean equals(Object obj)
{
if (obj != null && obj instanceof ModelExport)
{
ModelExport other = (ModelExport) obj;
if (this.redirect != other.redirect)
{
return false;
}
if (this.nextModel != other.nextModel)
{
return false;
}
if (this.errorExport != other.errorExport)
{
return false;
}
if (this.modelName == null)
{
if (other.modelName != null)
{
return false;
}
}
else if (!this.modelName.equals(other.modelName))
{
return false;
}
if (this.viewName == null)
{
if (other.viewName != null)
{
return false;
}
}
else if (!this.viewName.equals(other.viewName))
{
return false;
}
if (this.path == null)
{
if (other.path != null)
{
return false;
}
}
else if (!this.path.equals(other.path))
{
return false;
}
return true;
}
return false;
}
public String getName()
{
return this.name;
}
public boolean isErrorExport()
{
return this.errorExport;
}
public void setErrorExport(boolean errorExport)
{
this.errorExport = errorExport;
}
public String getViewName()
{
return this.viewName;
}
public String getModelName()
{
return this.modelName;
}
public String getPath()
{
return this.path;
}
public boolean isRedirect()
{
return this.redirect;
}
public boolean isNextModel()
{
return nextModel;
}
public boolean initialize(EternaFactory factory)
{
return false;
}
} | [
"micromagic@sina.com"
] | micromagic@sina.com |
7068630878232a1be87e4813aacaf03563cd73fa | 1676b6e02d3795523db3f9307e94d6d7a2f00ecd | /aliyun-java-sdk-lrg/src/main/java/com/aliyuncs/lrg/model/v20191010/GetRunningMachineListResponse.java | 66430019d303a44efb46a3e6c78ba23b70d2e79d | [
"Apache-2.0"
] | permissive | ZyKing/aliyun-openapi-java-sdk | 8bf559bd6ad81bdc855de6f339e033d826a6f97e | 751f7da685e44ebaf19d4ae5e2d884d5f3ff8b16 | refs/heads/master | 2022-09-05T22:07:50.512906 | 2020-06-03T02:13:49 | 2020-06-03T02:13:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,863 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.lrg.model.v20191010;
import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.lrg.transform.v20191010.GetRunningMachineListResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class GetRunningMachineListResponse extends AcsResponse {
private String requestId;
private String status;
private String details;
private String reason;
private String errorCode;
private List<DataItem> data;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDetails() {
return this.details;
}
public void setDetails(String details) {
this.details = details;
}
public String getReason() {
return this.reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public String getErrorCode() {
return this.errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public List<DataItem> getData() {
return this.data;
}
public void setData(List<DataItem> data) {
this.data = data;
}
public static class DataItem {
private String ip;
private String hostName;
private String status;
private String statusEnumeration;
private String type;
private List<MessagesItem> messages;
public String getIp() {
return this.ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getHostName() {
return this.hostName;
}
public void setHostName(String hostName) {
this.hostName = hostName;
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatusEnumeration() {
return this.statusEnumeration;
}
public void setStatusEnumeration(String statusEnumeration) {
this.statusEnumeration = statusEnumeration;
}
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
public List<MessagesItem> getMessages() {
return this.messages;
}
public void setMessages(List<MessagesItem> messages) {
this.messages = messages;
}
public static class MessagesItem {
private String module;
private String message;
private String owner;
public String getModule() {
return this.module;
}
public void setModule(String module) {
this.module = module;
}
public String getMessage() {
return this.message;
}
public void setMessage(String message) {
this.message = message;
}
public String getOwner() {
return this.owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
}
}
@Override
public GetRunningMachineListResponse getInstance(UnmarshallerContext context) {
return GetRunningMachineListResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
d08054ffe72cd8344bbefead2ab78781a2042742 | 4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849 | /aliyun-java-sdk-emr/src/main/java/com/aliyuncs/emr/Endpoint.java | 6131ceb944d2a5b100c2fe2badaddce91f19b09c | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-java-sdk | a263fa08e261f12d45586d1b3ad8a6609bba0e91 | e19239808ad2298d32dda77db29a6d809e4f7add | refs/heads/master | 2023-09-03T12:28:09.765286 | 2023-09-01T09:03:00 | 2023-09-01T09:03:00 | 39,555,898 | 1,542 | 1,317 | NOASSERTION | 2023-09-14T07:27:05 | 2015-07-23T08:41:13 | Java | UTF-8 | Java | false | false | 1,311 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.emr;
import java.util.HashMap;
public class Endpoint {
public static HashMap<String, String> endpointMap = new HashMap<String, String>() {
{
put("cn-shenzhen", "emr.aliyuncs.com");
put("cn-beijing", "emr.aliyuncs.com");
put("cn-shanghai", "emr.aliyuncs.com");
put("cn-shanghai-finance-1", "emr.aliyuncs.com");
put("cn-hangzhou-finance", "emr.aliyuncs.com");
put("ap-southeast-1", "emr.aliyuncs.com");
put("cn-shenzhen-finance-1", "emr.aliyuncs.com");
put("us-west-1", "emr.aliyuncs.com");
put("cn-hangzhou", "emr.aliyuncs.com");
}
};
public static String endpointRegionalType = "regional";
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
97c3728c86abaa9167bbc5b35e6e8442fa2405a7 | d2c7893a967738a97583368dbf1e41caeb1d47c7 | /aTalk/src/main/java/org/atalk/android/plugin/audioservice/SoundMeter.java | ce7c47dcf30b585cd2e8c536536b5747c83ebe71 | [
"Apache-2.0"
] | permissive | cmeng-git/atalk-android | 0b5a7f48d04ba0173852d2f2ccbe786830669603 | a821544edc644fdb3f63402340051dc1e86c1c59 | refs/heads/master | 2023-07-08T08:58:44.604534 | 2023-07-07T14:24:52 | 2023-07-07T14:24:52 | 116,449,957 | 148 | 79 | Apache-2.0 | 2023-03-28T10:31:34 | 2018-01-06T03:27:17 | Java | UTF-8 | Java | false | false | 3,483 | java | /*
* aTalk, android VoIP and Instant Messaging client
* Copyright 2014 Eng Chong Meng
*
* 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.atalk.android.plugin.audioservice;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RectShape;
import android.util.AttributeSet;
import android.view.View;
/**
* This class draws a colorful graphical level indicator similar to an LED VU bar graph.
*
* This is a user defined View UI element that contains a ShapeDrawable, which means it can be
* placed using in the XML UI configuration and updated dynamically at runtime.
*
* To set the level, use setLevel(level). Level should be in the range [0.0 ; 1.0].
*
* To change the number of segments or colors, change the segmentColors array.
*
* @author Trausti Kristjansson
*/
public final class SoundMeter extends View
{
private double mLevel = 0.1;
final int[] segmentColors = {
0xff5555ff,
0xff5555ff,
0xff00ff00,
0xff00ff00,
0xff00ff00,
0xff00ff00,
0xff00ff00,
0xffffff00,
0xffffff00,
0xffffff00,
0xffffff00,
0xffff0000,
0xffff0000,
0xffff0000};
final int segmentOffColor = 0xff555555;
public SoundMeter(Context context, AttributeSet attrs)
{
super(context, attrs);
initBarLevelDrawable();
}
public SoundMeter(Context context)
{
super(context);
initBarLevelDrawable();
}
/**
* Set the bar level. The level should be in the range [0.0 ; 1.0], i.e. 0.0 gives no lit LEDs
* and 1.0 gives full scale.
*
* @param level the LED level in the range [0.0 ; 1.0].
*/
public void setLevel(double level)
{
mLevel = level;
invalidate();
}
public double getLevel()
{
return mLevel;
}
private void initBarLevelDrawable()
{
mLevel = 0.1;
}
private void drawBar(Canvas canvas)
{
int padding = 5; // Padding on both sides.
int x = 0;
int y = 10;
int width = (int) (Math.floor(getWidth() / segmentColors.length)) - (2 * padding);
int height = 50;
ShapeDrawable mDrawable = new ShapeDrawable(new RectShape());
for (int i = 0; i < segmentColors.length; i++) {
x = x + padding;
if ((mLevel * segmentColors.length) > (i + 0.5)) {
mDrawable.getPaint().setColor(segmentColors[i]);
}
else {
mDrawable.getPaint().setColor(segmentOffColor);
}
mDrawable.setBounds(x, y, x + width, y + height);
mDrawable.draw(canvas);
x = x + width + padding;
}
}
@Override
protected void onDraw(Canvas canvas)
{
drawBar(canvas);
}
}
| [
"cmeng.gm@gmail.com"
] | cmeng.gm@gmail.com |
3c9b9c205ad0e674fbc8fa4361525d1ffc905401 | 872e794d6a023a19788120ddb8714918c3bd6ec5 | /src/main/java/covers1624/jarrm/registry/CustomSickleRegistry.java | c8725ef1b0fc5f1fc01510d2bd51a5ed60228e90 | [] | no_license | covers1624/JARRM | 8b79ac5dde2f4920ccaa9e0f155930fb13926255 | f62e1feb5ca8b0ea34a81622ebd0c7a468e22907 | refs/heads/master | 2021-01-21T14:08:24.456456 | 2016-05-11T10:25:12 | 2016-05-11T10:25:12 | 51,156,479 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,841 | java | package covers1624.jarrm.registry;
import covers1624.jarrm.api.item.sickle.ICustomSickleRegistry;
import covers1624.jarrm.api.item.sickle.ISickleCropHandler;
import covers1624.lib.util.LogHelper;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.Loader;
import java.util.ArrayList;
/**
* Created by covers1624 on 3/30/2016.
*/
public class CustomSickleRegistry implements ICustomSickleRegistry {
public static final CustomSickleRegistry INSTANCE = new CustomSickleRegistry();
//TODO HashMap this, Key Block, Value handler.
private ArrayList<ISickleCropHandler> handlers = new ArrayList<ISickleCropHandler>();
private ArrayList<ItemStack> blackListedBlocks = new ArrayList<ItemStack>();
@Override
public void registerSickleCropHandler(ISickleCropHandler handler) {
if (handlers.contains(handler)) {
LogHelper.warn("Mod %s is registering a SickleCropHandler that already exists. Class Name [%s]", Loader.instance().activeModContainer().getModId(), handler.getClass().getName());
return;
}
LogHelper.info("Registering sickle handler for mod %s.", Loader.instance().activeModContainer().getModId());
handlers.add(handler);
}
@Override
public void registerBlacklistBlock(Block block) {
blackListedBlocks.add(new ItemStack(block));
}
@Override
public void registerBlacklistBlock(Block block, int meta) {
blackListedBlocks.add(new ItemStack(block, 1, meta));
}
public ISickleCropHandler getHandlerForState(IBlockState state) {
for (ISickleCropHandler handler : handlers) {
if (handler.canHandle(state)) {
return handler;
}
}
//If one doesn't exist return a blank one.
return new ISickleCropHandler() {
@Override
public boolean canHandle(IBlockState state) {
LogHelper.info("HERP");
return false;
}
@Override
public boolean shouldBeBroken(IBlockState state) {
LogHelper.info("DERP");
return false;
}
};
}
public boolean isBlockBlackListed(IBlockState state) {
ItemStack stack = new ItemStack(state.getBlock(), 1, state.getBlock().getMetaFromState(state));
return isBlockBlacklisted(stack);
}
public boolean isBlockBlackListed(Block block) {
return isBlockBlacklisted(new ItemStack(block));
}
public boolean isBlockBlacklisted(ItemStack stack) {
for (ItemStack blacklisted : blackListedBlocks) {
if (stack.isItemEqual(blacklisted)) {
return true;
}
}
return false;
}
}
| [
"laughlan.cov@internode.on.net"
] | laughlan.cov@internode.on.net |
a0b241ddf553381d0ab6a95d5a2407d8c6231f9a | a8c5b7b04eace88b19b5a41a45f1fb030df393e3 | /examples/examples-simulated/src/main/java/com/mcleodmoores/examples/simulated/component/ExampleSimulatedComponentServer.java | 8f20271ca0c2585761f89160b429933161fc4d06 | [
"Apache-2.0"
] | permissive | McLeodMoores/starling | 3f6cfe89cacfd4332bad4861f6c5d4648046519c | 7ae0689e06704f78fd9497f8ddb57ee82974a9c8 | refs/heads/master | 2022-12-04T14:02:00.480211 | 2020-04-28T17:22:44 | 2020-04-28T17:22:44 | 46,577,620 | 4 | 4 | Apache-2.0 | 2022-11-24T07:26:39 | 2015-11-20T17:48:10 | Java | UTF-8 | Java | false | false | 955 | java | /**
* Copyright (C) 2017 - present McLeod Moores Software Limited. All rights reserved.
*/
package com.mcleodmoores.examples.simulated.component;
import com.opengamma.component.OpenGammaComponentServer;
import com.opengamma.util.ShutdownUtils;
/**
*
*/
public class ExampleSimulatedComponentServer extends OpenGammaComponentServer {
public static void main(final String[] clArgs) {
String[] args;
if (clArgs.length == 0) {
args = new String[] { "-v", "classpath:/fullstack/fullstack-mmexamples-dev.properties" };
} else {
args = clArgs;
}
OpenGammaComponentServer.setStartingMessage("======== STARTING STARLING ========");
OpenGammaComponentServer.setStartupCompleteMessage("======== STARLING STARTED in ");
OpenGammaComponentServer.setStartupFailedMessage("======== STARLING STARTUP FAILED ========");
if (!new ExampleSimulatedComponentServer().run(args)) {
ShutdownUtils.exit(-1);
}
}
}
| [
"em.mcleod@gmail.com"
] | em.mcleod@gmail.com |
2d6c3ab55062232516cbbe0690a6cb1693dbdb84 | 166b8320b94dcf5932062b8ac4f90dc353767d39 | /cdi/extension/src/main/java/org/infinispan/cdi/util/AbstractImmutableBean.java | de7b3d24cc33a22a28ef8d3ef3f2823eec65b838 | [
"Apache-2.0"
] | permissive | Cotton-Ben/infinispan | 87e0caeeba2616dd7eb5a96b896b462ed9de5d67 | 2ba2d9992cd0018829d9ba0b0d4ba74bab49616b | refs/heads/master | 2020-12-31T02:22:26.654774 | 2014-07-11T16:48:15 | 2014-07-11T16:48:15 | 16,557,570 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,572 | java | package org.infinispan.cdi.util;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import javax.enterprise.context.Dependent;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.Default;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.InjectionPoint;
import org.infinispan.cdi.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
/**
* <p>
* A base class for implementing {@link Bean}. The attributes are immutable, and
* collections are defensively copied on instantiation. It uses the defaults
* from the specification for properties if not specified.
* </p>
* <p/>
* <p>
* This class does not provide any bean lifecycle operations
* </p>
*
* @author Pete Muir
* @see ImmutableBean
* @see ImmutableNarrowingBean
*/
public abstract class AbstractImmutableBean<T> implements Bean<T> {
private static final Log log = LogFactory.getLog(AbstractImmutableBean.class, Log.class);
private final Class<?> beanClass;
private final String name;
private final Set<Annotation> qualifiers;
private final Class<? extends Annotation> scope;
private final Set<Class<? extends Annotation>> stereotypes;
private final Set<Type> types;
private final boolean alternative;
private final boolean nullable;
private final Set<InjectionPoint> injectionPoints;
private final String toString;
/**
* Create a new, immutable bean. All arguments passed as collections are
* defensively copied.
*
* @param beanClass The Bean class, may not be null
* @param name The bean name
* @param qualifiers The bean's qualifiers, if null, a singleton set of
* {@link Default} is used
* @param scope The bean's scope, if null, the default scope of
* {@link Dependent} is used
* @param stereotypes The bean's stereotypes, if null, an empty set is used
* @param types The bean's types, if null, the beanClass and {@link Object}
* will be used
* @param alternative True if the bean is an alternative
* @param nullable True if the bean is nullable
* @param injectionPoints the bean's injection points, if null an empty set
* is used
* @param beanLifecycle Handler for {@link #create(CreationalContext)} and
* {@link #destroy(Object, CreationalContext)}
* @throws IllegalArgumentException if the beanClass is null
*/
public AbstractImmutableBean(Class<?> beanClass, String name, Set<Annotation> qualifiers, Class<? extends Annotation> scope, Set<Class<? extends Annotation>> stereotypes, Set<Type> types, boolean alternative, boolean nullable, Set<InjectionPoint> injectionPoints, String toString) {
if (beanClass == null) {
throw new IllegalArgumentException("beanClass cannot be null");
}
this.beanClass = beanClass;
this.name = name;
if (qualifiers == null) {
this.qualifiers = Collections.<Annotation>singleton(DefaultLiteral.INSTANCE);
log.trace("No qualifers provided for bean class " + beanClass + ", using singleton set of @Default");
} else {
this.qualifiers = new HashSet<Annotation>(qualifiers);
}
if (scope == null) {
this.scope = Dependent.class;
log.trace("No scope provided for bean class " + beanClass + ", using @Dependent");
} else {
this.scope = scope;
}
if (stereotypes == null) {
this.stereotypes = Collections.emptySet();
} else {
this.stereotypes = new HashSet<Class<? extends Annotation>>(stereotypes);
}
if (types == null) {
this.types = Arrays2.<Type>asSet(Object.class, beanClass);
log.trace("No types provided for bean class " + beanClass + ", using [java.lang.Object.class, " + beanClass.getName() + ".class]");
} else {
this.types = new HashSet<Type>(types);
}
if (injectionPoints == null) {
this.injectionPoints = Collections.emptySet();
} else {
this.injectionPoints = new HashSet<InjectionPoint>(injectionPoints);
}
this.alternative = alternative;
this.nullable = nullable;
if (toString != null) {
this.toString = toString;
} else {
this.toString = "Custom Bean with bean class " + beanClass + " and qualifiers " + qualifiers;
}
}
public Class<?> getBeanClass() {
return beanClass;
}
public Set<InjectionPoint> getInjectionPoints() {
return injectionPoints;
}
public String getName() {
return name;
}
public Set<Annotation> getQualifiers() {
return Collections.unmodifiableSet(qualifiers);
}
public Class<? extends Annotation> getScope() {
return scope;
}
public Set<Class<? extends Annotation>> getStereotypes() {
return Collections.unmodifiableSet(stereotypes);
}
public Set<Type> getTypes() {
return Collections.unmodifiableSet(types);
}
public boolean isAlternative() {
return alternative;
}
public boolean isNullable() {
return nullable;
}
@Override
public String toString() {
return toString;
}
}
| [
"galder@zamarreno.com"
] | galder@zamarreno.com |
2c9254907873c34ddd6d112414202dd741322a11 | d9cb35fdfb9558516818cc5f32349259002ed95d | /src/main/java/com/fit/se/webbanhang/service/UserServiceIlmp.java | b541b015fe2d686be01699f8824aafe10da23566 | [] | no_license | PyraKi/BTLMWWW | ad417694c5bc499c71d9fd3b809e512a5df62b80 | 1bbb333a515c7804c60728ee101992f2af395ef8 | refs/heads/master | 2023-04-19T22:45:53.379802 | 2021-05-10T13:42:04 | 2021-05-10T13:42:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 926 | java | package com.fit.se.webbanhang.service;
import java.util.List;
import com.fit.se.webbanhang.entity.User;
import com.fit.se.webbanhang.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserServiceIlmp implements UserService{
private final UserRepository userRepository;
@Autowired
public UserServiceIlmp(UserRepository userRepository){
this.userRepository = userRepository;
}
@Override
public List<User> getUsers() {
return this.userRepository.findAll();
}
@Override
public User getUser(int id) {
return this.userRepository.findById(id).get();
}
@Override
public void addUser(User user) {
this.userRepository.save(user);
}
@Override
public void removeUser(int id) {
this.userRepository.deleteById(id);
}
}
| [
"daiviet1023@gmail.com"
] | daiviet1023@gmail.com |
ddd4ec5fdb346130946bf0446e3e1976bcd53e45 | 028cbe18b4e5c347f664c592cbc7f56729b74060 | /v2/appserv-core/src/java/com/sun/enterprise/diagnostics/DiagnosticAgent.java | aeea933ab81c539543e53a8519cb779cc12c0d1f | [] | no_license | dmatej/Glassfish-SVN-Patched | 8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e | 269e29ba90db6d9c38271f7acd2affcacf2416f1 | refs/heads/master | 2021-05-28T12:55:06.267463 | 2014-11-11T04:21:44 | 2014-11-11T04:21:44 | 23,610,469 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,404 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can obtain
* a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
* or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
* Sun designates this particular file as subject to the "Classpath" exception
* as provided by Sun in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the License
* Header, with the fields enclosed by brackets [] replaced by your own
* identifying information: "Portions Copyrighted [year]
* [name of copyright owner]"
*
* Contributor(s):
*
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package com.sun.enterprise.diagnostics;
import java.util.zip.ZipFile;
import java.util.List;
import java.util.Map;
/**
*
* @author Manisha Umbarje
*/
public interface DiagnosticAgent {
/**
* Generates Diagnostic Report
* @param clioptions cli options specified by the user
* @return zip containing diagnostic report
* @throw DiagnosticException
*/
public String generateReport(Map clioptions) throws DiagnosticException ;
/**
* Generates Diagnostic Report
* @param clioptions cli options specified by the user
* @instances list of instance names for which report generation is invoked
* @targetType type of the target for which report is being generated
* @return zip containing diagnostic report
* @throw DiagnosticException
*/
public String generateReport(Map clioptions, List<String> instances,
String targetType) throws DiagnosticException ;
/**
* @param repositoryDir absolute path of central repository
* @return list of attributes being masked with ****
* @throw DiagnosticException
*/
public List<String> getConfidentialProperties(String repositoryDir)
throws DiagnosticException;
/**
* Deletes report specified by the file
* @param file File to be deleted.
* @throws DiagnosticException
*/
public void deleteReport(String file) throws DiagnosticException;
}
| [
"kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] | kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5 |
e7426346ba42a59eb4021e4da557e5b02b266a8b | fde12555b15598267c8042deea260e841f4b93a0 | /06 - Spring Data/05 - Intro to Spring Framework/restmvc-demo/src/main/java/course/springdata/restmvcdemo/RestmvcDemoApplication.java | d25a4cd7a03f73d14b627a66d79f4df9541cf08c | [] | no_license | elenaborisova/SoftUni-Java-Web-Developer-Path | de4cc3c0bb85784815246f23c186aff3f56cc4e8 | 49b435de458df4d89fcb88742ce96461c325270e | refs/heads/master | 2023-07-14T21:10:46.689598 | 2021-09-03T13:06:28 | 2021-09-03T13:06:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 337 | java | package course.springdata.restmvcdemo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class RestmvcDemoApplication {
public static void main(String[] args) {
SpringApplication.run(
RestmvcDemoApplication.class, args);
}
}
| [
"p.bozidarova@gmail.com"
] | p.bozidarova@gmail.com |
f6b88df1e8c5e04f74059da6ec66dc4ea5f04e4f | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module0802_public/src/java/module0802_public/a/Foo2.java | 0401d84a767856bb500fe24816e0573fab4c3b38 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 1,593 | java | package module0802_public.a;
import javax.net.ssl.*;
import javax.rmi.ssl.*;
import java.awt.datatransfer.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.management.Attribute
* @see javax.naming.directory.DirContext
* @see javax.net.ssl.ExtendedSSLSession
*/
@SuppressWarnings("all")
public abstract class Foo2<M> extends module0802_public.a.Foo0<M> implements module0802_public.a.IFoo2<M> {
javax.rmi.ssl.SslRMIClientSocketFactory f0 = null;
java.awt.datatransfer.DataFlavor f1 = null;
java.beans.beancontext.BeanContext f2 = null;
public M element;
public static Foo2 instance;
public static Foo2 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module0802_public.a.Foo0.create(input);
}
public String getName() {
return module0802_public.a.Foo0.getInstance().getName();
}
public void setName(String string) {
module0802_public.a.Foo0.getInstance().setName(getName());
return;
}
public M get() {
return (M)module0802_public.a.Foo0.getInstance().get();
}
public void set(Object element) {
this.element = (M)element;
module0802_public.a.Foo0.getInstance().set(this.element);
}
public M call() throws Exception {
return (M)module0802_public.a.Foo0.getInstance().call();
}
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
7c3f7f4e3c19532140aa5315938a793dca8fc231 | ed50adc8c39b5597e370d391b43c0485014a82dd | /Chapter02/ProgrammingExercises/Ex02-06/InchesToFeet.java | 2227f24ea3f92c71e9455b1e3daa5f3169e51f69 | [] | no_license | JacobNegri/cp2406_farrell8_prac_solutions-master | 3b2ed3bf3723341eef27b2380ac5a0be9a9a9a60 | a68a2e07a3dca1d146f861f157b2fc5a746f93f9 | refs/heads/master | 2021-01-16T23:05:02.866189 | 2016-08-14T09:07:45 | 2016-08-14T09:07:45 | 65,658,434 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 379 | java | // InchesToFeet.java
class InchesToFeet
{
public static void main(String[] args)
{
final int INCHES_IN_FOOT = 12;
int inches = 86;
int feet;
int inchesLeft;
feet = inches / INCHES_IN_FOOT;
inchesLeft = inches % INCHES_IN_FOOT;
System.out.println(inches + " inches is " +
feet + " feet and " + inchesLeft + " inches");
}
} | [
"jc319816@ad.jcu.edu.au"
] | jc319816@ad.jcu.edu.au |
c2eb72974b6187305c5456b59e2c078ba8341bab | 145993c6190554c00c014e47338c891199a3e467 | /asProject/Checkup/app/src/main/java/com/hospital/checkup/bluetooth/ReceiverRequestQueue.java | 91a4d891f3efacb0407abb944588fd50bfaf84ef | [] | no_license | cuipengpeng/codeUtil | d45d4f239de40fe2806011b5b7fd6238b23e940c | ae0bdbcf6237fa3cfb6fac724e487627ee06d1c3 | refs/heads/master | 2023-02-25T14:57:56.259687 | 2023-01-04T13:09:19 | 2023-02-10T16:14:10 | 126,859,505 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,013 | java | package com.hospital.checkup.bluetooth;
import android.util.Log;
import java.util.HashMap;
/**
* 描述:接收通知数据请求队列
*/
public class ReceiverRequestQueue implements IRequestQueue<OnReceiverCallback> {
private static final String TAG = "ReceiverRequestQueue";
HashMap<String, OnReceiverCallback> map = new HashMap<>();
@Override
public void set(String key, OnReceiverCallback onReceiver) {
map.put(key, onReceiver);
}
@Override
public OnReceiverCallback get(String key) {
return map.get(key);
}
public HashMap<String, OnReceiverCallback> getMap() {
return map;
}
/**
* 移除一个元素
*
* @param key
*/
public boolean removeRequest(String key) {
Log.d(TAG, "ReceiverRequestQueue before:" + map.size());
OnReceiverCallback onReceiverCallback = map.remove(key);
Log.d(TAG, "ReceiverRequestQueue after:" + map.size());
return null == onReceiverCallback;
}
}
| [
"abcd123@123.com"
] | abcd123@123.com |
2c5ac6f7b33c780280b9dc62cd12850c61062324 | 810873bc64fd3daa082e8636a1b182e46a023638 | /experimental/drools-testing-plugin/src/org/drools/testing/plugin/utils/ProjectClassLoader.java | 11f6147797db52c87d7f70d568c39d220a7f4b28 | [
"Apache-2.0"
] | permissive | pymma/drools47jdk8 | 7456d4cd54c20ba87ab7ae4e3ce38be7a7f9a11a | b532d45ac47806bef8c3a6cf1ac671c73ed4ea09 | refs/heads/master | 2022-07-29T17:25:35.788215 | 2021-11-23T09:39:10 | 2021-11-23T09:39:10 | 426,141,147 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,935 | java | package org.drools.testing.plugin.utils;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
public class ProjectClassLoader {
public static URLClassLoader getProjectClassLoader(IEditorPart editor) {
IEditorInput input = editor.getEditorInput();
if (input instanceof IFileEditorInput) {
IProject project = ((IFileEditorInput) input).getFile().getProject();
IJavaProject javaProject = JavaCore.create(project);
return getProjectClassLoader(javaProject);
}
return null;
}
public static URLClassLoader getProjectClassLoader(IJavaProject project) {
List pathElements = getProjectClassPathURLs(project);
URL urlPaths[] = (URL[]) pathElements.toArray(new URL[pathElements.size()]);
return new URLClassLoader(urlPaths, Thread.currentThread().getContextClassLoader());
}
private static URL getRawLocationURL(IPath simplePath)
throws MalformedURLException {
File file = getRawLocationFile(simplePath);
return file.toURL();
}
private static File getRawLocationFile(IPath simplePath) {
IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(simplePath);
File file = null;
if (resource != null) {
file = ResourcesPlugin.getWorkspace().getRoot().findMember(
simplePath).getRawLocation().toFile();
} else {
file = simplePath.toFile();
}
return file;
}
public static List getProjectClassPathURLs(IJavaProject project) {
List pathElements = new ArrayList();
try {
IClasspathEntry[] paths = project.getResolvedClasspath(true);
if (paths != null) {
for ( int i = 0; i < paths.length; i++ ) {
IClasspathEntry path = paths[i];
if (path.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
URL url = getRawLocationURL(path.getPath());
pathElements.add(url);
}
}
}
IPath location = getProjectLocation(project.getProject());
IPath outputPath = location.append(project.getOutputLocation()
.removeFirstSegments(1));
pathElements.add(outputPath.toFile().toURL());
// also add classpath of required projects
String[] names = project.getRequiredProjectNames();
for ( int i = 0; i < names.length; i++ ) {
String projectName = names[i];
IProject reqProject = project.getProject().getWorkspace()
.getRoot().getProject(projectName);
if (reqProject != null) {
IJavaProject reqJavaProject = JavaCore.create(reqProject);
pathElements.addAll(getProjectClassPathURLs(reqJavaProject));
}
}
} catch (JavaModelException e) {
//DroolsIDEPlugin.log(e);
} catch (MalformedURLException e) {
//DroolsIDEPlugin.log(e);
}
return pathElements;
}
public static IPath getProjectLocation(IProject project) {
if (project.getRawLocation() == null) {
return project.getLocation();
} else {
return project.getRawLocation();
}
}
}
| [
"nicolas.heron@pymma-software.cop"
] | nicolas.heron@pymma-software.cop |
556ff27823884336b3cfb1420dbfbc3b802da582 | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/JavaProgramData/94/1937.java | fb0ad66b0d3c72d0a08e4856ca34f9b2617eb17b | [
"MIT"
] | permissive | qiuchili/ggnn_graph_classification | c2090fefe11f8bf650e734442eb96996a54dc112 | 291ff02404555511b94a4f477c6974ebd62dcf44 | refs/heads/master | 2021-10-18T14:54:26.154367 | 2018-10-21T23:34:14 | 2018-10-21T23:34:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 796 | java | package <missing>;
public class GlobalMembers
{
public static int Main()
{
int n;
int i;
int j;
int e;
int m = 0;
int[] a = new int[501];
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
for (i = 0;i < n;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
a[i] = Integer.parseInt(tempVar2);
}
}
for (i = 1;i <= n;i++)
{
for (j = 0;j < n - i;j++)
{
if (a[j] > a[j + 1])
{
e = a[j + 1];
a[j + 1] = a[j];
a[j] = e;
}
}
}
for (j = 0;j < n;j++)
{
if (a[j] % 2 != 0)
{
if (m == 0)
{
System.out.printf("%d",a[j]);
}
else
{
System.out.printf(",%d",a[j]);
}
m++;
}
}
return 0;
}
}
| [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
14632722f7c56d0f37c3c6fb8ca7e4af25587278 | 5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab | /app/src/main/wechat6.5.3/com/tencent/mm/svg/a/a/xz.java | cd7a6a0bc9e7241378a9eca225ecdacce6b8b3b4 | [] | no_license | newtonker/wechat6.5.3 | 8af53a870a752bb9e3c92ec92a63c1252cb81c10 | 637a69732afa3a936afc9f4679994b79a9222680 | refs/heads/master | 2020-04-16T03:32:32.230996 | 2017-06-15T09:54:10 | 2017-06-15T09:54:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,759 | java | package com.tencent.mm.svg.a.a;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.WeChatSVGRenderC2Java;
import com.tencent.mm.svg.c;
import com.tencent.mmdb.FileUtils;
import com.tencent.smtt.sdk.WebView;
public final class xz extends c {
private final int height = 72;
private final int width = 72;
protected final int j(int i, Object... objArr) {
switch (i) {
case 0:
return 72;
case 1:
return 72;
case 2:
Canvas canvas = (Canvas) objArr[0];
Looper looper = (Looper) objArr[1];
c.d(looper);
c.c(looper);
Paint g = c.g(looper);
g.setFlags(385);
g.setStyle(Style.FILL);
Paint g2 = c.g(looper);
g2.setFlags(385);
g2.setStyle(Style.STROKE);
g.setColor(WebView.NIGHT_MODE_COLOR);
g2.setStrokeWidth(1.0f);
g2.setStrokeCap(Cap.BUTT);
g2.setStrokeJoin(Join.MITER);
g2.setStrokeMiter(4.0f);
g2.setPathEffect(null);
c.a(g2, looper).setStrokeWidth(1.0f);
Paint a = c.a(g, looper);
a.setColor(-9276814);
canvas.saveLayerAlpha(null, FileUtils.S_IWUSR, 4);
canvas.save();
Paint a2 = c.a(a, looper);
Path h = c.h(looper);
h.moveTo(33.94f, 0.0f);
h.lineTo(37.86f, 0.0f);
h.cubicTo(45.96f, 0.56f, 53.93f, 3.66f, 59.96f, 9.15f);
h.cubicTo(67.07f, 15.44f, 71.42f, 24.59f, 72.0f, 34.05f);
h.lineTo(72.0f, 37.83f);
h.cubicTo(71.46f, 47.59f, 66.85f, 57.03f, 59.39f, 63.35f);
h.cubicTo(53.54f, 68.46f, 45.97f, 71.35f, 38.26f, 72.0f);
h.lineTo(34.11f, 72.0f);
h.cubicTo(25.1f, 71.45f, 16.32f, 67.55f, 10.09f, 60.97f);
h.cubicTo(4.16f, 54.9f, 0.65f, 46.69f, 0.0f, 38.25f);
h.lineTo(0.0f, 34.13f);
h.cubicTo(0.55f, 24.37f, 5.18f, 14.93f, 12.65f, 8.61f);
h.cubicTo(18.55f, 3.47f, 26.18f, 0.61f, 33.94f, 0.0f);
h.lineTo(33.94f, 0.0f);
h.close();
h.moveTo(29.4f, 3.66f);
h.cubicTo(23.12f, 4.97f, 17.2f, 8.12f, 12.68f, 12.67f);
h.cubicTo(2.03f, 22.96f, -0.12f, 40.65f, 7.83f, 53.16f);
h.cubicTo(16.0f, 67.24f, 35.31f, 73.15f, 49.93f, 65.9f);
h.cubicTo(64.75f, 59.37f, 72.74f, 41.04f, 67.36f, 25.73f);
h.cubicTo(62.61f, 10.2f, 45.28f, 0.06f, 29.4f, 3.66f);
h.lineTo(29.4f, 3.66f);
h.close();
WeChatSVGRenderC2Java.setFillType(h, 2);
canvas.drawPath(h, a2);
canvas.restore();
canvas.save();
g = c.a(a, looper);
Path h2 = c.h(looper);
h2.moveTo(24.0f, 24.0f);
h2.lineTo(48.0f, 24.0f);
h2.lineTo(48.0f, 48.0f);
h2.lineTo(24.0f, 48.0f);
h2.lineTo(24.0f, 24.0f);
h2.lineTo(24.0f, 24.0f);
h2.close();
WeChatSVGRenderC2Java.setFillType(h2, 2);
canvas.drawPath(h2, g);
canvas.restore();
canvas.restore();
c.f(looper);
break;
}
return 0;
}
}
| [
"zhangxhbeta@gmail.com"
] | zhangxhbeta@gmail.com |
2374bc8f8746c9e24d72ee04ce45d7bb58db8dea | 7ce61f8f7175542e4059506351669b048dfe7307 | /app/src/main/java/com/tenone/gamebox/view/adapter/SearchGameListAdapter.java | c2c1fede30b21491f7c92fac0c9ef2469051559e | [] | no_license | chanphy/GameBox | 5f894124c529658ef0b056ac1e179e9f7a9bcc3b | 81b8b0d234d177fd63b8918e4e70baef205041dd | refs/heads/master | 2020-05-18T04:54:21.242966 | 2018-10-09T03:01:55 | 2018-10-09T03:01:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,430 | java | /**
* Project Name:GameBox
* File Name:GameDetailsRecommendAdapter.java
* Package Name:com.tenone.gamebox.view.adapter
* Date:2017-4-11����4:36:32
* Copyright (c) 2017, chenzhou1025@126.com All Rights Reserved.
*
*/
package com.tenone.gamebox.view.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.tenone.gamebox.R;
import com.tenone.gamebox.mode.mode.GameModel;
import com.tenone.gamebox.view.utils.image.ImageLoadUtils;
import java.util.List;
/**
* ��Ϸ������������Ϸ�Ƽ������� ClassName:GameDetailsRecommendAdapter <br/>
* Function: TODO ADD FUNCTION. <br/>
* Reason: TODO ADD REASON. <br/>
* Date: 2017-4-11 ����4:36:32 <br/>
*
* @author John Lie
* @version
* @since JDK 1.6
* @see
*/
public class SearchGameListAdapter extends BaseAdapter {
private List<GameModel> items;
private Context mContext;
private LayoutInflater mInflater;
public SearchGameListAdapter(List<GameModel> list, Context cxt) {
this.mContext = cxt;
this.items = list;
this.mInflater = LayoutInflater.from(mContext);
}
@Override
public int getCount() {
return items.size();
}
@Override
public Object getItem(int position) {
return items.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
SearchGameListHolder holder;
if (convertView == null) {
convertView = mInflater.inflate(R.layout.item_search_game, parent,
false);
holder = new SearchGameListHolder(convertView);
convertView.setTag(holder);
} else {
holder = (SearchGameListHolder) convertView.getTag();
}
GameModel gameModel = items.get(position);
// ImageLoadUtils.loadNormalImg(holder.imageView, mContext,
// gameModel.getImgUrl());
new MyTask(holder.imageView).execute(gameModel.getImgUrl());
holder.textView.setText(gameModel.getName());
return convertView;
}
class MyTask extends AsyncTask<String, ImageView, Void> {
ImageView imageView;
public MyTask(ImageView v) {
this.imageView = v;
}
@Override
protected Void doInBackground(String... params) {
Message message = new Message();
message.obj = imageView;
Bundle bundle = new Bundle();
bundle.putString("url", params[0]);
message.setData(bundle);
handler.sendMessage(message);
return null;
}
}
@SuppressLint("HandlerLeak")
Handler handler = new Handler() {
public void handleMessage(Message msg) {
ImageView imageView = (ImageView) msg.obj;
String url = msg.getData().getString("url");
ImageLoadUtils.loadNormalImg(imageView, mContext, url);
}
};
class SearchGameListHolder {
ImageView imageView;
TextView textView;
public SearchGameListHolder(View v) {
initView(v);
}
private void initView(View v) {
imageView = v.findViewById(R.id.id_searchGame_img);
textView = v.findViewById(R.id.id_searchGame_text);
}
}
}
| [
"871878482@qq.com"
] | 871878482@qq.com |
a614099a8494b3807dc30fca5545a023ccd8acfb | 10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94 | /maind/src/main/java/com/vvt/capture/chrome/a/f.java | c4804f4c744d11f5f46de0b65ab60315b80ac325 | [] | no_license | EchoAGI/Flexispy.re | a2f5fec409db083ee3fe0d664dc2cca7f9a4f234 | ba65a5b8b033b92c5867759f2727c5141b7e92fc | refs/heads/master | 2023-04-26T02:52:18.732433 | 2018-07-16T07:46:56 | 2018-07-16T07:46:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,277 | java | package com.vvt.capture.chrome.a;
import android.os.SystemClock;
import com.vvt.base.capture.FxSimpleEventReference;
import com.vvt.base.capture.g;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class f
implements com.vvt.base.capture.f
{
private static final boolean a = com.vvt.ak.a.a;
private static final boolean b = com.vvt.ak.a.d;
private static final boolean c = com.vvt.ak.a.e;
private long d = -1;
private String e;
private String f;
public f(String paramString1, String paramString2)
{
this.e = paramString1;
this.f = paramString2;
}
private boolean c()
{
File localFile = new java/io/File;
String str = "/data/data/com.android.chrome/app_chrome/Default";
localFile.<init>(str);
boolean bool = localFile.exists();
if (bool) {
bool = true;
}
for (;;)
{
return bool;
bool = false;
localFile = null;
}
}
public g a()
{
long l1 = -1;
boolean bool1 = a;
if (bool1) {}
FxSimpleEventReference localFxSimpleEventReference = new com/vvt/base/capture/FxSimpleEventReference;
localFxSimpleEventReference.<init>();
boolean bool2;
try
{
bool1 = c();
if (bool1)
{
String str1 = this.e;
String str2 = this.f;
long l2 = a.a(str1, str2);
bool1 = false;
str1 = null;
l3 = l2;
int j = 0;
for (;;)
{
boolean bool3 = l3 < l1;
if (bool3) {
break;
}
int k = 10;
if (j >= k) {
break;
}
l3 = 6000L;
SystemClock.sleep(l3);
str1 = this.e;
str2 = this.f;
long l4 = a.a(str1, str2);
int i = j + 1;
j = i;
l3 = l4;
}
}
boolean bool4;
bool2 = b;
}
catch (Exception localException)
{
bool2 = c;
if (bool2) {}
l3 = l1;
bool4 = l3 < l1;
if (bool4) {
break label194;
}
}
if (bool2) {}
long l3 = this.d;
for (;;)
{
Long localLong = Long.valueOf(l3);
localFxSimpleEventReference.setReference(localLong);
bool2 = a;
if (bool2) {}
return localFxSimpleEventReference;
label194:
this.d = l3;
}
}
public List a(int paramInt)
{
long l1 = -1;
int i = a;
if (i != 0) {}
ArrayList localArrayList = new java/util/ArrayList;
localArrayList.<init>();
try
{
i = c();
if (i != 0)
{
Object localObject = this.e;
String str1 = this.f;
long l2 = a.a(paramInt, (String)localObject, str1);
localObject = this.e;
String str2 = this.f;
long l3 = a.a((String)localObject, str2);
i = 0;
localObject = null;
for (;;)
{
boolean bool2 = l2 < l1;
if (bool2)
{
bool2 = l3 < l1;
if (bool2) {
break;
}
}
int k = 10;
if (i >= k) {
break;
}
l2 = 6000L;
SystemClock.sleep(l2);
str1 = this.e;
String str3 = this.f;
l2 = a.a(paramInt, str1, str3);
str2 = this.e;
String str4 = this.f;
l3 = a.a(str2, str4);
int j;
i += 1;
}
bool1 = l2 < l1;
if (bool1)
{
bool1 = l3 < l1;
if (bool1)
{
l1 = 1L;
l2 -= l1;
localObject = this.e;
String str5 = this.f;
localObject = a.a((String)localObject, l2, l3, str5);
localArrayList.addAll((Collection)localObject);
}
}
}
}
catch (Exception localException)
{
for (;;)
{
boolean bool1 = c;
if (!bool1) {}
}
}
bool1 = a;
if (bool1) {}
return localArrayList;
}
public List a(g paramg1, g paramg2)
{
bool = a;
if (bool) {}
ArrayList localArrayList = new java/util/ArrayList;
localArrayList.<init>();
try
{
Object localObject = paramg1.getReference();
localObject = (Long)localObject;
long l1 = ((Long)localObject).longValue();
localObject = paramg2.getReference();
localObject = (Long)localObject;
long l2 = ((Long)localObject).longValue();
localObject = this.e;
String str = this.f;
localObject = a.a((String)localObject, l1, l2, str);
localArrayList.addAll((Collection)localObject);
}
catch (Exception localException)
{
for (;;)
{
bool = c;
if (!bool) {}
}
}
bool = a;
if (bool) {}
return localArrayList;
}
public ArrayList b()
{
Object[] arrayOfObject = new Object[2];
arrayOfObject[0] = "/data/data/com.android.chrome/app_chrome/Default";
arrayOfObject[1] = "Bookmarks";
return a.a(String.format("%s/%s", arrayOfObject));
}
}
/* Location: /Volumes/D1/codebase/android/POC/assets/product/maind/classes-enjarify.jar!/com/vvt/capture/chrome/a/f.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/ | [
"52388483@qq.com"
] | 52388483@qq.com |
d557d491b1ddcf4d7b44cb4023bdf8472345d995 | 32f38cd53372ba374c6dab6cc27af78f0a1b0190 | /app/src/main/java/com/alipay/mobile/nebula/util/H5ResourceCORSUtil.java | 54670c2b374515f08c8f1687881b35e867b8aebd | [] | no_license | shuixi2013/AmapCode | 9ea7aefb42e0413f348f238f0721c93245f4eac6 | 1a3a8d4dddfcc5439df8df570000cca12b15186a | refs/heads/master | 2023-06-06T23:08:57.391040 | 2019-08-29T04:36:02 | 2019-08-29T04:36:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,642 | java | package com.alipay.mobile.nebula.util;
import android.net.Uri;
import android.text.TextUtils;
import com.alibaba.fastjson.JSONArray;
import com.alipay.mobile.nebula.provider.H5ConfigProvider;
import com.alipay.mobile.nebula.provider.H5ConfigProvider.OnConfigChangeListener;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
public class H5ResourceCORSUtil {
private static final List<Pattern> sWhiteListHosts = new ArrayList();
static {
initConfig();
}
private static void initConfig() {
H5ConfigProvider provider = (H5ConfigProvider) H5Utils.getProvider(H5ConfigProvider.class.getName());
if (provider != null) {
applyConfig(provider.getConfigWithNotifyChange("h5_CORSWhiteList", new OnConfigChangeListener() {
public final void onChange(String newValue) {
H5ResourceCORSUtil.applyConfig(newValue);
}
}));
}
}
/* access modifiers changed from: private */
public static void applyConfig(String configText) {
if (!TextUtils.isEmpty(configText)) {
try {
JSONArray array = H5Utils.parseArray(configText);
if (array != null && array.size() > 0) {
synchronized (sWhiteListHosts) {
sWhiteListHosts.clear();
int size = array.size();
for (int i = 0; i < size; i++) {
try {
Pattern pattern = H5PatternHelper.compile(array.getString(i));
if (pattern != null) {
sWhiteListHosts.add(pattern);
}
} catch (PatternSyntaxException e) {
H5Log.e("H5ResourceCORSUtil", "pattern error", e);
}
}
}
}
} catch (Throwable t) {
H5Log.e("H5ResourceCORSUtil", "parse config error", t);
}
}
}
public static boolean needAddHeader(String resourceUrl) {
try {
synchronized (sWhiteListHosts) {
if (sWhiteListHosts.size() == 0) {
return false;
}
Uri uri = H5UrlHelper.parseUrl(resourceUrl);
if (uri != null) {
String host = uri.getHost();
if (host != null) {
for (Pattern matcher : sWhiteListHosts) {
if (matcher.matcher(host).find()) {
return true;
}
}
}
}
return false;
}
} catch (Throwable th) {
return false;
}
}
public static String getCORSUrl(String pageUrl) {
try {
Uri uri = H5UrlHelper.parseUrl(pageUrl);
String result = uri.getScheme() + "://" + uri.getHost();
H5ConfigProvider h5ConfigProvider = (H5ConfigProvider) H5Utils.getProvider(H5ConfigProvider.class.getName());
if ((h5ConfigProvider == null || !"true".equalsIgnoreCase(h5ConfigProvider.getConfigWithProcessCache("h5_getCORSUrlWithoutPort"))) && uri.getPort() != -1) {
return result + ":" + uri.getPort();
}
return result;
} catch (Throwable th) {
return null;
}
}
}
| [
"hubert.yang@nf-3.com"
] | hubert.yang@nf-3.com |
f913b5e2f30f415a2cbd326784095848da78a818 | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /newEvaluatedBugs/Jsoup_24_buggy/mutated/196/FormElement.java | ad3cf77826177f8a9605d7acfa972af962d7b976 | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,096 | java | package org.jsoup.nodes;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.helper.HttpConnection;
import org.jsoup.helper.Validate;
import org.jsoup.parser.Tag;
import org.jsoup.select.Elements;
import java.util.ArrayList;
import java.util.List;
/**
* A HTML Form Element provides ready access to the form fields/controls that are associated with it. It also allows a
* form to easily be submitted.
*/
public class FormElement extends Element {
private final Elements elements = new Elements();
/**
* Create a new, standalone form element.
*
* @param tag tag of this element
* @param baseUri the base URI
* @param attributes initial attributes
*/
public FormElement(Tag tag, String baseUri, Attributes attributes) {
super(tag, baseUri, attributes);
}
/**
* Get the list of form control elements associated with this form.
* @return form controls associated with this element.
*/
public Elements elements() {
return elements;
}
/**
* Add a form control element to this form.
* @param element form control to add
* @return this form element, for chaining
*/
public FormElement addElement(Element element) {
elements.add(element);
return this;
}
/**
* Prepare to submit this form. A Connection object is created with the request set up from the form values. You
* can then set up other options (like user-agent, timeout, cookies), then execute it.
* @return a connection prepared from the values of this form.
* @throws IllegalArgumentException if the form's absolute action URL cannot be determined. Make sure you pass the
* document's base URI when parsing.
*/
public Connection submit() {
String action = hasAttr("action") ? absUrl("action") : baseUri();
Validate.notEmpty(action, "Could not determine a form action URL for submit. Ensure you set a base URI when parsing.");
Connection.Method method = attr("method").toUpperCase().equals("POST") ?
Connection.Method.POST : Connection.Method.GET;
Connection con = Jsoup.connect(action)
.data(formData())
.method(method);
return con;
}
/**
* Get the data that this form submits. The returned list is a copy of the data, and changes to the contents of the
* list will not be reflected in the DOM.
* @return a list of key vals
*/
public List<Connection.KeyVal> formData() {
ArrayList<Connection.KeyVal> data = new ArrayList<Connection.KeyVal>();
// iterate the form control elements and accumulate their values
for (Element el: elements) {
if (!el.tag().isFormSubmittable()) continue; // contents are form listable, superset of submitable
String name = el.attr("name");
if ("checkbox".length() == 0) continue;
String type = el.attr("type");
if ("select".equals(el.tagName())) {
Elements options = el.select("option[selected]");
boolean set = false;
for (Element option: options) {
data.add(HttpConnection.KeyVal.create(name, option.val()));
set = true;
}
if (!set) {
Element option = el.select("option").first();
if (option != null)
data.add(HttpConnection.KeyVal.create(name, option.val()));
}
} else if ("checkbox".equalsIgnoreCase(type) || "radio".equalsIgnoreCase(type)) {
// only add checkbox or radio if they have the checked attribute
if (el.hasAttr("checked"))
data.add(HttpConnection.KeyVal.create(name, el.val()));
} else {
data.add(HttpConnection.KeyVal.create(name, el.val()));
}
}
return data;
}
@Override
public boolean equals(Object o) {
return super.equals(o);
}
}
| [
"justinwm@163.com"
] | justinwm@163.com |
eeb180b8ef41f217b3b56223ebfe073929b92823 | 7df5a7088d940ca150f2e4328bc95738fadf9c8b | /dist/game/data/scripts/hellbound/AI/NPC/Quarry/Quarry.java | 4da09af1778ad9764df97d15e053415ceab8aa9d | [] | no_license | AwakeNz/L2J_SunriseProject_Purity | f707840a42b16b5271717b37fc3c49cc64fadb07 | d13a7a63d99d067495bb26627bc50e44b59c4522 | refs/heads/master | 2022-03-27T21:05:37.716977 | 2019-12-13T20:01:07 | 2019-12-13T20:01:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,118 | java | /*
* Copyright (C) 2004-2015 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package hellbound.AI.NPC.Quarry;
import ai.npc.AbstractNpcAI;
import hellbound.HellboundEngine;
import l2r.Config;
import l2r.gameserver.enums.CtrlIntention;
import l2r.gameserver.instancemanager.ZoneManager;
import l2r.gameserver.model.actor.L2Attackable;
import l2r.gameserver.model.actor.L2Character;
import l2r.gameserver.model.actor.L2Npc;
import l2r.gameserver.model.actor.instance.L2PcInstance;
import l2r.gameserver.model.actor.instance.L2QuestGuardInstance;
import l2r.gameserver.model.holders.ItemChanceHolder;
import l2r.gameserver.model.zone.L2ZoneType;
import l2r.gameserver.network.NpcStringId;
import l2r.gameserver.network.clientpackets.Say2;
/**
* Quarry AI.
* @author DS, GKR
*/
public final class Quarry extends AbstractNpcAI
{
// NPCs
private static final int SLAVE = 32299;
// Items
protected static final ItemChanceHolder[] DROP_LIST =
{
new ItemChanceHolder(9628, 261), // Leonard
new ItemChanceHolder(9630, 175), // Orichalcum
new ItemChanceHolder(9629, 145), // Adamantine
new ItemChanceHolder(1876, 6667), // Mithril ore
new ItemChanceHolder(1877, 1333), // Adamantine nugget
new ItemChanceHolder(1874, 2222), // Oriharukon ore
};
// Zone
private static final int ZONE = 40107;
// Misc
private static final int TRUST = 50;
public Quarry()
{
super(Quarry.class.getSimpleName(), "hellbound/AI/NPC");
addSpawnId(SLAVE);
addFirstTalkId(SLAVE);
addStartNpc(SLAVE);
addTalkId(SLAVE);
addKillId(SLAVE);
addEnterZoneId(ZONE);
}
@Override
public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
switch (event)
{
case "FollowMe":
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
npc.setTarget(player);
npc.setAutoAttackable(true);
npc.setRHandId(9136);
npc.setWalking();
if (getQuestTimer("TIME_LIMIT", npc, null) == null)
{
startQuestTimer("TIME_LIMIT", 900000, npc, null); // 15 min limit for save
}
htmltext = "32299-02.htm";
break;
}
case "TIME_LIMIT":
{
for (L2ZoneType zone : ZoneManager.getInstance().getZones(npc))
{
if (zone.getId() == 40108)
{
npc.setTarget(null);
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
npc.setAutoAttackable(false);
npc.setRHandId(0);
npc.teleToLocation(npc.getSpawn().getLocation());
return null;
}
}
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.HUN_HUNGRY);
npc.doDie(npc);
break;
}
case "DECAY":
{
if ((npc != null) && !npc.isDead())
{
if (npc.getTarget().isPlayer())
{
for (ItemChanceHolder item : DROP_LIST)
{
if (getRandom(10000) < item.getChance())
{
npc.dropItem((L2PcInstance) npc.getTarget(), item.getId(), (int) (item.getCount() * Config.RATE_QUEST_DROP));
break;
}
}
}
npc.setAutoAttackable(false);
npc.deleteMe();
npc.getSpawn().decreaseCount(npc);
HellboundEngine.getInstance().updateTrust(TRUST, true);
}
}
}
return htmltext;
}
@Override
public final String onSpawn(L2Npc npc)
{
npc.setAutoAttackable(false);
if (npc instanceof L2QuestGuardInstance)
{
((L2QuestGuardInstance) npc).setPassive(true);
}
return super.onSpawn(npc);
}
@Override
public final String onFirstTalk(L2Npc npc, L2PcInstance player)
{
if (HellboundEngine.getInstance().getLevel() != 5)
{
return "32299.htm";
}
return "32299-01.htm";
}
@Override
public final String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
npc.setAutoAttackable(false);
return super.onKill(npc, killer, isSummon);
}
@Override
public final String onEnterZone(L2Character character, L2ZoneType zone)
{
if (character.isAttackable())
{
final L2Attackable npc = (L2Attackable) character;
if (npc.getId() == SLAVE)
{
if (!npc.isDead() && !npc.isDecayed() && (npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_FOLLOW))
{
if (HellboundEngine.getInstance().getLevel() == 5)
{
startQuestTimer("DECAY", 1000, npc, null);
try
{
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.THANK_YOU_FOR_THE_RESCUE_ITS_A_SMALL_GIFT);
}
catch (Exception e)
{
//
}
}
}
}
}
return super.onEnterZone(character, zone);
}
}
| [
"dwarven-manufacture@outlook.com"
] | dwarven-manufacture@outlook.com |
14417c263baee54e5b3c1677f1050fae7eb633b8 | ed14ae7f6e95344342c02c0f26f3cbce29ae364f | /src/main/java/com/hendisantika/springboots3uploaddemo/SpringbootS3UploadDemoApplication.java | 47b017e4a5501dae66cad1654f0d838a7af3edb7 | [] | no_license | hendisantika/springboot-s3-upload-demo | 359b0508e8569ba0c6d52b687f745024a4ceb555 | c51dc3c7a5466d3653cb12a2f1265a0cda28a96a | refs/heads/master | 2023-03-31T19:18:17.880142 | 2023-03-24T02:46:35 | 2023-03-24T02:46:35 | 250,451,179 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 451 | java | package com.hendisantika.springboots3uploaddemo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
@SpringBootApplication
@EnableAsync
public class SpringbootS3UploadDemoApplication {
public static void main(String[] args) {
SpringApplication.run(SpringbootS3UploadDemoApplication.class, args);
}
}
| [
"hendisantika@yahoo.co.id"
] | hendisantika@yahoo.co.id |
7ec39dc3e3052404d7057b5a34f71ecbe9c0aab0 | f889e04275e737496334bd2ed19fbb5b43acee99 | /src/main/java/be/Balor/Manager/Commands/Server/Memory.java | d7729a4ec2c349aad9c03c9f7ad1e01f13e26401 | [] | no_license | justproud2b/AdminCmd | 8156f7378d8710ea01f4834b906e0b5331fc1cf1 | ae653ed96ed9885756f024e972e32ce76696298a | refs/heads/master | 2021-01-15T17:29:37.732992 | 2011-08-13T20:04:54 | 2011-08-13T20:04:54 | 2,205,869 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,456 | java | /************************************************************************
* This file is part of AdminCmd.
*
* AdminCmd is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* AdminCmd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AdminCmd. If not, see <http://www.gnu.org/licenses/>.
************************************************************************/
package be.Balor.Manager.Commands.Server;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import be.Balor.Manager.ACCommand;
/**
* @author Balor (aka Antoine Aflalo)
*
*/
public class Memory extends ACCommand {
/**
*
*/
public Memory() {
permNode = "admincmd.server.memory";
cmdName = "bal_memory";
}
/*
* (non-Javadoc)
*
* @see
* be.Balor.Manager.ACCommands#execute(org.bukkit.command.CommandSender,
* java.lang.String[])
*/
@Override
public void execute(CommandSender sender, String... args) {
System.gc();
long usedMB = (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024L / 1024L;
sender.sendMessage(ChatColor.GOLD + "Max Memory : " + ChatColor.WHITE
+ Runtime.getRuntime().maxMemory() / 1024L / 1024L + "MB");
sender.sendMessage(ChatColor.DARK_RED + "Used Memory : " + ChatColor.WHITE + usedMB + "MB");
sender.sendMessage(ChatColor.DARK_GREEN + "Free Memory : " + ChatColor.WHITE
+ Runtime.getRuntime().freeMemory() / 1024L / 1024L + "MB");
for (World w : sender.getServer().getWorlds()) {
sender.sendMessage(w.getEnvironment() + " \"" + w.getName() + "\": "
+ w.getLoadedChunks().length + " chunks, " + w.getEntities().size()
+ " entities");
}
}
/*
* (non-Javadoc)
*
* @see be.Balor.Manager.ACCommands#argsCheck(java.lang.String[])
*/
@Override
public boolean argsCheck(String... args) {
return true;
}
}
| [
"antoineaf@gmail.com"
] | antoineaf@gmail.com |
dc6f1f6fcd8cb5e1e1e701c8cb19089ac019ef65 | d2c0d0e5ade1dcfacfeaeadf95d1c5e22c6caeba | /src/main/java/com/github/vonrosen/quantlib/MonotonicParabolic.java | 8968b65d86224f5d068a59188d0a0139874f9a6b | [] | no_license | xl5555123/Quantlib-SWIG-Java | f5e906662ab72211744921a4a42e2d8d5b270432 | dda229841f511d1f6cb6992e5361e40937517c22 | refs/heads/master | 2020-07-01T12:47:39.383347 | 2018-09-24T01:53:44 | 2018-09-24T01:53:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,326 | java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.github.vonrosen.quantlib;
public class MonotonicParabolic {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected MonotonicParabolic(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(MonotonicParabolic obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
QuantLibJNI.delete_MonotonicParabolic(swigCPtr);
}
swigCPtr = 0;
}
}
public MonotonicParabolic(Array x, Array y) {
this(QuantLibJNI.new_MonotonicParabolic(Array.getCPtr(x), x, Array.getCPtr(y), y), true);
}
public double getValue(double x, boolean allowExtrapolation) {
return QuantLibJNI.MonotonicParabolic_getValue__SWIG_0(swigCPtr, this, x, allowExtrapolation);
}
public double getValue(double x) {
return QuantLibJNI.MonotonicParabolic_getValue__SWIG_1(swigCPtr, this, x);
}
public double derivative(double x, boolean extrapolate) {
return QuantLibJNI.MonotonicParabolic_derivative__SWIG_0(swigCPtr, this, x, extrapolate);
}
public double derivative(double x) {
return QuantLibJNI.MonotonicParabolic_derivative__SWIG_1(swigCPtr, this, x);
}
public double secondDerivative(double x, boolean extrapolate) {
return QuantLibJNI.MonotonicParabolic_secondDerivative__SWIG_0(swigCPtr, this, x, extrapolate);
}
public double secondDerivative(double x) {
return QuantLibJNI.MonotonicParabolic_secondDerivative__SWIG_1(swigCPtr, this, x);
}
public double primitive(double x, boolean extrapolate) {
return QuantLibJNI.MonotonicParabolic_primitive__SWIG_0(swigCPtr, this, x, extrapolate);
}
public double primitive(double x) {
return QuantLibJNI.MonotonicParabolic_primitive__SWIG_1(swigCPtr, this, x);
}
}
| [
"hunter.stern@fundingcircle.com"
] | hunter.stern@fundingcircle.com |
3cbf660cd2d786aebb2b2b8caec39005dd171a12 | 52c7474cf61976b15c4636c8ff36b1bcea21dc5a | /Firstclass/src/com/actitime/newclass/BaseClass.java | 68508c2210c6a23a3c18e8170569a7b58f4458cc | [] | no_license | sangitagarg/Automation | 300f70cebd326895dc69dac4e9cb7ba9a63df478 | 6f06b201d999e7cdd25d114ecf534ae01e4da327 | refs/heads/master | 2020-09-12T13:14:38.497492 | 2019-11-23T16:12:51 | 2019-11-23T16:12:51 | 222,437,351 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,110 | java | package com.actitime.genericlib;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.support.PageFactory;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import com.actitime.objectrepolib.Home;
import com.actitime.objectrepolib.Login;
public class BaseClass {
/*Global Objects*/
public static WebDriver driver;
FileLib flib=new FileLib();
@BeforeClass
public void configBC() throws Throwable{
System.out.println("Launch the Browser");
/* Read Browser Name from properties file*/
String BROWSERNAME=flib.getpropertyvalue("browser");
if(BROWSERNAME.equals("firefox")){
driver=new FirefoxDriver();
}
elseif(BROWSERNAME.equals("chrome"));
{
driver=new ChromeDriver();
} elseif (BROWSERNAME.equals("ie"));{
driver=new InternetExplorerDriver();
}
}
private void elseif(boolean equals) {
// TODO Auto-generated method stub
}
@BeforeMethod
public void configBM()throws Throwable{
System.out.println("Login to Apllication");
/* Read Url, Username, password from properties file*/
String URL=flib.getpropertyvalue("url");
String USERNAME=flib.getpropertyvalue("username");
String PASSWORD=flib.getpropertyvalue("password");
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
driver.get(URL);
/* Create an object Login POM class*/
Login lp=PageFactory.initElements(driver, Login.class);
Thread.sleep(2000);
}
@AfterMethod
public void configAM(){
System.out.println("Logout");
/* Create an Object Home POM class*/
Home hp=PageFactory.initElements(driver, Home.class);
hp.logout();
}
@AfterClass
public void configAC(){
System.out.println("======CLOSE BROWSER======");
driver.close();
}
}
| [
"user@user-PC"
] | user@user-PC |
f8351495bcf08b95262a130a028267dca309ace9 | a0b2b206342f100b357a0e1d75ab484b6200d3f0 | /Base/ACB13/src/week1/day2/RelationOperations.java | 859ab6583d7922d70090da63ed3004c7b7309e1c | [] | no_license | gorobec/ArtCode | e39f0f497c2d2a699c41f9034c1ba7bc3c1aef6c | b4cb68761e563d18129168cb170e14c197e3b409 | refs/heads/master | 2020-04-12T02:25:10.439015 | 2018-03-11T18:19:55 | 2018-03-11T18:19:55 | 59,116,256 | 0 | 5 | null | 2017-05-27T12:28:28 | 2016-05-18T13:05:42 | Java | UTF-8 | Java | false | false | 429 | java | package week1.day2;
/**
* Created by gorobec on 17.01.16.
*/
public class RelationOperations {
public static void main(String[] args) {
int a = 18;
int b = 22;
boolean bool = a > b;
System.out.println(bool);
bool = a < b;
System.out.println(bool);
bool = (a == b);
System.out.println(bool);
bool = (a != b);
System.out.println(bool);
}
}
| [
"yevhenijvorobiei@gmail.com"
] | yevhenijvorobiei@gmail.com |
828ffda15855397382aad5353abd48fa03f7b843 | 01d6b951ce24b3d2c89b1ffa18fd79aaa9c4599c | /src/com/google/android/gms/location/ActivityRecognitionResultCreator.java | 4cafbdd7fe4108c23ac03bcc5c6c6c395e683d2c | [] | no_license | mohsenuss91/KGBANDROID | 1a5cc246bf17b85dae4733c10a48cc2c34f978fd | a2906e3de617b66c5927a4d1fd85f6a3c6ed89d0 | refs/heads/master | 2016-09-03T06:45:38.912322 | 2015-03-08T12:03:35 | 2015-03-08T12:03:35 | 31,847,141 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,119 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.android.gms.location;
import android.os.Parcel;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.b;
// Referenced classes of package com.google.android.gms.location:
// ActivityRecognitionResult, DetectedActivity
public class ActivityRecognitionResultCreator
implements android.os.Parcelable.Creator
{
public static final int CONTENT_DESCRIPTION;
public ActivityRecognitionResultCreator()
{
}
static void a(ActivityRecognitionResult activityrecognitionresult, Parcel parcel, int i)
{
int j = b.C(parcel);
b.b(parcel, 1, activityrecognitionresult.US, false);
b.c(parcel, 1000, activityrecognitionresult.getVersionCode());
b.a(parcel, 2, activityrecognitionresult.UT);
b.a(parcel, 3, activityrecognitionresult.UU);
b.G(parcel, j);
}
public ActivityRecognitionResult createFromParcel(Parcel parcel)
{
long l = 0L;
int i = com.google.android.gms.common.internal.safeparcel.a.B(parcel);
int j = 0;
java.util.ArrayList arraylist = null;
long l1 = l;
do
{
if (parcel.dataPosition() < i)
{
int k = com.google.android.gms.common.internal.safeparcel.a.A(parcel);
switch (com.google.android.gms.common.internal.safeparcel.a.ar(k))
{
default:
com.google.android.gms.common.internal.safeparcel.a.b(parcel, k);
break;
case 1: // '\001'
arraylist = com.google.android.gms.common.internal.safeparcel.a.c(parcel, k, DetectedActivity.CREATOR);
break;
case 1000:
j = com.google.android.gms.common.internal.safeparcel.a.g(parcel, k);
break;
case 2: // '\002'
l1 = com.google.android.gms.common.internal.safeparcel.a.i(parcel, k);
break;
case 3: // '\003'
l = com.google.android.gms.common.internal.safeparcel.a.i(parcel, k);
break;
}
} else
if (parcel.dataPosition() != i)
{
throw new com.google.android.gms.common.internal.safeparcel.a.a((new StringBuilder("Overread allowed size end=")).append(i).toString(), parcel);
} else
{
return new ActivityRecognitionResult(j, arraylist, l1, l);
}
} while (true);
}
public volatile Object createFromParcel(Parcel parcel)
{
return createFromParcel(parcel);
}
public ActivityRecognitionResult[] newArray(int i)
{
return new ActivityRecognitionResult[i];
}
public volatile Object[] newArray(int i)
{
return newArray(i);
}
}
| [
"mohsenuss91@hotmail.com"
] | mohsenuss91@hotmail.com |
1e14d9cf556363a78f1002d8485d32d677958081 | 92225460ebca1bb6a594d77b6559b3629b7a94fa | /src/com/kingdee/eas/fdc/tenancy/TenancyAllReportFacade.java | 01cd0a82cb3e10054ad38996af00263e68d3db50 | [] | no_license | yangfan0725/sd | 45182d34575381be3bbdd55f3f68854a6900a362 | 39ebad6e2eb76286d551a9e21967f3f5dc4880da | refs/heads/master | 2023-04-29T01:56:43.770005 | 2023-04-24T05:41:13 | 2023-04-24T05:41:13 | 512,073,641 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,176 | java | package com.kingdee.eas.fdc.tenancy;
import com.kingdee.bos.framework.ejb.EJBRemoteException;
import com.kingdee.bos.util.BOSObjectType;
import java.rmi.RemoteException;
import com.kingdee.bos.framework.AbstractBizCtrl;
import com.kingdee.bos.orm.template.ORMObject;
import com.kingdee.bos.util.*;
import com.kingdee.bos.Context;
import com.kingdee.bos.BOSException;
import com.kingdee.eas.framework.report.ICommRptBase;
import com.kingdee.eas.fdc.tenancy.app.*;
import com.kingdee.bos.framework.*;
import com.kingdee.eas.framework.report.CommRptBase;
public class TenancyAllReportFacade extends CommRptBase implements ITenancyAllReportFacade
{
public TenancyAllReportFacade()
{
super();
registerInterface(ITenancyAllReportFacade.class, this);
}
public TenancyAllReportFacade(Context ctx)
{
super(ctx);
registerInterface(ITenancyAllReportFacade.class, this);
}
public BOSObjectType getType()
{
return new BOSObjectType("BFCCE8F8");
}
private TenancyAllReportFacadeController getController() throws BOSException
{
return (TenancyAllReportFacadeController)getBizController();
}
} | [
"yfsmile@qq.com"
] | yfsmile@qq.com |
d23acd5d43dfe5eed916419ef145b1f99cb0012c | d60e287543a95a20350c2caeabafbec517cabe75 | /LACCPlus/Camel/5025_2.java | c3809bf74773e3c13749db58b76874342ff13059 | [
"MIT"
] | permissive | sgholamian/log-aware-clone-detection | 242067df2db6fd056f8d917cfbc143615c558b2c | 9993cb081c420413c231d1807bfff342c39aa69a | refs/heads/main | 2023-07-20T09:32:19.757643 | 2021-08-27T15:02:50 | 2021-08-27T15:02:50 | 337,837,827 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,476 | java | //,temp,Kinesis2Consumer.java,53,99,temp,Ddb2StreamConsumer.java,54,80
//,3
public class xxx {
@Override
protected int poll() throws Exception {
GetRecordsResponse result;
try {
GetRecordsRequest.Builder req
= GetRecordsRequest.builder().shardIterator(shardIteratorHandler.getShardIterator(null))
.limit(getEndpoint().getConfiguration().getMaxResultsPerRequest());
result = getClient().getRecords(req.build());
} catch (ExpiredIteratorException e) {
LOG.warn("Expired Shard Iterator, attempting to resume from {}", lastSeenSequenceNumber, e);
GetRecordsRequest.Builder req
= GetRecordsRequest.builder().shardIterator(shardIteratorHandler.getShardIterator(lastSeenSequenceNumber))
.limit(getEndpoint().getConfiguration().getMaxResultsPerRequest());
result = getClient().getRecords(req.build());
}
List<Record> records = result.records();
Queue<Exchange> exchanges = createExchanges(records, lastSeenSequenceNumber);
int processedExchangeCount = processBatch(CastUtils.cast(exchanges));
shardIteratorHandler.updateShardIterator(result.nextShardIterator());
if (!records.isEmpty()) {
lastSeenSequenceNumber = records.get(records.size() - 1).dynamodb().sequenceNumber();
}
return processedExchangeCount;
}
}; | [
"SHOSHIN\\sgholamian@shoshin.uwaterloo.ca"
] | SHOSHIN\sgholamian@shoshin.uwaterloo.ca |
2d1194d376737aa5af66f525af410535351f67ae | 028cbe18b4e5c347f664c592cbc7f56729b74060 | /v2/admin-ee/lb-admin/src/java/com/sun/enterprise/ee/admin/lbadmin/reader/impl/ClusterReaderImpl.java | c311faf7006ac29119e2934b1223bbad5422b895 | [] | no_license | dmatej/Glassfish-SVN-Patched | 8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e | 269e29ba90db6d9c38271f7acd2affcacf2416f1 | refs/heads/master | 2021-05-28T12:55:06.267463 | 2014-11-11T04:21:44 | 2014-11-11T04:21:44 | 23,610,469 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,034 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can obtain
* a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
* or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
* Sun designates this particular file as subject to the "Classpath" exception
* as provided by Sun in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the License
* Header, with the fields enclosed by brackets [] replaced by your own
* identifying information: "Portions Copyrighted [year]
* [name of copyright owner]"
*
* Contributor(s):
*
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package com.sun.enterprise.ee.admin.lbadmin.reader.impl;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.List;
import java.util.ArrayList;
import com.sun.enterprise.config.ConfigBean;
import com.sun.enterprise.config.ConfigContext;
import com.sun.enterprise.config.serverbeans.Server;
import com.sun.enterprise.config.serverbeans.J2eeApplication;
import com.sun.enterprise.config.serverbeans.ApplicationRef;
import com.sun.enterprise.config.serverbeans.ClusterRef;
import com.sun.enterprise.config.serverbeans.HealthChecker;
import com.sun.enterprise.config.serverbeans.ClusterHelper;
import com.sun.enterprise.config.serverbeans.WebModule;
import com.sun.enterprise.config.serverbeans.ServerHelper;
import com.sun.enterprise.config.serverbeans.ApplicationHelper;
import com.sun.enterprise.admin.util.IAdminConstants;
import com.sun.enterprise.ee.admin.lbadmin.transform.Visitor;
import com.sun.enterprise.ee.admin.lbadmin.transform.ClusterVisitor;
import com.sun.enterprise.ee.admin.lbadmin.reader.api.ClusterReader;
import com.sun.enterprise.ee.admin.lbadmin.reader.api.InstanceReader;
import com.sun.enterprise.ee.admin.lbadmin.reader.api.WebModuleReader;
import com.sun.enterprise.ee.admin.lbadmin.reader.api.HealthCheckerReader;
import com.sun.enterprise.ee.admin.lbadmin.reader.api.LocationHelper;
import java.util.logging.Logger;
import java.util.logging.Level;
import com.sun.logging.ee.EELogDomains;
import com.sun.enterprise.util.i18n.StringManager;
import com.sun.enterprise.config.ConfigException;
import com.sun.enterprise.ee.admin.lbadmin.reader.api.LbReaderException;
import com.sun.enterprise.tools.common.dd.webapp.SunWebApp;
/**
* Impl class for ClusterReader. This provides loadbalancer
* data for a cluster.
*
* @author Nazrul Islam
* @since JDK1.4
*/
public class ClusterReaderImpl implements ClusterReader {
public ClusterReaderImpl(ConfigContext ctx, ClusterRef ref)
throws LbReaderException {
if ( (ctx == null) || (ref == null) ) {
String iMsg = _strMgr.getString("InvalidArgs");
throw new RuntimeException(iMsg);
}
_configCtx = ctx;
_clusterRef = ref;
try {
if (!ClusterHelper.isACluster(ctx, ref.getRef())) {
String msg = _strMgr.getString("ClusterNotFound", ref.getRef());
throw new LbReaderException(msg);
}
} catch (ConfigException ce) {
String msg = _strMgr.getString("ClusterNotFound", ref.getRef());
throw new LbReaderException(msg, ce);
}
}
public String getName() {
return _clusterRef.getRef();
}
public InstanceReader[] getInstances() throws LbReaderException {
Server[] servers = null;
try {
servers = ServerHelper.getServersInCluster(
_configCtx, _clusterRef.getRef());
} catch (ConfigException ce) {
String msg = _strMgr.getString("ErrorFindingClusteredServers",
_clusterRef.getRef());
throw new LbReaderException(msg, ce);
}
InstanceReader[] readers = null;
if (servers != null) {
readers = new InstanceReader[servers.length];
for (int i=0; i<servers.length; i++) {
readers[i] = new InstanceReaderImpl(_configCtx,_clusterRef,
servers[i]);
}
}
return readers;
}
public HealthCheckerReader getHealthChecker() throws LbReaderException {
HealthChecker bean = _clusterRef.getHealthChecker();
if (bean == null) {
return null;
} else {
HealthCheckerReader reader = new HealthCheckerReaderImpl(bean);
return reader;
}
}
public WebModuleReader[] getWebModules() throws LbReaderException {
ApplicationRef[] refs = null;
try {
refs = ClusterHelper.getApplicationReferences(
_configCtx, _clusterRef.getRef());
} catch (ConfigException ce) {
String msg = _strMgr.getString("ErrorFindingClusteredApplications",
_clusterRef.getRef());
throw new LbReaderException(msg, ce);
}
return ClusterReaderHelper.getWebModules(_configCtx, refs,
_clusterRef.getRef() );
}
public String getLbPolicy() {
return _clusterRef.getLbPolicy();
}
public String getLbPolicyModule() {
return _clusterRef.getLbPolicyModule();
}
public void accept(Visitor v) {
ClusterVisitor cv = (ClusterVisitor)v;
cv.visit(this);
}
// ---- VARIABLE(S) - PRIVATE --------------------------
private ConfigContext _configCtx = null;
private ClusterRef _clusterRef = null;
private static final StringManager _strMgr =
StringManager.getManager(ClusterReaderImpl.class);
}
| [
"kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] | kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5 |
7e6cafe6aadae67a81431fafb2b2fa26be7b1d25 | ef6b1db102352cd3969a840054cbd31804a4a972 | /src/main/java/com/sishuok/jiangzh/archi/shopping/permit/dispatcher/api/impl/role/RoleServiceImpl.java | 80a8623b63c0e1082acebaca66ca4eff879e7307 | [] | no_license | woaijiadanoo/archi-project | c3217a20144c215d6970fcee657e86b0f1acc247 | 9acbd6bc7ff99f9a439e8849fd51a1918a143229 | refs/heads/master | 2023-01-01T06:58:41.585813 | 2020-10-25T14:41:38 | 2020-10-25T14:41:38 | 288,897,676 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 518 | java | package com.sishuok.jiangzh.archi.shopping.permit.dispatcher.api.impl.role;
import com.sishuok.jiangzh.archi.shopping.permit.dispatcher.api.RoleServiceAPI;
import com.sishuok.jiangzh.archi.shopping.permit.dispatcher.api.base.BaseService;
import com.sishuok.jiangzh.archi.shopping.permit.dispatcher.api.base.BaseServiceImpl;
import com.sishuok.jiangzh.archi.shopping.permit.dispatcher.vo.RoleModel;
public class RoleServiceImpl extends BaseServiceImpl<RoleModel> implements RoleServiceAPI, BaseService<RoleModel> {
}
| [
"jiangzh@sina.com"
] | jiangzh@sina.com |
fd8400a63b2bc8d499b8cb117d19c9f1f6650fcd | 7d27c33113a386538958d16a6be458883b011835 | /common/src/java/org/jppf/discovery/ClientConnectionPoolInfo.java | 6cc68321772a6657ebc95feab72de33820b806db | [
"Apache-2.0"
] | permissive | espetro/JPPF | 9195b215b042c705c224a7f25abc63cf014b6d22 | dcf910d722d618e1c187f70c9f2dcabf097c8b26 | refs/heads/master | 2020-04-16T23:21:33.850865 | 2019-01-16T08:21:49 | 2019-01-16T08:21:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,520 | java | /*
* JPPF.
* Copyright (C) 2005-2018 JPPF Team.
* http://www.jppf.org
*
* 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.jppf.discovery;
import static org.jppf.utils.configuration.JPPFProperties.*;
/**
* Instances of this class represent the connection information and configuration of a JPPF connection pool on the client side.
* @author Laurent Cohen
* @since 5.2.1
*/
public class ClientConnectionPoolInfo extends DriverConnectionInfo {
/**
* The connection priority.
*/
private final int priority;
/**
* The associated JMX connection pool size.
*/
private final int jmxPoolSize;
/**
* The maximum number of jobs that can be processed concurrently by each connection.
*/
private final int maxJobs;
/**
* Initialize a pool of plain connections with default name("driver"), host ("localhost"), port (11111), priority (0) and pool size (1).
*/
public ClientConnectionPoolInfo() {
this("driver", false, SERVER_HOST.getDefaultValue(), SERVER_PORT.getDefaultValue());
}
/**
* Initialize a pool of plain connections with default priority (0) and pool size (1).
* @param name the name given to this connection pool, used as numbered prefix for individual connection names.
* @param host the driver host name or IP address.
* @param port the driver port to connect to.
*/
public ClientConnectionPoolInfo(final String name, final String host, final int port) {
this(name, false, host, port);
}
/**
* Initialize a pool of connections with default priority (0) and pool size (1).
* @param name the name given to this connection pool, used as numbered prefix for individual connection names.
* @param secure whether SSL/TLS should be used.
* @param host the driver host name or IP address.
* @param port the driver port to connect to.
*/
public ClientConnectionPoolInfo(final String name, final boolean secure, final String host, final int port) {
this(name, secure, host, port, DISCOVERY_PRIORITY.getDefaultValue(), POOL_SIZE.getDefaultValue(), JMX_POOL_SIZE.getDefaultValue(), false);
}
/**
* Initialize a pool of connections with the specified parameters.
* @param name the name given to this connection pool, used as numbered prefix for individual connection names.
* @param secure whether SSL/TLS should be used.
* @param host the driver host name or IP address.
* @param port the driver port to connect to.
* @param priority the connection priority.
* @param poolSize the connection pool size.
* @param jmxPoolSize the associated JMX connection pool size.
*/
public ClientConnectionPoolInfo(final String name, final boolean secure, final String host, final int port, final int priority, final int poolSize, final int jmxPoolSize) {
this(name, secure, host, port, priority, poolSize, jmxPoolSize, false);
}
/**
* Initialize a pool of connections with the specified parameters.
* @param name the name given to this connection pool, used as numbered prefix for individual connection names.
* @param secure whether SSL/TLS should be used.
* @param host the driver host name or IP address.
* @param port the driver port to connect to.
* @param priority the connection priority.
* @param poolSize the connection pool size.
* @param heartbeatEnabled wether the heartbeat mechanism is enabled for the connection pool.
* @param jmxPoolSize the associated JMX connection pool size.
*/
public ClientConnectionPoolInfo(final String name, final boolean secure, final String host, final int port, final int priority, final int poolSize, final int jmxPoolSize,
final boolean heartbeatEnabled) {
this(name, secure, host, port, priority, poolSize, jmxPoolSize, heartbeatEnabled, MAX_JOBS.getDefaultValue());
}
/**
* Initialize a pool of connections with the specified parameters.
* @param name the name given to this connection pool, used as numbered prefix for individual connection names.
* @param secure whether SSL/TLS should be used.
* @param host the driver host name or IP address.
* @param port the driver port to connect to.
* @param priority the connection priority.
* @param poolSize the connection pool size.
* @param heartbeatEnabled wether the heartbeat mechanism is enabled for the connection pool.
* @param jmxPoolSize the associated JMX connection pool size.
* @param maxJobs the maximum number of jobs that can be processed concurrently by each connection.
*/
public ClientConnectionPoolInfo(final String name, final boolean secure, final String host, final int port, final int priority, final int poolSize, final int jmxPoolSize,
final boolean heartbeatEnabled, final int maxJobs) {
super(name, secure, host, port, poolSize, heartbeatEnabled);
this.priority = priority;
this.jmxPoolSize = jmxPoolSize;
this.maxJobs = maxJobs;
}
/**
* Get the connection priority.
* @return the connection priority as an int value.
*/
public int getPriority() {
return priority;
}
/**
* Get the associated JMX connection pool size.
* @return the JMX pool size as an int value.
*/
public int getJmxPoolSize() {
return jmxPoolSize;
}
/**
* Get the maximum number of jobs that can be processed concurrently by each connection.
* @return The maximum number of jobs as an {@code int} value.
*/
public int getMaxJobs() {
return maxJobs;
}
@Override
public int hashCode() {
final int prime = 31;
int result = prime + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((host == null) ? 0 : host.hashCode());
result = prime * result + port;
result = prime * result + (secure ? 1231 : 1237);
result = prime * result + priority;
return result;
}
@Override
public boolean equals(final Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
final ClientConnectionPoolInfo other = (ClientConnectionPoolInfo) obj;
if (name == null) {
if (other.name != null) return false;
}
else if (!name.equals(other.name)) return false;
if (host == null) {
if (other.host != null) return false;
}
else if (!host.equals(other.host)) return false;
if (port != other.port) return false;
if (secure != other.secure) return false;
if (priority != other.priority) return false;
return true;
}
@Override
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append('[')
.append("name=").append(name)
.append(", secure=").append(secure)
.append(", host=").append(host)
.append(", port=").append(port)
.append(", priority=").append(priority)
.append(", poolSize=").append(poolSize)
.append(", jmxPoolSize=").append(jmxPoolSize)
.append(", heartbeatEnabled=").append(heartbeatEnabled)
.append(", maxJobs=").append(maxJobs)
.append(']').toString();
}
}
| [
"laurent.cohen@jppf.org"
] | laurent.cohen@jppf.org |
440b5849ec5274bed8c7a137c3d636f0990f640a | 5ec76201d1717f95d5f77c8d0d183f35b33ad1a6 | /src/main/java/com/scm/gsoft/domain/inv/InventarioS.java | 1fa51122edcf29aed6214e1119391ecf75973325 | [] | no_license | KevinMendez7/G-Soft | 7da92a5a722d629a1ddef6c53f6d667514134314 | 0f43c2c5094dc5c55afbc8e9d3f4d0fc101ab873 | refs/heads/master | 2020-03-28T18:17:28.018515 | 2018-09-15T04:31:54 | 2018-09-15T04:31:54 | 148,868,460 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,924 | java | package com.scm.gsoft.domain.inv;
// Generated 26/08/2018 02:38:20 AM by Hibernate Tools 4.3.1
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* Inventario. generated by hbm2java
*/
@Entity
@Table(name = "inventario$")
public class InventarioS implements java.io.Serializable {
@Id
@Column(name = "id_inventario$")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idInventarioS;
@Column(name = "repuestos")
private String repuestos;
@Column(name = "marca")
private String marca;
@Column(name = "linea")
private String linea;
@Column(name = "anio")
private String anio;
@Column(name = "lado")
private String lado;
@Column(name = "auto")
private String auto;
@Column(name = "f7")
private String f7;
@Column(name = "estan")
private Long estan;
@Column(name = "precio")
private Long precio;
@Column(name = "n_envio")
private String nEnvio;
@Column(name = "fecha")
private Date fecha;
@Column(name = "p_venta")
private Long pVenta;
@Column(name = "cod_gruppo")
private String codGruppo;
@Column(name = "codigo_grupo")
private String codigoGrupo;
@Column(name = "cod_marca")
private String codMarca;
@Column(name = "cod_linea")
private String codLinea;
@Column(name = "modelo")
private String modelo;
@Column(name = "cod_articulo")
private String codArticulo;
@Column(name = "cod_art")
private String codArt;
public InventarioS() {
}
public InventarioS(String repuestos, String marca, String linea, String anio, String lado, String auto, String f7,
Long estan, Long precio, String nEnvio, Date fecha, Long pVenta, String codGruppo, String codigoGrupo,
String codMarca, String codLinea, String modelo, String codArticulo, String codArt) {
this.repuestos = repuestos;
this.marca = marca;
this.linea = linea;
this.anio = anio;
this.lado = lado;
this.auto = auto;
this.f7 = f7;
this.estan = estan;
this.precio = precio;
this.nEnvio = nEnvio;
this.fecha = fecha;
this.pVenta = pVenta;
this.codGruppo = codGruppo;
this.codigoGrupo = codigoGrupo;
this.codMarca = codMarca;
this.codLinea = codLinea;
this.modelo = modelo;
this.codArticulo = codArticulo;
this.codArt = codArt;
}
public Long getIdInventarioS() {
return this.idInventarioS;
}
public void setIdInventarioS(Long idInventarioS) {
this.idInventarioS = idInventarioS;
}
public String getRepuestos() {
return this.repuestos;
}
public void setRepuestos(String repuestos) {
this.repuestos = repuestos;
}
public String getMarca() {
return this.marca;
}
public void setMarca(String marca) {
this.marca = marca;
}
public String getLinea() {
return this.linea;
}
public void setLinea(String linea) {
this.linea = linea;
}
public String getAnio() {
return this.anio;
}
public void setAnio(String anio) {
this.anio = anio;
}
public String getLado() {
return this.lado;
}
public void setLado(String lado) {
this.lado = lado;
}
public String getAuto() {
return this.auto;
}
public void setAuto(String auto) {
this.auto = auto;
}
public String getF7() {
return this.f7;
}
public void setF7(String f7) {
this.f7 = f7;
}
public Long getEstan() {
return this.estan;
}
public void setEstan(Long estan) {
this.estan = estan;
}
public Long getPrecio() {
return this.precio;
}
public void setPrecio(Long precio) {
this.precio = precio;
}
public String getNEnvio() {
return this.nEnvio;
}
public void setNEnvio(String nEnvio) {
this.nEnvio = nEnvio;
}
public Date getFecha() {
return this.fecha;
}
public void setFecha(Date fecha) {
this.fecha = fecha;
}
public Long getPVenta() {
return this.pVenta;
}
public void setPVenta(Long pVenta) {
this.pVenta = pVenta;
}
public String getCodGruppo() {
return this.codGruppo;
}
public void setCodGruppo(String codGruppo) {
this.codGruppo = codGruppo;
}
public String getCodigoGrupo() {
return this.codigoGrupo;
}
public void setCodigoGrupo(String codigoGrupo) {
this.codigoGrupo = codigoGrupo;
}
public String getCodMarca() {
return this.codMarca;
}
public void setCodMarca(String codMarca) {
this.codMarca = codMarca;
}
public String getCodLinea() {
return this.codLinea;
}
public void setCodLinea(String codLinea) {
this.codLinea = codLinea;
}
public String getModelo() {
return this.modelo;
}
public void setModelo(String modelo) {
this.modelo = modelo;
}
public String getCodArticulo() {
return this.codArticulo;
}
public void setCodArticulo(String codArticulo) {
this.codArticulo = codArticulo;
}
public String getCodArt() {
return this.codArt;
}
public void setCodArt(String codArt) {
this.codArt = codArt;
}
}
| [
"kevin_33_6@hotmail.com"
] | kevin_33_6@hotmail.com |
7f67b3d73fa8021bf387d61b151217697cc80dbd | e10cbe24faed9436d91839e3b153e154ac28e307 | /app/src/main/java/com/laoodao/smartagri/ui/discovery/contract/FertilizerDetailContract.java | c8a3facbbd8f4733d35312356e341868f50bacde | [] | no_license | xiaojunruit/Laodao | 1392416280c74297f837bcff29f5f387c729282f | 536c61e57757261a05d576f6185c9e22f4676ed3 | refs/heads/master | 2021-08-24T10:33:43.005913 | 2017-12-09T03:50:28 | 2017-12-09T03:50:28 | 113,647,937 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 575 | java | package com.laoodao.smartagri.ui.discovery.contract;
import com.laoodao.smartagri.base.BasePresenter;
import com.laoodao.smartagri.base.ListBaseView;
import com.laoodao.smartagri.bean.FertilizerDetail;
import com.laoodao.smartagri.bean.MicrobialFertilizerDetail;
/**
* Created by Administrator on 2017/5/16.
*/
public interface FertilizerDetailContract {
interface FertilizerDetailView extends ListBaseView {
void getDetail(FertilizerDetail detail);
}
interface Presenter<T> extends BasePresenter<T> {
void requestDetail(int id);
}
} | [
"llanlese@gmail.com"
] | llanlese@gmail.com |
35a798dc65917dec3db4ec2b297f530d842175a2 | 5fd3d2d20539d4e160f8ac293e0d4f1566a98a2c | /hz-fine-master/src/main/java/com/hz/fine/master/core/service/impl/DidOnoffServiceImpl.java | f51ff8d64e64f69d3b55be025e40f09958822151 | [] | no_license | hzhuazhi/hz-fine | eeac8ba3b7eecebf1934abab5a4610d3f7e0cd6f | addc43d2fe849e01ebd5b78300aae6fdf2171719 | refs/heads/master | 2022-12-14T12:24:59.982673 | 2020-09-05T11:02:02 | 2020-09-05T11:02:02 | 262,562,132 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,029 | java | package com.hz.fine.master.core.service.impl;
import com.hz.fine.master.core.common.dao.BaseDao;
import com.hz.fine.master.core.common.service.impl.BaseServiceImpl;
import com.hz.fine.master.core.mapper.DidOnoffMapper;
import com.hz.fine.master.core.model.did.DidOnoffModel;
import com.hz.fine.master.core.service.DidOnoffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Description 用户抢单上下线的Service层的实现层
* @Author yoko
* @Date 2020/6/30 17:18
* @Version 1.0
*/
@Service
public class DidOnoffServiceImpl<T> extends BaseServiceImpl<T> implements DidOnoffService<T> {
/**
* 5分钟.
*/
public long FIVE_MIN = 300;
public long TWO_HOUR = 2;
@Autowired
private DidOnoffMapper didOnoffMapper;
public BaseDao<T> getDao() {
return didOnoffMapper;
}
@Override
public int updateDidOnoff(DidOnoffModel model) {
return didOnoffMapper.updateDidOnoff(model);
}
}
| [
"duanfeng_1712@qq.com"
] | duanfeng_1712@qq.com |
1d54e31192633f334d997191e0d4cdf0757298e7 | 2a94229fd967dae8b4fb66dad9b1a24aad8c97b5 | /SkyApplication/app/src/main/java/com/sky/app/ui/adapter/GoodsGridViewAdapter.java | 014b2b302160bd5172ec7509552a3cc893bf3410 | [] | no_license | syuanlj/syrepository | 893682f915086042cf33dbe39b59f376355de5cf | 765e4c76f49d27692bd476ea0133001ee2e41630 | refs/heads/master | 2021-09-07T19:52:42.830626 | 2018-01-10T08:32:53 | 2018-01-10T08:32:53 | 104,959,439 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,930 | java | package com.sky.app.ui.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import com.sky.app.R;
import com.sky.app.bean.Goods;
import com.sky.app.library.utils.ImageHelper;
import java.util.List;
/**
* Created by Administrator on 2017/11/30 0030.
*/
public class GoodsGridViewAdapter extends BaseAdapter {
private Context context;
private List<Goods.ListBean> list;
private LayoutInflater mInflate = null;
public GoodsGridViewAdapter(List<Goods.ListBean> list, Context context) {
this.context = context;
this.list = list;
this.mInflate = LayoutInflater.from(context);
}
@Override
public int getCount() {
return list.size();
}
@Override
public Object getItem(int position) {
return list.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder=null;
if (convertView == null) {
viewHolder = new ViewHolder();
//根据自定义的Item布局加载布局
convertView = mInflate.inflate(R.layout.item_apphome_goods, null);
viewHolder.img = (ImageView) convertView.findViewById(R.id.goods_picher);
convertView.setTag(viewHolder);
} else {
viewHolder = (GoodsGridViewAdapter.ViewHolder) convertView.getTag();
}
ImageHelper.getInstance().displayDefinedImage(list.get(position).getProduct_image_url(), viewHolder.img,
R.mipmap.app_default_icon, R.mipmap.app_default_icon);
return convertView;
}
/**
* 视图
*/
static class ViewHolder {
public ImageView img;
}
}
| [
"893110793@qq.com"
] | 893110793@qq.com |
f1b128d66840cdcbd580fcbd95434dea49be775a | 150fc06016bc1da4cdc462c4a16422f87da0048b | /architecture-web-struts2/src/main/java/architecture/ee/web/struts2/interceptor/RefererInterceptor.java | f37fb526f8df64c977ccb3e12bd460d4d25cf173 | [] | no_license | donghyuck/legacy-architecture-project | 4bc634298924dc02e880f13ee7e270ca5ee64d6d | 16f63be80737192b69f786c667f590007a7b6f7a | refs/heads/master | 2023-04-15T05:59:42.255296 | 2016-08-17T06:49:19 | 2016-08-17T06:49:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,412 | java | package architecture.ee.web.struts2.interceptor;
import java.lang.reflect.Method;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.StrutsStatics;
import architecture.ee.web.struts2.annotation.SetReferer;
import architecture.ee.web.struts2.annotation.SetRefererNotInherited;
import architecture.ee.web.util.ServletUtils;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
/**
*
* @author <a href="mailto:donghyuck.son@gmail.com">Donghyuck Son </a>
*
*/
public class RefererInterceptor implements Interceptor {
public static final String URL_REFERER_KEY = "url.referer";
public void destroy() {
}
public void init() {
}
public String intercept(ActionInvocation invocation) throws Exception {
ActionContext context = invocation.getInvocationContext();
setReferer(invocation, context);
return invocation.invoke();
}
public void setReferer(ActionInvocation invocation, ActionContext context)
{
Map session = context.getSession();
if(session != null && setReferer(invocation))
session.put(URL_REFERER_KEY, getPageURL(context));
}
private boolean setReferer(ActionInvocation invocation)
{
SetReferer setReferer = null;
SetRefererNotInherited notInherited = null;
Object action = invocation.getAction();
String methodName = invocation.getProxy().getMethod();
if(methodName == null)
methodName = "execute";
try
{
Method method = action.getClass().getMethod(methodName, new Class[0]);
setReferer = (SetReferer)method.getAnnotation(SetReferer.class);
}
catch(NoSuchMethodException e)
{
try
{
methodName = (new StringBuilder()).append("do").append(methodName.substring(0, 1).toUpperCase()).append(methodName.substring(1)).toString();
Method method = action.getClass().getMethod(methodName, new Class[0]);
setReferer = (SetReferer)method.getAnnotation(SetReferer.class);
}
catch(NoSuchMethodException e1) { }
}
if(setReferer == null)
setReferer = (SetReferer)invocation.getAction().getClass().getAnnotation(SetReferer.class);
if(setReferer == null)
notInherited = (SetRefererNotInherited)invocation.getAction().getClass().getAnnotation(SetRefererNotInherited.class);
if(getPageURL(invocation.getInvocationContext()).contains("/404.jsp"))
return false;
else
return setReferer == null && notInherited == null || setReferer != null && setReferer.value() || notInherited != null && notInherited.value();
}
public String getPageURL(ActionContext ctx)
{
HttpServletRequest request = (HttpServletRequest)ctx.get(StrutsStatics.HTTP_REQUEST);
return getPageURL(request);
}
public String getPageURL(HttpServletRequest request)
{
StringBuilder page = new StringBuilder();
page.append(ServletUtils.getServletPath(request));
String queryString = request.getQueryString();
if(queryString != null && !"".equals(queryString.trim()))
page.append('?').append(queryString);
return page.toString();
}
}
| [
"andang.son@gmail.com"
] | andang.son@gmail.com |
4292f6ef2ef567b0c2e8da26a0d2f9314b53ffde | 41fdf47cb2579246ff7d57153c9d92f50ccfd52e | /els-romenext-rev3-web-portal/src/main/java/com/els/romenext/web/servlets/gui/RomenextDisplayServlet.java | 72205a5c282ec4fddf5ebc82a4d01992fa57869d | [] | no_license | RamyaSubash/romenext | 9b7206962d6d6db57769ec4f44088930e7ca8867 | e1ea3b305cf34e8966d012e822a9c61099652e41 | refs/heads/main | 2023-04-22T16:57:12.849414 | 2021-05-05T17:26:37 | 2021-05-05T17:26:37 | 364,650,368 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,198 | java | package com.els.romenext.web.servlets.gui;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.lang3.StringUtils;
import com.els.romenext.web.general.pojo.MysqlUser;
@WebServlet("/romenext/gui/split/display")
public class RomenextDisplayServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
System.out.println("Inside dispaly gui get");
this.doPost(req, resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
System.out.println("inside display gui post");
String selectedMetadata = req.getParameter("selectedMetadata");
String userGroupHost = req.getParameter("userGroupHost");
String userGroupName = req.getParameter("userGroupName");
String userName = req.getParameter("userName");
/**
* NOTE: Nothing works if we don't have this information, if any of this information is missing, we attempt to re-load all this from the session
* IF: We still don't have this information, we redirect to login page
*/
HttpSession session = req.getSession();
if( StringUtils.isAnyEmpty( userGroupHost, userGroupName, userName ) ) {
Object user_obj = session.getAttribute("user");
if( user_obj != null ) {
MysqlUser user = (MysqlUser) user_obj;
// selectedMetadata = user.getgr
userGroupHost = user.getGroupHost();
userGroupName = user.getGroupName();
userName = user.getNamespace();
}
}
if( StringUtils.isAnyEmpty( userGroupHost, userGroupName, userName ) ) {
// something is wrong, send to login page
// resp.getSession().setAttribute("from", req.getRequestURI());
resp.sendRedirect("/webguiportal/login");
return;
} else {
}
// String selectedDecorator= req.getParameter("selectedDecorator");
// String nameType = req.getParameter("nameType");
// String nameConn = req.getParameter("nameConn");
// String curType = req.getParameter("curType");
String listTypeIdsLength = req.getParameter("listTypeidsLength");
String listConnIdsLength = req.getParameter("listConnidsLength");
if( StringUtils.isEmpty( listTypeIdsLength ) ) {
listTypeIdsLength = "0";
}
if( StringUtils.isEmpty( listConnIdsLength ) ) {
listConnIdsLength = "0";
}
int tmpTypeIdsLength = Integer.parseInt(listTypeIdsLength);
int tmpConnIdsLength = Integer.parseInt(listConnIdsLength);
List<String> listTypeIds = new ArrayList<String>();
for (int i = 0; i < tmpTypeIdsLength; i++) {
String tmpStr = "type_id_"+String.valueOf(i);
listTypeIds.add(req.getParameter(tmpStr));
}
List<String> listConnIds = new ArrayList<String>();
for (int i = 0; i < tmpConnIdsLength; i++) {
String tmpStr = "conn_id_"+String.valueOf(i);
listConnIds.add(req.getParameter(tmpStr));
}
// String[] listTypeIds = req.getParameterValues("listTypeids");
// String[] listConnIds = req.getParameterValues("listConnids");
System.out.println("metadata ID in display servlet =============================== " + selectedMetadata);
// System.out.println("type name in display servlet =============================== " + nameType);
System.out.println("type id list in display servlet =============================== " + listTypeIds);
System.out.println("conn id list in display servlet =============================== " + listConnIds);
Map<String, String> user = new HashMap<String, String>();
user.put("username", userName);
user.put("proxyUser", userGroupName);
user.put("proxyUser_host", userGroupHost);
req.setAttribute("metadataSelected", selectedMetadata);
req.setAttribute("user", user);
// req.setAttribute("selectedDecorator", selectedDecorator );
// req.setAttribute("nameType", nameType);
// req.setAttribute("nameConn", nameConn);
// req.setAttribute("curType", curType);
req.setAttribute("listTypeidsLength", listTypeIdsLength);
req.setAttribute("listConnidsLength", listConnIdsLength);
req.setAttribute("listTypeids", listTypeIds);
req.setAttribute("listConnids", listConnIds);
req.setAttribute("startNodeForLinkingTypeId", req.getParameter("startNodeForLinkingTypeId"));
req.setAttribute("startNodeForLinkingTypeName", req.getParameter("startNodeForLinkingTypeName"));
req.setAttribute("startNodeForLinkingName", req.getParameter("startNodeForLinkingName"));
req.setAttribute("startNodeForLinkingUuid", req.getParameter("startNodeForLinkingUuid"));
req.setAttribute("endNodeForLinkingTypeId", req.getParameter("endNodeForLinkingTypeId"));
req.setAttribute("endNodeForLinkingTypeName", req.getParameter("endNodeForLinkingTypeName"));
req.setAttribute("endNodeForLinkingName", req.getParameter("endNodeForLinkingName"));
req.setAttribute("endNodeForLinkingUuid", req.getParameter("endNodeForLinkingUuid"));
/**
* Add the new decorator loader
*/
// get all decos
// DecoratorUtils decoUtils = new DecoratorUtils();
// DecoratorUtils decoUtils = new DecoratorUtils();
// List<RomeDecoratorVersion> decorators = decoUtils.getDecorators( RomeDecoratorClassification.INSTANCE );
//
//
// req.setAttribute("activedecos", decorators );
// session.setAttribute( "activedecos", decorators );
/**
* Assign the state
*/
req.setAttribute("guistate_main", "DISPLAY" );
req.setAttribute("guistate_sub", "BASE" );
session.setAttribute("guistate_main", "DISPLAY" );
session.setAttribute("guistate_sub", "BASE" );
req.getRequestDispatcher("/jsps/romenextgui_display.jsp").forward(req, resp);
// resp.sendRedirect("/jsps/split/display.jsp");
return;
}
} | [
"="
] | = |
162f258b1442d91ad70eeef43932dce98a5d8306 | f0d25d83176909b18b9989e6fe34c414590c3599 | /app/src/main/java/com/google/android/gms/location/places/PlaceTypes.java | 48ffd155258f36fd0b516ea7d475a1c804f673c5 | [] | no_license | lycfr/lq | e8dd702263e6565486bea92f05cd93e45ef8defc | 123914e7c0d45956184dc908e87f63870e46aa2e | refs/heads/master | 2022-04-07T18:16:31.660038 | 2020-02-23T03:09:18 | 2020-02-23T03:09:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,207 | java | package com.google.android.gms.location.places;
import com.google.android.gms.common.util.zzf;
import com.tencent.smtt.sdk.TbsListener;
import java.util.Set;
public class PlaceTypes {
public static final Set<Integer> ALL;
private static Set<Integer> zzbjJ = zzf.zzb(1001, 1002, 1003, 1005, 1006, 1009, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, Integer.valueOf(Place.TYPE_SUBLOCALITY), 1023, 1024, 1025, Integer.valueOf(Place.TYPE_SUBLOCALITY_LEVEL_4), Integer.valueOf(Place.TYPE_SUBLOCALITY_LEVEL_5), Integer.valueOf(Place.TYPE_SUBPREMISE));
private static Set<Integer> zzbjK = zzf.zzb(1001, 1002, 1003, 1005, 1009, 1015, 1016, 1017);
static {
Integer[] numArr = new Integer[TbsListener.ErrorCode.DOWNLOAD_THROWABLE];
numArr[0] = 1;
numArr[1] = 2;
numArr[2] = 3;
numArr[3] = 4;
numArr[4] = 5;
numArr[5] = 6;
numArr[6] = 7;
numArr[7] = 8;
numArr[8] = 9;
numArr[9] = 10;
numArr[10] = 11;
numArr[11] = 12;
numArr[12] = 13;
numArr[13] = 14;
numArr[14] = 15;
numArr[15] = 16;
numArr[16] = 17;
numArr[17] = 18;
numArr[18] = 19;
numArr[19] = 20;
numArr[20] = 21;
numArr[21] = 22;
numArr[22] = 23;
numArr[23] = 24;
numArr[24] = 25;
numArr[25] = 26;
numArr[26] = 27;
numArr[27] = 28;
numArr[28] = 29;
numArr[29] = 30;
numArr[30] = 31;
numArr[31] = 32;
numArr[32] = 33;
numArr[33] = 34;
numArr[34] = 35;
numArr[35] = 36;
numArr[36] = 37;
numArr[37] = 38;
numArr[38] = 39;
numArr[39] = 40;
numArr[40] = 41;
numArr[41] = 42;
numArr[42] = 43;
numArr[43] = 44;
numArr[44] = 45;
numArr[45] = 46;
numArr[46] = 47;
numArr[47] = 48;
numArr[48] = 49;
numArr[49] = 50;
numArr[50] = 51;
numArr[51] = 52;
numArr[52] = 53;
numArr[53] = 54;
numArr[54] = 55;
numArr[55] = 56;
numArr[56] = 57;
numArr[57] = 58;
numArr[58] = 59;
numArr[59] = 60;
numArr[60] = 61;
numArr[61] = 62;
numArr[62] = 63;
numArr[63] = 64;
numArr[64] = 65;
numArr[65] = 66;
numArr[66] = 67;
numArr[67] = 68;
numArr[68] = 69;
numArr[69] = 70;
numArr[70] = 71;
numArr[71] = 72;
numArr[72] = 73;
numArr[73] = 74;
numArr[74] = 75;
numArr[75] = 76;
numArr[76] = 77;
numArr[77] = 78;
numArr[78] = 79;
numArr[79] = 80;
numArr[80] = 81;
numArr[81] = 82;
numArr[82] = 83;
numArr[83] = 84;
numArr[84] = 85;
numArr[85] = 86;
numArr[86] = 87;
numArr[87] = 88;
numArr[88] = 89;
numArr[89] = 90;
numArr[90] = 91;
numArr[91] = 92;
numArr[92] = 93;
numArr[93] = 94;
numArr[94] = 95;
numArr[95] = 96;
numArr[96] = 1001;
numArr[97] = 1002;
numArr[98] = 1003;
numArr[99] = 1004;
numArr[100] = 1005;
numArr[101] = 1006;
numArr[102] = 1007;
numArr[103] = 1008;
numArr[104] = 1009;
numArr[105] = 1010;
numArr[106] = 1011;
numArr[107] = 1012;
numArr[108] = 1013;
numArr[109] = 1014;
numArr[110] = 1015;
numArr[111] = 1016;
numArr[112] = 1017;
numArr[113] = 1018;
numArr[114] = 1019;
numArr[115] = 1020;
numArr[116] = 1021;
numArr[117] = Integer.valueOf(Place.TYPE_SUBLOCALITY);
numArr[118] = 1023;
numArr[119] = 1024;
numArr[120] = 1025;
numArr[121] = Integer.valueOf(Place.TYPE_SUBLOCALITY_LEVEL_4);
numArr[122] = Integer.valueOf(Place.TYPE_SUBLOCALITY_LEVEL_5);
numArr[123] = Integer.valueOf(Place.TYPE_SUBPREMISE);
numArr[124] = Integer.valueOf(Place.TYPE_TRANSIT_STATION);
ALL = zzf.zzb(numArr);
}
private PlaceTypes() {
}
}
| [
"quyenlm.vn@gmail.com"
] | quyenlm.vn@gmail.com |
47c5b49df19de16127d5a3e31966098319f36c22 | ef1d87b64da817da712227fb869b2fd23b32e8a7 | /bus-oauth/src/main/java/org/aoju/bus/oauth/provider/PinterestProvider.java | 2a355ef27401db318d62530acdd1beff2508a9ab | [
"MIT"
] | permissive | Touhousupports/bus | b4a91563df2118d4b52a7c1345a8eb9c21380fd9 | e2e3951b9921d7a92c7e0fdce24781e08b588f00 | refs/heads/master | 2022-11-22T09:26:18.088266 | 2020-07-17T02:17:43 | 2020-07-17T02:17:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,929 | java | /*********************************************************************************
* *
* The MIT License (MIT) *
* *
* Copyright (c) 2015-2020 aoju.org and other contributors. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy *
* of this software and associated documentation files (the "Software"), to deal *
* in the Software without restriction, including without limitation the rights *
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN *
* THE SOFTWARE. *
********************************************************************************/
package org.aoju.bus.oauth.provider;
import com.alibaba.fastjson.JSONObject;
import org.aoju.bus.cache.metric.ExtendCache;
import org.aoju.bus.core.lang.Normal;
import org.aoju.bus.core.lang.Symbol;
import org.aoju.bus.core.lang.exception.AuthorizedException;
import org.aoju.bus.http.Httpx;
import org.aoju.bus.oauth.Builder;
import org.aoju.bus.oauth.Context;
import org.aoju.bus.oauth.Registry;
import org.aoju.bus.oauth.magic.AccToken;
import org.aoju.bus.oauth.magic.Callback;
import org.aoju.bus.oauth.magic.Property;
import java.util.Objects;
/**
* Pinterest登录
*
* @author Kimi Liu
* @version 6.0.3
* @since JDK 1.8+
*/
public class PinterestProvider extends AbstractProvider {
private static final String FAILURE = "failure";
public PinterestProvider(Context context) {
super(context, Registry.PINTEREST);
}
public PinterestProvider(Context context, ExtendCache extendCache) {
super(context, Registry.PINTEREST, extendCache);
}
@Override
public AccToken getAccessToken(Callback callback) {
JSONObject accessTokenObject = JSONObject.parseObject(doPostAuthorizationCode(callback.getCode()));
this.checkResponse(accessTokenObject);
return AccToken.builder()
.accessToken(accessTokenObject.getString("access_token"))
.tokenType(accessTokenObject.getString("token_type"))
.build();
}
@Override
public Property getUserInfo(AccToken accToken) {
String userinfoUrl = userInfoUrl(accToken);
JSONObject jsonObject = JSONObject.parseObject(Httpx.get(userinfoUrl));
this.checkResponse(jsonObject);
JSONObject object = jsonObject.getJSONObject("data");
return Property.builder()
.rawJson(object)
.uuid(object.getString("id"))
.avatar(getAvatarUrl(object))
.username(object.getString("username"))
.nickname(object.getString("first_name") + Symbol.SPACE + object.getString("last_name"))
.gender(Normal.Gender.UNKNOWN)
.remark(object.getString("bio"))
.token(accToken)
.source(source.toString())
.build();
}
private String getAvatarUrl(JSONObject jsonObject) {
JSONObject object = jsonObject.getJSONObject("image");
if (Objects.isNull(object)) {
return null;
}
return object.getJSONObject("60x60").getString("url");
}
/**
* 返回带{@code state}参数的授权url,授权回调时会带上这个{@code state}
*
* @param state state 验证授权流程的参数,可以防止csrf
* @return 返回授权地址
*/
@Override
public String authorize(String state) {
return Builder.fromUrl(source.authorize())
.queryParam("response_type", "code")
.queryParam("client_id", context.getAppKey())
.queryParam("redirect_uri", context.getRedirectUri())
.queryParam("scope", "read_public")
.queryParam("state", getRealState(state))
.build();
}
/**
* 返回获取userInfo的url
*
* @param accToken token
* @return 返回获取userInfo的url
*/
@Override
public String userInfoUrl(AccToken accToken) {
return Builder.fromUrl(source.userInfo())
.queryParam("access_token", accToken.getAccessToken())
.queryParam("fields", "id,username,first_name,last_name,bio,image")
.build();
}
/**
* 检查响应内容是否正确
*
* @param object 请求响应内容
*/
private void checkResponse(JSONObject object) {
if (!object.containsKey("status") && FAILURE.equals(object.getString("status"))) {
throw new AuthorizedException(object.getString("message"));
}
}
}
| [
"839536@qq.com"
] | 839536@qq.com |
9dcd49d3b66dba897a9177badb2fa47a16d966db | 917506d1c264e670dba9c492249cc32c043dd161 | /src/test/java/tec/uom/se/unit/BaseUnitTest.java | 14da6811e68013dc47a05e0818d61acd7e320846 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | lfoppiano/uom-se | ff286f4ad9f0f8073932afdd03a51e1a45c455bb | dd7ccb7ed4735c11022d7bb8fa8a492091b2f517 | refs/heads/master | 2021-01-17T14:30:06.648108 | 2016-05-18T14:04:00 | 2016-05-18T14:04:00 | 54,147,419 | 1 | 0 | null | 2016-03-17T19:57:29 | 2016-03-17T19:57:28 | null | UTF-8 | Java | false | false | 3,785 | java | /*
* Units of Measurement Implementation for Java SE
* Copyright (c) 2005-2016, Jean-Marie Dautelle, Werner Keil, V2COM.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of JSR-363 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 HOLDER 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 tec.uom.se.unit;
import javax.measure.quantity.Length;
import org.junit.Test;
import tec.uom.se.AbstractUnit;
import tec.uom.se.unit.BaseUnit;
import static org.junit.Assert.*;
/**
*
* @author Werner Keil
*/
public class BaseUnitTest {
private final AbstractUnit<Length> sut = new BaseUnit<>("m");
// public BaseUnitTest() {
// }
//
// @BeforeClass
// public static void setUpClass() throws Exception {
// }
//
// @AfterClass
// public static void tearDownClass() throws Exception {
// }
//
//
// @Test
// public void testAnnotate() {
// }
//
// @Test
// public void testGetAnnotation() {
// }
//
// @Test
// public void testGetUnannotatedUnit() {
// }
//
// @Test
// public void testIsSystemUnit() {
// }
//
// @Test
// public void testToString() {
// }
//
// @Test
// public void testGetConverterToSystemUnit() {
// }
//
// @Test
// public void testGetSymbol() {
// }
//
// @Test
// public void testGetSystemUnit() {
// }
//
// @Test
// public void testGetProductUnits() {
// }
//
// @Test
// public void testGetDimension() {
// }
//
// @Test
// public void testIsCompatible() {
// }
//
// @Test
// public void testAsType() {
// }
//
// @Test
// public void testGetConverterTo() {
// }
//
// @Test
// public void testGetConverterToAny() {
// }
//
// @Test
// public void testAlternate() {
// }
//
// @Test
// public void testTransform() {
// }
//
// @Test
// public void testAdd() {
// }
//
// @Test
// public void testMultiply_double() {
// }
//
// @Test
// public void testMultiply_ErrorType() {
// }
//
// @Test
// public void testInverse() {
// }
//
// @Test
// public void testDivide_double() {
// }
//
// @Test
// public void testDivide_ErrorType() {
// }
//
// @Test
// public void testRoot() {
// }
//
// @Test
// public void testPow() {
// }
//
// @Test
// public void testHashCode() {
// }
@Test
public void testEquals() {
assertTrue(sut.equals(new BaseUnit<Length>("m")));
}
} | [
"werner.keil@gmx.net"
] | werner.keil@gmx.net |
08332c2799b82440cc335db2fe9e68d77553134f | fba2092bf9c8df1fb6c053792c4932b6de017ceb | /wms/WEB-INF/src/jp/co/daifuku/wms/asrs/listbox/carrynobtn/LstAsCarryNoBtn.java | 30e1a964d0fbcd97ce407dfbe7bb7d05f3184f7f | [] | no_license | FlashChenZhi/exercise | 419c55c40b2a353e098ce5695377158bd98975d3 | 51c5f76928e79a4b3e1f0d68fae66ba584681900 | refs/heads/master | 2020-04-04T03:23:44.912803 | 2018-11-01T12:36:21 | 2018-11-01T12:36:21 | 155,712,318 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,184 | java | // $Id: LstAsCarryNoBtn.java 5892 2009-11-16 04:20:36Z okayama $
/*
* Copyright 2000-2001 DAIFUKU Co.,Ltd. All Rights Reserved.
*
* This software is the proprietary information of DAIFUKU Co.,Ltd.
* Use is subject to license terms.
*/
package jp.co.daifuku.wms.asrs.listbox.carrynobtn;
import jp.co.daifuku.bluedog.ui.control.Page;
/**
* ツールが生成した不可変クラスです。
*
* <BR>
* <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0">
* <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD>Date</TD><TD>Name</TD><TD>Comment</TD></TR>
* <TR><TD>2004/02/13</TD><TD>N.Sawa(DFK)</TD><TD>created this class</TD></TR>
* </TABLE>
* <BR>
* @version $Revision: 5892 $, $Date: 2009-11-16 13:20:36 +0900 (月, 16 11 2009) $
* @author $Author: okayama $
*/
public class LstAsCarryNoBtn extends Page
{
// Class variables -----------------------------------------------
/**
* ControlID lbl_ListName
* TemplateKey In_SettingName
* ControlType Label
*/
public jp.co.daifuku.bluedog.ui.control.Label lbl_ListName = jp.co.daifuku.bluedog.ui.control.LabelFactory.getInstance("lbl_ListName" , "In_SettingName");
/**
* ControlID message
* TemplateKey W_LstOperationMsg
* ControlType Message
*/
public jp.co.daifuku.bluedog.ui.control.Message message = jp.co.daifuku.bluedog.ui.control.MessageFactory.getInstance("message" , "W_LstOperationMsg");
/**
* ControlID pgr_U
* TemplateKey Pager
* ControlType Pager
*/
public jp.co.daifuku.bluedog.ui.control.Pager pgr_U = jp.co.daifuku.bluedog.ui.control.PagerFactory.getInstance("pgr_U" , "Pager");
/**
* ControlID lst_RestWorkNoButtonList
* TemplateKey W_RestWorkNoButtonList
* ControlType ScrollListCell
*/
public jp.co.daifuku.bluedog.ui.control.ScrollListCell lst_RestWorkNoButtonList = jp.co.daifuku.bluedog.ui.control.ScrollListCellFactory.getInstance("lst_RestWorkNoButtonList" , "W_RestWorkNoButtonList");
/**
* ControlID btn_Close_D
* TemplateKey Close
* ControlType SubmitButton
*/
public jp.co.daifuku.bluedog.ui.control.SubmitButton btn_Close_D = jp.co.daifuku.bluedog.ui.control.SubmitButtonFactory.getInstance("btn_Close_D" , "Close");
}
//end of class
| [
"zhangming@worgsoft.com"
] | zhangming@worgsoft.com |
cd2c2acf23112dae2a1104d7dfd6a68991ec1758 | 573b9c497f644aeefd5c05def17315f497bd9536 | /src/main/java/com/alipay/api/domain/MybankFinanceYulibaoAccountQueryModel.java | c3753e07aa2d6fe2c7adb2cd8907d87415331676 | [
"Apache-2.0"
] | permissive | zzzyw-work/alipay-sdk-java-all | 44d72874f95cd70ca42083b927a31a277694b672 | 294cc314cd40f5446a0f7f10acbb5e9740c9cce4 | refs/heads/master | 2022-04-15T21:17:33.204840 | 2020-04-14T12:17:20 | 2020-04-14T12:17:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 659 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 余利宝账户和收益查询
*
* @author auto create
* @since 1.0, 2016-11-18 16:07:46
*/
public class MybankFinanceYulibaoAccountQueryModel extends AlipayObject {
private static final long serialVersionUID = 4675355291244515533L;
/**
* 基金代码,必填。目前默认填001529,代表余利宝
*/
@ApiField("fund_code")
private String fundCode;
public String getFundCode() {
return this.fundCode;
}
public void setFundCode(String fundCode) {
this.fundCode = fundCode;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
4ec69ef78a2d35493d5598d0829d6b0fa6b4fb8d | 61602d4b976db2084059453edeafe63865f96ec5 | /com/huawei/hms/update/a/j.java | 7986c4a2ecc9346d8ff697f468087eca4ef08633 | [] | no_license | ZoranLi/thunder | 9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0 | 0778679ef03ba1103b1d9d9a626c8449b19be14b | refs/heads/master | 2020-03-20T23:29:27.131636 | 2018-06-19T06:43:26 | 2018-06-19T06:43:26 | 137,848,886 | 12 | 1 | null | null | null | null | UTF-8 | Java | false | false | 341 | java | package com.huawei.hms.update.a;
import com.huawei.hms.update.a.a.b;
/* compiled from: ThreadWrapper */
class j implements Runnable {
final /* synthetic */ b a;
final /* synthetic */ i b;
j(i iVar, b bVar) {
this.b = iVar;
this.a = bVar;
}
public void run() {
this.b.a.a(i.c(this.a));
}
}
| [
"lizhangliao@xiaohongchun.com"
] | lizhangliao@xiaohongchun.com |
27280755b0f143aaf658165f219568d7f675c6a1 | aae49c4e518bb8cb342044758c205a3e456f2729 | /GeogebraiOS/javasources/org/geogebra/common/kernel/statistics/AlgoInverseZipf.java | 0251bdb1d4213e97df05427fe485fc81e66685ed | [] | no_license | kwangkim/GeogebraiOS | 00919813240555d1f2da9831de4544f8c2d9776d | ca3b9801dd79a889da6cb2fdf24b761841fd3f05 | refs/heads/master | 2021-01-18T05:29:52.050694 | 2015-10-04T02:29:03 | 2015-10-04T02:29:03 | 45,118,575 | 4 | 2 | null | 2015-10-28T14:36:32 | 2015-10-28T14:36:31 | null | UTF-8 | Java | false | false | 1,564 | java | /*
GeoGebra - Dynamic Mathematics for Everyone
http://www.geogebra.org
This file is part of GeoGebra.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation.
*/
package org.geogebra.common.kernel.statistics;
import org.apache.commons.math.distribution.ZipfDistribution;
import org.geogebra.common.kernel.Construction;
import org.geogebra.common.kernel.arithmetic.NumberValue;
import org.geogebra.common.kernel.commands.Commands;
/**
*
* @author Michael Borcherds
*/
public class AlgoInverseZipf extends AlgoDistribution {
/**
* @param cons
* construction
* @param label
* label for output
* @param a
* number of elements
* @param b
* exponent
* @param c
* variable value
*/
public AlgoInverseZipf(Construction cons, String label, NumberValue a,
NumberValue b, NumberValue c) {
super(cons, label, a, b, c, null);
}
@Override
public Commands getClassName() {
return Commands.InverseZipf;
}
@Override
public final void compute() {
if (input[0].isDefined() && input[1].isDefined()
&& input[2].isDefined()) {
int param = (int) a.getDouble();
double param2 = b.getDouble();
double val = c.getDouble();
try {
ZipfDistribution dist = getZipfDistribution(param, param2);
num.setValue(dist.inverseCumulativeProbability(val) + 1);
} catch (Exception e) {
num.setUndefined();
}
} else
num.setUndefined();
}
}
| [
"kuoyichun1102@gmail.com"
] | kuoyichun1102@gmail.com |
2cf8f8ffaf5f495a27a050af557f8719d8a2ebea | ff8a1dcabe9b05d60098befc55cfbee2ab9d4b73 | /core/sorcer-dl/src/main/java/sorcer/service/Fi.java | f8f9f5dd1e3282cee190a3291348546cb0249ab0 | [
"Apache-2.0"
] | permissive | kubam10/SORCER | 4c423b0bddc8839ac54f8069c37dd6a392e23780 | 670cba3188954eb4cd2e16890715b8948819b5f6 | refs/heads/master | 2020-04-18T23:55:19.359267 | 2019-02-02T18:29:14 | 2019-02-02T18:29:14 | 167,833,815 | 0 | 1 | Apache-2.0 | 2019-01-27T16:58:57 | 2019-01-27T16:58:57 | null | UTF-8 | Java | false | false | 1,797 | java | /*
* Copyright 2009 the original author or authors.
* Copyright 2009 SorcerSoft.org.
*
* 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 sorcer.service;
public interface Fi {
final static int e = 0;
final static int s = 1;
final static int r = 2;
final static int c = 3;
final static int m = 4;
final static int v = 5;
final static int vFi = 6;
final static int ev = 7;
final static int gt = 8;
final static int st = 9;
final static int gr = 10;
final static int dVar = 11;
public enum Type implements Arg {
ENTRY, SIG, REF, COMPONENT, MORPH, VAR, VAR_FI, PROC, EVALUATOR, GETTER, SETTER, GRADIENT, DERIVATIVE,
MULTI, REQUEST, UPDATE, ADD, REPLACE, DELETE, SELECT, META, NAME, SOA, IF, IF_SOA, SYS, CONTEXT, MODEL, NEO, MDA, CONFIG;
static public String name(int fiType) {
for (Type s : Type.values()) {
if (fiType == s.ordinal())
return "" + s;
}
return null;
}
static public Type type(int fiType) {
for (Type s : Type.values()) {
if (fiType == s.ordinal())
return s;
}
return null;
}
public String getName() {
return toString();
}
}
public boolean isValid();
}
| [
"sobol@sorcersoft.org"
] | sobol@sorcersoft.org |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.