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
0fe54f8a2f537a758b5043f4f6d8b63aef7bc2b9
7363aa5bfd1406af5094e50a8f2a4077f509897a
/firefly-common/src/test/java/test/utils/TestStringUtils.java
7ea33526d3cd335f43067de56874e048b8aa0729
[]
no_license
oidwuhaihua/firefly
b3078b8625574ecf227ae7494aa75d073cc77e3d
87f60b4a1bfdc6a2c730adc97de471e86e4c4d8c
refs/heads/master
2021-01-21T05:29:15.914195
2017-02-10T16:35:14
2017-02-10T16:35:14
83,196,072
3
0
null
2017-02-26T09:05:57
2017-02-26T09:05:57
null
UTF-8
Java
false
false
7,854
java
package test.utils; import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.emptyArray; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.Assert; import org.junit.Test; import com.firefly.utils.StringUtils; public class TestStringUtils { @Test public void testAsciiToLowerCase() { String lc = "\u0690bc def 1\u06903"; assertEquals(StringUtils.asciiToLowerCase("\u0690Bc DeF 1\u06903"), lc); assertTrue(StringUtils.asciiToLowerCase(lc) == lc); } @Test public void testAppend() { StringBuilder buf = new StringBuilder(); buf.append('a'); StringUtils.append(buf, "abc", 1, 1); StringUtils.append(buf, (byte) 12, 16); StringUtils.append(buf, (byte) 16, 16); StringUtils.append(buf, (byte) -1, 16); StringUtils.append(buf, (byte) -16, 16); assertEquals("ab0c10fff0", buf.toString()); } @Test public void testCsvSplit() { assertThat(StringUtils.csvSplit(null), nullValue()); assertThat(StringUtils.csvSplit(null), nullValue()); assertThat(StringUtils.csvSplit(""), emptyArray()); assertThat(StringUtils.csvSplit(" \t\n"), emptyArray()); assertThat(StringUtils.csvSplit("aaa"), arrayContaining("aaa")); assertThat(StringUtils.csvSplit(" \taaa\n"), arrayContaining("aaa")); assertThat(StringUtils.csvSplit(" \ta\n"), arrayContaining("a")); assertThat(StringUtils.csvSplit(" \t\u1234\n"), arrayContaining("\u1234")); assertThat(StringUtils.csvSplit("aaa,bbb,ccc"), arrayContaining("aaa", "bbb", "ccc")); assertThat(StringUtils.csvSplit("aaa,,ccc"), arrayContaining("aaa", "", "ccc")); assertThat(StringUtils.csvSplit(",b b,"), arrayContaining("", "b b")); assertThat(StringUtils.csvSplit(",,bbb,,"), arrayContaining("", "", "bbb", "")); assertThat(StringUtils.csvSplit(" aaa, bbb, ccc"), arrayContaining("aaa", "bbb", "ccc")); assertThat(StringUtils.csvSplit("aaa,\t,ccc"), arrayContaining("aaa", "", "ccc")); assertThat(StringUtils.csvSplit(" , b b , "), arrayContaining("", "b b")); assertThat(StringUtils.csvSplit(" ,\n,bbb, , "), arrayContaining("", "", "bbb", "")); assertThat(StringUtils.csvSplit("\"aaa\", \" b,\\\"\",\"\""), arrayContaining("aaa", " b,\"", "")); } @Test public void testSplit() { String byteRangeSet = "500-"; String[] byteRangeSets = StringUtils.split(byteRangeSet, ','); System.out.println(Arrays.toString(byteRangeSets)); Assert.assertThat(byteRangeSets.length, is(1)); byteRangeSet = "500-,"; byteRangeSets = StringUtils.split(byteRangeSet, ','); System.out.println(Arrays.toString(byteRangeSets)); Assert.assertThat(byteRangeSets.length, is(1)); byteRangeSet = ",500-,"; byteRangeSets = StringUtils.split(byteRangeSet, ','); System.out.println(Arrays.toString(byteRangeSets)); Assert.assertThat(byteRangeSets.length, is(1)); byteRangeSet = ",500-,"; byteRangeSets = StringUtils.split(byteRangeSet, ","); System.out.println(Arrays.toString(byteRangeSets)); Assert.assertThat(byteRangeSets.length, is(1)); byteRangeSet = ",500-"; byteRangeSets = StringUtils.split(byteRangeSet, ','); System.out.println(Arrays.toString(byteRangeSets)); Assert.assertThat(byteRangeSets.length, is(1)); byteRangeSet = "500-700,601-999,"; byteRangeSets = StringUtils.split(byteRangeSet, ','); Assert.assertThat(byteRangeSets.length, is(2)); byteRangeSet = "500-700,,601-999,"; byteRangeSets = StringUtils.split(byteRangeSet, ','); Assert.assertThat(byteRangeSets.length, is(2)); String tmp = "hello#$world#%test#$eee"; String[] tmps = StringUtils.splitByWholeSeparator(tmp, "#$"); System.out.println(Arrays.toString(tmps)); Assert.assertThat(tmps.length, is(3)); tmp = "hello#$"; tmps = StringUtils.splitByWholeSeparator(tmp, "#$"); System.out.println(Arrays.toString(tmps)); Assert.assertThat(tmps.length, is(1)); tmp = "#$hello#$"; tmps = StringUtils.splitByWholeSeparator(tmp, "#$"); System.out.println(Arrays.toString(tmps)); Assert.assertThat(tmps.length, is(1)); tmp = "#$hello"; tmps = StringUtils.splitByWholeSeparator(tmp, "#$"); System.out.println(Arrays.toString(tmps)); Assert.assertThat(tmps.length, is(1)); tmp = "#$hello#$world#$"; tmps = StringUtils.splitByWholeSeparator(tmp, "#$"); System.out.println(Arrays.toString(tmps)); Assert.assertThat(tmps.length, is(2)); tmp = "#$hello#$#$world#$"; tmps = StringUtils.splitByWholeSeparator(tmp, "#$"); System.out.println(Arrays.toString(tmps)); Assert.assertThat(tmps.length, is(2)); } @Test public void testHasText() { String str = "\r\n\t\t"; Assert.assertThat(StringUtils.hasLength(str), is(true)); Assert.assertThat(StringUtils.hasText(str), is(false)); str = null; Assert.assertThat(StringUtils.hasText(str), is(false)); } @Test public void testReplace() { String str = "hello ${t1} and ${t2} s"; Map<String, Object> map = new HashMap<String, Object>(); map.put("t1", "foo"); map.put("t2", "bar"); String ret = StringUtils.replace(str, map); Assert.assertThat(ret, is("hello foo and bar s")); map = new HashMap<String, Object>(); map.put("t1", "foo"); map.put("t2", "${dddd}"); ret = StringUtils.replace(str, map); Assert.assertThat(ret, is("hello foo and ${dddd} s")); map = new HashMap<String, Object>(); map.put("t1", null); map.put("t2", "${dddd}"); ret = StringUtils.replace(str, map); Assert.assertThat(ret, is("hello null and ${dddd} s")); map = new HashMap<String, Object>(); map.put("t1", 33); map.put("t2", 42L); ret = StringUtils.replace(str, map); Assert.assertThat(ret, is("hello 33 and 42 s")); } @Test public void testReplace2() { String str2 = "hello {{{{} and {} mm"; String ret2 = StringUtils.replace(str2, "foo", "bar"); Assert.assertThat(ret2, is("hello {{{foo and bar mm")); ret2 = StringUtils.replace(str2, "foo"); Assert.assertThat(ret2, is("hello {{{foo and {} mm")); ret2 = StringUtils.replace(str2, "foo", "bar", "foo2"); Assert.assertThat(ret2, is("hello {{{foo and bar mm")); ret2 = StringUtils.replace(str2, 12, 23L, 33); Assert.assertThat(ret2, is("hello {{{12 and 23 mm")); } public static void main(String[] args) { String str = "Replace the pattern using a map, such as a pattern, such as A pattern is 'hello ${foo}' and the map is {'foo' : 'world'}, when you execute this function, the result is 'hello world'"; System.out.println(StringUtils.escapeXML(str)); } public static void main2(String[] args) { String str = "hello ${t1} and ${t2}"; Map<String, String> map = new HashMap<String, String>(); map.put("t1", "foo"); map.put("t2", "bar"); String ret = StringUtils.replace(str, map); System.out.println(ret); map = new HashMap<String, String>(); map.put("t1", "foo"); map.put("t2", "${dddd}"); ret = StringUtils.replace(str, map); System.out.println(ret); map = new HashMap<String, String>(); map.put("t1", "foo"); map.put("t2", null); ret = StringUtils.replace(str, map); System.out.println(ret); String str2 = "hello {{{{} and {} mm"; String ret2 = StringUtils.replace(str2, "foo", "bar"); System.out.println(ret2); ret2 = StringUtils.replace(str2, "foo"); System.out.println(ret2); ret2 = StringUtils.replace(str2, "foo", "bar", "foo2"); System.out.println(ret2); String r = "-500"; System.out.println(StringUtils.split(r, '-')[0] + "|" + StringUtils.split(r, '-').length); } }
[ "qptkk@163.com" ]
qptkk@163.com
e9e1c159939c2bb0f4046e6a8f89305be058c591
d715d4ffff654a57e8c9dc668f142fb512b40bb5
/workspace/glaf-isdp/src/main/java/com/glaf/isdp/util/RoleUse2JsonFactory.java
20b742adf1674118a4639b4869c0da17d92ab4f0
[]
no_license
jior/isdp
c940d9e1477d74e9e0e24096f32ffb1430b841e7
251fe724dcce7464df53479c7a373fa43f6264ca
refs/heads/master
2016-09-06T07:43:11.220255
2014-12-28T09:18:14
2014-12-28T09:18:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,148
java
package com.glaf.isdp.util; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import com.glaf.isdp.domain.RoleUse2; public class RoleUse2JsonFactory { public static RoleUse2 jsonToObject(JSONObject jsonObject) { RoleUse2 model = new RoleUse2(); if (jsonObject.containsKey("id")) { model.setId(jsonObject.getString("id")); } if (jsonObject.containsKey("roleId")) { model.setRoleId(jsonObject.getString("roleId")); } if (jsonObject.containsKey("useType")) { model.setUseType(jsonObject.getString("useType")); } if (jsonObject.containsKey("pid")) { model.setPid(jsonObject.getInteger("pid")); } if (jsonObject.containsKey("treeType")) { model.setTreeType(jsonObject.getInteger("treeType")); } if (jsonObject.containsKey("userchk")) { model.setUserchk(jsonObject.getString("userchk")); } if (jsonObject.containsKey("treeId")) { model.setTreeId(jsonObject.getString("treeId")); } return model; } public static JSONObject toJsonObject(RoleUse2 model) { JSONObject jsonObject = new JSONObject(); jsonObject.put("id", model.getId()); jsonObject.put("_id_", model.getId()); jsonObject.put("_oid_", model.getId()); if (model.getRoleId() != null) { jsonObject.put("roleId", model.getRoleId()); } if (model.getUseType() != null) { jsonObject.put("useType", model.getUseType()); } jsonObject.put("pid", model.getPid()); jsonObject.put("treeType", model.getTreeType()); if (model.getUserchk() != null) { jsonObject.put("userchk", model.getUserchk()); } if (model.getTreeId() != null) { jsonObject.put("treeId", model.getTreeId()); } return jsonObject; } public static ObjectNode toObjectNode(RoleUse2 model) { ObjectNode jsonObject = new ObjectMapper().createObjectNode(); jsonObject.put("id", model.getId()); jsonObject.put("_id_", model.getId()); jsonObject.put("_oid_", model.getId()); if (model.getRoleId() != null) { jsonObject.put("roleId", model.getRoleId()); } if (model.getUseType() != null) { jsonObject.put("useType", model.getUseType()); } jsonObject.put("pid", model.getPid()); jsonObject.put("treeType", model.getTreeType()); if (model.getUserchk() != null) { jsonObject.put("userchk", model.getUserchk()); } if (model.getTreeId() != null) { jsonObject.put("treeId", model.getTreeId()); } return jsonObject; } public static JSONArray listToArray(java.util.List<RoleUse2> list) { JSONArray array = new JSONArray(); if (list != null && !list.isEmpty()) { for (RoleUse2 model : list) { JSONObject jsonObject = model.toJsonObject(); array.add(jsonObject); } } return array; } public static java.util.List<RoleUse2> arrayToList(JSONArray array) { java.util.List<RoleUse2> list = new java.util.ArrayList<RoleUse2>(); for (int i = 0; i < array.size(); i++) { JSONObject jsonObject = array.getJSONObject(i); RoleUse2 model = jsonToObject(jsonObject); list.add(model); } return list; } private RoleUse2JsonFactory() { } }
[ "jior2008@gmail.com" ]
jior2008@gmail.com
dd0072e0e58b56495ef2db9d8c3d229d866f3417
6b3040734f41809e284655a7dd8746f95050df40
/src/main/java/redo/p1700_1799/P1796.java
09402fa0b499f2517843a83fd6703629a799741a
[]
no_license
yu132/leetcode-solution
a451e30f6e34eab93de39f7bb6d1fd135ffd154d
6a659a4d773f58c2efd585a0b7140ace5f5ea10a
refs/heads/master
2023-01-28T08:14:03.817652
2023-01-14T16:26:59
2023-01-14T16:26:59
185,592,914
0
0
null
null
null
null
UTF-8
Java
false
false
814
java
package redo.p1700_1799; /** * @ClassName: P1796 * * @Description: TODO(这里用一句话描述这个类的作用) * * @author 余定邦 * * @date 2021年3月28日 * */ public class P1796 { class Solution { public int secondHighest(String s) { int max = -1, max2 = -1; for (char ch : s.toCharArray()) { if (Character.isDigit(ch)) { int num = ch - '0'; if (num > max) { max2 = max; max = num; } else if (num == max) { continue; } else if (num > max2) { max2 = num; } } } return max2; } } }
[ "876633022@qq.com" ]
876633022@qq.com
2c142c644b623a3bcf8ef540d3d5189022f24fb9
8603bd89f9c57dd60b492ceb06402e8b5d088841
/app/build/generated/source/apt/debug/com/talkfun/cloudlive/adapter/RtcChatAdapter$SimpleViewHolder_ViewBinding.java
0778e0d4496e638fc61e0d90f254cb4dad15166a
[]
no_license
zq019633/ht2
1e24c7a3437d01064eab5a9e049576f41ba950f8
b6550d55d59252d4974791754429173bc5944701
refs/heads/master
2020-07-04T20:11:14.970789
2019-08-14T18:05:29
2019-08-14T18:05:29
202,400,363
0
0
null
null
null
null
UTF-8
Java
false
false
1,172
java
// Generated code from Butter Knife. Do not modify! package com.talkfun.cloudlive.adapter; import android.view.View; import android.widget.TextView; import androidx.annotation.CallSuper; import androidx.annotation.UiThread; import butterknife.Unbinder; import butterknife.internal.Utils; import com.talkfun.cloudlive.R; import java.lang.IllegalStateException; import java.lang.Override; public class RtcChatAdapter$SimpleViewHolder_ViewBinding implements Unbinder { private RtcChatAdapter.SimpleViewHolder target; @UiThread public RtcChatAdapter$SimpleViewHolder_ViewBinding(RtcChatAdapter.SimpleViewHolder target, View source) { this.target = target; target.nameTv = Utils.findRequiredViewAsType(source, R.id.name, "field 'nameTv'", TextView.class); target.contentTv = Utils.findRequiredViewAsType(source, R.id.content, "field 'contentTv'", TextView.class); } @Override @CallSuper public void unbind() { RtcChatAdapter.SimpleViewHolder target = this.target; if (target == null) throw new IllegalStateException("Bindings already cleared."); this.target = null; target.nameTv = null; target.contentTv = null; } }
[ "1020498110@qq.com" ]
1020498110@qq.com
080b23cbf85b0bc1b1a4b594397e507781163a9f
5f6deca09127f8aa214ad54af48e395ba0418287
/app/src/main/java/net/suntrans/dachu/fragment/ZhCurHisItemFragment.java
72e4bf57383405c17504d811e226e49a78f14cb8
[]
no_license
luping1994/DaChu-Android
e2262c4274d4231d586da608c90fd65b572399fe
54e7802f72beb4b66aa09a1f8442fc56b4ede4fd
refs/heads/master
2020-03-15T04:55:16.080805
2018-05-03T10:08:59
2018-05-03T10:08:59
131,977,294
0
0
null
null
null
null
UTF-8
Java
false
false
2,946
java
package net.suntrans.dachu.fragment; import android.databinding.DataBindingUtil; import android.os.Bundle; import android.support.annotation.LayoutRes; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import net.suntrans.dachu.R; import net.suntrans.dachu.adapter.DefaultDecoration; import net.suntrans.dachu.bean.HisEntity; import net.suntrans.dachu.databinding.FragmentItemZhCurHisBinding; import java.util.ArrayList; import java.util.List; /** * Created by Looney on 2017/10/23. * Des: */ public class ZhCurHisItemFragment extends Fragment { FragmentItemZhCurHisBinding binding; private MyAdapter adapter; private List<HisEntity.EleParmHisItem> datas = new ArrayList<>(); public static ZhCurHisItemFragment newInstance(ArrayList<HisEntity.EleParmHisItem> datas) { ZhCurHisItemFragment fragment = new ZhCurHisItemFragment(); Bundle bundle = new Bundle(); bundle.putParcelableArrayList("datas", datas); fragment.setArguments(bundle); return fragment; } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { binding = DataBindingUtil.inflate(inflater, R.layout.fragment_item_zh_cur_his, container, false); return binding.getRoot(); } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { datas = getArguments().getParcelableArrayList("datas"); adapter = new MyAdapter(R.layout.item_his, datas); binding.recyclerView.setAdapter(adapter); binding.recyclerView.addItemDecoration(new DefaultDecoration()); } class MyAdapter extends BaseQuickAdapter<HisEntity.EleParmHisItem, BaseViewHolder> { public MyAdapter(@LayoutRes int layoutResId, @Nullable List<HisEntity.EleParmHisItem> data) { super(layoutResId, data); } @Override protected void convert(BaseViewHolder helper, HisEntity.EleParmHisItem item) { helper.setText(R.id.value, item.Value == null ? "0.00" : item.Value); helper.setText(R.id.time, item.GetTime == null ? "0.00" : item.GetTime); } } public void setData(List<HisEntity.EleParmHisItem> data) { datas.clear(); // if (mDisplayType == DISPLAY_WEEK) { // datas.addAll(hisEntity.week_data); // } else if (mDisplayType == DISPLAY_MONTH) { // datas.addAll(hisEntity.month_data); // } else if (mDisplayType == DISPLAY_DAY) { // datas.addAll(hisEntity.day_data); // } datas.addAll(data); if (adapter != null) adapter.notifyDataSetChanged(); } }
[ "250384247@qq.com" ]
250384247@qq.com
c22ca3235c055c03494865dc53df0f452bcc8118
bb3625b54d2ae9763a97124cdb4d1369439b5096
/JavaRushTasks/3.JavaMultithreading/src/com/javarush/task/task30/task3008/MessageType.java
95204eb4b1c06d8210ef981a28e485fa9426a2df
[]
no_license
viktorbrechko85/MyProjects
c4d7c2b5c9e4159bd93dadf8dd555e2a5362a71e
be188d801c323918cd959a6552582f63908012ac
refs/heads/master
2022-12-21T21:21:32.733634
2019-09-10T12:14:08
2019-09-10T12:14:08
207,059,945
0
0
null
2022-12-16T00:47:27
2019-09-08T04:08:39
Java
UTF-8
Java
false
false
193
java
package com.javarush.task.task30.task3008; /** * Created by MarKiz on 27.05.2018. */ public enum MessageType { NAME_REQUEST, USER_NAME, NAME_ACCEPTED, TEXT, USER_ADDED, USER_REMOVED }
[ "vbrobocop1985@gmail.com" ]
vbrobocop1985@gmail.com
a763854d8db8e453621d9db2ee31fe53f92627d7
e553161c3adba5c1b19914adbacd58f34f27788e
/jfreechart-1.0.16/src/org/jfree/chart/labels/StandardCategoryItemLabelGenerator.java
36e403240dfc579de984f336051686611d04f554
[]
no_license
ReedOei/dependent-tests-experiments
57daf82d1feb23165651067b7ac004dd74d1e23d
9fccc06ec13ff69a1ac8fb2a4dd6f93c89ebd29b
refs/heads/master
2020-03-20T02:50:59.514767
2018-08-23T16:46:01
2018-08-23T16:46:01
137,126,354
1
0
null
null
null
null
UTF-8
Java
false
false
5,460
java
/* =========================================================== * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors. * * Project Info: http://www.jfree.org/jfreechart/index.html * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners.] * * --------------------------------------- * StandardCategoryItemLabelGenerator.java * --------------------------------------- * (C) Copyright 2004-2008, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; * * Changes * ------- * 11-May-2004 : Version 1 (DG); * 20-Apr-2005 : Renamed StandardCategoryLabelGenerator * --> StandardCategoryItemLabelGenerator (DG); * ------------- JFREECHART 1.0.0 --------------------------------------------- * 03-May-2005 : Added equals() implementation, to fix bug 1481087 (DG); */ package org.jfree.chart.labels; import java.io.Serializable; import java.text.DateFormat; import java.text.NumberFormat; import org.jfree.data.category.CategoryDataset; import org.jfree.util.PublicCloneable; /** * A standard label generator that can be used with a * {@link org.jfree.chart.renderer.category.CategoryItemRenderer}. */ public class StandardCategoryItemLabelGenerator extends AbstractCategoryItemLabelGenerator implements CategoryItemLabelGenerator, Cloneable, PublicCloneable, Serializable { /** For serialization. */ private static final long serialVersionUID = 3499701401211412882L; /** The default format string. */ public static final String DEFAULT_LABEL_FORMAT_STRING = "{2}"; /** * Creates a new generator with a default number formatter. */ public StandardCategoryItemLabelGenerator() { super(DEFAULT_LABEL_FORMAT_STRING, NumberFormat.getInstance()); } /** * Creates a new generator with the specified number formatter. * * @param labelFormat the label format string (<code>null</code> not * permitted). * @param formatter the number formatter (<code>null</code> not permitted). */ public StandardCategoryItemLabelGenerator(String labelFormat, NumberFormat formatter) { super(labelFormat, formatter); } /** * Creates a new generator with the specified number formatter. * * @param labelFormat the label format string (<code>null</code> not * permitted). * @param formatter the number formatter (<code>null</code> not permitted). * @param percentFormatter the percent formatter (<code>null</code> not * permitted). * * @since 1.0.2 */ public StandardCategoryItemLabelGenerator(String labelFormat, NumberFormat formatter, NumberFormat percentFormatter) { super(labelFormat, formatter, percentFormatter); } /** * Creates a new generator with the specified date formatter. * * @param labelFormat the label format string (<code>null</code> not * permitted). * @param formatter the date formatter (<code>null</code> not permitted). */ public StandardCategoryItemLabelGenerator(String labelFormat, DateFormat formatter) { super(labelFormat, formatter); } /** * Generates the label for an item in a dataset. Note: in the current * dataset implementation, each row is a series, and each column contains * values for a particular category. * * @param dataset the dataset (<code>null</code> not permitted). * @param row the row index (zero-based). * @param column the column index (zero-based). * * @return The label (possibly <code>null</code>). */ public String generateLabel(CategoryDataset dataset, int row, int column) { return generateLabelString(dataset, row, column); } /** * Tests this generator for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return <code>true</code> if this generator is equal to * <code>obj</code>, and <code>false</code> otherwise. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardCategoryItemLabelGenerator)) { return false; } return super.equals(obj); } }
[ "oei.reed@gmail.com" ]
oei.reed@gmail.com
9be828c8f05cf4112b704467df4fe0a2633eecae
e40d218d7fbb4fb0a389cb1438561768623fab2b
/ch_12_Other_Advanced_Topics/src/main/java/ua/tifoha/Employee.java
502e60f8cf29ce0d4d3f6e5bc41eddfa82fb668c
[]
no_license
tifoha/jpa2
c93179b0a29d80cd6ca8985ffd78b27157ae9af1
637658ae3a3b80840e4fff7c5395207a560a5e4f
refs/heads/master
2021-01-19T02:22:54.720920
2017-06-28T18:07:40
2017-06-28T18:07:40
87,274,181
0
0
null
null
null
null
UTF-8
Java
false
false
4,837
java
package ua.tifoha; import javax.persistence.Cacheable; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.NamedAttributeNode; import javax.persistence.NamedEntityGraph; import javax.persistence.NamedEntityGraphs; import javax.persistence.NamedSubgraph; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.persistence.Temporal; import javax.persistence.TemporalType; import java.util.ArrayList; import java.util.Collection; import java.util.Date; //@SqlResultSetMapping(name = "test", entities = @EntityResult(entityClass = NotEntity.class)) @Cacheable (true) @Entity @NamedEntityGraphs({ @NamedEntityGraph (name = "graph.Employee.all", includeAllAttributes = true), @NamedEntityGraph(name = "graph.Employee.directs", attributeNodes = { @NamedAttributeNode(value = "directs", subgraph = "phones") }, subgraphs = @NamedSubgraph(name = "phones", attributeNodes = @NamedAttributeNode("phones"))), @NamedEntityGraph(name = "graph.Employee.phones", attributeNodes = { @NamedAttributeNode("phones") }), @NamedEntityGraph(name = "graph.Employee.name", attributeNodes = { @NamedAttributeNode("name") }) }) public class Employee { @Id private int id; private String name; private long salary; @Temporal(TemporalType.DATE) private Date startDate; @OneToOne private Address address; @OneToMany (mappedBy = "employee") private Collection<Phone> phones = new ArrayList<Phone>(); public void setPhones(Collection<Phone> phones) { this.phones = phones; } @ManyToOne private Department department; @ManyToOne private Employee manager; @OneToMany(mappedBy="manager") private Collection<Employee> directs = new ArrayList<Employee>(); @ManyToMany (mappedBy = "employees") private Collection<Project> projects = new ArrayList<Project>(); public int getId() { return id; } public void setId(int empNo) { this.id = empNo; } public String getName() { return name; } public void setName(String name) { this.name = name; } public long getSalary() { return salary; } public void setSalary(long salary) { this.salary = salary; } public Date getStartDate() { return startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } public Collection<Phone> getPhones() { return phones; } public void addPhone(Phone phone) { if (!getPhones().contains(phone)) { getPhones().add(phone); if (phone.getEmployee() != null) { phone.getEmployee().getPhones().remove(phone); } phone.setEmployee(this); } } public Department getDepartment() { return department; } public void setDepartment(Department department) { if (this.department != null) { this.department.getEmployees().remove(this); } this.department = department; this.department.getEmployees().add(this); } public Collection<Employee> getDirects() { return directs; } public void addDirect(Employee employee) { if (!getDirects().contains(employee)) { getDirects().add(employee); if (employee.getManager() != null) { employee.getManager().getDirects().remove(employee); } employee.setManager(this); } } public Employee getManager() { return manager; } public void setManager(Employee manager) { this.manager = manager; } public Collection<Project> getProjects() { return projects; } public void addProject(Project project) { if (!getProjects().contains(project)) { getProjects().add(project); } if (!project.getEmployees().contains(this)) { project.getEmployees().add(this); } } public Address getAddress() { return address; } public void setAddress(Address address) { this.address = address; } public String toString() { return "Employee " + getId() + ": name: " + getName() // ", salary: " + getSalary() + // ", phones: " + getPhones() + // ", managerNo: " + ((getManager() == null) ? null : getManager().getId()) + // ", deptNo: " + ((getDepartment() == null) ? null : getDepartment().getId()) ; } }
[ "tifoha@gmail.com" ]
tifoha@gmail.com
b96e682164d49d907a2439c610bc7d2ffdc677f8
4951b2909e8fed7f4c379adbd16051b38c5e320a
/retrofitutils/src/main/java/com/zhuoke/team/net/exception/ExceptionHandle.java
def19a6ce52854106926b0943551fe97a7c28f17
[]
no_license
DaYinTeamCode/RetrofitClinent
d887a8e31f714f58b396ceb71957f798a640464b
7644983f8729fe0320b4bf04ffec536639d7a6fc
refs/heads/master
2021-06-11T01:05:26.490479
2016-11-28T07:58:16
2016-11-28T07:58:16
73,683,662
2
0
null
null
null
null
UTF-8
Java
false
false
3,832
java
package com.zhuoke.team.net.exception; import android.net.ParseException; import com.google.gson.JsonParseException; import org.apache.http.conn.ConnectTimeoutException; import org.json.JSONException; import java.net.ConnectException; import java.net.UnknownHostException; import retrofit2.adapter.rxjava.HttpException; /** * 作者:gaoyin * 电话:18810474975 * 邮箱:18810474975@163.com * 版本号:1.0 * 类描述: 异常处理类 * 展示友好UI界面给用户 * 备注消息: * 修改时间:16/9/18 下午2:37 **/ public class ExceptionHandle { /** * 定义网络异常码 */ private static final int UNAUTHORIZED = 401; private static final int FORBIDDEN = 403; private static final int NOT_FOUND = 404; private static final int REQUEST_TIMEOUT = 408; private static final int INTERNAL_SERVER_ERROR = 500; private static final int BAD_GATEWAY = 502; private static final int SERVICE_UNAVAILABLE = 503; private static final int GATEWAY_TIMEOUT = 504; public static ResponeThrowable handleException(Throwable e) { ResponeThrowable ex; if (e instanceof HttpException) { HttpException httpException = (HttpException) e; ex = new ResponeThrowable(e, ERROR.HTTP_ERROR); switch (httpException.code()) { case UNAUTHORIZED: case FORBIDDEN: case NOT_FOUND: case REQUEST_TIMEOUT: case GATEWAY_TIMEOUT: case INTERNAL_SERVER_ERROR: case BAD_GATEWAY: case SERVICE_UNAVAILABLE: default: ex.message = "无网络,请重试!"; break; } return ex; } else if (e instanceof ServerException) { ServerException resultException = (ServerException) e; ex = new ResponeThrowable(resultException, resultException.code); ex.message = resultException.message; return ex; } else if (e instanceof JsonParseException || e instanceof JSONException || e instanceof ParseException) { ex = new ResponeThrowable(e, ERROR.PARSE_ERROR); ex.message = "解析异常"; return ex; } else if(e instanceof ConnectException|| e instanceof UnknownHostException) { ex=new ResponeThrowable(e,ERROR.NETWORD_ERROR); ex.message="无网络,请重试!"; return ex; } else if (e instanceof javax.net.ssl.SSLHandshakeException) { ex = new ResponeThrowable(e, ERROR.SSL_ERROR); ex.message = "证书验证异常"; return ex; } else if (e instanceof ConnectTimeoutException||e instanceof java.net.SocketTimeoutException){ ex = new ResponeThrowable(e, ERROR.TIMEOUT_ERROR); ex.message = "连接超时"; return ex; } else { ex = new ResponeThrowable(e, ERROR.UNKNOWN); ex.message = "未知错误"; return ex; } } /** * 约定异常 */ class ERROR { /** * 未知错误 */ public static final int UNKNOWN = 1000; /** * 解析错误 */ public static final int PARSE_ERROR = 1001; /** * 网络错误 */ public static final int NETWORD_ERROR = 1002; /** * 协议出错 */ public static final int HTTP_ERROR = 1003; /** * 证书出错 */ public static final int SSL_ERROR = 1005; /** * 连接超时 */ public static final int TIMEOUT_ERROR = 1006; } }
[ "gaoyin_vip@126.com" ]
gaoyin_vip@126.com
b2ab0028d61d51d8e9570a28082f15fb29e420b3
ec80469dfaa243130c0543fe8c4bd162a2e54bbd
/src/main/java/com/genewisdom/service/fhdb/timingbackup/TimingBackUpManager.java
10b8bf2dcce72547e0e8192efa7cada7a9ef393f
[]
no_license
SimonHK/KGPF
84f6c569479f4fb1663f77135f0f4da761b9135b
69b74a015d6688326a426bb4493514505d33d2fe
refs/heads/master
2021-01-11T23:54:30.460612
2017-01-11T13:50:44
2017-01-11T13:50:44
78,643,244
1
0
null
null
null
null
UTF-8
Java
false
false
1,276
java
package com.genewisdom.service.fhdb.timingbackup; import java.util.List; import com.genewisdom.entity.Page; import com.genewisdom.util.PageData; /** * 说明: 定时备份接口 * 创建人:HongKai * 创建时间:2016-04-09 * @version */ public interface TimingBackUpManager{ /**新增 * @param pd * @throws Exception */ public void save(PageData pd)throws Exception; /**删除 * @param pd * @throws Exception */ public void delete(PageData pd)throws Exception; /**修改 * @param pd * @throws Exception */ public void edit(PageData pd)throws Exception; /**列表 * @param page * @throws Exception */ public List<PageData> list(Page page)throws Exception; /**列表(全部) * @param pd * @throws Exception */ public List<PageData> listAll(PageData pd)throws Exception; /**通过id获取数据 * @param pd * @throws Exception */ public PageData findById(PageData pd)throws Exception; /**批量删除 * @param ArrayDATA_IDS * @throws Exception */ public void deleteAll(String[] ArrayDATA_IDS)throws Exception; /**切换状态 * @param pd * @throws Exception */ public void changeStatus(PageData pd)throws Exception; }
[ "18611949252@163.como" ]
18611949252@163.como
2cc40940ba5407b0807eb3d62ff7d596e6a3228d
b35fadf8d375525e320751e25893f6f69a04e37d
/leimingtech-core/src/main/java/com/leimingtech/core/service/ContentIllegalServiceI.java
a4255c2fd28d881f291f3b90fa0e805688e9b5f2
[]
no_license
dockercms/cms-4.0
8e41fca1142e121861a86006afaf378327f1917b
8f390cc00848124daeb997b8c09aefa0f465572c
refs/heads/master
2021-05-19T03:38:03.644558
2019-12-06T02:10:27
2019-12-06T02:10:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
601
java
package com.leimingtech.core.service; import java.util.List; import com.leimingtech.core.entity.ContentsEntity; /** * 非法内容管理接口 * * @author liuzhen 2014年8月20日 11:54:46 * */ public interface ContentIllegalServiceI { /** * 删除内容页面文件 * * @param content */ void delContentHtmlFile(ContentsEntity content); /** * 删除多个内容页面文件 * * @param contentList */ void delContentHtmlFile(List<ContentsEntity> contentList); /** * 根据内容id删除页面文件 * * @param id */ void delContentHtmlFile(Integer id); }
[ "pixiaoyong@leimingtech.com" ]
pixiaoyong@leimingtech.com
f93589426de6444a0e349948819b00ccb53472eb
b9b1109f2e0931d6a8381994da926d532b44f3ac
/bitcamp-java-basic/src/main/java/com/eomcs/design_pattern/observer/after/d/EngineOilCarObserver.java
3c4aadff9fc11b7b00d3336531377abcc59c2bed
[]
no_license
eomjinyoung/bitcamp-20200713
a1ba5ec8c352cd33d6549d8e31ca44f2e3df4db7
d791bd087b073a186facacbc562ddce24970447d
refs/heads/master
2023-02-08T14:51:58.820397
2021-01-01T01:35:21
2021-01-01T01:35:21
279,742,777
2
3
null
2020-10-28T08:31:29
2020-07-15T02:33:14
Java
UTF-8
Java
false
false
258
java
package com.eomcs.design_pattern.observer.after.d; public class EngineOilCarObserver implements CarObserver { @Override public void carStarted() { System.out.println("엔진 오일 유무 검사"); } @Override public void carStopped() {} }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
f2af29c07fc5a99799c3bf4ae13782791c653504
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Hibernate/Hibernate2735.java
319036457cae0b90502390430a7e24f500ba2405
[]
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
510
java
private void addCollectionFromElement(FromElement fromElement) { if ( fromElement.isFetch() ) { if ( fromElement.getQueryableCollection() != null ) { String suffix; if ( collectionFromElements == null ) { collectionFromElements = new ArrayList(); suffix = VERSION2_SQL ? "__" : "0__"; } else { suffix = Integer.toString( collectionFromElements.size() ) + "__"; } collectionFromElements.add( fromElement ); fromElement.setCollectionSuffix( suffix ); } } }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
bce530b6d6f51f3e4db0c06444abcf52cfb225f6
0f2d15e30082f1f45c51fdadc3911472223e70e0
/src/3.7/plugins/com.perforce.team.ui.folder/src/com/perforce/team/ui/folder/preferences/FolderDiffPreferencePage.java
8f4d1b0066394b331d8fa06841da7ecd203c0164
[ "BSD-2-Clause" ]
permissive
eclipseguru/p4eclipse
a28de6bd211df3009d58f3d381867d574ee63c7a
7f91b7daccb2a15e752290c1f3399cc4b6f4fa54
refs/heads/master
2022-09-04T05:50:25.271301
2022-09-01T12:47:06
2022-09-01T12:47:06
136,226,938
2
1
BSD-2-Clause
2022-09-01T19:42:29
2018-06-05T19:45:54
Java
UTF-8
Java
false
false
4,470
java
/** * Copyright (c) 2010 Perforce Software. All rights reserved. */ package com.perforce.team.ui.folder.preferences; import com.perforce.team.ui.folder.PerforceUiFolderPlugin; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.jface.preference.BooleanFieldEditor; import org.eclipse.jface.preference.ColorFieldEditor; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; /** * @author Kevin Sawicki (ksawicki@perforce.com) */ public class FolderDiffPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { /** * ID */ public static final String ID = "com.perforce.team.ui.folder.diffPage"; //$NON-NLS-1$ private ColorFieldEditor uniqueEditor; private ColorFieldEditor contentEditor; private ColorFieldEditor diffUniqueEditor; private ColorFieldEditor diffContentEditor; private BooleanFieldEditor diffLinkedResourcesEditor; /** * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) */ @Override protected Control createContents(Composite parent) { Composite displayArea = new Composite(parent, SWT.NONE); displayArea.setLayout(GridLayoutFactory.swtDefaults().numColumns(1) .create()); displayArea.setLayoutData(GridDataFactory.fillDefaults() .grab(true, true).create()); IPreferenceStore store = PerforceUiFolderPlugin.getDefault() .getPreferenceStore(); Composite colorArea = new Composite(displayArea, SWT.NONE); GridLayout caLayout = new GridLayout(1, true); caLayout.marginWidth = 0; caLayout.marginHeight = 0; colorArea.setLayout(caLayout); colorArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); uniqueEditor = new ColorFieldEditor(IPreferenceConstants.UNIQUE_COLOR, Messages.FolderDiffPreferencePage_UniqueFileColor, colorArea); uniqueEditor.setPreferenceStore(store); uniqueEditor.load(); contentEditor = new ColorFieldEditor( IPreferenceConstants.CONTENT_COLOR, Messages.FolderDiffPreferencePage_DifferingFileColor, colorArea); contentEditor.setPreferenceStore(store); contentEditor.load(); diffUniqueEditor = new ColorFieldEditor( IPreferenceConstants.DIFF_UNIQUE_COLOR, Messages.FolderDiffPreferencePage_UniqueContentColor, colorArea); diffUniqueEditor.setPreferenceStore(store); diffUniqueEditor.load(); diffContentEditor = new ColorFieldEditor( IPreferenceConstants.DIFF_CONTENT_COLOR, Messages.FolderDiffPreferencePage_DifferingContentColor, colorArea); diffContentEditor.setPreferenceStore(store); diffContentEditor.load(); diffLinkedResourcesEditor = new BooleanFieldEditor( IPreferenceConstants.DIFF_LINKED_RESOURCES, Messages.FolderDiffPreferencePage_IncludeLinkedResources, displayArea); diffLinkedResourcesEditor.setPreferenceStore(store); diffLinkedResourcesEditor.load(); return displayArea; } /** * @see org.eclipse.jface.preference.PreferencePage#performDefaults() */ @Override protected void performDefaults() { uniqueEditor.loadDefault(); contentEditor.loadDefault(); diffUniqueEditor.loadDefault(); diffContentEditor.loadDefault(); diffLinkedResourcesEditor.loadDefault(); } /** * @see org.eclipse.jface.preference.PreferencePage#performOk() */ @Override public boolean performOk() { uniqueEditor.store(); contentEditor.store(); diffUniqueEditor.store(); diffContentEditor.store(); diffLinkedResourcesEditor.store(); return super.performOk(); } /** * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) */ public void init(IWorkbench workbench) { } }
[ "gunnar@wagenknecht.org" ]
gunnar@wagenknecht.org
2505c0ed2fce49099f91cec5e49fb135d447b526
2c0da6f10a8789bdad22f65c912e3eb7b2a0a1e2
/camel-spring-salesforce/src/main/java/org/apache/camel/salesforce/dto/QueryRecordsOrderItemFeed.java
64a262bc371caa6e4b33a8632299d04f5baf545d
[]
no_license
xiwu/gss.samples
9fe35e4c2c673a09463da72378936ce46c558211
d5dc2c0a91c0435c183038fc9384b461ede92772
refs/heads/master
2023-05-13T04:21:24.468623
2023-04-28T09:34:13
2023-04-28T09:34:13
42,858,630
1
0
null
2022-12-23T09:15:35
2015-09-21T10:05:59
Java
UTF-8
Java
false
false
702
java
/* * Salesforce Query DTO generated by camel-salesforce-maven-plugin * Generated on: Mon Aug 15 13:54:43 CST 2016 */ package org.apache.camel.salesforce.dto; import com.thoughtworks.xstream.annotations.XStreamImplicit; import org.apache.camel.component.salesforce.api.dto.AbstractQueryRecordsBase; import java.util.List; /** * Salesforce QueryRecords DTO for type OrderItemFeed */ public class QueryRecordsOrderItemFeed extends AbstractQueryRecordsBase { @XStreamImplicit private List<OrderItemFeed> records; public List<OrderItemFeed> getRecords() { return records; } public void setRecords(List<OrderItemFeed> records) { this.records = records; } }
[ "vicky.wuxiaohui@gmail.com" ]
vicky.wuxiaohui@gmail.com
2ded98ddea5b8810f2fb5d5257cdf7248b0a0720
e73e87ae5023cea015b3141f1a0b6ed3c99e8a0a
/Art/src/tw/group4/_35_/login/model/WebsiteMemberDao.java
03489a45c830fb5dde8f93a5fc17b569a3bdfe04
[]
no_license
Jimmy1215/Art-Final
a75e8331cb57ec1a08093680e903b3def3e66eb4
96be88938ffde121c5d8186dde466b1ca8ad8b53
refs/heads/master
2023-02-24T06:34:03.847900
2021-01-26T12:07:24
2021-01-26T12:07:24
333,072,132
0
0
null
null
null
null
UTF-8
Java
false
false
4,227
java
package tw.group4._35_.login.model; import java.util.ArrayList; import java.util.List; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.query.Query; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; @Repository public class WebsiteMemberDao { SessionFactory sessionFactory; @Autowired public WebsiteMemberDao(@Qualifier("sessionFactory")SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } public WebsiteMember insert(WebsiteMember wmBean) { Session session = sessionFactory.getCurrentSession(); if (wmBean!=null) { session.save(wmBean); } return wmBean; } public WebsiteMember update(WebsiteMember wmBean) { Session session = sessionFactory.getCurrentSession(); session.merge(wmBean); return wmBean; } public int insertWithResult(WebsiteMember wmBean) { Session session = sessionFactory.getCurrentSession(); if (wmBean!=null) { session.save(wmBean); return 1; } return 0; } public WebsiteMember selectById(int id) { Session session = sessionFactory.getCurrentSession(); WebsiteMember wmBean = session.get(WebsiteMember.class, id); return wmBean; } public Boolean checkLogin(WebsiteMember member) { Session session = sessionFactory.getCurrentSession(); Query<WebsiteMember> query = session.createQuery("From WebsiteMember where name = :name and password = :password", WebsiteMember.class); query.setParameter("name", member.getName()); query.setParameter("password", member.getPassword()); WebsiteMember memberResult = query.uniqueResult(); if(memberResult!=null) { return true; } return false; } public WebsiteMember getMemberFullInfo(WebsiteMember member) { Session session = sessionFactory.getCurrentSession(); Query<WebsiteMember> query = session.createQuery("From WebsiteMember where name = :name and password = :password", WebsiteMember.class); query.setParameter("name", member.getName()); query.setParameter("password", member.getPassword()); WebsiteMember memberResult = query.uniqueResult(); return memberResult; } public boolean checkNameExsist(String name) { Session session = sessionFactory.getCurrentSession(); Query<WebsiteMember> query = session.createQuery("From WebsiteMember where name = :name", WebsiteMember.class); query.setParameter("name", name); WebsiteMember memberResult = query.uniqueResult(); if (memberResult==null) { return false; } return true; } public List<WebsiteMember> selectAllMembers() { Session session = sessionFactory.getCurrentSession(); Query<WebsiteMember> query = session.createQuery("From WebsiteMember", WebsiteMember.class); List<WebsiteMember> list = query.list(); return list; } public List<WebsiteMember> selectSingleMember(String name) { Session session = sessionFactory.getCurrentSession(); Query<WebsiteMember> query = session.createQuery("From WebsiteMember where name= :name", WebsiteMember.class); query.setParameter("name", name); WebsiteMember member = query.uniqueResult(); List<WebsiteMember> list = new ArrayList<WebsiteMember>(); list.add(member); return list; } public boolean deleteMemberByName(String name) { Session session = sessionFactory.getCurrentSession(); Query<WebsiteMember> query = session.createQuery("From WebsiteMember where name= :name", WebsiteMember.class); query.setParameter("name", name); List<WebsiteMember> list = query.list(); if(list.size()!=0) { for(WebsiteMember item: list) session.delete(item); return true; } return false; } public boolean updateMemberByName(WebsiteMember member) { Session session = sessionFactory.getCurrentSession(); Query<WebsiteMember> query = session.createQuery("From WebsiteMember where name= :name", WebsiteMember.class); query.setParameter("name", member.getName()); List<WebsiteMember> list = query.list(); if(list.size()!=0) { for (WebsiteMember item: list) { session.detach(item); } session.update(member); return true; } return false; } }
[ "71664044+Jimmy1215@users.noreply.github.com" ]
71664044+Jimmy1215@users.noreply.github.com
04e1722a64563c508642748369a4429a6ea2c628
cc5a7d0bfe6519e2d462de1ac9ef793fb610f2a7
/api1/src/main/java/com/heb/pm/entity/ProductDiscontinueKey.java
3dd41a7dd3d62c52c909f08c702aac4b63da2c31
[]
no_license
manosbatsis/SAVEFILECOMPANY
d21535a46aebedf2a425fa231c678658d4b017a4
c33d41cf13dd2ff5bb3a882f6aecc89b24a206be
refs/heads/master
2023-03-21T04:46:23.286060
2019-10-10T10:38:02
2019-10-10T10:38:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,242
java
/* * com.heb.pm.entity.ProductDiscontinueKey * * Copyright (c) 2016 HEB * All rights reserved. * * This software is the confidential and proprietary information * of HEB. */ package com.heb.pm.entity; import java.io.Serializable; import javax.persistence.*; import org.springframework.data.domain.Sort; /** * The prod_del table has a composite key. This class represents that key. * * @author d11677 * @since 2.0.0 */ @Embeddable public class ProductDiscontinueKey implements Serializable{ private static final long serialVersionUID = 1L; public static final String DSD = "DSD "; public static final String WAREHOUSE = "ITMCD"; private static final int FOUR_BYTES = 32; private static final int PRIME_NUMBER = 31; private static final String UPC_SORT_FIELD = "key.upc"; private static final String PRODUCT_ID_SORT_FIELD = "key.productId"; private static final String ITEM_CODE_SORT_FIELD = "key.itemCode"; private static final String ITEM_TYPE_SORT_FIELD = "key.itemType"; @Column(name="scn_cd_id") private long upc; @Column(name="prod_id") private long productId; @Column(name="itm_id") private long itemCode; @Column(name="itm_key_typ_cd", length = 5) private String itemType; /** * Returns the UPC for the ProductDiscontinue object. * * @return The UPC for the ProductDiscontinue object. */ public long getUpc() { return upc; } /** * Sets the UPC for the ProductDiscontinue object. * * @param upc The UPC for the ProductDiscontinue object. */ public void setUpc(long upc) { this.upc = upc; } /** * Returns the product ID for the ProductDiscontinue object. * * @return The product ID for the ProductDiscontinue object. */ public long getProductId() { return productId; } /** * Sets the product ID for the ProductDiscontinue object. * * @param productId The product ID for the ProductDiscontinue object. */ public void setProductId(long productId) { this.productId = productId; } /** * Returns the item code for the ProductDiscontinue object. * * @return The item code for the ProductDiscontinue object. */ public long getItemCode() { return itemCode; } /** * Sets the item code for the ProductDiscontinue object. * * @param itemCode The item code for the ProductDiscontinue object. */ public void setItemCode(long itemCode) { this.itemCode = itemCode; } /** * Returns the item type for the ProductDiscontinue object. * * @return The item type for the ProductDiscontinue object. */ public String getItemType() { return itemType; } /** * Returns the item type for the ProductDiscontinue object. * * @param itemType The item type for the ProductDiscontinue object. */ public void setItemType(String itemType) { this.itemType = itemType; } /** * Returns a printable representation of the object. * * @return A printable representation of the object. */ @Override public String toString() { return "ProductDiscontinueKey{" + "upc=" + this.upc + ", productId=" + this.productId + ", itemCode=" + this.itemCode + ", itemType='" + this.itemType + '\'' + '}'; } /** * Compares another object to this one. This is a deep compare. * * @param o The object to compare to. * @return True if they are equal and false otherwise. */ @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ProductDiscontinueKey)) return false; ProductDiscontinueKey that = (ProductDiscontinueKey) o; if (this.itemCode != that.itemCode) return false; if (this.productId != that.productId) return false; if (this.upc != that.upc) return false; if (!this.itemType.equals(that.itemType)) return false; return true; } /** * Returns a hash for this object. If two objects are equal, they will have the same hash. If they * are not, they will have different hashes. * * @return The hash code for this object. */ @Override public int hashCode() { int result = (int) (upc ^ (upc >>> ProductDiscontinueKey.FOUR_BYTES)); result = ProductDiscontinueKey.PRIME_NUMBER * result + (int) (productId ^ (productId >>> ProductDiscontinueKey.FOUR_BYTES)); result = ProductDiscontinueKey.PRIME_NUMBER * result + (int) (itemCode ^ (itemCode >>> ProductDiscontinueKey.FOUR_BYTES)); result = ProductDiscontinueKey.PRIME_NUMBER * result + itemType.hashCode(); return result; } /** * Returns the default sort order for the prod_del table. * * @return The default sort order for the prod_del table. */ public static Sort getDefaultSort() { return new Sort( new Sort.Order(Sort.Direction.ASC, ProductDiscontinueKey.UPC_SORT_FIELD), new Sort.Order(Sort.Direction.ASC, ProductDiscontinueKey.PRODUCT_ID_SORT_FIELD), new Sort.Order(Sort.Direction.ASC, ProductDiscontinueKey.ITEM_CODE_SORT_FIELD), new Sort.Order(Sort.Direction.ASC, ProductDiscontinueKey.ITEM_TYPE_SORT_FIELD) ); } /** * Returns a sort order of UPC, product ID, item code, item type. * * @param direction The direction the sort should be in. * @return A sort sort order of UPC, product ID, item code, item type. */ public static Sort getSortByUpc(Sort.Direction direction) { if (direction.equals(Sort.Direction.ASC)) { return ProductDiscontinueKey.getDefaultSort(); } else { return new Sort( new Sort.Order(direction, ProductDiscontinueKey.UPC_SORT_FIELD), new Sort.Order(direction, ProductDiscontinueKey.PRODUCT_ID_SORT_FIELD), new Sort.Order(direction, ProductDiscontinueKey.ITEM_CODE_SORT_FIELD), new Sort.Order(direction, ProductDiscontinueKey.ITEM_TYPE_SORT_FIELD) ); } } /** * Returns a sort order of item code, UPC, product ID, item type. * * @param direction The direction the sort should be in. * @return A sort order of item code, UPC, product ID, item type. */ public static Sort getSortByItemCode(Sort.Direction direction) { return new Sort( new Sort.Order(direction, ProductDiscontinueKey.ITEM_CODE_SORT_FIELD), new Sort.Order(direction, ProductDiscontinueKey.UPC_SORT_FIELD), new Sort.Order(direction, ProductDiscontinueKey.PRODUCT_ID_SORT_FIELD), new Sort.Order(direction, ProductDiscontinueKey.ITEM_TYPE_SORT_FIELD) ); } }
[ "tran.than@heb.com" ]
tran.than@heb.com
774d3683fd1e968ebb48683141fcd8557848f005
8036c74d352a082179d98dfe396ddcf48251cdf1
/Ex_LetsTalk/srcCORBA/uff/ic/letstalk/corbaObjects/scs/ComponentDescriptionHelper.java
09645cb6bf27871e444aa44f8ca249bdb7e66c54
[]
no_license
nilsonld/lleme
085c0dd3f5a246f492fab4e64d01ebe1451ae216
831a2e167881f3ccb0f6730bc4ccf7382410fa33
refs/heads/master
2020-03-08T01:52:47.844201
2018-04-02T16:16:21
2018-04-02T16:16:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,156
java
package uff.ic.letstalk.corbaObjects.scs; /** * corbaObjects/scs/ComponentDescriptionHelper.java . Generated by the * IDL-to-Java compiler (portable), version "3.2" from deployment.idl * Sexta-feira, 9 de Dezembro de 2005 18h26min28s BRST */ abstract public class ComponentDescriptionHelper { private static String _id = "IDL:corbaObjects/scs/ComponentDescription/ComponentDescription:1.0"; public static void insert(org.omg.CORBA.Any a, uff.ic.letstalk.corbaObjects.scs.ComponentDescription that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); a.type(type()); write(out, that); a.read_value(out.create_input_stream(), type()); } public static uff.ic.letstalk.corbaObjects.scs.ComponentDescription extract( org.omg.CORBA.Any a) { return read(a.create_input_stream()); } private static org.omg.CORBA.TypeCode __typeCode = null; private static boolean __active = false; synchronized public static org.omg.CORBA.TypeCode type() { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init() .create_recursive_tc(_id); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[4]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = uff.ic.letstalk.corbaObjects.scs.ComponentIdHelper.type(); _members0[0] = new org.omg.CORBA.StructMember("id", _tcOf_members0, null); _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc( 0); _members0[1] = new org.omg.CORBA.StructMember( "entry_point", _tcOf_members0, null); _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc( org.omg.CORBA.TCKind.tk_boolean); _members0[2] = new org.omg.CORBA.StructMember("shared", _tcOf_members0, null); _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc( 0); _members0[3] = new org.omg.CORBA.StructMember("help_info", _tcOf_members0, null); __typeCode = org.omg.CORBA.ORB.init().create_struct_tc(uff.ic.letstalk.corbaObjects.scs.ComponentDescriptionHelper.id(), "ComponentDescription", _members0); __active = false; } } } return __typeCode; } public static String id() { return _id; } public static uff.ic.letstalk.corbaObjects.scs.ComponentDescription read( org.omg.CORBA.portable.InputStream istream) { uff.ic.letstalk.corbaObjects.scs.ComponentDescription value = new uff.ic.letstalk.corbaObjects.scs.ComponentDescription(); value.id = uff.ic.letstalk.corbaObjects.scs.ComponentIdHelper.read(istream); value.entry_point = istream.read_string(); value.shared = istream.read_boolean(); value.help_info = istream.read_string(); return value; } public static void write(org.omg.CORBA.portable.OutputStream ostream, uff.ic.letstalk.corbaObjects.scs.ComponentDescription value) { uff.ic.letstalk.corbaObjects.scs.ComponentIdHelper.write(ostream, value.id); ostream.write_string(value.entry_point); ostream.write_boolean(value.shared); ostream.write_string(value.help_info); } }
[ "lapaesleme@gmail.com" ]
lapaesleme@gmail.com
53d5b092fe14ddcfb4586c9651db824ab8b79618
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project43/src/main/java/org/gradle/test/performance43_4/Production43_378.java
48913cc9d382e827f738f78d26252e46a4711b20
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance43_4; public class Production43_378 extends org.gradle.test.performance14_4.Production14_378 { private final String property; public Production43_378() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
26d973b3ca2abc367170f0bc45e56394cc59ecd9
837a002eb1f53ac2f0d5e1194137a4a097bc113f
/webapp/wms/WEB-INF/src/jp/co/daifuku/wms/asrs/tool/location/HardZone.java
e547101009c6118868a8511b5d67c3cf217aae64
[]
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
6,703
java
// $Id: HardZone.java,v 1.2 2006/10/30 02:33:25 suresh Exp $ package jp.co.daifuku.wms.asrs.tool.location ; //#CM49511 /* * Copyright 2000-2001 DAIFUKU Co.,Ltd. All Rights Reserved. * * This software is the proprietary information of DAIFUKU Co.,Ltd. * Use is subject to license terms. */ import jp.co.daifuku.wms.asrs.tool.common.ToolEntity; import jp.co.daifuku.common.MessageResource; //#CM49512 /**<en> * This class is used to control the hard zones of locations. * Storage zone will be determined based on the entered data such as load height, etc. * It is possible to define just one zone per location. * Also it is possible to keep the prioritized location order, e.g., small load -> medium load -> large. * <BR> * <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0"> * <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD>Date</TD><TD>Name</TD><TD>Comment</TD></TR> * <TR><TD>2001/05/11</TD><TD>K.Mori</TD><TD>created this class</TD></TR> * </TABLE> * <BR> * @version $Revision: 1.2 $, $Date: 2006/10/30 02:33:25 $ * @author $Author: suresh $ </en>*/ public class HardZone extends ToolEntity { //#CM49513 // Class fields -------------------------------------------------- //#CM49514 // Class variables ----------------------------------------------- //#CM49515 /**<en> * Hard zone no. </en>*/ protected int wHardZoneID ; //#CM49516 /**<en> * Name of the hard zone </en>*/ protected String wName ; //#CM49517 /**<en> * Warehouse no. that the station belongs to </en>*/ protected String wWareHouseStationNumber ; //#CM49518 /**<en> * Load height </en>*/ protected int wHeight = 0; //#CM49519 /**<en> * Priority in hard zone operation </en>*/ protected String wPriority ; //#CM49520 /**<en> * starting bank </en>*/ protected int wStartBank = 0; //#CM49521 /**<en> * starting bay </en>*/ protected int wStartBay = 0; //#CM49522 /**<en> * starting level </en>*/ protected int wStartLevel = 0; //#CM49523 /**<en> * ending bank </en>*/ protected int wEndBank = 0; //#CM49524 /**<en> * ending bay </en>*/ protected int wEndBay = 0; //#CM49525 /**<en> * ending level </en>*/ protected int wEndLevel = 0; //#CM49526 /**<en> * Delimiter * This is the delimiter of the parameter for MessageDef when Exception occured. </en>*/ public String wDelim = MessageResource.DELIM ; //#CM49527 // Class method -------------------------------------------------- //#CM49528 /**<en> * Returns the version of this class. * @return Version and the date </en>*/ public static String getVersion() { return ("$Revision: 1.2 $,$Date: 2006/10/30 02:33:25 $") ; } //#CM49529 // Constructors -------------------------------------------------- //#CM49530 /**<en> * Construct new <CODE>HardZone</CODE>. </en>*/ public HardZone() { } //#CM49531 // Public methods ------------------------------------------------ //#CM49532 /**<en> * Set the hard zone ID. * @param hz :hard zone ID </en>*/ public void setHardZoneID(int hz) { wHardZoneID = hz; } //#CM49533 /**<en> * Retrieve the hard zone ID. * @return :hard zone ID </en>*/ public int getHardZoneID() { return wHardZoneID; } //#CM49534 /**<en> * Set the name of the hard zone. * @param nam :name of the hard zone </en>*/ public void setName(String nam) { wName = nam; } //#CM49535 /**<en> * Retrieve name of the hard zone. * @return :name of the hard zone </en>*/ public String getName() { return wName; } //#CM49536 /**<en> * Set the warehouse no. this zone belongs to. * @param whnum :warehouse no. </en>*/ public void setWareHouseStationNumber(String whnum) { wWareHouseStationNumber = whnum; } //#CM49537 /**<en> * Retrieve the warehouse no. this zone belongs to. * @return :warehouse no. </en>*/ public String getWareHouseStationNumber() { return wWareHouseStationNumber; } //#CM49538 /**<en> * Set the load height of the hard zone. * @param hgt :the load height to set </en>*/ public void setHeight(int hgt) { wHeight = hgt ; } //#CM49539 /**<en> * Retrieve the load height of hard zone. * @return :the load height </en>*/ public int getHeight() { return wHeight ; } //#CM49540 /**<en> * Set the priority of hard zone search. * @param pri :the priority of hard zone search </en>*/ public void setPriority(String pri) { wPriority = pri ; } //#CM49541 /**<en> * Retrieve the priority of hard zone search. * @return :the priority of hard zone search </en>*/ public String getPriority() { return wPriority ; } //#CM49542 /**<en> * Set the startinging bank. * @param sbnk :starting bank. </en>*/ public void setStartBank(int sbnk) { wStartBank = sbnk ; } //#CM49543 /**<en> * Retrieve the starting bank. * @return :starting bank </en>*/ public int getStartBank() { return wStartBank ; } //#CM49544 /**<en> * Sest teh starting bay. * @param sbay :starting bay </en>*/ public void setStartBay(int sbay) { wStartBay = sbay ; } //#CM49545 /**<en> * Retrieve the starting bay. * @return :starting bay </en>*/ public int getStartBay() { return wStartBay ; } //#CM49546 /**<en> * Set the starting level. * @param slvl :starting level </en>*/ public void setStartLevel(int slvl) { wStartLevel = slvl ; } //#CM49547 /**<en> * Retrieve the starting level. * @return :starting level </en>*/ public int getStartLevel() { return wStartLevel ; } //#CM49548 /**<en> * Set the ending bank. * @param ebnk :the ending bank </en>*/ public void setEndBank(int ebnk) { wEndBank = ebnk ; } //#CM49549 /**<en> * Retrieve the ending bank. * @return :the ending bank </en>*/ public int getEndBank() { return wEndBank ; } //#CM49550 /**<en> * Set the ending bay. * @param ebay :the ending bay </en>*/ public void setEndBay(int ebay) { wEndBay = ebay ; } //#CM49551 /**<en> * Retrieve the ending bay. * @return :the ending bay </en>*/ public int getEndBay() { return wEndBay ; } //#CM49552 /**<en> * Set the ending level. * @param elvl :the ending level </en>*/ public void setEndLevel(int elvl) { wEndLevel = elvl ; } //#CM49553 /**<en> * Retrieve the ending level. * @return :the ending level </en>*/ public int getEndLevel() { return wEndLevel ; } //#CM49554 // Package methods ----------------------------------------------- //#CM49555 // Protected methods --------------------------------------------- //#CM49556 // Private methods ----------------------------------------------- } //#CM49557 //end of class
[ "yutao81@live.cn" ]
yutao81@live.cn
91b469a51aad9713d84224319e6db35af6ce7429
d290068445663f66fbed94785cd6ad62c03f55b1
/src/main/java/com/imagelab/view/forms/ScharrDerivationPropertiesForm.java
58bc1dd7dd1649e273e13a1f98907e9078f3df13
[ "Apache-2.0" ]
permissive
polahano/imagelab
3076d02e7ac4df69999046c7c53876b0352e2127
7393dabe9390183eacae3942e6627d5dbb499f79
refs/heads/master
2023-07-28T13:36:24.802293
2021-09-17T11:48:57
2021-09-17T11:48:57
391,766,312
2
0
Apache-2.0
2021-08-20T15:08:44
2021-08-01T23:51:25
Java
UTF-8
Java
false
false
3,779
java
package com.imagelab.view.forms; import com.imagelab.operator.sobelderivation.ScharrOperator; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.scene.control.Label; import javafx.scene.control.ToggleGroup; import javafx.scene.control.RadioButton; import javafx.scene.control.Slider; import javafx.scene.layout.VBox; public class ScharrDerivationPropertiesForm extends AbstractPropertiesForm{ public ScharrDerivationPropertiesForm(ScharrOperator operator) { //Scharr title container. PropertiesFormTitleContainer ScharrTitleContainer; ScharrTitleContainer = new PropertiesFormTitleContainer("Scharr Dervation"); //Scharr Container VBox typeContainer = new VBox(); typeContainer.setPrefWidth(205.0); typeContainer.setSpacing(10); //Different ColorMaps Choices. ToggleGroup scharr_type = new ToggleGroup(); RadioButton r1 = new RadioButton("HORIZONTAL"); RadioButton r2 = new RadioButton("VERTICAL"); r1.setToggleGroup(scharr_type); r2.setToggleGroup(scharr_type); // scharr container1 VBox typeContainer1 = new VBox(r1,r2); typeContainer1.setPrefWidth(205.0); typeContainer1.setSpacing(7); r1.setSelected(true); scharr_type.selectedToggleProperty().addListener((observable, oldValue, newValue) -> { RadioButton selectedRadioButton = (RadioButton) newValue; selectedRadioButton.setSelected(true); String toggleGroupValue = selectedRadioButton.getText(); // Pass the value to Controller switch(toggleGroupValue) { case "HORIZONTAL" : operator.setType(1);break; case "VERTICAL" : operator.setType(2);break; } }); //depth VBox depthSliderContainer = new VBox(); depthSliderContainer.setPrefWidth(205.0); depthSliderContainer.setSpacing(10); Label lblDepthSlider = new Label("Depth :"); Slider depthSlider = new Slider(); depthSlider.setMin(-10); depthSlider.setMax(10); depthSlider.setValue(-1); // enable TickLabels and Tick Marks depthSlider.setShowTickLabels(true); depthSlider.setShowTickMarks(true); depthSlider.setBlockIncrement(1); // Adding Listener to value property. depthSlider.valueProperty().addListener(new ChangeListener<Number>() { @Override public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) { // TODO Auto-generated method stub lblDepthSlider.setText(String.format("Depth : %d units", (int)newValue.doubleValue())); operator.setDepth((int)newValue.doubleValue()); } }); depthSliderContainer.getChildren().addAll(lblDepthSlider, depthSlider); //Space container VBox spaceContainer = new VBox(); spaceContainer.setPrefWidth(205.0); spaceContainer.setSpacing(10); Label lblSpaceOne = new Label(""); Label lblSpaceTwo = new Label(""); spaceContainer.getChildren().addAll(lblSpaceOne, lblSpaceTwo); VBox scharrPropertiesContainer = new VBox(); scharrPropertiesContainer.setPrefSize(205, 47); scharrPropertiesContainer.setSpacing(20); scharrPropertiesContainer.setLayoutX(14); scharrPropertiesContainer.setLayoutY(14); scharrPropertiesContainer.getChildren().addAll( ScharrTitleContainer, typeContainer, typeContainer1, depthSliderContainer, spaceContainer ); getChildren().addAll(scharrPropertiesContainer); } }
[ "oshan.ivantha@gmail.com" ]
oshan.ivantha@gmail.com
70a70ae4d8a14f3d3d120a1a93a17751aad1a8c7
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/dji/component/flysafe/unlock/model/AccountStateBeforeUnlock.java
7548635ef71cdd8ab6dc3315a91dd20e933e194d
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
264
java
package dji.component.flysafe.unlock.model; public enum AccountStateBeforeUnlock { CURRENT_UAV_LICENSE_TOO_MORE, CURRENT_UAV_FIRMWARE_VERSION_TOO_LOW, CURRENT_UAV_LICENSE_STATE_OK, ACCOUNT_NOT_VERIFY, ALLOW_TO_UNLOCK, SERVER_RESULT_FAIL }
[ "michael@districtrace.com" ]
michael@districtrace.com
2c8a205afc83f8f1afdc7a63a4118fd5493028f7
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2019/4/ServiceAnnotationProcessorTest.java
930cca9395662d5882b0c751264ffd64c0da0bdb
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
4,017
java
/* * Copyright (c) 2002-2019 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j Enterprise Edition. The included source * code can be redistributed and/or modified under the terms of the * GNU AFFERO GENERAL PUBLIC LICENSE Version 3 * (http://www.fsf.org/licensing/licenses/agpl-3.0.html) with the * Commons Clause, as found in the associated LICENSE.txt file. * * 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 Affero General Public License for more details. * * Neo4j object code can be licensed independently from the source * under separate terms from the AGPL. Inquiries can be directed to: * licensing@neo4j.com * * More information is also available at: * https://neo4j.com/licensing/ */ package org.neo4j.annotations.service; import org.junit.jupiter.api.Test; import static com.google.testing.compile.JavaFileObjects.forResource; import static com.google.testing.compile.JavaSourcesSubject.assertThat; import static javax.tools.StandardLocation.CLASS_OUTPUT; class ServiceAnnotationProcessorTest { @Test void providersWithDistinctServiceKeys() { assertThat( forResource( "org/neo4j/annotations/service/FooService.java" ), forResource( "org/neo4j/annotations/service/AbstractFooService.java" ), forResource( "org/neo4j/annotations/service/FooServiceImplA.java" ), forResource( "org/neo4j/annotations/service/FooServiceImplB.java" ) ) .processedWith( new ServiceAnnotationProcessor() ) .compilesWithoutError() .and() .generatesFileNamed( CLASS_OUTPUT, "", "META-INF/services/org.neo4j.annotations.service.FooService" ) .and() .generatesFiles( forResource( "META-INF/services/org.neo4j.annotations.service.FooService" ) ); } @Test void classIsBothServiceAndProvider() { assertThat( forResource( "org/neo4j/annotations/service/ClassIsServiceAndProvider.java" ) ) .processedWith( new ServiceAnnotationProcessor() ) .compilesWithoutError() .and() .generatesFileNamed( CLASS_OUTPUT, "", "META-INF/services/org.neo4j.annotations.service.ClassIsServiceAndProvider" ) .and() .generatesFiles( forResource( "META-INF/services/org.neo4j.annotations.service.ClassIsServiceAndProvider" ) ); } @Test void nestedTypes() { assertThat( forResource( "org/neo4j/annotations/service/Nested.java" ) ) .processedWith( new ServiceAnnotationProcessor() ) .compilesWithoutError() .and() .generatesFileNamed( CLASS_OUTPUT, "", "META-INF/services/org.neo4j.annotations.service.Nested$NestedService" ) .and() .generatesFiles( forResource( "META-INF/services/org.neo4j.annotations.service.Nested$NestedService" ) ); } @Test void failMultipleServiceAscendants() { assertThat( forResource( "org/neo4j/annotations/service/FailMultipleServices.java" ) ) .processedWith( new ServiceAnnotationProcessor() ) .failsToCompile() .withErrorContaining( "multiple ascendants annotated with @Service" ); } @Test void failProviderDoesntImplementService() { assertThat( forResource( "org/neo4j/annotations/service/FailNotService.java" ) ) .processedWith( new ServiceAnnotationProcessor() ) .failsToCompile() .withErrorContaining( "neither has ascendants nor itself annotated with @Service" ); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
fce75fd0bd0e0e184225c4228e318fbca4a92a6b
32cb631a10f49a28f6a6d94242ed79f5d0f0e0a3
/yudachi-leadnews-article/src/main/java/com/yudachi/article/service/impl/AppHotArticleServiceImpl.java
27d685814001cd9894dbc247018df3574e5300cc
[]
no_license
xll-Yudachi/Yudachi-leadnews
c078123795d9e3d1fe02f83fc99b818c480e6f79
0f9333f8b6611cb8ee8e4c0b27afd0755f9474a0
refs/heads/master
2022-10-20T01:01:26.039417
2020-03-06T11:50:43
2020-03-06T11:50:43
245,406,741
3
0
null
2022-10-05T18:21:20
2020-03-06T11:50:25
Java
UTF-8
Java
false
false
5,771
java
package com.yudachi.article.service.impl; import com.alibaba.fastjson.JSON; import com.google.common.collect.Lists; import com.yudachi.article.service.AppHotArticleService; import com.yudachi.common.common.article.constans.ArticleConstans; import com.yudachi.common.kafka.KafkaSender; import com.yudachi.model.admin.pojos.AdChannel; import com.yudachi.model.article.pojos.ApArticle; import com.yudachi.model.article.pojos.ApHotArticles; import com.yudachi.model.behavior.pojos.ApBehaviorEntry; import com.yudachi.model.mappers.admin.AdChannelMapper; import com.yudachi.model.mappers.app.ApArticleMapper; import com.yudachi.model.mappers.app.ApBehaviorEntryMapper; import com.yudachi.model.mappers.app.ApHotArticlesMapper; import org.joda.time.DateTime; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; import java.util.Comparator; import java.util.Date; import java.util.List; import java.util.stream.Collectors; @Service @SuppressWarnings("all") public class AppHotArticleServiceImpl implements AppHotArticleService { @Autowired private ApHotArticlesMapper apHotArticlesMapper; @Autowired private ApArticleMapper apArticleMapper; @Autowired private ApBehaviorEntryMapper apBehaviorEntryMapper; @Autowired private AdChannelMapper adChannelMapper; @Autowired private StringRedisTemplate redisTemplate; @Autowired private KafkaSender kafkaSender; @Override public void computeHotArticle() { // 获取前一天文章列表 String lastDay = DateTime.now().minusDays(1).toString("yyyy-MM-dd 00:00:00"); List<ApArticle> articleList = apArticleMapper.loadLastArticleForHot(lastDay); //计算逻辑 List<ApHotArticles> hotArticlesList = computeHotArticle(articleList); //缓存频道到redis cacheTagToRedis(articleList); //给每一个用户添加一份热点文章 List<ApBehaviorEntry> entryList = apBehaviorEntryMapper.selectAllEntry(); for(ApHotArticles hot : hotArticlesList){ //插入热文章数据 apHotArticlesMapper.insert(hot); //为每位用户保存一份 saveHotArticleForEntryList(hot, entryList); //缓存文章中的图片 kafkaSender.sendHotArticleMessage(hot); } } /** * 计算热文章 * @param articleList * @return */ private List<ApHotArticles> computeHotArticle(List<ApArticle> articleList) { List<ApHotArticles> hotArticlesList = Lists.newArrayList(); ApHotArticles hot = null; for (ApArticle a : articleList) { hot = initHotBaseApArticle(a); Integer score = computeScore(a); hot.setScore(score); hotArticlesList.add(hot); } hotArticlesList.sort(new Comparator<ApHotArticles>() { @Override public int compare(ApHotArticles o1, ApHotArticles o2) { return o1.getScore() < o2.getScore() ? 1 : -1; } }); if(hotArticlesList.size()>1000){ return hotArticlesList.subList(0,1000); } return hotArticlesList; } /** * 初始化热文章属性 * @param article * @return */ private ApHotArticles initHotBaseApArticle(ApArticle article){ ApHotArticles hot = new ApHotArticles(); hot.setEntryId(0); //根据articleID查询 hot.setTagId(article.getChannelId()); hot.setTagName(article.getChannelName()); hot.setScore(0); hot.setArticleId(article.getId()); //设置省市区 hot.setProvinceId(article.getProvinceId()); hot.setCityId(article.getCityId()); hot.setCountyId(article.getCountyId()); hot.setIsRead(0); //日期 hot.setReleaseDate(article.getPublishTime()); hot.setCreatedTime(new Date()); return hot; } /** * 计算热度分规则 1.0 * @param a * @return */ private Integer computeScore(ApArticle a) { Integer score = 0; if(a.getLikes()!=null){ score += a.getLikes(); } if(a.getCollection()!=null){ score += a.getCollection(); } if(a.getComment()!=null){ score += a.getComment(); } if(a.getViews()!=null){ score += a.getViews(); } return score; } /** * 为每位用户保存一份 * @param hot * @param entryList */ private void saveHotArticleForEntryList(ApHotArticles hot, List<ApBehaviorEntry> entryList) { for (ApBehaviorEntry entry: entryList){ hot.setEntryId(entry.getId()); apHotArticlesMapper.insert(hot); } } /** * 缓存频道首页到redis * @param articlesList */ private void cacheTagToRedis(List<ApArticle> articlesList) { List<AdChannel> channels = adChannelMapper.selectAll(); List<ApArticle> temp = null; for (AdChannel channel : channels){ temp = articlesList.stream(). filter(p -> p.getChannelId().equals(channel.getId())) .collect(Collectors.toList()); if(temp.size()>30){ temp = temp.subList(0,30); } if(temp.size()==0){ redisTemplate.opsForValue().set(ArticleConstans.HOT_ARTICLE_FIRST_PAGE + channel.getId(), ""); continue; } redisTemplate.opsForValue().set(ArticleConstans.HOT_ARTICLE_FIRST_PAGE + channel.getId(), JSON.toJSONString(temp)); } } }
[ "452419829@qq.com" ]
452419829@qq.com
4970767ad33929940cf048bc2df3af712fc7f19d
b9bb53905f7817bd6a530a3c1785a9c33393fa6d
/src/main/java/com/bingo/code/example/design/abstractfactory/rewrite/Schema1.java
25e2f6d02de5bca1d54b34f7ed8008ccf015612a
[]
no_license
namjagbrawa/code-example
34827b24e9badc2f6b828951238736e5459dfab8
a48ca7a981ebb1ac21e07091f586b757a51447c1
refs/heads/master
2021-01-22T13:30:11.262039
2019-03-16T15:56:38
2019-03-16T15:56:38
100,659,751
0
0
null
null
null
null
UTF-8
Java
false
false
258
java
package com.bingo.code.example.design.abstractfactory.rewrite; public class Schema1 implements AbstractFactory{ public CPUApi createCPUApi() { return new IntelCPU(1156); } public MainboardApi createMainboardApi() { return new GAMainboard(1156); } }
[ "namjagbrawa@126.com" ]
namjagbrawa@126.com
fd1b4eb8b752237719748d0b67c406ec003147ba
9e50d3e4b3ac25340064d02cb9b13d864f38a97f
/src/test/java/ua/com/vetal/service/ManagerServiceImplTest.java
77b0ffafeba8c43a4b83baf822dd11875f873f3f
[]
no_license
AnGo84/Vetal
1e9a14058125cc38bc56e8d6757f03c3ffee066b
058ab65bbf58ab48df59f7aaf2ed727d5a8a557f
refs/heads/master
2022-10-04T13:09:49.893740
2021-10-13T21:27:57
2021-10-13T21:27:57
142,024,419
2
0
null
2022-09-01T23:24:41
2018-07-23T14:17:45
Java
UTF-8
Java
false
false
3,850
java
package ua.com.vetal.service; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.dao.EmptyResultDataAccessException; import ua.com.vetal.TestBuildersUtils; import ua.com.vetal.entity.Manager; import ua.com.vetal.exception.EntityException; import ua.com.vetal.repositories.ManagerRepository; import java.util.Arrays; import java.util.List; import java.util.Optional; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.Mockito.*; @SpringBootTest public class ManagerServiceImplTest { @Autowired private ManagerServiceImpl managerService; @MockBean private ManagerRepository mockManagerRepository; private Manager manager; @BeforeEach public void beforeEach() { manager = TestBuildersUtils.getManager(null, "firstName", "lastName", "middleName", "email"); } @Test void whenFindById_thenReturnManager() { when(mockManagerRepository.findById(1L)).thenReturn(Optional.of(manager)); long id = 1; Manager found = managerService.get(id); assertNotNull(found); assertEquals(found.getId(), manager.getId()); assertEquals(found.getFirstName(), manager.getFirstName()); assertEquals(found.getLastName(), manager.getLastName()); assertEquals(found.getMiddleName(), manager.getMiddleName()); assertEquals(found.getPhone(), manager.getPhone()); } @Test void whenFindById_thenReturnNull() { when(mockManagerRepository.findById(1L)).thenReturn(Optional.of(manager)); long id = 2; Manager found = managerService.get(id); assertNull(found); } @Test void whenSaveObject_thenSuccess() { Manager newManager = TestBuildersUtils.getManager(null, "firstName2", "lastName2", "middleName2", "email2"); managerService.save(newManager); verify(mockManagerRepository, times(1)).save(newManager); } @Test void whenSaveObject_thenNPE() { when(mockManagerRepository.save(any(Manager.class))).thenThrow(NullPointerException.class); assertThrows(NullPointerException.class, () -> { managerService.save(manager); }); } @Test void whenUpdateObject_thenSuccess() { manager.setLastName("corpName2"); managerService.update(manager); verify(mockManagerRepository, times(1)).save(manager); } @Test void whenUpdateObject_thenThrowNPE() { when(mockManagerRepository.save(any(Manager.class))).thenThrow(NullPointerException.class); assertThrows(NullPointerException.class, () -> { managerService.update(manager); }); } @Test void whenDeleteById_thenSuccess() { manager.setId(1L); when(mockManagerRepository.findById(1L)).thenReturn(Optional.of(manager)); managerService.deleteById(1l); verify(mockManagerRepository, times(1)).deleteById(1l); } @Test void whenDeleteById_thenThrowEmptyResultDataAccessException() { doThrow(new EmptyResultDataAccessException(0)).when(mockManagerRepository).deleteById(anyLong()); assertThrows(EntityException.class, () -> { managerService.deleteById(1000000l); }); } @Test void findAllObjects() { when(mockManagerRepository.findAll()).thenReturn(Arrays.asList(manager)); List<Manager> objects = managerService.getAll(); assertNotNull(objects); assertFalse(objects.isEmpty()); assertEquals(objects.size(), 1); } @Test void isObjectExist() { assertFalse(managerService.isExist(null)); manager.setId(1L); when(mockManagerRepository.findById(1L)).thenReturn(Optional.of(manager)); assertTrue(managerService.isExist(manager)); when(mockManagerRepository.findById(anyLong())).thenReturn(Optional.empty()); assertFalse(managerService.isExist(manager)); } }
[ "ango1984@gmail.com" ]
ango1984@gmail.com
e1492de8fe178ed9e2818e352657652e6d5d1614
a8da06c192cbe6c46a7b15ac2d43d177da620b96
/LearnRocketMQ/code/trade-system/trade-dao/src/main/java/com/lujiahao/trade/dao/entity/TradeGoodsNumberLog.java
26794e484689c6b1e82315afaf825f5816a0c2ee
[ "MIT" ]
permissive
lujiahao0708/LearnSeries
e087d6c6346ea44b93e26502802b8ce0ee1890a7
24e72ee75710c71c66450dab781d9b6405625e7e
refs/heads/master
2022-11-04T16:57:30.416850
2021-09-24T06:35:17
2021-09-24T06:35:17
134,929,303
16
11
MIT
2022-10-12T20:29:27
2018-05-26T04:31:50
Java
UTF-8
Java
false
false
867
java
package com.lujiahao.trade.dao.entity; import java.util.Date; public class TradeGoodsNumberLog { private Integer goodsId; private String orderId; private Integer goodsNumber; private Date logTime; public Integer getGoodsId() { return goodsId; } public void setGoodsId(Integer goodsId) { this.goodsId = goodsId; } public String getOrderId() { return orderId; } public void setOrderId(String orderId) { this.orderId = orderId == null ? null : orderId.trim(); } public Integer getGoodsNumber() { return goodsNumber; } public void setGoodsNumber(Integer goodsNumber) { this.goodsNumber = goodsNumber; } public Date getLogTime() { return logTime; } public void setLogTime(Date logTime) { this.logTime = logTime; } }
[ "lujiahao0708@gmail.com" ]
lujiahao0708@gmail.com
de6852633c284209b81ac980d3171883623c7401
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project385/src/main/java/org/gradle/test/performance/largejavamultiproject/project385/p1928/Production38564.java
5d8d553542d42a871a3ca8e335cd2015fd4c79a7
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,971
java
package org.gradle.test.performance.largejavamultiproject.project385.p1928; public class Production38564 { private Production38561 property0; public Production38561 getProperty0() { return property0; } public void setProperty0(Production38561 value) { property0 = value; } private Production38562 property1; public Production38562 getProperty1() { return property1; } public void setProperty1(Production38562 value) { property1 = value; } private Production38563 property2; public Production38563 getProperty2() { return property2; } public void setProperty2(Production38563 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
5b9c8ae4382873ebccb9bc8709c5dfd03d2131ba
ba3bf48f5055fabcf066f3597d8a0325d89f86a6
/dameng/hazelcast-persistence/.svn/pristine/5b/5b9c8ae4382873ebccb9bc8709c5dfd03d2131ba.svn-base
0fed2cd4f7f5f1399f9709659dcf213cc6c55056
[]
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
2,061
/* * 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.queue.tx; import com.hazelcast.nio.ObjectDataInput; import com.hazelcast.nio.ObjectDataOutput; import com.hazelcast.queue.QueueDataSerializerHook; import com.hazelcast.queue.QueueOperation; import com.hazelcast.spi.BackupOperation; import java.io.IOException; /** * @ali 3/27/13 */ public class TxnPrepareBackupOperation extends QueueOperation implements BackupOperation { long itemId; boolean pollOperation; public TxnPrepareBackupOperation() { } public TxnPrepareBackupOperation(String name, long itemId, boolean pollOperation) { super(name); this.itemId = itemId; this.pollOperation = pollOperation; } public void run() throws Exception { if (pollOperation){ response = getOrCreateContainer().txnPollBackupReserve(itemId); } else { getOrCreateContainer().txnOfferBackupReserve(itemId); response = true; } } protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); out.writeLong(itemId); out.writeBoolean(pollOperation); } protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); itemId = in.readLong(); pollOperation = in.readBoolean(); } public int getId() { return QueueDataSerializerHook.TXN_PREPARE_BACKUP; } }
[ "duansky22@163.com" ]
duansky22@163.com
1440b5b579deb9b809fa854d0bd00dafec1b05c3
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/btimofeev_UniPatcher/app/src/test/java/org/emunix/unipatcher/patcher/BPSTest.java
637e46fdebcde0f2ecaff6ad1e1c337bc79a20b1
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,878
java
// isComment package org.emunix.unipatcher.patcher; import android.content.Context; import org.apache.commons.io.FileUtils; import org.emunix.unipatcher.R; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import java.io.File; import java.io.IOException; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.Silent.class) public class isClassOrIsInterface { private static final String isVariable = "isStringConstant"; @Rule public TemporaryFolder isVariable = new TemporaryFolder(); @Mock Context isVariable; @Before public void isMethod() throws Exception { isMethod(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr)).isMethod(isNameExpr); } @Test public void isMethod() throws Exception { isMethod(isMethod("isStringConstant", "isStringConstant", "isStringConstant")); } private boolean isMethod(String isParameter, String isParameter, String isParameter) throws Exception { File isVariable = new File(this.isMethod().isMethod(isNameExpr).isMethod()); File isVariable = new File(isMethod().isMethod(isNameExpr).isMethod()); File isVariable = isNameExpr.isMethod("isStringConstant"); BPS isVariable = new BPS(isNameExpr, isNameExpr, isNameExpr, isNameExpr); try { isNameExpr.isMethod(true); } catch (PatchException | IOException isParameter) { isMethod("isStringConstant"); } File isVariable = new File(isMethod().isMethod(isNameExpr).isMethod()); return isNameExpr.isMethod(isNameExpr) == isNameExpr.isMethod(isNameExpr); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
029ec31d03201e128c14331b83fadbe8ec2553fc
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Jetty/Jetty6166.java
ef1107a868f3d87fa0e0ec27cea1f551b96173a3
[]
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
454
java
@Override public EventId decode(Reader reader) throws DecodeException, IOException { EventId id = new EventId(); try (BufferedReader buf = new BufferedReader(reader)) { String line; while ((line = buf.readLine()) != null) { id.eventId = Integer.parseInt(line); } } return id; }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
841d40e3add1008011fccdc43eb47423960a50cf
e6f0f4f837db96128a3fc4c76fec84b05b12900c
/pousse-cafe-spring-pulsar/src/main/java/poussecafe/spring/pulsar/SpringPulsarConfig.java
27ff3c18a841373205a52ccfbb3828d998406198
[ "Apache-2.0" ]
permissive
joshuayan/pousse-cafe
4447d0ac11e61d85a67092c9a5ceea665954845a
1c8ee3a08f1f85917ca766bcba462b8b2737f439
refs/heads/master
2020-05-26T08:38:58.786102
2019-05-16T14:44:11
2019-05-16T14:44:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,936
java
package poussecafe.spring.pulsar; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import poussecafe.pulsar.PublicationTopicChooser; import poussecafe.pulsar.PulsarMessaging; import poussecafe.pulsar.PulsarMessagingConfiguration; import static java.util.Arrays.asList; import static java.util.stream.Collectors.toList; @Configuration public class SpringPulsarConfig { @Bean public PulsarMessaging pulsarMessaging( @Value("${poussecafe.spring.pulsar.broker:pulsar://localhost:6650}") String brokerUrl, @Value("${poussecafe.spring.pulsar.subscriptionTopics:pousse-cafe}") String subscriptionTopics, @Value("${poussecafe.spring.pulsar.subscriptionName:pousse-cafe}") String subscriptionName, @Value("${poussecafe.spring.pulsar.defaultPublicationTopic:pousse-cafe}") String defaultPublicationTopic, @Autowired(required = false) PublicationTopicChooser publicationTopicChooser) { PulsarMessagingConfiguration.Builder configurationBuilder = new PulsarMessagingConfiguration.Builder() .brokerUrl(brokerUrl) .subscriptionTopics(parseSubscriptionTopics(subscriptionTopics)) .subscriptionName(subscriptionName) .defaultPublicationTopic(defaultPublicationTopic); if(publicationTopicChooser != null) { configurationBuilder.publicationTopicChooser(publicationTopicChooser); } return new PulsarMessaging(configurationBuilder.build()); } private List<String> parseSubscriptionTopics(String subscriptionTopics) { return asList(subscriptionTopics.split(",")).stream() .map(String::trim) .collect(toList()); } }
[ "g.dethier@gmail.com" ]
g.dethier@gmail.com
474052751bffb45f1a26dd218f74b0e889f52a62
828b5327357d0fb4cb8f3b4472f392f3b8b10328
/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/util/collections/ShortHashSet.java
1d7fa58ce0cc1056bb2082196868633859fa5e77
[ "CC-BY-3.0", "LicenseRef-scancode-unknown-license-reference", "Unlicense", "ISC", "MIT-0", "GPL-2.0-only", "BSD-2-Clause-Views", "OFL-1.1", "Apache-2.0", "LicenseRef-scancode-jdom", "GCC-exception-3.1", "MPL-2.0", "CC-PDDC", "AGPL-3.0-only", "MPL-2.0-no-copyleft-exception", "LicenseRef-scancode-public-domain", "LGPL-2.1-only", "BSD-2-Clause", "CDDL-1.1", "CDDL-1.0", "LicenseRef-scancode-other-permissive", "LicenseRef-scancode-proprietary-license", "BSD-3-Clause", "MIT", "EPL-1.0", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-free-unknown", "CC0-1.0", "Classpath-exception-2.0", "CC-BY-2.5" ]
permissive
Romance-Zhang/flink_tpc_ds_game
7e82d801ebd268d2c41c8e207a994700ed7d28c7
8202f33bed962b35c81c641a05de548cfef6025f
refs/heads/master
2022-11-06T13:24:44.451821
2019-09-27T09:22:29
2019-09-27T09:22:29
211,280,838
0
1
Apache-2.0
2022-10-06T07:11:45
2019-09-27T09:11:11
Java
UTF-8
Java
false
false
3,615
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.table.runtime.util.collections; import org.apache.flink.table.runtime.util.MurmurHashUtil; /** * Short hash set. */ public class ShortHashSet extends OptimizableHashSet { private short[] key; private short min = Short.MAX_VALUE; private short max = Short.MIN_VALUE; public ShortHashSet(final int expected, final float f) { super(expected, f); this.key = new short[this.n + 1]; } public ShortHashSet(final int expected) { this(expected, DEFAULT_LOAD_FACTOR); } public ShortHashSet() { this(DEFAULT_INITIAL_SIZE, DEFAULT_LOAD_FACTOR); } public boolean add(final short k) { if (k == 0) { if (this.containsZero) { return false; } this.containsZero = true; } else { short[] key = this.key; int pos; short curr; if ((curr = key[pos = MurmurHashUtil.fmix(k) & this.mask]) != 0) { if (curr == k) { return false; } while ((curr = key[pos = pos + 1 & this.mask]) != 0) { if (curr == k) { return false; } } } key[pos] = k; } if (this.size++ >= this.maxFill) { this.rehash(OptimizableHashSet.arraySize(this.size + 1, this.f)); } if (k < min) { min = k; } if (k > max) { max = k; } return true; } public boolean contains(final short k) { if (isDense) { return k >= min && k <= max && used[k - min]; } else { if (k == 0) { return this.containsZero; } else { short[] key = this.key; short curr; int pos; if ((curr = key[pos = MurmurHashUtil.fmix(k) & this.mask]) == 0) { return false; } else if (k == curr) { return true; } else { while ((curr = key[pos = pos + 1 & this.mask]) != 0) { if (k == curr) { return true; } } return false; } } } } private void rehash(final int newN) { short[] key = this.key; int mask = newN - 1; short[] newKey = new short[newN + 1]; int i = this.n; int pos; for (int j = this.realSize(); j-- != 0; newKey[pos] = key[i]) { do { --i; } while (key[i] == 0); if (newKey[pos = MurmurHashUtil.fmix(key[i]) & mask] != 0) { while (newKey[pos = pos + 1 & mask] != 0) {} } } this.n = newN; this.mask = mask; this.maxFill = OptimizableHashSet.maxFill(this.n, this.f); this.key = newKey; } @Override public void optimize() { int range = max - min; if (range >= 0 && (range < key.length || range < OptimizableHashSet.DENSE_THRESHOLD)) { this.used = new boolean[max - min + 1]; for (short v : key) { if (v != 0) { used[v - min] = true; } } if (containsZero) { used[-min] = true; } isDense = true; key = null; } } }
[ "1003761104@qq.com" ]
1003761104@qq.com
3b6f4d32e0773e48befb0038991f533837129ae8
ee2a51f827fd337e6dbb9b018f62cacd8e6399da
/Ch_4_1_Undirected_Graphs/Practise_4_1_21.java
1c1922f9aeb92fe967711c6e3ce0440d46190941
[]
no_license
pengzhetech/Algorithms
97eab98283575fdef46ad06549dcb29993bea132
c379ff6de3a10dfb1818e84a9ea2516876958288
refs/heads/master
2022-08-16T18:04:59.992353
2022-07-21T16:17:42
2022-07-21T16:17:42
261,119,609
0
0
null
2020-05-04T08:31:22
2020-05-04T08:31:21
null
UTF-8
Java
false
false
7,448
java
package Ch_4_1_Undirected_Graphs; import java.util.*; import java.util.Map.Entry; import java.util.regex.Pattern; import java.io.*; import java.util.regex.*; import edu.princeton.cs.algs4.StdOut; public class Practise_4_1_21 { static class Graph { public int V; public int E; private EG eg; public __Bag<Integer>[] adjs; private Pair[] tmpPairs; public Graph(int V) { this.V = V; eg = new EG(V); adjs = (__Bag<Integer>[])new __Bag[V]; for (int i = 0; i < V; i++) adjs[i] = new __Bag<Integer>(); } public int findRoot(int v, int edgeTo[]) { while (v != edgeTo[v]) v = edgeTo[v]; return v; } public int V() { return V; } public int E() { return E; } public void addEdge(int v, int w) { if (v == w || hasEdge(v, w)) return; adjs[v].add(w); adjs[w].add(v); E++; } boolean hasEdge(int v, int w) { return adjs[v].contains(w); } void genRandom(int edgeCount) { int i = 0, n = edgeCount; tmpPairs = new Pair[edgeCount]; while (edgeCount-- > 0) { tmpPairs[i] = eg.next(); addEdge(tmpPairs[i].v, tmpPairs[i].w); i++; } for (int j = 0; j < n; j++) StdOut.println(tmpPairs[j]); StdOut.println("-------------------"); } public Iterable<Integer> adjs(int v) { return adjs[v]; } public String toString() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < V; i++) sb.append(i + ": " + adjs[i].toString() + "\n"); return sb.toString(); } } /* 从 BaconKevin 到 $s 的距离 */ public static int[] BaconKevin(SymbolGraph SG, String s, boolean printPath) { boolean[] marked = new boolean[SG.G.V()]; int edgeTo[] = new int[SG.G.V()]; int disTo[] = new int[SG.G.V()]; for (int i = 0; i < SG.G.V(); i++) edgeTo[i] = i; if (s == null) s = "Kidman, Nicole"; /* BFS */ __Queue<Integer> Q = new __Queue<>(); int from = SG.index("Bacon, Kevin"), to = SG.index(s); int v = from; marked[v] = true; Q.enqueue(v); while (!Q.isEmpty()) { v = Q.dequeue(); for (int w : SG.G.adjs(v)) if (!marked[w]) { marked[w] = true; edgeTo[w] = v; disTo[w] = disTo[v] + 1; Q.enqueue(w); } } /* ⚠️⚠️⚠️⚠️ 排除掉不与 Bacon, Kevin 连通的演员 ⚠️⚠️⚠️⚠️⚠️ */ for (int i = 0; i < disTo.length; i++) { if (disTo[i] == 0) { if (SG.G.findRoot(i, edgeTo) != from) disTo[i] = -1; } } if (printPath) { /* 收集路径 */ __Stack<String> S = new __Stack<>(); for (int i = to; i != from; i = edgeTo[i]) S.push(SG.name(i)); S.push(SG.name(from)); /* 打印结果 */ StdOut.println(s); while (!S.isEmpty()) StdOut.println(" " + S.pop()); } return disTo; } static class SymbolGraph { private HashMap<String, Integer> ST; private String[] name; private Graph G; SymbolGraph(String filename, String delim, int y) { ST = new HashMap<String, Integer>(); ArrayList<String[]> allLines = new ArrayList<>(); File file = new File(filename); BufferedReader reader = null; int count = 0; try { reader = new BufferedReader(new FileReader(file)); String line = null; while ((line = reader.readLine()) != null) { String[] arr = line.split("/"); allLines.add(arr); for (int i = 0; i < arr.length; i++) { /* 电影 or 名字 -> 索引 */ if (!ST.containsKey(arr[i])) ST.put(arr[i], count++); } } reader.close(); } catch (IOException e) { e.printStackTrace(); } finally { if (reader != null) { try { reader.close(); } catch (IOException e1) { } } } /* 索引 -> 电影 or 名字 */ name = new String[ST.size()]; for (Entry<String, Integer> ent : ST.entrySet()) name[ent.getValue().intValue()] = ent.getKey(); /* 初始化图结构 */ G = new Graph(ST.size()); for (int i = 0; i < allLines.size(); i++) { String[] arr = allLines.get(i); String movie = arr[0]; /* 4.1.24 */ Matcher m = Pattern.compile("\\d{4}").matcher(movie); if (m.find()) if (Integer.parseInt(m.group(0)) > y) continue; for (int j = 1; j < arr.length; j++) G.addEdge(ST.get(movie), ST.get(arr[j])); } } public Graph G() { return G; } public String name(int v) { return name[v]; } public int index(String s) { return ST.get(s); } public boolean contains(String s) { return ST.containsKey(s); } } public static void main(String[] args) { /* 4.1.21 */ String path = "/Users/bot/Desktop/algs4-data/movies.txt"; SymbolGraph SG = new SymbolGraph(path, "/", 2002 /* 4.1.24 */); BaconKevin(SG, "Kidman, Nicole", true); BaconKevin(SG, "Grant, Cary", true); /* 4.1.22 画图的 API 不想用了...直接看数字吧 - -| */ int[] disTo = BaconKevin(SG, null, false); int count[] = new int[100]; for (int i = 0; i < disTo.length; i++) if (disTo[i] >= 0 && disTo[i] % 2 == 0) /* 演员和演员之间一定会有一个电影 */ count[disTo[i] / 2]++; for (int i = 0; i < count.length; i++) if (count[i] != 0) StdOut.printf("距 KevinBacon 距离为 %d 的演员有 %d 名\n", i, count[i]); } /* * output * * Kidman, Nicole Bacon, Kevin Animal House (1978) Sutherland, Donald (I) Cold Mountain (2003) Kidman, Nicole Grant, Cary Bacon, Kevin JFK (1991) Matthau, Walter Charade (1963) Grant, Cary 距 KevinBacon 距离为 0 的演员有 1 名 距 KevinBacon 距离为 1 的演员有 1324 名 距 KevinBacon 距离为 2 的演员有 70717 名 距 KevinBacon 距离为 3 的演员有 40862 名 距 KevinBacon 距离为 4 的演员有 1591 名 距 KevinBacon 距离为 5 的演员有 125 名 */ }
[ "yangxiaohei321123@163.com" ]
yangxiaohei321123@163.com
d89a85523a26fdd2bf79b45dbf238ad078ce0c2f
2e1a17b36e0ea310ece51adde5afeb3a8e03d309
/Chapter11/LinkedListRemoveDuplicates/src/main/java/coding/challenge/SinglyLinkedList.java
24215dc7c890f4e68bdf229493b1f99bde87df87
[ "MIT" ]
permissive
copley/The-Complete-Coding-Interview-Guide-in-Java
59cb808d87f1f99bfa30a6631837c1637d2ee573
1f589772a205368ec6634e0fcae6fe58e1130aee
refs/heads/master
2023-03-16T08:40:14.877164
2023-01-18T09:01:28
2023-01-18T09:01:28
257,846,324
0
0
null
2020-04-22T08:56:35
2020-04-22T08:56:34
null
UTF-8
Java
false
false
2,313
java
package coding.challenge; import java.util.HashSet; import java.util.Set; public final class SinglyLinkedList { private final class Node { private int data; private Node next; @Override public String toString() { return " " + data + " "; } } private Node head; private Node tail; private int size; public void insertFirst(int data) { Node newNode = new Node(); newNode.data = data; newNode.next = head; head = newNode; if (tail == null) { tail = newNode; } size++; } // O(n) solution (time and space) public void removeDuplicates1() { Set<Integer> dataSet = new HashSet<>(); Node currentNode = head; Node prevNode = null; while (currentNode != null) { if (dataSet.contains(currentNode.data)) { prevNode.next = currentNode.next; if (currentNode == tail) { tail = prevNode; } size--; } else { dataSet.add(currentNode.data); prevNode = currentNode; } currentNode = currentNode.next; } } // O(n^2) time, O(1) space public void removeDuplicates2() { Node currentNode = head; while (currentNode != null) { Node runnerNode = currentNode; while (runnerNode.next != null) { if (runnerNode.next.data == currentNode.data) { if (runnerNode.next == tail) { tail = runnerNode; } runnerNode.next = runnerNode.next.next; size--; } else { runnerNode = runnerNode.next; } } currentNode = currentNode.next; } } public void print() { System.out.println("\nHead (" + head + ") ----------> Last (" + tail + "):"); Node currentNode = head; while (currentNode != null) { System.out.print(currentNode); currentNode = currentNode.next; } System.out.println(); } public int size() { return size; } }
[ "leoprivacy@yahoo.com" ]
leoprivacy@yahoo.com
1de4f988a0a576ac1fad963194e5e61e333c1329
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
/packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
1be3e27f29e10121310787c2612d8e344c1787ba
[ "Apache-2.0", "LicenseRef-scancode-unicode" ]
permissive
Ankits-lab/frameworks_base
8a63f39a79965c87a84e80550926327dcafb40b7
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
refs/heads/main
2023-02-06T03:57:44.893590
2020-11-14T09:13:40
2020-11-14T09:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,353
java
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.systemui.doze; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.app.IWallpaperManager; import android.os.RemoteException; import androidx.test.filters.SmallTest; import com.android.systemui.SysuiTestCase; import com.android.systemui.statusbar.notification.stack.StackStateAnimator; import com.android.systemui.statusbar.phone.BiometricUnlockController; import com.android.systemui.statusbar.phone.DozeParameters; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @RunWith(JUnit4.class) @SmallTest public class DozeWallpaperStateTest extends SysuiTestCase { private DozeWallpaperState mDozeWallpaperState; @Mock IWallpaperManager mIWallpaperManager; @Mock BiometricUnlockController mBiometricUnlockController; @Mock DozeParameters mDozeParameters; @Before public void setUp() { MockitoAnnotations.initMocks(this); mDozeWallpaperState = new DozeWallpaperState(mIWallpaperManager, mBiometricUnlockController, mDozeParameters); } @Test public void testDreamNotification() throws RemoteException { // Pre-condition when(mDozeParameters.getAlwaysOn()).thenReturn(true); mDozeWallpaperState.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.DOZE_AOD); verify(mIWallpaperManager).setInAmbientMode(eq(true), anyLong()); mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.FINISH); verify(mIWallpaperManager).setInAmbientMode(eq(false), anyLong()); // Make sure we're sending false when AoD is off reset(mDozeParameters); mDozeWallpaperState.transitionTo(DozeMachine.State.FINISH, DozeMachine.State.DOZE_AOD); verify(mIWallpaperManager).setInAmbientMode(eq(false), anyLong()); } @Test public void testAnimates_whenSupported() throws RemoteException { // Pre-conditions when(mDozeParameters.getDisplayNeedsBlanking()).thenReturn(false); when(mDozeParameters.shouldControlScreenOff()).thenReturn(true); when(mDozeParameters.getAlwaysOn()).thenReturn(true); mDozeWallpaperState.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.DOZE_AOD); verify(mIWallpaperManager).setInAmbientMode(eq(true), eq((long) StackStateAnimator.ANIMATION_DURATION_WAKEUP)); mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.FINISH); verify(mIWallpaperManager).setInAmbientMode(eq(false), eq((long) StackStateAnimator.ANIMATION_DURATION_WAKEUP)); } @Test public void testDoesNotAnimate_whenNotSupported() throws RemoteException { // Pre-conditions when(mDozeParameters.getDisplayNeedsBlanking()).thenReturn(true); when(mDozeParameters.getAlwaysOn()).thenReturn(true); when(mDozeParameters.shouldControlScreenOff()).thenReturn(false); mDozeWallpaperState.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.DOZE_AOD); verify(mIWallpaperManager).setInAmbientMode(eq(true), eq(0L)); mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.FINISH); verify(mIWallpaperManager).setInAmbientMode(eq(false), eq(0L)); } @Test public void testDoesNotAnimate_whenWakeAndUnlock() throws RemoteException { // Pre-conditions when(mDozeParameters.getAlwaysOn()).thenReturn(true); when(mBiometricUnlockController.unlockedByWakeAndUnlock()).thenReturn(true); mDozeWallpaperState.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.DOZE_AOD); clearInvocations(mIWallpaperManager); mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.FINISH); verify(mIWallpaperManager).setInAmbientMode(eq(false), eq(0L)); } @Test public void testTransitionTo_requestPulseIsAmbientMode() throws RemoteException { mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE, DozeMachine.State.DOZE_REQUEST_PULSE); verify(mIWallpaperManager).setInAmbientMode(eq(true), eq(0L)); } @Test public void testTransitionTo_wakeFromPulseIsNotAmbientMode() throws RemoteException { mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.DOZE_REQUEST_PULSE); reset(mIWallpaperManager); mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_REQUEST_PULSE, DozeMachine.State.DOZE_PULSING_BRIGHT); verify(mIWallpaperManager).setInAmbientMode(eq(false), anyLong()); } @Test public void testTransitionTo_animatesWhenWakingUpFromPulse() throws RemoteException { mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_REQUEST_PULSE, DozeMachine.State.DOZE_PULSING); reset(mIWallpaperManager); mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_PULSING, DozeMachine.State.FINISH); verify(mIWallpaperManager).setInAmbientMode(eq(false), eq((long) StackStateAnimator.ANIMATION_DURATION_WAKEUP)); } }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
5a9e707fcc55dfdc7c437fdac2a9bc6cad61887f
be61dc814597d1d4386aaba12045587afd53bf10
/kse/src/net/sf/keystore_explorer/gui/KseRestart.java
7d2ca1759802d77024b5e241b575d24e5760be1e
[]
no_license
devdas77/keystore-explorer
62eaf794fe2b9bd60315c6623c0d01b38c463d4c
ac8675cd8f0367faf5facb6951926a7ba15e94d1
refs/heads/master
2020-12-25T21:33:59.220987
2016-03-17T21:24:35
2016-03-17T21:24:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,192
java
/* * Copyright 2004 - 2013 Wayne Grant * 2013 - 2016 Kai Kramer * * This file is part of KeyStore Explorer. * * KeyStore Explorer is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * KeyStore Explorer 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 KeyStore Explorer. If not, see <http://www.gnu.org/licenses/>. */ package net.sf.keystore_explorer.gui; import java.io.File; import java.io.IOException; import java.text.MessageFormat; import net.sf.keystore_explorer.KSE; /** * Restart KeyStore Explorer. * */ public class KseRestart { private KseRestart() { } /** * Restart KeyStore Explorer in the same manner in which it was started. */ public static void restart() { if (System.getProperty("kse.exe") != null) { restartAsKseExe(); } else if (System.getProperty("kse.app") != null) { restartAsKseApp(); } else if (System.getProperty("java.class.path").equals("kse.jar")) { restartAsKseJar(); } else { restartAsKseClass(); } } private static void restartAsKseExe() { File kseInstallDir = new File(System.getProperty("kse.install.dir")); File kseExe = new File(kseInstallDir, "kse.exe"); String toExec[] = new String[] { kseExe.getPath() }; try { Runtime.getRuntime().exec(toExec); } catch (IOException ex) { ex.printStackTrace(); // Ignore } } private static void restartAsKseJar() { File javaBin = new File(new File(System.getProperty("java.home"), "bin"), "java"); File kseInstallDir = new File(System.getProperty("kse.install.dir")); File kseJar = new File(kseInstallDir, "kse.jar"); String toExec[] = new String[] { javaBin.getPath(), "-jar", kseJar.getPath() }; try { Runtime.getRuntime().exec(toExec); } catch (IOException ex) { ex.printStackTrace(); // Ignore } } private static void restartAsKseApp() { File kseInstallDir = new File(System.getProperty("kse.install.dir")); String kseApp = MessageFormat.format("{0} {1}.app", KSE.getApplicationName(), KSE.getApplicationVersion()); File javaAppStub = new File(new File(new File(new File(kseInstallDir, kseApp), "Contents"), "MacOS"), "JavaApplicationStub"); String toExec[] = new String[] { javaAppStub.getPath() }; try { Runtime.getRuntime().exec(toExec); } catch (IOException ex) { ex.printStackTrace(); // Ignore } } private static void restartAsKseClass() { File javaBin = new File(new File(System.getProperty("java.home"), "bin"), "java"); String kseClasspath = System.getProperty("java.class.path"); String toExec[] = new String[] { javaBin.getPath(), "-classpath", kseClasspath, KSE.class.getName() }; try { Runtime.getRuntime().exec(toExec); } catch (IOException ex) { ex.printStackTrace(); // Ignore } } }
[ "kaikramer@users.sourceforge.net" ]
kaikramer@users.sourceforge.net
ce2d536100053b48b7f0a0cd6b4c325125f60c3d
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module667/src/main/java/module667packageJava0/Foo2.java
8ddb7df85b344273eb4073f57191ffe4ff1f4daa
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
427
java
package module667packageJava0; import java.lang.Integer; public class Foo2 { Integer int0; Integer int1; public void foo0() { new module667packageJava0.Foo1().foo6(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
2ccef7dfe1f6323958f786698e5a4032bc14d4fa
a7de1da67b094d4db18308c105cad3e2a81c4cf2
/new/janus-parent/janus-test/janus-test-examples/src/main/java/com/ctg/itrdc/janus/examples/jackson/api/InheritBean2.java
7ff848581ae64c40d99f93ebff8ee6dbd281d260
[]
no_license
zhouliang3/distribute-service-framework
e745014fc35ed002e4308b8e699e139d18e840fe
adddad7cfafeb8e91772014dec9654e86b5a528e
refs/heads/master
2020-05-20T19:04:06.654198
2017-03-10T02:27:40
2017-03-10T02:27:40
84,509,782
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
package com.ctg.itrdc.janus.examples.jackson.api; import org.joda.time.DateTime; /** * Created by dylan on 14-11-22. */ public class InheritBean2 extends AbstractInheritBean { private String zipCode = "200000"; public String getZipCode() { return zipCode; } public void setZipCode(String zipCode) { this.zipCode = zipCode; } @Override public String toString() { return "InheritBean2{" + "zipCode='" + zipCode + '\'' + "} " + super.toString(); } }
[ "452153627@qq.com" ]
452153627@qq.com
039bff2707a028fa7a5b3fc4ed86ea16e9eaef12
9e8b8d5949a35c55cfac8ebe4c7b6fed043dc267
/cluster-manager/src/main/java/com/codeabovelab/dm/cluman/ui/UserApi.java
7f06ee33e70bc1ece3e25c989ee47780f68110b3
[]
no_license
awsautomation/Docker-Orchestration-master
5fac7dc060a6021371c95e4a5e52fb4c42d605f3
0c1544f4d2f6ceb869661b2f75e9216f990025ae
refs/heads/master
2021-08-28T11:40:05.834148
2020-02-06T15:45:19
2020-02-06T15:45:19
238,753,850
1
0
null
null
null
null
UTF-8
Java
false
false
7,355
java
package com.codeabovelab.dm.cluman.ui; import com.codeabovelab.dm.cluman.security.AbstractAclService; import com.codeabovelab.dm.cluman.security.AuthoritiesService; import com.codeabovelab.dm.cluman.security.ProvidersAclService; import com.codeabovelab.dm.cluman.ui.model.UiRole; import com.codeabovelab.dm.cluman.ui.model.UiRoleUpdate; import com.codeabovelab.dm.cluman.ui.model.UiUser; import com.codeabovelab.dm.cluman.ui.model.UiUserUpdate; import com.codeabovelab.dm.cluman.users.UserRegistration; import com.codeabovelab.dm.cluman.users.UsersStorage; import com.codeabovelab.dm.cluman.validate.ExtendedAssert; import com.codeabovelab.dm.common.security.Authorities; import com.codeabovelab.dm.common.security.ExtendedUserDetails; import com.codeabovelab.dm.common.security.ExtendedUserDetailsImpl; import com.codeabovelab.dm.common.security.UserIdentifiersDetailsService; import com.codeabovelab.dm.common.security.acl.AclSource; import com.codeabovelab.dm.common.security.acl.AclUtils; import com.codeabovelab.dm.common.security.dto.ObjectIdentityData; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.security.access.annotation.Secured; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.web.bind.annotation.*; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; /** */ @RestController @Secured(Authorities.ADMIN_ROLE) @RequestMapping(value = "/ui/api/users", produces = APPLICATION_JSON_VALUE) @RequiredArgsConstructor(onConstructor = @__(@Autowired)) public class UserApi { private final UserIdentifiersDetailsService usersService; private final UsersStorage usersStorage; private final AuthoritiesService authoritiesService; private final PasswordEncoder passwordEncoder; private final AbstractAclService aclService; private final ProvidersAclService providersAclService; @RequestMapping(value = "/", method = RequestMethod.GET) public Collection<UiUser> getUsers() { Collection<ExtendedUserDetails> users = usersService.getUsers(); return users.stream().map(UiUser::fromDetails).collect(Collectors.toList()); } @RequestMapping(value = "/{user}", method = RequestMethod.GET) public UiUser getUser(@PathVariable("user") String username) { ExtendedUserDetails user = getUserDetails(username); return UiUser.fromDetails(user); } private ExtendedUserDetails getUserDetails(String username) { ExtendedUserDetails user; try { user = usersService.loadUserByUsername(username); } catch (UsernameNotFoundException e) { user = null; } if(user == null) { throw new HttpException(HttpStatus.NOT_FOUND, "Can not find user with name: " + username); } return user; } @PreAuthorize("#username == authentication.name || hasRole('ADMIN')") @RequestMapping(value = "/{user}", method = RequestMethod.POST) public UiUser setUser(@PathVariable("user") String username, @RequestBody UiUserUpdate user) { user.setUser(username); String password = user.getPassword(); // we must encode password if(password != null && !UiUser.PWD_STUB.equals(password)) { String encodedPwd = passwordEncoder.encode(password); user.setPassword(encodedPwd); } final ExtendedUserDetails source; { // we load user because it can be defined in different sources, // but must stored into userStorage ExtendedUserDetails eud = null; try { eud = usersService.loadUserByUsername(username); } catch (UsernameNotFoundException e) { //is a usual case } source = eud; } UserRegistration reg = usersStorage.update(username, (ur) -> { ExtendedUserDetails details = ur.getDetails(); if(details == null && source != null) { // if details is null than user Storage does not have this user before // and we can transfer our user into it details = source; } ExtendedUserDetailsImpl.Builder builder = ExtendedUserDetailsImpl.builder(details); user.toBuilder(builder); ur.setDetails(builder); }); return UiUser.fromDetails(reg.getDetails()); } @RequestMapping(value = "/{user}", method = RequestMethod.DELETE) public void deleteUser(@PathVariable("user") String username) { usersStorage.remove(username); } @Secured(Authorities.USER_ROLE) @RequestMapping(value = "/current/", method = RequestMethod.GET) public UiUser getCurrentUser() { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); UserDetails userDetails = (UserDetails) auth.getPrincipal(); return UiUser.fromDetails(userDetails); } @RequestMapping(value = "/{user}/roles/", method = RequestMethod.GET) public List<UiRole> getUserRoles(@PathVariable("user") String username) { ExtendedUserDetails details = getUserDetails(username); List<UiRole> roles = details.getAuthorities().stream().map(UiRole::fromAuthority).collect(Collectors.toList()); roles.sort(null); return roles; } @RequestMapping(value = "/{user}/roles/", method = RequestMethod.POST) public List<UiRole> updateUserRoles(@PathVariable("user") String username, @RequestBody List<UiRoleUpdate> updatedRoles) { UserRegistration ur = usersStorage.get(username); ExtendedAssert.notFound(ur, "Can not find user: " + username); if(!updatedRoles.isEmpty()) { ur.update((r) -> { ExtendedUserDetailsImpl.Builder builder = ExtendedUserDetailsImpl.builder(ur.getDetails()); UiUserUpdate.updateRoles(updatedRoles, builder); r.setDetails(builder); }); } ExtendedUserDetails details = ur.getDetails(); List<UiRole> roles = details.getAuthorities().stream().map(UiRole::fromAuthority).collect(Collectors.toList()); roles.sort(null); return roles; } @RequestMapping(path = "/{user}/acls/", method = RequestMethod.GET) public Map<ObjectIdentityData, AclSource> getUserAcls(@PathVariable("user") String username) { Map<ObjectIdentityData, AclSource> map = new HashMap<>(); providersAclService.getAcls((a) -> { if(!AclUtils.isContainsUser(a, username)) { return; } // we must serialize as our object, it allow save it as correct string map.put(a.getObjectIdentity(), a); }); return map; } }
[ "tech_fur@outlook.com" ]
tech_fur@outlook.com
763f73f399ebf54001f5e5c32f09249194b37c2b
b7f3ec5823d0836132b88994a51c86d4f6bebffc
/rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/internal/SingletonConnectionProvider.java
e20300fad92d35729bea8ad35ab960753d63d95a
[ "Apache-2.0" ]
permissive
davidmoten/rxjava2-jdbc
91f0160c54302564a6d06a7b3c6dc9b06c93a6e0
0559737b71c5dd5bf36b59f3f37631ccf5f415d4
refs/heads/master
2023-08-29T08:41:40.694481
2023-08-23T17:30:39
2023-08-23T17:32:41
72,403,045
405
46
Apache-2.0
2023-09-01T17:42:03
2016-10-31T05:07:38
Java
UTF-8
Java
false
false
541
java
package org.davidmoten.rx.jdbc.internal; import java.sql.Connection; import org.davidmoten.rx.jdbc.ConnectionProvider; public final class SingletonConnectionProvider implements ConnectionProvider { private final Connection connection; public SingletonConnectionProvider(Connection connection) { this.connection = connection; } @Override public Connection get() { return connection; } @Override public void close() { // do nothing as con was not created by this provider } }
[ "davidmoten@gmail.com" ]
davidmoten@gmail.com
88231af01a39595c2a3eba43be034ab12b3af6fc
73c24af73821763711573cc3a3f1f9aab5eef72d
/Mutation_Analysis/src/OCL/impl/CollectionOperationCallExpImpl.java
573fbe299e39f6d6f8d54fa9a943c19b9d00a631
[]
no_license
javitroya/test-case-gen-mutation-analysis
8a448648f54c90684558d92f4f6b32bb0120453c
2521cde3b79df877b1be876935075570cbb94cea
refs/heads/master
2021-02-11T11:24:52.675409
2020-03-03T13:21:35
2020-03-03T13:21:35
244,484,697
0
0
null
null
null
null
UTF-8
Java
false
false
776
java
/** */ package OCL.impl; import OCL.CollectionOperationCallExp; import OCL.OCLPackage; import org.eclipse.emf.ecore.EClass; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Collection Operation Call Exp</b></em>'. * <!-- end-user-doc --> * <p> * </p> * * @generated */ public class CollectionOperationCallExpImpl extends OperationCallExpImpl implements CollectionOperationCallExp { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected CollectionOperationCallExpImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EClass eStaticClass() { return OCLPackage.Literals.COLLECTION_OPERATION_CALL_EXP; } } //CollectionOperationCallExpImpl
[ "jtroya@us.es" ]
jtroya@us.es
f72f4ed56a51c514b4ec75c57c321db7d8fb999b
635b67dce32e835adea1fe21c1c8560c9b24660e
/kie-wb-common-stunner/kie-wb-common-stunner-core/kie-wb-common-stunner-commons/kie-wb-common-stunner-core-common/src/test/java/org/kie/workbench/common/stunner/core/rule/ext/RuleExtensionMultiHandlerTest.java
289b21726152bf1061c9ed8d51f9e0c7dc3eecb4
[ "Apache-2.0" ]
permissive
DF-Kyun/kie-wb-common
22ef61d3d692b6ad41e4dca6cfe10f9d2f2c6f4b
b383da8b3375d5bdaeddd2fbf874c6b01139e982
refs/heads/master
2021-01-19T09:48:20.709656
2017-04-07T09:06:59
2017-04-07T09:06:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,175
java
/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kie.workbench.common.stunner.core.rule.ext; import java.util.Collection; import java.util.Collections; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.kie.workbench.common.stunner.core.rule.RuleEvaluationContext; import org.kie.workbench.common.stunner.core.rule.RuleViolation; import org.kie.workbench.common.stunner.core.rule.RuleViolations; import org.kie.workbench.common.stunner.core.rule.context.ContainmentContext; import org.kie.workbench.common.stunner.core.rule.context.RuleContextBuilder; import org.kie.workbench.common.stunner.core.rule.violations.DefaultRuleViolations; import org.kie.workbench.common.stunner.core.rule.violations.RuleViolationImpl; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import static org.junit.Assert.*; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.*; @RunWith(MockitoJUnitRunner.class) public class RuleExtensionMultiHandlerTest { @Mock RuleExtensionHandler handler1; @Mock RuleExtensionHandler handler2; private RuleExtensionMultiHandler tested; private RuleExtension rule1 = new RuleExtension("r1", "c1"); private RuleEvaluationContext context; private RuleViolation violation1; private RuleViolations violations1; @Before public void setup() throws Exception { context = RuleContextBuilder.DomainContexts.containment("id1", Collections.emptySet()); violation1 = new RuleViolationImpl("v1"); violations1 = new DefaultRuleViolations().addViolation(violation1); when(handler1.getRuleType()).thenReturn(RuleExtension.class); when(handler1.getContextType()).thenReturn(ContainmentContext.class); when(handler2.getRuleType()).thenReturn(RuleExtension.class); when(handler2.getContextType()).thenReturn(ContainmentContext.class); tested = new RuleExtensionMultiHandler(); tested.addHandler(handler1); tested.addHandler(handler2); } @Test @SuppressWarnings("unchecked") public void testAcceptAll() { when(handler1.accepts(eq(rule1), eq(context))).thenReturn(true); when(handler2.accepts(eq(rule1), eq(context))).thenReturn(true); final boolean accepts = tested.accepts(rule1, context); assertTrue(accepts); } @Test @SuppressWarnings("unchecked") public void testAcceptAllBut1() { when(handler1.accepts(eq(rule1), eq(context))).thenReturn(true); when(handler2.accepts(eq(rule1), eq(context))).thenReturn(false); final boolean accepts = tested.accepts(rule1, context); assertTrue(accepts); } @Test @SuppressWarnings("unchecked") public void testAcceptAllBut2() { when(handler1.accepts(eq(rule1), eq(context))).thenReturn(false); when(handler2.accepts(eq(rule1), eq(context))).thenReturn(true); final boolean accepts = tested.accepts(rule1, context); assertTrue(accepts); } @Test @SuppressWarnings("unchecked") public void testNotAccept() { when(handler1.accepts(eq(rule1), eq(context))).thenReturn(false); when(handler2.accepts(eq(rule1), eq(context))).thenReturn(false); final boolean accepts = tested.accepts(rule1, context); assertFalse(accepts); } @Test @SuppressWarnings("unchecked") public void testEvaluateAll() { when(handler1.accepts(eq(rule1), eq(context))).thenReturn(true); when(handler2.accepts(eq(rule1), eq(context))).thenReturn(true); when(handler1.evaluate(eq(rule1), eq(context))).thenReturn(violations1); when(handler2.evaluate(eq(rule1), eq(context))).thenReturn(violations1); final RuleViolations result = tested.evaluate(rule1, context); assertNotNull(result); final Collection<RuleViolation> violations = (Collection<RuleViolation>) result.violations(); assertTrue(violations.size() == 2); assertTrue(violations.contains(violation1)); assertTrue(violations.contains(violation1)); } @Test @SuppressWarnings("unchecked") public void testEvaluateOnlyOne() { when(handler1.accepts(eq(rule1), eq(context))).thenReturn(true); when(handler2.accepts(eq(rule1), eq(context))).thenReturn(false); when(handler1.evaluate(eq(rule1), eq(context))).thenReturn(violations1); when(handler2.evaluate(eq(rule1), eq(context))).thenReturn(violations1); final RuleViolations result = tested.evaluate(rule1, context); assertNotNull(result); final Collection<RuleViolation> violations = (Collection<RuleViolation>) result.violations(); assertTrue(violations.size() == 1); assertTrue(violations.contains(violation1)); } @Test @SuppressWarnings("unchecked") public void testEvaluateOnlyTwo() { when(handler1.accepts(eq(rule1), eq(context))).thenReturn(false); when(handler2.accepts(eq(rule1), eq(context))).thenReturn(true); when(handler1.evaluate(eq(rule1), eq(context))).thenReturn(violations1); when(handler2.evaluate(eq(rule1), eq(context))).thenReturn(violations1); final RuleViolations result = tested.evaluate(rule1, context); assertNotNull(result); final Collection<RuleViolation> violations = (Collection<RuleViolation>) result.violations(); assertTrue(violations.size() == 1); assertTrue(violations.contains(violation1)); } }
[ "manstis@users.noreply.github.com" ]
manstis@users.noreply.github.com
bc9005ef0f8583d3bb1cd814a14e469c8750be72
de9066838a46a3f061a5dcddab28a224d9cb2a60
/online-gateway-common/src/main/java/com/iboxpay/settlement/gateway/common/inout/callback/CallbackPaymentRequestModel.java
b37a4019148f235fa4035e7ff6ab28585eae1504
[]
no_license
ak47wyh/online-gateway
6a8333e176d1f924a748de0a2b383c84b85b1454
664964348d3c5f5aa8e78dd2fe2818238858d580
refs/heads/master
2020-03-20T09:20:05.830673
2017-02-08T07:34:10
2017-02-08T07:34:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,152
java
package com.iboxpay.settlement.gateway.common.inout.callback; import java.util.Map; import com.iboxpay.settlement.gateway.common.inout.CommonRequestModel; public class CallbackPaymentRequestModel extends CommonRequestModel{ private static final long serialVersionUID = 1L; private String outTradeNo; private String resultCode; private String errCode; private String errCodeDes; private Map<String,Object> resultMap; public String getOutTradeNo() { return outTradeNo; } public void setOutTradeNo(String outTradeNo) { this.outTradeNo = outTradeNo; } public String getResultCode() { return resultCode; } public void setResultCode(String resultCode) { this.resultCode = resultCode; } public String getErrCode() { return errCode; } public void setErrCode(String errCode) { this.errCode = errCode; } public String getErrCodeDes() { return errCodeDes; } public void setErrCodeDes(String errCodeDes) { this.errCodeDes = errCodeDes; } public Map<String, Object> getResultMap() { return resultMap; } public void setResultMap(Map<String, Object> resultMap) { this.resultMap = resultMap; } }
[ "huixiong@juanpi.com" ]
huixiong@juanpi.com
5856541962331a80395d8587a401ede0fec0ac05
4e4279e4c43890d105c7dbe7dc96c3c623c1ec0b
/cliques-tests/links-fe-anunciante-tests/src/main/java/selenium/page/object/investiments/PaymentObject.java
949753367592f2e7cd900a2c6085dc6462e3e73e
[]
no_license
proctiger/automation
d7550988bb9528dab9af08867a22d6c8e295df18
8a2d8169d21ec6ae9a52c89b27164b05a76ce7b6
refs/heads/master
2016-09-15T22:25:05.094858
2013-11-27T13:50:43
2013-11-27T13:50:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
854
java
package selenium.page.object.investiments; import org.openqa.selenium.WebElement; import selenium.template.method.WebDriverTemplate; import selenium.template.method.selenium.Locations; public class PaymentObject { public static final String PAYMENT_URL = "http://cliques.uol.com.br/links/advertiser/payment.html"; private WebDriverTemplate webPage; public PaymentObject(WebDriverTemplate webPage) { this.webPage = webPage; } public WebElement addCredit() { return webPage.getElement().findElementBy(Locations.ID, "execute_submit"); } public WebElement depositValue() { return webPage.getElement().findElementBy(Locations.ID, "depositValue"); } public WebElement cancelCredit() { return webPage.getElement().findElementBy(Locations.CLASSNAME, "cliques-button gray-theme small-146"); } }
[ "willians.romera@gmail.com" ]
willians.romera@gmail.com
51ac7aa7b25afaa8dd0dc073e3a07e158f017a14
a82150cf7a3d350267ea5d39dbf353f1697ce3d3
/java/afnic-commons-services-definition/src/fr/afnic/commons/beans/operations/qualification/operation/email/FinishedLvl1ToInitiator.java
aacbbfb8387d249a7dbac6df39fb0b84ab5be561
[]
no_license
Razmoket/srs_reloaded
89f1261682f662d3c07d745d8f6547bae8569e9c
38937c06b39c1e1d41e09ecb0093df74c51cebe1
refs/heads/master
2021-01-25T10:11:38.482632
2013-02-07T18:13:27
2013-02-07T18:13:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,549
java
package fr.afnic.commons.beans.operations.qualification.operation.email; import fr.afnic.commons.beans.operations.OperationType; import fr.afnic.commons.beans.profiling.users.UserId; import fr.afnic.commons.services.exception.ServiceException; import fr.afnic.commons.services.tld.TldServiceFacade; public class FinishedLvl1ToInitiator extends ValorizationEmailTemplate { public FinishedLvl1ToInitiator(UserId userId, TldServiceFacade tld) { super(OperationType.NotifyEmailFinishedLvl1ToInitiator, QualificationEmailTemplateDestinary.Initiator, userId, tld); } @Override protected String buildEndSubject() throws ServiceException { return "[AFNIC Qualification] Votre demande de vérification / Your verification request"; } @Override protected String buildFrContent() throws ServiceException { return new StringBuilder().append("[English version below]\n") .append("\n") .append("Bonjour,\n") .append("\n") .append("L'AFNIC vous informe que les vérifications effectuées sur votre demande ont permis de confirmer l'éligibilité et la joignabilité du titulaire de nom de domaine, " + this.getHolderNicHandle() + " (référence AFNIC).\n") .append("\n") .append("Nous avons mis à jour la base Whois, que vous pouvez consulter depuis notre site www.afnic.fr, et avons clos le dossier.\n") .append("\n") .append("Notre support se tient à votre disposition pour tout complément d'information, par téléphone au +33 1 39 30 83 00 ou par email à support@afnic.fr.\n") .toString(); } @Override protected String getFrEndEmail() { return new StringBuilder() .append("\nBien cordialement,\n") .append("Le Service Client\n") .append("AFNIC\n") .toString(); } @Override protected String buildEnContent() throws ServiceException { return new StringBuilder().append("Dear requester,\n") .append("\n") .append("AFNIC informs you that the verification performed upon your request has confirmed the eligibility and the reachability of the registrant, " + this.getHolderNicHandle() + " (AFNIC reference).\n") .append("\n") .append("We have updated the Whois database accordingly as you can check on our web site, www.afnic.fr, and have therefore closed your request file.\n") .append("\n") .append("May you require any additional information regarding the ongoing procedure, please contact our customer support by phone at +33 1 39 30 83 00 or by email to support@afnic.fr.\n") .toString(); } @Override protected String getEnEndEmail() { return new StringBuilder() .append("\nBest regards,\n") .append("AFNIC Customer Service") .toString(); } }
[ "julien.alaphilippe@gmail.com" ]
julien.alaphilippe@gmail.com
516ecb2189a5dc3dcdff3224d32a9b9810714b83
592b0e0ad07e577e2510723519c0c603d3eb2808
/src/main/java/com/jst/prodution/account/serviceBean/AcctFrozenBean.java
c4b46faecd3e9149c29684b7278de942f06582f7
[]
no_license
huangleisir/api-js180323
494d7a1d9b07385fc95e9927195e70727e626e53
7cc5d16e12cbe6c56b48831bab3736e8477d7360
refs/heads/master
2021-04-15T05:25:32.061201
2018-06-30T15:12:31
2018-06-30T15:12:31
126,464,555
0
0
null
null
null
null
UTF-8
Java
false
false
2,911
java
package com.jst.prodution.account.serviceBean; import java.util.Date; import com.jst.prodution.base.bean.BaseBean; /** * @desc 用户冻结 * @author junfu_yuan * @date 2016年10月8日 */ public class AcctFrozenBean extends BaseBean { /** * */ private static final long serialVersionUID = 1L; public static final String FROZEN_TYPE_ACCT = "1";// 冻结类型账户 public static final String FROZEN_TYPE_AMOUT = "2";// 冻结类型金额 //------------------------------ 接口输入参数 begin ------------------------------ /** * 账户号 - 必输 */ private String acctId; /** * 账户名称 - 可输 */ private String acctName; /** * 系统来源 - 必输 * 1:风控 * 2:运营 * 3: 内部冻结 */ private String sourceFrom; /** * 冻结类型 - 必输 * 1:账户冻结 * 2:金额冻结 */ private String frozenType; /** * 冻结金额 - 可输 * 单位 分 * 注:frozenType为“1-账户冻结”必输 */ private Long amount; /** * 备注 - 可输 */ private String remark; /** * 操作人 - 可输 */ private String operUser; //------------------------------ 接口输入参数 end ------------------------------ //------------------------------ 接口输出参数 begin ------------------------------ /** * 冻结编号 */ private String frozenId; /** * 冻结添加时间 */ private Date createTime; //------------------------------ 接口输出参数 end ------------------------------ public String getAcctId() { return acctId; } public void setAcctId(String acctId) { this.acctId = acctId == null ? null : acctId.trim(); } public String getOperUser() { return operUser; } public void setOperUser(String operUser) { this.operUser = operUser == null ? null : operUser.trim(); } public String getAcctName() { return acctName; } public void setAcctName(String acctName) { this.acctName = acctName == null ? null : acctName.trim(); } public String getSourceFrom() { return sourceFrom; } public void setSourceFrom(String sourceFrom) { this.sourceFrom = sourceFrom == null ? null : sourceFrom.trim(); } public String getFrozenType() { return frozenType; } public void setFrozenType(String frozenType) { this.frozenType = frozenType == null ? null : frozenType.trim(); } public Long getAmount() { return amount; } public void setAmount(Long amount) { this.amount = amount; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark == null ? null : remark.trim(); } public String getFrozenId() { return frozenId; } public void setFrozenId(String frozenId) { this.frozenId = frozenId == null ? null : frozenId.trim(); } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } }
[ "lei.huang@jieshunpay.cn" ]
lei.huang@jieshunpay.cn
0a1b2ab7aa4e6f1ac0716a94400144fd2156c28a
a9469adda77c7833452629e2b6560d4d52e6d59e
/Jetty9.2Debug/debugSrc/cn/java/debug/Debug.java
dc0fb9b5157587f16caeedb90a627b9f7166c73b
[]
no_license
brunoalbrito/javacodedemo
882cee2afe742e51354ca6fd60fc3546d481244c
840e84c252967e63022197116d170b3090927591
refs/heads/master
2020-04-22T17:50:36.975840
2017-06-30T11:11:47
2017-06-30T11:11:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,443
java
package cn.java.debug; import java.io.FileInputStream; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.ContextHandlerCollection; import org.eclipse.jetty.webapp.WebAppContext; import org.eclipse.jetty.xml.XmlConfiguration; public class Debug { public static void main(String[] args) throws Exception { String resourceBase = "./webRoot"; String webXmlPath = "./webRoot/WEB-INF/web.xml"; String contextPath = "/testContext"; Server server = new Server(); // 设置配置文件 { String xmlConfigPath = "./cn/java/debug/etc/jetty.xml"; XmlConfiguration configuration = new XmlConfiguration(new FileInputStream(xmlConfigPath)); configuration.configure(server); // 设置Server的属性 } // 设置处理器 { ContextHandlerCollection handler = new ContextHandlerCollection(); WebAppContext webapp = new WebAppContext(); webapp.setContextPath(contextPath); webapp.setDefaultsDescriptor("./cn/java/debug/etc/webdefault.xml"); webapp.setResourceBase(resourceBase); webapp.setDescriptor(webXmlPath); handler.addHandler(webapp); server.setHandler(handler); } // 启动 server.start(); System.out.println("current thread:" + server.getThreadPool().getThreads() + "| idle thread:" + server.getThreadPool().getIdleThreads()); server.join(); } }
[ "297963025@qq.com" ]
297963025@qq.com
1e620999f0d31d8e9f472841926395af65086516
96e5422361418c18fbf9ddd53ed1682fd514a91a
/framework-beans/src/main/java/org/arch/framework/beans/exception/constant/ProductStatusCode.java
a7a90b7652eb055e76586226a119631f88c53e19
[]
no_license
geeker-lait/arch-framework
f358cef8464c6dd470832fa2e8e6621a47f70f01
c443e65a304b671faa60548f03985db2da7dccec
refs/heads/main
2023-05-24T07:34:28.978336
2021-06-13T11:22:23
2021-06-13T11:22:23
376,519,487
0
0
null
null
null
null
UTF-8
Java
false
false
203
java
package org.arch.framework.beans.exception.constant; /** * @author lait.zhang@gmail.com * @description: TODO * @weixin PN15855012581 * @date 12/11/2020 3:31 PM */ public enum ProductStatusCode { }
[ "lait.zhang@gmail.com" ]
lait.zhang@gmail.com
564d9e98b17f1856202ab534a0ea1830fcdb252f
787b54d63a43472cb590d7e17eeb2576f4fabfc6
/fr.inria.diverse.gtfsm.algebra/src/fr/inria/diverse/gtfsm/algebra/impl/ExecutableGTFSMAlgebra.java
a0cf98de04f57645708499e19ba018fd453271e3
[]
no_license
manuelleduc/ecore-oa-fsm
f2acc3f962bf65d871d948d7b94d451dc5cd3003
b47a7d6f0b7a80cf101ef98330c1c9e8aeeb561e
refs/heads/master
2021-01-19T12:05:02.043373
2017-02-17T16:15:07
2017-02-17T16:15:07
82,284,634
0
0
null
null
null
null
UTF-8
Java
false
false
4,769
java
package fr.inria.diverse.gtfsm.algebra.impl; import java.util.List; import java.util.Map; import java.util.Queue; import java.util.stream.Collectors; import java.util.stream.Stream; import org.eclipse.emf.common.util.EList; import fr.inria.diverse.algebras.expressions.CtxEvalExp; import fr.inria.diverse.algebras.expressions.EvalOpExp; import fr.inria.diverse.fsm.algebra.exprs.CtxExecutableExp; import fr.inria.diverse.fsm.algebra.exprs.ExecutableExp; import fr.inria.diverse.gfsm.impl.ExecutableGFSMAlgebra; import fr.inria.diverse.tfsm.algebra.impl.ExecutableTFSMAlgebra; import fsm.FSM; import fsm.State; import fsm.Transition; import gfsm.GTransition; import gtfsm.GTFSM; import gtfsm.GTFinalState; import gtfsm.GTInitialState; import gtfsm.GTState; import gtfsm.GTTransition; import gtfsm.algebra.GtfsmAlgebra; import tfsm.ClockConstraintOperation; import tfsm.TimedFSM; import tfsm.TimedTransition; public interface ExecutableGTFSMAlgebra extends GtfsmAlgebra<Boolean, CtxEvalExp<Integer, Boolean>, Void, CtxExecutableExp, CtxEvalExp<Integer, Integer>, ExecutableExp, ExecutableExp, ExecutableExp,EvalOpExp<Integer> >, ExecutableTFSMAlgebra, ExecutableGFSMAlgebra { @Override default ExecutableExp gTFSM(final GTFSM gtfsm) { return () -> { this.setCurrentState(gtfsm.getInitialstate()); this._processInExpression(this.getCurrentState()); while (this.getCurrentState() != null) { this.$(this.getCurrentState()).execute(); gtfsm.getClocks().forEach(e -> { e.setTick(e.getTick() + 1); }); this.setTime(this.getTime() + 1); } }; } @Override default ExecutableExp gTInitialState(final GTInitialState gtInitialState) { return this.gTState(gtInitialState); } @Override default ExecutableExp gTFinalState(final GTFinalState gtFinalState) { return this.gTState(gtFinalState); } @Override default ExecutableExp gTState(final GTState gtState) { return () -> { final String action = this.getTimedActions().get(this.getTime()); final Long futureActions = this.getTimedActions().entrySet().stream() .filter(t -> t.getKey() >= this.getTime()).collect(Collectors.counting()); if (futureActions == 0) { if (!(this.getCurrentState() instanceof GTFinalState)) { System.out.println( "[ERROR] no action available but final state not reached (" + gtState.getName() + ")"); } this.setCurrentState(null); } else if (action != null) { final EList<Transition> outgoingtransitions = gtState.getOutgoingtransitions(); final Stream<Transition> filter = outgoingtransitions.stream().filter(t -> t.getEvent().equals(action)); final List<Transition> res = filter.filter(t -> { final boolean ret; if (t instanceof GTransition) { final Map<String, Integer> ctx = this.getCtx(); ret = this.$(((GTransition) t).getGuard()).result(ctx).orElseThrow( () -> new RuntimeException("failed to process " + t.getEvent() + " guard")); } else { ret = false; } return ret; }).filter(t -> { final boolean ret; if (t instanceof TimedTransition) { final ClockConstraintOperation transitionguard = ((TimedTransition) t).getTransitionguard(); ret = transitionguard == null || this.$(transitionguard); } else { ret = false; } return ret; }).collect(Collectors.toList()); final int size = res.size(); if (size == 1) { final GTTransition transition = (GTTransition) res.get(0); System.out.println("transition: event " + action + " - " + gtState.getName() + " -> " + transition.getTo().getName()); transition.getClockresets().forEach(c -> c.getClock().setTick(0)); System.out.println("clocks:"); ((TimedFSM) gtState.eContainer()).getClocks().forEach(c -> { System.out.println(" - clock " + c.getName() + " = " + c.getTick()); }); this._printCtx(); this._processOutExpression(this.getCurrentState()); this._printCtx(); this.setCurrentState(transition.getTo()); this._processInExpression(this.getCurrentState()); this._printCtx(); } else if (size > 1) { System.out.println( "[ERROR] Non deterministic " + size + " outgoing transitions matches event " + action); this.setCurrentState(null); } else { System.out.println("[ERROR] Deadlock"); this.setCurrentState(null); } } }; } @Override default ExecutableExp gTTransition(final GTTransition gtTransition) { return null; } @Override default ExecutableExp $(Transition transition) { return GtfsmAlgebra.super.$(transition); } @Override default ExecutableExp $(State state) { return GtfsmAlgebra.super.$(state); } @Override default ExecutableExp $(FSM fSM) { return GtfsmAlgebra.super.$(fSM); } }
[ "manuel.leduc@inria.fr" ]
manuel.leduc@inria.fr
995ab38eec814db7fb0e72f5494454d0e9fdf436
9fe88de89c17a1ae00ac4757a3842624c243e2fb
/phpunit-converted/src/main/java/com/project/convertedCode/includes/vendor/phpunit/php_code_coverage/src/Node/file_File_php.java
1044ba5ef086f0bb45b199e1be5b85b6857f6e14
[ "BSD-3-Clause", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
RuntimeConverter/PHPUnit-Java-Converted
bccc849c0c88e8cda7b0e8a1d17883d37beb9f7a
0a036307ab56c8b787860ad25a74a17584218fda
refs/heads/master
2020-03-18T17:07:42.956039
2018-05-27T02:09:17
2018-05-27T02:09:17
135,008,061
1
0
null
null
null
null
UTF-8
Java
false
false
1,942
java
package com.project.convertedCode.includes.vendor.phpunit.php_code_coverage.src.Node; import com.runtimeconverter.runtime.RuntimeStack; import com.runtimeconverter.runtime.interfaces.ContextConstants; import com.runtimeconverter.runtime.includes.RuntimeIncludable; import com.runtimeconverter.runtime.includes.IncludeEventException; import com.runtimeconverter.runtime.classes.RuntimeClassBase; import com.runtimeconverter.runtime.RuntimeEnv; import com.runtimeconverter.runtime.interfaces.UpdateRuntimeScopeInterface; import com.runtimeconverter.runtime.arrays.ZPair; /* Converted with The Runtime Converter (runtimeconverter.com) vendor/phpunit/php-code-coverage/src/Node/File.php */ public class file_File_php implements RuntimeIncludable { public static final file_File_php instance = new file_File_php(); public final void include(RuntimeEnv env, RuntimeStack stack) throws IncludeEventException { Scope310 scope = new Scope310(); stack.pushScope(scope); this.include(env, stack, scope); stack.popScope(); } public final void include(RuntimeEnv env, RuntimeStack stack, Scope310 scope) throws IncludeEventException { // Conversion Note: class named File was here in the source code env.addManualClassLoad("SebastianBergmann\\CodeCoverage\\Node\\File"); } private static final ContextConstants runtimeConverterContextContantsInstance = new ContextConstants() .setDir("/vendor/phpunit/php-code-coverage/src/Node") .setFile("/vendor/phpunit/php-code-coverage/src/Node/File.php"); public ContextConstants getContextConstants() { return runtimeConverterContextContantsInstance; } private static class Scope310 implements UpdateRuntimeScopeInterface { public void updateStack(RuntimeStack stack) {} public void updateScope(RuntimeStack stack) {} } }
[ "support@runtimeconverter.com" ]
support@runtimeconverter.com
283da72e38974af17d538217581ca48af35e0b2a
5b2c309c903625b14991568c442eb3a889762c71
/classes/com/sleepycat/b/n/ak.java
b1cd8da2712a508eb5bca05fd54a17fb0fe9ec5a
[]
no_license
iidioter/xueqiu
c71eb4bcc53480770b9abe20c180da693b2d7946
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
refs/heads/master
2020-12-14T23:55:07.246659
2016-10-08T08:56:27
2016-10-08T08:56:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,426
java
package com.sleepycat.b.n; import com.sleepycat.b.g.ar; import com.sleepycat.b.g.at; import com.sleepycat.b.q.a; import java.nio.ByteBuffer; public class ak extends ai implements at { public a d; public final int a() { return ar.a(this.a) + ar.a(this.b) + ar.a(this.d); } public final void a(StringBuilder paramStringBuilder, boolean paramBoolean) { paramStringBuilder.append("<TxnPrepare"); paramStringBuilder.append(" id=\"").append(this.a); paramStringBuilder.append("\" time=\"").append(this.b); paramStringBuilder.append("\">"); paramStringBuilder.append(this.d); paramStringBuilder.append("</TxnPrepare>"); } public final void a(ByteBuffer paramByteBuffer) { ar.c(paramByteBuffer, this.a); ar.a(paramByteBuffer, this.b); ar.a(paramByteBuffer, this.d); } public final void a(ByteBuffer paramByteBuffer, int paramInt) { if (paramInt < 6) {} for (boolean bool = true;; bool = false) { this.a = ar.b(paramByteBuffer, bool); this.b = ar.e(paramByteBuffer, bool); this.d = ar.i(paramByteBuffer); return; } } public final boolean a(at paramat) { return false; } protected final String c() { return "TxnPrepare"; } } /* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\com\sleepycat\b\n\ak.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
6c3717616460b607a90baddbb787a272505c683e
e1e5bd6b116e71a60040ec1e1642289217d527b0
/H5/L2Mythras/L2Mythras_2017_07_12/java/l2f/loginserver/gameservercon/gspackets/BonusRequest.java
c66685de2e816f79b0b516fa8ffc63b6d03a2b11
[]
no_license
serk123/L2jOpenSource
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
603e784e5f58f7fd07b01f6282218e8492f7090b
refs/heads/master
2023-03-18T01:51:23.867273
2020-04-23T10:44:41
2020-04-23T10:44:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
590
java
package l2f.loginserver.gameservercon.gspackets; import l2f.loginserver.accounts.Account; import l2f.loginserver.gameservercon.ReceivablePacket; public class BonusRequest extends ReceivablePacket { private String account; private double bonus; private int bonusExpire; @Override protected void readImpl() { account = readS(); bonus = readF(); bonusExpire = readD(); } @Override protected void runImpl() { Account acc = new Account(account); acc.restore(); acc.setBonus(bonus); acc.setBonusExpire(bonusExpire); acc.update(); } }
[ "64197706+L2jOpenSource@users.noreply.github.com" ]
64197706+L2jOpenSource@users.noreply.github.com
8a4e52fb91fcc309d60849124c09a334d14afbfb
64145a9dac121f20ee62f0a531819528455f0485
/relationship/src/main/java/ws/relationship/topLevelPojos/signin/Signin.java
6b32b33f0151b7f0641920097c973c790b87bf33
[]
no_license
maoodan8240/ws-project
f9a24fdb15631568def3a837fd7f4e8a59320f2b
8817e8c37ca705efbe51dca771652556b3b9fe71
refs/heads/main
2023-05-04T19:13:09.199868
2021-05-20T01:40:14
2021-05-20T01:40:14
368,378,779
0
0
null
null
null
null
UTF-8
Java
false
false
2,378
java
package ws.relationship.topLevelPojos.signin; import ws.relationship.topLevelPojos.PlayerTopLevelPojo; /** * Created by lee on 17-4-13. */ public class Signin extends PlayerTopLevelPojo { private static final long serialVersionUID = -4680009964059978142L; private String lastSignDate; // 上一次的签到日期 private boolean isSignin; // 今日是否签到 --每日重置为false (每日24点重置) private int vipLv; // 今日签到时的Vip等级 private int month; // 月份 private int allSigninTimes; // 累计签到次数 private int monthSigninTimes; // 当月签到次数 private int cumulatvieGift; // 累计领取累计奖励的次数 public Signin() { } public Signin(String playerId) { super(playerId); } public boolean isSignin() { return isSignin; } public void setSignin(boolean isSignin) { this.isSignin = isSignin; } public int getMonthSigninTimes() { return monthSigninTimes; } public void setMonthSigninTimes(int monthSigninTimes) { this.monthSigninTimes = monthSigninTimes; } public int getMonth() { return month; } public void setMonth(int month) { this.month = month; } public int getAllSigninTimes() { return allSigninTimes; } public void setAllSigninTimes(int allSigninTimes) { this.allSigninTimes = allSigninTimes; } public int getCumulatvieGift() { return cumulatvieGift; } public void setCumulatvieGift(int cumulatvieGift) { this.cumulatvieGift = cumulatvieGift; } public String getLastSignDate() { return lastSignDate; } public void setLastSignDate(String lastSignDate) { this.lastSignDate = lastSignDate; } public int getVipLv() { return vipLv; } public void setVipLv(int vipLv) { this.vipLv = vipLv; } }
[ "maodan8240@sina.com" ]
maodan8240@sina.com
60df413064da06346b24b7b8de916d31f9188b84
3380b3322a5e89a47c0c315518fc49456a85d862
/src/main/java/org/zalando/compass/core/infrastructure/http/package-info.java
31a7ba3992f449fe468ada15299081bb2efb092c
[ "MIT" ]
permissive
whiskeysierra/compass
44c61e63d840d60093d7ab3316eceb1ee0c7d02a
cc48428978055ff9839ce45ef0c44a89e2a66995
refs/heads/main
2021-08-06T18:53:31.627681
2020-06-18T12:08:49
2020-06-18T12:08:49
37,349,654
2
1
MIT
2021-08-02T04:18:59
2015-06-12T23:36:12
Java
UTF-8
Java
false
false
141
java
@ParametersAreNonnullByDefault package org.zalando.compass.core.infrastructure.http; import javax.annotation.ParametersAreNonnullByDefault;
[ "w.schoenborn@gmail.com" ]
w.schoenborn@gmail.com
a7451aac277da42d6b7231fef4bd760d9b648d1e
b6e268432ce3ca5ae4ea938d96822810d22b11f9
/src/main/java/es/fergonco/deutsch/jpa/Word.java
0aade045271ee77701383616f2fabc274f90a89d
[]
no_license
fergonco/trainer
d982412b4d0528f3c9ad746e6a2ac824ef4a5eb8
f2223416683b887e5ed96aadb2e114d2c43ea67c
refs/heads/master
2020-07-05T03:12:43.039939
2014-01-31T21:22:57
2014-01-31T21:22:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,114
java
package es.fergonco.deutsch.jpa; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.Id; @Entity public class Word { @Id private String name; @Enumerated(EnumType.STRING) private Gender gender; private String plural; private String definition; private String translation; private boolean substantive; private double guessGenderFailureRate = 0.1; private double guessFromSpanish = 0.1; private double guessFromDeutch = 0.1; public Word() { } public String getName() { return name; } public void setName(String name) { this.name = name; } public Gender getGender() { return gender; } public void setGender(Gender gender) { this.gender = gender; } public String getPlural() { return plural; } public void setPlural(String plural) { this.plural = plural; } public String getDefinition() { return definition; } public void setDefinition(String definition) { this.definition = definition; } public String getTranslation() { return translation; } public void setTranslation(String translation) { this.translation = translation; } public boolean isSubstantive() { return substantive; } public void setSubstantive(boolean substantive) { this.substantive = substantive; } public double getGuessGenderFailureRate() { return guessGenderFailureRate; } public void setGuessGenderFailureRate(double guessGenderFailureRate) { this.guessGenderFailureRate = guessGenderFailureRate; } public double getGuessFromSpanish() { return guessFromSpanish; } public void setGuessFromSpanish(double guessFromSpanish) { this.guessFromSpanish = guessFromSpanish; } public double getGuessFromDeutch() { return guessFromDeutch; } public void setGuessFromDeutch(double guessFromDeutch) { this.guessFromDeutch = guessFromDeutch; } @Override public String toString() { return "Word [name=" + name + ", gender=" + gender + ", plural=" + plural + ", definition=" + definition + ", translation=" + translation + ", substantive=" + substantive + "]"; } }
[ "fernando.gonzalez@geomati.co" ]
fernando.gonzalez@geomati.co
26a3d0b580e63e71f765396ca10a0ca2800e5b77
8852a090ac04129c511dce068cefc9a81befbaa6
/src/com/ict/edu3/Client.java
91878d7a3484ca4fbe0615493c7142aa1e738331
[]
no_license
jeystory/java_client
d8ffd774707fc351ba21f44525663ddb74599f67
c1de849e4e423788c7019c4260c71b74da0068bb
refs/heads/master
2020-12-06T13:48:13.680000
2020-01-08T04:51:07
2020-01-08T04:51:07
232,477,987
0
0
null
null
null
null
UTF-8
Java
false
false
357
java
package com.ict.edu3; import java.net.Socket; public class Client{ public static void main(String[] args) { try { Socket s = new Socket("203.236.220.65",7780); ReceiveThread rec = new ReceiveThread(s); new Thread(rec).start(); SendThread send = new SendThread(s); new Thread(send).start(); } catch (Exception e) { } } }
[ "59073350+jeystory@users.noreply.github.com" ]
59073350+jeystory@users.noreply.github.com
8e1bfc5d36808140cb33a5a8ca58e4a01cd5f436
ea6cba36521edfda742784a24f00bf03956257d8
/proposals/imap/java/org/apache/james/imapserver/commands/UidCommand.java
b01ef8608d0c7dc0fa5621d09b84b669d5491e1a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
JavaQualitasCorpus/james-2.2.0
06ec49a7c688ea9eb46a21e0864b4e6d8195a103
0ea86451ef73dbfce9faa927d271a53202ee3fd1
refs/heads/master
2023-08-12T08:39:55.322097
2019-03-13T13:03:38
2019-03-13T13:03:38
167,004,793
0
0
null
null
null
null
UTF-8
Java
false
false
3,403
java
/*********************************************************************** * Copyright (c) 2000-2004 The Apache Software Foundation. * * 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 org.apache.james.imapserver.commands; import org.apache.james.imapserver.*; import org.apache.james.util.Assert; import java.util.StringTokenizer; import java.util.List; /** * Implements the UID Command for calling Commands with the fixed UID * * @version 0.2 on 04 Aug 2002 */ class UidCommand implements ImapCommand { public boolean validForState( ImapSessionState state ) { return ( state == ImapSessionState.SELECTED ); } public boolean process( ImapRequest request, ImapSession session ) { // StringTokenizer commandLine = new java.util.StringTokenizer(request.getCommandRaw()); StringTokenizer commandLine = request.getCommandLine(); int arguments = commandLine.countTokens(); // StringTokenizer commandLine = request.getCommandLine(); String command = request.getCommand(); StringTokenizer txt = new java.util.StringTokenizer(request.getCommandRaw()); System.out.println("UidCommand.process: #args="+txt.countTokens()); while (txt.hasMoreTokens()) { System.out.println("UidCommand.process: arg='"+txt.nextToken()+"'"); } if ( arguments < 3 ) { session.badResponse( "rawcommand='"+request.getCommandRaw()+"' #args="+request.arguments()+" Command should be <tag> <UID> <command> <command parameters>" ); return true; } String uidCommand = commandLine.nextToken(); System.out.println("UidCommand.uidCommand="+uidCommand); System.out.println("UidCommand.session="+session.getClass().getName()); ImapCommand cmd = session.getImapCommand( uidCommand ); System.out.println("UidCommand.cmd="+cmd); System.out.println("UidCommand.cmd="+cmd.getClass().getName()); if ( cmd instanceof CommandFetch || cmd instanceof CommandStore || cmd instanceof CopyCommand) { // As in RFC2060 also the COPY Command is valid for UID Command request.setCommand( uidCommand ); ((ImapRequestImpl)request).setUseUIDs( true ); cmd.process( request, session ); } else { session.badResponse( "Invalid UID secondary command." ); } return true; } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
1723369f6a3bacc72e00904c9431bcad13931b28
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ReplicaAlreadyExistsException.java
e607e99c538031b00de470d191970b830087adf3
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
139
java
package org.apache.hadoop.hdfs.server.datanode; import java.io.IOException; public class ReplicaAlreadyExistsException extends IOException
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
7feb08db7b47fa72585a8b753c2a9b10c558e380
444a2f55ed76002cf930fe8da5bad1c52761084f
/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/src/main/java/org/wso2/carbon/device/mgt/input/adapter/http/authorization/client/dto/AuthorizationRequest.java
8703e6d1af97b4705fe3157f3726ffe8e7856a72
[ "Apache-2.0" ]
permissive
shagihan/carbon-device-mgt-plugins
e771feb6cf20b04b3b33778f85685a0e29bf4968
61eb9f46d2a54988bf9d7597674c323fc0c7c8ab
refs/heads/master
2020-03-27T15:28:35.260392
2018-10-30T05:29:40
2018-10-30T05:29:40
146,720,597
0
0
Apache-2.0
2018-08-30T08:35:30
2018-08-30T08:35:30
null
UTF-8
Java
false
false
1,697
java
/* * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) 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 org.wso2.carbon.device.mgt.input.adapter.http.authorization.client.dto; import java.util.List; /** * DTO of the authorization request */ public class AuthorizationRequest { String tenantDomain; String username; List<DeviceIdentifier> deviceIdentifiers; List<String> permissions; public String getTenantDomain() { return tenantDomain; } public void setTenantDomain(String tenantDomain) { this.tenantDomain = tenantDomain; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public List<DeviceIdentifier> getDeviceIdentifiers() { return deviceIdentifiers; } public void setDeviceIdentifiers(List<DeviceIdentifier> deviceIdentifiers) { this.deviceIdentifiers = deviceIdentifiers; } public List<String> getPermissions() { return permissions; } public void setPermissions(List<String> permissions) { this.permissions = permissions; } }
[ "ayyoobhamza@gmail.com" ]
ayyoobhamza@gmail.com
5a8d213fbde64032eb4c3ba30cb37d268efdbf74
1a4770c215544028bad90c8f673ba3d9e24f03ad
/second/quark/src/main/java/com/uc/framework/resources/ab.java
7fb95bbb2e5dcd7b7486d3621d7a75113c94557d
[]
no_license
zhang1998/browser
e480fbd6a43e0a4886fc83ea402f8fbe5f7c7fce
4eee43a9d36ebb4573537eddb27061c67d84c7ba
refs/heads/master
2021-05-03T06:32:24.361277
2018-02-10T10:35:36
2018-02-10T10:35:36
120,590,649
8
10
null
null
null
null
UTF-8
Java
false
false
3,242
java
package com.uc.framework.resources; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable.ConstantState; /* compiled from: ProGuard */ abstract class ab extends ConstantState { final ac b; int c; int d; Drawable[] e; int f; boolean g = false; Rect h = null; boolean i = false; boolean j = false; int k; int l; int m; int n; boolean o = false; int p; boolean q = false; boolean r; boolean s; boolean t; ab(ab abVar, ac acVar) { int i = 0; this.b = acVar; if (abVar != null) { this.c = abVar.c; this.d = abVar.d; Drawable[] drawableArr = abVar.e; this.e = new Drawable[drawableArr.length]; this.f = abVar.f; int i2 = this.f; while (i < i2) { this.e[i] = drawableArr[i].getConstantState().newDrawable().mutate(); this.e[i].setCallback(acVar); i++; } this.t = true; this.s = true; this.g = abVar.g; if (abVar.h != null) { this.h = new Rect(abVar.h); } this.i = abVar.i; this.j = abVar.j; this.k = abVar.k; this.l = abVar.l; this.o = abVar.o; this.p = abVar.p; this.q = abVar.q; this.r = abVar.r; return; } this.e = new Drawable[10]; this.f = 0; this.t = false; this.s = false; } public int getChangingConfigurations() { return this.c; } final void a() { int i = 0; this.j = true; int i2 = this.f; this.l = 0; this.k = 0; this.n = 0; this.m = 0; while (i < i2) { Drawable drawable = this.e[i]; int intrinsicWidth = drawable.getIntrinsicWidth(); if (intrinsicWidth > this.k) { this.k = intrinsicWidth; } intrinsicWidth = drawable.getIntrinsicHeight(); if (intrinsicWidth > this.l) { this.l = intrinsicWidth; } intrinsicWidth = drawable.getMinimumWidth(); if (intrinsicWidth > this.m) { this.m = intrinsicWidth; } int minimumHeight = drawable.getMinimumHeight(); if (minimumHeight > this.n) { this.n = minimumHeight; } i++; } } void a(int i, int i2) { Object obj = new Drawable[i2]; System.arraycopy(this.e, 0, obj, 0, i); this.e = obj; } final synchronized boolean b() { boolean z; synchronized (this) { if (!this.s) { this.t = true; int i = this.f; for (int i2 = 0; i2 < i; i2++) { if (this.e[i2].getConstantState() == null) { this.t = false; break; } } this.s = true; } z = this.t; } return z; } }
[ "2764207312@qq.com" ]
2764207312@qq.com
a4a7c12ab40e6fc9ded267cfd5115420e5b35733
abef0764dcd1426957aa99c900c02ab7b6794cdf
/src/java/com/echothree/model/control/core/common/transfer/EntityIntegerRangeTransfer.java
a7f06d2482407258650273c9d86101d9f23fa956
[ "Apache-2.0", "Apache-1.1", "MIT" ]
permissive
simhaonline/echothree
99edcaab549b9ceea421e12462bfc02fd6622a79
a29c32e1e5d2f3548540a7139833cd012df9b96a
refs/heads/master
2022-08-24T20:51:38.059177
2020-05-30T01:35:50
2020-05-30T01:35:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,159
java
// -------------------------------------------------------------------------------- // Copyright 2002-2020 Echo Three, LLC // // 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.echothree.model.control.core.common.transfer; import com.echothree.util.common.transfer.BaseTransfer; public class EntityIntegerRangeTransfer extends BaseTransfer { private EntityAttributeTransfer entityAttribute; private String entityIntegerRangeName; private Integer minimumIntegerValue; private Integer maximumIntegerValue; private Boolean isDefault; private Integer sortOrder; private String description; /** Creates a new instance of EntityIntegerRangeTransfer */ public EntityIntegerRangeTransfer(EntityAttributeTransfer entityAttribute, String entityIntegerRangeName, Integer minimumIntegerValue, Integer maximumIntegerValue, Boolean isDefault, Integer sortOrder, String description) { this.entityAttribute = entityAttribute; this.entityIntegerRangeName = entityIntegerRangeName; this.minimumIntegerValue = minimumIntegerValue; this.maximumIntegerValue = maximumIntegerValue; this.isDefault = isDefault; this.sortOrder = sortOrder; this.description = description; } /** * @return the entityAttribute */ public EntityAttributeTransfer getEntityAttribute() { return entityAttribute; } /** * @param entityAttribute the entityAttribute to set */ public void setEntityAttribute(EntityAttributeTransfer entityAttribute) { this.entityAttribute = entityAttribute; } /** * @return the entityIntegerRangeName */ public String getEntityIntegerRangeName() { return entityIntegerRangeName; } /** * @param entityIntegerRangeName the entityIntegerRangeName to set */ public void setEntityIntegerRangeName(String entityIntegerRangeName) { this.entityIntegerRangeName = entityIntegerRangeName; } /** * @return the minimumIntegerValue */ public Integer getMinimumIntegerValue() { return minimumIntegerValue; } /** * @param minimumIntegerValue the minimumIntegerValue to set */ public void setMinimumIntegerValue(Integer minimumIntegerValue) { this.minimumIntegerValue = minimumIntegerValue; } /** * @return the maximumIntegerValue */ public Integer getMaximumIntegerValue() { return maximumIntegerValue; } /** * @param maximumIntegerValue the maximumIntegerValue to set */ public void setMaximumIntegerValue(Integer maximumIntegerValue) { this.maximumIntegerValue = maximumIntegerValue; } /** * @return the isDefault */ public Boolean getIsDefault() { return isDefault; } /** * @param isDefault the isDefault to set */ public void setIsDefault(Boolean isDefault) { this.isDefault = isDefault; } /** * @return the sortOrder */ public Integer getSortOrder() { return sortOrder; } /** * @param sortOrder the sortOrder to set */ public void setSortOrder(Integer sortOrder) { this.sortOrder = sortOrder; } /** * @return the description */ public String getDescription() { return description; } /** * @param description the description to set */ public void setDescription(String description) { this.description = description; } }
[ "rich@echothree.com" ]
rich@echothree.com
7c8ff668c76edceaa190d6b4841a53ba70c65f27
9049eabb2562cd3e854781dea6bd0a5e395812d3
/sources/com/google/android/gms/auth/setup/d2d/SmartDeviceChimeraActivity.java
c657f2a81fd3ab0cd8c952d7612074122ee34c19
[]
no_license
Romern/gms_decompiled
4c75449feab97321da23ecbaac054c2303150076
a9c245404f65b8af456b7b3440f48d49313600ba
refs/heads/master
2022-07-17T23:22:00.441901
2020-05-17T18:26:16
2020-05-17T18:26:16
264,227,100
2
5
null
null
null
null
UTF-8
Java
false
false
3,570
java
package com.google.android.gms.auth.setup.d2d; import android.content.Intent; import android.os.Bundle; import java.io.Serializable; /* compiled from: :com.google.android.gms@201515033@20.15.15 (120300-306758586) */ public class SmartDeviceChimeraActivity extends jtw { /* renamed from: e */ public static final sek f11259e = new sek("SmartDevice", "D2D", "SmartDeviceActivity"); /* renamed from: f */ public static final imr f11260f = imr.m15727a("callerIdentity"); /* renamed from: g */ public static final imr f11261g = imr.m15727a("d2d_options"); /* renamed from: h */ public static final rtc f11262h = rtc.m34379a("smartdevice:enable_d2d_v2_target", true); /* renamed from: p */ private boolean f11263p = false; /* renamed from: q */ private boolean f11264q = false; /* renamed from: a */ public final void mo7768a() { mo7860c(); } /* renamed from: bd */ public final void mo7769bd() { onBackPressed(); } /* access modifiers changed from: protected */ public final void onActivityResult(int i, int i2, Intent intent) { this.f11264q = true; sek sek = f11259e; Integer valueOf = Integer.valueOf(i2); sek.mo25409a("onActivityResult(requestCode=%d, resultCode=%d)", Integer.valueOf(i), valueOf); if (i == 1234) { if (i2 != -1) { if (i2 == 0) { f11259e.mo25414c("Smartdevice setup was canceled", new Object[0]); mo7874a(0, intent); return; } else if (i2 == 1) { f11259e.mo25414c("Smartdevice setup was skipped", new Object[0]); mo7860c(); return; } else if (!(i2 == 102 || i2 == 103)) { f11259e.mo25416d("Unrecognised result code from SmartDevice. Ignoring.", new Object[0]); return; } } f11259e.mo25414c("SmartDevice setup was completed with result code: %d", valueOf); this.f23206c.set(false); mo7874a(i2, intent); ((jtw) this).f23207d.mo64987a(); } } /* access modifiers changed from: protected */ public final void onCreate(Bundle bundle) { super.onCreate(bundle); if (bundle == null) { this.f11263p = true; Intent intent = new Intent(); intent.putExtra("smartdevice.use_immersive_mode", (Serializable) mo14202g().mo13147a(jtw.f23205b, false)); intent.putExtra("smartdevice.theme", (String) mo14202g().mo13146a(jtw.f23204a)); intent.putExtra(f11260f.f21366a, (String) mo14202g().mo13146a(f11260f)); intent.putExtra(f11261g.f21366a, (byte[]) mo14202g().mo13146a(f11261g)); intent.setClassName("com.google.android.gms", "com.google.android.gms.smartdevice.d2d.ui.TargetActivity"); bizc.m103024a(getIntent(), intent); startActivityForResult(intent, 1234); } } /* access modifiers changed from: protected */ public final void onResume() { super.onResume(); if (!this.f11263p && !this.f11264q) { f11259e.mo25418e("The child activity crashed. Skipping D2d.", new Object[0]); mo7860c(); } } /* access modifiers changed from: protected */ public final void onSaveInstanceState(Bundle bundle) { super.onSaveInstanceState(bundle); bundle.putBoolean("launchedTargetActivity", true); } }
[ "roman.karwacik@rwth-aachen.de" ]
roman.karwacik@rwth-aachen.de
ba7d47b13f5271c8a57f4c7bd75521ada0af194d
9fb90a4bcc514fcdfc0003ed2060e88be831ac26
/src/com/mic/demo/exceptions/InputFile.java
12e3140215fd323f1e3ef44474fdee3026aaf3a7
[]
no_license
lpjhblpj/FimicsJava
84cf93030b7172b0986b75c6d3e44226edce2019
0f00b6457500db81d9eac3499de31cc980a46166
refs/heads/master
2020-04-24T23:32:16.893756
2019-02-24T14:45:43
2019-02-24T14:45:43
132,058,969
0
0
null
null
null
null
UTF-8
Java
false
false
1,543
java
//: com.mic.demo.exceptions/InputFile.java package com.mic.demo.exceptions; /* Added by Eclipse.py */ // Paying attention to com.mic.demo.exceptions in constructors. import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class InputFile { private BufferedReader in; public InputFile(String fname) throws Exception { try { in = new BufferedReader(new FileReader(fname)); // Other code that might throw com.mic.demo.exceptions } catch (FileNotFoundException e) { System.out.println("Could not open " + fname); // Wasn't open, so don't close it throw e; } catch (Exception e) { // All other com.mic.demo.exceptions must close it try { in.close(); } catch (IOException e2) { System.out.println("in.close() unsuccessful"); } throw e; // Rethrow } finally { // Don't close it here!!! } } public String getLine() { String s; try { s = in.readLine(); } catch (IOException e) { throw new RuntimeException("readLine() failed"); } return s; } public void dispose() { try { in.close(); System.out.println("dispose() successful"); } catch (IOException e2) { throw new RuntimeException("in.close() failed"); } } } ///:~
[ "lpjhblpj@sina.com" ]
lpjhblpj@sina.com
1f14f285bb6d9591e9ce31ecc20dd6afa1f252ca
4dd22e45d6216df9cd3b64317f6af953f53677b7
/LMS/src/main/java/com/ulearning/ulms/tools/newdocument/exceptions/NewDocumentSysException.java
f1da72417065678cc2ef268ddc7d68c3594c9eea
[]
no_license
tianpeijun198371/flowerpp
1325344032912301aaacd74327f24e45c32efa1e
169d3117ee844594cb84b2114e3fd165475f4231
refs/heads/master
2020-04-05T23:41:48.254793
2008-02-16T18:03:08
2008-02-16T18:03:08
40,278,397
0
0
null
null
null
null
UTF-8
Java
false
false
795
java
/** * NewDocumentSysException.java. * User: Administrator Date: 2005-3-7 * * Copyright (c) 2000-2004.Huaxia Dadi Distance Learning Services Co.,Ltd. * All rights reserved. */ package com.ulearning.ulms.tools.newdocument.exceptions; import com.ulearning.ulms.core.exceptions.ULMSSysException; public class NewDocumentSysException extends ULMSSysException { public NewDocumentSysException() { } public NewDocumentSysException(String msg) { super(msg); } public NewDocumentSysException(String msg, Throwable nested) { super(msg, nested); } public NewDocumentSysException(Throwable nested) { super(nested); } }
[ "flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626" ]
flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626
8c3a67fe330a966af4c172ff27342b06e38e67bd
13307b636ffbd5281ff7ab1be700e1f0770e420c
/JDK-1.8.0.110-b13/src/com/sun/corba/se/PortableActivationIDL/ServerAlreadyUninstalled.java
bea3457892dffa1126b4e50430b0a6e912742d63
[]
no_license
844485538/source-code
e4f55b6bb70088c6998515345d02de90a8e00c99
1ba8a2c3cd6ed6f10dc95ac2932696e03a498159
refs/heads/master
2022-12-15T04:30:09.751916
2019-11-10T09:44:24
2019-11-10T09:44:24
218,294,819
0
0
null
2022-12-10T10:46:58
2019-10-29T13:33:28
Java
UTF-8
Java
false
false
915
java
package com.sun.corba.se.PortableActivationIDL; /** * com/sun/corba/se/PortableActivationIDL/ServerAlreadyUninstalled.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl * Thursday, December 17, 2009 2:13:37 PM GMT-08:00 */ public final class ServerAlreadyUninstalled extends org.omg.CORBA.UserException { public String serverId = null; public ServerAlreadyUninstalled () { super(ServerAlreadyUninstalledHelper.id()); } // ctor public ServerAlreadyUninstalled (String _serverId) { super(ServerAlreadyUninstalledHelper.id()); serverId = _serverId; } // ctor public ServerAlreadyUninstalled (String $reason, String _serverId) { super(ServerAlreadyUninstalledHelper.id() + " " + $reason); serverId = _serverId; } // ctor } // class ServerAlreadyUninstalled
[ "844485538@qq.com" ]
844485538@qq.com
4e2be404542d629402c043f72b9e9c619f2cc132
28823b037ca34bd377de9f67cec3553932aa3013
/src/test/java/org/apache/ibatis/submitted/propertiesinmapperfiles/User.java
60daecac213c91e67d676462b7a0454b4e78568a
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
janforp/mybatis
9240dea373aa7615ebb10fd44c5f0b02b8d6c0d0
bd8dad6ef602e07c8cd14c5db79186071c5ff90b
refs/heads/master
2022-07-08T19:43:24.594569
2020-04-04T14:31:56
2020-04-04T14:31:56
246,563,112
0
0
Apache-2.0
2022-06-29T19:34:00
2020-03-11T12:20:26
Java
UTF-8
Java
false
false
162
java
package org.apache.ibatis.submitted.propertiesinmapperfiles; import lombok.Data; @Data public class User { private Integer id; private String name; }
[ "zhucj@servyou.com.cn" ]
zhucj@servyou.com.cn
0446b555c775b1ae1e6a4361979bed091cd3c239
52f27921148d69e8ef235ac6b05e010e50cd04fb
/business/business-school/src/test/java/com/example/springdemo/businessSchool/AsyncTest1.java
7004866b93b8eb671ff1338331a407514d37bb12
[]
no_license
guleidamu/springdemo2
7d049950ffb66c7bc456913c6b097954ed4d9c56
d081197a9f6b7641f234e66d024240cb4e3a23d4
refs/heads/master
2022-06-23T09:43:52.595139
2020-07-17T06:43:02
2020-07-17T06:43:02
208,819,193
0
0
null
2022-06-17T03:29:14
2019-09-16T14:22:30
Java
UTF-8
Java
false
false
848
java
package com.example.springdemo.businessSchool; import com.example.springdemo.businessSchool.service.AsyncService; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import javax.annotation.Resource; /** * @ Author :damu * @ Date :Created in 9:43 2020/6/28 * @ Modified By: * @Version: 1.0.0 */ @RunWith(SpringRunner.class) @SpringBootTest(classes = BusinessSchoolApplication.class) public class AsyncTest1 { @Resource private AsyncService asyncService; @Test public void asyncTest() throws InterruptedException{ for (int i = 0; i< 10; i++){ asyncService.executeAsync1(); asyncService.executeAsync2(); } Thread.sleep(1000); } }
[ "364632363@qq.com" ]
364632363@qq.com
bd42ac0bfb81baf748a660e9f4d318964aaf3060
8ef5dba87266ec527514fe14a79e23f10bd02a6e
/didn't work/TawseelReallyClone/app/src/main/java/com/fasterxml/jackson/databind/ser/impl/ReadOnlyClassToSerializerMap.java
e99da70269858fe3502ff871839fd0ae73127794
[]
no_license
ahmedmgh67/What-s-Fatora
4cfff6ae6c5b41f4b8fc23068d219f63251854ff
53c90a17542ecca1fe267816219d9f0c78471c92
refs/heads/master
2020-04-28T06:14:33.730056
2019-02-15T21:41:28
2019-02-15T21:41:28
175,049,535
0
0
null
null
null
null
UTF-8
Java
false
false
5,379
java
package com.fasterxml.jackson.databind.ser.impl; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.util.TypeKey; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public final class ReadOnlyClassToSerializerMap { private final Bucket[] _buckets; private final int _mask; private final int _size; public ReadOnlyClassToSerializerMap(Map<TypeKey, JsonSerializer<Object>> paramMap) { int i = findSize(paramMap.size()); this._size = i; this._mask = (i - 1); Bucket[] arrayOfBucket = new Bucket[i]; paramMap = paramMap.entrySet().iterator(); while (paramMap.hasNext()) { Map.Entry localEntry = (Map.Entry)paramMap.next(); TypeKey localTypeKey = (TypeKey)localEntry.getKey(); i = localTypeKey.hashCode() & this._mask; arrayOfBucket[i] = new Bucket(arrayOfBucket[i], localTypeKey, (JsonSerializer)localEntry.getValue()); } this._buckets = arrayOfBucket; } private static final int findSize(int paramInt) { if (paramInt <= 64) { paramInt += paramInt; } int i; for (;;) { i = 8; while (i < paramInt) { i += i; } paramInt += (paramInt >> 2); } return i; } public static ReadOnlyClassToSerializerMap from(HashMap<TypeKey, JsonSerializer<Object>> paramHashMap) { return new ReadOnlyClassToSerializerMap(paramHashMap); } public int size() { return this._size; } public JsonSerializer<Object> typedValueSerializer(JavaType paramJavaType) { Bucket localBucket2 = this._buckets[(TypeKey.typedHash(paramJavaType) & this._mask)]; if (localBucket2 == null) { return null; } Bucket localBucket1 = localBucket2; if (localBucket2.matchesTyped(paramJavaType)) { return localBucket2.value; } do { localBucket2 = localBucket1.next; if (localBucket2 == null) { break; } localBucket1 = localBucket2; } while (!localBucket2.matchesTyped(paramJavaType)); return localBucket2.value; } public JsonSerializer<Object> typedValueSerializer(Class<?> paramClass) { Bucket localBucket2 = this._buckets[(TypeKey.typedHash(paramClass) & this._mask)]; if (localBucket2 == null) { return null; } Bucket localBucket1 = localBucket2; if (localBucket2.matchesTyped(paramClass)) { return localBucket2.value; } do { localBucket2 = localBucket1.next; if (localBucket2 == null) { break; } localBucket1 = localBucket2; } while (!localBucket2.matchesTyped(paramClass)); return localBucket2.value; } public JsonSerializer<Object> untypedValueSerializer(JavaType paramJavaType) { Bucket localBucket2 = this._buckets[(TypeKey.untypedHash(paramJavaType) & this._mask)]; if (localBucket2 == null) { return null; } Bucket localBucket1 = localBucket2; if (localBucket2.matchesUntyped(paramJavaType)) { return localBucket2.value; } do { localBucket2 = localBucket1.next; if (localBucket2 == null) { break; } localBucket1 = localBucket2; } while (!localBucket2.matchesUntyped(paramJavaType)); return localBucket2.value; } public JsonSerializer<Object> untypedValueSerializer(Class<?> paramClass) { Bucket localBucket2 = this._buckets[(TypeKey.untypedHash(paramClass) & this._mask)]; if (localBucket2 == null) { return null; } Bucket localBucket1 = localBucket2; if (localBucket2.matchesUntyped(paramClass)) { return localBucket2.value; } do { localBucket2 = localBucket1.next; if (localBucket2 == null) { break; } localBucket1 = localBucket2; } while (!localBucket2.matchesUntyped(paramClass)); return localBucket2.value; } private static final class Bucket { protected final Class<?> _class; protected final boolean _isTyped; protected final JavaType _type; public final Bucket next; public final JsonSerializer<Object> value; public Bucket(Bucket paramBucket, TypeKey paramTypeKey, JsonSerializer<Object> paramJsonSerializer) { this.next = paramBucket; this.value = paramJsonSerializer; this._isTyped = paramTypeKey.isTyped(); this._class = paramTypeKey.getRawType(); this._type = paramTypeKey.getType(); } public boolean matchesTyped(JavaType paramJavaType) { return (this._isTyped) && (paramJavaType.equals(this._type)); } public boolean matchesTyped(Class<?> paramClass) { return (this._class == paramClass) && (this._isTyped); } public boolean matchesUntyped(JavaType paramJavaType) { return (!this._isTyped) && (paramJavaType.equals(this._type)); } public boolean matchesUntyped(Class<?> paramClass) { return (this._class == paramClass) && (!this._isTyped); } } } /* Location: H:\As A Bussines Man\confedince\App Dev Department\What's Fatora\Tawseel APK\Client\dex2jar-2.0\t-dex2jar.jar!\com\fasterxml\jackson\databind\ser\impl\ReadOnlyClassToSerializerMap.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ahmedmgh67@gmail.com" ]
ahmedmgh67@gmail.com
f9aa3ad295b9593ec0525eb4eb9b0b3f3b0566aa
71c4e3fe1217d49194a4332fed7069ecf990b378
/src/test/java/ru/elcoder/leetcode/ContainsDuplicateSolutionTest.java
9a4e28711dfe7dd6b03f70b5584e477fb574b893
[]
no_license
xuthus/leetcode-java
610c8957927d99a3d38bea4c98506405e615a9c0
7aa359b3145c15acb4a7a33c63d41b111ed5adbf
refs/heads/master
2023-01-23T07:21:53.271172
2023-01-16T06:57:54
2023-01-16T06:57:54
90,063,882
1
0
null
2021-04-02T04:34:33
2017-05-02T18:13:37
Java
UTF-8
Java
false
false
889
java
package ru.elcoder.leetcode; import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static ru.elcoder.leetcode.utils.Utils.arrayOf; public class ContainsDuplicateSolutionTest { @Test public void containsDuplicate1() { final ContainsDuplicateSolution solution = new ContainsDuplicateSolution(); assertTrue(solution.containsDuplicate(arrayOf(1, 2, 3, 1))); } @Test public void containsDuplicate2() { final ContainsDuplicateSolution solution = new ContainsDuplicateSolution(); assertFalse(solution.containsDuplicate(arrayOf(1, 2, 3, 4))); } @Test public void containsDuplicate3() { final ContainsDuplicateSolution solution = new ContainsDuplicateSolution(); assertTrue(solution.containsDuplicate(arrayOf(1, 1, 1, 3, 3, 4, 3, 2, 4, 2))); } }
[ "xuthus@yandex.ru" ]
xuthus@yandex.ru
8a936a29668e7179984c999414b98e8c6bbe7b2a
2bdedcda705f6dcf45a1e9a090377f892bcb58bb
/src/main/output/back/city_kerberos_friend_problem_teacher/minute/study_law.java
8a866d82d449bcef3339773a71d8e28adae75a53
[]
no_license
matkosoric/GenericNameTesting
860a22af1098dda9ea9e24a1fc681bb728aa2d69
03f4a38229c28bc6d83258e5a84fce4b189d5f00
refs/heads/master
2021-01-08T22:35:20.022350
2020-02-21T11:28:21
2020-02-21T11:28:21
242,123,053
1
0
null
null
null
null
UTF-8
Java
false
false
4,391
java
using CategoriesPOC.TranslatorService; using System; using System.Net; using System.Net.Http; using System.Threading.Tasks; namespace CategoriesPOC.Helpers { public static class TranslatorHelper { private const string SubscriptionKey = "8729faef536dd0d07434f062fb2c59e9"; //Enter here the Key from your Microsoft Translator Text subscription on http://portal.azure.com public static Task<string> Translate(string word, string lang="") { var translatorService = new TranslatorService.LanguageServiceClient(); var authTokenSource = new AzureAuthToken(SubscriptionKey); var token = string.Empty; lang = string.IsNullOrEmpty(lang) ? DetectLanguage(word).Result : lang; if (lang == "en") return Task.FromResult<string>(word); try { token = authTokenSource.GetAccessToken(); return translatorService.TranslateAsync(token, word, lang, "en", "text/plain", "general", string.Empty); } catch (HttpRequestException) { switch (authTokenSource.RequestStatusCode) { case HttpStatusCode.Unauthorized: Console.WriteLine("Request to token service is not authorized (401). Check that the Azure subscription key is valid."); break; case HttpStatusCode.Forbidden: Console.WriteLine("Request to token service is not authorized (403). For accounts in the free-tier, check that the account quota is not exceeded."); break; } throw; } //Console.WriteLine("Translated to French: {0}", translatorService.Translate(token, "Hello World", "en", "fr", "text/plain", "general", string.Empty)); } public static Task<GetTranslationsResponse> GetTranslations(string word, string lang = "") { var translatorService = new TranslatorService.LanguageServiceClient(); var authTokenSource = new AzureAuthToken(SubscriptionKey); var token = string.Empty; lang = string.IsNullOrEmpty(lang) ? DetectLanguage(word).Result : lang; try { token = authTokenSource.GetAccessToken(); var options = new TranslateOptions(); return translatorService.GetTranslationsAsync(token, word, lang, "en", 20, options); } catch (HttpRequestException) { switch (authTokenSource.RequestStatusCode) { case HttpStatusCode.Unauthorized: Console.WriteLine("Request to token service is not authorized (401). Check that the Azure subscription key is valid."); break; case HttpStatusCode.Forbidden: Console.WriteLine("Request to token service is not authorized (403). For accounts in the free-tier, check that the account quota is not exceeded."); break; } throw; } } public static Task<string> DetectLanguage(string str) { var translatorService = new TranslatorService.LanguageServiceClient(); var authTokenSource = new AzureAuthToken(SubscriptionKey); var token = string.Empty; try { token = authTokenSource.GetAccessToken(); return translatorService.DetectAsync(token, str); } catch (HttpRequestException) { switch (authTokenSource.RequestStatusCode) { case HttpStatusCode.Unauthorized: Console.WriteLine("Request to token service is not authorized (401). Check that the Azure subscription key is valid."); break; case HttpStatusCode.Forbidden: Console.WriteLine("Request to token service is not authorized (403). For accounts in the free-tier, check that the account quota is not exceeded."); break; } throw; } //translatorService.Detect(token, str); } } }
[ "soric.matko@gmail.com" ]
soric.matko@gmail.com
35c7905e32c9c2ddc3b8f9b91df4ce2d7f379844
6c69998676e9df8be55e28f6d63942b9f7cef913
/src/com/insigma/siis/local/business/entity/HY02.java
3c0b23c28c811c1d9610790c4e32791a376d7145
[]
no_license
HuangHL92/ZHGBSYS
9dea4de5931edf5c93a6fbcf6a4655c020395554
f2ff875eddd569dca52930d09ebc22c4dcb47baf
refs/heads/master
2023-08-04T04:37:08.995446
2021-09-15T07:35:53
2021-09-15T07:35:53
406,219,162
0
0
null
null
null
null
GB18030
Java
false
false
1,513
java
package com.insigma.siis.local.business.entity; import java.io.Serializable; import java.util.List; /** * @Title 数据库表名 HY02 * @author lvyq 97354625@qq.com * @Description: 本类由HibernateTool工具自动生成 * @date 2019年12月10日 * @version 1.0 */ public class HY02 implements Serializable { private List<HY03> hy03List; public List<HY03> getHy03List() { return hy03List; } public void setHy03List(List<HY03> hy03List) { this.hy03List = hy03List; } /** * 会议阶段唯一标识符 */ private String hy0200; public String getHy0200() { return this.hy0200; } public void setHy0200(final String hy0200) { this.hy0200 = hy0200; } /** * 会议唯一标识符 */ private String hy0100; public String getHy0100() { return this.hy0100; } public void setHy0100(final String hy0100) { this.hy0100 = hy0100; } /** * 会议阶段名称 */ private String hy0201; public String getHy0201() { return this.hy0201; } public void setHy0201(final String hy0201) { this.hy0201 = hy0201; } /** * 会议阶段重点 */ private String hy0202; public String getHy0202() { return this.hy0202; } public void setHy0202(final String hy0202) { this.hy0202 = hy0202; } /** * 会议阶段排序 */ private Integer hy0203; public Integer getHy0203() { return this.hy0203; } public void setHy0203(final Integer hy0203) { this.hy0203 = hy0203; } }
[ "351036848@qq.com" ]
351036848@qq.com
b6ee3dc27af1cf65c2410a146b61c809888a2c9d
78f7fd54a94c334ec56f27451688858662e1495e
/partyanalyst-service/trunk/src/main/java/com/itgrids/partyanalyst/dto/UserPerformanceVO.java
b294104a0106dc1814bdeb49547740da5486ae7f
[]
no_license
hymanath/PA
2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef
d166bf434601f0fbe45af02064c94954f6326fd7
refs/heads/master
2021-09-12T09:06:37.814523
2018-04-13T20:13:59
2018-04-13T20:13:59
129,496,146
1
0
null
null
null
null
UTF-8
Java
false
false
4,693
java
package com.itgrids.partyanalyst.dto; public class UserPerformanceVO { private Long id; private String name; private Long cadreSurveyUserId; private String userName; private Long tabUserId; private String tabUserName; private Long from8to9Count = 0l; private Long from9to10Count = 0l; private Long from10to11Count = 0l; private Long from11to12Count = 0l; private Long from12to1Count = 0l; private Long from1to2Count = 0l; private Long from2to3Count = 0l; private Long from3to4Count = 0l; private Long from4to5Count = 0l; private Long from5to6Count = 0l; private Long from6to7Count = 0l; private Long from7to8Count = 0l; private Long from8pmto8amCount = 0l; private Long todayUptoNowCount = 0l; private Long yesterdayCount = 0l; private Long dayBeforeYesCount = 0l; private Long uptoNowCount = 0l; private Long overAllCount = 0l; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Long getUptoNowCount() { return uptoNowCount; } public void setUptoNowCount(Long uptoNowCount) { this.uptoNowCount = uptoNowCount; } public Long getOverAllCount() { return overAllCount; } public void setOverAllCount(Long overAllCount) { this.overAllCount = overAllCount; } public Long getCadreSurveyUserId() { return cadreSurveyUserId; } public void setCadreSurveyUserId(Long cadreSurveyUserId) { this.cadreSurveyUserId = cadreSurveyUserId; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public Long getTabUserId() { return tabUserId; } public void setTabUserId(Long tabUserId) { this.tabUserId = tabUserId; } public String getTabUserName() { return tabUserName; } public void setTabUserName(String tabUserName) { this.tabUserName = tabUserName; } public Long getFrom8to9Count() { return from8to9Count; } public void setFrom8to9Count(Long from8to9Count) { this.from8to9Count = from8to9Count; } public Long getFrom9to10Count() { return from9to10Count; } public void setFrom9to10Count(Long from9to10Count) { this.from9to10Count = from9to10Count; } public Long getFrom10to11Count() { return from10to11Count; } public void setFrom10to11Count(Long from10to11Count) { this.from10to11Count = from10to11Count; } public Long getFrom11to12Count() { return from11to12Count; } public void setFrom11to12Count(Long from11to12Count) { this.from11to12Count = from11to12Count; } public Long getFrom12to1Count() { return from12to1Count; } public void setFrom12to1Count(Long from12to1Count) { this.from12to1Count = from12to1Count; } public Long getFrom1to2Count() { return from1to2Count; } public void setFrom1to2Count(Long from1to2Count) { this.from1to2Count = from1to2Count; } public Long getFrom2to3Count() { return from2to3Count; } public void setFrom2to3Count(Long from2to3Count) { this.from2to3Count = from2to3Count; } public Long getFrom3to4Count() { return from3to4Count; } public void setFrom3to4Count(Long from3to4Count) { this.from3to4Count = from3to4Count; } public Long getFrom4to5Count() { return from4to5Count; } public void setFrom4to5Count(Long from4to5Count) { this.from4to5Count = from4to5Count; } public Long getFrom5to6Count() { return from5to6Count; } public void setFrom5to6Count(Long from5to6Count) { this.from5to6Count = from5to6Count; } public Long getFrom6to7Count() { return from6to7Count; } public void setFrom6to7Count(Long from6to7Count) { this.from6to7Count = from6to7Count; } public Long getFrom7to8Count() { return from7to8Count; } public void setFrom7to8Count(Long from7to8Count) { this.from7to8Count = from7to8Count; } public Long getFrom8pmto8amCount() { return from8pmto8amCount; } public void setFrom8pmto8amCount(Long from8pmto8amCount) { this.from8pmto8amCount = from8pmto8amCount; } public Long getTodayUptoNowCount() { return todayUptoNowCount; } public void setTodayUptoNowCount(Long todayUptoNowCount) { this.todayUptoNowCount = todayUptoNowCount; } public Long getYesterdayCount() { return yesterdayCount; } public void setYesterdayCount(Long yesterdayCount) { this.yesterdayCount = yesterdayCount; } public Long getDayBeforeYesCount() { return dayBeforeYesCount; } public void setDayBeforeYesCount(Long dayBeforeYesCount) { this.dayBeforeYesCount = dayBeforeYesCount; } }
[ "itgrids@b17b186f-d863-de11-8533-00e0815b4126" ]
itgrids@b17b186f-d863-de11-8533-00e0815b4126
3c75778432f2f6d98e18012de7831f031659a246
cf07f2eee4c7f857626e0b203604d03d05c0cabd
/Ex-kogito-syntax-spreadsheet-experiment-7.58/src/main/java/com/sample/DroolsTest.java
769bb21029166f931532381eff97dbfaf0e6a03f
[]
no_license
tkobayas/kiegroup-examples
62e7677cb83bcd9e844b780bac09106d0cd693bd
885848c86fc97c7926e73d4d9a75b6b698f6e784
refs/heads/master
2023-08-17T17:07:42.150793
2023-08-15T06:35:34
2023-08-15T06:35:34
240,999,169
16
6
null
2023-09-12T13:57:00
2020-02-17T01:54:57
Java
UTF-8
Java
false
false
1,583
java
package com.sample; import java.io.IOException; import org.drools.core.reteoo.ReteDumper; import org.drools.decisiontable.InputType; import org.drools.decisiontable.SpreadsheetCompiler; import org.kie.api.KieBase; import org.kie.api.KieServices; import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.KieSession; import org.kie.api.runtime.rule.QueryResults; import org.kie.kogito.queries.Applicant; import org.kie.kogito.queries.LoanApplication; public class DroolsTest { public static void main(String[] args) throws IOException { // System.setProperty("drools.dump.dir", "/home/tkobayas/tmp"); KieServices ks = KieServices.Factory.get(); SpreadsheetCompiler compiler = new SpreadsheetCompiler(); String drl = compiler.compile(ks.getResources().newClassPathResource("org/kie/kogito/queries/LoanUnit.xls").getInputStream(), InputType.XLS); System.out.println(drl); KieContainer kcontainer = ks.getKieClasspathContainer(); KieBase kbase = kcontainer.getKieBase(); KieSession ksession = kbase.newKieSession(); ksession.setGlobal("maxAmount", 5000); // ReteDumper.dumpRete(ksession); Applicant applicant = new Applicant("John", 45); LoanApplication loanApplication = new LoanApplication("ABC10001", applicant, 2000, 100); ksession.insert(loanApplication); ksession.fireAllRules(); QueryResults results = ksession.getQueryResults("FindApproved"); System.out.println(results.toList()); ksession.dispose(); } }
[ "toshiyakobayashi@gmail.com" ]
toshiyakobayashi@gmail.com
4522a1d5bd2ca244fae160723d7e521576250aa9
3f480d487f5e88acf6b64e1e424f64e2b0705d53
/net/minecraft/block/BlockPane.java
399c0de20d946a9a1132da90062c55068d23ee43
[]
no_license
a3535ed54a5ee6917a46cfa6c3f12679/bde748d8_obsifight_client_2016
2aecdb987054e44db89d6a7c101ace1bb047f003
cc65846780c262dc8568f1d18a14aac282439c66
refs/heads/master
2021-04-30T11:46:25.656946
2018-02-12T15:10:50
2018-02-12T15:10:50
121,261,090
0
0
null
null
null
null
UTF-8
Java
false
false
6,159
java
package net.minecraft.block; import java.util.List; import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockPane extends Block { private final String field_150100_a; private final boolean field_150099_b; private final String field_150101_M; private IIcon field_150102_N; private static final String __OBFID = "CL_00000322"; protected BlockPane(String p_i45432_1_, String p_i45432_2_, Material p_i45432_3_, boolean p_i45432_4_) { super(p_i45432_3_); this.field_150100_a = p_i45432_2_; this.field_150099_b = p_i45432_4_; this.field_150101_M = p_i45432_1_; this.setCreativeTab(CreativeTabs.tabDecorations); } public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return !this.field_150099_b?null:super.getItemDropped(p_149650_1_, p_149650_2_, p_149650_3_); } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } public int getRenderType() { return this.blockMaterial == Material.glass?41:18; } public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) { return p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_) == this?false:super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_); } public void addCollisionBoxesToList(World p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_) { boolean var8 = this.func_150098_a(p_149743_1_.getBlock(p_149743_2_, p_149743_3_, p_149743_4_ - 1)); boolean var9 = this.func_150098_a(p_149743_1_.getBlock(p_149743_2_, p_149743_3_, p_149743_4_ + 1)); boolean var10 = this.func_150098_a(p_149743_1_.getBlock(p_149743_2_ - 1, p_149743_3_, p_149743_4_)); boolean var11 = this.func_150098_a(p_149743_1_.getBlock(p_149743_2_ + 1, p_149743_3_, p_149743_4_)); if((!var10 || !var11) && (var10 || var11 || var8 || var9)) { if(var10 && !var11) { this.setBlockBounds(0.0F, 0.0F, 0.4375F, 0.5F, 1.0F, 0.5625F); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); } else if(!var10 && var11) { this.setBlockBounds(0.5F, 0.0F, 0.4375F, 1.0F, 1.0F, 0.5625F); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); } } else { this.setBlockBounds(0.0F, 0.0F, 0.4375F, 1.0F, 1.0F, 0.5625F); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); } if((!var8 || !var9) && (var10 || var11 || var8 || var9)) { if(var8 && !var9) { this.setBlockBounds(0.4375F, 0.0F, 0.0F, 0.5625F, 1.0F, 0.5F); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); } else if(!var8 && var9) { this.setBlockBounds(0.4375F, 0.0F, 0.5F, 0.5625F, 1.0F, 1.0F); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); } } else { this.setBlockBounds(0.4375F, 0.0F, 0.0F, 0.5625F, 1.0F, 1.0F); super.addCollisionBoxesToList(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_, p_149743_5_, p_149743_6_, p_149743_7_); } } public void setBlockBoundsForItemRender() { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); } public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { float var5 = 0.4375F; float var6 = 0.5625F; float var7 = 0.4375F; float var8 = 0.5625F; boolean var9 = this.func_150098_a(p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ - 1)); boolean var10 = this.func_150098_a(p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ + 1)); boolean var11 = this.func_150098_a(p_149719_1_.getBlock(p_149719_2_ - 1, p_149719_3_, p_149719_4_)); boolean var12 = this.func_150098_a(p_149719_1_.getBlock(p_149719_2_ + 1, p_149719_3_, p_149719_4_)); if((!var11 || !var12) && (var11 || var12 || var9 || var10)) { if(var11 && !var12) { var5 = 0.0F; } else if(!var11 && var12) { var6 = 1.0F; } } else { var5 = 0.0F; var6 = 1.0F; } if((!var9 || !var10) && (var11 || var12 || var9 || var10)) { if(var9 && !var10) { var7 = 0.0F; } else if(!var9 && var10) { var8 = 1.0F; } } else { var7 = 0.0F; var8 = 1.0F; } this.setBlockBounds(var5, 0.0F, var7, var6, 1.0F, var8); } public IIcon func_150097_e() { return this.field_150102_N; } public final boolean func_150098_a(Block p_150098_1_) { return p_150098_1_.func_149730_j() || p_150098_1_ == this || p_150098_1_ == Blocks.glass || p_150098_1_ == Blocks.stained_glass || p_150098_1_ == Blocks.stained_glass_pane || p_150098_1_ instanceof BlockPane; } protected boolean canSilkHarvest() { return true; } protected ItemStack createStackedBlock(int p_149644_1_) { return new ItemStack(Item.getItemFromBlock(this), 1, p_149644_1_); } public void registerBlockIcons(IIconRegister p_149651_1_) { this.blockIcon = p_149651_1_.registerIcon(this.field_150101_M); this.field_150102_N = p_149651_1_.registerIcon(this.field_150100_a); } }
[ "unknowlk@tuta.io" ]
unknowlk@tuta.io
a2717ddd8187a5381328edaefb2f517fe8653353
e3a09a1c199fb3e32d1e43c1393ec133fa34ceab
/game/data/scripts/handlers/effecthandlers/CpHealPercent.java
94d2ff3c6bf5f2e486a7599658d3267b8a5dae2d
[]
no_license
Refuge89/l2mobius-helios
0fbaf2a11b02ce12c7970234d4b52efa066ef122
d1251e1fb5a2a40925839579bf459083a84b0c59
refs/heads/master
2020-03-23T01:37:03.354874
2018-07-14T06:52:51
2018-07-14T06:52:51
140,927,248
1
0
null
2018-07-14T07:49:40
2018-07-14T07:49:39
null
UTF-8
Java
false
false
2,599
java
/* * This file is part of the L2J Mobius project. * * 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 3 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, see <http://www.gnu.org/licenses/>. */ package handlers.effecthandlers; import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; /** * Cp Heal Percent effect implementation. * @author UnAfraid */ public final class CpHealPercent extends AbstractEffect { private final double _power; public CpHealPercent(StatsSet params) { _power = params.getDouble("power", 0); } @Override public boolean isInstant() { return true; } @Override public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item) { if (effected.isDead() || effected.isDoor() || effected.isHpBlocked()) { return; } double amount = 0; final double power = _power; final boolean full = (power == 100.0); amount = full ? effected.getMaxCp() : (effected.getMaxCp() * power) / 100.0; // Prevents overheal and negative amount amount = Math.max(Math.min(amount, effected.getMaxRecoverableCp() - effected.getCurrentCp()), 0); if (amount != 0) { final double newCp = amount + effected.getCurrentCp(); effected.setCurrentCp(newCp, false); effected.broadcastStatusUpdate(effector); } if ((effector != null) && (effector != effected)) { final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_CP_HAS_BEEN_RESTORED_BY_C1); sm.addString(effector.getName()); sm.addInt((int) amount); effected.sendPacket(sm); } else { final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CP_HAS_BEEN_RESTORED); sm.addInt((int) amount); effected.sendPacket(sm); } } }
[ "conan_513@hotmail.com" ]
conan_513@hotmail.com
e9e24f3ea2a76613f16e865ab0e20a4455796c65
a466bc80061d8686a6ba9547c88a005201b556c2
/app/src/main/java/cc/bocang/bocang/global/Constance.java
0f6acce1ab9fc7f9365928aed37b868bd5b0980b
[]
no_license
gamekonglee/yangguang
22e1bcd2ff5882d155c3c5684042769208dd1a70
0b23b8e6e86143843352cc9a1a6b25d17e94da64
refs/heads/master
2020-07-05T15:06:25.775305
2019-09-25T09:59:25
2019-09-25T09:59:25
202,680,325
0
0
null
null
null
null
UTF-8
Java
false
false
180
java
package cc.bocang.bocang.global; public class Constance { public static final String APP_ID = "wx0d5873a8c4a78126"; public static final String QQ_APP_ID = "1105698263"; }
[ "451519474@qq.com" ]
451519474@qq.com
c383598d3d96e1afb6834a701f64f11122fe3fa9
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/HBase/6900_2.java
da5c6b98c074e8c8e1ff8bd38259b03cbaca3e13
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
2,577
java
//,temp,THBaseService.java,6758,6802,temp,Hbase.java,5532,5577 //,3 public class xxx { public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TRegionInfo>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TRegionInfo>>() { public void onComplete(java.util.List<TRegionInfo> o) { getTableRegions_result result = new getTableRegions_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getTableRegions_result result = new getTableRegions_result(); if (e instanceof IOError) { result.io = (IOError) e; result.setIoIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
26bf73dd5b043a9f3982fca2d25878d0150f985e
08a7acf1d20dffed5ac14206e03612ede9e4cadd
/bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/scoring/ScoringManager.java
3d69e02181077824c2c053a77031138cd20ee636
[]
no_license
wiwqy/retailscm-biz-suite
fb630c8dee3e309f9e60a159f8ac6d0d54b24b11
59014c81395f60195fcff14e3d367fbdd8ad2458
refs/heads/master
2020-09-06T15:07:25.419253
2019-11-02T00:16:00
2019-11-02T00:16:00
220,460,562
1
0
null
2019-11-08T12:16:09
2019-11-08T12:16:08
null
UTF-8
Java
false
false
2,314
java
package com.doublechaintech.retailscm.scoring; import java.math.BigDecimal; import java.util.Date; import java.util.Map; import com.terapico.caf.DateTime; import com.doublechaintech.retailscm.RetailscmUserContext; import com.doublechaintech.retailscm.BaseEntity; import com.doublechaintech.retailscm.SmartList; public interface ScoringManager{ public Scoring createScoring(RetailscmUserContext userContext, String scoredBy, int score, String comment) throws Exception; public Scoring updateScoring(RetailscmUserContext userContext,String scoringId, int scoringVersion, String property, String newValueExpr,String [] tokensExpr) throws Exception; public Scoring loadScoring(RetailscmUserContext userContext, String scoringId, String [] tokensExpr) throws Exception; public Scoring internalSaveScoring(RetailscmUserContext userContext, Scoring scoring) throws Exception; public Scoring internalSaveScoring(RetailscmUserContext userContext, Scoring scoring,Map<String,Object>option) throws Exception; public void delete(RetailscmUserContext userContext, String scoringId, int version) throws Exception; public int deleteAll(RetailscmUserContext userContext, String secureCode ) throws Exception; public void onNewInstanceCreated(RetailscmUserContext userContext, Scoring newCreated)throws Exception; /*======================================================DATA MAINTENANCE===========================================================*/ //public EmployeeCompanyTrainingManager getEmployeeCompanyTrainingManager(RetailscmUserContext userContext, String scoringId, String employeeId, String trainingId ,String [] tokensExpr) throws Exception; public Scoring addEmployeeCompanyTraining(RetailscmUserContext userContext, String scoringId, String employeeId, String trainingId , String [] tokensExpr) throws Exception; public Scoring removeEmployeeCompanyTraining(RetailscmUserContext userContext, String scoringId, String employeeCompanyTrainingId, int employeeCompanyTrainingVersion,String [] tokensExpr) throws Exception; public Scoring updateEmployeeCompanyTraining(RetailscmUserContext userContext, String scoringId, String employeeCompanyTrainingId, int employeeCompanyTrainingVersion, String property, String newValueExpr,String [] tokensExpr) throws Exception; /* */ }
[ "philip_chang@163.com" ]
philip_chang@163.com
2b98caea5f083f22e64e32fc8fdca66d26447bd2
196496c8aee6392670ed4d6bea410ca4f0f663a5
/modules/junit5/m003/ui-components/src/test/java/junit/org/rapidpm/vaadin/ui/components/CustomerFormPageObject.java
11e0cf06461ef896c265df16c1d5804c7bdc504d
[ "Apache-2.0" ]
permissive
dve/testbench-jumpstart
f95513d6e286ae92e85986a706bb1da48c0dc572
e38a3a68acf90f356d4221bb33aa2c739b7c6647
refs/heads/master
2021-05-06T03:23:15.592361
2017-12-20T10:34:48
2017-12-20T10:34:48
114,890,508
0
0
null
2017-12-20T13:28:48
2017-12-20T13:28:48
null
UTF-8
Java
false
false
1,893
java
package junit.org.rapidpm.vaadin.ui.components; import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.testbench.elements.FormLayoutElement; import com.vaadin.testbench.elements.NativeSelectElement; import com.vaadin.testbench.elements.TextFieldElement; import org.openqa.selenium.WebDriver; import org.rapidpm.vaadin.addons.testbench.junit5.pageobject.AbstractVaadinPageObject; public class CustomerFormPageObject extends AbstractVaadinPageObject { public CustomerFormPageObject(WebDriver webDriver) { super(webDriver); } public String getLastName() { return $(FormLayoutElement.class).$(TextFieldElement.class). get(1).getValue(); } public String getFirstName() { return firstnameTF().getValue(); } public TextFieldElement firstnameTF() { return $(FormLayoutElement.class).$(TextFieldElement.class). first(); } public void setLastName(String lastName) { $(FormLayoutElement.class).$(TextFieldElement.class). get(1).setValue(lastName); } public void setFirstName(String firstName) { $(FormLayoutElement.class).$(TextFieldElement.class). first().setValue(firstName); } public void saveEntry() { saveButton().click(); } public void deleteEntry() { deleteButton().click(); } public ButtonElement deleteButton() { return $(FormLayoutElement.class).$(ButtonElement.class).caption("Delete").first(); } public ButtonElement saveButton() { return $(FormLayoutElement.class).$(ButtonElement.class).caption("Save").first(); } public NativeSelectElement statusSelect() { return $(NativeSelectElement.class).caption("Status").first(); } public void clickSwitchButton() { $(ButtonElement.class).id(TestUI.TEST_SWITCH_BUTTON).click(); } public void clickRegisterButton() { $(ButtonElement.class).id(TestUI.REGISTER_BUTTON).click(); } }
[ "sven.ruppert@gmail.com" ]
sven.ruppert@gmail.com
2378d4a6cb06b03d105608c38d5b29d3ac4cbebc
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/com/viber/voip/bot/d.java
f15cc2f1ca53b7f8229829f235e7f4c401aa161a
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
1,573
java
package com.viber.voip.bot; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView.OnScrollListener; import com.viber.voip.messages.conversation.aa; import com.viber.voip.messages.conversation.adapter.a.a; public class d extends RecyclerView.OnScrollListener { private final b a; private final LinearLayoutManager b; private a c; public d(b paramb, LinearLayoutManager paramLinearLayoutManager) { this.a = paramb; this.b = paramLinearLayoutManager; } private void b() { if (this.c == null) return; int i = this.b.findFirstCompletelyVisibleItemPosition(); if (i < 0) { i = this.b.findFirstVisibleItemPosition(); if (i < 0) i = 0; } aa localaa = this.c.c(); this.a.a(localaa.a(), i); } public void a() { if (this.c == null) return; aa localaa = this.c.c(); Integer localInteger = this.a.a(localaa.a()); if (localInteger == null); for (int i = localaa.M(); ; i = localInteger.intValue()) { this.b.scrollToPosition(i); return; } } public void a(a parama) { this.c = parama; } public void onScrollStateChanged(RecyclerView paramRecyclerView, int paramInt) { if (paramInt == 0) b(); } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_3_dex2jar.jar * Qualified Name: com.viber.voip.bot.d * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
7e276824d9f5d3315639b3b6913b13cbc77842dd
9e64d53b69c90e582fd8d8d79fb8a7e7dc93fb17
/ch.elexis.noatext/src/ag/ion/noa/text/IDocumentIndex.java
f3f5b0cb671c5c637eec0466a9fbf31305ff7892
[]
no_license
jsigle/elexis-base
e89e277516f2eb94d870f399266560700820dcc5
fbda2efb49220b61ef81da58c1fa4b68c28bbcd4
refs/heads/master
2021-01-17T00:08:29.782414
2013-05-05T18:12:15
2013-05-05T18:12:15
6,995,370
0
1
null
null
null
null
UTF-8
Java
false
false
4,516
java
/**************************************************************************** * * * NOA (Nice Office Access) * * ------------------------------------------------------------------------ * * * * The Contents of this file are made available subject to * * the terms of GNU Lesser General Public License Version 2.1. * * * * GNU Lesser General Public License Version 2.1 * * ======================================================================== * * Copyright 2003-2006 by IOn AG * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License version 2.1, as published by the Free Software Foundation. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * * MA 02111-1307 USA * * * * Contact us: * * http://www.ion.ag * * http://ubion.ion.ag * * info@ion.ag * * * ****************************************************************************/ /* * Last changes made by $Author: andreas $, $Date: 2006-10-04 14:14:28 +0200 (Mi, 04 Okt 2006) $ */ package ag.ion.noa.text; /** * Index of a document. * * @author Andreas Bröcker * @version $Revision: 10398 $ * @date 17.08.2006 */ public interface IDocumentIndex { /** Alphabetical index of the document. */ public static final String ALPHABETICAL_INDEX = "com.sun.star.text.DocumentIndex"; /** Content index of the document. */ public static final String CONTENT_INDEX = "com.sun.star.text.ContentIndex"; /** User defined document index. */ public static final String USER_DEFINED_INDEX = "com.sun.star.text.UserIndex"; /** Index of illustrations within the document. */ public static final String ILLUSTARTION_INDEX = "com.sun.star.text.IllustrationIndex"; /** Index of objects within the document. */ public static final String OBJECT_INDEX = "com.sun.star.text.ObjectIndex"; /** Index of tables within the document. */ public static final String TABLE_INDEX = "com.sun.star.text.TableIndex"; /** Bibliographical index of the document. */ public static final String BIBLIOGRAPHICAL_INDEX = "com.sun.star.text.Bibliography"; //---------------------------------------------------------------------------- /** * Returny type of the index. * * @return type of the index * * @see ALPHABETICAL_INDEX * @see CONTENT_INDEX * @see USER_DEFINED_INDEX * @see OBJECT_INDEX * @see TABLE_INDEX * @see BIBLIOGRAPHICAL_INDEX * * @author Andreas Bröcker * @date 17.08.2006 */ public String getType(); //---------------------------------------------------------------------------- /** * Updates the document index. * * @author Andreas Bröcker * @date 17.08.2006 */ public void update(); //---------------------------------------------------------------------------- }
[ "jsigle@think3.sc.de" ]
jsigle@think3.sc.de
2e176c97999af68e0147b9e77ee0b01684fd7882
b39d7e1122ebe92759e86421bbcd0ad009eed1db
/sources/android/bluetooth/BluetoothServerSocket.java
210e9d793cad21013bb1d089125bdb6b5db5e2c5
[]
no_license
AndSource/miuiframework
ac7185dedbabd5f619a4f8fc39bfe634d101dcef
cd456214274c046663aefce4d282bea0151f1f89
refs/heads/master
2022-03-31T11:09:50.399520
2020-01-02T09:49:07
2020-01-02T09:49:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,823
java
package android.bluetooth; import android.annotation.UnsupportedAppUsage; import android.os.Handler; import android.os.ParcelUuid; import android.util.Log; import java.io.Closeable; import java.io.IOException; public final class BluetoothServerSocket implements Closeable { private static final boolean DBG = false; private static final String TAG = "BluetoothServerSocket"; private int mChannel; private Handler mHandler; private int mMessage; @UnsupportedAppUsage final BluetoothSocket mSocket; BluetoothServerSocket(int type, boolean auth, boolean encrypt, int port) throws IOException { this.mChannel = port; this.mSocket = new BluetoothSocket(type, -1, auth, encrypt, null, port, null); if (port == -2) { this.mSocket.setExcludeSdp(true); } } BluetoothServerSocket(int type, boolean auth, boolean encrypt, int port, boolean mitm, boolean min16DigitPin) throws IOException { int i = port; this.mChannel = i; this.mSocket = new BluetoothSocket(type, -1, auth, encrypt, null, port, null, mitm, min16DigitPin); if (i == -2) { this.mSocket.setExcludeSdp(true); } } BluetoothServerSocket(int type, boolean auth, boolean encrypt, ParcelUuid uuid) throws IOException { this.mSocket = new BluetoothSocket(type, -1, auth, encrypt, null, -1, uuid); this.mChannel = this.mSocket.getPort(); } public BluetoothSocket accept() throws IOException { return accept(-1); } public BluetoothSocket accept(int timeout) throws IOException { return this.mSocket.accept(timeout); } public void close() throws IOException { synchronized (this) { if (this.mHandler != null) { this.mHandler.obtainMessage(this.mMessage).sendToTarget(); } } this.mSocket.close(); } /* Access modifiers changed, original: declared_synchronized */ public synchronized void setCloseHandler(Handler handler, int message) { this.mHandler = handler; this.mMessage = message; } /* Access modifiers changed, original: 0000 */ public void setServiceName(String serviceName) { this.mSocket.setServiceName(serviceName); } public int getChannel() { return this.mChannel; } public int getPsm() { return this.mChannel; } /* Access modifiers changed, original: 0000 */ public void setChannel(int newChannel) { BluetoothSocket bluetoothSocket = this.mSocket; if (!(bluetoothSocket == null || bluetoothSocket.getPort() == newChannel)) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("The port set is different that the underlying port. mSocket.getPort(): "); stringBuilder.append(this.mSocket.getPort()); stringBuilder.append(" requested newChannel: "); stringBuilder.append(newChannel); Log.w(TAG, stringBuilder.toString()); } this.mChannel = newChannel; } public String toString() { StringBuilder sb = new StringBuilder(); sb.append("ServerSocket: Type: "); int connectionType = this.mSocket.getConnectionType(); if (connectionType == 1) { sb.append("TYPE_RFCOMM"); } else if (connectionType == 2) { sb.append("TYPE_SCO"); } else if (connectionType == 3) { sb.append("TYPE_L2CAP"); } else if (connectionType == 4) { sb.append("TYPE_L2CAP_LE"); } sb.append(" Channel: "); sb.append(this.mChannel); return sb.toString(); } }
[ "shivatejapeddi@gmail.com" ]
shivatejapeddi@gmail.com
28dcdba0aa0f027abafc1639026074e4120feedc
54bafa3495c01a9530a662d441d45f35652e062f
/src/main/java/cn/promore/bf/serivce/impl/ActInstServiceImpl.java
9a370a4dfdc20458048640630c9a63ad6a11cdf5
[]
no_license
zskang/tsj
d20f397762d230c487c0c9ce2e7a2863dd83050f
0ff6bafec55e77f86097b164fd4f0b48db35eeff
refs/heads/master
2021-07-13T12:46:51.300209
2017-10-18T09:57:45
2017-10-18T09:57:52
107,389,919
0
0
null
null
null
null
UTF-8
Java
false
false
1,099
java
package cn.promore.bf.serivce.impl; import java.util.HashMap; import java.util.Map; import javax.annotation.Resource; import org.springframework.stereotype.Service; import cn.promore.bf.model.ActInst; import cn.promore.bf.model.ActRuTask; import cn.promore.bf.model.DeployEntity; import cn.promore.bf.mydao.ActInstDao; import cn.promore.bf.serivce.ActInstService; @Service public class ActInstServiceImpl implements ActInstService { @Resource private ActInstDao dao; @Override public ActInst queryObjByTaskId(String taskId) { Map<String, Object> map = new HashMap<String, Object>(); map.put("taskId", taskId); return dao.queryObjByTaskId(map); } @Override public String queryObjectByProcessInstanceId(String processInstanceId) { Map<String, Object> map = new HashMap<String, Object>(); map.put("processInstanceId", processInstanceId); ActRuTask ru = dao.queryObjectByProcessInstanceId(map); if (ru != null) { return ru.getProc_def_id_(); } return ""; } @Override public DeployEntity queryInfoBy(Map<String, Object> map) { return dao.queryInfoBy(map); } }
[ "253479240@qq.com" ]
253479240@qq.com
634bcafdb13871e691cca1d4bc3414de1ec27088
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
/MarketBackend/src/com/newco/marketplace/persistence/dao/buyerleadmanagement/BuyerLeadManagementDao.java
9d4a875dd88aa6290c34713addc9c041de629593
[]
no_license
ssriha0/sl-b2b-platform
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
refs/heads/master
2023-01-06T18:32:24.623256
2020-11-05T12:23:26
2020-11-05T12:23:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,045
java
package com.newco.marketplace.persistence.dao.buyerleadmanagement; import java.util.List; import java.util.Map; import com.newco.marketplace.dto.vo.leadsmanagement.BuyerLeadAttachmentVO; import com.newco.marketplace.dto.vo.leadsmanagement.BuyerLeadLookupVO; import com.newco.marketplace.dto.vo.leadsmanagement.BuyerLeadManagementCriteriaVO; import com.newco.marketplace.dto.vo.leadsmanagement.CancelLeadMailVO; import com.newco.marketplace.dto.vo.leadsmanagement.LeadDetailsCriteriaVO; import com.newco.marketplace.dto.vo.leadsmanagement.CancelLeadVO; import com.newco.marketplace.dto.vo.leadsmanagement.LeadHistoryVO; import com.newco.marketplace.dto.vo.leadsmanagement.LeadInfoVO; import com.newco.marketplace.dto.vo.leadsmanagement.ProviderInfoVO; import com.newco.marketplace.dto.vo.leadsmanagement.SLLeadHistoryVO; import com.newco.marketplace.dto.vo.leadsmanagement.SLLeadNotesVO; import com.newco.marketplace.dto.vo.leadsmanagement.InsideSalesLeadCustVO; import com.newco.marketplace.dto.vo.leadsmanagement.InsideSalesLeadVO; import com.newco.marketplace.exception.core.DataServiceException; public interface BuyerLeadManagementDao { public List<LeadInfoVO> getBuyerLeadManagementDetails(BuyerLeadManagementCriteriaVO buyerLeadManagementPagination); public List<BuyerLeadLookupVO> loadStates(); public Integer getBuyerLeadManagementCount(BuyerLeadManagementCriteriaVO buyerLeadManagementCriteriaVO); // public LeadInfoVO getBuyerLeadManagementSummary(String leadId); public List<ProviderInfoVO> getBuyerLeadManagementProviderInfo(String leadId); public ProviderInfoVO getBuyerLeadManagementResourceInfo(ProviderInfoVO leadProviderDetails); public ProviderInfoVO getBuyerLeadManagementResourceScore(ProviderInfoVO resourceDetails); public List<SLLeadNotesVO> getBuyerLeadViewNotes(BuyerLeadManagementCriteriaVO buyerLeadViewNotesCriteriaVO); public List<SLLeadHistoryVO> getBuyerLeadHistory(String leadId); public List<SLLeadHistoryVO> getBuyerLeadHistory(String leadId,String actionId); public Map<String,Integer> getBuyerLeadReasons(String reasonType,String roleType); public List<String> getBuyerLeadNoteCategory(); public List<String> getLeadReasons(String reason); public Map<String,String> getRewardPoints(); public void updateBuyerLeadCustomerInfo(LeadDetailsCriteriaVO leadDeatilsCriteriaVO); // public int cancelLead(CancelLeadVO cancelLeadVO) throws DataServiceException; public void addOrRevokeShopYourWayPoints(int points,String leadId,String menberShipId,String modifiedBy); public List<LeadHistoryVO> getShowYourWayRewardsHistoryForLeadMember(String leadId,String menberShipId); public void insertShowYourWayRewardsHistoryForLeadMember(LeadHistoryVO leadHistoryVO); public Integer selectShopYourWayPointsForLeadMember(String leadId,String memberShipId); //get documents uploaded for a lead public List<BuyerLeadAttachmentVO> getAttachmentDetails(String leadId); //get document by ID public BuyerLeadAttachmentVO retrieveDocumentById(Integer documentId); public List<CancelLeadVO> getCancelLeadEmailDetails(CancelLeadMailVO cancelLeadMailVO); public List<ProviderInfoVO> getBuyerLeadManagementCancelledProviderInfo(String leadId); public Integer saveInsidesSalesLeadInfo(InsideSalesLeadVO insideSalesLeadVO) throws Exception; public void saveInsidesSalesLeadCustInfo(List<InsideSalesLeadCustVO> custInfoList) throws Exception; public InsideSalesLeadVO getLead(String leadId) throws Exception; public void deleteLead(Integer leadId) throws Exception; public void deleteLeadCustomFields(Integer leadId) throws Exception; public void updateLeadStatusHistory(InsideSalesLeadVO insideSalesLeadVO) throws Exception; public void updateIsLeadStatus(InsideSalesLeadVO insideSalesLeadVO) throws Exception; public void updateIsLeadStatusHistory(InsideSalesLeadVO insideSalesLeadVO) throws Exception; }
[ "Kunal.Pise@transformco.com" ]
Kunal.Pise@transformco.com
27dace1dfd1b99dd9ea35a53c168b2a67297f77a
40d0b695cbd08d882c42d38f30d0ddaab21f0252
/wk-app/wk-web/src/main/java/cn/wizzer/app/web/modules/controllers/open/api/test/ApiTestController.java
ccf35dad6e2090060e8b9184b0b15dd47a5f907b
[ "Apache-2.0" ]
permissive
JoeQiao666/medical_waste_server
51e88fd07445b576ddbff3dd0db7f718a471686f
212a45fbdcf680ce866a090196ee00f0e1e6e1ef
refs/heads/master
2022-11-26T05:27:57.743097
2019-09-25T14:10:31
2019-09-25T14:10:31
209,322,430
1
2
Apache-2.0
2022-11-16T06:54:56
2019-09-18T13:58:54
JavaScript
UTF-8
Java
false
false
1,699
java
package cn.wizzer.app.web.modules.controllers.open.api.test; import cn.wizzer.app.web.commons.filter.TokenFilter; import cn.wizzer.framework.base.Result; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.json.Json; import org.nutz.lang.util.NutMap; import org.nutz.log.Log; import org.nutz.log.Logs; import org.nutz.mvc.annotation.*; import javax.servlet.http.HttpServletRequest; /** * Created by wizzer on 2016/8/11. */ @IocBean @At("/open/api/test") @Filters({@By(type = TokenFilter.class)}) public class ApiTestController { private static final Log log = Logs.get(); /** * @api {post} /open/api/test/hi?appid=appid&token=token 测试API * @apiGroup Test * @apiVersion 1.0.0 * @apiPermission token * @apiParam {Object} data 数据对象 * @apiParamExample {json} 示例 * POST /open/api/test/hi?appid=appid&token=token * { * "txt": ""你好,大鲨鱼" * } * @apiSuccess {number} code code * @apiSuccess {String} msg msg * @apiSuccessExample {json} 示例 * HTTP/1.1 200 OK * { * "code": 0, * "msg": "ok" * } * @apiError (失败) {number} code 不等于0 * @apiError (失败) {string} msg 错误文字描述 * @apiErrorExample {json} 示例 * HTTP/1.1 200 OK * { * "code": 1, * "msg": "fail" * } */ @At @Ok("json") @POST public Object hi(@Param("..") NutMap map, HttpServletRequest req) { try { log.debug("map::" + Json.toJson(map)); return Result.success("ok"); } catch (Exception e) { return Result.error("fail"); } } }
[ "chenlingzhi39@gmail.com" ]
chenlingzhi39@gmail.com
0c2202d67fac3206e5c4a156e2996ab099f5bcf2
8af2cf1f79cee13ff06a483cf050088820fcbe1b
/src/main/java/demo/SpringBootReplyApplication.java
0d069db9c0aae250e35512966f5c2b9b74642748
[]
no_license
arahansa/springBootReply
44185434c688628ec440428511786116ee843848
003f2b724f429ae4107b995a193058af0a2d3b06
refs/heads/master
2021-01-02T08:46:11.360979
2015-09-09T03:59:32
2015-09-09T03:59:32
42,154,998
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
package demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringBootReplyApplication { public static void main(String[] args) { SpringApplication.run(SpringBootReplyApplication.class, args); } }
[ "arahansa@naver.com" ]
arahansa@naver.com
491609a6b2d9ab744a16fd32ba3716e74c9a8347
5a44e6076e902f72cb1c7ce50c33295bfb129128
/src/main/java/com/luomo/study/design/patten/chain/mc/McSubbranch.java
e991f3af3edcdaae2279a095defb16e313f3eec7
[]
no_license
LuoMo92/design-mode
87695db313c1381e1ddc5a018979d372cb7eb1ca
6191103e8eac5012f2202ee3e51ea00e49a21cd7
refs/heads/master
2021-07-16T18:34:04.550605
2018-11-30T03:13:06
2018-11-30T03:13:06
111,888,804
0
0
null
null
null
null
UTF-8
Java
false
false
2,615
java
package com.luomo.study.design.patten.chain.mc; import java.util.Collections; import java.util.Map; /** * 麦当劳分店 * @author LiuMei * @date 2018-11-29. */ public class McSubbranch implements Subbranch{ /** * 假设是500米以内送餐 */ private final static int MIN_DISTANCE = 500; /** * 类计数 */ private static int count; /** * 分店号 */ private final int number; /** * 分店的横坐标,用于判断距离 */ private int x; /** * 分店的纵坐标,用于判断距离 */ private int y; /** * 菜单 */ private Map<String, Integer> menu; /** * 下一家分店 */ private Subbranch nextSubbranch; public McSubbranch(int x, int y, Map<String, Integer> menu) { super(); this.x = x; this.y = y; this.menu = menu; number = ++count; } public boolean order(int x,int y,Map<String, Integer> order){ //如果距离小于500米并且订单中的食物不缺货,则订单成功,否则失败 if (CommonUtils.getDistance(x, y, this.x, this.y) < MIN_DISTANCE && !CommonUtils.outOfStock(menu, order)) { for (String name : order.keySet()) { menu.put(name, menu.get(name) - order.get(name)); } return true; }else { return false; } } public Map<String, Integer> getMenu() { return Collections.unmodifiableMap(menu); } @Override public String toString() { return "麦当劳分店第" + number + "个"; } /** * 设置下一家分店 * @param subbranch */ @Override public void setSuccessor(Subbranch subbranch) { this.nextSubbranch = subbranch; } @Override public boolean handleOrder(Order order) { //如果距离小于500米并且订单中的食物不缺货,则订单成功,否则失败 if (CommonUtils.getDistance(order.getX(), order.getY(), this.x, this.y) < MIN_DISTANCE && !CommonUtils.outOfStock(menu, order.getOrder())) { for (String name : order.getOrder().keySet()) { menu.put(name, menu.get(name) - order.getOrder().get(name)); } System.out.println("订餐成功,接受订单的分店是:" + this); return true; } if (nextSubbranch == null) { return false; } return nextSubbranch.handleOrder(order); } public Subbranch getNextSubbranch() { return nextSubbranch; } }
[ "810754420@qq.com" ]
810754420@qq.com
c167f2467cb1a71d37833d734b17ac87e6b29d4e
105526592f5da3dcf6be59249c6bca79a006fa6c
/feilong-lib/feilong-lib-xstream/src/main/java/com/feilong/lib/xstream/annotations/XStreamAsAttribute.java
2a225e67ecb41ca045c623b4e3fdf57f9fad321f
[ "Apache-2.0" ]
permissive
121666751/feilong
4cb471573925f0fedb1d8be27b449576e28d97b5
d59ae9a98924b902e9604b98c3ea24b461bb6b36
refs/heads/master
2023-07-13T13:13:45.872800
2021-08-20T07:21:48
2021-08-20T07:21:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
796
java
/* * Copyright (C) 2006, 2007 XStream Committers. * All rights reserved. * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * * Created on 24. December 2006 by Guilherme Silveira */ package com.feilong.lib.xstream.annotations; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Defines that a field should be serialized as an attribute. * * @author Guilherme Silveira * @since 1.2.2 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) @Documented public @interface XStreamAsAttribute{}
[ "venusdrogon@163.com" ]
venusdrogon@163.com
04443856eefd772e09cb01af709bf24cf1447f92
8124c2729834bda7172105f4226d6002d7da2dc3
/JdbcDemo_New/src/com/jdbc/action/ClientTestSearch.java
7a30f37db2a50d9e248723a960e836528e188eab
[]
no_license
keyur2714/CoreJava
370713b96d809ebf3063be52edf468853aa21e91
c6a2859eb8383c7e31f8da67d20d3622368aa3a0
refs/heads/master
2020-03-09T01:16:55.303543
2018-06-17T09:05:06
2018-06-17T09:05:06
128,510,052
0
0
null
null
null
null
UTF-8
Java
false
false
1,611
java
package com.jdbc.action; import java.sql.*; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import com.jdbc.object.DepartmentObject; public class ClientTestSearch { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Connection connection = null; PreparedStatement psmt = null; List<DepartmentObject> deptList = new ArrayList<DepartmentObject>(); DepartmentObject departmentObject = null; try { Class.forName("com.mysql.jdbc.Driver"); connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/core_java", "root", "admin"); System.out.println("Connection Done..."); System.out.print("Enter String for Search Department: "); String deptSearchString = scanner.next(); String sql = "select * from department where dept_name like ?"; psmt = connection.prepareStatement(sql); psmt.setString(1, deptSearchString); ResultSet resultSet= psmt.executeQuery(); while(resultSet.next()) { departmentObject = new DepartmentObject(); departmentObject.setDeptId(resultSet.getInt(1)); departmentObject.setDeptName(resultSet.getString(2)); // System.out.println(resultSet.getInt(1)+" "+resultSet.getString(2)); deptList.add(departmentObject); } resultSet.close(); psmt.close(); connection.close(); } catch (ClassNotFoundException | SQLException e) { e.printStackTrace(); } System.out.println("...Department List..."); deptList.stream().forEach( (dept)->{ System.out.println(dept.getDeptId()+" "+dept.getDeptName()); } ); } }
[ "keyur.555kn@gmail.com" ]
keyur.555kn@gmail.com
d3e6b432c90b39d7dcf2ebb2826c32ccba4466e0
2950b1a617de82f2feebae9a3a547a6ad340c122
/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xdomxml/src/main/java/org/xwiki/rendering/xdomxml/internal/parser/parameters/MetaDataParser.java
e2c64efa561be38c9b6618e95eb6b56435b3c353
[]
no_license
netconstructor/xwiki-rendering
44401a71ac0ebeeaa0612fd68146f5da915c0699
3ba76c8232f03aa2e1ae0aced35e459165aba4d3
refs/heads/master
2021-01-16T17:51:56.268032
2012-04-27T14:44:12
2012-04-27T14:44:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,334
java
/* * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * 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.xwiki.rendering.xdomxml.internal.parser.parameters; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; import org.xwiki.rendering.listener.MetaData; //FIXME: support any kind of data and not just String public class MetaDataParser extends DefaultHandler { private MetaData metaData = new MetaData(); private StringBuffer value = new StringBuffer(); private int level = 0; private String currentEntry; public MetaData getMetaData() { return this.metaData; } // ContentHandler @Override public void characters(char[] ch, int start, int length) throws SAXException { this.value.append(ch, start, length); } @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (this.level > 0) { this.currentEntry = qName; String name = attributes.getValue("name"); if (name != null) { this.currentEntry = name; } } ++this.level; } @Override public void endElement(String uri, String localName, String qName) throws SAXException { --this.level; if (this.level > 0) { this.metaData.addMetaData(this.currentEntry, this.value.toString()); this.value.setLength(0); } } }
[ "thomas.mortagne@gmail.com" ]
thomas.mortagne@gmail.com
9d87a7c9f4af1a330d70e2497a61f073ac82bf80
eed344103da647469cb8aa9a71c03eb468fd3c2b
/ApiTest/src/test/java/org/itstack/interview/test/ApiTest.java
63eff60c468cd0fcda0d80f29e375b28d64f80c4
[]
no_license
zredMonkey/interview
dc0a97beb5adcbe236dd7edcc6c4608fb89b530e
31a2f17ae331cf8fa5c52a3f77c6848f7c6d384f
refs/heads/master
2023-08-29T20:06:07.359741
2023-08-21T17:00:14
2023-08-21T17:00:14
489,750,830
0
0
null
2023-08-21T17:00:15
2022-05-07T18:21:36
null
UTF-8
Java
false
false
373
java
package org.itstack.interview.test; import org.junit.Test; import sun.misc.Unsafe; /** * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) @2020 */ public class ApiTest { public static void main(String[] args) { // Unsafe.loadFence(); } }
[ "184172133@qq.com" ]
184172133@qq.com
33b733f19ec15b8e87c371460b0e50ec8b6d7ba2
50ca0e65d918498abc707688f70e89a2064819a7
/src/test/java/com/hivemq/extensions/packets/pubrel/ModifiablePubrelPacketImplTest.java
d1e378431f706f77974760e35734ef4d8faaef48
[ "Apache-2.0" ]
permissive
vad-babushkin/hivemq-community-edition
69cc03b7c893d236f5e71c9ad3568c7aff08e24c
25f2a49f616d74fe77b4b82546b04393ba5f3842
refs/heads/master
2020-08-28T06:34:30.799672
2020-02-11T19:53:09
2020-02-11T19:53:09
217,623,050
1
0
Apache-2.0
2020-02-11T19:53:11
2019-10-25T22:25:41
null
UTF-8
Java
false
false
4,657
java
/* * Copyright 2019 dc-square GmbH * * 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.hivemq.extensions.packets.pubrel; import com.hivemq.configuration.service.FullConfigurationService; import com.hivemq.mqtt.message.mqtt5.Mqtt5UserProperties; import com.hivemq.mqtt.message.pubrel.PUBREL; import com.hivemq.mqtt.message.reason.Mqtt5PubRelReasonCode; import org.junit.Before; import org.junit.Test; import util.TestConfigurationBootstrap; import static org.junit.Assert.*; /** * @author Yannick Weber */ public class ModifiablePubrelPacketImplTest { private FullConfigurationService fullConfigurationService; private ModifiablePubrelPacketImpl modifiablePubrelPacket; private PUBREL fullMqtt5Pubrel; @Before public void setUp() throws Exception { fullConfigurationService = new TestConfigurationBootstrap().getFullConfigurationService(); fullMqtt5Pubrel = new PUBREL(1, Mqtt5PubRelReasonCode.SUCCESS, null, Mqtt5UserProperties.NO_USER_PROPERTIES); modifiablePubrelPacket = new ModifiablePubrelPacketImpl(fullConfigurationService, fullMqtt5Pubrel); } @Test public void test_set_reason_string_to_failed() { final PUBREL pubrel = new PUBREL(1, Mqtt5PubRelReasonCode.PACKET_IDENTIFIER_NOT_FOUND, null, Mqtt5UserProperties.NO_USER_PROPERTIES); final ModifiablePubrelPacketImpl modifiablePubrelPacket = new ModifiablePubrelPacketImpl(fullConfigurationService, pubrel); modifiablePubrelPacket.setReasonString("reason"); assertTrue(modifiablePubrelPacket.isModified()); assertTrue(modifiablePubrelPacket.getReasonString().isPresent()); assertEquals("reason", modifiablePubrelPacket.getReasonString().get()); } @Test public void test_set_reason_string_to_null() { final PUBREL pubrel = new PUBREL(1, Mqtt5PubRelReasonCode.PACKET_IDENTIFIER_NOT_FOUND, "reason", Mqtt5UserProperties.NO_USER_PROPERTIES); final ModifiablePubrelPacketImpl modifiablePubrelPacket = new ModifiablePubrelPacketImpl(fullConfigurationService, pubrel); modifiablePubrelPacket.setReasonString(null); assertTrue(modifiablePubrelPacket.isModified()); assertFalse(modifiablePubrelPacket.getReasonString().isPresent()); } @Test public void test_set_reason_string_to_same() { final PUBREL pubrel = new PUBREL(1, Mqtt5PubRelReasonCode.PACKET_IDENTIFIER_NOT_FOUND, "same", Mqtt5UserProperties.NO_USER_PROPERTIES); final ModifiablePubrelPacketImpl modifiablePubrelPacket = new ModifiablePubrelPacketImpl(fullConfigurationService, pubrel); modifiablePubrelPacket.setReasonString("same"); assertFalse(modifiablePubrelPacket.isModified()); } @Test public void test_all_values_set() { final PubrelPacketImpl pubrelPacket = new PubrelPacketImpl(fullMqtt5Pubrel); assertEquals(fullMqtt5Pubrel.getPacketIdentifier(), pubrelPacket.getPacketIdentifier()); assertEquals(fullMqtt5Pubrel.getReasonCode().name(), pubrelPacket.getReasonCode().name()); assertFalse(pubrelPacket.getReasonString().isPresent()); assertEquals(fullMqtt5Pubrel.getUserProperties().size(), pubrelPacket.getUserProperties().asList().size()); } @Test public void test_change_modifiable_does_not_change_copy_of_packet() { final PUBREL pubrel = new PUBREL(1, Mqtt5PubRelReasonCode.PACKET_IDENTIFIER_NOT_FOUND, "reason", Mqtt5UserProperties.NO_USER_PROPERTIES); final ModifiablePubrelPacketImpl modifiablePubrelPacket = new ModifiablePubrelPacketImpl(fullConfigurationService, pubrel); final PubrelPacketImpl pubrelPacket = new PubrelPacketImpl(modifiablePubrelPacket); modifiablePubrelPacket.setReasonString("OTHER REASON STRING"); assertTrue(pubrelPacket.getReasonString().isPresent()); assertEquals(pubrel.getReasonString(), pubrelPacket.getReasonString().get()); assertEquals(pubrel.getReasonCode().name(), pubrelPacket.getReasonCode().name()); } }
[ "gieblsilvio@outlook.com" ]
gieblsilvio@outlook.com
407583847c091c964a5beab0310549a7e4a2fd3b
b9e642cf2dec5c2e757c4d22caa7513d6191c5e5
/aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/model/transform/InvalidMinimumProtocolVersionExceptionUnmarshaller.java
b1c5f119fe8ce919a7793b31e3517cb08ab4a2d4
[ "JSON", "Apache-2.0" ]
permissive
es1220/aws-sdk-java
617c82c99f895375994fde16faca0c8ce73c15b5
f27c2f0e76176c7dd1146444a6c8efaaaffc4f41
refs/heads/master
2020-12-11T08:02:57.629496
2016-01-14T03:34:38
2016-01-14T03:34:38
49,552,994
0
0
null
2016-01-13T06:00:05
2016-01-13T06:00:05
null
UTF-8
Java
false
false
1,628
java
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.cloudfront.model.transform; import org.w3c.dom.Node; import com.amazonaws.AmazonServiceException; import com.amazonaws.util.XpathUtils; import com.amazonaws.transform.StandardErrorUnmarshaller; import com.amazonaws.services.cloudfront.model.InvalidMinimumProtocolVersionException; public class InvalidMinimumProtocolVersionExceptionUnmarshaller extends StandardErrorUnmarshaller { public InvalidMinimumProtocolVersionExceptionUnmarshaller() { super(InvalidMinimumProtocolVersionException.class); } public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands. String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals("InvalidMinimumProtocolVersion")) return null; InvalidMinimumProtocolVersionException e = (InvalidMinimumProtocolVersionException)super.unmarshall(node); return e; } }
[ "aws@amazon.com" ]
aws@amazon.com
d6952dc9f1e253055c086d7d910b7264d7676fcf
e4fa0748bab025efa46749cf409bf014d61acf44
/src/main/java/com/kloudlearn/gateway/web/rest/errors/EmailNotFoundException.java
d77fc2e5bcd853a0d922bbe9f5d6962aee793618
[]
no_license
jhipster-examples/gateway
f935c184a28030ae8acd0f0c749422e71bf9cfa5
5a7c8d3313e26969a78905602ffa718444c5f3bd
refs/heads/master
2023-05-15T04:01:58.571010
2019-05-30T18:29:25
2019-05-30T18:29:25
189,463,195
0
0
null
2023-05-01T06:19:00
2019-05-30T18:29:03
Java
UTF-8
Java
false
false
414
java
package com.kloudlearn.gateway.web.rest.errors; import org.zalando.problem.AbstractThrowableProblem; import org.zalando.problem.Status; public class EmailNotFoundException extends AbstractThrowableProblem { private static final long serialVersionUID = 1L; public EmailNotFoundException() { super(ErrorConstants.EMAIL_NOT_FOUND_TYPE, "Email address not registered", Status.BAD_REQUEST); } }
[ "arivazhagan@kloudone.com" ]
arivazhagan@kloudone.com
81b10e07aa8e38ed1a4ea704b9083a2e2e6fb0ea
1b50fe1118a908140b6ba844a876ed17ad026011
/core/src/main/java/org/narrative/network/customizations/narrative/service/api/model/permissions/StandardPermissionDTO.java
ea56c4a16d8fffb6a539896e5638fd294a8daf4d
[ "MIT" ]
permissive
jimador/narrative
a6df67a502a913a78cde1f809e6eb5df700d7ee4
84829f0178a0b34d4efc5b7dfa82a8929b5b06b5
refs/heads/master
2022-04-08T13:50:30.489862
2020-03-07T15:12:30
2020-03-07T15:12:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
865
java
package org.narrative.network.customizations.narrative.service.api.model.permissions; import com.fasterxml.jackson.annotation.JsonTypeName; import org.narrative.network.customizations.narrative.serialization.jackson.annotation.JsonValueObject; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.time.Instant; /** * Date: 10/17/18 * Time: 5:29 PM * * @author brian */ @Data @JsonValueObject @JsonTypeName("StandardPermission") @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class StandardPermissionDTO extends RevokablePermissionDTO { @Builder(builderMethodName = "standardPermissionBuilder") public StandardPermissionDTO(boolean granted, Instant restorationDatetime, RevokeReason revokeReason) { super(granted, restorationDatetime, revokeReason); } }
[ "brian@narrative.org" ]
brian@narrative.org
8c81bc0de0bbf87ef543a0ce79d583142198a9c8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_6707942eb238a07658145916f0661f33ecaefdf8/BasicConfiguration/6_6707942eb238a07658145916f0661f33ecaefdf8_BasicConfiguration_s.java
8223d56f0474fd9a125a54a696be7f8507af2372
[]
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
2,431
java
/* * * Copyright 2012 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.netflix.simianarmy.basic; import java.util.Properties; import com.netflix.simianarmy.MonkeyConfiguration; /** * The Class BasicConfiguration. */ public class BasicConfiguration implements MonkeyConfiguration { /** The properties. */ private Properties props; /** * Instantiates a new basic configuration. * @param props * the properties */ public BasicConfiguration(Properties props) { this.props = props; } /** {@inheritDoc} */ @Override public boolean getBool(String property) { return getBoolOrElse(property, false); } /** {@inheritDoc} */ @Override public boolean getBoolOrElse(String property, boolean dflt) { String val = props.getProperty(property); return val == null ? dflt : Boolean.parseBoolean(val); } /** {@inheritDoc} */ @Override public double getNumOrElse(String property, double dflt) { String val = props.getProperty(property); return val == null ? dflt : Double.parseDouble(val); } /** {@inheritDoc} */ @Override public String getStr(String property) { return getStrOrElse(property, null); } /** {@inheritDoc} */ @Override public String getStrOrElse(String property, String dflt) { String val = props.getProperty(property); return val == null ? dflt : val; } /** {@inheritDoc} */ @Override public void reload() { // BasicConfiguration is based on static properties, so reload is a no-op } @Override public void reload(String groupName) { // BasicConfiguration is based on static properties, so reload is a no-op } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
533415d65505ee4c8d6110fee8f39f5628f1a0ee
f044027a7cc840b4f4a52612a206159edcc55f46
/src/main/java/com/codingmates/intellij/selinux/cil/lang/core/psi/api/CilFsUseContext.java
c60512c56971f0d1edd023c77670be3ed375f448
[]
no_license
garyttierney/intellij-selinux
b20797226714b2e52b0a4b13d8384c5dd13be8aa
944b293e202a0a33df313a16b7d4647c8de6960f
refs/heads/master
2021-06-15T08:20:50.605732
2017-04-23T23:29:29
2017-04-23T23:31:52
60,916,424
0
0
null
null
null
null
UTF-8
Java
false
false
286
java
package com.codingmates.intellij.selinux.cil.lang.core.psi.api; import com.codingmates.intellij.selinux.cil.lang.core.psi.api.types.CilCompositeElement; import org.jetbrains.annotations.NotNull; public interface CilFsUseContext { @NotNull CilCompositeElement getContext(); }
[ "gary.tierney@gmx.com" ]
gary.tierney@gmx.com
33fb9e7b430334fe4e72b340e969ec86559bca78
5c143eaa95bf0f5c63a5297840030ef2e1ef52d9
/BusinessProc-Dev/repository-services/repository-services-impl/src/test/java/com/fujixerox/aus/repository/util/dfc/FxaAdjustmentLetterFieldComponentTest.java
8a4ab4deaa44fa299ae9bf495db29efcea38cfa3
[]
no_license
jhonner72/plat
c01a5b1e688b0d5ea75f394fe9d131a4641a1199
94c440606941e6512d58db46cecbc41a9c23a712
refs/heads/master
2016-08-10T17:22:40.387186
2016-01-12T21:15:13
2016-01-12T21:15:13
49,529,171
1
1
null
null
null
null
UTF-8
Java
false
false
884
java
package com.fujixerox.aus.repository.util.dfc; import static org.junit.Assert.assertNotNull; import org.junit.Test; import org.junit.experimental.categories.Category; import com.documentum.fc.common.DfException; import com.fujixerox.aus.repository.AbstractComponentTest; import com.fujixerox.aus.repository.util.exception.ACLException; public class FxaAdjustmentLetterFieldComponentTest implements AbstractComponentTest { @Test @Category(AbstractComponentTest.class) public void shouldHaveValues() throws DfException, ACLException { assertNotNull(FxaAdjustmentLetterField.R_OBJECT_ID); assertNotNull(FxaAdjustmentLetterField.FILENAME); assertNotNull(FxaAdjustmentLetterField.DRN); assertNotNull(FxaAdjustmentLetterField.PROCESSING_DATE); assertNotNull(FxaAdjustmentLetterField.BATCH_NUMBER); assertNotNull(FxaAdjustmentLetterField.TRAN_LINK_NO); } }
[ "BPS\\fraueaa" ]
BPS\fraueaa
96e6b5bc3ddd9694c7ffa046a50e2a878c849252
f03d79782adf3fd3e838be33997954d67c958f29
/src/main/java/net/datastructures/BinaryTree.java
61a85cd2d399b1111fc530fd5757fc213a1776d2
[]
no_license
joao-parana/algorithm
1bdbb7402aaa3e88661a9afcdcce8f15813a8cd6
1c30f12ed9ddc5ae774231cccbe242e4f5e428c6
refs/heads/master
2021-01-19T01:08:34.948901
2016-07-20T15:04:20
2016-07-20T15:04:20
62,959,511
1
0
null
null
null
null
UTF-8
Java
false
false
2,355
java
/* * Copyright 2014, Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser * * Developed for use with the book: * * Data Structures and Algorithms in Java, Sixth Edition * Michael T. Goodrich, Roberto Tamassia, and Michael H. Goldwasser * John Wiley & Sons, 2014 * * 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 3 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, see <http://www.gnu.org/licenses/>. */ package net.datastructures; /** * An interface for a binary tree, in which each node has at most two children. * * @author Michael T. Goodrich * @author Roberto Tamassia * @author Michael H. Goldwasser */ public interface BinaryTree<E> extends Tree<E> { /** * Returns the Position of p's left child (or null if no child exists). * * @param p * A valid Position within the tree * @return the Position of the left child (or null if no child exists) * @throws IllegalArgumentException * if p is not a valid Position for this tree */ Position<E> left(Position<E> p) throws IllegalArgumentException; /** * Returns the Position of p's right child (or null if no child exists). * * @param p * A valid Position within the tree * @return the Position of the right child (or null if no child exists) * @throws IllegalArgumentException * if p is not a valid Position for this tree */ Position<E> right(Position<E> p) throws IllegalArgumentException; /** * Returns the Position of p's sibling (or null if no sibling exists). * * @param p * A valid Position within the tree * @return the Position of the sibling (or null if no sibling exists) * @throws IllegalArgumentException * if p is not a valid Position for this tree */ Position<E> sibling(Position<E> p) throws IllegalArgumentException; }
[ "joao.parana@gmail.com" ]
joao.parana@gmail.com