blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
3d9024443edecda90c6ba1995592be50dac15837
27f6a988ec638a1db9a59cf271f24bf8f77b9056
/Code-Hunt-data/users/User004/Sector3-Level1/attempt002-20140920-013048-winning3.java
5957ee0bae0786519e0d766c7f613f7ef41ea6b8
[]
no_license
liiabutler/Refazer
38eaf72ed876b4cfc5f39153956775f2123eed7f
991d15e05701a0a8582a41bf4cfb857bf6ef47c3
refs/heads/master
2021-07-22T06:44:46.453717
2017-10-31T01:43:42
2017-10-31T01:43:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
184
java
public class Program { public static int[] Puzzle(int[] a, int t) { for (int i = 0; i < a.length; i++){ if(Math.abs(a[i]) < t){ a[i] = 0; } } return a; } }
[ "liiabiia@yahoo.com" ]
liiabiia@yahoo.com
d648a77c8502a259e0844f03ba8146a146b9bfa6
f527ba6e2d7438ac3bc555bd4501b85ee0496479
/modules/core/src/com/haulmont/cuba/core/listener/BeforeDeleteEntityListener.java
52567f204b0308d43f1f06d67d6aadbf6418f8ce
[ "Apache-2.0" ]
permissive
Programmer095/cuba
c77d4dcf90ac1ba4f56078cced39154a460ae453
d92f6f140db4939f58195375cf0a751f88092cd2
refs/heads/master
2021-01-18T08:18:14.577636
2016-06-17T07:05:43
2016-06-17T07:07:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,096
java
/* * Copyright (c) 2008-2016 Haulmont. * * 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.haulmont.cuba.core.listener; import com.haulmont.cuba.core.entity.BaseEntity; /** * Defines the contract for handling of entities before they have been deleted or * marked as deleted in DB. * */ public interface BeforeDeleteEntityListener<T extends BaseEntity> { /** * Executes before the object has been deleted or marked as deleted in DB. * * @param entity deleted entity */ void onBeforeDelete(T entity); }
[ "krivopustov@haulmont.com" ]
krivopustov@haulmont.com
3f4ff9251dca1b385107e6ff8bab9b0aa0f959ba
fc6d06a587c5ff910d5361d1e0dd1e97285b0040
/BoardApp/src/board/model/QnA.java
2215140622fd6079f3224fabf758baa8c9ecf58b
[]
no_license
zino1187/javaee_workspace
1c36d8df1f169e4ad35da77a9087962c636e4b28
c496379f8438caf2232c0c570b3d6a7532ebf196
refs/heads/master
2023-01-31T20:45:19.896544
2020-12-15T08:43:45
2020-12-15T08:43:45
318,044,696
0
3
null
null
null
null
UTF-8
Java
false
false
1,218
java
package board.model; public class QnA { private int qna_id; private String writer; private String title; private String content; private String regdate; private int hit ; private int team; private int rank; private int depth; public int getQna_id() { return qna_id; } public void setQna_id(int qna_id) { this.qna_id = qna_id; } public String getWriter() { return writer; } public void setWriter(String writer) { this.writer = writer; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getRegdate() { return regdate; } public void setRegdate(String regdate) { this.regdate = regdate; } public int getHit() { return hit; } public void setHit(int hit) { this.hit = hit; } public int getTeam() { return team; } public void setTeam(int team) { this.team = team; } public int getRank() { return rank; } public void setRank(int rank) { this.rank = rank; } public int getDepth() { return depth; } public void setDepth(int depth) { this.depth = depth; } }
[ "zino1187@gmail.com" ]
zino1187@gmail.com
b27017dfabe61dc4ea54d03b368a706fd7ee1060
6baa09045c69b0231c35c22b06cdf69a8ce227d6
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201601/cm/Platform.java
68a411ee7f572dec6be2bdce45c2bbed91455511
[ "Apache-2.0" ]
permissive
remotejob/googleads-java-lib
f603b47117522104f7df2a72d2c96ae8c1ea011d
a330df0799de8d8de0dcdddf4c317d6b0cd2fe10
refs/heads/master
2020-12-11T01:36:29.506854
2016-07-28T22:13:24
2016-07-28T22:13:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,524
java
/** * Platform.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.adwords.axis.v201601.cm; /** * Represents Platform criterion. * <p>A criterion of this type can only be created using * an ID. * <span class="constraint AdxEnabled">This is enabled for * AdX.</span> */ public class Platform extends com.google.api.ads.adwords.axis.v201601.cm.Criterion implements java.io.Serializable { /* <span class="constraint ReadOnly">This field is read only and * will be ignored when sent to the API.</span> */ private java.lang.String platformName; public Platform() { } public Platform( java.lang.Long id, com.google.api.ads.adwords.axis.v201601.cm.CriterionType type, java.lang.String criterionType, java.lang.String platformName) { super( id, type, criterionType); this.platformName = platformName; } /** * Gets the platformName value for this Platform. * * @return platformName * <span class="constraint ReadOnly">This field is read only and * will be ignored when sent to the API.</span> */ public java.lang.String getPlatformName() { return platformName; } /** * Sets the platformName value for this Platform. * * @param platformName * <span class="constraint ReadOnly">This field is read only and * will be ignored when sent to the API.</span> */ public void setPlatformName(java.lang.String platformName) { this.platformName = platformName; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof Platform)) return false; Platform other = (Platform) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) && ((this.platformName==null && other.getPlatformName()==null) || (this.platformName!=null && this.platformName.equals(other.getPlatformName()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); if (getPlatformName() != null) { _hashCode += getPlatformName().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(Platform.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201601", "Platform")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("platformName"); elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201601", "platformName")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "jradcliff@google.com" ]
jradcliff@google.com
1b6a579ee14755ccee87b9c07c6c7c9182cda69d
dbf5adca095d04d7d069ecaa916e883bc1e5c73d
/x_okr_assemble_control/src/main/java/com/x/okr/assemble/control/ThisApplication.java
de1f3de85feeaf86ac8aabdddce46af5d1ba3c44
[ "BSD-3-Clause" ]
permissive
fancylou/o2oa
713529a9d383de5d322d1b99073453dac79a9353
e7ec39fc586fab3d38b62415ed06448e6a9d6e26
refs/heads/master
2020-03-25T00:07:41.775230
2018-08-02T01:40:40
2018-08-02T01:40:40
143,169,936
0
0
BSD-3-Clause
2018-08-01T14:49:45
2018-08-01T14:49:44
null
UTF-8
Java
false
false
2,782
java
package com.x.okr.assemble.control; import java.util.HashMap; import java.util.Map; import com.x.base.core.project.Context; import com.x.collaboration.core.message.Collaboration; import com.x.okr.assemble.control.service.OkrConfigSystemService; import com.x.okr.assemble.control.servlet.workimport.CacheImportFileStatus; import com.x.okr.assemble.control.timertask.ErrorIdentityCheckTask; import com.x.okr.assemble.control.timertask.St_CenterWorkCount; import com.x.okr.assemble.control.timertask.St_WorkReportContent; import com.x.okr.assemble.control.timertask.St_WorkReportStatus; import com.x.okr.assemble.control.timertask.WorkProgressConfirm; import com.x.okr.assemble.control.timertask.WorkReportCollectCreate; import com.x.okr.assemble.control.timertask.WorkReportCreate; public class ThisApplication { protected static Context context; public static Map<String, CacheImportFileStatus> importFileStatusMap = new HashMap<String, CacheImportFileStatus>(); public static Context context() { return context; } public static void init() { try { Collaboration.start(ThisApplication.context()); new OkrConfigSystemService().initAllSystemConfig(); // 每天凌晨2点执行一次 context().schedule(St_WorkReportContent.class, "0 0 2 * * ?"); // 每天凌晨2点30执行一次 context().schedule(St_WorkReportStatus.class, "0 30 2 * * ?"); // 每天5点至20点间,每10分钟执行一次 context().schedule(St_CenterWorkCount.class, "0 0/10 5-20 * * ?"); // 每天7点至17点间,每10分钟执行一次 context().schedule(WorkReportCreate.class, "* 0/10 7-17 * * ?"); // 每天7点至17点间,每小时执行一次 context().schedule(WorkProgressConfirm.class, "0 0 7-17/1 * * ?"); // 每天7点至17点间,每10分钟执行一次 context().schedule(WorkReportCollectCreate.class, "0 0/10 7-17 * * ?"); // 每天凌晨2点执行一次 context().schedule(ErrorIdentityCheckTask.class, "0 0 2 * * ?"); } catch (Exception e) { e.printStackTrace(); } } public static void destroy() { try { Collaboration.stop(); } catch (Exception e) { e.printStackTrace(); } } public static Map<String, CacheImportFileStatus> getImportFileStatusMap() { return importFileStatusMap; } public static void setImportFileStatusMap(Map<String, CacheImportFileStatus> importFileStatusMap) { ThisApplication.importFileStatusMap = importFileStatusMap; } /** * 根据用户姓名,获取一个用户登录信息缓存 * * @param name * @return */ public static CacheImportFileStatus getCacheImportFileStatusElementByKey(String key) { if (importFileStatusMap == null) { importFileStatusMap = new HashMap<String, CacheImportFileStatus>(); } return importFileStatusMap.get(key); } }
[ "caixiangyi2004@126.com" ]
caixiangyi2004@126.com
afc2bfdd693b09adf667c49ab7f4416f51b4eba5
8335afe80e5eac4dcf8332064cd39cebd03d1b8f
/app/src/main/java/com/vethics/loft/MyCoursesActivity.java
0af7672406af3cc974e7a9bd74f168892a6ed563
[]
no_license
VethicsGit/Loft
a55f5f017a04cf36955f21f6b0cef00c2d0bced6
6ebe298bfd0e1886d42d9a696733f153d29fd08d
refs/heads/master
2020-03-28T23:21:29.219076
2018-09-19T14:21:56
2018-09-19T14:21:56
146,724,564
0
0
null
null
null
null
UTF-8
Java
false
false
4,335
java
package com.vethics.loft; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.TabLayout; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.ImageView; import adapter.SettingsViewPagerAdapter; import fragment.MyCoursesFragment; public class MyCoursesActivity extends AppCompatActivity implements View.OnClickListener { TabLayout tabStudentProfile; ViewPager vpStudentProfile; ImageView ivStudentProfileEdit; ImageView ivStudentProfilePic; private MyCoursesFragment studentCourseHistoryFragment; private final String TAG = getClass().getCanonicalName(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my_courses); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); if (getSupportActionBar() != null) getSupportActionBar().setDisplayHomeAsUpEnabled(true); vpStudentProfile = (ViewPager) findViewById(R.id.vp_student_profile); tabStudentProfile = (TabLayout) findViewById(R.id.tab_student_profile); ivStudentProfileEdit = (ImageView) findViewById(R.id.iv_student_profile_edit); ivStudentProfilePic = (ImageView) findViewById(R.id.iv_profile_image); tabStudentProfile.setTabGravity(TabLayout.MODE_FIXED); tabStudentProfile.addTab(tabStudentProfile.newTab()); tabStudentProfile.addTab(tabStudentProfile.newTab()); tabStudentProfile.addTab(tabStudentProfile.newTab()); setupViewPager(vpStudentProfile); tabStudentProfile.setupWithViewPager(vpStudentProfile); fetchMyCourse(); tabStudentProfile.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { @Override public void onTabSelected(TabLayout.Tab tab) { /*View imageView = (ImageView) tab.getCustomView().findViewById(R.id.view_bottom_arrow); imageView.setVisibility(View.VISIBLE);*/ } @Override public void onTabUnselected(TabLayout.Tab tab) { /*View imageView = (ImageView) tab.getCustomView().findViewById(R.id.view_bottom_arrow); imageView.setVisibility(View.INVISIBLE);*/ } @Override public void onTabReselected(TabLayout.Tab tab) { } }); ivStudentProfileEdit.setOnClickListener(this); } private void fetchMyCourse() { } private void setupViewPager(ViewPager viewPager) { SettingsViewPagerAdapter adapter = new SettingsViewPagerAdapter(getSupportFragmentManager()); studentCourseHistoryFragment = new MyCoursesFragment(); adapter.addFragment(studentCourseHistoryFragment, "All"); studentCourseHistoryFragment = new MyCoursesFragment(); adapter.addFragment(studentCourseHistoryFragment, "Ongoing"); studentCourseHistoryFragment = new MyCoursesFragment(); adapter.addFragment(studentCourseHistoryFragment, "Completed"); viewPager.setAdapter(adapter); //viewPager.setCurrentItem(position); adapter.notifyDataSetChanged(); } @Override public void onClick(View v) { if (v == ivStudentProfileEdit) { Intent i = new Intent(MyCoursesActivity.this, StudentProfileActivity.class); startActivity(i); } } /* @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_student_profile, menu); return true; }*/ /* @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } */ }
[ "41325213+VethicsGit@users.noreply.github.com" ]
41325213+VethicsGit@users.noreply.github.com
ce2aa8efee56479fdb52f1b3e027b1eae45f1afe
6411daad1b586ffcd52d21223947aa6a9bc004fc
/jOOQ-meta/src/main/java/org/jooq/meta/DefaultEmbeddableColumnDefinition.java
d3eb58eeae37d782a321659b171104c3b701f01e
[ "Apache-2.0" ]
permissive
Butterblume654/jOOQ
c00aefbe84a4d74c3a52013ae99dd23e32514fa6
8a4d46deb3655ccc510b5bab65c2ad5e0288287e
refs/heads/main
2022-12-22T18:31:45.549211
2020-10-06T11:12:15
2020-10-06T11:12:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,355
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Other licenses: * ----------------------------------------------------------------------------- * Commercial licenses for this work are available. These replace the above * ASL 2.0 and offer limited warranties, support, maintenance, and commercial * database integrations. * * For more information, please visit: http://www.jooq.org/licenses * * * * * * * * * * * * * * * * */ package org.jooq.meta; /** * @author Lukas Eder */ public class DefaultEmbeddableColumnDefinition extends AbstractTypedElementDefinition<EmbeddableDefinition> implements EmbeddableColumnDefinition { private final ColumnDefinition referencingColumn; private final int position; public DefaultEmbeddableColumnDefinition(EmbeddableDefinition container, String definingColumnName, ColumnDefinition referencingColumn, int position) { super(container, definingColumnName, position, referencingColumn.getDefinedType(), referencingColumn.getComment()); this.referencingColumn = referencingColumn; this.position = position; } @Override public final int getPosition() { return position; } @Override public final ColumnDefinition getReferencingColumn() { return referencingColumn; } @Override public final int getReferencingColumnPosition() { return getReferencingColumn().getPosition(); } @Override public DataTypeDefinition getType() { return getReferencingColumn().getType(); } @Override public DataTypeDefinition getType(JavaTypeResolver resolver) { return getReferencingColumn().getType(resolver); } @Override public DataTypeDefinition getDefinedType() { return getReferencingColumn().getDefinedType(); } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
4225359d74418b42b03f8eb2bc24cbc5f0b175bc
799cce351010ca320625a651fb2e5334611d2ebf
/Data Set/Synthetic/Before/before_572.java
392ecc0e98fbd639ea44173fd62d10c30ad7ccb0
[]
no_license
dareenkf/SQLIFIX
239be5e32983e5607787297d334e5a036620e8af
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
refs/heads/main
2023-01-29T06:44:46.737157
2020-11-09T18:14:24
2020-11-09T18:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
276
java
public class Dummy { void sendRequest(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT COUNTRY_ID, COUNTRY_NAME, REGION_ID FROM COUNTRIES WHERE COUNTRY_NAME =" + var1+" AND REGION_ID =" + rand0); } }
[ "jahin99@gmail.com" ]
jahin99@gmail.com
a3aa3b20bff50120b9acb41e8d3ba56435be3008
b4fd9e8ca6b98286bbb6f7f38e27a26335104d88
/src/com/facebook/rti/mqtt/f/aq.java
768bba7f19e272d23d01cca34195707ce4d91112
[]
no_license
reverseengineeringer/com.facebook.orca
7101a9d29680feafd2155fff9c771f9c2d90c16c
fac06904e19e204c9561438e4890e76c6ee00830
refs/heads/master
2021-01-20T17:58:35.856231
2016-07-21T03:45:15
2016-07-21T03:45:15
63,834,677
3
3
null
null
null
null
UTF-8
Java
false
false
2,117
java
package com.facebook.rti.mqtt.f; import android.content.Intent; import com.facebook.rti.common.d.a; import com.facebook.rti.common.time.c; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import javax.annotation.concurrent.ThreadSafe; @ThreadSafe public final class aq implements ap { private final Map<String, ar> a = new HashMap(); private final c b; public aq(c paramc) { b = paramc; } public final String a() { return "M"; } public final void a(String paramString) { try { a.b("NotificationDeliveryStoreInMemory", "remove %s", new Object[] { paramString }); a.remove(paramString); return; } finally { paramString = finally; throw paramString; } } public final void a(String paramString, Intent paramIntent) { try { a.b("NotificationDeliveryStoreInMemory", "add %s", new Object[] { paramString }); a.put(paramString, new ar(paramIntent, paramString, b.a(), 0)); return; } finally { paramString = finally; throw paramString; } } public final List<av> b() { for (;;) { try { ArrayList localArrayList = new ArrayList(); Iterator localIterator = a.entrySet().iterator(); if (!localIterator.hasNext()) { break; } ar localar = (ar)((Map.Entry)localIterator.next()).getValue(); if (b < 10) { if ((a + 300000L < b.a()) || (a > b.a())) { b += 1; a = b.a(); a.b("NotificationDeliveryStoreInMemory", "checkAndUpdateRetryList found %s %d", new Object[] { d, Integer.valueOf(b) }); localArrayList.add(localar); } } else { localIterator.remove(); } } finally {} } return localList; } } /* Location: * Qualified Name: com.facebook.rti.mqtt.f.aq * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
4b8ee03900759e77550ec631d8e21d28efa40715
a72c559f74aeb6fde09c16210f03ec9626a9c590
/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/com/google/gwt/validation/client/impl/MessageInterpolatorContextImpl.java
b250eacad04695b568cc964e8615a183f862b409
[ "Apache-2.0" ]
permissive
ManfredTremmel/gwt-bean-validators
4437b40f5987243af47124416ad661aa246ce6cf
fed075f8746efd471e0a486de5f9aafd5716bd29
refs/heads/master
2021-04-15T04:54:50.749984
2020-02-22T21:21:57
2020-02-22T21:21:57
28,275,474
32
6
Apache-2.0
2020-02-22T21:21:22
2014-12-20T18:37:01
Java
UTF-8
Java
false
false
1,327
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.validation.client.impl; import javax.validation.metadata.ConstraintDescriptor; /** * Dummy to fix compile problems as long validation-api 1.0 implementation is part of gwt. * * @author Manfred Tremmel * */ public class MessageInterpolatorContextImpl extends de.knightsoftnet.validators.client.impl.MessageInterpolatorContextImpl { public MessageInterpolatorContextImpl(final ConstraintDescriptor<?> pconstraintDescriptor, final Object pvalue) { super(pconstraintDescriptor, pvalue); } }
[ "Manfred.Tremmel@iiv.de" ]
Manfred.Tremmel@iiv.de
af3057ca12f92e5ba4ec9d5e436f93b8f5db2c8e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_119314b9c502fbc6bc13e8cca8f66884c621b32f/RedminePersonProposalProvider/9_119314b9c502fbc6bc13e8cca8f66884c621b32f_RedminePersonProposalProvider_t.java
3ffa668615f0f6632b8567c6c05ae8e355dfc8f9
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,048
java
package net.sf.redmine_mylyn.internal.ui; import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import net.sf.redmine_mylyn.api.model.Configuration; import net.sf.redmine_mylyn.api.model.User; import net.sf.redmine_mylyn.core.RedmineRepositoryConnector; import net.sf.redmine_mylyn.core.RedmineStatusException; import net.sf.redmine_mylyn.core.RedmineUtil; import net.sf.redmine_mylyn.ui.RedmineUiPlugin; import org.eclipse.jface.fieldassist.IContentProposal; import org.eclipse.jface.fieldassist.IContentProposalProvider; import org.eclipse.mylyn.commons.net.AuthenticationCredentials; import org.eclipse.mylyn.commons.net.AuthenticationType; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.core.data.TaskData; import org.eclipse.mylyn.tasks.ui.TasksUi; public class RedminePersonProposalProvider implements IContentProposalProvider { private String currentUser; private Set<String> addressSet = null; private String repositoryUrl; private String connectorKind; private Map<String, String> proposals; private Configuration configuration; public RedminePersonProposalProvider(ITask task, TaskData taskData) { repositoryUrl = taskData.getRepositoryUrl(); connectorKind = taskData.getConnectorKind(); if (repositoryUrl != null && connectorKind != null) { TaskRepository repository = TasksUi.getRepositoryManager().getRepository(connectorKind, repositoryUrl); if (repository != null) { AbstractRepositoryConnector connector = TasksUi.getRepositoryConnector(connectorKind); if (connector!=null && connector instanceof RedmineRepositoryConnector) { try { configuration = ((RedmineRepositoryConnector)connector).getClientManager().getClient(repository).getConfiguration(); } catch (RedmineStatusException e) { RedmineUiPlugin.getLogService(getClass()).error(e, "Can't fetch repository configuration"); //$NON-NLS-1$ } } AuthenticationCredentials credentials = repository.getCredentials(AuthenticationType.REPOSITORY); if (credentials != null && credentials.getUserName().length() > 0) { currentUser = credentials.getUserName(); } } } } public RedminePersonProposalProvider(ITask task, TaskData taskData, Map<String, String> proposals) { this(task, taskData); this.proposals = proposals; } public IContentProposal[] getProposals(String contents, int position) { if (contents == null) { throw new IllegalArgumentException(); } String searchText = contents.toLowerCase(); Set<String> addressSet = new HashSet<String>(); for (String address : getAddressSet()) { if (address.toLowerCase().contains(searchText)) { addressSet.add(address); } } IContentProposal[] result = new IContentProposal[addressSet.size()]; int i = 0; for (final String address : addressSet) { result[i++] = new RedminePersonContentProposal( address, address.contains(currentUser), address, address.length()); } Arrays.sort(result); return result; } private Set<String> getAddressSet() { if (addressSet != null) { return addressSet; } addressSet = new HashSet<String>(); if (proposals != null && !proposals.isEmpty()) { for (Entry<String, String> entry : proposals.entrySet()) { String name = entry.getValue(); if (name!=null && !name.isEmpty()) { User user = null; if (configuration!=null && (user=configuration.getUsers().getById(RedmineUtil.parseIntegerId(entry.getKey())))!=null) { addressSet.add(RedmineUtil.formatUserPresentation(user.getLogin(), name)); } else { addressSet.add(RedmineUtil.formatUserPresentation(entry.getKey(), name)); } } } } return addressSet; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4c013171597f4358903b273658782dfcefb73918
631a1ca2202bde4e5c2d4749806b3e4f7d6cad13
/test/src/com/socialize/networks/facebook/FacebookAccess.java
bce60fa37b9badbfb0d7fd950f51a7843be8d0e2
[]
no_license
sromanuk/socialize-sdk-android
136629cd568b455c497c29d5f42542d3a7789c26
e4a3e9e329b806f51adb048ffec7e61eb23a5151
refs/heads/master
2021-01-18T05:28:23.578978
2013-03-21T16:34:49
2013-03-21T16:34:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,862
java
/* * Copyright (c) 2012 Socialize Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.socialize.networks.facebook; import com.socialize.SocializeAccess; import com.socialize.facebook.Facebook; /** * @author Jason Polites * */ @SuppressWarnings("deprecation") public class FacebookAccess { private static FacebookUtilsProxy originalFacebookUtilsProxy = FacebookUtils.proxy; public static void revertFacebookUtilsProxy() { FacebookUtils.proxy = originalFacebookUtilsProxy; } public static void setFacebookUtilsProxy(FacebookUtilsProxy proxy) { FacebookUtils.proxy = proxy; } public static void forceV2() { FacebookFacadeFactory.FORCE_V2 = true; } public static void setFacebook(Facebook proxy) { ((FacebookUtilsImpl)SocializeAccess.getBean("facebookUtils")).setFacebook(proxy); } }
[ "jason.polites@gmail.com" ]
jason.polites@gmail.com
41599bbee4af64a8fd8a294cce11f56a0b81d144
c864c88fb91d6c064f07d690cb861dbae6871e8f
/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/audit/OAuth20AccessTokenGrantRequestAuditResourceResolver.java
3ec3ec9f80fb9eea5098f889e4178eb1110ee7bd
[ "Apache-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
dfish3r/cas
48105b5343c5bcda471655a6402f1082766ca687
59250ab963c578827faa43fe9706647465ead741
refs/heads/master
2023-08-13T07:10:37.621496
2023-07-12T13:29:21
2023-07-12T13:29:21
219,347,438
0
0
Apache-2.0
2023-07-27T00:41:28
2019-11-03T18:36:56
Java
UTF-8
Java
false
false
1,952
java
package org.apereo.cas.support.oauth.web.audit; import org.apereo.cas.audit.AuditableExecutionResult; import org.apereo.cas.support.oauth.OAuth20Constants; import org.apereo.cas.support.oauth.web.response.accesstoken.ext.AccessTokenRequestContext; import lombok.val; import org.apache.commons.lang3.ArrayUtils; import org.apereo.inspektr.audit.spi.support.ReturnValueAsStringResourceResolver; import org.aspectj.lang.JoinPoint; import java.util.HashMap; /** * The {@link OAuth20AccessTokenGrantRequestAuditResourceResolver} for audit advice * weaved at {@link org.apereo.cas.support.oauth.web.response.accesstoken.ext.BaseAccessTokenGrantRequestExtractor#extract} join point. * * @author Dmitriy Kopylenko * @since 5.3.0 */ public class OAuth20AccessTokenGrantRequestAuditResourceResolver extends ReturnValueAsStringResourceResolver { @Override public String[] resolveFrom(final JoinPoint auditableTarget, final Object retval) { val auditResult = (AuditableExecutionResult) retval; val executionResult = auditResult.getExecutionResult(); if (executionResult.isPresent()) { val accessTokenRequest = (AccessTokenRequestContext) executionResult.get(); val tokenId = accessTokenRequest.getToken() == null ? "N/A" : accessTokenRequest.getToken().getId(); val values = new HashMap<>(); values.put("token", tokenId); values.put("client_id", accessTokenRequest.getRegisteredService().getClientId()); values.put("service", accessTokenRequest.getService().getId()); values.put("grant_type", accessTokenRequest.getGrantType().getType()); values.put("response_type", accessTokenRequest.getResponseType().getType()); values.put(OAuth20Constants.SCOPE, accessTokenRequest.getScopes()); return new String[]{auditFormat.serialize(values)}; } return ArrayUtils.EMPTY_STRING_ARRAY; } }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
e878a334958553378d641427469ce84bd8c9cc6e
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/baidu/mobads/container/rewardvideo/RunnableC2427w.java
2844f58f329ab0372dc1e9f146bcd704d4d3466c
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
642
java
package com.baidu.mobads.container.rewardvideo; import com.baidu.mobads.container.C2072aa; /* access modifiers changed from: package-private */ /* renamed from: com.baidu.mobads.container.rewardvideo.w */ public class RunnableC2427w implements Runnable { /* renamed from: a */ final /* synthetic */ C2421q f9503a; RunnableC2427w(C2421q qVar) { this.f9503a = qVar; } public void run() { C2072aa aaVar = this.f9503a.f9477f; C2421q qVar = this.f9503a; aaVar.startAnimation(qVar.m9569a(qVar.f9477f)); this.f9503a.f9477f.setVisibility(0); this.f9503a.f9476e = true; } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
3f704d267b8e65cc963353d25f1f83f5d2ff3930
419f3eaed329f1ebb0b87597f1f70f492c44dc80
/src/GroupReverse.java
7173cfe157428e31ac4b999c11c7c71ca8e7e655
[]
no_license
thisAAY/UVA
2329f4d30faa0f4e03e365585fde3d6f8a590c28
85de4dc27ae2e3bf6863619badbbd8fd7f8cf4c3
refs/heads/master
2020-03-08T17:01:13.168218
2015-03-07T16:30:33
2015-03-07T16:30:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,293
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.BitSet; /** * * @author Alejandro E. Garces */ public class GroupReverse { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException{ //BufferedReader in = new BufferedReader(new FileReader("pruebas.txt")); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); double p = Math.pow(10,18); System.out.println(p); while (true) { String[] input = in.readLine().split("[ ]+"); int n= Integer.parseInt(input[0]); if(n==0) break; StringBuilder output = new StringBuilder(); n=input[1].length()/n; for(int i=0;i<input[1].length();i+=n) output.append(new StringBuilder(input[1].substring(i, i+n)).reverse()); System.out.println(output); } in.close(); System.exit(0); } }
[ "allegea@gmail.com" ]
allegea@gmail.com
24cb81b783281af97ce77b0685f9bb1d7c26a8e8
16b5d51ab0409cbb5a1da9eacb9948a54acd6258
/app/src/main/java/com/haoche51/checker/entity/OfferEntity.java
a31d6fdbb808fdf344c2b2e2f85fb7f98841fbf8
[]
no_license
liyq1406/haochebang
c3405a537d4f695ca51cb26d7889e952c6965eea
12727fcca80c85aa9586bd58fe9b16c98fa1bf5b
refs/heads/master
2021-01-17T21:20:31.261785
2017-02-28T04:52:06
2017-02-28T04:52:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,172
java
package com.haoche51.checker.entity; /** * 报价 * Created by wfx on 2016/8/9. */ public class OfferEntity { /** * 报价 单位 “万元" */ private float price; /** * 车源标题 */ private String title; /** * 车商还是个人 */ private String agent; /** * 上牌时间 */ private String plate_time; /** * 行驶里程, 单位 "万公里" */ private float mile; public float getPrice() { return price; } public void setPrice(float price) { this.price = price; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAgent() { return agent; } public void setAgent(String agent) { this.agent = agent; } public String getPlate_time() { return plate_time; } public void setPlate_time(String plate_time) { this.plate_time = plate_time; } public float getMile() { return mile; } public void setMile(float mile) { this.mile = mile; } }
[ "pengxianglin@haoche51.com" ]
pengxianglin@haoche51.com
13a10da93242b019aa733b64deb58562969eb585
c9e0227c3958db89747488328bd2b255e54f008f
/solutions/0795. Number of Subarrays with Bounded Maximum/0795.java
48a5adb2252c16f999a9ed827fe61c0329337680
[]
no_license
XkhldY/LeetCode
2deba28b7491c36b4f224c3132fb89feea318832
94e23db2668615d9fe09e129a96c22ae4e83b9c8
refs/heads/main
2023-04-03T08:17:30.743071
2021-04-14T23:34:03
2021-04-14T23:34:03
358,136,537
1
0
null
2021-04-15T05:20:21
2021-04-15T05:20:21
null
UTF-8
Java
false
false
343
java
class Solution { public int numSubarrayBoundedMax(int[] A, int L, int R) { int ans = 0; int l = -1; int r = -1; for (int i = 0; i < A.length; ++i) { if (A[i] > R) // handle reset value l = i; if (A[i] >= L) // handle reset and needed value r = i; ans += r - l; } return ans; } }
[ "walkccray@gmail.com" ]
walkccray@gmail.com
3216980ac1c8e5ab5c048f140be1e4b6108a23b5
31c162e41d2dc2cec3b6c5cd815adfbb29507116
/common-modules/framework-lock/src/main/java/com/springframework/lock/config/CacheKeyGenerator.java
f0c9ffb432131ef973208a9f32f3e4087acb7e78
[]
no_license
P79N6A/cloud
c40bb1f52d5ba0e28a19383e3a4f5312e304f09d
b6b03f47ec879b84e6f932d4a8e115736e3f1110
refs/heads/master
2020-04-13T02:22:40.693674
2018-12-23T15:03:07
2018-12-23T15:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
356
java
package com.springframework.lock.config; import org.aspectj.lang.ProceedingJoinPoint; /** * key生成器 * * @author summer * @date 2018/03/22 */ public interface CacheKeyGenerator { /** * 获取AOP参数,生成指定缓存Key * * @param pjp PJP * @return 缓存KEY */ String getLockKey(ProceedingJoinPoint pjp); }
[ "xieshengrong@live.com" ]
xieshengrong@live.com
09083f55d658c44bd6a408559455e04a5ce84684
7dbbe21b902fe362701d53714a6a736d86c451d7
/BzenStudio-5.6/Source/com/zend/ide/p/d/u.java
3b0fe0849625608c1f623873e486cb01b524e8dd
[]
no_license
HS-matty/dev
51a53b4fd03ae01981549149433d5091462c65d0
576499588e47e01967f0c69cbac238065062da9b
refs/heads/master
2022-05-05T18:32:24.148716
2022-03-20T16:55:28
2022-03-20T16:55:28
196,147,486
0
0
null
null
null
null
UTF-8
Java
false
false
1,201
java
package com.zend.ide.p.d; import com.zend.ide.bd.c; import com.zend.ide.j.h; import com.zend.ide.j.s; import com.zend.ide.u.bd; import com.zend.ide.u.bh; import com.zend.ide.u.bi; import com.zend.ide.util.dj; import java.awt.event.ActionEvent; import java.io.File; import javax.swing.AbstractAction; import javax.swing.JComboBox; import javax.swing.JFileChooser; public class u extends AbstractAction { final bw a; protected u(bw parambw) { super("DirectoryComboBoxAction"); } public void actionPerformed(ActionEvent paramActionEvent) { File localFile = (File)bw.a(this.a).getSelectedItem(); if (localFile != null) { s locals = h.m.h(localFile.getPath()); if ((locals instanceof bh)) { bh localbh = (bh)locals; if (!localbh.v().h()) try { bd.a(c.b().h(), localbh, false, false, null); } catch (dj localdj) { return; } } } this.a.getFileChooser().setCurrentDirectory(localFile); } } /* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar * Qualified Name: com.zend.ide.p.d.u * JD-Core Version: 0.6.0 */
[ "byqdes@gmail.com" ]
byqdes@gmail.com
8d3f47d85b8cf938cffb4a3578895c751eff57cd
a52d6bb42e75ef0678cfcd291e5696a9e358fc4d
/af_webapp/src/main/java/org/kuali/kfs/module/cg/CGConstants.java
b817345666a28327b62cdf0be4e0a96dc5c1a8b6
[]
no_license
Ariah-Group/Finance
894e39cfeda8f6fdb4f48a4917045c0bc50050c5
ca49930ca456799f99aad57e1e974453d8fe479d
refs/heads/master
2021-01-21T12:11:40.987504
2016-03-24T14:22:40
2016-03-24T14:22:40
26,879,430
0
0
null
null
null
null
UTF-8
Java
false
false
3,403
java
/* * Copyright 2007 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.cg; import java.util.Calendar; /** * Constants specific to the Contracts and Grants module. */ public class CGConstants { public static final String CG_NAMESPACE_CODE = "KFS-CG"; /** * The key for the document error map to grab errors for the close document. */ public static final String CLOSE_DOCUMENT_TAB_ERRORS = "document.userInitiatedCloseDate"; public static final String SHORT_TIMESTAMP_FORMAT = "MM/dd/yyyy"; public static final String LONG_TIMESTAMP_FORMAT = "MM/dd/yyyy HH:mm:ss"; public static final int maximumPeriodLengthUnits = Calendar.YEAR; public static final String DATABASE_TRUE_VALUE = "Y"; public static final String DROPDOWN_LIST_SELECT = "select:"; public static final String MANUAL_BASE = "MN"; public static final String MODIFIED_TOTAL_DIRECT_COST = "MT"; public static final String ORG_REVIEW_NODE_NAME = "Org Review"; public static final String ORG_REVIEW_TEMPLATE_NAME = "KualiResearchOrgReviewTemplate"; // Research Risk Types public static final String RESEARCH_RISK_TYPE_ALL_COLUMNS = "A"; public static final String RESEARCH_RISK_TYPE_SOME_COLUMNS = "S"; public static final String RESEARCH_RISK_TYPE_DESCRIPTION = "D"; // Study Statuses public static final String RESEARCH_RISK_STUDY_STATUS_APPROVED = "A"; public static final String RESEARCH_RISK_STUDY_STATUS_PENDING = "P"; // Study Review Statuses public static final String RESEARCH_RISK_STUDY_REVIEW_EXEMPT = "X"; // Following are used in tags on Main Page. public static final String SUBMISSION_TYPE_CHANGE = "SUBMISSION_TYPE_CHANGE"; public static final String PROJECT_TYPE_OTHER = "PROJECT_TYPE_OTHER"; public static final String PURPOSE_RESEARCH = "PURPOSE_RESEARCH"; public static final String PURPOSE_OTHER = "PURPOSE_OTHER"; public static final String CONTACT_PERSON_PARAM = "PERSON_ROLE_CODE_CONTACT_PERSON"; public static final String CO_PROJECT_DIRECTOR_PARAM = "PERSON_ROLE_CODE_CO_PROJECT_DIRECTOR"; public static final String OTHER_PERSON_PARAM = "PERSON_ROLE_CODE_OTHER"; public static final String PROJECT_DIRECTOR_PARAM = "PERSON_ROLE_CODE_PROJECT_DIRECTOR"; public static final String MAXIMUM_ACCOUNT_RESPONSIBILITY_ID = "MAXIMUM_ACCOUNT_RESPONSIBILITY_ID"; public static class CGKimApiConstants{ public static final String AWARD_ROUTING_NODE_NAME = "Award"; public static final String MANAGEMENT_ROUTING_NODE_NAME = "Management"; public static final String UNPROCESSED_ROUTING_NODE_NAME = "Unprocessed"; } public static class SectionId{ public static final String PROPOSAL_RESEARCH_RISKS = "proposalResearchRisks"; } }
[ "code@ariahgroup.org" ]
code@ariahgroup.org
0b380471995c8e7daf2ebd6bf7f1df721d2f6461
ba3bf48f5055fabcf066f3597d8a0325d89f86a6
/dameng/hazelcast-persistence/.svn/pristine/0b/0b380471995c8e7daf2ebd6bf7f1df721d2f6461.svn-base
6e4cdc0bbb7e5a95688a8206e0349335a2da75ee
[]
no_license
rzs840707/EasyCache-TpcW
b04cb6f9846e78f8e597ab17cbfbe7a838e2cdc2
f390fa7a9f09bac52fdfcfd20feed924584dab46
refs/heads/master
2021-01-11T00:22:25.018813
2016-10-08T11:56:58
2016-10-08T11:56:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,081
/* * Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hazelcast.jmx; import com.hazelcast.core.EntryEvent; import com.hazelcast.core.EntryListener; import com.hazelcast.core.IMap; import com.hazelcast.query.Predicate; import com.hazelcast.query.SqlPredicate; import java.util.Collection; import java.util.Map; import java.util.Set; /** * @ali 2/11/13 */ @ManagedDescription("IMap") public class MapMBean extends HazelcastMBean<IMap> { private long totalAddedEntryCount; private long totalRemovedEntryCount; private long totalUpdatedEntryCount; private long totalEvictedEntryCount; private final EntryListener entryListener; private String listenerId; protected MapMBean(IMap managedObject, ManagementService service) { super(managedObject, service); objectName = createObjectName("Map", managedObject.getName()); entryListener = new EntryListener() { public void entryAdded(EntryEvent event) { totalAddedEntryCount++; } public void entryRemoved(EntryEvent event) { totalRemovedEntryCount++; } public void entryUpdated(EntryEvent event) { totalUpdatedEntryCount++; } public void entryEvicted(EntryEvent event) { totalEvictedEntryCount++; } }; listenerId = managedObject.addEntryListener(entryListener, false); } public void preDeregister() throws Exception { super.preDeregister(); managedObject.removeEntryListener(listenerId); } @ManagedAnnotation(value = "clear", operation = true) @ManagedDescription("Clear Map") public void clear(){ managedObject.clear(); } @ManagedAnnotation("name") @ManagedDescription("name of the map") public String getName(){ return managedObject.getName(); } @ManagedAnnotation("size") @ManagedDescription("size of the map") public int getSize(){ return managedObject.size(); } @ManagedAnnotation("config") @ManagedDescription("MapConfig") public String getConfig(){ return service.instance.getConfig().getMapConfig(managedObject.getName()).toString(); } @ManagedAnnotation("totalAddedEntryCount") public long getTotalAddedEntryCount(){ return totalAddedEntryCount; } @ManagedAnnotation("totalRemovedEntryCount") public long getTotalRemovedEntryCount() { return totalRemovedEntryCount; } @ManagedAnnotation("totalUpdatedEntryCount") public long getTotalUpdatedEntryCount() { return totalUpdatedEntryCount; } @ManagedAnnotation("totalEvictedEntryCount") public long getTotalEvictedEntryCount() { return totalEvictedEntryCount; } @ManagedAnnotation(value = "values", operation = true) public String values(String query){ Collection coll; if (query != null && !query.isEmpty()){ Predicate predicate = new SqlPredicate(query); coll = managedObject.values(predicate); } else { coll = managedObject.values(); } StringBuilder buf = new StringBuilder(); if (coll.size() == 0){ buf.append("Empty"); } else { buf.append("["); for (Object obj: coll){ buf.append(obj); buf.append(", "); } buf.replace(buf.length()-1, buf.length(), "]"); } return buf.toString(); } @ManagedAnnotation(value = "entrySet", operation = true) public String entrySet(String query){ Set<Map.Entry> entrySet; if (query != null && !query.isEmpty()){ Predicate predicate = new SqlPredicate(query); entrySet = managedObject.entrySet(predicate); } else { entrySet = managedObject.entrySet(); } StringBuilder buf = new StringBuilder(); if (entrySet.size() == 0){ buf.append("Empty"); } else { buf.append("["); for (Map.Entry entry: entrySet){ buf.append("{key:"); buf.append(entry.getKey()); buf.append(", value:"); buf.append(entry.getValue()); buf.append("}, "); } buf.replace(buf.length()-1, buf.length(), "]"); } return buf.toString(); } }
[ "duansky22@163.com" ]
duansky22@163.com
621a55bc7cb8cb637f6459231333d9580de61629
8380b5eb12e24692e97480bfa8939a199d067bce
/FlexiSpy/BlackBerry/2012-01-11_v.1.03.2/ProtSrv/src/com/vvt/protsrv/resource/ProtocolManagerTextResource.java
5617ec5d3654d15f16c6c0b0cf53fe47a56328c2
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
RamadhanAmizudin/malware
788ee745b5bb23b980005c2af08f6cb8763981c2
62d0035db6bc9aa279b7c60250d439825ae65e41
refs/heads/master
2023-02-05T13:37:18.909646
2023-01-26T08:43:18
2023-01-26T08:43:18
53,407,812
873
291
null
2023-01-26T08:43:19
2016-03-08T11:44:21
C++
UTF-8
Java
false
false
1,107
java
package com.vvt.protsrv.resource; public class ProtocolManagerTextResource { public static String ACTIVATION_ALREADY = "Activated already."; public static String APP_NOT_ACTIVATED = "Application is not activated."; public static String DEACTIVATION_ALREADY = "Deactivated already."; public static String SERVER_HASH_INCORRECT = "Server Hash doesn't match."; public static String UNABLE_CONNECT_SERVER = "Unable to connect to the server."; public static String SERVER_URL = "Server URL: "; public static String PROTOCOL_TIME_OUT_WITHOUT_TRY = "Time out!"; public static String PROTOCOL_TIME_OUT = "Protocol is time out! It will retry only 1 time."; public static String DELETE_EVENT_FAILED = "Cannot delete events from persistent store."; public static String COMMAND_SERV_MANAGER_BUSY = "The application is connecting to the server.\nPlease test connection again later."; public static String LOW_PHONE_MEMORY_INFO = "Phone memory low, event records may be lost\nPhone memory free: %0N Kb\nDatabase size: %1N Kb\nEvents will be collected once phone memory is available."; }
[ "rui@deniable.org" ]
rui@deniable.org
65e3f936f3ff939313fa020129985f4913bb9c50
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
/flakiness-predicter/input_data/original_tests/ninjaframework-ninja/nonFlakyMethods/ninja.utils.NinjaPropertiesImplTest-testPropertiesBoundInGuice.java
abc0d780bfad8a9e4944e879f7613355793e6cef
[ "BSD-3-Clause" ]
permissive
Taher-Ghaleb/FlakeFlagger
6fd7c95d2710632fd093346ce787fd70923a1435
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
refs/heads/main
2023-07-14T16:57:24.507743
2021-08-26T14:50:16
2021-08-26T14:50:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
@Test public void testPropertiesBoundInGuice(){ final NinjaPropertiesImpl props=new NinjaPropertiesImpl(NinjaMode.dev); MockService service=Guice.createInjector(new AbstractModule(){ @Override protected void configure(){ props.bindProperties(binder()); } } ).getInstance(MockService.class); assertNotNull("Application secret not set by Guice",service.applicationSecret); assertEquals("secret",service.applicationSecret); }
[ "aalsha2@masonlive.gmu.edu" ]
aalsha2@masonlive.gmu.edu
326fb44883ce6f8c2f655d484eb1ee1a8bdbf3ff
6dc3e20ab05923c125628df11cceef26b94b39ff
/src/main/java/org/hl7/v3/PRPAMT201310UV02Subject4.java
be661e9839d5b613deb3386f4f79904092727594
[]
no_license
joaoamilcar/barramento-cns
11ecccaa44a58dec1f8070c81401312d8a9f60ef
6349bb8c7de8fbf2dc946696380748bd65686c48
refs/heads/master
2021-01-10T09:52:42.688073
2016-02-25T17:33:21
2016-02-25T17:33:21
52,538,172
2
2
null
null
null
null
UTF-8
Java
false
false
5,954
java
package org.hl7.v3; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Classe Java de PRPA_MT201310UV02.Subject4 complex type. * * <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe. * * <pre> * &lt;complexType name="PRPA_MT201310UV02.Subject4"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;group ref="{urn:hl7-org:v3}InfrastructureRootElements"/> * &lt;element name="administrativeObservation" type="{urn:hl7-org:v3}PRPA_MT201310UV02.AdministrativeObservation"/> * &lt;/sequence> * &lt;attGroup ref="{urn:hl7-org:v3}InfrastructureRootAttributes"/> * &lt;attribute name="nullFlavor" type="{urn:hl7-org:v3}NullFlavor" /> * &lt;attribute name="typeCode" use="required" type="{urn:hl7-org:v3}ParticipationTargetSubject" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PRPA_MT201310UV02.Subject4", propOrder = { "realmCode", "typeId", "templateId", "administrativeObservation" }) public class PRPAMT201310UV02Subject4 { protected List<CS> realmCode; protected II typeId; protected List<II> templateId; @XmlElement(required = true, nillable = true) protected PRPAMT201310UV02AdministrativeObservation administrativeObservation; @XmlAttribute(name = "nullFlavor") protected List<String> nullFlavor; @XmlAttribute(name = "typeCode", required = true) protected ParticipationTargetSubject typeCode; /** * Gets the value of the realmCode property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the realmCode property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRealmCode().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link CS } * * */ public List<CS> getRealmCode() { if (realmCode == null) { realmCode = new ArrayList<CS>(); } return this.realmCode; } /** * Obtém o valor da propriedade typeId. * * @return * possible object is * {@link II } * */ public II getTypeId() { return typeId; } /** * Define o valor da propriedade typeId. * * @param value * allowed object is * {@link II } * */ public void setTypeId(II value) { this.typeId = value; } /** * Gets the value of the templateId property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the templateId property. * * <p> * For example, to add a new item, do as follows: * <pre> * getTemplateId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link II } * * */ public List<II> getTemplateId() { if (templateId == null) { templateId = new ArrayList<II>(); } return this.templateId; } /** * Obtém o valor da propriedade administrativeObservation. * * @return * possible object is * {@link PRPAMT201310UV02AdministrativeObservation } * */ public PRPAMT201310UV02AdministrativeObservation getAdministrativeObservation() { return administrativeObservation; } /** * Define o valor da propriedade administrativeObservation. * * @param value * allowed object is * {@link PRPAMT201310UV02AdministrativeObservation } * */ public void setAdministrativeObservation(PRPAMT201310UV02AdministrativeObservation value) { this.administrativeObservation = value; } /** * Gets the value of the nullFlavor property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the nullFlavor property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNullFlavor().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getNullFlavor() { if (nullFlavor == null) { nullFlavor = new ArrayList<String>(); } return this.nullFlavor; } /** * Obtém o valor da propriedade typeCode. * * @return * possible object is * {@link ParticipationTargetSubject } * */ public ParticipationTargetSubject getTypeCode() { return typeCode; } /** * Define o valor da propriedade typeCode. * * @param value * allowed object is * {@link ParticipationTargetSubject } * */ public void setTypeCode(ParticipationTargetSubject value) { this.typeCode = value; } }
[ "joaoamilcar@gmail.com" ]
joaoamilcar@gmail.com
270238bae95829e1b5744417315b416250387230
5c901d064a30f3be4c3a25a29ee293689e024033
/Java/TP/Workspace/Java avancé/Cours/Book/Exercices/Chapitre11/SapinIG/GestionAction.java
f5f27046dc6134eec8d2945264a90d9076439847
[]
no_license
BRICOMATA9/Teaching
13ea3486dce38d7f547a766f8d99da8123977473
d2e5ea4ffed566f2d0e68138f45a18289acf0d24
refs/heads/master
2022-03-01T01:29:14.844873
2019-11-02T11:08:48
2019-11-02T11:08:48
177,467,808
1
0
null
null
null
null
UTF-8
Java
false
false
591
java
/* # Le livre de Java, premier langage # A. Tasso # Chapitre 11 : Dessiner des objets # Exercice : 11.3 et 11.4 # Fichier : GestionAction.java # Class : GestionAction */ import java.awt.*; import java.awt.event.*; public class GestionAction implements ActionListener { private int n; private Dessin d; public GestionAction( int n, Dessin d) { this.n = n; this.d = d; } public void actionPerformed(ActionEvent e) { switch (n) { case 2 : System.exit(0); break; case 1 : d.nouveau(); break; } } }
[ "githubfortyuds@gmail.com" ]
githubfortyuds@gmail.com
d80b6941839e75bd7c557956a1da19252033870a
2edbc7267d9a2431ee3b58fc19c4ec4eef900655
/AL-Game/src/com/aionemu/gameserver/model/instancerift/InstanceRiftStateType.java
e7ecc41fa3c45d99acbc455d7a61e1c240db9783
[]
no_license
EmuZONE/Aion-Lightning-5.1
3c93b8bc5e63fd9205446c52be9b324193695089
f4cfc45f6aa66dfbfdaa6c0f140b1861bdcd13c5
refs/heads/master
2020-03-08T14:38:42.579437
2018-04-06T04:18:19
2018-04-06T04:18:19
128,191,634
1
1
null
null
null
null
UTF-8
Java
false
false
839
java
/* * This file is part of Encom. **ENCOM FUCK OTHER SVN** * * Encom is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Encom is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with Encom. If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.model.instancerift; /** * @author Rinzler (Encom) */ public enum InstanceRiftStateType { OPEN, CLOSED; }
[ "naxdevil@gmail.com" ]
naxdevil@gmail.com
c01ee5ebb873a8b0e0ab8d1bdb12a84bf00484a6
31455637f007fd29304ee7c803045397a2812e11
/app/src/main/java/io/merculet/domain/EventDataBean.java
049e76d67484a7baf771b924d48a18f3cc12eca4
[ "Apache-2.0" ]
permissive
Merculet/UAVAndroidSDK
326bdc176215091ae52ff5e81c1db995f648ee47
4b2d4c67679fef3799800bef8aeb9befa225bdf7
refs/heads/master
2020-03-12T07:47:29.344629
2018-11-09T03:34:52
2018-11-09T03:34:52
130,513,694
4
1
null
null
null
null
UTF-8
Java
false
false
177
java
package io.merculet.domain; import java.io.Serializable; import java.util.List; public class EventDataBean implements Serializable { public List<EventHistoryBean> datas; }
[ "fengzhizi715@126.com" ]
fengzhizi715@126.com
52d26f7a1266e4c84ed3dde80070c9b6a4d38b03
7bc365d7f3b8a3f8dc15bdfae1e4cca6669c1760
/src/exams/_2017_07_23_Hell/hell/factories/Factory.java
8a9c7e5724273a4eefe1571dbec7de002c909415
[]
no_license
nataliya-stoichevska/JavaFundamentals_JavaOOPAdvanced
72536ea5de7ea950c0fe3e027bf18c3a75f1d40c
6de00af47e666d4d49933d7499073519e15155f5
refs/heads/master
2022-01-28T03:59:06.988945
2018-09-04T08:14:25
2018-09-04T08:14:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
292
java
package exams._2017_07_23_Hell.hell.factories; import java.lang.reflect.InvocationTargetException; public interface Factory<T> { T create(String... args) throws ClassNotFoundException, IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException; }
[ "stojcevskanatalija8@gmail.com" ]
stojcevskanatalija8@gmail.com
2bc2643b26b62158edc3b7a2f59c0e06ae35bfbd
837a002eb1f53ac2f0d5e1194137a4a097bc113f
/desktopapp/ReservationDiscardInfoMonitor/src/com/worgsoft/ykk/persistence/RecordSetColumn.java
56eaeffa6fb048acd077264f28c31f984438b44b
[]
no_license
FlashChenZhi/ykk_sz_gm
560e476af244f0eab17508c3e0f701df768b5d36
b3cdd25e96be72201ede5aaf0c1897a4c38b07f2
refs/heads/master
2021-09-27T18:48:19.800606
2018-11-10T14:24:48
2018-11-10T14:24:48
156,988,072
0
1
null
null
null
null
UTF-8
Java
false
false
333
java
package com.worgsoft.ykk.persistence; final public class RecordSetColumn { private final String name; private final String value; public RecordSetColumn(String name, String value) { this.name = name; this.value = value; } public String getName() { return name; } public String getValue() { return value; } }
[ "yutao81@live.cn" ]
yutao81@live.cn
5360a5ea0c3502cc8a1c4216612401d623046e0c
6880bcea7a1d127440a3537beb196ac9c2490740
/src/main/java/com/adias/fap/web/rest/TransporterResource.java
db2c5f3fc70aecb36f2f57fc3c20b77a408c6360
[]
no_license
fapadias/fap
f5b3d35b1df6148b6008c0f4763e6be8d03f35fa
e8275f1bdad0471a5ef3fc0c92e409b7da4aee69
refs/heads/master
2020-03-07T00:10:26.710625
2018-03-28T15:41:36
2018-03-28T15:41:36
127,151,429
0
0
null
2018-03-28T15:41:37
2018-03-28T14:19:19
Java
UTF-8
Java
false
false
4,810
java
package com.adias.fap.web.rest; import com.codahale.metrics.annotation.Timed; import com.adias.fap.service.TransporterService; import com.adias.fap.web.rest.errors.BadRequestAlertException; import com.adias.fap.web.rest.util.HeaderUtil; import com.adias.fap.service.dto.TransporterDTO; import io.github.jhipster.web.util.ResponseUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Optional; /** * REST controller for managing Transporter. */ @RestController @RequestMapping("/api") public class TransporterResource { private final Logger log = LoggerFactory.getLogger(TransporterResource.class); private static final String ENTITY_NAME = "transporter"; private final TransporterService transporterService; public TransporterResource(TransporterService transporterService) { this.transporterService = transporterService; } /** * POST /transporters : Create a new transporter. * * @param transporterDTO the transporterDTO to create * @return the ResponseEntity with status 201 (Created) and with body the new transporterDTO, or with status 400 (Bad Request) if the transporter has already an ID * @throws URISyntaxException if the Location URI syntax is incorrect */ @PostMapping("/transporters") @Timed public ResponseEntity<TransporterDTO> createTransporter(@RequestBody TransporterDTO transporterDTO) throws URISyntaxException { log.debug("REST request to save Transporter : {}", transporterDTO); if (transporterDTO.getId() != null) { throw new BadRequestAlertException("A new transporter cannot already have an ID", ENTITY_NAME, "idexists"); } TransporterDTO result = transporterService.save(transporterDTO); return ResponseEntity.created(new URI("/api/transporters/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) .body(result); } /** * PUT /transporters : Updates an existing transporter. * * @param transporterDTO the transporterDTO to update * @return the ResponseEntity with status 200 (OK) and with body the updated transporterDTO, * or with status 400 (Bad Request) if the transporterDTO is not valid, * or with status 500 (Internal Server Error) if the transporterDTO couldn't be updated * @throws URISyntaxException if the Location URI syntax is incorrect */ @PutMapping("/transporters") @Timed public ResponseEntity<TransporterDTO> updateTransporter(@RequestBody TransporterDTO transporterDTO) throws URISyntaxException { log.debug("REST request to update Transporter : {}", transporterDTO); if (transporterDTO.getId() == null) { return createTransporter(transporterDTO); } TransporterDTO result = transporterService.save(transporterDTO); return ResponseEntity.ok() .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, transporterDTO.getId().toString())) .body(result); } /** * GET /transporters : get all the transporters. * * @return the ResponseEntity with status 200 (OK) and the list of transporters in body */ @GetMapping("/transporters") @Timed public List<TransporterDTO> getAllTransporters() { log.debug("REST request to get all Transporters"); return transporterService.findAll(); } /** * GET /transporters/:id : get the "id" transporter. * * @param id the id of the transporterDTO to retrieve * @return the ResponseEntity with status 200 (OK) and with body the transporterDTO, or with status 404 (Not Found) */ @GetMapping("/transporters/{id}") @Timed public ResponseEntity<TransporterDTO> getTransporter(@PathVariable Long id) { log.debug("REST request to get Transporter : {}", id); TransporterDTO transporterDTO = transporterService.findOne(id); return ResponseUtil.wrapOrNotFound(Optional.ofNullable(transporterDTO)); } /** * DELETE /transporters/:id : delete the "id" transporter. * * @param id the id of the transporterDTO to delete * @return the ResponseEntity with status 200 (OK) */ @DeleteMapping("/transporters/{id}") @Timed public ResponseEntity<Void> deleteTransporter(@PathVariable Long id) { log.debug("REST request to delete Transporter : {}", id); transporterService.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
52df9c57ed53832a74743953746cfe061f7029a5
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes8.dex_source_from_JADX/com/facebook/photos/pandora/common/data/PandoraSlicedFeedResult.java
48cfd097f4e1b90f3ad6700cb27c9b3c2e9c524f
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
1,886
java
package com.facebook.photos.pandora.common.data; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import com.facebook.flatbuffers.helpers.FlatBufferModelHelper; import com.facebook.graphql.model.GraphQLPageInfo; import com.facebook.graphql.modelutil.ImmutableListHelper; import com.facebook.photos.pandora.common.data.model.PandoraDataModel; import com.google.common.collect.ImmutableList; import javax.annotation.Nullable; /* compiled from: composer_submit_button_tapped_with_short_review */ public class PandoraSlicedFeedResult implements Parcelable { public static final Creator<PandoraSlicedFeedResult> CREATOR = new C18451(); @Nullable public final GraphQLPageInfo f17360a; public final ImmutableList<PandoraDataModel> f17361b; /* compiled from: composer_submit_button_tapped_with_short_review */ final class C18451 implements Creator<PandoraSlicedFeedResult> { C18451() { } public final Object createFromParcel(Parcel parcel) { return new PandoraSlicedFeedResult(parcel); } public final Object[] newArray(int i) { return new PandoraSlicedFeedResult[i]; } } public PandoraSlicedFeedResult(@Nullable GraphQLPageInfo graphQLPageInfo, ImmutableList<PandoraDataModel> immutableList) { this.f17360a = graphQLPageInfo; this.f17361b = immutableList; } public PandoraSlicedFeedResult(Parcel parcel) { this.f17360a = (GraphQLPageInfo) FlatBufferModelHelper.a(parcel); this.f17361b = ImmutableListHelper.a(parcel.readArrayList(PandoraDataModel.class.getClassLoader())); } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int i) { FlatBufferModelHelper.a(parcel, this.f17360a); parcel.writeList(this.f17361b); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
1f764ed3e4c5d077fa666de9b0fffdaa70d64ea1
c70148e6e0f5a23309dbb78c74e6f9a7f4edeeaa
/org.modeldriven.alf/src/org/modeldriven/alf/fuml/mapping/statements/SwitchStatementMapping.java
1bd6eda0b11dfe320508ebd2bbab7823d6ae447e
[]
no_license
lschuetze/Alf-Reference-Implementation
9fdf03c23e8c98a97a216a5df0c6e9857395ff52
c1390c5898a16862af38b1413050ce9b3b294692
refs/heads/master
2021-01-17T09:31:48.014486
2016-02-22T20:02:08
2016-02-22T20:02:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,186
java
/******************************************************************************* * Copyright 2011, 2012 Data Access Technologies, Inc. (Model Driven Solutions) * All rights reserved worldwide. This program and the accompanying materials * are made available for use under the terms of the GNU General Public License * (GPL) version 3 that accompanies this distribution and is available at * http://www.gnu.org/licenses/gpl-3.0.html. For alternative licensing terms, * contact Model Driven Solutions. *******************************************************************************/ package org.modeldriven.alf.fuml.mapping.statements; import org.modeldriven.alf.fuml.mapping.ActivityGraph; import org.modeldriven.alf.fuml.mapping.FumlMapping; import org.modeldriven.alf.fuml.mapping.expressions.ExpressionMapping; import org.modeldriven.alf.mapping.Mapping; import org.modeldriven.alf.mapping.MappingError; import org.modeldriven.alf.syntax.expressions.Expression; import org.modeldriven.alf.syntax.statements.Block; import org.modeldriven.alf.syntax.statements.SwitchClause; import org.modeldriven.alf.syntax.statements.SwitchStatement; import org.modeldriven.alf.uml.*; import java.util.ArrayList; import java.util.Collection; import java.util.List; public class SwitchStatementMapping extends ConditionalStatementMapping { /** * Clauses * * 1. A switch statement maps to a structured activity node that * contains a conditional node and the mapping for the switch expression. * The switch clauses map to concurrent clauses of the conditional node. * Each clause tests whether the result of the switch expression equals the * result of one of the case expressions. * * 2. A switch default clause is mapped to a conditional node clause with a * condition of true and with all other clauses as predecessor clauses. * * 3. The isAssured and/or isDetermined properties of the conditional node * are set according to whether the switch statement is assured or * determined.. * * Output Pins * * 4. The result and clause body output pins of the conditional node are * mapped as for an if statement. */ // NOTE: See ConditionalStatementMapping for implementation of mapping // common to if and switch statements. See also SwitchClausesMapping. @Override public void map()throws MappingError { super.map(); SwitchStatement statement = this.getSwitchStatement(); ActivityGraph graph = this.createActivityGraph(); ConditionalNode node = this.create(ConditionalNode.class); node.setName("Conditional(SwitchStatement@" + statement.getId() + ")"); graph.add(node); List<String> assignedNames = this.mapConditionalNode(node, graph); Collection<Clause> clauses = new ArrayList<Clause>(); Expression expression = statement.getExpression(); FumlMapping mapping = this.fumlMap(expression); if (!(mapping instanceof ExpressionMapping)) { this.throwError("Error mapping switch expression: " + mapping.getErrorMessage()); } else { ExpressionMapping expressionMapping = (ExpressionMapping)mapping; ActivityNode resultSource = expressionMapping.getResultSource(); ActivityNode switchNode = graph.addStructuredActivityNode( "Switch((SwitchStatement@" + statement.getId() + ")", expressionMapping.getModelElements()); graph.addControlFlow(switchNode, node); ActivityGraph subgraph = this.createActivityGraph(); ActivityNode forkNode = subgraph.addForkNode("Fork(" + resultSource.getName() + ")"); subgraph.addObjectFlow(resultSource, forkNode); graph.addToStructuredNode(node, subgraph.getModelElements()); for (SwitchClause switchClause: statement.getNonDefaultClause()) { mapping = this.fumlMap(switchClause); if (!(mapping instanceof SwitchClauseMapping)) { this.throwError("Error mapping switch clause " + switchClause + ": " + mapping.getErrorMessage()); } else { SwitchClauseMapping clauseMapping = (SwitchClauseMapping)mapping; clauseMapping.setSwitchSource(forkNode); clauseMapping.setSwitchLower(expression.getLower()); clauseMapping.setAssignedNames(assignedNames); graph.addToStructuredNode( node, clauseMapping.getModelElements()); Clause clause = clauseMapping.getClause(); node.addClause(clause); clauses.add(clause); } } } this.mapFinalClause( statement.getDefaultClause(), node, assignedNames, clauses, graph); this.addToNode(graph.getModelElements()); node.setIsAssured(statement.getIsAssured()); node.setIsDeterminate(statement.getIsDeterminate()); } public SwitchStatement getSwitchStatement() { return (SwitchStatement) this.getSource(); } @Override public String toString() { StructuredActivityNode structuredNode = (StructuredActivityNode)this.getElement(); ConditionalNode conditionalNode = null; for (ActivityNode node: structuredNode.getNode()) { if (node instanceof ConditionalNode) { conditionalNode = (ConditionalNode)node; break; } } return super.toString() + (conditionalNode == null? "": " isDeterminate:" + conditionalNode.getIsDeterminate() + " isAssured:" + conditionalNode.getIsAssured()); } @Override public void print(String prefix) { super.print(prefix); SwitchStatement statement = this.getSwitchStatement(); Collection<SwitchClause> nonDefaultClauses = statement.getNonDefaultClause(); if (!nonDefaultClauses.isEmpty()) { System.out.println(prefix + " nonDefaultClause:"); for (SwitchClause clause: nonDefaultClauses) { Mapping mapping = clause.getImpl().getMapping(); if (mapping != null) { mapping.printChild(prefix); } } } Block defaultClause = statement.getDefaultClause(); if (defaultClause != null) { System.out.println(prefix + " defaultClause:"); Mapping mapping = defaultClause.getImpl().getMapping(); if (mapping != null) { mapping.printChild(prefix); } } } } // SwitchStatementMapping
[ "ed-s@modeldriven.com" ]
ed-s@modeldriven.com
91eadc445730552a67c1b5aa3e74d1fc18d33dc0
7bdd4cccffe0683176e79a6b65c59678ee94c4f2
/src/main/java/com/bidanet/springmvc/demo/jkbuilder/data/JkNameValueData.java
0099ca58b14e431ae8e5cc4025a528c2be3b6ebe
[]
no_license
xuejike/spring_xuejike_tpl
4e6b06e39ae2817a722309f938bc54ea8c6a083c
2e8114eb071bf47fc6ed9bf922633ade2e4f7b06
refs/heads/master
2021-07-02T14:20:29.579685
2019-03-08T03:42:42
2019-03-08T03:42:42
111,900,621
4
2
null
null
null
null
UTF-8
Java
false
false
135
java
package com.bidanet.springmvc.demo.jkbuilder.data; public interface JkNameValueData { String getName(); String getValue(); }
[ "xuejike2004@126.com" ]
xuejike2004@126.com
cc63aa8ecb34a14b2f975d3ee8b6d17fd2e0aead
24fec8593856302f73cc1463e96532b67c3d6a4d
/mcp/temp/src/minecraft/net/minecraft/command/ServerCommand.java
47d10a5cebe5acf2ce55792004ff25091a283f42
[ "BSD-3-Clause" ]
permissive
theorbtwo/visual-sound
3cf8fc540728c334e66a39fdf921038c37db2cba
af76f171eddf6759097ea3445a55f18cdf4a86af
refs/heads/master
2021-01-23T11:48:03.750673
2013-06-20T17:20:08
2013-06-20T17:20:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
package net.minecraft.command; import net.minecraft.command.ICommandSender; public class ServerCommand { public final String field_73702_a; public final ICommandSender field_73701_b; public ServerCommand(String p_i3369_1_, ICommandSender p_i3369_2_) { this.field_73702_a = p_i3369_1_; this.field_73701_b = p_i3369_2_; } }
[ "james@mastros.biz" ]
james@mastros.biz
d083d01d5a4d8e20a27d0856592386a2b4459d62
571ce46236afb5d836b713c5f3cc165db5d2ae77
/packages/apps/PrizeGalleryV8/mtkgallery/src/com/mediatek/galleryfeature/stereo/freeview3d/AnimationEx.java
0fbe464034f32c23eee3ead65a33d9f1a4f82261
[]
no_license
sengeiou/prize
d6f56746ba82e0bbdaa47b5bea493ceddb0abd0c
e27911e194c604bf651f7bed0f5f9ce8f7dc8d4d
refs/heads/master
2020-04-28T04:45:42.207852
2018-11-23T13:50:20
2018-11-23T13:50:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,401
java
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. the information contained herein is * confidential and proprietary to MediaTek Inc. and/or its licensors. Without * the prior written permission of MediaTek inc. and/or its licensors, any * reproduction, modification, use or disclosure of MediaTek Software, and * information contained herein, in whole or in part, shall be strictly * prohibited. * * MediaTek Inc. (C) 2015. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek * Software") have been modified by MediaTek Inc. All revisions are subject to * any receiver's applicable license agreements with MediaTek Inc. */ package com.mediatek.galleryfeature.stereo.freeview3d; import com.mediatek.galleryframework.util.MtkLog; /** * This is an Frame-by-Frame animation. */ public class AnimationEx { private final static String TAG = "MtkGallery2/AnimationEx"; public final static int FRAME_COUNT = 25; public static final int TYPE_ANIMATION_CONTINUOUS = 1; public final static int SLEEP_TIME_INTERVAL = 2; public final static int STEP = 100; private long mEndTime; private int mCurrentFrameIndexX = Integer.MAX_VALUE; private int mCurrentFrameIndexY = Integer.MAX_VALUE; private int mTargetFrameIndexX = Integer.MAX_VALUE; private int mTargetFrameIndexY = Integer.MAX_VALUE; private int mFrameCoutX = FRAME_COUNT; private int mFrameCoutY = FRAME_COUNT; private boolean mIsInTransitionMode = false; /** * Constructor. * @param frameCountX * the frame count of horizontal direction. * @param frameCountY * the frame count of vertical direction. * @param currentFrameIndexX * the begin frame index of horizontal direction. * @param currentFrameIndexY * the begin frame index of vertical direction. * @param targetFrameX * the target frame index of horizontal direction. * @param targetFrameY * the target frame index of vertical direction. */ public AnimationEx(int frameCountX, int frameCountY, int currentFrameIndexX, int currentFrameIndexY, int targetFrameX, int targetFrameY) { initAnimation(frameCountX, frameCountY, currentFrameIndexX, currentFrameIndexY, targetFrameX, targetFrameY); } /** * Set animation frame index and type. * @param lastIndexX the new target frame index of horizontal direction. * @param lastIndexY the new target frame index of vertical direction. * @return true the new target frame is equal the old target frame. */ public boolean initAnimation(int lastIndexX, int lastIndexY) { if (mFrameCoutX <= lastIndexX) { lastIndexX = mFrameCoutX - 1; } if (mFrameCoutY <= lastIndexY) { lastIndexY = mFrameCoutY - 1; } if (lastIndexX < 0) { lastIndexX = 0; } if (lastIndexY < 0) { lastIndexY = 0; } if (mCurrentFrameIndexX == Integer.MAX_VALUE && lastIndexX != Integer.MAX_VALUE) { mCurrentFrameIndexX = lastIndexX; } if (mCurrentFrameIndexY == Integer.MAX_VALUE && lastIndexY != Integer.MAX_VALUE) { mCurrentFrameIndexY = lastIndexY; } boolean newPoints = (mTargetFrameIndexX != lastIndexX || mTargetFrameIndexY != lastIndexY); mTargetFrameIndexX = lastIndexX; mTargetFrameIndexY = lastIndexY; return newPoints; } public boolean isInTranslateMode() { return mIsInTransitionMode; } /** * Update animation frame by animation type. * @return whether the animation is finished. */ public boolean advanceAnimation() { MtkLog.d(TAG, "<advanceAnimation> mCurrentFrameIndexX =" + mCurrentFrameIndexX + " mCurrentFrameIndexY = " + mCurrentFrameIndexY + " mTargetFrameIndexX=" + mTargetFrameIndexX + " mTargetFrameIndexY " + mTargetFrameIndexY + " mFrameCoutX=" + mFrameCoutX + " mEndTime=" + mEndTime + " System.currentTimeMillis()=" + System.currentTimeMillis() + " mIsInTransitionMode=" + mIsInTransitionMode + " " + this); if (mCurrentFrameIndexX == Integer.MAX_VALUE || mTargetFrameIndexY == Integer.MAX_VALUE) { return true; } int dValueX = mCurrentFrameIndexX - mTargetFrameIndexX; mCurrentFrameIndexX = dValueX > 0 ? mCurrentFrameIndexX - 1 : (dValueX < 0 ? mCurrentFrameIndexX + 1 : mCurrentFrameIndexX); int dValueY = mCurrentFrameIndexY - mTargetFrameIndexY; mCurrentFrameIndexY = dValueY > 0 ? mCurrentFrameIndexY - 1 : (dValueY < 0 ? mCurrentFrameIndexY + 1 : mCurrentFrameIndexY); return isFinished(); } public int[] getCurrentFrame() { return new int[] { mCurrentFrameIndexX, mCurrentFrameIndexY }; } public int getTargetFrameIndexY() { return mTargetFrameIndexY; } public int getTargetFrameIndexX() { return mTargetFrameIndexX; } private boolean isFinished() { return mCurrentFrameIndexX == mTargetFrameIndexX && mCurrentFrameIndexY == mTargetFrameIndexY; } private void initAnimation(int frameCountX, int frameCountY, int currentFrameIndexX, int currentFrameIndexY, int targetFrameX, int targetFrameY) { mFrameCoutX = frameCountX; mFrameCoutY = frameCountY; mTargetFrameIndexX = targetFrameX; mTargetFrameIndexY = targetFrameY; mCurrentFrameIndexX = currentFrameIndexX; mCurrentFrameIndexY = currentFrameIndexY; } }
[ "18218724438@163.com" ]
18218724438@163.com
369a0621da5567b3810fc7edc5e569fc694965ee
c9b4e3dd7ef80ac7e1fdf3ccae818ba0d57246eb
/stock-day/src/main/java/com/stock/stockday/entity/StockDayFundFlow603.java
bdc32948cfbe8f68d76483817e1485f95c93f076
[]
no_license
wuxingle/stock-day
104259d3583a5ddbb32d0c79b695999bf1938ab2
95ce8201479d3f330fb182ae8b299cabcb171a16
refs/heads/master
2022-06-27T21:45:17.085292
2020-04-13T07:45:36
2020-04-13T07:45:36
188,746,226
0
0
null
2022-06-21T01:10:29
2019-05-27T00:37:23
Java
UTF-8
Java
false
false
903
java
package com.stock.stockday.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @Data @TableName("stock_day_fund_flow_603") public class StockDayFundFlow603 implements Serializable { private static final long serialVersionUID = 1L; @TableId private String id; private String codeId; private String codeEx; private Date date; private String exCode; private BigDecimal mainFlowInto; private BigDecimal mainOutflow; private BigDecimal mainNetFlow; private BigDecimal mainInflowRate; private BigDecimal retailFlowInto; private BigDecimal retailOutflow; private BigDecimal retailNetFlow; private BigDecimal retailInflowRate; private BigDecimal fundSum; private String name; }
[ "1546752823@qq.com" ]
1546752823@qq.com
b965e6555b2775309affef0b5831ac45383106cc
8d05059cf88050cd627fbb7d5122d0808b581c9f
/src/com/company/test/design_patterns/protype/demo1/Test.java
1097773661087158d69ec7d485afc9f299815db4
[]
no_license
Amorend/JavaSourceLearn
8e97b6ccd256cba928e2324fb50e7c8b8856c4b6
2e6150732121645e63102d5d82579d4cef75e7a1
refs/heads/master
2023-01-14T00:50:29.363149
2020-11-14T06:59:35
2020-11-14T06:59:35
284,944,084
2
0
null
null
null
null
UTF-8
Java
false
false
672
java
package com.company.test.design_patterns.protype.demo1; /** * 原型模式 * 克隆: */ public class Test { public static void main(String[] args) throws CloneNotSupportedException { Student student1 = new Student(); student1.setAddress("宝鸡市宝光路44号"); student1.setSchool("宝鸡大学"); student1.setZhuanye("计算机学院"); student1.setName("小明"); //通过student1 克隆一份 Student student2 = (Student) student1.clone(); System.out.println(student2); student2.setName("小华"); System.out.println(student1); System.out.println(student2); } }
[ "am16@vip.qq.com" ]
am16@vip.qq.com
bc63d76b10584e831f7deb90734b2aaaaa471b11
4c19b724f95682ed21a82ab09b05556b5beea63c
/XMSYGame/java2/server/web-manager/src/main/java/com/xmsy/server/zxyy/manager/modules/manager/ordertakemoney/entity/OrderTakeMoneyStatisticsThree.java
335d6194ed07fd0088e609c5e3b6f6553ac55f96
[]
no_license
angel-like/angel
a66f8fda992fba01b81c128dd52b97c67f1ef027
3f7d79a61dc44a9c4547a60ab8648bc390c0f01e
refs/heads/master
2023-03-11T03:14:49.059036
2022-11-17T11:35:37
2022-11-17T11:35:37
222,582,930
3
5
null
2023-02-22T05:29:45
2019-11-19T01:41:25
JavaScript
UTF-8
Java
false
false
552
java
package com.xmsy.server.zxyy.manager.modules.manager.ordertakemoney.entity; import java.math.BigDecimal; import java.util.Date; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** * 取款记录表 * * @author adu * @email xxxxx * @date 2019-03-26 10:25:30 */ @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) public class OrderTakeMoneyStatisticsThree { /** * 取款金额 */ private BigDecimal takeAmount; /** * 创建时间 */ private Date createTime; }
[ "163@qq.com" ]
163@qq.com
f02f1b56fcf80442a85c908e6c20167f608033e2
09534c278861e04441712475790c08fe0b92f279
/app/src/main/java/com/walktour/control/netsniffer/CellMonitor.java
0b5a3d6130396dda5537ef15a3aa52446ae7df21
[]
no_license
copslock/Walktour4
077eee3500387abd9a8b74727dd3c5727cc11384
46b7e77e2a5e54c4f2a83f23448f7031c8b37537
refs/heads/master
2023-07-17T13:05:58.825418
2019-08-20T07:12:35
2019-08-20T07:12:35
397,678,508
1
0
null
null
null
null
UTF-8
Java
false
false
6,284
java
/* * 文件名: ICellDataListener.java * 版 权: Copyright DingliCom Tech. Co. Ltd. All Rights Reserved. * 描 述: 监控手机小区的切换 * 创建人: 黄广府 * 创建时间:2012-8-30 * * 修改人: * 修改时间: * 修改内容:[修改内容] */ package com.walktour.control.netsniffer; import android.content.Context; import android.telephony.CellLocation; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; import android.telephony.cdma.CdmaCellLocation; import android.telephony.gsm.GsmCellLocation; import com.walktour.base.util.LogUtil; import java.util.ArrayList; /** * 监控手机小区的切换<BR> * @author 黄广府 * @version [WalkTour Client V100R001C03, 2012-8-30] */ public class CellMonitor extends AbsMonitor { private static final String TAG = "CellMonitor"; private TelephonyManager tm; //private CellDao dao; private ArrayList<ICellDataListener> listeners; // 单例 private static CellMonitor instance = null; private CellMonitor() { super(); listeners = new ArrayList<ICellDataListener>(); } private static CellBean CURRENT_CELLBEAN = null; public static synchronized CellMonitor getInstance() { if (instance == null) { instance = new CellMonitor(); } return instance; } /** * 获取当前小区 * * @return */ public static CellBean getCurrentCell() { CellBean curBean = CellMonitor.CURRENT_CELLBEAN; if (curBean == null) { return new CellBean(); } return curBean; } /** * 获取当前小区 * * @return */ public static String getCurrentCellString() { return getCurrentCell().toString(); } public synchronized void setContext(Context context) { tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); CellLocation location = tm.getCellLocation(); try{ if (location != null) { int phoneType = tm.getPhoneType(); String operator = tm.getNetworkOperator(); int mcc = -1, mnc = -1, cid = -1, lac = -1; //处理无网络情况 if(operator != null && operator.length()>3){ mcc = Integer.parseInt(operator.substring(0, 3)); } if (phoneType == TelephonyManager.PHONE_TYPE_GSM) { // type = "gsm"; GsmCellLocation gsm = (GsmCellLocation) location; //处理无网络情况 if(operator != null && operator.length()>3){ mnc = Integer.parseInt(operator.substring(3)); } cid = gsm.getCid(); lac = gsm.getLac(); } else if (phoneType == TelephonyManager.PHONE_TYPE_CDMA) { // type = "cdma"; CdmaCellLocation cdma = (CdmaCellLocation) location; mnc = cdma.getSystemId(); cid = cdma.getBaseStationId(); lac = cdma.getNetworkId(); } CellBean bean = new CellBean(); bean.setCid(cid); bean.setLac(lac); bean.setMcc(mcc); bean.setMnc(mnc); LogUtil.d(TAG, "小区切换,Cell id:" + cid); CellMonitor.CURRENT_CELLBEAN = bean; /* if (dao != null) { NetSniffer.sendCellInfo(bean); dao.insert(bean); }*/ } }catch(Exception e){ e.printStackTrace(); } } public void addCellDataListener(ICellDataListener listener) { listeners.add(listener); } @Override public void localStart() { LogUtil.i(TAG, "启动小区监控."); tm.listen(cellListener, PhoneStateListener.LISTEN_CELL_LOCATION); CellLocation.requestLocationUpdate(); } @Override public void localStop() { LogUtil.i(TAG, "停止小区监控."); tm.listen(cellListener, PhoneStateListener.LISTEN_NONE); } private PhoneStateListener cellListener = new PhoneStateListener() { public void onCellLocationChanged(CellLocation location) { int phoneType = tm.getPhoneType(); String operator = tm.getNetworkOperator(); CellBean bean = null; if (!"".equals(operator)) { // String type=""; int mcc = -1, mnc = -1, cid = -1, lac = -1; mcc = Integer.parseInt(operator.substring(0, 3)); if (phoneType == TelephonyManager.PHONE_TYPE_GSM) { // type = "gsm"; GsmCellLocation gsm = (GsmCellLocation) location; mnc = Integer.parseInt(operator.substring(3)); cid = gsm.getCid(); lac = gsm.getLac(); } else if (phoneType == TelephonyManager.PHONE_TYPE_CDMA) { // type = "cdma"; CdmaCellLocation cdma = (CdmaCellLocation) location; mnc = cdma.getSystemId(); cid = cdma.getBaseStationId(); lac = cdma.getNetworkId(); } bean = new CellBean(); bean.setCid(cid); bean.setLac(lac); bean.setMcc(mcc); bean.setMnc(mnc); LogUtil.d(TAG, "小区切换,Cell id:" + cid); CellMonitor.CURRENT_CELLBEAN = bean; /* if (dao != null) { NetSniffer.sendCellInfo(bean); dao.insert(bean); }*/ } else { CellMonitor.CURRENT_CELLBEAN = null; } for (ICellDataListener listener : listeners) { listener.onChangeCell(bean); } }; }; }
[ "15015912346@163.com" ]
15015912346@163.com
ca311cd45fa86e3c1ff1da54466aa96d35a6a90c
9702a51962cda6e1922d671dbec8acf21d9e84ec
/src/main/com/topcoder/common/web/xml/HTMLRenderer.java
a8552129f16b17d61f7b94a22a6bd46056fc3ac1
[]
no_license
topcoder-platform/tc-website
ccf111d95a4d7e033d3cf2f6dcf19364babb8a08
15ab92adf0e60afb1777b3d548b5ba3c3f6c12f7
refs/heads/dev
2023-08-23T13:41:21.308584
2023-04-04T01:28:38
2023-04-04T01:28:38
83,655,110
3
19
null
2023-04-04T01:32:16
2017-03-02T08:43:01
Java
UTF-8
Java
false
false
2,925
java
package com.topcoder.common.web.xml; import com.topcoder.common.web.error.TCException; import com.topcoder.shared.docGen.xml.XMLDocument; import com.topcoder.shared.docGen.xml.xsl.XSLTransformerCache; import com.topcoder.shared.docGen.xml.xsl.XSLTransformerWrapper; import com.topcoder.shared.util.logging.Logger; import java.io.ByteArrayOutputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.StringReader; public class HTMLRenderer { private static Logger log = Logger.getLogger(HTMLRenderer.class); public HTMLRenderer() { } /** * Use the provided XML and file to generate html. */ public synchronized String render(XMLDocument xmldocObject, String xsldocURLString) throws TCException, FileNotFoundException { ByteArrayOutputStream baos = null; XSLTransformerWrapper wrapper = null; XSLTransformerCache cache = null; try { cache = XSLTransformerCache.getInstance(); baos = new ByteArrayOutputStream(); wrapper = cache.getXSLTransformerWrapper(xsldocURLString); wrapper.transform(new StringReader(xmldocObject.getXML()), baos); return baos.toString(); } catch (FileNotFoundException e) { throw e; } catch (Exception e) { /* try and read through the file looking for suspicious characters. */ try { FileReader fr = new FileReader(xsldocURLString); int lineCount = 1; char ch = 0; while (fr.ready()) { ch = (char) fr.read(); if (ch == '\n') lineCount++; if (!(ch > 0 && ch < 128)) { log.info("possible bad char: " + ch + " found on line " + lineCount); } } fr.close(); } catch (Exception ex) { log.error("failed to read through file looking for bad characters: " + ex.getMessage()); } log.debug(xmldocObject.getXML()); e.printStackTrace(); throw new TCException("ejb.HTMLRenderer.HTMLRendererBean:render:ERROR:\n" + e); } } /** * Clears the cache. */ public byte[] refresh() throws TCException { //log.info("HTMLRenderer.refresh()"); XSLTransformerCache cache = null; byte[] result = null; try { cache = XSLTransformerCache.getInstance(); log.info("removing " + cache.size() + " items from the cache"); cache.clear(); java.net.InetAddress localHost = java.net.InetAddress.getLocalHost(); result = localHost.getAddress(); } catch (Exception e) { e.printStackTrace(); log.error("Error in HTMLRendererBean.refresh()"); } return result; } }
[ "amorehead@cb5b18d2-80dd-4a81-9b1c-945e1ee644f9" ]
amorehead@cb5b18d2-80dd-4a81-9b1c-945e1ee644f9
04cf404477dda5116a5cbc35204b3d445c574967
63b9289fe4395b599545de10de7f1b46d3c367d3
/ch11/src/ch11/SelectTest.java
27900ca830a9da69723bd5175d6e381d770db67e
[]
no_license
glglgl45/javasource
7d83499a3e22cb0b5ce1651ff9a0f01e32650980
b89a599db48ddd098a7951ae7ad2d83450ebcecf
refs/heads/master
2022-06-20T10:55:14.829371
2020-05-08T08:18:43
2020-05-08T08:18:43
261,990,856
0
0
null
null
null
null
UTF-8
Java
false
false
994
java
package ch11; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; public class SelectTest { public static void main(String[] args) { try { Class.forName("com.mysql.cj.jdbc.Driver"); } catch (ClassNotFoundException e1) { e1.printStackTrace(); } String url="jdbc:mysql://localhost:3306/javadb?" + "useSSL=false&serverTimezone=UTC"; String user="javadb"; String password="12345"; String sql="select * from userTBL"; try(Connection con = DriverManager.getConnection(url, user, password); PreparedStatement pstmt=con.prepareStatement(sql)) { if(con!=null) { ResultSet rs=pstmt.executeQuery (); while(rs.next()) { System.out.print(rs.getInt(1)+"\t"); System.out.print(rs.getString(2)+"\t"); System.out.print(rs.getDate(3)+"\t"); System.out.print(rs.getString(4)+"\n"); } } } catch (Exception e) { e.printStackTrace(); } } }
[ "glglgl47@naver.com" ]
glglgl47@naver.com
5d91d0ce78d6d9e1493d43204751aee00ac7c80e
7f20b1bddf9f48108a43a9922433b141fac66a6d
/cytoscape/branches/temp-cyattrs-fix-branch/src/cytoscape/giny/CytoscapeFingRootGraph.java
c4c1a54e468209fa93c04620800c62add341ae8e
[]
no_license
ahdahddl/cytoscape
bf783d44cddda313a5b3563ea746b07f38173022
a3df8f63dba4ec49942027c91ecac6efa920c195
refs/heads/master
2020-06-26T16:48:19.791722
2013-08-28T04:08:31
2013-08-28T04:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,095
java
package cytoscape.giny; import giny.model.*; import cytoscape.*; import fing.model.*; import cern.colt.map.*; import cytoscape.util.intr.*; import java.util.Collection; import giny.model.Node; import giny.model.Edge; import com.sosnoski.util.hashmap.StringIntHashMap; public class CytoscapeFingRootGraph extends FingExtensibleRootGraph implements CytoscapeRootGraph { StringIntHashMap node_name_index_map; StringIntHashMap edge_name_index_map; public CytoscapeFingRootGraph () { super( new CyNodeDepot(), new CyEdgeDepot() ); node_name_index_map = new StringIntHashMap(); edge_name_index_map = new StringIntHashMap(); } public CyNetwork createNetwork ( Collection nodes, Collection edges ) { Node[] node = ( Node[] ) nodes.toArray( new Node[] {} ); Edge[] edge = ( Edge[] ) nodes.toArray( new Edge[] {} ); return createNetwork( node, edge ) ; } /** * Creates a new Network */ public CyNetwork createNetwork ( Node[] nodes, Edge[] edges ) { final Node[] nodeArr = ((nodes != null) ? nodes : new Node[0]); final Edge[] edgeArr = ((edges != null) ? edges : new Edge[0]); final RootGraph root = this; try { return new FingCyNetwork (this, new IntIterator() { private int index = 0; public boolean hasNext() { return index < nodeArr.length; } public int nextInt() { if (nodeArr[index] == null || nodeArr[index].getRootGraph() != root) throw new IllegalArgumentException(); return nodeArr[index++].getRootGraphIndex(); } }, new IntIterator() { private int index = 0; public boolean hasNext() { return index < edgeArr.length; } public int nextInt() { if (edgeArr[index] == null || edgeArr[index].getRootGraph() != root) throw new IllegalArgumentException(); return edgeArr[index++].getRootGraphIndex(); } }); } catch (IllegalArgumentException exc) { return null; } } /** * Uses Code copied from ColtRootGraph to create a new Network. */ public CyNetwork createNetwork ( int[] nodeInx, int[] edgeInx ) { if (nodeInx == null) nodeInx = new int[0]; if (edgeInx == null) edgeInx = new int[0]; try { return new FingCyNetwork (this, new ArrayIntIterator(nodeInx, 0, nodeInx.length), new ArrayIntIterator(edgeInx, 0, edgeInx.length)); } catch (IllegalArgumentException exc) { return null; } } public cytoscape.CyNode getNode ( String identifier ) { return ( cytoscape.CyNode )getNode( node_name_index_map.get( identifier ) ); } public cytoscape.CyEdge getEdge ( String identifier ) { return ( cytoscape.CyEdge )getEdge( edge_name_index_map.get( identifier ) ); } public void setNodeIdentifier ( String identifier, int index ) { node_name_index_map.add( identifier, index ); } public void setEdgeIdentifier ( String identifier, int index ) { edge_name_index_map.add( identifier, index ); } }
[ "(no author)@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
(no author)@0ecc0d97-ab19-0410-9704-bfe1a75892f5
ab31ee3cfa582dee897a5b9470a8389a9d35c77f
2a9dd6077aab664cf4733738799981bf27caf079
/ahpucampus-rest/src/main/java/com/stylefeng/guns/rest/modular/ahpucampus/service/IUserService.java
95eee634c6820b63f6f728a7acedd167a25cbfb6
[ "Apache-2.0" ]
permissive
itxiaojian/ahpucampusadmin
45a50c38bda692f4f63e92e1ed5096ba68ee79fb
bc4b4a9a533fb8b179f59df391cb8974a7b4d7c5
refs/heads/master
2020-04-09T10:08:01.214096
2019-03-05T15:19:36
2019-03-05T15:19:36
160,259,463
0
1
null
null
null
null
UTF-8
Java
false
false
851
java
package com.stylefeng.guns.rest.modular.ahpucampus.service; import com.baomidou.mybatisplus.service.IService; import com.stylefeng.guns.rest.modular.ahpucampus.model.User; import org.apache.ibatis.annotations.Param; /** * <p> * 管理员表 服务类 * </p> * * @author stylefeng123 * @since 2018-02-22 */ public interface IUserService extends IService<User> { /** * 修改用户状态 */ int setStatus(@Param("userId") Integer userId, @Param("status") int status); /** * 修改密码 */ int changePwd(@Param("userId") Integer userId, @Param("pwd") String pwd); /** * 设置用户的角色 */ int setRoles(@Param("userId") Integer userId, @Param("roleIds") String roleIds); /** * 通过账号获取用户 */ User getByAccount(@Param("account") String account); }
[ "2629690209@qq.com" ]
2629690209@qq.com
47aafe3c3e2fb0ae906034b9ee223066bcc5aed7
01b8e0b575770334537e175f63f44cf836f9ad14
/src/main/java/com/ulfric/plugin/factions/function/FactionFunction.java
a1cb667e520e9d6f5d333e674c59c826dd875344
[]
no_license
ulfricarchive/factions-plugin
dc5b65b6b7b1e3a70acc7ddf4f12eeef484a533e
886d5ae36df0f4ff9e571fa603e22d26d73da8da
refs/heads/master
2021-03-19T17:03:31.944060
2018-01-06T23:09:56
2018-01-06T23:09:56
106,824,674
0
0
null
null
null
null
UTF-8
Java
false
false
280
java
package com.ulfric.plugin.factions.function; import com.ulfric.i18n.function.Function; import com.ulfric.plugin.factions.model.Faction; public abstract class FactionFunction extends Function<Faction> { public FactionFunction(String name) { super(name, Faction.class); } }
[ "ad@mharrison.us" ]
ad@mharrison.us
212fe2d4e38558af1f4713749ba8ecfee91aa399
ac622d240912292c8a7301da499522198947e01c
/NewIns_xdc_trunk/src/com/newins/service/imp/NiAdStatisticsServiceImp.java
da3f1c407f935b920e158ba8fa45557ec26431df
[]
no_license
sangpf/xdc
894d827f7b6e2824ae92eb153fa453004f8b98bf
61758e8e5b05e0acedd16f3418551feb586480c8
refs/heads/master
2020-04-06T10:39:18.323015
2018-11-13T14:45:17
2018-11-13T14:45:17
157,384,250
0
0
null
null
null
null
UTF-8
Java
false
false
2,025
java
package com.newins.service.imp; import java.util.HashMap; import java.util.List; import net.sf.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.newins.dao.NiAdStatisticsMapper; import com.newins.model.NiAdStatistics; import com.newins.service.NiAdStatisticsService; /** * @author lj * @Description : 广告统计对应的Service实现类 * @time : 2016年7月28日 下午4:27:22 */ @Service public class NiAdStatisticsServiceImp implements NiAdStatisticsService { @Autowired private NiAdStatisticsMapper niAdStatisticsMapper; /** * @author lj * @Description : 用户浏览一个广告之后对广告统计表更新 * @time : 2016年7月28日 下午4:28:05 */ public int updateAdStatistics(HashMap<String, Object> hashMap) { // TODO Auto-generated method stub int updAdStatistics=niAdStatisticsMapper.updateAdStatistics(hashMap); return updAdStatistics; } /** * @author lj * @Description : 根据id查询广告统计表 * @time : 2016年7月28日 下午8:11:27 * @param adId * @return NiAdStatistics */ public NiAdStatistics selectListByPrimaryKey(Integer adId) { // TODO Auto-generated method stub NiAdStatistics niAdStatistics=niAdStatisticsMapper.selectListByPrimaryKey(adId); return niAdStatistics; } /** * @author lj * @Description : 用户点击一个广告之后对广告统计表更新 * @time : 2016年7月28日 下午11:48:32 * @param adId * @return NiAdStatistics */ public int updateClickAdStatistics(HashMap<String, Object> hashMap) { // TODO Auto-generated method stub int updClickAdStatistics=niAdStatisticsMapper.updateClickAdStatistics(hashMap); return updClickAdStatistics; } /** * 加载统计轮播图广告统计 */ public int updateCarouselStatistics(List<JSONObject> carouselPosObjectList){ int updCarouselStatistics = niAdStatisticsMapper.updateCarouselStatistics(carouselPosObjectList); return updCarouselStatistics; } }
[ "sangpf@163.com" ]
sangpf@163.com
f89ffbb36509c7892ab8d8a87d19f29bfccbaa2f
a0728a167e1cb883255a34e055cac4ac60309f20
/docu/hana_AtoJ/workspace/hana_online/src/com/hanaph/saleon/mgmt/vo/MgmtInquireVO.java
1b3c4f89ce891f60fa9024b8365266f340ced11e
[]
no_license
jingug1004/pythonBasic
3d3c6c091830215c8be49cc6280b7467fd19dc76
554e3d1a9880b4f74872145dc4adaf0b099b0845
refs/heads/master
2023-03-06T06:24:05.671015
2022-03-09T08:16:58
2022-03-09T08:16:58
179,009,504
0
0
null
2023-03-03T13:09:01
2019-04-02T06:02:44
Java
UTF-8
Java
false
false
4,829
java
/** * Hana Project * Copyright 2014 iRush Co., * */ package com.hanaph.saleon.mgmt.vo; import java.util.List; /** * <pre> * Class Name : MgmtInquireVO.java * 설명 : 권한조회 정보 * * Modification Information * 수정일 수정자 수정 내용 * ------------ -------------- -------------------------------- * 2015. 1. 9. slamwin * </pre> * * @version : * @author : slamwin(@irush.co.kr) * @since : 2015. 1. 9. */ public class MgmtInquireVO { private int resultCode = 0; private int sort_order; private String pgm_no; private String pgm_id; private String pgm_name; private String pgm_kind_code; private String parent_pgm; private String picture; private String select_picture; private String role_no; private String role_cat_code; private String role_name; private String emp_code; private String dept_code; private String emp_name; private String dept_name; private List<MgmtInquireVO> menuList; /** * @return the resultCode */ public int getResultCode() { return resultCode; } /** * @param resultCode the resultCode to set */ public void setResultCode(int resultCode) { this.resultCode = resultCode; } /** * @return the sort_order */ public int getSort_order() { return sort_order; } /** * @param sort_order the sort_order to set */ public void setSort_order(int sort_order) { this.sort_order = sort_order; } /** * @return the pgm_no */ public String getPgm_no() { return pgm_no; } /** * @param pgm_no the pgm_no to set */ public void setPgm_no(String pgm_no) { this.pgm_no = pgm_no; } /** * @return the pgm_id */ public String getPgm_id() { return pgm_id; } /** * @param pgm_id the pgm_id to set */ public void setPgm_id(String pgm_id) { this.pgm_id = pgm_id; } /** * @return the pgm_name */ public String getPgm_name() { return pgm_name; } /** * @param pgm_name the pgm_name to set */ public void setPgm_name(String pgm_name) { this.pgm_name = pgm_name; } /** * @return the pgm_kind_code */ public String getPgm_kind_code() { return pgm_kind_code; } /** * @param pgm_kind_code the pgm_kind_code to set */ public void setPgm_kind_code(String pgm_kind_code) { this.pgm_kind_code = pgm_kind_code; } /** * @return the parent_pgm */ public String getParent_pgm() { return parent_pgm; } /** * @param parent_pgm the parent_pgm to set */ public void setParent_pgm(String parent_pgm) { this.parent_pgm = parent_pgm; } /** * @return the picture */ public String getPicture() { return picture; } /** * @param picture the picture to set */ public void setPicture(String picture) { this.picture = picture; } /** * @return the select_picture */ public String getSelect_picture() { return select_picture; } /** * @param select_picture the select_picture to set */ public void setSelect_picture(String select_picture) { this.select_picture = select_picture; } /** * @return the role_no */ public String getRole_no() { return role_no; } /** * @param role_no the role_no to set */ public void setRole_no(String role_no) { this.role_no = role_no; } /** * @return the role_cat_code */ public String getRole_cat_code() { return role_cat_code; } /** * @param role_cat_code the role_cat_code to set */ public void setRole_cat_code(String role_cat_code) { this.role_cat_code = role_cat_code; } /** * @return the role_name */ public String getRole_name() { return role_name; } /** * @param role_name the role_name to set */ public void setRole_name(String role_name) { this.role_name = role_name; } /** * @return the emp_code */ public String getEmp_code() { return emp_code; } /** * @param emp_code the emp_code to set */ public void setEmp_code(String emp_code) { this.emp_code = emp_code; } /** * @return the dept_code */ public String getDept_code() { return dept_code; } /** * @param dept_code the dept_code to set */ public void setDept_code(String dept_code) { this.dept_code = dept_code; } /** * @return the emp_name */ public String getEmp_name() { return emp_name; } /** * @param emp_name the emp_name to set */ public void setEmp_name(String emp_name) { this.emp_name = emp_name; } /** * @return the dept_name */ public String getDept_name() { return dept_name; } /** * @param dept_name the dept_name to set */ public void setDept_name(String dept_name) { this.dept_name = dept_name; } /** * @return the menuList */ public List<MgmtInquireVO> getMenuList() { return menuList; } /** * @param menuList the menuList to set */ public void setMenuList(List<MgmtInquireVO> menuList) { this.menuList = menuList; } }
[ "jingug1004@gmail.com" ]
jingug1004@gmail.com
ff5b7e2fa0450193a2fdfb0f56bfe5a5ad176896
e49ddf6e23535806c59ea175b2f7aa4f1fb7b585
/tags/release-5.3.0/mipav/src/plugins/PlugInAxonExtraction.java
e69520cc63ff2d69197bca440d63643eeb0510a9
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
svn2github/mipav
ebf07acb6096dff8c7eb4714cdfb7ba1dcace76f
eb76cf7dc633d10f92a62a595e4ba12a5023d922
refs/heads/master
2023-09-03T12:21:28.568695
2019-01-18T23:13:53
2019-01-18T23:13:53
130,295,718
1
0
null
null
null
null
UTF-8
Java
false
false
1,103
java
import gov.nih.mipav.model.structures.*; import gov.nih.mipav.plugins.*; // needed to load PlugInAlgorithm / PlugInView / PlugInFile interface import gov.nih.mipav.view.*; import java.awt.*; /** * This is plugin for axon extraction. * * @see PlugInAlgorithm */ public class PlugInAxonExtraction implements PlugInAlgorithm { //~ Methods -------------------------------------------------------------------------------------------------------- /** * Defines body of run method, which was declared in the interface. * * @param parentFrame parent frame * @param image current ModelImage - this is an image already loaded into MIPAV. Can be null. * * @see ModelImage * @see ViewJFrameImage */ public void run(Frame parentFrame, ModelImage image) { if (parentFrame instanceof ViewJFrameImage) { new PlugInDialogAxonExtraction(parentFrame, image); } else { MipavUtil.displayError("PlugIn Axon Extraction only runs on an image frame."); } } }
[ "mccreedy@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96" ]
mccreedy@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96
a6380948ceb6c89aa33e6059998cee73439ab534
0c11613c21ebe12f48d6cebb6339887e10e72219
/taobao-sdk-java/src/main/java/com/taobao/api/response/ItemSkuAddResponse.java
337970ee22117af991de24e3dffd639b9ddc8d79
[]
no_license
mustang2247/demo
a3347a2994448086814383c67757f659208368cd
35598ed0a3900afc759420b7100a7d310db2597d
refs/heads/master
2021-05-09T17:28:22.631386
2014-06-10T12:03:26
2014-06-10T12:03:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
package com.taobao.api.response; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.domain.Sku; import com.taobao.api.TaobaoResponse; /** * TOP API: taobao.item.sku.add response * * @author auto create * @since 1.0,2010-11-12 10:28:37.0 */ public class ItemSkuAddResponse extends TaobaoResponse { /** * */ private static final long serialVersionUID = 6163951387269382986L; /** * sku **/ @ApiField("sku") private Sku sku; public void setSku(Sku sku) { this.sku = sku; } public Sku getSku( ) { return this.sku; } public String getApiMethodName() { return "taobao.item.sku.add"; } }
[ "Administrator@.(none)" ]
Administrator@.(none)
d76ec41d9b1ffde6d1536486ccb608c4029401ac
7596b13ad3a84feb67f05aeda486e8b9fc93f65f
/getAndroidAPI/src/java/lang/Deprecated.java
355995cd5f6b1562ef4af03ea0bdc240d305906d
[]
no_license
WinterPan2017/Android-Malware-Detection
7aeacfa03ca1431e7f3ba3ec8902cfe2498fd3de
ff38c91dc6985112e958291867d87bfb41c32a0f
refs/heads/main
2023-02-08T00:02:28.775711
2020-12-20T06:58:01
2020-12-20T06:58:01
303,900,592
1
0
null
null
null
null
UTF-8
Java
false
false
372
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) // Source File Name: Deprecated.java package java.lang; import java.lang.annotation.Annotation; // Referenced classes of package java.lang: // Object public interface Deprecated extends Annotation { }
[ "panwentao1301@163.com" ]
panwentao1301@163.com
8141d93f8582b25c64f13de064c422ccc25b9299
17c30fed606a8b1c8f07f3befbef6ccc78288299
/P9_8_0_0/src/main/java/android/hardware/radio/V1_0/RadioTechnologyFamily.java
f5e7d38c608f90a7671e272a301e5d30634c516c
[]
no_license
EggUncle/HwFrameWorkSource
4e67f1b832a2f68f5eaae065c90215777b8633a7
162e751d0952ca13548f700aad987852b969a4ad
refs/heads/master
2020-04-06T14:29:22.781911
2018-11-09T05:05:03
2018-11-09T05:05:03
157,543,151
1
0
null
2018-11-14T12:08:01
2018-11-14T12:08:01
null
UTF-8
Java
false
false
1,718
java
package android.hardware.radio.V1_0; public final class RadioTechnologyFamily { public static final int THREE_GPP = 0; public static final int THREE_GPP2 = 1; public static final java.lang.String dumpBitfield(int r1) { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: android.hardware.radio.V1_0.RadioTechnologyFamily.dumpBitfield(int):java.lang.String at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:116) at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:249) at jadx.core.ProcessClass.process(ProcessClass.java:31) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:56) at jadx.core.ProcessClass.process(ProcessClass.java:39) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:296) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:199) Caused by: jadx.core.utils.exceptions.DecodeException: Unknown instruction: not-int at jadx.core.dex.instructions.InsnDecoder.decode(InsnDecoder.java:568) at jadx.core.dex.instructions.InsnDecoder.process(InsnDecoder.java:56) at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:102) ... 7 more */ /* // Can't load method instructions. */ throw new UnsupportedOperationException("Method not decompiled: android.hardware.radio.V1_0.RadioTechnologyFamily.dumpBitfield(int):java.lang.String"); } public static final String toString(int o) { if (o == 0) { return "THREE_GPP"; } if (o == 1) { return "THREE_GPP2"; } return "0x" + Integer.toHexString(o); } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
b1fc89e291b082e44256b7c9e8da28681054f07d
7653e008384de73b57411b7748dab52b561d51e6
/SrcGame/dwo/gameserver/taskmanager/tasks/TaskOlympiadSave.java
3dff6367e29c070023a4d17a3bf8b7e0a1e03964
[]
no_license
BloodyDawn/Ertheia
14520ecd79c38acf079de05c316766280ae6c0e8
d90d7f079aa370b57999d483c8309ce833ff8af0
refs/heads/master
2021-01-11T22:10:19.455110
2017-01-14T12:15:56
2017-01-14T12:15:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
905
java
package dwo.gameserver.taskmanager.tasks; import dwo.gameserver.model.world.olympiad.Olympiad; import dwo.gameserver.taskmanager.Task; import dwo.gameserver.taskmanager.TaskTypes; import dwo.gameserver.taskmanager.manager.TaskManager; import dwo.gameserver.taskmanager.manager.TaskManager.ExecutedTask; import org.apache.log4j.Level; /** * @author godson */ public class TaskOlympiadSave extends Task { public static final String NAME = "olympiad_save"; @Override public void initializate() { super.initializate(); TaskManager.addUniqueTask(NAME, TaskTypes.TYPE_FIXED_SHEDULED, "900000", "1800000", ""); } @Override public String getName() { return NAME; } @Override public void onTimeElapsed(ExecutedTask task) { if(Olympiad.getInstance().inCompPeriod()) { Olympiad.getInstance().saveOlympiadStatus(); _log.log(Level.INFO, "TaskOlympiadSave: Data updated."); } } }
[ "echipachenko@gmail.com" ]
echipachenko@gmail.com
bc493db7e79859323c24aa238e912411501bb43a
57edb737df8e9de3822d4f08d0de81f028403209
/spring-tx/src/main/java/org/springframework/jca/cci/CannotCreateRecordException.java
7f14ec2d5478e594a171bac119719fe3dbbf2840
[ "Apache-2.0" ]
permissive
haoxianrui/spring-framework
20d904fffe7ddddcd7d78445537f66e0b4cf65f5
e5163351c47feb69483e79fa782eec3e4d8613e8
refs/heads/master
2023-05-25T14:27:18.935575
2020-10-23T01:04:05
2020-10-23T01:04:05
260,652,424
1
1
null
null
null
null
UTF-8
Java
false
false
1,264
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.jca.cci; import javax.resource.ResourceException; import org.springframework.dao.DataAccessResourceFailureException; /** * Exception thrown when the creating of a CCI Record failed * for connector-internal reasons. * * @author Juergen Hoeller * @since 1.2 */ @SuppressWarnings("serial") public class CannotCreateRecordException extends DataAccessResourceFailureException { /** * Constructor for CannotCreateRecordException. * * @param msg message * @param ex the root ResourceException cause */ public CannotCreateRecordException(String msg, ResourceException ex) { super(msg, ex); } }
[ "1490493387@qq.com" ]
1490493387@qq.com
83aee8be0504c61a512a34ab0f23d5fd7658d960
ba3b25d6cf9be46007833ce662d0584dc1246279
/droidsafe_modified/modeling/api/android/os/ParcelUuid.java
0737c92676dfc75571625bef50742c31536fb47e
[]
no_license
suncongxd/muDep
46552d4156191b9dec669e246188080b47183a01
b891c09f2c96ff37dcfc00468632bda569fc8b6d
refs/heads/main
2023-03-20T20:04:41.737805
2021-03-01T19:52:08
2021-03-01T19:52:08
326,209,904
8
0
null
null
null
null
UTF-8
Java
false
false
7,714
java
/* * Copyright (C) 2015, Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Please email droidsafe@lists.csail.mit.edu if you need additional * information or have any questions. * * * This file incorporates work covered by the following copyright and * permission notice: * * 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. */ /***** THIS FILE HAS BEEN MODIFIED FROM THE ORIGINAL BY THE DROIDSAFE PROJECT. *****/ package android.os; // Droidsafe Imports import droidsafe.runtime.*; import droidsafe.helpers.*; import droidsafe.annotations.*; import java.util.UUID; public final class ParcelUuid implements Parcelable { /** * Creates a new ParcelUuid from a string representation of {@link UUID}. * * @param uuid * the UUID string to parse. * @return an ParcelUuid instance. * @throws NullPointerException * if {@code uuid} is {@code null}. * @throws IllegalArgumentException * if {@code uuid} is not formatted correctly. */ @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.529 -0500", hash_original_method = "E6B1B98CB06402B91557E2127042443C", hash_generated_method = "3B1A96151CFB5C87C502D113B6EDDB82") public static ParcelUuid fromString(String uuid) { return new ParcelUuid(UUID.fromString(uuid)); } @DSGeneratedField(tool_name = "Doppelganger", tool_version = "0.4.2", generated_on = "2013-07-17 10:23:27.158 -0400", hash_original_field = "DAF10E97A432AC719FB06B3080752505", hash_generated_field = "BB5540FFC228809144D41EB7EDD6B529") public static final Parcelable.Creator<ParcelUuid> CREATOR = new Parcelable.Creator<ParcelUuid>() { @DSSafe(DSCat.SAFE_OTHERS) @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.541 -0500", hash_original_method = "BE0C39B58500BBF13D262DF9616543A0", hash_generated_method = "B27DC4A4AF2601AAD28EE687E1A31292") public ParcelUuid createFromParcel(Parcel source) { long mostSigBits = source.readLong(); long leastSigBits = source.readLong(); UUID uuid = new UUID(mostSigBits, leastSigBits); return new ParcelUuid(uuid); } @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.543 -0500", hash_original_method = "DE9AFB44E7C5EC1F2E4B30CF11F48D0E", hash_generated_method = "6ABB4D3C46B8D91D4AC296EB1B082071") public ParcelUuid[] newArray(int size) { return new ParcelUuid[size]; } }; @DSGeneratedField(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.524 -0500", hash_original_field = "AFE074E0052115B31F5D8A3FD1E72383", hash_generated_field = "318090B38C1325AB0A6BDE7565479F55") private UUID mUuid; /** * Constructor creates a ParcelUuid instance from the * given {@link UUID}. * * @param uuid UUID */ @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.527 -0500", hash_original_method = "CF473C61D493B6FE5C1BBCA31D442219", hash_generated_method = "459E45C76BAE7217AFBFC5C3824557F9") public ParcelUuid(UUID uuid) { mUuid = uuid; } /** * Get the {@link UUID} represented by the ParcelUuid. * * @return UUID contained in the ParcelUuid. */ @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.531 -0500", hash_original_method = "0CE9C43DAF663B7B5A7713ED255C5D05", hash_generated_method = "CD4C404E34D314168EA75627745609DF") public UUID getUuid() { return mUuid; } /** * Returns a string representation of the ParcelUuid * For example: 0000110B-0000-1000-8000-00805F9B34FB will be the return value. * * @return a String instance. */ @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.533 -0500", hash_original_method = "88F1B202F7B60E8AC7861421AE6F35A5", hash_generated_method = "C5FA242F4A359EC31EDD6D0EE8CF7183") @Override public String toString() { return mUuid.toString(); } @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.535 -0500", hash_original_method = "3F38019E558A882D8ACF21219C1A6CB1", hash_generated_method = "D482F257FB9D39C233BA23B515F5D841") @Override public int hashCode() { return mUuid.hashCode(); } /** * Compares this ParcelUuid to another object for equality. If {@code object} * is not {@code null}, is a ParcelUuid instance, and all bits are equal, then * {@code true} is returned. * * @param object * the {@code Object} to compare to. * @return {@code true} if this ParcelUuid is equal to {@code object} * or {@code false} if not. */ @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.537 -0500", hash_original_method = "03E4868AC4B42986ECAD1235C75A1F23", hash_generated_method = "A3CBD1AAE0450E56A46BE79478BEA398") @Override public boolean equals(Object object) { if (object == null) { return false; } if (this == object) { return true; } if (!(object instanceof ParcelUuid)) { return false; } ParcelUuid that = (ParcelUuid) object; return (this.mUuid.equals(that.mUuid)); } @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.547 -0500", hash_original_method = "00F8174F9E89D0C972FA6D3F19742382", hash_generated_method = "D90463461B2A94FF94D13FDF69BB80C9") public int describeContents() { return 0; } @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:44.549 -0500", hash_original_method = "914E719E6FA80BA5E3F689C4DD681C77", hash_generated_method = "048E1DDD52B8FCBDECE0B20BD4C6AE8E") public void writeToParcel(Parcel dest, int flags) { dest.writeLong(mUuid.getMostSignificantBits()); dest.writeLong(mUuid.getLeastSignificantBits()); } }
[ "suncong@xidian.edu.cn" ]
suncong@xidian.edu.cn
c6b2f1ddfdfb0a6def8650c17ded0f1e1930eb01
7727acc5d032f897a9ad1de8d4d1267105b24169
/microservice-file-upload/src/main/java/com.kvlt.cloud/MicroserviceFileUploadApplication.java
4dfa4fe326b4858b72cc2e51311bd5f651a7a1ff
[]
no_license
davidsky11/microservice-simple
c97da69972bdd6e926dca18eb269a6ec15e9236d
3e64b7b0f0c1bbdc7986f057d647b4672cdfe865
refs/heads/master
2021-08-30T06:00:53.475452
2017-12-16T09:47:47
2017-12-16T09:47:47
112,207,048
0
0
null
null
null
null
UTF-8
Java
false
false
524
java
package com.kvlt.cloud; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; /** * MicroserviceFileUploadApplication * * @author KVLT * @date 2017-12-11. */ @SpringBootApplication @EnableEurekaClient public class MicroserviceFileUploadApplication { public static void main(String[] args) { SpringApplication.run(MicroserviceFileUploadApplication.class, args); } }
[ "kv@dell.com" ]
kv@dell.com
b1c509d82220ad343bbf3aa8d709f0c187fcb388
56ba6b4df181285a58fc05d585ca68455750d0ec
/cards/src/main/java/org/rnd/jmagic/cards/AscendantEvincar.java
945b63163dd6ac43efe0586aab34afda36fa3da7
[]
no_license
ranjan-rk/jmagic
a5454f92afba9c24b494231915ce750734564239
4c1f6f93081de64cba7db7bd87f843fa8914a2a0
refs/heads/master
2021-01-18T06:30:38.871143
2013-07-22T19:50:51
2013-07-22T19:50:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,245
java
package org.rnd.jmagic.cards; import org.rnd.jmagic.engine.*; import org.rnd.jmagic.engine.generators.*; @Name("Ascendant Evincar") @SuperTypes({SuperType.LEGENDARY}) @Types({Type.CREATURE}) @SubTypes({SubType.VAMPIRE}) @ManaCost("4BB") @Printings({@Printings.Printed(ex = Expansion.TENTH_EDITION, r = Rarity.RARE), @Printings.Printed(ex = Expansion.NEMESIS, r = Rarity.RARE)}) @ColorIdentity({Color.BLACK}) public final class AscendantEvincar extends Card { public AscendantEvincar(GameState state) { super(state); this.setPower(3); this.setToughness(3); this.addAbility(new org.rnd.jmagic.abilities.keywords.Flying(state)); SetGenerator blackCreatures = Intersect.instance(CreaturePermanents.instance(), HasColor.instance(Color.BLACK)); SetGenerator otherBlackCreatures = RelativeComplement.instance(blackCreatures, This.instance()); this.addAbility(new org.rnd.jmagic.abilities.StaticPTChange(state, otherBlackCreatures, "Other black creatures", +1, +1, true)); SetGenerator nonBlackCreatures = RelativeComplement.instance(CreaturePermanents.instance(), HasColor.instance(Color.BLACK)); this.addAbility(new org.rnd.jmagic.abilities.StaticPTChange(state, nonBlackCreatures, "Nonblack creatures", -1, -1, true)); } }
[ "robyter@gmail" ]
robyter@gmail
e5d41f11a92079e07ca0fa990c5842643da42ddc
d2cb7af0020eb051719b6d9baf5ff3f776a46310
/src/main/java/mcjty/incontrol/typed/Key.java
4fd79c2c9378fec9f42c383095daf3c1eb7fbf0f
[ "MIT" ]
permissive
rafradek/InControl
1e71d6805e9722669bc7180fbba652d688bfccba
64bbb9fe4892f53b7780d992cae6136438bb51cc
refs/heads/master
2021-09-03T04:22:44.033240
2017-12-03T07:52:07
2017-12-03T07:52:07
115,564,417
0
0
null
2018-01-05T13:55:53
2017-12-27T23:06:20
Java
UTF-8
Java
false
false
720
java
package mcjty.incontrol.typed; import javax.annotation.Nonnull; public class Key<V> { @Nonnull private final Type<V> type; @Nonnull private final String name; Key(@Nonnull final Type<V> type, @Nonnull final String name) { this.type = type; this.name = name; } @Nonnull public static <V> Key<V> create(@Nonnull final Type<V> type, @Nonnull final String code) { return new Key<V>(type, code); } @Nonnull public Type<V> getType() { return type; } @Nonnull public String getName() { return name; } @Override public String toString() { return "Key(" + name + ')'; } }
[ "mcjty1@gmail.com" ]
mcjty1@gmail.com
cb204c162c7d331e1ca82fe01dfb0a7cfe334e2a
47dd7721aa666613f1add2e4c5aa48cc62c82bf6
/yoink-core-bootstrap/src/main/java/org/wallerlab/yoink/pdbml/v42/generated/PdbxFamilyGroupIndexType.java
8b9a9821df3fe952205e79ecee5ecae9fc083887
[]
no_license
ChristianOT/yoink
0edf95485baba749722e47bf15831d28442b50ae
bd2eebfc42f4cc26dbf439965868fa9ffe817180
refs/heads/master
2020-05-29T08:40:27.658171
2016-12-06T17:10:51
2016-12-06T17:10:51
69,651,847
0
0
null
2016-09-30T09:07:05
2016-09-30T09:07:04
null
UTF-8
Java
false
false
5,718
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2016.05.06 at 06:37:17 PM CEST // package org.wallerlab.yoink.pdbml.v42.generated; import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; /** * * Data items in the PDBX_FAMILY_GROUP_INDEX category record * the family membership in family groups. * * Example 1 - * <PDBx:pdbx_family_group_indexCategory> * <PDBx:pdbx_family_group_index family_prd_id="FAM_0000001" id="FGR_0000001"></PDBx:pdbx_family_group_index> * <PDBx:pdbx_family_group_index family_prd_id="FAM_0000002" id="FGR_0000001"></PDBx:pdbx_family_group_index> * <PDBx:pdbx_family_group_index family_prd_id="FAM_0000021" id="FGR_0000001"></PDBx:pdbx_family_group_index> * <PDBx:pdbx_family_group_index family_prd_id="FAM_0000022" id="FGR_0000002"></PDBx:pdbx_family_group_index> * <PDBx:pdbx_family_group_index family_prd_id="FAM_0000023" id="FGR_0000002"></PDBx:pdbx_family_group_index> * </PDBx:pdbx_family_group_indexCategory> * * * * * <p>Java class for pdbx_family_group_indexType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="pdbx_family_group_indexType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="pdbx_family_group_index" maxOccurs="unbounded" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="family_prd_id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "pdbx_family_group_indexType", propOrder = { "pdbxFamilyGroupIndex" }) public class PdbxFamilyGroupIndexType { @XmlElement(name = "pdbx_family_group_index") protected List<PdbxFamilyGroupIndexType.PdbxFamilyGroupIndex> pdbxFamilyGroupIndex; /** * Gets the value of the pdbxFamilyGroupIndex property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the pdbxFamilyGroupIndex property. * * <p> * For example, to add a new item, do as follows: * <pre> * getPdbxFamilyGroupIndex().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link PdbxFamilyGroupIndexType.PdbxFamilyGroupIndex } * * */ public List<PdbxFamilyGroupIndexType.PdbxFamilyGroupIndex> getPdbxFamilyGroupIndex() { if (pdbxFamilyGroupIndex == null) { pdbxFamilyGroupIndex = new ArrayList<PdbxFamilyGroupIndexType.PdbxFamilyGroupIndex>(); } return this.pdbxFamilyGroupIndex; } /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="family_prd_id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") public static class PdbxFamilyGroupIndex { @XmlAttribute(name = "family_prd_id", required = true) protected String familyPrdId; @XmlAttribute(name = "id", required = true) protected String id; /** * Gets the value of the familyPrdId property. * * @return * possible object is * {@link String } * */ public String getFamilyPrdId() { return familyPrdId; } /** * Sets the value of the familyPrdId property. * * @param value * allowed object is * {@link String } * */ public void setFamilyPrdId(String value) { this.familyPrdId = value; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } } }
[ "c_oual01@uni-muenster.de" ]
c_oual01@uni-muenster.de
3bcc853edc9ecdd995852cbecdc37204f869b116
aaba5757aac5d1122e295d837cd3846748907c06
/usg-server/src/main/java/com/accure/payroll/service/SalarySlipReport.java
67430315d99d3c663c5c17993c79f5262cacb7d3
[]
no_license
usgInfo/UsgServerProject
3845ef95595d9cd24285ac25c9164fc435494ad5
a81df8ec3ef2b298acd0627e414825ddc71fc43b
refs/heads/master
2021-05-15T00:35:02.159785
2018-03-21T13:17:26
2018-03-21T13:17:26
103,244,787
0
0
null
null
null
null
UTF-8
Java
false
false
8,104
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.accure.payroll.service; import com.accure.payroll.manager.SalaryEarningRegisterPDFGeneration; import com.accure.payroll.manager.SalarySlipRegisterReportManager; import com.accure.usg.server.utils.ApplicationConstants; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; import com.itextpdf.text.Paragraph; import com.itextpdf.text.pdf.PdfWriter; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.util.logging.Level; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.log4j.Logger; import org.apache.pdfbox.exceptions.COSVisitorException; import org.apache.pdfbox.util.PDFMergerUtility; /** * * @author user */ public class SalarySlipReport extends HttpServlet { Logger logger = Logger.getLogger(SalarySlipReport.class); protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, DocumentException, COSVisitorException { // response.setContentType("text/json;charset=UTF-8"); // PrintWriter out = response.getWriter(); response.setContentType("application/pdf;charset=UTF-8"); ServletOutputStream out = response.getOutputStream(); // OutputStream out = null; try { HttpSession session = request.getSession(false); String finalcialYearStart=request.getParameter("financialyearStart"); String finalcialYearEnd=request.getParameter("financialyearEnd"); //System.out.println("###############"+finalcialYearEnd+","+finalcialYearStart); ServletContext servletContext = getServletContext(); String path = File.separator + "usg" + File.separator + "images"; String contextPath = servletContext.getRealPath("/"+path); // String contextPath = servletContext.getRealPath(path); ByteArrayOutputStream outputJson = null; String id = request.getParameter("id"); String ddo = request.getParameter("ddo"); String month = request.getParameter("month"); String year = request.getParameter("year"); String reportType=request.getParameter("reportType"); //System.out.println("reportType"+reportType); // if(reportType.equalsIgnoreCase("MonthlySalarySlip")){ // outputJson = new SalarySlipRegisterReportManager().generationPdfSalarySlip(id, ddo, month, year, contextPath); // } // String reportType = request.getParameter("reportType"); //System.out.println("reportType" + reportType); if (reportType.equalsIgnoreCase("MonthlySalarySlip")) { outputJson = new SalarySlipRegisterReportManager().generationPdfSalarySlip(id, ddo, month, year, contextPath,finalcialYearStart,finalcialYearEnd); } else if (reportType.equalsIgnoreCase("MonthlyITRegister")) { //outputJson = new SalarySlipRegisterReportManager().generationPdfSalarySlip(id, ddo, month, year, contextPath); } else if (reportType.equalsIgnoreCase("SalaryEarningRegister")) { outputJson = new SalarySlipRegisterReportManager().getSearchResult(id, ddo, month, year, contextPath,""); }else if(reportType.equalsIgnoreCase("salaryRegisterReport")){ outputJson = new SalarySlipRegisterReportManager().getSearchResult(id, ddo, month, year, contextPath,""); } if (outputJson != null) { request.setAttribute("statuscode", ApplicationConstants.HTTP_STATUS_SUCCESS); ByteArrayOutputStream baos = outputJson; PDFMergerUtility ut = new PDFMergerUtility(); ut.addSource(new ByteArrayInputStream(baos.toByteArray())); ut.setDestinationStream(out); ut.mergeDocuments(); ut.setDestinationFileName("SalaryReport.pdf"); ut.getDestinationStream().flush(); } else { request.setAttribute("statuscode", ApplicationConstants.HTTP_STATUS_FAIL); ByteArrayOutputStream bos = new ByteArrayOutputStream(); Document document = new Document(); PdfWriter.getInstance(document, bos); document.open(); Paragraph paragraph = new Paragraph(); paragraph.add("NO Data"); document.add(paragraph); PDFMergerUtility ut = new PDFMergerUtility(); ut.addSource(new ByteArrayInputStream(bos.toByteArray())); ut.setDestinationStream(out); ut.mergeDocuments(); ut.setDestinationFileName("SalaryReport.pdf"); ut.getDestinationStream().flush(); } } catch (Exception ex) { request.setAttribute("statuscode", ApplicationConstants.HTTP_STATUS_FAIL); ByteArrayOutputStream bos = new ByteArrayOutputStream(); Document document = new Document(); PdfWriter.getInstance(document, bos); document.open(); Paragraph paragraph = new Paragraph(); paragraph.add("NO Data"); document.add(paragraph); PDFMergerUtility ut = new PDFMergerUtility(); ut.addSource(new ByteArrayInputStream(bos.toByteArray())); ut.setDestinationStream(out); ut.mergeDocuments(); ut.setDestinationFileName("SalaryReport.pdf"); ut.getDestinationStream().flush(); } finally { out.close(); } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { processRequest(request, response); } catch (DocumentException ex) { java.util.logging.Logger.getLogger(SalarySlipReport.class.getName()).log(Level.SEVERE, null, ex); } catch (COSVisitorException ex) { java.util.logging.Logger.getLogger(SalarySlipReport.class.getName()).log(Level.SEVERE, null, ex); } } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { processRequest(request, response); } catch (DocumentException ex) { java.util.logging.Logger.getLogger(SalarySlipReport.class.getName()).log(Level.SEVERE, null, ex); } catch (COSVisitorException ex) { java.util.logging.Logger.getLogger(SalarySlipReport.class.getName()).log(Level.SEVERE, null, ex); } } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "31878742+usgInfo@users.noreply.github.com" ]
31878742+usgInfo@users.noreply.github.com
724e31824c7915adaf84d20d0763195a3035a0b9
0ac05e3da06d78292fdfb64141ead86ff6ca038f
/OSWE/oswe/openCRX/rtjar/rt.jar.src/sun/net/www/content/audio/wav.java
72dc4253ba520427c4d722f9eb09b3bffd3e7fc8
[]
no_license
qoo7972365/timmy
31581cdcbb8858ac19a8bb7b773441a68b6c390a
2fc8baba4f53d38dfe9c2b3afd89dcf87cbef578
refs/heads/master
2023-07-26T12:26:35.266587
2023-07-17T12:35:19
2023-07-17T12:35:19
353,889,195
7
1
null
null
null
null
UTF-8
Java
false
false
942
java
/* */ package sun.net.www.content.audio; /* */ /* */ import java.io.IOException; /* */ import java.net.ContentHandler; /* */ import java.net.URLConnection; /* */ import sun.applet.AppletAudioClip; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class wav /* */ extends ContentHandler /* */ { /* */ public Object getContent(URLConnection paramURLConnection) throws IOException { /* 41 */ return new AppletAudioClip(paramURLConnection); /* */ } /* */ } /* Location: /Users/timmy/timmy/OSWE/oswe/openCRX/rt.jar!/sun/net/www/content/audio/wav.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "t0984456716" ]
t0984456716
4c929eeacbc6c5b02aebd6c2c4e64d1c9da8c8ab
f5f143087f35fa67fa4c54cad106a32e1fb45c0e
/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java
ee28a9e762f06f8f8bdbbf2f85c9fc973ad822f7
[]
no_license
SiverDX/SWFCopyValues
03b665b8f4ae3a2a22f360ea722813eeb52b4ef0
d146d8dcf6d1f7a69aa0471f85b852e64cad02f7
refs/heads/master
2022-07-29T06:56:55.446686
2021-12-04T09:48:48
2021-12-04T09:48:48
324,795,135
0
1
null
null
null
null
UTF-8
Java
false
false
3,521
java
/* * Copyright (C) 2010-2018 JPEXS, All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; /** * * @author JPEXS */ public class SubtractAVM2Item extends BinaryOpItem { public SubtractAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-", "Number", "Number"); } @Override public Object getResult() { return leftSide.getResultAsNumber() - rightSide.getResultAsNumber(); } @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { if (rightSide.getPrecedence() >= precedence) { // >= add or subtract too if (leftSide.getPrecedence() > precedence) { writer.append("("); leftSide.toString(writer, localData); writer.append(")"); } else { leftSide.toString(writer, localData); } writer.append(" "); writer.append(operator); writer.append(" "); writer.append("("); rightSide.toString(writer, localData); return writer.append(")"); } else { return super.appendTo(writer, localData); } } @Override public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { if (rightSide instanceof IntegerValueAVM2Item) { IntegerValueAVM2Item iv = (IntegerValueAVM2Item) rightSide; if (iv.value == 1) { return toSourceMerge(localData, generator, leftSide, new AVM2Instruction(0, AVM2Instructions.Decrement, null) ); } } return toSourceMerge(localData, generator, leftSide, rightSide, new AVM2Instruction(0, AVM2Instructions.Subtract, null) ); } @Override public GraphTargetItem returnType() { return new UnboundedTypeItem(); } }
[ "kai.zahn@yahoo.de" ]
kai.zahn@yahoo.de
9458123d09703f8af418b3c24f2f8bab0c0139b3
d800d32081cf72de93cd350d8724a88685ff50e7
/src/com/aliasi/hmm/AbstractHmmEstimator.java
9e2a96f0d5c9dca4de4d495c2ddb9e20bde2e1b1
[]
no_license
Spirit-Dongdong/NLP-learn
584615b4806ca71a41cda5b6ce11eb569f2e0137
96fec17c87d28442e6be32e014194a19c443abc5
refs/heads/master
2016-09-06T16:33:47.539877
2013-12-12T03:09:22
2013-12-12T03:09:22
13,031,595
1
1
null
null
null
null
UTF-8
Java
false
false
5,571
java
/* * LingPipe v. 3.9 * Copyright (C) 2003-2010 Alias-i * * This program is licensed under the Alias-i Royalty Free License * Version 1 WITHOUT ANY WARRANTY, without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Alias-i * Royalty Free License Version 1 for more details. * * You should have received a copy of the Alias-i Royalty Free License * Version 1 along with this program; if not, visit * http://alias-i.com/lingpipe/licenses/lingpipe-license-1.txt or contact * Alias-i, Inc. at 181 North 11th Street, Suite 401, Brooklyn, NY 11211, * +1 (718) 290-9170. */ package com.aliasi.hmm; import com.aliasi.corpus.ObjectHandler; import com.aliasi.symbol.SymbolTable; import com.aliasi.tag.Tagging; import com.aliasi.util.Compilable; import java.io.IOException; import java.io.ObjectOutput; import java.util.Arrays; /** * An <code>HmmEstimator</code> may be used to train a hidden Markov * model (HMM). Training events are supplied through the {@link * com.aliasi.corpus.ObjectHandler} interface method {@link * #handle(Tagging)}. The estimator implements an * HMM, so is suitable for use in a tag-a-little, learn-a-little * environment or elswhere when an adaptive HMM is required. * At any point, the estimator may be compiled to an object output * stream using {@link #compileTo(ObjectOutput)}. * * @author Bob Carpenter * @version 4.0.0 * @since LingPipe2.1 */ public abstract class AbstractHmmEstimator extends AbstractHmm implements ObjectHandler<Tagging<String>>, Compilable { private long mNumTrainingTokens = 0; private long mNumTrainingTaggings = 0; /** * Construct an HMM estimator with the specified tag symbol table. * * @param table Symbol table for tags. */ public AbstractHmmEstimator(SymbolTable table) { super(table); } /** * Train the start state estimator with the specified start state. * This increases the likelihood that the specified state will be * the state of the first token. * * @param state State being trained. */ public abstract void trainStart(String state); /** * Train the end state estimator with the specified end state. * This increases the likelihood that the specified state will be * the state of the last token. * * @param state State being trained. */ public abstract void trainEnd(String state); /** * Trains the transition estimator from the specified transition * from the specified source state to the specified target state. * * @param sourceState State from which the transition is made. * @param targetState State to which the transition is made. */ public abstract void trainTransit(String sourceState, String targetState); /** * Train the emission estimator with the specified training * instance consisting of a state and emission. This method may * be used for dictionary-based training for a particular state. * * @param state State being trained. * @param emission Emission from state being trained. */ public abstract void trainEmit(String state, CharSequence emission); /** * Compiles a copy of this estimated HMM to the specified object * output. Reading in the resulting bytes with an object input * will produce an instance of {@link HiddenMarkovModel}, but will * most likely not be an instance of the same class as the object * being compiled. * * @param objOut Object output to which this estimator is * compiled. * @throws IOException If there is an I/O exception compiling this * object. */ public abstract void compileTo(ObjectOutput objOut) throws IOException; /** * Return the number of taggings handled. This is simply the * number of times {@link #handle(Tagging)} has been called. * * @return The number of taggings handled for training. */ public long numTrainingCases() { return mNumTrainingTaggings; } /** * Returns the number of tokens handled for training. This is the * sum of the length of token arrays in all calls to the {@link * #handle(Tagging)} method. * * @return The number of tokens handled for training. */ public long numTrainingTokens() { return mNumTrainingTokens; } /** * Train the estimator with the specified tokens, whitespaces and * states. The whitespaces are ignored. * * <P>For a specified tagging made up of parallel sequences * of tags and tokens, this method calls: * <UL> * <LI> {@link #trainTransit(String,String)} * on each tag pair, * <LI>{@link #trainEmit(String,CharSequence)} on * each tag/token pair, * <LI> {@link #trainStart(String)} on the first tag, and * <LI> {@link #trainEnd(String)} on the last tag. * </UL> * * @param tagging Tagging from which tokens and tags are derived. */ public void handle(Tagging<String> tagging) { ++mNumTrainingTaggings; mNumTrainingTokens += tagging.size(); if (tagging.size() < 1) return; trainStart(tagging.tag(0)); for (int i = 0; i < tagging.size(); ++i) { trainEmit(tagging.tag(i), tagging.token(i)); if (i > 0) trainTransit(tagging.tag(i-1), tagging.tag(i)); } trainEnd(tagging.tag(tagging.size()-1)); } }
[ "spirit.dongdong@gmail.com" ]
spirit.dongdong@gmail.com
c8ae6546364e4485bac0b0e24561f052f2f15a9c
c660f18af9d169a0362de030745063952c27e962
/service/freemarker/src/test/java/com/alibaba/citrus/service/freemarker/SpringResourceLoaderAdapterTests.java
cb677ff20861709e514c2da419a37220c7b3889c
[ "Apache-2.0" ]
permissive
lpx1989/citrus
2395c3c248ead4d0ae7301a5a4763d9b5283007b
51fdd768621fe75f666b989e81ee42498f715534
refs/heads/master
2021-01-18T07:31:10.532149
2011-10-27T20:50:17
2011-10-27T20:50:17
null
0
0
null
null
null
null
GB18030
Java
false
false
7,156
java
/* * Copyright 2010 Alibaba Group Holding Limited. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.citrus.service.freemarker; import static com.alibaba.citrus.test.TestEnvStatic.*; import static com.alibaba.citrus.test.TestUtil.*; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.Set; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.core.io.FileSystemResource; import com.alibaba.citrus.service.freemarker.impl.SpringResourceLoaderAdapter; import com.alibaba.citrus.service.freemarker.impl.SpringResourceLoaderAdapter.TemplateSource; import com.alibaba.citrus.service.resource.ResourceFilter; import com.alibaba.citrus.service.resource.ResourceFilterChain; import com.alibaba.citrus.service.resource.ResourceLoadingOption; import com.alibaba.citrus.service.resource.ResourceLoadingService; import com.alibaba.citrus.service.resource.ResourceMatchResult; import com.alibaba.citrus.service.resource.ResourceNotFoundException; import com.alibaba.citrus.service.resource.support.InputStreamResource; import com.alibaba.citrus.service.resource.support.context.ResourceLoadingXmlApplicationContext; import com.alibaba.citrus.util.io.StreamUtil; public class SpringResourceLoaderAdapterTests { private static ApplicationContext factory; private SpringResourceLoaderAdapter freemarkerLoader; @BeforeClass public static void initFactory() { factory = new ResourceLoadingXmlApplicationContext(new FileSystemResource(new File(srcdir, "services.xml"))); } @Before public void init() throws Exception { freemarkerLoader = new SpringResourceLoaderAdapter(factory, "templates"); } @Test public void findTemplateSource() throws IOException { // test.ftl TemplateSource source1 = (TemplateSource) freemarkerLoader.findTemplateSource("test.ftl"); assertEquals("test", readText(source1.getInputStream())); freemarkerLoader.closeTemplateSource(source1); // test.ftl again TemplateSource source2 = (TemplateSource) freemarkerLoader.findTemplateSource("test.ftl"); assertEquals("test", readText(source2.getInputStream())); freemarkerLoader.closeTemplateSource(source2); // test.ftl == test.ftl assertThat(source1.hashCode(), equalTo(source2.hashCode())); assertThat(source1, equalTo(source2)); // test1.ftl TemplateSource source3 = (TemplateSource) freemarkerLoader.findTemplateSource("test2.ftl"); assertEquals("test2", readText(source3.getInputStream())); freemarkerLoader.closeTemplateSource(source3); // test.ftl != test1.ftl assertThat(source1.hashCode(), not(equalTo(source3.hashCode()))); assertThat(source1, not(equalTo(source3))); // 模板名为空 try { freemarkerLoader.findTemplateSource(null); fail(); } catch (IllegalArgumentException e) { assertThat(e, exception("templateName")); } // 模板不存在 assertNull(freemarkerLoader.findTemplateSource("notExist.ftl")); } @Test public void getLastModified() throws IOException { long lastModified = factory.getResource("/templates/test.ftl").lastModified(); // 资源/templates/test.ftl支持lastModified assertEquals(lastModified, lastModified("test.ftl")); // 资源/templates/notExist.ftl不存在 try { lastModified("/notExist.ftl"); fail(); } catch (IllegalArgumentException e) { assertThat(e, exception("templateSource")); } // 资源/templates/test2.ftl存在,但不支持lastModified,返回-1 assertEquals(0, factory.getResource("/templates/test2.ftl").lastModified()); assertEquals(-1, lastModified("test2.ftl")); } private long lastModified(String name) throws IOException { return freemarkerLoader.getLastModified(freemarkerLoader.findTemplateSource(name)); } @Test public void getReader() throws IOException { TemplateSource templateSource = (TemplateSource) freemarkerLoader.findTemplateSource("test3.ftl"); Reader reader = freemarkerLoader.getReader(templateSource, "GBK"); assertEquals("中国", StreamUtil.readText(reader, true)); freemarkerLoader.closeTemplateSource(templateSource); // null try { freemarkerLoader.getReader(null, "GBK"); fail(); } catch (IllegalArgumentException e) { assertThat(e, exception("templateSource")); } } @Test public void getInputStream() throws IOException { TemplateSource source = (TemplateSource) freemarkerLoader.findTemplateSource("test.ftl"); InputStream istream = source.getInputStream(); assertNotNull(istream); assertSame(istream, source.getInputStream()); // 两次返回同一个stream // 关闭后,再打开,将创建新的stream freemarkerLoader.closeTemplateSource(source); assertNotSame(istream, source.getInputStream()); freemarkerLoader.closeTemplateSource(source); } protected final String readText(InputStream stream) throws IOException { return StreamUtil.readText(stream, null, true); } /** * 除去resource URL的filter。 */ public static class NoURLFilter implements ResourceFilter { public void init(ResourceLoadingService resourceLoadingService) { } public com.alibaba.citrus.service.resource.Resource doFilter(ResourceMatchResult filterMatchResult, Set<ResourceLoadingOption> options, ResourceFilterChain chain) throws ResourceNotFoundException { com.alibaba.citrus.service.resource.Resource resource = chain.doFilter(filterMatchResult, options); try { return new InputStreamResource(resource.getInputStream()); } catch (IOException e) { fail(); return null; } } } }
[ "yizhi@taobao.com" ]
yizhi@taobao.com
615859eb62b13492b15382f027666e1650da2656
0b6b6bae30e12142c2c7efaa61b9cbab75d712ca
/lesson4-spring-mvc/starbucks/src/main/java/com/eprogrammerz/examples/springmvc/service/FormValidator.java
8084c5cc72472fc9ec5502c45c6980c485081a03
[]
no_license
java-spring-hub/waa-examples
22f9edf6609f3b90574c5c803c3ef574b21f99af
879d97fac6ece275a46238b55ae81784a57ad1d8
refs/heads/master
2020-06-24T16:16:12.807282
2018-11-02T01:58:07
2018-11-02T01:58:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
166
java
package com.eprogrammerz.examples.springmvc.service; import java.util.List; public interface FormValidator { public List<String> validateForm(Object object); }
[ "yogen.rai.992@gmail.com" ]
yogen.rai.992@gmail.com
8bfe3f691d67028559cc31e8bdf5ee174e518f47
ac1c9fbc1f1019efb19d0a8f3a088e8889f1e83c
/out/release/gen/services/network/public/mojom/mojom_java/generated_java/input_srcjars/org/chromium/network/mojom/OriginPolicyManager.java
a180fe1b16892cf04178a58c6d6c5db05979c212
[ "BSD-3-Clause" ]
permissive
xueqiya/chromium_src
5d20b4d3a2a0251c063a7fb9952195cda6d29e34
d4aa7a8f0e07cfaa448fcad8c12b29242a615103
refs/heads/main
2022-07-30T03:15:14.818330
2021-01-16T16:47:22
2021-01-16T16:47:22
330,115,551
1
0
null
null
null
null
UTF-8
Java
false
false
1,111
java
// OriginPolicyManager.java is auto generated by mojom_bindings_generator.py, do not edit // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file is autogenerated by: // mojo/public/tools/bindings/mojom_bindings_generator.py // For: // services/network/public/mojom/origin_policy_manager.mojom // package org.chromium.network.mojom; public interface OriginPolicyManager extends org.chromium.mojo.bindings.Interface { public interface Proxy extends OriginPolicyManager, org.chromium.mojo.bindings.Interface.Proxy { } Manager<OriginPolicyManager, OriginPolicyManager.Proxy> MANAGER = OriginPolicyManager_Internal.MANAGER; void retrieveOriginPolicy( org.chromium.url.internal.mojom.Origin origin, String headerValue, RetrieveOriginPolicyResponse callback); interface RetrieveOriginPolicyResponse extends org.chromium.mojo.bindings.Callbacks.Callback1<OriginPolicy> { } void addExceptionFor( org.chromium.url.internal.mojom.Origin origin); }
[ "xueqi@zjmedia.net" ]
xueqi@zjmedia.net
84015b2130cef7e7ae19d4f652d60c6b42280fa5
682bfd40c3cc651a6196e8e368696e930370a618
/crm-account-service/src/main/java/ekol/crm/account/domain/dto/kartoteksservice/CompanySector.java
34e9388df94f8f3cd077eb78e94d54c72c821a6a
[]
no_license
seerdaryilmazz/OOB
3b27b67ce1cbf3f411f7c672d0bed0d71bc9b127
199f0c18b82d04569d26a08a1a4cd8ee8c7ba42d
refs/heads/master
2022-12-30T09:23:25.061974
2020-10-09T13:14:39
2020-10-09T13:14:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
681
java
package ekol.crm.account.domain.dto.kartoteksservice; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @JsonIgnoreProperties(ignoreUnknown = true) public class CompanySector { private Long id; private Sector sector; private boolean isDefault; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Sector getSector() { return sector; } public void setSector(Sector sector) { this.sector = sector; } public boolean isDefault() { return isDefault; } public void setDefault(boolean aDefault) { isDefault = aDefault; } }
[ "dogukan.sahinturk@ekol.com" ]
dogukan.sahinturk@ekol.com
13b1987f2880b07909eb9749c1f13f66ee3aa893
9a2d885bf748bb25bdf8895e301781de3b5b147d
/meitu/Trunk/Meitu/src/com/bccv/meitu/model/GetSpecialResBean.java
2e047f83cac84502d6aa5c31be3a991b4fceeccc
[]
no_license
Jisucloud/android
918215138ed4b558eb32ee61d89b6cbd046cf414
ae886daf4a29f9e46612a58197abb2f4895c0fbc
refs/heads/master
2023-03-19T22:26:54.391865
2017-04-11T07:26:09
2017-04-11T07:26:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,868
java
package com.bccv.meitu.model; import java.util.List; import org.json.JSONException; import org.json.JSONObject; import android.text.TextUtils; import com.alibaba.fastjson.JSON; import com.bccv.meitu.network.NetResBean; import com.bccv.meitu.utils.JsonObjectUitl; import com.bccv.meitu.utils.Logger; public class GetSpecialResBean extends NetResBean { private int isfavorite; private int iszan; private Special special;//专辑详情 private List<Special> list;//相关专辑 private List<Comment> comment;//最新评论 private List<Comment> comment_hot;//最热评论 public int getIsfavorite() { return isfavorite; } public void setIsfavorite(int isfavorite) { this.isfavorite = isfavorite; } public int getIszan() { return iszan; } public void setIszan(int iszan) { this.iszan = iszan; } public List<Special> getList() { return list; } public Special getSpecial() { return special; } public void setSpecial(Special special) { this.special = special; } public void setList(List<Special> list) { this.list = list; } public List<Comment> getComment() { return comment; } public void setComment(List<Comment> comment) { this.comment = comment; } public List<Comment> getComment_hot() { return comment_hot; } public void setComment_hot(List<Comment> comment_hot) { this.comment_hot = comment_hot; } // public class Special{ // // private int special_id; // private String special_name; // private String special_pic; // private int care_num; // private int zan_num; // private int comment_num; // private int special_pic_h; // private int special_pic_w; // private int author_id; // private String author_name; // private String author_icon; // private List<Tag> tag; // public int getSpecial_id() { // return special_id; // } // public void setSpecial_id(int special_id) { // this.special_id = special_id; // } // public String getSpecial_name() { // return special_name; // } // public void setSpecial_name(String special_name) { // this.special_name = special_name; // } // public String getSpecial_pic() { // return special_pic; // } // public void setSpecial_pic(String special_pic) { // this.special_pic = special_pic; // } // public int getCare_num() { // return care_num; // } // public void setCare_num(int care_num) { // this.care_num = care_num; // } // public int getZan_num() { // return zan_num; // } // public void setZan_num(int zan_num) { // this.zan_num = zan_num; // } // public int getComment_num() { // return comment_num; // } // public void setComment_num(int comment_num) { // this.comment_num = comment_num; // } // public int getSpecial_pic_h() { // return special_pic_h; // } // public void setSpecial_pic_h(int special_pic_h) { // this.special_pic_h = special_pic_h; // } // public int getSpecial_pic_w() { // return special_pic_w; // } // public void setSpecial_pic_w(int special_pic_w) { // this.special_pic_w = special_pic_w; // } // public int getAuthor_id() { // return author_id; // } // public void setAuthor_id(int author_id) { // this.author_id = author_id; // } // public String getAuthor_name() { // return author_name; // } // public void setAuthor_name(String author_name) { // this.author_name = author_name; // } // public String getAuthor_icon() { // return author_icon; // } // public void setAuthor_icon(String author_icon) { // this.author_icon = author_icon; // } // public List<Tag> getTag() { // return tag; // } // public void setTag(List<Tag> tag) { // this.tag = tag; // } // } // // public class Tag{ // private int tag_id; // private String tag_name; // public int getTag_id() { // return tag_id; // } // public void setTag_id(int tag_id) { // this.tag_id = tag_id; // } // public String getTag_name() { // return tag_name; // } // public void setTag_name(String tag_name) { // this.tag_name = tag_name; // } // // } // public class Comment{//评论 // private int id; // private String comments_content; // private int support; // private int ctime; // private String user_name; // private String user_icon; // public int getId() { // return id; // } // public void setId(int id) { // this.id = id; // } // public String getComments_content() { // return comments_content; // } // public void setComments_content(String comments_content) { // this.comments_content = comments_content; // } // public int getSupport() { // return support; // } // public void setSupport(int support) { // this.support = support; // } // public int getCtime() { // return ctime; // } // public void setCtime(int ctime) { // this.ctime = ctime; // } // public String getUser_name() { // return user_name; // } // public void setUser_name(String user_name) { // this.user_name = user_name; // } // public String getUser_icon() { // return user_icon; // } // public void setUser_icon(String user_icon) { // this.user_icon = user_icon; // } // // } @Override public String toString() { return "GetSpecialResBean [isfavorite=" + isfavorite + ", iszan=" + iszan + ", special=" + special + ", list=" + list + ", comment=" + comment + ", comment_hot=" + comment_hot + ", success=" + success + ", error=" + error + "]"; } @Override public void parseData(String data) { if(success){ try { JSONObject jsonObject = new JSONObject(data); isfavorite = JsonObjectUitl.getInt(jsonObject, "isfavorite"); iszan = JsonObjectUitl.getInt(jsonObject, "iszan"); String listStr = JsonObjectUitl.getString(jsonObject, "list"); list = JSON.parseArray(listStr, Special.class); String commentStr = JsonObjectUitl.getString(jsonObject, "comment"); if(!TextUtils.isEmpty(commentStr)){ comment = JSON.parseArray(commentStr, Comment.class); } String commentHotStr = JsonObjectUitl.getString(jsonObject, "comment_hot"); if(!TextUtils.isEmpty(commentHotStr)){ comment_hot = JSON.parseArray(commentHotStr, Comment.class); } JSONObject specialObject = jsonObject.getJSONObject("special"); special = new Special(); special.setSpecial_id(JsonObjectUitl.getInt(specialObject, "special_id")); special.setSpecial_name(JsonObjectUitl.getString(specialObject, "special_name")); special.setSpecial_pic(JsonObjectUitl.getString(specialObject, "special_pic")); special.setCare_num(JsonObjectUitl.getInt(specialObject,"care_num")); special.setZan_num(JsonObjectUitl.getInt(specialObject,"zan_num")); special.setComment_num(JsonObjectUitl.getInt(specialObject,"comment_num")); special.setSpecial_pic_h(JsonObjectUitl.getInt(specialObject,"special_pic_h")); special.setSpecial_pic_w(JsonObjectUitl.getInt(specialObject,"special_pic_w")); special.setAuthor_id(JsonObjectUitl.getInt(specialObject,"author_id")); special.setAuthor_name(JsonObjectUitl.getString(specialObject,"author_name")); special.setAuthor_icon(JsonObjectUitl.getString(specialObject,"author_icon")); special.setCtime(JsonObjectUitl.getString(specialObject,"ctime")); special.setSpecial_names(JsonObjectUitl.getString(specialObject, "special_names")); String tagStr = JsonObjectUitl.getString(specialObject,"tag"); if(!TextUtils.isEmpty(tagStr)){ special.setTag(JSON.parseArray(tagStr, Tag.class)); } } catch (JSONException e) { success = false; Logger.e(TAG, "parseData", e.getMessage()); } } } }
[ "admin@xxc.local" ]
admin@xxc.local
b486415d3aad4e64948543ee51a0d1677e2d9f1c
8c162ea9d3df3a9d4259490007a9ca5ea88a946c
/vcr4j-examples/src/main/java/org/mbari/vcr4j/examples/rxtx/SimpleDemo02.java
f243095d53b5344976bad2cfb834707dc2fe9f0f
[ "Apache-2.0" ]
permissive
tropicofdan/vcr4j
446352f7c181e94f1181ebb1b6ffc40d437646d8
bba7b41810c6b32a93b95c449944b094cc9dad6c
refs/heads/master
2023-08-01T05:46:19.079635
2021-09-27T11:14:23
2021-09-27T11:14:23
410,829,239
0
0
Apache-2.0
2021-09-27T11:14:23
2021-09-27T09:54:55
null
UTF-8
Java
false
false
2,145
java
package org.mbari.vcr4j.examples.rxtx; import org.docopt.Docopt; import org.mbari.vcr4j.VideoController; import org.mbari.vcr4j.VideoState; import org.mbari.vcr4j.decorators.LoggingDecorator; import org.mbari.vcr4j.decorators.VCRSyncDecorator; import org.mbari.vcr4j.rs422.decorators.RS422LoggingDecorator; import org.mbari.vcr4j.rxtx.RXTX; import org.mbari.vcr4j.rxtx.RXTXVideoIO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; /** * @author Brian Schlining * @since 2016-02-03T12:33:00 */ public class SimpleDemo02 { private static final Logger log = LoggerFactory.getLogger(SimpleDemo02.class); public static void main(String[] args) throws Exception { String prog = SimpleDemo02.class.getName(); String doc = "Usage: " + prog + " <commport> [options]\n\n" + "Options:\n" + " -h, --help"; Map<String, Object> opts = new Docopt(doc).parse(args); String portName = (String) opts.get("<commport>"); RXTX.setup(); // sets up native libraries RXTXVideoIO io = RXTXVideoIO.open(portName); // Open serial port LoggingDecorator loggingDecorator = new RS422LoggingDecorator(io); // Log everything // This decorator starts a lot of chatter with the device. Useful // for keeping timecode and status in sync with a VCR VCRSyncDecorator syncDecorator = new VCRSyncDecorator(io); VideoController controller = new VideoController(io); // Wrap io with a standard control controller.play(); controller.requestStatus(); // Wait until video starts playing AtomicBoolean wait = new AtomicBoolean(true); io.getStateObservable() .filter(VideoState::isPlaying) .take(1) .forEach(state -> wait.set(false)); while (wait.get()) { Thread.sleep(200); } controller.requestTimecode(); Thread.sleep(4000); controller.stop(); Thread.sleep(1000); io.close(); System.exit(0); } }
[ "bschlining@gmail.com" ]
bschlining@gmail.com
4400cc21dbb8b7e916632a99acb5175ab21e7902
99e44fc1db97c67c7ae8bde1c76d4612636a2319
/app/src/main/java/com/android/gallery3d/app/TrimControllerOverlay.java
386205e55c07839c40a36b53182b0cc3ddcdf166
[ "MIT" ]
permissive
wossoneri/AOSPGallery4AS
add7c34b2901e3650d9b8518a02dd5953ba48cef
0be2c89f87e3d5bd0071036fe89d0a1d0d9db6df
refs/heads/master
2022-03-21T04:42:57.965745
2022-02-23T08:44:51
2022-02-23T08:44:51
113,425,141
3
2
MIT
2022-02-23T08:44:52
2017-12-07T08:45:41
Java
UTF-8
Java
false
false
3,555
java
/* * Copyright (C) 2012 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.animation.Animator; import android.animation.Animator.AnimatorListener; import android.animation.ObjectAnimator; import android.content.Context; import android.view.MotionEvent; import android.view.View; import com.android.libs.gallerycommon.common.ApiHelper; /** * The controller for the Trimming Video. */ public class TrimControllerOverlay extends CommonControllerOverlay { public TrimControllerOverlay(Context context) { super(context); } @Override protected void createTimeBar(Context context) { mTimeBar = new TrimTimeBar(context, this); } private void hidePlayButtonIfPlaying() { if (mState == State.PLAYING) { mPlayPauseReplayView.setVisibility(View.INVISIBLE); } if (ApiHelper.HAS_OBJECT_ANIMATION) { mPlayPauseReplayView.setAlpha(1f); } } @Override public void showPlaying() { super.showPlaying(); if (ApiHelper.HAS_OBJECT_ANIMATION) { // Add animation to hide the play button while playing. ObjectAnimator anim = ObjectAnimator.ofFloat(mPlayPauseReplayView, "alpha", 1f, 0f); anim.setDuration(200); anim.start(); anim.addListener(new AnimatorListener() { @Override public void onAnimationStart(Animator animation) { } @Override public void onAnimationEnd(Animator animation) { hidePlayButtonIfPlaying(); } @Override public void onAnimationCancel(Animator animation) { hidePlayButtonIfPlaying(); } @Override public void onAnimationRepeat(Animator animation) { } }); } else { hidePlayButtonIfPlaying(); } } @Override public void setTimes(int currentTime, int totalTime, int trimStartTime, int trimEndTime) { mTimeBar.setTime(currentTime, totalTime, trimStartTime, trimEndTime); } @Override public boolean onTouchEvent(MotionEvent event) { if (super.onTouchEvent(event)) { return true; } // The special thing here is that the State.ENDED include both cases of // the video completed and current == trimEnd. Both request a replay. switch (event.getAction()) { case MotionEvent.ACTION_DOWN: if (mState == State.PLAYING || mState == State.PAUSED) { mListener.onPlayPause(); } else if (mState == State.ENDED) { if (mCanReplay) { mListener.onReplay(); } } break; case MotionEvent.ACTION_UP: break; } return true; } }
[ "siyolatte@gmail.com" ]
siyolatte@gmail.com
c74df7ca019e49500185c8fd2e097c8ea5dbc3de
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/d009aa71ece41454c68d8038b5462d8eea8feb291bce1d53ee149f8477b5eab62ee28c7f690bf14dc6ce1d70c8943f7f3b3e4300965cb24da4cd2d2807dab19a/003/mutations/90/grade_d009aa71_003.java
2a8249358bad04a0fba1853dbfc14b65fcca824e
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,417
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_d009aa71_003 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_d009aa71_003 mainClass = new grade_d009aa71_003 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { FloatObj A = new FloatObj (), B = new FloatObj (), C = new FloatObj (), D = new FloatObj (), score = new FloatObj (); output += (String.format ("Enter thresholds for A, B, C, D\nin that order, decreasing percentages > ")); A.value = scanner.nextFloat (); B.value = scanner.nextFloat (); C.value = scanner.nextFloat (); D.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) > ")); score.value = scanner.nextFloat (); if (score.value >= A.value) { output += (String.format ("Student has an A grade\n")); } else if (score.value >= B.value) { output += (String.format ("Student has a B grade\n")); } else if (score.value) < (D.value) { output += (String.format ("Student has a C grade\n")); } else if (score.value >= D.value) { output += (String.format ("Student has a D grade\n")); } else if (score.value < D.value) { output += (String.format ("Student has failed the course\n")); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
b472b279af455a5b22daf9fd1f7f974ee26c465f
89c84e2d0d69e36f4643517b93341a7d823caa9d
/chart/src/main/java/com/github/mikephil/charting/data/CombinedData.java
2dccfa55adb5cd220a989909d6172aee369cb85e
[]
no_license
bingoloves/Template
c6608428be0a77f6adacee078beee95440b4c93b
29ebeb5bffac54c8ac66b228f1cde0dc8894f369
refs/heads/master
2022-11-15T02:18:45.478113
2020-07-15T09:40:10
2020-07-15T09:40:10
273,198,103
0
0
null
null
null
null
UTF-8
Java
false
false
7,852
java
package com.github.mikephil.charting.data; import android.util.Log; import com.github.mikephil.charting.components.YAxis; import com.github.mikephil.charting.highlight.Highlight; import com.github.mikephil.charting.interfaces.datasets.IBarLineScatterCandleBubbleDataSet; import java.util.ArrayList; import java.util.List; /** * Data object that allows the combination of Line-, Bar-, Scatter-, Bubble- and * CandleData. Used in the CombinedChart class. * * @author Philipp Jahoda */ public class CombinedData extends BarLineScatterCandleBubbleData<IBarLineScatterCandleBubbleDataSet<? extends Entry>> { private LineData mLineData; private BarData mBarData; private ScatterData mScatterData; private CandleData mCandleData; private BubbleData mBubbleData; public CombinedData() { super(); } public void setData(LineData data) { mLineData = data; notifyDataChanged(); } public void setData(BarData data) { mBarData = data; notifyDataChanged(); } public void setData(ScatterData data) { mScatterData = data; notifyDataChanged(); } public void setData(CandleData data) { mCandleData = data; notifyDataChanged(); } public void setData(BubbleData data) { mBubbleData = data; notifyDataChanged(); } @Override public void calcMinMax() { if(mDataSets == null){ mDataSets = new ArrayList<>(); } mDataSets.clear(); mYMax = -Float.MAX_VALUE; mYMin = Float.MAX_VALUE; mXMax = -Float.MAX_VALUE; mXMin = Float.MAX_VALUE; mLeftAxisMax = -Float.MAX_VALUE; mLeftAxisMin = Float.MAX_VALUE; mRightAxisMax = -Float.MAX_VALUE; mRightAxisMin = Float.MAX_VALUE; List<BarLineScatterCandleBubbleData> allData = getAllData(); for (ChartData data : allData) { data.calcMinMax(); List<IBarLineScatterCandleBubbleDataSet<? extends Entry>> sets = data.getDataSets(); mDataSets.addAll(sets); if (data.getYMax() > mYMax) mYMax = data.getYMax(); if (data.getYMin() < mYMin) mYMin = data.getYMin(); if (data.getXMax() > mXMax) mXMax = data.getXMax(); if (data.getXMin() < mXMin) mXMin = data.getXMin(); for (IBarLineScatterCandleBubbleDataSet<? extends Entry> dataset : sets) { if (dataset.getAxisDependency() == YAxis.AxisDependency.LEFT) { if (dataset.getYMax() > mLeftAxisMax) { mLeftAxisMax = dataset.getYMax(); } if (dataset.getYMin() < mLeftAxisMin) { mLeftAxisMin = dataset.getYMin(); } } else { if (dataset.getYMax() > mRightAxisMax) { mRightAxisMax = dataset.getYMax(); } if (dataset.getYMin() < mRightAxisMin) { mRightAxisMin = dataset.getYMin(); } } } } } public BubbleData getBubbleData() { return mBubbleData; } public LineData getLineData() { return mLineData; } public BarData getBarData() { return mBarData; } public ScatterData getScatterData() { return mScatterData; } public CandleData getCandleData() { return mCandleData; } /** * Returns all data objects in row: line-bar-scatter-candle-bubble if not null. * * @return */ public List<BarLineScatterCandleBubbleData> getAllData() { List<BarLineScatterCandleBubbleData> data = new ArrayList<BarLineScatterCandleBubbleData>(); if (mLineData != null) data.add(mLineData); if (mBarData != null) data.add(mBarData); if (mScatterData != null) data.add(mScatterData); if (mCandleData != null) data.add(mCandleData); if (mBubbleData != null) data.add(mBubbleData); return data; } public BarLineScatterCandleBubbleData getDataByIndex(int index) { return getAllData().get(index); } @Override public void notifyDataChanged() { if (mLineData != null) mLineData.notifyDataChanged(); if (mBarData != null) mBarData.notifyDataChanged(); if (mCandleData != null) mCandleData.notifyDataChanged(); if (mScatterData != null) mScatterData.notifyDataChanged(); if (mBubbleData != null) mBubbleData.notifyDataChanged(); calcMinMax(); // recalculate everything } /** * Get the Entry for a corresponding highlight object * * @param highlight * @return the entry that is highlighted */ @Override public Entry getEntryForHighlight(Highlight highlight) { if (highlight.getDataIndex() >= getAllData().size()) return null; ChartData data = getDataByIndex(highlight.getDataIndex()); if (highlight.getDataSetIndex() >= data.getDataSetCount()) return null; // The value of the highlighted entry could be NaN - // if we are not interested in highlighting a specific value. List<Entry> entries = data.getDataSetByIndex(highlight.getDataSetIndex()) .getEntriesForXValue(highlight.getX()); for (Entry entry : entries) if (entry.getY() == highlight.getY() || Float.isNaN(highlight.getY())) return entry; return null; } /** * Get dataset for highlight * * @param highlight current highlight * @return dataset related to highlight */ public IBarLineScatterCandleBubbleDataSet<? extends Entry> getDataSetByHighlight(Highlight highlight) { if (highlight.getDataIndex() >= getAllData().size()) return null; BarLineScatterCandleBubbleData data = getDataByIndex(highlight.getDataIndex()); if (highlight.getDataSetIndex() >= data.getDataSetCount()) return null; return (IBarLineScatterCandleBubbleDataSet<? extends Entry>) data.getDataSets().get(highlight.getDataSetIndex()); } public int getDataIndex(ChartData data) { return getAllData().indexOf(data); } @Override public boolean removeDataSet(IBarLineScatterCandleBubbleDataSet<? extends Entry> d) { List<BarLineScatterCandleBubbleData> datas = getAllData(); boolean success = false; for (ChartData data : datas) { success = data.removeDataSet(d); if (success) { break; } } return success; } @Deprecated @Override public boolean removeDataSet(int index) { Log.e("MPAndroidChart", "removeDataSet(int index) not supported for CombinedData"); return false; } @Deprecated @Override public boolean removeEntry(Entry e, int dataSetIndex) { Log.e("MPAndroidChart", "removeEntry(...) not supported for CombinedData"); return false; } @Deprecated @Override public boolean removeEntry(float xValue, int dataSetIndex) { Log.e("MPAndroidChart", "removeEntry(...) not supported for CombinedData"); return false; } }
[ "657952166@qq.com" ]
657952166@qq.com
ee6b564dba625d7a940cc7e93784fd3f3b25289d
3facc04d3b918e01dcbefbc29f1696adbe260cde
/guava-learning/src/test/java/come/comenie/guava/EventBus/AsyncEventBusTest.java
bd721a6de30e3eb52f0e1642f14d70eba458167d
[]
no_license
comeNie/training
1d9012658f084b84cdb5cdad9d42866bf314167d
a64977f1d47d417f43d8e656e4692c1101c54246
refs/heads/master
2021-01-11T22:53:29.016070
2017-04-09T06:31:52
2017-04-09T06:31:52
78,517,724
0
0
null
null
null
null
UTF-8
Java
false
false
2,429
java
/* * Copyright (C) 2007 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package come.comenie.guava.EventBus; import com.google.common.collect.Lists; import com.google.common.eventbus.AsyncEventBus; import org.junit.Before; import org.junit.Test; import java.util.List; import java.util.concurrent.Executor; import static org.junit.Assert.*; /** * Test case for {@link AsyncEventBus}. * * @author Cliff Biffle */ public class AsyncEventBusTest { private static final String EVENT = "Hello"; /** The executor we use to fake asynchronicity. */ private FakeExecutor executor; private AsyncEventBus bus; @Before public void setUp() throws Exception { executor = new FakeExecutor(); bus = new AsyncEventBus(executor); } @Test public void testBasicDistribution() { StringCatcher catcher = new StringCatcher(); bus.register(catcher); // We post the event, but our Executor will not deliver it until instructed. bus.post(EVENT); List<String> events = catcher.getEvents(); assertTrue("No events should be delivered synchronously.", events.isEmpty()); // Now we find the task in our Executor and explicitly activate it. List<Runnable> tasks = executor.getTasks(); assertEquals("One event dispatch task should be queued.", 1, tasks.size()); tasks.get(0).run(); assertEquals("One event should be delivered.", 1, events.size()); assertEquals("Correct string should be delivered.", EVENT, events.get(0)); } /** * An {@link Executor} wanna-be that simply records the tasks it's given. * Arguably the Worst Executor Ever. * * @author cbiffle * */ public static class FakeExecutor implements Executor { List<Runnable> tasks = Lists.newArrayList(); public void execute(Runnable task) { tasks.add(task); } public List<Runnable> getTasks() { return tasks; } } }
[ "123456" ]
123456
dd8d571fa607feec6f55ce022d72b3c3f410a377
b06dd215c53770ea25b8d37fa91a675e59ad00f1
/ifarm/back/back-web/src/main/java/com/ifarm/back/web/controller/AbstractController.java
308bc438768809d0255b823c224e625ef8b09067
[]
no_license
lhrimperial/MyProject
e818d66a2a4a63bdb627e97795ca085a862711cd
5f2a619a5987d1dea169b7d6ed953afa6d9cb371
refs/heads/master
2021-01-25T05:09:31.460235
2017-12-08T14:03:49
2017-12-08T14:03:49
93,509,846
0
0
null
null
null
null
UTF-8
Java
false
false
208
java
package com.ifarm.back.web.controller; import java.io.Serializable; /** * @author longhairen * @create 2017/6/14 0014 上午 10:21 */ public abstract class AbstractController implements Serializable { }
[ "longhairen@lvmama.com" ]
longhairen@lvmama.com
0909cd78b6e17a56f5f66fe82a0e04a2334df95e
a715e8312a90d099b72c24e5b7da1372c9fe67fb
/android/android/src/com/android/tools/idea/gradle/util/FilePaths.java
8735f68c327925de664878e87285037b7d7fc476
[ "Apache-2.0" ]
permissive
wiltonlazary/bugvm-studio
ff98c1beca1f890013aa05ecd67f137a14a70c32
5861389424a51181c58178576c78cf35c0ceb1b5
refs/heads/master
2021-01-24T20:58:41.730805
2015-12-18T19:34:14
2015-12-18T19:34:14
56,322,614
2
1
null
2016-04-15T13:34:56
2016-04-15T13:34:56
null
UTF-8
Java
false
false
3,010
java
/* * Copyright (C) 2014 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.tools.idea.gradle.util; import com.intellij.openapi.roots.ContentEntry; import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.File; import java.util.Collection; import static com.intellij.openapi.util.io.FileUtil.isAncestor; import static com.intellij.openapi.util.io.FileUtil.toSystemIndependentName; import static com.intellij.openapi.vfs.VfsUtilCore.pathToUrl; import static com.intellij.openapi.vfs.VfsUtilCore.urlToPath; public final class FilePaths { private FilePaths() { } @Nullable public static ContentEntry findParentContentEntry(@NotNull File path, @NotNull ContentEntry[] contentEntries) { for (ContentEntry contentEntry : contentEntries) { if (isPathInContentEntry(path, contentEntry)) { return contentEntry; } } return null; } @Nullable public static ContentEntry findParentContentEntry(@NotNull File path, @NotNull Collection<ContentEntry> contentEntries) { for (ContentEntry contentEntry : contentEntries) { if (isPathInContentEntry(path, contentEntry)) { return contentEntry; } } return null; } public static boolean isPathInContentEntry(@NotNull File path, @NotNull ContentEntry contentEntry) { VirtualFile rootFile = contentEntry.getFile(); File rootFilePath; if (rootFile == null) { String s = urlToPath(contentEntry.getUrl()); rootFilePath = new File(s); } else { rootFilePath = VfsUtilCore.virtualToIoFile(rootFile); } return isAncestor(rootFilePath, path, false); } /** * Converts the given path to an URL. The underlying implementation "cheats": it doesn't encode spaces and it just adds the "file" * protocol at the beginning of this path. We use this method when creating URLs for file paths that will be included in a module's * content root, because converting a URL back to a path expects the path to be constructed the way this method does. To obtain a real * URL from a file path, use {@link com.android.utils.SdkUtils#fileToUrl(File)}. * * @param path the given path. * @return the created URL. */ @NotNull public static String pathToIdeaUrl(@NotNull File path) { return pathToUrl(toSystemIndependentName(path.getPath())); } }
[ "github@ibinti.com" ]
github@ibinti.com
cb20d23791a8fc0484fd695ed10875b702f26b81
52abb3f9d6f5747ba9a7abeda455767f524a0898
/sp/src/main/java/com/sp/web/form/PaymentInstrumentForm.java
1d3fa7ef417b7d4b6ce744a297e167fa2c864f45
[]
no_license
srayapatipolarits/ECSandCFN
251e474be9e76126bdd9244a480087eb9e28c039
1c16f7eebc6856afc47ad712fe7c1d160ffd3e84
refs/heads/master
2020-03-17T06:32:43.155453
2018-05-01T13:19:34
2018-05-01T13:19:34
133,360,061
1
0
null
2018-05-14T12:51:34
2018-05-14T12:51:34
null
UTF-8
Java
false
false
2,155
java
package com.sp.web.form; import com.sp.web.model.PaymentInstrument; import com.sp.web.model.account.SPPlanType; import org.springframework.beans.BeanUtils; /** * @author Dax Abraham * * The form to input the payment instrument information. */ public class PaymentInstrumentForm { /** * Payment details. */ private String nameOnCard; private String cardNumber; private String month; private String year; private String cvv; private String country; private String zip; private SPPlanType planType; public String getNameOnCard() { return nameOnCard; } public void setNameOnCard(String nameOnCard) { this.nameOnCard = nameOnCard; } public String getCardNumber() { return cardNumber; } public void setCardNumber(String cardNumber) { this.cardNumber = cardNumber; } public String getMonth() { return month; } public void setMonth(String month) { this.month = month; } public String getYear() { return year; } public void setYear(String year) { this.year = year; } public String getCvv() { return cvv; } public void setCvv(String cvv) { this.cvv = cvv; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getZip() { return zip; } public void setZip(String zip) { this.zip = zip; } /** * Updates the payment information with the given payment form details. * * @param pi * - payment instrument to update * @return the updated payment instrument */ public PaymentInstrument update(PaymentInstrument pi) { BeanUtils.copyProperties(this, pi); return pi; } /** * Creates a new payment instrument from the information present in the form. * * @return - payment instrument */ public PaymentInstrument newPaymentInstrument() { return update(new PaymentInstrument()); } public void setPlanType(SPPlanType planType) { this.planType = planType; } public SPPlanType getPlanType() { return planType; } }
[ "root@ip-10-0-1-253.ec2.internal" ]
root@ip-10-0-1-253.ec2.internal
0a96e55383368edbfc37d2d9c4e68ef116f21659
43e4f1839f82833cdcc9774c0a69a49f256465e6
/cdp4j/src/main/java/io/webfolder/cdp/type/browser/Bounds.java
972ae5a728a22c259249718fa03e439657c3635c
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
iMaksimkin/selenium_java
8a840d3a23f169a60e45c4fb73f753f5da7f3f05
8f640f7f29b8d7229a56d688e6b3ff1bd2e045ce
refs/heads/master
2020-11-25T07:43:09.473004
2019-12-16T02:00:28
2019-12-16T02:00:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,734
java
/** * cdp4j Commercial License * * Copyright 2017, 2018 WebFolder OÜ * * Permission is hereby granted, to "____" 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 and sublicense of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following conditions: * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package io.webfolder.cdp.type.browser; import io.webfolder.cdp.annotation.Experimental; /** * Browser window bounds information */ @Experimental public class Bounds { private Integer left; private Integer top; private Integer width; private Integer height; private WindowState windowState; /** * The offset from the left edge of the screen to the window in pixels. */ public Integer getLeft() { return left; } /** * The offset from the left edge of the screen to the window in pixels. */ public void setLeft(Integer left) { this.left = left; } /** * The offset from the top edge of the screen to the window in pixels. */ public Integer getTop() { return top; } /** * The offset from the top edge of the screen to the window in pixels. */ public void setTop(Integer top) { this.top = top; } /** * The window width in pixels. */ public Integer getWidth() { return width; } /** * The window width in pixels. */ public void setWidth(Integer width) { this.width = width; } /** * The window height in pixels. */ public Integer getHeight() { return height; } /** * The window height in pixels. */ public void setHeight(Integer height) { this.height = height; } /** * The window state. Default to normal. */ public WindowState getWindowState() { return windowState; } /** * The window state. Default to normal. */ public void setWindowState(WindowState windowState) { this.windowState = windowState; } }
[ "kouzmine_serguei@yahoo.com" ]
kouzmine_serguei@yahoo.com
2039284d5beffc620f1383072093f9e0f756e819
917c59198e9aebfbbab3308ea5e86dff5ad53275
/sdk/java/src/main/java/com/pulumi/alicloud/eci/inputs/VirtualNodeTaintArgs.java
af372211234e4527afde72a74cc878cec3f801f3
[ "Apache-2.0", "MPL-2.0", "BSD-3-Clause" ]
permissive
pulumi/pulumi-alicloud
7dae47cc2c6e276d4264001ef361d71ed3a5ad29
ffddb9036f7893fbd58863d8364a4977eb1bee17
refs/heads/master
2023-09-01T10:57:34.824755
2023-08-31T05:34:31
2023-08-31T05:34:31
154,406,339
56
5
Apache-2.0
2023-09-11T17:22:49
2018-10-23T22:45:48
Java
UTF-8
Java
false
false
3,845
java
// *** WARNING: this file was generated by pulumi-java-gen. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** package com.pulumi.alicloud.eci.inputs; import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.String; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; public final class VirtualNodeTaintArgs extends com.pulumi.resources.ResourceArgs { public static final VirtualNodeTaintArgs Empty = new VirtualNodeTaintArgs(); /** * The effect of the taint. Valid values: `NoSchedule`, `NoExecute` and `PreferNoSchedule`. * */ @Import(name="effect") private @Nullable Output<String> effect; /** * @return The effect of the taint. Valid values: `NoSchedule`, `NoExecute` and `PreferNoSchedule`. * */ public Optional<Output<String>> effect() { return Optional.ofNullable(this.effect); } /** * The key of the taint. * */ @Import(name="key") private @Nullable Output<String> key; /** * @return The key of the taint. * */ public Optional<Output<String>> key() { return Optional.ofNullable(this.key); } /** * The value of the taint. * */ @Import(name="value") private @Nullable Output<String> value; /** * @return The value of the taint. * */ public Optional<Output<String>> value() { return Optional.ofNullable(this.value); } private VirtualNodeTaintArgs() {} private VirtualNodeTaintArgs(VirtualNodeTaintArgs $) { this.effect = $.effect; this.key = $.key; this.value = $.value; } public static Builder builder() { return new Builder(); } public static Builder builder(VirtualNodeTaintArgs defaults) { return new Builder(defaults); } public static final class Builder { private VirtualNodeTaintArgs $; public Builder() { $ = new VirtualNodeTaintArgs(); } public Builder(VirtualNodeTaintArgs defaults) { $ = new VirtualNodeTaintArgs(Objects.requireNonNull(defaults)); } /** * @param effect The effect of the taint. Valid values: `NoSchedule`, `NoExecute` and `PreferNoSchedule`. * * @return builder * */ public Builder effect(@Nullable Output<String> effect) { $.effect = effect; return this; } /** * @param effect The effect of the taint. Valid values: `NoSchedule`, `NoExecute` and `PreferNoSchedule`. * * @return builder * */ public Builder effect(String effect) { return effect(Output.of(effect)); } /** * @param key The key of the taint. * * @return builder * */ public Builder key(@Nullable Output<String> key) { $.key = key; return this; } /** * @param key The key of the taint. * * @return builder * */ public Builder key(String key) { return key(Output.of(key)); } /** * @param value The value of the taint. * * @return builder * */ public Builder value(@Nullable Output<String> value) { $.value = value; return this; } /** * @param value The value of the taint. * * @return builder * */ public Builder value(String value) { return value(Output.of(value)); } public VirtualNodeTaintArgs build() { return $; } } }
[ "public@paulstack.co.uk" ]
public@paulstack.co.uk
04b9bf3ffea5882ea4ad0d11202cd62dfc7cda0b
8fd2e347ebff0abdb8dfef3df3f6dcc26dd7621c
/src/test/java/org/openstreetmap/atlas/utilities/testing/BeanTestCaseRule.java
532e0d16afeb5e52e781dbc100be8db2f61f9c33
[ "BSD-3-Clause" ]
permissive
osmlab/atlas
0c38770d05f7fb3d17e85365711acf7ae3969806
f525a7a3f09c95b5c96562648d8901031091e752
refs/heads/dev
2023-03-30T20:27:04.162725
2023-03-23T22:49:14
2023-03-23T22:49:14
99,717,758
216
83
BSD-3-Clause
2022-11-21T11:44:13
2017-08-08T17:14:27
Java
UTF-8
Java
false
false
359
java
package org.openstreetmap.atlas.utilities.testing; /** * Example of how to use the Bean annotation in a test case * * @author cstaylor */ public class BeanTestCaseRule extends CoreTestRule { @Bean({ "name=Christopher Taylor", "street=123 Main Street" }) private SomeTestBean bean; SomeTestBean bean() { return this.bean; } }
[ "matthieu.nahoum@gmail.com" ]
matthieu.nahoum@gmail.com
d52065a7ba64cf00e66cdcf08fd4fd870a22abb0
6b83984ff783452c3e9aa2b7a1d16192b351a60a
/question0160_intersection_of_two_linked_lists/Solution3.java
73448a3f4f682155595a2ac705712e1aaa863b0f
[]
no_license
617076674/LeetCode
aeedf17d7cd87b9e59e0a107cd6af5ce9bac64f8
0718538ddb79e71fec9a330ea27524a60eb60259
refs/heads/master
2022-05-13T18:29:44.982447
2022-04-13T01:03:28
2022-04-13T01:03:28
146,989,451
207
58
null
null
null
null
UTF-8
Java
false
false
726
java
package question0160_intersection_of_two_linked_lists; public class Solution3 { public ListNode getIntersectionNode(ListNode headA, ListNode headB) { if (headA == null || headB == null) { return null; } ListNode cur1 = headA, cur2 = headB; boolean flag1 = false, flag2 = false; while (true) { if (cur1 == cur2) { return cur1; } cur1 = cur1.next; if (cur1 == null) { if (flag1 && flag2) { break; } flag1 = true; cur1 = headB; } cur2 = cur2.next; if (cur2 == null) { if (flag1 && flag2) { break; } flag2 = true; cur2 = headA; } } return null; } }
[ "zhuchen@pinduoduo.com" ]
zhuchen@pinduoduo.com
c52d1b3e0690d20843a6e736e4820c31e4baf30d
997d2bac220050eda2ad492decf0dfd097800a19
/day18-code/src/com/itheima/ThreadAndLambda/demo01/WaitAndNotify/ChiHuo.java
441bba08aaf8b7abc29c2388ab5dba59eac1efa4
[]
no_license
WXCD-LYY/lyynb
87c6fabcd7f37cea0ded31f760ec374d67844671
84f2a20c7f366cb1f55db2432cf8377a9170f45a
refs/heads/master
2023-03-05T14:30:06.936278
2021-02-06T05:27:53
2021-02-06T05:27:53
336,455,074
0
0
null
null
null
null
UTF-8
Java
false
false
1,937
java
package com.itheima.ThreadAndLambda.demo01.WaitAndNotify; /* 消费(吃货)类:是一个线程类,可以继承Thread 设置线程任务(run):吃包子 对包子状态进行判断 false:没有包子 吃货调用wait方法进行等待状态 true:有包子 吃货吃包子 吃货吃完包子 修改包子的状态为false没有 吃货唤醒包子铺状态,生产包子 */ public class ChiHuo extends Thread { // 1. 需要再成员位置创建一个包子变量 private Baozi bz; // 2. 使用带参数构造方法,为这个包子变量赋值 public ChiHuo(Baozi bz) { this.bz = bz; } // 设置线程任务(run):吃包子 @Override public void run() { // 使用死循环,让吃货一直吃包子 while (true) { // 必须同时同步技术保证两个线程只能有一个再执行 synchronized (bz) { // 对包子的状态进行判断 if (bz.flag == false) { // 包子铺调用wait方法进行等待状态 try { bz.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } // 被唤醒之后执行,吃包子 System.out.println("吃货正在吃:" + bz.pi + bz.xian + "的包子"); // 吃货吃完包子 // 修改包子的状态为false没有 bz.flag = false; // 吃货唤醒包子铺状态,生产包子 bz.notify(); System.out.println("吃货已经把:" + bz.pi + bz.xian + "的包子吃完了,包子铺开始生产包子"); System.out.println("------------------------------------------------------------"); } } } }
[ "13222762017@163.com" ]
13222762017@163.com
502affbba026c4ec6c64256ae932db33f1a7e2cf
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.2.jar/classes.jar/eug.java
b5a3e628fc59d12cc75be2162d4d6ee31ff10cb7
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,328
java
import com.tencent.mobileqq.activity.QQSettingMe; import com.tencent.mobileqq.app.BaseActivity; import com.tencent.mobileqq.app.CardObserver; import com.tencent.mobileqq.app.QQAppInterface; import com.tencent.mobileqq.data.Card; import com.tencent.mobileqq.util.Utils; public class eug extends CardObserver { public eug(QQSettingMe paramQQSettingMe) {} protected void onCardDownload(boolean paramBoolean, Object paramObject) { if ((paramBoolean) && (this.a.c) && (this.a.jdField_a_of_type_ComTencentMobileqqAppQQAppInterface != null) && ((paramObject instanceof Card)) && (this.a.jdField_a_of_type_ComTencentMobileqqAppQQAppInterface.a().equals(((Card)paramObject).uin))) { this.a.jdField_a_of_type_ComTencentMobileqqAppBaseActivity.runOnUiThread(new euh(this)); } } protected void onUpdateAvatar(boolean paramBoolean, String paramString) { if ((paramBoolean) && (this.a.c) && (this.a.jdField_a_of_type_ComTencentMobileqqAppQQAppInterface != null) && (Utils.a(paramString, this.a.jdField_a_of_type_ComTencentMobileqqAppQQAppInterface.a()))) { this.a.a(paramString); } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.2.jar\classes.jar * Qualified Name: eug * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
2362a9593a2f82b781e0fe127aa802682e8e5ca7
5759a9935244669aa7c05a8847e5ab524e7b5c44
/src/com/brainflow/utils/Dimension5D.java
6e9660ead06ced2bd217a7f078ac3bed9927f989
[]
no_license
devillvalle/brainflow
6da65c6262c5f459cddf6fc076417ca6ce4f97a4
8264888f5fb9a37db6edd43fb45b9323f2cfc7f7
refs/heads/master
2021-01-10T12:01:02.128634
2009-02-07T19:39:13
2009-02-07T19:39:13
53,578,163
0
0
null
null
null
null
UTF-8
Java
false
false
1,757
java
package com.brainflow.utils; /** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: </p> * * @author Bradley Buchsbaum * @version 1.0 */ public class Dimension5D<T extends Number> implements IDimension, java.io.Serializable { public T zero; public T one; public T two; public T three; public T four; public Dimension5D(Dimension5D<T> dim) { zero = dim.zero; one = dim.one; two = dim.two; three = dim.three; four = dim.four; } public Dimension5D(T[] pt) { if (pt.length != 5) { throw new IllegalArgumentException("Dimension5D: supplied array must have length = 4!"); } zero = pt[0]; one = pt[1]; two = pt[2]; three = pt[3]; four = pt[4]; } public Dimension5D(T _zero, T _one, T _two, T _three, T _four) { zero = _zero; one = _one; two = _two; three = _three; four = _four; } public T getDim(int dimnum) { if (dimnum == 0) return zero; if (dimnum == 1) return one; if (dimnum == 2) return two; if (dimnum == 3) return three; if (dimnum == 4) return four; throw new IllegalArgumentException("illegal dimension number " + dimnum + " for class " + getClass()); } public int product() { return zero.intValue() * one.intValue() * two.intValue() * three.intValue() * four.intValue(); } public int numDim() { return 4; } public String toString() { return "[" + zero + ", " + one + ", " + two + ", " + three + ", " + four + "]"; } }
[ "brad.buchsbaum@922ecd08-ad19-0410-8a94-01093a00bd73" ]
brad.buchsbaum@922ecd08-ad19-0410-8a94-01093a00bd73
bdde8c35b73cddac1e4cbb73b26aa21b78c36721
4ee19ab77bc7efa5e8550aae9563e8b0cdc660ca
/src/main/java/com/github/jengo/threaddp/Future/Q9_4/Host.java
3de2a2d47dd6dda963570a64b2ecfa46fce9a204
[ "Zlib" ]
permissive
jengowong/threaddp
c87cd4b290fd7dc3781dcc036133604b440dae32
12ad3578a47857278e6216a1f7d8d8687a9a0a3b
refs/heads/master
2022-12-25T11:10:38.104577
2020-07-10T07:13:01
2020-07-10T07:13:01
262,043,546
0
0
null
2020-10-13T21:49:01
2020-05-07T12:25:29
Java
UTF-8
Java
false
false
705
java
package com.github.jengo.threaddp.Future.Q9_4; public class Host { public Data request(final int count, final char c) { System.out.println(" request(" + count + ", " + c + ") BEGIN"); // (1) 创建FutureData的实例 final FutureData future = new FutureData(); // (2) 启动一个新线程,用于创建RealData的实例 new Thread() { public void run() { RealData realdata = new RealData(count, c); future.setRealData(realdata); } }.start(); System.out.println(" request(" + count + ", " + c + ") END"); // (3) 返回FutureData的实例 return future; } }
[ "wangzhenguo02@meituan.com" ]
wangzhenguo02@meituan.com
6d17ab89fe412521079c7cbc562cf505c02b2403
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes5/hjc.java
76bae585dda28d1a44d85707c90d9a88dbd2c6fd
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
462
java
import com.tencent.biz.lebasearch.SearchActivity; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.widget.XListView; class hjc implements Runnable { hjc(hjb paramhjb) { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } public void run() { this.a.a.b.setSelection(0); } } /* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\hjc.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
2f4f0d24e769418d0982cd9c71db5c2e4b529b8a
8a245dd5ba9701f523415cda3805bea6c60830e4
/src/org/greatfree/dsf/cps/cache/coordinator/front/DequeueSingleMyStoreDataThreadCreator.java
67f37edb83efb22b91b6b6a284e9e5173f289097
[]
no_license
ATM006/Programming-Clouds
93e762fff5fa12929fdc61abd2354924fd73abb0
569f30bdf9f8a956e47dcc4ae3514761520124eb
refs/heads/master
2022-12-21T06:48:32.171800
2020-09-14T12:55:50
2020-09-14T12:55:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
776
java
package org.greatfree.dsf.cps.cache.coordinator.front; import org.greatfree.concurrency.reactive.RequestThreadCreatable; import org.greatfree.dsf.cps.cache.message.front.DequeueSingleMyStoreDataRequest; import org.greatfree.dsf.cps.cache.message.front.DequeueSingleMyStoreDataResponse; import org.greatfree.dsf.cps.cache.message.front.DequeueSingleMyStoreDataStream; // Created: 08/14/2018, Bing Li public class DequeueSingleMyStoreDataThreadCreator implements RequestThreadCreatable<DequeueSingleMyStoreDataRequest, DequeueSingleMyStoreDataStream, DequeueSingleMyStoreDataResponse, DequeueSingleMyStoreDataThread> { @Override public DequeueSingleMyStoreDataThread createRequestThreadInstance(int taskSize) { return new DequeueSingleMyStoreDataThread(taskSize); } }
[ "bing.li@asu.edu" ]
bing.li@asu.edu
f8e7ef0f5e7113024ff43e6ccc9ab217cfdf3381
08bdd164c174d24e69be25bf952322b84573f216
/opencores/client/foundation classes/j2sdk-1_4_2-src-scsl/hotspot/src/share/vm/agent/sun/jvm/hotspot/ui/ProgressBarPanel.java
fc390a6d0df33dba22ef4418a3d5637632a104ce
[]
no_license
hagyhang/myforthprocessor
1861dcabcf2aeccf0ab49791f510863d97d89a77
210083fe71c39fa5d92f1f1acb62392a7f77aa9e
refs/heads/master
2021-05-28T01:42:50.538428
2014-07-17T14:14:33
2014-07-17T14:14:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,721
java
/* * @(#)ProgressBarPanel.java 1.5 03/01/23 11:49:28 * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package sun.jvm.hotspot.ui; import java.awt.*; import javax.swing.*; /** A panel containing a progress bar and a label */ public class ProgressBarPanel extends JPanel { private JLabel text; private JProgressBar bar; private static final int MAX = 10000; public static final int VERTICAL = 0; public static final int HORIZONTAL = 1; public ProgressBarPanel() { this(VERTICAL); } /** LayoutType is either VERTICAL or HORIZONTAL */ public ProgressBarPanel(int layoutType) { super(); if (layoutType == VERTICAL) { setLayout(new BorderLayout()); text = new JLabel(); add(text, BorderLayout.NORTH); bar = new JProgressBar(JProgressBar.HORIZONTAL, 0, MAX); JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); panel.add(bar); add(panel, BorderLayout.CENTER); } else { setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); text = new JLabel(); add(text); bar = new JProgressBar(JProgressBar.HORIZONTAL, 0, MAX); add(bar); } } public ProgressBarPanel(String text) { this(); setText(text); } public ProgressBarPanel(int layoutType, String text) { this(layoutType); setText(text); } public void setText(String text) { this.text.setText(text); } public void setValue(double val) { int realVal = (int) (val * MAX); bar.setValue(realVal); } public void setIndeterminate(boolean value) { bar.setIndeterminate(value); } }
[ "blue@cmd.nu" ]
blue@cmd.nu
8a4d12f8325eeaef49792ba714842cddd3ca6e22
78ef44d0ba5f999e0549b479e1eae6bf399f9495
/dubbo-consumer/src/main/java/com/abin/lee/origin/basic/team/filter/RpcTraceStubFilter.java
e72c364f88933c3e1992977de9e8e97d89303288
[ "Apache-2.0" ]
permissive
zondahuman/dubbo-svr
e49dee08180485634b45a2f4ad5f395ada82ad42
eac23ae69d1aac9ea4792ec26d80b2930f9951aa
refs/heads/master
2021-01-01T04:13:13.496106
2018-09-20T09:59:16
2018-09-20T09:59:16
58,943,730
0
0
null
null
null
null
UTF-8
Java
false
false
962
java
package com.abin.lee.origin.basic.team.filter; import com.alibaba.dubbo.rpc.*; import org.apache.commons.lang3.StringUtils; import java.util.UUID; /** * Created by WANGJINZHAO on 2017/3/29. */ public class RpcTraceStubFilter implements Filter { public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException { String traceId = RpcContext.getContext().getAttachment("traceId"); if(StringUtils.isNotBlank(traceId)){ System.out.println("accept traceId=" + traceId); }else{ traceId = UUID.randomUUID().toString(); System.out.println("create traceId=" + traceId); } RpcContext.getContext().setAttachment("traceId", traceId); System.out.println("RpcLogSessionFilter---traceId=" + traceId); return invoker.invoke(invocation); } public static void main(String[] args) { System.out.println(UUID.randomUUID().toString()); } }
[ "zondahuman@gmail.com" ]
zondahuman@gmail.com
0186026086f980a97cd4e6ecaff45f860f5506ca
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Spring/Spring10920.java
98bbfbd1718448d749e02763a7022843c38170eb
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
603
java
@Test public void checkNotModifiedHeaderAlreadySet() { MockServerHttpRequest request = get("/").ifModifiedSince(currentDate.toEpochMilli()).build(); MockServerWebExchange exchange = MockServerWebExchange.from(request); exchange.getResponse().getHeaders().add("Last-Modified", CURRENT_TIME); assertTrue(exchange.checkNotModified(currentDate)); assertEquals(304, exchange.getResponse().getStatusCode().value()); assertEquals(1, exchange.getResponse().getHeaders().get("Last-Modified").size()); assertEquals(CURRENT_TIME, exchange.getResponse().getHeaders().getFirst("Last-Modified")); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
59125bcf9bf3e60da9c120d89f1a525d7161b639
9bba5a058902076baf1dad71970cdb17303f7e8a
/dubbo_blog/blog/blog-rpc-service/src/main/java/com/isunday/blog/rpc/service/BlogServiceRpcApplication.java
26191eb52787810117e303dafa600334befc92b4
[]
no_license
programTheCat/dubbo-blog-front-end
ea227db0bcb807988734fbb3f79aba6b5dd34828
ea5ee968ad999af43b346da9d74bbb21b46636f1
refs/heads/master
2021-09-03T10:09:36.791614
2018-01-08T09:07:33
2018-01-08T09:07:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
630
java
package com.isunday.blog.rpc.service; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.support.ClassPathXmlApplicationContext; public class BlogServiceRpcApplication { /** * 服务启动类 */ private static Logger _log = LoggerFactory.getLogger(BlogServiceRpcApplication.class); public static void main(String[] args) { _log.info(">>>>>dubbo...........init 正在启动 <<<<<"); new ClassPathXmlApplicationContext("classpath:META-INF/spring/applicationContext*.xml"); _log.info(">>>>>dubbo...........start 启动完成 <<<<<"); } }
[ "1265598443@qq.com" ]
1265598443@qq.com
d2904b68229680c5da2ff743a3faf8b6ddc5a666
e26cbb8238b9857540290d6397f8cd8505fdade0
/src/main/java/joshie/enchiridion/wiki/gui/popups/ConfirmLocking.java
44b5ea6a2ceff15b346526b7be735e95b08f3036
[ "MIT" ]
permissive
svgorbunov-mc-sphere/Enchiridion
bfc40970aedd6ae908d62af6106cbe6a17597382
0356727cdcc96910a3356bc2e2665f86212306c5
refs/heads/master
2021-05-30T09:31:56.746373
2015-06-14T17:08:36
2015-06-14T17:08:36
50,912,090
0
0
null
null
null
null
UTF-8
Java
false
false
618
java
package joshie.enchiridion.wiki.gui.popups; import joshie.enchiridion.wiki.WikiHelper; import joshie.enchiridion.wiki.gui.GuiMain; import joshie.enchiridion.wiki.mode.DisplayMode; import joshie.enchiridion.wiki.mode.SaveMode; public class ConfirmLocking extends Confirm { public ConfirmLocking() { super("lock"); } @Override public void confirm() { WikiHelper.getPage().getData().lock(); WikiHelper.getPage().markDirty(); SaveMode.getInstance().markDirty(); GuiMain.setMode(SaveMode.getInstance()); GuiMain.setMode(DisplayMode.getInstance()); } }
[ "joshjackwildman@gmail.com" ]
joshjackwildman@gmail.com
d21b6b64a55e10fd30da2ed8c50cd9d262051ed6
e6a977b8c8ac1546aeeaf4e7ffd7f467324a832d
/ac/ac-pom2/ac-hpsc-pom/ac-hpsc-core/src/main/java/com/hp/it/perf/ac/app/hpsc/statistics/StatisticProcessor2.java
1c2183badcdd122b8f1d688c481916fd600a2af2
[]
no_license
shengyao15/performance_project
6c86d6493d2c2d79d3e0d3585f96557a8584b1f6
d3f7a66e9065379452fcda0bb6209a529822393c
refs/heads/master
2021-05-16T03:07:16.637843
2017-11-01T06:35:58
2017-11-01T06:35:58
20,017,606
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package com.hp.it.perf.ac.app.hpsc.statistics; import java.io.PrintStream; import com.hp.it.perf.ac.load.content.AcContentLine; import com.hp.it.perf.ac.load.content.AcContentMetadata; public interface StatisticProcessor2<T> extends StatisticProcessor<T> { public void onProcess(T bean, AcContentLine line, AcContentMetadata metadata); public void printTo(PrintStream out); }
[ "shengyao15@126.com" ]
shengyao15@126.com
d81894b0d9def06294ccf37361df7a886856affe
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/bytedance/android/live/broadcast/dutygift/C2552i.java
a8608decc76a77c2dbf2576e900ff75c239596fc
[]
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
609
java
package com.bytedance.android.live.broadcast.dutygift; import android.graphics.Bitmap; import p346io.reactivex.p348d.C7327h; /* renamed from: com.bytedance.android.live.broadcast.dutygift.i */ final /* synthetic */ class C2552i implements C7327h { /* renamed from: a */ private final String f8205a; /* renamed from: b */ private final String f8206b; C2552i(String str, String str2) { this.f8205a = str; this.f8206b = str2; } public final Object apply(Object obj) { return DutyGiftControlWidget.m10460a(this.f8205a, this.f8206b, (Bitmap) obj); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
d2fc814a1b23d5614792c08d9a6bfbcca3f11978
e83881215bd002da769c8cf6df14d8994d9a6923
/server/src/main/java/com/blocklang/develop/dao/PageWidgetDao.java
c85b2edc8ee39519c603ab4fc47ebd87b18dbcfd
[ "MIT" ]
permissive
xintao222/blocklang.com
34627e613526b49000998e63a0a8b1016e862d68
939074c9df037c0780e01e9a73ee724b3dcc1dc0
refs/heads/master
2023-04-08T02:12:57.845570
2020-12-13T09:06:44
2020-12-13T09:06:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
311
java
package com.blocklang.develop.dao; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import com.blocklang.develop.model.PageWidget; public interface PageWidgetDao extends JpaRepository<PageWidget, Integer>{ List<PageWidget> findAllByPageIdOrderBySeq(Integer pageId); }
[ "idocument@qq.com" ]
idocument@qq.com
9a46c8acda0f0e0a63958fc9a23c20d95d2dc8b7
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.firsttimenux-FirstTimeNux/sources/com/google/common/io/MultiReader.java
1c7ea94adbf43e48ca1764e2b26cdb88db960f20
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
1,995
java
package com.google.common.io; import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Preconditions; import java.io.IOException; import java.io.Reader; import java.util.Iterator; import org.checkerframework.checker.nullness.compatqual.NullableDecl; @GwtIncompatible class MultiReader extends Reader { @NullableDecl private Reader current; private final Iterator<? extends CharSource> it; MultiReader(Iterator<? extends CharSource> readers) throws IOException { this.it = readers; advance(); } private void advance() throws IOException { close(); if (this.it.hasNext()) { this.current = ((CharSource) this.it.next()).openStream(); } } @Override // java.io.Reader public int read(@NullableDecl char[] cbuf, int off, int len) throws IOException { if (this.current == null) { return -1; } int result = this.current.read(cbuf, off, len); if (result != -1) { return result; } advance(); return read(cbuf, off, len); } @Override // java.io.Reader public long skip(long n) throws IOException { Preconditions.checkArgument(n >= 0, "n is negative"); if (n > 0) { while (this.current != null) { long result = this.current.skip(n); if (result > 0) { return result; } advance(); } } return 0; } @Override // java.io.Reader public boolean ready() throws IOException { return this.current != null && this.current.ready(); } @Override // java.io.Closeable, java.io.Reader, java.lang.AutoCloseable public void close() throws IOException { if (this.current != null) { try { this.current.close(); } finally { this.current = null; } } } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
13e8185e2a928bad5d4065d857e805db03496906
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Jsoup-87/org.jsoup.parser.HtmlTreeBuilderState/BBC-F0-opt-20/tests/12/org/jsoup/parser/HtmlTreeBuilderState_ESTest_scaffolding.java
f188bb6bbf23b28fdd28a02c08cd2f5653173649
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
5,005
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Oct 20 16:46:48 GMT 2021 */ package org.jsoup.parser; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class HtmlTreeBuilderState_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.jsoup.parser.HtmlTreeBuilderState"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HtmlTreeBuilderState_ESTest_scaffolding.class.getClassLoader() , "org.jsoup.parser.HtmlTreeBuilderState$18", "org.jsoup.parser.HtmlTreeBuilderState$19", "org.jsoup.parser.HtmlTreeBuilderState$16", "org.jsoup.parser.HtmlTreeBuilderState$17", "org.jsoup.parser.HtmlTreeBuilderState$14", "org.jsoup.parser.TreeBuilder", "org.jsoup.parser.Token$StartTag", "org.jsoup.parser.HtmlTreeBuilderState$15", "org.jsoup.nodes.DocumentType", "org.jsoup.nodes.LeafNode", "org.jsoup.nodes.Element", "org.jsoup.parser.HtmlTreeBuilderState$12", "org.jsoup.parser.HtmlTreeBuilderState$13", "org.jsoup.parser.HtmlTreeBuilderState$10", "org.jsoup.parser.HtmlTreeBuilderState$Constants", "org.jsoup.parser.HtmlTreeBuilderState$11", "org.jsoup.parser.Token", "org.jsoup.parser.Token$Tag", "org.jsoup.parser.Token$Character", "org.jsoup.parser.HtmlTreeBuilderState$2", "org.jsoup.parser.HtmlTreeBuilderState$1", "org.jsoup.nodes.Node", "org.jsoup.parser.HtmlTreeBuilderState$4", "org.jsoup.parser.HtmlTreeBuilderState$3", "org.jsoup.parser.Token$EndTag", "org.jsoup.parser.HtmlTreeBuilderState", "org.jsoup.parser.HtmlTreeBuilderState$23", "org.jsoup.parser.HtmlTreeBuilderState$9", "org.jsoup.parser.HtmlTreeBuilderState$24", "org.jsoup.parser.HtmlTreeBuilderState$21", "org.jsoup.parser.HtmlTreeBuilderState$22", "org.jsoup.parser.HtmlTreeBuilderState$6", "org.jsoup.parser.HtmlTreeBuilderState$5", "org.jsoup.parser.HtmlTreeBuilderState$20", "org.jsoup.parser.HtmlTreeBuilderState$8", "org.jsoup.parser.HtmlTreeBuilder", "org.jsoup.parser.HtmlTreeBuilderState$7", "org.jsoup.nodes.FormElement" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(HtmlTreeBuilderState_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.jsoup.parser.HtmlTreeBuilderState", "org.jsoup.parser.HtmlTreeBuilderState$Constants", "org.jsoup.parser.TokeniserState" ); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
897bc26c039ccfa7faba9644c58cdf83c7e29775
b7d2d56d76ebeef12c647fc5d4233725d219da08
/src/main/java/com/taobao/api/request/SellercatsListAddRequest.java
fb0b539a4e0ae71769fad3b7717fd1d22a1ade8b
[ "Apache-2.0" ]
permissive
lianying/asdf
be483449e6f70c9a1ca09bf3e31e233adfb8684d
928f90f3f71718c54cc96c0fa078805cfbadc1fd
refs/heads/master
2021-01-19T17:24:44.023553
2013-03-30T15:08:31
2013-03-30T15:08:31
9,112,578
1
0
null
null
null
null
UTF-8
Java
false
false
2,825
java
package com.taobao.api.request; import com.taobao.api.internal.util.RequestCheckUtils; import java.util.Map; import com.taobao.api.TaobaoRequest; import com.taobao.api.internal.util.TaobaoHashMap; import com.taobao.api.response.SellercatsListAddResponse; import com.taobao.api.ApiRuleException; /** * TOP API: taobao.sellercats.list.add request * * @author auto create * @since 1.0, 2013-03-14 16:30:14 */ public class SellercatsListAddRequest implements TaobaoRequest<SellercatsListAddResponse> { private TaobaoHashMap udfParams; // add user-defined text parameters private Long timestamp; /** * 卖家自定义类目名称。不超过20个字符 */ private String name; /** * 父类目编号,如果类目为店铺下的一级类目:值等于0,如果类目为子类目,调用获取taobao.sellercats.list.get父类目编号 */ private Long parentCid; /** * 链接图片URL地址。(绝对地址,格式:http://host/image_path) */ private String pictUrl; /** * 该类目在页面上的排序位置,取值范围:大于零的整数 */ private Long sortOrder; public void setName(String name) { this.name = name; } public String getName() { return this.name; } public void setParentCid(Long parentCid) { this.parentCid = parentCid; } public Long getParentCid() { return this.parentCid; } public void setPictUrl(String pictUrl) { this.pictUrl = pictUrl; } public String getPictUrl() { return this.pictUrl; } public void setSortOrder(Long sortOrder) { this.sortOrder = sortOrder; } public Long getSortOrder() { return this.sortOrder; } private Map<String,String> headerMap=new TaobaoHashMap(); public Long getTimestamp() { return this.timestamp; } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } public String getApiMethodName() { return "taobao.sellercats.list.add"; } public Map<String, String> getTextParams() { TaobaoHashMap txtParams = new TaobaoHashMap(); txtParams.put("name", this.name); txtParams.put("parent_cid", this.parentCid); txtParams.put("pict_url", this.pictUrl); txtParams.put("sort_order", this.sortOrder); if(this.udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new TaobaoHashMap(); } this.udfParams.put(key, value); } public Class<SellercatsListAddResponse> getResponseClass() { return SellercatsListAddResponse.class; } public void check() throws ApiRuleException { RequestCheckUtils.checkNotEmpty(name,"name"); } public Map<String,String> getHeaderMap() { return headerMap; } }
[ "anying.li2011@gmail.com" ]
anying.li2011@gmail.com
a6e361859dbc7801f61911e1acaa2b4ce33bba07
bef64bda5d9a21f86322a88dbd1aa3b87512a997
/src/main/java/uk/co/objectconnexions/twilio_spike/CallServlet.java
ac3a62ef2c85b7c73a33f3782dfa66fc3f86f68f
[]
no_license
objectconnexions/twilio-example
0acdc805588caad5a8fa513e8b4b60f1c8442eb7
7b8e176098c83d9da27eccf3d91598b8606496a8
refs/heads/master
2021-06-30T11:44:15.370680
2020-01-05T20:40:30
2020-01-05T20:40:30
231,957,405
0
0
null
2021-06-07T18:39:39
2020-01-05T18:14:44
Java
UTF-8
Java
false
false
1,915
java
package uk.co.objectconnexions.twilio_spike; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.twilio.Twilio; import com.twilio.rest.api.v2010.account.Call; import com.twilio.type.PhoneNumber; @WebServlet("/call") public class CallServlet extends HttpServlet { private static final long serialVersionUID = 1L; private static final Logger LOG = LoggerFactory.getLogger(CallServlet.class); @Override public void init(ServletConfig config) throws ServletException { String username = SpikeProperties.getProperty("account-sid"); String password = SpikeProperties.getProperty("auth-token"); Twilio.init(username, password); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String number = request.getParameter("number"); String name = request.getParameter("name"); String explain = request.getParameter("explain"); String from = SpikeProperties.getProperty("number"); LOG.info("CALL: " + request); try { Call call = Call.creator(new PhoneNumber(number), new PhoneNumber(from), new URI(SpikeProperties.getProperty("server") + "/demo?name=" + name + "&section=" + explain )).create(); response.setContentType("text/plain"); response.getWriter().println(call.getSid()); } catch (URISyntaxException e) { throw new ServletException(e); } } }
[ "rmatthews@objectconnexions.co.uk" ]
rmatthews@objectconnexions.co.uk
aa250e0821022b8fd4a3ca2274ede00a6fe8887d
6db3de1d0d268f37ddfaa647f48077f993fe3f36
/src/de/uni_mannheim/informatik/dws/winter/usecase/companies/identityresolution/CompanyFoundedComparator2Years.java
03c178047ca95074f2f4db8f352f3297079c902e
[]
no_license
cokeSchlumpf/20200-forbes
b9ae890e63e119f4310ae6721fe7d183298cfe18
67aa52e60445df6197c8b8e04df3425502ee42e6
refs/heads/master
2022-11-11T23:46:16.416784
2020-07-12T08:39:29
2020-07-12T08:39:29
278,842,045
0
0
null
null
null
null
UTF-8
Java
false
false
2,880
java
/** * * Copyright (C) 2019 Data and Web Science Group, University of Mannheim, Germany (code@dwslab.de) * * 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 de.uni_mannheim.informatik.dws.winter.usecase.companies.identityresolution; import de.uni_mannheim.informatik.dws.winter.matching.rules.Comparator; import de.uni_mannheim.informatik.dws.winter.matching.rules.ComparatorLogger; import de.uni_mannheim.informatik.dws.winter.model.Correspondence; import de.uni_mannheim.informatik.dws.winter.model.Matchable; import de.uni_mannheim.informatik.dws.winter.model.defaultmodel.Attribute; import de.uni_mannheim.informatik.dws.winter.similarity.date.YearSimilarity; import de.uni_mannheim.informatik.dws.winter.usecase.companies.model.Company; /** * {@link Comparator} for {@link Company}s based on the * {@link Company#getFounded()} value, with a maximal difference of 2 years. * * @author Robert Meusel (robert@dwslab.de) * */ public class CompanyFoundedComparator2Years implements Comparator<Company, Attribute> { /** * */ private static final long serialVersionUID = 1L; private YearSimilarity sim = new YearSimilarity(2); private ComparatorLogger comparisonLog; @Override public double compare(Company entity1, Company entity2, Correspondence<Attribute, Matchable> corr) { double similarity = sim.calculate(entity1.getFounded(), entity2.getFounded()); double postSimilarity = similarity * similarity; if(this.comparisonLog != null){ this.comparisonLog.setComparatorName(getClass().getName()); if(entity1.getFounded()==null) { this.comparisonLog.setRecord1Value(""); } else { this.comparisonLog.setRecord1Value(entity1.getFounded().toString()); } if(entity2.getFounded()==null) { this.comparisonLog.setRecord2Value(""); } else { this.comparisonLog.setRecord2Value(entity2.getFounded().toString()); } this.comparisonLog.setSimilarity(Double.toString(similarity)); this.comparisonLog.setPostprocessedSimilarity(Double.toString(postSimilarity)); } return postSimilarity; } @Override public ComparatorLogger getComparisonLog() { return comparisonLog; } @Override public void setComparisonLog(ComparatorLogger comparatorLog) { this.comparisonLog = comparatorLog; } }
[ "michael.wellner@de.ibm.com" ]
michael.wellner@de.ibm.com
55d8115962a3e25a5c9d9f5099c2670fe47f63ae
34b713d69bae7d83bb431b8d9152ae7708109e74
/admin/broadleaf-open-admin-platform/src/main/java/org/broadleafcommerce/openadmin/server/security/service/EntityFormModifier.java
32ce27fdf657eea6f06a83abf34053c470d090c0
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sinotopia/BroadleafCommerce
d367a22af589b51cc16e2ad094f98ec612df1577
502ff293d2a8d58ba50a640ed03c2847cb6369f6
refs/heads/BroadleafCommerce-4.0.x
2021-01-23T14:14:45.029362
2019-07-26T14:18:05
2019-07-26T14:18:05
93,246,635
0
0
null
2017-06-03T12:27:13
2017-06-03T12:27:13
null
UTF-8
Java
false
false
2,063
java
/* * #%L * BroadleafCommerce Open Admin Platform * %% * Copyright (C) 2009 - 2016 Broadleaf Commerce * %% * 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. * #L% */ package org.broadleafcommerce.openadmin.server.security.service; import org.broadleafcommerce.openadmin.web.form.component.ListGrid; import org.broadleafcommerce.openadmin.web.form.entity.EntityForm; /** * Qualified instances are expected to manipulate the {@link EntityForm} instance passed in the request. * * @author Jeff Fischer */ public interface EntityFormModifier { /** * Modify the {@link EntityForm} in the request. The request contains other relevant information that should be * useful during the modification. * * @see EntityFormModifierRequest * @param request the EntityForm, and other supporting objects */ void modifyEntityForm(EntityFormModifierRequest request); /** * Modify the {@link ListGrid} in the request. The request contains other relevant information that should be * useful during the modification. * * @param request The ListGrid, and other supporting objects */ void modifyListGrid(EntityFormModifierRequest request); /** * Whether or not this EntityFormModifier is qualified to modify based on the modifierType. * * @param modifierType and identifier for the class of modification being requested * @return Whether or not qualified */ boolean isQualified(String modifierType); }
[ "sinosie7en@gmail.com" ]
sinosie7en@gmail.com
2faa152bb19ae7f1e280a70e74960493cfe16b14
4120216488ca9a7c987c2ba5a1eef493cbd47946
/src/main/java/ec/com/mariscalSucre/tesisMatriculacion/matriculacion/entityAux/Grado.java
8f27bfee35acc94e55da861b761aa47b0a594409
[]
no_license
andru190192/tesisMatriculacion
5707c45d8da4926a1c90b519a6764b26d5de98f5
52d6fd2f2fe71289fada793885bca755521cc051
refs/heads/master
2021-01-10T13:50:12.885994
2015-12-07T18:36:52
2015-12-07T18:36:52
45,801,509
0
0
null
null
null
null
UTF-8
Java
false
false
866
java
package ec.com.mariscalSucre.tesisMatriculacion.matriculacion.entityAux; public enum Grado { INI(0, "INICIAL"), PRI(1, "PRIMERO"), SEG(2, "SEGUNDO"), TER(3, "TERCERO"), CUA(4, "CUARTO"), QUI(5, "QUINTO"), SEX(6, "SEXTO"), SEP(7, "SEPTIMO"), OCT(8, "OCTAVO"), NOV(9, "NOVENO"), DEC(10, "DECIMO"); private final Integer id; private final String nombre; private Grado(Integer id, String nombre) { this.id = id; this.nombre = nombre; } public Integer getId() { return id; } public String getNombre() { return nombre; } public static Grado obtenerPorId(Integer id) { for (Grado a : Grado.values()) if (a.getId().compareTo(id) == 0) return a; return null; } public static Grado obtenerPorNombre(String nombre) { for (Grado a : Grado.values()) if (a.getId().toString().compareTo(nombre) == 0) return a; return null; } }
[ "caguachisaca@gmail.com" ]
caguachisaca@gmail.com
4a48a7136ef7507f091008145a1df4ccc6adfd9f
878bece606bb57e4bf1d3bc57e70bc2bd46dab63
/server-api/src/main/java/org/jboss/lhotse/server/api/io/AbstractBlobService.java
285dff787bcbd57e5e17af1e3bd727680329c79e
[]
no_license
matejonnet/lhotse
a1830194638bb599294b8bb0fa4342244a2b8220
6e2b0a98d7c897345674c99518677fe4060f4fd9
refs/heads/master
2021-01-20T23:24:27.016026
2011-04-15T14:03:35
2011-04-15T14:03:35
1,590,828
0
0
null
null
null
null
UTF-8
Java
false
false
2,917
java
/* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.lhotse.server.api.io; import java.io.IOException; import javax.servlet.http.HttpServletResponse; /** * Abstract byte[] handling service. * * @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a> */ public abstract class AbstractBlobService implements BlobService { public Blob toBlob(byte[] bytes) { if (bytes == null) return null; return toBlobInternal(bytes); } protected abstract Blob toBlobInternal(byte[] bytes); public byte[] loadBytes(String key) { return loadBytesInternal(key, 0, Long.MAX_VALUE); } public byte[] loadBytes(String key, long startIndex, long endIndex) { if (key == null || (startIndex > endIndex)) return null; if (startIndex == endIndex) return new byte[0]; return loadBytesInternal(key, startIndex, endIndex); } protected abstract byte[] loadBytesInternal(String key, long startIndex, long endIndex); public void serveBytes(String key, HttpServletResponse response) throws IOException { serveBytes(key, 0, response); } public void serveBytes(String key, long start, HttpServletResponse response) throws IOException { serveBytes(key, start, -1, response); } public void serveBytes(String key, long start, long end, HttpServletResponse response) throws IOException { if (key == null) return; serveBytesInternal(key, start, end, response); } protected abstract void serveBytesInternal(String key, long start, long end, HttpServletResponse response) throws IOException; public String storeBytes(String mimeType, byte[] bytes) throws IOException { if (bytes == null) return null; return storeBytesInternal(mimeType, bytes); } protected abstract String storeBytesInternal(String mimeType, byte[] bytes) throws IOException; }
[ "ales.justin@gmail.com" ]
ales.justin@gmail.com