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
c6d8738226fca5c43a772a7cb53f54aaf156ae88
f35f4008d60bf04e6e3236a60514693cae296d42
/app/src/main/java/com/google/android/gms/wallet/c.java
b49e402a20c823586bce9457c90317d75c33b039
[]
no_license
alsmwsk/golfmon
ef0c8e8c7ecaa13371deed40f7e20468b823b0e9
740132d47185bfe9ec9d6774efbde5404ea8cf6d
refs/heads/master
2020-03-22T11:16:01.438894
2018-07-06T09:47:10
2018-07-06T09:47:10
139,959,669
0
0
null
null
null
null
UTF-8
Java
false
false
1,645
java
package com.google.android.gms.wallet; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.a; import com.google.android.gms.common.internal.safeparcel.a.a; import com.google.android.gms.common.internal.safeparcel.b; public class c implements Parcelable.Creator<CountrySpecification> { static void a(CountrySpecification paramCountrySpecification, Parcel paramParcel, int paramInt) { int i = b.H(paramParcel); b.c(paramParcel, 1, paramCountrySpecification.getVersionCode()); b.a(paramParcel, 2, paramCountrySpecification.vk, false); b.H(paramParcel, i); } public CountrySpecification dL(Parcel paramParcel) { int i = a.G(paramParcel); int j = 0; String str = null; while (paramParcel.dataPosition() < i) { int k = a.F(paramParcel); switch (a.aH(k)) { default: a.b(paramParcel, k); break; case 1: j = a.g(paramParcel, k); break; case 2: str = a.o(paramParcel, k); } } if (paramParcel.dataPosition() != i) { throw new a.a("Overread allowed size end=" + i, paramParcel); } return new CountrySpecification(j, str); } public CountrySpecification[] fS(int paramInt) { return new CountrySpecification[paramInt]; } } /* Location: C:\Users\TGKIM\Downloads\작업폴더\리버싱\androidReversetools\jd-gui-0.3.6.windows\com.appg.golfmon-1-dex2jar.jar * Qualified Name: com.google.android.gms.wallet.c * JD-Core Version: 0.7.0.1 */
[ "alsmwsk@naver.com" ]
alsmwsk@naver.com
8151612c440eee0d95047779531f247be69c46d5
f08191da262305786287bd1a4a41671a1c1960f7
/MiuiSystemUI/umi/systemui/recents/events/ui/UpdateFreeformTaskViewVisibilityEvent.java
1fc7ecf10248869dc2cf8c59366181fe922ac74e
[]
no_license
lmjssjj/arsc_compare
f75acb947d890503defb9189e78e7019cb9b58e4
bf5ce3bb50f6b1595d373cd159f83b6b800dff37
refs/heads/master
2022-11-11T02:42:10.896103
2020-07-08T00:46:54
2020-07-08T00:46:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
324
java
package com.android.systemui.recents.events.ui; import com.android.systemui.recents.events.RecentsEventBus; public class UpdateFreeformTaskViewVisibilityEvent extends RecentsEventBus.Event { public final boolean visible; public UpdateFreeformTaskViewVisibilityEvent(boolean z) { this.visible = z; } }
[ "viiplycn@gmail.com" ]
viiplycn@gmail.com
b88a99ec05868b7e7710c15076825a2b304cb9cc
1f5c68f68b12b314d062c8c94b4824a533b4a7a3
/com/planet_ink/coffee_mud/WebMacros/RaceClassNext.java
3bc8a63625036ae3fd9878514a95105454a70c80
[ "Apache-2.0" ]
permissive
leonlee/CoffeeMud
ff29abc60a77d03675375a9097572780a14b86c3
c35383fc53bd3947b6b8579a581e9eb792e15ef9
refs/heads/master
2020-06-09T15:47:32.771688
2016-12-08T07:12:47
2016-12-08T07:12:47
76,030,486
1
0
null
2016-12-09T11:38:35
2016-12-09T11:38:34
null
UTF-8
Java
false
false
2,687
java
package com.planet_ink.coffee_mud.WebMacros; import com.planet_ink.coffee_web.interfaces.*; 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.Libraries.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.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2002-2016 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 RaceClassNext extends StdWebMacro { @Override public String name() { return "RaceClassNext"; } @Override public String runMacro(HTTPRequest httpReq, String parm, HTTPResponse httpResp) { final java.util.Map<String,String> parms=parseParms(parm); final String race=httpReq.getUrlParameter("RACE"); if(race.length()==0) return " @break@"; final Race R=CMClass.getRace(race); final String last=httpReq.getUrlParameter("CLASS"); if(parms.containsKey("RESET")) { if(last!=null) httpReq.removeUrlParameter("CLASS"); return ""; } String lastID=""; for(final Enumeration<CharClass> c=CMClass.charClasses();c.hasMoreElements();) { final CharClass C=c.nextElement(); if(((CMProps.isTheme(C.availabilityCode()))||(parms.containsKey("ALL"))) &&(C.isAllowedRace(R))) { if((last==null)||((last.length()>0)&&(last.equals(lastID))&&(!C.ID().equals(lastID)))) { httpReq.addFakeUrlParameter("CLASS",C.ID()); return ""; } lastID=C.ID(); } } httpReq.addFakeUrlParameter("CLASS",""); if(parms.containsKey("EMPTYOK")) return "<!--EMPTY-->"; return " @break@"; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
1c99706f5e3e74dbf238cd221f5d7c22f8714e71
ab4895442669f554248860525bf1c3e3348f568e
/SpringViewDemo/app/src/test/java/com/byx/zz/springviewdemo/ExampleUnitTest.java
5b6a95347f94734184b96bf484de7955150fc949
[]
no_license
canwhite/QCAndroidResource
5cc280c9142859c3a8c51eab565b460424c2ab19
c9e0d24ce6e2f4e0aebe91bfe68da01a3ee3a72e
refs/heads/master
2020-03-18T13:32:52.167595
2018-09-13T03:24:45
2018-09-13T03:24:45
134,791,033
20
0
null
null
null
null
UTF-8
Java
false
false
419
java
package com.byx.zz.springviewdemo; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "tony@gmail.com" ]
tony@gmail.com
8d40c50348bf9da95ca345048cf6531a4bc14a9f
7c87a85b35e47d4640283d12c40986e7b8a78e6f
/moneyfeed/moneyfeed-web/src/main/java/com/newhope/moneyfeed/web/wechat/WechatMsgSendController.java
8eb216faf463d56bcf38579d83d0f7b8426c66f0
[]
no_license
newbigTech/moneyfeed
191b0bd4c98b49fa6be759ed16817b96c6e853b3
2bd8bdd10ddfde3f324060f7b762ec3ed6e25667
refs/heads/master
2020-04-24T13:05:44.308618
2019-01-15T07:59:03
2019-01-15T07:59:03
171,975,920
0
3
null
2019-02-22T01:53:12
2019-02-22T01:53:12
null
UTF-8
Java
false
false
1,098
java
package com.newhope.moneyfeed.web.wechat; import com.newhope.moneyfeed.api.abscontroller.AbstractController; import com.newhope.moneyfeed.api.dto.request.wechat.WechatMsgDtoReq; import com.newhope.moneyfeed.api.dto.response.DtoResult; import com.newhope.moneyfeed.api.rest.wechat.WechatMsgAPI; import com.newhope.moneyfeed.api.service.wechat.WechatMsgSendService; import com.newhope.moneyfeed.api.vo.base.BaseResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; /** * Created by liming on 2018/11/21. */ @RestController public class WechatMsgSendController extends AbstractController implements WechatMsgAPI{ @Autowired private WechatMsgSendService wechatMsgSendService; @Override public BaseResponse<DtoResult> sendWechatMsg(@RequestBody WechatMsgDtoReq wechatMsgDtoReq) { final DtoResult dtoResult = wechatMsgSendService.sendMsg(wechatMsgDtoReq); return buildJson(dtoResult); } }
[ "505235893@qq.com" ]
505235893@qq.com
07d455428d23f6f20a06b4761f0342ff2b422244
0a91b205817956abfd4d59f8db54626980de551b
/TravelGoodSOAP/TravelGoodClient/build/generated/jax-wsCache/service/wsdl/BookFlightFaultType.java
a73d136833f309d6cc4f88923115cf03c28d9b40
[]
no_license
sp3r6ain/REST-vs-BPEL
92c0703d9b8cf2b14e9bbe967300a1dcefe847e9
c4c2ea0b3e7037d34eacd233c424d988b721f256
refs/heads/master
2021-01-01T06:51:55.925453
2015-10-17T20:37:27
2015-10-17T20:37:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,583
java
package wsdl; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Clase Java para bookFlightFaultType complex type. * * <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. * * <pre> * &lt;complexType name="bookFlightFaultType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "bookFlightFaultType", namespace = "http://xml.netbeans.org/schema/AirlineSchema", propOrder = { "description" }) public class BookFlightFaultType { @XmlElement(namespace = "http://xml.netbeans.org/schema/AirlineSchema", required = true) protected String description; /** * Obtiene el valor de la propiedad description. * * @return * possible object is * {@link String } * */ public String getDescription() { return description; } /** * Define el valor de la propiedad description. * * @param value * allowed object is * {@link String } * */ public void setDescription(String value) { this.description = value; } }
[ "masterkai_1977@hotmail.com" ]
masterkai_1977@hotmail.com
4e889e1d18019a2dbdfc176b593c4187e269b73c
dedd8b238961dbb6889a864884e011ce152d1d5c
/src/com/google/common/collect/SparseImmutableTable.java
4a9365fefe3b6582e65ac1695210ebdb62c9a732
[]
no_license
reverseengineeringer/gov.cityofboston.commonwealthconnect
d553a8a7a4fcd7b846eebadb6c1e3e9294919eb7
1a829995d5527f4d5798fa578ca1b0fe499839e1
refs/heads/master
2021-01-10T05:08:31.188375
2016-03-19T20:37:17
2016-03-19T20:37:17
54,285,966
0
1
null
null
null
null
UTF-8
Java
false
false
4,436
java
package com.google.common.collect; import com.google.common.annotations.GwtCompatible; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import javax.annotation.concurrent.Immutable; @GwtCompatible @Immutable final class SparseImmutableTable<R, C, V> extends RegularImmutableTable<R, C, V> { private final ImmutableMap<C, Map<R, V>> columnMap; private final int[] iterationOrderColumn; private final int[] iterationOrderRow; private final ImmutableMap<R, Map<C, V>> rowMap; SparseImmutableTable(ImmutableList<Table.Cell<R, C, V>> paramImmutableList, ImmutableSet<R> paramImmutableSet, ImmutableSet<C> paramImmutableSet1) { HashMap localHashMap = Maps.newHashMap(); Object localObject1 = Maps.newLinkedHashMap(); paramImmutableSet = paramImmutableSet.iterator(); while (paramImmutableSet.hasNext()) { localObject2 = paramImmutableSet.next(); localHashMap.put(localObject2, Integer.valueOf(((Map)localObject1).size())); ((Map)localObject1).put(localObject2, new LinkedHashMap()); } paramImmutableSet = Maps.newLinkedHashMap(); paramImmutableSet1 = paramImmutableSet1.iterator(); while (paramImmutableSet1.hasNext()) { paramImmutableSet.put(paramImmutableSet1.next(), new LinkedHashMap()); } paramImmutableSet1 = new int[paramImmutableList.size()]; Object localObject2 = new int[paramImmutableList.size()]; int i = 0; while (i < paramImmutableList.size()) { Object localObject5 = (Table.Cell)paramImmutableList.get(i); Object localObject3 = ((Table.Cell)localObject5).getRowKey(); Object localObject4 = ((Table.Cell)localObject5).getColumnKey(); localObject5 = ((Table.Cell)localObject5).getValue(); paramImmutableSet1[i] = ((Integer)localHashMap.get(localObject3)).intValue(); Object localObject6 = (Map)((Map)localObject1).get(localObject3); localObject2[i] = ((Map)localObject6).size(); localObject6 = ((Map)localObject6).put(localObject4, localObject5); if (localObject6 != null) { throw new IllegalArgumentException("Duplicate value for row=" + localObject3 + ", column=" + localObject4 + ": " + localObject5 + ", " + localObject6); } ((Map)paramImmutableSet.get(localObject4)).put(localObject3, localObject5); i += 1; } iterationOrderRow = paramImmutableSet1; iterationOrderColumn = ((int[])localObject2); paramImmutableList = ImmutableMap.builder(); paramImmutableSet1 = ((Map)localObject1).entrySet().iterator(); while (paramImmutableSet1.hasNext()) { localObject1 = (Map.Entry)paramImmutableSet1.next(); paramImmutableList.put(((Map.Entry)localObject1).getKey(), ImmutableMap.copyOf((Map)((Map.Entry)localObject1).getValue())); } rowMap = paramImmutableList.build(); paramImmutableList = ImmutableMap.builder(); paramImmutableSet = paramImmutableSet.entrySet().iterator(); while (paramImmutableSet.hasNext()) { paramImmutableSet1 = (Map.Entry)paramImmutableSet.next(); paramImmutableList.put(paramImmutableSet1.getKey(), ImmutableMap.copyOf((Map)paramImmutableSet1.getValue())); } columnMap = paramImmutableList.build(); } public ImmutableMap<C, Map<R, V>> columnMap() { return columnMap; } Table.Cell<R, C, V> getCell(int paramInt) { int i = iterationOrderRow[paramInt]; Map.Entry localEntry = (Map.Entry)rowMap.entrySet().asList().get(i); Object localObject = (ImmutableMap)localEntry.getValue(); paramInt = iterationOrderColumn[paramInt]; localObject = (Map.Entry)((ImmutableMap)localObject).entrySet().asList().get(paramInt); return cellOf(localEntry.getKey(), ((Map.Entry)localObject).getKey(), ((Map.Entry)localObject).getValue()); } V getValue(int paramInt) { int i = iterationOrderRow[paramInt]; ImmutableMap localImmutableMap = (ImmutableMap)rowMap.values().asList().get(i); paramInt = iterationOrderColumn[paramInt]; return (V)localImmutableMap.values().asList().get(paramInt); } public ImmutableMap<R, Map<C, V>> rowMap() { return rowMap; } public int size() { return iterationOrderRow.length; } } /* Location: * Qualified Name: com.google.common.collect.SparseImmutableTable * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
90c45a44926c5b63833e2a9d02dbceaf3a2336b0
eb2c22492d4740a3eb455f2a898f6b3bc8235809
/jnnsBank/account-service/src/main/java/com/ideatech/ams/account/entity/OrganizationMapPo.java
6714ea5fc679d8ab1f36fb8f477edac9fa7026bd
[]
no_license
deepexpert-gaohz/sa-d
72a2d0cbfe95252d2a62f6247e7732c883049459
2d14275071b3d562447d24bd44d3a53f5a96fb71
refs/heads/master
2023-03-10T08:39:15.544657
2021-02-24T02:17:58
2021-02-24T02:17:58
341,395,351
1
0
null
null
null
null
UTF-8
Java
false
false
593
java
package com.ideatech.ams.account.entity; import com.ideatech.common.entity.BaseMaintainablePo; import lombok.Data; import javax.persistence.Column; import javax.persistence.Entity; import java.io.Serializable; @Data @Entity public class OrganizationMapPo extends BaseMaintainablePo implements Serializable { /** * 序列化ID,缓存需要 */ private static final long serialVersionUID = 54541121212135342L; @Column(length = 50) private String organcode; //S数字化管理平台需要的字段 @Column(length = 50) private String dmpOrganCode; }
[ "807661486@qq.com" ]
807661486@qq.com
058b8b6c7177d3fe594b352a169ae80dbfc52c6a
e32ac5f355aaef9ff8cf5e7be8f0416a2e5a221d
/objectos-comuns-io/src/main/java/br/com/objectos/comuns/io/csv/IntegerCsvConverter.java
2954e11dc95e4a24c866dfc78606fc1773cbe0e2
[ "Apache-2.0" ]
permissive
gustavomel0/objectos-comuns-parent
0b5c1123a1f077f320e4117291da9fb503e41174
5e10fd95e04c42808e9d968756731db22da80237
refs/heads/master
2021-01-18T11:14:52.915072
2012-12-07T10:17:31
2012-12-07T10:17:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
896
java
/* * Copyright 2011 Objectos, Fábrica de Software LTDA. * * 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 br.com.objectos.comuns.io.csv; /** * @author thalita.palhares@objectos.com.br (Thalita Palhares) */ public class IntegerCsvConverter extends AbstractCsvConverter<Integer> { @Override protected Integer convert(String text) { return Integer.valueOf(text); } }
[ "marcio.endo@objectos.com.br" ]
marcio.endo@objectos.com.br
23f1e7aedeb786734749251944ded64faae7aeff
5d1518b7601b6f6790569d67e36b437440287317
/src/main/java/com/example/demo/zzz/chap11/Person.java
b06ad485cbe8720e34e1d54f90ad735899e4035e
[]
no_license
eeeb0053/SpringMVC-h
56811c92d4cde8b06794a6c3fb26a9f9b57fbb00
9b49cbecfe2eede398ef03c3e79a4d0c8a3f56f7
refs/heads/master
2023-02-13T12:25:08.838292
2021-01-13T07:33:39
2021-01-13T07:33:39
328,401,186
0
0
null
null
null
null
UTF-8
Java
false
false
240
java
package com.example.demo.zzz.chap11; import java.util.Optional; public class Person { private Optional<Car> car; private int age; public Optional<Car> getCar() { return car; } public int getAge() { return age; } }
[ "eeeb0053@gmail.com" ]
eeeb0053@gmail.com
34b7791e3b44e517268024ddeab767c2aa794a00
e9886898f83a441cfb6d6e7bbbb2813847c4574c
/admin/src/com/formBean/API/APICustomerAmountDetails.java
4cbb4d026bae58ecfe8d71966d3425946dd07fda
[]
no_license
msmartpay/proxima
3f792d1d49dd9ae5526c0567e7439c2f96220ba1
a4d2969c5eac96b6b2bb0cab439723220183bb6c
refs/heads/main
2023-04-19T18:40:22.362280
2021-05-04T12:23:44
2021-05-04T12:27:40
302,057,747
0
1
null
null
null
null
UTF-8
Java
false
false
1,407
java
package com.formBean.API; import java.sql.Time; import java.sql.Date; public class APICustomerAmountDetails { private long ApiId; private double totalcash; private double usedCash; private double cuttoff; private double avalBal; private double lastUpdatedAmount; private Date updatedDate; private Time updatedTime; public long getApiId() { return ApiId; } public void setApiId(long apiId) { ApiId = apiId; } public double getTotalcash() { return totalcash; } public double getUsedCash() { return usedCash; } public double getCuttoff() { return cuttoff; } public double getAvalBal() { return avalBal; } public double getLastUpdatedAmount() { return lastUpdatedAmount; } public Date getUpdatedDate() { return updatedDate; } public Time getUpdatedTime() { return updatedTime; } public void setTotalcash(double totalcash) { this.totalcash = totalcash; } public void setUsedCash(double usedCash) { this.usedCash = usedCash; } public void setCuttoff(double cuttoff) { this.cuttoff = cuttoff; } public void setAvalBal(double avalBal) { this.avalBal = avalBal; } public void setLastUpdatedAmount(double lastUpdatedAmount) { this.lastUpdatedAmount = lastUpdatedAmount; } public void setUpdatedDate(Date updatedDate) { this.updatedDate = updatedDate; } public void setUpdatedTime(Time updatedTime) { this.updatedTime = updatedTime; } }
[ "care@softsolutionzone.in" ]
care@softsolutionzone.in
f0799972979de6881c98e3c5d14eaa953c81c56d
0105fb4be6f52cc17e7405293d888ef44cf7bd21
/microservice-parent2/api-info-monitor/src/main/java/com/miduchina/wrd/api/controller/v1/order/OrderExportRelationController.java
c08fc79d30d59a96c4adda746cc3cdbe8f7f3bbd
[]
no_license
Ityho/test
10d70169ba8b58fd07bbbf6e2ea403c796398fbc
ed53ef344585453efc6851b250ae151468610204
refs/heads/master
2021-06-24T09:09:51.659625
2019-11-13T12:24:42
2019-11-13T12:24:42
218,066,071
0
0
null
null
null
null
UTF-8
Java
false
false
2,857
java
package com.miduchina.wrd.api.controller.v1.order; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.miduchina.wrd.CodeConstant; import com.miduchina.wrd.api.service.order.OrderExportRelationService; import com.miduchina.wrd.dto.BaseDto; import com.miduchina.wrd.po.order.OrderExportRelation; import io.swagger.annotations.ApiOperation; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * @auther Administrator * @vreate 2019-05 15:38 */ @RestController @RequestMapping("api/v1/orderExportRelation") public class OrderExportRelationController { @Autowired private OrderExportRelationService orderExportRelationService; @ApiOperation(value = "查询未创建任务的已支付订单", produces = "application/json") @RequestMapping(method = { RequestMethod.GET,RequestMethod.POST }, value = "findOrderExportStatus") public BaseDto findOrderExportStatus(@RequestBody String params) { BaseDto baseDto = new BaseDto(); // CartRecord cartRecord = new CartRecord(); JSONObject jsonObject = JSON.parseObject(params); String str = jsonObject.getString("userId"); if(StringUtils.isNotBlank(str)){ List<OrderExportRelation> b = orderExportRelationService.findOrderExportStatus(str); if (CollectionUtils.isEmpty(b)){ baseDto.setCode(CodeConstant.SUCCESS_CODE).setData(b); }else{ baseDto.setCode(CodeConstant.FAILURE_CODE); } }else{ baseDto.setCode(CodeConstant.ERROR_CODE_1000).setMessage("缺少用户id"); } return baseDto; } @ApiOperation(value = "保存未支付订单的记录以及条件", produces = "application/json") @RequestMapping(method = { RequestMethod.GET,RequestMethod.POST }, value = "saveOrUpdateOrderExport") public BaseDto saveOrUpdateOrderExport(@RequestBody String params) { BaseDto baseDto = new BaseDto(); // CartRecord cartRecord = new CartRecord(); JSONObject jsonObject = JSON.parseObject(params); String str = jsonObject.getString("userId"); if(StringUtils.isNotBlank(str)){ OrderExportRelation oer = JSON.parseObject(str, OrderExportRelation.class); Boolean b = orderExportRelationService.saveOrUpdateOrderExport(oer); if (b){ baseDto.setCode(CodeConstant.SUCCESS_CODE).setData(b); }else{ baseDto.setCode(CodeConstant.FAILURE_CODE); } }else{ baseDto.setCode(CodeConstant.ERROR_CODE_1000).setMessage("缺少用户id"); } return baseDto; } }
[ "yhoxiaohaio@163.com" ]
yhoxiaohaio@163.com
fa5381811113b71d807f2af8914d35c31244fc91
a4a51084cfb715c7076c810520542af38a854868
/src/main/java/com/garena/reactpush/e/e/a.java
803899ab4dc9897061988ca3d9f61455a703d408
[]
no_license
BharathPalanivelu/repotest
ddaf56a94eb52867408e0e769f35bef2d815da72
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
refs/heads/master
2020-09-30T18:55:04.802341
2019-12-02T10:52:08
2019-12-02T10:52:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,021
java
package com.garena.reactpush.e.e; import android.content.Context; import com.garena.reactpush.b.b; import com.garena.reactpush.c.b; import com.garena.reactpush.c.c; import com.garena.reactpush.d.d; import com.garena.reactpush.d.h; import com.garena.reactpush.data.BundleState; import com.garena.reactpush.data.Manifest; import java.io.File; import okhttp3.Call; import okhttp3.OkHttpClient; public class a implements h { /* renamed from: a reason: collision with root package name */ private final int f8454a; /* renamed from: b reason: collision with root package name */ private final int f8455b; /* access modifiers changed from: private */ /* renamed from: c reason: collision with root package name */ public final b f8456c; /* renamed from: d reason: collision with root package name */ private final int f8457d; /* access modifiers changed from: private */ /* renamed from: e reason: collision with root package name */ public final String f8458e; /* access modifiers changed from: private */ /* renamed from: f reason: collision with root package name */ public final String f8459f; /* access modifiers changed from: private */ /* renamed from: g reason: collision with root package name */ public final OkHttpClient f8460g; private d h; /* access modifiers changed from: private */ public boolean i = false; public a(OkHttpClient okHttpClient, float f2, b bVar, int i2, String str, int i3, int i4) { this.f8454a = i2; this.f8460g = okHttpClient; this.f8455b = i3; this.f8457d = i4; this.f8456c = bVar; this.f8458e = com.garena.reactpush.b.a(f2); this.f8459f = str; this.h = new d(bVar, this.f8458e, this.f8459f); } public boolean a(Context context, boolean z) { try { BundleState c2 = this.f8456c.c(); if (!c2.isAppUpdate(this.f8455b) && c2.isSyncLocalSucccess()) { if (!z) { return true; } } boolean a2 = this.h.a(context.getResources().openRawResource(this.f8454a), (Manifest) com.garena.reactpush.b.f6698a.a(c.a(context, this.f8457d), Manifest.class)); c2.setAppVersion(this.f8455b); c2.setNeedImageZipDownload(true); this.f8456c.a(c2); return a2; } catch (Exception unused) { return false; } } public void b() { final BundleState c2 = this.f8456c.c(); if (c2.isNeedImageZipDownload() && !this.i) { this.i = true; com.garena.reactpush.b.f6701d.a("Image Zip Pack. [Downloading=true]"); new Thread(new Runnable() { public void run() { String drawableZip = a.this.f8456c.a().getBundles().get(0).getDrawableZip(a.this.f8458e); String c2 = a.this.f8459f; new com.garena.reactpush.c.h(a.this.f8460g, c2.concat("drawable-" + a.this.f8458e).concat(".zip"), a.this.f8459f, drawableZip, new b.a() { public void a(Call call, Exception exc) { com.garena.reactpush.b.f6701d.a("Image Zip Pack. [Failed=true]"); c2.setNeedImageZipDownload(true); a.this.f8456c.a(c2); boolean unused = a.this.i = false; } public void a(File file) { com.garena.reactpush.b.f6701d.a("Image Zip Pack. [Downloaded=true]"); c2.setNeedImageZipDownload(false); a.this.f8456c.a(c2); boolean unused = a.this.i = false; } }).a(); } }).start(); } } public boolean a(Context context) { return a(context, true); } public void a() { b(); } }
[ "noiz354@gmail.com" ]
noiz354@gmail.com
ca4f29b66d88b1309dddc472edc7916a589fc3aa
1689e51348e6069008b216c4aef3f312abe4e7a7
/invoice/src/main/java/org/killbill/billing/invoice/usage/SubscriptionConsumableInArrear.java
6707195faa591d814e6812b1c8db24d7cd3b4c90
[ "Apache-2.0" ]
permissive
ning/killbill
cbf881b32f51d5919d313d601e44f76298a67c55
e3ec4ab20fa55f4fe47d05813f9965895f2eba2f
refs/heads/master
2023-08-31T02:32:15.559728
2014-04-29T14:36:31
2014-04-29T14:36:31
2,668,181
3
6
null
null
null
null
UTF-8
Java
false
false
6,266
java
/* * Copyright 2014 The Billing Project, LLC * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package org.killbill.billing.invoice.usage; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.UUID; import javax.annotation.Nullable; import org.joda.time.LocalDate; import org.killbill.billing.catalog.api.BillingMode; import org.killbill.billing.catalog.api.CatalogApiException; import org.killbill.billing.catalog.api.Usage; import org.killbill.billing.catalog.api.UsageType; import org.killbill.billing.invoice.api.InvoiceItem; import org.killbill.billing.junction.BillingEvent; import org.killbill.billing.usage.api.UsageUserApi; import org.killbill.billing.util.callcontext.TenantContext; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import com.google.common.collect.Collections2; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; /** * There is one such class created for each subscriptionId referenced in the billingEvents. */ public class SubscriptionConsumableInArrear { private final UUID invoiceId; private final List<BillingEvent> subscriptionBillingEvents; private final UsageUserApi usageApi; private final LocalDate targetDate; private final TenantContext context; public SubscriptionConsumableInArrear(final UUID invoiceId, final List<BillingEvent> subscriptionBillingEvents, final UsageUserApi usageApi, final LocalDate targetDate, final TenantContext context) { this.invoiceId = invoiceId; this.subscriptionBillingEvents = subscriptionBillingEvents; this.usageApi = usageApi; this.targetDate = targetDate; this.context = context; } /** * Based on billing events, (@code existingUsage} and targetDate, figure out what remains to be billed. * * @param existingUsage the existing on disk usage items. * @return * @throws CatalogApiException */ public List<InvoiceItem> computeMissingUsageInvoiceItems(final List<InvoiceItem> existingUsage) throws CatalogApiException { final List<InvoiceItem> result = Lists.newLinkedList(); final List<ContiguousIntervalConsumableInArrear> billingEventTransitionTimePeriods = computeInArrearUsageInterval(); for (ContiguousIntervalConsumableInArrear usageInterval : billingEventTransitionTimePeriods) { result.addAll(usageInterval.computeMissingItems(existingUsage)); } return result; } @VisibleForTesting List<ContiguousIntervalConsumableInArrear> computeInArrearUsageInterval() { final List<ContiguousIntervalConsumableInArrear> usageIntervals = Lists.newLinkedList(); final Map<String, ContiguousIntervalConsumableInArrear> inFlightInArrearUsageIntervals = new HashMap<String, ContiguousIntervalConsumableInArrear>(); final Set<String> allSeenUsage = new HashSet<String>(); for (BillingEvent event : subscriptionBillingEvents) { // Extract all in arrear /consumable usage section for that billing event. final List<Usage> usages = findConsumableInArrearUsages(event); allSeenUsage.addAll(Collections2.transform(usages, new Function<Usage, String>() { @Override public String apply(final Usage input) { return input.getName(); } })); // All inflight usage interval are candidates to be closed unless we see that current billing event referencing the same usage section. final Set<String> toBeClosed = new HashSet<String>(allSeenUsage); for (Usage usage : usages) { // Add inflight usage interval if non existent ContiguousIntervalConsumableInArrear existingInterval = inFlightInArrearUsageIntervals.get(usage.getName()); if (existingInterval == null) { existingInterval = new ContiguousIntervalConsumableInArrear(usage, invoiceId, usageApi, targetDate, context); inFlightInArrearUsageIntervals.put(usage.getName(), existingInterval); } // Add billing event for that usage interval existingInterval.addBillingEvent(event); // Remove usage interval for toBeClosed set toBeClosed.remove(usage.getName()); } // Build the usage interval that are no longer referenced for (String usageName : toBeClosed) { final ContiguousIntervalConsumableInArrear interval = inFlightInArrearUsageIntervals.remove(usageName); if (interval != null) { interval.addBillingEvent(event); usageIntervals.add(interval.build(true)); } } } for (String usageName : inFlightInArrearUsageIntervals.keySet()) { usageIntervals.add(inFlightInArrearUsageIntervals.get(usageName).build(false)); } inFlightInArrearUsageIntervals.clear(); return usageIntervals; } List<Usage> findConsumableInArrearUsages(final BillingEvent event) { if (event.getUsages().size() == 0) { return Collections.emptyList(); } final List<Usage> result = Lists.newArrayList(); for (Usage usage : event.getUsages()) { if (usage.getUsageType() != UsageType.CONSUMABLE || usage.getBillingMode() != BillingMode.IN_ARREAR) { continue; } result.add(usage); } return result; } }
[ "stephane@ning.com" ]
stephane@ning.com
f21fe5a1018a1e23b3b322f8725a2e1871abf32f
afd7ebabda451990715066b7d045489b19ccccd5
/.svn/pristine/f2/f21fe5a1018a1e23b3b322f8725a2e1871abf32f.svn-base
4c35d2b99f4eebde9a0816f73e3e8055d10d83b6
[ "CC-BY-SA-2.5", "AFL-2.1", "LicenseRef-scancode-unknown-license-reference", "MIT", "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-proprietary-license" ]
permissive
malakeel/jetspeed-portal
6996ab54816ebf7073aec1a6cbd86f59e3ee9d17
149dd8eba01eb86cc946d473d65ecc387464ca13
refs/heads/master
2022-12-29T07:50:12.413375
2020-04-18T04:55:45
2020-04-18T04:55:45
247,505,166
0
0
Apache-2.0
2022-12-16T02:47:04
2020-03-15T16:27:17
Java
UTF-8
Java
false
false
1,709
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jetspeed.components.portletentity; import org.apache.jetspeed.exception.JetspeedException; /** * <p> * PortletEntityNotStoredException * </p> * * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a> * @version $Id$ * */ public class PortletEntityNotStoredException extends JetspeedException { /** * */ public PortletEntityNotStoredException() { super(); } /** * @param message */ public PortletEntityNotStoredException(String message) { super(message); } /** * @param nested */ public PortletEntityNotStoredException(Throwable nested) { super(nested); } /** * @param msg * @param nested */ public PortletEntityNotStoredException(String msg, Throwable nested) { super(msg, nested); } }
[ "mansour.alakeel@gmail.com" ]
mansour.alakeel@gmail.com
9b048d00333e8eb80e822f7c1ae917abeb4bd539
3bf186002a5d04ee89b6922abe3556e518c6455b
/baoantong/app/src/main/java/cn/kiway/baoantong/entity/ZipPackage.java
ca94fa0fee2d3b19d3669085500a82e53119b9b6
[]
no_license
63966367/MyProject
cb0bbb53a67137c0c028f0eca3e44e2c0307646a
f2298ff2c866887e0254e308cc37c4c652f51b66
refs/heads/master
2022-01-29T11:17:42.280576
2019-07-03T06:16:33
2019-07-03T06:16:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
300
java
package cn.kiway.baoantong.entity; /** * Created by Administrator on 2017/3/2. */ public class ZipPackage { public String name;//名字 public String indexPath;//index的路径 public String version;//当前版本号 //增量更新 public String patchs ; }
[ "zhengkang@dbfd10c2-de4d-554c-9009-ce568fefba2b" ]
zhengkang@dbfd10c2-de4d-554c-9009-ce568fefba2b
9baa729f2a68b04f40cd2c8304721d9e5a2b9c04
aa176e0f08d1f83ba074ff833ff16ca7c2fae91a
/aurora/application/features/screen/ReferenceTypeFinder.java
124fd0015b3579d087298a57cd41cf5f93db85ef
[]
no_license
aurora-java/aurora
6c5750d5117efcde9f8c67b6cc7ec2e8450cfa3e
82fd0b9da91e001090382bf68d9ddab4cc7b5a3b
HEAD
2019-07-23T06:06:24.442698
2017-03-20T01:50:13
2017-03-20T01:50:13
32,776,197
10
13
null
null
null
null
UTF-8
Java
false
false
1,911
java
package aurora.application.features.screen; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import uncertain.composite.CompositeMap; import uncertain.composite.IterationHandle; import uncertain.composite.QualifiedName; import uncertain.schema.Attribute; import uncertain.schema.Element; import uncertain.schema.ISchemaManager; import uncertain.schema.IType; import uncertain.schema.SimpleType; public class ReferenceTypeFinder extends CompositeMapIteator { private QualifiedName referenceType; private ISchemaManager sm; public int process(CompositeMap map) { List<Attribute> match = getMatch(map); if (match != null) { this.getResult().add(new MapFinderResult(map, match)); } return IterationHandle.IT_CONTINUE; } protected List<Attribute> getMatch(CompositeMap map) { List<Attribute> matchs = new ArrayList<Attribute>(); boolean isMacth = false; Element element = sm.getElement(map); if (element != null) { List attrib_list = element.getAllAttributes(); for (Iterator it = attrib_list.iterator(); it.hasNext();) { Attribute attrib = (Attribute) it.next(); IType attributeType = attrib.getAttributeType(); boolean referenceOf = isReferenceType(attributeType); if (referenceOf) { boolean found = true; IDataFilter filter = getFilter(); if (filter != null) { found = filter.found(map, attrib); } if (found) { isMacth = true; matchs.add(attrib); } } } if (isMacth) { return matchs; } } return null; } protected boolean isReferenceType(IType attributeType) { if (attributeType instanceof SimpleType) { return referenceType.equals(((SimpleType) attributeType) .getReferenceTypeQName()); } return false; } public ReferenceTypeFinder(QualifiedName referenceType, ISchemaManager sm) { this.referenceType = referenceType; this.sm = sm; } }
[ "rufus.sly@gmail.com@c3805726-bc34-11dd-8164-2ff6f70dce53" ]
rufus.sly@gmail.com@c3805726-bc34-11dd-8164-2ff6f70dce53
0bd83b4a283c296e235216f3fd857970d8238099
81d4069c762958673dc537bcca75c3fc0e6a6c46
/02-structural/01-AdapterPattern/src/main/java/cn/colg/learn/_01/Crypoto.java
25b55f2b479bd09f33b7790f8fb124c97f93298f
[]
no_license
sheep-cloud/design-pattern
7a0c59ac93429d8db021e67f7c3e5561e0112c62
f15caa665ddac979e5e6f3862145850512b450e5
refs/heads/master
2021-10-19T07:37:09.437900
2019-02-19T08:12:33
2019-02-19T08:12:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
649
java
package cn.colg.learn._01; import cn.hutool.crypto.SecureUtil; /** * 适配者类 - 加密(第三方系统) * * @author colg */ public class Crypoto { /** * MD5加密,生成16进制MD5字符串 * * @param data 数据 * @return MD5字符串 * @author colg */ public String md5(String data) { return SecureUtil.md5(data); } /** * SHA1加密,生成16进制SHA1字符串 * * @param data 数据 * @return SHA1字符串 * @author colg */ public String sha1(String data) { return SecureUtil.sha1(data); } }
[ "121529654@qq.com" ]
121529654@qq.com
71f7eb92e07da4e768d1e6cb57078bd2bf9b07da
98807791d3923b92c3628cb2664bb4da7c84e1a1
/src/com/cai310/lottery/support/RateItem.java
c0d23a8dd4b4c187583f39fb796d8d34027678c1
[]
no_license
hanyuningxing/ticket
c25ec0784a157c5196e8bdaa516b97c4950f0ad3
9de859c649560b823f2cbe78d1bc724841fcd928
refs/heads/master
2021-01-25T05:16:22.445706
2016-09-23T03:13:55
2016-09-23T03:13:55
39,360,871
3
1
null
null
null
null
UTF-8
Java
false
false
462
java
package com.cai310.lottery.support; public class RateItem { private String key; private Double value; private int chg; public String getKey() { return key; } public void setKey(String key) { this.key = key; } public Double getValue() { return value; } public void setValue(Double value) { this.value = value; } public int getChg() { return chg; } public void setChg(int chg) { this.chg = chg; } }
[ "513619336@163.com" ]
513619336@163.com
777412cffcc27d9aec0a495c925f3214ecbd8a81
a8a70e24e70224b2ffe29eef3abd7dd5a0a061d3
/src/dev/dworks/libs/actionbarplus/widget/CircularDrawable.java
fccf45f214a618ef3eadce2104a531800a3d8a53
[ "Apache-2.0" ]
permissive
DWorkS/ActionBarPlus
38bd1001c80489a2931f4dd8563f9e7ee1394409
780deb299c3428edefa83d6561fbf864ba480a85
refs/heads/master
2021-01-02T08:34:14.379529
2014-11-02T18:16:26
2014-11-02T18:16:26
15,657,736
8
3
null
null
null
null
UTF-8
Java
false
false
2,115
java
package dev.dworks.libs.actionbarplus.widget; import android.graphics.Bitmap; import android.graphics.BitmapShader; import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.ComposeShader; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.PorterDuff; import android.graphics.RadialGradient; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Shader; import android.graphics.drawable.Drawable; public class CircularDrawable extends Drawable { private static final boolean USE_VIGNETTE = true; private final float mCornerRadius; private final RectF mRect = new RectF(); private final BitmapShader mBitmapShader; private final Paint mPaint; private final int mMargin; CircularDrawable(Bitmap bitmap, float cornerRadius, int margin) { mCornerRadius = cornerRadius; mBitmapShader = new BitmapShader(bitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); mPaint = new Paint(); mPaint.setAntiAlias(true); mPaint.setShader(mBitmapShader); mMargin = margin; } @Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); mRect.set(mMargin, mMargin, bounds.width() - mMargin, bounds.height() - mMargin); if (USE_VIGNETTE) { RadialGradient vignette = new RadialGradient(mRect.centerX(), mRect.centerY() * 1.0f / 0.7f, mRect.centerX() * 1.3f, new int[] { 0, 0, 0x7f000000 }, new float[] { 0.0f, 0.7f, 1.0f }, Shader.TileMode.CLAMP); Matrix oval = new Matrix(); oval.setScale(1.0f, 0.7f); vignette.setLocalMatrix(oval); mPaint.setShader(new ComposeShader(mBitmapShader, vignette, PorterDuff.Mode.SRC_OVER)); } } @Override public void draw(Canvas canvas) { canvas.drawCircle(mCornerRadius, mCornerRadius, mCornerRadius, mPaint); } @Override public int getOpacity() { return PixelFormat.TRANSLUCENT; } @Override public void setAlpha(int alpha) { mPaint.setAlpha(alpha); } @Override public void setColorFilter(ColorFilter cf) { mPaint.setColorFilter(cf); } }
[ "heart.break.kid.b4u@gmail.com" ]
heart.break.kid.b4u@gmail.com
cdc688988ece3d17ae89573f485b784b7484f1de
76707a749c77d687d347207d4e5bd1f00f298e5a
/acme-architecture-testing/src/main/java/com/acme/architecture/testing/archunit/rule/layered/architecture/catalog/CatalogApiLayeredArchitectureRule.java
57cd429e4360b30e12c22df38a1953eca2a37658
[ "MIT" ]
permissive
vjmadrid/enmilocalfunciona-archunit
6d77374fb03141e7188d3f1f11c5e114ded9577e
ad39e405db71c27e52c788c2756cbab13c91a6e3
refs/heads/master
2023-03-02T02:29:40.837842
2021-02-11T18:46:40
2021-02-11T18:46:40
319,269,273
2
3
null
null
null
null
UTF-8
Java
false
false
4,925
java
package com.acme.architecture.testing.archunit.rule.layered.architecture.catalog; import static com.tngtech.archunit.library.Architectures.layeredArchitecture; import com.acme.architecture.testing.constant.ArchUnitLayeredArchitectureConstant; import com.acme.architecture.testing.constant.ArchUnitPackageConstant; import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.lang.ArchRule; public class CatalogApiLayeredArchitectureRule { @ArchTest public static final ArchRule api_layered_architecture_should_have_a_default_definition = layeredArchitecture() // ************** // *** Layers *** // ************** // Constants .layer(ArchUnitLayeredArchitectureConstant.CONSTANT_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_FINAL_PACKAGE_CONSTANT_CLASS) // Entity .layer(ArchUnitLayeredArchitectureConstant.ENTITY_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_FINAL_PACKAGE_ENTITY_CLASS) // DTO .layer(ArchUnitLayeredArchitectureConstant.REQUEST_DTO_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_FINAL_PACKAGE_REQUEST_DTO_CLASS) .layer(ArchUnitLayeredArchitectureConstant.RESPONSE_DTO_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_FINAL_PACKAGE_RESPONSE_DTO_CLASS) // Repository .layer(ArchUnitLayeredArchitectureConstant.REPOSITORY_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_PACKAGE_REPOSITORY_CLASS) // Service .layer(ArchUnitLayeredArchitectureConstant.SERVICE_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_PACKAGE_SERVICE_CLASS) // Controller .layer(ArchUnitLayeredArchitectureConstant.CONTROLLER_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_PACKAGE_CONTROLLER_CLASS) // Others .layer(ArchUnitLayeredArchitectureConstant.FACTORY_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_FINAL_PACKAGE_DATA_FACTORY_CLASS) .layer(ArchUnitLayeredArchitectureConstant.DUMMY_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_FINAL_PACKAGE_DUMMY_CLASS) .layer(ArchUnitLayeredArchitectureConstant.UTIL_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_PACKAGE_UTIL_CLASS) .layer(ArchUnitLayeredArchitectureConstant.MAPPER_LAYER).definedBy(ArchUnitPackageConstant.RESIDE_PACKAGE_MAPPER_CLASS) // ****************** // *** Conditions *** // ****************** // Constants // "Constant layer" should be accessible to all (no condition is established) // Entity .whereLayer(ArchUnitLayeredArchitectureConstant.ENTITY_LAYER).mayOnlyBeAccessedByLayers( ArchUnitLayeredArchitectureConstant.FACTORY_LAYER, ArchUnitLayeredArchitectureConstant.DUMMY_LAYER, ArchUnitLayeredArchitectureConstant.UTIL_LAYER, ArchUnitLayeredArchitectureConstant.MAPPER_LAYER, ArchUnitLayeredArchitectureConstant.REPOSITORY_LAYER, ArchUnitLayeredArchitectureConstant.SERVICE_LAYER, ArchUnitLayeredArchitectureConstant.ENTITY_LAYER) // DTO (Use direct project or model) .whereLayer(ArchUnitLayeredArchitectureConstant.REQUEST_DTO_LAYER).mayOnlyBeAccessedByLayers( ArchUnitLayeredArchitectureConstant.CONTROLLER_LAYER, ArchUnitLayeredArchitectureConstant.SERVICE_LAYER, ArchUnitLayeredArchitectureConstant.UTIL_LAYER, ArchUnitLayeredArchitectureConstant.MAPPER_LAYER, ArchUnitLayeredArchitectureConstant.DUMMY_LAYER ) .whereLayer(ArchUnitLayeredArchitectureConstant.RESPONSE_DTO_LAYER).mayOnlyBeAccessedByLayers( ArchUnitLayeredArchitectureConstant.CONTROLLER_LAYER, ArchUnitLayeredArchitectureConstant.SERVICE_LAYER, ArchUnitLayeredArchitectureConstant.UTIL_LAYER, ArchUnitLayeredArchitectureConstant.MAPPER_LAYER, ArchUnitLayeredArchitectureConstant.DUMMY_LAYER ) // Repository .whereLayer(ArchUnitLayeredArchitectureConstant.REPOSITORY_LAYER).mayOnlyBeAccessedByLayers(ArchUnitLayeredArchitectureConstant.SERVICE_LAYER) // Service .whereLayer(ArchUnitLayeredArchitectureConstant.SERVICE_LAYER).mayOnlyBeAccessedByLayers( ArchUnitLayeredArchitectureConstant.SERVICE_LAYER, ArchUnitLayeredArchitectureConstant.CONTROLLER_LAYER ) // Controller .whereLayer(ArchUnitLayeredArchitectureConstant.CONTROLLER_LAYER).mayNotBeAccessedByAnyLayer() // Others // "Dummy layer" // Option 1 : should be accessible to all (no condition is established) // Option 2 : should not be accessed by anyone in this context project (beware of scanning JARs) // .whereLayer("Dummy layer").mayNotBeAccessedByAnyLayer() .whereLayer(ArchUnitLayeredArchitectureConstant.FACTORY_LAYER).mayOnlyBeAccessedByLayers( ArchUnitLayeredArchitectureConstant.SERVICE_LAYER, ArchUnitLayeredArchitectureConstant.DUMMY_LAYER ) .whereLayer(ArchUnitLayeredArchitectureConstant.UTIL_LAYER).mayOnlyBeAccessedByLayers( ArchUnitLayeredArchitectureConstant.UTIL_LAYER, ArchUnitLayeredArchitectureConstant.CONTROLLER_LAYER, ArchUnitLayeredArchitectureConstant.SERVICE_LAYER ) .whereLayer(ArchUnitLayeredArchitectureConstant.MAPPER_LAYER).mayOnlyBeAccessedByLayers(ArchUnitLayeredArchitectureConstant.SERVICE_LAYER); }
[ "vjmadrid@atsistemas.com" ]
vjmadrid@atsistemas.com
340b6f0def71cb01f7a6768904e3cf39ed601e47
0cbc345ee73133cc3f96a0204a9e137b7455eb3c
/aws-jmx-hub/src/main/java/com/heliosapm/aws/jmx/hub/consul/ConsulService.java
0983d2a4764af7582a2a2c728bd469aa8b773a51
[ "Apache-2.0" ]
permissive
nickman/aws-jmx
64aba2226298e1a66a7d35e8debe0ddf89bedf7b
6267ae17d868567d9104321598d5d59b031f74fb
refs/heads/master
2021-01-22T23:16:50.853691
2017-03-30T14:12:10
2017-03-30T14:12:10
85,624,536
0
0
null
null
null
null
UTF-8
Java
false
false
2,860
java
// This file is part of OpenTSDB. // Copyright (C) 2010-2016 The OpenTSDB Authors. // // This program is free software: you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 2.1 of the License, or (at your // option) any later version. This program is distributed in the hope that it // will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser // General Public License for more details. You should have received a copy // of the GNU Lesser General Public License along with this program. If not, // see <http://www.gnu.org/licenses/>. package com.heliosapm.aws.jmx.hub.consul; import java.util.Arrays; import com.ecwid.consul.v1.ConsulClient; import com.ecwid.consul.v1.catalog.model.CatalogDeregistration; import com.ecwid.consul.v1.catalog.model.CatalogRegistration; import com.ecwid.consul.v1.catalog.model.CatalogRegistration.Service; import com.fasterxml.jackson.databind.JsonNode; /** * <p>Title: ConsulService</p> * <p>Description: </p> * <p>Company: Helios Development Group LLC</p> * @author Whitehead (nwhitehead AT heliosdev DOT org) * <p><code>com.heliosapm.aws.jmx.hub.consul.ConsulService</code></p> */ public class ConsulService { protected final ConsulClient client; /** * Creates a new ConsulService */ public ConsulService() { client = new ConsulClient(); } public void deregister(final JsonNode node) { final CatalogDeregistration dereg = new CatalogDeregistration(); dereg.setDatacenter(node.get("region").textValue()); dereg.setNode(node.get("instanceId").textValue()); dereg.setServiceId(node.get("jmxagentid").textValue()); client.catalogDeregister(dereg); } public void register(final JsonNode node) { final CatalogRegistration reg = new CatalogRegistration(); reg.setAddress(node.get("publicHostName").textValue()); reg.setDatacenter(node.get("region").textValue()); reg.setNode(node.get("instanceId").textValue()); final Service service = new Service(); service.setAddress(node.get("publicjmxserviceurl").textValue()); service.setId(node.get("jmxagentid").textValue()); service.setPort(node.get("jmxmpPort").intValue()); service.setService("JAVA-JMXMP"); service.setTags(Arrays.asList( tag(node, "localV4Ip"), tag(node, "publicV4Ip"), tag(node, "macAddress"), tag(node, "instanceId"), tag(node, "instanceType"), tag(node, "pid") )); reg.setService(service); client.catalogRegister(reg); } public void close() { try { } catch (Exception x) {} } protected static String tag(final JsonNode node, final String key) { return new StringBuilder(key).append("=").append(node.get(key).textValue()).toString(); } }
[ "whitehead.nicholas@gmail.com" ]
whitehead.nicholas@gmail.com
08733a2d26eacf70e7b44b5dea2568cc365e9519
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-14263-87-4-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/internal/template/DefaultTemplateManager_ESTest.java
077bf0e9fcf4ecf6d2c552abc089574f36bc8993
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
582
java
/* * This file was automatically generated by EvoSuite * Wed Apr 01 04:27:35 UTC 2020 */ package com.xpn.xwiki.internal.template; 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 DefaultTemplateManager_ESTest extends DefaultTemplateManager_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
d3aadbc5eda6249e3f524c77eca7b890dae94523
9f367f08c05cc55ca0ab9e0881c496887a1d60a1
/debuggeride/source/mgi/tools/jagcsc/abstractcode/CallExpressionNode.java
8fec969b88381d47b68fd9d2798da9bb87c2ead6
[]
no_license
Chryonic/clientscript-research
89edc28af2e39f7803164862325456fd04d77461
74b494a3453ce9299b692063c1930e124c8d3582
refs/heads/master
2021-01-10T18:20:35.090862
2011-08-30T11:58:45
2011-08-30T11:58:45
48,530,214
0
1
null
null
null
null
UTF-8
Java
false
false
1,659
java
package mgi.tools.jagcsc.abstractcode; import mgi.tools.jagcsc.analyzer.CS2Type; import mgi.tools.jagcsc.analyzer.FunctionDefinition; public class CallExpressionNode extends ExpressionNode { /** * Contains definition to this call. */ public FunctionDefinition definition; /** * Contains arguments of this call. */ public ExpressionNode[] arguments; public CallExpressionNode(FunctionDefinition function,ExpressionNode[] arguments) { this.definition = function; this.arguments = arguments; for (int i = 0; i < arguments.length; i++) { this.write(arguments[i]); arguments[i].setParent(this); } } @Override public int getComponentsCount() { return this.arguments.length; } @Override public AbstractCodeNode optimize() { return this; } public String toString() { StringBuilder buff = new StringBuilder(); buff.append(this.definition.name); buff.append("("); for (int i = 0; i < this.arguments.length; i++) { boolean last = (i + 1) >= this.arguments.length; buff.append(this.arguments[i].toString() + (last ? "" : ", ")); } buff.append(")"); return buff.toString(); } @Override public CS2Type getType() { return definition.returnType; } @Override public void onChildOptimized(AbstractCodeNode prevChild, AbstractCodeNode optimizedChild) { for (int i = 0; i < this.arguments.length; i++) { if (this.arguments[i] == prevChild) { this.arguments[i] = (ExpressionNode)optimizedChild; } } } }
[ "peterbosc@gmail.com" ]
peterbosc@gmail.com
2743d46c03f3b0a23ebedea097cc09388f31d33e
f96fe513bfdf2d1dbd582305e1cbfda14a665bec
/net.sf.smbt.osc.ableton/src-cmd/net/sf/smbt/osc/ableton/cmd/AbletonLiveFrameInterpreter.java
11c0da24687cf4bbeef80e028937ba33922cbb5f
[]
no_license
lucascraft/ubq_wip
04fdb727e7b2dc384ba1d2195ad47e895068e1e4
eff577040f21be71ea2c76c187d574f1617703ce
refs/heads/master
2021-01-22T02:28:20.687330
2015-06-10T12:38:47
2015-06-10T12:38:47
37,206,324
0
0
null
null
null
null
UTF-8
Java
false
false
2,803
java
/*********************************************************************************** * Ubiquisense - A smart ambient utilities framework * * Copyright (c) 2008 - 2010, Lucas Bigeardel * * The library is released under: * * A) LGPL * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA * * B) EPL * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Lucas Bigeardel <lucas.bigeardel@gmail.com> - Initial API and implementation ***********************************************************************************/ package net.sf.smbt.osc.ableton.cmd; import java.util.List; import net.sf.smbt.ezableton.AbletonLiveSndCmd; import net.sf.smbt.osc.ableton.utils.AbletonLive8Utils; import net.sf.xqz.model.cmd.Cmd; import net.sf.xqz.model.cmd.CmdFactory; import net.sf.xqz.model.cmd.CompoundCmd; import net.sf.xqz.model.engine.impl.AbstractFrameInterpreterImpl; import org.eclipse.core.runtime.Platform; import com.illposed.osc.OSCPacket; import com.illposed.osc.utility.OSCByteArrayToJavaConverter; public class AbletonLiveFrameInterpreter extends AbstractFrameInterpreterImpl { private OSCByteArrayToJavaConverter oscByte2JavaConverter; public AbletonLiveFrameInterpreter() { oscByte2JavaConverter = new OSCByteArrayToJavaConverter(); } @Override public synchronized Cmd byteArray2Cmd(final byte[] stream) { if (stream != null && stream.length>2) { try { OSCPacket packet = oscByte2JavaConverter.convert(stream, stream.length); if (Platform.inDebugMode()) { System.out.println(packet.toString()); } CompoundCmd compoundCmd = CmdFactory.eINSTANCE.createCompoundCmd(); List<AbletonLiveSndCmd> lst = AbletonLive8Utils.INSTANCE.handleAbletonLiveOSCPacket(packet); for (AbletonLiveSndCmd c : lst) { compoundCmd.add(c); } return compoundCmd; } catch (Exception e) { System.err.println(e); } } return null; } }
[ "lucas.bigeardel@gmail.com" ]
lucas.bigeardel@gmail.com
a762964edaf355afd9b81d253c7dbc728f82bc9d
493c2e0f389cef5ab3ab9e7f1008a5caa0386e4f
/src/main/java/lab/JavaConfig.java
2b465bc3b1595c01a540958e142b89e48c088de9
[]
no_license
Vyacheslav-Lapin/spring-demo3
4192a3266931e4e66483268e3d4cbee8a0686a06
2d9b507a3f35000fd92473a826446bcb94151470
refs/heads/master
2020-04-18T07:01:42.288963
2019-01-25T14:02:25
2019-01-25T14:02:25
167,345,818
0
2
null
null
null
null
UTF-8
Java
false
false
1,184
java
package lab; import lab.model.*; import lombok.experimental.FieldDefaults; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.*; import java.util.List; import static lab.model.Contact.ContactType.EMAIL; import static lombok.AccessLevel.PRIVATE; //@SpringBootApplication @Configuration @ComponentScan @EnableAutoConfiguration @EnableAspectJAutoProxy @ImportResource("classpath:application-context.xml") @FieldDefaults(level = PRIVATE) public class JavaConfig { @Bean Contact contact1() { return ContactImpl.builder().value("222-33-22").build(); } @Bean Contact contact2() { return ContactImpl.builder().type(EMAIL).value("john@smith.com").build(); } @Bean Country country() { return CountryImpl.builder().name("Russia").codeName("RU").build(); } @Bean Person person(Country country, List<Contact> contacts) { return PersonImpl.builder().name("John Smith") .age(35) .country(country) .height(1.78f) .isProgrammer(true) .contacts(contacts) .build(); } }
[ "Vyacheslav.Lapin@gmail.com" ]
Vyacheslav.Lapin@gmail.com
b49efa8b0778d63bf5905379dc8faedacaa0c1ec
7bc365d7f3b8a3f8dc15bdfae1e4cca6669c1760
/src/designPatterns/strategyPattern/Flays.java
104539536aad51e0da53efd50a8392d28da9381c
[]
no_license
nataliya-stoichevska/JavaFundamentals_JavaOOPAdvanced
72536ea5de7ea950c0fe3e027bf18c3a75f1d40c
6de00af47e666d4d49933d7499073519e15155f5
refs/heads/master
2022-01-28T03:59:06.988945
2018-09-04T08:14:25
2018-09-04T08:14:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
713
java
package designPatterns.strategyPattern; public interface Flays { // The interface is implemented by many other // subclasses that allow for many types of flaying // without effecting Animal, or Flays. // Classes that implement new Flays interface // subclasses can allow other classes to use // that code eliminating code duplication // I'm decoupling : encapsulating the concept that varies String fly(); } // Class used if the Animal can fly class ItFlays implements Flays { public String fly() { return "Flying High"; } } //Class used if the Animal can't fly class CantFlay implements Flays { public String fly() { return "I can't fly"; } }
[ "stojcevskanatalija8@gmail.com" ]
stojcevskanatalija8@gmail.com
4cdca05711363dd67dbd5a395c04cf596f309b20
28f03abf2cbff0e13bfe157220a6c644da221aba
/bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/employeeboarding/EmployeeBoardingDAO.java
d3d0103ca9c6379210855985f8d3ab0e936700ed
[]
no_license
ouyangshaolei/retailscm-biz-suite
f4a04a14b211caebeb9d93e26001d458e84c067e
871075f0122da52a2cc409c731766a4e2c307a0e
refs/heads/master
2020-04-27T11:45:46.414211
2019-03-07T03:28:27
2019-03-07T03:28:27
174,307,024
1
0
null
2019-03-07T08:51:23
2019-03-07T08:51:22
null
UTF-8
Java
false
false
4,230
java
package com.doublechaintech.retailscm.employeeboarding; import java.math.BigDecimal; import java.util.List; import java.util.Map; import com.doublechaintech.retailscm.BaseEntity; import com.doublechaintech.retailscm.SmartList; import com.doublechaintech.retailscm.MultipleAccessKey; import com.doublechaintech.retailscm.RetailscmUserContext; import com.doublechaintech.retailscm.employee.EmployeeDAO; public interface EmployeeBoardingDAO{ public EmployeeBoarding load(String id, Map<String,Object> options) throws Exception; public void enhanceList(List<EmployeeBoarding> employeeBoardingList); public void collectAndEnhance(BaseEntity ownerEntity); public void alias(List<BaseEntity> entityList); public EmployeeBoarding present(EmployeeBoarding employeeBoarding,Map<String,Object> options) throws Exception; public EmployeeBoarding clone(String id, Map<String,Object> options) throws Exception; public EmployeeBoarding save(EmployeeBoarding employeeBoarding,Map<String,Object> options); public SmartList<EmployeeBoarding> saveEmployeeBoardingList(SmartList<EmployeeBoarding> employeeBoardingList,Map<String,Object> options); public SmartList<EmployeeBoarding> removeEmployeeBoardingList(SmartList<EmployeeBoarding> employeeBoardingList,Map<String,Object> options); public SmartList<EmployeeBoarding> findEmployeeBoardingWithKey(MultipleAccessKey key,Map<String, Object> options); public int countEmployeeBoardingWithKey(MultipleAccessKey key,Map<String, Object> options); public Map<String, Integer> countEmployeeBoardingWithGroupKey(String groupKey, MultipleAccessKey filterKey, Map<String, Object> options); public void delete(String employeeBoardingId, int version) throws Exception; public EmployeeBoarding disconnectFromAll(String employeeBoardingId, int version) throws Exception; public int deleteAll() throws Exception; public EmployeeDAO getEmployeeDAO(); public SmartList<EmployeeBoarding> requestCandidateEmployeeBoardingForEmployee(RetailscmUserContext userContext, String ownerClass, String id, String filterKey, int pageNo, int pageSize) throws Exception; public EmployeeBoarding planToRemoveEmployeeList(EmployeeBoarding employeeBoarding, String employeeIds[], Map<String,Object> options)throws Exception; //disconnect EmployeeBoarding with company in Employee public EmployeeBoarding planToRemoveEmployeeListWithCompany(EmployeeBoarding employeeBoarding, String companyId, Map<String,Object> options)throws Exception; public int countEmployeeListWithCompany(String employeeBoardingId, String companyId, Map<String,Object> options)throws Exception; //disconnect EmployeeBoarding with department in Employee public EmployeeBoarding planToRemoveEmployeeListWithDepartment(EmployeeBoarding employeeBoarding, String departmentId, Map<String,Object> options)throws Exception; public int countEmployeeListWithDepartment(String employeeBoardingId, String departmentId, Map<String,Object> options)throws Exception; //disconnect EmployeeBoarding with occupation in Employee public EmployeeBoarding planToRemoveEmployeeListWithOccupation(EmployeeBoarding employeeBoarding, String occupationId, Map<String,Object> options)throws Exception; public int countEmployeeListWithOccupation(String employeeBoardingId, String occupationId, Map<String,Object> options)throws Exception; //disconnect EmployeeBoarding with responsible_for in Employee public EmployeeBoarding planToRemoveEmployeeListWithResponsibleFor(EmployeeBoarding employeeBoarding, String responsibleForId, Map<String,Object> options)throws Exception; public int countEmployeeListWithResponsibleFor(String employeeBoardingId, String responsibleForId, Map<String,Object> options)throws Exception; //disconnect EmployeeBoarding with current_salary_grade in Employee public EmployeeBoarding planToRemoveEmployeeListWithCurrentSalaryGrade(EmployeeBoarding employeeBoarding, String currentSalaryGradeId, Map<String,Object> options)throws Exception; public int countEmployeeListWithCurrentSalaryGrade(String employeeBoardingId, String currentSalaryGradeId, Map<String,Object> options)throws Exception; public SmartList<EmployeeBoarding> queryList(String sql, Object ... parmeters); }
[ "philip_chang@163.com" ]
philip_chang@163.com
4d49344a15cf4e8778374d7dd4de40f2d2d541d8
fef9fa08f61f0e2aee078e2467699f1a87648d38
/MaterialDesignRecyclerViewAnimacao/app/src/main/java/br/com/trmasolucoes/materialdesignrecyclerviewanimacao/SecondActivity.java
36fcdc1c19c814d58c89092221ec150c9ba86061
[]
no_license
tairoroberto/Android-samples
85854b21733c58950335ee7206694877aa812535
0da729baf1a52354e2a16c1bef01fbfdac57ed0d
refs/heads/master
2021-05-11T19:44:41.757630
2018-01-17T20:37:06
2018-01-17T20:37:06
117,889,757
0
0
null
null
null
null
UTF-8
Java
false
false
3,333
java
package br.com.trmasolucoes.materialdesignrecyclerviewanimacao; import android.content.Intent; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Toast; public class SecondActivity extends ActionBarActivity { private Toolbar mToolbar; private Toolbar mToolbarBottom; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_second); mToolbar = (Toolbar) findViewById(R.id.tb_main); mToolbar.setTitle("Second Activity"); setSupportActionBar(mToolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); mToolbarBottom = (Toolbar) findViewById(R.id.inc_tb_bottom); mToolbarBottom.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem menuItem) { Intent it = null; switch(menuItem.getItemId()){ case R.id.action_facebook: it = new Intent(Intent.ACTION_VIEW); it.setData(Uri.parse("http://www.facebook.com")); break; case R.id.action_youtube: it = new Intent(Intent.ACTION_VIEW); it.setData(Uri.parse("http://www.youtube.com")); break; case R.id.action_google_plus: it = new Intent(Intent.ACTION_VIEW); it.setData(Uri.parse("http://plus.google.com")); break; case R.id.action_linkedin: it = new Intent(Intent.ACTION_VIEW); it.setData(Uri.parse("http://www.linkedin.com")); break; case R.id.action_whatsapp: it = new Intent(Intent.ACTION_VIEW); it.setData(Uri.parse("http://www.whatsapp.com")); break; } startActivity(it); return true; } }); mToolbarBottom.inflateMenu(R.menu.menu_bottom); mToolbarBottom.findViewById(R.id.iv_settings).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(SecondActivity.this, "Settings pressed", Toast.LENGTH_SHORT).show(); } }); } @Override protected void onResume() { super.onResume(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { mToolbar.setBackgroundResource(R.drawable.toolbar_rounded_corners); } } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_second, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if(id == android.R.id.home){ finish(); } return true; } }
[ "tairoroberto@hotmail.com" ]
tairoroberto@hotmail.com
86cd7f7e1f41556a04da8c8fc1158ee5a0a23cc6
23d21d575da06d8a0f0c3a266915df321b5154eb
/java/designpattern/src/main/java/designpattern/gof_iterator/sample01/Book.java
66b81001af6c1c3071618ed8615ac861bcf4c585
[]
no_license
keepinmindsh/sample
180431ce7fce20808e65d885eab1ca3dca4a76a9
4169918f432e9008b4715f59967f3c0bd619d3e6
refs/heads/master
2023-04-30T19:26:44.510319
2023-04-23T12:43:43
2023-04-23T12:43:43
248,352,910
4
0
null
2023-03-05T23:20:43
2020-03-18T22:03:16
Java
UTF-8
Java
false
false
215
java
package designpattern.gof_iterator.sample01; public class Book { private String name; public Book(String name) { this.name = name; } public String getName() { return name; } }
[ "keepinmindsh@gmail.com" ]
keepinmindsh@gmail.com
089427a68c1abc369424697a2544be6e0f5c984f
ea8013860ed0b905c64f449c8bce9e0c34a23f7b
/SystemUIGoogle/sources/com/google/android/systemui/smartspace/BcSmartspaceCardSecondary.java
360640cfe0295670d958544c165222cd78381179
[]
no_license
TheScarastic/redfin_b5
5efe0dc0d40b09a1a102dfb98bcde09bac4956db
6d85efe92477576c4901cce62e1202e31c30cbd2
refs/heads/master
2023-08-13T22:05:30.321241
2021-09-28T12:33:20
2021-09-28T12:33:20
411,210,644
1
0
null
null
null
null
UTF-8
Java
false
false
876
java
package com.google.android.systemui.smartspace; import android.app.smartspace.SmartspaceTarget; import android.content.Context; import android.util.AttributeSet; import androidx.constraintlayout.widget.ConstraintLayout; import com.android.systemui.plugins.BcSmartspaceDataPlugin; /* loaded from: classes2.dex */ public abstract class BcSmartspaceCardSecondary extends ConstraintLayout { /* access modifiers changed from: package-private */ public abstract boolean setSmartspaceActions(SmartspaceTarget smartspaceTarget, BcSmartspaceDataPlugin.SmartspaceEventNotifier smartspaceEventNotifier, BcSmartspaceCardLoggingInfo bcSmartspaceCardLoggingInfo); public BcSmartspaceCardSecondary(Context context) { super(context); } public BcSmartspaceCardSecondary(Context context, AttributeSet attributeSet) { super(context, attributeSet); } }
[ "warabhishek@gmail.com" ]
warabhishek@gmail.com
58d4fc8fa358b37ea4bfb2b0a36a53061b75b1c1
fc4ca380ab855430d6a82f6f6e1c8710b560b42c
/Ch10_Date,Time and Formatting/src/com/minho/calendar_date/CalendarEx08.java
b3da48a6801cbaf717eddde5f1abc38c89705601
[]
no_license
ialsghi123/javaFM
20972b4c8020921c9bed13c66bedb9db0874c631
e68e97869ae3d42b4c57e9d9b8a48137dd3f1651
refs/heads/master
2023-01-20T01:48:42.187396
2020-11-28T14:19:47
2020-11-28T14:19:47
282,656,442
0
0
null
null
null
null
UTF-8
Java
false
false
674
java
package com.minho.calendar_date; class CalendarEx08 { public static void main(String[] args){ String date1 = "201508"; String date2 = "201405"; // 년과 월을 substring으로 잘라서 정수로 변환한다. // 년에 12를 곱해서 월로 변환한 다음에 뺄셈을 하면 개월차를 구할 수 있다. int month1 = Integer.parseInt(date1.substring(0,4))* 12 + Integer.parseInt(date1.substring(4)); int month2 = Integer.parseInt(date2.substring(0,4))* 12 + Integer.parseInt(date2.substring(4)); System.out.println(date1 +"과 " + date2 + "의 차이는 " + Math.abs(month1-month2) + "개월 입니다."); } }
[ "ialsghi123@naver.com" ]
ialsghi123@naver.com
2824604303e0a9a9e2185a1423d3f6e21ac531ef
3ea7ed3c1146df10479d1c1e3190e57932074e56
/engine/src/test/java/org/apache/hop/trans/steps/csvinput/BaseCsvParsingTest.java
cfd9f624cfc250cc089795da51eca8f357fdac6b
[ "Apache-2.0" ]
permissive
rhaces/hop
66cc557f8317062dfc0f5b55a16a56ba38a74f32
d6a189d5815020db325ecf08297cf42f5079f8d1
refs/heads/master
2020-12-09T13:01:10.778159
2020-01-10T16:14:36
2020-01-10T16:14:36
233,311,945
0
0
null
2020-01-11T23:33:40
2020-01-11T23:33:39
null
UTF-8
Java
false
false
3,648
java
/*! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2016-2019 by Hitachi Vantara : http://www.pentaho.com * ******************************************************************************* * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************************/ package org.apache.hop.trans.steps.csvinput; import org.apache.commons.lang.StringUtils; import org.apache.hop.core.row.RowMeta; import org.apache.hop.core.row.ValueMetaInterface; import org.apache.hop.core.variables.Variables; import org.apache.hop.trans.steps.file.BaseFileField; import org.apache.hop.trans.steps.fileinput.BaseParsingTest; import org.apache.hop.trans.steps.textfileinput.TextFileInputField; import org.junit.Before; import org.junit.Ignore; /** * Base class for all CSV input step tests. */ @Ignore( "No tests in abstract base class" ) public abstract class BaseCsvParsingTest extends BaseParsingTest<CsvInputMeta, CsvInputData, CsvInput> { /** * Initialize step info. */ @Before public void before() { meta = new CsvInputMeta(); meta.setDefault(); data = new CsvInputData(); data.outputRowMeta = new RowMeta(); } /** * Initialize for processing specified file. */ protected void init( String file ) throws Exception { init( file, false ); } protected void init( String file, boolean absolutePath ) throws Exception { if ( absolutePath ) { meta.setFilename( file ); } else { meta.setFilename( getFile( file ).getURL().getFile() ); } step = new CsvInput( stepMeta, null, 1, transMeta, trans ); step.init( meta, data ); step.addRowListener( rowListener ); } /** * Declare fields for test. */ protected void setFields( TextFileInputField... fields ) throws Exception { meta.setInputFields( fields ); meta.getFields( data.outputRowMeta, meta.getName(), null, null, new Variables(), null ); data.convertRowMeta = data.outputRowMeta.cloneToType( ValueMetaInterface.TYPE_STRING ); } /** * For BaseFileInput fields. */ @Override protected void setFields( BaseFileField... fields ) throws Exception { throw new RuntimeException( "Not implemented" ); } /** * CSV input step produces byte arrays instead strings. */ @Override protected void check( Object[][] expected ) throws Exception { for ( int r = 0; r < expected.length; r++ ) { if ( expected[ r ].length != 0 ) { for ( int c = 0; c < expected[ r ].length; c++ ) { if ( expected[ r ][ c ] == "" ) { expected[ r ][ c ] = StringUtils.EMPTY.getBytes( "UTF-8" ); } else if ( expected[ r ][ c ] == null ) { expected[ r ][ c ] = null; } else { expected[ r ][ c ] = expected[ r ][ c ].toString().getBytes( "UTF-8" ); } } } else { expected[ r ] = new Object[ meta.getInputFields().length ]; expected[ r ][ 0 ] = StringUtils.EMPTY.getBytes( "UTF-8" ); } } super.check( expected ); } }
[ "mattcasters@gmail.com" ]
mattcasters@gmail.com
60a2e4295e08e081eaa350c88ce232044f8a3ea5
56656ce6a15700cdd0108d3e94016da24433538b
/src/main/java/org/pentaho/database/IValueMeta.java
060d99d2941d0052e93a4a284922a26088afa61d
[]
no_license
tlw-ray/one-kettle
6bc60574a936ee8e2b741fefe6060f8e40166637
d2763edbdf1463d7a6e770f5182ea66525e1da61
refs/heads/master
2020-07-25T07:43:28.989714
2019-10-19T00:28:20
2019-10-19T00:28:20
208,218,415
2
1
null
null
null
null
UTF-8
Java
false
false
2,164
java
/*! * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * Copyright (c) 2002-2017 Hitachi Vantara.. All rights reserved. */ package org.pentaho.database; public interface IValueMeta extends Cloneable { /** Value type indicating that the value has no type set */ int TYPE_NONE = 0; /** Value type indicating that the value contains a floating point double precision number. */ int TYPE_NUMBER = 1; /** Value type indicating that the value contains a text String. */ int TYPE_STRING = 2; /** Value type indicating that the value contains a Date. */ int TYPE_DATE = 3; /** Value type indicating that the value contains a boolean. */ int TYPE_BOOLEAN = 4; /** Value type indicating that the value contains a long integer. */ int TYPE_INTEGER = 5; /** Value type indicating that the value contains a floating point precision number with arbitrary precision. */ int TYPE_BIGNUMBER = 6; /** Value type indicating that the value contains an Object. */ int TYPE_SERIALIZABLE = 7; /** Value type indicating that the value contains binary data: BLOB, CLOB, ... */ int TYPE_BINARY = 8; String getName(); void setName(String name); int getLength(); void setLength(int length); int getPrecision(); void setPrecision(int precision); void setLength(int length, int precision); int getType(); void setType(int type); /** * @return a copy of this value meta object */ IValueMeta clone(); }
[ "tlw_ray@163.com" ]
tlw_ray@163.com
ab26cc051626c9b7af922c7535519e004b5788e6
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-14475-4-10-Single_Objective_GGA-WeightedSum/org/xwiki/job/AbstractJob_ESTest_scaffolding.java
611a2187e0b4a3f71b0a805e72008f895140bdd6
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Jan 17 18:05:21 UTC 2020 */ package org.xwiki.job; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractJob_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
1f01dc0249a5ec6cca99cc95d4619fb4a3829e61
e6b8d584dacebc24c8873ad525a33e85c9fee7c0
/DemoBank/DemoBank/src/idss/bank/demo/ChequeRequest.java
28735d8ab23878d55de07c5b95c8c4e07244a59f
[]
no_license
raghunandankavi2010/Freelancing
3efc243c9d6eb8f41d930d4b60679d3f4f72f722
e39396bd41136094af555b9a5510fa3e6d5a70b4
refs/heads/master
2021-01-12T06:44:30.985001
2018-11-21T17:40:36
2018-11-21T17:40:36
77,430,367
0
0
null
null
null
null
UTF-8
Java
false
false
1,366
java
package idss.bank.demo; import android.app.Activity; import android.os.Bundle; import android.text.Editable; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; public class ChequeRequest extends Activity implements OnClickListener{ EditText tv; String s; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.chequerequest); tv = (EditText) findViewById(R.id.editText1); // tv.setText("hello"); // System.out.println("Account Number..............."+s); Button b= (Button) findViewById(R.id.button1); b.setOnClickListener(this); } public void onClick(View v) { // TODO Auto-generated method s s=tv.getText().toString(); System.out.println("Account Number..............."+s); if(s.equals("")) { //tv.setText(null); System.out.println("................................"); Toast.makeText(ChequeRequest.this,"Account Number is null",4000).show(); } else { System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++"); Toast.makeText(ChequeRequest.this,"Cheque Book Request Accepted. Will be Delivered Shortly",4000).show(); } } }
[ "raghunandankavi2010@gmail.com" ]
raghunandankavi2010@gmail.com
757d88080e4388d721995aa614e309955a35791c
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
/packages/SystemUI/src/com/android/systemui/stackdivider/DividerWindowManager.java
73b70ca1615fa5ac8b5e4447ddc4f41b6717bd88
[ "Apache-2.0", "LicenseRef-scancode-unicode" ]
permissive
Ankits-lab/frameworks_base
8a63f39a79965c87a84e80550926327dcafb40b7
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
refs/heads/main
2023-02-06T03:57:44.893590
2020-11-14T09:13:40
2020-11-14T09:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,341
java
/* * Copyright (C) 2015 The Android Open Source Project * * 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.android.systemui.stackdivider; import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY; import static android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH; import static android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; import android.graphics.PixelFormat; import android.graphics.Region; import android.os.Binder; import android.view.View; import android.view.WindowManager; import com.android.systemui.wm.SystemWindows; /** * Manages the window parameters of the docked stack divider. */ public class DividerWindowManager { private static final String WINDOW_TITLE = "DockedStackDivider"; final SystemWindows mSystemWindows; private WindowManager.LayoutParams mLp; private View mView; public DividerWindowManager(SystemWindows systemWindows) { mSystemWindows = systemWindows; } /** Add a divider view */ public void add(View view, int width, int height, int displayId) { mLp = new WindowManager.LayoutParams( width, height, TYPE_DOCK_DIVIDER, FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL | FLAG_WATCH_OUTSIDE_TOUCH | FLAG_SPLIT_TOUCH | FLAG_SLIPPERY, PixelFormat.TRANSLUCENT); mLp.token = new Binder(); mLp.setTitle(WINDOW_TITLE); mLp.privateFlags |= PRIVATE_FLAG_NO_MOVE_ANIMATION; mLp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); mSystemWindows.addView(view, mLp, displayId, TYPE_DOCK_DIVIDER); mView = view; } public void remove() { if (mView != null) { mSystemWindows.removeView(mView); } mView = null; } public void setSlippery(boolean slippery) { boolean changed = false; if (slippery && (mLp.flags & FLAG_SLIPPERY) == 0) { mLp.flags |= FLAG_SLIPPERY; changed = true; } else if (!slippery && (mLp.flags & FLAG_SLIPPERY) != 0) { mLp.flags &= ~FLAG_SLIPPERY; changed = true; } if (changed) { mSystemWindows.updateViewLayout(mView, mLp); } } public void setTouchable(boolean touchable) { if (mView == null) { return; } boolean changed = false; if (!touchable && (mLp.flags & FLAG_NOT_TOUCHABLE) == 0) { mLp.flags |= FLAG_NOT_TOUCHABLE; changed = true; } else if (touchable && (mLp.flags & FLAG_NOT_TOUCHABLE) != 0) { mLp.flags &= ~FLAG_NOT_TOUCHABLE; changed = true; } if (changed) { mSystemWindows.updateViewLayout(mView, mLp); } } /** Sets the touch region to `touchRegion`. Use null to unset.*/ public void setTouchRegion(Region touchRegion) { if (mView == null) { return; } mSystemWindows.setTouchableRegion(mView, touchRegion); } }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
e3dcff3dd8df0370dea3d616f01891b7e2efd779
4ee4ac7c9ee857402aa18cad974a41b37f7a7656
/src/lab5_jamil_garcia/Poder.java
a206a40d8f86b09719923d532cfc973269b0d46d
[]
no_license
JamilGarcia/lab5_JamilGarcia
64cdf1fac390f5796ed480d83d4ad163dd604f28
1f381b5f5058d1ce52a1b741c119165ad4166a0c
refs/heads/master
2021-02-05T23:31:27.839845
2020-02-29T01:36:06
2020-02-29T01:36:06
243,848,661
0
0
null
null
null
null
UTF-8
Java
false
false
1,304
java
package lab5_jamil_garcia; public class Poder { private String nombre; private int codigo; private int nvl; private String descrip; private boolean mortal; public Poder() { } public Poder(String nombre, int codigo, int nvl, String descrip, boolean mortal) { this.nombre = nombre; this.codigo = codigo; this.nvl = nvl; this.descrip = descrip; this.mortal = mortal; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public int getCodigo() { return codigo; } public void setCodigo(int codigo) { this.codigo = codigo; } public int getNvl() { return nvl; } public void setNvl(int nvl) { if (nvl > 11 && nvl < 0) { this.nvl = nvl; } else { this.nvl = 1; } } public String getDescrip() { return descrip; } public void setDescrip(String descrip) { this.descrip = descrip; } public boolean isMortal() { return mortal; } public void setMortal(boolean mortal) { this.mortal = mortal; } @Override public String toString() { return nombre; } }
[ "you@example.com" ]
you@example.com
8ed5d0b364c7d484a3d714966011e32b8184252d
edba60bb2b081bef0dde2141d4273a8ec5b85b59
/src/zeus/concepts/fn/AndFn.java
938387adb9c40fa50d05279773a23fd6eef05c00
[]
no_license
sgt101/zeus
6a087bc6438ff82b456b67f193dd554954cd0599
1f48ff24ffaa55128fbe0b9b67b2465e1d1e46ce
refs/heads/master
2020-05-30T11:02:22.819112
2015-02-26T15:25:23
2015-02-26T15:25:23
31,373,027
1
1
null
null
null
null
UTF-8
Java
false
false
5,049
java
/* * The contents of this file are subject to the BT "ZEUS" Open Source * Licence (L77741), Version 1.0 (the "Licence"); you may not use this file * except in compliance with the Licence. You may obtain a copy of the Licence * from $ZEUS_INSTALL/licence.html or alternatively from * http://www.labs.bt.com/projects/agents/zeus/licence.htm * * Except as stated in Clause 7 of the Licence, software distributed under the * Licence is distributed WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the Licence for the specific language governing rights and * limitations under the Licence. * * The Original Code is within the package zeus.*. * The Initial Developer of the Original Code is British Telecommunications * public limited company, whose registered office is at 81 Newgate Street, * London, EC1A 7AJ, England. Portions created by British Telecommunications * public limited company are Copyright 1996-9. All Rights Reserved. * * THIS NOTICE MUST BE INCLUDED ON ANY COPY OF THIS FILE */ package zeus.concepts.fn; import java.util.*; import zeus.util.*; import zeus.concepts.*; public class AndFn extends ValueFunction { protected ValueFunction[] args = new ValueFunction[2]; public AndFn(ValueFunction lhsArg, ValueFunction rhsArg) { super(AND,5); args[0] = lhsArg; args[1] = rhsArg; } public String toString() { String out = "(" + args[0] + "&" + args[1] + ")"; return out; } ValueFunction simplify() { Hashtable cache = new Hashtable(); Vector data = new Vector(); this.expand(data,cache); Misc.sort(data); return concatenate(data,cache); } protected ValueFunction concatenate(Vector data, Hashtable cache) { return concatenate(data,0,cache); } protected ValueFunction concatenate(Vector data, int i, Hashtable cache) { if ( i + 1 == data.size() ) return (ValueFunction)cache.get(data.elementAt(i)); else if ( i + 2 == data.size() ) return new AndFn((ValueFunction)cache.get(data.elementAt(i)), (ValueFunction)cache.get(data.elementAt(i+1))); else return new AndFn((ValueFunction)cache.get(data.elementAt(i)), concatenate(data,i+1,cache)); } void expand(Vector data) { Hashtable cache = new Hashtable(); expand(data,cache); } protected void expand(Vector data, Hashtable cache) { for( int i = 0; i < args.length; i++ ) { if ( args[i].getID() == AND ) ((AndFn)args[i]).expand(data,cache); else { ValueFunction fn = args[i].simplify(); String s = fn.toString(); if ( !data.contains(s) ) { data.addElement(s); cache.put(s,fn); } } } } boolean subsumes(AndFn fn) { Vector superset = new Vector(); Vector subset = new Vector(); this.expand(superset); fn.expand(subset); return Misc.isSubset(subset,superset); } Object getArg(int position) { return args[position]; } public boolean isDeterminate() { return args[0].isDeterminate() && args[1].isDeterminate(); } ValueFunction normalize() { return new AndFn(args[0].normalize(),args[1].normalize()); } public boolean references(ValueFunction var) { return args[0].references(var) || args[1].references(var); } public Vector variables() { return Misc.union(args[0].variables(),args[1].variables()); } public ValueFunction mirror() { return new AndFn(args[0].mirror(),args[1].mirror()); } public ValueFunction resolve(ResolutionContext c, Bindings b) { ValueFunction x = args[0].resolve(c,b); ValueFunction y = args[1].resolve(c,b); return x.equals(y) ? x : new AndFn(x,y); } public ValueFunction duplicate(DuplicationTable table) { return new AndFn(args[0].duplicate(table),args[1].duplicate(table)); } public boolean equals(Object any) { if ( !(any instanceof AndFn) ) return false; AndFn fn = (AndFn)any; ValueFunction a = this.simplify(); ValueFunction b = fn.simplify(); return ((ValueFunction)a.getArg(0)).equals((ValueFunction)b.getArg(0)) && ((ValueFunction)a.getArg(1)).equals((ValueFunction)b.getArg(1)); } ValueFunction unify(ValueFunction fn, Bindings b) { ValueFunction x = null, y = null; if ( fn instanceof AndFn && ((AndFn)fn).subsumes(this) ) return fn; if ( (x = args[0].unifiesWith(fn,b)) != null && (y = args[1].unifiesWith(fn,b)) != null ) { if ( x.equals(y) ) return x; else return new AndFn(x,y); } return null; } public int baseID() { // must be called when Fn is known to be determinate int x = args[0].baseID(); int y = args[1].baseID(); // perform type checking if ( x != y ) throw new IllegalArgumentException("Incompatible types in " + this); return x; } }
[ "simon.2.thompson@gmail.com" ]
simon.2.thompson@gmail.com
1f46579bf60473dd70e975cee6f8fa6edd04ee93
90cc5f32611d15b0a996c236976afc117ecfa565
/src/listener/MyServletRequestAttributeListener.java
e905209a5796217f54d69c2de564c98735199e60
[]
no_license
liuchenwei2000/Servlet_JSP
dece12c6ccd280205a197adb4a6f2a79382d844c
4b77f865780373d3e37a35a9fc45d2d8e9fa0d1c
refs/heads/master
2021-01-10T08:12:06.785606
2019-12-11T06:50:20
2019-12-11T06:50:20
47,015,145
0
0
null
null
null
null
UTF-8
Java
false
false
881
java
/** * */ package listener; import javax.servlet.ServletRequestAttributeEvent; import javax.servlet.ServletRequestAttributeListener; /** * ServletRequestAttributeListener示例 * <p> * ServletRequestAttributeListener用于监听ServletRequest范围内属性的改变。 * * @author 刘晨伟 * * 创建日期:2014-1-11 */ public class MyServletRequestAttributeListener implements ServletRequestAttributeListener { /** * 当程序向 ServletRequest 添加属性时触发。 */ @Override public void attributeAdded(ServletRequestAttributeEvent arg0) { } /** * 当程序从 ServletRequest 删除属性时触发。 */ @Override public void attributeRemoved(ServletRequestAttributeEvent arg0) { } /** * 当程序替换 ServletRequest 中的属性时触发。 */ @Override public void attributeReplaced(ServletRequestAttributeEvent arg0) { } }
[ "liuchenwei2000@163.com" ]
liuchenwei2000@163.com
bf353935618f5d633b5f92916f124feab95e90b5
b6947a1ce570d4483ff51a63ea6d032768bc1d08
/src/org/xbill/DNS/RRset.java
e6628931927f3730c937385242a1cc0f4d07fbe9
[]
no_license
reverseengineeringer/net.cloudpath.xpressconnect
930cbc1efd0aa9997b68f0da58503cd618099bf0
bcf8adaabba321daeb72ebd810b6f47e854d7795
refs/heads/master
2020-05-30T21:47:22.299105
2014-09-29T02:23:37
2014-09-29T02:23:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,634
java
package org.xbill.DNS; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; public class RRset implements Serializable { private static final long serialVersionUID = -3270249290171239695L; private short nsigs; private short position; private List rrs; public RRset() { this.rrs = new ArrayList(1); this.nsigs = 0; this.position = 0; } public RRset(RRset paramRRset) { try { this.rrs = ((List)((ArrayList)paramRRset.rrs).clone()); this.nsigs = paramRRset.nsigs; this.position = paramRRset.position; return; } finally { } } public RRset(Record paramRecord) { this(); safeAddRR(paramRecord); } private Iterator iterator(boolean paramBoolean1, boolean paramBoolean2) { while (true) { int k; try { int i = this.rrs.size(); int j; Iterator localIterator2; if (paramBoolean1) { j = i - this.nsigs; if (j == 0) { Iterator localIterator1 = Collections.EMPTY_LIST.iterator(); localIterator2 = localIterator1; return localIterator2; } } else { j = this.nsigs; continue; ArrayList localArrayList = new ArrayList(j); if (paramBoolean1) { localArrayList.addAll(this.rrs.subList(k, j)); if (k != 0) localArrayList.addAll(this.rrs.subList(0, k)); localIterator2 = localArrayList.iterator(); continue; if (this.position >= j) this.position = 0; k = this.position; this.position = ((short)(k + 1)); continue; k = i - this.nsigs; continue; } localArrayList.addAll(this.rrs.subList(k, i)); continue; } } finally { } if (paramBoolean1) if (!paramBoolean2) k = 0; } } private String iteratorToString(Iterator paramIterator) { StringBuffer localStringBuffer = new StringBuffer(); while (paramIterator.hasNext()) { Record localRecord = (Record)paramIterator.next(); localStringBuffer.append("["); localStringBuffer.append(localRecord.rdataToString()); localStringBuffer.append("]"); if (paramIterator.hasNext()) localStringBuffer.append(" "); } return localStringBuffer.toString(); } private void safeAddRR(Record paramRecord) { if (!(paramRecord instanceof RRSIGRecord)) { if (this.nsigs == 0) { this.rrs.add(paramRecord); return; } this.rrs.add(this.rrs.size() - this.nsigs, paramRecord); return; } this.rrs.add(paramRecord); this.nsigs = ((short)(1 + this.nsigs)); } public void addRR(Record paramRecord) { Record localRecord1; try { if (this.rrs.size() == 0) { safeAddRR(paramRecord); return; } localRecord1 = first(); if (!paramRecord.sameRRset(localRecord1)) throw new IllegalArgumentException("record does not match rrset"); } finally { } if (paramRecord.getTTL() != localRecord1.getTTL()) { if (paramRecord.getTTL() <= localRecord1.getTTL()) break label170; paramRecord = paramRecord.cloneRecord(); paramRecord.setTTL(localRecord1.getTTL()); } while (!this.rrs.contains(paramRecord)) { safeAddRR(paramRecord); break; int i; while (i < this.rrs.size()) { Record localRecord2 = ((Record)this.rrs.get(i)).cloneRecord(); localRecord2.setTTL(paramRecord.getTTL()); this.rrs.set(i, localRecord2); i++; continue; label170: i = 0; } } } public void clear() { try { this.rrs.clear(); this.position = 0; this.nsigs = 0; return; } finally { localObject = finally; throw localObject; } } public void deleteRR(Record paramRecord) { try { if ((this.rrs.remove(paramRecord)) && ((paramRecord instanceof RRSIGRecord))) this.nsigs = ((short)(-1 + this.nsigs)); return; } finally { localObject = finally; throw localObject; } } public Record first() { try { if (this.rrs.size() == 0) throw new IllegalStateException("rrset is empty"); } finally { } Record localRecord = (Record)this.rrs.get(0); return localRecord; } public int getDClass() { return first().getDClass(); } public Name getName() { return first().getName(); } public long getTTL() { try { long l = first().getTTL(); return l; } finally { localObject = finally; throw localObject; } } public int getType() { return first().getRRsetType(); } public Iterator rrs() { try { Iterator localIterator = iterator(true, true); return localIterator; } finally { localObject = finally; throw localObject; } } public Iterator rrs(boolean paramBoolean) { try { Iterator localIterator = iterator(true, paramBoolean); return localIterator; } finally { localObject = finally; throw localObject; } } public Iterator sigs() { try { Iterator localIterator = iterator(false, false); return localIterator; } finally { localObject = finally; throw localObject; } } public int size() { try { int i = this.rrs.size(); int j = this.nsigs; int k = i - j; return k; } finally { localObject = finally; throw localObject; } } public String toString() { if (this.rrs == null) return "{empty}"; StringBuffer localStringBuffer = new StringBuffer(); localStringBuffer.append("{ "); localStringBuffer.append(getName() + " "); localStringBuffer.append(getTTL() + " "); localStringBuffer.append(DClass.string(getDClass()) + " "); localStringBuffer.append(Type.string(getType()) + " "); localStringBuffer.append(iteratorToString(iterator(true, false))); if (this.nsigs > 0) { localStringBuffer.append(" sigs: "); localStringBuffer.append(iteratorToString(iterator(false, false))); } localStringBuffer.append(" }"); return localStringBuffer.toString(); } }
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
f3858854db11ee53763bafb9a6617e3cacc9d458
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-cloudesl/src/main/java/com/aliyuncs/cloudesl/model/v20200201/DescribeEslDeviceRequest.java
39289364dc32b6425cc16e78040584b60f30d366
[ "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
2,586
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.cloudesl.model.v20200201; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.cloudesl.Endpoint; /** * @author auto create * @version */ public class DescribeEslDeviceRequest extends RpcAcsRequest<DescribeEslDeviceResponse> { private String storeId; private Long pageNumber; private String fromDate; private String toDate; private Long pageSize; public DescribeEslDeviceRequest() { super("cloudesl", "2020-02-01", "DescribeEslDevice"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public String getStoreId() { return this.storeId; } public void setStoreId(String storeId) { this.storeId = storeId; if(storeId != null){ putBodyParameter("StoreId", storeId); } } public Long getPageNumber() { return this.pageNumber; } public void setPageNumber(Long pageNumber) { this.pageNumber = pageNumber; if(pageNumber != null){ putBodyParameter("PageNumber", pageNumber.toString()); } } public String getFromDate() { return this.fromDate; } public void setFromDate(String fromDate) { this.fromDate = fromDate; if(fromDate != null){ putBodyParameter("FromDate", fromDate); } } public String getToDate() { return this.toDate; } public void setToDate(String toDate) { this.toDate = toDate; if(toDate != null){ putBodyParameter("ToDate", toDate); } } public Long getPageSize() { return this.pageSize; } public void setPageSize(Long pageSize) { this.pageSize = pageSize; if(pageSize != null){ putBodyParameter("PageSize", pageSize.toString()); } } @Override public Class<DescribeEslDeviceResponse> getResponseClass() { return DescribeEslDeviceResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
2b2de6dd6eebc1e2d7d18ebfafa2d5e505ec8007
5d7344d2172358227eaf4b53e9a649c0ac71c38e
/demo/src/main/java/com/kaiba/demo/java8/fp/function/ConsumerDemo.java
8b43ec43cd43fb2c4dad8c59af8b3f16ed83c22e
[]
no_license
kaibagit/practice
b553388c5501207f69956ea285203e30e1b8f966
a1f0b7fa55d174f93f1a30e219132eedfd315ff3
refs/heads/master
2023-01-12T17:00:47.032342
2022-05-18T02:46:29
2022-05-18T02:46:29
64,130,715
0
0
null
2022-12-27T14:47:22
2016-07-25T11:59:12
Java
UTF-8
Java
false
false
452
java
package com.kaiba.demo.java8.fp.function; import java.util.function.Consumer; public class ConsumerDemo { public static void main(String[] args){ Consumer f = System.out::println; Consumer f2 = n -> System.out.println(n + "-F2"); //执行完F后再执行F2的Accept方法 // f.andThen(f2).accept("test"); //连续执行F的Accept方法 f.andThen(f).andThen(f).andThen(f).accept("test1"); } }
[ "luliru@dianwoba.com" ]
luliru@dianwoba.com
5a4fe6e4f0ccfd85599b9c86d7a21911c809949b
20b4c8b127c057ea7c2a92ebe14dc554cdd87c37
/src/main/java/otvoreni/client/UserFeignClientInterceptor.java
93e80aa666b954d4ef2d854e123d83f19f121a1e
[]
no_license
drasko-kosovic/otvoreni-micro-master
2656162e13eb5fb3520ed807614ff65dad45836d
abfac53be0c1c595ad9de733e0d561a554d494d6
refs/heads/master
2023-07-31T03:46:37.970770
2021-09-13T18:33:09
2021-09-13T18:33:09
406,085,858
0
0
null
null
null
null
UTF-8
Java
false
false
591
java
package otvoreni.client; import feign.RequestInterceptor; import feign.RequestTemplate; import org.springframework.stereotype.Component; import otvoreni.security.SecurityUtils; @Component public class UserFeignClientInterceptor implements RequestInterceptor { private static final String AUTHORIZATION_HEADER = "Authorization"; private static final String BEARER = "Bearer"; @Override public void apply(RequestTemplate template) { SecurityUtils.getCurrentUserJWT().ifPresent(s -> template.header(AUTHORIZATION_HEADER, String.format("%s %s", BEARER, s))); } }
[ "drasko.kosovic@gmail.com" ]
drasko.kosovic@gmail.com
366087322075a854054204580ce64addf74eb1c2
e6640144038dab496e868d28e324c3c72aaa0840
/src/main/精选top面试题/t198/Rob.java
1c9d055b8e1573ee1ad237df7287477e7c3b2f11
[]
no_license
sotowang/leetcode
f8de0530521eb864b07509ae45c5c916341b5f12
83970f766c95ea8dd84b187dd583ee1ac6ee330e
refs/heads/master
2021-12-01T01:32:50.646299
2021-11-15T13:25:37
2021-11-15T13:25:37
207,312,983
1
0
null
null
null
null
UTF-8
Java
false
false
696
java
package 精选top面试题.t198; /** * @auther: sotowang * @date: 2019/12/09 20:11 */ public class Rob { public int rob(int[] nums) { if (nums == null || nums.length == 0) { return 0; } int[] dp = new int[nums.length + 1]; dp[0] = 0; dp[1] = nums[0]; for (int i = 1; i < nums.length; i++) { dp[i + 1] = Math.max(dp[i - 1] + nums[i], dp[i]); } return dp[nums.length]; } public static void main(String[] args) { int[] nums1 = {2, 7, 9, 3, 1}; System.out.println(new Rob().rob(nums1)); int[] nums = {1, 2, 3, 1}; System.out.println(new Rob().rob(nums)); } }
[ "sotowang@qq.com" ]
sotowang@qq.com
59c11c5b11ec5af855b8b7805f1aa033be6e3ab5
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1706_internal/src/java/module1706_internal/a/IFoo3.java
525ea9904dfa8b2fb0cf974a33ef43db16bca309
[ "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
814
java
package module1706_internal.a; import java.util.zip.*; import javax.annotation.processing.*; import javax.lang.model.*; /** * 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 java.awt.datatransfer.DataFlavor * @see java.beans.beancontext.BeanContext * @see java.io.File */ @SuppressWarnings("all") public interface IFoo3<D> extends module1706_internal.a.IFoo2<D> { java.rmi.Remote f0 = null; java.nio.file.FileStore f1 = null; java.sql.Array f2 = null; String getName(); void setName(String s); D get(); void set(D e); }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
5d6d0e499d3485b678d067605e91cc2bfbafd533
df9aa1ec9dc6fc05d0ff87f819d0e7212f267c0c
/src/com/company/leetcode/Graph/CriticalConnectionsinANetwork.java
5cd2c0e98ff9a7d3cba63d0f91385a6b8a6d9a40
[]
no_license
TheNinjaRahul/ProblemSolving
bb8f7dcc645a84e18695b2eca3555217cb5b0ca3
263b2fccac3f0900bb35b43ec582d25db3480c12
refs/heads/master
2023-03-24T16:08:37.190795
2021-03-05T14:03:26
2021-03-05T14:03:26
262,782,533
0
0
null
null
null
null
UTF-8
Java
false
false
3,913
java
package com.company.leetcode.Graph; import java.util.*; public class CriticalConnectionsinANetwork { public static void main(String[] args) { CriticalConnectionsinANetwork cc = new CriticalConnectionsinANetwork(); List<List<Integer>> connections = new ArrayList<>(); List<Integer> l1 = new LinkedList<>(); l1.add(0); l1.add(1); connections.add(l1); List<Integer> l2 = new LinkedList<>(); l2.add(2); l2.add(1); connections.add(l2); List<Integer> l3 = new LinkedList<>(); l3.add(0); l3.add(2); connections.add(l3); List<Integer> l4 = new LinkedList<>(); l4.add(3); l4.add(1); connections.add(l4); System.out.println(cc.criticalConnections(4, connections)); } int time = 0; int[] disc; int[] low; List<Integer>[] graph; List<List<Integer>> result; public List<List<Integer>> criticalConnections(int n, List<List<Integer>> connections) { // System.out.println(connections); graph = new ArrayList[n]; for (int i = 0; i < n; i++) { graph[i] = new ArrayList<>(); } for (List<Integer> list : connections) { graph[list.get(0)].add(list.get(1)); graph[list.get(1)].add(list.get(0)); } System.out.println(graph); boolean[] visited = new boolean[n]; disc = new int[n]; low = new int[n]; result = new LinkedList<>(); dfs(0, -1, visited); return result; } private void dfs(int current, int parent, boolean[] visited) { disc[current] = low[current] = time++; visited[current] = true; for (int child : graph[current]) { if (child == parent) continue; if (visited[child] == false) { dfs(child, current, visited); low[current] = Math.min(low[current], low[child]); if (low[current] < low[child]) { result.add(new ArrayList<>(Arrays.asList(current, child))); } } else { low[current] = Math.min(low[current], disc[child]); } } } public List<List<Integer>> criticalConnections2(int n, List<List<Integer>> connections) { System.out.println(connections); Map<Integer, List<Integer>> map = new HashMap<>(); for (List<Integer> list : connections) { if (!map.containsKey(list.get(0))) map.put(list.get(0), new LinkedList<>()); if (!map.containsKey(list.get(1))) map.put(list.get(1), new LinkedList<>()); map.get(list.get(0)).add(list.get(1)); map.get(list.get(1)).add(list.get(0)); } int[] disc = new int[n]; int[] low = new int[n]; int[] parent = new int[n]; List<List<Integer>> result = new LinkedList<>(); Arrays.fill(disc, -1); Arrays.fill(low, -1); Arrays.fill(parent, -1); for (int key : map.keySet()) { if (disc[key] == -1) { dfs(key, disc, low, parent, result, map); } } return result; } private void dfs(int u, int[] disc, int[] low, int[] parent, List<List<Integer>> result, Map<Integer, List<Integer>> map) { disc[u] = time; low[u] = time; time++; for (int v : map.get(u)) { if (disc[v] == -1) { parent[v] = u; dfs(v, disc, low, parent, result, map); low[u] = Math.min(low[u], low[v]); if (low[u] < low[v]) { result.add(new ArrayList<>(Arrays.asList(u, v))); } } else { if (v != parent[u]) { low[u] = Math.min(low[u], disc[v]); } } } } }
[ "chudasama.rahul.r@gmail.com" ]
chudasama.rahul.r@gmail.com
09ec050c335f8ea0245b4b48f170dad24591838d
985c21b0edcb062bda7812f7531ace31fc0da6d5
/main/calibration/src/boofcv/alg/feature/detect/grid/UtilCalibrationGrid.java
372125b3b612df8b222ac9c9c4bcd35e77f5bae5
[ "Apache-2.0" ]
permissive
siarheidevel/BoofCV
2408c39e035d2046d74cf3bd6bf993a0eee2d501
07d4f9dee7f5e1704a547da43bab2c502e3bb5d3
refs/heads/master
2021-01-15T22:29:56.944693
2012-11-07T01:18:39
2012-11-07T01:18:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,922
java
/* * Copyright (c) 2011-2012, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.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 boofcv.alg.feature.detect.grid; import georegression.struct.point.Point2D_F64; import georegression.struct.point.Point2D_I32; import pja.sorting.QuickSort_F64; import java.util.ArrayList; import java.util.List; /** * Various functions for computing calibration grids. * * @author Peter Abeles */ public class UtilCalibrationGrid { /** * Automatically checks and adjusts the points. if the number of rows/columns are swapped the * grid is rotated. If no change is needed the original list is returned. Otherwise null is returned * if some failure condition is present. * * @param points Ordered points in a grid. * @param numRows Number of rows in grid. * @param numCols Number of columns in grid. * @param expectedRows Number of expected rows. * @param expectedCols Number of expected columns. * @return Points in the correct order/crientation. */ public static List<Point2D_F64> rotatePoints( List<Point2D_F64> points , int numRows , int numCols , int expectedRows , int expectedCols ) { if( expectedCols == numCols && expectedRows == numRows ) return points; if( expectedCols == numRows && expectedRows == numCols ) { return UtilCalibrationGrid.rotatePoints(points,numRows,numCols); } return null; } /** * Rotates the grid by 90 degrees in the counter clockwise direction. Useful when the points are organized * into a grid that has the number of rows and columns swapped. The returned points will be a grid * with the input rows/columns swapped. * * @param points Ordered points in a grid. * @param numRows Number of rows in grid. * @param numCols Number of columns in grid. * @return Ordered points. */ public static List<Point2D_F64> rotatePoints( List<Point2D_F64> points , int numRows , int numCols ) { List<Point2D_F64> out = new ArrayList<Point2D_F64>(); for( int i = 0; i < numCols; i++ ) { for( int j = 0; j < numRows; j++ ) { int index = j*numCols + (numCols-i-1); out.add( points.get(index)); } } return out; } /** * Returns the next point in the list assuming a cyclical list * * @param i current index * @param dir Direction and amount of increment * @param size Size of the list * @return i+dir taking in account the list's cyclical nature */ public static int incrementCircle( int i , int dir , int size ) { i += dir; if( i < 0 ) i = size+i; else if( i >= size ) i = i - size; return i; } /** * * dist = (dir > 0 ) i1-i0 ? i0-i1; * if( dist < 0 ) * distance = size+distance; * * @param i0 First point. * @param i1 Second point. * @param dir 0 > counting down, 0 < counting up * @param size * @return */ public static int distanceCircle( int i0 , int i1 , int dir , int size ) { int distance = ( dir > 0 ) ? i1-i0 : i0-i1; if( distance < 0 ) distance = size+distance; return distance; } /** * Distance between two elements in a circular list. The closest distance in either direction * is returned. * * @param i0 * @param i1 * @param size * @return */ public static int distanceCircle( int i0 , int i1 , int size ) { int distanceA = distanceCircle(i0,i1,1,size); int distanceB = distanceCircle(i0,i1,-1,size); return Math.min(distanceA,distanceB); } /** * Find the average of all the points in the list. * * @param contour * @return */ public static Point2D_I32 findAverage(List<Point2D_I32> contour) { int x = 0; int y = 0; for( Point2D_I32 p : contour ) { x += p.x; y += p.y; } x /= contour.size(); y /= contour.size(); return new Point2D_I32(x,y); } /** * Sorts the points in counter clockwise direction around the provided point * * @param center Point that the angle is computed relative to * @param contour List of all the points which are to be sorted by angle */ public static void sortByAngleCCW(Point2D_F64 center, List<Point2D_F64> contour) { double angles[] = new double[ contour.size() ]; int indexes[] = new int[ angles.length ]; for( int i = 0; i < contour.size(); i++ ) { Point2D_F64 c = contour.get(i); double dx = c.x-center.x; double dy = c.y-center.y; angles[i] = Math.atan2(dy,dx); } QuickSort_F64 sort = new QuickSort_F64(); sort.sort(angles,angles.length,indexes); List<Point2D_F64> sorted = new ArrayList<Point2D_F64>(contour.size()); for( int i = 0; i < indexes.length; i++ ) { sorted.add( contour.get( indexes[i])); } contour.clear(); contour.addAll(sorted); } /** * Returns the index of the point farthest away from the sample point */ public static int findFarthest( Point2D_I32 a , List<Point2D_I32> contour ) { int best = -1; int index = -1; for( int i = 0; i < contour.size(); i++ ) { Point2D_I32 b = contour.get(i); int d = a.distance2(b); if( d > best ) { best = d; index = i; } } return index; } public static int findFarthest( Point2D_F64 a , List<Point2D_F64> contour ) { double best = -1; int index = -1; for( int i = 0; i < contour.size(); i++ ) { Point2D_F64 b = contour.get(i); double d = a.distance2(b); if( d > best ) { best = d; index = i; } } return index; } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
4da1c47374c138635ff97c3b78b9026f19921e87
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MOCKITO-9b-4-9-MOEAD-WeightedSum:TestLen:CallDiversity/org/mockito/internal/handler/MockHandlerImpl_ESTest.java
75507c5347ec89c0449c7733172339970256969b
[]
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
565
java
/* * This file was automatically generated by EvoSuite * Wed Apr 08 12:38:02 UTC 2020 */ package org.mockito.internal.handler; 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 MockHandlerImpl_ESTest extends MockHandlerImpl_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a166490122eb6d2b5e78ae2d989b2cb0133c71de
7572dbc9a1bab403d44d70014b82b9ab90579733
/MyEclipse 10/pluto2/src/main/java/com/ccsee/portal/portlet/HelloWorldPortlet.java
1b3ea6fe453eb82eb713a28be2fac250a2f6aff6
[]
no_license
zhangjunfang/nsp
8c6f5f356d0d1e033dde1c492dd936e4ccc34bfe
c73ffc38e09387053b7ce452a8abf6f63859b29b
refs/heads/master
2020-05-20T00:46:41.610976
2014-02-26T07:16:02
2014-02-26T07:16:02
17,197,616
1
0
null
null
null
null
UTF-8
Java
false
false
509
java
package com.ccsee.portal.portlet; import java.io.IOException; import javax.portlet.GenericPortlet; import javax.portlet.PortletException; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; public class HelloWorldPortlet extends GenericPortlet { @Override protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { response.setContentType("text/html"); response.getWriter().println("Hello, This is the portal world!"); } }
[ "zhangjunfang0505@163.com" ]
zhangjunfang0505@163.com
ec83bd66d458ba37248202d479d629fc8ab912da
cf52b3064d536af626339ddd30b28c0b8e15aaee
/gameserver/src/main/java/org/l2junity/gameserver/model/holders/NpcRoutesHolder.java
0a4809d840bcfdb21c015daf04868f88f9526b3e
[]
no_license
LegacyofAden/emu-ungp
7aaa7d9fd60698cb784d8c2c1eaaa20ef0a8d59b
b76dc91157e43d67f886b6926afd11b110ed5dce
refs/heads/master
2021-01-01T18:21:03.529671
2017-04-08T23:08:37
2017-04-08T23:08:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,971
java
/* * Copyright (C) 2004-2015 L2J Unity * * This file is part of L2J Unity. * * L2J Unity 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 Unity 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 org.l2junity.gameserver.model.holders; import org.l2junity.gameserver.model.Location; import org.l2junity.gameserver.model.actor.Npc; import org.l2junity.gameserver.model.interfaces.ILocational; import java.util.HashMap; import java.util.Map; /** * Holds depending between NPC's spawn point and route * * @author GKR */ public final class NpcRoutesHolder { private final Map<String, String> _correspondences; public NpcRoutesHolder() { _correspondences = new HashMap<>(); } /** * Add correspondence between specific route and specific spawn point * * @param routeName name of route * @param loc Location of spawn point */ public void addRoute(String routeName, Location loc) { _correspondences.put(getUniqueKey(loc), routeName); } /** * @param npc * @return route name for given NPC. */ public String getRouteName(Npc npc) { if (npc.getSpawn() != null) { String key = getUniqueKey(npc.getSpawn()); return _correspondences.containsKey(key) ? _correspondences.get(key) : ""; } return ""; } /** * @param loc * @return unique text string for given Location. */ private String getUniqueKey(ILocational loc) { return (loc.getX() + "-" + loc.getY() + "-" + loc.getZ()); } }
[ "RaaaGEE@users.noreply.github.com" ]
RaaaGEE@users.noreply.github.com
16503a00e71b6b35249d7f30ff9ed7963a85ec8e
b7411b0233b76dc756edb36e5a81d9c599ae8f61
/rest-jpa/src/main/java/org/swarmic/examples/jparest/EmployeeRest.java
1c0e7ca51a198168da9c401e0fa52abc133c53b0
[]
no_license
alexandregama/swarmic-examples
5370df29b2c653ec3c5640add4ea51fef874b20d
e19199ea8f03a3c01d7807f52641ec23e8774b52
refs/heads/master
2021-01-17T21:53:18.100510
2016-06-17T06:27:20
2016-06-17T06:27:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,851
java
/* * JBoss, Home of Professional Open Source * Copyright 2016, Red Hat, Inc., and individual contributors * by the @authors tag. * * 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.swarmic.examples.jparest; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; import javax.transaction.Transactional; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import java.util.List; /** * @author Ken Finnigan */ @Path("/") @RequestScoped public class EmployeeRest { @Inject EmployeeService service; @GET @Path("all") @Produces("application/json") public List<Employee> get() { return service.getAll(); } @GET @Path("allslow") @Produces("application/json") public List<Employee> getSlow() { return service.getSlow(); } @GET @Path("allslowtx") @Produces("application/json") @Transactional public List<Employee> getSlowTransactional() { return service.getSlow(); } @GET @Path("rem") @Produces("application/json") @Transactional public String rem() { service.rem(); return "ok"; } @GET @Path("remslow") @Produces("application/json") @Transactional public String remSlow() { service.remSlow(); return "ok"; } }
[ "antoine@sabot-durand.net" ]
antoine@sabot-durand.net
d6f2f8e7e16712f45c77121ba8a7845e308cec5c
0308ca5b152a082c1a206a1a136fd45e79b48143
/usvao/prototype/dalserver/tags/dalserver-v0.5/vendor/cds-savot/savot/model/SavotOption.java
8608fd450e5a66d1cb46a02513f3439656f122c6
[]
no_license
Schwarzam/usvirtualobservatory
b609bf21a09c187b70e311a4c857516284049c31
53fe6c14cc9312d048326acfa25377e3eac59858
refs/heads/master
2022-03-28T23:38:58.847018
2019-11-27T16:05:47
2019-11-27T16:05:47
null
0
0
null
null
null
null
WINDOWS-1250
Java
false
false
4,053
java
// // ------ // // SAVOT Data Model // // Author: André Schaaff // Address: Centre de Donnees astronomiques de Strasbourg // 11 rue de l'Universite // 67000 STRASBOURG // FRANCE // Email: schaaff@astro.u-strasbg.fr, question@simbad.u-strasbg.fr // // ------- // // In accordance with the international conventions about intellectual // property rights this software and associated documentation files // (the "Software") is protected. The rightholder authorizes : // the reproduction and representation as a private copy or for educational // and research purposes outside any lucrative use, // subject to the following conditions: // // The above copyright notice shall be included. // // 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, NON INFRINGEMENT, // LOSS OF DATA, LOSS OF PROFIT, LOSS OF BARGAIN OR IMPOSSIBILITY // TO USE SUCH SOFWARE. IN NO EVENT SHALL THE RIGHTHOLDER 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. // // For any other exploitation contact the rightholder. // // ----------- // // Conformement aux conventions internationales relatives aux droits de // propriete intellectuelle ce logiciel et sa documentation sont proteges. // Le titulaire des droits autorise : // la reproduction et la representation a titre de copie privee ou des fins // d'enseignement et de recherche et en dehors de toute utilisation lucrative. // Cette autorisation est faite sous les conditions suivantes : // // La mention du copyright portee ci-dessus devra etre clairement indiquee. // // LE LOGICIEL EST LIVRE "EN L'ETAT", SANS GARANTIE D'AUCUNE SORTE. // LE TITULAIRE DES DROITS NE SAURAIT, EN AUCUN CAS ETRE TENU CONTRACTUELLEMENT // OU DELICTUELLEMENT POUR RESPONSABLE DES DOMMAGES DIRECTS OU INDIRECTS // (Y COMPRIS ET A TITRE PUREMENT ILLUSTRATIF ET NON LIMITATIF, // LA PRIVATION DE JOUISSANCE DU LOGICIEL, LA PERTE DE DONNEES, // LE MANQUE A GAGNER OU AUGMENTATION DE COUTS ET DEPENSES, LES PERTES // D'EXPLOITATION,LES PERTES DE MARCHES OU TOUTES ACTIONS EN CONTREFACON) // POUVANT RESULTER DE L'UTILISATION, DE LA MAUVAISE UTILISATION // OU DE L'IMPOSSIBILITE D'UTILISER LE LOGICIEL, ALORS MEME // QU'IL AURAIT ETE AVISE DE LA POSSIBILITE DE SURVENANCE DE TELS DOMMAGES. // // Pour toute autre utilisation contactez le titulaire des droits. // package cds.savot.model; /** * <p>Option element </p> * @author Andre Schaaff * @version 2.6 Copyright CDS 2002-2005 * (kickoff 31 May 02) */ public class SavotOption extends MarkupComment implements SimpleTypes { // name attribute protected char[] name = null; // value attribute protected char[] value = null; // OPTION elements protected OptionSet options = null; /** * Constructor */ public SavotOption() { } /** * Set name attribute * @param name */ public void setName(String name) { if (name != null) this.name = name.toCharArray(); } /** * Get name attribute * @return String */ public String getName() { if (name != null) return String.valueOf(name); else return ""; } /** * Set value attribute * @param value */ public void setValue(String value) { if (value != null) this.value = value.toCharArray(); } /** * Get value attribute * @return String */ public String getValue() { if (value != null) return String.valueOf(value); else return ""; } /** * Get OPTION elements reference * @return OptionSet */ public OptionSet getOptions() { if (options == null ) options = new OptionSet(); return options; } /** * Set OPTION elements reference * @param options */ public void setOptions(OptionSet options) { this.options = options; } }
[ "usvirtualobservatory@5a1e9bf7-f4d4-f7d4-5b89-e7d39643c4b5" ]
usvirtualobservatory@5a1e9bf7-f4d4-f7d4-5b89-e7d39643c4b5
011d16ce9918dca06e5036e2b627d5084b69fe43
84abf44f04e7e19cc07eb4b8c8fe14db1ccb9b22
/trunk/src/main/java/com/framework/macros/graficas/interceptor/impl/IntercerptorPesoEdad0a2Anios.java
c9940d83cc1c4ca8db5299f65cbbb4bac91f36c1
[]
no_license
BGCX261/zkmhealthmanager-svn-to-git
3183263172355b7ac0884b793c1ca3143a950411
bb626589f101034137a2afa62d8e8bfe32bf7d47
refs/heads/master
2021-01-22T02:57:49.394471
2015-08-25T15:32:48
2015-08-25T15:32:48
42,323,197
0
1
null
null
null
null
UTF-8
Java
false
false
6,507
java
package com.framework.macros.graficas.interceptor.impl; import healthmanager.controller.ZKWindow; import healthmanager.exception.HealthmanagerException; import java.sql.Timestamp; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.zkoss.zk.ui.Executions; import tablas_crecimiento_desarrollo.modelo.bean.Tabla_talla_peso; import com.framework.macros.graficas.GraficaMacro; import com.framework.macros.graficas.TablaMacro; import com.framework.macros.graficas.TablaMacro.Tipo_tabla; import com.framework.macros.graficas.interceptor.IInterceptorGrafica; import com.framework.macros.graficas.interceptor.InterceptorSelector; import com.framework.macros.graficas.moldG.PainterMoldG; import com.framework.macros.graficas.respuesta.RespuestaInt; import com.framework.res.Funcion_getEdad; import com.framework.util.MensajesUtil; import com.framework.util.Utilidades; public class IntercerptorPesoEdad0a2Anios extends InterceptorSelector implements IInterceptorGrafica { private double peso; private ESexo sexo; private double talla; private Timestamp fecha_nacimineto; public IntercerptorPesoEdad0a2Anios(ESexo sexo) { super(); this.sexo = sexo; } public IntercerptorPesoEdad0a2Anios() {} public double getPeso() { return peso; } public void setPeso(double peso) { this.peso = peso; } public ESexo getSexo() { return sexo; } public void setSexo(ESexo sexo) { this.sexo = sexo; } public double getTalla() { return talla; } public void setTalla(double talla) { this.talla = talla; } public Timestamp getFecha_nacimineto() { return fecha_nacimineto; } public void setFecha_nacimineto(Timestamp fecha_nacimineto) { this.fecha_nacimineto = fecha_nacimineto; } /* Estos son los metodos que devolveran los valores */ @Override public RespuestaInt getResultado() { if(validar()){ String sexoL = ESexo.getSexo(sexo); String tipo_tabla = ETipoTabla.getTipo(ETipoTabla.WEIGHT); Tabla_talla_peso tabla_talla_peso = new Tabla_talla_peso(); tabla_talla_peso.setTalla_peso(validateAproximacion0Apunto5(talla)); tabla_talla_peso.setSexo(sexoL); tabla_talla_peso.setEdad_inicial(0); tabla_talla_peso.setEdad_final(2); tabla_talla_peso.setTipo(tipo_tabla); RespuestaInt respuestaInt = new RespuestaInt(); insertPuntosRespuesta(respuestaInt); tabla_talla_peso = getServiceLocator().getTalla_pesoService().consultar(tabla_talla_peso); if(tabla_talla_peso != null){ double peso_mediana = tabla_talla_peso.getMedia(); respuestaInt.setValor(Utilidades.calcularMedianaCurvas(peso, peso_mediana, tabla_talla_peso.getMenos_1_sd(), tabla_talla_peso.getMas_1_sd())); return respuestaInt; } throw new HealthmanagerException(" Esta no se encuentra en el rango establecido: " + talla); }else{ return null; } } private void insertPuntosRespuesta(RespuestaInt respuestaInt){ double meses = Funcion_getEdad.getMesesLong(fecha_nacimineto); respuestaInt.setX(meses); respuestaInt.setY(peso); } @Override public void mostrarGrafica(final List<RespuestaInt> valores, ZKWindow zkWindow, ESexo sexo){ //log.info("Valores ha graficar: " + valores.size()); String mapper_grafica = sexo == ESexo.FEMENINO ? "/images/graficas/f/peso_edad_0_2anios.mapper" : "/images/graficas/m/peso_edad_0_a_2.mapper"; final GraficaMacro graficaMacro = new GraficaMacro(); // graficaMacro.setShowBackLine(true); if(sexo == ESexo.FEMENINO){ graficaMacro.setWidthI(845); graficaMacro.setHeigthI(515); graficaMacro.setX(764d); graficaMacro.setY(19d); graficaMacro.setFocoX(63d); graficaMacro.setFocoY(471d); graficaMacro.setGroups(2); }else{ graficaMacro.setWidthI(877); graficaMacro.setHeigthI(531); graficaMacro.setX(801d); graficaMacro.setY(12d); graficaMacro.setFocoX(61d); graficaMacro.setFocoY(485d); graficaMacro.setGroups(2); } graficaMacro.setMapper(mapper_grafica); graficaMacro.setLengthSectX(24); graficaMacro.setLengthSectY(82); graficaMacro.getPainterMoldG().apllyGraficaSectores(); graficaMacro.getPainterMoldG().showPoints(validarLista(valores, graficaMacro.getPainterMoldG())); mostrarVentanaParaUsuario(graficaMacro, zkWindow, "Grafica de Peso para edad de 0 a 2 Anios"); } @Override public void mostrarTabla(ESexo sexo, ZKWindow zkWindow) { TablaMacro tablaMacro = (TablaMacro) Executions.createComponents("/WEB-INF/macros/graficas/TablaGraficas.zul", zkWindow, new HashMap<String, Object>()); String sexoL = ESexo.getSexo(sexo); String tipo_tabla = ETipoTabla.getTipo(ETipoTabla.WEIGHT); Map<String, Object> map = new HashMap<String, Object>(); map.put("sexo", sexoL); map.put("tipo", tipo_tabla); map.put("edad_inicial", 0); map.put("edad_final", 2); List<Tabla_talla_peso> tabla_talla_pesos = getServiceLocator().getTalla_pesoService().listar(map); //log.info("Listado: " + tabla_talla_pesos.size()); /* Mostrar tabla */ tablaMacro.setSexo(sexo); tablaMacro.setTipo_tabla(Tipo_tabla.NUMERIC_LENGTH); tablaMacro.setTitleValorReturn("ESTATURA"); tablaMacro.mostrarTabla(tabla_talla_pesos); mostrarVentanaParaUsuario(tablaMacro, zkWindow, "Tabla de Peso para edad de 0 a 2 Anios"); } private List<RespuestaInt> validarLista(List<RespuestaInt> valores, PainterMoldG painterMoldG) { List<RespuestaInt> respuestaIntsSend = new ArrayList<RespuestaInt>(); for (RespuestaInt respuestaInt : valores) { double yTemp = respuestaInt.getY(); // por que el valor es cambiantes RespuestaInt respuestaIntSend = new RespuestaInt(); respuestaIntSend.setX(respuestaInt.getX()); respuestaIntSend.setY(respuestaInt.getY()); respuestaIntSend.setValor(respuestaInt.getValor()); if(yTemp > 2){ respuestaIntSend.setY(((respuestaInt.getY() - 1) * 5) - 2); } if(yTemp > 17){ respuestaIntSend.setY(respuestaInt.getY() - 1); } respuestaIntsSend.add(respuestaIntSend); } return respuestaIntsSend; } @Override public boolean validar() { boolean validado = true; if(sexo == null) validado = false; if(fecha_nacimineto == null) validado = false; if(!validado){ MensajesUtil.mensajeAlerta("Advertencia", "No pueden haber valores nulos.."); } return validado; } }
[ "you@example.com" ]
you@example.com
d46bcb244a48bf04ff6b289a21aaef3e1d0257ae
959381e3268a434a31b8663db27770388d246f46
/dimensiondata/src/main/java/org/jclouds/dimensiondata/cloudcontrol/handlers/DimensionDataCloudControlErrorHandler.java
896d8be4e3b38a78693857c0b34865020c17d653
[ "Apache-2.0" ]
permissive
jclouds/jclouds-labs
32f1e3f617d1353fcf5cf75af170061c202ce8af
65d27af44a6e6fa7a1b115aea0891095adb81d82
refs/heads/master
2023-03-16T00:27:59.856520
2020-07-25T13:33:57
2020-07-25T13:33:57
10,040,970
35
72
null
2020-07-25T13:30:53
2013-05-13T20:47:47
Java
UTF-8
Java
false
false
3,791
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jclouds.dimensiondata.cloudcontrol.handlers; import org.jclouds.http.HttpCommand; import org.jclouds.http.HttpErrorHandler; import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpResponseException; import org.jclouds.rest.AuthorizationException; import org.jclouds.rest.ResourceAlreadyExistsException; import org.jclouds.rest.ResourceNotFoundException; import javax.inject.Singleton; import java.util.ConcurrentModificationException; import static org.jclouds.http.HttpUtils.closeClientButKeepContentStream; /** * This will org.jclouds.dimensiondata.cloudcontrol.parse and set an appropriate exception on the command object. */ @Singleton public class DimensionDataCloudControlErrorHandler implements HttpErrorHandler { public void handleError(HttpCommand command, HttpResponse response) { // it is important to always read fully and close streams byte[] data = closeClientButKeepContentStream(response); String message = data != null ? new String(data) : null; Exception exception = message != null ? new HttpResponseException(command, response, message) : new HttpResponseException(command, response); message = message != null ? message : String.format("%s -> %s", command.getCurrentRequest().getRequestLine(), response.getStatusLine()); switch (response.getStatusCode()) { case 400: if (message.contains("RESOURCE_NOT_FOUND")) { exception = new ResourceNotFoundException(message, exception); } else if (message.contains("OPERATION_NOT_SUPPORTED")) { exception = new UnsupportedOperationException(message, exception); } else if (message.contains("RESOURCE_BUSY")) { exception = new ConcurrentModificationException(message, exception); } else if (message.contains("RESOURCE_LOCKED")) { exception = new IllegalStateException(message, exception); } else if (message.contains("NAME_NOT_UNIQUE")) { exception = new ResourceAlreadyExistsException(message, exception); } else if (message.contains("UNEXPECTED_ERROR") || message.contains("RETRYABLE_SYSTEM_ERROR") || message.contains("SYSTEM_ERROR")) { break; } else { exception = new IllegalArgumentException(message, exception); } break; case 401: exception = new AuthorizationException(message, exception); break; case 403: exception = new AuthorizationException(message, exception); break; case 404: // CloudControl uses error code 400 with RESOURCE_NOT_FOUND to report missing assets // 404 means malformed URI only exception = new IllegalArgumentException(message, exception); break; } command.setException(exception); } }
[ "nacx@apache.org" ]
nacx@apache.org
e132153034a25cf60cb4e44116f6c91d5436e299
ca9371238f2f8fbec5f277b86c28472f0238b2fe
/src/mx/com/kubo/registro/datos/phone/TelefonoIMO.java
d3ffe15415eb5711393ff4c04e10c776e86911d2
[]
no_license
ocg1/kubo.portal
64cb245c8736a1f8ec4010613e14a458a0d94881
ab022457d55a72df73455124d65b625b002c8ac2
refs/heads/master
2021-05-15T17:23:48.952576
2017-05-08T17:18:09
2017-05-08T17:18:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
403
java
package mx.com.kubo.registro.datos.phone; import javax.faces.event.AjaxBehaviorEvent; import mx.com.kubo.model.Phone; import mx.com.kubo.registro.ChangeControlIMO; public interface TelefonoIMO extends ChangeControlIMO { void setInfusion_id(Integer infusion_id); void init(); void update(AjaxBehaviorEvent event); public Phone getThisPhoneFixed(); public Phone getThisPhoneCell(); }
[ "damian.tapia.nava@gmail.com" ]
damian.tapia.nava@gmail.com
a28b4625edf14a26dcc2248e2f3a86e85c051b64
9e102f8db0230f0dbbecf44883c4bd1a7228e278
/src/backjoon/브루트포스/분해합_2231.java
de9b776560bf6b178723782fc84ade82133a990c
[]
no_license
wnstlr0615/AlgorizmStudy
927a499d5c4de16ad664091a3a0b33f7c86cf3d6
3998cabc510b4847542dc5f6fda98d6814cbd4e6
refs/heads/master
2023-06-09T15:10:09.572204
2021-07-04T08:59:35
2021-07-04T08:59:35
382,581,008
0
0
null
null
null
null
UTF-8
Java
false
false
554
java
package backjoon.브루트포스; import java.util.Scanner; public class 분해합_2231 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int result=0; for (int i = 0; i <n ; i++) { int num=i; int sum=i; while(num>0){ sum=sum+(num%10); num/=10; } if(n==sum){ result=i; break; } } System.out.println(result); } }
[ "ryan0@kakao.com" ]
ryan0@kakao.com
8db27725562cde924d72d42da16f7c74fbda421a
f7464d97794e0aabaaf7db6a8dd556d6ee5a976c
/library/src/org/webpki/asn1/DumpASN1.java
58472e8785f4ddf21087d4476794e1f38536b9d3
[]
no_license
cyberphone/openkeystore.old
dbc03abfa0c3ec211cdb29d29b0f2b20210698cb
342f3c290473bf0dd225099188b567b6ef26979e
refs/heads/master
2021-10-23T15:08:03.993450
2018-03-10T08:30:19
2018-03-10T08:30:19
32,799,128
1
0
null
null
null
null
UTF-8
Java
false
false
3,745
java
/* * Copyright 2006-2016 WebPKI.org (http://webpki.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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.webpki.asn1; import java.io.*; import org.webpki.util.ArrayUtil; /** * Command line utility for viewing ASN.1 structures. * Will output a tree view. */ public class DumpASN1 { static void printUsageAndExit(String error) { if (error != null) { System.out.println(""); System.out.println(error); System.out.println(""); } System.out.println("Usage:"); System.out.println(""); System.out.println(" DumpASN1 [options] file"); System.out.println(""); System.out.println(" -x Don't expand OCTET and BIT STRINGS"); System.out.println(" -n Don't show byte numbers"); System.out.println(" -o nnn Start parsing at decimal offset nnn"); System.out.println(" -d file Dump DER data to file"); System.out.println(" -a file Use alternate OID definition file"); System.exit(0); } static int parseInt(String s) { try { return Integer.parseInt(s); } catch (NumberFormatException nfe) { printUsageAndExit("Malformed number " + s); return -1; } } public static void main(String[] args) throws Exception { if (args.length == 0) printUsageAndExit(null); int offset = 0; String oidfile = null; String outfile = null; boolean expand = true; boolean bytenum = true; String infile = null; for (int i = 0; i < args.length; i++) { String arg = args[i]; if (arg.startsWith("-")) { if (infile != null) printUsageAndExit("unexpected option: " + arg); if (arg.equals("-x")) { expand = false; } else if (arg.equals("-n")) { bytenum = false; } else { if (++i >= args.length) printUsageAndExit("Missing operand to option: " + arg); String oper = args[i]; if (oper.startsWith("-")) printUsageAndExit("Bad operand to option: " + arg); if (arg.equals("-o")) { offset = parseInt(oper); } else if (arg.equals("-d")) { outfile = oper; } else if (arg.equals("-a")) { oidfile = oper; } else printUsageAndExit("Unknown option: " + arg); } } else { if (infile != null) printUsageAndExit("Multiple input file: " + arg); infile = arg; } } if (infile == null) printUsageAndExit("Missing input file!"); if (oidfile != null) ASN1ObjectID.tryReadOIDNames(oidfile); BaseASN1Object o = DerDecoder.decode(ArrayUtil.readFile(infile), offset); System.out.println(o.toString(expand, bytenum)); if (outfile != null) { FileOutputStream fos = new FileOutputStream(outfile); o.encode(fos); fos.close(); } } }
[ "anders.rundgren.net@gmail.com" ]
anders.rundgren.net@gmail.com
15b1c634dd0beef8b1cb5bf001d3e8e8ac7a5285
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/15/15_839593aec488911536db6e4f718a0ae5e38875f9/RootDetection/15_839593aec488911536db6e4f718a0ae5e38875f9_RootDetection_s.java
dbb3bfebfb39c8614f273c8a87a10aac73d05582
[]
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,301
java
/* * Copyright (C) 2011 asksven * * 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.asksven.android.common.kernelutils; import com.asksven.android.common.shellutils.Exec; import com.asksven.android.common.shellutils.ExecResult; /** * This class provides methods for detecting if the phone is rooted * @author sven * */ public class RootDetection { /** * Tests whether su can be executed. * @return 0 if */ public static boolean hasSuRights() { ExecResult res = Exec.execPrint(new String[]{"su", "-c", "ls /"}); boolean bRet = false; if (res.getSuccess()) { String strRes = res.getResultLine(); if (!strRes.contains("Permission Denial")) { bRet = true; } } return bRet; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a094a2ca2f4c8c728081af7939cd21ea9a495315
b9caa8b9e35781d82334e4c18d593307dfca1594
/TurkcellDesignPatterns/src/com/example/java/dp/behavior/chainofresponsibility/Main.java
57f8ba4124844ea82dd61c4ca156d057831fd99f
[]
no_license
burhanorkun/tdesignpatterns
a34c27a3687bf40c83f4b3a33abc62970d5f798f
0202aa0ec1d983ac917bcef486a069b494d97e7a
refs/heads/master
2020-09-13T12:30:17.901599
2019-11-19T13:35:47
2019-11-19T13:35:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
623
java
package com.example.java.dp.behavior.chainofresponsibility; public class Main { public static void main(final String[] args) { IHandler iHandler = new NegativeHandler( new ZeroHandler( new RangeFiftyHandler( new RangeFiftyToHundredHandler( null)))); String handler = iHandler.handler(51); System.out.println(handler); } }
[ "osman.yaycioglu@gmail.com" ]
osman.yaycioglu@gmail.com
5dcc6b4f852a16a6f3ece6321c5f76124c36238f
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/account/friend/a/ae.java
9a91d35cfcc45ceb009307de3e57c5b96d68e994
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
2,934
java
package com.tencent.mm.plugin.account.friend.a; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.ai.b; import com.tencent.mm.ai.b.a; import com.tencent.mm.ai.b.b; import com.tencent.mm.ai.b.c; import com.tencent.mm.ai.f; import com.tencent.mm.ai.m; import com.tencent.mm.network.e; import com.tencent.mm.network.k; import com.tencent.mm.network.q; import com.tencent.mm.protocal.protobuf.aux; import com.tencent.mm.protocal.protobuf.auy; import com.tencent.mm.protocal.protobuf.auz; import com.tencent.mm.sdk.platformtools.ab; import java.util.ArrayList; import java.util.LinkedList; public final class ae extends m implements k { private final b ehh; private f ehi; private LinkedList<aux> gwg; public String gwh; public ae(ArrayList<String> paramArrayList) { AppMethodBeat.i(108462); Object localObject = new b.a(); ((b.a)localObject).fsJ = new auy(); ((b.a)localObject).fsK = new auz(); ((b.a)localObject).uri = "/cgi-bin/micromsg-bin/invitegooglecontact"; ((b.a)localObject).fsI = 489; ((b.a)localObject).fsL = 0; ((b.a)localObject).fsM = 0; this.ehh = ((b.a)localObject).acD(); this.gwg = new LinkedList(); if (paramArrayList.size() > 0) for (int i = 0; i < paramArrayList.size(); i++) { localObject = new aux(); ((aux)localObject).vLf = ((String)paramArrayList.get(i)); this.gwg.add(localObject); } AppMethodBeat.o(108462); } public final int a(e parame, f paramf) { AppMethodBeat.i(108463); ab.i("MicroMsg.GoogleContact.NetSceneInviteGoogleContact", "doScene"); this.ehi = paramf; paramf = (auy)this.ehh.fsG.fsP; paramf.jBv = this.gwg.size(); paramf.jBw = this.gwg; int i = a(parame, this.ehh, this); AppMethodBeat.o(108463); return i; } public final void a(int paramInt1, int paramInt2, int paramInt3, String paramString, q paramq, byte[] paramArrayOfByte) { AppMethodBeat.i(108464); ab.i("MicroMsg.GoogleContact.NetSceneInviteGoogleContact", "NetId:%d, ErrType:%d, ErrCode:%d, errMsg:%s", new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2), Integer.valueOf(paramInt3), paramString }); if ((paramInt2 != 0) || (paramInt3 != 0)) { this.ehi.onSceneEnd(paramInt2, paramInt3, paramString, this); AppMethodBeat.o(108464); } while (true) { return; this.ehi.onSceneEnd(paramInt2, paramInt3, paramString, this); AppMethodBeat.o(108464); } } public final auz aqh() { return (auz)this.ehh.fsH.fsP; } public final int getType() { return 489; } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.account.friend.a.ae * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
5ecc08e0782cf6d1edfe27b69b9335af54c34187
39e32f672b6ef972ebf36adcb6a0ca899f49a094
/dcm4jboss-all/trunk/dcm4jboss-ejb/target/xdoclet/java/org/dcm4chex/archive/ejb/session/GPPPSManagerSession.java
97efcb96de4b486723d905c76455171d8d385c50
[ "Apache-2.0" ]
permissive
medicayun/medicayundicom
6a5812254e1baf88ad3786d1b4cf544821d4ca0b
47827007f2b3e424a1c47863bcf7d4781e15e814
refs/heads/master
2021-01-23T11:20:41.530293
2017-06-05T03:11:47
2017-06-05T03:11:47
93,123,541
0
2
null
null
null
null
UTF-8
Java
false
false
767
java
/* * Generated by XDoclet - Do not edit! */ package org.dcm4chex.archive.ejb.session; /** * Session layer for GPPPSManager. * @xdoclet-generated at ${TODAY} * @copyright The XDoclet Team * @author XDoclet * @version 2.19.0-SNAPSHOT */ public class GPPPSManagerSession extends org.dcm4chex.archive.ejb.session.GPPPSManagerBean implements javax.ejb.SessionBean { public void ejbActivate() { } public void ejbPassivate() { } public void setSessionContext(javax.ejb.SessionContext ctx) { super.setSessionContext(ctx); } public void unsetSessionContext() { super.unsetSessionContext(); } public void ejbRemove() { } public void ejbCreate() throws javax.ejb.CreateException { } }
[ "liliang_lz@icloud.com" ]
liliang_lz@icloud.com
5e6d4770a01b1f904b9ba1e3c86393ed71e9e982
148353d152e1e3f4db238051bb6c28484a6c92fd
/wydlb/app/src/main/java/com/wydlb/first/bean/UnpasswordDetailBean.java
c7d6ebb2b3d93c0f6f89fd7145897dd8bbfb997b
[]
no_license
abliudede/wydlb
5e7d58b573592519fd58223284869cac859934bd
1b18db86406f0e2dc22c608afe9913bbbaa1c883
refs/heads/master
2023-07-19T17:48:53.495198
2021-09-01T02:04:15
2021-09-01T02:04:15
298,725,008
1
1
null
null
null
null
UTF-8
Java
false
false
2,644
java
package com.wydlb.first.bean; import java.util.List; public class UnpasswordDetailBean { /** * code : 0 * msg : success * data : {"isOpen":false,"list":[{"type":1,"amountConfig":"0,50,100,200,300,400,500,1000,5000,10000","defaultAmount":200},{"type":2,"amountConfig":"0,50,100,200,300,400,500,1000,5000,10000","defaultAmount":200},{"type":3,"amountConfig":"0,50,100,200,300,400,500,1000,5000,10000","defaultAmount":200}]} */ private int code; private String msg; private DataBean data; public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public DataBean getData() { return data; } public void setData(DataBean data) { this.data = data; } public static class DataBean { /** * isOpen : false * list : [{"type":1,"amountConfig":"0,50,100,200,300,400,500,1000,5000,10000","defaultAmount":200},{"type":2,"amountConfig":"0,50,100,200,300,400,500,1000,5000,10000","defaultAmount":200},{"type":3,"amountConfig":"0,50,100,200,300,400,500,1000,5000,10000","defaultAmount":200}] */ private boolean isOpen; private List<ListBean> list; public boolean isIsOpen() { return isOpen; } public void setIsOpen(boolean isOpen) { this.isOpen = isOpen; } public List<ListBean> getList() { return list; } public void setList(List<ListBean> list) { this.list = list; } public static class ListBean { /** * type : 1 * amountConfig : 0,50,100,200,300,400,500,1000,5000,10000 * defaultAmount : 200 */ private int type; private String amountConfig; private int defaultAmount; public int getType() { return type; } public void setType(int type) { this.type = type; } public String getAmountConfig() { return amountConfig; } public void setAmountConfig(String amountConfig) { this.amountConfig = amountConfig; } public int getDefaultAmount() { return defaultAmount; } public void setDefaultAmount(int defaultAmount) { this.defaultAmount = defaultAmount; } } } }
[ "abliudede@163.com" ]
abliudede@163.com
d7d37ef1322a09b564e3bf84d98482e9d4161946
055e07f01ebd05029d3a5df4271acb738f1f6fc0
/src/main/java/ru/itsphere/itmoney/controllers/Controllers.java
6a714947f9dfbb39974cb9bb8aae87cce238dd7b
[]
no_license
IT-Sphere/it-money
be8984c72d7f6ac0d6432d9b5bac604f18bb8029
a4b4564114af924d7fa73f1a1815cec482976efb
refs/heads/master
2021-05-01T11:50:19.233706
2015-08-04T20:02:09
2015-08-04T20:02:09
40,204,810
0
0
null
null
null
null
UTF-8
Java
false
false
194
java
package ru.itsphere.itmoney.controllers; /** * Названия контроллеров * * http://it-channel.ru/ * * @author Budnikov Aleksandr */ public enum Controllers { USER; }
[ "you@example.com" ]
you@example.com
9fb41f7dee58f22439dafcc00fb6d90c750a1d6d
26edc760f6d11314f9bfd3c0f4b509c36ab88e2d
/src/main/java/com/joker/dq/webapp/action/TzGfmzAction.java
9cb97d66a174d1a15510ac606a662e37bddfddfa
[]
no_license
JokerQZhang/dq
130773be7087066fa2e8a731af7623229e53a636
d14d0699becce015651fc88d50daa410a2d1b6ee
refs/heads/master
2020-04-15T15:21:40.213444
2016-06-04T01:55:05
2016-06-04T01:55:05
54,450,563
0
0
null
null
null
null
UTF-8
Java
false
false
3,785
java
package com.joker.dq.webapp.action; import com.opensymphony.xwork2.Preparable; import com.joker.dq.service.TzGfmzManager; import com.joker.dq.util.MyDateUtil; import com.joker.dq.dao.SearchException; import com.joker.dq.model.TzDyzth; import com.joker.dq.model.TzGfmz; import com.joker.dq.webapp.action.BaseAction; import java.util.Date; import java.util.List; import java.util.HashMap; import java.util.Map; public class TzGfmzAction extends BaseAction implements Preparable { private TzGfmzManager tzGfmzManager; private List tzGfmzs; private TzGfmz tzGfmz; private Long gfmzId; private String query; public void setTzGfmzManager(TzGfmzManager tzGfmzManager) { this.tzGfmzManager = tzGfmzManager; } public List getTzGfmzs() { return tzGfmzs; } /** * Grab the entity from the database before populating with request parameters */ public void prepare() { if (getRequest().getMethod().equalsIgnoreCase("post")) { // prevent failures on new String tzGfmzId = getRequest().getParameter("tzGfmz.gfmzId"); if (tzGfmzId != null && !tzGfmzId.equals("")) { tzGfmz = tzGfmzManager.get(new Long(tzGfmzId)); } } } public void setQ(String q) { this.query = q; } public String list() { try { Map condition = new HashMap(); tzGfmzs = tzGfmzManager.search(condition, TzGfmz.class, getPage()); } catch (SearchException se) { addActionError(se.getMessage()); tzGfmzs = tzGfmzManager.getAll(getPage()); } if(query != null){ getRequest().setAttribute("showForm", "showData"); } return SUCCESS; } public void setGfmzId(Long gfmzId) { this.gfmzId = gfmzId; } public TzGfmz getTzGfmz() { return tzGfmz; } public void setTzGfmz(TzGfmz tzGfmz) { this.tzGfmz = tzGfmz; } public String delete() { tzGfmzManager.remove(tzGfmz.getGfmzId()); saveMessage(getText("tzGfmz.deleted")); return SUCCESS; } public String edit() { if (gfmzId != null) { tzGfmz = tzGfmzManager.get(gfmzId); } else { String tzDate = MyDateUtil.getCurrDate("yyyy-MM"); Map condition = new HashMap(); condition.put("tzDate", tzDate); condition.put("groupPartyId", super.getSuperPartyGroup().getPartyId()); tzGfmzs = tzGfmzManager.searchByCondition(condition); if(tzGfmzs!=null && tzGfmzs.size()>0){ tzGfmz = (TzGfmz)tzGfmzs.get(0); }else{ tzGfmz = new TzGfmz(); } tzGfmz.setGroupPartyId(super.getSuperPartyGroup().getPartyId()); tzGfmz.setTzDate(tzDate); } return SUCCESS; } public String save() throws Exception { if (cancel != null) { super.setJsonResult("取消保存"); return "jsonResult"; } if (delete != null) { tzGfmzManager.remove(tzGfmz.getGfmzId()); super.setJsonResult("删除成功"); return "jsonResult"; } boolean isNew = (tzGfmz.getGfmzId() == null); if(isNew){ tzGfmz.setCreatedByUser(super.getCurrentUser().getId()); tzGfmz.setCreatedTime(new Date()); }else{ tzGfmz.setLastUpdatedByUser(super.getCurrentUser().getId()); tzGfmz.setLastUpdatedTime(new Date()); } tzGfmz = tzGfmzManager.save(tzGfmz); String key = (isNew) ? "tzGfmz.added" : "tzGfmz.updated"; saveMessage(getText(key)); super.setJsonResult("保存成功"); return "jsonResult"; } }
[ "383913397@qq.com" ]
383913397@qq.com
9310eb1e8e93897f1e74838049ec23b9f546d84a
1358ea022879f498dbcc81eb29cdfc7aa10dfe68
/Cartographer2_ModuleVanilla/src/main/java/io/github/bananapuncher714/cartographer/module/vanilla/providers/CursorConverter.java
b04b25bcc9fde275923a94357d898ec1eddf4ab1
[]
no_license
BananaPuncher714/Cartographer2
320211d737e77d70d2c065c875020340e1c9339c
2bc3879bcb0470ec3c90fa4038b7fc3b639f41e7
refs/heads/master
2023-06-24T18:08:45.477536
2023-06-18T05:23:23
2023-06-18T05:23:23
195,094,309
48
52
null
2020-12-27T21:06:47
2019-07-03T16:51:06
Java
UTF-8
Java
false
false
549
java
package io.github.bananapuncher714.cartographer.module.vanilla.providers; import org.bukkit.entity.Player; import io.github.bananapuncher714.cartographer.core.api.WorldCursor; import io.github.bananapuncher714.cartographer.core.renderer.PlayerSetting; /** * Curse generics and type erasure. They weren't going to work anyways. * * @author BananaPuncher714 * */ public interface CursorConverter { WorldCursor convert( Object object, Player player, PlayerSetting settings ); boolean convertable( Object type ); CursorConverter copyOf(); }
[ "banana@aaaaahhhhhhh.com" ]
banana@aaaaahhhhhhh.com
c61c2269528ad3a2b8d7ffed11b3de675119287d
0ceafc2afe5981fd28ce0185e0170d4b6dbf6241
/AlgoKit (3rdp)/Code-store v1.0/yaal/lib/test/on2014_01/on2014_01_14_SNWS_2014__Round_2/A___The_Ring/Main.java
95056648654a5caec962c5d60e14bb7b67da1da9
[]
no_license
brainail/.happy-coooding
1cd617f6525367133a598bee7efb9bf6275df68e
cc30c45c7c9b9164095905cc3922a91d54ecbd15
refs/heads/master
2021-06-09T02:54:36.259884
2021-04-16T22:35:24
2021-04-16T22:35:24
153,018,855
2
1
null
null
null
null
UTF-8
Java
false
false
355
java
package on2014_01.on2014_01_14_SNWS_2014__Round_2.A___The_Ring; import net.egork.chelper.tester.NewTester; import org.junit.Assert; import org.junit.Test; public class Main { @Test public void test() throws Exception { if (!NewTester.test("lib/test/on2014_01/on2014_01_14_SNWS_2014__Round_2/A___The_Ring/A - The Ring.task")) Assert.fail(); } }
[ "wsemirz@gmail.com" ]
wsemirz@gmail.com
7b59723b3f8dbda3b87d77b7b959f8e2a3a99280
ff836b52738c46d21eb0e5de7cc8be142d1abbe2
/laoyou-common/src/main/java/com/yhl/laoyou/common/utils/SignUtil.java
af84449d852b848bcb5f6258322fb9b916ba1f8f
[]
no_license
cus18/laoyou
a05cc1716f8aaa988c88ad39a77728fbe025a4e8
bddbc16fa6b0b71d6ef1618218120712f97f1b2e
refs/heads/master
2021-08-23T09:21:23.560324
2017-12-04T13:27:21
2017-12-04T13:31:00
113,042,709
0
0
null
null
null
null
UTF-8
Java
false
false
2,245
java
package com.yhl.laoyou.common.utils; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Arrays; /** * 微信验证帮助文档 */ public class SignUtil { // 微信中设置的密匙 private static String token = "weixin"; /** * 验证消息真实性 * @param signature * @param timestamp * @param nonce * @return */ public static boolean checkSignature(String signature, String timestamp, String nonce) { String[] arr = new String[] { token, timestamp, nonce }; // 将token、timestamp、nonce三个参数进行字典序排序 Arrays.sort(arr); StringBuilder content = new StringBuilder(); for (int i = 0; i < arr.length; i++) { content.append(arr[i]); } MessageDigest md = null; String tmpStr = null; try { md = MessageDigest.getInstance("SHA-1"); // 将三个参数字符串拼接成一个字符串进行sha1加密 byte[] digest = md.digest(content.toString().getBytes()); tmpStr = byteToStr(digest); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } content = null; // 将sha1加密后的字符串可与signature对比,标识该请求来源于微信 return tmpStr != null ? tmpStr.equals(signature.toUpperCase()) : false; } /** * 将字节数组转换为十六进制字符串 * * @param byteArray * @return */ private static String byteToStr(byte[] byteArray) { String strDigest = ""; for (int i = 0; i < byteArray.length; i++) { strDigest += byteToHexStr(byteArray[i]); } return strDigest; } /** * 将字节转换为十六进制字符串 * * @param mByte * @return */ private static String byteToHexStr(byte mByte) { char[] Digit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; char[] tempArr = new char[2]; tempArr[0] = Digit[(mByte >>> 4) & 0X0F]; tempArr[1] = Digit[mByte & 0X0F]; String s = new String(tempArr); return s; } }
[ "cus18@sina.com" ]
cus18@sina.com
b5deeefb19922086168852ccb59fde990b65ea23
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_flink_new2/Nicad_t1_flink_new27631.java
7f8bef82eb89b8803fdb45064f52e8732b6ba1dc
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
580
java
// clone pairs:27998:70% // 43785:flink/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateObjectCollection.java public class Nicad_t1_flink_new27631 { public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } StateObjectCollection<?> that = (StateObjectCollection<?>) o; // simple equals can cause troubles here because of how equals works e.g. between lists and sets. return CollectionUtils.isEqualCollection(stateObjects, that.stateObjects); } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
9d65b036c01f1ca65f7bee3ba3db213a5413cdb7
963212f9ece3f4e13a4f0213e7984dab1df376f5
/qardio_source/cfr_dec/com/getqardio/android/shopify/view/base/RecyclerViewItemHolder.java
8693dcf00936a1de7443bf1e9e3609e677d760f1
[]
no_license
weitat95/mastersDissertation
2648638bee64ea50cc93344708a58800a0f2af14
d465bb52b543dea05c799d1972374e877957a80c
refs/heads/master
2020-06-08T17:31:51.767796
2019-12-15T19:09:41
2019-12-15T19:09:41
193,271,681
0
0
null
null
null
null
UTF-8
Java
false
false
1,561
java
/* * Decompiled with CFR 0.147. * * Could not load the following classes: * android.view.View */ package com.getqardio.android.shopify.view.base; import android.support.v7.widget.RecyclerView; import android.view.View; import com.getqardio.android.shopify.util.Util; import com.getqardio.android.shopify.view.base.ListItemViewHolder; import com.getqardio.android.shopify.view.base.ListItemViewModel; import com.getqardio.android.shopify.view.base.RecyclerViewItemHolder$$Lambda$1; final class RecyclerViewItemHolder extends RecyclerView.ViewHolder { private final ListItemViewHolder.OnClickListener onListItemClickListener; private ListItemViewHolder viewItemHolder; RecyclerViewItemHolder(View view, OnClickListener onClickListener) { super(view); Util.checkNotNull(onClickListener, "onClickListener == null"); onClickListener.getClass(); this.onListItemClickListener = RecyclerViewItemHolder$$Lambda$1.lambdaFactory$(onClickListener); } void bindModel(ListItemViewModel listItemViewModel, int n) { if (this.viewItemHolder == null) { this.viewItemHolder = listItemViewModel.createViewHolder(this.onListItemClickListener); this.viewItemHolder.bindView(this.itemView); } listItemViewModel.bindView(this.viewItemHolder, n); } public ListItemViewHolder viewItemHolder() { return this.viewItemHolder; } static interface OnClickListener<T, MODEL extends ListItemViewModel<T>> { public void onClick(MODEL var1); } }
[ "weitat95@live.com" ]
weitat95@live.com
c0279fb864e27b09f16639538b5903dadb292c83
1d6f626cb42f06d6180ef88fababc9c4269f1133
/api-model/src/gen/java/au/org/consumerdatastandards/api/v1_1_1/common/CommonDiscoveryAPI.java
1560dbbcef770571aee2ebbc273d430059c4aa29
[ "MIT" ]
permissive
darkedges/java-artefacts
4ea573851a2b8cca279db97a0765e4860fe1c805
2caf60bc8889f3633172582386d77ccc9f303cc4
refs/heads/master
2021-01-06T03:38:05.131236
2020-02-03T04:50:58
2020-02-03T04:50:58
241,213,471
0
0
MIT
2020-02-17T21:39:35
2020-02-17T21:39:34
null
UTF-8
Java
false
false
5,362
java
package au.org.consumerdatastandards.api.v1_1_1.common; import au.org.consumerdatastandards.api.v1_1_1.common.models.ResponseCommonDiscoveryStatus; import au.org.consumerdatastandards.api.v1_1_1.common.models.ResponseDiscoveryOutagesList; import au.org.consumerdatastandards.support.Endpoint; import au.org.consumerdatastandards.support.EndpointResponse; import au.org.consumerdatastandards.support.Param; import au.org.consumerdatastandards.support.ParamLocation; import au.org.consumerdatastandards.support.RequestMethod; import au.org.consumerdatastandards.support.ResponseCode; import au.org.consumerdatastandards.support.ResponseHeader; import au.org.consumerdatastandards.support.Section; import au.org.consumerdatastandards.support.data.CustomAttribute; import au.org.consumerdatastandards.support.data.CustomAttributes; @Section(name = "CommonDiscovery", tags = {"Common", "Discovery"}) public interface CommonDiscoveryAPI { @Endpoint( path = "/discovery/outages", summary = "Get Outages", description = "Obtain a list of scheduled outages for the implementation", requestMethod = RequestMethod.GET, operationId = "getOutages", responses = { @EndpointResponse( responseCode = ResponseCode.OK, description = "Success", headers = { @ResponseHeader( name="x-v", type = "string", description = "The [version](#response-headers) of the API end point that the data holder has responded with." ) }, content = ResponseDiscoveryOutagesList.class ) } ) @CustomAttributes({ @CustomAttribute(name = "x-version", value = "1") }) ResponseDiscoveryOutagesList getOutages( @Param( name = "x-v", description = "Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder should respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)", in = ParamLocation.HEADER, reference = "RequestHeader_x-v" ) String xV, @Param( name = "x-min-v", description = "Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder should respond with a 406 Not Acceptable.", in = ParamLocation.HEADER, reference = "RequestHeader_x-min-v" ) String xMinV ); @Endpoint( path = "/discovery/status", summary = "Get Status", description = "Obtain a health check status for the implementation", requestMethod = RequestMethod.GET, operationId = "getStatus", responses = { @EndpointResponse( responseCode = ResponseCode.OK, description = "Success", headers = { @ResponseHeader( name="x-v", type = "string", description = "The [version](#response-headers) of the API end point that the data holder has responded with." ) }, content = ResponseCommonDiscoveryStatus.class ) } ) @CustomAttributes({ @CustomAttribute(name = "x-version", value = "1") }) ResponseCommonDiscoveryStatus getStatus( @Param( name = "x-v", description = "Version of the API end point requested by the client. Must be set to a positive integer. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If the value of [x-min-v](#request-headers) is equal to or higher than the value of [x-v](#request-headers) then the [x-min-v](#request-headers) header should be treated as absent. If all versions requested are not supported then the data holder should respond with a 406 Not Acceptable. See [HTTP Headers](#request-headers)", in = ParamLocation.HEADER, reference = "RequestHeader_x-v" ) String xV, @Param( name = "x-min-v", description = "Minimum version of the API end point requested by the client. Must be set to a positive integer if provided. The data holder should respond with the highest supported version between [x-min-v](#request-headers) and [x-v](#request-headers). If all versions requested are not supported then the data holder should respond with a 406 Not Acceptable.", in = ParamLocation.HEADER, reference = "RequestHeader_x-min-v" ) String xMinV ); }
[ "fyang1024@gmail.com" ]
fyang1024@gmail.com
f86904607b9007d2d637eb6687af155db428b94c
fa2d84d1fd00ee5ffd0cb85808dce6f0d909d204
/zava/src/main/java/com/github/atemerev/hollywood/future/CompletedEvent.java
502636175c5ac5f31cd961cfe1a5dd96b6af4378
[]
no_license
hbwzhsh/tutorials
8ad70095fa9c4a5d3f2ca27a98afe404a1e0101c
02d0f97da44e71f3fd47def8010611796efce3e8
refs/heads/master
2021-01-18T00:58:05.822652
2015-05-29T08:28:26
2015-05-29T08:28:26
36,609,864
1
0
null
2015-05-31T15:42:17
2015-05-31T15:42:17
null
UTF-8
Java
false
false
390
java
package com.github.atemerev.hollywood.future; import com.github.atemerev.pms.Message; /** * @author Alexander Temerev, Alexander Kuklev * @version $Id$ */ public class CompletedEvent implements Message { private Promise promise; public CompletedEvent(Promise promise) { this.promise = promise; } public Promise getPromise() { return promise; } }
[ "zqhxuyuan@gmail.com" ]
zqhxuyuan@gmail.com
7a7245b3bf88699afd41f8025007e82a5948e034
80a6b8d1efa66efbb94f0df684eedb81a5cc552c
/assertj-core/src/test/java/org/assertj/core/api/float_/FloatAssert_isNotZero_Test.java
87a0566c3a812e719ed0e9ab7559f5ccfa211a9e
[ "Apache-2.0" ]
permissive
AlHasan89/System_Re-engineering
43f232e90f65adc940af3bfa2b4d584d25ce076c
b80e6d372d038fd246f946e41590e07afddfc6d7
refs/heads/master
2020-03-27T05:08:26.156072
2019-01-06T17:54:59
2019-01-06T17:54:59
145,996,692
0
1
Apache-2.0
2019-01-06T17:55:00
2018-08-24T13:43:31
Java
UTF-8
Java
false
false
2,696
java
/** * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * Copyright 2012-2017 the original author or authors. */ package org.assertj.core.api.float_; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.verify; import org.assertj.core.api.FloatAssert; import org.assertj.core.api.FloatAssertBaseTest; import org.junit.Test; /** * Tests for <code>{@link FloatAssert#isNotZero()}</code>. * * @author Alex Ruiz */ public class FloatAssert_isNotZero_Test extends FloatAssertBaseTest { @Override protected FloatAssert invoke_api_method() { return assertions.isNotZero(); } @Override protected void verify_internal_effects() { verify(floats).assertIsNotZero(getInfo(assertions), getActual(assertions)); } @Test public void should_pass_with_Float_negative_zero() { // GIVEN final Float negativeZero = -0.0f; // THEN assertThat(negativeZero).isNotZero(); } @Test public void should_fail_with_primitive_negative_zero() { // GIVEN final float negativeZero = -0.0f; try { // WHEN assertThat(negativeZero).isNotZero(); } catch (AssertionError e) { // THEN assertThat(e).hasMessage(format("%nExpecting:%n <-0.0f>%nnot to be equal to:%n <0.0>%n")); return; } failBecauseExpectedAssertionErrorWasNotThrown(); } @Test public void should_fail_with_primitive_positive_zero() { // GIVEN final float positiveZero = 0.0f; try { // WHEN assertThat(positiveZero).isNotZero(); } catch (AssertionError e) { // THEN assertThat(e).hasMessage(format("%nExpecting:%n <0.0f>%nnot to be equal to:%n <0.0>%n")); return; } failBecauseExpectedAssertionErrorWasNotThrown(); } @Test public void should_fail_with_Float_positive_zero() { // GIVEN final Float positiveZero = 0.0f; try { // WHEN assertThat(positiveZero).isNotZero(); } catch (AssertionError e) { // THEN assertThat(e).hasMessage(format("%nExpecting:%n <0.0f>%nnot to be equal to:%n <0.0f>%n")); return; } failBecauseExpectedAssertionErrorWasNotThrown(); } }
[ "nw91@le.ac.uk" ]
nw91@le.ac.uk
662355f3b5de23306f5d52a26d9ddf70e345b78b
9d6089379238e00c0a5fb2949c1a6e7c19b50958
/bin/ext-template/ycommercewebservicestest/testsrc/de/hybris/platform/ycommercewebservicestest/test/groovy/webservicetests/markers/CollectOutputFromTest.java
a1a5e4e6576e55f1d2b6ab676078c1143942a17c
[]
no_license
ChintalaVenkat/learning_hybris
55ce582b4796a843511d0ea83f4859afea52bd88
6d29f59578512f9fa44a3954dc67d0f0a5216f9b
refs/heads/master
2021-06-18T17:47:12.173132
2021-03-26T11:00:09
2021-03-26T11:00:09
193,689,090
0
0
null
2019-06-25T10:46:40
2019-06-25T10:46:39
null
UTF-8
Java
false
false
535
java
/* * [y] hybris Platform * * Copyright (c) 2000-2014 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. */ package de.hybris.platform.ycommercewebservicestest.test.groovy.webservicetests.markers; /** * */ public interface CollectOutputFromTest { //marker interface }
[ "a.basov@aimprosoft.com" ]
a.basov@aimprosoft.com
96f821fe7244928e46833ed80ccb26fb0b358b1c
5f82aae041ab05a5e6c3d9ddd8319506191ab055
/Projects/Math/55/src/test/java/org/apache/commons/math/stat/inference/MannWhitneyUTestTest.java
44a248eda5ba1c87fb65cc9a0a33fbe7ca656273
[]
no_license
lingming/prapr_data
e9ddabdf971451d46f1ef2cdbee15ce342a6f9dc
be9ababc95df45fd66574c6af01122ed9df3db5d
refs/heads/master
2023-08-14T20:36:23.459190
2021-10-17T13:49:39
2021-10-17T13:49:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,548
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.math.stat.inference; import org.junit.Assert; import org.junit.Test; /** * Test cases for the ChiSquareTestImpl class. * * @version $Revision$ $Date$ */ public class MannWhitneyUTestTest { protected MannWhitneyUTest testStatistic = new MannWhitneyUTestImpl(); @Test public void testMannWhitneyUSimple() throws Exception { /* Target values computed using R version 2.11.1 * x <- c(19, 22, 16, 29, 24) * y <- c(20, 11, 17, 12) * wilcox.test(x, y, alternative = "two.sided", mu = 0, paired = FALSE, exact = FALSE, correct = FALSE) * W = 17, p-value = 0.08641 */ final double x[] = {19, 22, 16, 29, 24}; final double y[] = {20, 11, 17, 12}; Assert.assertEquals(17, testStatistic.mannWhitneyU(x, y), 1e-10); Assert.assertEquals(0.08641, testStatistic.mannWhitneyUTest(x, y), 1e-5); } @Test public void testMannWhitneyUInputValidation() throws Exception { /* Samples must be present, i.e. length > 0 */ try { testStatistic.mannWhitneyUTest(new double[] { }, new double[] { 1.0 }); Assert.fail("x does not contain samples (exact), IllegalArgumentException expected"); } catch (IllegalArgumentException ex) { // expected } try { testStatistic.mannWhitneyUTest(new double[] { 1.0 }, new double[] { }); Assert.fail("y does not contain samples (exact), IllegalArgumentException expected"); } catch (IllegalArgumentException ex) { // expected } /* * x and y is null */ try { testStatistic.mannWhitneyUTest(null, null); Assert.fail("x and y is null (exact), IllegalArgumentException expected"); } catch (IllegalArgumentException ex) { // expected } try { testStatistic.mannWhitneyUTest(null, null); Assert.fail("x and y is null (asymptotic), IllegalArgumentException expected"); } catch (IllegalArgumentException ex) { // expected } /* * x or y is null */ try { testStatistic.mannWhitneyUTest(null, new double[] { 1.0 }); Assert.fail("x is null (exact), IllegalArgumentException expected"); } catch (IllegalArgumentException ex) { // expected } try { testStatistic.mannWhitneyUTest(new double[] { 1.0 }, null); Assert.fail("y is null (exact), IllegalArgumentException expected"); } catch (IllegalArgumentException ex) { // expected } } }
[ "2890268106@qq.com" ]
2890268106@qq.com
97920d4a12f4d21ebac18531e1cc31f73a517d27
ba29022f2d758ae2eeb2c7a26dab06e5cc4b5309
/openapi-generator-native/src/main/java/org/openapitools/client/model/ListRegistrationsResponse.java
c1207ade838ecaf6fc0755e8eeabb7071b6b8fb8
[]
no_license
ChristianHoesel/ngsiv2-sdk-java-auto
232392206e648ab126f2d56b21255c918a2be8f5
4cdb4db5f599f4f7c82fa08c52e6f3c3f50c0f41
refs/heads/master
2022-07-05T12:05:11.170890
2020-05-19T16:29:35
2020-05-19T16:29:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,816
java
/* * FIWARE-NGSI v2 Specification * TODO: Add a description * * The version of the OpenAPI document: 1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; /** * ListRegistrationsResponse */ @JsonPropertyOrder({ ListRegistrationsResponse.JSON_PROPERTY_ID, ListRegistrationsResponse.JSON_PROPERTY_DESCRIPTION, ListRegistrationsResponse.JSON_PROPERTY_DATA_PROVIDED, ListRegistrationsResponse.JSON_PROPERTY_PROVIDER, ListRegistrationsResponse.JSON_PROPERTY_EXPIRES, ListRegistrationsResponse.JSON_PROPERTY_STATUS, ListRegistrationsResponse.JSON_PROPERTY_FORWARDING_INFORMATION }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-04-15T18:35:25.798686+03:00[Europe/Athens]") public class ListRegistrationsResponse { public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; public static final String JSON_PROPERTY_DATA_PROVIDED = "dataProvided"; private Object dataProvided; public static final String JSON_PROPERTY_PROVIDER = "provider"; private Object provider; public static final String JSON_PROPERTY_EXPIRES = "expires"; private String expires; public static final String JSON_PROPERTY_STATUS = "status"; private String status; public static final String JSON_PROPERTY_FORWARDING_INFORMATION = "forwardingInformation"; private Object forwardingInformation; public ListRegistrationsResponse id(String id) { this.id = id; return this; } /** * * @return id **/ @ApiModelProperty(example = "abcdefg", required = true, value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getId() { return id; } public void setId(String id) { this.id = id; } public ListRegistrationsResponse description(String description) { this.description = description; return this; } /** * * @return description **/ @ApiModelProperty(example = "Example Context Source", required = true, value = "") @JsonProperty(JSON_PROPERTY_DESCRIPTION) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public ListRegistrationsResponse dataProvided(Object dataProvided) { this.dataProvided = dataProvided; return this; } /** * * @return dataProvided **/ @ApiModelProperty(example = "{\"entities\":[{\"id\":\"Bcn_Welt\",\"type\":\"Room\"}],\"attrs\":[\"temperature\"]}", required = true, value = "") @JsonProperty(JSON_PROPERTY_DATA_PROVIDED) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Object getDataProvided() { return dataProvided; } public void setDataProvided(Object dataProvided) { this.dataProvided = dataProvided; } public ListRegistrationsResponse provider(Object provider) { this.provider = provider; return this; } /** * * @return provider **/ @ApiModelProperty(example = "{\"http\":{\"url\":\"http://contextsource.example.org\"},\"supportedForwardingMode\":\"all\"}", required = true, value = "") @JsonProperty(JSON_PROPERTY_PROVIDER) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Object getProvider() { return provider; } public void setProvider(Object provider) { this.provider = provider; } public ListRegistrationsResponse expires(String expires) { this.expires = expires; return this; } /** * * @return expires **/ @ApiModelProperty(example = "10/31/2017 12:00:00 PM", required = true, value = "") @JsonProperty(JSON_PROPERTY_EXPIRES) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getExpires() { return expires; } public void setExpires(String expires) { this.expires = expires; } public ListRegistrationsResponse status(String status) { this.status = status; return this; } /** * * @return status **/ @ApiModelProperty(example = "active", required = true, value = "") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public ListRegistrationsResponse forwardingInformation(Object forwardingInformation) { this.forwardingInformation = forwardingInformation; return this; } /** * * @return forwardingInformation **/ @ApiModelProperty(example = "{\"timesSent\":12,\"lastForwarding\":\"2017-10-06T16:00:00Z\",\"lastSuccess\":\"2017-10-06T16:00:00Z\",\"lastFailure\":\"2017-10-05T16:00:00Z\"}", required = true, value = "") @JsonProperty(JSON_PROPERTY_FORWARDING_INFORMATION) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Object getForwardingInformation() { return forwardingInformation; } public void setForwardingInformation(Object forwardingInformation) { this.forwardingInformation = forwardingInformation; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ListRegistrationsResponse listRegistrationsResponse = (ListRegistrationsResponse) o; return Objects.equals(this.id, listRegistrationsResponse.id) && Objects.equals(this.description, listRegistrationsResponse.description) && Objects.equals(this.dataProvided, listRegistrationsResponse.dataProvided) && Objects.equals(this.provider, listRegistrationsResponse.provider) && Objects.equals(this.expires, listRegistrationsResponse.expires) && Objects.equals(this.status, listRegistrationsResponse.status) && Objects.equals(this.forwardingInformation, listRegistrationsResponse.forwardingInformation); } @Override public int hashCode() { return Objects.hash(id, description, dataProvided, provider, expires, status, forwardingInformation); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListRegistrationsResponse {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" dataProvided: ").append(toIndentedString(dataProvided)).append("\n"); sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); sb.append(" expires: ").append(toIndentedString(expires)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" forwardingInformation: ").append(toIndentedString(forwardingInformation)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "thanospan@users.noreply.github.com" ]
thanospan@users.noreply.github.com
a768fe063022be4ea67c3a33a9fb92989c2753bf
d61627017372ac391b8c89475177104e7921e71f
/brace/brace-demo-parent/brace-demo-byte-agent/src/main/java/org/wulin/brace/demo/bytes/agent/TimerAgent.java
f4a709b9af0972d99c2df0d8604badbd8506cc66
[]
no_license
wulin-challenge/brace_repository
41108d5bf3bdb71fbd3ea41c4368ab0853f3a03e
1c96443f5d819d3835105db387ea678e15e716d5
refs/heads/master
2023-04-27T04:49:54.206952
2023-04-19T05:41:50
2023-04-19T05:41:50
147,763,524
0
1
null
2023-01-02T17:12:28
2018-09-07T03:08:12
Java
UTF-8
Java
false
false
1,139
java
package org.wulin.brace.demo.bytes.agent; import java.lang.instrument.Instrumentation; import net.bytebuddy.ByteBuddy; import net.bytebuddy.agent.builder.AgentBuilder; import net.bytebuddy.agent.builder.AgentBuilder.Transformer; import net.bytebuddy.description.type.TypeDescription; import net.bytebuddy.dynamic.DynamicType.Builder; import net.bytebuddy.implementation.MethodDelegation; import net.bytebuddy.matcher.ElementMatchers; import net.bytebuddy.utility.JavaModule; public class TimerAgent { public static void premain(String arguments, Instrumentation instrumentation) { System.out.println("执行代理了!!!!!!!!!!!!"); new AgentBuilder.Default() .type(ElementMatchers.nameEndsWith("Timed")) .transform(new TransformerImpl()) .installOn(instrumentation); } public static class TransformerImpl implements Transformer{ @Override public Builder<?> transform(Builder<?> builder, TypeDescription typeDescription, ClassLoader classLoader,JavaModule module) { return builder.method(ElementMatchers.any()) .intercept(MethodDelegation.to(TimingInterceptor.class)); } } }
[ "1178649872@qq.com" ]
1178649872@qq.com
e3b9fe4c200a4a7f8f03b3df0594d5b054ea58e4
96d71f73821cfbf3653f148d8a261eceedeac882
/external/decompiled/blackberry/WhatsApp OS6 V2.8.1914/decompiled/WhatsApp-8/com/whatsapp/client/BBMStyleInputField$1.java
d01582d2ab69c3f919decf777d08882168c1f4e4
[]
no_license
JaapSuter/Niets
9a9ec53f448df9b866a8c15162a5690b6bcca818
3cc42f8c2cefd9c3193711cbf15b5304566e08cb
refs/heads/master
2020-04-09T19:09:40.667155
2012-09-28T18:11:33
2012-09-28T18:11:33
5,751,595
2
1
null
null
null
null
UTF-8
Java
false
false
1,894
java
// ####################################################### // Decompiled by : coddec // Module : WhatsApp-6.cod // Module version : 2.8.1914 // Class ID : 11 // ######################################################## package com.whatsapp.client; abstract final class BBMStyleInputField$1 extends Object implements Runnable { // @@@@@@@@@@@@@ Fields private final String /*java.lang.String*/ field_59570 ; // ofs = 59570 addr = 0) private final com.whatsapp.client.BBMStyleInputField /*module:WhatsApp-8.class#0*/ field_59574 ; // ofs = 59574 addr = 0) // @@@@@@@@@@@@@ Static routines <init>( com.whatsapp.client.BBMStyleInputField$1, module:WhatsApp-8.class#0, java.lang.String ); // address: 0 { enter_narrow aload_0 invokespecial_lib java.lang.Object.<init> // pc=1 aload_0 aload_1 putfield .field_1_1 // get_name_1: .field_1_1 // get_name_2: .field_1_1 // get_Name: .field_1_1 // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 1 aload_0 aload_2 putfield .field_0_ // get_name_1: .field_0_ // get_name_2: .field_0_ // get_Name: .field_0_ // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 0 return } // @@@@@@@@@@@@@ Virtual routines public final run( com.whatsapp.client.BBMStyleInputField$1 ); // address: 0 { enter_narrow aload_0_getfield .field_1_1 // get_name_1: .field_1_1 // get_name_2: .field_1_1 // get_Name: .field_1_1 // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 1 aload_0_getfield .field_0_ // get_name_1: .field_0_ // get_name_2: .field_0_ // get_Name: .field_0_ // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 0 invokenonvirtual_lib .routine_229 // pc=2 return } }
[ "git@jaapsuter.com" ]
git@jaapsuter.com
07731f4ceb98387e8ade46e6d9a1c1715e874fa0
8f48c02232988336d257f90b4262d98354ad170a
/dojo-junit/Dojo1/src/com/stefanini/teste/PessoaTeste.java
fa237572d9880f54e8edbc37f3f854f9907a0c92
[]
no_license
jkavdev/devdojo_cursos
69aaa28b4dcc9feb5746d8fe2bf005b801c0eb2a
71fccaedc547345bd8d9edaed28602e7f34bb8a9
refs/heads/master
2021-01-19T05:21:11.316624
2018-06-28T18:25:19
2018-06-28T18:25:19
87,428,787
0
0
null
null
null
null
UTF-8
Java
false
false
857
java
package com.stefanini.teste; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import com.stefanini.entidade.Pessoa; public class PessoaTeste { Pessoa pessoa; @Before public void init(){ pessoa = new Pessoa(); } @Test public void testJose() { pessoa.setNome("José"); pessoa.setNumeroCPF("00000000000"); pessoa.setTipoPessoJuridica('F'); Assert.assertTrue(pessoa.getNome().equals("José")); } @Test public void testMariana() { pessoa.setNome("Mariana"); pessoa.setNumeroCPF("00000000000"); pessoa.setTipoPessoJuridica('F'); Assert.assertTrue(pessoa.getNome().equals("Mariana")); } @Test public void testAceVentura() { pessoa.setNome("Ace Ventura"); pessoa.setNumeroCPF("00000000000"); pessoa.setTipoPessoJuridica('F'); Assert.assertTrue(pessoa.getNome().equals("Ace Ventura")); } }
[ "jhonatankolen@gmail.com" ]
jhonatankolen@gmail.com
f71d1695090dbe289a17f631e7b5bd2696bf7cd2
cd5dc0b9e9bbd8aa870f97dcc17c1b1802cf1362
/app/src/main/java/com/jeannypr/scientificstudy/Notification/fragment/TransportNotificationFragment.java
7f66ad5f38dfa62389d60ae84d0e15e5f082c665
[]
no_license
SOFTSEER002/scientific-school-Android-SRG
ffa9a88fd5285be2857bf957485fba06cf2a95c6
453e96a20ab51c343fa7dbb44bf76b0ba4ef2fee
refs/heads/master
2022-12-20T12:46:43.197101
2020-10-13T09:50:01
2020-10-13T09:50:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,650
java
package com.jeannypr.scientificstudy.Notification.fragment; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; import android.content.Context; import android.os.Bundle; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.jeannypr.scientificstudy.Base.Constants; import com.jeannypr.scientificstudy.Database.table.TransportNotificationModel; import com.jeannypr.scientificstudy.Preference.UserPreference; import com.jeannypr.scientificstudy.R; import com.jeannypr.scientificstudy.Notification.ViewModel.TransportNotificationVM; import com.jeannypr.scientificstudy.Notification.adapter.TransportNotificationsAdapter; import com.jeannypr.scientificstudy.Utilities.Utility; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; public class TransportNotificationFragment extends Fragment { UserPreference userPreference; private Context context; private View view; private LayoutInflater inflater; private RecyclerView mContainer; private LinearLayout noRecord; private TextView noRecordMsg, noRecordMsg2; TransportNotificationVM vm; TransportNotificationsAdapter adapter; List<TransportNotificationModel> notifications; ImageView noRecordIc; public TransportNotificationFragment() { } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); context = getActivity(); inflater = LayoutInflater.from(context); vm = ViewModelProviders.of(getActivity()).get(TransportNotificationVM.class); notifications = new ArrayList<>(); adapter = new TransportNotificationsAdapter(notifications, context); userPreference = UserPreference.getInstance(context); /*GetAllNotificationsFromServer();*/ } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = inflater.inflate(R.layout.fragment_transport_notification, container, false); return view; } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mContainer = view.findViewById(R.id.timetableContainer); noRecord = view.findViewById(R.id.noRecord); noRecordMsg = view.findViewById(R.id.noRecordMsg); noRecordMsg2 = view.findViewById(R.id.noRecordMsg2); noRecordIc = view.findViewById(R.id.noRecordIc); mContainer.setLayoutManager(new LinearLayoutManager(getActivity())); mContainer.setAdapter(adapter); // String idStr = "," + String.valueOf(userPreference.getUserId()) + ","; if (getActivity() != null) { //TODO: get data for notification only. vm.getNotificationsByCategory(Constants.NotificationFor.TRANSPORT) .observe(getActivity(), new Observer<List<TransportNotificationModel>>() { @Override public void onChanged(@Nullable List<TransportNotificationModel> notifications) { if (notifications != null) { if (notifications.size() == 0) { ShowNoRecord(); } else { noRecord.setVisibility(View.GONE); List<TransportNotificationModel> transportNotifications = new ArrayList<>(); // bind only transport notifications to UI for (TransportNotificationModel notification : notifications) { if (notification.getNotificationFor().equals(Constants.NotificationFor.TRANSPORT)) { try { Date objDate = new SimpleDateFormat("MM/dd/yyyy").parse(notification.getNotificationDate()); Date objDate2 = new SimpleDateFormat("HH:mm:ss").parse(notification.getNotificationTime()); if (objDate != null) { String formattedtime = Utility.GetFormattedTimeHMS(objDate2); String formattedDate = Utility.GetFormattedDateMDY(objDate,Constants.DATE_FORMAT_MDY); notification.setNotificationDate(formattedDate); notification.setNotificationTime(formattedtime); } } catch (ParseException e) { e.printStackTrace(); } transportNotifications.add(notification); } } if (transportNotifications.size() < 1) { ShowNoRecord(); } else { adapter.SetData(transportNotifications); } } } } }); } } private void ShowNoRecord() { noRecord.setVisibility(View.VISIBLE); noRecordMsg.setText(R.string.noUpdates); noRecordMsg2.setText(R.string.noUpdatesMsg2); noRecordIc.setImageResource(R.drawable.notification_64); } @Override public void onPause() { super.onPause(); } @Override public void onResume() { super.onResume(); } }
[ "khungersourav30@gmail.com" ]
khungersourav30@gmail.com
a36ea1d2f88a5a19d4d359c30bdda1ec52265515
4fb4603578010499b0e2ae39497199838d2d072c
/branches/icefaces4_ICE-10145/icefaces/ace/component/src/org/icefaces/ace/component/dnd/DraggableMeta.java
a267250e6652660a7526e530d02db4b4ca441319
[ "Apache-2.0" ]
permissive
svn2github/icefaces-4-3
5f05a89225a6543725d69ed79e33b695f5d333b8
c6cea194d02b5536256ff7c81a3a697f1890ff74
refs/heads/master
2020-04-08T17:31:09.320358
2018-12-13T23:20:36
2018-12-13T23:20:36
159,570,706
0
0
null
null
null
null
UTF-8
Java
false
false
6,732
java
/* * Copyright 2004-2014 ICEsoft Technologies Canada Corp. * * 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.icefaces.ace.component.dnd; import org.icefaces.ace.meta.annotation.ClientBehaviorHolder; import org.icefaces.ace.meta.annotation.ClientEvent; import org.icefaces.ace.meta.annotation.Component; import org.icefaces.ace.meta.annotation.DefaultValueType; import org.icefaces.ace.meta.annotation.Expression; import org.icefaces.ace.meta.annotation.Property; import org.icefaces.ace.meta.baseMeta.UIComponentBaseMeta; import javax.el.MethodExpression; import org.icefaces.ace.resources.ACEResourceNames; import org.icefaces.resources.ICEResourceDependencies; import org.icefaces.resources.ICEResourceDependency; import org.icefaces.resources.ICEResourceLibrary; @Component( tagName = "draggable", componentClass = "org.icefaces.ace.component.dnd.Draggable", generatedClass = "org.icefaces.ace.component.dnd.DraggableBase", rendererClass = "org.icefaces.ace.component.dnd.DraggableRenderer", extendsClass = "javax.faces.component.UIComponentBase", componentType = "org.icefaces.ace.component.Draggable", rendererType = "org.icefaces.ace.component.DraggableRenderer", componentFamily = "org.icefaces.ace.Draggable", tlddoc = "Enables an Id-specified component to be moved via dragging. Draggable component can cause events on droppable ones." + "<p>For more information, see the " + "<a href=\"http://wiki.icefaces.org/display/ICE/Draggable\">Draggable Wiki Documentation</a>." ) @ClientBehaviorHolder(events = { @ClientEvent(name="start", javadoc="Fired when the target component starts to be dragged (default event). By default, no components are rendered in this ajax request, because rendering this draggable component itself or the target component could cause a dynamic update that replaces the original nodes being dragged on the page, which could interrupt the dragging action for the user.", tlddoc="Fired when the target component starts to be dragged (default event). By default, no components are rendered in this ajax request, because rendering this draggable component itself or the target component could cause a dynamic update that replaces the original nodes being dragged on the page, which could interrupt the dragging action for the user.", defaultRender="@none", defaultExecute="@this") }, defaultEvent="start") @ICEResourceLibrary(ACEResourceNames.ACE_LIBRARY) @ICEResourceDependencies({ @ICEResourceDependency(name=ACEResourceNames.COMPONENTS_JS) }) public class DraggableMeta extends UIComponentBaseMeta { @Property(tlddoc = "The JavaScript component instance variable name.") String widgetVar; @Property(name = "for", tlddoc = "Id of the component to add draggable behavior to.") String forValue; @Property(tlddoc = "Restrict the drag movement of this item to an axis. Default is null, possible values include: \"x\" & \"y\".") String axis; @Property(tlddoc = "Id of the parent component whose boundaries should restrict the movement of this draggable.") String containment; @Property(tlddoc = "JQuery selector that defines the set of items this draggable shares its space with, ensures this item is brought to the front z-index when dragged.") String stack; @Property(tlddoc = "Defines the drag movement of this component as though snapping to a grid in defined intervals. Ex: '20x20', measured in pixels.") String grid; @Property(tlddoc = "This arbitrary keyword allows sets of dragabbles and droppables with the same keyword to be associated with each other exclusively.") String scope; @Property(tlddoc = "Cursor style to set when this component is being dragged. See <a href=\"http://www.quirksmode.org/css/cursor.html\">this page</a> for a reference of what cursor styles your browser supports.") String cursor; /* @Property(tlddoc = "Id of the ACE Dashboard component to interact with.") String dashboard; */ @Property(tlddoc = "Restrict the drag-event start to an element specified by this JQuery selector.") String handle; @Property(tlddoc = "Enable 'snap to droppable' behavior for this component.") boolean snap; @Property(tlddoc = "Specifies which edges on elements to snap to. Possible values include: outer, inner and both.") String snapMode; @Property(tlddoc = "Distance in pixels from the droppable edges at which snapping should occur.") int snapTolerance; @Property(tlddoc = "If set, component won't cause drop event.") boolean dragOnly; @Property(tlddoc = "If set, movement is disabled.") boolean disabled; @Property(tlddoc = "If set, the component will return to its original position when dragging stops.") boolean revert; // Intended to take function as well, should look at extending this. @Property(tlddoc = "Specifies which element to move during the dragging event. Possible values are 'original' or 'clone'.") String helper; @Property(tlddoc = "The z-index to set for the helper object.") int zindex; @Property(defaultValue = "1.0", defaultValueType = DefaultValueType.EXPRESSION, tlddoc = "The opacity for the helper during dragging. Values can range from 0.00 to 1.00.") Double opacity; @Property(tlddoc = "Allows you to set the ID of an UIData component that will provide a Java object as input for the drag start event. That object is defined by matching the index of the draggable to an object at the same index in the UIData component backing.") String datasource; @Property(expression = Expression.METHOD_EXPRESSION, methodExpressionArgument = "org.icefaces.ace.event.DragDropEvent", tlddoc = "MethodExpression reference to a method called whenever the target component starts to be dragged. (It is advised not to use this event for updating the component being dragged, in order to avoid having its markup replaced while still dragging it. See wiki for more details.)") MethodExpression dragStartListener; }
[ "ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74" ]
ken.fyten@8668f098-c06c-11db-ba21-f49e70c34f74
9c6eef052e7ed2f84699a8eb2297f6eb913ea8dc
8651815d220ced94baf6d3b4559b3d8e86931b91
/PR106-RecyclerView/app/src/main/java/pedrojoya/iessaladillo/es/pr106/data/local/RepositoryImpl.java
72101a0a5d73ab66aefc697d334e0512801abd20
[]
no_license
OmarObispoUX/studio
f23ee4a488c3c124afaab6e522d6540e0e89764a
a5fc52f835ee180f7cdec4999fab0eabd0f1f710
refs/heads/master
2020-03-17T02:05:05.950065
2018-05-08T17:03:28
2018-05-08T17:03:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
871
java
package pedrojoya.iessaladillo.es.pr106.data.local; import java.util.List; import pedrojoya.iessaladillo.es.pr106.data.model.Student; public class RepositoryImpl implements Repository { private static RepositoryImpl instance; private final Database database; private RepositoryImpl(Database database) { this.database = database; } public synchronized static RepositoryImpl getInstance(Database database) { if (instance == null) { instance = new RepositoryImpl(database); } return instance; } @Override public List<Student> getStudents() { return database.getStudents(); } @Override public void addFakeStudent() { database.addFakeStudent(); } @Override public void deleteStudent(int position) { database.deleteStudent(position); } }
[ "pedrojoya@gmail.com" ]
pedrojoya@gmail.com
722f0d79bc85bfe383383ee72f166f8369352f6d
90ece9f4ae98bc9207eb80dce23fefadd7ce116d
/branches/onsalelocal-20140112/yipit/src/main/java/com/gaoshin/onsalelocal/yipit/api/Images.java
38d53bb98423de11d59f4cf7380a3ba9d84101a5
[]
no_license
zhangyongjiang/unfuddle
3709018baafefd16003d3666aae6808c106ee038
e07a6268f46eee7bc2b4890c44b736462ab89642
refs/heads/master
2021-01-24T06:12:21.603134
2014-07-06T16:14:18
2014-07-06T16:14:18
21,543,421
1
1
null
null
null
null
UTF-8
Java
false
false
408
java
package com.gaoshin.onsalelocal.yipit.api; public class Images { private String image_big; private String image_small; public String getImage_big() { return image_big; } public void setImage_big(String image_big) { this.image_big = image_big; } public String getImage_small() { return image_small; } public void setImage_small(String image_small) { this.image_small = image_small; } }
[ "zhangyongjiang@yahoo.com" ]
zhangyongjiang@yahoo.com
2774363b3f88fc9b929dc52a492e155837af3dd6
c0e4f8a4acbc5a46aaf524cbb46d42bb5c1d97f0
/src/main/java/enums/EnumSingletone.java
e08d0d19feec5943393d4b5971b3342de9bf7ef1
[]
no_license
NezhinskijVV/JavaFoundationSeptember
2bba234df6a71f873b23d249884f48e4ed6fba61
9474a331516a00788d7097cb2330ba7eac356b09
refs/heads/master
2022-04-01T09:49:37.393382
2020-01-07T13:48:02
2020-01-07T13:48:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
171
java
package enums; public enum EnumSingletone { INSTANCE; public void print() { System.out.println("Я самый классный объект!"); } }
[ "SeekerOfConfessor@gmail.com" ]
SeekerOfConfessor@gmail.com
f95a73ec361a83867ff5d27d830bf10b9eb124f1
cedb63e66f6618f03ccc0be236667bd867344f96
/src/examples/ganttproject/DependencyGraph.java
e90b7976be7086fd924d5db048919fe1afe3068e
[ "MIT" ]
permissive
star-finder/jpf-star
3db45dec3a1910b177f515a09073d06eb5f814ac
4b5c3b28aed2dc80c960a506d530850b6aee403d
refs/heads/master
2021-06-23T05:10:27.373279
2019-07-05T23:09:51
2019-07-05T23:09:51
105,113,784
9
2
null
2017-10-12T22:44:22
2017-09-28T07:03:56
Java
UTF-8
Java
false
false
4,333
java
/* Copyright 2012 GanttProject Team This file is part of GanttProject, an opensource project management tool. GanttProject 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. GanttProject 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 GanttProject. If not, see <http://www.gnu.org/licenses/>. */ package ganttproject; import java.util.Deque; import java.util.LinkedList; /** * A graph of dependencies between tasks which is used for scheduling algorithm. * In this graph nodes are tasks, and edges are either explicit or implicit dependencies between tasks. * * Graph is topologically ordered, and each node knows its level. Adding or removing dependencies or moving tasks * in the task hierarchy may change node levels. * * @author dbarashev */ public class DependencyGraph { public boolean repOK(GraphData myData) { if (myData.myTxn == null) return false; else if (myData.myTxn.myTouchedNodes == null) return false; else if (!myData.myTxn.myTouchedNodes.repOK()) return false; else { for (Node node : myTxn.myTouchedNodes) { if (node.myData == null) return false; } } if (myData.myBackup == null) return true; else return repOK(myData.myBackup); } public boolean repOK() { if (myTxn == null) return false; else if (myData == null) return false; else if (!repOK(myData)) return false; else if (myTxn.myTouchedNodes == null) return false; else if (!myTxn.myTouchedNodes.repOK()) return false; else { for (Node node : myTxn.myTouchedNodes) { if (node.myData == null) return false; } } return true; } /** * Dependency defines a constraint on its target task start and end dates. Constraints * are normally either points or semi-open intervals on the date axis. */ /** * Explicit dependency is constructed from {@link TaskDependency} instances and corresponds * to dependencies explicitly created by a user */ public Transaction myTxn = new Transaction(); public GraphData myData = new GraphData(myTxn); public DependencyGraph() { } private void removeEdge(DependencyEdge edge) { edge.getSrc().removeOutgoing(edge); edge.getDst().removeIncoming(edge); Deque<DependencyEdge> queue = new LinkedList<DependencyEdge>(); queue.add(edge); while (!queue.isEmpty()) { edge = queue.pollFirst(); if (edge.getDst().demoteLayer(myData = myData.withTransaction())) { queue.addAll(edge.getDst().getOutgoing()); } } } public boolean removeImplicitDependencies(Node root) { boolean removed = false; Deque<Node> queue = new LinkedList<>(); //Lists.newLinkedList(); queue.add(root); // for (DependencyEdge outgoing : Lists.newArrayList(root.getOutgoing())) { for (DependencyEdge outgoing : root.getOutgoing()) { if (outgoing instanceof ImplicitSubSuperTaskDependency) { removed = true; removeEdge(outgoing); } } while (!queue.isEmpty()) { Node node = queue.pollFirst(); // for (DependencyEdge incoming : Lists.newArrayList(node.getIncoming())) { for (DependencyEdge incoming : node.getIncoming()) { if (incoming instanceof ImplicitInheritedDependency) { if (((ImplicitInheritedDependency)incoming).myExplicitDep.getDst() != root) { removed = true; removeEdge(incoming); } } if (incoming instanceof ImplicitSubSuperTaskDependency) { queue.add(incoming.getSrc()); } } } return removed; } public void startTransaction() { // Analysis.assume(this.myData.myTxn == this.myTxn); if (myTxn.isRunning()) { return; } myTxn.start(); } public void rollbackTransaction() { // Analysis.assume(this.myData.myTxn == this.myTxn); if (!myTxn.isRunning()) { return; } myData = myData.rollback(); myTxn.rollback(); } }
[ "longph1989@gmail.com" ]
longph1989@gmail.com
a38a327cfe9e779263dbfcc60cc984b47f1bef54
00b01530c085ba23b197eb7702daeadb5402c4f5
/src/main/java/io/dorune/book/dp/headfirst/composite/menuiterator/MenuComponent.java
304f3aa3f42e21e85f44110605bf3447d5a3f834
[]
no_license
piyoro/book
119e79e856fe6f8766b794ca69379595ee184092
8aa0ec67d57a245f7ea208534d82eb3655386b76
refs/heads/master
2020-12-08T19:40:08.145469
2020-05-07T14:17:21
2020-05-07T14:17:21
233,076,350
0
0
null
null
null
null
UTF-8
Java
false
false
859
java
package io.dorune.book.dp.headfirst.composite.menuiterator; import java.util.*; public abstract class MenuComponent { public void add(MenuComponent menuComponent) { throw new UnsupportedOperationException(); } public void remove(MenuComponent menuComponent) { throw new UnsupportedOperationException(); } public MenuComponent getChild(int i) { throw new UnsupportedOperationException(); } public String getName() { throw new UnsupportedOperationException(); } public String getDescription() { throw new UnsupportedOperationException(); } public double getPrice() { throw new UnsupportedOperationException(); } public boolean isVegetarian() { throw new UnsupportedOperationException(); } public abstract Iterator<MenuComponent> createIterator(); public void print() { throw new UnsupportedOperationException(); } }
[ "piyor@DESKTOP-2M514K4" ]
piyor@DESKTOP-2M514K4
84c483054bbc98581798d2c1d7a1d46f57789049
b17fc9e282f3ae10579e4456d9ca2774f4b14780
/modules/javaone2016/g1-deep-dive/src/main/java/cn/tim/g1/intro/G1Intro.java
50a342a71c71867be4e1669cfa76928c95a58f40
[]
no_license
luolibing/coding-life
8c351e306111b217585c4fbaab34c10e42012b23
06318973d4c0bbbfc0225c4a5bc5d4a2ddf2c6ff
refs/heads/master
2022-12-27T02:26:49.599091
2021-12-22T04:01:00
2021-12-22T04:01:00
94,624,544
1
1
null
2022-12-16T06:49:34
2017-06-17T13:11:35
Java
UTF-8
Java
false
false
1,215
java
package cn.tim.g1.intro; /** * Created by luolibing on 2017/11/22. */ public class G1Intro { /** * g1 的目标:高吞吐量和低延迟 * 吞吐量: 每秒执行事务的数量 * 停顿:GC停顿 * * 默认的停顿目标是200ms * 更高的停顿意味着:高吞吐量,更高的延迟 * 更低的停顿意味着:低吞吐量,更低的延迟 * */ public void goal() { } /** * G1 区域内存管理 * 堆内存被拆分为多个区域 * 每个域的大小依赖于堆的大小,4GB堆,每个域为2MB * */ public void intro() { } /** * 新对象被分配在eden()区域中 */ public void newObj() { } /** * 当一定数量的eden区域被分配之后进行新生代回收 * 将还存活的对象从eden域中复制到survivorE(S)域中 * 接下来对象继续呗分配到E域中 * */ public void youngCollection() { } /** * 如果S域经过多次新生代回收之后还存活,则将其从S域复制到old()域中 */ public void oldCollection() { } public void concurrently() { } }
[ "397911353@qq.com" ]
397911353@qq.com
c5c0a4b5c16044fd89359486d96a980f8db02994
28f1dedfa55de3381f0e2124c7c819f582767e2a
/unmaintained/extras/cdl/src/org/smartfrog/sfcore/languages/cdl/process/DepthFirstOperationPhase.java
28c7d0d85746c6c9dfb51780b8dd491a60d28f6a
[]
no_license
rhusar/smartfrog
3bd0032888c03a8a04036945c2d857f72a89dba6
0b4db766fb1ec1e1c2e48cbf5f7bf6bfd2df4e89
refs/heads/master
2021-01-10T05:07:39.218946
2014-11-28T08:52:32
2014-11-28T08:52:32
47,347,494
0
1
null
null
null
null
UTF-8
Java
false
false
2,910
java
/** (C) Copyright 2006 Hewlett-Packard Development Company, LP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For more information: www.smartfrog.org */ package org.smartfrog.sfcore.languages.cdl.process; import org.smartfrog.sfcore.languages.cdl.dom.CdlDocument; import org.smartfrog.sfcore.languages.cdl.dom.PropertyList; import org.smartfrog.sfcore.languages.cdl.faults.CdlException; import java.io.IOException; import nu.xom.ParsingException; import nu.xom.Node; /** * Walk down the graph and apply any named operation to it * created 18-Jan-2006 13:11:40 */ public class DepthFirstOperationPhase implements ProcessingPhase { private PropertyListOperation before; private PropertyListOperation after; private boolean applyToConfiguration=true; private boolean applyToSystem=true; public DepthFirstOperationPhase(PropertyListOperation before, PropertyListOperation after, boolean applyToConfiguration, boolean applyToSystem) { this.before = before; this.after = after; this.applyToConfiguration = applyToConfiguration; this.applyToSystem = applyToSystem; } public void process(CdlDocument document) throws IOException, CdlException, ParsingException { if(applyToConfiguration && document.getConfiguration()!=null) { apply(document.getConfiguration()); } if (applyToSystem && document.getSystem() != null) { apply(document.getSystem()); } } /** * Depth first application of before/after operations * @param target * @throws IOException * @throws CdlException */ public void apply(PropertyList target) throws IOException, CdlException { if(before!=null) { before.apply(target); } //children for(Node node:target) { if(node instanceof PropertyList) { apply((PropertyList) node); } } if (after!=null) { after.apply(target); } } /** * @return a string representation of the phase */ public String toString() { return "Depth first operation; before="+before+" after="+after; } }
[ "steve_l@9868f95a-be1e-0410-b3e3-a02e98b909e6" ]
steve_l@9868f95a-be1e-0410-b3e3-a02e98b909e6
5bbe9e57183d95a2f144d0e69b1c6be591d7ad1d
3e0a4ac41eeb78f19d86a4d84c84751702af1d09
/retrofit/src/main/java/adtapter/rxjava/src/test/java/retrofit2/adapter/rxjava/RecordingSubscriber.java
47ee11b5455fbda21871f4f0f2b8bc47e7d4d74c
[]
no_license
feifeixiaoshizi/javaproject
9ba95a62599196f1408722d8d76d9b2a24a36367
887b8d450c80cfedfa927fa13e10ca7bf792a599
refs/heads/master
2021-04-28T20:43:59.452356
2020-02-03T00:48:27
2020-02-03T00:48:27
121,932,950
2
0
null
null
null
null
UTF-8
Java
false
false
4,444
java
/* * Copyright (C) 2016 Square, 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 adtapter.rxjava.src.test.java.retrofit2.adapter.rxjava; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; import java.util.List; import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; import rx.Notification; import rx.Subscriber; import static org.assertj.core.api.Assertions.assertThat; /** A test {@link Subscriber} and JUnit rule which guarantees all events are asserted. */ final class RecordingSubscriber<T> extends Subscriber<T> { private final long initialRequest; private final Deque<Notification<T>> events = new ArrayDeque<>(); private RecordingSubscriber(long initialRequest) { this.initialRequest = initialRequest; } @Override public void onStart() { request(initialRequest); } @Override public void onNext(T value) { events.add(Notification.createOnNext(value)); } @Override public void onCompleted() { events.add(Notification.<T>createOnCompleted()); } @Override public void onError(Throwable e) { events.add(Notification.<T>createOnError(e)); } private Notification<T> takeNotification() { Notification<T> notification = events.pollFirst(); if (notification == null) { throw new AssertionError("No event found!"); } return notification; } public T takeValue() { Notification<T> notification = takeNotification(); assertThat(notification.isOnNext()) .overridingErrorMessage("Expected onNext event but was %s", notification) .isTrue(); return notification.getValue(); } public Throwable takeError() { Notification<T> notification = takeNotification(); assertThat(notification.isOnError()) .overridingErrorMessage("Expected onError event but was %s", notification) .isTrue(); return notification.getThrowable(); } public RecordingSubscriber<T> assertAnyValue() { takeValue(); return this; } public RecordingSubscriber<T> assertValue(T value) { assertThat(takeValue()).isEqualTo(value); return this; } public void assertCompleted() { Notification<T> notification = takeNotification(); assertThat(notification.isOnCompleted()) .overridingErrorMessage("Expected onCompleted event but was %s", notification) .isTrue(); assertNoEvents(); } public void assertError(Throwable throwable) { assertThat(takeError()).isEqualTo(throwable); } public void assertError(Class<? extends Throwable> errorClass) { assertError(errorClass, null); } public void assertError(Class<? extends Throwable> errorClass, String message) { Throwable throwable = takeError(); assertThat(throwable).isInstanceOf(errorClass); if (message != null) { assertThat(throwable).hasMessage(message); } assertNoEvents(); } public void assertNoEvents() { assertThat(events).as("Unconsumed events found!").isEmpty(); } public void requestMore(long amount) { request(amount); } public static final class Rule implements TestRule { final List<RecordingSubscriber<?>> subscribers = new ArrayList<>(); public <T> RecordingSubscriber<T> create() { return createWithInitialRequest(Long.MAX_VALUE); } public <T> RecordingSubscriber<T> createWithInitialRequest(long initialRequest) { RecordingSubscriber<T> subscriber = new RecordingSubscriber<>(initialRequest); subscribers.add(subscriber); return subscriber; } @Override public Statement apply(final Statement base, Description description) { return new Statement() { @Override public void evaluate() throws Throwable { base.evaluate(); for (RecordingSubscriber<?> subscriber : subscribers) { subscriber.assertNoEvents(); } } }; } } }
[ "18713027427@163.com" ]
18713027427@163.com
d68e2003217fea1f44e746b1c5e9f7774c45045e
48ca08c09a73c387496f327a903d83120af626ba
/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/partition/support/package-info.java
6d0086f69fe6356ec8ade6749c343ea4bfcba792
[]
no_license
jjkong86/spring-batch
b4b4e020a432939dc432e891fd6a10f2cd6ff283
b29b789ae97c840a1b8c0c0e257223e3068b517d
refs/heads/master
2020-04-30T19:45:09.834413
2019-03-21T18:15:38
2019-03-21T18:15:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
838
java
/* * Copyright 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. */ /** * Support classes for JSR-352 partitioning configuration. * * @author Mahmoud Ben Hassine */ @NonNullApi package org.springframework.batch.core.jsr.partition.support; import org.springframework.lang.NonNullApi;
[ "mminella@pivotal.io" ]
mminella@pivotal.io
6f02af3c5d316040218a317a81e0850762d56d0d
27fcf134ecfa2e17df46d18c21aa01afeb8344a6
/src/main/java/JDBS_2.java
8169224d771cb1faabf1938e3fbf930dfb0a9279
[]
no_license
VasylN/Test_JDBC
3c5d798ae787ccafdcb50644c67dfab32d5822db
a01354f4658a928d83447c7d5c11588c48a41b85
refs/heads/master
2020-02-26T13:38:05.346677
2017-06-27T18:09:09
2017-06-27T18:09:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,176
java
import javax.naming.Name; import java.sql.*; /** * Created by Pc on 25.06.2017. */ public class JDBS_2 { private final static String URL = "jdbc:postgresql://localhost:5432/postgres"; private final static String USERNAME = "postgres"; private final static String PASS = "qweasdzxc123"; public static void main(String[] args) { Connection connection; Driver driver = new org.postgresql.Driver(); try { DriverManager.registerDriver(driver); } catch (SQLException e) { e.printStackTrace(); } try { connection = DriverManager.getConnection(URL, USERNAME, PASS); Statement statement = connection.createStatement(); statement.execute("INSERT INTO users(name, lastname) VALUES ('Ivan', 'Pupkin')"); ResultSet rs = statement.executeQuery("SELECT * FROM users"); while(rs.next()){ System.out.println(rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3)); } } catch (SQLException e) { e.printStackTrace(); } } }
[ "vasyln86@gmail.com" ]
vasyln86@gmail.com
45ba035172ca995d08db2d7cf2225e1c3887a0c5
418cbb362e8be12004bc19f3853a6b7e834e41f5
/src/L11Arrays/Ex03LastKNumbersSumsSequence.java
381ae676ccae4dc1f98c77ce6401366e50763da3
[ "MIT" ]
permissive
VasAtanasov/SoftUni-Programming-Fundamentals-May-2018
433bd31e531b9ba19d844d6c3ed46deef851396e
911bca8ef9a828acc247fbc2e6a9290f4d3a8406
refs/heads/master
2020-04-14T20:35:23.723721
2019-01-04T11:32:04
2019-01-04T11:32:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,049
java
package L11Arrays; import java.util.Scanner; public class Ex03LastKNumbersSumsSequence { private static Scanner scanner = new Scanner(System.in); public static void main(String[] args) { int n = Integer.parseInt(scanner.nextLine()); int k = Integer.parseInt(scanner.nextLine()); long[] array = new long[n]; array[0] = 1; for (int i = 1; i < n; i++) { sumPreviousKElements(array, i, k); } printIntArray(array); } private static void sumPreviousKElements(long[] array, int i, int k) { for (int j = 1; j <= k; j++) { try { array[i] = array[i] + array[i - j]; } catch (Exception ex) { break; } } } private static void printIntArray(long[] array) { for (int i = 0; i < array.length; i++) { System.out.print(array[i]); if (i == array.length - 1) { break; } System.out.print(" "); } } }
[ "vas.atanasov@gmail.com" ]
vas.atanasov@gmail.com
a3c785c07b9a414c3e9e3190004f1a48f88013b2
f7f49edc0c6d8fdb0c753862035b7f945d92e135
/bitcamp-java-basic/src/main/java/ch27/b/Test.java
ea8c691bd23dab527297a6883c549369ba59794a
[]
no_license
madridista18/bitcamp-java-20190527
6a38a8687432d54e3140d9876f08b86579260e77
8ae5ea7882114b452c16c98c0dd8fd41caf8e96c
refs/heads/master
2022-03-05T13:12:31.111267
2019-11-07T03:27:05
2019-11-07T03:27:05
194,775,341
0
0
null
null
null
null
UTF-8
Java
false
false
460
java
package ch27.b; public class Test { public static void main(String[] args) throws Exception { Class<?> clazz = C.class; Class<?> superClass = clazz.getSuperclass(); System.out.println(superClass.getName()); superClassName(clazz); } private static void superClassName(Class<?> clazz) { System.out.println(clazz.getName()); if (clazz == Object.class) return; superClassName(clazz.getSuperclass()); } }
[ "madridista18@naver.com" ]
madridista18@naver.com
b393e25d32cce8a69fdf1cb5bd0e07d510d9a538
2d678fff672d582fcd0c25a1f10a0c11c2cd0207
/JavaAdvanced/HomeworkMultidimensionalArrays/src/Sequence.java
1b67824e1dc6e0ffce963b1cc57471a8cb28637d
[]
no_license
totopopov/SoftUniJavaOOP
32aea6928ba8a1eef51ad5e8a40a724d4c844a78
0b2eeb06fa1c9b547e0ef42bb74b6bbb16d05d7e
refs/heads/master
2021-01-18T17:53:27.274139
2017-08-16T17:06:21
2017-08-16T17:06:21
100,505,616
0
0
null
null
null
null
UTF-8
Java
false
false
2,639
java
import java.util.Scanner; public class Sequence { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] size = sc.nextLine().split(" "); int[] intSize = new int[2]; intSize[0] = Integer.parseInt(size[0]); intSize[1] = Integer.parseInt(size[1]); String[][] matrix = new String[intSize[0]][intSize[1]]; for (int i = 0; i < intSize[0]; i++) { String[] line = sc.nextLine().split(" "); for (int j = 0; j < intSize[1]; j++) { matrix[i][j] = (line[j]); } } Integer max = 0; Integer currentMax = 1; String maxElement = ""; for (int i = 0; i < intSize[0]; i++) { currentMax=1; for (int j = 1; j < intSize[1]; j++) { if (matrix[i][j].equals(matrix[i][j - 1])) { currentMax++; if (currentMax >= max) { maxElement = matrix[i][j - 1]; max=currentMax; } } else { currentMax=1; } } } for (int i = 0; i < intSize[1]; i++) { currentMax=1; for (int j = 1; j < intSize[0]; j++) { if (matrix[j][i].equals(matrix[j-1][i])) { currentMax++; if (currentMax >= max) { maxElement = matrix[j-1][i]; max=currentMax; } } else { currentMax=1; } } } currentMax=1; for (int i = 1; i < Math.min(intSize[1],intSize[0]); i++) { if (matrix[i][i].equals(matrix[i-1][i - 1])) { currentMax++; if (currentMax >= max) { maxElement = matrix[i-1][i - 1]; max=currentMax; } } else { currentMax=1; } } Integer smallSide=Math.min(intSize[1],intSize[0]); for (int i = 1; i < smallSide; i++) { if (matrix[smallSide-i-1][i].equals(matrix[smallSide-i][i - 1])) { currentMax++; if (currentMax >= max) { maxElement = matrix[smallSide-i-1][i - 1]; max=currentMax; } } else { currentMax=1; } } for (int i = 0; i < max; i++) { System.out.print(maxElement+", "); } } }
[ "totopopov@gmail.com" ]
totopopov@gmail.com
531eaf418fd18109a59ebf611fb867faa843f752
b15857cb39709dbbe4d12394ff957ea6b350a997
/src/Method/SelfNumber.java
b66def852f4e24a40baffb8e60fff6e5d5edd529
[]
no_license
prkg7341/AlgorithmPractice
5337b9803634ee22e1d9057dacbe42e6934cd797
a04b8df41afa40eda75d9a7ce2a46b87645ccbf8
refs/heads/master
2022-10-01T19:57:52.181014
2022-09-21T15:07:29
2022-09-21T15:07:29
152,734,619
0
0
null
null
null
null
UTF-8
Java
false
false
1,031
java
package Method; import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; public class SelfNumber { private static int selfNum(int n){ int result=n; int length; if(n<10) length = 1; else if(n<100) length = 2; else if(n<1000) length = 3; else length = 4; String integer = result+""; for(int i=0 ; i<length ; i++){ result += Integer.parseInt(integer.split("")[i]); } return result; } public static void main(String[] args) throws IOException { BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); StringBuilder sb = new StringBuilder(); int[][] ar = new int[10000][2]; for(int i=0 ; i<10000 ; i++){ ar[i][0] = i+1; } for(int i=0 ; i<10000 ; i++){ if((selfNum(ar[i][0])-1)<10000){ ar[selfNum(ar[i][0])-1][1] = 1; } } for(int i=0 ; i<10000 ; i++){ if(ar[i][1]==0){ sb.append(ar[i][0] + "\n"); } } sb.deleteCharAt(sb.length()-1); bw.write(sb.toString()); bw.flush(); bw.close(); } }
[ "40709295+prkg7341@users.noreply.github.com" ]
40709295+prkg7341@users.noreply.github.com
f0afe95cfeddfb0245b08ebaacf0fe038955af8a
b1c1f87e19dec3e06b66b60ea32943ca9fceba81
/spring-core/src/main/java/org/springframework/core/convert/support/FallbackObjectToStringConverter.java
271b472459d87d454db2105e9433eac0c9b5e959
[ "Apache-2.0" ]
permissive
JunMi/SpringFramework-SourceCode
d50751f79803690301def6478e198693e2ff7348
4918e0e6a0676a62fd2a9d95acf6eb4fa5edb82b
refs/heads/master
2020-06-19T10:55:34.451834
2019-07-13T04:32:14
2019-07-13T13:11:54
196,678,387
1
0
null
null
null
null
UTF-8
Java
false
false
2,454
java
/* * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.core.convert.support; import java.io.StringWriter; import java.util.Collections; import java.util.Set; import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.converter.ConditionalGenericConverter; import org.springframework.lang.Nullable; /** * Simply calls {@link Object#toString()} to convert any supported object * to a {@link String}. * * <p>Supports {@link CharSequence}, {@link StringWriter}, and any class * with a String constructor or one of the following static factory methods: * {@code valueOf(String)}, {@code of(String)}, {@code from(String)}. * * <p>Used by the {@link DefaultConversionService} as a fallback if there * are no other explicit to-String converters registered. * * @author Keith Donald * @author Juergen Hoeller * @author Sam Brannen * @since 3.0 * @see ObjectToObjectConverter */ final class FallbackObjectToStringConverter implements ConditionalGenericConverter { @Override public Set<ConvertiblePair> getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Object.class, String.class)); } @Override public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { Class<?> sourceClass = sourceType.getObjectType(); if (String.class == sourceClass) { // no conversion required return false; } return (CharSequence.class.isAssignableFrom(sourceClass) || StringWriter.class.isAssignableFrom(sourceClass) || ObjectToObjectConverter.hasConversionMethodOrConstructor(sourceClass, String.class)); } @Override @Nullable public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { return (source != null ? source.toString() : null); } }
[ "648326357@qq.com" ]
648326357@qq.com
aea18cdbc17594b3b5b48d271d5c29cfe4540863
2ad847b00a655df02463bce366ef4f60a298e181
/src/test/java/com/michaelszymczak/training/grokalgo/chapter02/NaiveSortTest.java
b0c9c7c2aa4ea0a16c31943ff232b36338048e46
[]
no_license
michaelszymczak/training-algorithms4
6171aae1a1ff15535d897795879df7236bcfd5ba
d6bfa8f2f304aabbed7c3202d7f5710fe48ade9d
refs/heads/master
2021-07-06T23:16:52.933080
2021-05-09T19:09:56
2021-05-09T19:09:56
41,629,119
0
0
null
null
null
null
UTF-8
Java
false
false
1,266
java
package com.michaelszymczak.training.grokalgo.chapter02; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static java.lang.Integer.MAX_VALUE; import static java.lang.Integer.MIN_VALUE; public class NaiveSortTest { private final NaiveSort sort = new NaiveSort(); @Test void shouldResultInEmptyArrayWhenNoItems() { assertThat(sort.sorted(new int[0])).isEmpty(); } @Test void shouldReturnTheOnlyElement() { assertThat(sort.sorted(new int[]{3})).isEqualTo(new int[]{3}); } @Test void shouldHandleAlreadySortedInput() { assertThat(sort.sorted(new int[]{-1, 2, 3})).isEqualTo(new int[]{-1, 2, 3}); } @Test void shouldPrioritizeLowerValues() { assertThat(sort.sorted(new int[]{2, 1})).isEqualTo(new int[]{1, 2}); } @Test void shouldKeepTheSameValueTogether() { assertThat(sort.sorted(new int[]{5, 5, 3, 5, 3})).isEqualTo(new int[]{3, 3, 5, 5, 5}); } @Test void shouldHandleBoundaryValues() { assertThat(sort.sorted(new int[]{MAX_VALUE, 1, -1, 0, MIN_VALUE, MAX_VALUE, MIN_VALUE})).isEqualTo(new int[]{MIN_VALUE, MIN_VALUE, -1, 0, 1, MAX_VALUE, MAX_VALUE}); } }
[ "contact@michaelszymczak.com" ]
contact@michaelszymczak.com
b773eab8e46692a40c58d79b5ac33829517ea2db
51b4b9fa2f40ecad020331e95e0328bc5214bad9
/src/main/java/com/javaman/rocketmq/simple/producer/SyncProducer.java
08ef9aebfce9ada2cd18732e5d089c036664825c
[]
no_license
pengzhetech/Learning-RocketMq
5ccf80521fa195cbc02d571e0eb40af8020ff0ea
af84a48111e3152ef55a85bce902a844905fa6e6
refs/heads/master
2020-04-01T21:16:16.657438
2018-12-12T07:36:49
2018-12-12T07:36:49
153,647,014
0
0
null
null
null
null
UTF-8
Java
false
false
1,408
java
package com.javaman.rocketmq.simple.producer; import org.apache.rocketmq.client.producer.DefaultMQProducer; import org.apache.rocketmq.client.producer.SendResult; import org.apache.rocketmq.common.message.Message; import org.apache.rocketmq.remoting.common.RemotingHelper; /** * @author pengzhe * @date 2018/10/18 23:36 * @description */ public class SyncProducer { public static void main(String[] args) throws Exception { //Instantiate with a producer group name. DefaultMQProducer producer = new DefaultMQProducer("please_rename_unique_group_name"); // Specify name server addresses. producer.setNamesrvAddr("localhost:9876"); //Launch the instance. producer.start(); for (int i = 0; i < 100; i++) { //Create a message instance, specifying topic, tag and message body. Message msg = new Message("TopicTest" /* Topic */, "TagA" /* Tag */, ("Hello RocketMQ " + i).getBytes(RemotingHelper.DEFAULT_CHARSET) /* Message body */ ); //Call send message to deliver message to one of brokers. SendResult sendResult = producer.send(msg); System.out.printf("%s%n", sendResult); } //Shut down once the producer instance is not longer in use. producer.shutdown(); } }
[ "pengzhepost@sina.com" ]
pengzhepost@sina.com
0f8ccd2ee173cbc6abff581105c15d6555e7899e
3328c43e0fc892cde9ff574c9af269fc61e86704
/Acebal/Práctica 1/Videoclub/Videoclub (After)/src/Rental.java
20db987821154c654aae22966a58e2895bbdc353
[]
no_license
mistermboy/DS
7ebcb8ce91e7d4ce292e3f24f1e233f28e9001ce
d1855cb2697373b0bd833d2db0e66edbc3e74404
refs/heads/master
2021-07-24T18:47:24.902711
2019-01-16T10:38:52
2019-01-16T10:38:52
103,942,125
2
0
null
null
null
null
UTF-8
Java
false
false
536
java
/** * Esta clase representa el alquiler de una película por parte de un cliente. */ public class Rental { private Movie movie; private int daysRented; public Rental(Movie movie, int daysRented) { this.movie = movie; this.daysRented = daysRented; } public int getDaysRented() { return daysRented; } public Movie getMovie() { return movie; } public double getCharge() { return movie.getCharge(daysRented); } int getFrequentRenterPoints() { return movie.getFrequentRenterPoints(daysRented); } }
[ "pabloyo97@hotmail.com" ]
pabloyo97@hotmail.com
5c52be7ad6871f9ae969340eca7cf30fca802f08
61c6164c22142c4369d525a0997b695875865e29
/middleware/src/main/java/com/spirit/cartera/data/ObservacionesPago.java
fce365f5c8d88894b39bb11b1f8b3fc54bd4f8e3
[]
no_license
xruiz81/spirit-creacional
e5a6398df65ac8afa42be65886b283007d190eae
382ee7b1a6f63924b8eb895d4781576627dbb3e5
refs/heads/master
2016-09-05T14:19:24.440871
2014-11-10T17:12:34
2014-11-10T17:12:34
26,328,756
1
0
null
null
null
null
UTF-8
Java
false
false
954
java
package com.spirit.cartera.data; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; public class ObservacionesPago implements Serializable { Date fecha; String codigo; String tipoDocumento; String observacion; BigDecimal saldo; public Date getFecha() { return fecha; } public void setFecha(Date fecha) { this.fecha = fecha; } public String getCodigo() { return codigo; } public void setCodigo(String codigo) { this.codigo = codigo; } public String getTipoDocumento() { return tipoDocumento; } public void setTipoDocumento(String tipoDocumento) { this.tipoDocumento = tipoDocumento; } public String getObservacion() { return observacion; } public void setObservacion(String observacion) { this.observacion = observacion; } public BigDecimal getSaldo() { return saldo; } public void setSaldo(BigDecimal saldo) { this.saldo = saldo; } }
[ "xruiz@creacional.com" ]
xruiz@creacional.com