blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
89c3f8429fac30592b40d9fb9a883ba5443cfd90
a33ab0090a6250fe1bc827158375d59a96b0a2f2
/app/src/main/java/com/sdzx/government/governmentpersonnel/adapter/SimpleTreeAdapter.java
0a7fcc41c805d14c5a8deafcc4c98d115d7785e9
[]
no_license
mahjack/GovernmentPersonnel
e8f015eccfcc16a955436d217d4eb72ba5e7b768
f72b2dd62cdc37f8769eda16246174a5729d574a
refs/heads/master
2021-09-03T15:11:31.835818
2018-01-10T02:24:11
2018-01-10T02:24:11
115,406,604
0
0
null
null
null
null
UTF-8
Java
false
false
2,772
java
package com.sdzx.government.governmentpersonnel.adapter; import android.content.Context; import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import com.sdzx.government.governmentpersonnel.R; import com.sdzx.government.governmentpersonnel.activity.MyApp; import com.sdzx.government.governmentpersonnel.activity.SlectManDialog; import com.sdzx.government.governmentpersonnel.bean.FileBean; import com.sdzx.government.governmentpersonnel.fragment.DaFragment; import com.zhy.tree.bean.Node; import com.zhy.tree.bean.TreeListViewAdapter; import java.util.List; public class SimpleTreeAdapter<T> extends TreeListViewAdapter<T> { List<FileBean> datas; Context context; public SimpleTreeAdapter(ListView mTree, Context context, List<FileBean> datas, int defaultExpandLevel) throws IllegalArgumentException, IllegalAccessException { super(mTree, context, (List<T>) datas, defaultExpandLevel); this.datas = datas; this.context = context; } @Override public View getConvertView(final Node node, final int position, View convertView, ViewGroup parent) { ViewHolder viewHolder = null; if (convertView == null) { convertView = mInflater.inflate(R.layout.list_item, parent, false); viewHolder = new ViewHolder(); viewHolder.icon = (ImageView) convertView .findViewById(R.id.id_treenode_icon); viewHolder.label = (TextView) convertView .findViewById(R.id.id_treenode_label); viewHolder.xuanz = (TextView) convertView .findViewById(R.id.tv_xz); convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } if (node.getIcon() == -1) { viewHolder.icon.setVisibility(View.INVISIBLE); } else { viewHolder.icon.setVisibility(View.VISIBLE); viewHolder.icon.setImageResource(node.getIcon()); } viewHolder.label.setText(node.getName()); viewHolder.xuanz.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { MyApp.bmname=node.getName(); MyApp.bmid=node.getId()+""; DaFragment.spinner_bm.setText( MyApp.bmname); Log.v("bmid",MyApp.bmid); SlectManDialog.dialog.dismiss(); } }); return convertView; } private final class ViewHolder { ImageView icon; TextView label; TextView xuanz; } }
[ "270189126@qq.com" ]
270189126@qq.com
94509d478c6c47549c17548bb8c7a937379e504e
989c34fe8b3498a0c0dfff5368955786d64773f9
/app/src/main/java/com/synle/counterfeit_goods_tracker/AuthenticationAgency.java
728603965ae5081dc60fcee5f61e5335ea50bf82
[]
no_license
synle/android-counterfeit-goods-tracker
ac9fb08b19294685cd3761b5d883fcc0e29ccf05
9e3322cc37d4aa58125f03b72099f1c7446d13e6
refs/heads/master
2020-03-13T17:31:20.303597
2018-05-20T00:47:56
2018-05-20T00:54:55
131,218,659
0
0
null
null
null
null
UTF-8
Java
false
false
1,272
java
package com.synle.counterfeit_goods_tracker; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import com.synle.counterfeit_goods_tracker.com.synle.counter_goods_tracker.common.CommonUtil; import com.synle.counterfeit_goods_tracker.com.synle.counter_goods_tracker.common.DataUtil; import com.synle.counterfeit_goods_tracker.com.synle.counterfeit_goods_tracker.com.synle.counter_goods_tracker.dao.Site; public class AuthenticationAgency extends AuthenticationBase { public AuthenticationAgency(){ this.isAgency = true; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_authentication_agency); txtSiteName = findViewById(R.id.txtSiteName); txtSiteLocation = findViewById(R.id.txtSiteLocation); txtSiteName.setText("Agency-Santa-Clara"); txtSiteLocation.setText("Santa Clara"); intent = new Intent(this, DashboardAgency.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_TASK_ON_HOME); } }
[ "syle@linkedin.com" ]
syle@linkedin.com
41b5fba4ab78b2fc16aaf4b0a3ec3bdcdf036a09
f40c5613a833bc38fca6676bad8f681200cffb25
/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/openshift/api/model/RoleBindingList.java
b6525bda2ed7373e6c4034b8519436459bcaffc4
[ "Apache-2.0" ]
permissive
rohanKanojia/kubernetes-client
2d599e4ed1beedf603c79d28f49203fbce1fc8b2
502a14c166dce9ec07cf6adb114e9e36053baece
refs/heads/master
2023-07-25T18:31:33.982683
2022-04-12T13:39:06
2022-04-13T05:12:38
106,398,990
2
3
Apache-2.0
2023-04-28T16:21:03
2017-10-10T09:50:25
Java
UTF-8
Java
false
false
5,112
java
package io.fabric8.openshift.api.model; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.fabric8.kubernetes.api.model.Container; import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.ListMeta; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; import io.fabric8.kubernetes.api.model.ResourceRequirements; import io.fabric8.kubernetes.model.annotation.Group; import io.fabric8.kubernetes.model.annotation.Version; import io.sundr.builder.annotations.Buildable; import io.sundr.builder.annotations.BuildableReference; import lombok.EqualsAndHashCode; import lombok.Setter; import lombok.ToString; import lombok.experimental.Accessors; @JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "apiVersion", "kind", "metadata", "items" }) @ToString @EqualsAndHashCode @Setter @Accessors(prefix = { "_", "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), @BuildableReference(IntOrString.class), @BuildableReference(ObjectReference.class), @BuildableReference(LocalObjectReference.class), @BuildableReference(PersistentVolumeClaim.class) }) @Version("v1") @Group("authorization.openshift.io") public class RoleBindingList implements KubernetesResource, KubernetesResourceList<io.fabric8.openshift.api.model.RoleBinding> { /** * * (Required) * */ @JsonProperty("apiVersion") private String apiVersion = "authorization.openshift.io/v1"; @JsonProperty("items") private List<io.fabric8.openshift.api.model.RoleBinding> items = new ArrayList<io.fabric8.openshift.api.model.RoleBinding>(); /** * * (Required) * */ @JsonProperty("kind") private String kind = "RoleBindingList"; @JsonProperty("metadata") private ListMeta metadata; @JsonIgnore private Map<String, Object> additionalProperties = new HashMap<String, Object>(); /** * No args constructor for use in serialization * */ public RoleBindingList() { } /** * * @param metadata * @param apiVersion * @param kind * @param items */ public RoleBindingList(String apiVersion, List<io.fabric8.openshift.api.model.RoleBinding> items, String kind, ListMeta metadata) { super(); this.apiVersion = apiVersion; this.items = items; this.kind = kind; this.metadata = metadata; } /** * * (Required) * */ @JsonProperty("apiVersion") public String getApiVersion() { return apiVersion; } /** * * (Required) * */ @JsonProperty("apiVersion") public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } @JsonProperty("items") public List<io.fabric8.openshift.api.model.RoleBinding> getItems() { return items; } @JsonProperty("items") public void setItems(List<io.fabric8.openshift.api.model.RoleBinding> items) { this.items = items; } /** * * (Required) * */ @JsonProperty("kind") public String getKind() { return kind; } /** * * (Required) * */ @JsonProperty("kind") public void setKind(String kind) { this.kind = kind; } @JsonProperty("metadata") public ListMeta getMetadata() { return metadata; } @JsonProperty("metadata") public void setMetadata(ListMeta metadata) { this.metadata = metadata; } @JsonAnyGetter public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } }
[ "marc@marcnuri.com" ]
marc@marcnuri.com
2cc76c1898ad3c4dccfe60edb26cd56ed30e8798
89c2efc5fd03b63b6bf86325ee67ff755b3902fe
/src/main/java/de/tarent/challenge/config/ProductSetterConfiguration.java
1c9b6a7a12e29d0ba19043bb2a5362629b876997
[ "MIT" ]
permissive
JanCGu/tscr
9a5f56b52585cf74a2d2583fb6b5fa818d804ad2
ff38197a82fab3406e3ab0ac89d3eb5f68073b82
refs/heads/master
2020-04-05T04:44:22.901420
2018-11-25T19:45:53
2018-11-25T19:45:53
156,564,629
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package de.tarent.challenge.config; import de.tarent.challenge.persistent.ProductStorer; import de.tarent.challenge.service.IProductSetter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; /** * A Factory allowing to get the ProductServices between layers. * * @author Jan */ @Configuration @ComponentScan(value = {"de.tarent.challenge.persitent"}) public class ProductSetterConfiguration { /** * Returns a IProductSetter with access to a perstiant storage. * * @return */ @Bean public static IProductSetter getIProductSetter() { return new ProductStorer(); } }
[ "jcg@gmx.de" ]
jcg@gmx.de
9c8850e49984100c19804c4cdf1e6be4b10a2379
7030ac2a67064e0c4207059b8d71bf1184194d37
/app/src/main/java/com/redridgeapps/movies/model/tmdb/Reviews.java
2dc4e7d103fbc25228508ad74499209d50639c92
[]
no_license
SaurabhSandav/Movies
db753da5034eff143a2e80ba66454a056f79758e
97d9754af3ea1f481fd22ff2b6acefdd670e8319
refs/heads/master
2020-03-19T09:56:30.035007
2018-08-30T12:44:50
2019-01-04T13:38:28
136,329,569
2
0
null
null
null
null
UTF-8
Java
false
false
2,223
java
package com.redridgeapps.movies.model.tmdb; import android.os.Parcel; import android.os.Parcelable; import com.squareup.moshi.Json; import java.util.ArrayList; import java.util.List; public class Reviews implements Parcelable { @Json(name = "page") private Integer page; @Json(name = "results") private List<ReviewItem> results = null; @Json(name = "total_pages") private Integer totalPages; @Json(name = "total_results") private Integer totalResults; public Integer getPage() { return page; } public void setPage(Integer page) { this.page = page; } public List<ReviewItem> getResults() { return results; } public void setResults(List<ReviewItem> results) { this.results = results; } public Integer getTotalPages() { return totalPages; } public void setTotalPages(Integer totalPages) { this.totalPages = totalPages; } public Integer getTotalResults() { return totalResults; } public void setTotalResults(Integer totalResults) { this.totalResults = totalResults; } public static final Parcelable.Creator<Reviews> CREATOR = new Parcelable.Creator<Reviews>() { @Override public Reviews createFromParcel(Parcel source) { return new Reviews(source); } @Override public Reviews[] newArray(int size) { return new Reviews[size]; } }; public Reviews() { } private Reviews(Parcel in) { this.page = (Integer) in.readValue(Integer.class.getClassLoader()); this.results = new ArrayList<>(); in.readList(this.results, ReviewItem.class.getClassLoader()); this.totalPages = (Integer) in.readValue(Integer.class.getClassLoader()); this.totalResults = (Integer) in.readValue(Integer.class.getClassLoader()); } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeValue(this.page); dest.writeList(this.results); dest.writeValue(this.totalPages); dest.writeValue(this.totalResults); } }
[ "justmailsaurabh@gmail.com" ]
justmailsaurabh@gmail.com
3673db31fb63ff99edd366d346256a266fe10390
21b736028889a32f1dcba96e8236f80cc9973df5
/src/com/microsoft/schemas/xrm/_2011/metadata/impl/ArrayOfStringFormatImpl.java
7028cfbb51e7732e40b075f876859b12af0f9401
[]
no_license
nbuddharaju/Java2CRMCRUD
3cfcf487ce9fe9c8791484387f32da2e83ccef15
aaba26757df088dda780aa6fe873c7d8356f4d56
refs/heads/master
2021-01-19T04:07:07.528318
2016-05-28T08:52:28
2016-05-28T08:52:28
59,885,531
0
2
null
null
null
null
UTF-8
Java
false
false
8,109
java
/* * XML Type: ArrayOfStringFormat * Namespace: http://schemas.microsoft.com/xrm/2011/Metadata * Java type: com.microsoft.schemas.xrm._2011.metadata.ArrayOfStringFormat * * Automatically generated - do not modify. */ package com.microsoft.schemas.xrm._2011.metadata.impl; /** * An XML ArrayOfStringFormat(@http://schemas.microsoft.com/xrm/2011/Metadata). * * This is a complex type. */ public class ArrayOfStringFormatImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.microsoft.schemas.xrm._2011.metadata.ArrayOfStringFormat { private static final long serialVersionUID = 1L; public ArrayOfStringFormatImpl(org.apache.xmlbeans.SchemaType sType) { super(sType); } private static final javax.xml.namespace.QName STRINGFORMAT$0 = new javax.xml.namespace.QName("http://schemas.microsoft.com/xrm/2011/Metadata", "StringFormat"); /** * Gets array of all "StringFormat" elements */ public com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum[] getStringFormatArray() { synchronized (monitor()) { check_orphaned(); java.util.List targetList = new java.util.ArrayList(); get_store().find_all_element_users(STRINGFORMAT$0, targetList); com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum[] result = new com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum[targetList.size()]; for (int i = 0, len = targetList.size() ; i < len ; i++) result[i] = (com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum)((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getEnumValue(); return result; } } /** * Gets ith "StringFormat" element */ public com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum getStringFormatArray(int i) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STRINGFORMAT$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } return (com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum)target.getEnumValue(); } } /** * Gets (as xml) array of all "StringFormat" elements */ public com.microsoft.schemas.xrm._2011.metadata.StringFormat[] xgetStringFormatArray() { synchronized (monitor()) { check_orphaned(); java.util.List targetList = new java.util.ArrayList(); get_store().find_all_element_users(STRINGFORMAT$0, targetList); com.microsoft.schemas.xrm._2011.metadata.StringFormat[] result = new com.microsoft.schemas.xrm._2011.metadata.StringFormat[targetList.size()]; targetList.toArray(result); return result; } } /** * Gets (as xml) ith "StringFormat" element */ public com.microsoft.schemas.xrm._2011.metadata.StringFormat xgetStringFormatArray(int i) { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas.xrm._2011.metadata.StringFormat target = null; target = (com.microsoft.schemas.xrm._2011.metadata.StringFormat)get_store().find_element_user(STRINGFORMAT$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } return target; } } /** * Returns number of "StringFormat" element */ public int sizeOfStringFormatArray() { synchronized (monitor()) { check_orphaned(); return get_store().count_elements(STRINGFORMAT$0); } } /** * Sets array of all "StringFormat" element */ public void setStringFormatArray(com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum[] stringFormatArray) { synchronized (monitor()) { check_orphaned(); arraySetterHelper(stringFormatArray, STRINGFORMAT$0); } } /** * Sets ith "StringFormat" element */ public void setStringFormatArray(int i, com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum stringFormat) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STRINGFORMAT$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } target.setEnumValue(stringFormat); } } /** * Sets (as xml) array of all "StringFormat" element */ public void xsetStringFormatArray(com.microsoft.schemas.xrm._2011.metadata.StringFormat[]stringFormatArray) { synchronized (monitor()) { check_orphaned(); arraySetterHelper(stringFormatArray, STRINGFORMAT$0); } } /** * Sets (as xml) ith "StringFormat" element */ public void xsetStringFormatArray(int i, com.microsoft.schemas.xrm._2011.metadata.StringFormat stringFormat) { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas.xrm._2011.metadata.StringFormat target = null; target = (com.microsoft.schemas.xrm._2011.metadata.StringFormat)get_store().find_element_user(STRINGFORMAT$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } target.set(stringFormat); } } /** * Inserts the value as the ith "StringFormat" element */ public void insertStringFormat(int i, com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum stringFormat) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(STRINGFORMAT$0, i); target.setEnumValue(stringFormat); } } /** * Appends the value as the last "StringFormat" element */ public void addStringFormat(com.microsoft.schemas.xrm._2011.metadata.StringFormat.Enum stringFormat) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(STRINGFORMAT$0); target.setEnumValue(stringFormat); } } /** * Inserts and returns a new empty value (as xml) as the ith "StringFormat" element */ public com.microsoft.schemas.xrm._2011.metadata.StringFormat insertNewStringFormat(int i) { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas.xrm._2011.metadata.StringFormat target = null; target = (com.microsoft.schemas.xrm._2011.metadata.StringFormat)get_store().insert_element_user(STRINGFORMAT$0, i); return target; } } /** * Appends and returns a new empty value (as xml) as the last "StringFormat" element */ public com.microsoft.schemas.xrm._2011.metadata.StringFormat addNewStringFormat() { synchronized (monitor()) { check_orphaned(); com.microsoft.schemas.xrm._2011.metadata.StringFormat target = null; target = (com.microsoft.schemas.xrm._2011.metadata.StringFormat)get_store().add_element_user(STRINGFORMAT$0); return target; } } /** * Removes the ith "StringFormat" element */ public void removeStringFormat(int i) { synchronized (monitor()) { check_orphaned(); get_store().remove_element(STRINGFORMAT$0, i); } } }
[ "ravi.buddharaju@aviso.com" ]
ravi.buddharaju@aviso.com
92571d6e39c536da243cf49caff6b9a570af8292
d8f4ee310dca6e93cefb26217b278053307c797b
/src/com/dora/test_algorithm/shortestpath/DijkstraTest.java
a37a450790eaaa06848d9cb35082fa5ff9354f04
[]
no_license
wkdthf21/Data-Structure
a666ac1be643b8587d21db5ef8960ae9f5328710
2aad426ede7007326af7f2fbe8d55388b473d502
refs/heads/main
2022-12-30T22:13:55.424680
2020-10-23T08:21:37
2020-10-23T08:21:37
271,230,034
0
0
null
null
null
null
UTF-8
Java
false
false
441
java
package com.dora.test_algorithm.shortestpath; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; import com.dora.algorithm.shortestpath.Dijkstra; class DijkstraTest { int[][] graph = { {0, 3, 0, 3 ,2}, {0, 0, 0, 0, 5}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 5}, {0, 0, 6, 0, 0}, }; @Test void test() { Dijkstra dijkstra = new Dijkstra(graph); dijkstra.printShortestPath(0); } }
[ "wkdthf21@naver.com" ]
wkdthf21@naver.com
3eddb067547a7ae5fadcc761648736c1fac270d2
167cf91ec2deac74f6400997474ae2df1065d27e
/src/test/java/com/potato112/springservice/SpringServiceAppTests.java
a6efce184741e1da01528888f045419ccae62cd8
[]
no_license
MocMilo/spring-service
cf23ff5aa0a90ccb140e02a9b13ba3377bba11d8
67b78b0c0ce10c52d4192f6a29169ff43806c9d2
refs/heads/master
2023-06-23T22:24:57.178842
2020-04-18T22:59:24
2020-04-18T22:59:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package com.potato112.springservice; import com.potato112.springservice.config.AppConfig; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.EnableTransactionManagement; //import org.springframework.transaction.annotation.EnableTransactionManagement; @RunWith(SpringRunner.class) @ContextConfiguration(classes = {AppConfig.class}) @EnableTransactionManagement @Rollback @SpringBootTest public class SpringServiceAppTests { @Test public void contextLoads() { } }
[ "organicpotato112@gmail.com" ]
organicpotato112@gmail.com
d16265d9e159f9ceca4911900c043ff70a9791db
b73c8deb34ae0915d5f8135a2878c18fa747a196
/04_StatementsTest/src/com/kh/test/loop/Test2.java
2a6500b31645aab0c067402e271db0603b6dc038
[]
no_license
kianpas/KH_Java_Test
c444082a9b726677307bb016e044d16efe3ca855
5e1a99b69609362b2370ee134f8b4b40845bf624
refs/heads/main
2023-02-28T09:12:53.626402
2021-02-08T06:33:15
2021-02-08T06:33:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
423
java
package com.kh.test.loop; import java.util.Scanner; public class Test2 { public static void main(String[] args) { Test2 t2 = new Test2(); t2.test(); } public void test() { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); String res = null; for(int i = 1; i <= num; i++) { if (i % 2 == 0) { res = "박"; } else { res = "수"; } System.out.print(res); } } }
[ "kianpas@gmail.com" ]
kianpas@gmail.com
1b2167242caaa8a08cfcfefcfe7879b06e23b05b
6b01b801b51d72befe24bff15b8dd89cfc6b3ded
/Web学习/DBUtilDemo/src/ThreadLocal/Mythread.java
60dad981c588b9cb95179fc80763ad9cd960bbe1
[]
no_license
FanBingyang/HelloWord
1d638fac40ea1475000cf43104cf14e345ab18a8
a883a72112a007850af4f4c7449b47a3dadd3bb7
refs/heads/master
2022-07-23T09:20:12.940791
2019-07-01T15:13:13
2019-07-01T15:13:13
187,741,986
2
0
null
2022-06-21T01:23:21
2019-05-21T01:50:39
Java
UTF-8
Java
false
false
227
java
package ThreadLocal; public class Mythread extends Thread{ private ThreadLocal tl; public Mythread(ThreadLocal tl) { this.tl = tl; } @Override public void run() { System.out.println(tl.get()+"aaaaaaaaaaaaa"); } }
[ "3257490363@qq.com" ]
3257490363@qq.com
6ce5dad49981bd19b7df775cef6224bda3d3cb05
f41bfb9a06ba6f576cdb48f759c80ddf042bc907
/petclinic2019-data/src/main/java/com/blogspot/jesfre/petclinic2019/repositories/PetRepository.java
077db9eb1bd38595b17b21b5f541fd4ffe69af7e
[]
no_license
jesfre/petclinic2019
b02eb1b1fe907da5d6b4c728f67ccf28c56ce134
ea5538bb3b5c4be1a0a91167bc8540735f8d1464
refs/heads/master
2020-04-20T15:37:23.366740
2019-05-08T11:22:30
2019-05-08T11:22:30
168,936,096
1
0
null
null
null
null
UTF-8
Java
false
false
238
java
package com.blogspot.jesfre.petclinic2019.repositories; import com.blogspot.jesfre.petclinic2019.model.Pet; import org.springframework.data.repository.CrudRepository; public interface PetRepository extends CrudRepository<Pet, Long> { }
[ "jesfre.gy@gmail.com" ]
jesfre.gy@gmail.com
8c941d181ace801000a823e386d19527e84c1f71
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/app/src/main/java/org/gradle/testapp/performancenull_39/Productionnull_3883.java
a9078e354adce56832bc995467c20dc7d06e683a
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
588
java
package org.gradle.testapp.performancenull_39; public class Productionnull_3883 { private final String property; public Productionnull_3883(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
48b24c3883bbab7ec5b4fb2450dc5acd14c463bf
cf4335e6eba82f7866303bb21a72a6a6b7b2768f
/src/main/java/three/battle/Unit.java
c0ec07a1184d31e50d876e12b84c37888acfb2d9
[]
no_license
zhoooltyj/ya
ec26b03a6052a9d093820dd70b9ee824e27b3522
56bb70c91d5dcd8f1125c78c8735728130035b5f
refs/heads/master
2021-07-16T21:37:50.412796
2017-10-24T08:53:19
2017-10-24T08:53:19
107,240,313
0
0
null
null
null
null
UTF-8
Java
false
false
579
java
package three.battle; /** * Created by polosatik on 26.09.17. */ public abstract class Unit { protected final int power; protected final double speed; protected Terrain terrain; protected Unit(int power, int speed, Terrain terrain) { this.power = power; this.speed = speed; this.terrain = terrain; } public void move() { System.out.println(this.getClass() + " moving forward: " + speed); } public abstract void shoot(); public void setTerrain(Terrain terrain) { this.terrain = terrain; } }
[ "polosatik@yandex-team.ru" ]
polosatik@yandex-team.ru
c624bd0cd407d697a9796b3cca103da5b88ad984
82e1f183bf622c33cc18bf8e98b71f04c5336592
/core/src/main/java/com/triangleleft/flashcards/service/settings/UserData.java
c36daea4440eb5cd7968220653d2ae5fc9a56b03
[ "Apache-2.0" ]
permissive
AhmedThabit/Flashcards
b9b2ad2e97622d0fc6deff0f7207af178581d0f3
2b6a4238ae008ddf326c21663463ab7025af905d
refs/heads/master
2020-03-11T10:48:20.229563
2017-02-25T14:30:46
2017-02-25T14:30:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,846
java
package com.triangleleft.flashcards.service.settings; import com.google.auto.value.AutoValue; import com.annimon.stream.Optional; import com.annimon.stream.Stream; import com.triangleleft.flashcards.util.AutoGson; import java.util.Comparator; import java.util.List; import static com.annimon.stream.Collectors.toList; @AutoGson @AutoValue public abstract class UserData { private static final Comparator<Language> languageComparator = (l1, l2) -> Boolean.valueOf(l2.isCurrentLearning()).compareTo(l1.isCurrentLearning()); public static UserData create( List<Language> languages, String avatar, String username, String uiLanguage, String learningLanguage) { return new AutoValue_UserData( languages, avatar, username, uiLanguage, learningLanguage); } public abstract List<Language> getLanguages(); public abstract String getAvatar(); public abstract String getUsername(); public abstract String getUiLanguageId(); public abstract String getLearningLanguageId(); public abstract UserData withLanguages(List<Language> languages); public abstract UserData withLearningLanguageId(String learningLanguageId); public List<Language> getSortedLanguages() { // We assume that is only one language that we are currently learning // Sort it, so it is always top of the list return Stream.of(getLanguages()) .filter(Language::isLearning) .sorted(languageComparator) .collect(toList()); } public Optional<Language> getCurrentLearningLanguage() { List<Language> languages = getSortedLanguages(); return languages.size() > 0 ? Optional.of(languages.get(0)) : Optional.empty(); } }
[ "lekz112@gmail.com" ]
lekz112@gmail.com
523d5eb4d4ce6a0af938d71ae4eca830493c377c
e86a478cb3c67d4b72af434f68069495d66fb393
/app/src/main/java/com/example/notebook/utils/DeleteDialogFragment.java
f987f75bcc090d0a0cc23fa7ba2afcd2dc87c5c5
[]
no_license
yulmaso/c_notebook
71795a4124ad333860831f0f3f870ff496a96b0d
d5f00edc21501c3e0f9f57c7fc2232e83ba946ef
refs/heads/master
2020-08-22T08:02:53.803109
2020-03-11T16:14:20
2020-03-11T16:14:20
216,353,872
1
0
null
null
null
null
UTF-8
Java
false
false
1,731
java
package com.example.notebook.utils; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; import com.example.notebook.screens.note.NoteActivity; import com.example.notebook.R; public class DeleteDialogFragment extends DialogFragment implements View.OnClickListener { private NoteActivity noteActivity; public DeleteDialogFragment(NoteActivity noteActivity){ this.noteActivity = noteActivity; } @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { getDialog().setTitle("Delete"); View v = inflater.inflate(R.layout.dialog_delete_layout, null); v.findViewById(R.id.cancel_dialog_button).setOnClickListener(this); v.findViewById(R.id.delete_dialog_button).setOnClickListener(this); return v; } @Override public void onResume() { super.onResume(); getDialog().getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); } @Override public void onClick(View v) { switch (v.getId()){ case R.id.delete_dialog_button:{ noteActivity.deleteNote(); dismiss(); break; } case R.id.cancel_dialog_button:{ dismiss(); break; } } } }
[ "plotnik97@mail.ru" ]
plotnik97@mail.ru
191168e4d40b35eea47168c1f8eb70a8f54e8a82
7c54e3f652b6a2c8725dd46b5d2d895fb76a3598
/part_001/src/main/java/ru/javavlad/array/ArrayDuplicate.java
6b2cd43eba60794c6d393a56789e48e3375fcfdd
[ "Apache-2.0" ]
permissive
Vladislav4er/Quantum_Leap
52079705cf6f5caaff124a489b677f7ad35a48b5
8e9c960f081728b7cf991d019d0f50b92b52f70c
refs/heads/master
2019-10-04T13:51:27.857791
2018-06-06T21:40:13
2018-06-06T21:40:13
99,323,329
0
0
null
null
null
null
UTF-8
Java
false
false
768
java
package ru.javavlad.array; import java.util.Arrays; /** * ArrayDuplicate class. * @author Vladislav4er * @version 1.00 * @since 04.04.2018 */ public class ArrayDuplicate { /** * Duplicate in array remove method. * @param array - input array with duplicates * @return array without duplicates */ public String[] remove(String[] array) { int unique = array.length; for (int out = 0; out < unique; out++) { for (int in = out + 1; in < unique; in++) { if (array[out].equals(array[in])) { array[in] = array[unique - 1]; unique--; in--; } } } return Arrays.copyOf(array, unique); } }
[ "vk792@mail.ru" ]
vk792@mail.ru
1443df5c178b66d21acb9ddde1a457598d017af7
6acd37ef75fa2d56bf2f501e0c1e55adbbcf5cd3
/src/testPackage/HeaderClass.java
afd139236af346b911f12d2a2935adfb4d5c0591
[]
no_license
skuriako/sheena
c8cac021141ebd402e9950359a868a02c0dad128
53d527621948cd4f7843c25bb8297cd14b3be4fb
refs/heads/master
2021-04-19T13:06:36.049366
2020-03-24T03:43:48
2020-03-24T03:43:48
249,606,383
0
0
null
null
null
null
UTF-8
Java
false
false
135
java
package testPackage; public class HeaderClass { public void validateHeader() { System.out.println("here i validate the header"); } }
[ "sheenakuriakose88@gmail.com" ]
sheenakuriakose88@gmail.com
efddc7969a8ab2cffabe6522149894ee5ce72243
7983b2efeafb036a7dbf41a6d738996aa768e4c0
/src/main/java/coinsorter/textui/SetMaximumValueCommand.java
4863d699992704f2645076f2fd17736f3c575e60
[ "MIT" ]
permissive
dtmo/coin-sorter
2ed2fbfed426f029e4a6e0faca2b9a087f6f6da4
dd0efc10485156001cce0e320518b0f816d4a581
refs/heads/main
2023-01-23T20:44:45.199793
2020-11-29T11:42:24
2020-11-29T11:42:24
316,559,510
0
0
null
null
null
null
UTF-8
Java
false
false
832
java
package coinsorter.textui; import java.util.List; import coinsorter.CoinSorter; import coinsorter.validation.MinimumValueConstraintValidator; public class SetMaximumValueCommand implements Command { private final CoinSorter coinSorter; private final Console console; public SetMaximumValueCommand(final CoinSorter coinSorter, final Console console) { this.coinSorter = coinSorter; this.console = console; } @Override public void execute() { console.println("Current maximum coin input is: " + coinSorter.getMaximumValue()); final int maximumValue = console.promptForValidInt("Please enter a new maximum coin input: ", List.of(new MinimumValueConstraintValidator(coinSorter.getMinimumValue()))); coinSorter.setMaximumValue(maximumValue); } }
[ "dtmorgan@gmail.com" ]
dtmorgan@gmail.com
70685c4501b7b33a098d2843834905c6527bd9e6
dc0919c9609f03f5b239ec0799cea22ed070f411
/android/support/v4/widget/SearchViewCompat$SearchViewCompatHoneycombImpl$2.java
7ea5c5cbb9a48af18c64f059dd5fa57f77de3087
[]
no_license
jjensn/milight-decompile
a8f98af475f452c18a74fd1032dce8680f23abc0
47c4b9eea53c279f6fab3e89091e2fef495c6159
refs/heads/master
2021-06-01T17:23:28.555123
2016-10-12T18:07:53
2016-10-12T18:07:53
70,721,205
5
0
null
null
null
null
UTF-8
Java
false
false
632
java
package android.support.v4.widget; class SearchViewCompat$SearchViewCompatHoneycombImpl$2 implements SearchViewCompatHoneycomb.OnCloseListenerCompatBridge { SearchViewCompat$SearchViewCompatHoneycombImpl$2(SearchViewCompat.SearchViewCompatHoneycombImpl paramSearchViewCompatHoneycombImpl, SearchViewCompat.OnCloseListenerCompat paramOnCloseListenerCompat) { } public boolean onClose() { return this.val$listener.onClose(); } } /* Location: * Qualified Name: android.support.v4.widget.SearchViewCompat.SearchViewCompatHoneycombImpl.2 * Java Class Version: 6 (50.0) * JD-Core Version: 0.6.1-SNAPSHOT */
[ "jjensen@GAM5YG3QC-MAC.local" ]
jjensen@GAM5YG3QC-MAC.local
a628fc877f9de5eae21e135642c43c1a15f2cad4
81e31a571f9263b317a60ab7e2fa6a62199aefa1
/icm4j/src/main/java/com/tnsoft/util/logging/MessageFormatter.java
6cbf6598b5de240f44e138d17e70faa8ff727728
[]
no_license
qhjindev/icm
66910f1db5b9cf549b31817e3e2adeada4babd17
9e2a659dcf8c4cdadb71e129eedb667efc817517
refs/heads/master
2020-05-17T05:37:21.762348
2015-01-08T02:16:08
2015-01-08T02:16:08
28,762,156
3
1
null
null
null
null
UTF-8
Java
false
false
759
java
/* * com.tnsoft.util.logging.MessageFormatter.java 1.00 2011-7-22 * CREATE M.J.Fung * MODULE ID logging * * Copyright (c) 2011 Transoft, Inc. * All rights resvered. * * This software is the confidential and proprietary information of * Transoft, Inc. ("confidential Information"). You shall not disclose * such Confidential Information and shall use it only in accordance * with the terms of the license agreement you entered into with Transoft. * * Alteration Records: * Create file at: 2011-7-22 下午03:51:16 * */ package com.tnsoft.util.logging; /** * <p> * Provide methods to format message string. * </p> * * @author M.J.Fung * */ public interface MessageFormatter { String format(String message, Object... args); }
[ "qinghua@localhost.localdomain" ]
qinghua@localhost.localdomain
3fd29d00bb6ec9fe6f1ecc438ea78816a147eb75
21be796e2c3213d0f66425fe0f149620d1b5e1a9
/src/main/java/com/spring/swagger/config/SpringSecConfig.java
99d1785aca51b0b08cd4ee77e15f77c820bc2550
[]
no_license
Dah-roh/swagger
b64aea5b66d76b24e20e363df5cdc43a7b0c4aa9
4826083c69d2f7f508152c6ec357f2cf8d4bcdce
refs/heads/master
2023-08-09T21:43:25.167626
2020-06-26T20:27:47
2020-06-26T20:27:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
652
java
package com.spring.swagger.config; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration public class SpringSecConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity httpSecurity) throws Exception { httpSecurity.authorizeRequests().antMatchers("/","/swagger-resources").permitAll(); httpSecurity.csrf().disable(); httpSecurity.headers().frameOptions().disable(); } }
[ "darogadibia@gmail.com" ]
darogadibia@gmail.com
c6d9c5ca8fa5d47f06ab8c3dfc222e1c23428b9c
18b03c67ef57ce75341dee76219b22bf2618c843
/firstGUI.java
7cb7754fafc2f3ca1eefa7053eb3f62df1c30329
[]
no_license
bicepsFlex/calculatorGUI
f86e86578da7d5765fd5945ced9613c59b62d4cb
0d26c9076d730f9fb3ad505818dd435dd33a9d7b
refs/heads/master
2023-08-05T09:01:21.289354
2021-09-18T16:26:49
2021-09-18T16:26:49
407,908,690
0
0
null
null
null
null
UTF-8
Java
false
false
9,651
java
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.Insets; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.JTextArea; import javax.swing.SwingUtilities; import javax.swing.UIManager; public class firstGUI { int number = 0; Long totalNumber = 0L; String currCalculation = ""; String calculations = ""; enum Operation { NULL, PLUS, MINUS, MULT, DIV } // 0 = null, 1 = plus, 2 = minus, 3 = mult, 4 Operation prevOp = Operation.NULL; public static void main(String[] args) { try { UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel"); } catch (Exception e) { e.printStackTrace(); } SwingUtilities.invokeLater(() -> new firstGUI()); } public firstGUI() { JButton s1080p = new JButton("1920x1080"); JButton s720p = new JButton("1280x720"); JButton s360p = new JButton("640x360"); JButton resetSize = new JButton("Reset Size"); s1080p.setFont(new Font("", 0, 20)); s720p.setFont(new Font("", 0, 20)); s360p.setFont(new Font("", 0, 20)); resetSize.setFont(new Font("", 0, 20)); JPanel controlPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); controlPanel.add(s1080p); controlPanel.add(s720p); controlPanel.add(s360p); controlPanel.add(resetSize); JTextArea someText = new JTextArea(); someText.setLineWrap(true); someText.setWrapStyleWord(true); someText.setBackground(Color.LIGHT_GRAY); someText.setMargin(new Insets(5, 5, 5, 5)); someText.setEditable(false); someText.setFont(new Font("", 0, 30)); JTextArea calculationsHistory = new JTextArea(); calculationsHistory.setLineWrap(true); calculationsHistory.setWrapStyleWord(true); calculationsHistory.setMargin(new Insets(5, 5, 5, 5)); calculationsHistory.setEditable(false); JPanel someTextPanel = new JPanel(new BorderLayout()); someTextPanel.add(someText, BorderLayout.WEST); someTextPanel.add(calculationsHistory, BorderLayout.EAST); someTextPanel.add(new JScrollPane(calculationsHistory), BorderLayout.CENTER); Font btFont = new Font("", 0, 20); JButton one = new JButton("1"); one.setFont(btFont); JButton two = new JButton("2"); two.setFont(btFont); JButton three = new JButton("3"); three.setFont(btFont); JButton four = new JButton("4"); four.setFont(btFont); JButton five = new JButton("5"); five.setFont(btFont); JButton six = new JButton("6"); six.setFont(btFont); JButton seven = new JButton("7"); seven.setFont(btFont); JButton eight = new JButton("8"); eight.setFont(btFont); JButton nine = new JButton("9"); nine.setFont(btFont); JButton zero = new JButton("0"); zero.setFont(btFont); JButton plus = new JButton("+"); JButton minus = new JButton("-"); JButton mult = new JButton("*"); JButton div = new JButton("/"); JButton eq = new JButton("="); JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); buttonsPanel.add(one); buttonsPanel.add(two); buttonsPanel.add(three); buttonsPanel.add(four); buttonsPanel.add(five); buttonsPanel.add(six); buttonsPanel.add(seven); buttonsPanel.add(eight); buttonsPanel.add(nine); buttonsPanel.add(zero); buttonsPanel.add(plus); buttonsPanel.add(minus); buttonsPanel.add(mult); buttonsPanel.add(div); buttonsPanel.add(eq); JSplitPane calcPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, someTextPanel, buttonsPanel); calcPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); one.addActionListener((e) -> { num(1, someText); }); two.addActionListener((e) -> { num(2, someText); }); three.addActionListener((e) -> { num(3, someText); }); four.addActionListener((e) -> { num(4, someText); }); five.addActionListener((e) -> { num(5, someText); }); six.addActionListener((e) -> { num(6, someText); }); seven.addActionListener((e) -> { num(7, someText); }); eight.addActionListener((e) -> { num(8, someText); }); nine.addActionListener((e) -> { num(9, someText); }); zero.addActionListener((e) -> { num(0, someText); }); plus.addActionListener((e) -> { plus(); currCalculation += "+"; }); minus.addActionListener((e) -> { minus(); currCalculation += "-"; }); mult.addActionListener((e) -> { mult(); currCalculation += "*"; }); div.addActionListener((e) -> { div(); currCalculation += "/"; }); eq.addActionListener((e) -> { switch (prevOp) { case PLUS: plus(); break; case MINUS: minus(); break; case MULT: mult(); break; case DIV: div(); break; default: break; } currCalculation += "="; someText.setText(String.valueOf(totalNumber)); currCalculation += String.valueOf(totalNumber); calculations = currCalculation + "\n" + calculations; calculationsHistory.setText(calculations); reset(); }); JPanel mainPanel = new JPanel(new BorderLayout()); mainPanel.add(controlPanel, BorderLayout.NORTH); mainPanel.add(calcPanel); JFrame frame = new JFrame(); frame.setTitle("First Program"); frame.setSize(new Dimension(400, 500)); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLocationRelativeTo(null); frame.setVisible(true); frame.add(mainPanel, BorderLayout.CENTER); s1080p.addActionListener((e) -> { frame.setSize(new Dimension(1920, 1080)); frame.setLocationRelativeTo(null); }); s720p.addActionListener((e) -> { frame.setSize(new Dimension(1280, 720)); frame.setLocationRelativeTo(null); }); s360p.addActionListener((e) -> { frame.setSize(new Dimension(640, 360)); frame.setLocationRelativeTo(null); }); resetSize.addActionListener((e) -> { frame.setSize(new Dimension(400, 500)); frame.setLocationRelativeTo(null); }); } public void num(int num, JTextArea text) { if (String.valueOf(number).length() + String.valueOf(num).length() < 9) { currCalculation += String.valueOf(num); int prevNum = number; number = Integer.valueOf(String.valueOf(prevNum) + String.valueOf(num)); text.setText(String.valueOf(number)); } } public void plus() { switch (prevOp) { case MINUS: totalNumber -= number; break; case DIV: totalNumber /= number; break; case MULT: totalNumber *= number; break; default: totalNumber += number; break; } prevOp = Operation.PLUS; number = 0; } public void minus() { switch (prevOp) { case NULL, PLUS: totalNumber += number; break; case DIV: totalNumber /= number; break; case MULT: totalNumber *= number; break; default: totalNumber -= number; break; } prevOp = Operation.MINUS; number = 0; } public void mult() { switch (prevOp) { case NULL, PLUS: totalNumber += number; break; case MINUS: totalNumber -= number; break; case DIV: totalNumber /= number; break; default: totalNumber *= number; break; } prevOp = Operation.MULT; number = 0; } public void div() { switch (prevOp) { case NULL, PLUS: totalNumber += number; break; case MINUS: totalNumber -= number; break; case MULT: totalNumber *= number; break; default: totalNumber /= number; break; } prevOp = Operation.DIV; number = 0; } public void reset() { number = 0; totalNumber = 0L; prevOp = Operation.NULL; currCalculation = ""; } }
[ "wojapa@gmail.com" ]
wojapa@gmail.com
6ac8c71e105c2669dac4cd8b9878bc09788f1b2f
87a48e60eec6b4a8ab15298de1557e7db4ed1c0e
/src/view/PanelFournisseur.java
8ffb911aadd4639015b7105752be2c9f92b2b292
[]
no_license
raed-logong/GestionAchatsVentes-Java-Swing
f2bf4c08b0c63b72237eecaad782c0ec708f2716
76a5958389a99f6639d22c51c702772329345feb
refs/heads/master
2023-05-09T19:34:32.527709
2021-06-02T16:55:27
2021-06-02T16:55:27
373,108,923
1
0
null
null
null
null
UTF-8
Java
false
false
8,644
java
package view; import controller.FournisseurService; import models.Client; import view.components.MyTable; import javax.swing.*; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableModel; import javax.swing.table.TableRowSorter; import java.awt.*; import java.awt.event.*; import java.util.ArrayList; public class PanelFournisseur extends JPanel { private final JTable table; private final TableRowSorter<TableModel> rowSorter; JFrame frame; JButton btnModifier; JButton btnSupprimer; public PanelFournisseur(MainWindow frame) { this.frame = frame; setLayout(new BorderLayout()); this.setSize(1175, 585); JScrollPane scrollPane = new JScrollPane(); //scrollPane.setBounds(10, 104, 1155, 471); scrollPane.setBackground(Color.WHITE); add(scrollPane, BorderLayout.CENTER); table = new MyTable(); Dimension dimension = new Dimension(100, 50); table.getTableHeader().setMinimumSize(dimension); table.setModel(new DefaultTableModel( new Object[][]{ }, new String[]{ "Code", "Matricule", "Raison", "Type", "NumRue", "Libelle", "Ville", "CodePostal", "Gouvernourat", "Pays", "fax", "NumFix", "NumPortable", "Email", "SiteWeb", "Etat" } ) { @Override public boolean isCellEditable(int row, int column) { return false; } }); rowSorter = new TableRowSorter<>(table.getModel()); table.setRowSorter(rowSorter); table.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS); table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); table.getTableHeader().setMinimumSize(new Dimension(100, 100)); //table.getTableHeader().setFont(new Font(Font.SERIF,Font.BOLD,18)); table.getTableHeader().setFont(new Font("Segoe UI", Font.BOLD, 20)); table.getTableHeader().setOpaque(false); table.getTableHeader().setBackground(new Color(32, 136, 203)); table.getTableHeader().setForeground(new Color(255, 255, 255)); table.setSelectionBackground(new java.awt.Color(232, 57, 124)); table.setRowHeight(30); table.setFont(new Font("Tahoma", Font.PLAIN, 17)); scrollPane.setViewportView(table); JPanel panel = new JPanel(); add(panel, BorderLayout.NORTH); panel.setLayout(new BorderLayout(0, 0)); JLabel lblNewLabel = new JLabel("Listes Des Fournisseur"); lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT); lblNewLabel.setIcon(new ImageIcon(PanelClient.class.getResource("/resource/icons8-liste-64.png"))); lblNewLabel.setForeground(Color.BLUE); lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 23)); panel.add(lblNewLabel, BorderLayout.NORTH); JPanel panel_1 = new JPanel(); panel.add(panel_1, BorderLayout.WEST); panel_1.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); JLabel lblNewLabel_1 = new JLabel("Recherche"); lblNewLabel_1.setIcon(new ImageIcon(PanelClient.class.getResource("/resource/icons8-rechercher-plus-35.png"))); lblNewLabel_1.setForeground(Color.BLUE); lblNewLabel_1.setHorizontalTextPosition(SwingConstants.LEFT); lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 17)); panel_1.add(lblNewLabel_1); JEditorPane filtre = new JEditorPane(); filtre.setSize(200, 100); filtre.setToolTipText("recherche"); filtre.setFont(new Font("Arial", Font.BOLD, 19)); panel_1.add(filtre); JPanel panel_2 = new JPanel(); panel.add(panel_2, BorderLayout.EAST); panel_2.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); JButton btnAjouter = new JButton("Ajouter"); btnAjouter.setIcon(new ImageIcon(PanelClient.class.getResource("/resource/icons8-ajouter-16.png"))); btnAjouter.setToolTipText("Ajouter un fournisseur"); btnAjouter.setHorizontalAlignment(SwingConstants.LEFT); panel_2.add(btnAjouter); btnModifier = new JButton("Modifier"); btnModifier.setIcon(new ImageIcon(PanelClient.class.getResource("/resource/icons8-modifier-16.png"))); btnModifier.setToolTipText("Modifier le fournisseur selectionné"); btnModifier.setEnabled(false); panel_2.add(btnModifier); btnSupprimer = new JButton("Supprimer"); btnSupprimer.setIcon(new ImageIcon(PanelClient.class.getResource("/resource/icons8-supprimer-16.png"))); btnSupprimer.setToolTipText("Supprimer le fournisseur selectionner\r\n"); btnSupprimer.setEnabled(false); panel_2.add(btnSupprimer); updatedata(); filtre.getDocument().addDocumentListener(new DocumentListener() { @Override public void insertUpdate(DocumentEvent e) { String text = filtre.getText(); table.clearSelection(); btnModifier.setEnabled(false); btnSupprimer.setEnabled(false); if (text.trim().length() == 0) { rowSorter.setRowFilter(null); } else { rowSorter.setRowFilter(RowFilter.regexFilter("(?i)" + text)); } } @Override public void removeUpdate(DocumentEvent e) { String text = filtre.getText(); if (text.trim().length() == 0) { rowSorter.setRowFilter(null); } else { rowSorter.setRowFilter(RowFilter.regexFilter("(?i)" + text)); } } @Override public void changedUpdate(DocumentEvent e) { throw new UnsupportedOperationException("Not supported yet."); } }); table.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { if (table.getSelectedRowCount() > 0) { btnSupprimer.setEnabled(true); btnModifier.setEnabled(true); } } }); table.addKeyListener(new KeyListener() { @Override public void keyTyped(KeyEvent e) { } @Override public void keyPressed(KeyEvent e) { int keyCode = e.getKeyCode(); if (keyCode == KeyEvent.VK_ESCAPE) { table.clearSelection(); btnModifier.setEnabled(false); btnSupprimer.setEnabled(false); } } @Override public void keyReleased(KeyEvent e) { } }); btnAjouter.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { AjouterFournisseur ac = new AjouterFournisseur(PanelFournisseur.this); ac.getParent().setEnabled(false); ac.setVisible(true); } }); btnSupprimer.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { FournisseurService fournisseurService = new FournisseurService(); if (!(table.getSelectionModel().isSelectionEmpty())) { int dialogResult = JOptionPane.showConfirmDialog(PanelFournisseur.this, "Voulez vous supprimer ce" + "Fournisseur", "Confirmation", JOptionPane.YES_NO_OPTION); if (dialogResult == JOptionPane.YES_OPTION) { int[] rows = table.getSelectedRows(); for (int i = 0; i < rows.length; i++) { String code = (String) table.getValueAt(rows[i], 0); fournisseurService.delete(code); } updatedata(); } } if (table.getRowCount() == 0) { btnModifier.setEnabled(false); btnSupprimer.setEnabled(false); } } }); btnModifier.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (!(table.getSelectionModel().isSelectionEmpty())) { FournisseurService fournisseurService = new FournisseurService(); int row = table.getSelectedRow(); String code = (String) table.getValueAt(row, 0); Client fournisseur = fournisseurService.get(code); ModifierFournisseur ac = new ModifierFournisseur(PanelFournisseur.this, fournisseur, row); ac.getParent().setEnabled(false); ac.setVisible(true); } } }); } public JTable getTable() { return table; } /** * Create the panel. */ public void updatedata() { while (table.getRowSorter().getModelRowCount() > 0) { ((DefaultTableModel) table.getModel()).removeRow(0); } FournisseurService fournisseurservice = new FournisseurService(); ArrayList<Client> list = fournisseurservice.getAll(); for (int i = 0; i < list.size(); i++) { Client fournisseur = list.get(i); try { Object[] data = {fournisseur.getCode(), fournisseur.getMatricule(), fournisseur.getRaison(), fournisseur.getType(), fournisseur.getAddress().getNumeroRue(), fournisseur.getAddress().getLibelle(), fournisseur.getAddress().getVille(), fournisseur.getAddress().getCodePostal(), fournisseur.getAddress().getGouvernourat(), fournisseur.getAddress().getPays(), fournisseur.getFax(), fournisseur.getNumFix(), fournisseur.getNumPortable(), fournisseur.getEmail(), fournisseur.getSiteWeb(), fournisseur.getEtat().toString()}; ((DefaultTableModel) table.getModel()).addRow(data); } catch (Exception E) { System.out.println(E.getMessage()); } } } }
[ "raed.attia@polytechnicien.tn" ]
raed.attia@polytechnicien.tn
89a37003a9ba6889ef4e56ca35f3a7e324e67c36
a7ee817234ce177f9fc5e80b732c7a345300d616
/OOPS/StringHandling/StringConstantPooll.java
4a4bf9b72bcbdfb639dada807d41ca42b3b71d08
[]
no_license
javatopics3/Core-Java
ade885ae60ed57edc8d6595473ea76a46cb7dcec
9fe3a6c09fceb4d4119b77f2ed2daebb65b14bd8
refs/heads/master
2021-05-11T07:22:47.537902
2018-01-29T10:30:22
2018-01-29T10:30:22
118,018,200
0
0
null
null
null
null
UTF-8
Java
false
false
245
java
package StringHandling; public class StringConstantPooll { public static void main(String[] args) { String s = "prasad"; String s2 = new String("prasad"); System.out.println(s.equals(s2)); System.out.println(s == s2); } }
[ "Raghunadh@RAGHU" ]
Raghunadh@RAGHU
2b83474ab6df3552124af33b553f29b5135b53cc
1590fa8ce4d083041c90e1cb10067ad299c46404
/Client/Lazyboard/app/src/main/java/com/ofaucoz/lazyboard/LazyboardService.java
5b316f8bdbd06b1bec1857ada6dd1a7c587dd420
[]
no_license
ofaucoz/lazyboard
906bfec56ae822e0616a4f94a753141b822652ae
b55a02e22154ba108609a20705af26e394913ff9
refs/heads/master
2021-01-21T05:10:03.102469
2017-10-12T21:01:53
2017-10-12T21:01:53
101,916,690
0
0
null
2017-10-12T21:01:54
2017-08-30T18:39:30
Java
UTF-8
Java
false
false
9,071
java
package com.ofaucoz.lazyboard; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import android.content.Context; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.UUID; public class LazyboardService { // Debugging private static final String TAG = "LazyboardService"; private static final UUID MY_UUID_SECURE = UUID.fromString("0511a889-e39e-475b-8789-b61f74fd92d5"); // Member fields private final BluetoothAdapter mAdapter; private final Handler mHandler; private ConnectThread mConnectThread; private ConnectedThread mConnectedThread; private int mState; private int mNewState; // Constants that indicate the current connection state public static final int STATE_NONE = 0; // we're doing nothing public static final int STATE_LISTEN = 1; // now listening for incoming connections public static final int STATE_CONNECTING = 2; // now initiating an outgoing connection public static final int STATE_CONNECTED = 3; // now connected to a remote device public LazyboardService(Context context, Handler handler) { mAdapter = BluetoothAdapter.getDefaultAdapter(); mState = STATE_NONE; mNewState = mState; mHandler = handler; } private synchronized void updateUserInterfaceTitle() { mState = getState(); mNewState = mState; // Give the new state to the Handler so the UI Activity can update mHandler.obtainMessage(Constants.MESSAGE_STATE_CHANGE, mNewState, -1).sendToTarget(); } /** * Return the current connection state. */ public synchronized int getState() { return mState; } public synchronized void connect(BluetoothDevice device, boolean secure) { // Cancel any thread attempting to make a connection if (mState == STATE_CONNECTING) { if (mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } } // Cancel any thread currently running a connection if (mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } // Start the thread to connect with the given device mConnectThread = new ConnectThread(device, secure); mConnectThread.start(); // Update UI title updateUserInterfaceTitle(); } public synchronized void connected(BluetoothSocket socket, BluetoothDevice device, final String socketType) { // Cancel the thread that completed the connection if (mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } // Cancel any thread currently running a connection if (mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } // Start the thread to manage the connection and perform transmissions mConnectedThread = new ConnectedThread(socket, socketType); mConnectedThread.start(); // Send the name of the connected device back to the UI Activity Message msg = mHandler.obtainMessage(Constants.MESSAGE_DEVICE_NAME); Bundle bundle = new Bundle(); bundle.putString(Constants.DEVICE_NAME, device.getName()); msg.setData(bundle); mHandler.sendMessage(msg); // Update UI title updateUserInterfaceTitle(); } public synchronized void stop() { if (mConnectThread != null) { mConnectThread.cancel(); mConnectThread = null; } if (mConnectedThread != null) { mConnectedThread.cancel(); mConnectedThread = null; } mState = STATE_NONE; // Update UI title updateUserInterfaceTitle(); } public void write(int out) { // Create temporary object Log.d("lazyboard_service", "state 1 = " + this.getState()); ConnectedThread r; // Synchronize a copy of the ConnectedThread synchronized (this) { if (mState != STATE_CONNECTED) return; r = mConnectedThread; } // Perform the write unsynchronized r.write(out); } private void connectionFailed() { // Send a failure message back to the Activity Message msg = mHandler.obtainMessage(Constants.MESSAGE_TOAST); Bundle bundle = new Bundle(); bundle.putString(Constants.TOAST, "Unable to connect device"); msg.setData(bundle); mHandler.sendMessage(msg); mState = STATE_NONE; // Update UI title updateUserInterfaceTitle(); // Do something } private class ConnectThread extends Thread { private final BluetoothSocket mmSocket; private final BluetoothDevice mmDevice; private String mSocketType; public ConnectThread(BluetoothDevice device, boolean secure) { mmDevice = device; BluetoothSocket tmp = null; mSocketType = secure ? "Secure" : "Insecure"; // Get a BluetoothSocket for a connection with the // given BluetoothDevice try { if (secure) { tmp = device.createRfcommSocketToServiceRecord( MY_UUID_SECURE); } else { } } catch (IOException e) { } mmSocket = tmp; mState = STATE_CONNECTING; } public void run() { setName("ConnectThread" + mSocketType); // Always cancel discovery because it will slow down a connection mAdapter.cancelDiscovery(); // Make a connection to the BluetoothSocket try { // This is a blocking call and will only return on a // successful connection or an exception mmSocket.connect(); } catch (IOException e) { // Close the socket try { mmSocket.close(); } catch (IOException e2) { } connectionFailed(); return; } // Reset the ConnectThread because we're done synchronized (LazyboardService.this) { mConnectThread = null; } // Start the connected thread connected(mmSocket, mmDevice, mSocketType); } public void cancel() { try { mmSocket.close(); } catch (IOException e) { } } } /** * This thread runs during a connection with a remote device. * It handles all incoming and outgoing transmissions. */ private class ConnectedThread extends Thread { private final BluetoothSocket mmSocket; private final InputStream mmInStream; private final OutputStream mmOutStream; public ConnectedThread(BluetoothSocket socket, String socketType) { mmSocket = socket; InputStream tmpIn = null; OutputStream tmpOut = null; // Get the BluetoothSocket input and output streams try { tmpIn = socket.getInputStream(); tmpOut = socket.getOutputStream(); } catch (IOException e) { } mmInStream = tmpIn; mmOutStream = tmpOut; mState = STATE_CONNECTED; } public void run() { byte[] buffer = new byte[1024]; int bytes; // Keep listening to the InputStream while connected while (mState == STATE_CONNECTED) { try { // Read from the InputStream bytes = mmInStream.read(buffer); // Send the obtained bytes to the UI Activity mHandler.obtainMessage(Constants.MESSAGE_READ, bytes, -1, buffer) .sendToTarget(); } catch (IOException e) { break; } } } /** * Write to the connected OutStream. * * @param buffer The bytes to write */ public void write(int buffer) { try { mmOutStream.write(buffer); // Share the sent message back to the UI Activity mHandler.obtainMessage(Constants.MESSAGE_WRITE, -1, -1, buffer) .sendToTarget(); } catch (IOException e) { } } public void cancel() { try { mmSocket.close(); } catch (IOException e) { } } } }
[ "orphee.faucoz@gmail.com" ]
orphee.faucoz@gmail.com
f90abcb98315aa796fe6ab352a18919d0fe0af79
fcc94af06e6ae2cfb2110a60a94b63f0d236beee
/programming/thursday-w34/exercise02/src/App.java
c8a15740a53432b7ac9e2b91af95787b0ecc08ef
[]
no_license
darth-raijin/kea-data21v2
cbe9f97497d752566d46461e51773120728e0e6f
fdea39d92f781fa0b962b5368de88397ba04b8af
refs/heads/master
2023-08-21T16:37:23.789862
2021-09-23T18:16:20
2021-09-23T18:16:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
451
java
public class App { public static void main(String[] args) throws Exception { Library localLibrary = new Library(); localLibrary.addBook(new Book("9780140439199", "The Art of War", "6th century BC")); localLibrary.addBook(new Book("9780023042706", "The Prince", "1513")); localLibrary.addBook(new Book("9788702188684", "Mimbo Jimbo finder en ven", "2041")); localLibrary.findBook("9780023042706"); } }
[ "mmacovv@gmail.com" ]
mmacovv@gmail.com
245172638d81b70b66cbd55bb5611cbdfbe2e4eb
8211f5b8c2140a58adbfdb6b93557a6e8c550783
/IdeaProjects/Week12. 20161114/src/CDLExample.java
d685a55a044a7f471b22d4ccd3de9cbf8afd258d
[]
no_license
SeoHyunAhn/Purdue-JavaO-O
a8fec82b3639759e85732e447a600db22e2635a8
60d0ed74c22bc67919b3f560e0784dbf33fdcd8a
refs/heads/master
2021-01-20T03:46:45.021694
2017-04-17T00:29:54
2017-04-17T00:29:54
83,833,674
0
0
null
2017-03-03T19:32:21
2017-03-03T19:27:59
null
UTF-8
Java
false
false
742
java
/** * Example for CS18000-F16 Homework 10 to show use of CountDownLatch. * * @author Neil Allison * @version November 12, 2016 */ public class CDLExample extends Thread { private char letter; public CDLExample(char letter) { this.letter = letter; } @Override public void run() { for (int i = 0; i < 5; i++) { System.out.println(letter); try { Thread.sleep(500); } catch (InterruptedException e) { System.err.printf("Sleeping Failed: %s%n", e.getMessage()); } } System.out.printf("%c thread finished%n", letter); CDLExampleExecutor.decrementCountDownLatch(); } }
[ "ahn67@purdue.edu" ]
ahn67@purdue.edu
c9e7fb93b075ae694d464ddddac689e78b81ad2f
ede53c4500da6c94afb033fdf4491d5fec26a5bb
/banco-logic/src/main/java/co/edu/usb/cali/banco/dto/TipoTransaccionDTO.java
001a6199d1488cb4126eee5b882b846cfbec9f56
[]
no_license
mattlenius/configuraciongestion
f71f55a7c327407dc69462213c12c7176f561c61
9963458a99d59b93728b53261eca62e70be1d22d
refs/heads/master
2022-10-02T03:56:39.897287
2019-06-14T00:58:06
2019-06-14T00:58:06
191,852,803
0
0
null
2022-09-08T01:00:53
2019-06-14T00:55:14
Java
UTF-8
Java
false
false
1,062
java
package co.edu.usb.cali.banco.dto; import java.io.Serializable; import java.util.List; import javax.persistence.Column; import javax.persistence.Id; import javax.persistence.OneToMany; import co.edu.usb.cali.banco.domain.Transaccion; public class TipoTransaccionDTO { private static final long serialVersionUID = 1L; private Long titrId; private String activo; private String nombre; public TipoTransaccionDTO() { super(); } public TipoTransaccionDTO(Long titrId, String activo, String nombre) { super(); this.titrId = titrId; this.activo = activo; this.nombre = nombre; } public Long getTitrId() { return titrId; } public void setTitrId(Long titrId) { this.titrId = titrId; } public String getActivo() { return activo; } public void setActivo(String activo) { this.activo = activo; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public static long getSerialversionuid() { return serialVersionUID; } }
[ "juan.arcila@pdpartner.com" ]
juan.arcila@pdpartner.com
b357fa799fae871bf4b7ca9c209244bdb886ce33
df2cb70561c8cd2a4bfd05a363b7a8f21a964e02
/MoWiDi PC/test/edu/kit/ibds/mowidi/pc/controller/NotifierTest.java
303a3fbb61b2e439f486236ceaf55af16364a4b6
[ "MIT" ]
permissive
DocGerd/MoWiDi
c26aee6f5f64e6f7f78d10e7c3a1be896142d385
3fe6011e75bf37eacca8b9d09267f28519df7f97
refs/heads/master
2021-01-11T03:44:25.484947
2016-10-18T22:57:23
2016-10-18T22:57:23
71,295,807
1
0
null
null
null
null
UTF-8
Java
false
false
2,542
java
/* * @(#)NotifierTest.java * * This file is part of MoWiDi. * * MoWiDi 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. * * MoWiDi 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 MoWiDi. If not, see <http://www.gnu.org/licenses/>. * * Copyright 2010 by PSE23-Team: * * Patrick Kuhn, Michael Auracher, * André Wengert, Kim Spieß, Christopher Schütze */ package edu.kit.ibds.mowidi.pc.controller; import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.*; /** * * @author Patrick Kuhn */ public class NotifierTest { @BeforeClass public static void before() { System.out.println("---------------"); System.out.println("--Notifier"); } private static final class ObservingViewImpl implements ObservingView { @Override public void update(final Information i) { assert true; } } /** * Test of addObservingView method, of class Notifier. */ @Test public void testAddObservingView() { System.out.println("addObservingView"); final int expResult = 1; final ObservingView o = new ObservingViewImpl(); final Notifier instance = new Notifier(); instance.addObservingView(o); assertEquals(expResult, instance.getRegisteredCount()); } /** * Test of notifyObservers method, of class Notifier. */ @Test public void testNotifyObservers() { System.out.println("notifyObservers"); final Information i = null; final Notifier instance = new Notifier(); final ObservingView o = new ObservingViewImpl(); instance.addObservingView(o); instance.notifyObservers(i); } /** * Test of getRegisteredCount method, of class Notifier. */ @Test public void testGetRegisteredCount() { System.out.println("getRegisteredCount"); final Notifier instance = new Notifier(); final int expResult = 0; final int result = instance.getRegisteredCount(); assertEquals(expResult, result); } }
[ "dev@docgerdsoft.de" ]
dev@docgerdsoft.de
01df0a68abf6a358fece57b364b9638a246433f8
dbd073641215e36af2d7036314ee2d5cb2834ca0
/src/main/java/com/thoughtworks/capability/gtb/restfulapidesign/domain/Group.java
aa4534f206537c98f687469425bba71da14dd566
[]
no_license
cleoxiii/B-Restful-api-design-homework
1200f675e2c4c720497d56da61aac24d14382140
2b04b926cebd9b825f3abb8956ca5076f8b52d92
refs/heads/master
2022-12-19T09:04:43.376312
2020-09-23T16:37:51
2020-09-23T16:37:51
295,379,626
0
0
null
2020-09-14T10:19:30
2020-09-14T10:19:29
null
UTF-8
Java
false
false
540
java
package com.thoughtworks.capability.gtb.restfulapidesign.domain; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class Group { private Integer id; private String name; private String note; private List<Student> studentList; public void addStudent(Student student) { studentList.add(student); } public void clear() { studentList.clear(); } }
[ "cleoxiii@163.com" ]
cleoxiii@163.com
aa296afcaad618c0f7cdfef2885761098db72736
8a9b2671cd5fb43cf3bd786b7fc26ec71b3b5eab
/back-end/datax-plugin/datax-plugins-common/src/main/java/org/example/plugins/common/exceptions/PluginError.java
d0e67c03a1cbdf0f5b57635c2c00f709c77f2a4a
[]
no_license
Zxj19951031/data-flow
771ecc682bfe12abea5444af653712488d45d178
4cba9785fb4f2258f6c13a348a0206a8b25802e7
refs/heads/main
2023-06-06T05:34:44.226876
2021-06-23T11:57:41
2021-06-23T11:57:41
323,791,514
0
0
null
null
null
null
UTF-8
Java
false
false
793
java
package org.example.plugins.common.exceptions; public enum PluginError implements IErrorCode { TASK_INIT_ERROR(3001, "初始化异常"), TASK_UNSUPPORTED_TYPE(3002, "字段类型不支持"), TASK_READ_ERROR(3004, "读取异常"), GET_COLUMN_INFO_FAILED(3005, "获取列表元数据失败"), TASK_WRITE_ERROR(3006, "写入异常"); private final int code; private final String msg; PluginError(Integer code, String msg) { this.code = code; this.msg = msg; } @Override public int getCode() { return this.code; } @Override public String getMsg() { return this.msg; } @Override public String toString() { return String.format("Code=[%s],Message=[%s]", this.code, this.msg); } }
[ "870324066@qq.com" ]
870324066@qq.com
4b084779f910ae313b7b7409a46f935d96b537a5
80848a00331b78d180386b2fce0b2993fa45e575
/app/src/main/java/com/bouilli/nxx/bouillihotel/push/org/jivesoftware/smackx/pubsub/PubSubElementType.java
49ad3772d48b2b5c36ca640791376e067691b2bb
[]
no_license
nx6313/BouilliHotel
4f68fc3f33a36d68e07cefd1d9628f110533db33
09407054930a1e95b195f1542be614cf9b22fef8
refs/heads/master
2020-07-16T07:33:36.837913
2017-11-03T09:39:40
2017-11-03T09:39:40
73,950,097
0
0
null
null
null
null
UTF-8
Java
false
false
2,640
java
/** * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.bouilli.nxx.bouillihotel.push.org.jivesoftware.smackx.pubsub; import com.bouilli.nxx.bouillihotel.push.org.jivesoftware.smackx.pubsub.packet.PubSubNamespace; /** * Defines all the possible element types as defined for all the pubsub * schemas in all 3 namespaces. * * @author Robin Collier */ public enum PubSubElementType { CREATE("create", PubSubNamespace.BASIC), DELETE("delete", PubSubNamespace.OWNER), DELETE_EVENT("delete", PubSubNamespace.EVENT), CONFIGURE("configure", PubSubNamespace.BASIC), CONFIGURE_OWNER("configure", PubSubNamespace.OWNER), CONFIGURATION("configuration", PubSubNamespace.EVENT), OPTIONS("options", PubSubNamespace.BASIC), DEFAULT("default", PubSubNamespace.OWNER), ITEMS("items", PubSubNamespace.BASIC), ITEMS_EVENT("items", PubSubNamespace.EVENT), ITEM("item", PubSubNamespace.BASIC), ITEM_EVENT("item", PubSubNamespace.EVENT), PUBLISH("publish", PubSubNamespace.BASIC), PUBLISH_OPTIONS("publish-options", PubSubNamespace.BASIC), PURGE_OWNER("purge", PubSubNamespace.OWNER), PURGE_EVENT("purge", PubSubNamespace.EVENT), RETRACT("retract", PubSubNamespace.BASIC), AFFILIATIONS("affiliations", PubSubNamespace.BASIC), SUBSCRIBE("subscribe", PubSubNamespace.BASIC), SUBSCRIPTION("subscription", PubSubNamespace.BASIC), SUBSCRIPTIONS("subscriptions", PubSubNamespace.BASIC), UNSUBSCRIBE("unsubscribe", PubSubNamespace.BASIC); private String eName; private PubSubNamespace nSpace; private PubSubElementType(String elemName, PubSubNamespace ns) { eName = elemName; nSpace = ns; } public PubSubNamespace getNamespace() { return nSpace; } public String getElementName() { return eName; } public static PubSubElementType valueOfFromElemName(String elemName, String namespace) { int index = namespace.lastIndexOf('#'); String fragment = (index == -1 ? null : namespace.substring(index+1)); if (fragment != null) { return valueOf((elemName + '_' + fragment).toUpperCase()); } return valueOf(elemName.toUpperCase().replace('-', '_')); } }
[ "1823052143@qq.com" ]
1823052143@qq.com
5077be72fb0acb736817db3095267733bb34bb2b
7edc0ef769d77f3ea39a06d4ec363c749f48a7ca
/src/main/java/com/jt/design_pattern/structural/bridge/ConcreteImplementor.java
91e8d01dc1937c2df7d798eb64c924a514299d62
[]
no_license
jitatai/design_pattern
a715ed7e91c5856cf3a978323ad1348b11dad60c
35119e440d7963d9a1af1656f8597602e0f74639
refs/heads/master
2023-02-18T12:43:01.335763
2021-01-22T09:13:12
2021-01-22T09:13:12
326,631,257
0
0
null
null
null
null
UTF-8
Java
false
false
319
java
package com.jt.design_pattern.structural.bridge; /** * @author jiatai.hu * @version 1.0 * @date 2021/1/13 11:18 */ public class ConcreteImplementor implements Implementor { @Override public void OperationImpl() { System.out.println("具体实现化(Concrete Implementor)角色被访问"); } }
[ "846722168@qq.com" ]
846722168@qq.com
dfa8413abbf775dbb6b107669ba5473d104497fa
d31f48b9d029b67778ef1b50fe7a692393d3f083
/java8/reflexao/ReflexaoExemplo.java
76c578a8a1b7651f91ddd3a04deb7052d73f4ed9
[]
no_license
gumota/Java8-Topicos-Avancados
35f33fcbb4bbdfa78d192afb67762e8b2f19761e
c4d308b415621ac916f57f81d843796d925ab894
refs/heads/master
2021-03-16T02:40:20.908252
2020-03-21T01:04:50
2020-03-21T01:04:50
246,896,998
0
0
null
null
null
null
ISO-8859-2
Java
false
false
599
java
package reflexao; import java.lang.reflect.Method; import java.lang.reflect.Parameter; public class ReflexaoExemplo { public static void main(String[] args) { // Instancia da classe produto Produto p = new Produto("Geladeira", 3000.00); // Instancia da classe class Class cl = p.getClass(); // Todos os métodos declarados na classe produto Method[] methods = cl.getDeclaredMethods(); for (Method m : methods) { System.out.println(m.getName()); Parameter[] parameter = m.getParameters(); for(Parameter pr : parameter) { System.out.println(pr); } } } }
[ "gustavo.omota@hotmail.com" ]
gustavo.omota@hotmail.com
9484a24d2bdda933eebc6b71c426c3541660a3b4
84fb0330cab09be61351dfd7797e4afc932a767c
/src/constant/Defines.java
ae38c94b8acbcc7488b2f791588bcded2724f242
[]
no_license
chauvuong/OrganicStore-1
c14da5286202a86b9ac552c74f0c64c989eb8dd3
c428ae738e7f4361a52185252ca13d1c9267efcb
refs/heads/master
2020-04-17T21:15:04.232513
2019-01-03T11:01:07
2019-01-03T11:01:07
166,941,333
1
0
null
2019-01-22T06:39:45
2019-01-22T06:39:45
null
UTF-8
Java
false
false
348
java
package constant; public class Defines { public static final String DIR_UPLOAD = "files"; public static final int ROW_COUNT = 5; public String SHOP_TEMPLATE_URL; public String getSHOP_TEMPLATE_URL() { return SHOP_TEMPLATE_URL; } public void setSHOP_TEMPLATE_URL(String sHOP_TEMPLATE_URL) { SHOP_TEMPLATE_URL = sHOP_TEMPLATE_URL; } }
[ "you@example.com" ]
you@example.com
a302fc762f9803839e21942fb4effbe7bc3896e8
ad21d8179a77855c59c325196ace385b5cb15cf1
/Project3/try2/src/Project3.java
31e47aa3f354876ec591a49348e019dfb1071b7d
[]
no_license
prodimator/DanceThreads
65020d97375a7c4ba55290522bd429fd942fa1dc
13337b3f77b63fe889e24c083b67ee1163cf8134
refs/heads/master
2020-04-12T22:44:24.244621
2015-05-06T06:55:36
2015-05-06T06:55:36
34,625,117
0
0
null
null
null
null
UTF-8
Java
false
false
719
java
import java.util.*; import java.util.concurrent.*; public class Project3 { public static void main(String[] args) throws Exception{ Hashtable<String, String> danceCard = new Hashtable<String, String>(); danceCard.put("Waltz", ""); danceCard.put("Tango", ""); danceCard.put("Foxtrot", ""); danceCard.put("Quickstep", ""); danceCard.put("Rumba", ""); danceCard.put("Scamba", ""); danceCard.put("Cha Cha", ""); danceCard.put("Jive", ""); BlockingQueue queue = new LinkedBlockingQueue(); Leader leader1 = new Leader(queue, danceCard, "L" ); Follower follower1 = new Follower(queue, danceCard, "F"); follower1.run(); leader1.run(); } }
[ "rwolfe22@gmail.com" ]
rwolfe22@gmail.com
2d579f6a566a0e2bb48be0223789d4d1c4ae9f38
ba005c6729aed08554c70f284599360a5b3f1174
/lib/selenium-server-standalone-3.4.0/com/gargoylesoftware/htmlunit/javascript/SimpleScriptableProxy.java
ee867d37205a90c95feb2a89e00bb5dee8fdfe3d
[]
no_license
Viral-patel703/Testyourbond-aut0
f6727a6da3b1fbf69cc57aeb89e15635f09e249a
784ab7a3df33d0efbd41f3adadeda22844965a56
refs/heads/master
2020-08-09T00:27:26.261661
2017-11-07T10:12:05
2017-11-07T10:12:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,138
java
package com.gargoylesoftware.htmlunit.javascript; import java.io.Serializable; import net.sourceforge.htmlunit.corejs.javascript.Delegator; import net.sourceforge.htmlunit.corejs.javascript.Scriptable; public abstract class SimpleScriptableProxy<T extends SimpleScriptable> extends Delegator implements Serializable { public SimpleScriptableProxy() {} public abstract T getDelegee(); public Object get(int index, Scriptable start) { if ((start instanceof SimpleScriptableProxy)) { start = ((SimpleScriptableProxy)start).getDelegee(); } return getDelegee().get(index, start); } public Object get(String name, Scriptable start) { if ((start instanceof SimpleScriptableProxy)) { start = ((SimpleScriptableProxy)start).getDelegee(); } return getDelegee().get(name, start); } public boolean has(int index, Scriptable start) { if ((start instanceof SimpleScriptableProxy)) { start = ((SimpleScriptableProxy)start).getDelegee(); } return getDelegee().has(index, start); } public boolean has(String name, Scriptable start) { if ((start instanceof SimpleScriptableProxy)) { start = ((SimpleScriptableProxy)start).getDelegee(); } return getDelegee().has(name, start); } public boolean hasInstance(Scriptable instance) { if ((instance instanceof SimpleScriptableProxy)) { instance = ((SimpleScriptableProxy)instance).getDelegee(); } return getDelegee().hasInstance(instance); } public void put(int index, Scriptable start, Object value) { if ((start instanceof SimpleScriptableProxy)) { start = ((SimpleScriptableProxy)start).getDelegee(); } getDelegee().put(index, start, value); } public void put(String name, Scriptable start, Object value) { if ((start instanceof SimpleScriptableProxy)) { start = ((SimpleScriptableProxy)start).getDelegee(); } getDelegee().put(name, start, value); } public Object getDefaultValue(Class<?> hint) { return getDelegee().getDefaultValue(hint); } }
[ "VIRUS-inside@users.noreply.github.com" ]
VIRUS-inside@users.noreply.github.com
c44c5091c338e0615a93daf1a5cc6020ba069ad8
c555e2a75e18a6a1186a161b3737171af35fa0ff
/vehicle/src/main/java/com/fastcampus/vehicle/eventstore/VehicleEventEntity.java
50368722a97a22d9ed4a113a6c7dc5288cc2c690
[ "Apache-2.0" ]
permissive
SeungpilPark/fastcampus-mobility
db9ad35ca2fa190694b6abfdad72a9323fe157a0
22372305ac3b56837b2e6058bd9505a8317b093f
refs/heads/main
2023-02-20T13:29:50.332398
2021-01-14T06:59:31
2021-01-14T06:59:31
328,278,853
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
package com.fastcampus.vehicle.eventstore; import com.fastcampus.common.event.AbstractEventEntity; import javax.persistence.Entity; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor @Entity(name = "vehicle_event_store") @EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = false) public class VehicleEventEntity extends AbstractEventEntity { }
[ "mz_seungpilpark@woowafriends.com" ]
mz_seungpilpark@woowafriends.com
a7b6cfcc119c231936f2d091d3b83bcf233beac8
2f5220f7126e52a939412067f08a321bb95f0010
/gulimall-ware/src/main/java/com/atguigu/gulimall/ware/entity/PurchaseEntity.java
b196e4c1d662dae9eecb514c12ccd1882d48f87f
[ "Apache-2.0" ]
permissive
gzqnb/springcloud
77e5c581840ba7b4b72a86a49eb4c4a50b92a020
b7f1ef3e78155230502a3058195deb088904b547
refs/heads/master
2023-06-20T02:09:45.873381
2021-07-05T06:37:23
2021-07-05T06:37:23
360,515,806
0
0
null
null
null
null
UTF-8
Java
false
false
912
java
package com.atguigu.gulimall.ware.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.math.BigDecimal; import java.io.Serializable; import java.util.Date; import lombok.Data; /** * 采购信息 * * @author guoziqian * @email guoziqian@gmail.com * @date 2021-03-17 14:58:07 */ @Data @TableName("wms_purchase") public class PurchaseEntity implements Serializable { private static final long serialVersionUID = 1L; /** * */ @TableId private Long id; /** * */ private Long assigneeId; /** * */ private String assigneeName; /** * */ private String phone; /** * */ private Integer priority; /** * */ private Integer status; /** * */ private Long wareId; /** * */ private BigDecimal amount; /** * */ private Date createTime; /** * */ private Date updateTime; }
[ "905351828@qq.com" ]
905351828@qq.com
db31404377c2029232213475f3355e677e96e511
3f7d9123220638ce806970241880caa082fe4a9b
/src/main/java/com/wygjyw/filedownload/HomeController.java
f05a544d2c48f566ac886fe4a9f9eb873ecde0c7
[]
no_license
wygjyw/SpringMVC
30e95c0572d8bf4a5c8d56dad4a0ea7a99dd6401
9da3963fb4eee60345df626f8c651fda6109b8e5
refs/heads/master
2021-01-19T07:37:16.483510
2014-01-15T15:10:49
2014-01-15T15:10:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,085
java
package com.wygjyw.filedownload; import java.text.DateFormat; import java.util.Date; import java.util.Locale; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; /** * Handles requests for the application home page. */ @Controller public class HomeController { private static final Logger logger = LoggerFactory.getLogger(HomeController.class); /** * Simply selects the home view to render by returning its name. */ @RequestMapping(value = "/", method = RequestMethod.GET) public String home(Locale locale, Model model) { logger.info("Welcome home! The client locale is {}.", locale); Date date = new Date(); DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); String formattedDate = dateFormat.format(date); model.addAttribute("serverTime", formattedDate ); return "home"; } }
[ "wygjyw@gmail.com" ]
wygjyw@gmail.com
63c976e31955c5aed5ccb3a26060d3ff57d4182e
ca198ad0201f8cc27479d92a18e636b8001931d8
/src/main/java/com/cheerhou/microservices/limitsservice/LimitsConfigurationController.java
49c8fd391d3abc7b94251f1994c97bc4a3e3557f
[]
no_license
cheerhou/limits-service
61f33ada8bfd51b8cf9dc50374a344a2eea352f5
7d784f8fdcc32208c1b600916cece93029c95044
refs/heads/main
2023-02-05T06:34:34.466197
2020-12-23T07:33:00
2020-12-23T07:33:00
323,820,575
0
0
null
null
null
null
UTF-8
Java
false
false
614
java
package com.cheerhou.microservices.limitsservice; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; /** * @author hcj * @Description * @Date 2020/12/23 */ @RestController public class LimitsConfigurationController { @Autowired private Configuration configuration; @GetMapping("/limits") public LimitsConfiguration retrieveLimitsFromConfiguration() { return new LimitsConfiguration(configuration.getMaximum(), configuration.getMinimum()); } }
[ "houchenjin@23mofang.com" ]
houchenjin@23mofang.com
0510546e5d08359aa7a2502ee0728257b4975760
220cc7e0ed6204d68e6a7fc11987e2a606739b4a
/exchange-domain/src/main/java/io/exchange/domain/enums/OrderType.java
990839a5a00fc95ec8a1d4759d428a429e261b66
[]
no_license
lhysin/ponybit
4503d0e5377e4346dc3b117440781680349af9b0
a5c60c5f12b0e0e3cb40ed878a4112c214371ec3
refs/heads/main
2023-04-05T16:32:53.913071
2021-04-09T07:05:42
2021-04-09T07:05:42
356,171,152
0
0
null
null
null
null
UTF-8
Java
false
false
75
java
package io.exchange.domain.enums; public enum OrderType { BUY, SELL }
[ "lhysin.main@gmail.com" ]
lhysin.main@gmail.com
4c99fa82bda4fd0bbce9ed8e39d8dfd92114a2ef
ac073738adeb18821dbabf45f55d1a0e27c19882
/src/main/java/local/CafeChanged.java
df7291490f9976b4d0ef5fa3d4b5ecaddad96649
[]
no_license
rlatjdwo555/SKtarbucks-Cafe
850f7a46d4956467d8813de32253836b32d1786e
9f0d35e9cb1e1663876fb4defd052fcdcb6d5fb1
refs/heads/main
2023-06-26T23:03:52.685360
2021-07-26T05:18:13
2021-07-26T05:18:13
385,104,419
0
1
null
null
null
null
UTF-8
Java
false
false
731
java
package local; public class CafeChanged extends AbstractEvent { private Long id; private String cafeNm; private Long stock; private int price; public CafeChanged(){ super(); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getCafeNm() { return cafeNm; } public void setCafeNm(String cafeNm) { this.cafeNm = cafeNm; } public void setStock(Long stock){ this.stock = stock; } public Long getStock(){ return stock; } public void setPrice(int price){ this.price = price; } public int getPrice(){ return price; } }
[ "ksj0495@naver.com" ]
ksj0495@naver.com
9b4674ffe8f92f76db2b070f7d88e7b00cffddc7
55b9344bc17d0c7e558bc917a443c1336cf1443b
/src/main/java/com/janakerman/exemplarservice/exception/PaymentValidationException.java
6e43ce7c0c91aae00fa47652c9d15d16e149b4ec
[]
no_license
janakerman/exemplar-service
bc2594c52d3ae40d8cb81297d542b195280369da
85ecf4d565ac968ebcc4e8bd8c38a4127d6486ae
refs/heads/master
2020-05-15T19:30:51.249807
2019-05-01T12:12:43
2019-05-01T12:12:43
182,457,676
0
1
null
null
null
null
UTF-8
Java
false
false
308
java
package com.janakerman.exemplarservice.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(value= HttpStatus.BAD_REQUEST, reason="Invalid payment request") public class PaymentValidationException extends RuntimeException {}
[ "j.f.akerman@gmail.com" ]
j.f.akerman@gmail.com
b72e5449bdfdf320e13f255f66ac858f35e87c84
fe0a27bcd9eb2be6ae938d53deeaee52968a7c36
/controller/src/main/java/com/epam/esm/contoller/UserController.java
1833f3e3e3c1e78ac845eefaf202b940178c628c
[]
no_license
KostyaSvirski/Authentication-Spring-Security
a87075994ab3f057f34492ca630f817b1766d5ec
0ac8f96eeb6557e7a1b1c653005a9f1cdd2a8942
refs/heads/dev
2023-04-11T09:48:22.707765
2021-04-16T16:42:19
2021-04-16T16:42:19
342,965,209
0
0
null
2021-03-01T07:22:46
2021-02-27T21:47:58
Java
UTF-8
Java
false
false
2,247
java
package com.epam.esm.contoller; import com.epam.esm.auth.UserPrincipal; import com.epam.esm.dto.UserDTO; import com.epam.esm.exception.UnknownPrincipalException; import com.epam.esm.service.UserService; import com.epam.esm.util.builder.UserLinkBuilder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping("/users") public class UserController { private static final int DEFAULT_LIMIT_INT = 5; private static final int DEFAULT_PAGE_INT = 1; private static final String DEFAULT_LIMIT = "5"; private static final String DEFAULT_PAGE = "1"; @Autowired private UserService service; @GetMapping("/") public ResponseEntity<?> retrieveAllUsers (@RequestParam(defaultValue = DEFAULT_LIMIT) int limit, @RequestParam(defaultValue = DEFAULT_PAGE) int page) { List<UserDTO> resultList = service.findAll(limit, page); for (int i = 0; i < resultList.size(); i++) { UserLinkBuilder builder = new UserLinkBuilder(resultList.get(i)); builder.buildRetrieveSpecificUserLink(); resultList.set(i, builder.getHypermedia()); } return new ResponseEntity<>(resultList, HttpStatus.OK); } @GetMapping("/{id}") public ResponseEntity<?> retrieveSpecificUser(@PathVariable long id) { UserDTO user = service.find(id); UserLinkBuilder builder = new UserLinkBuilder(user); builder.buildOrdersReferencesLink(DEFAULT_LIMIT_INT, DEFAULT_PAGE_INT); return new ResponseEntity<>(builder.getHypermedia(), HttpStatus.OK); } @GetMapping("/me") public ResponseEntity<?> retrieveMe() { Object me = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); if (me instanceof UserPrincipal) { return retrieveSpecificUser(((UserPrincipal) me).getId()); } else { throw new UnknownPrincipalException("principal of " + me.getClass() + " is unknown"); } } }
[ "kostyashtc@gmail.com" ]
kostyashtc@gmail.com
97d12b48cf204df61973f5d4276c8f5edc27f9cb
1672cea99943ab4f934068bbb0e4bc87fcfb0936
/src/main/java/pl/allegro/promo/geecon2015/domain/user/User.java
f4b3b020fb875f280bb5b487f3f80a5f6a12f0d3
[]
no_license
GregZuber/geecon2015-challenge
c6cecadf38fe9e55414192a2095f84dd3552f245
b7d0a982399fc405279611e598b33fbdc46b7616
refs/heads/master
2021-01-17T06:37:53.671187
2015-05-14T09:18:19
2015-05-14T09:18:19
35,602,569
1
0
null
2015-05-14T09:20:57
2015-05-14T09:20:57
null
UTF-8
Java
false
false
540
java
package pl.allegro.promo.geecon2015.domain.user; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; public class User { private final UUID id; private final String name; @JsonCreator public User(@JsonProperty("id") UUID id, @JsonProperty("name") String name) { this.id = id; this.name = name; } public UUID getId() { return id; } public String getName() { return name; } }
[ "adam.dubiel@allegrogroup.com" ]
adam.dubiel@allegrogroup.com
fc013a0dceb323b1fa90fe526af612a71688e5fe
9a137683c48adc054e501838e72348e9a149b584
/src/main/java/com/app/vegetable/controller/BaseController.java
f7a37e5bdb96a6863933867665869cb6b854652b
[]
no_license
princepk01/vegetable-app-server
a0752bcaa18662a9b4f613862637cf9062a43a29
70b33c3284c3fd2d33a8b6cdee6e7c6496a67f7d
refs/heads/master
2023-01-03T02:58:17.488071
2020-10-27T02:54:28
2020-10-27T02:54:28
260,649,457
0
0
null
null
null
null
UTF-8
Java
false
false
312
java
package com.app.vegetable.controller; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; @Controller public class BaseController { public ResponseEntity<?> sendResponse(ResponseMessage responseMessage) { return ResponseEntity.ok().body(responseMessage); } }
[ "princepk1001@gmail.com" ]
princepk1001@gmail.com
185c86774241c0f9ad855e01e094511b3e6a6632
7d77bccb4dc41c354daf6cd884471f2ce3a0282e
/modello-plugins/modello-plugin-java/src/test/java/org/codehaus/modello/plugin/java/AnnotationsJava4GeneratorTest.java
4169b7b9ef1f6d5687d73f57426b5f2911b5d38a
[ "MIT", "Apache-2.0" ]
permissive
elharo/modello
f2cac146eab2c98de352efeea803923148c49fa7
96d0a6a9117384d1f82e5d4c586e86cb54132171
refs/heads/master
2023-08-01T08:37:53.471786
2020-01-20T20:56:59
2020-01-20T20:56:59
241,111,471
0
0
MIT
2020-02-17T13:14:50
2020-02-17T13:14:49
null
UTF-8
Java
false
false
2,062
java
package org.codehaus.modello.plugin.java; /* * Copyright (c) 2004, Codehaus.org * * 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. */ import java.util.Properties; import org.codehaus.modello.AbstractModelloJavaGeneratorTest; import org.codehaus.modello.core.ModelloCore; import org.codehaus.modello.model.Model; /** * Check that annotations are not added to generated sources when Java 5 features are not enabled. */ public class AnnotationsJava4GeneratorTest extends AbstractModelloJavaGeneratorTest { public AnnotationsJava4GeneratorTest() { super( "annotations-java4" ); } public void testJava4GeneratorWithAnnotations() throws Throwable { ModelloCore modello = (ModelloCore) lookup( ModelloCore.ROLE ); Model model = modello.loadModel( getXmlResourceReader( "/models/annotations.mdo" ) ); Properties parameters = getModelloParameters( "1.0.0", false ); modello.generate( model, "java", parameters ); compileGeneratedSources( false ); } }
[ "hboutemy@f0865d36-f2f9-0310-a560-dfd520db29d7" ]
hboutemy@f0865d36-f2f9-0310-a560-dfd520db29d7
537ab933ae3bbe28b724c01b842a1d0b2b8efab1
1f29e3f95b29cf39b9af62ccaf40d18605e2369a
/src/main/java/kr/or/ddit/paging/model/PageVo.java
1f6fc45a2e0783eea07e0ca06e7cb0e000e7104b
[]
no_license
hanssol/spring
390fd97ca6d5a8907af11eed10b28cdf03a38815
3a81d06935e89a7b799f668b129233c9ae671aab
refs/heads/master
2022-12-09T11:12:28.229645
2019-07-08T01:36:37
2019-07-08T01:36:37
192,683,627
0
0
null
2022-11-16T12:21:29
2019-06-19T07:41:09
Java
UTF-8
Java
false
false
1,077
java
package kr.or.ddit.paging.model; public class PageVo { private int page; // 페이지 번호 private int pageSize; // 페이지당 건수 public PageVo(int page, int pageSize) { this.page = page; this.pageSize = pageSize; } public PageVo(){ } public int getPage() { return page == 0 ? 1 : page; } public void setPage(int page) { this.page = page; } public int getPageSize() { return pageSize == 0 ? 10 :pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } // 객체간 값 비교 @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + getPage(); result = prime * result + getPageSize(); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PageVo other = (PageVo) obj; if (getPage() != other.getPage()) return false; if (getPageSize() != other.getPageSize()) return false; return true; } }
[ "hansol8600@gmail.com" ]
hansol8600@gmail.com
8fdd2d32ae277b5f0adcfa85c5c870e0b458b6f9
0299b79f350bb7910621166de1b2550e334328ef
/controller/onos/common/src/main/java/thesiscode/common/tree/AbstractTreeAlgorithm.java
3daabf00f67b9e5a672be1814b3991807a2586fb
[]
no_license
kit-tm/toposync
5b6e0dda213c39a32c8d6873545a95c41d1bcdef
cfc6121fb48356f93ff4de80f739a1be7b97107a
refs/heads/master
2021-03-29T16:14:41.881365
2020-03-17T16:19:54
2020-03-17T16:19:54
247,966,657
0
0
null
2020-10-13T20:25:46
2020-03-17T12:42:07
Java
UTF-8
Java
false
false
257
java
package thesiscode.common.tree; import thesiscode.common.group.IGroupChangeListener; /** * Abstraction of an algorithm, which computes trees. */ public abstract class AbstractTreeAlgorithm extends AbstractTreeChanger implements IGroupChangeListener { }
[ "felix.bachmann@ewetel.net" ]
felix.bachmann@ewetel.net
b28b37a16750071660721c49b1f5f5be377ba5a4
a5b5e759f6c6bd4ef01b140b1596f3e94befaab7
/src/Scenes/FightScene/FightSceneController.java
406d6e8e155c1fd92227f092a9f294fcd4fd685b
[]
no_license
Tyovaish/DragonWarriorMonsters
ccbf9971f0258fdcbd371c6a85a785ad41c92c2b
80d74ed40bb8277e028f489db63a9706cbc53f30
refs/heads/master
2021-01-13T03:34:17.901871
2017-12-20T04:43:25
2017-12-20T04:43:25
77,311,840
0
0
null
2017-12-20T04:43:26
2016-12-25T05:24:27
Java
UTF-8
Java
false
false
4,717
java
package Scenes.FightScene; import Model.BattleMediator.BattleMediator; import Model.Monster.Monster; import Model.Monster.MonsterObserver; import Model.Monster.MonsterSkillLabel; import Model.Skill.Skill; import javafx.event.EventHandler; import javafx.scene.Group; import javafx.scene.control.Label; import javafx.scene.input.MouseEvent; import java.util.ArrayList; import static Scenes.FightScene.FightScene.SCENE_LENGTH; import static Scenes.FightScene.FightScene.gameboyFont; public class FightSceneController { Group fightScene=null; BattleMediator battleMediator=null; FightSceneController(FightScene fightScene,BattleMediator battleMediator){ this.fightScene=fightScene.getScene(); this.battleMediator=battleMediator; addFightMenu(); } public void addFightMenu(){ Group fightMenu=new Group(); fightMenu.setLayoutY(2*SCENE_LENGTH/3); Label fight=new Label(); fight.setText("FIGHT"); fight.setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent event) { battleMediator.autoFight(); System.out.println("Hit"); } }); fight.setFont(gameboyFont); Label command=new Label(); command.setLayoutY(SCENE_LENGTH/12); command.setText("COMMAND"); command.setFont(gameboyFont); command.setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent event) { fightScene.getChildren().remove(fightMenu); addCommandMenu(); } }); Label items=new Label(); items.setLayoutY(2*SCENE_LENGTH/12); items.setText("ITEMS"); items.setFont(gameboyFont); Label run=new Label(); run.setLayoutY(3*SCENE_LENGTH/12); run.setText("RUN"); run.setFont(gameboyFont); fightMenu.getChildren().addAll(fight,command,items,run); fightScene.getChildren().addAll(fightMenu); } public void addCommandMenu(){ ArrayList<MonsterSkillLabel> monsterSkillLabels=battleMediator.getCurrentMonsterSelected().getAllSkillLabels(); Group commandMenu=new Group(); commandMenu.setLayoutY(2*SCENE_LENGTH/3); Label monsterSelected=new Label(); monsterSelected.setText(battleMediator.getCurrentMonsterSelected().getMonsterName().getText()); monsterSelected.setFont(gameboyFont); commandMenu.getChildren().add(monsterSelected); for(int i=0;i<monsterSkillLabels.size();++i){ MonsterSkillLabel monsterSkill=monsterSkillLabels.get(i); Label monsterSkillLabel=monsterSkill.getSkillLabel(); monsterSkillLabel.setFont(gameboyFont); monsterSkillLabel.setLayoutY((i+1)*SCENE_LENGTH/12); monsterSkillLabel.setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent event) { fightScene.getChildren().remove(commandMenu); addEnemyMonsterSelection(monsterSkill.getSkill()); } }); commandMenu.getChildren().add(monsterSkillLabel); } fightScene.getChildren().addAll(commandMenu); } public void addEnemyMonsterSelection(Skill monsterSkill){ ArrayList<MonsterObserver> enemyMonsters=battleMediator.getEnemyMonsterObservers(); Group enemyMonsterNameGroup=new Group(); enemyMonsterNameGroup.setLayoutY(2*SCENE_LENGTH/3); for(int i=0;i<enemyMonsters.size();i++){ MonsterObserver enemyMonster=enemyMonsters.get(i); Label enemyMonsterName=enemyMonster.getMonsterName(); enemyMonsterName.setFont(gameboyFont); enemyMonsterName.setOnMouseClicked(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent event) { fightScene.getChildren().remove(enemyMonsterNameGroup); battleMediator.addPlayerMonsterTurn(enemyMonster,monsterSkill); battleMediator.nextPlayerMonster(); if(battleMediator.lastMonsterToOrder()){ addDisplayMonsterTurns; battleMediator.resetMonsterToOrder(); } else { addCommandMenu(); } } }); enemyMonsterName.setLayoutY(i*SCENE_LENGTH/9); enemyMonsterNameGroup.getChildren().add(enemyMonsterName); } fightScene.getChildren().add(enemyMonsterNameGroup); } }
[ "tyovaish13@gmail.com" ]
tyovaish13@gmail.com
4c0816282a9dd534b765c1e63ce9f9e6946ad0fa
8a3b0182024d568a7aa4af8c428399c691471b2b
/src/com/mrapocalypse/screwdshop/frags/PieTargets.java
c83b997a073726de5645d1e34d0826344d6853b6
[]
no_license
ScrewdAOSP/packages_apps_ScrewShop
1f01d3a0547d4a33eaaf238ddbd30aaeea581228
82380d744efa9fd506a9f6898c8b5e15788ede7a
refs/heads/n7x
2020-04-05T22:45:28.180051
2017-08-02T07:26:10
2017-08-10T22:17:07
61,762,728
2
21
null
2016-12-28T17:19:34
2016-06-23T01:18:23
Java
UTF-8
Java
false
false
5,824
java
/* * Copyright (C) 2010-2015 ParanoidAndroid Project * Portions Copyright (C) 2015 Fusion & CyanideL Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.mrapocalypse.screwdshop.frags; import android.app.Activity; import android.content.ContentResolver; import android.content.res.Resources; import android.content.Context; import android.os.Bundle; import android.support.v7.preference.PreferenceScreen; import android.support.v7.preference.ListPreference; import android.support.v14.preference.SwitchPreference; import android.support.v7.preference.Preference; import android.support.v7.preference.Preference.OnPreferenceChangeListener; import android.provider.Settings; import android.provider.Settings.SettingNotFoundException; import android.util.Log; import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.settings.R; import com.android.settings.SettingsPreferenceFragment; public class PieTargets extends SettingsPreferenceFragment implements OnPreferenceChangeListener { private static final String PA_PIE_MENU = "pa_pie_menu"; private static final String PA_PIE_LASTAPP = "pa_pie_lastapp"; private static final String PA_PIE_KILLTASK = "pa_pie_killtask"; private static final String PA_PIE_NOTIFICATIONS = "pa_pie_notifications"; private static final String PA_PIE_SETTINGS_PANEL = "pa_pie_settings_panel"; private static final String PA_PIE_SCREENSHOT = "pa_pie_screenshot"; private SwitchPreference mPieMenu; private SwitchPreference mPieLastApp; private SwitchPreference mPieKillTask; private SwitchPreference mPieNotifications; private SwitchPreference mPieQsPanel; private SwitchPreference mPieScreenshot; private ContentResolver mResolver; @Override protected int getMetricsCategory() { return MetricsEvent.SCREWD; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Load the preferences from an XML resource addPreferencesFromResource(R.xml.pa_pie_targets); PreferenceScreen prefSet = getPreferenceScreen(); Context context = getActivity(); mResolver = context.getContentResolver(); mPieMenu = (SwitchPreference) prefSet.findPreference(PA_PIE_MENU); mPieMenu.setChecked(Settings.System.getInt(mResolver, Settings.System.PA_PIE_MENU, 0) != 0); mPieLastApp = (SwitchPreference) prefSet.findPreference(PA_PIE_LASTAPP); mPieLastApp.setChecked(Settings.System.getInt(mResolver, Settings.System.PA_PIE_LAST_APP, 0) != 0); mPieKillTask = (SwitchPreference) prefSet.findPreference(PA_PIE_KILLTASK); mPieKillTask.setChecked(Settings.System.getInt(mResolver, Settings.System.PA_PIE_KILL_TASK, 0) != 0); mPieNotifications = (SwitchPreference) prefSet.findPreference(PA_PIE_NOTIFICATIONS); mPieNotifications.setChecked(Settings.System.getInt(mResolver, Settings.System.PA_PIE_NOTIFICATIONS, 0) != 0); mPieQsPanel = (SwitchPreference) prefSet.findPreference(PA_PIE_SETTINGS_PANEL); mPieQsPanel.setChecked(Settings.System.getInt(mResolver, Settings.System.PA_PIE_SETTINGS_PANEL, 0) != 0); mPieScreenshot = (SwitchPreference) prefSet.findPreference(PA_PIE_SCREENSHOT); mPieScreenshot.setChecked(Settings.System.getInt(mResolver, Settings.System.PA_PIE_SCREENSHOT, 0) != 0); } @Override public boolean onPreferenceTreeClick(Preference preference) { if (preference == mPieMenu) { Settings.System.putInt(getActivity().getApplicationContext().getContentResolver(), Settings.System.PA_PIE_MENU, mPieMenu.isChecked() ? 1 : 0); } else if (preference == mPieLastApp) { Settings.System.putInt(getActivity().getApplicationContext().getContentResolver(), Settings.System.PA_PIE_LAST_APP, mPieLastApp.isChecked() ? 1 : 0); } else if (preference == mPieKillTask) { Settings.System.putInt(getActivity().getApplicationContext().getContentResolver(), Settings.System.PA_PIE_KILL_TASK, mPieKillTask.isChecked() ? 1 : 0); } else if (preference == mPieNotifications) { Settings.System.putInt(getActivity().getApplicationContext().getContentResolver(), Settings.System.PA_PIE_NOTIFICATIONS, mPieNotifications.isChecked() ? 1 : 0); } else if (preference == mPieQsPanel) { Settings.System.putInt(getActivity().getApplicationContext().getContentResolver(), Settings.System.PA_PIE_SETTINGS_PANEL, mPieQsPanel.isChecked() ? 1 : 0); } else if (preference == mPieScreenshot) { Settings.System.putInt(getActivity().getApplicationContext().getContentResolver(), Settings.System.PA_PIE_SCREENSHOT, mPieScreenshot.isChecked() ? 1 : 0); } return super.onPreferenceTreeClick(preference); } @Override public boolean onPreferenceChange(Preference preference, Object newValue) { return false; } }
[ "ensabahnur16@gmail.com" ]
ensabahnur16@gmail.com
cf0ac35efa1273a63eac1c5b9b5abbbbdc746b25
806718fb1a3104319205e8ab4bbfd48010dd263e
/src/main/java/com/inova/banheirolimpo/exception/ExceptionHandlerController.java
b758de74802a48104d8142943e875555193533f8
[]
no_license
markussouza/banheirolimpo-service
f5541c4ebc136714dfe8192f52619f21b16572db
34650daa7466c2016314c2546c9abc7104c5ed7f
refs/heads/master
2020-03-10T01:33:43.247303
2018-05-02T19:33:41
2018-05-02T19:33:41
129,113,019
0
0
null
null
null
null
UTF-8
Java
false
false
1,108
java
/** * */ package com.inova.banheirolimpo.exception; import java.util.stream.Collectors; import javax.validation.ConstraintViolationException; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; /** * @author Markus Souza on 06/02/2018 * * Essa controller será responsável por interceptar e tratar as exceções lançadas pela aplicação. * */ @ControllerAdvice public class ExceptionHandlerController { @ExceptionHandler(ConstraintViolationException.class) public ResponseEntity<?> validateError(ConstraintViolationException ex){ return ResponseEntity.badRequest().body(ex.getConstraintViolations().stream().map(cv -> cv.getMessage()).collect(Collectors.toList())); } @ExceptionHandler(Exception.class) public ResponseEntity<?> otherErrors(Exception ex){ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(ex.getMessage()); } }
[ "markus.souza@gmail.com" ]
markus.souza@gmail.com
ae1fbc74f191a77bad6804fa2059f0076747d2d3
aa156ad1c988edd51db23429522943d268eb3289
/src/app/FXMain.java
f02664ced48c1eeca22cb072cc8bfb6b7342843f
[]
no_license
guiller1712/Sample
2e308515fd54fe57789926fe670eebd6a625c2ca
0a2fc91494a190879128a33e07d1ace782274724
refs/heads/master
2021-01-19T22:27:05.154282
2017-04-20T03:47:26
2017-04-20T03:47:26
88,818,295
0
0
null
null
null
null
UTF-8
Java
false
false
1,050
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 app; import java.io.IOException; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; import javafx.stage.Stage; /** * * @author guill */ public class FXMain extends Application { @Override public void start(Stage stage) throws IOException { Parent root = FXMLLoader.load(getClass().getResource("login/loginView.fxml")); Scene scene = new Scene(root); stage.setTitle("Sample Login"); stage.setScene(scene); stage.show(); } /** * @param args the command line arguments */ public static void main(String[] args) { launch(args); } }
[ "guillermo.exemur@gmail.com" ]
guillermo.exemur@gmail.com
bd466bdf7242861688bf0bd15462b03edfc8ea77
3ffb212d8752fa08508d863e4e195a7a86cabf23
/src/main/java/com/example/demo/appuser/AppUserService.java
67319e7f97d9b2287514557b6832bd710f66fac3
[]
no_license
nikkukn/Java-Login
4af51fc5b3753294543ccca62fbcc92b7b80a420
5e473a1c79b335cb063243f1b0575614e1f687d5
refs/heads/main
2023-06-23T08:42:54.032346
2021-07-05T23:16:11
2021-07-05T23:16:11
383,385,353
1
0
null
2021-07-06T07:50:35
2021-07-06T07:50:34
null
UTF-8
Java
false
false
529
java
package com.example.demo.appuser; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; @Service public class AppUserService implements UserDetailsService { private final AppUser @Override public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException { return null; } }
[ "cazasergio96@gmail.com" ]
cazasergio96@gmail.com
007252233f6d9a40f56311a0f71e99fc740dd7f1
283afef1a8dfab5385ebe846d9c845aac19c108a
/src/main/java/com/example/algamoney/api/model/Endereco.java
78bfd3476881d48eba70dd0577824a2778553926
[]
no_license
joaoPBessa/algamoney-api
18c08b34c2f532bc19882ac7bc8dd6b8260f9157
411ee95f89a18cec4969efc3426bac386caead45
refs/heads/main
2023-07-26T11:01:44.190005
2021-09-07T16:04:53
2021-09-07T16:04:53
389,465,311
0
0
null
null
null
null
UTF-8
Java
false
false
1,145
java
package com.example.algamoney.api.model; import javax.persistence.Embeddable; @Embeddable public class Endereco { private String logradouro; private String numero; private String complemento; private String bairro; private String cep; private String cidade; private String estado; public String getLogradouro() { return logradouro; } public void setLogradouro(String logradouro) { this.logradouro = logradouro; } public String getNumero() { return numero; } public void setNumero(String numero) { this.numero = numero; } public String getComplemento() { return complemento; } public void setComplemento(String complemento) { this.complemento = complemento; } public String getBairro() { return bairro; } public void setBairro(String bairro) { this.bairro = bairro; } public String getCep() { return cep; } public void setCep(String cep) { this.cep = cep; } public String getCidade() { return cidade; } public void setCidade(String cidade) { this.cidade = cidade; } public String getEstado() { return estado; } public void setEstado(String estado) { this.estado = estado; } }
[ "joao.bessa.12@gmail.com" ]
joao.bessa.12@gmail.com
a8613ea273fd1af242f9bb8c35e78465650ad16c
319eaae6d6251b02f8fbccba13bf72559171e2b6
/SRS13_JavaCode/src/srs13_demo/Photo.java
6833652da945fe424d8993d0cbdab11db99da135
[]
no_license
aligad1999/TestGit
d60907e2d6abc290cf0ad8e7f19dad83e4e2c4e7
ccd1eaf06514601ec767b2d84b4abb28bf773ef1
refs/heads/master
2020-12-01T12:44:24.408257
2019-12-28T16:17:01
2019-12-28T16:17:01
230,629,673
0
0
null
2019-12-28T15:44:59
2019-12-28T15:44:58
null
UTF-8
Java
false
false
701
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 srs13_demo; public class Photo implements Iphoto{ Double photoSize; String photoName; Enum photoType; int photoID; public void deletePhoto() { } public void addPhoto() { } public boolean searchPhoto() { return true; } public void viewPhoto(int photoID) { } @Override public void display() { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } }
[ "aligad204@gmail.com" ]
aligad204@gmail.com
ad98999e7a59d8c98f70e6d07d4ce56dcb88ce54
4efe026019cdb9ff26fdfe998f44417486000403
/src/ch06/CarTest.java
0348dfabeae353197717eba86986a7e62edd762c
[]
no_license
cooo23/JIYOO
bb8d8f3c488f05a48d38150c9f5d3c66b3d451b6
df4ae8da95197be528f0f0cdb5f255b6b3932bc8
refs/heads/master
2023-08-27T14:34:35.692820
2021-10-06T07:38:34
2021-10-06T07:38:34
411,529,002
0
0
null
null
null
null
UTF-8
Java
false
false
949
java
package ch06; public class CarTest { public static void main(String[] args) { String car2 = new String(""); Car car = new Car(); //new 라는 클래스 없이 객체화 불가능 new 뒤에 객체화하고 싶은 클래스 안에 있는 메소드 // 클래스의 변수 = new 클래스 car.brand = "현대"; car.nm = "소나타"; car.drive(); car.stop(); Car car3 = new Car(); // 클래스 변수 = car3.brand = "기아"; car3.nm = "K5"; car3.drive(); car3.stop(); Car car4 = new Car(); car.brand = "현대"; car.nm = "소나타"; car.drive(); car.stop(); System.out.println(car == car3); //false 둘 다 새로 만들었기 때문에 다른 주소값 System.out.println(car == car4); //false 값이 같아도 새로만들었기 때문에 주소값이 달라 false } }
[ "cooo23@naver.com" ]
cooo23@naver.com
942fccfdfce8d2d72207ab61cb40c6f368c457ac
b98322ed93d2d8c5e7362b0db471b5109c0b11e8
/app/src/main/java/com/example/ahsan/popularmovies/model/details/SpokenLanguage.java
924894d6d5549ef87873909b52a249dd0c6aebf7
[]
no_license
a2ashraf/popularmovies
a7fdce8e135122abe4ce79f337ef474ec3bf26d4
987fc699e43df1b9ba05f2c0defe09efc1720efd
refs/heads/master
2021-04-29T10:33:52.834027
2017-07-04T03:40:20
2017-07-04T03:40:20
77,638,250
0
0
null
null
null
null
UTF-8
Java
false
false
602
java
package com.example.ahsan.popularmovies.model.details; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class SpokenLanguage { @SerializedName("iso_639_1") @Expose private String iso6391; @SerializedName("name") @Expose private String name; public String getIso6391() { return iso6391; } public void setIso6391(String iso6391) { this.iso6391 = iso6391; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "a2ashraf@gmail.com" ]
a2ashraf@gmail.com
6cb645e937d70cb9458e7c8322bbef0b9079f6b8
76875917925793ea446a1b1536606633a3272653
/evo-springboot-annotation/src/main/java/com/tazine/evo/annotation/conditional/spring/LinuxListService.java
d538a5545fdc0f84699e48769aa4fbe026758a15
[ "MIT" ]
permissive
BookFrank/EVO-World
01555355c434fac65406e158ffa5f7aebf3ff7dc
3d27ae414f0281668024838a4c64db4bdd4a6377
refs/heads/master
2022-06-22T05:56:43.648597
2020-05-05T15:44:32
2020-05-05T15:44:32
147,456,884
1
1
MIT
2022-06-21T02:58:35
2018-09-05T03:54:10
Java
UTF-8
Java
false
false
276
java
package com.tazine.evo.annotation.conditional.spring; /** * Linux 下所要创建的 Bean 的类 * * @author frank * @date 2018/09/26 */ public class LinuxListService implements ListFileService { @Override public String showList() { return "ls"; } }
[ "bookfrank@foxmail.com" ]
bookfrank@foxmail.com
bcdac3dbbc1d340393a40c51ab7d5c43fabd2321
34521988c1e8bbc8a4bf81f7d82b69eee4edd8db
/Exercise4/src/Exercise4_5/Mango.java
9dd7015d1223c1e93a509f05d4ef8e2995a34bf5
[]
no_license
YongBoonKeat/Exercise4
b00e66339e7db11bbb815fb3e6e0ee235b0205b7
a43ca0ff54e01b07f64cbe04eb08c209b17bba2e
refs/heads/master
2023-04-28T02:18:55.692193
2021-05-19T05:32:28
2021-05-19T05:32:28
322,176,966
0
0
null
null
null
null
UTF-8
Java
false
false
2,007
java
package Exercise4_5; public class Mango extends Fruit{ private int quantity; private double price; public Mango(String name,int Q,double P) {//Constructor with argument super(name); this.quantity = Q; this.price = P; //System.out.println(name + " constructor is invoked"); if (this.quantity <= 10) { totalPrice(); //overloading with no arguments because price is same System.out.println(name); System.out.println("Quantity\t: " + this.quantity); System.out.println("Price\t: RM" + this.price); System.out.println("If quantity LESS than 10, Total price: RM" + totalPrice()); } else if (this.quantity > 10 && this.quantity <= 100) { System.out.println(name); double pp = 3.2; // Buy more than 10 but less than 100, price is RM3.2 totalPrice(pp); //overloading with 1 argument System.out.println("Quantity\t: " + this.quantity); System.out.println("If quantity MORE than 10, Get More Cheaper Price!"); System.out.println("Price\t\t: RM" + pp); System.out.println("Total price\t: RM" + totalPrice(pp)); } else { System.out.println(name); double pp = 3; //Buy more than 100, price is RM3 double dis; Discount M = new MangoDiscount(); dis = M.discountRate();//Buy more than 100, get discount; totalPrice(pp, dis); //overloading with 2 arguments System.out.println("Quantity\t: " + this.quantity); System.out.println("If quantity MORE than 100, Get More Cheaper Price and Special Discount!"); System.out.println("Price\t\t: RM" + pp); System.out.println("Special Discount: " + (dis*100)+"%"); System.out.println("Total price\t: RM" + totalPrice(pp,dis)); } } public double totalPrice() {//overloading method return this.price * this.quantity; } public double totalPrice(double pp) {//overloading method return pp * this.quantity; } public double totalPrice(double pp, double dis) {//overloading method return pp * this.quantity* (1-dis); } }
[ "LEGION@LAPTOP-DHOK1Q7Q" ]
LEGION@LAPTOP-DHOK1Q7Q
75e1e8ebea05005b2b67b19817447289caf9cf25
c1ef27859aa920c506a13c853596d1f26dbbf94f
/src/main/java/fxml/Affich_domainesController.java
9a4bb5ad0860a72d109140a79566e5ce7f41b6a1
[]
no_license
houssemyahia/SmartStartJAVA
15ca2b5b5a5fe3238cefb628f0a6cafd71f97b3b
b83554271ecb50871dce1086145db8a84f065d5f
refs/heads/master
2023-01-02T19:01:06.675744
2020-01-15T10:40:20
2020-01-15T10:40:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,148
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 fxml; import fxml.*; import com.jfoenix.controls.JFXTextField; import entities.Domaine; import entities.Formation; import entities.Session; import java.io.IOException; import java.net.URL; import java.sql.SQLException; import java.util.List; import java.util.ResourceBundle; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; import javafx.scene.Parent; import javafx.scene.control.Alert; import javafx.scene.control.Button; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import javafx.scene.control.cell.PropertyValueFactory; import javafx.scene.layout.AnchorPane; import services.DomaineService; /** * FXML Controller class * * @author lenovo */ public class Affich_domainesController implements Initializable { @FXML private AnchorPane pane_domaine; @FXML private TableView<Domaine> tab_domaine; private TableColumn<Domaine, Integer> id_domaine_cln; @FXML private TableColumn<Domaine, String> nom_domaine_cln; @FXML private JFXTextField domaine_txt; @FXML private Button btn_ajouter_domaine; /** * Initializes the controller class. */ DomaineService ds = new DomaineService(); @FXML private AnchorPane majdi; @FXML private Button btn_retour_action; @Override public void initialize(URL url, ResourceBundle rb) { Domaine i = new Domaine(); ObservableList<Domaine> data2 = FXCollections.observableArrayList(); List<Domaine> domaines = ds.affichercategories(); data2= FXCollections.observableArrayList(domaines); nom_domaine_cln.setCellValueFactory(new PropertyValueFactory<Domaine,String>("nom_domaine")); tab_domaine.setItems(data2); } @FXML private void ajouter_domaine_action(ActionEvent event) throws SQLException, IOException { Domaine d = new Domaine(domaine_txt.getText()); ds.creerDomaine(d); Alert alert = new Alert(Alert.AlertType.INFORMATION); alert.setTitle("Information Dialog"); alert.setHeaderText(null); alert.setContentText("Domaine insérée avec succés!"); alert.show(); Parent root=(AnchorPane) FXMLLoader.load(getClass().getResource("/fxml/affich_domaines.fxml")); majdi.getChildren().clear(); majdi.getChildren().add(root); } @FXML private void retour_domaine_action(ActionEvent event) throws IOException { Parent root=(AnchorPane) FXMLLoader.load(getClass().getResource("/fxml/affich_mes_formation.fxml")); majdi.getChildren().clear(); majdi.getChildren().add(root); } }
[ "racem.cherni@esprit.tn" ]
racem.cherni@esprit.tn
de7aca1c4e3ae10f151ff325364c8e38cc3322d6
445fd967984e788a95e45926da840e6bde85940e
/src/com/itnear/principle/demeter/Course.java
4525849887435c6b80cd8682244f22f1b9379717
[]
no_license
NearAJC/DesignPattern
81121584a047e5c3d6fe480db48d26a708194af2
a02bc4694f9209d0d77c084aefb0611475555fac
refs/heads/master
2021-01-08T04:59:47.190742
2020-02-20T15:48:51
2020-02-20T15:48:52
241,919,858
0
0
null
null
null
null
UTF-8
Java
false
false
135
java
package com.itnear.principle.demeter; /** * 描述:课程类 * 作者:NearJC * 时间:2020/02/16 */ public class Course { }
[ "2234108557@qq.com" ]
2234108557@qq.com
233cc915b691a8a470f2a304997c57341153ecd3
56320ce0c5d583c3fb21a5f66381760fe24bdc90
/app/src/main/java/com/migue/zeus/expensesnotes/ui/add_expense_or_income_activity/AddAccountEntryContract.java
d138f8c6423d2e33d51fa3f0c824b5b259027816
[]
no_license
MigueArcos/Expenses-Notes
b34e74dd55bfefdf67726d4e5dc559ccda25468d
4fb2ef538b7ba0065c00ddb5912fb3c0fbc41abd
refs/heads/master
2020-05-04T04:53:15.004318
2019-05-14T23:03:26
2019-05-14T23:03:26
178,975,814
0
0
null
null
null
null
UTF-8
Java
false
false
1,770
java
package com.migue.zeus.expensesnotes.ui.add_expense_or_income_activity; import com.migue.zeus.expensesnotes.data.models.Account; import com.migue.zeus.expensesnotes.data.models.AccountEntry; import com.migue.zeus.expensesnotes.data.models.AccountEntryCategory; import com.migue.zeus.expensesnotes.data.models.AccountEntryDetail; import com.migue.zeus.expensesnotes.data.models.AccountEntryWithDetails; import java.util.List; public class AddAccountEntryContract { interface View{ void showCategories(List<AccountEntryCategory> accountEntryCategories); void showAccounts(List<Account> accounts); void showTitle(String title); void showDate(String date); void notifyAccountEntryCreated(long id); } interface Model { List<Account> getAccounts(); List<AccountEntryCategory> getAccountEntriesCategories(boolean isExpense); String getAccountEntryTitle(AccountEntry accountEntry); String getAccountEntryDate(AccountEntry accountEntry); String getAccountEntryDate(); long createAccountEntry(String name, String date, long expenseCategoryId, List<AccountEntryDetail> details, boolean isExpense); void updateAccountEntry(AccountEntryWithDetails accountEntryWithDetails); } interface Presenter{ void getAccounts(); void getAccountEntryCategories(boolean isExpense); void getAccountEntryTitle(AccountEntry accountEntry); void getAccountEntryDate(AccountEntry accountEntry); void getAccountEntryDate(); void createAccountEntry(String name, String date, long expenseCategoryId, List<AccountEntryDetail> details, boolean isExpense); void updateAccountEntry(AccountEntryWithDetails accountEntryWithDetails); } }
[ "=" ]
=
4b189051c542404fe0b3dbfc9d9ebeb86711d20f
f6dfb92a53472bd6980dc3cd4bb44bb5c4e9437d
/apps/Gallery2/src/com/android/gallery3d/app/GalleryActivity.java
5149619e334a67333165e784e96943105c196f1a
[]
no_license
tuxafgmur/DhollmenK_packages
5d52da8ba58c60b7f4a0e92bf7b8818bba724d26
9a11d8225f07353ce3711f9e326b18e28c453fa5
refs/heads/master
2020-12-31T07:54:45.423581
2015-06-18T00:09:23
2015-06-18T00:09:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,447
java
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.gallery3d.app; import android.app.Dialog; import android.content.ContentResolver; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.InputDevice; import android.view.MotionEvent; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.Toast; import com.android.gallery3d.R; import com.android.gallery3d.common.Utils; import com.android.gallery3d.data.DataManager; import com.android.gallery3d.data.MediaItem; import com.android.gallery3d.data.MediaSet; import com.android.gallery3d.data.Path; import com.android.gallery3d.picasasource.PicasaSource; import com.android.gallery3d.util.GalleryUtils; public final class GalleryActivity extends AbstractGalleryActivity implements OnCancelListener { public static final String EXTRA_SLIDESHOW = "slideshow"; public static final String EXTRA_DREAM = "dream"; public static final String EXTRA_CROP = "crop"; public static final String ACTION_REVIEW = "com.android.camera.action.REVIEW"; public static final String KEY_GET_CONTENT = "get-content"; public static final String KEY_GET_ALBUM = "get-album"; public static final String KEY_TYPE_BITS = "type-bits"; public static final String KEY_MEDIA_TYPES = "mediaTypes"; public static final String KEY_DISMISS_KEYGUARD = "dismiss-keyguard"; private static final String TAG = "GalleryActivity"; private Dialog mVersionCheckDialog; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_ACTION_BAR); requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY); if (getIntent().getBooleanExtra(KEY_DISMISS_KEYGUARD, false)) { getWindow().addFlags( WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD); } setContentView(R.layout.main); if (savedInstanceState != null) { getStateManager().restoreFromState(savedInstanceState); } else { initializeByIntent(); } } private void initializeByIntent() { Intent intent = getIntent(); String action = intent.getAction(); if (Intent.ACTION_GET_CONTENT.equalsIgnoreCase(action)) { startGetContent(intent); } else if (Intent.ACTION_PICK.equalsIgnoreCase(action)) { // We do NOT really support the PICK intent. Handle it as // the GET_CONTENT. However, we need to translate the type // in the intent here. String type = Utils.ensureNotNull(intent.getType()); if (type.startsWith("vnd.android.cursor.dir/")) { if (type.endsWith("/image")) intent.setType("image/*"); if (type.endsWith("/video")) intent.setType("video/*"); } startGetContent(intent); } else if (Intent.ACTION_VIEW.equalsIgnoreCase(action) || ACTION_REVIEW.equalsIgnoreCase(action)){ startViewAction(intent); } else { startDefaultPage(); } } public void startDefaultPage() { PicasaSource.showSignInReminder(this); Bundle data = new Bundle(); data.putString(AlbumSetPage.KEY_MEDIA_PATH, getDataManager().getTopSetPath(DataManager.INCLUDE_ALL)); getStateManager().startState(AlbumSetPage.class, data); mVersionCheckDialog = PicasaSource.getVersionCheckDialog(this); if (mVersionCheckDialog != null) { mVersionCheckDialog.setOnCancelListener(this); } } private void startGetContent(Intent intent) { Bundle data = intent.getExtras() != null ? new Bundle(intent.getExtras()) : new Bundle(); data.putBoolean(KEY_GET_CONTENT, true); int typeBits = GalleryUtils.determineTypeBits(this, intent); data.putInt(KEY_TYPE_BITS, typeBits); data.putString(AlbumSetPage.KEY_MEDIA_PATH, getDataManager().getTopSetPath(typeBits)); getStateManager().startState(AlbumSetPage.class, data); } private String getContentType(Intent intent) { String type = intent.getType(); if (type != null) { return GalleryUtils.MIME_TYPE_PANORAMA360.equals(type) ? MediaItem.MIME_TYPE_JPEG : type; } Uri uri = intent.getData(); try { return getContentResolver().getType(uri); } catch (Throwable t) { Log.w(TAG, "get type fail", t); return null; } } private void startViewAction(Intent intent) { Boolean slideshow = intent.getBooleanExtra(EXTRA_SLIDESHOW, false); if (slideshow) { getActionBar().hide(); DataManager manager = getDataManager(); Path path = manager.findPathByUri(intent.getData(), intent.getType()); if (path == null || manager.getMediaObject(path) instanceof MediaItem) { path = Path.fromString( manager.getTopSetPath(DataManager.INCLUDE_IMAGE)); } Bundle data = new Bundle(); data.putString(SlideshowPage.KEY_SET_PATH, path.toString()); data.putBoolean(SlideshowPage.KEY_RANDOM_ORDER, true); data.putBoolean(SlideshowPage.KEY_REPEAT, true); if (intent.getBooleanExtra(EXTRA_DREAM, false)) { data.putBoolean(SlideshowPage.KEY_DREAM, true); } getStateManager().startState(SlideshowPage.class, data); } else { Bundle data = new Bundle(); DataManager dm = getDataManager(); Uri uri = intent.getData(); String contentType = getContentType(intent); if (contentType == null) { Toast.makeText(this, R.string.no_such_item, Toast.LENGTH_LONG).show(); finish(); return; } if (uri == null) { int typeBits = GalleryUtils.determineTypeBits(this, intent); data.putInt(KEY_TYPE_BITS, typeBits); data.putString(AlbumSetPage.KEY_MEDIA_PATH, getDataManager().getTopSetPath(typeBits)); getStateManager().startState(AlbumSetPage.class, data); } else if (contentType.startsWith( ContentResolver.CURSOR_DIR_BASE_TYPE)) { int mediaType = intent.getIntExtra(KEY_MEDIA_TYPES, 0); if (mediaType != 0) { uri = uri.buildUpon().appendQueryParameter( KEY_MEDIA_TYPES, String.valueOf(mediaType)) .build(); } Path setPath = dm.findPathByUri(uri, null); MediaSet mediaSet = null; if (setPath != null) { mediaSet = (MediaSet) dm.getMediaObject(setPath); } if (mediaSet != null) { if (mediaSet.isLeafAlbum()) { data.putString(AlbumPage.KEY_MEDIA_PATH, setPath.toString()); data.putString(AlbumPage.KEY_PARENT_MEDIA_PATH, dm.getTopSetPath(DataManager.INCLUDE_ALL)); getStateManager().startState(AlbumPage.class, data); } else { data.putString(AlbumSetPage.KEY_MEDIA_PATH, setPath.toString()); getStateManager().startState(AlbumSetPage.class, data); } } else { startDefaultPage(); } } else { Path itemPath = dm.findPathByUri(uri, contentType); Path albumPath = dm.getDefaultSetOf(itemPath); data.putString(PhotoPage.KEY_MEDIA_ITEM_PATH, itemPath.toString()); data.putBoolean(PhotoPage.KEY_READONLY, true); // TODO: Make the parameter "SingleItemOnly" public so other // activities can reference it. boolean singleItemOnly = (albumPath == null) || intent.getBooleanExtra("SingleItemOnly", false); if (!singleItemOnly) { data.putString(PhotoPage.KEY_MEDIA_SET_PATH, albumPath.toString()); // when FLAG_ACTIVITY_NEW_TASK is set, (e.g. when intent is fired // from notification), back button should behave the same as up button // rather than taking users back to the home screen if (intent.getBooleanExtra(PhotoPage.KEY_TREAT_BACK_AS_UP, false) || ((intent.getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK) != 0)) { data.putBoolean(PhotoPage.KEY_TREAT_BACK_AS_UP, true); } } getStateManager().startState(SinglePhotoPage.class, data); } } } @Override protected void onResume() { Utils.assertTrue(getStateManager().getStateCount() > 0); super.onResume(); if (mVersionCheckDialog != null) { mVersionCheckDialog.show(); } } @Override protected void onPause() { super.onPause(); if (mVersionCheckDialog != null) { mVersionCheckDialog.dismiss(); } } @Override public void onCancel(DialogInterface dialog) { if (dialog == mVersionCheckDialog) { mVersionCheckDialog = null; } } @Override public boolean onGenericMotionEvent(MotionEvent event) { final boolean isTouchPad = (event.getSource() & InputDevice.SOURCE_CLASS_POSITION) != 0; if (isTouchPad) { float maxX = event.getDevice().getMotionRange(MotionEvent.AXIS_X).getMax(); float maxY = event.getDevice().getMotionRange(MotionEvent.AXIS_Y).getMax(); View decor = getWindow().getDecorView(); float scaleX = decor.getWidth() / maxX; float scaleY = decor.getHeight() / maxY; float x = event.getX() * scaleX; //x = decor.getWidth() - x; // invert x float y = event.getY() * scaleY; //y = decor.getHeight() - y; // invert y MotionEvent touchEvent = MotionEvent.obtain(event.getDownTime(), event.getEventTime(), event.getAction(), x, y, event.getMetaState()); return dispatchTouchEvent(touchEvent); } return super.onGenericMotionEvent(event); } }
[ "usuario@localhost.localdomain" ]
usuario@localhost.localdomain
e71c4d90059770725a08158058f546659256ba31
80b60aea637d5c55f827fd66d63147d6a963959c
/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/android/support/graphics/drawable/R.java
17c0af7112ecb88e85b5928e43dbef38b50f47b6
[]
no_license
Rishabh96M/Word-Timer
783b9908e62440575970677d64df2deebf7f5f88
c4d07a4ca585ddd4de58c0ddce0af6ae04cd3b82
refs/heads/master
2023-05-09T15:49:48.121835
2021-05-30T11:42:56
2021-05-30T11:42:56
372,183,757
0
0
null
null
null
null
UTF-8
Java
false
false
8,261
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package android.support.graphics.drawable; public final class R { private R() {} public static final class attr { private attr() {} public static final int font = 0x7f020078; public static final int fontProviderAuthority = 0x7f02007a; public static final int fontProviderCerts = 0x7f02007b; public static final int fontProviderFetchStrategy = 0x7f02007c; public static final int fontProviderFetchTimeout = 0x7f02007d; public static final int fontProviderPackage = 0x7f02007e; public static final int fontProviderQuery = 0x7f02007f; public static final int fontStyle = 0x7f020080; public static final int fontWeight = 0x7f020081; } public static final class bool { private bool() {} public static final int abc_action_bar_embed_tabs = 0x7f030000; } public static final class color { private color() {} public static final int notification_action_color_filter = 0x7f04003f; public static final int notification_icon_bg_color = 0x7f040040; public static final int ripple_material_light = 0x7f04004a; public static final int secondary_text_default_material_light = 0x7f04004c; } public static final class dimen { private dimen() {} public static final int compat_button_inset_horizontal_material = 0x7f05004b; public static final int compat_button_inset_vertical_material = 0x7f05004c; public static final int compat_button_padding_horizontal_material = 0x7f05004d; public static final int compat_button_padding_vertical_material = 0x7f05004e; public static final int compat_control_corner_material = 0x7f05004f; public static final int notification_action_icon_size = 0x7f050059; public static final int notification_action_text_size = 0x7f05005a; public static final int notification_big_circle_margin = 0x7f05005b; public static final int notification_content_margin_start = 0x7f05005c; public static final int notification_large_icon_height = 0x7f05005d; public static final int notification_large_icon_width = 0x7f05005e; public static final int notification_main_column_padding_top = 0x7f05005f; public static final int notification_media_narrow_margin = 0x7f050060; public static final int notification_right_icon_size = 0x7f050061; public static final int notification_right_side_padding_top = 0x7f050062; public static final int notification_small_icon_background_padding = 0x7f050063; public static final int notification_small_icon_size_as_large = 0x7f050064; public static final int notification_subtext_size = 0x7f050065; public static final int notification_top_pad = 0x7f050066; public static final int notification_top_pad_large_text = 0x7f050067; } public static final class drawable { private drawable() {} public static final int notification_action_background = 0x7f06005e; public static final int notification_bg = 0x7f06005f; public static final int notification_bg_low = 0x7f060060; public static final int notification_bg_low_normal = 0x7f060061; public static final int notification_bg_low_pressed = 0x7f060062; public static final int notification_bg_normal = 0x7f060063; public static final int notification_bg_normal_pressed = 0x7f060064; public static final int notification_icon_background = 0x7f060065; public static final int notification_template_icon_bg = 0x7f060066; public static final int notification_template_icon_low_bg = 0x7f060067; public static final int notification_tile_bg = 0x7f060068; public static final int notify_panel_notification_icon_bg = 0x7f060069; } public static final class id { private id() {} public static final int action_container = 0x7f07000e; public static final int action_divider = 0x7f070010; public static final int action_image = 0x7f070011; public static final int action_text = 0x7f070017; public static final int actions = 0x7f070018; public static final int async = 0x7f07001f; public static final int blocking = 0x7f070024; public static final int chronometer = 0x7f07002d; public static final int forever = 0x7f070044; public static final int icon = 0x7f07004e; public static final int icon_group = 0x7f07004f; public static final int info = 0x7f070053; public static final int italic = 0x7f070055; public static final int line1 = 0x7f070058; public static final int line3 = 0x7f070059; public static final int normal = 0x7f070062; public static final int notification_background = 0x7f070063; public static final int notification_main_column = 0x7f070064; public static final int notification_main_column_container = 0x7f070065; public static final int right_icon = 0x7f070071; public static final int right_side = 0x7f070072; public static final int tag_transition_group = 0x7f070094; public static final int text = 0x7f070095; public static final int text2 = 0x7f070096; public static final int time = 0x7f07009e; public static final int title = 0x7f07009f; } public static final class integer { private integer() {} public static final int status_bar_notification_info_maxnum = 0x7f080004; } public static final class layout { private layout() {} public static final int notification_action = 0x7f09001f; public static final int notification_action_tombstone = 0x7f090020; public static final int notification_template_custom_big = 0x7f090021; public static final int notification_template_icon_group = 0x7f090022; public static final int notification_template_part_chronometer = 0x7f090023; public static final int notification_template_part_time = 0x7f090024; } public static final class string { private string() {} public static final int status_bar_notification_info_overflow = 0x7f0c001f; } public static final class style { private style() {} public static final int TextAppearance_Compat_Notification = 0x7f0d00e7; public static final int TextAppearance_Compat_Notification_Info = 0x7f0d00e8; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0d00e9; public static final int TextAppearance_Compat_Notification_Time = 0x7f0d00ea; public static final int TextAppearance_Compat_Notification_Title = 0x7f0d00eb; public static final int Widget_Compat_NotificationActionContainer = 0x7f0d0153; public static final int Widget_Compat_NotificationActionText = 0x7f0d0154; } public static final class styleable { private styleable() {} public static final int[] FontFamily = { 0x7f02007a, 0x7f02007b, 0x7f02007c, 0x7f02007d, 0x7f02007e, 0x7f02007f }; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 1; public static final int FontFamily_fontProviderFetchStrategy = 2; public static final int FontFamily_fontProviderFetchTimeout = 3; public static final int FontFamily_fontProviderPackage = 4; public static final int FontFamily_fontProviderQuery = 5; public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x7f020078, 0x7f020080, 0x7f020081 }; public static final int FontFamilyFont_android_font = 0; public static final int FontFamilyFont_android_fontWeight = 1; public static final int FontFamilyFont_android_fontStyle = 2; public static final int FontFamilyFont_font = 3; public static final int FontFamilyFont_fontStyle = 4; public static final int FontFamilyFont_fontWeight = 5; } }
[ "rishabh.m96@gmail.com" ]
rishabh.m96@gmail.com
0ae87116acc014565855629f4c49821f95761106
7652286d26856a0b9df3f482de7253377f7f042d
/se-project-group8/SMS-Messenger-Group8/src/project/se3354/sms_messenger_group8/SendTo_Activity.java
953a499384af05097a0c39006781d13c6aac7523
[]
no_license
z1234567890b/se-project-group8
bafad437ead4a525af14f68be1dc822fabb2cf0a
6fd9ad8d32922392e928ad81be41b19e2f39c6cc
refs/heads/master
2021-01-15T09:32:18.499977
2014-12-10T03:28:21
2014-12-10T03:28:21
33,165,808
0
1
null
null
null
null
UTF-8
Java
false
false
240
java
package project.se3354.sms_messenger_group8; public class SendTo_Activity { //dummy class used to meet requirements for default app //see: http://android-developers.blogspot.no/2013/10/getting-your-sms-apps-ready-for-kitkat.html }
[ "2012DCheng@gmail.com@5f2dbf48-14dc-350a-a83d-0fddc383f475" ]
2012DCheng@gmail.com@5f2dbf48-14dc-350a-a83d-0fddc383f475
e19e26b3ebc5100f0e06b3f54811eea23bf1bb53
96a857065c55699d135f00bc7f11144e2b01f2fe
/BroadcastTest/src/com/example/broadcasttest/MainActivity.java
e9276d2bd73538a011c32961b13d22a75040c01b
[ "Apache-2.0" ]
permissive
zjiat/android_sail
7b5b01e0a6187d1088f6cde376de55f365290bb0
f3861603517d69e1b3b56f7f64baa7eb54119479
refs/heads/master
2020-12-24T10:23:30.285408
2016-11-18T01:31:36
2016-11-18T01:31:36
73,086,782
0
0
null
null
null
null
UTF-8
Java
false
false
1,575
java
package com.example.broadcasttest; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.Toast; public class MainActivity extends Activity { private IntentFilter intentFilter; private NetworkChangeReceiver networkChangeReceiver; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); intentFilter = new IntentFilter(); intentFilter.addAction("android.net.conn.CONNECTIVITY_CHANGE"); networkChangeReceiver = new NetworkChangeReceiver(); registerReceiver(networkChangeReceiver, intentFilter); } @Override protected void onDestroy() { super.onDestroy(); unregisterReceiver(networkChangeReceiver); } class NetworkChangeReceiver extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); if (networkInfo != null && networkInfo.isAvailable()) { Toast.makeText(context, "network is available", Toast.LENGTH_SHORT).show(); }else { Toast.makeText(context, "network is unavailable", Toast.LENGTH_SHORT).show(); } } } }
[ "androidkid@163.com" ]
androidkid@163.com
3aea28e74c644cb7eb8d800a34efef42ed465b25
3fe57157ae68abe7e9656245d69b11ca01eed45d
/src/main/java/com/sistr/scarlethill/datagen/ScarletItemTagsProvider.java
aeaf97de7776dfa076a1ea2757e49ff43e37744e
[ "MIT" ]
permissive
SistrScarlet/TheScarletHillMod
68e3cced07db944f91824e8601577ceab9c341ef
44ab485646c071cc35c882bfa2d9956b3b3d5b58
refs/heads/master
2021-05-25T17:31:55.684892
2021-03-06T05:44:44
2021-03-06T05:44:44
253,831,134
0
0
null
null
null
null
UTF-8
Java
false
false
635
java
package com.sistr.scarlethill.datagen; import com.sistr.scarlethill.setup.Registration; import net.minecraft.data.DataGenerator; import net.minecraft.item.Items; import net.minecraftforge.common.Tags; import net.minecraftforge.common.data.ForgeItemTagsProvider; public class ScarletItemTagsProvider extends ForgeItemTagsProvider { public ScarletItemTagsProvider(DataGenerator gen) { super(gen); } @Override public void registerTags() { getBuilder(ScarletTags.Items.RED_THINGS).add(Items.RED_DYE, Items.REDSTONE); getBuilder(Tags.Items.GEMS).add(Registration.SCARLET_GEM_ITEM.get()); } }
[ "game.sistr@gmail.com" ]
game.sistr@gmail.com
9a38db9e91119d56010d9e9c81abdafbb09cdaf0
fd6e125be6d6915f49ae632600af2c357282f688
/SpringBootDemo/src/main/java/com/dhcc/zhyl/SpringBootDemo/controller/TestController.java
e1fec49f61b518a6461cccedae5104b2dbc4d335
[]
no_license
AlphaKitty/gitRepository
07f6397dc948e878a6fcae7186faa443d579f353
8d5fbd49b5a8420414fc944e5791972a6e98f0f3
refs/heads/test
2021-01-20T12:16:26.863571
2018-01-04T11:36:25
2018-01-04T11:36:25
101,707,194
1
0
null
2020-05-19T02:55:29
2017-08-29T02:00:15
HTML
UTF-8
Java
false
false
344
java
package com.dhcc.zhyl.SpringBootDemo.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/zhyl") public class TestController { @RequestMapping("/gateway") public String sayHello() { return "hello123"; } }
[ "372219506@qq.com" ]
372219506@qq.com
069a9feb8d53ee56eda96c35a0cc7a35e5b14036
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/shortvideo/cover/C38637g.java
190dc831d49880e771b37ebe53a6385f76937962
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
480
java
package com.p280ss.android.ugc.aweme.shortvideo.cover; import com.p280ss.android.ugc.aweme.shortvideo.mvtemplate.p1583a.C40093a; /* renamed from: com.ss.android.ugc.aweme.shortvideo.cover.g */ final /* synthetic */ class C38637g implements C40093a { /* renamed from: a */ private final C386262 f100369a; C38637g(C386262 r1) { this.f100369a = r1; } /* renamed from: a */ public final void mo96653a() { this.f100369a.mo96640b(); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
572cf6291f29b1f8cfe69d830037d9378e75020c
39c7af659bb3fd342b2dfcf744a6e7e956a19779
/src/main/java/com/careerstack/careerstack69/linklistMerge/SortedLinkListMerge.java
a86de5d6a3c47b7480fd7055937c89d05e169eb6
[]
no_license
braj065/CompeteL1
49c2ae24aed6027fbc8b145284af1b257bea1aa6
e1e9073bf867c0ca39c628506270fd579927e3df
refs/heads/master
2023-05-25T18:23:11.148030
2017-05-23T03:10:10
2017-05-23T03:10:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
798
java
package com.trgr.careerstack69.linklistMerge; public class SortedLinkListMerge { LinkList a; public static void main(String[] args){ LinkList a=new LinkList(10); a.insert(30); a.insert(50); a.insert(70); a.insert(90); LinkList b=new LinkList(20); b.insert(40); b.insert(60); b.insert(80); b.insert(100); SortedLinkListMerge we=new SortedLinkListMerge(); we.merger(b, a); System.out.println("Jammy"); } public void merger(LinkList y, LinkList x){ LinkList secList=x; while(y!=null && x!=null){ if(y.data<x.data){ LinkList k=y.next; y.next=x; secList=x.next; x.next=k; y=k; x=secList; }else if(y.data>x.data){ LinkList k=x.next; x.next=y; secList=y.next; y.next=k; x=k; y=secList; } } } }
[ "brajminator@gmail.com" ]
brajminator@gmail.com
c1ad3d47eeab01ddd2b6deda7613b1cc36cee57a
80848fad9a06f3973c5aa3886162a0960924a493
/util-ytest/src/main/java/com/yexuejc/util/example/small/tostring/MainTostring.java
36da30a4747909c53cc777fd0ba0b71cd815acb3
[]
no_license
yexuejc/utils
bc32cc8d18431ad5d72f37a79e85d35d216ccb2e
3b4d84acd3ae0636d40da1f0241da1db634ceba2
refs/heads/master
2023-05-01T19:24:58.664223
2023-04-15T02:34:29
2023-04-15T02:34:29
115,595,559
3
0
null
2017-12-28T07:03:23
2017-12-28T07:03:23
null
UTF-8
Java
false
false
587
java
package com.yexuejc.util.example.small.tostring; public class MainTostring { public static void main(String[] args) { Tostring tostring = new Tostring(); tostring.setA("41564565"); tostring.setB("asdasdasd"); System.out.println(tostring.toString()); String sss = "【e分钱】亲爱的唐龙同学您的认证信息审核通过,您可以获得参与百分百中奖的万元红包抢抢抢!详见APP首页活动规则time2018-02-12 15:26:52"; System.out.println(sss.substring(0,sss.indexOf("time"))); System.out.println(sss.substring(sss.indexOf("time")+4)); } }
[ "1107047387@qq.com" ]
1107047387@qq.com
af8823f539f352c370f3d84a4c802245ab60d3a8
803fe9849392807fa1c86101b2902030642097ec
/cdsh-project-service/src/main/java/com/bimda/cdshproject/service/impl/RoleInfoServiceImpl.java
e388c964962332694379a6a3f7db1dffb2c69f78
[]
no_license
SuperHandsomeHan/cdsh-project
ca6156696ffdbef224fd0bdc1c0a480a5204ed2e
d9169f39aae279f37ae318e58bcbe7cb65f791da
refs/heads/master
2023-01-21T14:54:53.195005
2020-11-30T08:26:57
2020-11-30T08:26:57
312,140,382
0
0
null
null
null
null
UTF-8
Java
false
false
561
java
package com.bimda.cdshproject.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.bimda.cdshproject.mapper.RoleInfoMapper; import com.bimda.cdshproject.pojo.RoleInfo; import com.bimda.cdshproject.service.IRoleInfoService; import org.springframework.stereotype.Service; /** * <p> * role_info 角色信息表 服务实现类 * </p> * * @author jobob * @since 2020-11-23 */ @Service("roleInfoService") public class RoleInfoServiceImpl extends ServiceImpl<RoleInfoMapper, RoleInfo> implements IRoleInfoService { }
[ "a291774405@vip.qq.com" ]
a291774405@vip.qq.com
eb088b316b999b956ee6cbb3c8b568de746b231c
fd41561571750bd5f6067193a9939e3eff776b2f
/algorithms/src/main/java/kovteba/search/jumpsearch/JumpSearch.java
ac2648dac66553489156a10b58903e4e519766b9
[]
no_license
kovteba/study
03caad7986330b5f40fe186d4e510c72d132778c
0329bb08588ff43c1b75aee4c033a4193e45440b
refs/heads/master
2023-07-25T22:39:37.080186
2021-09-07T13:55:24
2021-09-07T13:55:24
371,304,276
0
0
null
null
null
null
UTF-8
Java
false
false
802
java
package kovteba.search.jumpsearch; import java.util.Arrays; public class JumpSearch { public static int jumpSearch(int key, int[] arr) { int jumpSize = (int)Math.floor(Math.sqrt(arr.length)); int step = jumpSize; while (arr[Math.min(step, arr.length) - 1] < key && step < arr.length) { step = step + jumpSize; } for (int i = (step - jumpSize); i < arr.length; i++) { if (arr[i] == key) { return i; } } return -1; } public static void main(String[] args) { var arr = new int[]{1, 2, 3, 4, 12, 0, 100, 543, 65, 9, 23, 34, 9, 1, 4, 5, 6, 90}; Arrays.sort(arr); int index = jumpSearch(2, arr); System.out.println("INDEX : " + index); } }
[ "kovteba@gmail.com" ]
kovteba@gmail.com
9a3d95225d2b6ed66630bb1f0e253c7b435da5eb
13a227003484e4993882e8fbebb081d6bb92fdaa
/apache-async-http-HC4/src/org/apache/http/HC4/impl/auth/NTLMEngineException.java
c92657b31979b38ba66974264ecfe807d9aa9b2a
[ "MIT" ]
permissive
garymabin/YGOMobile
77c3dac5cdfa467afb35bf22b7e4901b45e93405
daa6eb2c7a93e09776686c6c81d11ccb779cde39
refs/heads/master
2021-01-18T21:58:44.685069
2017-09-26T08:25:03
2017-09-26T08:25:03
18,127,475
44
29
null
2016-01-05T14:48:43
2014-03-26T05:08:10
C
UTF-8
Java
false
false
2,335
java
/* * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.http.HC4.impl.auth; import org.apache.http.HC4.annotation.Immutable; import org.apache.http.HC4.auth.AuthenticationException; /** * Signals NTLM protocol failure. * * * @since 4.0 */ @Immutable public class NTLMEngineException extends AuthenticationException { private static final long serialVersionUID = 6027981323731768824L; public NTLMEngineException() { super(); } /** * Creates a new NTLMEngineException with the specified message. * * @param message the exception detail message */ public NTLMEngineException(final String message) { super(message); } /** * Creates a new NTLMEngineException with the specified detail message and cause. * * @param message the exception detail message * @param cause the {@code Throwable} that caused this exception, or {@code null} * if the cause is unavailable, unknown, or not a {@code Throwable} */ public NTLMEngineException(final String message, final Throwable cause) { super(message, cause); } }
[ "garymabin@gmail.com" ]
garymabin@gmail.com
8c93448221d612f5e8b2e1d62609af52f59628ab
2641c432c780e8d2212252d50c1d88db6c027f05
/src/main/java/com/guiaindicado/dominio/usuario/TokenUsuario.java
62f0f721f812f917a53ecfc4747daa659e8ace1d
[]
no_license
uanderson/guia-indicado
63740059eb46f93f6c009b3fbab1730138e01b1c
2f4c2b1cb5ed0b10095c6fa8ed3e644435f0427e
refs/heads/master
2021-01-21T21:54:31.502582
2017-11-09T15:49:16
2017-11-09T15:49:16
30,428,168
0
0
null
null
null
null
UTF-8
Java
false
false
2,857
java
package com.guiaindicado.dominio.usuario; import java.util.Date; import java.util.UUID; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.time.DateUtils; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @Entity @Table(name = "token_usuario") public class TokenUsuario { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "token_usuario_id", updatable = false) private Integer id; private String token; @Column(name = "data_hora") private Date dataHora; @Enumerated private Tipo tipo; @ManyToOne @JoinColumn(name = "usuario_id") private Usuario usuario; TokenUsuario() { } private TokenUsuario(Usuario usuario, Tipo tipo) { this.token = gerarToken(); this.tipo = Preconditions.checkNotNull(tipo); this.usuario = Preconditions.checkNotNull(usuario); this.dataHora = new Date(); } public static TokenUsuario criar(Usuario usuario, Tipo tipo) { return new TokenUsuario(usuario, tipo); } private String gerarToken() { Date data = new Date(); UUID uuid = UUID.nameUUIDFromBytes(String.valueOf(data).getBytes()); return uuid.toString().replaceAll("-", ""); } public boolean valido() { return tipo.valido(dataHora); } public String getToken() { return token; } public Usuario getUsuario() { return usuario; } public Date getDataHora() { return new Date(dataHora.getTime()); } @Override public int hashCode() { return Objects.hashCode(id); } @Override public boolean equals(Object outro) { if (this == outro) { return true; } if (!(outro instanceof TokenUsuario)) { return false; } TokenUsuario aquele = (TokenUsuario) outro; return Objects.equal(id, aquele.id); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) .append("id", id) .append("token", token) .append("dataHora", dataHora) .append("tipo", tipo) .toString(); } public static enum Tipo { CONFIRMACAO_CADASTRO { @Override public boolean valido(Date dataHora) { return dataHora.before(DateUtils.addDays(dataHora, 30)); } }, ESQUECI_SENHA { @Override public boolean valido(Date dataHora) { return dataHora.before(DateUtils.addDays(dataHora, 1)); } }; public abstract boolean valido(Date dataHora); } }
[ "uanderson.sg@gmail.com" ]
uanderson.sg@gmail.com
edb6947dc454529023b8d89427e0b0329f292178
704889b1f58ce95253098ae757520229777cf93b
/stockmetrics/src/main/java/com/sixrr/stockmetrics/methodCalculators/NumSameClassMethodsThatCallCalculator.java
1a43c3eef291cf25716224bb0546b315e9ac4c55
[]
no_license
moin99/MetricsReloaded-gradle
ca8bf284549175f967d674587433a5e840966bd3
e59a95411191a72ef87e2fbbbc00d9d904c9765d
refs/heads/master
2023-03-19T02:18:25.015776
2018-11-21T16:52:15
2018-11-21T16:52:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
776
java
package com.sixrr.stockmetrics.methodCalculators; import com.intellij.psi.PsiClass; import org.jetbrains.research.groups.ml_methods.utils.PSIUtil; public class NumSameClassMethodsThatCallCalculator extends AbstractNumMethodsThatCallCalculator { public NumSameClassMethodsThatCallCalculator() { super((callingMethod, currentMethod) -> { PsiClass callingMethodClass = callingMethod.getContainingClass(); PsiClass currentMethodClass = currentMethod.getContainingClass(); return currentMethodClass != null && callingMethodClass != null && (currentMethodClass.equals(callingMethodClass) || PSIUtil.getAllSupers(currentMethodClass).contains(callingMethodClass)); }); } }
[ "snyssfx@gmail.com" ]
snyssfx@gmail.com
4d71cd6dd2c248cf73f9d38ca1a11295b31c2a17
138db760643ea892e076b33a64201528a7f3a52c
/src/pro/shef/f8.java
b165058767d4fc52f4c5cbb0aa90fcd22d91d21a
[]
no_license
shefalisachan/Counselling_App
2bdc28f907ea3aa0dd849234e2050014daf2c5a8
e258aa6bef7b91328c7720cabf8c4e111c9ecdc8
refs/heads/master
2023-02-25T22:47:09.138763
2021-01-17T16:45:14
2021-01-17T16:45:14
330,435,735
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package pro.shef; import android.app.Activity; import android.os.Bundle; public class f8 extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.f8); } }
[ "shefalisachan6@gmail.com" ]
shefalisachan6@gmail.com
03bd1bfb460acd94754a1b533eae39afdaa04705
0f1a73dc0329cead4fa60981c1c1eb141d758a5d
/kfs-parent/module/endow/src/main/java/org/kuali/kfs/module/endow/document/web/struts/CashDecreaseDocumentAction.java
5c01e41450fb67c2a26957382b9a7504c5690d8e
[]
no_license
r351574nc3/kfs-maven
20d9f1a65c6796e623c4845f6d68834c30732503
5f213604df361a874cdbba0de057d4cd5ea1da11
refs/heads/master
2016-09-06T15:07:01.034167
2012-06-01T07:40:46
2012-06-01T07:40:46
3,441,165
0
0
null
null
null
null
UTF-8
Java
false
false
773
java
/* * Copyright 2011 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.endow.document.web.struts; public class CashDecreaseDocumentAction extends CashDocumentActionBase { }
[ "r351574nc3@gmail.com" ]
r351574nc3@gmail.com
e3f0a2f0c722e794084f7e360d8ed05ac2dfe8a8
fc7c7e696dec1352a8dfb4308d631eccb6d284c6
/EMSP/src/main/java/com/ems/controllers/EmployeeController.java
6bb26ce2c2640f7ba9e65855a001a154dd992f1e
[]
no_license
pptaj/EmployementMangementSystem_CloudDeployed
ca216295477a311f81e094180f574c3554e32955
c855d8a947551f6ad73a4a80921098141aa8c8f9
refs/heads/master
2021-01-19T19:45:51.875669
2017-04-16T20:58:43
2017-04-16T20:58:43
88,441,968
0
0
null
null
null
null
UTF-8
Java
false
false
7,639
java
/** * */ package com.ems.controllers; import com.ems.doa.*; import com.ems.pojo.*; import org.json.JSONObject; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.View; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /**s * @author Christopher Dsouza * */ @Controller public class EmployeeController { @RequestMapping(value="/updateEmployeeDetails.htm", method=RequestMethod.POST) protected void updateEmployeeDetails(HttpServletRequest request, HttpServletResponse response, @ModelAttribute("person") Person person) throws Exception { ModelAndView mv = new ModelAndView(); PersonDAO personDAO = new PersonDAO(); int empID = Integer.parseInt((String)request.getParameter("empID")); String fname = (String)request.getParameter("fname"); String lname = (String)request.getParameter("lname"); String pwd = (String)request.getParameter("password"); long phn = Long.parseLong((String)request.getParameter("phn")); String street = (String)request.getParameter("street"); String city = (String)request.getParameter("city"); String state = (String)request.getParameter("state"); int zip = Integer.parseInt((String)request.getParameter("zip")); int result = personDAO.updateUser(empID, fname, lname, pwd, phn, street, city, state, zip); if(result>0){ person = personDAO.getUser(empID); JSONObject personJson = new JSONObject(); personJson.put("person",person); PrintWriter out = response.getWriter(); out.println(personJson); mv.addObject("message", "Update Successful"); } else mv.addObject("message", "Update Failed. Try again"); } @RequestMapping(value="/leaves.htm", method=RequestMethod.POST) protected ModelAndView leavesRequested(@ModelAttribute(value="leaves") Leaves leaves, HttpServletRequest request, @ModelAttribute(value="tasks") Tasks tasks){ ModelAndView mv = new ModelAndView(); HttpSession session =request.getSession(); EmployeeDAO employeeDAO = new EmployeeDAO(); LeavesDAO leavesDAO = new LeavesDAO(); Person person = (Person)session.getAttribute("person"); int employeeID = person.getEmpID(); Employee emp = employeeDAO.getEmployee(employeeID); leaves = leavesDAO.addLeaves(leaves.getLeaveStartDate(), leaves.getLeaveEndDate(), emp); if(leaves!=null){ mv.addObject("message", "Task Created successfully"); }else{ mv.addObject("message", "Task Creation failed"); } mv = this.navigateToPage(request); return mv; } @RequestMapping(value="/tasks.htm", method=RequestMethod.POST) protected ModelAndView tasksCreated(@ModelAttribute(value="tasks") Tasks tasks, HttpServletRequest request, @ModelAttribute(value="leaves") Leaves leaves){ ModelAndView mv = new ModelAndView(); HttpSession session =request.getSession(); EmployeeDAO employeeDAO = new EmployeeDAO(); TasksDAO tasksDAO = new TasksDAO(); Person person = (Person)session.getAttribute("person"); int employeeID = person.getEmpID(); Employee emp = employeeDAO.getEmployee(employeeID); tasks = tasksDAO.createTasks(tasks.getTaskName(), tasks.getCurrentStatus(), tasks.getEmployeeComments(), "", emp); if(tasks!=null){ mv.addObject("message", "Task Created successfully"); }else{ mv.addObject("message", "Task Creation failed"); } mv = this.navigateToPage(request); return mv; } @RequestMapping(value="/updateEmployeeTask.htm", method=RequestMethod.POST) protected ModelAndView taskUpdate(@ModelAttribute(value="tasks") Tasks tasks, HttpServletRequest request){ ModelAndView mv = new ModelAndView(); TasksDAO tasksDAO = new TasksDAO(); int updateTask = 0; int taskID = Integer.parseInt((String)request.getParameter("taskID")); String employeeComment = (String)request.getParameter("employeeComment"); String currentStatus = (String)request.getParameter("taskStatus"); updateTask = tasksDAO.updateEmployeeTasks(taskID, currentStatus, employeeComment); if(updateTask>0) { mv.addObject("message", "Task Created successfully"); }else{ mv.addObject("message", "Task Creation failed"); } mv = this.navigateToPage(request); // HttpSession session =request.getSession(); // Person person = (Person)session.getAttribute("person"); // EmployeeDAO employeeDAO = new EmployeeDAO(); // List leaveList = new ArrayList(); // List taskList = new ArrayList(); // Employee employee = employeeDAO.getEmployee(person.getEmpID()); // if(employee!=null){ // int showValue=0; // Iterator leaveIterator = employee.getLeav().iterator(); // // while(leaveIterator.hasNext()){ // Leaves lea = (Leaves)leaveIterator.next(); // leaveList.add(lea); // } // // Iterator taskIterator = employee.getTasks().iterator(); // // while(taskIterator.hasNext()){ // Tasks tas = (Tasks)taskIterator.next(); // taskList.add(tas); // } // // FeedbackDAO feedbackDAO = new FeedbackDAO(); // PerformanceFeedback perfFeedback = feedbackDAO.checkperfGiven(person.getEmpID()); // if(perfFeedback!=null){ // showValue=2; // } // mv.addObject("leaveList", leaveList); // mv.addObject("taskList", taskList); // mv.addObject("showValue", showValue); // mv.setViewName("employeeHome"); // }else{ // session.invalidate(); // mv.setViewName("index"); // mv.addObject("message", "Issue with the data in backend. Please contact Admin"); // } // // mv.setViewName("employeeHome"); return mv; } @RequestMapping(value = "/feedback.htm", method = RequestMethod.POST) protected ModelAndView feedbackforemployee(HttpServletRequest request) throws Exception { HttpSession session = request.getSession(); EmployeeDAO employeeDAO = new EmployeeDAO(); Person person = (Person) session.getAttribute("person"); int empID = person.getEmpID(); return new ModelAndView("redirect:" + "https://s3.amazonaws.com/test-cloud-computing-new-new-new/" + empID + ".pdf"); } public ModelAndView navigateToPage(HttpServletRequest request){ ModelAndView mv = new ModelAndView(); HttpSession session =request.getSession(); Person person = (Person)session.getAttribute("person"); EmployeeDAO employeeDAO = new EmployeeDAO(); List leaveList = new ArrayList(); List taskList = new ArrayList(); Employee employee = employeeDAO.getEmployee(person.getEmpID()); if(employee!=null){ int showValue=0; Iterator leaveIterator = employee.getLeav().iterator(); while(leaveIterator.hasNext()){ Leaves lea = (Leaves)leaveIterator.next(); leaveList.add(lea); } Iterator taskIterator = employee.getTasks().iterator(); while(taskIterator.hasNext()){ Tasks tas = (Tasks)taskIterator.next(); taskList.add(tas); } FeedbackDAO feedbackDAO = new FeedbackDAO(); PerformanceFeedback perfFeedback = feedbackDAO.checkperfGiven(person.getEmpID()); if(perfFeedback!=null){ showValue=2; } mv.addObject("leaveList", leaveList); mv.addObject("taskList", taskList); mv.addObject("showValue", showValue); mv.setViewName("employeeHome"); }else{ session.invalidate(); mv.setViewName("/index.jsp"); mv.addObject("message", "Issue with the data in backend. Please contact Admin"); } mv.setViewName("employeeHome"); return mv; } }
[ "palecanda.t@husky.neu.edu" ]
palecanda.t@husky.neu.edu
49af845ee1e242e4cb7422f12de84d2152928862
2923567c94d6672be689d17575d2f517abd4a9e5
/08_Service/Ch12LocalBoundService/app/src/main/java/kr/ac/koreatech/swkang/ch12localboundservice/MainActivity.java
de98b770e155ea8d752b0de6e3b9ecc20878a6c5
[]
no_license
bbinbbin/MobileProgramming_2017-2
a726786c214bf9ca5a300f0582e933395e9a96f6
9e4900c5219461f63df91a0ac2e64e49c5461373
refs/heads/master
2020-04-24T06:44:47.143719
2019-02-28T04:23:23
2019-02-28T04:23:23
171,775,615
0
0
null
2019-02-21T01:12:12
2019-02-21T01:12:12
null
UTF-8
Java
false
false
2,925
java
package kr.ac.koreatech.swkang.ch12localboundservice; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Toast; public class MainActivity extends AppCompatActivity { LocalService mService; boolean mBound = false; // ServiceConnection 인터페이스를 구현한 ServiceConnection 객체 생성 // onServiceConnected() 콜백 메소드와 onServiceDisconnected() 콜백 메소드를 구현해야 함 private ServiceConnection mConnection = new ServiceConnection() { // Service에 연결(bound)되었을 때 호출되는 callback 메소드 // Service의 onBind() 메소드에서 반환한 IBinder 객체를 받음 (두번째 인자) @Override public void onServiceConnected(ComponentName name, IBinder service) { Log.d("MainActivity", "onServiceConnected()"); // 두번째 인자로 넘어온 IBinder 객체를 LocalService 클래스에 정의된 LocalBinder 클래스 객체로 캐스팅 LocalService.LocalBinder binder = (LocalService.LocalBinder)service; // LocalService 객체를 참조하기 위해 LocalBinder 객체의 getService() 메소드 호출 mService = binder.getService(); mBound = true; } // Service 연결 해제되었을 때 호출되는 callback 메소드 @Override public void onServiceDisconnected(ComponentName name) { Log.d("MainActivity", "onServiceDisconnected()"); mBound = false; } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override protected void onStart() { super.onStart(); // 연결할 Service를 위한 Intent 객체 생성 Intent intent = new Intent(this, LocalService.class); // Service에 연결하기 위해 bindService 호출, 생성한 intent 객체와 구현한 ServiceConnection의 객체를 전달 // boolean bindService(Intent service, ServiceConnection conn, int flags) bindService(intent, mConnection, Context.BIND_AUTO_CREATE); } @Override protected void onStop() { super.onStop(); if(mBound) { unbindService(mConnection); mBound = false; } } // 버튼이 클릭되면 호출 public void onClick(View view) { if(mBound) { // Service에 정의된 getRandomNumber 메소드 호출 int num = mService.getRandomNumber(); Toast.makeText(this, "number: " + num, Toast.LENGTH_SHORT).show(); } } }
[ "swkang@koreatech.ac.kr" ]
swkang@koreatech.ac.kr
709ab8342f5a68905f20f50495f1e181a621b39b
5a59fd99f2c397b268ab515a050778066a6bfcd5
/src/main/java/com/lzheng/coolpan/Service/FileService.java
6f9f0231a14a083036cc4b9adf0cab26d307b9a9
[ "MIT" ]
permissive
6yi/coolPan
7126075a950723e162d25be7656d6747117b0534
41c486f193c2a1535d87043f969668b8f506e934
refs/heads/master
2023-03-18T00:07:08.933357
2021-03-06T16:23:58
2021-03-06T16:23:58
227,990,476
1
0
null
2019-12-20T03:06:51
2019-12-14T08:29:24
Java
UTF-8
Java
false
false
1,537
java
package com.lzheng.coolpan.Service; import com.lzheng.coolpan.dao.FilesDao; import com.lzheng.coolpan.domain.Account; import com.lzheng.coolpan.domain.Files; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import java.io.File; import java.util.List; /** * @ClassName FileService * @Author 刘正 * @Date 2019/12/14 16:22 * @Version 1.0 * @Description: */ @Component public class FileService { @Autowired private FilesDao dao; @Value("${file.SavePath}") private String SavePath; public List<Files> findFilesById(Integer id){ return dao.findByAccountId(id); } public List<Files> findFilesByType(Integer id,Integer type){ return dao.findByType(id,type); } public void insert(Files files){ dao.insertSelective(files); } public void delete(Integer id,String filepath){ dao.deleteByPrimaryKey(id); File file=new File(SavePath+filepath); if(file.exists()&&file.isFile()) file.delete(); } public List<Files> findPublicFilesByType(int type){ return dao.findPublicFilesByType(type); } public List<Files> findPublicFiles(){ return dao.findPublicFiles(); } public List<Files> findPublicFilesById(Integer id){ return dao.findPublicFilesById(id); } public void UpadateIspublicById(Integer id,int state){ dao.UpadateIspublicById(id,state); } }
[ "lzhengycy@outlook.com" ]
lzhengycy@outlook.com
031a265a08d200a1b50b927f16d0066450bb7c2a
9d56fc7b9eab12a0d5d86d4b0ee5bda4d81e007d
/smartHMATest/app/src/main/java/pl/wasat/smarthma/ui/frags/base/BaseCollectionListFragment.java
f864abdd8d185f993dec0a1fe1cfdf5e0ba5234c
[]
no_license
prezes873/Smart
d3f0e66c8ec9d8a10d57f8f6edabd9c71eac7d7e
7d11a22267bdc66e266a50853ff554f3e1d821f5
refs/heads/master
2021-01-10T04:38:06.368986
2016-01-16T09:07:47
2016-01-16T09:07:47
49,522,001
0
0
null
null
null
null
UTF-8
Java
false
false
11,715
java
/* package pl.wasat.smarthma.ui.frags.base; import android.app.Activity; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ListView; import com.octo.android.robospice.persistence.exception.SpiceException; import com.octo.android.robospice.request.listener.RequestListener; import java.util.ArrayList; import java.util.List; import pl.wasat.smarthma.R; import pl.wasat.smarthma.adapter.EntryImagesListAdapter; import pl.wasat.smarthma.database.EoDbAdapter; import pl.wasat.smarthma.helper.DataSorter; import pl.wasat.smarthma.model.FedeoRequestParams; import pl.wasat.smarthma.model.feed.Feed; import pl.wasat.smarthma.model.om.EntryOM; import pl.wasat.smarthma.model.om.Footprint; import pl.wasat.smarthma.utils.rss.FedeoSearchRequest; */ /** * A simple {@link android.support.v4.app.Fragment} subclass. Activities that * contain this fragment must implement the * {@link BaseCollectionListFragment.OnBaseShowProductsListFragmentListener} * interface to handle interaction events. Use the * {@link BaseCollectionListFragment#newInstance} factory method to create an * instance of this fragment. * <p/> * Use this factory method to create a new instance of this fragment using * the provided parameters. * * @param fedeoRequestParams Parameter 1. * @return A new instance of fragment SearchProductsFeedsFragment. * @param searchProductFeeds searched Feed * <p/> * <p/> * <p/> * This interface must be implemented by activities that contain this * fragment to allow an interaction in this fragment to be communicated to * the activity and potentially other fragments contained in that activity. * <p/> * See the Android Training lesson <a href= * "http://developer.android.com/training/basics/fragments/communicating.html" * >Communicating with Other Fragments</a> for more information. * @param searchProductFeeds - Product Feed * @return footPrintsArr * <p/> * Use this factory method to create a new instance of this fragment using * the provided parameters. * @param fedeoRequestParams Parameter 1. * @return A new instance of fragment SearchProductsFeedsFragment. * @param searchProductFeeds searched Feed * <p/> * <p/> * <p/> * This interface must be implemented by activities that contain this * fragment to allow an interaction in this fragment to be communicated to * the activity and potentially other fragments contained in that activity. * <p/> * See the Android Training lesson <a href= * "http://developer.android.com/training/basics/fragments/communicating.html" * >Communicating with Other Fragments</a> for more information. * @param searchProductFeeds - Product Feed * @return footPrintsArr *//* public class BaseCollectionListFragment extends BaseSpiceFragment { private static final String KEY_PARAM_FEDEO_REQUEST = "pl.wasat.smarthma.KEY_PARAM_FEDEO_REQUEST"; private FedeoRequestParams fedeoRequestParams; private OnBaseShowProductsListFragmentListener mListener; private ListView entryImagesListView; private View loadingView; private static final String STATE_ACTIVATED_POSITION = "activated_position"; private int mActivatedPosition = ListView.INVALID_POSITION; */ /** * Use this factory method to create a new instance of this fragment using * the provided parameters. * * @param fedeoRequestParams Parameter 1. * @return A new instance of fragment SearchProductsFeedsFragment. *//* public static BaseCollectionListFragment newInstance( FedeoRequestParams fedeoRequestParams) { BaseCollectionListFragment fragment = new BaseCollectionListFragment(); Bundle args = new Bundle(); args.putSerializable(KEY_PARAM_FEDEO_REQUEST, fedeoRequestParams); fragment.setArguments(args); return fragment; } public BaseCollectionListFragment() { // Required empty public constructor } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { fedeoRequestParams = (FedeoRequestParams) getArguments().getSerializable( KEY_PARAM_FEDEO_REQUEST); } } */ /* * (non-Javadoc) * * @see * android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater, * android.view.ViewGroup, android.os.Bundle) *//* @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_collections_group_list, container, false); } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); if (savedInstanceState != null && savedInstanceState.containsKey(STATE_ACTIVATED_POSITION)) { setActivatedPosition(savedInstanceState .getInt(STATE_ACTIVATED_POSITION)); } entryImagesListView = (ListView) view.findViewById( R.id.listview_collections_group); loadingView = view.findViewById(R.id.loading_layout); if (fedeoRequestParams != null) { loadSearchProductsFeedResponse(fedeoRequestParams); } } @Override public void onAttach(Activity activity) { super.onAttach(activity); try { mListener = (OnBaseShowProductsListFragmentListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnBaseShowProductsListFragmentListener"); } } @Override public void onDetach() { super.onDetach(); mListener = null; } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (mActivatedPosition != ListView.INVALID_POSITION) { outState.putInt(STATE_ACTIVATED_POSITION, mActivatedPosition); } } public void setActivateOnItemClick(boolean activateOnItemClick) { entryImagesListView .setChoiceMode(activateOnItemClick ? ListView.CHOICE_MODE_SINGLE : ListView.CHOICE_MODE_NONE); } void setActivatedPosition(int position) { if (position == ListView.INVALID_POSITION) { entryImagesListView.setItemChecked(mActivatedPosition, false); } else { entryImagesListView.setItemChecked(position, true); } mActivatedPosition = position; } private void updateShowProductsListViewContent(final List<EntryOM> entryList) { View view = getView(); if (view != null) { if (entryList.isEmpty()) { view.setVisibility(View.GONE); loadFailureFrag(); } else { for (EntryOM a : entryList) { EoDbAdapter dba = new EoDbAdapter(getActivity()); dba.openToRead(); EntryOM fetchedSearch = dba.getBlogListing(a.getGuid()); dba.close(); if (fetchedSearch == null) { dba = new EoDbAdapter(getActivity()); dba.openToWrite(); dba.insertBlogListing(a.getGuid()); dba.close(); } else { a.setDbId(fetchedSearch.getDbId()); a.setOffline(fetchedSearch.isOffline()); a.setRead(fetchedSearch.isRead()); } } EntryImagesListAdapter entryImagesListAdapter = new EntryImagesListAdapter(getActivity() .getBaseContext(), getBitmapSpiceManager(), entryList); entryImagesListView.setAdapter(entryImagesListAdapter); loadingView.setVisibility(View.GONE); entryImagesListAdapter.notifyDataSetChanged(); entryImagesListView.setVisibility(View.VISIBLE); // Click event for single list row entryImagesListView .setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { loadProductItemDetails(entryList.get(position)); } }); } } } protected void loadFailureFrag() { } protected void loadProductItemDetails(EntryOM entry) { } */ /** * @param searchProductFeeds searched Feed *//* protected void loadSearchResultProductsIntroDetailsFrag( Feed searchProductFeeds) { } */ /** * *//* private void loadSearchProductsFeedResponse(FedeoRequestParams fedeoRequestParams) { if (fedeoRequestParams != null) { getActivity().setProgressBarIndeterminateVisibility(true); getSpiceManager().execute(new FedeoSearchRequest(fedeoRequestParams, 2), new FeedRequestListener()); } } */ /** * This interface must be implemented by activities that contain this * fragment to allow an interaction in this fragment to be communicated to * the activity and potentially other fragments contained in that activity. * <p/> * See the Android Training lesson <a href= * "http://developer.android.com/training/basics/fragments/communicating.html" * >Communicating with Other Fragments</a> for more information. *//* public interface OnBaseShowProductsListFragmentListener { public void onBaseShowProductsListFragmentFootprintSend(); } void loadRequestSuccess(Feed searchProductFeeds) { getActivity().setProgressBarIndeterminateVisibility(false); if (searchProductFeeds == null) { searchProductFeeds = new Feed(); } List<EntryOM> entries = searchProductFeeds.getEntriesEO(); DataSorter sorter = new DataSorter(); sorter.sort(entries); updateShowProductsListViewContent(searchProductFeeds.getEntriesEO()); loadSearchResultProductsIntroDetailsFrag(searchProductFeeds); ArrayList<Footprint> footPrints = getFootprints(searchProductFeeds .getEntriesEO()); mListener.onBaseShowProductsListFragmentFootprintSend(); } */ /** * @param searchProductFeeds - Product Feed * @return footPrintsArr *//* private ArrayList<Footprint> getFootprints(List<EntryOM> searchProductFeeds) { ArrayList<Footprint> footPrintsArr = new ArrayList<>(); for (EntryOM searchProductFeed : searchProductFeeds) { if (searchProductFeed.getEarthObservation() != null) { footPrintsArr.add(searchProductFeed.getEarthObservation() .getFeatureOfInterest().getFootprint()); } } return footPrintsArr; } private final class FeedRequestListener implements RequestListener<Feed> { @Override public void onRequestFailure(SpiceException spiceException) { parseRequestFailure(spiceException); } @Override public void onRequestSuccess(Feed feed) { loadRequestSuccess(feed); } } } */
[ "maciekstodulski@o2.pl" ]
maciekstodulski@o2.pl
f8267e3bc5a5981bf71ba3f286a51c6f56e47e9e
840badfc99e466bcfd179d0522ef8cc5fc19c7e7
/src/SimpleStudentDatabase/Home.java
921224b8e73d8542dfbaf3d543c791447743cf64
[]
no_license
Harepitlord/Basic_Java_Swing_Forms
a8dfe59767f0536b3d2ae0f37776afbcae04a489
0d6de48b9d515d9d8aaeeb2a5b8aca3fbf3ad30c
refs/heads/master
2023-07-04T00:51:56.964261
2021-08-01T13:56:35
2021-08-01T13:56:35
389,930,589
1
0
null
null
null
null
UTF-8
Java
false
false
4,895
java
package SimpleStudentDatabase; import javax.swing.*; import javax.swing.border.EmptyBorder; import javax.swing.border.LineBorder; import java.awt.*; public class Home { Student student; JFrame frame; JButton login,signup,update,delete,search,logOut; JPanel panel,spanel; JLabel intro,welcome; Database dbase; // Constructors public Home(Database d) { this.student = null; this.dbase = d; this.prepareInterface(); } public Home(Student s,Database d) { this.student = s; this.dbase = d; this.prepareInterface(); } private void prepareInterface() { this.prepareButtons(); this.prepareLabels(); this.prepareActionListeners(); this.preparePanels(); this.prepareFrames(); this.addElements(); } // This function initializes the buttons with text and additional modification private void prepareButtons() { this.login = new JButton("Login"); this.signup = new JButton("SignUp"); this.update = new JButton("Update"); this.delete = new JButton("Delete"); this.search = new JButton("search"); if(this.student != null) { this.logOut = new JButton("Log Out"); this.logOut.setBackground(Color.blue); this.logOut.setForeground(Color.white); } this.login.setForeground(Color.white); this.signup.setForeground(Color.white); this.update.setForeground(Color.white); this.delete.setForeground(Color.white); this.search.setForeground(Color.white); this.login.setBackground(Color.blue); this.signup.setBackground(Color.blue); this.update.setBackground(Color.BLUE); this.delete.setBackground(Color.blue); this.search.setBackground(Color.blue); // this.signup.addActionListener(this); // this.update.addActionListener(this); // this.delete.addActionListener(this); // this.search.addActionListener(this); } private void prepareActionListeners() { this.login.addActionListener(e->{ new LoginForm(this.dbase); this.frame.dispose(); }); if(this.student != null) { this.logOut.addActionListener(e -> this.signOut()); } this.signup.addActionListener(e -> { new RegistrationForm(this.dbase); this.frame.dispose(); }); this.update.addActionListener(e -> { new UpdateForm(this.student,this.dbase); this.frame.dispose(); }); this.delete.addActionListener(e -> { new DeleteForm(this.student,this.dbase); this.frame.dispose(); }); // this.logOut.addActionListener(e-> new Home(this.dbase)); } // This function initializes the labels with text and additional modification private void prepareLabels() { this.intro = new JLabel("Welcome to Student Database."); if (this.student !=null) this.welcome = new JLabel("Hi "+this.student.getName()); } // This function initializes the panels with required configurations. private void preparePanels() { this.spanel = new JPanel(); this.panel = new JPanel(); this.spanel.setBackground(Color.white); this.spanel.setLayout(null); this.spanel.setBorder(new LineBorder(Color.BLACK,2)); this.spanel.setBounds(50,50,400,500); this.panel.setBackground(Color.white); this.panel.setLayout(new GridLayout(8,1,20,20)); this.panel.setBounds(50,50,300,350); this.panel.setBorder(new EmptyBorder(new Insets(10,10,10,10))); } private void prepareFrames() { this.frame = new JFrame("Student Database"); this.frame.getContentPane().setBackground(Color.blue); this.frame.setLayout(null); this.frame.setSize(600,700); this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.frame.setVisible(true); this.frame.setResizable(true); } // This function adds the elements to their respective containers private void addElements() { if(this.student != null) this.panel.add(this.welcome); this.panel.add(this.intro); if(this.student == null) { this.panel.add(this.login); this.panel.add(this.signup); } if(this.student != null) { this.panel.add(this.update); this.panel.add(this.delete); this.panel.add(this.logOut); } this.spanel.add(this.panel); this.frame.add(this.spanel); } // } // else if(this.logOut.isSelected()) { // this.signOut(); // } private void signOut() { this.frame.dispose(); new Home(this.dbase); } }
[ "65818462+Harepitlord@users.noreply.github.com" ]
65818462+Harepitlord@users.noreply.github.com
b749299e6ca7ef8169589f2565ec9c7282de0069
d4005a7e9ee5e8421bfa5e614c67c06350df0fa5
/Programmierung/Graph/src/org/util/ExportToGraphML.java
c76c2aab7bd1380b29c3b780372aa236d1a4be2c
[]
no_license
matthiasbode/multiskalen
cccf4ea7473f5362fd4d015881304d03baf15b79
fb555ce9aa49a0e8d80a5688e5106701c36e737f
refs/heads/master
2021-01-18T23:26:29.775565
2016-07-08T20:11:19
2016-07-08T20:11:19
34,849,433
0
1
null
null
null
null
UTF-8
Java
false
false
9,417
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.util; import java.awt.geom.Point2D; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; import java.util.ArrayList; import java.util.Map; import org.graph.Graph; /** * Klasse, die eine DirectedGraph und alle davon abgeleiteten Klassen * in einer Datei für YED schreibt. * * In YED kann dann das Layout des Graphens angepasst werden. (Menüpunkt: Layout) * @author bode */ public class ExportToGraphML { public static <E> void exportToGraphML(Graph<E> graph, String filename) { String s = ""; s += "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n" + "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:y=\"http://www.yworks.com/xml/graphml\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd\">\n" + "<!--Created by yFiles for Java 2.7-->\n" + "<key for=\"graphml\" id=\"d0\" yfiles.type=\"resources\"/>\n" + "<key attr.name=\"url\" attr.type=\"string\" for=\"node\" id=\"d1\"/>\n" + "<key attr.name=\"description\" attr.type=\"string\" for=\"node\" id=\"d2\"/>\n" + "<key for=\"node\" id=\"d3\" yfiles.type=\"nodegraphics\"/>\n" + "<key attr.name=\"Beschreibung\" attr.type=\"string\" for=\"graph\" id=\"d4\">\n" + "<default/>\n" + "</key>\n" + "<key attr.name=\"url\" attr.type=\"string\" for=\"edge\" id=\"d5\"/>\n" + "<key attr.name=\"description\" attr.type=\"string\" for=\"edge\" id=\"d6\"/>\n" + "<key for=\"edge\" id=\"d7\" yfiles.type=\"edgegraphics\"/>\n" + "<graph edgedefault=\"directed\" id=\"G\">"; int numberOfVertex = graph.vertexSet().size(); int numberOfVertexPerRow = (int) (Math.sqrt(numberOfVertex) + 0.5); double x = 0; double y = 0; ArrayList<E> sortedVertices = new ArrayList<E>(graph.vertexSet()); for (int i = 0; i < sortedVertices.size(); i++) { E vertex = sortedVertices.get(i); s += "<node id=\"n" + i + "\">\n" + "<data key=\"d3\">\n" + "<y:ShapeNode>\n" + "<y:Geometry height=\"30.0\" width=\"30.0\" x=\"" + x + "\" y=\"" + y + "\"/>\n" + "<y:Fill color=\"#FFCC00\" transparent=\"false\"/>\n" + "<y:BorderStyle color=\"#000000\" type=\"line\" width=\"1.0\"/>\n" + "<y:NodeLabel alignment=\"center\" autoSizePolicy=\"content\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" hasBackgroundColor=\"false\" hasLineColor=\"false\" height=\"17.96875\" modelName=\"internal\" modelPosition=\"c\" textColor=\"#000000\" visible=\"true\">" + vertex.toString() + "</y:NodeLabel>\n" + "<y:Shape type=\"rectangle\"/>\n" + "</y:ShapeNode>\n" + "</data>\n" + "</node>\n"; if (i % numberOfVertexPerRow == 0) { x = 0; y += 200; continue; } x += 200; } int ei = 0; for (Pair<E, E> pair : graph.edgeSet()) { int source = 0; int target = 0; for (int i = 0; i < sortedVertices.size(); i++) { E vertex = sortedVertices.get(i); if (vertex.equals(pair.getFirst())) { source = i; } if (vertex.equals(pair.getSecond())) { target = i; } } s += "<edge id=\"e" +ei++ +"\" source=\"n" + source + "\" target=\"n" + target + "\">\n" + "<data key=\"d7\">\n" + "<y:PolyLineEdge>\n" + "<y:Path sx=\"0.0\" sy=\"0.0\" tx=\"0.0\" ty=\"0.0\"/>\n" + "<y:LineStyle color=\"#000000\" type=\"line\" width=\"1.0\"/>\n" + "<y:Arrows source=\"none\" target=\"standard\"/>\n" + "<y:BendStyle smoothed=\"false\"/>\n" + "</y:PolyLineEdge>\n" + "</data>\n" + "</edge>"; } s += " </graph>" + "<data key=\"d0\">" + "<y:Resources/>" + "</data>" + "</graphml>"; Writer fw = null; try { fw = new FileWriter(filename); fw.write(s); } catch (IOException e) { System.err.println("Konnte Datei nicht erstellen"); } finally { if (fw != null) { try { fw.close(); } catch (IOException e) { e.printStackTrace(); } } } } public static <E> void exportToGraphML(Graph<E> graph, Map<E,Point2D.Double> positions, String filename) { String s = ""; s += "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n" + "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:y=\"http://www.yworks.com/xml/graphml\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd\">\n" + "<!--Created by yFiles for Java 2.7-->\n" + "<key for=\"graphml\" id=\"d0\" yfiles.type=\"resources\"/>\n" + "<key attr.name=\"url\" attr.type=\"string\" for=\"node\" id=\"d1\"/>\n" + "<key attr.name=\"description\" attr.type=\"string\" for=\"node\" id=\"d2\"/>\n" + "<key for=\"node\" id=\"d3\" yfiles.type=\"nodegraphics\"/>\n" + "<key attr.name=\"Beschreibung\" attr.type=\"string\" for=\"graph\" id=\"d4\">\n" + "<default/>\n" + "</key>\n" + "<key attr.name=\"url\" attr.type=\"string\" for=\"edge\" id=\"d5\"/>\n" + "<key attr.name=\"description\" attr.type=\"string\" for=\"edge\" id=\"d6\"/>\n" + "<key for=\"edge\" id=\"d7\" yfiles.type=\"edgegraphics\"/>\n" + "<graph edgedefault=\"directed\" id=\"G\">"; ArrayList<E> sortedVertices = new ArrayList<E>(graph.vertexSet()); for (int i = 0; i < sortedVertices.size(); i++) { E vertex = sortedVertices.get(i); double x = positions.get(vertex).getX(); double y = positions.get(vertex).getY(); s += "<node id=\"n" + i + "\">\n" + "<data key=\"d3\">\n" + "<y:ShapeNode>\n" + "<y:Geometry height=\"30.0\" width=\"30.0\" x=\"" + x + "\" y=\"" + y + "\"/>\n" + "<y:Fill color=\"#FFCC00\" transparent=\"false\"/>\n" + "<y:BorderStyle color=\"#000000\" type=\"line\" width=\"1.0\"/>\n" + "<y:NodeLabel alignment=\"center\" autoSizePolicy=\"content\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" hasBackgroundColor=\"false\" hasLineColor=\"false\" height=\"17.96875\" modelName=\"internal\" modelPosition=\"c\" textColor=\"#000000\" visible=\"true\">" + vertex.toString() + "</y:NodeLabel>\n" + "<y:Shape type=\"rectangle\"/>\n" + "</y:ShapeNode>\n" + "</data>\n" + "</node>\n"; } int ei = 0; for (Pair<E, E> pair : graph.edgeSet()) { int source = 0; int target = 0; for (int i = 0; i < sortedVertices.size(); i++) { E vertex = sortedVertices.get(i); if (vertex.equals(pair.getFirst())) { source = i; } if (vertex.equals(pair.getSecond())) { target = i; } } s += "<edge id=\"e" +ei++ +"\" source=\"n" + source + "\" target=\"n" + target + "\">\n" + "<data key=\"d7\">\n" + "<y:PolyLineEdge>\n" + "<y:Path sx=\"0.0\" sy=\"0.0\" tx=\"0.0\" ty=\"0.0\"/>\n" + "<y:LineStyle color=\"#000000\" type=\"line\" width=\"1.0\"/>\n" + "<y:Arrows source=\"none\" target=\"standard\"/>\n" + "<y:BendStyle smoothed=\"false\"/>\n" + "</y:PolyLineEdge>\n" + "</data>\n" + "</edge>"; } s += " </graph>" + "<data key=\"d0\">" + "<y:Resources/>" + "</data>" + "</graphml>"; Writer fw = null; try { fw = new FileWriter(filename); fw.write(s); } catch (IOException e) { System.err.println("Konnte Datei nicht erstellen"); } finally { if (fw != null) { try { fw.close(); } catch (IOException e) { e.printStackTrace(); } } } } }
[ "mail@matthiasbo.de" ]
mail@matthiasbo.de
1c0e6c8de5b16bce430aa4ad433c23954dd6da30
a0f5a257fd85266e08cea0cc63c015147aff5a5a
/PAP/pap/ass08/TemperatureMonitoring/StopFlag.java
2753e23489469ec87bda4998758cb48e23056b7b
[]
no_license
massimilianomartella/AdvancedParadigmsPrograms
3061713630c8c641a557d6d1fa05427df27aedb2
90421fb9d10f7334650dd62e5cf2fa9a8e9118a5
refs/heads/master
2021-01-10T07:21:55.459252
2016-01-14T12:38:49
2016-01-14T12:38:49
43,847,210
0
0
null
null
null
null
UTF-8
Java
false
false
352
java
package pap.ass08.TemperatureMonitoring; /** * Monitor adibito allo start e stop del programma * @author Martella Massimiliano * */ public class StopFlag { private boolean done = false; public StopFlag(){ done = false; } public synchronized void setDone(){ done = true; } public synchronized boolean isDone(){ return done; } }
[ "massimilian.martella@studio.unibo.it" ]
massimilian.martella@studio.unibo.it
e29c65b18a510d135c802c1bc2ae8be90a441344
5a37925f6cb04539766be5cd3104f11ea177b908
/ovirt-engine-4.0.2.6/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIMessages.java
0bb45624d7761047ea248b431c425329ce823c9a
[ "Apache-2.0" ]
permissive
zhuangquanquan/ovirt
4dc90af2993c1c74b01cda1e8a8e842938a29562
bf83ddfcf0773e3ea632a74b6de221d7805c33fb
refs/heads/master
2020-04-06T06:26:29.881231
2016-09-19T12:43:10
2016-09-19T12:43:10
68,600,404
1
0
null
null
null
null
UTF-8
Java
false
false
13,781
java
package org.ovirt.engine.ui.uicompat; import com.google.gwt.i18n.client.Messages; import java.util.List; import org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepNonEligibilityReason; import org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotScheduleRecurrence; import org.ovirt.engine.core.common.utils.SizeConverter; public interface UIMessages extends Messages { String customPropertyOneOfTheParamsIsntSupported(String parameters); String customPropertiesValuesShouldBeInFormatReason(String format); String keyValueFormat(); String emptyOrValidKeyValueFormatMessage(String format); String customPropertyValueShouldBeInFormatReason(String parameter, String format); String createOperationFailedDcGuideMsg(String storageName); String nameCanContainOnlyMsg(int maxNameLength); String detachNote(String localStoragesFormattedString); String youAreAboutToDisconnectHostInterfaceMsg(String nicName); String connectingToGuestWithNotResponsiveAgentMsg(); String hostNameMsg(int hostNameMaxLength); String naturalNumber(); String realNumber(); String thisFieldMustContainTypeNumberInvalidReason(String type); String numberValidationNumberBetweenInvalidReason(String prefixMsg, String min, String max); String numberValidationNumberGreaterInvalidReason(String prefixMsg, String min); String numberValidationNumberLessInvalidReason(String prefixMsg, String max); String integerValidationNumberBetweenInvalidReason(String prefixMsg, int min, int max); String integerValidationNumberGreaterInvalidReason(String prefixMsg, int min); String integerValidationNumberLessInvalidReason(String prefixMsg, int max); String lenValidationFieldMusnotExceed(int maxLength); String vmStorageDomainIsNotAccessible(); String noActiveStorageDomain(); String alreadyAssignedClonedVmName(); String suffixCauseToClonedVmNameCollision(String vmName); String alreadyAssignedClonedTemplateName(); String suffixCauseToClonedTemplateNameCollision(String templateName); String createFailedDomainAlreadyExistStorageMsg(String storageName); String importFailedDomainAlreadyExistStorageMsg(String storageName); String memSizeBetween(int minMemSize, int maxMemSize); String maxMemSizeIs(int maxMemSize); String minMemSizeIs(int minMemSize); String memSizeMultipleOf(String architectureName, int multiplier); String nameMustConataionOnlyAlphanumericChars(int maxLen); String newNameWithSuffixCannotContainBlankOrSpecialChars(int maxLen); String importProcessHasBegunForVms(String importedVms); String storageDomainIsNotActive(String storageName); String importProcessHasBegunForTemplates(String importedTemplates); String templatesAlreadyExistonTargetExportDomain(String existingTemplates); String vmsAlreadyExistOnTargetExportDomain(String existingVMs); String templatesWithDependentVMs(String template, String vms); String sharedDisksWillNotBePartOfTheExport(String diskList); String directLUNDisksWillNotBePartOfTheExport(String diskList); String snapshotDisksWillNotBePartOfTheExport(String diskList); String noExportableDisksFoundForTheExport(); String sharedDisksWillNotBePartOfTheSnapshot(String diskList); String directLUNDisksWillNotBePartOfTheSnapshot(String diskList); String snapshotDisksWillNotBePartOfTheSnapshot(String diskList); String noExportableDisksFoundForTheSnapshot(); String sharedDisksWillNotBePartOfTheTemplate(String diskList); String directLUNDisksWillNotBePartOfTheTemplate(String diskList); String snapshotDisksWillNotBePartOfTheTemplate(String diskList); String noExportableDisksFoundForTheTemplate(); String diskAlignment(String alignment, String lastScanDate); String errConnectingVmUsingSpiceMsg(Object errCode); String errConnectingVmUsingRdpMsg(Object errCode); String areYouSureYouWantToDeleteSanpshot(String from, Object description); String editBondInterfaceTitle(String name); String editHostNicVfsConfigTitle(String name); String editManagementNetworkTitle(String networkName); String editNetworkTitle(String name); String setupHostNetworksTitle(String hostName); String noOfBricksSelected(int brickCount); String vncInfoMessage(String hostIp, int port, String password, int seconds); String lunAlreadyPartOfStorageDomainWarning(String storageDomainName); String lunUsedByDiskWarning(String diskAlias); String lunUsedByVG(String vgID); String usedLunIdReason(String id, String reason); String removeBricksReplicateVolumeMessage(int oldReplicaCount, int newReplicaCount); String breakBond(String bondName); String detachNetwork(String networkName); String removeNetwork(String networkName); String attachTo(String name); String bondWith(String name); String addToBond(String name); String extendBond(String name); String removeFromBond(String name); String label(String label); String unlabel(String label); String suggestDetachNetwork(String networkName); String labelInUse(String label, String ifaceName); String incorrectVCPUNumber(); String poolNameLengthInvalid(int maxLength, int vmsInPool); String poolNameWithQuestionMarksLengthInvalid(int maxLength, int vmsInPool, int numberOfQuestionMarks); String numOfVmsInPoolInvalid(int maxNumOfVms, int poolNameLength); String numOfVmsInPoolInvalidWithQuestionMarks(int maxNumOfVms, int poolNameLength, int numberOfQuestionMarks); String refreshInterval(int intervalSec); String importClusterHostNameEmpty(String address); String importClusterHostPasswordEmpty(String address); String importClusterHostFingerprintEmpty(String address); String unreachableGlusterHosts(List<String> hosts); String networkDcDescription(String networkName, String dcName, String description); String networkDc(String networkName, String dcName); String vnicFromVm(String vnic, String vm); String vnicProfileFromNetwork(String vnicProfile, String network); String vnicFromTemplate(String vnic, String template); String bridlessNetworkNotSupported(String version); String mtuOverrideNotSupported(String version); String numberOfVmsForHostsLoad(int numberOfVms); String cpuInfoLabel(int numberOfCpus, int numberOfSockets, int numberOfCpusPerSocket, int numberOfThreadsPerCore); String templateDiskDescription(String diskAlias, String storageDomainName); String interfaceIsRequiredToBootFromNetwork(); String bootableDiskIsRequiredToBootFromDisk(); String disklessVmCannotRunAsStateless(); String urlSchemeMustBeEmpty(String passedScheme); String urlSchemeMustNotBeEmpty(String allowedSchemes); String urlSchemeInvalidScheme(String passedScheme, String allowedSchemes); String providerUrlWarningText(String providedEntities); String nicHotPlugNotSupported(String clusterVersion); String customSpmPriority(int priority); String brickDetailsNotSupportedInClusterCompatibilityVersion(String version); String hostNumberOfRunningVms(String hostName, int runningVms); String commonMessageWithBrackets(String subject, String inBrackets); String removeNetworkQoSMessage(int numOfProfiles); String removeStorageQoSMessage(int numOfProfiles); String removeStorageQoSItem(String qosName, String diskProfileNames); String removeCpuQoSMessage(int numOfProfiles); String removeHostNetworkQosMessage(int numOfNetworks); String cpuInfoMessage(int numOfCpus, int sockets, int coresPerSocket, int threadsPerSocket); String numaTopologyTitle(String hostName); String rebalanceStatusFailed(String name); String volumeProfileStatisticsFailed(String volName); String removeBrickStatusFailed(String name); String confirmStopVolumeRebalance(String name); String cannotMoveDisks(String disks); String cannotCopyDisks(String disks); String moveDisksPreallocatedWarning(String disks); String moveDisksWhileVmRunning(String disks); String errorConnectingToConsole(String name, String s); String errorConnectingToConsoleNoProtocol(String name); String cannotConnectToTheConsole(String vmName); String schedulerOptimizationInfo(int numOfRequests); String schedulerAllowOverbookingInfo(int numOfRequests); String vmTemplateWithCloneProvisioning(String templateName); String vmTemplateWithThinProvisioning(String templateName); String youAreAboutChangeDcCompatibilityVersionWithUpgradeMsg(String version); String haActive(int score); String volumeProfilingStatsTitle(String volumeName); String networkLabelConflict(String nicName, String labelName); String labeledNetworkNotAttached(String nicName, String labelName); String bootMenuNotSupported(String clusterVersion); String diskSnapshotLabel(String diskAlias, String snapshotDescription); String optionNotSupportedClusterVersionTooOld(String clusterVersion); String optionRequiresSpiceEnabled(); String rngSourceNotSupportedByCluster(String source); String glusterVolumeCurrentProfileRunTime(int currentRunTime, String currentRunTimeUnit, int totalRunTime, String totalRunTimeUnit); String bytesReadInCurrentProfileInterval(String currentBytesRead, String currentBytesReadUnit, String totalBytes, String totalBytesUnit); String bytesWrittenInCurrentProfileInterval(String currentBytesWritten, String currentBytesWrittenUnit, String totalBytes, String totalBytesUnit); String defaultMtu(int mtu); String threadsAsCoresPerSocket(int cores, int threads); String approveCertificateTrust(String subject, String issuer, String sha1Fingerprint); String approveRootCertificateTrust(String subject, String sha1Fingerprint); String geoRepForceTitle(String action); String geoRepActionConfirmationMessage(String action); String iconDimensionsTooLarge(int width, int height, int maxWidht, int maxHeight); String iconFileTooLarge(int maxSize); String invalidIconFormat(String s); String clusterSnapshotOptionValueEmpty(String option); String volumeSnapshotOptionValueEmpty(String option); String vmDialogDisk(String name, String sizeInGb, String type, String boot); String confirmRestoreSnapshot(String volumeName); String confirmRemoveSnapshot(String volumeName); String confirmRemoveAllSnapshots(String volumeName); String confirmActivateSnapshot(String volumeName); String confirmDeactivateSnapshot(String volumeName); String confirmVolumeSnapshotDeleteMessage(String snapshotNames); @Messages.AlternateMessage(value = { "UNKNOWN" , "None" , "INTERVAL" , "Minute" , "HOURLY" , "Hourly" , "DAILY" , "Daily" , "WEEKLY" , "Weekly" , "MONTHLY" , "Monthly" }) String recurrenceType(@Messages.Select GlusterVolumeSnapshotScheduleRecurrence recurrence); @Messages.AlternateMessage(value = { "BYTES" , "{0} B" , "KiB" , "{0} KiB" , "MiB" , "{0} MiB" , "GiB" , "{0} GiB" , "TiB" , "{0} TiB" }) String sizeUnitString(String size, @Messages.Select SizeConverter.SizeUnit sizeUnit); String userSessionRow(long sessionId, String UserName); @Messages.AlternateMessage(value = { "SLAVE_AND_MASTER_VOLUMES_SHOULD_NOT_BE_IN_SAME_CLUSTER" , "Destination and master volumes should not be from same cluster." , "SLAVE_VOLUME_SIZE_SHOULD_BE_GREATER_THAN_MASTER_VOLUME_SIZE" , "Capacity of destination volume should be greater than or equal to that of master volume." , "SLAVE_CLUSTER_AND_MASTER_CLUSTER_COMPATIBILITY_VERSIONS_DO_NOT_MATCH" , "Cluster Compatibility version of destination and master volumes should be same." , "SLAVE_VOLUME_SHOULD_NOT_BE_SLAVE_OF_ANOTHER_GEO_REP_SESSION" , "Destination volume is already a part of another geo replication session." , "SLAVE_VOLUME_SHOULD_BE_UP" , "Destination volume should be up." , "SLAVE_VOLUME_SIZE_TO_BE_AVAILABLE" , "Capacity information of the destination volume is not available." , "MASTER_VOLUME_SIZE_TO_BE_AVAILABLE" , "Capacity information of the master volume is not available." , "SLAVE_VOLUME_TO_BE_EMPTY" , "Destination volume should be empty." , "NO_UP_SLAVE_SERVER" , "No up server in the destination volume" }) String geoRepEligibilityViolations(@Messages.Select GlusterGeoRepNonEligibilityReason reason); String testSuccessfulWithPowerStatus(String powerStatus); String testFailedWithErrorMsg(String errorMessage); String uiCommonRunActionPartitialyFailed(String reason); String vnicTypeDoesntMatchPassthroughProfile(String type); String vnicTypeDoesntMatchNonPassthroughProfile(String type); String guestOSVersionOptional(String optional); String guestOSVersionLinux(String distribution, String version, String codeName); String guestOSVersionWindows(String version, String build); String guestOSVersionWindowsServer(String version, String build); String positiveTimezoneOffset(String name, String hours, String minutes); String negativeTimezoneOffset(String name, String hours, String minutes); String bracketsWithGB(int value); String confirmDeleteFenceAgent(String agentDisplayString); String confirmDeleteAgentGroup(String agents); String failedToLoadOva(String ovaPath); String errataForHost(String hostName); String errataForVm(String vmName); String uploadImageFailedToStartMessage(String reason); String uploadImageFailedToResumeMessage(String reason); String uploadImageFailedToResumeSizeMessage(long priorFileBytes, long newFileBytes); String providerFailure(); }
[ "xuwei@cncloudsec.com" ]
xuwei@cncloudsec.com
d3255470d07bafa0d02ad4fda5e24293011a705e
f45d75214eee81a70768f05e85a8e3123a909b1b
/example-spring-boot-starter/src/main/java/com/gyoomi/example/autoconfigure/ExampleProperties.java
d7a9ea4b025d168cb9a6f883d8293c22a5b2ee32
[]
no_license
gyoomi/starter
1bfe157f9d9ea418d9aacde21acb12506522c5d2
028b3573fb12829a15423a123c8a85a62bd1cd5a
refs/heads/master
2023-03-03T09:28:01.456311
2021-01-21T06:52:09
2021-01-21T06:52:09
331,539,473
0
0
null
null
null
null
UTF-8
Java
false
false
878
java
/** * Copyright © 2020-2021, Glodon Digital Supplier & Purchaser BU. * <p> * All Rights Reserved. */ package com.gyoomi.example.autoconfigure; import org.springframework.boot.context.properties.ConfigurationProperties; import java.util.List; /** * Example - 配置类 * * @author Leon * @date 2021-01-21 10:33 */ @ConfigurationProperties(prefix = "example") public class ExampleProperties { /** * name */ private String name; /** * age */ private Integer age; /** * hobby */ private List<String> hobby; public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public List<String> getHobby() { return hobby; } public void setHobby(List<String> hobby) { this.hobby = hobby; } }
[ "gyoomi0709@foxmail.com" ]
gyoomi0709@foxmail.com
d8c9ab839963812a4f2791e6430d3b6853a99336
e7120cf2ddf3dbd3966cb3e51c0f8d226d5ad869
/.svn/pristine/f3/f3494ca420e33ae4b6b37d74d78be2adef54fc6a.svn-base
76e637f1956587bd2e492ea9e23380d230bc50da
[]
no_license
wankaiss/yljknb
f7e02565870f49b40ebc02f2a19b66354b26c00e
2e60bbb18a36fe656a41caff430df3d851583652
refs/heads/master
2021-01-10T01:37:52.793176
2015-10-29T10:04:37
2015-10-29T10:04:37
45,174,409
0
3
null
null
null
null
UTF-8
Java
false
false
1,917
package com.wondersgroup.local.k2.f10201001.vs; import java.util.Map; import com.wondersgroup.bc.medicarecostaudit.medaudit.model.dto.ZnshTjDTO; import com.wondersgroup.framework.core.bo.Page; public interface F10201001VS { /** * * @Title: queryZnshTj * @Description: 查询智能审核统计的结果 * @param @param baz020 智能审核时间 * @param @param isDay ture表示按年月日统计,false表示按照年月统计 * @param @return 设定文件 * @return ZnshTjDTO 返回类型 * @throws * @author chenlin * @date 2014-7-21 上午09:44:56 */ public ZnshTjDTO queryZnshTj(String baz020,boolean isDay); /** * * @Title: queryZhshMxTjWithYljg * @Description: 查询智能审核医疗机构的统计情况 * @param @param page 分页对象 * @param @param baz020 智能审核时间 * @param @param isDay ture表示按年月日统计,false表示按照年月统计 * @param @param isHosp 0表示统计医院和药店,1表示统计医院,-1表示统计药店 * @param @return 设定文件 * @return Map<String,Object> 返回类型 * @throws * @author chenlin * @date 2014-7-21 下午03:44:54 */ public Map<String,Object> queryZhshMxTjWithYljg(Page page,String baz020,boolean isDay,int isHosp); /** * * @Title: queryZhshMxTjWithGz * @Description: 查询智能审核规则的统计情况 * @param @param page 分页对象 * @param @param baz020 智能审核时间 * @param @param isDay ture表示按年月日统计,false表示按照年月统计 * @param @param isHosp 0表示统计医院和药店,1表示统计医院,-1表示统计药店 * @param @return 设定文件 * @return Map<String,Object> 返回类型 * @throws * @author chenlin * @date 2014-7-21 下午03:46:05 */ public Map<String,Object> queryZhshMxTjWithGz(Page page,String baz020,boolean isDay,int isHosp); }
[ "578634482@qq.com" ]
578634482@qq.com
34cbe662469fd76f1af845131da41ade918d01b0
080ffc71e7d38a96d3ff78cc88b6e1f7cd1616e3
/app/src/main/java/com/example/larry_sea/norember/utill/commonutils/GetPathFromUrikitkat.java
9798b749bfe62906507e4f5940b88789af6a7826
[]
no_license
luoyiqi/norember
fa305318b546f9d0b6d597cc7dcef814e0f1e923
b34f9af046a6c4ddad4b34d2b9e77dfad9d2f360
refs/heads/master
2021-07-16T12:21:53.860727
2017-10-22T15:05:24
2017-10-22T15:05:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,052
java
package com.example.larry_sea.norember.utill.commonutils; import android.annotation.SuppressLint; import android.content.ContentUris; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.os.Build; import android.os.Environment; import android.provider.DocumentsContract; import android.provider.MediaStore; /** * Created by Larry-sea on 10/7/2016. * <p> * <p> * android 4.4以后获取uri 中的文件路径工具类 */ public class GetPathFromUrikitkat { /** * 专为Android4.4设计的从Uri获取文件绝对路径,以前的方法已不好使 */ @SuppressLint("NewApi") public static String getPath(final Context context, final Uri uri) { final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; // DocumentProvider if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) { // ExternalStorageProvider if (isExternalStorageDocument(uri)) { final String docId = DocumentsContract.getDocumentId(uri); final String[] split = docId.split(":"); final String type = split[0]; if ("primary".equalsIgnoreCase(type)) { return Environment.getExternalStorageDirectory() + "/" + split[1]; } // TODO handle non-primary volumes } // DownloadsProvider else if (isDownloadsDocument(uri)) { final String id = DocumentsContract.getDocumentId(uri); final Uri contentUri = ContentUris.withAppendedId( Uri.parse("content://downloads/public_downloads"), Long.valueOf(id)); return getDataColumn(context, contentUri, null, null); } // MediaProvider else if (isMediaDocument(uri)) { final String docId = DocumentsContract.getDocumentId(uri); final String[] split = docId.split(":"); final String type = split[0]; Uri contentUri = null; if ("image".equals(type)) { contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; } else if ("video".equals(type)) { contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI; } else if ("audio".equals(type)) { contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; } final String selection = "_id=?"; final String[] selectionArgs = new String[]{split[1]}; return getDataColumn(context, contentUri, selection, selectionArgs); } } // MediaStore (and general) else if ("content".equalsIgnoreCase(uri.getScheme())) { return getDataColumn(context, uri, null, null); } // File else if ("file".equalsIgnoreCase(uri.getScheme())) { return uri.getPath(); } return null; } /** * Get the value of the data column for this Uri. This is useful for * MediaStore Uris, and other file-based ContentProviders. * * @param context The context. * @param uri The Uri to query. * @param selection (Optional) Filter used in the query. * @param selectionArgs (Optional) Selection arguments used in the query. * @return The value of the _data column, which is typically a file path. */ public static String getDataColumn(Context context, Uri uri, String selection, String[] selectionArgs) { Cursor cursor = null; final String column = "_data"; final String[] projection = {column}; try { cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null); if (cursor != null && cursor.moveToFirst()) { final int column_index = cursor.getColumnIndexOrThrow(column); return cursor.getString(column_index); } } finally { if (cursor != null) cursor.close(); } return null; } /** * @param uri The Uri to check. * @return Whether the Uri authority is ExternalStorageProvider. */ public static boolean isExternalStorageDocument(Uri uri) { return "com.android.externalstorage.documents".equals(uri.getAuthority()); } /** * @param uri The Uri to check. * @return Whether the Uri authority is DownloadsProvider. */ public static boolean isDownloadsDocument(Uri uri) { return "com.android.providers.downloads.documents".equals(uri.getAuthority()); } /** * @param uri The Uri to check. * @return Whether the Uri authority is MediaProvider. */ public static boolean isMediaDocument(Uri uri) { return "com.android.providers.media.documents".equals(uri.getAuthority()); } }
[ "lzh1994610@163.com" ]
lzh1994610@163.com
75ebd41685f264c4280e63ab13454e83783b3999
34867b96d902dfd45c5a1a5767a9fccdf38c5ff6
/src/com/org/dp/structural/bridge/Printer.java
b9cac41ac226a51cd0503366ffe2e3504a1ef875
[]
no_license
iamsubho76/CodeDesignPattern
08c9016524c179327d35ef13fc0687cce532dc62
524b683f0013e5a7d896e626a96107de31dafb55
refs/heads/master
2021-08-30T13:35:01.523074
2017-12-18T05:23:19
2017-12-18T05:23:19
114,598,945
0
0
null
null
null
null
UTF-8
Java
false
false
290
java
package com.org.dp.structural.bridge; import java.util.List; public abstract class Printer { public String print(Formatter formatter) { return formatter.format(getHeader(), getDetails()); } abstract protected List<Detail> getDetails(); abstract protected String getHeader(); }
[ "iamsubho76@gmail.com" ]
iamsubho76@gmail.com
bab9bcdea99f9e5337eb6c7401f97e7f2c7e303b
9552eeea8217e26ac5d2cdf8c197dbec231014fc
/src/main/java/com/selectica/Package201506161/definitions/CFR1BO/actions/ManageActivationCA3ActionScript.java
ec722174d4c1a35ecd5e3b965e5d29e2ba246791
[]
no_license
epavlovskaya/rcfLenaBaseDemo
05db6503c494b71edb4d748a00ef866fd7768ac2
3675d57a0fd6c2936e62b64606ad3c0f374e327d
refs/heads/master
2021-01-25T10:00:38.924510
2015-06-16T09:52:21
2015-06-16T09:52:21
37,266,126
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package com.selectica.Package201506161.definitions.CFR1BO.actions; import com.selectica.Package201506161.eclm.definitions.CFR1BO.actions.CreateNotificationAlertAction; import com.selectica.rcfscripts.AbstractBOWriteScript; /**CreateNotificationAlert*/ public class ManageActivationCA3ActionScript extends CreateNotificationAlertAction { }
[ "user@rcfproj.aws.selectica.net" ]
user@rcfproj.aws.selectica.net
852a6985d80ab931eb2a6560af58346de95d82e8
bb1503c44558a437f1f7f4015768768f400e3308
/src/com/fheebiy/http/lite/request/Request.java
b4858f3f28fdaa016f610123c1862a8030060181
[]
no_license
wxm419/fragment
a5fccd359c13bedc1d9b240cca74c72ad6b63787
a83cdb351881017278e459aeb719e8044528e3cc
refs/heads/master
2021-01-18T06:08:28.938947
2015-05-25T10:35:10
2015-05-25T10:35:10
37,634,829
1
0
null
2015-06-18T03:21:01
2015-06-18T03:21:01
null
UTF-8
Java
false
false
10,103
java
package com.fheebiy.http.lite.request; import com.fheebiy.http.lite.LiteHttpClient; import com.fheebiy.http.lite.data.Consts; import com.fheebiy.http.lite.data.NameValuePair; import com.fheebiy.http.lite.exception.HttpClientException; import com.fheebiy.http.lite.exception.HttpClientException.ClientException; import com.fheebiy.http.lite.listener.HttpListener; import com.fheebiy.http.lite.parser.DataParser; import com.fheebiy.http.lite.parser.StringParser; import com.fheebiy.http.lite.request.content.HttpBody; import com.fheebiy.http.lite.request.param.HttpMethod; import com.fheebiy.http.lite.request.param.HttpParam; import com.fheebiy.http.lite.request.query.AbstractQueryBuilder; import com.fheebiy.http.lite.request.query.JsonQueryBuilder; import java.io.UnsupportedEncodingException; import java.lang.reflect.InvocationTargetException; import java.net.URLEncoder; import java.util.LinkedHashMap; import java.util.List; import java.util.Map.Entry; /** * Base request for {@link LiteHttpClient} method * * @author MaTianyu * 2014-1-1下午9:51:59 */ public class Request { private static final String TAG = Request.class.getSimpleName(); /** * you can give an id to a request */ private long id; /** * custom tag of request */ private Object tag; /** * request abort */ protected Abortable abort; /** * url of http request */ private String url; /** * add custom header to request. */ private LinkedHashMap<String, String> headers; /** * key value parameters */ private LinkedHashMap<String, String> paramMap; /** * intelligently translate java object into mapping(k=v) parameters */ private HttpParam paramModel; /** * when parameter's value is complex, u can chose one buider, default mode * is build value into json string. */ private AbstractQueryBuilder queryBuilder; /** * defaul method is get(GET). */ private HttpMethod method; /** * charset of request */ private String charSet = Consts.DEFAULT_CHARSET; /** * max number of retry.. */ private int retryMaxTimes = LiteHttpClient.DEFAULT_MAX_RETRY_TIMES; /** * http inputsream parser */ private DataParser<?> dataParser; /** * body of post,put.. */ private HttpBody httpBody; /** * a callback of start,retry,redirect,loading,end,etc. */ private HttpListener httpListener; public Request(String url) { this(url, null); } public Request(String url, HttpParam paramModel) { this(url, paramModel, new StringParser(), null, null); } public Request(String url, HttpParam paramModel, DataParser<?> parser, HttpBody httpBody, HttpMethod method) { if (url == null) throw new RuntimeException("Url Cannot be Null."); this.url = url; this.paramModel = paramModel; this.queryBuilder = new JsonQueryBuilder(); setMethod(method); setDataParser(parser); setHttpBody(httpBody); } public long getId() { return id; } public void setId(long id) { this.id = id; } public Object getTag() { return tag; } public void setTag(Object tag) { this.tag = tag; } public Request addHeader(List<NameValuePair> nps) { if (nps != null) { if (headers == null) { headers = new LinkedHashMap<String, String>(); } for (NameValuePair np : nps) { headers.put(np.getName(), np.getValue()); } } return this; } public Request addHeader(String key, String value) { if (value != null) { if (headers == null) { headers = new LinkedHashMap<String, String>(); } headers.put(key, value); } return this; } /** * 获取消息体 */ public HttpBody getHttpBody() { return httpBody; } /** * 设置消息体:默认POST方式 */ public Request setHttpBody(HttpBody httpBody) { if (httpBody != null) { return setHttpBody(httpBody, HttpMethod.Post); } else { return this; } } /** * 设置消息体与请求方式 */ public Request setHttpBody(HttpBody httpBody, HttpMethod method) { setMethod(method); this.httpBody = httpBody; return this; } public Request addUrlParam(String key, String value) { if (value != null) { if (paramMap == null) { paramMap = new LinkedHashMap<String, String>(); } paramMap.put(key, value); } return this; } /** * if you setUrl as "www.tb.cn" . * you must add prifix "http://" or "https://" yourself. * * @param prifix * @throws HttpClientException */ public Request addUrlPrifix(String prifix) { setUrl(prifix + url); return this; } /** * if your url like this "http://tb.cn/i3.html" . * you can setUrl("http://tb.cn/") then addUrlSuffix("i3.html"). * * @param suffix * @throws HttpClientException */ public Request addUrlSuffix(String suffix) { setUrl(url + suffix); return this; } public String getRawUrl() { return url; } public String getUrl() throws HttpClientException { // check raw url if (url == null) throw new HttpClientException(ClientException.UrlIsNull); if (paramMap == null && paramModel == null) { return url; } try { StringBuilder sb = new StringBuilder(url); sb.append(url.contains("?") ? "&" : "?"); LinkedHashMap<String, String> map = getBasicParams(); int i = 0, size = map.size(); for (Entry<String, String> v : map.entrySet()) { sb.append(URLEncoder.encode(v.getKey(), charSet)).append("=").append(URLEncoder.encode(v.getValue(), charSet)).append(++i == size ? "" : "&"); } //if (Log.isPrint) Log.v(TAG, "lite request url: " + sb.toString()); return sb.toString(); } catch (Exception e) { throw new HttpClientException(e); } } public Request setUrl(String url) { this.url = url; return this; } /** * 融合hashmap和解析到的javamodel里的参数,即所有string 参数. */ public LinkedHashMap<String, String> getBasicParams() throws IllegalArgumentException, UnsupportedEncodingException, IllegalAccessException, InvocationTargetException { LinkedHashMap<String, String> map = new LinkedHashMap<String, String>(); if (paramMap != null) map.putAll(paramMap); LinkedHashMap<String, String> modelMap = queryBuilder.buildPrimaryMap(paramModel); if (modelMap != null) map.putAll(modelMap); return map; } public LinkedHashMap<String, String> getHeaders() { return headers; } public Request setHeaders(LinkedHashMap<String, String> headers) { this.headers = headers; return this; } public LinkedHashMap<String, String> getParamMap() { return paramMap; } public Request setParamMap(LinkedHashMap<String, String> paramMap) { this.paramMap = paramMap; return this; } public HttpParam getParamModel() { return paramModel; } public Request setParamModel(HttpParam paramModel) { this.paramModel = paramModel; return this; } public AbstractQueryBuilder getQueryBuilder() { return queryBuilder; } public Request setQueryBuilder(AbstractQueryBuilder queryBuilder) { this.queryBuilder = queryBuilder; return this; } public HttpMethod getMethod() { return method; } public Request setMethod(HttpMethod method) { if (method != null) { this.method = method; } else { this.method = HttpMethod.Get; } return this; } public String getCharSet() { return charSet; } public Request setCharSet(String charSet) { this.charSet = charSet; return this; } public int getRetryMaxTimes() { return retryMaxTimes; } public Request setRetryMaxTimes(int retryTimes) { this.retryMaxTimes = retryTimes; return this; } public DataParser<?> getDataParser() { return dataParser; } public Request setDataParser(DataParser<?> dataParser) { if (dataParser != null) { this.dataParser = dataParser; } else { this.dataParser = new StringParser(); } return this; } public void setAbort(Abortable abort) { this.abort = abort; } public void abort() { if (abort != null) abort.abort(); } public HttpListener getHttpListener() { return httpListener; } public void setHttpListener(HttpListener httpListener) { this.httpListener = httpListener; if (dataParser != null) dataParser.setHttpReadingListener(httpListener); } @Override public String toString() { return "\turl = " + url + "\n\tmethod = " + method + "\n\theaders = " + headers + "\n\tcharSet = " + charSet + "\n\tretryMaxTimes = " + retryMaxTimes + "\n\tparamModel = " + paramModel + "\n\tdataParser = " + (dataParser != null ? dataParser.getClass().getSimpleName() : "null") + "\n\tqueryBuilder = " + (queryBuilder != null ? queryBuilder.getClass().getSimpleName() : "null") + "\n\tparamMap = " + paramMap + "\n\thttpBody = " + httpBody; } public static interface Abortable { public void abort(); } }
[ "zhouwenbo550@163.com" ]
zhouwenbo550@163.com
240fbf2a6f9ea0ba6a5153b8451d288aae4745a8
402818a118d86a9e74a70403bd88a5d67600d563
/8.12/src/fitz/socket/SocketTest1.java
c82eaf1751807cbdc8d01ba6f75294c238f25b9c
[]
no_license
coin-mwk/DailyPractice
c8a8c1cb6a5592a68a0173302f9fe0a2fd84d158
b02401d848afc1378f8bad59e8a8f6b5289642e0
refs/heads/master
2023-02-02T12:30:23.465927
2020-12-24T07:09:06
2020-12-24T07:09:06
286,885,746
0
0
null
null
null
null
UTF-8
Java
false
false
1,255
java
package fitz.socket; import java.io.IOException; import java.io.OutputStream; import java.net.Socket; import java.nio.charset.StandardCharsets; /** * @author Fitz * @create 2020-08-22-10:14 下午 * * 1、创建一个客户端对象Socket,构造方法绑定服务器的IP地址和端口号 * 2、使用Socket中的方法getOutputStream()获取网络输出字节流OutputStreaam对象 * 3、使用网络输出字节流OutputStream对象的方法write,给服务器发送数据 * 4、使用Socket对象中的方法getInputStream()获取网络字节输入流InputStream对象 * 5、使用网络输入字节流InputStream对象中的方法read,读取服务器回写的数据 * 6、释放socket资源 * 注意: * 1、客户端和服务器端进行交互,必须使用Socket中提供的网络流,不能使用自己创建的流对象 * */ //TCP客户端 public class SocketTest1 { public static void main(String[] args) throws IOException { Socket socket = new Socket("127.0.0.1", 9955); OutputStream outputStream = socket.getOutputStream(); String message = "你好!"; outputStream.write(message.getBytes(StandardCharsets.UTF_8)); outputStream.close(); socket.close(); } }
[ "fitzdl@163.com" ]
fitzdl@163.com
bba7edb461e9a441b4ca85e8859fef98509b70bb
d437dd4af6811af76a1c39af5d733653b0aa69aa
/Cake-dao/src/test/java/com/zhangyuwei/cake/dao/cakeDaoMainTest.java
55320925fc14acd2988a4463b68db5adc775b65d
[]
no_license
zywds/CakeDB
e41c5d51cc9004914a3a9e23754fc46b26e8b6e2
1a12706d16b4f981d049e778c75857380167c9b9
refs/heads/master
2020-04-15T04:05:48.399074
2019-01-07T03:06:14
2019-01-07T03:06:36
164,371,061
0
0
null
null
null
null
UTF-8
Java
false
false
5,747
java
package com.zhangyuwei.cake.dao; import com.zhangyuwei.cake.entities.CakeInformation; import com.zhangyuwei.cake.entities.SmallTypeInformation; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; import java.util.*; @ContextConfiguration(locations = { "classpath:applicationContext.xml"}) @RunWith(SpringJUnit4ClassRunner.class) @Transactional @Rollback public class cakeDaoMainTest { @Autowired IcakeMainDao dao; //查询蛋糕有关的一切信息 @Test public void selectCakeInformationAll(){ System.out.println(dao.selectCakeInformationAll()); } //查询所有的商品 @Test public void selectInformation(){ System.out.println(dao.selectInformation()); } //查询蛋糕类别,蛋糕口味和糕信息表结合 @Test public void selectCaAndCaAndMo(){ Map<String,Object> map=new HashMap<String, Object>(); map.put("page",0);map.put("limit",2); System.out.println(dao.selectCaAndCaAndMo(map)); } //查询蛋糕类别,蛋糕口味和蛋糕信息表结合数量 //@Test /*public void selectCaAndCaAndMoCount(){ System.out.println(dao.selectCaAndCaAndMoCount()); }*/ //查询商品口味 @Test public void selectCakeInformationMouseType(){ System.out.println(dao.selectCakeInformationMouseType()); } //查询商品类型 @Test public void selectCakeInformationCakeType(){ System.out.println(dao.selectCakeInformationCakeType()); } //查询商品口味和商品类型 @Test public void selectCaAndCaAndMoNoPage(){ System.out.println(dao.selectCaAndCaAndMoNoPage()); } //添加数据到蛋糕信息表 @Test public void insertCakeInformation(){ CakeInformation cakeInformation=new CakeInformation(); cakeInformation.setcName("苹果");cakeInformation.setcNameEnglish("MangoJerrya"); cakeInformation.setcDecription("优质芒果的三种姿态");cakeInformation.setcPicture("3.jpg"); cakeInformation.setcDesc("利用富文本进行展示");cakeInformation.setCtId(1); cakeInformation.setMtId(2); int row=dao.insertCakeInformation(cakeInformation); if(row>0){ System.out.println("添加成功!"); } } //添加数据到蛋糕与蛋糕小类型对应表 @Test public void insertSmallTypeInformation(){ SmallTypeInformation smallTypeInformation=new SmallTypeInformation(); smallTypeInformation.setcId(1);smallTypeInformation.setStId(3); int row=dao.insertSmallTypeInformation(smallTypeInformation); if(row>0){ System.out.println("添加成功!"); } } //添加数据到蛋糕与蛋糕小类型对应表(多添加) @Test public void insertSmallTypeInformationSome(){ int[] arr={3,4}; List<SmallTypeInformation> smallTypeInformationList=new ArrayList<SmallTypeInformation>(); for (int i=0;i<2;i++){ smallTypeInformationList.add(new SmallTypeInformation(1,arr[i])); } if(dao.insertSmallTypeInformationSome(smallTypeInformationList)>=2){ System.out.println("添加成功!"); } } //获得最后一条数据的ID @Test public void selectLastId(){ System.out.println(dao.selectLastId().get(dao.selectLastId().size()-1).getcId()); //System.out.println(dao.selectLastId().size()); } //查询蛋糕小类型表 @Test public void selectSmallCakeType(){ System.out.println(dao.selectSmallCakeType()); } //根据蛋糕id查出蛋糕与蛋糕下类型对应表 @Test public void selectSmallTypeInformation(){ int cId=1; System.out.println(dao.selectSmallTypeInformation(cId)); } //修改蛋糕信息 @Test public void updateCakeInformationAll(){ CakeInformation cakeInformation=new CakeInformation(); cakeInformation.setcName("苹果");cakeInformation.setcNameEnglish("MangoJerrya"); cakeInformation.setcDecription("优质芒果的三种姿态");cakeInformation.setcPicture("3.jpg"); cakeInformation.setcDesc("利用富文本进行展示");cakeInformation.setCtId(1); cakeInformation.setMtId(2); int row=dao.updateCakeInformationAll(cakeInformation); if(row>0){ System.out.println("修改成功!"); } } //修改蛋糕与蛋糕小类型对应表 @Test public void updateSmallTypeInformation(){ int[] arr={1,2,3}; SmallTypeInformation smallTypeInformation=new SmallTypeInformation(); int row=0; for (int i=0;i<arr.length;i++){ smallTypeInformation.setcId(1);smallTypeInformation.setStId(arr[i]); dao.updateSmallTypeInformation(smallTypeInformation);row++; } if(row==arr.length){ System.out.println("修改成功!"); } } //根据id查询详情(富文本内容,不可以用url进行传值) @Test public void selectCakeInformationDescById(){ int cId=1; System.out.println(dao.selectCakeInformationDescById(cId)); } //根据ID删除蛋糕与小类型对应表中的数据 @Test public void deleteSmallTypeInformationbyId(){ int cId=1; if(dao.deleteSmallTypeInformationbyId(cId)>0){ System.out.println("删除成功!"); } } }
[ "736375819@qq.com" ]
736375819@qq.com
99ad699196fa94529fcc2d92ca80ad933890edce
88b0bac88fdbe9b3aa92a8f037389271a657943f
/AllergyIAPWS/src/com/allergyiap/dao/AllergyLevelDao.java
1607a86caf05108cd385b25b092d915be93f382e
[]
no_license
AllergyIAP/AllergyIAPWS
31950852c4b50dff87725a2acdf5c763fd067019
1205a5962ac469711f84029419eeb5074d04fc78
refs/heads/master
2020-06-11T13:16:20.187403
2016-11-28T20:43:54
2016-11-28T20:43:54
75,656,534
0
0
null
null
null
null
UTF-8
Java
false
false
3,441
java
package com.allergyiap.dao; import java.sql.ResultSet; import java.sql.SQLException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import com.allergyiap.beans.AllergyLevel; public class AllergyLevelDao extends Dao<AllergyLevel> { private static final String TABLE_NAME = "allergy_level"; private static String ID = "idallergy_level"; private static String ALLERGY_ID = "allergy_idallergy"; private static String CURRENT_LEVEL = "current_level"; private static String STATION = "STATION"; private static String DATE_START = "date_start"; private static String DATE_END = "date_end"; private static String FORECAST_LEVEL = "forecast_level"; /** * * @param bean */ @Override public void insert(AllergyLevel bean) { StringBuilder query = new StringBuilder(); query.append("INSERT INTO "); query.append(TABLE_NAME); query.append(" ("); query.append(ALLERGY_ID + ", "); query.append(CURRENT_LEVEL + ", "); query.append(STATION + ", "); query.append(DATE_START + ", "); query.append(DATE_END + ", "); query.append(FORECAST_LEVEL); query.append(") "); query.append("VALUES"); query.append(" ("); query.append(bean.getAlleryID() + ", "); query.append(bean.getCurrentLevel() + ", "); query.append(bean.getStation() + ", "); query.append(bean.getDateStart() + ", "); query.append(bean.getDateEnd() + ", "); query.append(bean.getForecastLevel()); query.append(") "); db.executeUpdate(query.toString()); } /** * */ @Override public void delete(int id) { StringBuilder query = new StringBuilder(); query.append("DELETE FROM "); query.append(TABLE_NAME); query.append(" WHERE "); query.append(ID + " = " + id); db.executeUpdate(query.toString()); } /** * * @param bean */ @Override public void update(AllergyLevel bean) { StringBuilder query = new StringBuilder(); query.append("UPDATE "); query.append(TABLE_NAME); query.append(" set "); query.append(ALLERGY_ID + " = " + bean.getAlleryID() + ", "); query.append(CURRENT_LEVEL + " = " + bean.getCurrentLevel() + ", "); query.append(STATION + " = " + bean.getStation() + ", "); query.append(DATE_START + " = " + bean.getDateStart() + ", "); query.append(DATE_END + " = " + bean.getDateEnd() + ", "); query.append(FORECAST_LEVEL + " = " + bean.getForecastLevel()); query.append(" WHERE "); query.append(ID + " = " + bean.getId()); db.executeUpdate(query.toString()); } /** * * @return */ @Override public List<AllergyLevel> getAll() { String selectQuery = "SELECT * FROM " + TABLE_NAME + ";"; return select(selectQuery); } private List<AllergyLevel> select(String query) { List<AllergyLevel> list = new ArrayList<>(); try { DateFormat df = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); ResultSet rs = db.execute(query); while (rs.next()) { long idlevel = rs.getLong(ID); long idallergy = rs.getLong(ALLERGY_ID); float curlevel = rs.getFloat(CURRENT_LEVEL); String station = rs.getString(STATION); String dateStart = df.format(rs.getDate(DATE_START)); String dateEnd = df.format(rs.getDate(DATE_END)); String forecastLevel = rs.getString(FORECAST_LEVEL); list.add(new AllergyLevel(idlevel, idallergy, curlevel, station, dateStart, dateEnd, forecastLevel)); } } catch (SQLException e) { e.printStackTrace(); } return list; } }
[ "100448facens@gmail.com" ]
100448facens@gmail.com
5b7097c9b8c188d47486a30d80c3dbb76b8259d3
941d2dcae7b610790599d3ed3354ac07a4348b89
/app/src/main/java/com/example/a90678/mm_2017_05_28_15_503/mainList/MainListModule.java
7939836ac4346d9d37056d3a500c169d6bd364a7
[]
no_license
kaixuanluo/MM_2017_05_28_15_505
e0a74452f555a5e5cc04cc341c8dd4793c2beb96
e25e8fd1c91bcca429b7f64cf56c80b3a3d96c63
refs/heads/master
2021-09-06T19:42:48.755177
2017-12-19T05:07:02
2017-12-19T05:07:02
114,721,439
0
0
null
null
null
null
UTF-8
Java
false
false
368
java
package com.example.a90678.mm_2017_05_28_15_503.mainList; import com.example.a90678.lkx_common_17_05_17_16_45.common.module.BaseApiServiceModule; /** * Created by 90678 on 2017/5/28. */ public class MainListModule { public static MainListService provideMainList(){ return BaseApiServiceModule.provideRetrofit().create(MainListService.class); } }
[ "906786621@qq.com" ]
906786621@qq.com
c37be06d997f7566d9efecda30880aa3ce3e300f
674fc963d05d3237dd5e0d85a1eba07388dec598
/sysgeho-web-core/src/main/code/referentiel/com/bondeko/sysgeho/ui/ref/controleur/TypRdvCtrl.java
96d1cc16214b77d2c331484fbc269dda3be7c3b5
[]
no_license
bondeko/SYSGEHO_1.0.0
b056622edcd2434e509f7cb81bc193f47437e283
1f90255c257521122119cd8e98b0d8eff6cccfb7
refs/heads/master
2021-01-19T02:14:43.275867
2017-04-18T14:26:57
2017-04-18T14:26:57
21,467,304
0
0
null
null
null
null
ISO-8859-2
Java
false
false
2,608
java
package com.bondeko.sysgeho.ui.ref.controleur; import java.util.List; import java.util.Map; import java.util.TreeMap; import com.bondeko.sysgeho.be.core.exception.SysGehoAppException; import com.bondeko.sysgeho.be.core.svco.base.IBaseSvco; import com.bondeko.sysgeho.be.ref.entity.TabTypRdv; import com.bondeko.sysgeho.ui.core.base.ServiceLocatorException; import com.bondeko.sysgeho.ui.core.base.SysGehoCtrl; import com.bondeko.sysgeho.ui.core.base.Traitement; import com.bondeko.sysgeho.ui.ref.util.RefSvcoDeleguate; import com.bondeko.sysgeho.ui.ref.util.RefTrt; import com.bondeko.sysgeho.ui.ref.vue.TypRdvVue; public class TypRdvCtrl extends SysGehoCtrl<TabTypRdv, TabTypRdv>{ /** * Nom du Bean managé par JSF dans le fichier de Configuration */ private static String nomManagedBean = "typRdvCtrl"; public TypRdvCtrl(){ defaultVue = new TypRdvVue(); } /** * Retourne le nom du Bean Managé par JSF dans le Fichier de Configuration * Utilile pour ne pas avoir a ecrire le nom des Beans en dur dans le Code * @return */ public String getNomManagedBean(){ return nomManagedBean; } public IBaseSvco<TabTypRdv> getEntitySvco() throws ServiceLocatorException{ return RefSvcoDeleguate.getSvcoTypRdv(); } public Class<TypRdvCtrl> getMyClass() { return TypRdvCtrl.class; } public String enregistrerModification(){ try { getEntitySvco().modifier(defaultVue.getEntiteCourante()); } catch (SysGehoAppException e) { e.printStackTrace(); } catch (ServiceLocatorException e) { e.printStackTrace(); } return "TypRdvDetails"; } @Override public List<Traitement> getListeTraitements() { String v$codeEntite = "TypRdv"; // Ensemble des traitements standards Map<String, Traitement> v$mapTrt = new TreeMap<String, Traitement>( RefTrt.getTrtStandards(v$codeEntite)); listeTraitements = Traitement.getOrderedTrt(v$mapTrt); return listeTraitements; } @Override public void buildListeTraitement(){ if(getMapTraitements() == null){ setMapTraitements(RefTrt.getTrtStandards("TypRdv")) ; } } @Override public List<TabTypRdv> rechercherParCritere(TabTypRdv p$entity) throws SysGehoAppException { try { super.setTimeOfLastSearch(); return RefSvcoDeleguate.getSvcoTypRdv().rechercherParCritere(p$entity); } catch (ServiceLocatorException e) { e.printStackTrace(); }catch (SysGehoAppException e) { SysGehoAppException sdr = new SysGehoAppException(e.getMessage()); throw sdr; } return null; } }
[ "b.nanfack@gmail" ]
b.nanfack@gmail
bc26817976d9f66afcbdd782d41716ac5a776ed7
aa047f0494e73d022077248f807217258e1d1d0d
/tzhehe/5-25/demo_database/src/com/tz/database/demo/Classes.java
685cdc5291de9c4bc0b8f6f434a3f38f35eaa1ec
[]
no_license
AbnerChenyi/April_PublicWork
1412bd482113e3bb8729132e14964e0572297f14
5a75c3a8314becf5fe53485f7690c2fad75ab004
refs/heads/master
2021-01-22T13:13:55.540762
2015-07-08T10:11:48
2015-07-08T10:11:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
package com.tz.database.demo; public class Classes { private int _id; private String _name; private String _createdate; public int get_id() { return _id; } public void set_id(int _id) { this._id = _id; } public String get_name() { return _name; } public void set_name(String _name) { this._name = _name; } public String get_createdate() { return _createdate; } public void set_createdate(String _createdate) { this._createdate = _createdate; } public Classes(String _name, String _createdate) { super(); this._name = _name; this._createdate = _createdate; } public Classes() { super(); } }
[ "158905138@qq.com" ]
158905138@qq.com