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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0a6788383a21166779caa7960932c3628728c90e
|
143bbbdd7788e296ebbfe461265734b91fbf8cea
|
/src/com/r4intellij/highlighting/RColorSettingsPage.java
|
d08f9c1926959bb54af685f638387a8468ed6dbf
|
[
"MIT",
"BSD-2-Clause"
] |
permissive
|
daysprilv/r4intellij
|
8ae559d8c0e5432a5e9adaa7f03879bd9a8df54f
|
a262319797a8507c327b6d5b1a3cae938e414fd6
|
refs/heads/master
| 2020-08-11T19:29:55.837565
| 2019-07-29T18:08:59
| 2019-07-29T18:08:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,811
|
java
|
package com.r4intellij.highlighting;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.fileTypes.SyntaxHighlighter;
import com.intellij.openapi.options.colors.AttributesDescriptor;
import com.intellij.openapi.options.colors.ColorDescriptor;
import com.intellij.openapi.options.colors.ColorSettingsPage;
import com.intellij.openapi.util.IconLoader;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.util.Map;
/**
* RColorSettingsPage implementation
* Created on 7/23/14.
*
* @author HongKee Moon
*/
public class RColorSettingsPage implements ColorSettingsPage {
/**
* The path to the sample .R file
*/
protected static final String SAMPLE_R_SCRIPT = "\n" +
"for (i in names(list)) {\n" +
" if(true)\n" +
" {\n" +
" # line comment\n" +
" names[,i] = 0\n" +
" names[,i+1] = test()\n" +
" names[,'added'] = \"string\"\n" +
" }\n" +
"}\n";
/**
* The sample .R document shown in the colors settings dialog
*/
private static final AttributesDescriptor[] DESCRIPTORS = new AttributesDescriptor[]{
new AttributesDescriptor("Comment", RSyntaxHighlighterColors.LINE_COMMENT),
new AttributesDescriptor("Keyword", RSyntaxHighlighterColors.KEYWORD),
new AttributesDescriptor("Parenthesis", RSyntaxHighlighterColors.PARENTHS),
new AttributesDescriptor("Braces", RSyntaxHighlighterColors.BRACES),
new AttributesDescriptor("Brackets", RSyntaxHighlighterColors.BRACKETS),
new AttributesDescriptor("Number", RSyntaxHighlighterColors.NUMBER),
new AttributesDescriptor("String ...", RSyntaxHighlighterColors.STRING)
// new AttributesDescriptor("Function Call", RHighlighterColors.),
};
@Nullable
@Override
public Icon getIcon() {
return IconLoader.findIcon("/icons/r_logo_16.png");
}
@NotNull
@Override
public SyntaxHighlighter getHighlighter() {
return new RSyntaxHighlighter(null, null);
}
@NotNull
@Override
public String getDemoText() {
return SAMPLE_R_SCRIPT;
}
@Nullable
@Override
public Map<String, TextAttributesKey> getAdditionalHighlightingTagToDescriptorMap() {
return null;
}
@NotNull
@Override
public AttributesDescriptor[] getAttributeDescriptors() {
return DESCRIPTORS;
}
@NotNull
@Override
public ColorDescriptor[] getColorDescriptors() {
return ColorDescriptor.EMPTY_ARRAY;
}
@NotNull
@Override
public String getDisplayName() {
return "R";
}
}
|
[
"holgerbrandl@gmail.com"
] |
holgerbrandl@gmail.com
|
ac7912b117cf5192c95d549550986cb4864b1c10
|
c0542546866385891c196b665d65a8bfa810f1a3
|
/decompiled/com/android/internal/telephony/cat/TextMessage.java
|
178591165da553344bee4f2ff80245e7a727c991
|
[] |
no_license
|
auxor/android-wear-decompile
|
6892f3564d316b1f436757b72690864936dd1a82
|
eb8ad0d8003c5a3b5623918c79334290f143a2a8
|
refs/heads/master
| 2016-09-08T02:32:48.433800
| 2015-10-12T02:17:27
| 2015-10-12T02:19:32
| 42,517,868
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,382
|
java
|
package com.android.internal.telephony.cat;
import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
public class TextMessage implements Parcelable {
public static final Creator<TextMessage> CREATOR;
public Duration duration;
public Bitmap icon;
public boolean iconSelfExplanatory;
public boolean isHighPriority;
public boolean responseNeeded;
public String text;
public String title;
public boolean userClear;
TextMessage() {
/* JADX: method processing error */
/*
Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: com.android.internal.telephony.cat.TextMessage.<init>():void
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113)
at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256)
at jadx.core.ProcessClass.process(ProcessClass.java:34)
at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59)
at jadx.core.ProcessClass.process(ProcessClass.java:42)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281)
at jadx.api.JavaClass.decompile(JavaClass.java:59)
at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161)
Caused by: jadx.core.utils.exceptions.DecodeException: in method: com.android.internal.telephony.cat.TextMessage.<init>():void
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46)
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98)
... 7 more
Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e8
at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196)
at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212)
at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72)
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43)
... 8 more
*/
/*
// Can't load method instructions.
*/
throw new UnsupportedOperationException("Method not decompiled: com.android.internal.telephony.cat.TextMessage.<init>():void");
}
private TextMessage(android.os.Parcel r1) {
/* JADX: method processing error */
/*
Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: com.android.internal.telephony.cat.TextMessage.<init>(android.os.Parcel):void
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113)
at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256)
at jadx.core.ProcessClass.process(ProcessClass.java:34)
at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59)
at jadx.core.ProcessClass.process(ProcessClass.java:42)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281)
at jadx.api.JavaClass.decompile(JavaClass.java:59)
at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161)
Caused by: jadx.core.utils.exceptions.DecodeException: in method: com.android.internal.telephony.cat.TextMessage.<init>(android.os.Parcel):void
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46)
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98)
... 7 more
Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e8
at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196)
at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212)
at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72)
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43)
... 8 more
*/
/*
// Can't load method instructions.
*/
throw new UnsupportedOperationException("Method not decompiled: com.android.internal.telephony.cat.TextMessage.<init>(android.os.Parcel):void");
}
public java.lang.String toString() {
/* JADX: method processing error */
/*
Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: com.android.internal.telephony.cat.TextMessage.toString():java.lang.String
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113)
at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256)
at jadx.core.ProcessClass.process(ProcessClass.java:34)
at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59)
at jadx.core.ProcessClass.process(ProcessClass.java:42)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281)
at jadx.api.JavaClass.decompile(JavaClass.java:59)
at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161)
Caused by: jadx.core.utils.exceptions.DecodeException: in method: com.android.internal.telephony.cat.TextMessage.toString():java.lang.String
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46)
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98)
... 7 more
Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e9
at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196)
at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212)
at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72)
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43)
... 8 more
*/
/*
// Can't load method instructions.
*/
throw new UnsupportedOperationException("Method not decompiled: com.android.internal.telephony.cat.TextMessage.toString():java.lang.String");
}
public void writeToParcel(android.os.Parcel r1, int r2) {
/* JADX: method processing error */
/*
Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: com.android.internal.telephony.cat.TextMessage.writeToParcel(android.os.Parcel, int):void
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113)
at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256)
at jadx.core.ProcessClass.process(ProcessClass.java:34)
at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59)
at jadx.core.ProcessClass.process(ProcessClass.java:42)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281)
at jadx.api.JavaClass.decompile(JavaClass.java:59)
at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161)
Caused by: jadx.core.utils.exceptions.DecodeException: in method: com.android.internal.telephony.cat.TextMessage.writeToParcel(android.os.Parcel, int):void
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46)
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98)
... 7 more
Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5
at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1196)
at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212)
at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72)
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43)
... 8 more
*/
/*
// Can't load method instructions.
*/
throw new UnsupportedOperationException("Method not decompiled: com.android.internal.telephony.cat.TextMessage.writeToParcel(android.os.Parcel, int):void");
}
public int describeContents() {
return 0;
}
static {
CREATOR = new Creator<TextMessage>() {
public TextMessage createFromParcel(Parcel in) {
return new TextMessage(null);
}
public TextMessage[] newArray(int size) {
return new TextMessage[size];
}
};
}
}
|
[
"itop.my@gmail.com"
] |
itop.my@gmail.com
|
2646d2e39849361e4190dd43b6889ff265ad2547
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/53/619.java
|
30fde8b5555c36c6d057ff1717ff3b2b28719b4f
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,130
|
java
|
package <missing>;
public class GlobalMembers
{
public static int f(tangible.RefObject<Integer> p, tangible.RefObject<Integer> t, int n)
{
int i;
int j;
int s = 0;
t.argValue = p.argValue;
for (i = 1;i <= n - 1;i++)
{
for (j = 0;j <= s;j++)
{
if (*(p.argValue + i) == *(t.argValue + j))
{
break;
}
}
if (j == s + 1)
{
*(t.argValue + j) = *(p.argValue + i);
s++;
}
}
return s;
}
public static void Main()
{
int[] a = new int[300];
int[] b = new int[300];
int n;
int i;
int s;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
for (i = 0;i <= n - 1;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
a[i] = Integer.parseInt(tempVar2);
}
}
tangible.RefObject<Integer> tempRef_a = new tangible.RefObject<Integer>(a);
tangible.RefObject<Integer> tempRef_b = new tangible.RefObject<Integer>(b);
s = f(tempRef_a, tempRef_b, n);
b = tempRef_b.argValue;
a = tempRef_a.argValue;
for (i = 0;i <= s - 1;i++)
{
System.out.printf("%d,",b[i]);
}
System.out.printf("%d\n",b[s]);
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
714dd33750c11187be6c1fbb92ef75e8b927ab81
|
b6cb6042ee86edb3ee31ac364dea22b04f69f976
|
/src/ar/com/cognisys/sat/core/modelo/comun/planDePago/PlanDePago.java
|
53b33e85d45eeaa9dc546bfa9a861b4ca5ad378a
|
[] |
no_license
|
desarrollorusoft/CoreSat
|
6f925a9d756d222deffd41e5e32b8e4627cec596
|
7b61022035ac9898127d4116de2877cef49cabc3
|
refs/heads/main
| 2023-02-10T11:54:53.043347
| 2021-01-07T17:51:54
| 2021-01-07T17:51:54
| 327,682,365
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,447
|
java
|
package ar.com.cognisys.sat.core.modelo.comun.planDePago;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import ar.com.cognisys.sat.core.modelo.abstracto.Cuenta;
import ar.com.cognisys.sat.core.modelo.comun.simulacion.SimulacionPlanDePago;
import ar.com.cognisys.sat.core.modelo.enums.EstadoCuotaAVencer;
public class PlanDePago {
private List<CuotaAVencer> listaCuotasAVencer;
private TotalCuota totalCuotasAVencer;
private SimulacionPlanDePago simulacionPlanDePago;
private EstadoCuotaAVencer estadoCuotaAVencer;
private Cuenta cuenta;
public boolean tengoDatosConsulta() {
if (this.getListaCuotasAVencer() != null || this.getTotalCuotasAVencer() != null) {
return true;
}
return false;
}
public boolean tengoDatosResultado() {
if (this.getSimulacionPlanDePago() != null) {
return true;
}
return false;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((cuenta == null) ? 0 : cuenta.hashCode());
result = prime
* result
+ ((estadoCuotaAVencer == null) ? 0 : estadoCuotaAVencer
.hashCode());
result = prime
* result
+ ((listaCuotasAVencer == null) ? 0 : listaCuotasAVencer
.hashCode());
result = prime
* result
+ ((simulacionPlanDePago == null) ? 0 : simulacionPlanDePago
.hashCode());
result = prime
* result
+ ((totalCuotasAVencer == null) ? 0 : totalCuotasAVencer
.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PlanDePago other = (PlanDePago) obj;
if (cuenta == null) {
if (other.cuenta != null)
return false;
} else if (!cuenta.equals(other.cuenta))
return false;
if (estadoCuotaAVencer != other.estadoCuotaAVencer)
return false;
if (listaCuotasAVencer == null) {
if (other.listaCuotasAVencer != null)
return false;
} else if (!listaCuotasAVencer.equals(other.listaCuotasAVencer))
return false;
if (simulacionPlanDePago == null) {
if (other.simulacionPlanDePago != null)
return false;
} else if (!simulacionPlanDePago.equals(other.simulacionPlanDePago))
return false;
if (totalCuotasAVencer == null) {
if (other.totalCuotasAVencer != null)
return false;
} else if (!totalCuotasAVencer.equals(other.totalCuotasAVencer))
return false;
return true;
}
public List<CuotaAVencer> getListaCuotasAVencer() {
return listaCuotasAVencer;
}
public void setListaCuotasAVencer(List<CuotaAVencer> listaCuotasAVencer) {
this.listaCuotasAVencer = listaCuotasAVencer;
}
public TotalCuota getTotalCuotasAVencer() {
return totalCuotasAVencer;
}
public void setTotalCuotasAVencer(TotalCuota totalCuotasAVencer) {
this.totalCuotasAVencer = totalCuotasAVencer;
}
public SimulacionPlanDePago getSimulacionPlanDePago() {
return simulacionPlanDePago;
}
public void setSimulacionPlanDePago(SimulacionPlanDePago simulacionPlanDePago) {
this.simulacionPlanDePago = simulacionPlanDePago;
}
public EstadoCuotaAVencer getEstadoCuotaAVencer() {
return estadoCuotaAVencer;
}
public void setEstadoCuotaAVencer(EstadoCuotaAVencer estadoCuotaAVencer) {
this.estadoCuotaAVencer = estadoCuotaAVencer;
}
public List<DuplaCuotaAVencer> getListaDuplaAVencer() {
ArrayList<CuotaAVencer> auxList = new ArrayList<CuotaAVencer>();
auxList.addAll(listaCuotasAVencer);
Collections.sort(auxList);
return generarDuplas(auxList);
}
private List<DuplaCuotaAVencer> generarDuplas(List<CuotaAVencer> input) {
List<DuplaCuotaAVencer> output = new ArrayList<DuplaCuotaAVencer>();
Iterator<CuotaAVencer> it = input.iterator();
DuplaCuotaAVencer auxDupla = null;
while (it.hasNext()) {
CuotaAVencer c = it.next();
if (auxDupla == null){
auxDupla = new DuplaCuotaAVencer();
auxDupla.setCuotaAbl(c);
} else {
if (auxDupla.getCuotaAbl().getPeriodo().equals(c.getPeriodo())){
auxDupla.setCuotaProt(c);
output.add(auxDupla);
auxDupla = null;
} else {
output.add(auxDupla);
auxDupla = new DuplaCuotaAVencer();
auxDupla.setCuotaAbl(c);
}
}
}
return output;
}
public Cuenta getCuenta() {
return cuenta;
}
public void setCuenta(Cuenta cuenta) {
this.cuenta = cuenta;
}
}
|
[
"carlos_bocchio@rusoft.com.ar"
] |
carlos_bocchio@rusoft.com.ar
|
9c67d5bca161612e6dc5b0c89a694902073fff34
|
67ca5eb0f1b16375c3ec2b9e1dcc47acafbccc13
|
/Data/SpringDataJpaDemos/src/main/java/com/instil/entities/Course.java
|
0341da889d9d968b0cc663a630dd5128f5c23c88
|
[] |
no_license
|
SF3/Spring
|
3f3f41a02fc5e589d621dce8a0f670c3a3e902ff
|
b571c776c163942929eeb0c5a35e4f4bfabeb389
|
refs/heads/main
| 2023-06-10T07:58:02.011699
| 2021-07-01T09:45:29
| 2021-07-01T09:45:29
| 382,370,354
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,416
|
java
|
package com.instil.entities;
import javax.persistence.*;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial")
@Entity
@Table(name = "courses")
public class Course implements Serializable {
private List<Delivery> deliveries;
private ComputerSetup setup;
private String type;
private String number;
private String title;
@Column(name = "coursetype")
public String getType() {
return type;
}
public void setType(String name) {
this.type = name;
}
@Id()
@Column(name = "coursenum")
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
@Column(name = "coursetitle")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Embedded
public ComputerSetup getSetup() {
return setup;
}
public void setSetup(ComputerSetup setup) {
this.setup = setup;
}
@OneToMany(cascade = CascadeType.ALL)
@OrderColumn(name = "deliverynum")
@JoinColumn(name = "coursenum")
public List<Delivery> getDeliveries() {
return deliveries;
}
public void setDeliveries(List<Delivery> deliveries) {
this.deliveries = deliveries;
}
}
|
[
"garth.gilmour@instil.co"
] |
garth.gilmour@instil.co
|
e6a0de4dca8d80dd159b9fa1b7d14591c4b27caf
|
793c62c2034119829bf18e801ee1912a8b7905a7
|
/base/src/main/java/com/luolei/base/sort/SimpleSelectSort.java
|
98cd966ac2733e1fc501a7e1324778e7a14acbc6
|
[] |
no_license
|
askluolei/practice
|
5b087a40535b5fb038fb9aa25831d884476d27c9
|
044b13781bc876fd2472d7dfc3e709544d26c546
|
refs/heads/master
| 2021-09-10T15:15:58.199101
| 2018-03-28T09:17:57
| 2018-03-28T09:17:57
| 108,428,724
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,092
|
java
|
package com.luolei.base.sort;
import java.util.Random;
/**
*
* 作者:罗雷
* 日期:2015年4月22日
* 内容:简单选择排序
*/
public class SimpleSelectSort {
public static <T extends Comparable<T>> T[] genericsimpleselectionsort(T[] a){
for (int i = 0; i < a.length; i++) {
int min = i;
int j = i + 1;
while (j < a.length) {
if (a[j].compareTo(a[min])<0)
min = j;
j++;
}
T temp = a[i];
a[i] = a[min];
a[min] = temp;
}
return a;
}
public static void main(String[] args) {
Random random=new Random(47);
int n=20;
Integer[] a=new Integer[n];
for (int i = 0; i < a.length; i++) {
a[i]=random.nextInt(100);
System.out.print(a[i]+" ");
}
System.out.println();
Integer[] b=SimpleSelectSort.genericsimpleselectionsort(a);
for (int i = 0; i < b.length; i++) {
System.out.print(b[i]+" ");
}
}
}
|
[
"askluolei@gmail.com"
] |
askluolei@gmail.com
|
ac08e5d4d68951dd540a23c0e84b1790fd4cc1c8
|
ff5f00be10ef21710493902d0ad334c556ac1221
|
/ei.iih-impl/src/main/java/ei/cis/service/impl/CisMzClinicRoomConfigServiceImpl.java
|
ec32d4b037e3f2c0d5dad52be5fbeb672d9c80f6
|
[] |
no_license
|
sun-wangbaiyu/emr-code
|
2ed323a682f42db1ce3c3c61c7680de2f80d6290
|
034f2a6a969b55ff97c8b8cdaff1e0c0615a0dc7
|
refs/heads/master
| 2020-05-16T09:14:30.758529
| 2017-11-19T03:31:40
| 2017-11-19T03:31:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 574
|
java
|
package ei.cis.service.impl;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import ei.cis.db.dao.CisMzClinicRoomConfigDao;
import ei.cis.service.CisMzClinicRoomConfigService;
public class CisMzClinicRoomConfigServiceImpl implements CisMzClinicRoomConfigService
{
@Autowired
CisMzClinicRoomConfigDao cisMzClinicRoomConfigDao;
@Override
public List<Map<String, Object>> searchDeptByIp(String ip)
{
return cisMzClinicRoomConfigDao.selectOrgByIp(ip);
}
}
|
[
"149516374@qq.com"
] |
149516374@qq.com
|
93af50788bbcc49cbde1338d9a6b3b765259916a
|
d8a1ed6b1514127504eb0e965d9608fa730d05f7
|
/src/main/java/com/dp2/writer/impl/XlsxWriter.java
|
72a42077a1e82cae70c539245b7e5b1b6c62d504
|
[
"MIT"
] |
permissive
|
qinkunjia/dp2
|
90fd07e5f8d639da08c7d44a8b815a61ebd8b603
|
53e5073bd6e0f6e0f216c765238b05131c95ded8
|
refs/heads/master
| 2023-05-06T04:53:55.966368
| 2021-05-29T14:41:50
| 2021-05-29T14:41:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,248
|
java
|
package com.dp2.writer.impl;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import com.dp2.ParserFactory;
import com.dp2.util.Types;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import com.dp2.node.INode;
import com.dp2.util.IOUtil;
import com.dp2.writer.AbstractWriter;
/**
* xlsx文件写入
*
* @author 6tail
*
*/
public class XlsxWriter extends AbstractWriter{
/** xlsx工作簿 */
private SXSSFWorkbook workbook;
/** 轻量的xlsx工作簿 */
private XSSFWorkbook lightWorkbook;
/** xlsx Sheet */
private Sheet sheet;
/** 是否轻量 */
private boolean light;
public XlsxWriter(File file){
super(file);
}
public void load() throws IOException{
lightWorkbook = new XSSFWorkbook(new FileInputStream(file));
light = file != ParserFactory.EMPTY_TEMPLATE_FILES.get(Types.XLSX);
if(light){
sheet = lightWorkbook.getSheetAt(0);
}else{
workbook = new SXSSFWorkbook(lightWorkbook,500);
sheet = workbook.getSheetAt(0);
}
}
public void write(int row,int col,INode node){
String value = node.getValue();
if(null==value){
return;
}
Row line = sheet.getRow(row);
if(null==line){
line = sheet.createRow(row);
}
Cell cell = line.getCell(col);
if(null==cell){
cell = line.createCell(col);
}
switch(node.getType()){
case number:
cell.setCellType(XSSFCell.CELL_TYPE_NUMERIC);
try{
cell.setCellValue(Double.parseDouble(value));
}catch(Exception e){
cell.setCellValue(value);
}
break;
default:
cell.setCellValue(value);
break;
}
}
public void save(File file) throws IOException{
FileOutputStream os = null;
try{
os = new FileOutputStream(file);
if(light){
lightWorkbook.write(os);
}else {
workbook.write(os);
}
os.flush();
}finally{
IOUtil.closeQuietly(os);
}
}
}
|
[
"6tail@6tail.cn"
] |
6tail@6tail.cn
|
50a56915a78913d3d02f5c56a21f3745801c77ad
|
25d3cd4b2c460c2275d1558aeb2814c2c9b3097c
|
/emily-spring-boot-autoconfigure/src/main/java/com/emily/framework/autoconfigure/initializers/EmilyApplicationContextInitializer.java
|
2cd85f070a216d173802530b0267e17ead3e5e33
|
[] |
no_license
|
Scan-jha/spring-parent
|
dad93ff0acb628b1c0325e61c692e028c80cb4e4
|
acdd0ef70428b25c1a7346dce9ca8d4f62915e0a
|
refs/heads/master
| 2023-04-03T04:00:34.284731
| 2021-04-09T03:06:55
| 2021-04-09T03:06:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,393
|
java
|
package com.emily.framework.autoconfigure.initializers;
import com.emily.framework.common.enums.DateFormatEnum;
import com.emily.framework.common.utils.date.DateUtils;
import com.emily.framework.common.utils.log.LoggerUtils;
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.Ordered;
import java.util.Date;
/**
* @program: spring-parent
* @description: 小米粒框架初始化器
* @create: 2020/09/22
*/
public class EmilyApplicationContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext>, Ordered {
@Override
public int getOrder() {
return Ordered.HIGHEST_PRECEDENCE + 1;
}
@Override
public void initialize(ConfigurableApplicationContext applicationContext) {
if(applicationContext instanceof AnnotationConfigServletWebServerApplicationContext){
LoggerUtils.info(EmilyApplicationContextInitializer.class, "Emily【小米粒】初始化器开始初始化IOC容器了,容器名为:" +
applicationContext.getClass().getSimpleName() + "--当前时间是:" + DateUtils.formatDate(new Date(), DateFormatEnum.YYYY_MM_DD_HH_MM_SS.getFormat()));
}
}
}
|
[
"mingyang@eastmoney.com"
] |
mingyang@eastmoney.com
|
5b3f736038db2819dffa253c28ba4bb53ff1eb8b
|
f1b65f6ace564ef496ae97c237763a1e282b2189
|
/tis-console/src/main/java/com/qlangtech/tis/manage/common/IUser.java
|
92a825317b5990ed884d04831a4d679d1d9d2e8c
|
[
"MIT"
] |
permissive
|
fightingyuman/tis-solr
|
27b65d3e4a89612ea9087a0f260a8c0a89b7f640
|
8655db7c32bb88928b931e2754291deb0e4ab4db
|
refs/heads/master
| 2022-04-04T08:26:23.438875
| 2020-01-02T13:04:51
| 2020-01-02T13:04:51
| 258,164,459
| 1
| 0
|
MIT
| 2020-04-23T10:09:51
| 2020-04-23T10:09:51
| null |
UTF-8
|
Java
| false
| false
| 1,886
|
java
|
/*
* The MIT License
*
* Copyright (c) 2018-2022, qinglangtech Ltd
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.qlangtech.tis.manage.common;
import com.qlangtech.tis.manage.biz.dal.pojo.UsrDptRelation;
import com.qlangtech.tis.manage.common.apps.IAppsFetcher;
/* *
* @author 百岁(baisui@qlangtech.com)
* @date 2019年1月17日
*/
public interface IUser {
public UsrDptRelation getUsr();
public boolean hasLogin();
public abstract String getWangwang();
public abstract void setWangwang(String wangwang);
public abstract String getEmail();
public abstract void setEmail(String email);
public abstract String getId();
public abstract String getName();
public IAppsFetcher getAppsFetcher();
public boolean hasGrantAuthority(String func);
public Integer getDepartmentid();
}
|
[
"baisui@2dfire.com"
] |
baisui@2dfire.com
|
4e1bc599dd11513e5c92315d301868e9f643b7eb
|
ff90aedaff2b3adab50e68b2f3eef3a74f3f2b0d
|
/src/com/google/android/gms/internal/ads/zzxp.java
|
c572f56a1ff282db33b9f4cb9fadc51416de3547
|
[] |
no_license
|
rrabit42/Malware_Project_EWHA
|
cf81ab0d6cdc64cf0fb722e9427f7307da3689ab
|
3865c1c393a9873915ec07389afb799573d5d135
|
refs/heads/master
| 2020-11-24T06:42:17.435890
| 2019-12-16T20:48:04
| 2019-12-16T20:48:04
| 228,010,763
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,613
|
java
|
package com.google.android.gms.internal.ads;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
public final class zzxp extends zzej implements zzxn {
zzxp(IBinder paramIBinder) { super(paramIBinder, "com.google.android.gms.ads.internal.mediation.client.IAdapterCreator"); }
public final zzxq zzbm(String paramString) throws RemoteException {
Parcel parcel = obtainAndWriteInterfaceToken();
parcel.writeString(paramString);
parcel = transactAndReadException(1, parcel);
zzxs zzxs = parcel.readStrongBinder();
if (zzxs == null) {
zzxs = null;
} else {
zzxq zzxq;
IInterface iInterface = zzxs.queryLocalInterface("com.google.android.gms.ads.internal.mediation.client.IMediationAdapter");
if (iInterface instanceof zzxq) {
zzxq = (zzxq)iInterface;
} else {
zzxs = new zzxs(zzxq);
}
}
parcel.recycle();
return zzxs;
}
public final boolean zzbn(String paramString) throws RemoteException {
Parcel parcel2 = obtainAndWriteInterfaceToken();
parcel2.writeString(paramString);
Parcel parcel1 = transactAndReadException(2, parcel2);
boolean bool = zzel.zza(parcel1);
parcel1.recycle();
return bool;
}
public final zzzj zzbq(String paramString) throws RemoteException {
Parcel parcel2 = obtainAndWriteInterfaceToken();
parcel2.writeString(paramString);
Parcel parcel1 = transactAndReadException(3, parcel2);
zzzj zzzj = zzzk.zzt(parcel1.readStrongBinder());
parcel1.recycle();
return zzzj;
}
}
|
[
"gegiraffe@gmail.com"
] |
gegiraffe@gmail.com
|
38b0cb8a75c10ddccd280d189080672a65d563f7
|
93408941ff5990d3ae1dff2facfb7a0fa515c0e0
|
/service_client_common_src_business/com/path/vo/core/iisitems/ItemsCO.java
|
8d10686c1a7fca296b3d31035e1de12a1b234ae8
|
[] |
no_license
|
aleemkhowaja/imal_common_business_code
|
d210d4e585095d1a27ffb85912bc787eb5552a37
|
1b34da83d546ca1bad02788763dc927bcb3237b0
|
refs/heads/master
| 2023-02-17T09:58:24.419658
| 2021-01-11T07:10:34
| 2021-01-11T07:10:34
| 328,573,717
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,890
|
java
|
package com.path.vo.core.iisitems;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.path.dbmaps.vo.CURRENCIESVO;
import com.path.dbmaps.vo.TRS_ITEMSVO;
import com.path.dbmaps.vo.TRS_ITEM_CATEGORYVO;
import com.path.lib.vo.BaseVO;
public class ItemsCO extends BaseVO implements Serializable
{
// Lookup Details
private TRS_ITEMSVO trsitemsvo;
private TRS_ITEM_CATEGORYVO trsitemscategoryvo;
private CURRENCIESVO currenciesvo;
// /sankar
private BigDecimal currencyCode;
private Date valueDate;
private BigDecimal unit_price;
private BigDecimal weight;
private BigDecimal amount;
private BigDecimal financing_percent;
private BigDecimal financing_amount;
private BigDecimal ldec_financing_perc;
private BigDecimal purchase_Party;
private BigDecimal gold_Type;
private String jewellry;
private String value_Of_Surety;
private BigDecimal jewellPropertyCode;
private BigDecimal valueofSuretyPropertyCode;
private BigDecimal pieces;
private BigDecimal idec_max_financing_percentage;
public BigDecimal getIdec_max_financing_percentage()
{
return idec_max_financing_percentage;
}
public void setIdec_max_financing_percentage(BigDecimal idecMaxFinancingPercentage)
{
idec_max_financing_percentage = idecMaxFinancingPercentage;
}
public BigDecimal getLdec_financing_perc()
{
return ldec_financing_perc;
}
public void setLdec_financing_perc(BigDecimal ldecFinancingPerc)
{
ldec_financing_perc = ldecFinancingPerc;
}
public BigDecimal getWeight()
{
return weight;
}
public void setWeight(BigDecimal weight)
{
this.weight = weight;
}
public BigDecimal getAmount()
{
return amount;
}
public void setAmount(BigDecimal amount)
{
this.amount = amount;
}
public BigDecimal getFinancing_percent()
{
return financing_percent;
}
public void setFinancing_percent(BigDecimal financingPercent)
{
financing_percent = financingPercent;
}
public BigDecimal getFinancing_amount()
{
return financing_amount;
}
public void setFinancing_amount(BigDecimal financingAmount)
{
financing_amount = financingAmount;
}
public BigDecimal getUnit_price()
{
return unit_price;
}
public void setUnit_price(BigDecimal unitPrice)
{
unit_price = unitPrice;
}
public void setTrsitemsvo(TRS_ITEMSVO trsitemsvo)
{
this.trsitemsvo = trsitemsvo;
}
public TRS_ITEMSVO getTrsitemsvo()
{
return trsitemsvo;
}
public void setTrsitemscategoryvo(TRS_ITEM_CATEGORYVO trsitemscategoryvo)
{
this.trsitemscategoryvo = trsitemscategoryvo;
}
public TRS_ITEM_CATEGORYVO getTrsitemscategoryvo()
{
return trsitemscategoryvo;
}
public void setCurrenciesvo(CURRENCIESVO currenciesvo)
{
this.currenciesvo = currenciesvo;
}
public CURRENCIESVO getCurrenciesvo()
{
return currenciesvo;
}
public void setCurrencyCode(BigDecimal currencyCode)
{
this.currencyCode = currencyCode;
}
public BigDecimal getCurrencyCode()
{
return currencyCode;
}
public void setValueDate(Date valueDate)
{
this.valueDate = valueDate;
}
public Date getValueDate()
{
return valueDate;
}
public BigDecimal getPurchase_Party()
{
return purchase_Party;
}
public void setPurchase_Party(BigDecimal purchaseParty)
{
purchase_Party = purchaseParty;
}
public BigDecimal getGold_Type()
{
return gold_Type;
}
public void setGold_Type(BigDecimal goldType)
{
gold_Type = goldType;
}
public String getJewellry()
{
return jewellry;
}
public void setJewellry(String jewellry)
{
this.jewellry = jewellry;
}
public String getValue_Of_Surety()
{
return value_Of_Surety;
}
public void setValue_Of_Surety(String valueOfSurety)
{
value_Of_Surety = valueOfSurety;
}
public BigDecimal getPieces()
{
return pieces;
}
public void setPieces(BigDecimal pieces)
{
this.pieces = pieces;
}
public BigDecimal getJewellPropertyCode()
{
return jewellPropertyCode;
}
public void setJewellPropertyCode(BigDecimal jewellPropertyCode)
{
this.jewellPropertyCode = jewellPropertyCode;
}
public BigDecimal getValueofSuretyPropertyCode()
{
return valueofSuretyPropertyCode;
}
public void setValueofSuretyPropertyCode(BigDecimal valueofSuretyPropertyCode)
{
this.valueofSuretyPropertyCode = valueofSuretyPropertyCode;
}
}
|
[
"aleem2k11@gmail.com"
] |
aleem2k11@gmail.com
|
2c7745271ec32ef627918a2a0384efad52dcdcce
|
91adc264eb26be39c656f054005ec740d07900bd
|
/tc_project/tciuforep/src/client/com/ufsoft/report/checkbox/TreeCheckingEvent.java
|
9c431685c266f413b01a87d6fa6495c2b067fabc
|
[] |
no_license
|
xhrise/nc-workspaces
|
9f30caf273e932bd1b4c2d419ac6bef4ef55e1cc
|
d5fcbce810ba4d4b5405edabfb5a26c36a19e7f8
|
refs/heads/master
| 2020-05-19T10:43:29.058686
| 2013-06-20T02:40:27
| 2013-06-20T02:40:27
| 37,459,512
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 503
|
java
|
package com.ufsoft.report.checkbox;
import java.util.EventObject;
import javax.swing.tree.TreePath;
public class TreeCheckingEvent extends EventObject {
/** Paths this event represents. */
protected TreePath leadingPath;
/**
* Returns the paths that have been added or removed from the selection.
*/
public TreePath getLeadingPath() {
return this.leadingPath;
}
public TreeCheckingEvent(TreePath path) {
super(path);
this.leadingPath = path;
}
}
|
[
"comicme_yanghe@126.com"
] |
comicme_yanghe@126.com
|
335c87356c794e0026bfd52d7879f90cd67298dd
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.ocms-OCMS/sources/com/google/common/collect/ImmutableEntry.java
|
14fefd83c77b7c841016610af1e6867c4bea0bab
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 1,106
|
java
|
package com.google.common.collect;
import com.google.common.annotations.GwtCompatible;
import java.io.Serializable;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/* access modifiers changed from: package-private */
@GwtCompatible(serializable = true)
public class ImmutableEntry<K, V> extends AbstractMapEntry<K, V> implements Serializable {
private static final long serialVersionUID = 0;
@NullableDecl
final K key;
@NullableDecl
final V value;
ImmutableEntry(@NullableDecl K k, @NullableDecl V v) {
this.key = k;
this.value = v;
}
@Override // com.google.common.collect.AbstractMapEntry, java.util.Map.Entry
@NullableDecl
public final K getKey() {
return this.key;
}
@Override // com.google.common.collect.AbstractMapEntry, java.util.Map.Entry
@NullableDecl
public final V getValue() {
return this.value;
}
@Override // com.google.common.collect.AbstractMapEntry, java.util.Map.Entry
public final V setValue(V v) {
throw new UnsupportedOperationException();
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
d2e5392ff3e1ddaddf16b989d8f24b81ce8ae1cc
|
4e25ddf54bd76d5c3f46d34e5b957707d4d257f1
|
/wicket-quickview-examples/src/main/java/com/aplombee/examples/QuickGridViewWithAjaxLink.java
|
42d1a81df3e7c097c479bd53d6912813e04812a5
|
[
"Apache-2.0"
] |
permissive
|
vineetsemwal/quickview
|
d18b3d9cb7bd77785e7500e2b554a411106101b2
|
53e971a0d275bbf3c33eb7aa1f3407cb612d06b2
|
refs/heads/master
| 2021-01-17T15:01:08.795095
| 2019-05-08T07:22:19
| 2019-05-08T07:22:19
| 4,959,580
| 10
| 3
| null | 2015-08-14T10:21:40
| 2012-07-09T14:49:34
|
Java
|
UTF-8
|
Java
| false
| false
| 3,985
|
java
|
/**
*
Copyright 2012 Vineet Semwal
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.aplombee.examples;
import com.aplombee.ItemsNavigationStrategy;
import com.aplombee.QuickGridView;
import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.EmptyPanel;
import org.apache.wicket.markup.repeater.data.IDataProvider;
import org.apache.wicket.markup.repeater.data.ListDataProvider;
import java.util.ArrayList;
import java.util.List;
/**
* QuickGridView with AjaxLink
*
* @author Vineet Semwal
*/
public class QuickGridViewWithAjaxLink extends WebPage {
private List<Integer> list = new ArrayList<Integer>();
public QuickGridViewWithAjaxLink() {
for (int i = 0; i < 10; i++) {
list.add(i);
}
}
@Override
protected void onInitialize() {
super.onInitialize();
IDataProvider<Integer> data = new ListDataProvider<Integer>(list);
WebMarkupContainer numbers = new WebMarkupContainer("numbers"); //parent for quickview
numbers.setOutputMarkupPlaceholderTag(true); //needed for ajax
Component start,end;
numbers.add(start=new EmptyPanel("start").setOutputMarkupPlaceholderTag(true));
numbers.add(end=new EmptyPanel("end").setOutputMarkupPlaceholderTag(true)) ;
final QuickGridView<Integer> number = new QuickGridView<Integer>("number", data,new ItemsNavigationStrategy() ,start,end) {
@Override
protected void populate(CellItem<Integer> item) {
item.add(new Label("display", item.getModel()));
}
@Override
protected void populateEmptyItem(CellItem<Integer> item) {
item.add(new Label("display"));
}
};
number.setColumns(2);
numbers.add(number);
add(numbers);
AjaxLink addLink = new AjaxLink<Void>("addLink") {
@Override
public void onClick(AjaxRequestTarget target) {
int newObject=list.get(list.size()-1) +1;
list.add( newObject);
int newObject2=list.get(list.size()-1) +1;
list.add(newObject2);
List<Integer>newOnes=new ArrayList<Integer>();
newOnes.add(newObject);
newOnes.add(newObject2);
number.addRows(newOnes.iterator());//just enough to add new rows and respective cells
}
};
addLink.setOutputMarkupPlaceholderTag(true);
add(addLink);
AjaxLink addAtStartLink = new AjaxLink<Void>("addAtStartLink") {
@Override
public void onClick(AjaxRequestTarget target) {
int newObject=list.get(0) -1;
list.add(0, newObject);
int newObject2=newObject -1;
list.add(0, newObject2);
List<Integer>newOnes=new ArrayList<Integer>();
newOnes.add(newObject2);
newOnes.add(newObject);
number.addRowsAtStart(newOnes.iterator());//just enough to add new rows and corresponding cells
}
};
addAtStartLink.setOutputMarkupPlaceholderTag(true);
add(addAtStartLink);
}
}
|
[
"vineetsemwal82@gmail.com"
] |
vineetsemwal82@gmail.com
|
384bd251b29bc86a137a5c1945ade9824e20bcd1
|
92f10c41bad09bee05acbcb952095c31ba41c57b
|
/app/src/main/java/io/github/alula/ohmygod/MainActivity3571.java
|
c7e5b2dcd7124a0466943505cf35994231918deb
|
[] |
no_license
|
alula/10000-activities
|
bb25be9aead3d3d2ea9f9ef8d1da4c8dff1a7c62
|
f7e8de658c3684035e566788693726f250170d98
|
refs/heads/master
| 2022-07-30T05:54:54.783531
| 2022-01-29T19:53:04
| 2022-01-29T19:53:04
| 453,501,018
| 16
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 339
|
java
|
package io.github.alula.ohmygod;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity3571 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
|
[
"6276139+alula@users.noreply.github.com"
] |
6276139+alula@users.noreply.github.com
|
c3c4f15be650fd161a6f276d25261e97a355955c
|
47615faf90f578bdad1fde4ef3edae469d995358
|
/practise/SCJP Java 5 專業認證手冊/第一次練習/chapter 6/StringBuilderTest2.java
|
7ea2db364fce842c7d86e7483b6d0502c27f26e9
|
[] |
no_license
|
hungmans6779/JavaWork-student-practice
|
dca527895e7dbb37aa157784f96658c90cbcf3bd
|
9473ca55c22f30f63fcd1d84c2559b9c609d5829
|
refs/heads/master
| 2020-04-14T01:26:54.467903
| 2018-12-30T04:52:38
| 2018-12-30T04:52:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 198
|
java
|
public class StringBuilderTest2
{
public static void main(String argv[])
{
StringBuilder sb=new StringBuilder("abc");
sb.append("def").reverse().insert(3,"---");
System.out.println(sb);
}
}
|
[
"hungmans6779@msn.com"
] |
hungmans6779@msn.com
|
f5b00d2811fb8b600227b698dcb6b1db9cea6f6e
|
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
|
/MarketBusinessInterface/src/main/java/com/newco/marketplace/business/iBusiness/tier/performance/IPerformanceEvaluationFetchService.java
|
a15a46203c1dd18c9f7494bcdbbfb26e28e568c5
|
[] |
no_license
|
ssriha0/sl-b2b-platform
|
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
|
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
|
refs/heads/master
| 2023-01-06T18:32:24.623256
| 2020-11-05T12:23:26
| 2020-11-05T12:23:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 591
|
java
|
package com.newco.marketplace.business.iBusiness.tier.performance;
import java.util.List;
import com.newco.marketplace.exception.core.BusinessServiceException;
import com.servicelive.domain.tier.performance.vo.PerformanceVO;
public interface IPerformanceEvaluationFetchService {
/**
* Get the performance values for the selected criteria
* @param providerIds
* @param criteria
* @return
* @throws BusinessServiceException
*/
public List<PerformanceVO> getPerformaceValues(List<String> providerIds,String criteria) throws BusinessServiceException;
}
|
[
"Kunal.Pise@transformco.com"
] |
Kunal.Pise@transformco.com
|
8adf677aef3e903704949a1b597e8083bb1dcd9e
|
111209d369157dbcca1d01056623c27f3cecc9d7
|
/CohesiveAppServer/CohesiveBackend/CohesiveBusiness-ejb/src/java/com/ibd/cohesive/app/business/student/summary/studentexamschedule/StudentExamScheduleResult.java
|
6694686b7bd981e64d19edb174279b897f9d1fe3
|
[] |
no_license
|
IBD-Technologies/NewGenEducationApp
|
d3c1768316c091ade0bda050fdfc1dfe66aa5070
|
7e27094a635782ebd8c0a940b614485c52fe63d3
|
refs/heads/master
| 2021-05-19T11:30:04.032333
| 2020-06-12T17:35:22
| 2020-06-12T17:35:22
| 251,661,845
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,484
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.ibd.cohesive.app.business.student.summary.studentexamschedule;
/**
*
* @author DELL
*/
public class StudentExamScheduleResult {
String studentID;
String exam;
String makerID;
String checkerID;
String makerDateStamp;
String checkerDateStamp;
String recordStatus;
String authStatus;
String versionNumber;
String makerRemarks;
String checkerRemarks;
public String getStudentID() {
return studentID;
}
public void setStudentID(String studentID) {
this.studentID = studentID;
}
public String getExam() {
return exam;
}
public void setExam(String exam) {
this.exam = exam;
}
public String getMakerID() {
return makerID;
}
public void setMakerID(String makerID) {
this.makerID = makerID;
}
public String getCheckerID() {
return checkerID;
}
public void setCheckerID(String checkerID) {
this.checkerID = checkerID;
}
public String getMakerDateStamp() {
return makerDateStamp;
}
public void setMakerDateStamp(String makerDateStamp) {
this.makerDateStamp = makerDateStamp;
}
public String getCheckerDateStamp() {
return checkerDateStamp;
}
public void setCheckerDateStamp(String checkerDateStamp) {
this.checkerDateStamp = checkerDateStamp;
}
public String getRecordStatus() {
return recordStatus;
}
public void setRecordStatus(String recordStatus) {
this.recordStatus = recordStatus;
}
public String getAuthStatus() {
return authStatus;
}
public void setAuthStatus(String authStatus) {
this.authStatus = authStatus;
}
public String getVersionNumber() {
return versionNumber;
}
public void setVersionNumber(String versionNumber) {
this.versionNumber = versionNumber;
}
public String getMakerRemarks() {
return makerRemarks;
}
public void setMakerRemarks(String makerRemarks) {
this.makerRemarks = makerRemarks;
}
public String getCheckerRemarks() {
return checkerRemarks;
}
public void setCheckerRemarks(String checkerRemarks) {
this.checkerRemarks = checkerRemarks;
}
}
|
[
"60004888+RajkumarIBD@users.noreply.github.com"
] |
60004888+RajkumarIBD@users.noreply.github.com
|
5b8dcf1b839322d439cb162eee988dfe31dfdfb7
|
e30d126d952bdabf7fc316347a7a6ee643d7858b
|
/spring-demo/6-invite-application-context/src/main/java/com/tyy/ioc/beans/factory/AutowireCapableBeanFactory.java
|
c8594c7adbfaa1b2398543f46ce034079eefbdac
|
[] |
no_license
|
yytang26/spring
|
4daae0a5028f9a013ce59bc069d2129c943b0122
|
ce0e49f8177d2f902205bfc188c71b140bd0e5ac
|
refs/heads/master
| 2023-08-10T17:19:42.234981
| 2021-09-13T12:43:19
| 2021-09-13T12:43:19
| 405,968,057
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,178
|
java
|
package com.tyy.ioc.beans.factory;
import com.tyy.ioc.beans.BeanDefinition;
import com.tyy.ioc.beans.PropertyValue;
import com.tyy.ioc.BeanReference;
import java.lang.reflect.Field;
public class AutowireCapableBeanFactory extends AbstractBeanFactory {
@Override
protected Object doCreateBean(BeanDefinition beanDefinition) throws Exception {
Object bean = createBeanInstance(beanDefinition);
beanDefinition.setBean(bean);
applyPropertyValues(bean, beanDefinition);
return bean;
}
protected Object createBeanInstance(BeanDefinition beanDefinition) throws Exception {
return beanDefinition.getBeanClass().newInstance();
}
protected void applyPropertyValues(Object bean, BeanDefinition mbd) throws Exception {
for (PropertyValue propertyValue : mbd.getPropertyValues().getPropertyValues()) {
Field declaredField = bean.getClass().getDeclaredField(propertyValue.getName());
declaredField.setAccessible(true);
Object value = propertyValue.getValue();
if (value instanceof BeanReference) {
BeanReference beanReference = (BeanReference) value;
value = getBean(beanReference.getName());
}
declaredField.set(bean, value);
}
}
}
|
[
"yytangtangyy@outlook.com"
] |
yytangtangyy@outlook.com
|
d7d674fb04a57ab6a1bf03ed84209a3ebaff3e70
|
642057b61201fedcf895584175e47572bc6f53fd
|
/src/test/java/io/geekshop/config/asset/DefaultAssetNamingStrategyTest.java
|
8e0368be07e5d23cc04122af2a3d7fa04d2b2a08
|
[
"MIT"
] |
permissive
|
jjnnzb/geekshop
|
cd27eb6c42cbad3225f5c0582b0b25cfd944029e
|
1cbc352b78de89f3a1db9e9c730b82dff850ea93
|
refs/heads/main
| 2023-02-12T15:59:49.326677
| 2021-01-12T10:01:38
| 2021-01-12T10:01:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,841
|
java
|
/*
* Copyright (c) 2020 GeekXYZ.
* All rights reserved.
*/
package io.geekshop.config.asset;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Created on Nov, 2020 by @author bobo
*/
public class DefaultAssetNamingStrategyTest {
/**
* generateSourceFileName test suite
*/
@Test
public void normalizes_file_names() {
AssetNamingStrategy strategy = new DefaultAssetNamingStrategy();
assertThat(strategy.generateSourceFileName("foo.jpg", null))
.isEqualTo("foo.jpg");
assertThat(strategy.generateSourceFileName("curaçao.jpg", null))
.isEqualTo("curacao.jpg");
assertThat(strategy.generateSourceFileName("dấu hỏi.jpg", null))
.isEqualTo("dau-hoi.jpg");
}
@Test
public void increments_conflicting_file_names() {
AssetNamingStrategy strategy = new DefaultAssetNamingStrategy();
assertThat(strategy.generateSourceFileName("foo.jpg", "foo.jpg"))
.isEqualTo("foo__02.jpg");
assertThat(strategy.generateSourceFileName("foo.jpg", "foo__02.jpg"))
.isEqualTo("foo__03.jpg");
assertThat(strategy.generateSourceFileName("foo.jpg", "foo__09.jpg"))
.isEqualTo("foo__10.jpg");
assertThat(strategy.generateSourceFileName("foo.jpg", "foo__99.jpg"))
.isEqualTo("foo__100.jpg");
assertThat(strategy.generateSourceFileName("foo.jpg", "foo__999.jpg"))
.isEqualTo("foo__1000.jpg");
}
@Test
public void increments_conflicting_file_names_with_no_extension() {
AssetNamingStrategy strategy = new DefaultAssetNamingStrategy();
assertThat(strategy.generateSourceFileName(
"ext45000000000505", "ext45000000000505"))
.isEqualTo("ext45000000000505__02");
assertThat(strategy.generateSourceFileName(
"ext45000000000505", "ext45000000000505__02"))
.isEqualTo("ext45000000000505__03");
assertThat(strategy.generateSourceFileName(
"ext45000000000505", "ext45000000000505__09"))
.isEqualTo("ext45000000000505__10");
}
/**
* generatePreviewFileName test suite
*/
@Test
public void adds_the_preview_suffix() {
AssetNamingStrategy strategy = new DefaultAssetNamingStrategy();
assertThat(strategy.generatePreviewFileName(
"foo.jpg", null)).isEqualTo("foo__preview.jpg");
}
@Test
public void preserves_the_extension_of_supported_image_files() {
AssetNamingStrategy strategy = new DefaultAssetNamingStrategy();
assertThat(strategy.generatePreviewFileName(
"foo.jpg", null)).isEqualTo("foo__preview.jpg");
assertThat(strategy.generatePreviewFileName(
"foo.jpeg", null)).isEqualTo("foo__preview.jpeg");
assertThat(strategy.generatePreviewFileName(
"foo.png", null)).isEqualTo("foo__preview.png");
assertThat(strategy.generatePreviewFileName(
"foo.webp", null)).isEqualTo("foo__preview.webp");
assertThat(strategy.generatePreviewFileName(
"foo.tiff", null)).isEqualTo("foo__preview.tiff");
}
@Test
public void adds_a_png_extension_for_unsupported_images_and_other_files() {
AssetNamingStrategy strategy = new DefaultAssetNamingStrategy();
assertThat(strategy.generatePreviewFileName(
"foo.svg", null)).isEqualTo("foo__preview.svg.png");
assertThat(strategy.generatePreviewFileName(
"foo.gif", null)).isEqualTo("foo__preview.gif.png");
assertThat(strategy.generatePreviewFileName(
"foo.pdf", null)).isEqualTo("foo__preview.pdf.png");
}
}
|
[
"bobo@spring2go.com"
] |
bobo@spring2go.com
|
ae1bfc849aa3502f2449dc7f15cc7ef6d37f931d
|
c53eff0794037b9dde61cfe31d972f6d07799338
|
/Mage.Sets/src/mage/cards/m/MillenniumFalcon.java
|
d82b39f63a921d01c3f307c1195ec5ac99b29212
|
[] |
no_license
|
theelk801/mage
|
0cd1c942c54e204db03a7e1603c4250c58a65f9f
|
9a59d801200f327d9f01b4086d0e979d263c095d
|
refs/heads/master
| 2022-11-11T13:02:45.533594
| 2018-04-24T12:35:37
| 2018-04-24T12:35:37
| 98,135,127
| 3
| 0
| null | 2018-04-24T12:35:38
| 2017-07-24T00:54:07
|
Java
|
UTF-8
|
Java
| false
| false
| 3,305
|
java
|
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.HexproofAbility;
import mage.abilities.keyword.SpaceflightAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SuperType;
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
/**
*
* @author Styxo
*/
public class MillenniumFalcon extends CardImpl {
public MillenniumFalcon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{G}{G}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.STARSHIP);
this.power = new MageInt(5);
this.toughness = new MageInt(4);
// Flash
this.addAbility(FlashAbility.getInstance());
// Spaceflight
this.addAbility(SpaceflightAbility.getInstance());
// When Millennium Falcon enters the battlefield, creatures you control gain hexproof until end of turn.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, FILTER_PERMANENT_CREATURES)));
}
public MillenniumFalcon(final MillenniumFalcon card) {
super(card);
}
@Override
public MillenniumFalcon copy() {
return new MillenniumFalcon(this);
}
}
|
[
"theelk801@gmail.com"
] |
theelk801@gmail.com
|
e0ae330d2342f6c87530ce64cf000d00572cb892
|
64f9f95eb82a913d49bb752cd737635498bd1596
|
/android/app/src/main/java/com/homekart_2912/MainActivity.java
|
1e18cf7b86d4fa4e3ba309e931713d2553c1d4f5
|
[] |
no_license
|
crowdbotics-apps/homekart-2912
|
a912cd10242c25106d925e9f52904f1f36dc74d4
|
05ed65da680ec0bdb6aa0abbb12c40faeb3a5455
|
refs/heads/master
| 2020-05-18T10:58:08.807877
| 2019-05-01T03:36:02
| 2019-05-01T03:36:02
| 184,364,698
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 371
|
java
|
package com.homekart_2912;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "homekart_2912";
}
}
|
[
"team@crowdbotics.com"
] |
team@crowdbotics.com
|
a8df35d4b86d359081234a29ca138925ad043f73
|
8d20b86041704b4156dff228017ab028c35ad7d3
|
/DynaFormApp-RegistrationDetails/src/com/nt/servlet/SecondServlet.java
|
a5ba8f2ca5db4d6890c4819e5e17a9d278733e80
|
[] |
no_license
|
nerdseeker365/Servlet1110
|
dbf57520ac60ca264a35db010d5e89b2f84287ec
|
54ae63479a2409faa097bfa49930a73df914adf1
|
refs/heads/master
| 2022-03-19T12:16:01.834439
| 2019-11-20T16:54:53
| 2019-11-20T16:54:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,375
|
java
|
package com.nt.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/secondurl")
public class SecondServlet extends HttpServlet {
@Override
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
PrintWriter pw=null;
String name=null,ms=null;
String age=null;
String f2val1=null,f2val2=null;
//general settings
pw=res.getWriter();
res.setContentType("text/html");
//read form1 /req1 data
name=req.getParameter("pname");
age=req.getParameter("page");
ms=req.getParameter("ms");
//read form2/res2 data
f2val1=req.getParameter("f2t1");
f2val2=req.getParameter("f2t2");
//display form1/req1 data and form2/req2 data
pw.println("<b> from1/req1 data::</b>"+name+"..."+age+"..."+ms);
pw.println("<br><b> from2/req2 data::</b>"+f2val1+"..."+f2val2);
//add hyperlink
pw.println("<a href='details.html'>home</a>");
//close stream
pw.close();
}//doGet(-,-)
@Override
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
doGet(req,res);
}
}
|
[
"karrasankar09@gmail.com"
] |
karrasankar09@gmail.com
|
3dd37cb1562b757222da407cc5ffcb02cebb8d58
|
66c431d3cce76f5518145f0752276c33b83b8d32
|
/src/test/java/com/maxdemarzi/blocks/RemoveBlocksTest.java
|
e233dc8827b60ed3f00147c14aa8d641ec9fc42a
|
[
"MIT"
] |
permissive
|
PXZ-cecilie/grittier_ext
|
2e34727e450fd38a44ebb77c0992b8a19b6e5231
|
544b19d855294817d1ddc5e66c6f6a874ee326e8
|
refs/heads/master
| 2023-03-07T12:36:31.010744
| 2020-04-07T19:11:46
| 2020-04-07T19:11:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,625
|
java
|
package com.maxdemarzi.blocks;
import com.maxdemarzi.Schema;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.neo4j.harness.junit.rule.Neo4jRule;
import org.neo4j.test.server.HTTP;
import java.util.HashMap;
public class RemoveBlocksTest {
@Rule
public Neo4jRule neo4j = new Neo4jRule()
.withFixture(FIXTURE)
.withUnmanagedExtension("/v1", Blocks.class)
.withUnmanagedExtension("/v1", Schema.class);
@Test
public void shouldRemoveBlock() {
HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/blocks/jexp").toString(), null);
}
@Test
public void shouldRemoveBlockToo() {
HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/jexp/blocks/laexample").toString(), null);
}
@Test
public void shouldNotRemoveBlockUserNotFound() {
HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
HTTP.Response response = HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/max/blocks/jexp").toString(), null);
HashMap actual = response.content();
Assert.assertEquals(400, response.status());
Assert.assertEquals("User not Found.", actual.get("error"));
}
@Test
public void shouldNotRemoveBlockUser2NotFound() {
HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
HTTP.Response response = HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/blocks/pxej").toString(), null);
HashMap actual = response.content();
Assert.assertEquals(400, response.status());
Assert.assertEquals("User not Found.", actual.get("error"));
}
@Test
public void shouldNotRemoveBlockNotFound() {
HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
HTTP.Response response = HTTP.request("DELETE", neo4j.httpURI().resolve("/v1/users/maxdemarzi/blocks/laexample").toString(), null);
HashMap actual = response.content();
Assert.assertEquals(400, response.status());
Assert.assertEquals("Not blocking User.", actual.get("error"));
}
private static final String FIXTURE =
"CREATE (max:User {username:'maxdemarzi', " +
"email: 'max@neo4j.com', " +
"name: 'Max De Marzi'," +
"hash: '0bd90aeb51d5982062f4f303a62df935'," +
"password: 'swordfish'})" +
"CREATE (jexp:User {username:'jexp', " +
"email: 'michael@neo4j.com', " +
"hash: '0bd90aeb51d5982062f4f303a62df935'," +
"name: 'Michael Hunger'," +
"password: 'tunafish'})" +
"CREATE (laeg:User {username:'laexample', " +
"email: 'luke@neo4j.com', " +
"name: 'Luke Gannon'," +
"hash: '0bd90aeb51d5982062f4f303a62df935'," +
"password: 'cuddlefish'})" +
"CREATE (mark:User {username:'markhneedham', " +
"email: 'mark@neo4j.com', " +
"hash: '0bd90aeb51d5982062f4f303a62df935'," +
"name: 'Mark Needham'," +
"password: 'jellyfish'})" +
"CREATE (max)-[:BLOCKS {time:1490140299}]->(jexp)" +
"CREATE (mark)-[:BLOCKS {time:1490140299}]->(laeg)" +
"CREATE (jexp)-[:BLOCKS {time:1490140299}]->(laeg)";
}
|
[
"maxdemarzi@hotmail.com"
] |
maxdemarzi@hotmail.com
|
39ca4aba2f628581829b2d502e8972f1fae1115a
|
e08a899523cfdc89fa74ae4a838c197989f9ac48
|
/src/lezione02/Main.java
|
a97bab2da0385048cba2342de28f516004ceb3b8
|
[] |
no_license
|
Emilius77/Tssjavabase
|
d0bb50595094cefa2ffe3ec64da9c293bd7648e5
|
939bf67f7cc97b11967b38b3371a598f0279f56f
|
refs/heads/master
| 2020-12-24T10:15:26.460014
| 2017-01-08T00:37:17
| 2017-01-16T15:17:28
| 73,091,211
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,051
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package lezione02;
/**
* Esempio di commenti in Java
*
* @author tss
*/
public class Main {
// variabile statica
private static int colore;
//variabile di istanza
private int carattere;
/**
* Da questo metodo "main" partirà l'esecuzione del programma
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
// serve per commentare le singole righe
// ------------------------------------------------------
/*
si usa per comentare più righe
senza dover specificare ogni volta, c'è un'apertura ed una chiusura
*/
System.out.println("esempio di commenti ....");
}
}
|
[
"tss@debian-tss24"
] |
tss@debian-tss24
|
7fad13cc8a1639d3b3b576842eead915c28c58f1
|
3a6691c913348e014488dd08e78efe030edf094c
|
/src/step1_06/ifEx/IfEx11_A.java
|
ccba9d0d09111104054f1045865d3dc8a971d69e
|
[] |
no_license
|
yourchikorita/JavaStudy
|
1ba0c6d010b8bdb0cde293a13969c031b6fa93c7
|
eb1d4f7e9a9a7654732cda3ea053c533a1f3c661
|
refs/heads/master
| 2022-12-02T16:58:07.063843
| 2020-08-18T13:32:16
| 2020-08-18T13:32:16
| 281,608,103
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,532
|
java
|
package step1_06.ifEx;
import java.util.Scanner;
/*
* # 영수증 출력[1단계]
* 1. 메뉴판을 출력한다.
* 2. 사용자는 주문하고자 하는 메뉴의 번호를 입력한다.
* 3. 현금을 입력받는다.
* 4. 입력받은 현금과 메뉴가격을 확인해, 영수증을 출력한다.
* 5. 단, 현금이 부족한 경우 "현금이 부족합니다."라는 메세지를 출력한다.
*/
public class IfEx11_A {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int price1 = 8700;
int price2 = 6200;
int price3 = 1500;
System.out.println("=== 롯데리아 ===");
System.out.println("1.불고기 버거 : " + price1 + "원");
System.out.println("2.새우 버거 : " + price2 + "원");
System.out.println("3.콜 라 : " + price3 + "원");
System.out.print("메뉴를 선택하세요 : ");
int choice = scan.nextInt();
System.out.print("현금을 입력하세요 : ");
int money = scan.nextInt();
// 방법1)
if(choice == 1) {
if(money >= price1) {
money = money - price1;
System.out.println("잔돈 : " + money + "원");
}
if(money < price1) {
System.out.println("현금이 부족합니다.");
}
}
// 방법2)
int charge = 0;
if(choice == 2) { charge = money - price2; }
if(choice == 3) { charge = money - price3; }
if(charge >= 0) {
System.out.println("잔돈 : " + charge + "원");
}
if(charge < 0) {
System.out.println("현금이 부족합니다.");
}
}
}
|
[
"yourchikorita@gmail.com"
] |
yourchikorita@gmail.com
|
62da9582331b19a3374df4813f177afcab8d1659
|
32bd5d25514e987eaee31e8870f33cecfcbf20ec
|
/src/main/java/com/massoftware/service/clientes/UIMotivosBloqueosClientesGrid.java
|
6d4f76e40dcdb8c17ea864b775943e67a93dd1be
|
[
"Unlicense"
] |
permissive
|
diegopablomansilla/massoftware
|
72ffc90dca9153b3486f8235a884f5bddca4560f
|
cc1ddeb58a40115d8d24ccc20df0d426cd4a0abc
|
refs/heads/master
| 2021-09-17T03:55:48.263098
| 2019-09-12T23:20:45
| 2019-09-12T23:20:45
| 202,627,573
| 0
| 0
|
Unlicense
| 2021-08-30T16:26:07
| 2019-08-16T00:00:40
|
Java
|
UTF-8
|
Java
| false
| false
| 6,329
|
java
|
package com.massoftware.service.clientes;
import java.util.ArrayList;
import java.util.List;
import com.massoftware.ui.views.GridCustom;
//import com.vaadin.flow.component.html.Label;
import com.vaadin.flow.component.notification.Notification;
//import com.vaadin.flow.data.renderer.TemplateRenderer;
public class UIMotivosBloqueosClientesGrid extends GridCustom<MotivosBloqueosClientes> {
private MotivosBloqueosClientesFiltro filter;
private MotivoBloqueoClienteService service;
public UIMotivosBloqueosClientesGrid(MotivoBloqueoClienteService service, MotivosBloqueosClientesFiltro filter) {
super(MotivosBloqueosClientes.class, true, true, true, true);
this.filter = filter;
this.service = service;
//laodItems();
}
protected void addColumns() {
// --------------------------------------------------------------------------------------------------
addColumn(MotivosBloqueosClientes::getId, "id")
.setKey("id")
.setSortProperty("1")
.setHeader("ID")
.setVisible(false);
addColumn(MotivosBloqueosClientes::toString, "toString")
.setKey("toString")
.setSortProperty("2")
.setHeader("Motivo bloqueo a cliente")
.setVisible(false);
/* EJEMPLO
addColumn(TemplateRenderer.<Bancos>of("<div>[[item.cuit]]<br><small>[[item.nombre]]</small></div>")
.withProperty("cuit", Bancos::getCuit)
.withProperty("nombre", Bancos::getNombre), "cuit", "nombre")
.setKey("toString2")
.setSortProperty("2")
.setHeader("Banco")
.setVisible(false);
*/
// --------------------------------------------------------------------------------------------------
addColumn(MotivosBloqueosClientes::getNombreClasificacionCliente, "nombreClasificacionCliente")
.setKey("nombreClasificacionCliente")
.setResizable(true)
.setSortProperty("2")
.setHeader("Clasificación de cliente");
addColumn(MotivosBloqueosClientes::getNumero, "numero")
.setKey("numero")
.setResizable(true)
.setSortProperty("3")
.setHeader("Nº motivo");
addColumn(MotivosBloqueosClientes::getNombre, "nombre")
.setKey("nombre")
.setResizable(true)
.setSortProperty("4")
.setHeader("Nombre");
/* EJEMPLOS
addColumn(Bancos::getNumero, "numero")
.setKey("numero")
.setResizable(true)
.setSortProperty("2")
.setHeader("Número");
addColumn(TemplateRenderer.<Bancos>of("<b>[[item.nombre]]</b>")
.withProperty("nombre", Bancos::getNombre))
.setKey("nombre")
.setResizable(true)
.setSortProperty("3")
.setHeader("Nombre");
// addColumn(Bancos::getCuit, "cuit").setKey("cuit").setResizable(true).setSortProperty("4").setHeader("CUIT");
addColumn(new ComponentRenderer<>(this::createRendererCuit))
.setKey("cuit")
.setResizable(true)
.setSortProperty("4")
.setHeader("CUIT");
addColumn(new ComponentRenderer<>(this::createRendererVigente))
.setKey("vigente")
.setResizable(true)
.setSortProperty("5")
.setHeader("Vigente"); // .setTextAlign(ColumnTextAlign.CENTER);
*/
// --------------------------------------------------------------------------------------------------
}
/* EJEMPLOS
private Component createRendererVigente(Bancos item) {
return (item.getVigente() == true) ? UIUtils.createPrimaryIcon(VaadinIcon.CHECK)
: UIUtils.createDisabledIcon(VaadinIcon.CLOSE);
}
private Component createRendererCuit(Bancos item) {
String cuit = "";
if (item.getCuit() != null) {
cuit = item.getCuit().toString();
String prefix = cuit.substring(0, 2);
String body = cuit.substring(2, cuit.length() - 2);
String sufix = cuit.substring(cuit.length() - 2, cuit.length() - 1);
cuit = prefix + "-" + body + "-" + sufix;
}
return new Label(cuit);
}
*/
// --------------------------------------------------------------------------------------------------
protected Integer countFromService() {
try {
if (filter.getClasificacionCliente() == null || filter.getClasificacionCliente().toString().trim().isEmpty()) {
return 0;
}
return service.count(filter);
} catch (Exception e) {
e.printStackTrace();
Notification.show("No se pudo contar la cantidad ítems !!");
}
return 0;
}
protected List<MotivosBloqueosClientes> findFromService(int offset, int limit, Integer orderBy, Boolean orderByDesc) {
try {
if (filter.getClasificacionCliente() == null || filter.getClasificacionCliente().toString().trim().isEmpty()) {
return new ArrayList<MotivosBloqueosClientes>();
}
filter.setOffset(offset);
filter.setLimit(limit);
filter.setOrderBy(orderBy);
filter.setOrderByDesc(orderByDesc);
List<MotivosBloqueosClientes> items = service.find(filter);
Notification.show("offset: " + offset + ", limit: " + limit + ", orderBy: " + orderBy + ", orderByDesc: "
+ orderByDesc + ", items.size(): " + items.size());
return items;
} catch (Exception e) {
e.printStackTrace();
Notification.show("No se pudo buscar los ítems !!");
}
return new ArrayList<MotivosBloqueosClientes>();
}
protected boolean removeItemFromService(MotivosBloqueosClientes item) {
boolean r = false;
try {
r = service.deleteById(item.getId());
} catch (Exception e) {
r = false;
}
if (r) {
Notification.show("El ítem '" + item + "' se borró con éxito");
} else {
Notification.show("No se pudo borrar el ítem !!");
}
return r;
}
// --------------------------------------------------------------------------------------------------
// public void ccc(JsonObject eventData) {
//
// try {
//
// String id = eventData.getString("col0");
// Integer numero = Integer.valueOf(eventData.getString("col1"));
// String nombre = eventData.getString("col2");
//
// Banco b = new Banco();
// b.setId(id);
//
//
//
// this.getSelectionModel().selectFromClient(b);
//// this.select(b);
//
//// Banco b2 = this.getSelectionModel().getFirstSelectedItem().get();
// Notification.show(nombre);
//
////
//
//// b.setNombre(nombre);
//// b.setNumero(numero);
//
//// this.getDataProvider().refreshItem(b);
//
// } catch (Exception e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// Notification.show(e.toString());
// }
//
// }
private static final long serialVersionUID = 5047281514894427842L;
}
|
[
"diegopablomansilla@gmail.com"
] |
diegopablomansilla@gmail.com
|
2d37c56146b34a8d6dd012411b01517e414e8655
|
932480a6fa3d2e04d6fa0901c51ad14b9704430b
|
/jonix-onix3/src/main/java/com/tectonica/jonix/onix3/ConferenceName.java
|
13ebf9d67f3bfd53e53f40651edf46ea3f1d3272
|
[
"Apache-2.0"
] |
permissive
|
hobbut/jonix
|
952abda58a3e9817a57ae8232a4a62ab6b3cd50f
|
0544feb4b1ac8fd7dfd52e34e3f84d46eae5749e
|
refs/heads/master
| 2021-01-12T08:22:58.679531
| 2016-05-22T15:13:53
| 2016-05-22T15:13:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,287
|
java
|
/*
* Copyright (C) 2012 Zach Melamed
*
* Latest version available online at https://github.com/zach-m/jonix
* Contact me at zach@tectonica.co.il
*
* 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.tectonica.jonix.onix3;
import java.io.Serializable;
import com.tectonica.jonix.JPU;
import com.tectonica.jonix.OnixElement;
import com.tectonica.jonix.codelist.LanguageCodes;
import com.tectonica.jonix.codelist.RecordSourceTypes;
/*
* NOTE: THIS IS AN AUTO-GENERATED FILE, DON'T EDIT MANUALLY
*/
/**
* <h1>Conference name</h1>
* <p>
* The name of a conference or conference series to which the product is related. This element is mandatory in each
* occurrence of the <Conference> composite, and non-repeating.
* </p>
* <table border='1' cellpadding='3'>
* <tr>
* <td>Format</td>
* <td>Variable-length text, suggested maximum length 200 characters</td>
* </tr>
* <tr>
* <td>Reference name</td>
* <td><ConferenceName></td>
* </tr>
* <tr>
* <td>Short tag</td>
* <td><b052></td>
* </tr>
* <tr>
* <td>Cardinality</td>
* <td>1</td>
* </tr>
* <tr>
* <td>Attributes</td>
* <td>language</td>
* </tr>
* <tr>
* <td>Example</td>
* <td><b052>International Conference on Climate Change</b052></td>
* </tr>
* </table>
*/
public class ConferenceName implements OnixElement, Serializable
{
private static final long serialVersionUID = 1L;
public static final String refname = "ConferenceName";
public static final String shortname = "b052";
// ///////////////////////////////////////////////////////////////////////////////
// ATTRIBUTES
// ///////////////////////////////////////////////////////////////////////////////
/**
* (type: dt.DateOrDateTime)
*/
public String datestamp;
public RecordSourceTypes sourcetype;
public String sourcename;
public LanguageCodes language;
// ///////////////////////////////////////////////////////////////////////////////
// VALUE MEMBER
// ///////////////////////////////////////////////////////////////////////////////
/**
* Raw Format: Variable-length text, suggested maximum length 200 characters
* <p>
* (type: dt.NonEmptyString)
*/
public String value;
// ///////////////////////////////////////////////////////////////////////////////
// SERVICES
// ///////////////////////////////////////////////////////////////////////////////
public ConferenceName()
{}
public ConferenceName(org.w3c.dom.Element element)
{
datestamp = JPU.getAttribute(element, "datestamp");
sourcetype = RecordSourceTypes.byCode(JPU.getAttribute(element, "sourcetype"));
sourcename = JPU.getAttribute(element, "sourcename");
language = LanguageCodes.byCode(JPU.getAttribute(element, "language"));
value = JPU.getContentAsString(element);
}
}
|
[
"zach@tectonica.co.il"
] |
zach@tectonica.co.il
|
4b5a18e8946fca8440cf59c5e083ef2a1bcd881d
|
cbfceea1ff3c2faac70349c44c92468cf8ae5efb
|
/nenr_7_dz/src/main/java/hr/fer/zemris/nenr/dz7/zadaci/ZadatakGA.java
|
8148ad919698ffbcb15d0c8cf4215ca4287b9232
|
[] |
no_license
|
svennjegac/FER-java-nenr
|
ab2b0f99356ffb7e0f57c0b1c98e423cbf14e89d
|
00aa9757df141a6354e4ee0c54da84890d7be11a
|
refs/heads/master
| 2020-03-29T05:27:35.696892
| 2018-09-20T09:24:15
| 2018-09-20T09:24:15
| 149,583,088
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,239
|
java
|
package hr.fer.zemris.nenr.dz7.zadaci;
import java.text.DecimalFormat;
import java.util.Arrays;
import hr.fer.zemris.nenr.dz7.genetic.GenerationElitisticGA;
import hr.fer.zemris.nenr.dz7.genetic.ICrossoverOperator;
import hr.fer.zemris.nenr.dz7.genetic.IMutationOperator;
import hr.fer.zemris.nenr.dz7.genetic.IOptAlgorithm;
import hr.fer.zemris.nenr.dz7.genetic.TournamentSelOp;
import hr.fer.zemris.nenr.dz7.genetic.impl.ArithmeticCrossover;
import hr.fer.zemris.nenr.dz7.genetic.impl.BLXAlphaCrossover;
import hr.fer.zemris.nenr.dz7.genetic.impl.Dataset;
import hr.fer.zemris.nenr.dz7.genetic.impl.DoubleArraySolution;
import hr.fer.zemris.nenr.dz7.genetic.impl.MutationAdd;
import hr.fer.zemris.nenr.dz7.genetic.impl.MutationReplace;
import hr.fer.zemris.nenr.dz7.genetic.impl.Problem;
import hr.fer.zemris.nenr.dz7.genetic.impl.Sample;
import hr.fer.zemris.nenr.dz7.genetic.impl.SimpleCrossover;
import hr.fer.zemris.nenr.dz7.genetic.impl.Util;
import hr.fer.zemris.nenr.dz7.nn.ANN;
import hr.fer.zemris.nenr.dz7.nn.IActivationFunction;
import hr.fer.zemris.nenr.dz7.nn.SigmoidFunction;
public class ZadatakGA {
public static void main(String[] args) {
Dataset dataset = Util.loadDataset("zad7-dataset.txt");
if (dataset == null) {
System.out.println("Greška pri učitavanju dataseta.");
return;
}
ANN ann = new ANN(
new int[]{ 2, 8, 3 },
new IActivationFunction[]{ new SigmoidFunction() });
ann.fullyConnectFeedforward();
IOptAlgorithm<double[]> alg =
new GenerationElitisticGA<double[]>(
20,
new TournamentSelOp<>(4, true),
new ICrossoverOperator[]{
new BLXAlphaCrossover(0.5),
new ArithmeticCrossover(),
new SimpleCrossover(0.1)},
new IMutationOperator[]{
new MutationAdd(0.05, 0.05),
new MutationReplace(1d, 0.1)
},
0.9,
new Problem(
ann,
dataset),
-0.00001,
200000);
double[] weights = alg.run().getRepresentation();
ann.setWeights(weights);
printStats(ann, dataset);
}
private static void printStats(ANN ann, Dataset dataset) {
DecimalFormat df = new DecimalFormat("##.###");
int errors = 0;
int corrects = 0;
for (Sample sample : dataset) {
double[] output = ann.calculateOutput(sample.getInput());
int[] predicted = getPredicted(output);
String correct;
if (Arrays.equals(predicted, sample.getCode())) {
corrects += 1;
correct = "Y";
} else {
correct = "N";
errors += 1;
}
System.out.println("Correct? " + correct + " $$$ " +
"Real -> Predicted: " + sample.getI1() + ":" + sample.getI2() + ":" + sample.getI3() +
" -> " + predicted[0] + ":" + predicted[1] + ":" + predicted[2] +
" (" + df.format(output[0]) + ", " + df.format(output[1]) + ", " + df.format(output[2]) + ")");
}
System.out.println("#####################");
System.out.println("Broj točno klasificiranih: " + corrects + ", broj pogrešno klasificiranih: " + errors);
}
private static int[] getPredicted(double[] output) {
int[] predicted = new int[output.length];
for (int i = 0; i < output.length; i++) {
predicted[i] = output[i] > 0.5 ? 1 : 0;
}
return predicted;
}
}
|
[
"sven.njegac@fer.hr"
] |
sven.njegac@fer.hr
|
f9d9552a458684653b32d6c8e7b13c546cb3044b
|
e78d233c910fe87351380f4f483f4fad468ce1aa
|
/src/main/java/com/swingfrog/summer/concurrent/SingleQueueMgr.java
|
164a9505b8a65386ce12c401047e077121cb2f33
|
[
"Apache-2.0"
] |
permissive
|
SwingFrog/Summer
|
665f9bacd514dbb77f05fa2800d3ae044dbea612
|
554af9af5b8f526e2f45bb1ce17a5eff11cbe482
|
refs/heads/master
| 2023-06-22T13:34:37.957151
| 2023-03-16T05:29:57
| 2023-03-16T05:29:57
| 160,478,462
| 568
| 154
|
Apache-2.0
| 2023-06-14T22:29:58
| 2018-12-05T07:30:01
|
Java
|
UTF-8
|
Java
| false
| false
| 672
|
java
|
package com.swingfrog.summer.concurrent;
import java.util.concurrent.Executor;
public class SingleQueueMgr extends AbstractKeyQueue<Object> {
private static class SingleCase {
public static final SingleQueueMgr INSTANCE = new SingleQueueMgr();
}
private SingleQueueMgr() {
}
public static SingleQueueMgr get() {
return SingleCase.INSTANCE;
}
public void execute(Object key, Runnable runnable) {
super.execute(key, runnable);
}
public void clear(Object key) {
super.clear(key);
}
public int getQueueSize(Object key) {
return super.getQueueSize(key);
}
public Executor getExecutor(Object key) {
return super.getOrCreateQueue(key);
}
}
|
[
"swingfrog@qq.com"
] |
swingfrog@qq.com
|
ecbfbf763e7fdaf493c765ca36d49209cc40e87a
|
807e0deb469fbd13346f7bea14d4823f6fd40946
|
/src/test/java/com/liujun/datastruct/graph/TestMyGraph.java
|
9def427168f852ca52c2920c3e57edd65043ce84
|
[] |
no_license
|
huangjiewen4/datastruct
|
07731bd117fb74a8c0246ca7883d105ca66f20c9
|
502b39eca7dd32c7d1f204b6988db6eabd94c62c
|
refs/heads/master
| 2020-04-12T18:45:49.801204
| 2018-12-19T11:43:25
| 2018-12-19T11:43:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,439
|
java
|
package com.liujun.datastruct.graph;
import org.junit.Test;
/**
* @author liujun
* @version 0.0.1
* @date 2018/12/07
*/
public class TestMyGraph {
/**
* 添加顶点信息
*
* @param graph 图信息
*/
private void addPoint(MyGraph graph) {
// 顶点0
graph.add(0, 1);
graph.add(0, 4);
// 顶点1
graph.add(1, 0);
graph.add(1, 2);
graph.add(1, 5);
// 顶点2
graph.add(2, 1);
graph.add(2, 3);
graph.add(2, 6);
// 顶点3
graph.add(3, 2);
graph.add(3, 7);
// 顶点4
graph.add(4, 0);
graph.add(4, 5);
graph.add(4, 8);
// 顶点5
graph.add(5, 1);
graph.add(5, 4);
graph.add(5, 6);
graph.add(5, 9);
// 顶点6
graph.add(6, 2);
graph.add(6, 5);
graph.add(6, 7);
graph.add(6, 10);
// 顶点7
graph.add(7, 3);
graph.add(7, 6);
graph.add(7, 11);
// 顶点8
graph.add(8, 4);
graph.add(8, 9);
// 顶点9
graph.add(9, 5);
graph.add(9, 8);
graph.add(9, 10);
// 顶点10
graph.add(10, 6);
graph.add(10, 9);
graph.add(10, 11);
// 顶点11
graph.add(11, 7);
graph.add(11, 10);
}
@Test
public void testBfs() {
MyGraph graph = new MyGraph(12);
this.addPoint(graph);
graph.bfs(0, 11);
}
@Test
public void testdfs() {
MyGraph graph = new MyGraph(12);
this.addPoint(graph);
graph.dfs(0, 11);
}
}
|
[
"422134235@qq.com"
] |
422134235@qq.com
|
84b90967c3ec5210acb7ba6f87dcef46220b3ba0
|
5a474f4bb0bf3981d3b282e6c028ef6b2472f170
|
/node-plugin/node-plugin-rcra54-outbound/src/generated/net/opengis/gml/AbstractGeometryType.java
|
a40dfd18ab48225ea1176eb4835b7eb1de4b6e60
|
[] |
no_license
|
jhulick/opennode2-java
|
deaf72b954516590a38e33953e2025759c33e6ae
|
37618871d4124c510887acef1cd1e17228d91ab2
|
refs/heads/master
| 2021-07-12T04:48:22.245571
| 2017-10-11T14:20:48
| 2017-10-11T14:20:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,161
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.06.15 at 06:46:14 PM EDT
//
package net.opengis.gml;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* All geometry elements are derived directly or indirectly from this abstract supertype. A geometry element may have an identifying attribute ("gml:id"), a name (attribute "name") and a description (attribute "description"). It may be associated with a spatial reference system (attribute "srsName"). The following rules shall be adhered: - Every geometry type shall derive from this abstract type. - Every geometry element (i.e. an element of a geometry type) shall be directly or indirectly in the substitution group of _Geometry.
*
* <p>Java class for AbstractGeometryType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="AbstractGeometryType">
* <complexContent>
* <extension base="{http://www.opengis.net/gml}AbstractGMLType">
* <attGroup ref="{http://www.opengis.net/gml}SRSReferenceGroup"/>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AbstractGeometryType")
@XmlSeeAlso({
AbstractRingType.class,
AbstractGeometricPrimitiveType.class
})
@MappedSuperclass
public abstract class AbstractGeometryType
extends AbstractGMLType
implements Equals, HashCode
{
@XmlAttribute(name = "srsName")
@XmlSchemaType(name = "anyURI")
protected String srsName;
@XmlAttribute(name = "srsDimension")
@XmlSchemaType(name = "positiveInteger")
protected BigInteger srsDimension;
/**
* Gets the value of the srsName property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "SRSNAME")
public String getSrsName() {
return srsName;
}
/**
* Sets the value of the srsName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSrsName(String value) {
this.srsName = value;
}
/**
* Gets the value of the srsDimension property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
@Basic
@Column(name = "SRSDIMENSION", precision = 20, scale = 0)
public BigInteger getSrsDimension() {
return srsDimension;
}
/**
* Sets the value of the srsDimension property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setSrsDimension(BigInteger value) {
this.srsDimension = value;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof AbstractGeometryType)) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final AbstractGeometryType that = ((AbstractGeometryType) object);
{
String lhsSrsName;
lhsSrsName = this.getSrsName();
String rhsSrsName;
rhsSrsName = that.getSrsName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "srsName", lhsSrsName), LocatorUtils.property(thatLocator, "srsName", rhsSrsName), lhsSrsName, rhsSrsName)) {
return false;
}
}
{
BigInteger lhsSrsDimension;
lhsSrsDimension = this.getSrsDimension();
BigInteger rhsSrsDimension;
rhsSrsDimension = that.getSrsDimension();
if (!strategy.equals(LocatorUtils.property(thisLocator, "srsDimension", lhsSrsDimension), LocatorUtils.property(thatLocator, "srsDimension", rhsSrsDimension), lhsSrsDimension, rhsSrsDimension)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = super.hashCode(locator, strategy);
{
String theSrsName;
theSrsName = this.getSrsName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "srsName", theSrsName), currentHashCode, theSrsName);
}
{
BigInteger theSrsDimension;
theSrsDimension = this.getSrsDimension();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "srsDimension", theSrsDimension), currentHashCode, theSrsDimension);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}
|
[
"twitch@nervestaple.com"
] |
twitch@nervestaple.com
|
5838045dea8264a8b0ec726336f40e9c198bb566
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_80e3722035e3cbf24e5d2b6a6cc08a087a314e8f/ResolverActivator/18_80e3722035e3cbf24e5d2b6a6cc08a087a314e8f_ResolverActivator_t.java
|
8217a4a25d7128bdafb6f655d4f5817a8da9a9f0
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,034
|
java
|
/*******************************************************************************
* Copyright (c) 2013 VMWare, Inc.
* 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:
* VMWare, Inc. - initial API and implementation
*******************************************************************************/
package org.codehaus.groovy.frameworkadapter.util;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceEvent;
import org.osgi.framework.ServiceListener;
public class ResolverActivator implements BundleActivator {
public static final String PLUGIN_ID = "org.codehaus.groovy.eclipse.compilerResolver";
private static BundleContext context;
private static ResolverActivator instance;
private CompilerChooser chooser;
private ServiceListener serviceListener;
public ResolverActivator() {
instance = this;
}
static BundleContext getContext() {
return context;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(final BundleContext bundleContext) throws Exception {
ResolverActivator.context = bundleContext;
chooser = new CompilerChooser();
// There is a small window where the chooser can be initialized.
// It has to be after the workspace has started (in order to ensure
// the choose workspace dialog still shows) but before JDT is initialized
// (so that the groovy bundles aren't loaded).
// The service listener is called synchronously as the resources bundle is actived
String filter = '(' + Constants.OBJECTCLASS + "=org.eclipse.core.resources.IWorkspace)";
serviceListener = new ServiceListener() {
public void serviceChanged(ServiceEvent event) {
if (event.getType() == ServiceEvent.REGISTERED) {
initializeChooser();
}
}
};
bundleContext.addServiceListener(serviceListener, filter);
}
public void initializeChooser() {
try {
context.removeServiceListener(serviceListener);
chooser.initialize(context);
} catch (BundleException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext bundleContext) throws Exception {
ResolverActivator.context = null;
}
public static ResolverActivator getDefault() {
return instance;
}
public CompilerChooser getChooser() {
return chooser;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
362e004ad6c595dbd1ca61daa5bbf68b8a29c35b
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/21_geo-google-oasis.names.tc.ciq.xsdschema.xal._2.ThoroughfareNumber-0.5-7/oasis/names/tc/ciq/xsdschema/xal/_2/ThoroughfareNumber_ESTest_scaffolding.java
|
9fe3063481043fd65ffaf7bfd2e4d460f2a01c72
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 560
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Oct 29 14:59:46 GMT 2019
*/
package oasis.names.tc.ciq.xsdschema.xal._2;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class ThoroughfareNumber_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
b2ead8ee969cb3797262f0fab75899b4d6012efa
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/16/16_55e790d3e6cbfac73f0128a422382310589a1534/Login/16_55e790d3e6cbfac73f0128a422382310589a1534_Login_s.java
|
151c95f86af40439d5a3590d912969772c7a1470
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,831
|
java
|
/*
* This file is part of SWADroid.
*
* Copyright (C) 2010 Juan Miguel Boyero Corral <juanmi1982@gmail.com>
*
* SWADroid 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.
*
* SWADroid 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 SWADroid. If not, see <http://www.gnu.org/licenses/>.
*/
package es.ugr.swad.swadroid.modules;
import android.app.ProgressDialog;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import es.ugr.swad.swadroid.R;
import es.ugr.swad.swadroid.model.User;
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import org.kobjects.base64.Base64;
import org.ksoap2.SoapFault;
import org.xmlpull.v1.XmlPullParserException;
/**
* Login module for connect to SWAD.
* @author Juan Miguel Boyero Corral <juanmi1982@gmail.com>
*/
public class Login extends Module {
/**
* Digest for user password.
*/
private MessageDigest md;
/**
* User password.
*/
private String userPassword;
/**
* Called when activity is first created.
* @param savedInstanceState State of activity.
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setMETHOD_NAME("loginByUserPassword");
connect();
}
/**
* Launches login action in a separate thread while shows a progress dialog
* in UI thread.
*/
private void connect() {
new Connect().execute();
}
/**
* Connects to SWAD and gets user data.
* @throws NoSuchAlgorithmException
* @throws IOException
* @throws XmlPullParserException
* @throws SoapFault
*/
private void requestService()
throws NoSuchAlgorithmException, IOException, XmlPullParserException, SoapFault {
//Encrypts user password with SHA-512 and encodes it to Base64
md = MessageDigest.getInstance("SHA-512");
md.update(prefs.getUserPassword().getBytes());
userPassword = Base64.encode(md.digest());
//Creates webservice request, adds required params and sends request to webservice
createRequest();
addParam("userID", prefs.getUserID());
addParam("userPassword", userPassword);
sendRequest();
//Stores user data returned by webservice response
User.setUserCode((String) result.getProperty("userCode"));
User.setUserTypeCode((String) result.getProperty("userTypeCode"));
User.setWsKey((String) result.getProperty("wsKey"));
User.setUserID((String) result.getProperty("userID"));
User.setUserSurname1((String) result.getProperty("userSurname1"));
User.setUserSurname2((String) result.getProperty("userSurname2"));
User.setUserFirstName((String) result.getProperty("userFirstName"));
User.setUserTypeName((String) result.getProperty("userTypeName"));
//Request finalized without errors
setResult(RESULT_OK);
}
/**
* Shows progress dialog when connecting to SWAD
*/
private class Connect extends AsyncTask<String, Void, Void> {
/**
* Progress dialog.
*/
ProgressDialog Dialog = new ProgressDialog(Login.this);
/**
* Exception pointer.
*/
Exception e = null;
/**
* Called before launch background thread.
*/
@Override
protected void onPreExecute() {
Dialog.setMessage(getString(R.string.loginProgressDescription));
Dialog.setTitle(R.string.loginProgressTitle);
Dialog.show();
}
/**
* Called in background thread.
* @param urls Background thread parameters.
* @return Nothing.
*/
protected Void doInBackground(String... urls) {
try {
//Sends webservice request
requestService();
/**
* If an exception occurs, capture and points exception pointer
* to it.
*/
} catch (SoapFault ex) {
e = ex;
} catch (Exception ex) {
e = ex;
}
return null;
}
/**
* Called after calling background thread.
* @param unused Does nothing.
*/
@Override
protected void onPostExecute(Void unused) {
Dialog.dismiss();
if(e != null) {
/**
* If an exception has occurred, shows error message according to
* exception type.
*/
if(e instanceof SoapFault) {
SoapFault es = (SoapFault) e;
Log.e(es.getClass().getSimpleName(), es.faultstring);
error(es.faultstring);
} else {
Log.e(e.getClass().getSimpleName(), e.toString());
error(e.toString());
}
//Request finalized with errors
e.printStackTrace();
setResult(RESULT_CANCELED);
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3c504a48c5d228bc4e311b7f931d317af58e04cc
|
6cd1693a58477c451f86bb6800ce0e135d588f85
|
/src/test-30/java/org/thymeleaf/aurora/engine/TextTest.java
|
0e2aad372b74a07255ae9da0007813f4dcdcece0
|
[
"Apache-2.0"
] |
permissive
|
tan9/thymeleaf-tests
|
f10b891ceed54545ef07b467c89bb463f3bd7b7e
|
e24f31fb42f6965b708618b17fc3a30c4a3cc6f2
|
refs/heads/master
| 2021-01-14T12:58:03.328903
| 2015-04-11T23:50:33
| 2015-04-11T23:50:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,026
|
java
|
/*
* =============================================================================
*
* Copyright (c) 2011-2014, The THYMELEAF team (http://www.thymeleaf.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* =============================================================================
*/
package org.thymeleaf.aurora.engine;
import org.junit.Assert;
import org.junit.Test;
import org.thymeleaf.aurora.text.ITextRepository;
import org.thymeleaf.aurora.text.TextRepositories;
public final class TextTest {
@Test
public void test() {
final ITextRepository textRepository = TextRepositories.createLimitedSizeCacheRepository();
final char[] buf1 = "hello".toCharArray();
final Text c1 = new Text(textRepository);
c1.setText(buf1, 0, 5, 10, 3);
Assert.assertEquals("hello", extractText(c1));
final String c1all = c1.getText();
Assert.assertEquals("hello", c1all);
Assert.assertSame(c1all, c1.getText());
Assert.assertEquals(10, c1.getLine());
Assert.assertEquals(3, c1.getCol());
final String c1c0 = " something\nhere ";
c1.setText(c1c0);
Assert.assertSame(c1c0, c1.getText());
Assert.assertSame(textRepository.getText(" something\nhere "), c1.getText());
Assert.assertEquals(-1, c1.getLine());
Assert.assertEquals(-1, c1.getCol());
final String c1c2 = "hey!";
c1.setText(c1c2);
final String c1c2_2 = c1.getText();
Assert.assertSame(c1c2, c1c2_2);
Assert.assertSame(c1c2, c1.getText());
c1.setText(c1c0.toCharArray(), 0, c1c0.length(), 11, 4);
final String c1c3_2 = c1.getText();
Assert.assertEquals(c1c0, c1c3_2);
Assert.assertSame(c1c3_2, c1.getText());
Assert.assertEquals(11, c1.getLine());
Assert.assertEquals(4, c1.getCol());
final String c2c1 = "hello";
final Text c2 = new Text(textRepository, c2c1);
final String c2cs1_2 = c2.getText();
Assert.assertEquals(c2c1, c2cs1_2);
Assert.assertSame(c2cs1_2, c2.getText());
Assert.assertEquals(-1, c2.getLine());
Assert.assertEquals(-1, c2.getCol());
}
private static String extractText(final Text text) {
final StringBuilder strBuilder = new StringBuilder();
for (int i = 0; i < text.length(); i++) {
strBuilder.append(text.charAt(i));
}
return strBuilder.toString();
}
}
|
[
"daniel.fernandez@11thlabs.org"
] |
daniel.fernandez@11thlabs.org
|
e36d73605529a71538ee82ea12ad57936336e516
|
f2a4093a0db21978cdab5da93fabe22ac4e0fa89
|
/Basic Exercises/Bai101.java
|
54956716d1416bbd7a8a204b6b0c05efedb0903f
|
[] |
no_license
|
hoangkiet1906/Java-Core-Exercise
|
1b1dec5de13738350362638f17b1d3906233c947
|
2a8212bbae38b7fafe5b79771a18545bfcbc3032
|
refs/heads/master
| 2023-05-10T09:42:46.164324
| 2021-06-02T06:23:18
| 2021-06-02T06:23:18
| 373,060,305
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 602
|
java
|
import java.util.*;
import java.io.*;
public class Bai101 {
public static void main(String[] args)
{
int[] array_nums = {10, 11, 10, 30, 45, 20, 33, 53};
int result = 0;
System.out.println("Original Array: "+Arrays.toString(array_nums));
int ctr1 = 0;
int ctr2 = 0;
for(int i = 0; i < array_nums.length; i++) {
if(array_nums[i] == 10)
ctr1++;
if(array_nums[i] == 20)
ctr2++;
}
System.out.printf(String.valueOf(ctr1 > ctr2));
System.out.printf("\n");
}
}
|
[
"="
] |
=
|
ce0e0cb6f8cb2b786003b06ae3bcf88844181baa
|
53274240cde9c2d9422991973d2749cc1f2bccdc
|
/bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/eventattendance/EventAttendanceTable.java
|
e2d5572db2f4e32e53d3911a3d0d43884af6bee7
|
[] |
no_license
|
gottaBoy/scm-biz-suite
|
c85012548c11eb35b6a3ba050e96eaf6c63de0e2
|
78de998ea796d3442e36945143962fa0131ca329
|
refs/heads/master
| 2022-11-30T07:38:22.198320
| 2020-08-01T16:19:50
| 2020-08-01T16:19:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,114
|
java
|
package com.doublechaintech.retailscm.eventattendance;
import com.doublechaintech.retailscm.AccessKey;
public class EventAttendanceTable{
public static AccessKey withId(Object value){
AccessKey accessKey = new AccessKey();
accessKey.setColumnName(COLUMN_ID);
accessKey.setValue(value);
return accessKey;
}
//Add extra identifiers
//only this package can use this, so the scope is default, not public, not private either nor protected
public static final String TABLE_NAME="event_attendance_data";
static final String COLUMN_ID = "id";
static final String COLUMN_NAME = "name";
static final String COLUMN_POTENTIAL_CUSTOMER = "potential_customer";
static final String COLUMN_CITY_EVENT = "city_event";
static final String COLUMN_DESCRIPTION = "description";
static final String COLUMN_VERSION = "version";
public static final String []ALL_CLOUMNS = {COLUMN_ID,COLUMN_NAME,COLUMN_POTENTIAL_CUSTOMER,COLUMN_CITY_EVENT,COLUMN_DESCRIPTION,COLUMN_VERSION};
public static final String []NORMAL_CLOUMNS = {COLUMN_NAME,COLUMN_POTENTIAL_CUSTOMER,COLUMN_CITY_EVENT,COLUMN_DESCRIPTION};
}
|
[
"zhangxilai@doublechaintech.com"
] |
zhangxilai@doublechaintech.com
|
47096108968b5fbd3b2e28820b1bc7d242af3cee
|
d71e879b3517cf4fccde29f7bf82cff69856cfcd
|
/ExtractedJars/Health_com.huawei.health/javafiles/com/google/android/gms/internal/zzapm$2.java
|
a868f590e96e38c3a1b38bbbff783e4ed809d312
|
[
"MIT"
] |
permissive
|
Andreas237/AndroidPolicyAutomation
|
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
|
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
|
refs/heads/master
| 2020-04-10T02:14:08.789751
| 2019-05-16T19:29:11
| 2019-05-16T19:29:11
| 160,739,088
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,294
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.google.android.gms.internal;
import android.os.RemoteException;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.fitness.request.DataDeleteRequest;
// Referenced classes of package com.google.android.gms.internal:
// zzapm, zzaog, zzapr, zzaov
class zzapm$2 extends c
{
protected volatile void zza(com.google.android.gms.common.api.Api$zzb api$zzb)
throws RemoteException
{
zza((zzaog)api$zzb);
// 0 0:aload_0
// 1 1:aload_1
// 2 2:checkcast #25 <Class zzaog>
// 3 5:invokevirtual #28 <Method void zza(zzaog)>
// 4 8:return
}
protected void zza(zzaog zzaog1)
throws RemoteException
{
zzapr zzapr1 = new zzapr(((b) (this)));
// 0 0:new #31 <Class zzapr>
// 1 3:dup
// 2 4:aload_0
// 3 5:invokespecial #34 <Method void zzapr(zzaad$zzb)>
// 4 8:astore_2
((zzaov)zzaog1.zzxD()).zza(new DataDeleteRequest(zzaUN, ((zzapf) (zzapr1))));
// 5 9:aload_1
// 6 10:invokevirtual #38 <Method android.os.IInterface zzaog.zzxD()>
// 7 13:checkcast #40 <Class zzaov>
// 8 16:new #42 <Class DataDeleteRequest>
// 9 19:dup
// 10 20:aload_0
// 11 21:getfield #15 <Field DataDeleteRequest zzaUN>
// 12 24:aload_2
// 13 25:invokespecial #45 <Method void DataDeleteRequest(DataDeleteRequest, zzapf)>
// 14 28:invokeinterface #48 <Method void zzaov.zza(DataDeleteRequest)>
// 15 33:return
}
final DataDeleteRequest zzaUN;
zzapm$2(zzapm zzapm1, GoogleApiClient googleapiclient, DataDeleteRequest datadeleterequest)
{
zzaUN = datadeleterequest;
// 0 0:aload_0
// 1 1:aload_3
// 2 2:putfield #15 <Field DataDeleteRequest zzaUN>
super(googleapiclient);
// 3 5:aload_0
// 4 6:aload_2
// 5 7:invokespecial #18 <Method void zzaog$zzc(GoogleApiClient)>
// 6 10:return
}
}
|
[
"silenta237@gmail.com"
] |
silenta237@gmail.com
|
58026469943198da4949c998c8d8e2f1f533eb72
|
07dde126873cb2a0bd20a3af4ce2fd10ea94c810
|
/src/test/java/com/nd/auxo/recommend/core/api/pbl/repository/PblResponseTest.java
|
49c80f91b47adaa8e760144c2a757972ee049c1e
|
[] |
no_license
|
azhangge/seniorWhy
|
0c280cc781b32e82745edeaf5a9a87f1bac3b2d8
|
1e9542e00cf72babeecefad3fd2b859f90e5eb48
|
refs/heads/master
| 2020-03-27T12:08:09.238373
| 2018-09-03T02:01:57
| 2018-09-03T02:01:57
| 146,528,572
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 507
|
java
|
package com.nd.auxo.recommend.core.api.pbl.repository;
import com.nd.auxo.recommend.BasicLombokObjTest;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.junit.runners.BlockJUnit4ClassRunner;
/**
* Created by auto on 2017-02-10.
*/
@RunWith(BlockJUnit4ClassRunner.class)
public class PblResponseTest extends BasicLombokObjTest {
@Before
public void init() throws InstantiationException, IllegalAccessException {
super.init(new PblResponse());
}
}
|
[
"1007009258@qq.com"
] |
1007009258@qq.com
|
c5c5883e1ed2d3517ee4716bc8469cfe968fe4ce
|
9c430e5273c05856da6bfc989dc71f11776e522e
|
/Lesson04/HomeWork/LoopsEven.java
|
21f3ee504efc995e1f3025e8adbbb15b29211ddc
|
[] |
no_license
|
AnatoliyDeveloper/Java.Start
|
731e9a2a5d0f5cb266a35e82bcf0bb25d6803ed5
|
4b7bd7b84f13510b7e749c3685b2ca69b75ceb5e
|
refs/heads/master
| 2021-01-21T08:37:35.044047
| 2017-01-22T10:55:16
| 2017-01-22T10:55:16
| 68,472,966
| 0
| 0
| null | null | null | null |
WINDOWS-1251
|
Java
| false
| false
| 361
|
java
|
package JavaStart.Lesson04.HomeWork;
/**
* Created by Anatoliy on 18.09.2016.
*/
public class LoopsEven {
public static void main(String[] args) {
//Вывести все четные числа от 1 до 50.
for (int i = 2; i <= 50; i+=2) {
System.out.print(i + " ");
}
System.out.println(" ");
}
}
|
[
"sheroryaru@gmail.com"
] |
sheroryaru@gmail.com
|
d1a2df75b7a6e92c16b7a0290d8b60382574be1f
|
af606a04ed291e8c9b1e500739106a926e205ee2
|
/aliyun-java-sdk-companyreg/src/main/java/com/aliyuncs/companyreg/model/v20190508/QueryIntentionListRequest.java
|
9492b9c6d2a2943299952607bea36b9ca7a90085
|
[
"Apache-2.0"
] |
permissive
|
xtlGitHub/aliyun-openapi-java-sdk
|
a733f0a16c8cc493cc28062751290f563ab73ace
|
f60c71de2c9277932b6549c79631b0f03b11cc36
|
refs/heads/master
| 2023-09-03T13:56:50.071024
| 2021-11-10T11:53:25
| 2021-11-10T11:53:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,113
|
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.companyreg.model.v20190508;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.companyreg.Endpoint;
/**
* @author auto create
* @version
*/
public class QueryIntentionListRequest extends RpcAcsRequest<QueryIntentionListResponse> {
private String typeList;
private Integer type;
private Integer pageNum;
private String sortFiled;
private Integer pageSize;
private String sortOrder;
private Integer status;
public QueryIntentionListRequest() {
super("companyreg", "2019-05-08", "QueryIntentionList", "companyreg");
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 getTypeList() {
return this.typeList;
}
public void setTypeList(String typeList) {
this.typeList = typeList;
if(typeList != null){
putQueryParameter("TypeList", typeList);
}
}
public Integer getType() {
return this.type;
}
public void setType(Integer type) {
this.type = type;
if(type != null){
putQueryParameter("Type", type.toString());
}
}
public Integer getPageNum() {
return this.pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
if(pageNum != null){
putQueryParameter("PageNum", pageNum.toString());
}
}
public String getSortFiled() {
return this.sortFiled;
}
public void setSortFiled(String sortFiled) {
this.sortFiled = sortFiled;
if(sortFiled != null){
putQueryParameter("SortFiled", sortFiled);
}
}
public Integer getPageSize() {
return this.pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
if(pageSize != null){
putQueryParameter("PageSize", pageSize.toString());
}
}
public String getSortOrder() {
return this.sortOrder;
}
public void setSortOrder(String sortOrder) {
this.sortOrder = sortOrder;
if(sortOrder != null){
putQueryParameter("SortOrder", sortOrder);
}
}
public Integer getStatus() {
return this.status;
}
public void setStatus(Integer status) {
this.status = status;
if(status != null){
putQueryParameter("Status", status.toString());
}
}
@Override
public Class<QueryIntentionListResponse> getResponseClass() {
return QueryIntentionListResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
78c83179ea1e3d1d269fdc359989ade997a0116f
|
a1f6786f150ae75cf9bbdcd177d2a2ae60718a8f
|
/src/main/java/com/alipay/simplehbase/client/rowkey/IntRowKey.java
|
c15270c54ff0d387fa5d58ecc854face0fbed318
|
[] |
no_license
|
lmy86263/simplehbase
|
a52b5254cba2e659f137a2d69f71ba54908f1803
|
34746d4d28bb5cbf65e2c2109483d80be4955b71
|
refs/heads/master
| 2020-03-26T10:10:58.707184
| 2018-08-15T02:03:44
| 2018-08-15T02:03:44
| 144,785,088
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 959
|
java
|
package com.alipay.simplehbase.client.rowkey;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.hadoop.hbase.util.Bytes;
import com.alipay.simplehbase.client.RowKey;
/**
* IntRowKey.
*
* @author xinzhi.zhang
* */
public class IntRowKey implements RowKey {
private int value;
public IntRowKey(int value) {
this.value = value;
}
@Override
public byte[] toBytes() {
return Bytes.toBytes(value);
}
@Override
public boolean equals(Object obj) {
return EqualsBuilder.reflectionEquals(this, obj);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}
|
[
"xinzhi.zhang@alipay.com"
] |
xinzhi.zhang@alipay.com
|
02c6b089c5adfa9b802861ef058e0bc41db85576
|
1d61ca0702192a661189212f9e9920671fc34117
|
/src/main/java/com/bewitchment/common/divination/fortunes/FortuneMeetParrot.java
|
90ae3e18590afbea200d8da08110989fc46590eb
|
[
"MIT"
] |
permissive
|
Hellhound732/Bewitchment
|
6895f14564b08c6e25ae117b1415a6d0705fb3dd
|
aa4ea1d5d8e6235db36bbf307dadcf6c9852013d
|
refs/heads/master
| 2020-03-25T05:45:07.940895
| 2018-08-03T13:58:12
| 2018-08-03T13:58:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,412
|
java
|
package com.bewitchment.common.divination.fortunes;
import com.bewitchment.common.divination.Fortune;
import net.minecraft.entity.passive.EntityParrot;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.math.BlockPos;
public class FortuneMeetParrot extends Fortune {
public FortuneMeetParrot(int weight, String name, String modid) {
super(weight, name, modid);
}
@Override
public boolean canBeUsedFor(EntityPlayer player) {
return true;
}
@Override
public boolean canShouldBeAppliedNow(EntityPlayer player) {
return player.dimension != 1 && player.dimension != -1 && player.getRNG().nextDouble() < 0.0001;
}
@Override
public boolean apply(EntityPlayer player) {
for (int i = 0; i < 10; i++) {
BlockPos pos = new BlockPos(player.posX + player.getRNG().nextGaussian() * 4, player.posY, player.posZ + player.getRNG().nextGaussian() * 4);
EntityParrot parrot = new EntityParrot(player.world);
if (player.world.isAirBlock(pos) && player.world.isAirBlock(pos.up()) && player.world.getBlockState(pos.down()).canEntitySpawn(parrot)) {
parrot.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5);
parrot.onInitialSpawn(player.world.getDifficultyForLocation(pos), null);
parrot.setTamedBy(player);
player.world.spawnEntity(parrot);
return true;
}
}
return false;
}
@Override
public boolean isNegative() {
return false;
}
}
|
[
"eyespot7b@aol.com"
] |
eyespot7b@aol.com
|
36707d4d21bac5b54098bdf23640c13b302fd00b
|
ebf05b71257f57afd23bf2980e1d4c8d9f473abe
|
/src/main/java/com/lambkit/component/shiro/freemarker/PermissionTag.java
|
6abb463a31e0ea1110cd9eafa97d34da64de5f4a
|
[
"Apache-2.0"
] |
permissive
|
gismaker/lambkit-jdk1.7
|
c71784530d6d83d8ac6e8c50fbaa36043c9e136b
|
3596a99d79f78d17cde44923a3fb4a716ea4acef
|
refs/heads/master
| 2020-05-16T16:45:51.695274
| 2019-04-24T07:19:22
| 2019-04-24T07:19:22
| 183,171,898
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,839
|
java
|
/**
* Copyright (c) 2015-2017, Henry Yang 杨勇 (gismail@foxmail.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.lambkit.component.shiro.freemarker;
import freemarker.core.Environment;
import freemarker.template.TemplateDirectiveBody;
import freemarker.template.TemplateException;
import freemarker.template.TemplateModelException;
import java.io.IOException;
import java.util.Map;
/**
* <p>Equivalent to {@link org.apache.shiro.web.tags.PermissionTag}</p>
*/
public abstract class PermissionTag extends SecureTag {
String getName(Map params) {
return getParam(params, "name");
}
@Override
protected void verifyParameters(Map params) throws TemplateModelException {
String permission = getName(params);
if (permission == null || permission.length() == 0) {
throw new TemplateModelException("The 'name' tag attribute must be set.");
}
}
@Override
public void render(Environment env, Map params, TemplateDirectiveBody body) throws IOException, TemplateException {
String p = getName(params);
boolean show = showTagBody(p);
if (show) {
renderBody(env, body);
}
}
protected boolean isPermitted(String p) {
return getSubject() != null && getSubject().isPermitted(p);
}
protected abstract boolean showTagBody(String p);
}
|
[
"gismail@foxmail.com"
] |
gismail@foxmail.com
|
fd69b010a0d63207174a320ecdd13c833643e3d5
|
a0c680b5f17882de7ca58e1d742e5a1829907ca3
|
/IOCProj28(BeanPostProcessor)/src/com/nt/service/StudCustService.java
|
2604f19f3bfae4232039354cc9b1340a016e0def
|
[] |
no_license
|
aakulasaikiran/Spring_Ntsp47
|
ed72cf795a77dfb55e0054b627244a18fbfa776f
|
0b1a9cfb9e75e465eca8f1c39eb1690caefea91e
|
refs/heads/master
| 2020-03-23T15:24:15.955366
| 2018-07-20T18:39:45
| 2018-07-20T18:39:45
| 141,745,936
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 897
|
java
|
package com.nt.service;
import java.util.Date;
import com.nt.bo.CustomerBO;
import com.nt.bo.StudentBO;
import com.nt.dao.StudCustDAO;
public abstract class StudCustService {
private StudCustDAO dao;
public StudCustService() {
System.out.println("StudCustService:0-paaram constructor");
}
public void setDao(StudCustDAO dao) {
this.dao = dao;
}
public abstract StudentBO createStudentBO();
public abstract CustomerBO createCustomerBO();
public void processStudent(int no,String name,String course){
//get StudentBO obj
StudentBO bo=createStudentBO();
bo.setId(no); bo.setName(name); bo.setCourse(course);
//use DAo
dao.insertStudent(bo);
}
public void processCustomer(int no,String name,float billAmt){
//get StudentBO obj
CustomerBO bo=createCustomerBO();
bo.setId(no); bo.setName(name); bo.setBillAmt(billAmt);
//use DAo
dao.insertCustomer(bo);
}
}
|
[
"aakulasaikiran@gmail.com"
] |
aakulasaikiran@gmail.com
|
a7cfa69a97b7ba2075b844748e597d179d097ff8
|
dddb58f17159101bdd863840c0729a30480e9854
|
/gulimail-product/src/main/java/com/demo/gulimail/product/entity/SkuSaleAttrValueEntity.java
|
39514c56b6ecdcfebb0e1b9332338a41c2310bd8
|
[] |
no_license
|
1119878190/gulimail
|
460ddee2f2ffc1e34056b088ea25cb74a91226a6
|
4b1160a847450e52be29fd70bddfa74579aa5b44
|
refs/heads/main
| 2023-06-20T13:23:59.643095
| 2021-07-20T12:00:58
| 2021-07-20T12:00:58
| 353,714,879
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 781
|
java
|
package com.demo.gulimail.product.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* sku销售属性&值
*
* @author lx
* @email 1119878190@qq.com
* @date 2021-04-02 10:02:53
*/
@Data
@TableName("pms_sku_sale_attr_value")
public class SkuSaleAttrValueEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* sku_id
*/
private Long skuId;
/**
* attr_id
*/
private Long attrId;
/**
* 销售属性名
*/
private String attrName;
/**
* 销售属性值
*/
private String attrValue;
/**
* 顺序
*/
private Integer attrSort;
}
|
[
"1119878190@qq.com"
] |
1119878190@qq.com
|
9437e30ab9274384f87f3721c013bd6a3eb57d45
|
6252c165657baa6aa605337ebc38dd44b3f694e2
|
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/TemperatureController3517.java
|
dda222d4c484364847f43f4a91dfe5805d0dcc3a
|
[] |
no_license
|
soha500/EglSync
|
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
|
55101bc781349bb14fefc178bf3486e2b778aed6
|
refs/heads/master
| 2021-06-23T02:55:13.464889
| 2020-12-11T19:10:01
| 2020-12-11T19:10:01
| 139,832,721
| 0
| 1
| null | 2019-05-31T11:34:02
| 2018-07-05T10:20:00
|
Java
|
UTF-8
|
Java
| false
| false
| 367
|
java
|
package syncregions;
public class TemperatureController3517 {
public execute(int temperature3517, int targetTemperature3517) {
//sync _bfpnFUbFEeqXnfGWlV3517, behaviour
1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0;
//endSync
}
}
|
[
"sultanalmutairi@172.20.10.2"
] |
sultanalmutairi@172.20.10.2
|
5aaff2fcaaf3e426945547f710a9906dd7a8b5f6
|
dd90264bbfb79700d1d32effc207b555c29f3bcf
|
/2018-work/fiance_miscroservice/miscroservice_task_scheduling/src/test/reback/RateMeterTest.java
|
9f5983905be28d6c07c9da03905d9a91583ade01
|
[] |
no_license
|
tomzhang/other_workplace
|
8cead3feda7e9f067412da8252d83da56a000b51
|
9b5beaf4ed3586e6037bd84968c6a407a8635e16
|
refs/heads/master
| 2020-04-22T22:18:23.913665
| 2019-01-26T03:36:19
| 2019-01-26T03:36:19
| 170,703,419
| 1
| 0
| null | 2019-02-14T14:23:21
| 2019-02-14T14:23:20
| null |
UTF-8
|
Java
| false
| false
| 642
|
java
|
package com.finace.miscroservice;
import com.google.common.util.concurrent.RateLimiter;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
public class RateMeterTest {
AtomicInteger atomicInteger = new AtomicInteger();
RateLimiter limiter = RateLimiter.create(10);
public void send() {
limiter.acquire();
System.out.println("into.." + atomicInteger.getAndIncrement());
}
public static void main(String[] args) {
RateMeterTest rateLimiter = new RateMeterTest();
for (int i = 0; i < 100; i++) {
rateLimiter.send();
}
}
}
|
[
"Pj879227577"
] |
Pj879227577
|
d944bd8048ddd81c435df198dfffafeba6547c83
|
3ca934c5e29147bffc57a7212a450681d12b12ce
|
/Code/functional-testing/desktop-page-objects/src/main/java/com/hotwire/selenium/desktop/us/results/hotel/fragments/filters/HotelResultsFilteringTabsPanelFragment.java
|
080330a45e719f262a261701c3718068f0f84006
|
[] |
no_license
|
amitoj/spring_cucumber
|
8af821fd183e8a1ce049a3dc326dac9d80fc3e9a
|
fd4d207bca1645fb6f0465d1e016bfc607b39b43
|
refs/heads/master
| 2020-09-04T00:23:35.762856
| 2017-04-19T15:27:51
| 2017-04-19T15:27:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,865
|
java
|
/*
* Copyright 2013 Hotwire. All Rights Reserved.
*
* This software is the proprietary information of Hotwire.
* Use is subject to license terms.
*/
package com.hotwire.selenium.desktop.us.results.hotel.fragments.filters;
import com.hotwire.util.webdriver.po.AbstractPageObject;
import com.hotwire.util.webdriver.ui.WebDriverWait;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.ui.ExpectedConditions;
import java.util.List;
/**
* HotelResultsFilteringTabsPanelFragment
*/
public abstract class HotelResultsFilteringTabsPanelFragment extends AbstractPageObject {
protected static final int RECOMMENDED_RADIO_FILTER_INDEX = 3;
protected static final int DEFAULT_WAIT = 10;
private static final String FILTERING_RADIO_BUTTONS = ".//input[@type='radio']";
private static final String FILTERING_CHECKBOXES = ".//input[@type='checkbox']";
private static final String NEXT_FILTER_FRAGMENT = " .nextFilter a";
private static final String SUBMIT_BUTTON = ".//button[@type='submit']";
@FindBy(xpath = FILTERING_CHECKBOXES)
protected List<WebElement> filteringCheckboxes;
@FindBy(xpath = FILTERING_RADIO_BUTTONS)
private List<WebElement> filteringRadios;
@FindBy(css = NEXT_FILTER_FRAGMENT)
private WebElement nextFilterFragment;
@FindBy(xpath = SUBMIT_BUTTON)
private WebElement lastFilterFragmentSubmitButton;
HotelResultsFilteringTabsPanelFragment(WebDriver webDriver, By container) {
super(webDriver, container);
}
protected WebElement getRecommendedRadioWebElement() {
return filteringRadios.get(RECOMMENDED_RADIO_FILTER_INDEX);
}
protected WebElement getFirstFilteringCheckboxElement() {
return filteringCheckboxes.get(0);
}
public void checkFirstFilteringCheckbox() {
WebElement checkbox = getFirstFilteringCheckboxElement();
if (!checkbox.isSelected()) {
checkbox.click();
doWaitForUpdatingLayer();
}
}
public void uncheckFirstFilteringCheckbox() {
WebElement checkbox = getFirstFilteringCheckboxElement();
if (checkbox.isSelected()) {
checkbox.click();
doWaitForUpdatingLayer();
}
}
public void selectRecommendedRadioButton() {
getRecommendedRadioWebElement().click();
doWaitForUpdatingLayer();
}
public void submitFilteringChoice() {
lastFilterFragmentSubmitButton.click();
}
public void doWaitForUpdatingLayer() {
By locator = By.cssSelector("div[id='updatingLayer'] .loadingMask");
new WebDriverWait(getWebDriver(), DEFAULT_WAIT + 10)
.until(ExpectedConditions.invisibilityOfElementLocated(locator));
}
}
|
[
"jiniguez@foundationmedicine.com"
] |
jiniguez@foundationmedicine.com
|
55b8f9e069cbcf8fd18a9b3afd5a6996a51f7770
|
26a287fbeb3b523f095fab4749312bc934326a6c
|
/guoren-market-service/src/main/java/com/gop/user/service/UserInfoService.java
|
e6525e198014a998ab725479f84fa6832ce65da9
|
[] |
no_license
|
HuangTianJie/Tonney
|
9f42cbf97a3cd046d7b2fa1c509865cd25266108
|
bb5e08dd752b1d7434736abaa72c7dddb086300b
|
refs/heads/master
| 2020-03-22T15:20:45.300456
| 2018-12-27T10:02:51
| 2018-12-27T10:02:51
| 140,245,519
| 4
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 204
|
java
|
package com.gop.user.service;
import com.gop.domain.UserInfo;
public interface UserInfoService {
public UserInfo selectByPrimaryKey(Integer uid);
public void insertSelective(UserInfo userInfo);
}
|
[
"tianjie.huang@mbasechain.com"
] |
tianjie.huang@mbasechain.com
|
335aba7db1602f634aa7041a95e6faefd0c45d92
|
0bfd35893ec68c908ed928551ce0839ed36d78ac
|
/work/src/org/kuali/kfs/module/cam/businessobject/AssetPaymentAssetDetail.java
|
afd32d552da92dda535691b5aa974eb9701bb6b2
|
[] |
no_license
|
dazali/kfs_dataobject_restservice
|
06f8464f65f6c232828f337dc2aabbfe8298f240
|
434272c1f58564802e59f1038e5239324fe14cfa
|
refs/heads/master
| 2020-12-25T10:36:35.663227
| 2014-07-28T19:07:28
| 2014-07-28T19:07:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,646
|
java
|
/*
* Copyright 2008 The Kuali Foundation
*
* Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
*
* 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.kuali.kfs.module.cam.businessobject;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import org.kuali.kfs.sys.businessobject.FinancialSystemDocumentHeader;
import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
public class AssetPaymentAssetDetail extends PersistableBusinessObjectBase {
private String documentNumber;
private Long capitalAssetNumber;
private KualiDecimal previousTotalCostAmount;
private KualiDecimal allocatedAmount = KualiDecimal.ZERO;
private KualiDecimal allocatedUserValue = KualiDecimal.ZERO;
private BigDecimal allocatedUserValuePct = BigDecimal.ZERO;
private Asset asset;
private List<AssetPaymentDetail> assetPaymentDetails;
private FinancialSystemDocumentHeader documentHeader;
public AssetPaymentAssetDetail() {
this.assetPaymentDetails = new ArrayList<AssetPaymentDetail>();
this.documentHeader = new FinancialSystemDocumentHeader();
}
public Long getCapitalAssetNumber() {
return capitalAssetNumber;
}
public void setCapitalAssetNumber(Long capitalAssetNumber) {
this.capitalAssetNumber = capitalAssetNumber;
}
public String getDocumentNumber() {
return documentNumber;
}
public void setDocumentNumber(String documentNumber) {
this.documentNumber = documentNumber;
}
public KualiDecimal getPreviousTotalCostAmount() {
return previousTotalCostAmount;
}
public void setPreviousTotalCostAmount(KualiDecimal previousTotalCostAmount) {
this.previousTotalCostAmount = previousTotalCostAmount;
}
public Asset getAsset() {
return asset;
}
public void setAsset(Asset asset) {
this.asset = asset;
}
protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
if (this.documentNumber != null) {
m.put("documentNumber", this.documentNumber.toString());
}
if (this.capitalAssetNumber != null) {
m.put("capitalAssetNumber", this.capitalAssetNumber.toString());
}
return m;
}
public List<AssetPaymentDetail> getAssetPaymentDetails() {
return assetPaymentDetails;
}
public void setAssetPaymentDetails(List<AssetPaymentDetail> assetPaymentDetails) {
this.assetPaymentDetails = assetPaymentDetails;
}
public FinancialSystemDocumentHeader getDocumentHeader() {
return documentHeader;
}
public void setDocumentHeader(FinancialSystemDocumentHeader documentHeader) {
this.documentHeader = documentHeader;
}
/**
* Get the allocated amount
*/
public KualiDecimal getAllocatedAmount() {
return allocatedAmount;
}
/**
* Set the allocated amount
*/
public void setAllocatedAmount(KualiDecimal allocatedAmount) {
this.allocatedAmount = allocatedAmount;
}
/**
* Set the value the user allocates when editable
*/
public void setAllocatedUserValue(KualiDecimal allocatedUserValue) {
this.allocatedUserValue = allocatedUserValue;
setAllocatedAmount(allocatedUserValue);
}
/**
* Get the value the user allocates when editable
*/
public KualiDecimal getAllocatedUserValue() {
return allocatedUserValue;
}
/**
* Return the New total allocation amount
* @return
*/
public KualiDecimal getNewTotal() {
return getAllocatedAmount().add(getPreviousTotalCostAmount());
}
/**
* Return the percent invariant value if percentages are used
*/
public BigDecimal getAllocatedUserValuePct() {
return allocatedUserValuePct;
}
/**
* Sets the percent invariant value if percentages are used
*/
public void setAllocatedUserValuePct(BigDecimal allocatedUserValuePct) {
this.allocatedUserValuePct = allocatedUserValuePct;
}
}
|
[
"dazali@8e488046-810e-0410-995a-d32c8891de31"
] |
dazali@8e488046-810e-0410-995a-d32c8891de31
|
2e9d4a3286ea30f6e843a4a0015a1e0a03cdf356
|
6753facd5f982d59751deab66604ad8463a04d21
|
/Sources/oo/Application.java
|
69e8aa6b722d7b5e20cb415d3b693eae985c9220
|
[] |
no_license
|
thegreatescape/website
|
45e9d3600a5e237f2489659c71fa33a540d3e070
|
ae2504b85e93f90cb22498bebb736da364da55e8
|
refs/heads/master
| 2021-01-22T12:17:21.894548
| 2013-04-21T17:02:53
| 2013-04-21T17:02:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 325
|
java
|
package oo;
import er.extensions.appserver.ERXApplication;
public class Application extends ERXApplication {
public static void main( String[] argv ) {
ERXApplication.main( argv, Application.class );
}
public Application() {
setDefaultRequestHandler( requestHandlerForKey( directActionRequestHandlerKey() ) );
}
}
|
[
"hugi@karlmenn.is"
] |
hugi@karlmenn.is
|
81f1671d77f16e03e4356ba1ceb3d8b2f4b621cd
|
f58f413acdd6127ad0ca4267f445393ed34cdf0f
|
/XianJinDai101/ruishua/build/generated/source/kapt/debug/com/ryx/payment/ruishua/bindcard/MyBindCardItemActivity_.java
|
bebb9dc94902877ec5acc6a5dafeea8f1f05bd5c
|
[] |
no_license
|
showdpro/project
|
798f6dc3a428e0ffc1a6411debf225428f6a5441
|
8f1df7ed9b2d368467636b521d5e59989ecd85ac
|
refs/heads/master
| 2021-07-25T11:59:50.383484
| 2017-10-30T08:37:22
| 2017-10-30T08:37:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,938
|
java
|
//
// DO NOT EDIT THIS FILE.
// Generated using AndroidAnnotations 4.3.0.
//
// You can create a larger work that contains this file and distribute that work under terms of your choice.
//
package com.ryx.payment.ruishua.bindcard;
import android.app.Activity;
import android.content.Context;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import com.rey.material.widget.Button;
import com.ryx.payment.ruishua.R;
import com.ryx.payment.ruishua.bindcard.adapter.MyBindCardItemActAdapter_;
import org.androidannotations.api.builder.ActivityIntentBuilder;
import org.androidannotations.api.builder.PostActivityStarter;
import org.androidannotations.api.view.HasViews;
import org.androidannotations.api.view.OnViewChangedListener;
import org.androidannotations.api.view.OnViewChangedNotifier;
public final class MyBindCardItemActivity_
extends MyBindCardItemActivity
implements HasViews, OnViewChangedListener
{
private final OnViewChangedNotifier onViewChangedNotifier_ = new OnViewChangedNotifier();
@Override
public void onCreate(Bundle savedInstanceState) {
OnViewChangedNotifier previousNotifier = OnViewChangedNotifier.replaceNotifier(onViewChangedNotifier_);
init_(savedInstanceState);
super.onCreate(savedInstanceState);
OnViewChangedNotifier.replaceNotifier(previousNotifier);
setContentView(R.layout.activity_my_bind_card_item);
}
private void init_(Bundle savedInstanceState) {
OnViewChangedNotifier.registerOnViewChangedListener(this);
this.myBindCardItemActAdapter = MyBindCardItemActAdapter_.getInstance_(this);
}
@Override
public void setContentView(int layoutResID) {
super.setContentView(layoutResID);
onViewChangedNotifier_.notifyViewChanged(this);
}
@Override
public void setContentView(View view, LayoutParams params) {
super.setContentView(view, params);
onViewChangedNotifier_.notifyViewChanged(this);
}
@Override
public void setContentView(View view) {
super.setContentView(view);
onViewChangedNotifier_.notifyViewChanged(this);
}
public static MyBindCardItemActivity_.IntentBuilder_ intent(Context context) {
return new MyBindCardItemActivity_.IntentBuilder_(context);
}
public static MyBindCardItemActivity_.IntentBuilder_ intent(android.app.Fragment fragment) {
return new MyBindCardItemActivity_.IntentBuilder_(fragment);
}
public static MyBindCardItemActivity_.IntentBuilder_ intent(android.support.v4.app.Fragment supportFragment) {
return new MyBindCardItemActivity_.IntentBuilder_(supportFragment);
}
@Override
public void onViewChanged(HasViews hasViews) {
this.mybindcardlistview = ((ListView) hasViews.findViewById(R.id.mybindcardlistview));
this.iv_logo = ((ImageView) hasViews.findViewById(R.id.iv_logo));
this.tv_bankname = ((TextView) hasViews.findViewById(R.id.tv_bankname));
this.tv_bankno = ((TextView) hasViews.findViewById(R.id.tv_bankno));
this.tv_kuai = ((TextView) hasViews.findViewById(R.id.tv_kuai));
this.tv_dai = ((TextView) hasViews.findViewById(R.id.tv_dai));
this.tv_debitcard = ((TextView) hasViews.findViewById(R.id.tv_debitcard));
this.daifustatus_nosupport = ((TextView) hasViews.findViewById(R.id.daifustatus_nosupport));
this.bt_setdefaultcard = ((Button) hasViews.findViewById(R.id.bt_setdefaultcard));
this.bt_cancledefaultcard = ((Button) hasViews.findViewById(R.id.bt_cancledefaultcard));
View view_my_unbind_btn = hasViews.findViewById(R.id.my_unbind_btn);
if (view_my_unbind_btn!= null) {
view_my_unbind_btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
MyBindCardItemActivity_.this.unbindBtnClick();
}
}
);
}
if (this.bt_setdefaultcard!= null) {
this.bt_setdefaultcard.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
MyBindCardItemActivity_.this.setdefaultcardBtnClick();
}
}
);
}
if (this.bt_cancledefaultcard!= null) {
this.bt_cancledefaultcard.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
MyBindCardItemActivity_.this.cancledefaulBtnClick();
}
}
);
}
afterInitView();
}
public static class IntentBuilder_
extends ActivityIntentBuilder<MyBindCardItemActivity_.IntentBuilder_>
{
private android.app.Fragment fragment_;
private android.support.v4.app.Fragment fragmentSupport_;
public IntentBuilder_(Context context) {
super(context, MyBindCardItemActivity_.class);
}
public IntentBuilder_(android.app.Fragment fragment) {
super(fragment.getActivity(), MyBindCardItemActivity_.class);
fragment_ = fragment;
}
public IntentBuilder_(android.support.v4.app.Fragment fragment) {
super(fragment.getActivity(), MyBindCardItemActivity_.class);
fragmentSupport_ = fragment;
}
@Override
public PostActivityStarter startForResult(int requestCode) {
if (fragmentSupport_!= null) {
fragmentSupport_.startActivityForResult(intent, requestCode);
} else {
if (fragment_!= null) {
if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
fragment_.startActivityForResult(intent, requestCode, lastOptions);
} else {
fragment_.startActivityForResult(intent, requestCode);
}
} else {
if (context instanceof Activity) {
Activity activity = ((Activity) context);
ActivityCompat.startActivityForResult(activity, intent, requestCode, lastOptions);
} else {
if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
context.startActivity(intent, lastOptions);
} else {
context.startActivity(intent);
}
}
}
}
return new PostActivityStarter(context);
}
}
}
|
[
"gdutxiaoxu@163.com"
] |
gdutxiaoxu@163.com
|
91fe62aea3f314da487876f895d1a3d2abb75ec3
|
2cbd30d060564bba43c35985be1dcb17f159d946
|
/Loader/loader/texture/ParticleTexture.java
|
358591b2f005662e24e11a8b159d5e7014d6b062
|
[] |
no_license
|
TroyNeubauer/The-Dungeon-Looter
|
6ea1e4008ff70adfc49ed9321faa0e4be3c26e37
|
cf68a047d94687de7942a13d8740f385e4c762a3
|
refs/heads/master
| 2021-01-11T03:15:36.429995
| 2016-12-26T07:00:39
| 2016-12-26T07:00:39
| 71,078,897
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 579
|
java
|
package loader.texture;
import com.troy.troyberry.util.MyFile;
public class ParticleTexture extends TextureAtlas2D {
public ParticleTexture(MyFile path, TextureBuilder builder,
int numberOfRows) {
super(path, builder, numberOfRows);
}
public ParticleTexture(MyFile path, int numberOfRows) {
super(path, numberOfRows);
}
public ParticleTexture(String path, int numberOfRows) {
super(path, numberOfRows);
}
public ParticleTexture(String path, TextureBuilder builder,
int numberOfRows) {
super(path, builder, numberOfRows);
}
}
|
[
"troyneubauer@gmail.com"
] |
troyneubauer@gmail.com
|
e0069873f3d6355aa72e38f4951fe13e96ec0bcf
|
c78d28c5ea6326a7421ad2e472b1f7688b2695a6
|
/JPA/src/main/java/com/sjl/jpa/model/Order.java
|
7735f77832c30845a5dad9e6a2395076ddd1b760
|
[] |
no_license
|
q1113225201/spring
|
db02b22bbd0e3d5af8c4f4f7fe3e66f2401a254d
|
fc9f9eba8ed9b022c70e03e6c46f565813eb3a26
|
refs/heads/master
| 2020-04-30T15:03:55.800804
| 2019-03-25T15:35:41
| 2019-03-25T15:35:41
| 176,909,781
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 811
|
java
|
package com.sjl.jpa.model;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Entity
@Table(name = "t_order")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Order implements Serializable {
@Id
@GeneratedValue
private Long id;
@ManyToMany
@JoinTable(name = "t_order_product")
private List<Product> products;
@Column(nullable = false)
private Integer state;
@Column(updatable = false)
@CreationTimestamp
private Date createTime;
@UpdateTimestamp
private Date updateTime;
}
|
[
"1113225201@qq.com"
] |
1113225201@qq.com
|
dc3c3b5673546df04c5de1b2f4f311e1c64fd2f9
|
812be6b9d1ba4036652df166fbf8662323f0bdc9
|
/java/Dddml.Wms.JavaCommon/src/generated/java/org/dddml/wms/domain/statusitem/StatusItemStateQueryRepository.java
|
8e27d009378749ab0528c1ba116367a7fdb03fc7
|
[] |
no_license
|
lanmolsz/wms
|
8503e54a065670b48a15955b15cea4926f05b5d6
|
4b71afd80127a43890102167a3af979268e24fa2
|
refs/heads/master
| 2020-03-12T15:10:26.133106
| 2018-09-27T08:28:05
| 2018-09-27T08:28:05
| 130,684,482
| 0
| 0
| null | 2018-04-23T11:11:24
| 2018-04-23T11:11:24
| null |
UTF-8
|
Java
| false
| false
| 1,057
|
java
|
package org.dddml.wms.domain.statusitem;
import java.util.Map;
import java.util.List;
import org.dddml.support.criterion.Criterion;
import java.util.Date;
import org.dddml.wms.domain.*;
public interface StatusItemStateQueryRepository
{
StatusItemState get(String id);
Iterable<StatusItemState> getAll(Integer firstResult, Integer maxResults);
Iterable<StatusItemState> get(Iterable<Map.Entry<String, Object>> filter, List<String> orders, Integer firstResult, Integer maxResults);
Iterable<StatusItemState> get(Criterion filter, List<String> orders, Integer firstResult, Integer maxResults);
StatusItemState getFirst(Iterable<Map.Entry<String, Object>> filter, List<String> orders);
StatusItemState getFirst(Map.Entry<String, Object> keyValue, List<String> orders);
Iterable<StatusItemState> getByProperty(String propertyName, Object propertyValue, List<String> orders, Integer firstResult, Integer maxResults);
long getCount(Iterable<Map.Entry<String, Object>> filter);
long getCount(Criterion filter);
}
|
[
"yangjiefeng@gmail.com"
] |
yangjiefeng@gmail.com
|
e9e428cbf997a47af9e01713d82ed078e7c64a28
|
489a56de7fce32f0c5fdcfa916da891047c7712b
|
/gewara-new/src/main/java/com/gewara/model/content/Picture.java
|
eae93ad11cb6239717e52850013c8dc251d18948
|
[] |
no_license
|
xie-summer/GWR
|
f5506ea6f41800788463e33377d34ebefca21c01
|
0894221d00edfced294f1f061c9f9e6aa8d51617
|
refs/heads/master
| 2021-06-22T04:45:17.720266
| 2017-06-15T09:48:32
| 2017-06-15T09:48:32
| 89,137,292
| 2
| 3
| null | null | null | null |
GB18030
|
Java
| false
| false
| 3,579
|
java
|
package com.gewara.model.content;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang.StringUtils;
import com.gewara.model.BaseObject;
/**
* @author <a href="mailto:acerge@163.com">gebiao(acerge)</a>
* @since 2007-10-9上午08:57:47
*/
public class Picture extends BaseObject{
private static final long serialVersionUID = 4914995483381697551L;
private Long id;
private String tag;//类型标签
private Long relatedid;//相关Id
private String picturename;//图片名称
private String description;//描述
private String category;
private Long categoryid;
private String name;
private Timestamp posttime;//发布时间
private Long memberid;//专区用户名
private String memberType;
private Integer clickedtimes;
@Override
public Serializable realId() {
return id;
}
public Integer getClickedtimes() {
return clickedtimes;
}
public void setClickedtimes(Integer clickedtimes) {
this.clickedtimes = clickedtimes;
}
public Long getMemberid() {
return memberid;
}
public void setMemberid(Long memberid) {
this.memberid = memberid;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public Picture() {}
public Picture(String tag) {
this.tag = tag;
this.posttime=new Timestamp(System.currentTimeMillis());
this.clickedtimes = 0;
}
public Picture(String tag, Long relatedid){
this(tag);
this.relatedid = relatedid;
}
public Picture(String tag, Long relatedid, String picturename, String description){
this(tag, relatedid);
this.picturename = picturename;
this.description = description;
if(StringUtils.isNotBlank(description)){
this.name = description.substring(0,description.length()>50?50:description.length());
}
}
public Picture(String tag, Long relatedid, Long memberid, String picturename){
this(tag, relatedid);
this.tag = tag;
this.relatedid = relatedid;
this.memberid = memberid;
this.picturename = picturename;
this.posttime=new Timestamp(System.currentTimeMillis());
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public void setDescription(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
public String getPicturename() {
return picturename;
}
public void setPicturename(String picturename) {
this.picturename = picturename;
}
public Long getRelatedid() {
return relatedid;
}
public void setRelatedid(Long relatedid) {
this.relatedid = relatedid;
}
public String getLogo(){
return this.picturename;
}
public String getLimg() {
return picturename;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Timestamp getPosttime() {
return posttime;
}
public void setPosttime(Timestamp posttime) {
this.posttime = posttime;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public Long getCategoryid() {
return categoryid;
}
public void setCategoryid(Long categoryid) {
this.categoryid = categoryid;
}
public String getMemberType() {
return memberType;
}
public void setMemberType(String memberType) {
this.memberType = memberType;
}
public boolean hasMemberType(String type){
return StringUtils.equals(this.memberType, type);
}
}
|
[
"xieshengrong@live.com"
] |
xieshengrong@live.com
|
723bc0db431db18ee284197bc11155dfa0cf0535
|
fb81bb35a07273a24311bfa1004f22c2ed8d755f
|
/WEB-INF/src/com/krishagni/catissueplus/core/administrative/repository/impl/ContainerTaskDaoImpl.java
|
0ecc4ef21f3564724b972f929de05d947c878291
|
[
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown"
] |
permissive
|
krishagni/openspecimen
|
8f3381481ce5afc0e0096822510f3fcf4fe1a67f
|
25035133d946d3c15f18773172a6df4b0b9c2c7b
|
refs/heads/master
| 2023-08-20T16:27:13.708738
| 2023-08-16T12:28:05
| 2023-08-16T12:28:05
| 22,343,235
| 56
| 62
|
BSD-3-Clause
| 2023-03-31T16:22:21
| 2014-07-28T13:23:37
|
Java
|
UTF-8
|
Java
| false
| false
| 1,849
|
java
|
package com.krishagni.catissueplus.core.administrative.repository.impl;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import com.krishagni.catissueplus.core.administrative.domain.ContainerTask;
import com.krishagni.catissueplus.core.administrative.repository.ContainerTaskDao;
import com.krishagni.catissueplus.core.administrative.repository.ContainerTaskListCriteria;
import com.krishagni.catissueplus.core.common.repository.AbstractDao;
import com.krishagni.catissueplus.core.common.repository.Criteria;
public class ContainerTaskDaoImpl extends AbstractDao<ContainerTask> implements ContainerTaskDao {
@Override
public Class<?> getType() {
return ContainerTask.class;
}
@Override
public List<ContainerTask> getTasks(ContainerTaskListCriteria crit) {
Criteria<ContainerTask> query = getTasksListQuery(crit);
return query.orderBy(query.asc("task.name")).list(crit.startAt(), crit.maxResults());
}
@Override
public Integer getTasksCount(ContainerTaskListCriteria crit) {
Criteria<ContainerTask> query = getTasksListQuery(crit);
return query.getCount("task.id").intValue();
}
@Override
public ContainerTask getByName(String name) {
return createNamedQuery(GET_BY_NAME, ContainerTask.class)
.setParameter("name", name)
.uniqueResult();
}
private Criteria<ContainerTask> getTasksListQuery(ContainerTaskListCriteria crit) {
Criteria<ContainerTask> query = createCriteria(ContainerTask.class, "task");
if (StringUtils.isNotBlank(crit.query())) {
query.add(query.ilike("task.name", crit.query()));
}
if (StringUtils.isNotBlank(crit.activityStatus())) {
query.add(query.eq("task.activityStatus", crit.activityStatus()));
}
return query;
}
private static final String FAQ = ContainerTask.class.getName();
private static final String GET_BY_NAME = FAQ + ".getByName";
}
|
[
"vinayakapawar@gmail.com"
] |
vinayakapawar@gmail.com
|
ba58d41782767759a18e454aae3dc0895a43b77d
|
022980735384919a0e9084f57ea2f495b10c0d12
|
/src/ext-cttdt-lltnxp/ext-impl/src/com/sgs/portlet/pmledm_filestatus/action/AddFileStatusOnedoorAction.java
|
b4109852c75f0fd7f2cbb25e3f31759f9a37047c
|
[] |
no_license
|
thaond/nsscttdt
|
474d8e359f899d4ea6f48dd46ccd19bbcf34b73a
|
ae7dacc924efe578ce655ddfc455d10c953abbac
|
refs/heads/master
| 2021-01-10T03:00:24.086974
| 2011-02-19T09:18:34
| 2011-02-19T09:18:34
| 50,081,202
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,313
|
java
|
package com.sgs.portlet.pmledm_filestatus.action;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletConfig;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.liferay.portal.PortalException;
import com.liferay.portal.SystemException;
import com.liferay.portal.kernel.servlet.SessionErrors;
import com.liferay.portal.kernel.upload.UploadPortletRequest;
import com.liferay.portal.kernel.util.Constants;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.struts.PortletAction;
import com.liferay.portal.util.PortalUtil;
import com.sgs.portlet.document.PmlFileStatusCodeSameCodeException;
import com.sgs.portlet.document.model.PmlFileStatus;
import com.sgs.portlet.document.service.PmlFileStatusLocalServiceUtil;
public class AddFileStatusOnedoorAction extends PortletAction{
private static final boolean _CHECK_METHOD_ON_PROCESS_ACTION = false;
protected boolean isCheckMethodOnProcessAction() {
return _CHECK_METHOD_ON_PROCESS_ACTION;
}
public void processAction(
ActionMapping mapping, ActionForm form, PortletConfig portletConfig,
ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {
String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
try {
// if (cmd.equals(Constants.ADD) || cmd.equals(Constants.UPDATE)) {
// updateFileStatus(actionRequest);
// }
if (cmd.equals(Constants.ADD)) {
createFileStatus(actionRequest);
}
sendRedirect(actionRequest, actionResponse);
} catch (Exception e) {
if (e instanceof PmlFileStatusCodeSameCodeException) {
actionRequest.setAttribute("filestatusFlag", "fail");
setForward(actionRequest, "portlet.sgs.pmledm_filestatus.add_filestatus_onedoor");
SessionErrors.add(actionRequest, e.getClass().getName());
}
else {
throw e;
}
}
}
public ActionForward render(
ActionMapping mapping, ActionForm form, PortletConfig portletConfig,
RenderRequest renderRequest, RenderResponse renderResponse)
throws Exception {
return mapping.findForward("portlet.sgs.pmledm_filestatus.add_filestatus_onedoor");
}
public PmlFileStatus createFileStatus(ActionRequest req) throws PortalException, SystemException {
UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(req);
String code = ParamUtil.getString(uploadRequest, "pml_edm_file_status_code");
String name = ParamUtil.getString(uploadRequest, "pml_edm_file_status_name");
String description = ParamUtil.getString(uploadRequest, "pml_edm_file_status_description");
Boolean active = ParamUtil.getBoolean(uploadRequest, "pml_edm_file_status_active");
String type = ParamUtil.getString(uploadRequest, "pml_edm_file_state_type");
PmlFileStatus fileStatus = null;
if (active) {
fileStatus = PmlFileStatusLocalServiceUtil.addFileStatus(code, name, description, "1", type);
}
else {
fileStatus = PmlFileStatusLocalServiceUtil.addFileStatus(code, name, description, "0", type);
}
return fileStatus;
}
}
|
[
"nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e"
] |
nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e
|
aa9165eac747f9e53a8107ea222a9e395c4cdbd4
|
e89dc01c95b8b45404f971517c2789fd21657749
|
/src/main/java/com/alipay/api/domain/PracticeEntity.java
|
aacab2cb8dc63b934603fc9b50d8490389e9ac7e
|
[
"Apache-2.0"
] |
permissive
|
guoweiecust/alipay-sdk-java-all
|
3370466eec70c5422c8916c62a99b1e8f37a3f46
|
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
|
refs/heads/master
| 2023-05-05T07:06:47.823723
| 2021-05-25T15:26:21
| 2021-05-25T15:26:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,213
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 做法模型
*
* @author auto create
* @since 1.0, 2018-11-21 14:21:15
*/
public class PracticeEntity extends AlipayObject {
private static final long serialVersionUID = 7353339779187155811L;
/**
* 做法id
*/
@ApiField("id")
private String id;
/**
* 商户id
*/
@ApiField("merchant_id")
private String merchantId;
/**
* 做法名称
*/
@ApiField("practice_name")
private String practiceName;
/**
* 门店id
*/
@ApiField("shop_id")
private String shopId;
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getMerchantId() {
return this.merchantId;
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
public String getPracticeName() {
return this.practiceName;
}
public void setPracticeName(String practiceName) {
this.practiceName = practiceName;
}
public String getShopId() {
return this.shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
b20a3342033454855c5d764d912d9b4b174a54c6
|
cffd4e2afaede5fcf0ff647b4e55a00493e711ed
|
/IJTest_1/src/net/imglib2/img/list/ListLocalizingCursor.java
|
bd494d60f02923cc52a28899e1e9a54ad6adb6d3
|
[] |
no_license
|
donaldlee2008/FURI_Code
|
f3d96d2037768f3e2b7cd4b3547db96e08fa6e44
|
5e1261c9bffb1ef49a60b4e8e2de6cf811df0dea
|
refs/heads/master
| 2021-01-13T12:38:07.839866
| 2013-04-25T17:18:34
| 2013-04-25T17:18:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,809
|
java
|
/*
* #%L
* ImgLib2: a general-purpose, multidimensional image processing library.
* %%
* Copyright (C) 2009 - 2012 Stephan Preibisch, Stephan Saalfeld, Tobias
* Pietzsch, Albert Cardona, Barry DeZonia, Curtis Rueden, Lee Kamentsky, Larry
* Lindsey, Johannes Schindelin, Christian Dietz, Grant Harris, Jean-Yves
* Tinevez, Steffen Jaensch, Mark Longair, Nick Perry, and Jan Funke.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of any organization.
* #L%
*/
package net.imglib2.img.list;
import net.imglib2.AbstractLocalizingCursorInt;
import net.imglib2.util.IntervalIndexer;
/**
* Localizing {@link Cursor} on a {@link ListImg}.
*
* @param <T>
* the pixel type
*
* @author Stephan Preibisch
* @author Stephan Saalfeld
* @author Tobias Pietzsch <tobias.pietzsch@gmail.com>
*/
final public class ListLocalizingCursor< T > extends AbstractLocalizingCursorInt< T >
{
private int i;
final private int maxNumPixels;
final private long[] max;
final private AbstractListImg< T > img;
public ListLocalizingCursor( final ListLocalizingCursor< T > cursor )
{
super( cursor.numDimensions() );
img = cursor.img;
maxNumPixels = cursor.maxNumPixels;
max = new long[ n ];
for ( int d = 0; d < n; ++d )
{
max[ d ] = cursor.max[ d ];
position[ d ] = cursor.position[ d ];
}
i = cursor.i;
}
public ListLocalizingCursor( final AbstractListImg< T > img )
{
super( img.numDimensions() );
this.img = img;
maxNumPixels = ( int ) img.size() - 1;
max = new long[ n ];
img.max( max );
reset();
}
@Override
public void fwd()
{
++i;
for ( int d = 0; d < n; d++ )
if ( ++position[ d ] > max[ d ] )
position[ d ] = 0;
else
break;
}
@Override
public void jumpFwd( final long steps )
{
i += steps;
IntervalIndexer.indexToPosition( i, img.dim, position );
}
@Override
public boolean hasNext()
{
return i < maxNumPixels;
}
@Override
public void reset()
{
i = -1;
position[ 0 ] = -1;
for ( int d = 1; d < n; d++ )
position[ d ] = 0;
}
@Override
public T get()
{
return img.get( i );
}
public void set( final T t )
{
img.set( i, t );
}
@Override
public ListLocalizingCursor< T > copy()
{
return new ListLocalizingCursor< T >( this );
}
@Override
public ListLocalizingCursor< T > copyCursor()
{
return copy();
}
}
|
[
"msteptoe@EN4085206.fulton.ad.asu.edu"
] |
msteptoe@EN4085206.fulton.ad.asu.edu
|
8edebaeb41e835c3be6339abc5bc32c34af7c62b
|
fc66f388d93b34cee0f1a99da69609155434b4f6
|
/src/test/java/de/alpharogroup/collections/pairs/ValueBoxTest.java
|
6022aba2a5cf5a7c2c79fdfdb3079984446c39fe
|
[
"MIT"
] |
permissive
|
jacquelineMorin/silly-collections
|
baaaf35ad2a879735e8c81d76cd032260c39bb7d
|
488cf9e011cdd05050c9223354a8f19006da8273
|
refs/heads/master
| 2021-01-13T05:49:34.982712
| 2016-09-03T17:01:16
| 2016-09-03T17:01:16
| 72,219,079
| 0
| 0
| null | 2016-10-28T15:25:08
| 2016-10-28T15:25:07
| null |
UTF-8
|
Java
| false
| false
| 1,861
|
java
|
/**
* The MIT License
*
* Copyright (C) 2015 Asterios Raptis
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package de.alpharogroup.collections.pairs;
import org.testng.AssertJUnit;
import org.testng.annotations.Test;
/**
* The test class {@link ValueBoxTest} is for the class {@link ValueBox}.
*/
public class ValueBoxTest
{
/**
* Test method for {@link ValueBox#equals(Object)}
*/
@Test
public void testEqualsObject()
{
final ValueBox<Integer> expected = new ValueBox<>(2);
final ValueBox<String> actual = new ValueBox<>("Hello");
AssertJUnit.assertNotSame(expected, actual);
final ValueBox<Integer> twoBox = new ValueBox<>(2);
AssertJUnit.assertEquals(expected, twoBox);
AssertJUnit.assertEquals(expected.hashCode(), twoBox.hashCode());
}
}
|
[
"asterios.raptis@gmx.net"
] |
asterios.raptis@gmx.net
|
7cde0ce207b5a5022661bfb6dabc73d6658b2965
|
f28dce60491e33aefb5c2187871c1df784ccdb3a
|
/src/main/java/com/tencent/open/web/security/a.java
|
29828016ec159643e7e5280f029cf6ac5f8fa102
|
[
"Apache-2.0"
] |
permissive
|
JackChan1999/boohee_v5.6
|
861a5cad79f2bfbd96d528d6a2aff84a39127c83
|
221f7ea237f491e2153039a42941a515493ba52c
|
refs/heads/master
| 2021-06-11T23:32:55.977231
| 2017-02-14T18:07:04
| 2017-02-14T18:07:04
| 81,962,585
| 8
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,452
|
java
|
package com.tencent.open.web.security;
import android.view.KeyEvent;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputConnectionWrapper;
import com.tencent.open.a.f;
/* compiled from: ProGuard */
public class a extends InputConnectionWrapper {
public static String a;
public static boolean b = false;
public static boolean c = false;
public a(InputConnection inputConnection, boolean z) {
super(inputConnection, z);
}
public boolean setComposingText(CharSequence charSequence, int i) {
c = true;
a = charSequence.toString();
f.b("CaptureInputConnection", "-->setComposingText: " + charSequence.toString());
return super.setComposingText(charSequence, i);
}
public boolean commitText(CharSequence charSequence, int i) {
c = true;
a = charSequence.toString();
f.b("CaptureInputConnection", "-->commitText: " + charSequence.toString());
return super.commitText(charSequence, i);
}
public boolean sendKeyEvent(KeyEvent keyEvent) {
if (keyEvent.getAction() == 0) {
f.c("CaptureInputConnection", "sendKeyEvent");
a = String.valueOf((char) keyEvent.getUnicodeChar());
c = true;
f.c("CaptureInputConnection", "s: " + a);
}
f.b("CaptureInputConnection", "-->sendKeyEvent: " + a);
return super.sendKeyEvent(keyEvent);
}
}
|
[
"jackychan2040@gmail.com"
] |
jackychan2040@gmail.com
|
838280f6eeec43afad704e94222002378bc3a061
|
db2cd2a4803e546d35d5df2a75b7deb09ffadc01
|
/nemo-tfl-common/src/test/java/com/novacroft/nemo/tfl/common/application_service/impl/cubic_import/BaseAdHocLoadStatusServiceTest.java
|
d6ae9ba29801c4c0320fe2e09f142266ddcbea0b
|
[] |
no_license
|
balamurugan678/nemo
|
66d0d6f7062e340ca8c559346e163565c2628814
|
1319daafa5dc25409ae1a1872b1ba9b14e5a297e
|
refs/heads/master
| 2021-01-19T17:47:22.002884
| 2015-06-18T12:03:43
| 2015-06-18T12:03:43
| 37,656,983
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,626
|
java
|
package com.novacroft.nemo.tfl.common.application_service.impl.cubic_import;
import static com.novacroft.nemo.test_support.CommonCardTestUtil.OYSTER_NUMBER_1;
import static com.novacroft.nemo.test_support.LocationTestUtil.LOCATION_NAME_1;
import static com.novacroft.nemo.test_support.LocationTestUtil.getTestLocationDTO1;
import static com.novacroft.nemo.test_support.OrderTestUtil.ORDER_ID;
import static com.novacroft.nemo.test_support.SettlementTestUtil.REQUEST_SEQUENCE_NUMBER;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyLong;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doCallRealMethod;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.junit.Before;
import org.junit.Test;
import com.novacroft.nemo.common.application_service.ApplicationEventService;
import com.novacroft.nemo.common.constant.EventName;
import com.novacroft.nemo.test_support.CustomerTestUtil;
import com.novacroft.nemo.tfl.common.application_service.OrderService;
import com.novacroft.nemo.tfl.common.constant.SettlementStatus;
import com.novacroft.nemo.tfl.common.data_service.AdHocLoadSettlementDataService;
import com.novacroft.nemo.tfl.common.data_service.CustomerDataService;
import com.novacroft.nemo.tfl.common.data_service.LocationDataService;
import com.novacroft.nemo.tfl.common.transfer.AdHocLoadSettlementDTO;
import com.novacroft.nemo.tfl.common.transfer.CustomerDTO;
import com.novacroft.nemo.tfl.common.transfer.OrderDTO;
public class BaseAdHocLoadStatusServiceTest {
public static final Integer LOCATION_ID = 1000;
private BaseAdHocLoadStatusService service;
private AdHocLoadSettlementDataService mockAdHocLoadSettlementDataService;
private ApplicationEventService mockApplicationEventService;
private CustomerDataService mockCustomerDataService;
private AdHocLoadSettlementDTO mockAdHocLoadSettlementDTO;
private CustomerDTO mockCustomerDTO;
private OrderDTO mockOrderDTO;
private OrderService mockOrderService;
private LocationDataService mockLocationDataService;
@Before
public void setUp() {
this.service = mock(BaseAdHocLoadStatusService.class);
this.mockAdHocLoadSettlementDataService = mock(AdHocLoadSettlementDataService.class);
this.service.adHocLoadSettlementDataService = this.mockAdHocLoadSettlementDataService;
this.mockApplicationEventService = mock(ApplicationEventService.class);
this.service.applicationEventService = mockApplicationEventService;
this.mockCustomerDataService = mock(CustomerDataService.class);
this.service.customerDataService = mockCustomerDataService;
this.mockAdHocLoadSettlementDTO = mock(AdHocLoadSettlementDTO.class);
this.mockCustomerDTO = mock(CustomerDTO.class);
this.mockOrderDTO = mock(OrderDTO.class);
this.mockOrderService = mock(OrderService.class);
this.service.orderService = this.mockOrderService;
this.mockLocationDataService = mock(LocationDataService.class);
this.service.locationDataService = mockLocationDataService;
}
@Test
public void shouldCreateEvent() {
doCallRealMethod().when(this.service).createEvent(anyString(), any(AdHocLoadSettlementDTO.class), any(EventName.class));
when(this.service.buildAdditionalInformation(anyString(), any(AdHocLoadSettlementDTO.class), anyString())).thenReturn(EMPTY);
doNothing().when(this.mockApplicationEventService).create(anyLong(), any(EventName.class), anyString());
when(this.mockCustomerDataService.findByCardNumber(anyString())).thenReturn(this.mockCustomerDTO);
when(this.mockCustomerDTO.getId()).thenReturn(CustomerTestUtil.CUSTOMER_ID_1);
this.service.createEvent(OYSTER_NUMBER_1, this.mockAdHocLoadSettlementDTO, EventName.AD_HOC_LOAD_FAILED);
verify(this.service).buildAdditionalInformation(anyString(), any(AdHocLoadSettlementDTO.class), anyString());
verify(this.mockApplicationEventService).create(anyLong(), any(EventName.class), anyString());
verify(this.mockCustomerDataService).findByCardNumber(anyString());
verify(this.mockCustomerDTO).getId();
}
@Test
public void shouldUpdateStatus() {
doCallRealMethod().when(this.service).updateStatus(any(AdHocLoadSettlementDTO.class), any(SettlementStatus.class));
doNothing().when(this.mockAdHocLoadSettlementDTO).setStatus(anyString());
when(this.mockAdHocLoadSettlementDataService.createOrUpdate(any(AdHocLoadSettlementDTO.class)))
.thenReturn(this.mockAdHocLoadSettlementDTO);
doNothing().when(service).updateOrderStatus(anyLong());
this.service.updateStatus(this.mockAdHocLoadSettlementDTO, SettlementStatus.FAILED);
verify(this.mockOrderService).updateOrderStatus(anyLong());
verify(this.mockAdHocLoadSettlementDTO).setStatus(anyString());
verify(this.mockAdHocLoadSettlementDataService).createOrUpdate(any(AdHocLoadSettlementDTO.class));
}
@Test
public void shouldFindSettlement() {
when(this.service.findSettlement(anyInt(), anyString())).thenCallRealMethod();
when(this.mockAdHocLoadSettlementDataService.findByRequestSequenceNumberAndCardNumber(anyInt(), anyString()))
.thenReturn(this.mockAdHocLoadSettlementDTO);
this.service.findSettlement(REQUEST_SEQUENCE_NUMBER, OYSTER_NUMBER_1);
verify(this.mockAdHocLoadSettlementDataService).findByRequestSequenceNumberAndCardNumber(anyInt(), anyString());
}
@Test
public void shouldUpdateOrderStatus() {
doCallRealMethod().when(this.service).updateOrderStatus(anyLong());
when(this.mockOrderService.updateOrderStatus(anyLong())).thenReturn(this.mockOrderDTO);
this.service.updateOrderStatus(ORDER_ID);
verify(this.mockOrderService).updateOrderStatus(anyLong());
}
@Test
public void hasAdHocLoadBeenRequestedShouldReturnTrue() {
when(this.service.hasAdHocLoadBeenRequested(anyInt(), anyString())).thenCallRealMethod();
when(this.service.findSettlement(anyInt(), anyString())).thenReturn(this.mockAdHocLoadSettlementDTO);
assertTrue(this.service.hasAdHocLoadBeenRequested(REQUEST_SEQUENCE_NUMBER, OYSTER_NUMBER_1));
}
@Test
public void shouldLookupLocationName() {
doCallRealMethod().when(this.service).lookupLocationName(anyInt());
when(this.mockLocationDataService.findById(anyLong())).thenReturn(getTestLocationDTO1());
String locationName = this.service.lookupLocationName(LOCATION_ID);
verify(this.mockLocationDataService).findById(anyLong());
assertEquals(LOCATION_NAME_1, locationName);
}
@Test
public void hasAdHocLoadBeenRequestedShouldReturnFalse() {
when(this.service.hasAdHocLoadBeenRequested(anyInt(), anyString())).thenCallRealMethod();
when(this.service.findSettlement(anyInt(), anyString())).thenReturn(null);
assertFalse(this.service.hasAdHocLoadBeenRequested(REQUEST_SEQUENCE_NUMBER, OYSTER_NUMBER_1));
}
}
|
[
"balamurugan678@yahoo.co.in"
] |
balamurugan678@yahoo.co.in
|
f3098df0a9430727c286559b55b806a26c88ae5d
|
d8a56f6e10c32f5c644bba969b12f9cf330caadd
|
/tims/test/com/hashthrims/test/rest/CompetencyTypeRestTest.java
|
20ceddcad4bac16ea962f5d4fa6b8335cad85032
|
[] |
no_license
|
jackba/tims
|
c2589bcaa3998e51972cde2cec23f0661091c108
|
0ecb2bbafef59c1c6921ca09a1ceeb7358730853
|
refs/heads/master
| 2021-01-10T20:19:02.709255
| 2013-03-22T09:39:49
| 2013-03-22T09:39:49
| 33,372,881
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,553
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.hashthrims.test.rest;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import com.hashthrims.application.webservices.rest.resources.hashthrims.util.CompetencyTypeForm;
import com.hashthrims.domain.employeelist.CompetencyType;
import org.apache.cxf.jaxrs.client.WebClient;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author stud
*/
public class CompetencyTypeRestTest {
public CompetencyTypeRestTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
WebClient client = WebClient.create("http://localhost:8084/competencyType/ws/competencyTypeservice/");
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
// TODO add test methods here.
// The methods must be annotated with annotation @Test. For example:
//
@Test
public void readCompetencyType()
{
WebClient client = WebClient.create("http://localhost:8084/competencyType/ws/competencyTypeservice/");
CompetencyType competencyType = client.path("competencyType/1770").accept("application/xml").get(CompetencyType.class);
Assert.assertNotNull(competencyType);
}
@Test
public void updateCompetencyType()
{
WebClient client = WebClient.create("http://localhost:8084/competencyType/ws/competencyTypeservice/");
CompetencyType competencyType = client.path("PATH/1770").accept("application/xml").get(CompetencyType.class);
client.back(true);
client.path("/PATH/update");
client.put(competencyType);
client.back(true);
CompetencyType newCompetencyType = client.path("PATH/1770").accept("application/xml").get(CompetencyType.class);
}
public void testCreateCompetencyType()
{
WebClient client = WebClient.create("http://localhost:8084/hashpay/competencyTypeservice/");
client.path("PATH");
CompetencyTypeForm pf = new CompetencyTypeForm();
client.post(pf);
client.back(true);
}
public void printCompetencyType()
{
WebClient client = WebClient.create("http://localhost:8084/hashpay/competencyTypeservice/");
CompetencyTypeForm pf = new CompetencyTypeForm();
}
}
|
[
"boniface.kabaso@gmail.com@8b2e65b4-2dce-a24f-2858-670329bbfff1"
] |
boniface.kabaso@gmail.com@8b2e65b4-2dce-a24f-2858-670329bbfff1
|
533b1af78fe834c6cc1c53590fd934c0cf90f7fb
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module314/src/main/java/module314packageJava0/Foo195.java
|
45a801ee988103009995acd6b8c2b06127863602
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 294
|
java
|
package module314packageJava0;
import java.lang.Integer;
public class Foo195 {
Integer int0;
public void foo0() {
new module314packageJava0.Foo194().foo3();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
aa922b44e89d66674e3ef51ebb95cf1fe8fce9fb
|
98f2e3f3acba52c06a02012503ab591359215623
|
/app/src/main/java/com/example/lenovo/viewPage/fragment/StereoscopicLauncherFragment.java
|
f68845bb614d9549f49f0503e97f45ec9cc3e94a
|
[] |
no_license
|
Hmz3192/AndroidApp
|
49b22d03efcb5bea2ce80f508c78ea38ad2d04dd
|
fa3fa8d99c70c28f9d1ae9e87efa50a194c6bff3
|
refs/heads/master
| 2020-12-30T11:02:00.312430
| 2017-09-24T04:34:35
| 2017-09-24T04:34:35
| 98,834,789
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,269
|
java
|
package com.example.lenovo.viewPage.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationSet;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.ScaleAnimation;
import android.widget.ImageView;
import com.example.lenovo.myapplication.R;
/**
* 最后一个
* @author apple
*/
public class StereoscopicLauncherFragment extends LauncherBaseFragment implements OnClickListener{
private static final float ZOOM_MAX = 1.3f;
private static final float ZOOM_MIN = 1.0f;
private ImageView imgView_immediate_experience;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
View rooView=inflater.inflate(R.layout.fragment_stereoscopic_launcher, null);
imgView_immediate_experience=(ImageView) rooView.findViewById(R.id.imgView_immediate_experience);
imgView_immediate_experience.setOnClickListener(this);
return rooView;
}
public void playHeartbeatAnimation(){
/**
* 放大动画
*/
AnimationSet animationSet = new AnimationSet(true);
animationSet.addAnimation(new ScaleAnimation(ZOOM_MIN, ZOOM_MAX, ZOOM_MIN, ZOOM_MAX, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,0.5f));
animationSet.addAnimation(new AlphaAnimation(1.0f, 0.6f));
animationSet.setDuration(500);
animationSet.setInterpolator(new AccelerateInterpolator());
animationSet.setFillAfter(true);
animationSet.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationRepeat(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
/**
* 缩小动画
*/
AnimationSet animationSet = new AnimationSet(true);
animationSet.addAnimation(new ScaleAnimation(ZOOM_MAX, ZOOM_MIN, ZOOM_MAX,ZOOM_MIN, Animation.RELATIVE_TO_SELF, 0.5f,Animation.RELATIVE_TO_SELF, 0.5f));
animationSet.addAnimation(new AlphaAnimation(0.6f, 1.0f));
animationSet.setDuration(600);
animationSet.setInterpolator(new DecelerateInterpolator());
animationSet.setFillAfter(false);
// 实现心跳的View
imgView_immediate_experience.startAnimation(animationSet);
}
});
// 实现心跳的View
imgView_immediate_experience.startAnimation(animationSet);
}
@Override
public void onClick(View v) {
/*Intent intent = new Intent();
intent.setClass(getActivity(),LoginActivity.class);
startActivity(intent);
getActivity().finish();*/
}
@Override
public void startAnimation() {
playHeartbeatAnimation();
}
@Override
public void stopAnimation() {
}
}
|
[
"1134598796@qq.com"
] |
1134598796@qq.com
|
319f2068e20dfb019df8e858e99bc672f86b56e3
|
b11248eb8d38355e10861c6c19750c55b4530e38
|
/src/main/java/hu/akarnokd/rxjava2/basetypes/NonoTimeout.java
|
6b3c6a0a3aee89eec075cbe0753311d95380eafa
|
[
"Apache-2.0"
] |
permissive
|
tomdotbradshaw/RxJava2Extensions
|
2d50d14aff39a1ddb4fe6a32352aebecc4e8d68d
|
254fead58021bb8304aa1c343cc776e7b5a3168d
|
refs/heads/master
| 2020-04-06T16:48:30.122024
| 2018-11-15T03:29:15
| 2018-11-15T03:30:42
| 157,635,134
| 0
| 0
|
Apache-2.0
| 2018-11-15T01:36:50
| 2018-11-15T01:36:50
| null |
UTF-8
|
Java
| false
| false
| 5,223
|
java
|
/*
* Copyright 2016-2018 David Karnok
*
* 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 hu.akarnokd.rxjava2.basetypes;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.*;
import org.reactivestreams.*;
import io.reactivex.internal.subscriptions.SubscriptionHelper;
import io.reactivex.plugins.RxJavaPlugins;
/**
* Signal a TimeoutException or switch to a fallback Mono if the
* other publisher signals a value or completes.
*/
final class NonoTimeout extends Nono {
final Nono source;
final Publisher<?> other;
final Nono fallback;
NonoTimeout(Nono source, Publisher<?> other, Nono fallback) {
this.source = source;
this.other = other;
this.fallback = fallback;
}
@Override
protected void subscribeActual(Subscriber<? super Void> s) {
MainSubscriber parent = new MainSubscriber(s, fallback);
s.onSubscribe(parent);
other.subscribe(parent.other);
source.subscribe(parent);
}
static final class MainSubscriber extends BasicRefQueueSubscription<Void, Subscription>
implements Subscriber<Void> {
private static final long serialVersionUID = 5699062216456523328L;
final Subscriber<? super Void> downstream;
final Nono fallback;
final OtherSubscriber other;
final AtomicBoolean once;
MainSubscriber(Subscriber<? super Void> downstream, Nono fallback) {
this.downstream = downstream;
this.fallback = fallback;
this.other = new OtherSubscriber();
this.once = new AtomicBoolean();
}
@Override
public void cancel() {
SubscriptionHelper.cancel(this);
SubscriptionHelper.cancel(other);
}
@Override
public void onSubscribe(Subscription s) {
SubscriptionHelper.setOnce(this, s);
}
@Override
public void onNext(Void t) {
// never called
}
@Override
public void onError(Throwable t) {
SubscriptionHelper.cancel(other);
if (once.compareAndSet(false, true)) {
downstream.onError(t);
} else {
RxJavaPlugins.onError(t);
}
}
@Override
public void onComplete() {
SubscriptionHelper.cancel(other);
if (once.compareAndSet(false, true)) {
downstream.onComplete();
}
}
void otherError(Throwable t) {
SubscriptionHelper.cancel(this);
if (once.compareAndSet(false, true)) {
downstream.onError(t);
} else {
RxJavaPlugins.onError(t);
}
}
void otherComplete() {
SubscriptionHelper.cancel(this);
if (once.compareAndSet(false, true)) {
Nono f = fallback;
if (f == null) {
downstream.onError(new TimeoutException());
} else {
f.subscribe(new FallbackSubscriber());
}
}
}
void fallbackSubscribe(Subscription s) {
SubscriptionHelper.replace(this, s);
}
final class FallbackSubscriber implements Subscriber<Void> {
@Override
public void onSubscribe(Subscription s) {
fallbackSubscribe(s);
}
@Override
public void onNext(Void t) {
// never called
}
@Override
public void onError(Throwable t) {
downstream.onError(t);
}
@Override
public void onComplete() {
downstream.onComplete();
}
}
final class OtherSubscriber extends AtomicReference<Subscription> implements Subscriber<Object> {
private static final long serialVersionUID = -7257274632636068061L;
boolean done;
@Override
public void onSubscribe(Subscription s) {
if (SubscriptionHelper.setOnce(this, s)) {
s.request(Long.MAX_VALUE);
}
}
@Override
public void onNext(Object t) {
if (!done) {
SubscriptionHelper.cancel(this);
onComplete();
}
}
@Override
public void onError(Throwable t) {
otherError(t);
}
@Override
public void onComplete() {
otherComplete();
}
}
}
}
|
[
"akarnokd@gmail.com"
] |
akarnokd@gmail.com
|
15517ae340c35d2aeecb5453640558bd04d9ee70
|
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
|
/MazeMode/src/com/puttysoftware/mazemode/objects/DamagedWall.java
|
8186311891f1e8ecf1c7e58487a77c0d3efbf544
|
[
"Unlicense"
] |
permissive
|
retropipes/older-java-games
|
777574e222f30a1dffe7936ed08c8bfeb23a21ba
|
786b0c165d800c49ab9977a34ec17286797c4589
|
refs/heads/master
| 2023-04-12T14:28:25.525259
| 2021-05-15T13:03:54
| 2021-05-15T13:03:54
| 235,693,016
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,940
|
java
|
/* MazeMode: A Maze-Solving Game
Copyright (C) 2008-2010 Eric Ahnell
Any questions should be directed to the author via email at: products@puttysoftware.com
*/
package com.puttysoftware.mazemode.objects;
import com.puttysoftware.mazemode.MazeMode;
import com.puttysoftware.mazemode.game.ObjectInventory;
import com.puttysoftware.mazemode.generic.GenericWall;
import com.puttysoftware.mazemode.generic.TypeConstants;
import com.puttysoftware.mazemode.resourcemanagers.SoundConstants;
import com.puttysoftware.mazemode.resourcemanagers.SoundManager;
public class DamagedWall extends GenericWall {
// Constructors
public DamagedWall() {
super();
}
@Override
public boolean arrowHitAction(final int locX, final int locY,
final int locZ, final int dirX, final int dirY, final int arrowType,
final ObjectInventory inv) {
this.moveFailedAction(true, locX, locY, inv);
return false;
}
@Override
public void moveFailedAction(final boolean ie, final int dirX,
final int dirY, final ObjectInventory inv) {
// Destroy the wall
final int pz = MazeMode.getApplication().getGameManager()
.getPlayerManager().getPlayerLocationZ();
MazeMode.getApplication().getGameManager().morph(new CrumblingWall(),
dirX, dirY, pz);
SoundManager.playSound(SoundConstants.SOUND_CATEGORY_SOLVING_MAZE,
SoundConstants.SOUND_CRACK);
}
@Override
public String getName() {
return "Damaged Wall";
}
@Override
public String getPluralName() {
return "Damaged Walls";
}
@Override
public String getDescription() {
return "Damaged Walls turn into Crumbling Walls when hit.";
}
@Override
protected void setTypes() {
this.type.set(TypeConstants.TYPE_BREAKABLE_WALL);
this.type.set(TypeConstants.TYPE_WALL);
}
}
|
[
"eric.ahnell@puttysoftware.com"
] |
eric.ahnell@puttysoftware.com
|
d118bc6820c3b72f246c5e08c46d005023d6c825
|
8da06d3ad989d0092d7761a81f2ec184e0989f7d
|
/d2cmall-provider/d2cmall-order/d2cmall-order-api/src/main/java/com/d2c/order/query/GuanyiOrderSearcher.java
|
bc87f164f6f12a19029de3057c0b71088d91a8b0
|
[] |
no_license
|
RoJinnSennSei/my_mall
|
e5234c631a30b17f2ffbfd4614ef9e8dc04a9869
|
dbec98edac0e679906668be1d5f37ea13f46975b
|
refs/heads/master
| 2020-04-08T15:48:40.090961
| 2018-11-14T10:04:36
| 2018-11-14T10:04:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,891
|
java
|
package com.d2c.order.query;
import java.util.Date;
import com.d2c.common.api.query.model.BaseQuery;
public class GuanyiOrderSearcher extends BaseQuery {
/**
*
*/
private static final long serialVersionUID = 1L;
private Integer success;
private Integer burgeonFall;
private Integer expressFall;
/**
* 门店类型
*/
private String shopCode;
private String code;
/**
* 平台单号
*/
private String platformCode;
/**
* 货号
*/
private String itemCode;
/**
* 物流单号
*/
private String expressNo;
/**
* 会员(相当于D2C店铺)
*/
private String vipName;
private String shopName;
/**
* 发货日期
*/
private Date deliveryStartDate;
private Date deliveryEndDate;
/**
* 伯俊做单是否处理成功
*/
private Integer burgeonHandle;
/**
* 物流做单是否成功
*/
private Integer expressHandle;
public Integer getSuccess() {
return success;
}
public void setSuccess(Integer success) {
this.success = success;
}
public Integer getBurgeonFall() {
return burgeonFall;
}
public void setBurgeonFall(Integer burgeonFall) {
this.burgeonFall = burgeonFall;
}
public Integer getExpressFall() {
return expressFall;
}
public void setExpressFall(Integer expressFall) {
this.expressFall = expressFall;
}
public String getShopCode() {
return shopCode;
}
public void setShopCode(String shopCode) {
this.shopCode = shopCode;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getPlatformCode() {
return platformCode;
}
public void setPlatformCode(String platformCode) {
this.platformCode = platformCode;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getExpressNo() {
return expressNo;
}
public void setExpressNo(String expressNo) {
this.expressNo = expressNo;
}
public String getVipName() {
return vipName;
}
public void setVipName(String vipName) {
this.vipName = vipName;
}
public Date getDeliveryStartDate() {
return deliveryStartDate;
}
public void setDeliveryStartDate(Date deliveryStartDate) {
this.deliveryStartDate = deliveryStartDate;
}
public Date getDeliveryEndDate() {
return deliveryEndDate;
}
public void setDeliveryEndDate(Date deliveryEndDate) {
this.deliveryEndDate = deliveryEndDate;
}
public Integer getBurgeonHandle() {
return burgeonHandle;
}
public void setBurgeonHandle(Integer burgeonHandle) {
this.burgeonHandle = burgeonHandle;
}
public Integer getExpressHandle() {
return expressHandle;
}
public void setExpressHandle(Integer expressHandle) {
this.expressHandle = expressHandle;
}
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
}
|
[
"vicleo566@163.com"
] |
vicleo566@163.com
|
4000ed3f03617b149aa003c37287c5be8c780839
|
3c2e586cccf483cf9f11d32eef75ddc669c28bff
|
/src/lk/ijse/sms/business/custom/impl/StundetBOImpl.java
|
2e42374d9f177852e4964c699685dc4c8921653f
|
[] |
no_license
|
sahan1995/FX-Studen-Managemt-System-using-JPA
|
883b5e6809159d06270737a6a82bb14a3d5eac56
|
a2a24e0159c44d08adf8df9195a33e13ac613e92
|
refs/heads/master
| 2020-03-28T22:40:23.091494
| 2018-09-18T07:52:29
| 2018-09-18T07:52:29
| 149,249,343
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,448
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package lk.ijse.sms.business.custom.impl;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.List;
import lk.ijse.sms.business.custom.StudentBO;
import lk.ijse.sms.dao.DAOFactory;
import lk.ijse.sms.dao.custom.StudentDAO;
import lk.ijse.sms.dto.StudentCourseDTO;
import lk.ijse.sms.dto.StudentDTO;
import lk.ijse.sms.entity.Student;
import lk.ijse.sms.entity.StudentCourse;
import lk.ijse.sms.util.JPAUtil;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
/**
*
* @author Sahan Rajakaruna
*/
public class StundetBOImpl implements StudentBO {
private StudentDAO studentDAO;
private EntityManagerFactory entityManagerFactory;
public StundetBOImpl() {
this.studentDAO = (StudentDAO) DAOFactory.getInstance().getDAO(DAOFactory.DAOTypes.student);
this.entityManagerFactory = JPAUtil.getEntityManagerFactory();
}
@Override
public boolean RegisterStudent(StudentDTO student) throws Exception {
try {
EntityManager entityManager =
entityManagerFactory.createEntityManager();
studentDAO.setEntityManager(entityManager);
entityManager.getTransaction().begin();
Student student1 = new Student(student.getId(), student.getFname(), student.getLname(), student.getNic(), student.getContact(), student.getAddress());
studentDAO.save(student1);
entityManager.getTransaction().commit();
return true;
}catch (HibernateException ex){
ex.printStackTrace();
return false;
}
}
@Override
public boolean UpdateStudent(StudentDTO student) throws Exception {
try {
EntityManager entityManager =
entityManagerFactory.createEntityManager();
studentDAO.setEntityManager(entityManager);
entityManager.getTransaction().begin();
Student student1 = new Student(student.getId(), student.getFname(), student.getLname(), student.getNic(), student.getContact(), student.getAddress());
studentDAO.update(student1);
entityManager.getTransaction().commit();
return true;
}catch (HibernateException ex){
return false;
}
}
@Override
public boolean DeleteStudent(String id) throws Exception {
try {
EntityManager entityManager =
entityManagerFactory.createEntityManager();
studentDAO.setEntityManager(entityManager);
entityManager.getTransaction().begin();
studentDAO.delete(id);
entityManager.getTransaction().commit();
return true;
}catch (HibernateException ex){
return false;
}
}
@Override
public StudentDTO findById(String id) throws Exception {
try {
EntityManager entityManager =
entityManagerFactory.createEntityManager();
studentDAO.setEntityManager(entityManager);
entityManager.getTransaction().begin();
Student studentEntity = studentDAO.findByID(id);
entityManager.getTransaction().commit();
return new StudentDTO(studentEntity.getSid(),studentEntity.getFname(),studentEntity.getLname(),studentEntity.getNic(),studentEntity.getContact(),studentEntity.getAddress());
}
catch (HibernateException ex){
return null;
}
}
@Override
public ArrayList<StudentDTO> allStudents() throws Exception {
try {
EntityManager entityManager =
entityManagerFactory.createEntityManager();
studentDAO.setEntityManager(entityManager);
entityManager.getTransaction().begin();
List<Student> allStudents = studentDAO.getAll();
entityManager.getTransaction().commit();
ArrayList<StudentDTO> allStudentDTO = new ArrayList<>();
for (Student allStudentEntity : allStudents) {
allStudentDTO.add(new StudentDTO(allStudentEntity.getSid(), allStudentEntity.getFname(), allStudentEntity.getLname(), allStudentEntity.getNic(), allStudentEntity.getContact(), allStudentEntity.getAddress()));
}
return allStudentDTO;
}catch (HibernateException ex){
return null;
}
}
@Override
public String generateCustomId() throws Exception {
// String lastID = studentDAO.getLastID();
// String[] part = lastID.split("STU");
// int no = Integer.parseInt(part[1]);
// no++;
// String customID = "STU" + formatNumber(no);
// System.out.println(customID);
// return customID;
return null;
}
private String formatNumber(long number) {
NumberFormat nf = NumberFormat.getInstance();
nf.setGroupingUsed(false);
nf.setMaximumFractionDigits(0);
nf.setMinimumFractionDigits(0);
nf.setMaximumIntegerDigits(3);
nf.setMinimumIntegerDigits(3);
return nf.format(number);
}
@Override
public ArrayList<StudentCourseDTO> studentCourse(String sid) throws Exception {
ArrayList<StudentCourseDTO> studentCourseDTO = new ArrayList<>();
ArrayList<StudentCourse> studentCourses = studentDAO.getStudentCourses(sid);
for (StudentCourse studentCourse : studentCourses) {
studentCourseDTO.add(new StudentCourseDTO(studentCourse.getCourse_id(), studentCourse.getBatch_no()));
}
return studentCourseDTO;
// return null;
}
@Override
public int getStudentCount() throws Exception {
// return studentDAO.studentCount();
return 0;
}
@Override
public ArrayList<String> getStudentBatch(String sid) throws Exception {
// return studentDAO.getStudentBatch(sid);
return null;
}
}
|
[
"sahanrajakaruna001@gmail.com"
] |
sahanrajakaruna001@gmail.com
|
4f46f19e5294b9fc24913a3005e44621fc266eb7
|
3ca53c13d2953805c00406476ceda9684887a8ad
|
/src/com/iwxxm/common/AbstractDatumType.java
|
e88fffd6b600836559158e33201cb08493bcdb3c
|
[] |
no_license
|
yw2017051032/tac2iwxxm
|
ae93c12b08b7316cd59de032d4ae2e8082bc6c0b
|
5a08cb9ecd0833fd4435bf6db81a2b8126380ec1
|
refs/heads/master
| 2020-03-17T03:03:06.671868
| 2018-06-05T16:55:59
| 2018-06-05T17:06:03
| 133,217,637
| 3
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 5,192
|
java
|
//
// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.8-b130911.1802 生成的
// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// 在重新编译源模式时, 对此文件的所有修改都将丢失。
// 生成时间: 2018.04.04 时间 10:18:30 PM CST
//
package com.iwxxm.common;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
/**
* <p>AbstractDatumType complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="AbstractDatumType">
* <complexContent>
* <extension base="{http://www.opengis.net/gml/3.2}IdentifiedObjectType">
* <sequence>
* <element ref="{http://www.opengis.net/gml/3.2}domainOfValidity" minOccurs="0"/>
* <element ref="{http://www.opengis.net/gml/3.2}scope" maxOccurs="unbounded"/>
* <element ref="{http://www.opengis.net/gml/3.2}anchorDefinition" minOccurs="0"/>
* <element ref="{http://www.opengis.net/gml/3.2}realizationEpoch" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AbstractDatumType", propOrder = {
"domainOfValidity",
"scope",
"anchorDefinition",
"realizationEpoch"
})
@XmlSeeAlso({
ImageDatumType.class,
VerticalDatumType.class,
GeodeticDatumType.class,
EngineeringDatumType.class,
TemporalDatumBaseType.class
})
public abstract class AbstractDatumType
extends IdentifiedObjectType
{
protected DomainOfValidity domainOfValidity;
@XmlElement(required = true)
protected List<String> scope;
@XmlElementRef(name = "anchorDefinition", namespace = "http://www.opengis.net/gml/3.2", type = JAXBElement.class, required = false)
protected JAXBElement<CodeType> anchorDefinition;
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar realizationEpoch;
/**
* 获取domainOfValidity属性的值。
*
* @return
* possible object is
* {@link DomainOfValidity }
*
*/
public DomainOfValidity getDomainOfValidity() {
return domainOfValidity;
}
/**
* 设置domainOfValidity属性的值。
*
* @param value
* allowed object is
* {@link DomainOfValidity }
*
*/
public void setDomainOfValidity(DomainOfValidity value) {
this.domainOfValidity = value;
}
/**
* Gets the value of the scope property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the scope property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getScope().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getScope() {
if (scope == null) {
scope = new ArrayList<String>();
}
return this.scope;
}
/**
* 获取anchorDefinition属性的值。
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link CodeType }{@code >}
* {@link JAXBElement }{@code <}{@link CodeType }{@code >}
*
*/
public JAXBElement<CodeType> getAnchorDefinition() {
return anchorDefinition;
}
/**
* 设置anchorDefinition属性的值。
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link CodeType }{@code >}
* {@link JAXBElement }{@code <}{@link CodeType }{@code >}
*
*/
public void setAnchorDefinition(JAXBElement<CodeType> value) {
this.anchorDefinition = value;
}
/**
* 获取realizationEpoch属性的值。
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getRealizationEpoch() {
return realizationEpoch;
}
/**
* 设置realizationEpoch属性的值。
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setRealizationEpoch(XMLGregorianCalendar value) {
this.realizationEpoch = value;
}
}
|
[
"852406820@qq.com"
] |
852406820@qq.com
|
2fcbffb03a1f29365610ad020736a4111dbd2226
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_2/src/b/g/f/i/Calc_1_2_16586.java
|
617f2803afdfce3f6e1e2ed42a1aa9d932d3d325
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package b.g.f.i;
public class Calc_1_2_16586 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
d71c48b45b8b49f04915fbe953893655f65afacd
|
7853a4e017e1885307ec4d5f39361e9cdf7ee15e
|
/bundles/sirix-core/src/test/java/org/sirix/index/art/InnerNodeUtils.java
|
ccbc7b1ed0499a8e1fb8271b54558d82e124f328
|
[
"BSD-3-Clause"
] |
permissive
|
JohannesLichtenberger/sirix
|
a211d56eabdb26fbfab9151f63e4f8d012c2b107
|
710b8c8507e287ec42edd0a6476b3a630524b9f2
|
refs/heads/master
| 2022-05-11T21:07:00.794840
| 2022-04-09T13:34:37
| 2022-04-09T13:34:37
| 126,385,599
| 1
| 0
|
BSD-3-Clause
| 2021-08-21T20:37:33
| 2018-03-22T19:31:01
|
Java
|
UTF-8
|
Java
| false
| false
| 318
|
java
|
package org.sirix.index.art;
class InnerNodeUtils {
static byte[] getValidPrefixKey(InnerNode innerNode) {
int limit = Math.min(InnerNode.PESSIMISTIC_PATH_COMPRESSION_LIMIT, innerNode.prefixLen);
byte[] valid = new byte[limit];
System.arraycopy(innerNode.prefixKeys, 0, valid, 0, limit);
return valid;
}
}
|
[
"johannes.lichtenberger@unitedplanet.de"
] |
johannes.lichtenberger@unitedplanet.de
|
5cce6205157e687c46ff4638d58f2e0624a857d7
|
bad1ce3aed2fb59b23ce10da7f420cefd466b3d8
|
/source/Kafka/src/main/java/com/kafka/sms/biz/IBaseService.java
|
5d1b55a1e8adcbace2c6c0c8a1ab6fb10d8da6b0
|
[] |
no_license
|
millions-idea/KafkaSms
|
5dfea8bfc2e361971e4a1c2a7c6bfebd9f08e2e3
|
b05e2e8d52459c36e711fdcdff7dd25e3033e7cf
|
refs/heads/master
| 2020-04-03T10:58:18.396026
| 2018-10-31T15:53:47
| 2018-10-31T15:53:47
| 155,207,948
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 976
|
java
|
/***
* @pName management
* @name BaseService
* @user DF
* @date 2018/8/13
* @desc
*/
package com.kafka.sms.biz;
import java.util.List;
public interface IBaseService<T> {
/**
* 获取数据 2018年8月13日13:26:57
* @return
*/
T get(T param);
/**
* 获取全部数据 2018年8月13日13:26:57
* @return
*/
List<T> getList();
/**
* 分页获取全部数据 2018年8月13日13:27:17
* @param page
* @param limit
* @param condition
* @return
*/
List<T> getLimit(Integer page, Integer limit, String condition);
/**
* 插入数据 2018年8月13日13:27:48
* @param param
* @return
*/
int insert(T param);
/**
* 更新数据 2018年8月13日13:28:01
* @param param
* @return
*/
int update(T param);
/**
* 删除数据 2018年8月13日13:28:16
* @param param
* @return
*/
int delete(T param);
}
|
[
"2407439@qq.com"
] |
2407439@qq.com
|
ba04b2d4f335fcd04faf495d1b135c5ad4d1e85f
|
e072e0b3c8fd2078e04210ecc8ca8850bf58ed7a
|
/ximalayaos/src/main/java/ximalayaos/net/model/searchalbum/Announcer.java
|
f539e8e968b868f781a2c587606be9c7cf0c572c
|
[] |
no_license
|
MMLoveMeMM/AngryPandaAPI
|
4b8dcf1ade18d401cd63554ef898c5f96a836d73
|
fc0d76193d613017faf59660ace757312377792e
|
refs/heads/master
| 2020-07-28T20:32:57.206080
| 2019-09-26T12:01:05
| 2019-09-26T12:01:05
| 209,528,666
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,344
|
java
|
/**
* Copyright 2019 bejson.com
*/
package ximalayaos.net.model.searchalbum;
/**
* Auto-generated: 2019-09-17 15:48:4
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public class Announcer {
private long id;
private String kind;
private String nickname;
private String avatar_url;
private boolean is_verified;
private int anchor_grade;
public void setId(long id) {
this.id = id;
}
public long getId() {
return id;
}
public void setKind(String kind) {
this.kind = kind;
}
public String getKind() {
return kind;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getNickname() {
return nickname;
}
public void setAvatar_url(String avatar_url) {
this.avatar_url = avatar_url;
}
public String getAvatar_url() {
return avatar_url;
}
public void setIs_verified(boolean is_verified) {
this.is_verified = is_verified;
}
public boolean getIs_verified() {
return is_verified;
}
public void setAnchor_grade(int anchor_grade) {
this.anchor_grade = anchor_grade;
}
public int getAnchor_grade() {
return anchor_grade;
}
}
|
[
"liuzhibao@xl.cn"
] |
liuzhibao@xl.cn
|
7e7f96d513661f34e0433d7245b11fe6df6e1865
|
774b50fe5091754f23ef556c07a4d1aab56efe27
|
/oag/src/main/java/org/oagis/model/v101/PostMatchDocumentType.java
|
1699515744d3184c447dc3a5ca3e83c99070a751
|
[] |
no_license
|
otw1248/thirdpartiess
|
daa297c2f44adb1ffb6530f88eceab6b7f37b109
|
4cbc4501443d807121656e47014d70277ff30abc
|
refs/heads/master
| 2022-12-07T17:10:17.320160
| 2022-11-28T10:56:19
| 2022-11-28T10:56:19
| 33,661,485
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,024
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.04.09 at 04:39:46 PM CST
//
package org.oagis.model.v101;
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>Java class for PostMatchDocumentType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="PostMatchDocumentType">
* <complexContent>
* <extension base="{http://www.openapplications.org/oagis/10}BusinessObjectDocumentType">
* <sequence>
* <element name="DataArea" type="{http://www.openapplications.org/oagis/10}PostMatchDocumentDataAreaType"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PostMatchDocumentType", propOrder = {
"dataArea"
})
public class PostMatchDocumentType
extends BusinessObjectDocumentType
{
@XmlElement(name = "DataArea", required = true)
protected PostMatchDocumentDataAreaType dataArea;
/**
* Gets the value of the dataArea property.
*
* @return
* possible object is
* {@link PostMatchDocumentDataAreaType }
*
*/
public PostMatchDocumentDataAreaType getDataArea() {
return dataArea;
}
/**
* Sets the value of the dataArea property.
*
* @param value
* allowed object is
* {@link PostMatchDocumentDataAreaType }
*
*/
public void setDataArea(PostMatchDocumentDataAreaType value) {
this.dataArea = value;
}
}
|
[
"otw1248@otw1248.com"
] |
otw1248@otw1248.com
|
7e383fe373fcdad8ffdb60386717a813ce7ece4e
|
2cce1cdc34bc4d048505e22b418afd1a2b8fd4d5
|
/app/src/main/java/com/vedicfashions/shopping/MyfireDemoMessageService.java
|
848202d2a3df4ce47a4b7df999d02d39a3179fce
|
[] |
no_license
|
gautamsurani/VF
|
ab99e695f77bc990642dffdf4c1bd3ab2215e862
|
f7e96b6ee613c101059e2d1554ae457ba282ea79
|
refs/heads/master
| 2021-09-06T22:03:35.446878
| 2018-02-12T10:36:28
| 2018-02-12T10:36:28
| 121,233,479
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,145
|
java
|
package com.vedicfashions.shopping;
import android.annotation.SuppressLint;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.RingtoneManager;
import android.net.Uri;
import android.support.v4.app.NotificationCompat;
import android.util.DisplayMetrics;
import android.util.Log;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Map;
public class MyfireDemoMessageService extends FirebaseMessagingService {
android.support.v4.app.NotificationCompat.Builder builder;
NotificationManager notificationManager;
public static int count = 0;
SharedPreferences prefLogin;
SharedPreferences.Editor editorLogin;
String StrUserId;
@SuppressLint("CommitPrefEdits")
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
Log.e("QQQQQQQQ", "Done");
prefLogin = getApplicationContext().getSharedPreferences("LogInPrefVedic", 0); // 0 - for private mode
editorLogin = prefLogin.edit();
StrUserId = prefLogin.getString("userID", null);
Map<String, String> data = remoteMessage.getData();
ShowAllDashboardModuleNotification(data);
}
private void ShowAllDashboardModuleNotification(Map<String, String> data) {
final Intent gotoIntent = new Intent();
gotoIntent.putExtra("title", data.get("offer_title"));
gotoIntent.putExtra("content", data.get("offer_desc"));
gotoIntent.putExtra("date", data.get("offer_added_on"));
gotoIntent.putExtra("IMgMain", data.get("imgUrl"));
gotoIntent.putExtra("sharemsg", data.get("shre_msg"));
gotoIntent.putExtra("PButton", data.get("offer_product_button"));
gotoIntent.putExtra("CBuuton", data.get("offer_cat_button"));
gotoIntent.putExtra("SubCat", data.get("offer_subcat"));
gotoIntent.putExtra("ButtonID", data.get("offer_buttonID"));
gotoIntent.putExtra("Name", data.get("name"));
gotoIntent.putExtra("Type", data.get("type"));
Log.e("Type", "fcmType" + data.get("type"));
gotoIntent.putExtra("PageThis", "Push");
if (StrUserId == null) {
gotoIntent.setClassName(getApplicationContext(), "com.vedicfashions.shopping.Login");//Start activity when user taps on notification.
} else {
if (data.get("type").equalsIgnoreCase("sale")) {
gotoIntent.setClassName(getApplicationContext(), "com.vedicfashions.shopping.SaleViewActivity");//Start activity when user taps on notification.
} else {
gotoIntent.setClassName(getApplicationContext(), "com.vedicfashions.shopping.UpdateViewActivity");//Start activity when user taps on notification.
}
}
if (data.get("display_img").equalsIgnoreCase("Yes")) {
ShowCommonNotificationWithImage(data.get("imgUrl"), gotoIntent, data.get("offer_title"), data.get("offer_desc"));
} else {
ShowCommonNotification(gotoIntent, data.get("offer_title"), data.get("offer_desc"));
}
}
private void ShowCommonNotificationWithImage(String img, Intent gotoIntent, String StrTitle, String StrDescip) {
Log.e("Ohk 1", "ShowCommonNotificationWithImage");
Bitmap remote_picture;
try {
NotificationCompat.BigPictureStyle notiStyle = new NotificationCompat.BigPictureStyle();
notiStyle.setSummaryText(StrDescip);
remote_picture = getBitmapFromURL(img);
int imageWidth = remote_picture.getWidth();
int imageHeight = remote_picture.getHeight();
DisplayMetrics metrics = this.getResources().getDisplayMetrics();
int newWidth = metrics.widthPixels;
float scaleFactor = (float) newWidth / (float) imageWidth;
int newHeight = (int) (imageHeight * scaleFactor);
remote_picture = Bitmap.createScaledBitmap(remote_picture, newWidth, newHeight, true);
notiStyle.bigPicture(remote_picture);
notificationManager = (NotificationManager) getApplicationContext()
.getSystemService(Context.NOTIFICATION_SERVICE);
PendingIntent contentIntent;
Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
contentIntent = PendingIntent.getActivity(getApplicationContext(),
(int) (Math.random() * 100), gotoIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getApplicationContext());
android.app.Notification notification = mBuilder.setSmallIcon(R.drawable.notification_icon)./*setTicker(strMsgTitle).*/setWhen(0)
.setColor(getResources().getColor(R.color.colorPrimary)).setAutoCancel(true).setContentTitle(StrTitle)
.setStyle(new NotificationCompat.BigTextStyle().bigText(StrDescip))
.setContentIntent(contentIntent)
.setVibrate(new long[]{100, 250})
// .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))
.setSound(defaultSoundUri)
.setContentText(StrDescip).setStyle(notiStyle).build();
count++;
notificationManager.notify(count, notification);//This will generate seperate notification each time server sends.
} catch (Exception e) {
Log.e("This", e.getMessage());
}
}
private void ShowCommonNotification(Intent gotoIntent, String StrTitle, String StrDescip) {
Log.e("Ohk 1", "ShowCommonNotification");
try {
NotificationCompat.BigPictureStyle notiStyle = new NotificationCompat.BigPictureStyle();
notiStyle.setSummaryText(StrDescip);
notificationManager = (NotificationManager) getApplicationContext()
.getSystemService(Context.NOTIFICATION_SERVICE);
PendingIntent contentIntent;
contentIntent = PendingIntent.getActivity(getApplicationContext(),
(int) (Math.random() * 100), gotoIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this);
notificationBuilder.setColor(getResources().getColor(R.color.colorPrimary));
notificationBuilder.setSmallIcon(R.drawable.notification_icon);
notificationBuilder.setContentTitle(StrTitle);
notificationBuilder.setContentText(StrDescip);
notificationBuilder.setAutoCancel(true);
notificationBuilder.setSound(defaultSoundUri);
notificationBuilder.setContentIntent(contentIntent);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
count++;
notificationManager.notify(count, notificationBuilder.build());
} catch (Exception e) {
Log.e("This", e.getMessage());
}
}
public static Bitmap getBitmapFromURL(String src) {
try {
URL url = new URL(src);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
return BitmapFactory.decodeStream(input);
} catch (IOException e) {
Log.e("This Second", e.getMessage());
return null;
}
}
}
|
[
"suranigautam98@gmail.com"
] |
suranigautam98@gmail.com
|
750391d741793315d2271fe1362952d747fd5f63
|
ff2a2d92a89743eb35f2aa0d5f0dec93be693a0f
|
/src/main/java/nc/block/fluid/BlockFluidCryotheum.java
|
3ecfcf509bdfc7a9c7aa532ae83258c0dc2b65e0
|
[
"CC0-1.0"
] |
permissive
|
Ihamfp/NuclearCraft
|
8405fb63f978584929ed51a6bd39522022fe48fa
|
fbd042002fc40fe0d43c91c1433de8eb25315e3a
|
refs/heads/master
| 2020-05-07T15:07:41.602140
| 2019-04-23T13:49:34
| 2019-04-23T13:49:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 762
|
java
|
package nc.block.fluid;
import nc.fluid.FluidCryotheum;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fluids.Fluid;
public class BlockFluidCryotheum extends BlockFluid {
public BlockFluidCryotheum(Fluid fluid) {
super(fluid, Material.LAVA);
setLightLevel(0.5F);
}
public BlockFluidCryotheum(FluidCryotheum fluid) {
super(fluid, Material.LAVA);
setLightLevel(0.5F);
}
@Override
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) {
entityIn.attackEntityFrom(BlockSuperFluid.superfluid_freeze, 4.0F);
}
}
|
[
"joedodd35@gmail.com"
] |
joedodd35@gmail.com
|
925a91286bd7783908cc8f9469c7a2d7a4435062
|
43da78b54b722f0e89aa893f6a56eae95c2a3112
|
/typeclasses/src/main/java/com/github/tonivade/purefun/typeclasses/For5.java
|
96fc7b8d10e0711af4fcbe9f9f297f5078f6503f
|
[
"MIT"
] |
permissive
|
FuncGuy/purefun
|
5287977439e2712d9df05683444162f44a8c5f3c
|
0505e58d03b301f1c4449602ff77ba88fef13d3f
|
refs/heads/master
| 2021-01-01T12:09:27.625175
| 2020-02-06T20:21:56
| 2020-02-06T20:21:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,304
|
java
|
/*
* Copyright (c) 2018-2020, Antonio Gabriel Muñoz Conejo <antoniogmc at gmail dot com>
* Distributed under the terms of the MIT License
*/
package com.github.tonivade.purefun.typeclasses;
import com.github.tonivade.purefun.Function1;
import com.github.tonivade.purefun.Function5;
import com.github.tonivade.purefun.Higher1;
import com.github.tonivade.purefun.Kind;
import com.github.tonivade.purefun.Producer;
import com.github.tonivade.purefun.Tuple5;
import static java.util.Objects.requireNonNull;
public final class For5<F extends Kind, A, B, C, D, E> extends AbstractFor<F, D, E> {
private final Producer<? extends Higher1<F, A>> value1;
private final Function1<A, ? extends Higher1<F, B>> value2;
private final Function1<B, ? extends Higher1<F, C>> value3;
private final Function1<C, ? extends Higher1<F, D>> value4;
protected For5(Monad<F> monad,
Producer<? extends Higher1<F, A>> value1,
Function1<A, ? extends Higher1<F, B>> value2,
Function1<B, ? extends Higher1<F, C>> value3,
Function1<C, ? extends Higher1<F, D>> value4,
Function1<D, ? extends Higher1<F, E>> value5) {
super(monad, value5);
this.value1 = requireNonNull(value1);
this.value2 = requireNonNull(value2);
this.value3 = requireNonNull(value3);
this.value4 = requireNonNull(value4);
}
public Higher1<F, Tuple5<A, B, C, D, E>> tuple() {
return apply(Tuple5::of);
}
public <R> Higher1<F, R> apply(Function5<A, B, C, D, E, R> combine) {
Higher1<F, A> fa = value1.get();
Higher1<F, B> fb = monad.flatMap(fa, value2);
Higher1<F, C> fc = monad.flatMap(fb, value3);
Higher1<F, D> fd = monad.flatMap(fc, value4);
Higher1<F, E> fe = monad.flatMap(fd, value);
return monad.map5(fa, fb, fc, fd, fe, combine);
}
public <R> Higher1<F, R> yield(Function5<A, B, C, D, E, R> combine) {
return monad.flatMap(value1.get(),
a -> monad.flatMap(value2.apply(a),
b -> monad.flatMap(value3.apply(b),
c -> monad.flatMap(value4.apply(c),
d -> monad.map(value.apply(d),
e -> combine.apply(a, b, c, d, e))))));
}
@Override
public Higher1<F, E> run() {
return yield((a, b, c, d, e) -> e);
}
}
|
[
"antoniogmc@gmail.com"
] |
antoniogmc@gmail.com
|
b5768c50292b244763524cac475a3dd26e3a983b
|
8d1014a3800ec0163bdbae78fc55a466fec64715
|
/workspace/shop/src/persistence/PersistentChangeArticlePriceCommand.java
|
c566879c21af6051e7728519c00ab14925d8abcf
|
[] |
no_license
|
Geend/FHDWGojaShop
|
23c186a625b141a90f1599f8a24c34ad0c9676f8
|
1701caa7fa0e76d9b3ef77f2904d2f04bb77da65
|
refs/heads/master
| 2021-06-08T14:08:05.356702
| 2016-12-12T19:19:07
| 2016-12-12T19:19:07
| 72,030,711
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 375
|
java
|
package persistence;
public interface PersistentChangeArticlePriceCommand extends Anything, ShopCommand, PersistentCommonDate, AbstractPersistentProxi, ChangeArticlePriceCommand4Public {
public CommonDate4Public getMyCommonDate() throws PersistenceException ;
public void setMyCommonDate(CommonDate4Public newValue) throws PersistenceException ;
}
|
[
"git@t-voltmer.net"
] |
git@t-voltmer.net
|
155e2edd6bb054c80fc3a73c783108ebef37a717
|
8bba923942604359185cfceffc680b006efb9306
|
/DatabasesFrameworksHibernate/PhotographyWorkshop/src/main/java/softuni/photography/services/impl/CameraServiceImpl.java
|
50ea17fb6dbfa633680bd7fb431ee00c06f9ed15
|
[] |
no_license
|
KaPrimov/JavaCoursesSoftUni
|
d8a48ab30421d7a847f35d970535ddc3da595597
|
9676ec4c9bc1ece13d64880ff47a3728227bf4c9
|
refs/heads/master
| 2022-12-04T13:27:47.249203
| 2022-07-14T14:44:10
| 2022-07-14T14:44:10
| 97,306,295
| 1
| 2
| null | 2022-11-24T09:28:28
| 2017-07-15T09:39:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,181
|
java
|
package softuni.photography.services.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import softuni.photography.entities.Camera;
import softuni.photography.repositories.CameraRepository;
import softuni.photography.services.api.CameraService;
import softuni.photography.utils.DTOValidator;
@Service
@Transactional
public class CameraServiceImpl implements CameraService {
private final CameraRepository cameraRepository;
private final DTOValidator dtoValidator;
@Autowired
public CameraServiceImpl(CameraRepository cameraRepository, DTOValidator dtoValidator) {
this.cameraRepository = cameraRepository;
this.dtoValidator = dtoValidator;
}
@Override
public void save(Camera camera) {
if (dtoValidator.isValid(camera)) {
this.cameraRepository.save(camera);
System.out.printf("Successfully imported %s %s %s%n", camera.getType(), camera.getMake(), camera.getModel());
} else {
System.out.println("Error. Invalid data provided");
}
}
}
|
[
"k.primov92@gmail.com"
] |
k.primov92@gmail.com
|
00ffe52da80887b23998dfc53cbc6461da5c62b7
|
f42eea434af726a2c3c2ce1f18d30445067b56bc
|
/src/LeetCodeSecondEasy/FizzBuzz412.java
|
c703daae03ed117e20f5262a9a92f4e246efb047
|
[] |
no_license
|
peizhe/Algorithm
|
a4efacac785b25504c3e828c703d1fdbe64e972e
|
e429b9ce043055fe68cc137ade8e6350bdd7c88b
|
refs/heads/master
| 2021-01-13T14:48:51.870324
| 2016-12-15T10:53:22
| 2016-12-15T10:53:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 729
|
java
|
package LeetCodeSecondEasy;
import java.util.ArrayList;
import java.util.List;
public class FizzBuzz412 {
public List<String> fizzBuzz(int n) {
if(n < 1) {
return new ArrayList<String>();
}
List<String> res = new ArrayList<String>();
for(int i = 1; i <= n; i++) {
int flag = 1;
if(i % 5 == 0) {
flag = 5;
}
if(i % 3 == 0) {
flag = flag == 5 ? 15 : 3;
}
res.add(flag == 3 ? "Fizz" : flag == 5 ? "Buzz" : flag == 15 ? "FizzBuzz" : i + "");
}
return res;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
|
[
"923762584@qq.com"
] |
923762584@qq.com
|
09791d226710c0b1b491d2186ecb44bb763c35b7
|
ad9d57a23e4029428b511c34ee505338fe9ebee4
|
/src/main/java/javassist/CtClass$DelayedFileOutputStream.java
|
92969c089cbae3f6c9ad1211927500b6b3ddb9ce
|
[] |
no_license
|
yunusborazan/Notorious-0.6
|
550435b5f4dfd3c4b8e79b0c7dd7c0e7c4a35c0c
|
8cc051b75986cae29fe540c2b021a34102df8842
|
refs/heads/main
| 2023-07-29T05:01:50.544957
| 2021-09-08T21:11:21
| 2021-09-08T21:11:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,041
|
java
|
package javassist;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
class CtClass$DelayedFileOutputStream
extends OutputStream {
private FileOutputStream file = null;
private String filename;
CtClass$DelayedFileOutputStream(String name) {
this.filename = name;
}
private void init() throws IOException {
if (this.file == null) {
this.file = new FileOutputStream(this.filename);
}
}
public void write(int b) throws IOException {
this.init();
this.file.write(b);
}
public void write(byte[] b) throws IOException {
this.init();
this.file.write(b);
}
public void write(byte[] b, int off, int len) throws IOException {
this.init();
this.file.write(b, off, len);
}
public void flush() throws IOException {
this.init();
this.file.flush();
}
public void close() throws IOException {
this.init();
this.file.close();
}
}
|
[
"jhonsberger12@gmail.com"
] |
jhonsberger12@gmail.com
|
e8fdfa6445b53feccfe946519601b1e3c3d55c6e
|
bf4c38f33e9352d9fae0f1581862677af21ab5ca
|
/IoT2/org.csu.idl.idlmm/src/org/csu/idl/idlmm/UnaryExpression.java
|
70757e61271aa3b7f29d1b5b91cdf940535b6bc6
|
[] |
no_license
|
diverse-project/melange-examples
|
c0a2b7ecb0659a22e21e1c18202b3682579c7ffa
|
f6b809429a625104f68f0d8321dd10861de724bf
|
refs/heads/master
| 2021-01-19T06:29:01.262950
| 2017-06-28T13:09:43
| 2017-06-28T13:09:43
| 95,668,567
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,376
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.csu.idl.idlmm;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Unary Expression</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.csu.idl.idlmm.UnaryExpression#getExpression <em>Expression</em>}</li>
* <li>{@link org.csu.idl.idlmm.UnaryExpression#getOperator <em>Operator</em>}</li>
* </ul>
* </p>
*
* @see org.csu.idl.idlmm.IdlmmPackage#getUnaryExpression()
* @model
* @generated
*/
public interface UnaryExpression extends Expression {
/**
* Returns the value of the '<em><b>Expression</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Expression</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Expression</em>' containment reference.
* @see #setExpression(Expression)
* @see org.csu.idl.idlmm.IdlmmPackage#getUnaryExpression_Expression()
* @model containment="true" required="true"
* @generated
*/
Expression getExpression();
/**
* Sets the value of the '{@link org.csu.idl.idlmm.UnaryExpression#getExpression <em>Expression</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Expression</em>' containment reference.
* @see #getExpression()
* @generated
*/
void setExpression(Expression value);
/**
* Returns the value of the '<em><b>Operator</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Operator</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Operator</em>' attribute.
* @see #setOperator(String)
* @see org.csu.idl.idlmm.IdlmmPackage#getUnaryExpression_Operator()
* @model required="true"
* @generated
*/
String getOperator();
/**
* Sets the value of the '{@link org.csu.idl.idlmm.UnaryExpression#getOperator <em>Operator</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Operator</em>' attribute.
* @see #getOperator()
* @generated
*/
void setOperator(String value);
} // UnaryExpression
|
[
"degueule@cwi.nl"
] |
degueule@cwi.nl
|
b7bc3814597144e65231389f34d38934cb97fb26
|
6da648bfa9724e974f28a6c43e0178649daa300f
|
/app/src/main/java/takjxh/android/com/taapp/activityui/presenter/WdZjsbPresenter.java
|
57118cbdf66c439d86e49127e68ff5c8b8dd613b
|
[] |
no_license
|
Bingoliallen/takjxhApp
|
2ca44409a4e38f4ca6a4055eb347997fd755efa0
|
4fab96e53bad1806b5e48301a75b798b9beaca25
|
refs/heads/master
| 2023-06-16T17:23:30.364111
| 2021-07-15T07:28:35
| 2021-07-15T07:28:35
| 246,971,816
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,134
|
java
|
package takjxh.android.com.taapp.activityui.presenter;
import java.util.List;
import takjxh.android.com.commlibrary.BaseAppProfile;
import takjxh.android.com.commlibrary.net.ApiException;
import takjxh.android.com.commlibrary.net.ResponseCode;
import takjxh.android.com.commlibrary.net.RxHelper;
import takjxh.android.com.commlibrary.presenter.impl.BasePresenter;
import takjxh.android.com.commlibrary.utils.ShareUtils;
import takjxh.android.com.taapp.activityui.bean.DownFileByApplyId;
import takjxh.android.com.taapp.activityui.bean.PolicyApplyBean;
import takjxh.android.com.taapp.activityui.model.WdZjsbModel;
import takjxh.android.com.taapp.activityui.presenter.impl.IWdZjsbPresenter;
import takjxh.android.com.taapp.net.NetDialogSubscriber;
import rx.functions.Func1;
/**
* 类名称:
*
* @Author: libaibing
* @Date: 2019-11-13 13:36
* @Description:
**/
public class WdZjsbPresenter extends BasePresenter<IWdZjsbPresenter.IView, WdZjsbModel> implements IWdZjsbPresenter {
public WdZjsbPresenter(IView view) {
super(view);
}
@Override
protected WdZjsbModel createModel() {
return new WdZjsbModel();
}
@Override
public void policyapplylist(String token, String status, String page, String pageSize) {
token = ShareUtils.getString(BaseAppProfile.getApplication(), "token", "");
getCompositeSubscription().add(mModel.policyapplylist(token, status, page, pageSize)
.compose(RxHelper.io_main())
.map(new Response2DataFunc())
.subscribe(new NetDialogSubscriber<List<PolicyApplyBean.ApplyInfosBean>>(getView().getContext()) {
@Override
public int configuration() {
return DEFAULT;
}
@Override
public void onNext(List<PolicyApplyBean.ApplyInfosBean> mBean) {
super.onNext(mBean);
if (isAttach()) {
getView().policyapplylistSuccess(mBean);
}
}
@Override
public void onError(Throwable e) {
super.onError(e);
if (isAttach()) {
getView().policyapplylistFailed();
}
}
}));
}
@Override
public void downFileByApplyId(String token, String applyId) {
token = ShareUtils.getString(BaseAppProfile.getApplication(), "token", "");
getCompositeSubscription().add(mModel.downFileByApplyId(token,applyId)
.compose(RxHelper.io_main())
.map(new Response2DataFunc1())
.subscribe(new NetDialogSubscriber<DownFileByApplyId>(getView().getContext()) {
@Override
public int configuration() {
return DEFAULT;
}
@Override
public void onNext(DownFileByApplyId mBean) {
super.onNext(mBean);
if (isAttach()) {
getView().downFileByApplyIdSuccess(mBean);
}
}
@Override
public void onError(Throwable e) {
super.onError(e);
if (isAttach()) {
getView().downFileByApplyIdFailed(e.getMessage());
}
}
}));
}
@Override
public void downSJByApplyId(String token, String applyId) {
token = ShareUtils.getString(BaseAppProfile.getApplication(), "token", "");
getCompositeSubscription().add(mModel.downSJByApplyId(token,applyId)
.compose(RxHelper.io_main())
.map(new Response2DataFunc1())
.subscribe(new NetDialogSubscriber<DownFileByApplyId>(getView().getContext()) {
@Override
public int configuration() {
return DEFAULT;
}
@Override
public void onNext(DownFileByApplyId mBean) {
super.onNext(mBean);
if (isAttach()) {
getView().downSJByApplyIdSuccess(mBean);
}
}
@Override
public void onError(Throwable e) {
super.onError(e);
if (isAttach()) {
getView().downSJByApplyIdFailed(e.getMessage());
}
}
}));
}
/**
* 返回元素
*/
public static class Response2DataFunc<T> implements Func1<PolicyApplyBean<T>, T> {
@Override
public T call(PolicyApplyBean<T> response) {
if (response != null) {
RxHelper.beanToJson(response);
}
if (response == null) {
throw new ApiException(ResponseCode.RESPONSE_NULL, "response is null");
} else if (ResponseCode.SUCCESS == response.resCode) {
return response.applyInfos;
} else {
throw new ApiException(response.resCode, response.resDes);
}
}
}
/**
* 返回元素
*/
public static class Response2DataFunc1<T> implements Func1<DownFileByApplyId<T>, T> {
@Override
public DownFileByApplyId call(DownFileByApplyId response) {
if (response != null) {
RxHelper.beanToJson(response);
}
if (response == null) {
throw new ApiException(ResponseCode.RESPONSE_NULL, "response is null");
} else if (ResponseCode.SUCCESS == response.resCode) {
return response;
} else {
throw new ApiException(response.resCode, response.resDes);
}
}
}
}
|
[
"1241903717@qq.com"
] |
1241903717@qq.com
|
568d71a963b58f70ce567a0611af4b385d3fc14f
|
b2f07f3e27b2162b5ee6896814f96c59c2c17405
|
/com/sun/jndi/cosnaming/CNCtxFactory.java
|
263740bd5c153af14c55ec6b83ef5be248db6cda
|
[] |
no_license
|
weiju-xi/RT-JAR-CODE
|
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
|
d5b2590518ffb83596a3aa3849249cf871ab6d4e
|
refs/heads/master
| 2021-09-08T02:36:06.675911
| 2018-03-06T05:27:49
| 2018-03-06T05:27:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 688
|
java
|
/* */ package com.sun.jndi.cosnaming;
/* */
/* */ import java.util.Hashtable;
/* */ import javax.naming.Context;
/* */ import javax.naming.NamingException;
/* */ import javax.naming.spi.InitialContextFactory;
/* */
/* */ public class CNCtxFactory
/* */ implements InitialContextFactory
/* */ {
/* */ public Context getInitialContext(Hashtable<?, ?> paramHashtable)
/* */ throws NamingException
/* */ {
/* 49 */ return new CNCtx(paramHashtable);
/* */ }
/* */ }
/* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar
* Qualified Name: com.sun.jndi.cosnaming.CNCtxFactory
* JD-Core Version: 0.6.2
*/
|
[
"yuexiahandao@gmail.com"
] |
yuexiahandao@gmail.com
|
a83d1ee67665942e1760bd7f0d2f9b9646b1c5ea
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_5744014401732608_1/java/karsten/B.java
|
d69070754108768ffc7c918106aa4c1701a57f0d
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,414
|
java
|
package round1c;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class B {
public static void main(String[] args) throws Exception {
BufferedWriter bw = new BufferedWriter(new FileWriter(
"B-large.out"));
BufferedReader br = new BufferedReader(new FileReader(
"B-large.in"));
br.readLine();
String line;
int testCase = 1;
while ((line = br.readLine()) != null) {
if (line.length() == 0) {
break;
}
bw.write("Case #" + testCase++ + ": ");
String[] parts = line.split(" ");
long b = Long.parseLong(parts[0]);
long m = Long.parseLong(parts[1]);
if (b == 2) {
if (m != 1) {
bw.write("IMPOSSIBLE\n");
} else {
bw.write("POSSIBLE\n01\n00\n");
}
} else {
long max = (1L << (b - 2));
if (m > max) {
bw.write("IMPOSSIBLE\n");
} else {
bw.write("POSSIBLE\n0");
bw.write(String.format("%" + (b - 2) + "s",
Long.toBinaryString(m - 1))
.replace(' ', '0'));
bw.write("1\n");
for (int j = 1; j < b; j++) {
for (int k = 0; k < b; k++) {
bw.write(k <= j ? "0" : "1");
}
bw.write("\n");
}
}
}
}
br.close();
bw.close();
}
}
|
[
"alexandra1.back@gmail.com"
] |
alexandra1.back@gmail.com
|
d5893c99f34422e9989dd5021dc0b5f5ae414835
|
dac548797905984302537804379f53736512bef4
|
/yi-web-server/src/main/java/com/yi/webserver/web/auth/jwt/JwtWebToken.java
|
96c8b7449496aa41f07d1e1e23ccf89e49c678b7
|
[] |
no_license
|
TanoteAlex/yi
|
4c593b71e3285e62775f6293b0c3c0633853bc6d
|
e877aca354180a3b77db4d2995eff569b6aa4292
|
refs/heads/master
| 2023-01-09T02:38:44.546467
| 2019-10-22T10:04:59
| 2019-10-22T10:04:59
| 216,754,013
| 0
| 1
| null | 2023-01-05T23:34:27
| 2019-10-22T07:48:51
|
TypeScript
|
UTF-8
|
Java
| false
| false
| 5,334
|
java
|
package com.yi.webserver.web.auth.jwt;
import static com.yi.base.ProjectConstants.USER_CODE;
import java.security.Key;
import java.util.Base64;
import java.util.Date;
import javax.crypto.spec.SecretKeySpec;
import javax.servlet.http.HttpServletRequest;
import javax.xml.bind.DatatypeConverter;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
/**
* Jwt token工具
*/
public class JwtWebToken {
private final static Logger LOG = LoggerFactory.getLogger(JwtWebToken.class);
public final static String TOKEN_HEADER = "web-token";
private final static String SERCET_KEY = "web-token-y001";
private final static byte[] API_KEY_SECRET_BYTES = DatatypeConverter.parseBase64Binary(SERCET_KEY);
// 过期时间7天
private final static long KEEP_TIME = 7 * 24 * 60 * 60 * 1000;
/**
* 生成token
*
* @param userId
* @param userCode
* @param issuer
* @param subject
* @return
*/
public static String generateToken(int userId, String userCode, String issuer, String subject) {
SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
Key signingKey = new SecretKeySpec(API_KEY_SECRET_BYTES, signatureAlgorithm.getJcaName());
// 签发时间
Date iat = new Date();
// 失效时间
Date exp = new Date(iat.getTime() + KEEP_TIME);
JwtBuilder builder = Jwts.builder().setId(String.valueOf(userId)).setIssuedAt(new Date());
if (subject != null) {
builder.setSubject(subject);
}
if (issuer != null) {
builder.setIssuer(issuer);
}
if (userCode != null) {
builder.claim(USER_CODE, userCode);
}
builder.signWith(signatureAlgorithm, signingKey);
builder.setExpiration(exp);
// if (keeptime >= 0) {
// Date exp = new Date(System.currentTimeMillis() + keeptime);
// builder.setExpiration(exp);
// }
return builder.compact();
}
public static String updateToken(String token) {
try {
Claims claims = getClaimsByToken(token);
String id = claims.getId();
String subject = claims.getSubject();
String issuer = claims.getIssuer();
String userCode = (String) claims.get(USER_CODE);
return generateToken(Integer.parseInt(id), userCode, issuer, subject);
} catch (Exception ex) {
LOG.info("JWT令牌更新失败, token={}", token, ex);
}
return null;
}
public static String updateTokenBase64Code(String token) {
Base64.Encoder base64Encoder = Base64.getEncoder();
Base64.Decoder decoder = Base64.getDecoder();
try {
token = new String(decoder.decode(token), "utf-8");
Claims claims = getClaimsByToken(token);
String id = claims.getId();
String subject = claims.getSubject();
String issuer = claims.getIssuer();
String userCode = (String) claims.get(USER_CODE);
String newToken = generateToken(Integer.parseInt(id), userCode, issuer, subject);
return base64Encoder.encodeToString(newToken.getBytes());
} catch (Exception ex) {
LOG.info("JWT令牌更新失败, token={}", token, ex);
}
return null;
}
/**
* 通过 token 获取 Claims
*
* @param token
* @return
*/
public static Claims getClaimsByToken(String token) {
return Jwts.parser().setSigningKey(API_KEY_SECRET_BYTES).parseClaimsJws(token).getBody();
}
/**
* 校验token
*
* @param token
* @return true 验证通过 false 验证不通过
*/
public static boolean verifyToken(String token) {
Claims claims = Jwts.parser().setSigningKey(API_KEY_SECRET_BYTES).parseClaimsJws(token).getBody();
if (claims.getExpiration().after(new Date())) {
return true;
}
return false;
}
public static WebToken getToken(String token) {
LOG.debug("解析JWT令牌 {}", token);
try {
Claims claims = getClaimsByToken(token);
String id = claims.getId();
String subject = claims.getSubject();
String issuer = claims.getIssuer();
String userCode = (String) claims.get(USER_CODE);
WebToken tk = new WebToken(Integer.parseInt(id), userCode, issuer, subject);
LOG.debug("JWT令牌解析成功 {}", tk);
return tk;
} catch (Exception ex) {
LOG.info("JWT令牌解析失败, token={}", token, ex);
}
return null;
}
public static WebToken getSupplierToken(HttpServletRequest request) {
String token = getTokenFromRequest(request);
LOG.info("解析JWT令牌 {}", token);
try {
Claims claims = getClaimsByToken(token);
String id = claims.getId();
String subject = claims.getSubject();
String issuer = claims.getIssuer();
String userCode = (String) claims.get(USER_CODE);
WebToken tk = new WebToken(Integer.parseInt(id), userCode, issuer, subject);
LOG.info("JWT令牌解析成功 {}", tk);
return tk;
} catch (Exception ex) {
LOG.error("JWT令牌解析失败, token={}", token, ex);
}
return null;
}
/**
* 从请求信息中获取token值
*
* @param request
* request
* @return token值
*/
public static String getTokenFromRequest(HttpServletRequest request) {
// 默认从header里获取token值
String token = request.getHeader(JwtWebToken.TOKEN_HEADER);
if (StringUtils.isBlank(token)) {
// 从请求信息中获取token值
token = request.getParameter(JwtWebToken.TOKEN_HEADER);
}
return token;
}
}
|
[
"582175148@qq.com"
] |
582175148@qq.com
|
024d90873b28327c2d55cc01a5ddf6b97cef6680
|
0ff1d0ee1f9ea1e1b46fbd65d1d457ba2760e543
|
/src/main/java/com/sen/concurrency2/chapter4/Observer.java
|
7469ec3af468c8455aa0a30ccfd6d59e8ba91cf7
|
[
"Apache-2.0"
] |
permissive
|
sumforest/concurrency
|
100abc27f3436d356d17f76d80f90293f5d1451a
|
2470277fa614e049400a6b33f38ebf6289d5b774
|
refs/heads/master
| 2021-06-24T04:54:00.159469
| 2021-05-23T12:09:26
| 2021-05-23T12:09:26
| 226,290,511
| 0
| 0
|
Apache-2.0
| 2020-10-13T18:13:08
| 2019-12-06T09:18:02
|
Java
|
UTF-8
|
Java
| false
| false
| 375
|
java
|
package com.sen.concurrency2.chapter4;
/**
* @Author: Sen
* @Date: 2019/12/9 03:04
* @Description: 观察者抽象类
*/
public abstract class Observer {
protected Subject subject;
public Observer(Subject subject) {
this.subject = subject;
subject.attach(this);
}
/**
* 状态更新
*/
protected abstract void update();
}
|
[
"12345678"
] |
12345678
|
c6a205be5b0f858de446caf5337d22a6be5f2607
|
831571fa80c0df34255d924437341c18ad6126b8
|
/src/main/java/com/yufan/utils/sms/netease/NeteaseConstant.java
|
601f31507a30e135b2903520d8630246b9ac4ebf
|
[] |
no_license
|
lirf2018/store-info
|
cb8a4a4f08dc0db7f7fd1768cc5bfcb517ce5b45
|
93dfccac92624109e51623b193b27ec08624ad29
|
refs/heads/master
| 2022-07-05T05:00:29.599121
| 2021-09-12T14:50:11
| 2021-09-12T14:50:11
| 203,939,305
| 0
| 0
| null | 2022-06-17T02:23:52
| 2019-08-23T06:39:20
|
Java
|
UTF-8
|
Java
| false
| false
| 2,902
|
java
|
package com.yufan.utils.sms.netease;
import java.util.HashMap;
import java.util.Map;
/**
* 创建人: lirf
* 创建时间: 2017-11-29 9:31
* 功能介绍: 网易常量参数
*/
public class NeteaseConstant {
public final static Map<Integer, String> codeMap = new HashMap<Integer, String>();
static {
codeMap.put(201, "客户端版本不对,需升级sdk");
codeMap.put(301, "被封禁");
codeMap.put(302, "用户名或密码错误");
codeMap.put(315, "IP限制");
codeMap.put(403, "非法操作或没有权限");
codeMap.put(404, "对象不存在");
codeMap.put(405, "参数长度过长");
codeMap.put(406, "对象只读");
codeMap.put(408, "客户端请求超时");
codeMap.put(413, "验证失败(短信服务)");
codeMap.put(414, "参数错误");
codeMap.put(415, "客户端网络问题");
codeMap.put(416, "频率控制");
codeMap.put(417, "重复操作");
codeMap.put(418, "通道不可用(短信服务)");
codeMap.put(419, "数量超过上限");
codeMap.put(422, "账号被禁用");
codeMap.put(431, "HTTP重复请求");
codeMap.put(500, "服务器内部错误");
codeMap.put(503, "服务器繁忙");
codeMap.put(508, "消息撤回时间超限");
codeMap.put(509, "无效协议");
codeMap.put(514, "服务不可用");
codeMap.put(998, "解包错误");
codeMap.put(999, "打包错误");
codeMap.put(801, "群人数达到上限");
codeMap.put(802, "没有权限");
codeMap.put(803, "群不存在");
codeMap.put(804, "用户不在群");
codeMap.put(805, "群类型不匹配");
codeMap.put(806, "创建群数量达到限制");
codeMap.put(807, "群成员状态错误");
codeMap.put(808, "申请成功");
codeMap.put(809, "已经在群内");
codeMap.put(810, "邀请成功");
codeMap.put(9102, "通道失效");
codeMap.put(9103, "已经在他端对这个呼叫响应过了");
codeMap.put(11001, "通话不可达,对方离线状态");
codeMap.put(13001, "IM主连接状态异常");
codeMap.put(13002, "聊天室状态异常");
codeMap.put(13003, "账号在黑名单中,不允许进入聊天室");
codeMap.put(13004, "在禁言列表中,不允许发言");
codeMap.put(10431, "输入email不是邮箱");
codeMap.put(10432, "输入mobile不是手机号码");
codeMap.put(10433, "注册输入的两次密码不相同");
codeMap.put(10434, "企业不存在");
codeMap.put(10435, "登陆密码或帐号不对");
codeMap.put(10436, "app不存在");
codeMap.put(10437, "email已注册");
codeMap.put(10438, "手机号已注册");
codeMap.put(10441, "app名字已经存在");
}
}
|
[
"512164882@qq.com"
] |
512164882@qq.com
|
5d8cf69afb4a747adb977f5f400fa3909c4dcac8
|
4e4b6e6e724e1ca7abede9fbd220acf4ad3ca217
|
/src/com/alby/dp/singleton/example1/Singleton.java
|
96eb2a07597cd28e3f51419ce2965cda0d537ba6
|
[] |
no_license
|
shixw/design-patterns
|
00e7e435dc794525f0b2b554929071dddfc6721a
|
4cd192eeecd957f8644fb9500870954998aefd66
|
refs/heads/master
| 2021-01-10T03:50:51.648522
| 2016-01-09T09:54:16
| 2016-01-09T09:54:16
| 46,933,625
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,324
|
java
|
package com.alby.dp.singleton.example1;
/**
* Created by xianwei on 2015/11/29.
* 单例模式(懒汉式)
*/
public class Singleton {
/**
* 定义一个变量来存储创建好的类实例
* 因为这个变量要在静态方法中使用,所以需要加上static修饰
*/
private static Singleton uniqueInstance = null;
/**
* 私有化构造方法,好在内部控制创建实例的数目
*/
private Singleton() {
}
/**
* 定义一个方法来为客户端提供类的实例
*
* @return 一个类的实例
*/
public static synchronized Singleton getInstance() {
//判断存储实例的变量是否有值
if (uniqueInstance == null) {
//如果没有,就创建一个类的实例,并把值赋值给存储类实例的变量
uniqueInstance = new Singleton();
}
return uniqueInstance;
}
/**
* 单例可以有自己的操作
*/
public void singletonOperation() {
//功能处理
}
/**
* 单例可以有自己的属性
*/
private String singletonData;
/**
* 让外部通过这些方法来访问属性的值
*
* @return 属性的值
*/
public String getSingletonData() {
return singletonData;
}
}
|
[
"shixw_usr@126.com"
] |
shixw_usr@126.com
|
5aebe8792c385f05fd94a75cdee75181f5e59cc9
|
9e979f9a3af48ecde611cf96b5ac3522063bdf6d
|
/src/main/java/org/criteria4jpa/criterion/Criterion.java
|
5baf71e338a30e3434122d716682fed7eb746ad1
|
[
"Apache-2.0"
] |
permissive
|
VijayEluri/criteria4jpa
|
4375da03a06ff2bc18fc08b3a626bd53d7fe7477
|
3d8d9952808be9aa7f57130d5e4fd3606dba3100
|
refs/heads/master
| 2020-05-20T11:00:55.018340
| 2011-07-05T04:28:04
| 2011-07-05T04:28:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,345
|
java
|
package org.criteria4jpa.criterion;
import org.criteria4jpa.Criteria;
import org.criteria4jpa.impl.CriteriaQueryBuilder;
/**
*
* <p>
* Interface describing a restriction that can be added to a {@link Criteria}.
* </p>
*
* <p>
* The {@link Criterion} is rendered to a WHERE expression in the generated
* JPQL query and may be added to a {@link Criteria} by calling
* {@link Criteria#add(Criterion)}.
* </p>
*
* <p>
* You should use the static factory methods of {@link Restrictions} to obtain
* predefined restrictions.
* </p>
*
* @author Christian Kaltepoth
*
*/
public interface Criterion {
/**
* Renders the {@link Criterion} to a WHERE expression in the JPQL query.
*
* @param criteria The criteria this criterion was added to
* @param queryBuilder The query builder that is currently building the query
* @return The JPQL WHERE expression
*/
public String toQueryString(Criteria criteria, CriteriaQueryBuilder queryBuilder);
/**
* Returns the query parameter values of this {@link Criterion}.
* The order of the values in the array must match the order of the
* <code>?</code> place holders in the expression created by
* {@link #toQueryString(Criteria, CriteriaQueryBuilder)}.
*
* @return Array of query parameters
*/
public Object[] getParameterValues();
}
|
[
"christian@kaltepoth.de"
] |
christian@kaltepoth.de
|
4b83d2a2d1a80e4cf77385438fcdf4027d8d71f2
|
01afad4f9b89b15c73b011b7243cd6a2905bc273
|
/app/src/main/java/com/moe/booru/adapter/SiteAdapter.java
|
91d944f4a6d0e7e82807a92c1cea8ec70ec02447
|
[] |
no_license
|
dorobonneko/MoeBooru
|
b47224d221fd4eedbbc4be04f3641fdd7b1c5b31
|
8f6a7b83eabf93ef0ccc822f7daff78eccc472f2
|
refs/heads/master
| 2020-03-25T12:59:49.986612
| 2019-02-02T11:09:11
| 2019-02-02T11:09:11
| 143,804,672
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,220
|
java
|
package com.moe.booru.adapter;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import com.moe.booru.database.DataStore;
import java.util.List;
import android.widget.TextView;
import android.util.TypedValue;
import android.view.Gravity;
import com.moe.booru.R;
import android.graphics.drawable.ColorDrawable;
import android.widget.LinearLayout;
import com.moe.booru.widget.SwipeBarLayout;
import android.widget.ImageView;
import android.view.MotionEvent;
public class SiteAdapter extends ClickAdapter<SiteAdapter.ViewHolder>
{
private List<DataStore.Site> list;
private int selected=-1;
private ViewHolder openedPosition;
public SiteAdapter(List<DataStore.Site> list){
this.list=list;
}
public ViewHolder getOpened(){
return openedPosition;
}
public void close(){
if(openedPosition!=null)
openedPosition.close();
openedPosition=null;
}
public int getSelect(){
return selected;
}
public void setSelect(int position){
selected=position;
notifyDataSetChanged();
}
@Override
public SiteAdapter.ViewHolder onCreateViewHolder(ViewGroup p1, int p2)
{
int height=(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,54,p1.getResources().getDisplayMetrics());
LinearLayout buttonGroup=new LinearLayout(p1.getContext());
buttonGroup.setBackgroundColor(0x10000000);
SwipeBarLayout.LayoutParams sl=new SwipeBarLayout.LayoutParams(-2,-1);
sl.direction=sl.LEFT;
buttonGroup.setLayoutParams(sl);
ImageView edit=new ImageView(p1.getContext());
edit.setLayoutParams(new LinearLayout.LayoutParams(height,height));
edit.setImageDrawable(edit.getResources().getDrawable(R.drawable.pencil,edit.getContext().getTheme()));
edit.setBackground(edit.getResources().getDrawable(R.drawable.ripple_circle,edit.getContext().getTheme()));
edit.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
edit.setId(android.R.id.edit);
ImageView delete=new ImageView(p1.getContext());
delete.setLayoutParams(new LinearLayout.LayoutParams(height,height));
delete.setImageDrawable(edit.getResources().getDrawable(R.drawable.delete,edit.getContext().getTheme()));
delete.setBackground(edit.getResources().getDrawable(R.drawable.ripple_circle,edit.getContext().getTheme()));
delete.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
delete.setId(android.R.id.custom);
buttonGroup.addView(edit);
buttonGroup.addView(delete);
TextView title=new TextView(p1.getContext());
title.setLayoutParams(new SwipeBarLayout.LayoutParams(-1,height));
title.setGravity(Gravity.CENTER_VERTICAL);
title.setPaddingRelative((int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,16,p1.getResources().getDisplayMetrics()),0,0,0);
title.setTextSize(TypedValue.COMPLEX_UNIT_SP,18);
title.setBackground(p1.getResources().getDrawable(R.drawable.ripple_border,p1.getContext().getTheme()));
ColorDrawable color=new ColorDrawable();
color.setColor(p1.getResources().getColor(R.color.accent,p1.getContext().getTheme()));
title.setForeground(color);
title.setId(android.R.id.title);
SwipeBarLayout swipe=new SwipeBarLayout(p1.getContext());
swipe.setLayoutParams(new RecyclerView.LayoutParams(-1,height));
swipe.addView(buttonGroup);
swipe.addView(title);
return new ViewHolder(swipe);
}
@Override
public void onBindViewHolder(SiteAdapter.ViewHolder p1, int p2)
{
DataStore.Site site=list.get(p1.getPosition());
p1.title.setTextColor(site.getName().hashCode()|0xff000000);
p1.title.setText(site.getName());
if(selected==site.get_Id())
((ColorDrawable)p1.title.getForeground()).setAlpha(0x7f);
else
((ColorDrawable)p1.title.getForeground()).setAlpha(0);
}
@Override
public int getItemViewType(int position)
{
// TODO: Implement this method
return position;
}
@Override
public int getItemCount()
{
// TODO: Implement this method
return list.size();
}
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener,View.OnLongClickListener,SwipeBarLayout.Callback,View.OnTouchListener{
TextView title;
SwipeBarLayout swipe;
boolean open;
@Override
public boolean onTouch(View p1, MotionEvent p2)
{
if(openedPosition!=null&&openedPosition!=this&&p2.getAction()==p2.ACTION_DOWN)
{
SiteAdapter.this.close();
return true;}
return false;
}
public ViewHolder(View v){
super(v);
swipe=(SwipeBarLayout) v;
title= v.findViewById(android.R.id.title);
title.setOnClickListener(this);
title.setOnLongClickListener(this);
v.findViewById(android.R.id.edit).setOnClickListener(this);
v.findViewById(android.R.id.custom).setOnClickListener(this);
swipe.setCallback(this);
title.setOnTouchListener(this);
}
public void close(){
swipe.setOpen(false);
}
@Override
public void onSwiped(SwipeBarLayout layout, boolean isOpen)
{
if(isOpen)
openedPosition=this;
else{
if(openedPosition==this)
openedPosition=null;
}
/*if(isOpen&&this!=openedPosition){
if(openedPosition!=null){
openedPosition.open=false;
notifyItemChanged(openedPosition.getAdapterPosition());
}
openedPosition=this;
openedPosition.open=true;
}else if(!isOpen&&openedPosition==this){
openedPosition.open=false;
openedPosition=null;
}*/
}
@Override
public void onClick(View p1)
{
switch(p1.getId()){
case android.R.id.title:
if(swipe.isOpen())
swipe.setOpen(false);
else
if(isClickable())
getOnItemClickListener().onItemClick(SiteAdapter.this,this);
break;
case android.R.id.edit:
if(isClickable())
((OnItemClickListener)getOnItemClickListener()).onEdit(SiteAdapter.this,this);
swipe.setOpen(false);
break;
case android.R.id.custom:
if(isClickable())
((OnItemClickListener)getOnItemClickListener()).onDelete(SiteAdapter.this,this);
swipe.setOpen(false);
break;
}
}
@Override
public boolean onLongClick(View p1)
{
if(!swipe.isOpen())
swipe.setOpen(true);
return true;
}
}
public interface OnItemClickListener extends ClickAdapter.OnItemClickListener{
void onEdit(SiteAdapter adapter,ViewHolder vh);
void onDelete(SiteAdapter adapter,ViewHolder vh);
}
}
|
[
"dorobonneko@gmail.com"
] |
dorobonneko@gmail.com
|
df9637bc4cc416b0fbf08e6ca9de01de7970f298
|
66d19fb59331f32520362c8478c5a7c19000e2ce
|
/mes-root/mes-auto-worker/src/main/java/com/hengyi/japp/mes/auto/worker/application/GradeServiceImpl.java
|
27f4820c86d5ef9e65be2a71cb2cfa920b6b473a
|
[] |
no_license
|
ixtf/mes
|
d5008c03e383780b7b3bc85ea3cce7afec4b9d71
|
713c50add9e6cc4ba919a2c5a3a61fe5690d411d
|
refs/heads/master
| 2023-01-07T08:10:16.505287
| 2019-11-11T20:35:12
| 2019-11-11T20:35:12
| 195,050,351
| 1
| 1
| null | 2023-01-07T07:27:21
| 2019-07-03T12:36:28
|
Java
|
UTF-8
|
Java
| false
| false
| 1,678
|
java
|
package com.hengyi.japp.mes.auto.worker.application;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.hengyi.japp.mes.auto.application.GradeService;
import com.hengyi.japp.mes.auto.application.command.GradeUpdateCommand;
import com.hengyi.japp.mes.auto.domain.Grade;
import com.hengyi.japp.mes.auto.domain.Operator;
import com.hengyi.japp.mes.auto.repository.GradeRepository;
import com.hengyi.japp.mes.auto.repository.OperatorRepository;
import lombok.extern.slf4j.Slf4j;
import java.security.Principal;
/**
* @author jzb 2018-06-22
*/
@Slf4j
@Singleton
public class GradeServiceImpl implements GradeService {
private final GradeRepository gradeRepository;
private final OperatorRepository operatorRepository;
@Inject
private GradeServiceImpl(GradeRepository gradeRepository, OperatorRepository operatorRepository) {
this.gradeRepository = gradeRepository;
this.operatorRepository = operatorRepository;
}
@Override
public Grade create(Principal principal, GradeUpdateCommand command) {
return save(principal, new Grade(), command);
}
private Grade save(Principal principal, Grade grade, GradeUpdateCommand command) {
final Operator operator = operatorRepository.find(principal);
grade.setName(command.getName());
grade.setCode(command.getCode());
grade.setSortBy(command.getSortBy());
grade.log(operator);
return gradeRepository.save(grade);
}
@Override
public Grade update(Principal principal, String id, GradeUpdateCommand command) {
return save(principal, gradeRepository.find(id).get(), command);
}
}
|
[
"ixtf1984@gmail.com"
] |
ixtf1984@gmail.com
|
01657df0ea3d8105caf9550e71d5bb4603d49d9c
|
3182dd5e2cb4c93c562293816203038d5e4c9708
|
/src/java/com/github/fge/msgsimple/bundle/MessageBundle.java
|
4d7e9d50bca2f6283333cd81a859eaf2a8ac3706
|
[] |
no_license
|
mrauer/TAC-Verif
|
46f1fdc06475fef6d217f48a2ee6a6ffc8ec3e4f
|
5231854f94008729fb1be67992ffafd2ae8908a3
|
refs/heads/master
| 2023-07-16T22:25:33.181442
| 2021-08-29T16:00:37
| 2021-08-29T16:00:37
| 401,082,799
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,345
|
java
|
/*
* Decompiled with CFR 0.0.
*
* Could not load the following classes:
* java.lang.IllegalArgumentException
* java.lang.NullPointerException
* java.lang.Object
* java.lang.String
* java.lang.StringBuffer
* java.text.FieldPosition
* java.text.MessageFormat
* java.util.ArrayList
* java.util.Collection
* java.util.IllegalFormatException
* java.util.Iterator
* java.util.List
* java.util.Locale
*/
package com.github.fge.msgsimple.bundle;
import com.github.fge.Frozen;
import com.github.fge.msgsimple.InternalBundle;
import com.github.fge.msgsimple.bundle.MessageBundleBuilder;
import com.github.fge.msgsimple.provider.MessageSourceProvider;
import com.github.fge.msgsimple.source.MessageSource;
import java.text.FieldPosition;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.IllegalFormatException;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
public final class MessageBundle
implements Frozen<MessageBundleBuilder> {
public static final InternalBundle BUNDLE = InternalBundle.INSTANCE;
public final List<MessageSourceProvider> providers;
public MessageBundle(MessageBundleBuilder messageBundleBuilder) {
ArrayList arrayList;
this.providers = arrayList = new ArrayList();
arrayList.addAll(messageBundleBuilder.providers);
}
public void checkArgument(boolean bl, String string) {
Locale locale = Locale.getDefault();
if (bl) {
return;
}
throw new IllegalArgumentException(this.getMessage(locale, string));
}
public /* varargs */ void checkArgumentFormat(boolean bl, String string, Object ... arrobject) {
String string2;
Locale locale = Locale.getDefault();
if (bl) {
return;
}
string2 = this.getMessage(locale, string);
try {
string2 = new MessageFormat(string2, locale).format(arrobject, new StringBuffer(string2.length()), null).toString();
}
catch (IllegalArgumentException illegalArgumentException) {}
throw new IllegalArgumentException(string2);
}
public /* varargs */ void checkArgumentPrintf(boolean bl, String string, Object ... arrobject) {
String string2;
Locale locale = Locale.getDefault();
if (bl) {
return;
}
string2 = this.getMessage(locale, string);
try {
string2 = String.format((Locale)locale, (String)string2, (Object[])arrobject);
}
catch (IllegalFormatException illegalFormatException) {}
throw new IllegalArgumentException(string2);
}
public <T> T checkNotNull(T t, String string) {
Locale locale = Locale.getDefault();
if (t != null) {
return t;
}
throw new NullPointerException(this.getMessage(locale, string));
}
public /* varargs */ <T> T checkNotNullPrintf(T t, String string, Object ... arrobject) {
String string2;
Locale locale = Locale.getDefault();
if (t != null) {
return t;
}
string2 = this.getMessage(locale, string);
try {
string2 = String.format((Locale)locale, (String)string2, (Object[])arrobject);
}
catch (IllegalFormatException illegalFormatException) {}
throw new NullPointerException(string2);
}
public String getMessage(String string) {
return this.getMessage(Locale.getDefault(), string);
}
public String getMessage(Locale locale, String string) {
Locale locale2;
Locale locale3;
InternalBundle internalBundle = BUNDLE;
internalBundle.checkNotNull(string, "query.nullKey");
internalBundle.checkNotNull(locale, "query.nullLocale");
String string2 = locale.getLanguage();
String string3 = locale.getCountry();
String string4 = locale.getVariant();
ArrayList arrayList = new ArrayList();
arrayList.add((Object)locale);
if (!string4.isEmpty() && !(locale2 = new Locale(string2, string3)).equals((Object)Locale.ROOT)) {
arrayList.add((Object)locale2);
}
if (!string3.isEmpty() && !(locale3 = new Locale(string2)).equals((Object)Locale.ROOT)) {
arrayList.add((Object)locale3);
}
if (!string2.isEmpty()) {
arrayList.add((Object)Locale.ROOT);
}
for (Locale locale4 : arrayList) {
Iterator iterator = this.providers.iterator();
while (iterator.hasNext()) {
String string5;
MessageSource messageSource = ((MessageSourceProvider)iterator.next()).getMessageSource(locale4);
if (messageSource == null || (string5 = messageSource.getKey(string)) == null) continue;
return string5;
}
}
return string;
}
public /* varargs */ String printf(Locale locale, String string, Object ... arrobject) {
String string2 = this.getMessage(locale, string);
try {
String string3 = String.format((Locale)locale, (String)string2, (Object[])arrobject);
return string3;
}
catch (IllegalFormatException illegalFormatException) {
return string2;
}
}
}
|
[
"maxime.rauer@gmail.com"
] |
maxime.rauer@gmail.com
|
5b5b5ef41171004f31fb8421a84685ea06c26f40
|
6039432df47c3de269cf6645b38e6392f421abf6
|
/spring-by-example/modules/sbe-servlet-context-scope/src/test/java/org/springbyexample/web/context/ServletContextScopeTest.java
|
0757a852333b9b02a7fbecc9a81c11a8d3b9b3a0
|
[
"Apache-2.0"
] |
permissive
|
selvarajas/desingpattern
|
a61afdca3498f494be1b3943403b92ee1a3cb35e
|
ad71bba4faeb92cbdc7162f2d251009a4d114e08
|
refs/heads/master
| 2021-01-19T04:20:32.905520
| 2016-06-21T11:00:36
| 2016-06-21T11:00:36
| 60,693,311
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,677
|
java
|
/*
* Copyright 2007-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springbyexample.web.context;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockServletContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* Tests custom <code>ServletContext</code> scope.
*
* @author David Winterfeldt
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class ServletContextScopeTest extends AbstractJUnit4SpringContextTests {
final Logger logger = LoggerFactory.getLogger(ServletContextScopeTest.class);
private static final String SIMPLE_FORM_CONTEXT_PATH = "/simple-form";
private static final String ADVANCED_FORM_CONTEXT_PATH = "/advanced-form";
private static final String CONTEXT_KEY = "custom";
private static final String SIMPLE_FORM_CONTEXT_VALUE = "ServletContext scope";
private static final String ADVANCED_FORM_CONTEXT_VALUE = "Cross Context scope";
@Autowired
private String testString = null;
/**
* Tests scope retrieval from Spring.
*/
@Test
public void testScopeRetrievalFromSpring() {
assertNotNull("Test string is null.", testString);
String expected = "spring";
assertEquals("Test string should be '" + expected + "'.", expected, testString);
}
/**
* Tests cross context scope retrieval.
*/
@Test
public void testCrossContextScopeRetrieval() {
ServletContextScope scs = getServletContextScope(true);
String value = (String)scs.get(CONTEXT_KEY, null);
assertNotNull("Simple form context value is null.", value);
String expected = SIMPLE_FORM_CONTEXT_VALUE;
assertEquals("Simple form context value string should be '" + expected + "'.", expected, value);
// switch context for ServletContextScope to be '/advanced-form'
scs.setContext(ADVANCED_FORM_CONTEXT_PATH);
value = (String)scs.get(CONTEXT_KEY, null);
assertNotNull("Advanced form context value is null.", value);
expected = ADVANCED_FORM_CONTEXT_VALUE;
assertEquals("Advanced form context value string should be '" + expected + "'.", expected, value);
}
/**
* Tests cross context scope get with creation.
*/
@Test
public void testCrossContextScopeGet() {
ServletContextScope scs = getServletContextScope(false);
String value = (String)scs.get(CONTEXT_KEY, new ObjectFactory() {
public Object getObject() throws BeansException {
return SIMPLE_FORM_CONTEXT_VALUE;
}
});
String expected = SIMPLE_FORM_CONTEXT_VALUE;
assertNotNull("Simple form context value is null.", value);
assertEquals("Simple form context value string should be '" + expected + "'.", expected, value);
// try again, but fail if the factory is called again.
value = (String)scs.get(CONTEXT_KEY, new ObjectFactory() {
public Object getObject() throws BeansException {
fail("Bean should have been retrieved from ServletContext and not created again from the ObjectFactory.");
return SIMPLE_FORM_CONTEXT_VALUE;
}
});
assertNotNull("Simple form context value is null.", value);
assertEquals("Simple form context value string should be '" + expected + "'.", expected, value);
}
/**
* Gets <code>ServletContextScope</code> with two contexts configured.
*/
protected ServletContextScope getServletContextScope(boolean configureAttributes) {
// setup mock ServletContext
MockServletContext simpleFormServletContext = new MockServletContext();
simpleFormServletContext.setContextPath(SIMPLE_FORM_CONTEXT_PATH);
MockServletContext advancedFormServletContext = new MockServletContext();
advancedFormServletContext.setContextPath(ADVANCED_FORM_CONTEXT_PATH);
if (configureAttributes) {
simpleFormServletContext.setAttribute(CONTEXT_KEY, SIMPLE_FORM_CONTEXT_VALUE);
advancedFormServletContext.setAttribute(CONTEXT_KEY, ADVANCED_FORM_CONTEXT_VALUE);
}
simpleFormServletContext.registerContext(ADVANCED_FORM_CONTEXT_PATH, advancedFormServletContext);
ServletContextScope scs = new ServletContextScope();
scs.setServletContext(simpleFormServletContext);
return scs;
}
}
|
[
"selvaraja.savarimuthu@gmail.com"
] |
selvaraja.savarimuthu@gmail.com
|
6b838638ef29b9b4b72407ca8a9d9b3b304fe288
|
08bbe6d1de21a60d831125bbe35e4f98ab1bca58
|
/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderControlOptionStopAll.java
|
e9616fd3f8cfb615a0a90d9658df6560c56633f1
|
[
"MIT"
] |
permissive
|
sarvex/jenkins-docker-plugin
|
465afdd8c1cf508177b0c095e0a75e6e29e6b54e
|
0f027e2dddeb6734389c1734742fdc3ecff2ba92
|
refs/heads/master
| 2023-05-12T04:29:32.685805
| 2023-05-01T06:47:27
| 2023-05-01T06:47:27
| 32,980,486
| 0
| 0
|
MIT
| 2023-05-01T06:47:28
| 2015-03-27T10:33:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,427
|
java
|
package com.nirima.jenkins.plugins.docker.builder;
import com.github.dockerjava.api.DockerException;
import com.nirima.jenkins.plugins.docker.action.DockerLaunchAction;
import hudson.Extension;
import hudson.model.AbstractBuild;
import org.kohsuke.stapler.DataBoundConstructor;
/**
* Created by magnayn on 30/01/2014.
*/
public class DockerBuilderControlOptionStopAll extends DockerBuilderControlOption {
public final boolean remove;
@DataBoundConstructor
public DockerBuilderControlOptionStopAll(boolean remove) {
this.remove = remove;
}
@Override
public void execute(AbstractBuild<?, ?> build) throws DockerException {
LOGGER.info("Stopping all containers");
for(DockerLaunchAction.Item containerItem : getLaunchAction(build).getRunning()) {
try {
LOGGER.info("Stopping container " + containerItem.id);
containerItem.client.stopContainerCmd(containerItem.id).exec();
if( remove )
containerItem.client.removeContainerCmd(containerItem.id).exec();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
@Extension
public static final class DescriptorImpl extends DockerBuilderControlOptionDescriptor {
@Override
public String getDisplayName() {
return "Stop All Containers";
}
}
}
|
[
"nigel.magnay@gmail.com"
] |
nigel.magnay@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.