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
cdc48febc17a85a6039b3b8876c0fcf1d2b8e20c
7a7ba2805a15059c30f31e1b352ab6aa30592de7
/awd.cloud.platform/awd.cloud.platform.api/src/main/java/awd/cloud/platform/model/logs/Logs_CloudfileModel.java
349303b90ec5abb2594bb8576faab6cbc835561d
[]
no_license
tony-catalina/Peking_cloud2
bc1bf7f377b68ce06c77d2de36554893eaabc697
c47db69483c203f4aefd37a034ada6aeb182c4fd
refs/heads/master
2022-12-13T14:55:37.859352
2020-03-02T08:13:48
2020-03-02T08:13:48
244,308,357
0
1
null
2022-12-06T00:46:17
2020-03-02T07:35:13
JavaScript
UTF-8
Java
false
false
4,884
java
/* * Copyright 2008 [rapid-framework], Inc. All rights reserved. * Website: http://www.rapid-framework.org.cn */ package awd.cloud.platform.model.logs; import awd.cloud.platform.model.Model; import javax.validation.constraints.NotNull; import com.alibaba.fastjson.annotation.JSONField; import com.fasterxml.jackson.annotation.JsonFormat; import org.springframework.format.annotation.DateTimeFormat; /** * @author * @version 1.0 * @since 1.0 */ public class Logs_CloudfileModel implements Model{ //columns START private java.lang.String id; private java.lang.String jsbh; private java.lang.String rybh; private java.lang.String fdir; private java.lang.String dir; private java.lang.String filename; private java.lang.String filetype; private java.lang.String fileicon; private java.lang.String scbz; private java.lang.String share; private java.lang.String isdir; private java.lang.String uploader; @JSONField(format = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private java.util.Date uptime; private java.lang.Double downnum; private java.lang.String bz; private java.lang.String creator; @JSONField(format = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private java.util.Date createtime; private java.lang.String updator; @JSONField(format = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private java.util.Date updatetime; private java.lang.String groupname; private java.lang.String remotefilename; //columns END public Logs_CloudfileModel(){ } public Logs_CloudfileModel(String id) { this.id = id; } public void setId(java.lang.String value) { this.id = value; } public java.lang.String getId() { return this.id; } public java.lang.String getJsbh() { return this.jsbh; } public void setJsbh(java.lang.String value) { this.jsbh = value; } public java.lang.String getRybh() { return this.rybh; } public void setRybh(java.lang.String value) { this.rybh = value; } public java.lang.String getFdir() { return this.fdir; } public void setFdir(java.lang.String value) { this.fdir = value; } public java.lang.String getDir() { return this.dir; } public void setDir(java.lang.String value) { this.dir = value; } public java.lang.String getFilename() { return this.filename; } public void setFilename(java.lang.String value) { this.filename = value; } public java.lang.String getFiletype() { return this.filetype; } public void setFiletype(java.lang.String value) { this.filetype = value; } public java.lang.String getFileicon() { return this.fileicon; } public void setFileicon(java.lang.String value) { this.fileicon = value; } public java.lang.String getScbz() { return this.scbz; } public void setScbz(java.lang.String value) { this.scbz = value; } public java.lang.String getShare() { return this.share; } public void setShare(java.lang.String value) { this.share = value; } public java.lang.String getIsdir() { return this.isdir; } public void setIsdir(java.lang.String value) { this.isdir = value; } public java.lang.String getUploader() { return this.uploader; } public void setUploader(java.lang.String value) { this.uploader = value; } public java.util.Date getUptime() { return this.uptime; } public void setUptime(java.util.Date value) { this.uptime = value; } public java.lang.Double getDownnum() { return this.downnum; } public void setDownnum(java.lang.Double value) { this.downnum = value; } public java.lang.String getBz() { return this.bz; } public void setBz(java.lang.String value) { this.bz = value; } public java.lang.String getCreator() { return this.creator; } public void setCreator(java.lang.String value) { this.creator = value; } public java.util.Date getCreatetime() { return this.createtime; } public void setCreatetime(java.util.Date value) { this.createtime = value; } public java.lang.String getUpdator() { return this.updator; } public void setUpdator(java.lang.String value) { this.updator = value; } public java.util.Date getUpdatetime() { return this.updatetime; } public void setUpdatetime(java.util.Date value) { this.updatetime = value; } public java.lang.String getGroupname() { return this.groupname; } public void setGroupname(java.lang.String value) { this.groupname = value; } public java.lang.String getRemotefilename() { return this.remotefilename; } public void setRemotefilename(java.lang.String value) { this.remotefilename = value; } }
[ "m13635576437@163.com" ]
m13635576437@163.com
1c48d50b2d4ebf1d5700c1ddb037e621dcaafd76
ff026f7189dc7127c99bddf2067b67f2aeba9363
/IEEE1888SDK_Sample/src/org/fiap/storage2/TestFETCHCopyThread.java
106aebfa9270eed07a154d3ad8c61fc7a8f043fd
[]
no_license
freerambo/rambo
41e383c7b94d078de884f44af38387f317e5ba49
4e7d710c9a01e0ecb7e38480c4041cd902c022ae
refs/heads/master
2022-12-20T20:13:37.196253
2020-09-12T10:42:13
2020-09-12T10:42:13
25,810,606
1
2
null
2022-12-16T03:23:01
2014-10-27T08:53:33
JavaScript
UTF-8
Java
false
false
499
java
package org.fiap.storage2; import org.fiap.common.*; import org.w3c.dom.Element; public class TestFETCHCopyThread { public static void main(String[] args) throws Exception { Storage2Admin admin=Storage2Admin.getInstance(); admin.parseConfigFile("config/storage/storage.xml"); Element[] fetchs=admin.getFETCHs(); FETCHCopyThread thread=new FETCHCopyThread(fetchs[0],null); while(true){ try{ Thread.sleep(10000); }catch(Exception e){} } } }
[ "zhuyb@ntu.edu.sg" ]
zhuyb@ntu.edu.sg
7b985c0360f1b325035655cc32ee88e9fc1782b0
7aa02f902ad330c70b0b34ec2d4eb3454c7a3fc1
/com/expensemanager/aix.java
4d6150c1070b77281728dd557e56608625dc4d62
[]
no_license
hisabimbola/andexpensecal
5e42c7e687296fae478dfd39abee45fae362bc5b
c47e6f0a1a6e24fe1377d35381b7e7e37f1730ee
refs/heads/master
2021-01-19T15:20:25.262893
2016-08-11T16:00:49
2016-08-11T16:00:49
100,962,347
1
0
null
2017-08-21T14:48:33
2017-08-21T14:48:33
null
UTF-8
Java
false
false
433
java
package com.expensemanager; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; class aix implements OnCancelListener { final /* synthetic */ WidgetConfigureSummary f4182a; aix(WidgetConfigureSummary widgetConfigureSummary) { this.f4182a = widgetConfigureSummary; } public void onCancel(DialogInterface dialogInterface) { this.f4182a.m3722d(); } }
[ "m.ravinther@yahoo.com" ]
m.ravinther@yahoo.com
e6e8df7c27c235c0bf63417299419b12d4ffed40
c4c321beed135313d811fc350322bf38bddfa82c
/property-app/src/main/java/com/joy/property/task/RefreshEventTask.java
805ac028ca80f2e4aae55782911ae81b157ab29e
[]
no_license
hupulin/joyProperty
ebf97ef80d28ec03de0df9bb13afdaf02ea540de
a0336ca57b44a997bde6299f2c2e05deea6a1555
refs/heads/master
2021-09-04T11:35:18.404336
2017-12-27T02:00:23
2017-12-27T02:00:23
113,118,715
0
1
null
null
null
null
UTF-8
Java
false
false
513
java
package com.joy.property.task; /** * Created by usb on 2017/6/26. */ public class RefreshEventTask { private String mMsg; private Boolean noData; public RefreshEventTask(String msg) { mMsg = msg; } public RefreshEventTask(String msg,Boolean noData) { // TODO Auto-generated constructor stub this.mMsg=msg; this.noData=noData; } public String getMsg() { return mMsg; } public Boolean getNoData() { return noData; } }
[ "hpl635768909@gmail.com" ]
hpl635768909@gmail.com
09155c480797bb01d01bb7282873afd6f7e57874
7c05e652842f5990b457536ede2a84ba606c8480
/plugins/svn4idea/testSource/org/jetbrains/idea/svn16/SvnExternalTests.java
94d8ee2d62552f32b80b420871b2a31ae509db55
[ "Apache-2.0" ]
permissive
rfreedman/intellij-community
bd9dc79155e75c9bb375a8f16864b4713020c6fe
de4420d7195836247820d80153fdb347ef9cfeb5
refs/heads/master
2021-01-24T00:42:33.220191
2013-02-18T22:07:47
2013-02-18T22:08:38
8,280,748
1
0
null
null
null
null
UTF-8
Java
false
false
5,682
java
/* * Copyright 2000-2012 JetBrains s.r.o. * * 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.jetbrains.idea.svn16; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vcs.VcsConfiguration; import com.intellij.openapi.vcs.changes.Change; import com.intellij.openapi.vcs.changes.ChangeListManager; import com.intellij.openapi.vcs.changes.ChangeListManagerImpl; import com.intellij.openapi.vcs.changes.VcsDirtyScopeManager; import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VirtualFile; import junit.framework.Assert; import org.jetbrains.idea.svn.*; import org.junit.Test; import java.io.File; import java.util.HashSet; import java.util.List; import java.util.Set; /** * Created with IntelliJ IDEA. * User: Irina.Chernushina * Date: 11/12/12 * Time: 10:24 AM */ public class SvnExternalTests extends Svn17TestCase { private ChangeListManagerImpl clManager; private SvnVcs myVcs; private String myMainUrl; private String myExternalURL; @Override public void setUp() throws Exception { super.setUp(); clManager = (ChangeListManagerImpl) ChangeListManager.getInstance(myProject); enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD); enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE); myVcs = SvnVcs.getInstance(myProject); myMainUrl = myRepoUrl + "/root/source"; myExternalURL = myRepoUrl + "/root/target"; } @Test public void testExternalCopyIsDetected() throws Exception { prepareExternal(); final SvnFileUrlMapping workingCopies = myVcs.getSvnFileUrlMapping(); final List<RootUrlInfo> infos = workingCopies.getAllWcInfos(); Assert.assertEquals(2, infos.size()); final Set<String> expectedUrls = new HashSet<String>(); expectedUrls.add(StringUtil.toLowerCase(myExternalURL)); expectedUrls.add(StringUtil.toLowerCase(myMainUrl)); for (RootUrlInfo info : infos) { expectedUrls.remove(StringUtil.toLowerCase(info.getAbsoluteUrl())); } Assert.assertTrue(expectedUrls.isEmpty()); } private void prepareInnerCopy() throws Exception { final SubTree subTree = new SubTree(myWorkingCopyDir); checkin(); clManager.stopEveryThingIfInTestMode(); sleep(100); final File rootFile = new File(subTree.myRootDir.getPath()); FileUtil.delete(rootFile); FileUtil.delete(new File(myWorkingCopyDir.getPath() + File.separator + ".svn")); Assert.assertTrue(!rootFile.exists()); sleep(200); myWorkingCopyDir.refresh(false, true); verify(runSvn("co", myMainUrl)); final File sourceDir = new File(myWorkingCopyDir.getPath(), "source"); final File innerDir = new File(sourceDir, "inner1/inner2/inner"); verify(runSvn("co", myExternalURL, innerDir.getPath())); sleep(100); myWorkingCopyDir.refresh(false, true); // above is preparation // start change list manager again clManager.forceGoInTestMode(); refreshSvnMappingsSynchronously(); //clManager.ensureUpToDate(false); //clManager.ensureUpToDate(false); } @Test public void testInnerCopyDetected() throws Exception { prepareInnerCopy(); final SvnFileUrlMapping workingCopies = myVcs.getSvnFileUrlMapping(); final List<RootUrlInfo> infos = workingCopies.getAllWcInfos(); Assert.assertEquals(2, infos.size()); final Set<String> expectedUrls = new HashSet<String>(); expectedUrls.add(StringUtil.toLowerCase(myExternalURL)); expectedUrls.add(StringUtil.toLowerCase(myMainUrl)); boolean sawInner = false; for (RootUrlInfo info : infos) { expectedUrls.remove(StringUtil.toLowerCase(info.getAbsoluteUrl())); sawInner |= NestedCopyType.inner.equals(info.getType()); } Assert.assertTrue(expectedUrls.isEmpty()); Assert.assertTrue(sawInner); } @Test public void testSimpleExternalsStatus() throws Exception { prepareExternal(); final File sourceFile = new File(myWorkingCopyDir.getPath(), "source" + File.separator + "s1.txt"); final File externalFile = new File(myWorkingCopyDir.getPath(), "source" + File.separator + "external" + File.separator + "t12.txt"); final LocalFileSystem lfs = LocalFileSystem.getInstance(); final VirtualFile vf1 = lfs.refreshAndFindFileByIoFile(sourceFile); final VirtualFile vf2 = lfs.refreshAndFindFileByIoFile(externalFile); Assert.assertNotNull(vf1); Assert.assertNotNull(vf2); editFileInCommand(myProject, vf1, "test externals 123" + System.currentTimeMillis()); editFileInCommand(myProject, vf2, "test externals 123" + System.currentTimeMillis()); VcsDirtyScopeManager.getInstance(myProject).markEverythingDirty(); clManager.ensureUpToDate(false); final Change change1 = clManager.getChange(vf1); final Change change2 = clManager.getChange(vf2); Assert.assertNotNull(change1); Assert.assertNotNull(change2); Assert.assertNotNull(change1.getBeforeRevision()); Assert.assertNotNull(change2.getBeforeRevision()); Assert.assertNotNull(change1.getAfterRevision()); Assert.assertNotNull(change2.getAfterRevision()); } }
[ "Irina.Chernushina@jetbrains.com" ]
Irina.Chernushina@jetbrains.com
dee73baae44f4c81661561156361fac841222b19
4e660ecd8dfea06ba2f530eb4589bf6bed669c0c
/src/com/longj/products/ea/standard/bu/service/proxy/BUSignHandler.java
efe925f3ccb4a2639728bc987148debd9c98dcb7
[]
no_license
zhangity/SANMEN
58820279f6ae2316d972c1c463ede671b1b2b468
3f5f7f48709ae8e53d66b30f9123aed3bcc598de
refs/heads/master
2020-03-07T14:16:23.069709
2018-03-31T15:17:50
2018-03-31T15:17:50
127,522,589
1
0
null
null
null
null
UTF-8
Java
false
false
3,197
java
package com.longj.products.ea.standard.bu.service.proxy; import java.util.HashMap; import java.util.Map; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import org.wdk.core.bean.WDKLogger; import org.wdk.core.bean.WDKTransationHandler; import org.wdk.module.wql.core.bean.ConnectBean; import com.longj.products.ea.standard.bu.ws.BasePaceAdapter; import com.longj.products.ea.standard.bu.ws.impl.core.PacsSyncCore; /** * 签到后调用pacs系统的web接口 * * @author YuBin * */ public class BUSignHandler implements WDKTransationHandler { private static WDKLogger logger = new WDKLogger(BUSignHandler.class.getName());// 日志操作类 private static HashMap<Long, Thread> ThreadMap = new HashMap<Long, Thread>(); public BUSignHandler(JSONArray paramBody, Map<String, String> apptRoomMap, String personId) { super(); this.paramBody = paramBody; this.apptRoomMap = apptRoomMap; this.personId = personId; } private JSONArray paramBody; private Map<String, String> apptRoomMap; private String personId; public String getPersonId() { return personId; } public void setPersonId(String personId) { this.personId = personId; } public Map<String, String> getApptRoomMap() { return apptRoomMap; } public void setApptRoomMap(Map<String, String> apptRoomMap) { this.apptRoomMap = apptRoomMap; } public JSONArray getParamBody() { return paramBody; } public void setParamBody(JSONArray paramBody) { this.paramBody = paramBody; } @Override public void transAfter(ConnectBean conb, boolean isSuccess) throws Exception { if (isSuccess) { if (paramBody != null && paramBody.size() > 0) { Thread lastThread = null; // 不管准备环境是否准备好,都进行遍历 for (int i = 0; i < paramBody.size(); i++) { final JSONObject j0 = paramBody.getJSONObject(i); // 使用多线程的方式发起调用 Runnable r = new Runnable() { @Override public void run() { long id = Thread.currentThread().getId(); try { BasePaceAdapter dapter = PacsSyncCore.getAdapter(j0.getString("examtype_id")); dapter.setPerson_id(personId);//设置操作人 pushMessage2PacsRegister(j0, dapter, id); } catch (Exception e) { e.printStackTrace(); } finally { ThreadMap.remove(id); } } }; Thread t = new Thread(r); if (lastThread != null) { ThreadMap.put(t.getId(), lastThread); } t.start(); lastThread = t;// 替换为上一个线程 } } } } /** * 发生给pacs系统进行登记 * * @param conb * @param j0 * @param endpoint * @param id * @throws Exception */ private boolean pushMessage2PacsRegister(JSONObject joSrc,BasePaceAdapter dapter, long id) throws Exception { // 登记成功后做操作 if (ThreadMap.containsKey(id)) { try { // 等待上一个线程的完成 ThreadMap.get(id).join(); } catch (InterruptedException e) { logger.error(e); } } return dapter.addBillSync2Pacs(joSrc, apptRoomMap); } }
[ "dzyuting@163.com" ]
dzyuting@163.com
7bf52be93771cd212ef488ca625789e29aa520b4
6e498099b6858eae14bf3959255be9ea1856f862
/src/com/facebook/buck/core/rulekey/CustomFieldInputsTag.java
24a0cfeb551f66bab3826ef30ad197812e6fd0c2
[ "Apache-2.0" ]
permissive
Bonnie1312/buck
2dcfb0791637db675b495b3d27e75998a7a77797
3cf76f426b1d2ab11b9b3d43fd574818e525c3da
refs/heads/master
2020-06-11T13:29:48.660073
2019-06-26T19:59:32
2019-06-26T21:06:24
193,979,660
2
0
Apache-2.0
2019-09-22T07:23:56
2019-06-26T21:24:33
Java
UTF-8
Java
false
false
774
java
/* * Copyright 2019-present Facebook, 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.facebook.buck.core.rulekey; /** Tag to indicate custom field inputs derivation. */ public interface CustomFieldInputsTag extends CustomFieldBehaviorTag {}
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
7f742ad4483fce33c18416559157148178c18873
124df74bce796598d224c4380c60c8e95756f761
/com.raytheon.edex.common/src/com/raytheon/edex/subscription/Script.java
08ddcfb4b01d1c2ef48522bdf5d27c4412aaaa54
[]
no_license
Mapoet/AWIPS-Test
19059bbd401573950995c8cc442ddd45588e6c9f
43c5a7cc360b3cbec2ae94cb58594fe247253621
refs/heads/master
2020-04-17T03:35:57.762513
2017-02-06T17:17:58
2017-02-06T17:17:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,406
java
/** * This software was developed and / or modified by Raytheon Company, * pursuant to Contract DG133W-05-CQ-1067 with the US Government. * * U.S. EXPORT CONTROLLED TECHNICAL DATA * This software product contains export-restricted data whose * export/transfer/disclosure is restricted by U.S. law. Dissemination * to non-U.S. persons whether in the United States or abroad requires * an export license or other authorization. * * Contractor Name: Raytheon Company * Contractor Address: 6825 Pine Street, Suite 340 * Mail Stop B8 * Omaha, NE 68106 * 402.291.0100 * * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ package com.raytheon.edex.subscription; import java.io.Serializable; import java.util.Calendar; /** * The persistance object for a &mu;Engine script. Used to persist the * script using the EDEX DAL. * <pre> * * SOFTWARE HISTORY * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 27Feb2007 208 MW Fegan Initial creation. * * </pre> * * @author mfegan * @version 1 */ public class Script implements Serializable { /** * the Serial Version ID. */ private static final long serialVersionUID = 1L; /** ID value for primary key in table. Required by Hibernate **/ private Integer id; private Subscription parentID; private String scriptid; private Object script; /** The timestamp when the record was inserted */ protected Calendar insertTime; /** * No Arg Constructor. Used for object creation when un-serializing. */ public Script() { } /** * Constructor. Constructs a {@code Script} object with the specified * script ID and script. * * @param scriptID the script ID * @param script the script - must be {@link java.io.Serializable Serializable} */ public Script(String scriptID, Object script) { this.scriptid = scriptID; this.script = script; } /** * @return the id */ public Integer getId() { return id; } /** * @param id the id to set */ public void setId(Integer id) { this.id = id; } /** * @return the script */ public Object getScript() { return script; } /** * @param script the script to set */ public void setScript(Object script) { this.script = script; } /** * @return the scriptid */ public String getScriptid() { return scriptid; } /** * @param scriptid the scriptid to set */ public void setScriptid(String scriptid) { this.scriptid = scriptid; } /** * @return the insertTime */ public Calendar getInsertTime() { return insertTime; } /** * @param insertTime the insertTime to set */ public void setInsertTime(Calendar insertTime) { this.insertTime = insertTime; } /** * @return the parentID */ public Subscription getParentID() { return parentID; } /** * @param parentID the parentID to set */ public void setParentID(Subscription parentID) { this.parentID = parentID; } }
[ "joshua.t.love@saic.com" ]
joshua.t.love@saic.com
1aa87df40f9aaff1a9b15d9dd6509af99a04c9e1
5784885d3d232a1197a76a9918a5b43c514ba4fb
/jspeedtest/src/test/java/fr/bmartel/speedtest/test/SpeedTestHttpsTest.java
610d0ef91d94f4325bfc4ba5b3aab49d406611b0
[ "MIT" ]
permissive
sherry-android/speed-test-lib
bd8177e8779682e8a6621d0984cb58f6430a37c2
882d0afdb46b8c7f86bff1d978a38727f1b1f600
refs/heads/master
2021-03-29T05:36:28.677849
2020-04-08T03:03:52
2020-04-08T03:03:52
247,923,342
0
0
MIT
2020-03-17T09:01:32
2020-03-17T09:01:31
null
UTF-8
Java
false
false
5,726
java
/* * The MIT License (MIT) * <p/> * Copyright (c) 2016-2017 Bertrand Martel * <p/> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * <p/> * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * <p/> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package fr.bmartel.speedtest.test; import fr.bmartel.speedtest.SpeedTestReport; import fr.bmartel.speedtest.SpeedTestSocket; import fr.bmartel.speedtest.inter.ISpeedTestListener; import fr.bmartel.speedtest.model.SpeedTestError; import fr.bmartel.speedtest.model.UploadStorageType; import fr.bmartel.speedtest.test.server.ServerRetryTest; import fr.bmartel.speedtest.test.utils.TestCommon; import net.jodah.concurrentunit.Waiter; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; import java.math.BigDecimal; import java.util.concurrent.TimeoutException; import static java.util.concurrent.TimeUnit.SECONDS; /** * HTTPS test. * * @author Bertrand Martel */ public class SpeedTestHttpsTest extends ServerRetryTest { /** * default timeout waiting time for long operation such as DL / UL */ private final static int WAITING_TIMEOUT_LONG_OPERATION = 10; /** * transfer rate value received in ops. */ private BigDecimal mExpectedTransferRateOps; /** * transfer rate value received in bps. */ private BigDecimal mExpectedTransferRateBps; /** * Common waiter for functional test. */ private Waiter mWaiter; @Test public void downloadHttpsTest() throws TimeoutException { initTask(true); testDownload(TestCommon.SPEED_TEST_SERVER_URI_HTTPS); stopTask(); } @Test @Ignore public void downloadHttpsRedirectTest() throws TimeoutException { initTask(true); testDownload(TestCommon.SPEED_TEST_SERVER_URI_REDIRECT_HTTPS); stopTask(); } @Test public void uploadHttpsTest() throws TimeoutException { initTask(false); testUpload(TestCommon.SPEED_TEST_SERVER_URI_HTTPS, 1000000, true); stopTask(); } private void initTask(final boolean download) throws TimeoutException { mSocket = new SpeedTestSocket(); mSocket.setSocketTimeout(TestCommon.DEFAULT_SOCKET_TIMEOUT); mWaiter = new Waiter(); mSocket.addSpeedTestListener(new ISpeedTestListener() { @Override public void onProgress(final float percent, final SpeedTestReport report) { //called to notify download progress } @Override public void onCompletion(final SpeedTestReport report) { mExpectedTransferRateOps = report.getTransferRateOctet(); mExpectedTransferRateBps = report.getTransferRateBit(); mWaiter.resume(); } @Override public void onError(final SpeedTestError speedTestError, final String errorMessage) { if (mExpectedError != null && speedTestError == mExpectedError) { mWaiter.resume(); } else { if (download) { mWaiter.fail(TestCommon.DOWNLOAD_ERROR_STR + speedTestError); } else { mWaiter.fail(TestCommon.UPLOAD_ERROR_STR + speedTestError); } mWaiter.resume(); } } }); } private void stopTask() { stopServer(); mSocket.setProxyServer(null); mSocket.clearListeners(); } /** * Test download with given URI. * * @param uri */ private void testDownload(final String uri) throws TimeoutException { mWaiter = new Waiter(); mSocket.startDownload(uri); mWaiter.await(WAITING_TIMEOUT_LONG_OPERATION, SECONDS); testTransferRate(); mSocket.forceStopTask(); } /** * Compare transfer rate calculated to expected value. */ private void testTransferRate() { Assert.assertNotNull(mExpectedTransferRateOps); Assert.assertNotNull(mExpectedTransferRateBps); Assert.assertTrue(mExpectedTransferRateBps.longValue() > 0); Assert.assertTrue(mExpectedTransferRateOps.longValue() > 0); } /** * Test upload with given packet size. * * @param size */ private void testUpload(final String url, final int size, final boolean useFileStorage) throws TimeoutException { mWaiter = new Waiter(); if (useFileStorage) { mSocket.setUploadStorageType(UploadStorageType.FILE_STORAGE); } mSocket.startUpload(url, size); mWaiter.await(WAITING_TIMEOUT_LONG_OPERATION, SECONDS); testTransferRate(); mSocket.forceStopTask(); } }
[ "bmartel.fr@gmail.com" ]
bmartel.fr@gmail.com
2e5d2795d2e62fda505e4f0ae84d3c9e8c23c370
3637342fa15a76e676dbfb90e824de331955edb5
/printer/src/main/java/com/bcgogo/Main.java
c8d60b30b43075107ec4cfaac98de545031cedc4
[]
no_license
BAT6188/bo
6147f20832263167101003bea45d33e221d0f534
a1d1885aed8cf9522485fd7e1d961746becb99c9
refs/heads/master
2023-05-31T03:36:26.438083
2016-11-03T04:43:05
2016-11-03T04:43:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,292
java
package com.bcgogo; import com.bcgogo.listener.AbstractListener; import com.bcgogo.listener.PrintListener; import com.bcgogo.listener.UpdateListener; import com.bcgogo.service.IClientService; import com.bcgogo.service.impl.ClientService; import com.bcgogo.util.ConfigUtil; import com.bcgogo.util.PrintHelper; import com.bcgogo.util.StringUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.Scanner; import java.util.UUID; /** * Created by IntelliJ IDEA. * Author: ndong * Date: 2015-2-10 * Time: 18:01 */ public class Main { private static final Logger logger = LoggerFactory.getLogger(Main.class); public static void main(String[] args) { try { IClientService clientService = new ClientService(); boolean result = clientService.validateSerialNo(); if (!result) return; AbstractListener listener = new PrintListener(); listener.start(); // Thread updateThread=new Thread(new UpdateListener()); // updateThread.start(); } catch (Exception e) { try { logger.error("客户端出现异常,序列号:" + ConfigUtil.readSerialNo()); } catch (Exception e1) { logger.error(e.getMessage(), e1); } logger.error(e.getMessage(), e); } } }
[ "ndong211@163.com" ]
ndong211@163.com
e628705e5c8097e617d84bc9a0f268a0f4b73aa1
6500848c3661afda83a024f9792bc6e2e8e8a14e
/gp_JADX/com/google/android/finsky/detailspage/dx.java
cd9365576abeb95369fbfa50a6412c5f98b7ac10
[]
no_license
enaawy/gproject
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
91cb88559c60ac741d4418658d0416f26722e789
refs/heads/master
2021-09-03T03:49:37.813805
2018-01-05T09:35:06
2018-01-05T09:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,264
java
package com.google.android.finsky.detailspage; import android.content.res.Resources; import android.text.TextUtils; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup.MarginLayoutParams; import com.google.android.finsky.C1473m; import com.google.android.finsky.ba.C1552e; import com.google.android.finsky.bg.aa; import com.google.android.finsky.dfemodel.C2719i; import com.google.android.finsky.dfemodel.Document; import com.google.android.finsky.dn.C2833a; import com.google.android.finsky.p111d.C2475d; import com.google.android.finsky.p111d.C2482j; import com.google.android.finsky.p111d.ad; import com.google.wireless.android.a.a.a.a.ce; import com.squareup.leakcanary.C7582R; public class dx extends ck implements OnClickListener, ad { public final C1552e f14444d = C1473m.f7980a.dj(); public final boolean f14445e = this.f14444d.mo2294a(12620435); public final boolean f14446f = this.f14444d.mo2294a(12620436); public final boolean f14447g = this.f14444d.mo2294a(12620437); public ce f14448h; public final int mo2978e() { return 1; } public final int mo2977c(int i) { return C7582R.layout.reviews_statistics_module; } public final boolean mo2979f() { if (this.b != null) { Object obj; if (!((dy) this.b).f14449a.bn() || ((dy) this.b).f14449a.m14622K() == 0) { obj = null; } else { obj = 1; } if (obj != null) { return true; } } return false; } public final void mo2974a(boolean z, Document document, C2719i c2719i, Document document2, C2719i c2719i2) { if (document2 != null && !TextUtils.isEmpty(document2.f14885a.f12118y) && z) { C1473m.f7980a.mo2253l(); if (!C2833a.m14982c(document2) && this.b == null) { this.b = new dy(); ((dy) this.b).f14449a = document2; } } } public final void mo2976b(View view, int i) { ReviewsStatisticsModuleLayout reviewsStatisticsModuleLayout = (ReviewsStatisticsModuleLayout) view; if (!reviewsStatisticsModuleLayout.f14043a) { String string; long K = ((dy) this.b).f14449a.m14622K(); float a = aa.m9201a(((dy) this.b).f14449a.m14621J()); int[] L = ((dy) this.b).f14449a.m14623L(); String str = ""; Resources resources = this.t.getResources(); if (((dy) this.b).f14449a.f14885a.f12099f == 3) { if (this.f14445e) { string = resources.getString(C7582R.string.review_statistics_6_months_title); } else if (this.f14446f) { string = resources.getString(C7582R.string.review_statistics_3_months_title); } else if (this.f14447g) { string = resources.getString(C7582R.string.review_statistics_30_days_title); } string = string.toUpperCase(this.t.getResources().getConfiguration().locale); reviewsStatisticsModuleLayout.f14043a = true; reviewsStatisticsModuleLayout.f14047e = string; reviewsStatisticsModuleLayout.f14044b.m17307a(K, a, L); if (TextUtils.isEmpty(reviewsStatisticsModuleLayout.f14047e)) { reviewsStatisticsModuleLayout.setWillNotDraw(false); reviewsStatisticsModuleLayout.f14045c.setText(reviewsStatisticsModuleLayout.f14047e); reviewsStatisticsModuleLayout.f14045c.setVisibility(0); ((MarginLayoutParams) reviewsStatisticsModuleLayout.f14044b.getLayoutParams()).topMargin = 0; reviewsStatisticsModuleLayout.f14044b.setPadding(reviewsStatisticsModuleLayout.f14044b.getPaddingLeft(), 0, reviewsStatisticsModuleLayout.f14044b.getPaddingRight(), reviewsStatisticsModuleLayout.f14044b.getPaddingBottom()); } else { reviewsStatisticsModuleLayout.setWillNotDraw(true); reviewsStatisticsModuleLayout.f14045c.setVisibility(8); } if (!C1473m.f7980a.mo2035O().m8839b()) { reviewsStatisticsModuleLayout.setOnClickListener(this); } getParentNode().mo1219a(this); } string = str; string = string.toUpperCase(this.t.getResources().getConfiguration().locale); reviewsStatisticsModuleLayout.f14043a = true; reviewsStatisticsModuleLayout.f14047e = string; reviewsStatisticsModuleLayout.f14044b.m17307a(K, a, L); if (TextUtils.isEmpty(reviewsStatisticsModuleLayout.f14047e)) { reviewsStatisticsModuleLayout.setWillNotDraw(true); reviewsStatisticsModuleLayout.f14045c.setVisibility(8); } else { reviewsStatisticsModuleLayout.setWillNotDraw(false); reviewsStatisticsModuleLayout.f14045c.setText(reviewsStatisticsModuleLayout.f14047e); reviewsStatisticsModuleLayout.f14045c.setVisibility(0); ((MarginLayoutParams) reviewsStatisticsModuleLayout.f14044b.getLayoutParams()).topMargin = 0; reviewsStatisticsModuleLayout.f14044b.setPadding(reviewsStatisticsModuleLayout.f14044b.getPaddingLeft(), 0, reviewsStatisticsModuleLayout.f14044b.getPaddingRight(), reviewsStatisticsModuleLayout.f14044b.getPaddingBottom()); } if (C1473m.f7980a.mo2035O().m8839b()) { reviewsStatisticsModuleLayout.setOnClickListener(this); } getParentNode().mo1219a(this); } } public void onClick(View view) { this.J.m13379b(new C2475d(this)); this.z.mo3660a(((dy) this.b).f14449a, ((dy) this.b).f14449a.f14885a.f12118y, false, this.J); } public ce getPlayStoreUiElement() { if (this.f14448h == null) { this.f14448h = C2482j.m13283a(1218); } return this.f14448h; } public ad getParentNode() { return this.I; } public final void mo1219a(ad adVar) { C2482j.m13291a((ad) this, adVar); } }
[ "genius.ron@gmail.com" ]
genius.ron@gmail.com
19e6f6175c12f4a976622d8fb9c1c4dfd4996686
3a0c045b8214305d27c8a55bbf787ae9ce50d86c
/mdc/src/main/java/top/dcenter/ums/security/core/mdc/filter/MdcLogFilter.java
44e31099ae1d8b5e7710d8192c6e78cb2c36ade0
[ "MIT" ]
permissive
janusor/UMS
1a60d234d7604f617c4f103cc39d22d42756eb1a
eb764c3b15b09ba6b7b0e9ae5bba9cfd4720915f
refs/heads/master
2023-02-22T00:20:29.076705
2021-01-26T06:31:55
2021-01-26T06:42:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,580
java
/* * MIT License * Copyright (c) 2020-2029 YongWu zheng (dcenter.top and gitee.com/pcore and github.com/ZeroOrInfinity) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package top.dcenter.ums.security.core.mdc.filter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; import org.springframework.util.AntPathMatcher; import org.springframework.web.filter.OncePerRequestFilter; import top.dcenter.ums.security.common.utils.UrlUtil; import top.dcenter.ums.security.core.api.mdc.MdcIdGenerator; import top.dcenter.ums.security.core.mdc.MdcIdType; import top.dcenter.ums.security.core.mdc.properties.MdcProperties; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.HashSet; import java.util.Set; import static top.dcenter.ums.security.core.mdc.utils.MdcUtil.getMdcId; /** * MDC 机制实现日志的链路追踪: 在输出日志中加上 mdcKey * @author YongWu zheng * @version V2.0 Created by 2020/10/31 18:19 */ public class MdcLogFilter extends OncePerRequestFilter { private final Logger log = LoggerFactory.getLogger(this.getClass()); /** * 在输出日志中加上指定的 MDC_TRACE_ID */ public static final String MDC_KEY = "MDC_TRACE_ID"; @SuppressWarnings("SpringJavaAutowiredMembersInspection") @Autowired(required = false) private MdcIdGenerator mdcIdGenerator; private final Set<String> includeUrls; private final Set<String> excludeUrls; private final AntPathMatcher matcher; private final MdcIdType idType; public MdcLogFilter(MdcProperties mdcProperties) { this.idType = mdcProperties.getType(); this.matcher = new AntPathMatcher(); this.includeUrls = new HashSet<>(); this.excludeUrls = new HashSet<>(); includeUrls.addAll(mdcProperties.getIncludeUrls()); final Set<String> excludeUrls = mdcProperties.getExcludeUrls(); if (null != excludeUrls) { this.excludeUrls.addAll(excludeUrls); } } @Override protected void doFilterInternal(@NonNull HttpServletRequest request, @NonNull HttpServletResponse response, @NonNull FilterChain filterChain) throws ServletException, IOException { if (isEnableMdc(request)) { String token = getMdcId(this.idType, this.mdcIdGenerator); MDC.put(MDC_KEY, token); try { filterChain.doFilter(request, response); } catch (Exception e) { log.error(e.getMessage(), e); request.setAttribute(MDC_KEY, token); MDC.clear(); throw e; } MDC.clear(); return; } filterChain.doFilter(request, response); } private boolean isEnableMdc(HttpServletRequest request) { final String requestUri = UrlUtil.getUrlPathHelper().getPathWithinApplication(request); for (String excludeUrl : excludeUrls) { if (this.matcher.match(excludeUrl, requestUri)) { return false; } } for (String includeUrl : includeUrls) { if (this.matcher.match(includeUrl, requestUri)) { return true; } } return false; } }
[ "zyw23zyw23@163.com" ]
zyw23zyw23@163.com
fa019fc3cb52d74e3f8db22822ba6bc9197b5468
542e78ed5a5fb6074e83f8b1afbf5a9165988a79
/bin/custom/training/trainingstorefront/web/testsrc/com/training/storefront/web/wrappers/UrlEncodeHttpRequestWrapperTest.java
70be1b35f4d8c25f4f3d9f33bf78b33482303d18
[]
no_license
VladislawL/hybris-commerce-trails
49d08b6639520a5e71273132b2761b5f27ddc114
a1ce4ae00952077bf23a78a64162a375cb50f1a1
refs/heads/master
2022-12-27T19:39:27.514634
2020-10-06T08:25:13
2020-10-06T08:25:13
299,559,346
0
0
null
null
null
null
UTF-8
Java
false
false
3,099
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package com.training.storefront.web.wrappers; import de.hybris.bootstrap.annotations.UnitTest; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringUtils; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; /** * Test class for {@link UrlEncodeHttpRequestWrapper} */ @UnitTest public class UrlEncodeHttpRequestWrapperTest { private static final String SLASH = "/"; private static final String TEST_PATTERN = "test pattern"; private static final String TEST_REQUEST_URI = "test request uri"; private static final String TEST_CONTEXT_PATH = "test context path"; private static final String TEST_SERVLET_PATH = "test servlet path"; private HttpServletRequest request; private UrlEncodeHttpRequestWrapper urlWrapper; @Before public void setUp() { request = Mockito.mock(HttpServletRequest.class); Mockito.doReturn(TEST_CONTEXT_PATH).when(request).getContextPath(); urlWrapper = new UrlEncodeHttpRequestWrapper(request, TEST_PATTERN); } @Test public void getContextPathTest() { Assert.assertEquals(TEST_CONTEXT_PATH + SLASH + TEST_PATTERN, urlWrapper.getContextPath()); } @Test public void getRequestURITest() { mockAndTestRequestURI(TEST_REQUEST_URI); mockAndTestRequestURI(TEST_CONTEXT_PATH + TEST_REQUEST_URI); mockAndTestRequestURI(TEST_CONTEXT_PATH + SLASH + TEST_PATTERN + TEST_REQUEST_URI); } @Test public void getServletPathTest() { mockAndTestServletPath(SLASH, StringUtils.EMPTY); mockAndTestServletPath(SLASH + TEST_PATTERN, StringUtils.EMPTY); mockAndTestServletPath(SLASH + TEST_PATTERN + SLASH, StringUtils.EMPTY); mockAndTestServletPath(TEST_SERVLET_PATH + SLASH + TEST_PATTERN + SLASH, TEST_SERVLET_PATH + SLASH); mockAndTestServletPath(TEST_SERVLET_PATH, TEST_SERVLET_PATH); } @Test public void urlPatternCheckerTest() { boolean result = urlWrapper.urlPatternChecker(TEST_CONTEXT_PATH, TEST_PATTERN); Assert.assertEquals(false, result); result = urlWrapper.urlPatternChecker(TEST_PATTERN + TEST_CONTEXT_PATH, TEST_PATTERN); Assert.assertEquals(false, result); result = urlWrapper.urlPatternChecker(TEST_CONTEXT_PATH + SLASH + TEST_PATTERN, TEST_PATTERN); Assert.assertEquals(true, result); result = urlWrapper.urlPatternChecker(TEST_CONTEXT_PATH + SLASH + TEST_PATTERN + SLASH, TEST_PATTERN); Assert.assertEquals(true, result); } protected void mockAndTestRequestURI(final String mockedRequestResponse) { Mockito.doReturn(mockedRequestResponse).when(request).getRequestURI(); final String result = urlWrapper.getRequestURI(); Assert.assertEquals(TEST_CONTEXT_PATH + SLASH + TEST_PATTERN + TEST_REQUEST_URI, result); } protected void mockAndTestServletPath(final String mockedRequestServletPath, final String expecterWrapperResponse) { Mockito.doReturn(mockedRequestServletPath).when(request).getServletPath(); final String result = urlWrapper.getServletPath(); Assert.assertEquals(expecterWrapperResponse, result); } }
[ "vladislaw.logvin@yandex.ru" ]
vladislaw.logvin@yandex.ru
e58e1e506187b682e247e85e2d1c249bcb43ec5e
7fee790d4d50b25e17ad679346d0876783a121bd
/src/main/java/chap9/method7/entity/UserInfo.java
26d1a31dec22babfb7042fb8af27c8796652c4f3
[]
no_license
hjy628/concurrency-practice
e9523a2c941cbf27ca8c26d394bd370af946650b
ea2437e024e22efe7e1a38efdebb91931733088f
refs/heads/master
2021-05-07T03:10:30.509441
2017-11-23T08:12:33
2017-11-23T08:12:33
110,631,352
0
0
null
null
null
null
UTF-8
Java
false
false
426
java
package chap9.method7.entity; /** * Created by hjy on 17-11-22. */ public class UserInfo { private String username; public UserInfo( ) { super(); } public UserInfo(String username) { super(); this.username = username; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } }
[ "hjy628@gmail.com" ]
hjy628@gmail.com
4de48f72799374145674b76fa6ebec2f9825b67a
1c51955cc1a527cf48c55d92cc736114890f2800
/src/main/java/com/timber/eceiro/entity/GroupNotificationMessage.java
81c72a8eeca3a430a52c4578fca38deff1b94a20
[]
no_license
Androids-help/eceiro_server
2b55a15ef6a8d2229d9ab68e4af6d08af8ca6055
163ee17639a2ae174596d92302ce0716211f6f1e
refs/heads/master
2022-06-13T06:49:37.055437
2020-05-06T09:28:28
2020-05-06T09:28:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,040
java
package com.timber.eceiro.entity; import io.rong.messages.BaseMessage; public class GroupNotificationMessage extends BaseMessage { public static final transient String TYPE = "RC:GrpNtf"; private static final String TAG = "GroupNotificationMessage"; public static final String GROUP_OPERATION_CREATE = "Create"; public static final String GROUP_OPERATION_ADD = "Add"; public static final String GROUP_OPERATION_DISMISS = "Dismiss"; public static final String GROUP_OPERATION_QUIT = "Quit"; public static final String GROUP_OPERATION_KICKED = "Kicked"; public static final String GROUP_OPERATION_RENAME = "Rename"; public static final String GROUP_OPERATION_BULLETIN = "Bulletin"; private String operatorUserId; private String extra; private String operation; private String data; private String message; public GroupNotificationMessage(String operatorUserId,String operation, String data) { this.operatorUserId = operatorUserId; this.operation = operation; this.data = data; } public String getOperatorUserId() { return operatorUserId; } public void setOperatorUserId(String operatorUserId) { this.operatorUserId = operatorUserId; } public String getExtra() { return extra; } public void setExtra(String extra) { this.extra = extra; } public String getData() { return data; } public void setOperation(String operation) { this.operation = operation; } public String getOperation() { return operation; } public void setData(String data) { this.data = data; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } @Override public String getType() { return "RC:GrpNtf"; } @Override public String toString() { return "GroupNotificationMessage{" + "content='" + '\'' + '}'; } }
[ "1335443221@qq.com" ]
1335443221@qq.com
ba1a5e81efce6729ef9b68a967e63fcfe0d015a2
1b99c5c904e90bdff4447e159dbe52b617018bdc
/javashop/shop-core/src/main/java/com/enation/app/shop/core/member/service/impl/MessageFrontManager.java
eb800371e56dc1d659d84a554600658a117e801d
[]
no_license
xxfeng/fruits
133835b86fa1c6b83069403486a6d2eaa4296ab1
9f1e42e04b4c22c642e66f3b4a35a001d633ea8b
refs/heads/master
2021-05-07T21:01:38.840549
2017-11-01T01:47:08
2017-11-01T01:47:08
108,985,413
0
1
null
null
null
null
UTF-8
Java
false
false
4,019
java
package com.enation.app.shop.core.member.service.impl; import java.util.HashMap; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.enation.app.base.core.model.Member; import com.enation.app.shop.core.member.model.MessageFront; import com.enation.app.shop.core.member.service.IMessageFrontManager; import com.enation.eop.sdk.context.UserConext; import com.enation.framework.database.IDaoSupport; import com.enation.framework.database.Page; /** * 前台站内消息 * @author fk * @version v1.0 * @since v6.2 * 2016年12月5日 下午1:07:01 */ @Service public class MessageFrontManager implements IMessageFrontManager{ @Autowired private IDaoSupport daoSupport; /* * (non-Javadoc) * @see com.enation.app.shop.core.member.service.IMessageFrontManager#getMessagesFront(java.lang.Integer, int, java.lang.Integer) */ @Override public Page getMessagesFront(Integer pageNo, Integer pageSize, Integer memberId) { String sql = "select * from es_message_front where member_id=? and is_delete=1 order by msg_id desc "; return daoSupport.queryForPage(sql, pageNo, pageSize, memberId); } /* * (non-Javadoc) * @see com.enation.app.shop.core.member.service.IMessageFrontManager#getMessageNoReadCount() */ @Override public int getMessageNoReadCount() { Member member =UserConext.getCurrentMember(); if(member==null){ return 0; } String sql = "select count(0) from es_message_front where member_id =? and is_read =0 and is_delete =1 "; return daoSupport.queryForInt(sql.toString(), member.getMember_id()); } /* * (non-Javadoc) * @see com.enation.app.shop.core.member.service.IMessageFrontManager#editMessageInRecycle(java.lang.String) */ @Override public void editMessageInRecycle(String messageIds) { Map map = new HashMap<String, Object>(); map.put("is_delete", 0); daoSupport.update("es_message_front", map , " msg_id in ("+messageIds+")"); } /* * (non-Javadoc) * @see com.enation.app.shop.core.member.service.IMessageFrontManager#editMessageHaveRead(java.lang.String) */ @Override public void editMessageHaveRead(String messageIds) { Map map = new HashMap<String, Object>(); map.put("is_read", 1); daoSupport.update("es_message_front", map , " msg_id in ("+messageIds+")"); } /* * (non-Javadoc) * @see com.enation.app.shop.core.member.service.IMessageFrontManager#getMessageDetail(java.lang.Integer) */ @Override public Map getMessageDetail(Integer messageId) { String sql = "select * from es_message_front where msg_id= ?"; Map map = daoSupport.queryForMap(sql, messageId); return map; } /* * (non-Javadoc) * @see com.enation.app.shop.core.member.service.IMessageFrontManager#getRecycleMessage(java.lang.Integer, java.lang.Integer, java.lang.Integer) */ @Override public Page getRecycleMessage(Integer page, Integer pageSize, Integer memberId) { String sql = "select * from es_message_front where member_id=? and is_delete=0 order by msg_id desc "; return daoSupport.queryForPage(sql, page, pageSize, memberId); } /* * (non-Javadoc) * @see com.enation.app.shop.core.member.service.IMessageFrontManager#deleteMessages(java.lang.String) */ @Override public void deleteMessages(String messageIds) { String sql = "delete from es_message_front where msg_id in ("+messageIds+")"; daoSupport.execute(sql); } /* * (non-Javadoc) * @see com.enation.app.shop.core.member.service.IMessageFrontManager#getCountByIds(java.lang.String) */ @Override public Integer getCountByIds(String messageIds) { Member member =UserConext.getCurrentMember(); if(member==null){ return 0; } String sql = "select count(0) from es_message_front where member_id =? and msg_id in ("+messageIds+")"; return daoSupport.queryForInt(sql.toString(), member.getMember_id()); } }
[ "777770@sina.com" ]
777770@sina.com
91de3efd14206c0a5653c6d9e7851e25a564d911
7a4ffc8993a120d88b51bb9a74fb1e483ee0d33e
/src/main/java/com/example/demo/controller/ExcelHeaderData.java
d8ec38301cc24e671ca44766d131488e3bb1b397
[]
no_license
ninuxGithub/test-vue-min-js
99134ebf46ac78766766701d916553f659ad8528
f36777b05261c020cf161ede3d4cdb13a3b52787
refs/heads/master
2021-08-11T05:30:07.227280
2017-11-13T06:42:26
2017-11-13T06:42:26
106,352,530
0
0
null
null
null
null
UTF-8
Java
false
false
191
java
package com.example.demo.controller; import java.util.List; import com.example.demo.bean.ExcelRow; public interface ExcelHeaderData { List<ExcelRow> buildHeaderDataList(); }
[ "1732768613@qq.com" ]
1732768613@qq.com
0a970a4f14d4c4d5450aa747999bd6c6883d29d7
3262eeda1110cdd17ff294be8c783b543f87f0f0
/src/pepmhc/junit/MissCleavageEngineTest.java
54f086f74b2fd5506d2738c31d6eea56338696d7
[ "Apache-2.0" ]
permissive
tipplerow/pepmhc
06cffb6d9c02ceae4faa79e823309ad08f641ec5
fd030de9a72a94ce896da6cbcfa7e962084a4a38
refs/heads/master
2021-07-04T07:48:00.392016
2020-09-15T16:29:08
2020-09-15T16:29:08
168,204,813
0
0
null
null
null
null
UTF-8
Java
false
false
2,443
java
package pepmhc.junit; import java.util.List; import jam.app.JamEnv; import jam.math.UnitIndex; import jam.math.UnitIndexRange; import jene.ensembl.EnsemblProteinDb; import jene.hugo.HugoMaster; import jene.missense.MissenseGroup; import jene.missense.MissenseTable; import jene.peptide.Peptide; import jene.peptide.ProteinChange; import jene.tcga.TumorBarcode; import pepmhc.miss.MissCleavageEngine; import pepmhc.miss.MissCleavageRecord; import org.junit.*; import static org.junit.Assert.*; public class MissCleavageEngineTest { @Test public void testGenerate() { String jeneHome = JamEnv.getRequired("JENE_HOME"); HugoMaster hugoMaster = HugoMaster.load(jeneHome + "/data/test/hugo_master_test.tsv"); EnsemblProteinDb ensemblDb = EnsemblProteinDb.load(jeneHome + "/data/test/ensembl_test2.fa"); MissCleavageEngine.initialize(hugoMaster, ensemblDb); TumorBarcode barcode1 = TumorBarcode.instance("barcode1"); TumorBarcode barcode2 = TumorBarcode.instance("barcode2"); MissenseTable missenseTable = MissenseTable.load(jeneHome + "/data/test/ppe_missense.maf"); List<MissenseGroup> missenseGroups = missenseTable.group(barcode1); assertEquals(1, missenseGroups.size()); assertEquals(3, missenseGroups.get(0).size()); List<MissCleavageRecord> cleavageRecords = MissCleavageEngine.generate(missenseGroups.get(0), 9); assertEquals(27, cleavageRecords.size()); assertEquals(UnitIndexRange.instance(17, 25), cleavageRecords.get(0).getNeoPeptideNativeRange()); assertEquals(UnitIndexRange.instance(168, 176), cleavageRecords.get(26).getNeoPeptideNativeRange()); for (MissCleavageRecord cleavageRecord : cleavageRecords) { Peptide neoPeptide = cleavageRecord.getNeoPeptide(); Peptide selfPeptide = cleavageRecord.getSelfPeptide(); ProteinChange proteinChange = cleavageRecord.getProteinChange(); UnitIndex neoPeptideMissensePosition = cleavageRecord.getNeoPeptideMissensePosition(); assertTrue(neoPeptide.residueAt(neoPeptideMissensePosition).equals(proteinChange.getMutated())); assertTrue(selfPeptide.residueAt(neoPeptideMissensePosition).equals(proteinChange.getNative())); } } public static void main(String[] args) { org.junit.runner.JUnitCore.main("pepmhc.junit.MissCleavageEngineTest"); } }
[ "jsshaff@berkeley.edu" ]
jsshaff@berkeley.edu
5141c2fb05b29cce50b6046832f7391470b8b6b8
219f0491bda3d825776e555dcd0dba55db716a7c
/src/main/java/cn/tpson/kulu/gas/repository/StatisticsMapper.java
8eeefee2d719fce9235ed10081133d2a3300bc8c
[]
no_license
kulucode/KuluGas
bbdf16752f97ec79cecbb7ec330615ac8b15f676
d78f2510d1c19d5f2bc03a5b788aee81aab50c92
refs/heads/master
2020-03-19T05:56:25.016073
2018-07-05T12:50:51
2018-07-05T12:50:51
135,976,832
0
0
null
null
null
null
UTF-8
Java
false
false
641
java
package cn.tpson.kulu.gas.repository; import cn.tpson.kulu.gas.dto.StatisticsDTO; import org.springframework.stereotype.Repository; import java.util.List; /** * Created by Zhangka in 2018/07/05 */ @Repository public interface StatisticsMapper { /** * 本年每月上线总数(上线设备数量). * @return */ List<StatisticsDTO> countOnlineOfYear(); /** * 本年每月检测总数(检测设备数量). * @return */ List<StatisticsDTO> countDetectOfYear(); /** * 本年每月处罚总数(处罚设备数量). * @return */ List<StatisticsDTO> countPunishOfYear(); }
[ "zhangka@tpson.cn" ]
zhangka@tpson.cn
11b85b86e98a1e874dff867e79da329ea2501bb5
fce8160c6085dc2ca4a06aca8b3c5c6d6e21169f
/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestFusekiModules.java
0de5a3ecfcc4ca40a045c82b739ed2dd1f0f1076
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
Aklakan/jena
f5d0eef08ed871851963c9dbf60d10f36c92b5bb
ba2cdb6211f60d7725d779a8556266a8c0b2d0c5
refs/heads/master
2023-05-11T19:27:09.932196
2023-05-01T07:05:44
2023-05-01T07:05:44
246,914,975
1
1
Apache-2.0
2023-03-01T08:09:31
2020-03-12T19:28:17
Java
UTF-8
Java
false
false
5,971
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.jena.fuseki.main; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.jena.fuseki.main.sys.FusekiModule; import org.apache.jena.fuseki.main.sys.FusekiModules; import org.apache.jena.fuseki.main.sys.FusekiModulesLoaded; import org.apache.jena.fuseki.main.sys.FusekiModulesSystem; import org.apache.jena.rdf.model.Model; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; public class TestFusekiModules { // Module loading. // file :: src/test/resources/META-INF/services/org.apache.jena.fuseki.main.sys.FusekiModule // Module: ModuleForTest private static FusekiModules system = null; @BeforeClass public static void beforeClass() { system = FusekiModulesSystem.get(); FusekiModulesLoaded.resetSystem(); } @Before public void beforeTest() { ModuleForTest.module.clearLifecycle(); } @AfterClass public static void afterClass() { FusekiModulesSystem.set(system); } @Test public void modules_0() { ModuleForTest module = findModule(); module.clearLifecycle(); assertEquals(1, module.countStart.get()); assertEquals(0, module.countConfiguration.get()); } @Test public void modules_1() { boolean bIsEmpty1 = FusekiModulesLoaded.loaded().asList().isEmpty(); assertFalse(bIsEmpty1); FusekiModulesLoaded.enable(false); boolean bIsEmpty2 = FusekiModulesLoaded.loaded().asList().isEmpty(); assertTrue(bIsEmpty2); FusekiModulesLoaded.enable(true); boolean bIsEmpty3 = FusekiModulesLoaded.loaded().asList().isEmpty(); assertFalse(bIsEmpty3); } @Test public void modules_2() { boolean bIsEmpty1 = FusekiModulesLoaded.loaded().asList().isEmpty(); assertFalse(bIsEmpty1); FusekiModulesLoaded.enable(false); boolean bIsEmpty2 = FusekiModulesLoaded.loaded().asList().isEmpty(); assertTrue(bIsEmpty2); } @Test public void lifecycle_1() { FusekiModulesLoaded.resetSystem(); ModuleForTest module = findModule(); assertFalse(FusekiModulesSystem.get().asList().isEmpty()); FusekiServer.Builder builder = FusekiServer.create().port(0); assertEquals("start:" , 1, module.countStart.get()); assertEquals("prepare:", 0, module.countPrepared.get()); assertEquals("configured:", 0, module.countConfiguration.get()); assertEquals("server: ", 0, module.countServer.get()); assertEquals("serverBefore: ", 0, module.countServerBeforeStarting.get()); assertEquals("serverAfter: ", 0, module.countServerAfterStarting.get()); FusekiServer server = builder.build(); assertFalse(server.getModules().asList().isEmpty()); assertEquals("start:" , 1, module.countStart.get()); assertEquals("prepare:", 1, module.countPrepared.getPlain()); assertEquals("configured:", 1, module.countConfiguration.get()); assertEquals("server: ", 1, module.countServer.get()); assertEquals("serverBefore: ", 0, module.countServerBeforeStarting.get()); assertEquals("serverAfter: ", 0, module.countServerAfterStarting.get()); server.start(); assertEquals("start:" , 1, module.countStart.get()); assertEquals("prepare:", 1, module.countPrepared.get()); assertEquals("configured:", 1, module.countConfiguration.get()); assertEquals("server: ", 1, module.countServer.get()); assertEquals("serverBefore: ", 1, module.countServerBeforeStarting.get()); assertEquals("serverAfter: ", 1, module.countServerAfterStarting.get()); server.stop(); } @Test public void server_module_1() { AtomicBoolean called1 = new AtomicBoolean(false); AtomicBoolean called2 = new AtomicBoolean(false); FusekiModule oneOff = new FusekiModule() { @Override public String name() { return "Local"; } @Override public void prepare(FusekiServer.Builder serverBuilder, Set<String> datasetNames, Model configModel) { called1.set(true); } @Override public void serverBeforeStarting(FusekiServer server) { called2.set(true); } }; assertFalse(FusekiModulesLoaded.loaded().asList().contains(oneOff)); FusekiModules mods = FusekiModules.create(oneOff); assertFalse(called1.get()); assertFalse(called2.get()); FusekiServer server = FusekiServer.create().port(0).setModules(mods).build(); assertTrue(called1.get()); assertFalse(called2.get()); try { server.start(); assertTrue(called2.get()); } finally { server.stop(); } } private ModuleForTest findModule() { return ModuleForTest.module; } }
[ "andy@apache.org" ]
andy@apache.org
463413bd5b28bdcf0fa5295d47620c7085565f04
600f5fb16be769a2e8e55046bafa33268b85a447
/taiji-crypto/src/main/java/com/networknt/taiji/crypto/FeeConfig.java
5769e5bcc7ad626cd60ecd37a3e45e80eb9827cf
[ "Apache-2.0" ]
permissive
networknt/taiji-blockchain
18df9f4a3860cfb92b0caeadd25b01b458abc62b
597d37e8c93dc368df7f6a323bef2e5e75de89d4
refs/heads/master
2023-08-17T08:55:12.585705
2023-08-09T21:25:05
2023-08-09T21:25:05
152,152,601
2
1
null
null
null
null
UTF-8
Java
false
false
306
java
package com.networknt.taiji.crypto; import java.util.Map; public class FeeConfig { Map<String, Fee> currencies; public Map<String, Fee> getCurrencies() { return currencies; } public void setCurrencies(Map<String, Fee> currencies) { this.currencies = currencies; } }
[ "stevehu@gmail.com" ]
stevehu@gmail.com
13e4268a8fe9d255511a49d8f6907d3bcaf395f4
a0e5858528a288b97aa32fb0f2170d6ed9226885
/emp-event/feign/src/main/java/com/taiji/emp/event/cmd/searchVo/TaskPageVo.java
54ff6d3e512e119878d993de1264204a5b105826
[]
no_license
rauldoblem/nangang
f0a0f0c816c7de915c352cc467b2e6716c87a310
e48cadeaf5245c42b7e9a21f28903f4f4e8b6996
refs/heads/master
2020-08-11T04:01:12.891437
2019-06-25T13:42:57
2019-06-25T13:42:57
214,486,888
0
0
null
2019-10-11T16:51:17
2019-10-11T16:51:17
null
UTF-8
Java
false
false
2,634
java
package com.taiji.emp.event.cmd.searchVo; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; import com.taiji.micro.common.vo.IdVo; import lombok.Getter; import lombok.Setter; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; import java.util.List; /** * 处置跟踪 时间轴 EcTaskVo * @author SunYi */ public class TaskPageVo extends IdVo<String> { @Getter @Setter private int page; @Getter @Setter private int size; @Getter @Setter private String schemeId; @Getter @Setter private String eventName; @Getter @Setter private String schemeName; @Getter @Setter private String taskName; @Getter @Setter private List<String> taskStatus; /** * 任务下发时间,格式为yyyy-MM-dd HH:mm:SS */ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonDeserialize(using = LocalDateTimeDeserializer.class) @JsonSerialize(using = LocalDateTimeSerializer.class) @Getter@Setter private List<LocalDateTime> createTimes; /** * 任务分类标志位 0下发任务列表 (通过TC_TASK表里的任务创建单位create_org_id与当前登录用户所属部门匹配查询) * 1接收任务列表 (通过EC_TASK_EXEORG里的任务接收单位org_id与当前登录用户所属部门匹配查询) */ @Getter @Setter private String flag; /** * 当前用户orgId */ @Getter @Setter private String orgId; /** * 创建时间段-开始时间,格式为yyyy-MM-dd HH:mm:SS */ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonDeserialize(using = LocalDateTimeDeserializer.class) @JsonSerialize(using = LocalDateTimeSerializer.class) @Getter@Setter private LocalDateTime createStartTime; /** * 创建时间段-截止时间,格式为yyyy-MM-dd HH:mm:SS */ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonDeserialize(using = LocalDateTimeDeserializer.class) @JsonSerialize(using = LocalDateTimeSerializer.class) @Getter@Setter private LocalDateTime createEndTime; }
[ "18151950796@163.com" ]
18151950796@163.com
762f7b73cf8ac2c1fd174a1e16bf2e38695eb603
7559bead0c8a6ad16f016094ea821a62df31348a
/src/com/vmware/vim25/UpdateInternetScsiDigestPropertiesRequestType.java
df1c500598dd5aa739d7762c7e2c5c7f14e5ef49
[]
no_license
ZhaoxuepengS/VsphereTest
09ba2af6f0a02d673feb9579daf14e82b7317c36
59ddb972ce666534bf58d84322d8547ad3493b6e
refs/heads/master
2021-07-21T13:03:32.346381
2017-11-01T12:30:18
2017-11-01T12:30:18
109,128,993
1
1
null
null
null
null
UTF-8
Java
false
false
3,859
java
package com.vmware.vim25; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for UpdateInternetScsiDigestPropertiesRequestType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="UpdateInternetScsiDigestPropertiesRequestType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="_this" type="{urn:vim25}ManagedObjectReference"/> * &lt;element name="iScsiHbaDevice" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="targetSet" type="{urn:vim25}HostInternetScsiHbaTargetSet" minOccurs="0"/> * &lt;element name="digestProperties" type="{urn:vim25}HostInternetScsiHbaDigestProperties"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "UpdateInternetScsiDigestPropertiesRequestType", propOrder = { "_this", "iScsiHbaDevice", "targetSet", "digestProperties" }) public class UpdateInternetScsiDigestPropertiesRequestType { @XmlElement(required = true) protected ManagedObjectReference _this; @XmlElement(required = true) protected String iScsiHbaDevice; protected HostInternetScsiHbaTargetSet targetSet; @XmlElement(required = true) protected HostInternetScsiHbaDigestProperties digestProperties; /** * Gets the value of the this property. * * @return * possible object is * {@link ManagedObjectReference } * */ public ManagedObjectReference getThis() { return _this; } /** * Sets the value of the this property. * * @param value * allowed object is * {@link ManagedObjectReference } * */ public void setThis(ManagedObjectReference value) { this._this = value; } /** * Gets the value of the iScsiHbaDevice property. * * @return * possible object is * {@link String } * */ public String getIScsiHbaDevice() { return iScsiHbaDevice; } /** * Sets the value of the iScsiHbaDevice property. * * @param value * allowed object is * {@link String } * */ public void setIScsiHbaDevice(String value) { this.iScsiHbaDevice = value; } /** * Gets the value of the targetSet property. * * @return * possible object is * {@link HostInternetScsiHbaTargetSet } * */ public HostInternetScsiHbaTargetSet getTargetSet() { return targetSet; } /** * Sets the value of the targetSet property. * * @param value * allowed object is * {@link HostInternetScsiHbaTargetSet } * */ public void setTargetSet(HostInternetScsiHbaTargetSet value) { this.targetSet = value; } /** * Gets the value of the digestProperties property. * * @return * possible object is * {@link HostInternetScsiHbaDigestProperties } * */ public HostInternetScsiHbaDigestProperties getDigestProperties() { return digestProperties; } /** * Sets the value of the digestProperties property. * * @param value * allowed object is * {@link HostInternetScsiHbaDigestProperties } * */ public void setDigestProperties(HostInternetScsiHbaDigestProperties value) { this.digestProperties = value; } }
[ "495149700@qq.com" ]
495149700@qq.com
9bf2dac0cc5e1a998ab122ade08c545a8d26ef12
86d5c74347ee4c65fd3c8292866f2cedd40d9409
/CamelTest/src/main/generated/aero/sita/iborders/external/identity/identitytypes/v1/package-info.java
b2202c8f17d273a3a3d734e3ee64d9d50090bd9a
[]
no_license
saurabhbamity/localproject
1f531a3bd0de08c69ace446768d25c8e896f85b6
6cb523388fa7face34597b3d752ae02f18b090b4
refs/heads/master
2022-12-27T15:33:03.240696
2019-11-27T07:13:19
2019-11-27T07:13:19
224,218,068
0
0
null
2022-12-16T04:43:49
2019-11-26T14:58:07
Roff
UTF-8
Java
false
false
176
java
@javax.xml.bind.annotation.XmlSchema(namespace = "http://sita.aero/iborders/external/identity/IdentityTypes/V1") package aero.sita.iborders.external.identity.identitytypes.v1;
[ "saurabh.bhardwaj@irissoftware.com" ]
saurabh.bhardwaj@irissoftware.com
38cfe962c91da08522f0ef9d206d2b44b1357ad6
2612f336d667a087823234daf946f09b40d8ca3d
/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/maturity/UseOfObsoleteDateTimeApiInspection.java
0898a2e648af313acba6a7c34b064811e1f16ea8
[ "Apache-2.0" ]
permissive
tnorbye/intellij-community
df7f181861fc5c551c02c73df3b00b70ab2dd589
f01cf262fc196bf4dbb99e20cd937dee3705a7b6
refs/heads/master
2021-04-06T06:57:57.974599
2018-03-13T17:37:00
2018-03-13T17:37:00
125,079,130
2
0
Apache-2.0
2018-03-13T16:09:41
2018-03-13T16:09:41
null
UTF-8
Java
false
false
4,040
java
/* * Copyright 2000-2014 JetBrains s.r.o. * * 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.siyeh.ig.maturity; import com.intellij.psi.*; import com.siyeh.InspectionGadgetsBundle; import com.siyeh.ig.BaseInspection; import com.siyeh.ig.BaseInspectionVisitor; import com.siyeh.ig.psiutils.ClassUtils; import com.siyeh.ig.psiutils.LibraryUtil; import com.siyeh.ig.psiutils.TypeUtils; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import java.util.Arrays; import java.util.HashSet; import java.util.Set; /** * @author Bas Leijdekkers */ public class UseOfObsoleteDateTimeApiInspection extends BaseInspection { static final Set<String> dateTimeNames = new HashSet<>( Arrays.asList("java.util.Date", "java.util.Calendar", "java.util.GregorianCalendar", "java.util.TimeZone", "java.util.SimpleTimeZone")); @Nls @NotNull @Override public String getDisplayName() { return InspectionGadgetsBundle.message("use.of.obsolete.date.time.api.display.name"); } @NotNull @Override protected String buildErrorString(Object... infos) { return InspectionGadgetsBundle.message("use.of.obsolete.date.time.api.problem.descriptor"); } @Override public BaseInspectionVisitor buildVisitor() { return new ObsoleteDateTimeApiVisitor(); } private static class ObsoleteDateTimeApiVisitor extends BaseInspectionVisitor { private Boolean newDateTimeApiPresent = null; @Override public void visitTypeElement(PsiTypeElement typeElement) { if (!isNewDateTimeApiPresent(typeElement)) { return; } super.visitTypeElement(typeElement); final PsiType type = typeElement.getType(); if (!isObsoleteDateTimeType(type)) { return; } final PsiElement parent = typeElement.getParent(); if (parent instanceof PsiMethod) { final PsiMethod method = (PsiMethod)parent; if (LibraryUtil.isOverrideOfLibraryMethod(method)) { return; } } else if (parent instanceof PsiParameter) { final PsiParameter parameter = (PsiParameter)parent; if (LibraryUtil.isOverrideOfLibraryMethodParameter(parameter)) { return; } } registerError(typeElement); } @Override public void visitClass(PsiClass aClass) { if (!isNewDateTimeApiPresent(aClass)) { return; } super.visitClass(aClass); final PsiReferenceList extendsList = aClass.getExtendsList(); if (extendsList == null) { return; } for (PsiJavaCodeReferenceElement referenceElement : extendsList.getReferenceElements()) { final PsiElement target = referenceElement.resolve(); if (!(target instanceof PsiClass)) { return; } final PsiClass extendsClass = (PsiClass)target; if (dateTimeNames.contains(extendsClass.getQualifiedName())) { registerError(referenceElement); } } } private boolean isNewDateTimeApiPresent(PsiElement context) { if (newDateTimeApiPresent == null) { newDateTimeApiPresent = ClassUtils.findClass("java.time.Instant", context) != null; } return newDateTimeApiPresent != Boolean.FALSE; } private static boolean isObsoleteDateTimeType(PsiType type) { if (type == null) { return false; } final PsiType deepComponentType = type.getDeepComponentType(); return dateTimeNames.contains(TypeUtils.resolvedClassName(deepComponentType)); } } }
[ "basleijdekkers@gmail.com" ]
basleijdekkers@gmail.com
826a6e522afe5be746bad2c0ff08ef38f229fffd
506ce9fcd2038f7984fabec85769c8b9eeeb4dfb
/JUnit-Demo/src/test/java/demo3/TestContratAnyOf.java
5d8dab1d9660629f99f840a4730c19e0f02a2a78
[]
no_license
lanaflonPerso/JUnit-Demo
ca031a05ca70ad4892e37c26af0a41bdff483d60
6aed7c234b89e384d02a9d6597a1081311ea3e86
refs/heads/master
2020-04-28T04:03:16.693951
2016-07-09T19:38:55
2016-07-09T19:38:55
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,229
java
package demo3; import org.hamcrest.core.AnyOf; import org.hamcrest.core.IsEqual; import org.hamcrest.core.IsInstanceOf; import org.junit.Assert; import org.junit.Test; public class TestContratAnyOf { /* * Contrat "au moins un" : AnyOf * * Le contrat vérifie qu'au moins un des contrats passés en paramètre du contrat est respecté. * les assertions où au moins un sous-contrat est respecté réussissent */ @Test public void classeDeStringEtEgal() { Assert.assertThat("texte", AnyOf.anyOf( IsInstanceOf.instanceOf(String.class), IsEqual.equalTo("texte") )); } @Test public void classeDeIntegerEtEgal() { Assert.assertThat("texte", AnyOf.anyOf( IsInstanceOf.instanceOf(Integer.class), IsEqual.equalTo("texte") )); } @Test public void classeDeStringEtPasEgal() { Assert.assertThat("texte", AnyOf.anyOf( IsInstanceOf.instanceOf(String.class), IsEqual.equalTo("Texte") )); } @Test public void classeDeIntegerEtPasEgal() { Assert.assertThat("texte", AnyOf.anyOf( IsInstanceOf.instanceOf(Integer.class), IsEqual.equalTo("Texte") )); } }
[ "diop-malick@hotmail.fr" ]
diop-malick@hotmail.fr
905352999aaa8a9c7bb8110527778f2d888283c8
6ca620ed8b9fdb87b8e1ec6cf1636722d1d27595
/htmlgenerator/src/main/java/com/gmail/ichglauben/pagegenerator/core/WebpageGeneratorHelper.java
e2491621f55b9a07b8204408b4e150e8e8e5b813
[]
no_license
quauab/WebpageGenerator
b99b1e65bc6c21c917d9d6317ee31b7177c18fe5
f152d5d638a44c6a2ac15e21da6a457552220586
refs/heads/master
2021-01-17T20:21:26.598784
2016-10-24T17:27:33
2016-10-24T17:27:33
66,717,758
1
0
null
null
null
null
UTF-8
Java
false
false
1,076
java
package com.gmail.ichglauben.pagegenerator.core; import java.util.ArrayList; import java.util.List; /**Generate web page mark-up. * @see com.gmail.ichglauben.pagegenerator.core.WebpageGenerator*/ public class WebpageGeneratorHelper { WebpageGenerator wg = new WebpageGenerator(); /**Single default constructor*/ public WebpageGeneratorHelper() { super(); } /**@param pageHead String array The head tag's children elements * @param bodySettings String array The body tag's property settings * @param content String array The body's children elements * @param bottomElements String array link and script tags inserted after the body end tag * @return page String The web page mark-up*/ public String[] buildPage(String[] pageHead, String[] bodySettings, String[] content, String[] bottomElements) { String head = wg.makeHead(pageHead); String body = wg.makeBody(bodySettings, content); return wg.makePage(head, body, bottomElements); } public String toString() { return "Webpage Generator's Helper Class"; } }
[ "=" ]
=
494b3308e318f8101e61aa524005fccf0fdb6e20
75484aeed789b170359575a3082b95c06c35c095
/logon/src/main/java/com/aliyun/ayland/ui/adapter/ATHomeShortcutRVAdapter.java
f734ae9863d00080d9aa30c1a4f282e328ae692a
[]
no_license
584393321/aite_longguang
abc1ed64bfd0d33c3638fb31c3777af054c2d8f5
97aade9d29a903a648c2cc4993a94d60d7b05820
refs/heads/main
2023-04-07T02:32:24.649736
2021-04-09T09:44:38
2021-04-09T09:44:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,106
java
package com.aliyun.ayland.ui.adapter; import android.app.Activity; import android.os.Handler; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.aliyun.ayland.base.autolayout.util.ATAutoUtils; import com.aliyun.ayland.data.ATSceneManualAutoBean; import com.aliyun.ayland.data.ATShortcutBean; import com.aliyun.ayland.widget.ATCircleLoadingAnimotion; import com.anthouse.xuhui.R; import com.bumptech.glide.Glide; import java.util.ArrayList; import java.util.List; public class ATHomeShortcutRVAdapter extends RecyclerView.Adapter { private Activity mContext; private List<ATShortcutBean> list = new ArrayList<>(); private Handler handler = new Handler(); public ATHomeShortcutRVAdapter(Activity context) { mContext = context; } @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(mContext).inflate(R.layout.at_item_rv_home_card, parent, false); return new ViewHolder(view); } @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { ViewHolder viewHolder = (ViewHolder) holder; viewHolder.setData(position); } public void setIsShowing(int isShowing, int current_position) { list.get(current_position).setIsShowing(isShowing); notifyItemChanged(current_position); } @Override public int getItemCount() { return list.size(); } public void setLists(List<ATShortcutBean> list) { this.list.clear(); this.list.addAll(list); notifyDataSetChanged(); } public class ViewHolder extends RecyclerView.ViewHolder { private LinearLayout mLlContent, mLLStartSuccess; private TextView mTvName; private ImageView mImg; private ATCircleLoadingAnimotion mCircleBar; public ViewHolder(View itemView) { super(itemView); ATAutoUtils.autoSize(itemView); mLlContent = itemView.findViewById(R.id.ll_content); mTvName = itemView.findViewById(R.id.tv_name); mLLStartSuccess = itemView.findViewById(R.id.ll_start_success); mCircleBar = itemView.findViewById(R.id.circle_bar); mImg = itemView.findViewById(R.id.img); } public void setData(int position) { mTvName.setText(list.get(position).getItemName()); if (position == list.size() - 1) mImg.setImageResource(R.drawable.at_icon_s_gengduobianji); else Glide.with(mContext).load(list.get(position).getItemIcon()).into(mImg); if (list.get(position).getShortcutType() == 1 && list.get(position).getOperateType() == 2 && list.get(position).getAttributes() != null && list.get(position).getAttributes().size() != 0) { if ("1".equals(list.get(position).getAttributes().get(0).getValue())) { mLlContent.setBackground(mContext.getResources().getDrawable(R.drawable.selector_home_shortcut)); } else { mLlContent.setBackground(mContext.getResources().getDrawable(R.drawable.selector_18px_ffffff_eeeeee)); } } if (list.get(position).getShortcutType() == 2) { if (list.get(position).getIsShowing() == ATSceneManualAutoBean.SHOWSUCCESS) { clearAnimotion(this); mLLStartSuccess.setVisibility(View.VISIBLE); handler.postDelayed(() -> { list.get(position).setIsShowing(ATSceneManualAutoBean.NOTSHOW); notifyItemChanged(position); }, 800); } else if (list.get(position).getIsShowing() == ATSceneManualAutoBean.SHOWING) { showAnimotion(this); mLLStartSuccess.setVisibility(View.GONE); } else { clearAnimotion(this); mLLStartSuccess.setVisibility(View.GONE); } } mCircleBar.setAnimotionEnd(() -> { mImg.setVisibility(View.VISIBLE); list.get(position).setIsShowing(ATSceneManualAutoBean.NOTSHOW); mLlContent.setBackground(mContext.getResources().getDrawable(R.drawable.selector_18px_ffffff_eeeeee)); }); mLlContent.setOnClickListener(view -> { if (list.get(position).getShortcutType() == 2) { if (list.get(position).getIsShowing() != ATSceneManualAutoBean.NOTSHOW) return; list.get(position).setIsShowing(ATSceneManualAutoBean.SHOWING); showAnimotion(this); } mOnItemClickListener.onItemClick(view, position); }); } } private void showAnimotion(ViewHolder viewHolder) { viewHolder.mCircleBar.setVisibility(View.VISIBLE); viewHolder.mCircleBar.animotionStart(3000); viewHolder.mImg.setVisibility(View.GONE); viewHolder.mLlContent.setBackground(mContext.getResources().getDrawable(R.drawable.selector_home_shortcut)); } private void clearAnimotion(ViewHolder viewHolder) { viewHolder.mCircleBar.setVisibility(View.GONE); viewHolder.mCircleBar.animotionStop(); viewHolder.mLlContent.setBackground(mContext.getResources().getDrawable(R.drawable.selector_18px_ffffff_eeeeee)); } private OnRecyclerViewItemClickListener mOnItemClickListener = null; public interface OnRecyclerViewItemClickListener { void onItemClick(View view, int position); } public void setOnItemClickListener(OnRecyclerViewItemClickListener listener) { this.mOnItemClickListener = listener; } }
[ "584393321@qq.com" ]
584393321@qq.com
228f4f976f9a2ade72b2a5147680bfcc3874cc14
73364c57427e07e90d66692a3664281d5113177e
/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/AbstractWebMessageResponse.java
da83daf82d0e97400343371966310ba8fc35cdbd
[ "BSD-3-Clause" ]
permissive
abyot/sun-pmt
4681f008804c8a7fc7a75fe5124f9b90df24d44d
40add275f06134b04c363027de6af793c692c0a1
refs/heads/master
2022-12-28T09:54:11.381274
2019-06-10T15:47:21
2019-06-10T15:47:21
55,851,437
0
1
BSD-3-Clause
2022-12-16T12:05:12
2016-04-09T15:21:22
Java
UTF-8
Java
false
false
2,693
java
package org.hisp.dhis.dxf2.webmessage; /* * Copyright (c) 2004-2017, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; /** * @author Morten Olav Hansen <mortenoh@gmail.com> */ public class AbstractWebMessageResponse implements WebMessageResponse { /** * Optional type property. Since we are using the somewhat generic name 'response' for the data * part of the message, this can be used to signal what kind of response this is. * <p/> * Some examples might be 'ImportCount', 'ImportSummary', etc. */ private String responseType; public AbstractWebMessageResponse() { this.responseType = getClass().getSimpleName().replaceFirst( "WebMessageResponse", "" ); } public AbstractWebMessageResponse( String responseType ) { this.responseType = responseType; } @JsonProperty @JacksonXmlProperty( isAttribute = true ) public String getResponseType() { return responseType; } public void setResponseType( String responseType ) { this.responseType = responseType; } }
[ "abyota@gmail.com" ]
abyota@gmail.com
000b9151dd902246b776f31040c795d7e343dd8a
3cd69da4d40f2d97130b5bf15045ba09c219f1fa
/sources/p023me/zhanghai/android/materialprogressbar/BuildConfig.java
1256eaea1e66f7786036ab80b225d29e1b3d169d
[]
no_license
TheWizard91/Album_base_source_from_JADX
946ea3a407b4815ac855ce4313b97bd42e8cab41
e1d228fc2ee550ac19eeac700254af8b0f96080a
refs/heads/master
2023-01-09T08:37:22.062350
2020-11-11T09:52:40
2020-11-11T09:52:40
311,927,971
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package p023me.zhanghai.android.materialprogressbar; /* renamed from: me.zhanghai.android.materialprogressbar.BuildConfig */ public final class BuildConfig { public static final String APPLICATION_ID = "me.zhanghai.android.materialprogressbar"; public static final String BUILD_TYPE = "release"; public static final boolean DEBUG = false; public static final String FLAVOR = ""; public static final int VERSION_CODE = 19; public static final String VERSION_NAME = "1.6.1"; }
[ "agiapong@gmail.com" ]
agiapong@gmail.com
928f90343ee2579feaaf6d81b56b8a00d9f48e1e
ed0261afd3d7af2a2c7c226c1ea8577ce5ff5c58
/src/day27/MultiDimensionalArray_Practice2.java
97a6d257f03f658181abe69cdb01a163db8a437b
[]
no_license
Mukaddes06/JavaPractice2020
c7be9367af64178767a886d4f4ff3854c73cbd5f
fd92e845e6cc95764117ab74ae44c0899583c372
refs/heads/master
2020-12-03T22:26:47.732829
2020-02-29T18:01:58
2020-02-29T18:01:58
231,504,657
0
0
null
null
null
null
UTF-8
Java
false
false
968
java
package day27; public class MultiDimensionalArray_Practice2 { public static void main(String[] args) { String[] developersTeam = {"Vlasdislav", "Hasan", "Tolkun","Abide"}; String[] testersTeam = {"Zhibeckchach","Mohammed Sohrabi", "Nursultan"}; String[] businessAnalysisTeam = { "Lisa", "Ershad", "Naila"}; String [][] scrumTeam = {developersTeam,testersTeam,businessAnalysisTeam}; // find the shortest string of text int minLength = scrumTeam[0][0].length(); String shortestString = scrumTeam[0][0]; for (int i = 0; i <scrumTeam.length ; i++) { for(int j=0; j<scrumTeam[i].length; j++){ if(minLength>scrumTeam[i][j].length()){ minLength=scrumTeam[i][j].length(); shortestString=scrumTeam[i][j]; } } } System.out.println(minLength); System.out.println(shortestString); } }
[ "mukaddes_06_@hotmail.com" ]
mukaddes_06_@hotmail.com
25bdc3107f80866e9685979132043d3ce06f11b4
26d459097a814cf68985748dded27ec0ad17e6e9
/cdst-business/conferenza/src/main/java/conferenza/firma/model/RegistroFirmaSessionSigner.java
92709936a898d8323edcf446a47ecc538f2b0ad2
[]
no_license
christiandeangelis/meetpad-public
096af0f7d058a1dd78ce3ca667e8077302f4b20a
d7bac39cc93056859ac34cda2aa1e85cec3f73ea
refs/heads/main
2023-07-13T20:34:52.657949
2021-09-01T12:19:32
2021-09-01T12:19:32
402,055,182
0
0
null
2021-09-01T12:37:26
2021-09-01T12:37:26
null
UTF-8
Java
false
false
1,617
java
package conferenza.firma.model; import java.io.Serializable; import java.util.Date; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; /** * * @author guideluc * */ /** * @author guideluc * */ @Entity @Table(name = "registro_firma_sessione_signer") public class RegistroFirmaSessionSigner implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name ="id",unique=true, nullable = false) Integer id ;//integer NOT NULL DEFAULT nextval('registro_firma_adapter_sessione_seq'::regclass), @Column(name ="fk_sessione") String fkSessione; //id del signer da verificare!?!?! @Column(name ="signer") Integer signer; //id del responsabile @Column(name ="owner") Integer owner; @Column(name ="dt_ins") Date dt_ins = new Date(); public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getFkSessione() { return fkSessione; } public void setFkSessione(String fkSessione) { this.fkSessione = fkSessione; } public Integer getSigner() { return signer; } public void setSigner(Integer signer) { this.signer = signer; } public Integer getOwner() { return owner; } public void setOwner(Integer owner) { this.owner = owner; } public Date getDt_ins() { return dt_ins; } public void setDt_ins(Date dt_ins) { this.dt_ins = dt_ins; } }
[ "antonio.genghi@regione.emilia-romagna.it" ]
antonio.genghi@regione.emilia-romagna.it
bc2c4974bdf676f6708e17064577cf668dd7c707
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a019/A019241.java
11bc0482b4a2878a21ab7f528e95b8a6d9be2043
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
369
java
package irvine.oeis.a019; /** * A019241 Cycle class sequence <code>c(n)</code> (the number of true cycles of length n in which a certain node is included) for zeolite STI = Stilbite <code>Na4Ca8[ Al20Si52O144 ] . 56 H2O</code>. * @author Sean A. Irvine */ public class A019241 extends A019239 { @Override protected String startNode() { return "b-2"; } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
2bcfcaad2e0948f6bdfc36bd2621b9a3913115d4
696aa05ec959063d58807051902d8e2c48a989b9
/ole-common/ole-docstore-common/src/main/java/org/kuali/ole/docstore/common/document/content/license/onixpl/RelatedPlaceCode.java
1e367cb278a78f1a985f09067046a015af5c9940
[]
no_license
sheiksalahudeen/ole-30-sprint-14-intermediate
3e8bcd647241eeb741d7a15ff9aef72f8ad34b33
2aef659b37628bd577e37077f42684e0977e1d43
refs/heads/master
2023-01-09T00:59:02.123787
2017-01-26T06:09:02
2017-01-26T06:09:02
80,089,548
0
0
null
2023-01-02T22:05:38
2017-01-26T05:47:58
PLSQL
UTF-8
Java
false
false
2,852
java
package org.kuali.ole.docstore.common.document.content.license.onixpl; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * Created by IntelliJ IDEA. * User: Pranitha * Date: 5/30/12 * Time: 1:18 PM * To change this template use File | Settings | File Templates. * <p/> * <p>Java class for RelatedPlaceCode. * <p/> * <p>The following schema fragment specifies the expected content contained within this class. * <p/> * <pre> * &lt;simpleType name="RelatedPlaceCode"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="onixPL:AuthorizedUserSecureRepository"/> * &lt;enumeration value="onixPL:CountryOfLicensee"/> * &lt;enumeration value="onixPL:JORUM"/> * &lt;enumeration value="onixPL:LicenseePremises"/> * &lt;enumeration value="onixPL:LicenseeSecureRepository"/> * &lt;enumeration value="onixPL:RemoteLocation"/> * &lt;/restriction> * &lt;/simpleType> * </pre> */ @XmlType(name = "RelatedPlaceCode", namespace = "http://www.editeur.org/onix-pl") @XmlEnum public enum RelatedPlaceCode { /** * A digital repository maintained by an authorized user on a secure network. */ @XmlEnumValue("onixPL:AuthorizedUserSecureRepository") ONIX_PL_AUTHORIZED_USER_SECURE_REPOSITORY("onixPL:AuthorizedUserSecureRepository"), /** * The country in which a licensee is located. */ @XmlEnumValue("onixPL:CountryOfLicensee") ONIX_PL_COUNTRY_OF_LICENSEE("onixPL:CountryOfLicensee"), /** * A central repository of learning and teaching materialfor the UK academic community operating under the name 'JORUM'. */ @XmlEnumValue("onixPL:JORUM") ONIX_PL_JORUM("onixPL:JORUM"), /** * Any premises occupied by a licensee. */ @XmlEnumValue("onixPL:LicenseePremises") ONIX_PL_LICENSEE_PREMISES("onixPL:LicenseePremises"), /** * A digital repository maintained by a licensee on a secure network. */ @XmlEnumValue("onixPL:LicenseeSecureRepository") ONIX_PL_LICENSEE_SECURE_REPOSITORY("onixPL:LicenseeSecureRepository"), /** * A location that is outside of the premises occupied by a licensee or, if a site is specified in a license, outside the specified site. */ @XmlEnumValue("onixPL:RemoteLocation") ONIX_PL_REMOTE_LOCATION("onixPL:RemoteLocation"); private final String value; RelatedPlaceCode(String v) { value = v; } public String value() { return value; } public static RelatedPlaceCode fromValue(String v) { for (RelatedPlaceCode c : RelatedPlaceCode.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "sheiksalahudeen.m@kuali.org" ]
sheiksalahudeen.m@kuali.org
5a2eafa06b124d113b4dfa08c3266a1b26a25db3
42257393649f5f5ff8c711bc7ae124e07c86ec19
/dubbo/src/main/java/com/alibaba/dubbo/config/AbstractMethodConfig.java
c9d29920c226b95a8ed5e631d658653cdce6bfc4
[]
no_license
kangzhihu/gewara
fe29634b16e20b3213ba1c6a88281da453f7bcb5
3b424dc6cd726a9ceff9f8297c48f71e408c9da2
refs/heads/master
2021-01-21T12:20:56.605847
2017-08-24T16:57:13
2017-08-24T16:57:13
null
0
0
null
null
null
null
GB18030
Java
false
false
4,014
java
/* * Copyright 1999-2011 Alibaba Group. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.dubbo.config; import java.util.Map; import com.alibaba.dubbo.common.Constants; import com.alibaba.dubbo.config.support.Parameter; import com.alibaba.dubbo.rpc.cluster.LoadBalance; /** * AbstractMethodConfig * * @author william.liangf * @export */ public abstract class AbstractMethodConfig extends AbstractConfig { private static final long serialVersionUID = 1L; // 远程调用超时时间(毫秒) protected Integer timeout; // 重试次数 protected Integer retries; // 最大并发调用 protected Integer actives; // 负载均衡 protected String loadbalance; // 是否异步 protected Boolean async; // 异步发送是否等待发送成功 protected Boolean sent; // 服务接口的失败mock实现类名 protected String mock; // 合并器 protected String merger; // 服务接口的失败mock实现类名 protected String cache; // 服务接口的失败mock实现类名 protected String validation; // 自定义参数 protected Map<String, String> parameters; public Integer getTimeout() { return timeout; } public void setTimeout(Integer timeout) { this.timeout = timeout; } public Integer getRetries() { return retries; } public void setRetries(Integer retries) { this.retries = retries; } public String getLoadbalance() { return loadbalance; } public void setLoadbalance(String loadbalance) { checkExtension(LoadBalance.class, "loadbalance", loadbalance); this.loadbalance = loadbalance; } public Boolean isAsync() { return async; } public void setAsync(Boolean async) { this.async = async; } public Integer getActives() { return actives; } public void setActives(Integer actives) { this.actives = actives; } public Boolean getSent() { return sent; } public void setSent(Boolean sent) { this.sent = sent; } @Parameter(escaped = true) public String getMock() { return mock; } public void setMock(String mock) { if (mock != null && mock.startsWith(Constants.RETURN_PREFIX)) { checkLength("mock", mock); } else { checkName("mock", mock); } this.mock = mock; } public void setMock(Boolean mock) { if (mock == null) { setMock((String) null); } else { setMock(String.valueOf(mock)); } } public String getMerger() { return merger; } public void setMerger(String merger) { this.merger = merger; } public String getCache() { return cache; } public void setCache(String cache) { this.cache = cache; } public String getValidation() { return validation; } public void setValidation(String validation) { this.validation = validation; } public Map<String, String> getParameters() { return parameters; } public void setParameters(Map<String, String> parameters) { checkParameterName(parameters); this.parameters = parameters; } }
[ "xieshengrong@live.com" ]
xieshengrong@live.com
f1dbb7aaf5ddcc2fdb972ae2ea5a1679efe8826c
39b6f83641d1a80a48937c42beb6a73311aebc55
/integration-tests/logging-min-level-set/src/main/java/io/quarkus/it/logging/minlevel/set/promote/sub/LoggingMinLevelPromoteSub.java
75d229cd4e1ab8b4de4831fa510ca61916fac117
[ "Apache-2.0" ]
permissive
quarkusio/quarkus
112ecda7236bc061920978ac49289da6259360f4
68af440f3081de7a26bbee655f74bb8b2c57c2d5
refs/heads/main
2023-09-04T06:39:33.043251
2023-09-04T05:44:43
2023-09-04T05:44:43
139,914,932
13,109
2,940
Apache-2.0
2023-09-14T21:31:23
2018-07-06T00:44:20
Java
UTF-8
Java
false
false
792
java
package io.quarkus.it.logging.minlevel.set.promote.sub; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import org.jboss.logging.Logger; import io.quarkus.it.logging.minlevel.set.LoggingWitness; @Path("/log/promote/sub") public class LoggingMinLevelPromoteSub { static final Logger LOG = Logger.getLogger(LoggingMinLevelPromoteSub.class); @GET @Path("/not-info") @Produces(MediaType.TEXT_PLAIN) public boolean isNotInfo() { return !LOG.isInfoEnabled() && !LoggingWitness.loggedInfo("should not print", LOG); } @GET @Path("/error") @Produces(MediaType.TEXT_PLAIN) public boolean isError() { return LoggingWitness.loggedError("error message", LOG); } }
[ "guillaume.smet@gmail.com" ]
guillaume.smet@gmail.com
0942bfdc7f616d33549de7b7d4999e59bb951623
7b17ff87a6366790ee1d4989a0a707a35de288e8
/src/main/java/com/carrafasoft/syscondosind/api/service/BeneficiarioService.java
c0e9ed3498b1fc01a9b0993b901764dd70db7316
[]
no_license
lcarrafabr/syscondosind-api
fa47d46845af57f19a0fe05a36b5f67788b56117
c1163d7533142298c408dd3eeba9ab7dcad26083
refs/heads/master
2023-02-06T17:22:14.880223
2020-12-27T01:53:50
2020-12-27T01:53:50
306,943,610
0
0
null
null
null
null
UTF-8
Java
false
false
1,027
java
package com.carrafasoft.syscondosind.api.service; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.stereotype.Service; import com.carrafasoft.syscondosind.api.model.Beneficiario; import com.carrafasoft.syscondosind.api.repository.BeneficiarioRepository; @Service public class BeneficiarioService { @Autowired private BeneficiarioRepository beneficiarioRepository; public Beneficiario atualizaBeneficiario(Beneficiario beneficiario, Long codigo) { Beneficiario beneficiarioSalvo = buscaPorId(codigo); BeanUtils.copyProperties(beneficiario, beneficiarioSalvo, "beneficiarioId"); return beneficiarioRepository.save(beneficiarioSalvo); } private Beneficiario buscaPorId(Long codigo) { Beneficiario beneficiarioSalvo = beneficiarioRepository.findById(codigo).orElseThrow(() -> new EmptyResultDataAccessException(1)); return beneficiarioSalvo; } }
[ "lcarrafa.br@gmail.com" ]
lcarrafa.br@gmail.com
d3bf1b1ebb4d436d7ead91b837662272f36aa4ef
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/amap/location/b/f/e.java
4a36380b17eb8967fa93ef39aa8fb4e38d3c6d88
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,231
java
package com.amap.location.b.f; import android.content.Context; import android.location.Location; import android.os.Build; import android.os.Build.VERSION; import android.os.Bundle; import android.support.annotation.NonNull; import com.alipay.android.phone.inside.sdk.util.GlobalConstants; import com.amap.location.b.c.g; import com.amap.location.b.c.j; import com.amap.location.common.d.a; import com.amap.location.g.b.c; import com.autonavi.bundle.uitemplate.mapwidget.inter.WidgetType; import java.util.List; /* compiled from: GpsUtil */ public class e { public static void a(@NonNull g gVar, short s, @NonNull Location location, long j, long j2) { gVar.j = s; a(gVar, location, j, j2); } public static void a(@NonNull g gVar, @NonNull Location location, long j, long j2) { gVar.b = j; gVar.a = j2; gVar.c = (int) (location.getLongitude() * 1000000.0d); gVar.d = (int) (location.getLatitude() * 1000000.0d); gVar.e = (int) location.getAltitude(); gVar.f = (int) location.getAccuracy(); gVar.g = (int) location.getSpeed(); gVar.h = (short) ((int) location.getBearing()); Bundle extras = location.getExtras(); gVar.i = 0; if (extras != null) { try { gVar.i = (byte) extras.getInt("satellites", 0); } catch (Exception e) { a.a((Throwable) e); } } } public static short a(@NonNull List<j> list, boolean z, List<c> list2) { list.clear(); short s = Short.MAX_VALUE; if (list2 != null) { double d = 0.0d; int i = 0; for (c next : list2) { int b = next.b(); float d2 = next.d(); boolean a = next.a(); if (b > 1 && b <= 32) { if (a && ((double) d2) > 10.0d) { d += (double) next.c(); i++; } if (z) { j jVar = new j(); jVar.a = (byte) b; jVar.b = (byte) Math.round(next.c()); jVar.c = (byte) Math.round(d2); jVar.d = (short) Math.round(next.e()); jVar.e = a ? (byte) 1 : 0; list.add(jVar); } } if (i > 0) { s = (short) Math.round(((float) (d / ((double) i))) * 100.0f); } } } return s; } public static boolean a(Location location) { return location != null && WidgetType.GPS.equalsIgnoreCase(location.getProvider()) && location.getLatitude() > -90.0d && location.getLatitude() < 90.0d && location.getLongitude() > -180.0d && location.getLongitude() < 180.0d; } public static boolean a(Context context, Location location) { if (VERSION.SDK_INT >= 18) { if (!d.a(location)) { return false; } } else if (!Build.MODEL.equals(GlobalConstants.EXCEPTIONTYPE) && !d.b(context)) { return false; } return true; } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
848e24c83e98555c75031e3aed0f020d640a8c1b
cc65e10feea55bfa97cade23176cd6e574d3bbea
/iportal/iportal-core/src/main/java/com/imall/iportal/core/main/repository/impl/SysRoleRepositoryImpl.java
2b59022322b621a834b3bb15ed1444482a0d83c8
[]
no_license
weishihuai/imallCloudc
ef5a0d7e4866ad7e63251dff512afede7246bd4f
f3163208eaf539aa63dc9e042d2ff6c7403aa405
refs/heads/master
2021-08-20T05:42:23.717707
2017-11-28T09:10:36
2017-11-28T09:10:36
112,305,704
2
4
null
null
null
null
UTF-8
Java
false
false
1,872
java
package com.imall.iportal.core.main.repository.impl; import com.imall.commons.base.util.CommonUtil; import com.imall.iportal.core.main.entity.SysRole; import com.imall.iportal.core.main.repository.SysRoleRepositoryCustom; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.Pageable; import javax.annotation.Resource; import javax.persistence.EntityManager; import javax.persistence.Query; import java.math.BigInteger; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by ygw on 2015/12/31. */ public class SysRoleRepositoryImpl implements SysRoleRepositoryCustom { @Resource private EntityManager entityManager; @Override public Page<SysRole> query(Pageable pageable,Long orgId) { StringBuilder sql = new StringBuilder(); Map<String, Object> paramMap = new HashMap<String, Object>(); if (orgId!=null) { sql.append(" and ORG_ID=:orgId "); paramMap.put(SysRole.ORG_ID,orgId); } sql.append(" and IS_DEFAULT_ADMIN='N' "); sql.append(" order by ORDERBY desc "); Query query = entityManager.createNativeQuery("SELECT * FROM T_PT_SYS_ROLE a where 1=1" + sql, SysRole.class); CommonUtil.formatQueryParameter(query, paramMap); query.setFirstResult(pageable.getPageNumber() * pageable.getPageSize()); query.setMaxResults(pageable.getPageSize()); List<SysRole> resultList = query.getResultList(); Query totalQuery = entityManager.createNativeQuery("SELECT COUNT(*) FROM T_PT_SYS_ROLE a WHERE 1=1" + sql); CommonUtil.formatQueryParameter(totalQuery, paramMap); int total = ((BigInteger)totalQuery.getSingleResult()).intValue(); return new PageImpl<SysRole>(resultList, pageable, total); } }
[ "34024258+weishihuai@users.noreply.github.com" ]
34024258+weishihuai@users.noreply.github.com
cfe2fe4a2686a5923d9d3fab2e663c866c56a664
3fa1e45f37d4b5598bf27dd53c3afa66ba35ca7d
/src/main/java/com/livinglogic/ul4/FunctionIsUndefined.java
31e289cc0c58e48e0566659a5bff6dbaff623c58
[]
no_license
LivingLogic/LivingLogic.Java.ul4
6d60db3c6b1e8c3476fb92ec9387d74fd9446239
105c29f7e5680e68c8a5d6a4ea15886c3e276387
refs/heads/master
2023-05-01T09:41:44.617885
2023-04-13T11:27:09
2023-04-13T11:27:09
16,170,182
1
1
null
2020-12-04T17:46:48
2014-01-23T11:08:02
Java
UTF-8
Java
false
false
724
java
/* ** Copyright 2009-2023 by LivingLogic AG, Bayreuth/Germany ** All Rights Reserved ** See LICENSE for the license */ package com.livinglogic.ul4; import java.util.List; public class FunctionIsUndefined extends Function { @Override public String getNameUL4() { return "isundefined"; } private static final Signature signature = new Signature().addPositionalOnly("obj"); @Override public Signature getSignature() { return signature; } @Override public Object evaluate(EvaluationContext context, BoundArguments args) { return call(args.get(0)); } public static boolean call(Object obj) { return obj instanceof Undefined; } public static final Function function = new FunctionIsUndefined(); }
[ "walter@livinglogic.de" ]
walter@livinglogic.de
8c08e02dd7d9410c4bdf2028f562c8861a0216fa
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project29/src/main/java/org/gradle/test/performance29_5/Production29_407.java
dba92864642df12013a4ac2444d65d80fce8e0fb
[]
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.performance29_5; public class Production29_407 extends org.gradle.test.performance12_5.Production12_407 { private final String property; public Production29_407() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
6bd743690602d5d78d666f20f652aece93329fe5
c5a6b1fe960fd3b526f6a86644cfd9b11a271e6e
/src/test/java/org/elasticsearch/test/unit/index/query/plugin/IndexQueryParserPlugin2Tests.java
6f98b2fd16bccb26500e055809d0e44a3bed11ab
[ "Apache-2.0" ]
permissive
radu-gheorghe/elasticsearch
84f3af67959a8d476a9357b34ffe921420827196
de6a394c83fb9f4c379619dbd9875141efed0fbd
refs/heads/master
2021-09-10T07:59:36.578652
2012-05-09T12:35:10
2012-05-09T12:35:10
4,271,248
2
0
null
null
null
null
UTF-8
Java
false
false
3,895
java
/* * Licensed to ElasticSearch and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. ElasticSearch 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.elasticsearch.test.unit.index.query.plugin; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.common.inject.AbstractModule; import org.elasticsearch.common.inject.Injector; import org.elasticsearch.common.inject.ModulesBuilder; import org.elasticsearch.common.inject.util.Providers; import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.SettingsModule; import org.elasticsearch.index.Index; import org.elasticsearch.index.IndexNameModule; import org.elasticsearch.index.analysis.AnalysisModule; import org.elasticsearch.index.cache.IndexCacheModule; import org.elasticsearch.index.engine.IndexEngineModule; import org.elasticsearch.index.query.IndexQueryParserModule; import org.elasticsearch.index.query.IndexQueryParserService; import org.elasticsearch.index.settings.IndexSettingsModule; import org.elasticsearch.index.similarity.SimilarityModule; import org.elasticsearch.indices.query.IndicesQueriesModule; import org.elasticsearch.script.ScriptModule; import org.elasticsearch.threadpool.ThreadPoolModule; import org.testng.annotations.Test; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; /** * */ public class IndexQueryParserPlugin2Tests { @Test public void testCustomInjection() { Settings settings = ImmutableSettings.Builder.EMPTY_SETTINGS; IndexQueryParserModule queryParserModule = new IndexQueryParserModule(settings); queryParserModule.addQueryParser("my", PluginJsonQueryParser.class); queryParserModule.addFilterParser("my", PluginJsonFilterParser.class); Index index = new Index("test"); Injector injector = new ModulesBuilder().add( new SettingsModule(settings), new ThreadPoolModule(settings), new IndicesQueriesModule(), new ScriptModule(settings), new IndexSettingsModule(index, settings), new IndexCacheModule(settings), new AnalysisModule(settings), new IndexEngineModule(settings), new SimilarityModule(settings), queryParserModule, new IndexNameModule(index), new AbstractModule() { @Override protected void configure() { bind(ClusterService.class).toProvider(Providers.of((ClusterService) null)); } } ).createInjector(); IndexQueryParserService indexQueryParserService = injector.getInstance(IndexQueryParserService.class); PluginJsonQueryParser myJsonQueryParser = (PluginJsonQueryParser) indexQueryParserService.queryParser("my"); assertThat(myJsonQueryParser.names()[0], equalTo("my")); PluginJsonFilterParser myJsonFilterParser = (PluginJsonFilterParser) indexQueryParserService.filterParser("my"); assertThat(myJsonFilterParser.names()[0], equalTo("my")); } }
[ "kimchy@gmail.com" ]
kimchy@gmail.com
0ec6d8735bf4d8fe13851935f2b50d61465176aa
ed657210a17ce8fbe1be3f2a32263182987da177
/com.conx.logistics.kernel/datasource/domain/src/main/java/com/conx/logistics/kernel/datasource/domain/validators/MaskValidator.java
4f6639574645a7d77eb57f88fd0997383d9d4347
[]
no_license
conxgit/conxlogistics-gerrit4
e6b3becee3561899cf283b1cbd88b737de6af0f4
24885e639432ab45082060ca66d0de45d80fdd82
refs/heads/master
2021-03-12T20:12:32.324680
2012-12-18T18:17:00
2012-12-18T18:17:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
888
java
package com.conx.logistics.kernel.datasource.domain.validators; import javax.persistence.Entity; /** * Validate against a regular expression mask, specified as validator.mask. If validation is successful a transformation * can also be specified via the validator.transformTo property. This should be set to a string in the standard format * for string replacement via the native JavaScript replace() method. */ @Entity public class MaskValidator extends Validator { public MaskValidator() { typeAsString = "mask"; } /** * Set the mask. Eg : ^\s*(1?)\s*\(?\s*(\d{3})\s*\)?\s*-?\s*(\d{3})\s*-?\s*(\d{4})\s*$ * * @param mask the mask */ private String mask; /** * Set the transformTo. Eg : $1($2) $3 - $4 * * @param transformTo the transformTo */ private String transformTo; }
[ "mduduzi.keswa@bconv.com" ]
mduduzi.keswa@bconv.com
78eafc5fa673516f37e8ede2ab55771278a6b42b
afa2efacde40f198d83719f044e43a3d312a1331
/data-processor/src/main/java/io/micronaut/data/processor/mappers/jpa/OneToManyMapper.java
8257d170ea458c5bf4d53dba9691bf4d0ac28ba8
[ "Apache-2.0" ]
permissive
pollend/micronaut-data
da7111c73a499d2a9d8270b4010c3e0d0d1a8b2e
45c5a9eb4fb5cfa197b38e94e49348914f904cb8
refs/heads/master
2020-12-23T10:38:05.562576
2020-01-29T16:49:29
2020-01-29T16:49:29
237,127,897
2
0
Apache-2.0
2020-01-30T02:56:54
2020-01-30T02:56:53
null
UTF-8
Java
false
false
1,950
java
/* * Copyright 2017-2019 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.micronaut.data.processor.mappers.jpa; import edu.umd.cs.findbugs.annotations.NonNull; import io.micronaut.core.annotation.AnnotationValue; import io.micronaut.core.annotation.AnnotationValueBuilder; import io.micronaut.data.annotation.Relation; import io.micronaut.inject.annotation.NamedAnnotationMapper; import io.micronaut.inject.visitor.VisitorContext; import java.lang.annotation.Annotation; import java.util.Collections; import java.util.List; /** * Maps JPA's {@code OneToMany} annotation to {@link Relation}. * * @author graemerocher * @since 1.0.0 */ public final class OneToManyMapper implements NamedAnnotationMapper { @NonNull @Override public String getName() { return "javax.persistence.OneToMany"; } @Override public List<AnnotationValue<?>> map(AnnotationValue<Annotation> annotation, VisitorContext visitorContext) { AnnotationValueBuilder<Relation> builder = AnnotationValue.builder(Relation.class).value(Relation.Kind.ONE_TO_MANY); annotation.enumValue("cascade", Relation.Cascade.class).ifPresent(c -> builder.member("cascade", c) ); annotation.stringValue("mappedBy").ifPresent(s -> builder.member("mappedBy", s)); AnnotationValue<Relation> ann = builder.build(); return Collections.singletonList(ann); } }
[ "graeme.rocher@gmail.com" ]
graeme.rocher@gmail.com
38b6623edf3217e6ddbb73b66912336036cba3b7
e21b75f5f0092d2a35cecb53751f711120545166
/dbflute-runtime/src/main/java/org/dbflute/cbean/result/grouping/GroupingListDeterminer.java
73262adac763c2c26aba204c70da34d0321e9c28
[ "Apache-2.0" ]
permissive
tty-github/dbflute-core
1f4dfcd5a878ee85572b56411c002506291fc002
b8bc0a2f84630967a14aff97b13131d6dac5bfcd
refs/heads/master
2021-01-16T20:52:35.290319
2016-03-18T13:55:57
2016-03-18T13:55:57
42,177,557
0
0
null
2015-09-09T12:41:14
2015-09-09T12:41:13
null
UTF-8
Java
false
false
1,346
java
/* * Copyright 2014-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.dbflute.cbean.result.grouping; /** * The determiner of grouping list. * @param <ENTITY> The type of entity. * @author jflute */ public interface GroupingListDeterminer<ENTITY> { /** * Determine whether the grouped row is break. * @param rowResource The row resource of grouping list. (NotNull and the property 'groupingRowList' is not empty and the property 'currentEntity' is not null) * @param nextEntity The entity of next element. (NotNull and the rowResource does not contain yet) * @return The determination, true or false. (true if the the next entity is registered to next row) */ boolean isBreakRow(GroupingListRowResource<ENTITY> rowResource, ENTITY nextEntity); }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
ad3f3f46cfb3d4f884a00d59adc8afd131a03737
7ad7316b96639bc6603278887ba0d3302426f5a3
/2022/100_patterns/src/main/java/si/um/feri/aiv/patterns/strategija/konkretne/Mastercard.java
76c080e580676593fedc922343fc68276045b3ef
[]
no_license
lukapavlic/aiv
b195d66040f1e07d6d66476edbd76d3805f8f460
abd4eea48561d11f60c878f7ea01f235df176850
refs/heads/master
2023-05-15T03:59:25.885975
2023-05-07T11:13:51
2023-05-07T11:13:51
31,263,655
5
14
null
2023-02-23T20:47:38
2015-02-24T14:27:27
Java
UTF-8
Java
false
false
390
java
package si.um.feri.aiv.patterns.strategija.konkretne; import java.util.logging.Logger; import si.um.feri.aiv.patterns.strategija.PlacilnoSredstvo; public class Mastercard implements PlacilnoSredstvo { Logger log=Logger.getLogger(Mastercard.class.toString()); @Override public String izvediPlacilo() { log.info("Plačujem z Masercardom"); return "Plačujem z Masercardom"; } }
[ "luka.pavlic@gmail.com" ]
luka.pavlic@gmail.com
3ab388eb5eba67f28dfb1eacd9c56e7a29842c74
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/app/src/main/java/org/gradle/testapp/performancenull_46/Productionnull_4581.java
a0e91bd3502677377c905d013b668730f2dd8b8d
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
588
java
package org.gradle.testapp.performancenull_46; public class Productionnull_4581 { private final String property; public Productionnull_4581(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
bb3b3410973e5ad4d266f1fbade34e1a02602d96
6d2b2f00b04896600cac3b033cc656b514e180f9
/app/src/main/java/com/guo/qlzx/maxiansheng/activity/SetSafetyActivity.java
69a8994b802824289995795bcdd9e62660f58343
[]
no_license
a123456w/mxs
bc166b8cb72a3361e7478d2166d6385dd0106b03
f353ce35ba54dd530fbfb656b00e41de7ebbdda2
refs/heads/master
2020-03-31T11:22:43.410002
2018-10-09T02:34:15
2018-10-09T02:34:15
152,174,292
0
0
null
null
null
null
UTF-8
Java
false
false
6,768
java
package com.guo.qlzx.maxiansheng.activity; import android.content.Intent; import android.text.TextUtils; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import com.guo.qlzx.maxiansheng.R; import com.guo.qlzx.maxiansheng.bean.IsAlipayBean; import com.guo.qlzx.maxiansheng.bean.SetSafetyBean; import com.guo.qlzx.maxiansheng.http.RemoteApi; import com.guo.qlzx.maxiansheng.util.ToolUtil; import com.qlzx.mylibrary.base.BaseActivity; import com.qlzx.mylibrary.base.BaseSubscriber; import com.qlzx.mylibrary.bean.BaseBean; import com.qlzx.mylibrary.http.HttpHelp; import com.qlzx.mylibrary.util.PreferencesHelper; import com.qlzx.mylibrary.util.ToastUtil; import com.qlzx.mylibrary.widget.LoadingLayout; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; /** * Created by 李 on 2018/4/12. * 设置-账户安全 */ public class SetSafetyActivity extends BaseActivity { @BindView(R.id.tv_safety_info) TextView tvSafetyInfo; @BindView(R.id.ll_safety_info) LinearLayout llSafetyInfo; @BindView(R.id.ll_safety_password) LinearLayout llSafetyPassword; @BindView(R.id.tv_set) TextView tvSet; private PreferencesHelper helper; //修改密码/设置 private int type=1; @Override public int getContentView() { return R.layout.activity_set_safety; } @Override public void initView() { ButterKnife.bind(this); loadingLayout.setStatus(LoadingLayout.Success); titleBar.setLeftImageRes(R.drawable.ic_back_gray); titleBar.setTitleText("账户安全"); helper=new PreferencesHelper(this); } @Override public void getData() { getInfo(helper.getToken()); } private void getInfo(String token){ HttpHelp.getInstance().create(RemoteApi.class).getUserPhone(token) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new BaseSubscriber<BaseBean<SetSafetyBean>>(this, null) { @Override public void onNext(BaseBean<SetSafetyBean> baseBean) { super.onNext(baseBean); if (baseBean.code == 0) { if (baseBean.data != null) { tvSafetyInfo.setText(ToolUtil.setTingPhone(baseBean.data.getMobile())); type=baseBean.data.getType(); if (type==2){ tvSet.setText("设置"); } } }else if (baseBean.code==4){ ToolUtil.goToLogin(SetSafetyActivity.this); } else { ToastUtil.showToast(SetSafetyActivity.this,baseBean.message); } } @Override public void onError(Throwable throwable) { super.onError(throwable); } }); } private void isAlipay(String token){ HttpHelp.getInstance().create(RemoteApi.class).isAlipay(token) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new BaseSubscriber<BaseBean<IsAlipayBean>>(this, null) { @Override public void onNext(BaseBean<IsAlipayBean> baseBean) { super.onNext(baseBean); if (baseBean.code == 0) { if (baseBean.data.getAlipay_status() == 1) { Intent intent = new Intent(SetSafetyActivity.this, ALiPayActivity.class); startActivity(intent); }else { Intent intent = new Intent(SetSafetyActivity.this, SetSafetyInfoActivity.class); intent.putExtra("CODETYPE", 2); startActivity(intent); } }else if (baseBean.code==4){ ToolUtil.goToLogin(SetSafetyActivity.this); } else { ToastUtil.showToast(SetSafetyActivity.this,baseBean.message); } } @Override public void onError(Throwable throwable) { super.onError(throwable); } }); } @OnClick({R.id.ll_safety_info, R.id.ll_safety_password,R.id.ll_login_password,R.id.ll_alipay}) public void onViewClicked(View view) { Intent intent; switch (view.getId()) { case R.id.ll_safety_info: if (TextUtils.isEmpty(new PreferencesHelper(this).getToken())){ ToolUtil.goToLogin(SetSafetyActivity.this); return; } intent = new Intent(SetSafetyActivity.this, SetSafetyInfoActivity.class); intent.putExtra("CODETYPE", 4); startActivity(intent); //手机号 break; case R.id.ll_safety_password: if (TextUtils.isEmpty(new PreferencesHelper(this).getToken())){ ToolUtil.goToLogin(SetSafetyActivity.this); return; } intent = new Intent(SetSafetyActivity.this, SetPayPasswordActivity.class); intent.putExtra("SETPASSWORD", type); startActivity(intent); //密码 break; case R.id.ll_login_password: //修改登录密码 if (TextUtils.isEmpty(new PreferencesHelper(this).getToken())){ ToolUtil.goToLogin(SetSafetyActivity.this); return; } intent = new Intent(SetSafetyActivity.this, ChangePasswordActivity.class); startActivity(intent); break; case R.id.ll_alipay: //绑定支付宝帐号 if (TextUtils.isEmpty(new PreferencesHelper(this).getToken())){ ToolUtil.goToLogin(SetSafetyActivity.this); return; } isAlipay(helper.getToken()); break; } } @Override protected void onRestart() { super.onRestart(); getInfo(helper.getToken()); } }
[ "dillon66@163.com" ]
dillon66@163.com
887808d5ba52a37c288bfc1fc723c5d944e13678
abdf6a348b3f53ff614d9b228572dd1ca931e050
/eclipse/RipplePower/src/org/ripple/power/hft/EntrySignalGenerator.java
434bec3495ab07e3af4c9f9c457a10ba77942dba
[ "Apache-2.0" ]
permissive
cping/RipplePower
5b2afd114eddbdb1a688e9de98cb409f16adfb89
4bdfd7ddca69e2cfb2c33852379844880cfe2a2a
refs/heads/master
2021-05-16T02:40:30.916689
2021-01-02T07:37:47
2021-01-02T07:37:47
19,198,112
42
13
null
2015-01-15T08:02:34
2014-04-27T07:11:33
Java
UTF-8
Java
false
false
294
java
package org.ripple.power.hft; import org.ripple.power.hft.def.IHStatistics; public interface EntrySignalGenerator { /** * @param stat * @return 信号强度, [-1,1], 绝对值越大强度越大, <0开空头寸, >0开多头寸, 0不动 */ double generateSignal(IHStatistics stat); }
[ "longwind2012@hotmail.com" ]
longwind2012@hotmail.com
bc341bba4886d43970867d044f6eaaf5f1d8792d
dfbc143422bb1aa5a9f34adf849a927e90f70f7b
/Contoh Project/video walp/com/a/a/c/d/a/d.java
0455d7b0f0c27e77ab36eb3ea470ab8ca9ea1d08
[]
no_license
IrfanRZ44/Set-Wallpaper
82a656acbf99bc94010e4f74383a4269e312a6f6
046b89cab1de482a9240f760e8bcfce2b24d6622
refs/heads/master
2020-05-18T11:18:14.749232
2019-05-01T04:17:54
2019-05-01T04:17:54
184,367,300
0
0
null
null
null
null
UTF-8
Java
false
false
1,085
java
package com.a.a.c.d.a; import android.graphics.Bitmap; import com.a.a.c.b.a.e; import com.a.a.c.b.q; import com.a.a.c.b.u; import com.a.a.i.h; import com.a.a.i.i; public class d implements q, u<Bitmap> { private final Bitmap a; private final e b; public d(Bitmap paramBitmap, e parame) { this.a = ((Bitmap)h.a(paramBitmap, "Bitmap must not be null")); this.b = ((e)h.a(parame, "BitmapPool must not be null")); } public static d a(Bitmap paramBitmap, e parame) { if (paramBitmap == null) { return null; } return new d(paramBitmap, parame); } public void a() { this.a.prepareToDraw(); } public Bitmap b() { return this.a; } public Class<Bitmap> c() { return Bitmap.class; } public int e() { return i.a(this.a); } public void f() { this.b.a(this.a); } } /* Location: C:\Users\IrfanRZ\Desktop\video walp\classes_dex2jar.jar * Qualified Name: com.a.a.c.d.a.d * JD-Core Version: 0.7.0.1 */
[ "irfan.rozal44@gmail.com" ]
irfan.rozal44@gmail.com
573ac0102bc85c9bd957ce2d17ad9cfff2e71517
b007e257a7c7329d197a0159ae622188363fb372
/izhuantou-dao/src/main/java/com/izhuantou/dao/webp2p/WebP2pProductRateInfoMapper.java
cdf252d574f2e4cb6187e604ac85dbae89a171e4
[]
no_license
wangyupu222/izhuantou
b0abfab9a0e99489c201a4a78d420a73a952b4a7
db675e175b841268591dbcab438575558028a981
refs/heads/master
2022-12-24T13:20:22.247785
2019-10-24T03:40:30
2019-10-24T03:40:30
217,202,381
1
1
null
2022-12-16T06:34:00
2019-10-24T03:20:57
Java
UTF-8
Java
false
false
379
java
package com.izhuantou.dao.webp2p; import com.github.abel533.mapper.Mapper; import com.izhuantou.damain.webp2p.WebP2pProductRateInfo; /** * 理财产品配置及费率表 * * @author yangbosen * @version 1.0 */ public interface WebP2pProductRateInfoMapper extends Mapper<WebP2pProductRateInfo> { public WebP2pProductRateInfo findByOID(String OID); }
[ "Administrator@windows10.microdone.cn" ]
Administrator@windows10.microdone.cn
deb6c1f7dff9cdfb399f1d0f9777abe71ac49574
fbf27d453d933352a2c8ef76e0445f59e6b5d304
/server/src/com/fy/engineserver/message/QILING_NEW_INFO_RES.java
f84b317329eb0c64eb88b02498586b5f250ebcf0
[]
no_license
JoyPanda/wangxian_server
0996a03d86fa12a5a884a4c792100b04980d3445
d4a526ecb29dc1babffaf607859b2ed6947480bb
refs/heads/main
2023-06-29T05:33:57.988077
2021-04-06T07:29:03
2021-04-06T07:29:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,955
java
package com.fy.engineserver.message; import com.xuanzhi.tools.transport.*; import java.nio.ByteBuffer; /** * 网络数据包,此数据包是由MessageComplier自动生成,请不要手动修改。<br> * 版本号:null<br> * <br> * 数据包的格式如下:<br><br> * <table border="0" cellpadding="0" cellspacing="1" width="100%" bgcolor="#000000" align="center"> * <tr bgcolor="#00FFFF" align="center"><td>字段名</td><td>数据类型</td><td>长度(字节数)</td><td>说明</td></tr> * <tr bgcolor="#FFFFFF" align="center"><td>length</td><td>int</td><td>getNumOfByteForMessageLength()个字节</td><td>包的整体长度,包头的一部分</td></tr> * <tr bgcolor="#FAFAFA" align="center"><td>type</td><td>int</td><td>4个字节</td><td>包的类型,包头的一部分</td></tr> * <tr bgcolor="#FFFFFF" align="center"><td>seqNum</td><td>int</td><td>4个字节</td><td>包的序列号,包头的一部分</td></tr> * <tr bgcolor="#FAFAFA" align="center"><td>create</td><td>long</td><td>8个字节</td><td>配置的长度</td></tr> * </table> */ public class QILING_NEW_INFO_RES implements ResponseMessage{ static GameMessageFactory mf = GameMessageFactory.getInstance(); long seqNum; long create; public QILING_NEW_INFO_RES(){ } public QILING_NEW_INFO_RES(long seqNum,long create){ this.seqNum = seqNum; this.create = create; } public QILING_NEW_INFO_RES(long seqNum,byte[] content,int offset,int size) throws Exception{ this.seqNum = seqNum; create = (long)mf.byteArrayToNumber(content,offset,8); offset += 8; } public int getType() { return 0x80A3B037; } public String getTypeDescription() { return "QILING_NEW_INFO_RES"; } public String getSequenceNumAsString() { return String.valueOf(seqNum); } public long getSequnceNum(){ return seqNum; } private int packet_length = 0; public int getLength() { if(packet_length > 0) return packet_length; int len = mf.getNumOfByteForMessageLength() + 4 + 4; len += 8; packet_length = len; return len; } public int writeTo(ByteBuffer buffer) { int messageLength = getLength(); if(buffer.remaining() < messageLength) return 0; int oldPos = buffer.position(); buffer.mark(); try{ buffer.put(mf.numberToByteArray(messageLength,mf.getNumOfByteForMessageLength())); buffer.putInt(getType()); buffer.putInt((int)seqNum); buffer.putLong(create); }catch(Exception e){ e.printStackTrace(); buffer.reset(); throw new RuntimeException("in writeTo method catch exception :",e); } int newPos = buffer.position(); buffer.position(oldPos); buffer.put(mf.numberToByteArray(newPos-oldPos,mf.getNumOfByteForMessageLength())); buffer.position(newPos); return newPos-oldPos; } /** * 获取属性: * 无帮助说明 */ public long getCreate(){ return create; } /** * 设置属性: * 无帮助说明 */ public void setCreate(long create){ this.create = create; } }
[ "1414464063@qq.com" ]
1414464063@qq.com
7f8262ca0945d9ca9f17a39e28c36ead3526a216
4c01db9b8deeb40988d88f9a74b01ee99d41b176
/easymallTest/shoparound/src/main/java/cn/shoparound/spider/JdSpider.java
7985c1f625106ba043f1388232c18f54f81838f7
[]
no_license
GGPay/-
76743bf63d059cbf34c058b55edfdb6a58a41f71
20b584467142c6033ff92549fd77297da8ae6bfc
refs/heads/master
2020-04-29T10:24:29.949835
2018-04-07T04:34:19
2018-04-07T04:34:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,352
java
package cn.shoparound.spider; import cn.shoparound.pojo.Product; import cn.shoparound.utils.ParseUtil; import cn.wanghaomiao.xpath.model.JXDocument; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * Created by 高健 on 2017/5/17. */ @Component public class JdSpider implements Spider{ private final String searchurl="https://search.jd.com/Search?keyword={keyword}&enc=utf-8"; // private WebDriverUtil webDriverUtil=new WebDriverUtil(); // private WebDriver driver= webDriverUtil.getDriver(); @Resource(name="parseUtil") private ParseUtil parser; private static ObjectMapper MAPPER=new ObjectMapper(); /** * 根据关键词爬取商品信息列表 * @param keyword * @return */ public List<Product> getProductInfo(String keyword) throws Exception { JXDocument document=parser.getDocByJsoup(searchurl.replace("{keyword}",keyword)); List<Product> plist=parsePage(document); return plist; } public List<Product> nextPage(String keyword,int page) throws IOException { page=page*2-1; String s=(page-2)*60+58+""; String nextUrl=searchurl.replace("{keyword}",keyword)+"&page="+page+"&s="+s; JXDocument document=parser.getDocByJsoup(nextUrl); List<Product> plist=parsePage(document); return plist; } private List<Product> parsePage(JXDocument document) throws IOException { String hrefxpath="//ul[@class='gl-warp clearfix']/li/div/div[@class='p-img']/a/@href"; List<String> detailurls=parser.getInfoListByXpath(document,hrefxpath); List<Product> plist=new ArrayList<Product>(); for(String detailurl:detailurls){ Product product=new Product(); // String productId=detailurl.substring(detailurl.lastIndexOf(".")-6,detailurl.lastIndexOf(".")); String productId=parser.getStrByReg(".*?(\\d{3,8}).*?",detailurl); JXDocument doc=parser.getDocByJsoup("https:"+detailurl); //标题 String title=parser.getInfoByXpath(doc,"//div[@class='sku-name']/text()"); //价格 Double price=this.getPrice(productId); //图片 String imageurl=parser.getInfoByXpath(doc,"//img[@id='spec-img']/@data-origin"); product.setUrl("https:"+detailurl); product.setName(title); product.setPrice(price); product.setImageurl("http:"+imageurl); System.out.println(product); plist.add(product); } return plist; } /** * 获取价格信息 * @param productId 商品Id * @return * @throws IOException */ private Double getPrice(String productId) throws IOException { String jsonPrice=parser.getJsonByJsoup("http://p.3.cn/prices/mgets?skuIds=J_"+productId); JsonNode priceNode=MAPPER.readTree(jsonPrice).get(0).get("p"); return Double.parseDouble(priceNode.asText()); } public static void main(String[] args) throws Exception { JdSpider spider=new JdSpider(); spider.getProductInfo("三星"); } }
[ "pinggaimuir@sina.com" ]
pinggaimuir@sina.com
a60d47029cf35a90fe579d100953af47c8e77c45
f788fb59b3dca4ea10848224886965fd87f42db2
/src/org/pepstock/charba/showcase/client/cases/charts/DoughnutCase.java
11b97cd01d8e093360e72c2bda61d63716310063
[ "Apache-2.0" ]
permissive
pepstock-org/Charba-Showcase
db3ad32e9ab07876f1132a38235d8a251c15501e
c980631cd840ae8d14e8f418d690853f4ee51de5
refs/heads/master
2023-06-01T06:28:52.834689
2023-05-23T09:28:26
2023-05-23T09:28:26
106,569,735
3
1
Apache-2.0
2023-05-19T16:27:04
2017-10-11T15:04:54
Java
UTF-8
Java
false
false
3,600
java
package org.pepstock.charba.showcase.client.cases.charts; import java.util.List; import org.pepstock.charba.client.data.Dataset; import org.pepstock.charba.client.data.DoughnutDataset; import org.pepstock.charba.client.enums.Position; import org.pepstock.charba.client.gwt.widgets.DoughnutChartWidget; import org.pepstock.charba.client.items.OptionsNode; import org.pepstock.charba.showcase.client.cases.commons.BaseComposite; import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiHandler; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.CheckBox; import com.google.gwt.user.client.ui.Widget; public class DoughnutCase extends BaseComposite { private static ViewUiBinder uiBinder = GWT.create(ViewUiBinder.class); interface ViewUiBinder extends UiBinder<Widget, DoughnutCase> { } @UiField DoughnutChartWidget chart; @UiField CheckBox semiCircle; public DoughnutCase() { initWidget(uiBinder.createAndBindUi(this)); chart.getOptions().setResponsive(true); chart.getOptions().getLegend().setPosition(Position.TOP); chart.getOptions().getTitle().setDisplay(true); chart.getOptions().getTitle().setText("Doughnut chart"); DoughnutDataset dataset = chart.newDataset(); dataset.setLabel("dataset 1"); dataset.setBackgroundColor(getSequenceColors(months, 1)); dataset.setData(getRandomDigits(months, false)); chart.getData().setLabels(getLabels(months)); chart.getData().setDatasets(dataset); } @UiHandler("randomize") protected void handleRandomize(ClickEvent event) { for (Dataset dataset : chart.getData().getDatasets()) { dataset.setData(getRandomDigits(months, false)); } chart.update(); } @UiHandler("add_dataset") protected void handleAddDataset(ClickEvent event) { List<Dataset> datasets = chart.getData().getDatasets(); DoughnutDataset dataset = chart.newDataset(); dataset.setLabel("dataset " + (datasets.size() + 1)); dataset.setBackgroundColor(getSequenceColors(months, 1)); dataset.setData(getRandomDigits(months, false)); datasets.add(dataset); chart.update(); semiCircle.setValue(false); semiCircle.setEnabled(false); } @UiHandler("remove_dataset") protected void handleRemoveDataset(ClickEvent event) { if (chart.getData().getDatasets().size() > 1){ removeDataset(chart); if (chart.getData().getDatasets().size() == 1){ semiCircle.setValue(false); semiCircle.setEnabled(true); } } } @UiHandler("add_data") protected void handleAddData(ClickEvent event) { if (months < 12) { chart.getData().getLabels().add(getLabel()); months++; List<Dataset> datasets = chart.getData().getDatasets(); for (Dataset ds : datasets) { DoughnutDataset pds = (DoughnutDataset) ds; pds.setBackgroundColor(getSequenceColors(months, 1)); pds.getData().add(getRandomDigit(false)); } chart.update(); } } @UiHandler("remove_data") protected void handleRemoveData(ClickEvent event) { removeData(chart); } @UiHandler("semiCircle") protected void handleSemiCircle(ClickEvent event) { OptionsNode options = chart.getNode().getOptions(); if (options.getCircumference() == 180D) { options.setCircumference(360D); options.setRotation(-45D); } else { options.setCircumference(180D); options.setRotation(-90D); } chart.update(); } @UiHandler("source") protected void handleViewSource(ClickEvent event) { Window.open(getUrl(), "_blank", ""); } }
[ "stocki.nail@gmail.com" ]
stocki.nail@gmail.com
9e3017ab080329a9016b6f58807630967a36a740
2c75b416253684a3140ff2985374c2085c07c7cc
/language-note-server/src/main/java/org/tnmk/ln/app/practice/QuestionRepository.java
478c3d2b948c2fe49d94cc3ffbe294b44ddb8beb
[ "MIT" ]
permissive
khoitnm/language-note
87b062f153e6391363c5208485cfc415feb02d1f
cf9149cfd3a32c542a1271e534a73d344981bf50
refs/heads/master
2022-07-10T21:12:45.916854
2018-09-30T12:38:35
2018-09-30T12:38:35
82,350,561
1
0
null
2022-07-01T20:38:11
2017-02-18T00:44:37
Java
UTF-8
Java
false
false
377
java
package org.tnmk.ln.app.practice; import org.springframework.data.neo4j.repository.GraphRepository; import org.tnmk.ln.app.practice.entity.question.Question; import org.tnmk.ln.infrastructure.data.neo4j.repository.Neo4jRepoScanInclude; /** * @author khoi.tran on 2/26/17. */ @Neo4jRepoScanInclude public interface QuestionRepository extends GraphRepository<Question> { }
[ "khoi.tnm@gmail.com" ]
khoi.tnm@gmail.com
76932baaa9466d2543237e5773d4d0a0ccb37da7
66ec269ea256d162beba2da78285d871ce7896b3
/app/src/main/java/com/duy/text/converter/pro/floating/codec/FloatingCodecService.java
d5b7828f663ca243b0369c5d2c917a1aa4d8fe46
[ "Apache-2.0" ]
permissive
androlua/text_converter
10dcc65307ad12f1f3e220358b22cc182d28bf6e
237d0961344449354ff4419d91952f4474fb00d4
refs/heads/master
2021-09-01T14:41:03.154101
2017-12-27T14:28:34
2017-12-27T14:28:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,756
java
/* * Copyright (c) 2017 by Tran Le Duy * * 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.duy.text.converter.pro.floating.codec; import android.app.Notification; import android.app.PendingIntent; import android.content.Intent; import android.support.annotation.NonNull; import android.support.design.widget.TabLayout; import android.support.v4.app.NotificationCompat; import android.support.v4.view.ViewPager; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.duy.text.converter.core.codec.interfaces.CodecMethod; import com.duy.text.converter.core.codec.interfaces.CodecUtil; import com.duy.text.converter.core.utils.ClipboardUtil; import com.duy.text.converter.core.view.BaseEditText; import com.duy.text.converter.R; import com.duy.text.converter.pro.floating.FloatingView; /** * Created by Duy on 9/4/2017. */ public class FloatingCodecService extends FloatingView implements ViewPager.OnPageChangeListener, View.OnClickListener { private BaseEditText mInput, mOutput; private ViewPager mConvertMethod; private TextWatcher mOutputWatcher = new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { if (mOutput.isFocused()) convert(false); } @Override public void afterTextChanged(Editable s) { } }; private TextWatcher mInputWatcher = new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { if (mInput.isFocused()) convert(true); } @Override public void afterTextChanged(Editable s) { } }; @NonNull @Override protected View inflateButton(@NonNull ViewGroup parent) { return LayoutInflater.from(getContext()).inflate(R.layout.floating_codec_icon, parent, false); } @NonNull @Override protected View onCreateView(@NonNull ViewGroup parent) { View view = LayoutInflater.from(getContext()).inflate(R.layout.floating_codec, parent, false); mInput = view.findViewById(R.id.edit_input); mOutput = view.findViewById(R.id.edit_output); mInput.addTextChangedListener(mInputWatcher); mOutput.addTextChangedListener(mOutputWatcher); view.findViewById(R.id.img_copy).setOnClickListener(this); view.findViewById(R.id.image_paste).setOnClickListener(this); view.findViewById(R.id.img_copy_out).setOnClickListener(this); view.findViewById(R.id.image_paste_out).setOnClickListener(this); mConvertMethod = view.findViewById(R.id.spinner_choose); mConvertMethod.setAdapter(new CodecMethodAdapter(getContext())); mConvertMethod.addOnPageChangeListener(this); ((TabLayout) view.findViewById(R.id.tab_layout)).setupWithViewPager(mConvertMethod); return view; } @Override public void onClick(View view) { int i = view.getId(); if (i == R.id.img_copy) { ClipboardUtil.setClipboard(getContext(), mInput.getText().toString()); } else if (i == R.id.image_paste) { mInput.setText(ClipboardUtil.getClipboard(getContext())); } else if (i == R.id.img_copy_out) { ClipboardUtil.setClipboard(getContext(), mOutput.getText().toString()); } else if (i == R.id.image_paste_out) { mOutput.setText(ClipboardUtil.getClipboard(getContext())); } } private void convert(boolean to) { int index = mConvertMethod.getCurrentItem(); CodecMethod method = CodecMethod.values()[index]; if (to) { String inp = mInput.getText().toString(); mOutput.setText(CodecUtil.encode(method, inp)); } else { String out = mOutput.getText().toString(); mInput.setText(CodecUtil.decode(method, out)); } } @NonNull @Override protected Notification createNotification() { Intent intent = new Intent(this, FloatingCodecService.class).setAction(ACTION_OPEN); return new NotificationCompat.Builder(this) .setSmallIcon(R.mipmap.ic_launcher) .setContentTitle(getString(R.string.app_name)) .setContentText(getString(R.string.floating_notification_description)) .setContentIntent(PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT)) .setPriority(NotificationCompat.PRIORITY_MIN) .build(); } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { if (mInput.hasFocus()) { convert(true); } else { convert(false); } } @Override public void onPageScrollStateChanged(int state) { } }
[ "tranleduy1233@gmail.com" ]
tranleduy1233@gmail.com
e145d90ce80a2927289f91a2a8bd5a566f4df499
1146637549fb45ff9c2e1d0ae6ff929f96ce8ec1
/component/sdk/src/main/java/com/timecat/component/commonsdk/utils/utils/IOUtils.java
7df74bdce4e7b82389f4fbfb0096e553a26799f1
[ "Apache-2.0" ]
permissive
LinXueyuanStdio/TimeCatComponents
1a525343eb830e15d8ecacbcfde23f74c644d186
9665cfd69c99c71045f419d197b042376d41df1b
refs/heads/main
2023-08-24T01:27:16.193209
2021-09-30T12:26:48
2021-09-30T12:26:48
324,762,287
0
0
null
null
null
null
UTF-8
Java
false
false
6,174
java
package com.timecat.component.commonsdk.utils.utils; import android.text.TextUtils; import com.timecat.component.commonsdk.utils.override.LogUtil; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.Reader; import java.util.Arrays; /** * Created by newbiechen on 17-5-11. */ public class IOUtils { public static void close(Closeable closeable) { if (closeable == null) return; try { closeable.close(); } catch (IOException e) { e.printStackTrace(); //close error } } public static final char[] ILLEGAL_FILENAME_CHARS = {34, 60, 62, 124, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 58, 42, 63, 92, 47}; public static String readFile(File file) throws IOException { return readFile(file, "UTF-8"); } public static String readFile(File file, String encoding) throws IOException { FileInputStream is = new FileInputStream(file); String text = readFile(is, encoding); is.close(); return text; } public static String readFile(InputStream is, String encoding) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(is, encoding)); char[] buf = new char[8192]; int size; StringBuilder sb = new StringBuilder(buf.length * 4); while ((size = br.read(buf)) != -1) { sb.append(buf, 0, size); } return sb.toString(); } public static boolean writeFile(File file, String text) { try { BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file)); bufferedWriter.write(text); bufferedWriter.flush(); bufferedWriter.close(); return true; } catch (IOException e) { LogUtil.e(e); file.delete(); return false; } } public static boolean isInvalidFilename(String fileName) { if (TextUtils.isEmpty(fileName)) return false; int size = fileName.length(); char c; for (int i = 0; i < size; i++) { c = fileName.charAt(i); if (Arrays.binarySearch(ILLEGAL_FILENAME_CHARS, c) >= 0) return true; } return false; } public static String getFileName(String path) { if (TextUtils.isEmpty(path)) return ""; return path.substring(path.lastIndexOf('/') + 1); } public static String toString(InputStream inputStream) throws IOException { return toString(inputStream, 16 * 1024, "UTF-8"); } public static String toString(InputStream inputStream, final int bufferSize, String encoding) throws IOException { final char[] buffer = new char[bufferSize]; final StringBuilder out = new StringBuilder(); Reader in = new InputStreamReader(inputStream, encoding); for (; ; ) { int rsz = in.read(buffer, 0, buffer.length); if (rsz < 0) break; out.append(buffer, 0, rsz); } return out.toString(); } public static boolean isBinaryFile(File f) { FileInputStream in = null; try { in = new FileInputStream(f); } catch (FileNotFoundException e) { try { if (in != null) { in.close(); } } catch (IOException e1) { e1.printStackTrace(); } return false; } byte[] data = null; try { int size = in.available(); if (size > 1024) size = 1024; data = new byte[size]; in.read(data); in.close(); } catch (IOException e) { e.printStackTrace(); try { in.close(); } catch (IOException e1) { e1.printStackTrace(); } return false; } for (byte b : data) { if (b < 0x09) return true; } return false; } public static boolean copyFile(File oldLocation, File newLocation) { if (!oldLocation.exists()) { return false; } try { return copyFile(new FileInputStream(oldLocation), new FileOutputStream(newLocation, false)); } catch (Exception ex) { LogUtil.e(ex); return false; } } public static boolean copyFile(InputStream inputStream, OutputStream outputStream) { BufferedInputStream reader = null; BufferedOutputStream writer = null; try { reader = new BufferedInputStream(inputStream); writer = new BufferedOutputStream(outputStream); byte[] buff = new byte[8192]; int numChars; while ((numChars = reader.read(buff, 0, buff.length)) != -1) { writer.write(buff, 0, numChars); } return true; } catch (Exception ex) { return false; } finally { try { if (reader != null) { reader.close(); } } catch (IOException ex) { LogUtil.d(ex); } try { if (writer != null) { writer.close(); } } catch (IOException ex) { LogUtil.d(ex); } } } }
[ "761516186@qq.com" ]
761516186@qq.com
a5195dd2457f02ec4f1b34b058b2e0f6ffd9c3df
b733c258761e7d91a7ef0e15ca0e01427618dc33
/cards/src/main/java/org/rnd/jmagic/cards/AngelsMercy.java
a6ad57aeac807454c3566b83d8f91cafeb093a30
[]
no_license
jmagicdev/jmagic
d43aa3d2288f46a5fa950152486235614c6783e6
40e573f8e6d1cf42603fd05928f42e7080ce0f0d
refs/heads/master
2021-01-20T06:57:51.007411
2014-10-22T03:03:34
2014-10-22T03:03:34
9,589,102
2
0
null
null
null
null
UTF-8
Java
false
false
442
java
package org.rnd.jmagic.cards; import static org.rnd.jmagic.Convenience.*; import org.rnd.jmagic.engine.*; import org.rnd.jmagic.engine.generators.*; @Name("Angel's Mercy") @Types({Type.INSTANT}) @ManaCost("2WW") @ColorIdentity({Color.WHITE}) public final class AngelsMercy extends Card { public AngelsMercy(GameState state) { super(state); // You gain 7 life. this.addEffect(gainLife(You.instance(), 7, "You gain 7 life.")); } }
[ "robyter@gmail" ]
robyter@gmail
856bcf0418b9e6bc9ddb19e75b329caa60db8d4e
3ed76f1b1966eb8c037c4949ea4a4f698d534aca
/src/main/java/com/sciome/bmdexpress2/shared/eventbus/analysis/OneWayANOVARequestEvent.java
b7997b6d0f052627baa87af6d53d170abe53ef28
[ "MIT" ]
permissive
auerbachs/BMDExpress-2
580ec4fa9761d5f651de33b9cf491acc05413c5d
df1e1b719f22af75dfd553050e021b524b8455eb
refs/heads/master
2023-08-31T02:58:56.048916
2023-08-16T13:13:45
2023-08-16T13:13:45
93,664,187
15
3
null
2022-11-16T00:52:53
2017-06-07T17:58:27
Java
UTF-8
Java
false
false
288
java
package com.sciome.bmdexpress2.shared.eventbus.analysis; import com.sciome.bmdexpress2.shared.eventbus.BMDExpressEventBase; public class OneWayANOVARequestEvent extends BMDExpressEventBase<String> { public OneWayANOVARequestEvent(String payload) { super(payload); } }
[ "jason.phillips@sciome.com" ]
jason.phillips@sciome.com
0ac41e7879524950dfa58e59cf151609c47d4b9b
4e3c5dc1cfd033b0e7c1bea625f9ee64ae12871a
/com/google/android/gms/drive/realtime/internal/zzp.java
cbcc3b3243ccdf51a38e62b495e298e78f4cfa21
[]
no_license
haphan2014/idle_heroes
ced0f6301b7a618e470ebfa722bef3d4becdb6ba
5bcc66f8e26bf9273a2a8da2913c27a133b7d60a
refs/heads/master
2021-01-20T05:01:54.157508
2017-08-25T14:06:51
2017-08-25T14:06:51
101,409,563
1
4
null
null
null
null
UTF-8
Java
false
false
2,827
java
package com.google.android.gms.drive.realtime.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.zza; import com.google.android.gms.common.internal.safeparcel.zzb; public class zzp implements Creator<ParcelableCollaborator> { static void zza(ParcelableCollaborator parcelableCollaborator, Parcel parcel, int i) { int zzac = zzb.zzac(parcel); zzb.zzc(parcel, 1, parcelableCollaborator.zzCY); zzb.zza(parcel, 2, parcelableCollaborator.zzais); zzb.zza(parcel, 3, parcelableCollaborator.zzait); zzb.zza(parcel, 4, parcelableCollaborator.zzFE, false); zzb.zza(parcel, 5, parcelableCollaborator.zzEO, false); zzb.zza(parcel, 6, parcelableCollaborator.zzadI, false); zzb.zza(parcel, 7, parcelableCollaborator.zzaiu, false); zzb.zza(parcel, 8, parcelableCollaborator.zzaiv, false); zzb.zzH(parcel, zzac); } public /* synthetic */ Object createFromParcel(Parcel x0) { return zzbV(x0); } public /* synthetic */ Object[] newArray(int x0) { return zzdL(x0); } public ParcelableCollaborator zzbV(Parcel parcel) { boolean z = false; String str = null; int zzab = zza.zzab(parcel); String str2 = null; String str3 = null; String str4 = null; String str5 = null; boolean z2 = false; int i = 0; while (parcel.dataPosition() < zzab) { int zzaa = zza.zzaa(parcel); switch (zza.zzbA(zzaa)) { case 1: i = zza.zzg(parcel, zzaa); break; case 2: z2 = zza.zzc(parcel, zzaa); break; case 3: z = zza.zzc(parcel, zzaa); break; case 4: str5 = zza.zzo(parcel, zzaa); break; case 5: str4 = zza.zzo(parcel, zzaa); break; case 6: str3 = zza.zzo(parcel, zzaa); break; case 7: str2 = zza.zzo(parcel, zzaa); break; case 8: str = zza.zzo(parcel, zzaa); break; default: zza.zzb(parcel, zzaa); break; } } if (parcel.dataPosition() == zzab) { return new ParcelableCollaborator(i, z2, z, str5, str4, str3, str2, str); } throw new zza.zza("Overread allowed size end=" + zzab, parcel); } public ParcelableCollaborator[] zzdL(int i) { return new ParcelableCollaborator[i]; } }
[ "hien.bui@vietis.com.vn" ]
hien.bui@vietis.com.vn
c64d6e4a3306e553588bfefbd355821193280d5a
31db60fe49ef7d31f3fc29221a69b97c19c59bb3
/src/main/java/examples/oracle/kv/stats/StoreIteratorMetrics.java
5dc34f8d3375247158322081551272305fb0d1e0
[ "Apache-2.0" ]
permissive
joelnewcom/embeddedOracleKv
d39cc4db1aa26962d7a1c721b87aa55a23124c3e
138d23c66ae91d8e367b5456e4c5ab85dc47fcdc
refs/heads/master
2021-06-25T20:24:13.850335
2019-06-02T19:43:27
2019-06-02T19:43:27
134,009,219
0
0
Apache-2.0
2020-10-13T01:06:34
2018-05-18T22:19:51
Java
UTF-8
Java
false
false
1,035
java
/*- * Copyright (C) 2011, 2018 Oracle and/or its affiliates. All rights reserved. * * This file was distributed by Oracle as part of a version of Oracle NoSQL * Database made available at: * * http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html * * Please see the LICENSE file included in the top-level directory of the * appropriate version of Oracle NoSQL Database for a copy of the license and * additional information. */ package oracle.kv.stats; /** * @deprecated since 3.4, no longer supported. */ @Deprecated public interface StoreIteratorMetrics { public long getBlockedResultsQueuePuts(); public long getAverageBlockedResultsQueuePutTime(); public long getMinBlockedResultsQueuePutTime(); public long getMaxBlockedResultsQueuePutTime(); public long getBlockedResultsQueueGets(); public long getAverageBlockedResultsQueueGetTime(); public long getMinBlockedResultsQueueGetTime(); public long getMaxBlockedResultsQueueGetTime(); }
[ "joel.neukom@gmx.ch" ]
joel.neukom@gmx.ch
ec60c7a03c87d1a868ead58d2ddd2e1d333136ec
b080564fd36b5778c3c52c49e7b05c83271e6080
/src/ExamExercises_07/Exam10and11March2018/Mask.java
25b02c4f962d82a97887b3813946daca0bc654c9
[ "MIT" ]
permissive
DenislavVelichkov/Programming-Basics-Java
9416eec2fa2900b603b2186f11c90cdfea2e404c
dd8997fefc8a9927c498a5d83c9e9f827e9b1b76
refs/heads/master
2020-04-08T05:15:08.169514
2020-02-10T09:32:44
2020-02-10T09:32:44
159,052,830
0
0
null
null
null
null
UTF-8
Java
false
false
2,375
java
package ExamExercises_07.Exam10and11March2018; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Mask { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(reader.readLine()); int width = (2 * n) + 2; int specialValueOuter = n - 2; int specialValueInner = 0; for (int i = 1; i <= n / 2 * 2; i++) { System.out.println(repeatString(" ", specialValueOuter) + "/" + repeatString(" ", specialValueInner) + "|" + " " + "|" + repeatString(" ", specialValueInner) + "\\" + repeatString(" ", specialValueOuter)); specialValueOuter--; specialValueInner++; } System.out.println(repeatString("-", width)); System.out.println("|" + repeatString(" ", n / 2 - 1) + "_" +repeatString(" ", n + 1) + "_" + repeatString(" ", n / 2 - 1) + "|"); System.out.println("|" + repeatString(" ", n / 2 - 1) + "@" +repeatString(" ", n + 1) + "@" + repeatString(" ", n / 2 - 1) + "|"); for (int i = 0; i < n / 2; i++) { System.out.println("|" + repeatString(" ", n * 2) + "|"); } System.out.println("|" + repeatString(" ", n - 1) + "OO" + repeatString(" ", n - 1) + "|"); System.out.println("|" + repeatString(" ", n - 2) + "/ \\" + repeatString(" ", n - 2) + "|"); System.out.println("|" + repeatString(" ", n - 2) + "||||" + repeatString(" ", n - 2) + "|"); specialValueInner = n * 2; specialValueOuter = 1; for (int i = 0; i < n + 1; i++) { System.out.println(repeatString("\\", specialValueOuter) + repeatString("`", specialValueInner) + repeatString("/", specialValueOuter)); specialValueInner -= 2; specialValueOuter++; } } private static String repeatString(String text, int count) { StringBuilder result = new StringBuilder(); for (int i = 0; i < count; i++) { result.append(text); } return result.toString(); } }
[ "denislav.velichkov@gmail.com" ]
denislav.velichkov@gmail.com
86595f337ddb060a2d77e26373fb7a3e4ac9caa6
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project65/src/test/java/org/gradle/test/performance65_2/Test65_139.java
f644a7901f8451476cb349178872010c7cccdfdd
[]
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
292
java
package org.gradle.test.performance65_2; import static org.junit.Assert.*; public class Test65_139 { private final Production65_139 production = new Production65_139("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
80c8203e0b0d9d0337a099236adc4271596751f1
696a1e136540be22e427b7726e8c9932a9770989
/Union_Find/737/Solution.java
fa2501f3f261808a70ada84ad08034826cfabe78
[]
no_license
yangmei555/LeetCode-Solutions
4ee574a26b1559c18816f199cd03af239c16dad5
c29e7d4cba68cebaa34635f5c42bd20d77705cf6
refs/heads/master
2021-05-25T12:01:40.361095
2019-02-24T04:55:34
2019-02-24T04:55:34
127,357,115
0
0
null
null
null
null
UTF-8
Java
false
false
7,898
java
// hash map and union find // actually no need to build a node for each string to build up the union find class Solution { public boolean areSentencesSimilarTwo(String[] words1, String[] words2, String[][] pairs) { if (words1.length != words2.length) return false; Map<String, Node> map = new HashMap<>(); for (String[] p : pairs) { if (!map.containsKey(p[0])) { Node node = new Node(p[0], 0); node.parent = node; map.put(p[0], node); } if (!map.containsKey(p[1])) { Node node = new Node(p[1], 0); node.parent = node; map.put(p[1], node); } Node node1 = map.get(p[0]), node2 = map.get(p[1]); union(node1, node2); } for (int i = 0; i < words1.length; i++) { if (words1[i].equals(words2[i])) continue; if (!map.containsKey(words1[i]) || !map.containsKey(words2[i])) return false; if (!findSet(map.get(words1[i])).str.equals(findSet(map.get(words2[i])).str)) return false; } return true; } class Node { String str; Node parent; int rank; public Node(String str, int rank) { this.str = str; this.rank = rank; } } public void union(Node n1, Node n2) { Node x = findSet(n1), y = findSet(n2); if (!x.str.equals(y.str)) link(x, y); } public Node findSet(Node node) { while (node.parent != node) { node.parent = node.parent.parent; node = node.parent; } return node; } public void link(Node n1, Node n2) { if (n1.rank > n2.rank) { n2.parent = n1; } else if (n1.rank < n2.rank) { n1.parent = n2; } else { n1.parent = n2; n2.rank++; } } } // a more concise way of union find class Solution { Map<String, String> map = new HashMap<>(); public boolean areSentencesSimilarTwo(String[] words1, String[] words2, String[][] pairs) { if (words1.length != words2.length) return false; for (String[] p : pairs) { if (!map.containsKey(p[0])) map.put(p[0], p[0]); if (!map.containsKey(p[1])) map.put(p[1], p[1]); if (!find(p[0]).equals(find(p[1]))) map.put(find(p[0]), find(p[1])); } for (int i = 0; i < words1.length; i++) { if (words1[i].equals(words2[i])) continue; if (!map.containsKey(words1[i]) || !map.containsKey(words2[i]) || !find(words1[i]).equals(find(words2[i]))) return false; } return true; } public String find(String str) { if (!map.get(str).equals(str)) map.put(str, find(map.get(str))); return map.get(str); } } // a more more concise way of union find , no path compression or union by rank class Solution { Map<String, String> map = new HashMap<>(); public boolean areSentencesSimilarTwo(String[] words1, String[] words2, String[][] pairs) { if (words1.length != words2.length) return false; for (String[] p : pairs) { if (!find(p[0]).equals(find(p[1]))) map.put(find(p[0]), find(p[1])); } for (int i = 0; i < words1.length; i++) { if (words1[i].equals(words2[i])) continue; if (!find(words1[i]).equals(find(words2[i]))) return false; } return true; } public String find(String str) { if (map.get(str) == null) return str; return find(map.get(str)); } } // do a DFS for each pair of words class Solution { public boolean areSentencesSimilarTwo(String[] words1, String[] words2, String[][] pairs) { if (words1.length != words2.length) return false; Map<String, List<String>> map = new HashMap<>(); for (String[] str : pairs) { map.putIfAbsent(str[0], new LinkedList<>()); map.putIfAbsent(str[1], new LinkedList<>()); map.get(str[0]).add(str[1]); map.get(str[1]).add(str[0]); } for (int i = 0; i < words1.length; i++) { if (words1[i].equals(words2[i])) continue; if (!map.containsKey(words1[i]) || !map.containsKey(words2[i])) return false; Set<String> visited = new HashSet<>(); helper(map, words1[i], visited); if (!visited.contains(words2[i])) return false; } return true; } public void helper(Map<String, List<String>> map, String str, Set<String> visited) { visited.add(str); for (String s : map.get(str)) { if (!visited.contains(s)) helper(map, s, visited); } } } // same idea with above, but return immediately when the target is found class Solution { public boolean areSentencesSimilarTwo(String[] words1, String[] words2, String[][] pairs) { if (words1.length != words2.length) return false; Map<String, List<String>> map = new HashMap<>(); for (String[] str : pairs) { map.putIfAbsent(str[0], new LinkedList<>()); map.putIfAbsent(str[1], new LinkedList<>()); map.get(str[0]).add(str[1]); map.get(str[1]).add(str[0]); } for (int i = 0; i < words1.length; i++) { if (words1[i].equals(words2[i])) continue; if (!map.containsKey(words1[i]) || !map.containsKey(words2[i])) return false; Set<String> visited = new HashSet<>(); if (!helper(map, words1[i], words2[i], visited)) return false; } return true; } public boolean helper(Map<String, List<String>> map, String str, String target, Set<String> visited) { if (str.equals(target)) return true; visited.add(str); for (String s : map.get(str)) { if (!visited.contains(s) && helper(map, s, target, visited)) return true; } return false; } } // give each connected component an id ! class Solution { public boolean areSentencesSimilarTwo(String[] words1, String[] words2, String[][] pairs) { if (words1.length != words2.length) return false; Map<String, List<String>> map = new HashMap<>(); for (String[] str : pairs) { map.putIfAbsent(str[0], new LinkedList<>()); map.putIfAbsent(str[1], new LinkedList<>()); map.get(str[0]).add(str[1]); map.get(str[1]).add(str[0]); } int id = 0; Map<String, Integer> cc = new HashMap<>(); for (String str : map.keySet()) { if (!cc.containsKey(str)) helper(map, cc, str, id); id++; } for (int i = 0; i < words1.length; i++) { if (words1[i].equals(words2[i])) continue; if (!cc.containsKey(words1[i]) || !cc.containsKey(words2[i]) || cc.get(words1[i]) != cc.get(words2[i])) return false; } return true; } public void helper(Map<String, List<String>> map, Map<String, Integer> cc, String str, int id) { cc.put(str, id); for (String s : map.get(str)) { if (!cc.containsKey(s)) helper(map, cc, s, id); } } }
[ "myang3@uchicago.edu" ]
myang3@uchicago.edu
91d9bc0a4b4a08f80ac64da9551d667544d15e81
bbecb8d7be702c2bd7d0c7731ac204267d31d22a
/src/main/java/com/diego/castro/web/filter/gzip/GZipServletFilter.java
5c78df6e4479f9d17613e227bf6289f320713319
[]
no_license
DiegoCastroC/BaskJhips
4b5219ecb064e223a532b939efcd554a489be627
ef5df66b34f2463ec6b709897315e107cc984f85
refs/heads/master
2021-05-04T09:43:04.999670
2016-02-04T16:29:00
2016-02-04T16:29:00
47,782,943
0
1
null
2020-09-18T15:14:24
2015-12-10T19:30:09
Java
UTF-8
Java
false
false
4,347
java
package com.diego.castro.web.filter.gzip; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPOutputStream; public class GZipServletFilter implements Filter { private Logger log = LoggerFactory.getLogger(GZipServletFilter.class); @Override public void init(FilterConfig filterConfig) throws ServletException { // Nothing to initialize } @Override public void destroy() { // Nothing to destroy } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; HttpServletResponse httpResponse = (HttpServletResponse) response; if (!isIncluded(httpRequest) && acceptsGZipEncoding(httpRequest) && !response.isCommitted()) { // Client accepts zipped content if (log.isTraceEnabled()) { log.trace("{} Written with gzip compression", httpRequest.getRequestURL()); } // Create a gzip stream final ByteArrayOutputStream compressed = new ByteArrayOutputStream(); final GZIPOutputStream gzout = new GZIPOutputStream(compressed); // Handle the request final GZipServletResponseWrapper wrapper = new GZipServletResponseWrapper(httpResponse, gzout); wrapper.setDisableFlushBuffer(true); chain.doFilter(request, wrapper); wrapper.flush(); gzout.close(); // double check one more time before writing out // repsonse might have been committed due to error if (response.isCommitted()) { return; } // return on these special cases when content is empty or unchanged switch (wrapper.getStatus()) { case HttpServletResponse.SC_NO_CONTENT: case HttpServletResponse.SC_RESET_CONTENT: case HttpServletResponse.SC_NOT_MODIFIED: return; default: } // Saneness checks byte[] compressedBytes = compressed.toByteArray(); boolean shouldGzippedBodyBeZero = GZipResponseUtil.shouldGzippedBodyBeZero(compressedBytes, httpRequest); boolean shouldBodyBeZero = GZipResponseUtil.shouldBodyBeZero(httpRequest, wrapper.getStatus()); if (shouldGzippedBodyBeZero || shouldBodyBeZero) { // No reason to add GZIP headers or write body if no content was written or status code specifies no // content response.setContentLength(0); return; } // Write the zipped body GZipResponseUtil.addGzipHeader(httpResponse); response.setContentLength(compressedBytes.length); response.getOutputStream().write(compressedBytes); } else { // Client does not accept zipped content - don't bother zipping if (log.isTraceEnabled()) { log.trace("{} Written without gzip compression because the request does not accept gzip", httpRequest.getRequestURL()); } chain.doFilter(request, response); } } /** * Checks if the request uri is an include. These cannot be gzipped. */ private boolean isIncluded(final HttpServletRequest request) { String uri = (String) request.getAttribute("javax.servlet.include.request_uri"); boolean includeRequest = !(uri == null); if (includeRequest && log.isDebugEnabled()) { log.debug("{} resulted in an include request. This is unusable, because" + "the response will be assembled into the overrall response. Not gzipping.", request.getRequestURL()); } return includeRequest; } private boolean acceptsGZipEncoding(HttpServletRequest httpRequest) { String acceptEncoding = httpRequest.getHeader("Accept-Encoding"); return acceptEncoding != null && acceptEncoding.contains("gzip"); } }
[ "alfredoru@gmail.com" ]
alfredoru@gmail.com
2b92eed7437db4a4716f33e7fc10d7be151efb26
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/68ab4f617fc5d3a9a4bb68a99766baf83ba088b3/after/CompositeIterator.java
e78b0959aaf44370a7ec3ea5073b1eeb4f9bf46a
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,248
java
/* * Copyright 2000-2011 JetBrains s.r.o. * * 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.intellij.util.containers; import java.util.Iterator; import java.util.List; /** * Created by IntelliJ IDEA. * User: Irina.Chernushina * Date: 9/28/11 * Time: 12:38 PM */ public class CompositeIterator<Key> implements Iterator<Key> { private int myPreviousIdx; private int myIdx; private final List<Iterator<Key>> myIterators; public CompositeIterator(final List<Iterator<Key>> iterators) { myIterators = iterators; myIdx = -1; myPreviousIdx = -1; for (int i = 0; i < myIterators.size(); i++) { final Iterator<Key> iterator = myIterators.get(i); if (iterator.hasNext()) { myIdx = i; break; } } } @Override public boolean hasNext() { return (myIdx >= 0) && myIterators.get(myIdx).hasNext(); } @Override public Key next() { final Key result = myIterators.get(myIdx).next(); recalculateCurrent(); return result; } private void recalculateCurrent() { if (myIdx == -1) return; if (! myIterators.get(myIdx).hasNext()) { myPreviousIdx = myIdx; myIdx = -1; for (int i = myPreviousIdx; i < myIterators.size(); i++) { final Iterator<Key> iterator = myIterators.get(i); if (iterator.hasNext()) { myIdx = i; break; } } } } @Override public void remove() { if ((myPreviousIdx != -1) && (myPreviousIdx != myIdx)) { // last element final Iterator<Key> keyIterator = myIterators.get(myPreviousIdx); keyIterator.remove(); // already on last position } else { myIterators.get(myIdx).remove(); } recalculateCurrent(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
88006ab90bfa288c580b3003cf74513646aacf90
11babced1f48d7a4d9353da64f278b25384d5acd
/CSEIII/CSEIII-Web/src/VO/strategyVO/StaticalVariableVO.java
d0bbee8e1bacee40828c6ff1413ef79b40b4ec7c
[]
no_license
Apocalpyse/NJU-SE3
08daf05f9f98569b892fa41cd706f7445eb9baf2
27ae6915830a4087d2eb9350257fb5513c6d8692
refs/heads/master
2020-03-11T02:04:58.892123
2018-04-16T08:43:37
2018-04-16T08:43:37
129,316,413
0
0
null
null
null
null
UTF-8
Java
false
false
1,849
java
package VO.strategyVO; /** * Created by A on 2017/5/21. */ public class StaticalVariableVO { private String yearYieldRate;//年化收益率 private String benchmarkYearYieldRate;//基准年化收益率 private String alpha;//阿尔法 private String beta;//贝塔 private String sharpeRatio;//夏普比率 private String maxWithdraw;//最大回撤 public StaticalVariableVO() { } public StaticalVariableVO(String yearYieldRate, String benchmarkYearYieldRate, String alpha, String beta, String sharpeRatio, String maxWithdraw) { this.yearYieldRate = yearYieldRate; this.benchmarkYearYieldRate = benchmarkYearYieldRate; this.alpha = alpha; this.beta = beta; this.sharpeRatio = sharpeRatio; this.maxWithdraw = maxWithdraw; } public String getYearYieldRate() { return yearYieldRate; } public void setYearYieldRate(String yearYieldRate) { this.yearYieldRate = yearYieldRate; } public String getBenchmarkYearYieldRate() { return benchmarkYearYieldRate; } public void setBenchmarkYearYieldRate(String benchmarkYearYieldRate) { this.benchmarkYearYieldRate = benchmarkYearYieldRate; } public String getAlpha() { return alpha; } public void setAlpha(String alpha) { this.alpha = alpha; } public String getBeta() { return beta; } public void setBeta(String beta) { this.beta = beta; } public String getSharpeRatio() { return sharpeRatio; } public void setSharpeRatio(String sharpeRatio) { this.sharpeRatio = sharpeRatio; } public String getMaxWithdraw() { return maxWithdraw; } public void setMaxWithdraw(String maxWithdraw) { this.maxWithdraw = maxWithdraw; } }
[ "2578931175@qq.com" ]
2578931175@qq.com
f5c772c95b7cb87b0c336b2e08cad47aa6b4512b
97a48e7ef9a50362dd88d22ff05cdeb7adf41c6b
/src/main/java/lib/org/bouncycastle/asn1/oiw/OIWObjectIdentifiers.java
25f80aff128dec73ddbc926a54128967a8a4ee49
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gusmp/appletCatcertDI
2164a6dd7c3f1568eb7e30f6e13338df02b84118
868da9683aa8946a9d60d902d93789a9157a489d
refs/heads/master
2021-01-20T21:49:26.039179
2018-08-18T11:29:15
2018-08-18T11:29:15
6,111,520
1
2
null
null
null
null
UTF-8
Java
false
false
1,727
java
package lib.org.bouncycastle.asn1.oiw; import lib.org.bouncycastle.asn1.DERObjectIdentifier; public interface OIWObjectIdentifiers { // id-SHA1 OBJECT IDENTIFIER ::= // {iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) 26 } // static final DERObjectIdentifier md4WithRSA = new DERObjectIdentifier("1.3.14.3.2.2"); static final DERObjectIdentifier md5WithRSA = new DERObjectIdentifier("1.3.14.3.2.3"); static final DERObjectIdentifier md4WithRSAEncryption = new DERObjectIdentifier("1.3.14.3.2.4"); static final DERObjectIdentifier desECB = new DERObjectIdentifier("1.3.14.3.2.6"); static final DERObjectIdentifier desCBC = new DERObjectIdentifier("1.3.14.3.2.7"); static final DERObjectIdentifier desOFB = new DERObjectIdentifier("1.3.14.3.2.8"); static final DERObjectIdentifier desCFB = new DERObjectIdentifier("1.3.14.3.2.9"); static final DERObjectIdentifier desEDE = new DERObjectIdentifier("1.3.14.3.2.17"); static final DERObjectIdentifier idSHA1 = new DERObjectIdentifier("1.3.14.3.2.26"); static final DERObjectIdentifier dsaWithSHA1 = new DERObjectIdentifier("1.3.14.3.2.27"); static final DERObjectIdentifier sha1WithRSA = new DERObjectIdentifier("1.3.14.3.2.29"); // ElGamal Algorithm OBJECT IDENTIFIER ::= // {iso(1) identified-organization(3) oiw(14) dirservsig(7) algorithm(2) encryption(1) 1 } // static final DERObjectIdentifier elGamalAlgorithm = new DERObjectIdentifier("1.3.14.7.2.1.1"); }
[ "none@none.es" ]
none@none.es
8d080e648c8025c94fd43cf50a706586cbc89945
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-polardb/src/main/java/com/aliyuncs/polardb/transform/v20170801/DescribeDetachedBackupsResponseUnmarshaller.java
2dc55c8ef75dbe8a71a17c07a47fc4681471b0ee
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
3,285
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.polardb.transform.v20170801; import java.util.ArrayList; import java.util.List; import com.aliyuncs.polardb.model.v20170801.DescribeDetachedBackupsResponse; import com.aliyuncs.polardb.model.v20170801.DescribeDetachedBackupsResponse.Backup; import com.aliyuncs.transform.UnmarshallerContext; public class DescribeDetachedBackupsResponseUnmarshaller { public static DescribeDetachedBackupsResponse unmarshall(DescribeDetachedBackupsResponse describeDetachedBackupsResponse, UnmarshallerContext _ctx) { describeDetachedBackupsResponse.setRequestId(_ctx.stringValue("DescribeDetachedBackupsResponse.RequestId")); describeDetachedBackupsResponse.setTotalRecordCount(_ctx.stringValue("DescribeDetachedBackupsResponse.TotalRecordCount")); describeDetachedBackupsResponse.setPageRecordCount(_ctx.stringValue("DescribeDetachedBackupsResponse.PageRecordCount")); describeDetachedBackupsResponse.setPageNumber(_ctx.stringValue("DescribeDetachedBackupsResponse.PageNumber")); List<Backup> items = new ArrayList<Backup>(); for (int i = 0; i < _ctx.lengthValue("DescribeDetachedBackupsResponse.Items.Length"); i++) { Backup backup = new Backup(); backup.setBackupSetSize(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].BackupSetSize")); backup.setConsistentTime(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].ConsistentTime")); backup.setStoreStatus(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].StoreStatus")); backup.setBackupStatus(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].BackupStatus")); backup.setBackupType(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].BackupType")); backup.setBackupStartTime(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].BackupStartTime")); backup.setIsAvail(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].IsAvail")); backup.setBackupEndTime(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].BackupEndTime")); backup.setBackupId(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].BackupId")); backup.setDBClusterId(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].DBClusterId")); backup.setBackupsLevel(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].BackupsLevel")); backup.setBackupMode(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].BackupMode")); backup.setBackupMethod(_ctx.stringValue("DescribeDetachedBackupsResponse.Items["+ i +"].BackupMethod")); items.add(backup); } describeDetachedBackupsResponse.setItems(items); return describeDetachedBackupsResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
5ce1789322cda65fa63fdcc4763de840a54bfa1c
a7d1be14d77fa4dbe363d8b1faf167ae29024968
/sources/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
242efb0b95d28c77e197c667119f35200a82e81d
[]
no_license
Weefle/Torch
efd9bc492c107c8c957170ac5462632f80311ba1
c5f5646f92f21c427d065d153406dd3f33e1b725
refs/heads/master
2021-01-20T14:43:19.973672
2017-05-07T16:36:35
2017-05-07T16:36:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,318
java
package net.minecraft.server; import java.io.IOException; public class PacketPlayOutPlayerListHeaderFooter implements Packet<PacketListenerPlayOut> { public net.md_5.bungee.api.chat.BaseComponent[] header, footer; // Paper private IChatBaseComponent a; private IChatBaseComponent b; public PacketPlayOutPlayerListHeaderFooter() {} public PacketPlayOutPlayerListHeaderFooter(IChatBaseComponent ichatbasecomponent) { this.a = ichatbasecomponent; } public void a(PacketDataSerializer packetdataserializer) throws IOException { this.a = packetdataserializer.f(); this.b = packetdataserializer.f(); } public void b(PacketDataSerializer packetdataserializer) throws IOException { // Paper start if (this.header != null) { packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(this.header)); } else { packetdataserializer.a(this.a); } if (this.footer != null) { packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(this.footer)); } else { packetdataserializer.a(this.b); } // Paper end } public void a(PacketListenerPlayOut packetlistenerplayout) { packetlistenerplayout.a(this); } }
[ "i@omc.hk" ]
i@omc.hk
767a46c682b2d62fc78634b2facb1f6e48f49afa
1355a8fb99e5fd5d1c7f48c7156033dedbd5404f
/COLP.Servicio.Afiliado/src/main/java/co/gov/colpensiones/schemas/_1_0/personas/TipoInformacionEmpleadorDTO.java
93ac0d80c11dd545c61c9efca38f51862ef27f76
[]
no_license
lenercab/Asofondo
7c081631eee15e9fa9645b19b2762b4f5f2a7e5d
f7319b48c78a9bb906c2516c5e1228d38edde681
refs/heads/master
2020-04-13T19:54:00.170983
2018-04-03T16:01:09
2018-04-03T16:01:09
163,415,310
0
0
null
null
null
null
UTF-8
Java
false
false
2,513
java
package co.gov.colpensiones.schemas._1_0.personas; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import co.gov.colpensiones.schemas._1_0.comun.TipoControlCambios; /** * <p>Java class for tipoInformacionEmpleadorDTO complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="tipoInformacionEmpleadorDTO"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Contexto" type="{http://www.colpensiones.gov.co/schemas/1.0/comun}tipoControlCambios"/> * &lt;element name="Detalle" type="{http://www.colpensiones.gov.co/schemas/1.0/personas}tipoInformacionGeneralEmpleador"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "tipoInformacionEmpleadorDTO", propOrder = { "contexto", "detalle" }) public class TipoInformacionEmpleadorDTO { @XmlElement(name = "Contexto", required = true, nillable = true) protected TipoControlCambios contexto; @XmlElement(name = "Detalle", required = true, nillable = true) protected TipoInformacionGeneralEmpleador detalle; /** * Gets the value of the contexto property. * * @return * possible object is * {@link TipoControlCambios } * */ public TipoControlCambios getContexto() { return contexto; } /** * Sets the value of the contexto property. * * @param value * allowed object is * {@link TipoControlCambios } * */ public void setContexto(TipoControlCambios value) { this.contexto = value; } /** * Gets the value of the detalle property. * * @return * possible object is * {@link TipoInformacionGeneralEmpleador } * */ public TipoInformacionGeneralEmpleador getDetalle() { return detalle; } /** * Sets the value of the detalle property. * * @param value * allowed object is * {@link TipoInformacionGeneralEmpleador } * */ public void setDetalle(TipoInformacionGeneralEmpleador value) { this.detalle = value; } }
[ "crivera@itcol.com" ]
crivera@itcol.com
f7a90554fb36746f44d096caf6d4c12aff156edf
51c5bcac5774533ba491d7961efe9e479e498d11
/src/main/java/li/cil/oc2/common/vm/package-info.java
780a729287c40dc7d01d61f98937f34b326e04a0
[ "MIT", "CC0-1.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
fnuecke/oc2
0140ec0426464bcd79bee2d718360b4689c1fe7c
569288c6c8be73f6d95ea550b14ff9c368c043a4
refs/heads/1.18-forge
2023-06-21T23:55:14.569314
2022-07-24T21:30:24
2022-07-24T21:30:24
298,871,383
591
95
NOASSERTION
2023-06-13T16:18:43
2020-09-26T18:03:10
Java
UTF-8
Java
false
false
237
java
/* SPDX-License-Identifier: MIT */ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault package li.cil.oc2.common.vm; import net.minecraft.MethodsReturnNonnullByDefault; import javax.annotation.ParametersAreNonnullByDefault;
[ "florian@nuecke.de" ]
florian@nuecke.de
39d2686d98ecbd82c50c6bcb3e4041d67cce8158
68bc0904cd1bbbd3efc61a0e99724cd4e4562124
/core/src/test/java/org/renjin/primitives/io/connections/ConnectionsTest.java
939492dd054eaa39d7ec5072f4b3cb0003db2c6d
[]
no_license
sz-alook/renjin
4b2f4592eb2a85e31fe2ce861b6edf19f9f3a12e
38ec731066d7058b654a4f0882fd16204571b275
refs/heads/master
2020-04-09T05:05:34.951836
2012-06-29T08:07:17
2012-06-29T08:07:17
4,981,931
0
2
null
2018-02-18T10:05:52
2012-07-10T23:26:32
R
UTF-8
Java
false
false
1,068
java
package org.renjin.primitives.io.connections; import org.junit.Test; import org.renjin.EvalTestCase; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; public class ConnectionsTest extends EvalTestCase { @Test public void readAllLines() { topLevelContext.getGlobalEnvironment().setVariable("conn", openResourceAsConn("lines.txt")); eval("lines <- .Internal(readLines(conn, -1, TRUE, FALSE, 'UTF-8'))"); assertThat(eval("length(lines)"), equalTo(c_i(7))); } @Test public void readSomeLines() { topLevelContext.getGlobalEnvironment().setVariable("conn", openResourceAsConn("lines.txt")); eval("lines <- .Internal(readLines(conn, 2, TRUE, FALSE, 'UTF-8'))"); assertThat(eval("length(lines)"), equalTo(c_i(2))); } @Test public void url() { assumingBasePackagesLoad(); eval("x <- getCRANmirrors()"); assertThat(eval("length(row.names(x)) > 10"), equalTo(c(true))); assertThat(eval("length(x$Name) > 10"), equalTo(c(true))); } }
[ "alex@bedatadriven.com@b722d886-ae41-2056-5ac6-6db9963f4c99" ]
alex@bedatadriven.com@b722d886-ae41-2056-5ac6-6db9963f4c99
f49c23e73457add12c3079808861fcb6929bfe02
f1572d3a826ced3a778dd378ab52fa22d1ec3ec9
/democode/xsd2javacreate/src/com/beyondbit/smartbox/request/serialization/ModFriendRequestSerializer.java
4b95087fb30e685f3fe27b1dc115a44479cb8e23
[]
no_license
txc1223/helloworld
0a3ae2cdf675e940816bcfba8a611de2b3aa4434
c0db8c4a9eaa923c995e7aec239db35ef6ed498a
refs/heads/master
2021-01-25T10:29:11.002995
2015-12-15T03:26:14
2015-12-15T03:26:14
31,292,917
0
0
null
null
null
null
UTF-8
Java
false
false
1,200
java
package com.beyondbit.smartbox.request.serialization; import java.io.ByteArrayOutputStream; import java.text.SimpleDateFormat; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.bootstrap.DOMImplementationRegistry; import org.w3c.dom.ls.DOMImplementationLS; import org.w3c.dom.ls.LSOutput; import org.w3c.dom.ls.LSSerializer; import com.beyondbit.smartbox.request.ModFriendRequest; import com.beyondbit.smartbox.request.Request; import com.beyondbit.smartbox.common.Friend; import com.beyondbit.smartbox.request.serialization.RequestSerializer; import com.beyondbit.smartbox.common.serialization.FriendSerializer; public class ModFriendRequestSerializer { public static void AppendChildElement(Document doc, ModFriendRequest obj, Element parentElement) { Element FriendElement = doc.createElementNS("http://www.beyondbit.com/smartbox/request","req:Friend"); FriendSerializer.AppendChildElement(doc, obj.getFriend(), FriendElement); parentElement.appendChild(FriendElement); } }
[ "tangxucheng@shbeyondbit.com" ]
tangxucheng@shbeyondbit.com
574535974214b3b06a6fa5c91b700a005235fd5b
d98ed4986ecdd7df4c04e4ad09f38fdb7a7043e8
/Hero_Sheet/src/main/java/net/sf/anathema/hero/sheet/pdf/page/layout/RegisteredEncoderList.java
7f27b978cb8f3fecccfc392022db26a4eafa1d2f
[]
no_license
bjblack/anathema_3e
3d1d42ea3d9a874ac5fbeed506a1a5800e2a99ac
963f37b64d7cf929f086487950d4870fd40ac67f
refs/heads/master
2021-01-19T07:12:42.133946
2018-12-18T23:57:41
2018-12-18T23:57:41
67,353,965
0
0
null
2016-09-04T15:47:48
2016-09-04T15:47:48
null
UTF-8
Java
false
false
2,323
java
package net.sf.anathema.hero.sheet.pdf.page.layout; import net.sf.anathema.hero.sheet.pdf.encoder.boxes.ContentEncoder; import net.sf.anathema.hero.sheet.pdf.encoder.boxes.EncoderRegistry; import net.sf.anathema.hero.sheet.pdf.encoder.boxes.EncodingMetrics; import net.sf.anathema.hero.sheet.pdf.encoder.general.Bounds; import net.sf.anathema.hero.sheet.pdf.encoder.graphics.GraphicsTemplate; import net.sf.anathema.hero.sheet.pdf.encoder.graphics.SheetGraphics; import net.sf.anathema.hero.sheet.pdf.page.layout.field.LayoutField; import net.sf.anathema.hero.sheet.pdf.session.ReportSession; import net.sf.anathema.library.resources.Resources; import com.itextpdf.text.DocumentException; public class RegisteredEncoderList { private final Resources resources; private final EncoderRegistry encoderRegistry; private final PdfBoxEncoder boxEncoder = new PdfBoxEncoder (); public RegisteredEncoderList (Resources resources, EncoderRegistry encoderRegistry) { this.resources = resources; this.encoderRegistry = encoderRegistry; } public LayoutField encodeBox (SheetGraphics graphics, ReportSession session, LayoutField layout, String... encoderIds) { GraphicsTemplate template = layout.createRenderTemplate (graphics); encodeBox (template.getTemplateGraphics (), session, layout.createRenderBounds (), encoderIds); layout.addTemplateToParent (template); return layout; } public float encodeBox (SheetGraphics graphics, ReportSession session, Bounds bounds, String... encoderIds) { try { ContentEncoder encoder = encoderRegistry.createEncoder (resources, session, encoderIds); boxEncoder.encodeBox (session, graphics, encoder, bounds); return bounds.getHeight (); } catch (DocumentException e) { throw new RuntimeException (e); } } public boolean hasContentFor (ReportSession session, String encoderId) { if (!encoderRegistry.hasEncoder (encoderId, session)) { return false; } ContentEncoder encoder = encoderRegistry.createEncoder (resources, session, encoderId); return encoder.hasContent (session); } public float getPreferredEncoderHeight (EncodingMetrics metrics, float width, String... encoderIds) { return encoderRegistry.getPreferredHeight (metrics, width, encoderIds); } }
[ "BJ@BJ-PC" ]
BJ@BJ-PC
8e925a5789147cfd06bd9283d4296e6e1d1130ae
28da2b5924bbb183f9abbd5815bf9e5902352489
/src/org/pentaho/di/trans/steps/addsequence/AddSequenceData.java
eded602ba35054511b29d83f67633d87548c5a84
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
jianjunchu/etl_designer_30
079ed1bcd2b208cf3bb86842a12c815f1db49204
996951c4b0ab9d89bffdb550161c2f3871bcf03e
refs/heads/master
2023-08-09T09:19:43.992255
2023-07-20T23:22:35
2023-07-20T23:22:35
128,722,775
3
4
Apache-2.0
2018-04-18T06:07:17
2018-04-09T06:08:53
Java
UTF-8
Java
false
false
2,234
java
/******************************************************************************* * * Pentaho Data Integration * * Copyright (C) 2002-2012 by Pentaho : http://www.pentaho.com * ******************************************************************************* * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************************/ package org.pentaho.di.trans.steps.addsequence; import org.pentaho.di.core.Counter; import org.pentaho.di.core.database.Database; import org.pentaho.di.core.row.RowMetaInterface; import org.pentaho.di.trans.step.BaseStepData; import org.pentaho.di.trans.step.StepDataInterface; /** * @author Matt * @since 24-jan-2005 */ public class AddSequenceData extends BaseStepData implements StepDataInterface { private Database db; private String lookup; public RowMetaInterface outputRowMeta; public Counter counter; // The runtime values, in which the environment variables are already resolved public long start; public long increment; public long maximum; public String realSchemaName; public String realSequenceName; /** * */ public AddSequenceData() { super(); db=null; realSchemaName=null; realSequenceName=null; } /** * @return Returns the db. */ public Database getDb() { return db; } /** * @param db The db to set. */ public void setDb(Database db) { this.db = db; } /** * @return Returns the lookup string usually "@@"+the name of the sequence. */ public String getLookup() { return lookup; } /** * @param lookup the lookup string usually "@@"+the name of the sequence. */ public void setLookup(String lookup) { this.lookup = lookup; } }
[ "jianjunchu@gmail.com" ]
jianjunchu@gmail.com
169b20e1692fe5834b63a6da15740b00991afec9
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/druid-io--druid/d400f23791921c99f6e3895d2d9f74f3820c1573/after/VSizeIndexed.java
0867a2f8aa1fb513b166a3f559d0e1d08f73c706
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,543
java
/* * Licensed to Metamarkets Group Inc. (Metamarkets) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Metamarkets 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 io.druid.segment.data; import com.google.common.primitives.Ints; import io.druid.common.utils.SerializerUtils; import io.druid.io.ZeroCopyByteArrayOutputStream; import io.druid.java.util.common.IAE; import io.druid.java.util.common.ISE; import io.druid.query.monomorphicprocessing.RuntimeShapeInspector; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.WritableByteChannel; import java.util.Iterator; /** */ public class VSizeIndexed implements IndexedMultivalue<IndexedInts> { private static final byte version = 0x1; public static VSizeIndexed fromIterable(Iterable<VSizeIndexedInts> objectsIterable) { Iterator<VSizeIndexedInts> objects = objectsIterable.iterator(); if (!objects.hasNext()) { final ByteBuffer buffer = ByteBuffer.allocate(4).putInt(0); buffer.flip(); return new VSizeIndexed(buffer, 4); } int numBytes = -1; int count = 0; while (objects.hasNext()) { VSizeIndexedInts next = objects.next(); if (numBytes == -1) { numBytes = next.getNumBytes(); } ++count; } ZeroCopyByteArrayOutputStream headerBytes = new ZeroCopyByteArrayOutputStream(4 + (count * 4)); ZeroCopyByteArrayOutputStream valueBytes = new ZeroCopyByteArrayOutputStream(); ByteBuffer helperBuffer = ByteBuffer.allocate(Ints.BYTES); int offset = 0; try { SerializerUtils.writeBigEndianIntToOutputStream(headerBytes, count, helperBuffer); for (VSizeIndexedInts object : objectsIterable) { if (object.getNumBytes() != numBytes) { throw new ISE("val.numBytes[%s] != numBytesInValue[%s]", object.getNumBytes(), numBytes); } byte[] bytes = object.getBytesNoPadding(); offset += bytes.length; SerializerUtils.writeBigEndianIntToOutputStream(headerBytes, offset, helperBuffer); valueBytes.write(bytes); } valueBytes.write(new byte[4 - numBytes]); } catch (IOException e) { throw new RuntimeException(e); } ByteBuffer theBuffer = ByteBuffer.allocate(headerBytes.size() + valueBytes.size()); headerBytes.writeTo(theBuffer); valueBytes.writeTo(theBuffer); theBuffer.flip(); return new VSizeIndexed(theBuffer.asReadOnlyBuffer(), numBytes); } private final ByteBuffer theBuffer; private final int numBytes; private final int size; private final int valuesOffset; private final int bufferBytes; VSizeIndexed( ByteBuffer buffer, int numBytes ) { this.theBuffer = buffer; this.numBytes = numBytes; size = theBuffer.getInt(); valuesOffset = theBuffer.position() + (size << 2); bufferBytes = 4 - numBytes; } @Override public Class<? extends VSizeIndexedInts> getClazz() { return VSizeIndexedInts.class; } @Override public int size() { return size; } @Override public VSizeIndexedInts get(int index) { if (index >= size) { throw new IllegalArgumentException(String.format("Index[%s] >= size[%s]", index, size)); } ByteBuffer myBuffer = theBuffer.asReadOnlyBuffer(); int startOffset = 0; int endOffset; if (index == 0) { endOffset = myBuffer.getInt(); } else { myBuffer.position(myBuffer.position() + ((index - 1) * Ints.BYTES)); startOffset = myBuffer.getInt(); endOffset = myBuffer.getInt(); } myBuffer.position(valuesOffset + startOffset); myBuffer.limit(myBuffer.position() + (endOffset - startOffset) + bufferBytes); return myBuffer.hasRemaining() ? new VSizeIndexedInts(myBuffer, numBytes) : null; } @Override public int indexOf(IndexedInts value) { throw new UnsupportedOperationException("Reverse lookup not allowed."); } public int getSerializedSize() { return theBuffer.remaining() + 4 + 4 + 2; } public void writeToChannel(WritableByteChannel channel) throws IOException { channel.write(ByteBuffer.wrap(new byte[]{version, (byte) numBytes})); channel.write(ByteBuffer.wrap(Ints.toByteArray(theBuffer.remaining() + 4))); channel.write(ByteBuffer.wrap(Ints.toByteArray(size))); channel.write(theBuffer.asReadOnlyBuffer()); } public static VSizeIndexed readFromByteBuffer(ByteBuffer buffer) { byte versionFromBuffer = buffer.get(); if (version == versionFromBuffer) { int numBytes = buffer.get(); int size = buffer.getInt(); ByteBuffer bufferToUse = buffer.asReadOnlyBuffer(); bufferToUse.limit(bufferToUse.position() + size); buffer.position(bufferToUse.limit()); return new VSizeIndexed(bufferToUse, numBytes); } throw new IAE("Unknown version[%s]", versionFromBuffer); } @Override public Iterator<IndexedInts> iterator() { return IndexedIterable.create(this).iterator(); } @Override public void close() throws IOException { // no-op } @Override public void inspectRuntimeShape(RuntimeShapeInspector inspector) { inspector.visit("theBuffer", theBuffer); } public WritableSupplier<IndexedMultivalue<IndexedInts>> asWritableSupplier() { return new VSizeIndexedSupplier(this); } public static class VSizeIndexedSupplier implements WritableSupplier<IndexedMultivalue<IndexedInts>> { final VSizeIndexed delegate; public VSizeIndexedSupplier(VSizeIndexed delegate) { this.delegate = delegate; } @Override public long getSerializedSize() { return delegate.getSerializedSize(); } @Override public void writeToChannel(WritableByteChannel channel) throws IOException { delegate.writeToChannel(channel); } @Override public IndexedMultivalue<IndexedInts> get() { return delegate; } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
3419d6f915e1857d8cec4ef1e220bdfe9a4907be
d5decb236da7da2bb8d123311207766b6a8435cf
/src/com/taobao/api/request/ProductAddRequest.java
7bf787b43d40943e817b51135ec0e80d205bff9a
[]
no_license
tasfe/my-project-taobao-demo
85fee9861361e1e9ef4810f56aa5bbb3290ea216
f05a8141b6f3b23e88053bad4a12c8a138c2ef51
refs/heads/master
2021-01-13T01:30:17.440485
2013-02-16T08:38:02
2013-02-16T08:38:02
32,249,939
0
1
null
null
null
null
UTF-8
Java
false
false
6,648
java
package com.taobao.api.request; import java.util.Date; import com.taobao.api.internal.util.RequestCheckUtils; import java.util.HashMap; import java.util.Map; import com.taobao.api.FileItem; import com.taobao.api.TaobaoUploadRequest; import com.taobao.api.internal.util.TaobaoHashMap; import com.taobao.api.response.ProductAddResponse; import com.taobao.api.ApiRuleException; /** * TOP API: taobao.product.add request * * @author auto create * @since 1.0, 2013-02-16 12:41:29 */ public class ProductAddRequest implements TaobaoUploadRequest<ProductAddResponse> { private TaobaoHashMap udfParams; // add user-defined text parameters private Long timestamp; /** * 非关键属性结构:pid:vid;pid:vid.非关键属性不包含关键属性、销售属性、用户自定义属性、商品属性;调用taobao.itemprops.get获取pid,调用taobao.itempropvalues.get获取vid.<br><font color=red>注:支持最大长度为512字节</font> */ private String binds; /** * 商品类目ID.调用taobao.itemcats.get获取;注意:必须是叶子类目 id. */ private Long cid; /** * 用户自定义属性,结构:pid1:value1;pid2:value2,如果有型号,系列等子属性用: 隔开 例如:“20000:优衣库:型号:001;632501:1234”,表示“品牌:优衣库:型号:001;货号:1234” */ private String customerProps; /** * 产品描述.最大25000个字节 */ private String desc; /** * 产品主图片.最大1M,目前仅支持GIF,JPG. */ private FileItem image; /** * 是不是主图 */ private Boolean major; /** * 上市时间。目前只支持鞋城类目传入此参数 */ private Date marketTime; /** * 产品名称,最大60个字节. */ private String name; /** * 外部产品ID */ private String outerId; /** * 包装清单。注意,在管控类目下,包装清单不能为空,同时保证清单的格式为: 名称:数字;名称:数字; 其中,名称不能违禁、不能超过60字符,数字不能超过999 */ private String packingList; /** * 产品市场价.精确到2位小数;单位为元.如:200.07 */ private String price; /** * 销售属性值别名。格式为pid1:vid1:alias1;pid1:vid2:alia2。只有少数销售属性值支持传入别名,比如颜色和尺寸 */ private String propertyAlias; /** * 关键属性 结构:pid:vid;pid:vid.调用taobao.itemprops.get获取pid,调用taobao.itempropvalues.get获取vid;如果碰到用户自定义属性,请用customer_props. */ private String props; /** * 销售属性结构:pid:vid;pid:vid.调用taobao.itemprops.get获取is_sale_prop=true的pid,调用taobao.itempropvalues.get获取vid. */ private String saleProps; public void setBinds(String binds) { this.binds = binds; } public String getBinds() { return this.binds; } public void setCid(Long cid) { this.cid = cid; } public Long getCid() { return this.cid; } public void setCustomerProps(String customerProps) { this.customerProps = customerProps; } public String getCustomerProps() { return this.customerProps; } public void setDesc(String desc) { this.desc = desc; } public String getDesc() { return this.desc; } public void setImage(FileItem image) { this.image = image; } public FileItem getImage() { return this.image; } public void setMajor(Boolean major) { this.major = major; } public Boolean getMajor() { return this.major; } public void setMarketTime(Date marketTime) { this.marketTime = marketTime; } public Date getMarketTime() { return this.marketTime; } public void setName(String name) { this.name = name; } public String getName() { return this.name; } public void setOuterId(String outerId) { this.outerId = outerId; } public String getOuterId() { return this.outerId; } public void setPackingList(String packingList) { this.packingList = packingList; } public String getPackingList() { return this.packingList; } public void setPrice(String price) { this.price = price; } public String getPrice() { return this.price; } public void setPropertyAlias(String propertyAlias) { this.propertyAlias = propertyAlias; } public String getPropertyAlias() { return this.propertyAlias; } public void setProps(String props) { this.props = props; } public String getProps() { return this.props; } public void setSaleProps(String saleProps) { this.saleProps = saleProps; } public String getSaleProps() { return this.saleProps; } private Map<String,String> headerMap=new TaobaoHashMap(); public Long getTimestamp() { return this.timestamp; } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } public String getApiMethodName() { return "taobao.product.add"; } public Map<String, String> getTextParams() { TaobaoHashMap txtParams = new TaobaoHashMap(); txtParams.put("binds", this.binds); txtParams.put("cid", this.cid); txtParams.put("customer_props", this.customerProps); txtParams.put("desc", this.desc); txtParams.put("major", this.major); txtParams.put("market_time", this.marketTime); txtParams.put("name", this.name); txtParams.put("outer_id", this.outerId); txtParams.put("packing_list", this.packingList); txtParams.put("price", this.price); txtParams.put("property_alias", this.propertyAlias); txtParams.put("props", this.props); txtParams.put("sale_props", this.saleProps); if(this.udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new TaobaoHashMap(); } this.udfParams.put(key, value); } public Map<String, FileItem> getFileParams() { Map<String, FileItem> params = new HashMap<String, FileItem>(); params.put("image", this.image); return params; } public Class<ProductAddResponse> getResponseClass() { return ProductAddResponse.class; } public void check() throws ApiRuleException { RequestCheckUtils.checkMaxLength(binds,512,"binds"); RequestCheckUtils.checkNotEmpty(cid,"cid"); RequestCheckUtils.checkNotEmpty(image,"image"); RequestCheckUtils.checkMaxLength(image,1048576,"image"); RequestCheckUtils.checkNotEmpty(name,"name"); RequestCheckUtils.checkNotEmpty(price,"price"); } public Map<String,String> getHeaderMap() { return headerMap; } }
[ "bingzhaoliu@gmail.com@28b099c3-0654-7635-3fca-eff556b9d3f2" ]
bingzhaoliu@gmail.com@28b099c3-0654-7635-3fca-eff556b9d3f2
2df2bebc7d7dabb2fe2575c45ea044f3d08c83f2
4da9097315831c8639a8491e881ec97fdf74c603
/src/StockIT-v1-release_source_from_JADX/sources/com/google/android/gms/internal/ads/zzemp.java
05aaec1f49a8b25d7cfa296717eb91650f16a05c
[ "Apache-2.0" ]
permissive
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
refs/heads/main
2023-08-11T06:17:05.659651
2021-10-01T08:48:06
2021-10-01T08:48:06
410,595,708
1
1
null
null
null
null
UTF-8
Java
false
false
2,134
java
package com.google.android.gms.internal.ads; import java.util.Map; /* compiled from: com.google.android.gms:play-services-ads-lite@@19.4.0 */ final class zzemp implements Comparable<zzemp>, Map.Entry<K, V> { private V value; private final /* synthetic */ zzemk zzinm; private final K zzinq; zzemp(zzemk zzemk, Map.Entry<K, V> entry) { this(zzemk, (Comparable) entry.getKey(), entry.getValue()); } zzemp(zzemk zzemk, K k, V v) { this.zzinm = zzemk; this.zzinq = k; this.value = v; } public final V getValue() { return this.value; } public final V setValue(V v) { this.zzinm.zzbip(); V v2 = this.value; this.value = v; return v2; } public final boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Map.Entry)) { return false; } Map.Entry entry = (Map.Entry) obj; return equals(this.zzinq, entry.getKey()) && equals(this.value, entry.getValue()); } public final int hashCode() { K k = this.zzinq; int i = 0; int hashCode = k == null ? 0 : k.hashCode(); V v = this.value; if (v != null) { i = v.hashCode(); } return hashCode ^ i; } public final String toString() { String valueOf = String.valueOf(this.zzinq); String valueOf2 = String.valueOf(this.value); StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 1 + String.valueOf(valueOf2).length()); sb.append(valueOf); sb.append("="); sb.append(valueOf2); return sb.toString(); } private static boolean equals(Object obj, Object obj2) { if (obj == null) { return obj2 == null; } return obj.equals(obj2); } public final /* synthetic */ Object getKey() { return this.zzinq; } public final /* synthetic */ int compareTo(Object obj) { return ((Comparable) getKey()).compareTo((Comparable) ((zzemp) obj).getKey()); } }
[ "57108396+atul-vyshnav@users.noreply.github.com" ]
57108396+atul-vyshnav@users.noreply.github.com
ef63db58500e5c8d62807c98f9258c148b4ff151
4aff59956a2e8e120d737e090c024bbd99cddbba
/src/main/java/ihotel/app/repository/search/AccountsSearchRepository.java
3f2001d4a1fdeb876fa160af775e9bc50627896d
[]
no_license
believefollow/ihotel
abc79ea333c3279967de300c226ef408f9caad2a
466e74f3fc67447a0bd26263d5520c98ac4ca10e
refs/heads/main
2023-04-06T05:14:02.348434
2021-04-01T13:23:02
2021-04-01T13:23:02
353,330,337
0
0
null
2021-04-01T13:23:03
2021-03-31T11:19:56
Java
UTF-8
Java
false
false
331
java
package ihotel.app.repository.search; import ihotel.app.domain.Accounts; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; /** * Spring Data Elasticsearch repository for the {@link Accounts} entity. */ public interface AccountsSearchRepository extends ElasticsearchRepository<Accounts, Long> {}
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
f52ac4a50feba035ef36b48ba025c30ec20cfd4b
e9c6a2c6f21c2946e6d33b113a896025a6da3553
/src/main/java/com/jvm/book/eightChapter/Dispatch.java
b73b136d8ece3d6a7377ee0dd95fd747eb8d7563
[]
no_license
liangxifeng833/jvm
777dc676b7e5b686399daec2a1a65bbd11bbb86b
80cd184bd231de636de6a2dce0c6ee9023c6d94e
refs/heads/master
2023-06-23T02:59:51.721504
2022-04-04T07:59:15
2022-04-04T07:59:15
225,766,461
0
0
null
2023-06-14T22:25:42
2019-12-04T03:00:50
Java
UTF-8
Java
false
false
1,005
java
package com.jvm.book.eightChapter; /** * 单分派,多分派演示 * 编译+运行期间 * java语言是静态多分派,动态单分派语言 */ public class Dispatch { static class QQ{}; static class _360{}; public static class Father{ public void hardChoice(QQ arg) { System.out.println("father choice qq"); } public void hardChoice(_360 arg) { System.out.println("father choice 360"); } } public static class Son extends Father { public void hardChoice(QQ arg) { System.out.println("son choice qq"); } public void hardChoice(_360 arg) { System.out.println("son choice 360"); } } /** * 输出: * father choice 360 * son choice qq */ public static void main(String[] args) { Father father = new Father(); Father son = new Son(); father.hardChoice(new _360()); son.hardChoice(new QQ()); } }
[ "liangxifeng833@163.com" ]
liangxifeng833@163.com
3b5ec38c49837ec24672168182fd0f0db58e42d0
8b470767a19f24f6b5d12ba3a654457cca65a395
/Sensebot/IoT Server Plugin/sensebot/component/plugin/src/main/java/org.wso2.devicetype/sensebot/plugin/impl/dao/DeviceTypeDAO.java
884f38b48a6a9535ad65694f65dcaf3a6e32f63e
[]
no_license
ayyoob/IoT-Server-DeviceTypes
337a79236014ed3398a3db47a4cdbc20cec3ac77
84b57e00564c1cad903f54e1c61bb0c274678a47
refs/heads/master
2021-01-19T06:46:09.704430
2016-07-15T15:12:50
2016-07-15T15:12:50
62,002,753
0
0
null
null
null
null
UTF-8
Java
false
false
8,187
java
/* * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. 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.wso2.devicetype.sensebot.plugin.impl.dao; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.devicetype.sensebot.plugin.constants.DeviceTypeConstants; import org.wso2.devicetype.sensebot.plugin.exception.DeviceMgtPluginException; import org.wso2.devicetype.sensebot.plugin.impl.util.DeviceTypeUtils; import org.wso2.carbon.device.mgt.common.Device; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; /** * Implements IotDeviceDAO for sensebot Devices. */ public class DeviceTypeDAO { private static final Log log = LogFactory.getLog(DeviceTypeDAO.class); public Device getDevice(String deviceId) throws DeviceMgtPluginException { Connection conn = null; PreparedStatement stmt = null; Device iotDevice = null; ResultSet resultSet = null; try { conn = DeviceTypeDAOUtil.getConnection(); String selectDBQuery = "SELECT sensebot_DEVICE_ID, DEVICE_NAME" + " FROM sensebot_DEVICE WHERE sensebot_DEVICE_ID = ?"; stmt = conn.prepareStatement(selectDBQuery); stmt.setString(1, deviceId); resultSet = stmt.executeQuery(); if (resultSet.next()) { iotDevice = new Device(); iotDevice.setName(resultSet.getString( DeviceTypeConstants.DEVICE_PLUGIN_DEVICE_NAME)); if (log.isDebugEnabled()) { log.debug("sensebot device " + deviceId + " data has been fetched from " + "sensebot database."); } } } catch (SQLException e) { String msg = "Error occurred while fetching sensebot device : '" + deviceId + "'"; log.error(msg, e); throw new DeviceMgtPluginException(msg, e); } finally { DeviceTypeUtils.cleanupResources(stmt, resultSet); DeviceTypeDAOUtil.closeConnection(); } return iotDevice; } public boolean addDevice(Device device) throws DeviceMgtPluginException { boolean status = false; Connection conn; PreparedStatement stmt = null; try { conn = DeviceTypeDAOUtil.getConnection(); String createDBQuery = "INSERT INTO sensebot_DEVICE(sensebot_DEVICE_ID, DEVICE_NAME) VALUES (?, ?)"; stmt = conn.prepareStatement(createDBQuery); stmt.setString(1, device.getDeviceIdentifier()); stmt.setString(2, device.getName()); int rows = stmt.executeUpdate(); if (rows > 0) { status = true; if (log.isDebugEnabled()) { log.debug("sensebot device " + device.getDeviceIdentifier() + " data has been" + " added to the sensebot database."); } } } catch (SQLException e) { String msg = "Error occurred while adding the sensebot device '" + device.getDeviceIdentifier() + "' to the sensebot db."; log.error(msg, e); throw new DeviceMgtPluginException(msg, e); } finally { DeviceTypeUtils.cleanupResources(stmt, null); } return status; } public boolean updateDevice(Device device) throws DeviceMgtPluginException { boolean status = false; Connection conn = null; PreparedStatement stmt = null; try { conn = DeviceTypeDAOUtil.getConnection(); String updateDBQuery = "UPDATE sensebot_DEVICE SET DEVICE_NAME = ? WHERE sensebot_DEVICE_ID = ?"; stmt = conn.prepareStatement(updateDBQuery); if (device.getProperties() == null) { device.setProperties(new ArrayList<Device.Property>()); } stmt.setString(1, device.getName()); stmt.setString(2, device.getDeviceIdentifier()); int rows = stmt.executeUpdate(); if (rows > 0) { status = true; if (log.isDebugEnabled()) { log.debug("sensebot device " + device.getDeviceIdentifier() + " data has been" + " modified."); } } } catch (SQLException e) { String msg = "Error occurred while modifying the sensebot device '" + device.getDeviceIdentifier() + "' data."; log.error(msg, e); throw new DeviceMgtPluginException(msg, e); } finally { DeviceTypeUtils.cleanupResources(stmt, null); } return status; } public boolean deleteDevice(String deviceId) throws DeviceMgtPluginException { boolean status = false; Connection conn = null; PreparedStatement stmt = null; try { conn = DeviceTypeDAOUtil.getConnection(); String deleteDBQuery = "DELETE FROM sensebot_DEVICE WHERE sensebot_DEVICE_ID = ?"; stmt = conn.prepareStatement(deleteDBQuery); stmt.setString(1, deviceId); int rows = stmt.executeUpdate(); if (rows > 0) { status = true; if (log.isDebugEnabled()) { log.debug("sensebot device " + deviceId + " data has deleted" + " from the sensebot database."); } } } catch (SQLException e) { String msg = "Error occurred while deleting sensebot device " + deviceId; log.error(msg, e); throw new DeviceMgtPluginException(msg, e); } finally { DeviceTypeUtils.cleanupResources(stmt, null); } return status; } public List<Device> getAllDevices() throws DeviceMgtPluginException { Connection conn = null; PreparedStatement stmt = null; ResultSet resultSet = null; Device device; List<Device> iotDevices = new ArrayList<>(); try { conn = DeviceTypeDAOUtil.getConnection(); String selectDBQuery = "SELECT sensebot_DEVICE_ID, DEVICE_NAME " + "FROM sensebot_DEVICE"; stmt = conn.prepareStatement(selectDBQuery); resultSet = stmt.executeQuery(); while (resultSet.next()) { device = new Device(); device.setDeviceIdentifier(resultSet.getString(DeviceTypeConstants.DEVICE_PLUGIN_DEVICE_ID)); device.setName(resultSet.getString(DeviceTypeConstants.DEVICE_PLUGIN_DEVICE_NAME)); List<Device.Property> propertyList = new ArrayList<>(); device.setProperties(propertyList); } if (log.isDebugEnabled()) { log.debug("All sensebot device details have fetched from sensebot database."); } return iotDevices; } catch (SQLException e) { String msg = "Error occurred while fetching all sensebot device data'"; log.error(msg, e); throw new DeviceMgtPluginException(msg, e); } finally { DeviceTypeUtils.cleanupResources(stmt, resultSet); DeviceTypeDAOUtil.closeConnection(); } } }
[ "ayyoobhamza@gmail.com" ]
ayyoobhamza@gmail.com
ad9eecd2e2a3c64435e9e0a317f8048e2e18d1df
ad5fcc36c5872e5580e6a67c777eec8fabece9c3
/corelib/src/main/java/com/wf/core/widget/slideexpandlistview/ActionSlideExpandableListView.java
6f68c16c64bd309a4cc30b706147acc9bf9b231d
[]
no_license
wangpf2011/platform
2cda0549b7ead6cf0ac7c36bcb0ca7e6cad11ac2
ee8edacc4f0e28869632479baa98ee7ad0fac0c7
refs/heads/master
2021-01-21T05:10:13.188377
2019-05-22T01:42:11
2019-05-22T01:42:11
83,135,305
1
0
null
null
null
null
UTF-8
Java
false
false
2,366
java
package com.wf.core.widget.slideexpandlistview; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.widget.ListAdapter; /** * A more specific expandable listview in which the expandable area * consist of some buttons which are context actions for the item itself. * * It handles event binding for those buttons and allow for adding * a listener that will be invoked if one of those buttons are pressed. * * @author tjerk * @date 6/26/12 7:01 PM */ public class ActionSlideExpandableListView extends SlideExpandableListView { private OnActionClickListener listener; private int[] buttonIds = null; public ActionSlideExpandableListView(Context context) { super(context); } public ActionSlideExpandableListView(Context context, AttributeSet attrs) { super(context, attrs); } public ActionSlideExpandableListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public void setItemActionListener(OnActionClickListener listener, int ... buttonIds) { this.listener = listener; this.buttonIds = buttonIds; } /** * Interface for callback to be invoked whenever an action is clicked in * the expandle area of the list item. */ public interface OnActionClickListener { /** * Called when an action item is clicked. * * @param itemView the view of the list item * @param clickedView the view clicked * @param position the position in the listview */ public void onClick(View itemView, View clickedView, int position); } public void setAdapter(ListAdapter adapter) { super.setAdapter(new WrapperListAdapterImpl(adapter) { @Override public View getView(final int position, View view, ViewGroup viewGroup) { final View listView = wrapped.getView(position, view, viewGroup); // add the action listeners if(buttonIds != null && listView!=null) { for(int id : buttonIds) { View buttonView = listView.findViewById(id); if(buttonView!=null) { buttonView.findViewById(id).setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { if(listener!=null) { listener.onClick(listView, view, position); } } }); } } } return listView; } }); } }
[ "wangpf2011@163.com" ]
wangpf2011@163.com
39e4b573cfb24a3b07bbf50122c5347aab4f4a48
57e3929533d9af36c163a0fc2a0f08e813a8a214
/src/main/java/com/qatix/base/lang/generic/SimpleExample.java
32609e11aae5f763be762071c7bbd8c00e38b88e
[ "MIT" ]
permissive
qatix/JavaBase
866c9b87520e9668764bbadb56a20322e80505be
12fd0ba643918a26ba88077e491f178a461a9aed
refs/heads/master
2022-11-28T04:26:45.684298
2022-06-01T07:21:12
2022-06-01T07:21:12
153,476,220
1
1
MIT
2023-09-05T21:58:14
2018-10-17T15:01:00
Java
UTF-8
Java
false
false
853
java
package com.qatix.base.lang.generic; public class SimpleExample { public static void main(String[] args) { Box<Integer> intV = new Box<>(111); System.out.println(intV.getClass().getName()); System.out.println(intV.getData()); // Box<Number> numV = intV; compile error Box<Float> floatV = new Box<>(3.22f); // numV.setData(floatV); compile error System.out.println(floatV.getClass().getName()); System.out.println(floatV.getData()); printData(intV); printData(floatV); } //这里必须是<?> //类型通配符一般是使用 ? 代替具体的类型实参 private static void printData(Box<?> data) { System.out.println("data:" + data.getData()); } } //output //com.qatix.base.lang.generic.Box //111 //com.qatix.base.lang.generic.Box //3.22
[ "tangxiaojun@checheweike.com" ]
tangxiaojun@checheweike.com
a375baebe7691cc4fa726c086581ff7fdf8fc483
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_2cd2fd9b2713dfc569d9e6f4fb0ff910a8aa6e12/FileSystemBean/25_2cd2fd9b2713dfc569d9e6f4fb0ff910a8aa6e12_FileSystemBean_t.java
d4195e3c8295b1541c52d1ba12fa22598cb0a114
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,868
java
package org.genericsystem.web.beans; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.enterprise.context.SessionScoped; import javax.inject.Inject; import javax.inject.Named; import org.genericsystem.core.Cache; import org.genericsystem.core.CacheImpl; import org.genericsystem.core.Generic; import org.genericsystem.file.FileSystem; import org.genericsystem.file.FileSystem.Directory; import org.genericsystem.file.FileSystem.FileType.File; import org.genericsystem.web.util.GsMessages; import org.richfaces.component.UITree; import org.richfaces.event.TreeSelectionChangeEvent; @Named @SessionScoped public class FileSystemBean implements Serializable { private static final long serialVersionUID = 5535643610156313741L; @Inject private transient Cache cache; @Inject private GsMessages messages; private Generic selectedFile; public List<Directory> getRootDirectories() { return cache.<FileSystem> find(FileSystem.class).getRootDirectories(cache).toList(); } public List<Directory> getDirectories(final Directory directory) { return directory.getDirectories(cache).toList(); } public List<File> getFiles(final Directory directory) { return directory.getFiles(cache).toList(); } public void changeFile(TreeSelectionChangeEvent selectionChangeEvent) { List<Object> selection = new ArrayList<Object>(selectionChangeEvent.getNewSelection()); if (!selection.isEmpty()) { Object currentSelectionKey = selection.get(0); UITree tree = (UITree) selectionChangeEvent.getSource(); Object storedKey = tree.getRowKey(); tree.setRowKey(currentSelectionKey); selectedFile = (Generic) tree.getRowData(); tree.setRowKey(storedKey); messages.info("selectionchanged", selectedFile.getValue()); } } public void addRootDirectory(String newValue) { cache.<FileSystem> find(FileSystem.class).addRootDirectory(cache, newValue); messages.info("createRootDirectory", newValue); } public void addSubDirectory(String newValue) { ((Directory) selectedFile).addDirectory(cache, newValue); messages.info("createSubDirectory", newValue, selectedFile.getValue()); } public void addFile(String newValue) { ((Directory) selectedFile).addFile(cache, newValue); messages.info("createFile", newValue, selectedFile.getValue()); } public Wrapper getWrapper(Generic generic) { return new Wrapper(generic); } public class Wrapper { private Generic generic; public Wrapper(Generic generic) { this.generic = generic; } public String getShortPath() { return generic.getValue(); } public void setShortPath(String newValue) { if (!newValue.equals(generic.getValue())) { selectedFile = ((CacheImpl) cache).update(generic, newValue); messages.info("updateShortPath", newValue, generic.getValue()); } } } public String delete() { selectedFile.remove(cache); messages.info("deleteFile", selectedFile.getValue()); selectedFile = null; return "HOME"; } public boolean isDirectorySelected() { return selectedFile != null && selectedFile instanceof Directory; } public boolean isFileSelected() { return selectedFile != null && selectedFile instanceof File; } public String getFileShortPath() { return ((File) selectedFile).getShortPath(); } public String getDirectoryShortPath() { return ((Directory) selectedFile).getShortPath(); } public String getContent() { if (selectedFile == null) return ""; byte[] bytes = ((File) selectedFile).getContent(cache); return new String(bytes != null ? new String(bytes) : ""); } public void setContent(String content) { ((File) selectedFile).setContent(cache, content.getBytes()); messages.info("setContent", selectedFile.getValue()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
395b56b0872f1dcc5fe0c1a5c3d22f6959ff33bc
364176d0bd28d17772e570a904bb283ba2471ffd
/src/main/lombok/com/restfb/types/ads/AdgroupReviewFeedback.java
a3d55c9876ee3a621d77b04bf5d9bc8c368bff01
[ "MIT" ]
permissive
restfb/restfb
31feb0ead584a6808d77983f1eb3c599551f822c
25419bbcd28ede881bf53304b5d141e010269d05
refs/heads/master
2023-08-31T17:16:31.019245
2023-08-09T22:33:52
2023-08-09T22:33:52
2,363,832
608
441
MIT
2023-08-31T22:38:35
2011-09-11T03:06:54
Java
UTF-8
Java
false
false
1,618
java
/* * Copyright (c) 2010-2023 Mark Allen, Norbert Bartels. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.restfb.types.ads; import java.util.HashMap; import java.util.Map; import com.restfb.Facebook; import com.restfb.types.AbstractFacebookType; import lombok.Getter; import lombok.Setter; public class AdgroupReviewFeedback extends AbstractFacebookType { @Getter @Setter @Facebook private Map<String, String> global = new HashMap<>(); @Getter @Setter @Facebook("placement_specific") private AdgroupPlacementSpecificReviewFeedback placementSpecific; }
[ "n.bartels@phpmonkeys.de" ]
n.bartels@phpmonkeys.de
f57d3f2182b1024bc3e8cf15c10d183ba74bcd79
de3f5c7c3021232cf53e452b938df688929fc345
/branches/JAIN-SIP-1-2-148-Branch/src/test/unit/gov/nist/javax/sip/stack/forkedinvite/InviteTest.java
293225624db6f08445ef9922f6edc0757134478f
[ "LicenseRef-scancode-public-domain" ]
permissive
rkday/jain-sip
bd3f728948bdaafd98c17bb4843148edab74cd0d
cf52d49d540f8515b209352f861365dbe3d59d90
refs/heads/master
2021-01-22T09:26:50.309500
2014-01-25T19:59:06
2014-01-25T19:59:06
16,236,776
2
3
null
null
null
null
UTF-8
Java
false
false
2,871
java
/** * */ package test.unit.gov.nist.javax.sip.stack.forkedinvite; import java.util.HashSet; import javax.sip.SipProvider; import junit.framework.TestCase; import org.apache.log4j.Appender; import org.apache.log4j.ConsoleAppender; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; import org.apache.log4j.SimpleLayout; /** * @author M. Ranganathan * */ public class InviteTest extends TestCase { protected Shootist shootist; private static Logger logger = Logger.getLogger("test.tck"); protected static final Appender console = new ConsoleAppender(new SimpleLayout()); private static final int forkCount = 2; protected HashSet<Shootme> shootme = new HashSet<Shootme>(); private Proxy proxy; // private Appender appender; public InviteTest() { super("forkedInviteTest"); } public void setUp() { try { super.setUp(); shootist = new Shootist(6050, 5070); SipProvider shootistProvider = shootist.createSipProvider(); shootistProvider.addSipListener(shootist); boolean sendRinging = true; for (int i = 0 ; i < forkCount ; i ++ ) { Shootme shootme = new Shootme(5080 + i,sendRinging,400*forkCount - 200*i); sendRinging = false; SipProvider shootmeProvider = shootme.createProvider(); shootmeProvider.addSipListener(shootme); this.shootme.add(shootme); } this.proxy = new Proxy(5070,forkCount); SipProvider provider = proxy.createSipProvider(); provider.addSipListener(proxy); logger.debug("setup completed"); } catch (Exception ex) { fail("unexpected exception "); } } public void tearDown() { try { Thread.sleep(12000); this.shootist.checkState(); int ackCount = 0; for ( Shootme shootme: this.shootme) { shootme.checkState(); if ( shootme.isAckSeen()) { ackCount ++; } } assertEquals("ACK count must be exactly 2", 2,ackCount); this.shootist.stop(); for ( Shootme shootme: this.shootme) { shootme.stop(); } this.proxy.stop(); } catch (Exception ex) { ex.printStackTrace(); logger.error("unexpected exception", ex); fail("unexpected exception "); } } public void testInvite() throws Exception { this.shootist.sendInvite(forkCount); } }
[ "(no author)@8e71dc83-d81e-6649-80f2-80b843a9b2be" ]
(no author)@8e71dc83-d81e-6649-80f2-80b843a9b2be
9c7da6501daf6c21e02c67faf741e097b5fb1cae
32c6fcf9faf5ad1787c5a3164c33136c5d4962cc
/iot-20180120/src/main/java/com/aliyun/iot20180120/models/TransformClientIdResponse.java
9eb1be9080afaf2ed9b4f7ed96baee2d5e6fd6bb
[ "Apache-2.0" ]
permissive
foreverlyl/alibabacloud-java-sdk
0117700d8e217118c2980e09b90a13ef7d4054fa
1134eae866442721b7a33b028a916ce343a33c2b
refs/heads/master
2023-02-24T05:13:14.705586
2021-02-01T06:39:41
2021-02-01T06:39:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,079
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.iot20180120.models; import com.aliyun.tea.*; public class TransformClientIdResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public TransformClientIdResponseBody body; public static TransformClientIdResponse build(java.util.Map<String, ?> map) throws Exception { TransformClientIdResponse self = new TransformClientIdResponse(); return TeaModel.build(map, self); } public TransformClientIdResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public TransformClientIdResponse setBody(TransformClientIdResponseBody body) { this.body = body; return this; } public TransformClientIdResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
604e6be0363dc966a6bcf5db27d79ec2b8e23ed3
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/koush--AndroidAsync/1a2843bfe64ea1bf92973c7391ae03093a3b4a2b/after/UrlEncodedFormWriter.java
b39bb0c0d5dd3c8d62ee54a39149d1cf3524ad8a
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
854
java
package com.koushikdutta.async.http; import java.net.URLEncoder; import java.util.List; import org.apache.http.NameValuePair; import com.koushikdutta.async.DataSink; public class UrlEncodedFormWriter extends AsyncHttpRequestContentWriter { List<NameValuePair> mParameters; public UrlEncodedFormWriter(List<NameValuePair> parameters) { mParameters = parameters; } @Override public void write(DataSink sink) { boolean first = true; StringBuilder b = new StringBuilder(); for (NameValuePair pair: mParameters) { if (!first) b.append('&'); first = false; b.append(URLEncoder.encode(pair.getName())); b.append('='); b.append(URLEncoder.encode(pair.getValue())); } byte[] bytes = b.toString().getBytes(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
e1be03dd2c9ea9e06c3ca3f9a0cd51cbfb02632c
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/branches/config/dso-l1/src/main/java/com/tc/object/walker/AllFields.java
201adea0f36d194d8ee254b4933e27307abe81ed
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
1,717
java
/* * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright * notice. All rights reserved. */ package com.tc.object.walker; import com.tc.object.bytecode.ByteCodeUtil; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.TreeSet; class AllFields { private static final Class OBJECT = Object.class; private final Set fields = new TreeSet(); Iterator getFields() { return Collections.unmodifiableSet(fields).iterator(); } static AllFields getAllFields(Object o, boolean ignoreTC) { return getAllFields(o, ignoreTC, null); } static AllFields getAllFields(Object o, boolean ignoreTC, WalkTest walkTest) { // XXX: cache? AllFields allFields = new AllFields(); Map fieldNames = new HashMap(); Class c = o.getClass(); while (c != OBJECT && (walkTest == null || walkTest.includeFieldsForType(c))) { Field[] fields = c.getDeclaredFields(); for (int i = 0; i < fields.length; i++) { Field f = fields[i]; if (Modifier.isStatic(f.getModifiers())) { continue; } if (ignoreTC && f.getName().startsWith(ByteCodeUtil.TC_FIELD_PREFIX)) { continue; } FieldData key = new FieldData(f); FieldData prev = (FieldData) fieldNames.put(f.getName(), key); if (prev != null) { key.setShadowed(true); prev.setShadowed(true); } allFields.fields.add(key); } c = c.getSuperclass(); } return allFields; } }
[ "teck@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
teck@7fc7bbf3-cf45-46d4-be06-341739edd864
b0807168ccb063b790f36b5482d102aa796127fd
7fb10d87ef9eda8a2b0b39f5ec876f02d08cd621
/java-source-example/jdk8u40-source/resource/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java
4e6295aa9c80446cb1fa363c1b17643191eeeeb9
[]
no_license
SexCastException/java
77873efe81a8f2495356a5c33b97996993e121c4
7997885a3e2c62423d886978016a1ce02d39e44b
refs/heads/master
2022-05-09T13:42:12.379628
2022-04-14T06:29:32
2022-04-14T06:29:32
190,780,380
0
0
null
2022-04-14T06:29:33
2019-06-07T17:02:54
Java
UTF-8
Java
false
false
486
java
package org.omg.PortableServer; /** * org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/re/workspace/8-2-build-owindows-i586-cygwin/jdk8u40/2855/corba/src/share/classes/org/omg/PortableServer/poa.idl * Tuesday, February 10, 2015 10:08:00 PM PST */ public interface ID_ASSIGNMENT_POLICY_ID { /** * The value representing ID_ASSIGNMENT_POLICY_ID. */ public static final int value = (int)(19L); }
[ "pyh@qq.com" ]
pyh@qq.com
e406a340b8e0edbb7c6b0a1253a7ff1ec22da22c
0ad51dde288a43c8c2216de5aedcd228e93590ac
/src/com/vmware/converter/ArrayOfVsanUpgradeSystemUpgradeHistoryItem.java
35fcfdf161ad5cbd14f101311e3f7097291b0097
[]
no_license
YujiEda/converter-sdk-java
61c37b2642f3a9305f2d3d5851c788b1f3c2a65f
bcd6e09d019d38b168a9daa1471c8e966222753d
refs/heads/master
2020-04-03T09:33:38.339152
2019-02-11T15:19:04
2019-02-11T15:19:04
155,151,917
0
0
null
null
null
null
UTF-8
Java
false
false
5,549
java
/** * ArrayOfVsanUpgradeSystemUpgradeHistoryItem.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package com.vmware.converter; public class ArrayOfVsanUpgradeSystemUpgradeHistoryItem implements java.io.Serializable { private com.vmware.converter.VsanUpgradeSystemUpgradeHistoryItem[] vsanUpgradeSystemUpgradeHistoryItem; public ArrayOfVsanUpgradeSystemUpgradeHistoryItem() { } public ArrayOfVsanUpgradeSystemUpgradeHistoryItem( com.vmware.converter.VsanUpgradeSystemUpgradeHistoryItem[] vsanUpgradeSystemUpgradeHistoryItem) { this.vsanUpgradeSystemUpgradeHistoryItem = vsanUpgradeSystemUpgradeHistoryItem; } /** * Gets the vsanUpgradeSystemUpgradeHistoryItem value for this ArrayOfVsanUpgradeSystemUpgradeHistoryItem. * * @return vsanUpgradeSystemUpgradeHistoryItem */ public com.vmware.converter.VsanUpgradeSystemUpgradeHistoryItem[] getVsanUpgradeSystemUpgradeHistoryItem() { return vsanUpgradeSystemUpgradeHistoryItem; } /** * Sets the vsanUpgradeSystemUpgradeHistoryItem value for this ArrayOfVsanUpgradeSystemUpgradeHistoryItem. * * @param vsanUpgradeSystemUpgradeHistoryItem */ public void setVsanUpgradeSystemUpgradeHistoryItem(com.vmware.converter.VsanUpgradeSystemUpgradeHistoryItem[] vsanUpgradeSystemUpgradeHistoryItem) { this.vsanUpgradeSystemUpgradeHistoryItem = vsanUpgradeSystemUpgradeHistoryItem; } public com.vmware.converter.VsanUpgradeSystemUpgradeHistoryItem getVsanUpgradeSystemUpgradeHistoryItem(int i) { return this.vsanUpgradeSystemUpgradeHistoryItem[i]; } public void setVsanUpgradeSystemUpgradeHistoryItem(int i, com.vmware.converter.VsanUpgradeSystemUpgradeHistoryItem _value) { this.vsanUpgradeSystemUpgradeHistoryItem[i] = _value; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ArrayOfVsanUpgradeSystemUpgradeHistoryItem)) return false; ArrayOfVsanUpgradeSystemUpgradeHistoryItem other = (ArrayOfVsanUpgradeSystemUpgradeHistoryItem) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.vsanUpgradeSystemUpgradeHistoryItem==null && other.getVsanUpgradeSystemUpgradeHistoryItem()==null) || (this.vsanUpgradeSystemUpgradeHistoryItem!=null && java.util.Arrays.equals(this.vsanUpgradeSystemUpgradeHistoryItem, other.getVsanUpgradeSystemUpgradeHistoryItem()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getVsanUpgradeSystemUpgradeHistoryItem() != null) { for (int i=0; i<java.lang.reflect.Array.getLength(getVsanUpgradeSystemUpgradeHistoryItem()); i++) { java.lang.Object obj = java.lang.reflect.Array.get(getVsanUpgradeSystemUpgradeHistoryItem(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); } } } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(ArrayOfVsanUpgradeSystemUpgradeHistoryItem.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("urn:vim25", "ArrayOfVsanUpgradeSystemUpgradeHistoryItem")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("vsanUpgradeSystemUpgradeHistoryItem"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "VsanUpgradeSystemUpgradeHistoryItem")); elemField.setXmlType(new javax.xml.namespace.QName("urn:vim25", "VsanUpgradeSystemUpgradeHistoryItem")); elemField.setMinOccurs(0); elemField.setNillable(false); elemField.setMaxOccursUnbounded(true); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "yuji_eda@dwango.co.jp" ]
yuji_eda@dwango.co.jp
681062cf23e29b8f86f3d5e2358a1f63cc63cd29
44b204b157f5532210cac769ceab3c4907efbb33
/jbeanbox/src/main/java/com/github/drinkjava2/cglib3_2_0/core/CollectionUtils.java
b4f29db619d050cbe91d17ab28ede7e1e824911e
[ "Apache-2.0" ]
permissive
orb1t/jBeanBox
0438533dd0026d9b8cdb24625df7034c67338667
acea0d0f3ff4d4dec6a19144941fd342a1947329
refs/heads/master
2020-04-07T23:55:19.421579
2018-11-21T09:17:34
2018-11-21T09:17:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,576
java
/* * Copyright 2003,2004 The Apache Software Foundation * * 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.github.drinkjava2.cglib3_2_0.core; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * @author Chris Nokleberg * @version $Id: CollectionUtils.java,v 1.7 2004/06/24 21:15:21 herbyderby Exp $ */ @SuppressWarnings({"rawtypes","unchecked"}) public class CollectionUtils { private CollectionUtils() { } public static Map bucket(Collection c, Transformer t) { Map buckets = new HashMap(); for (Iterator it = c.iterator(); it.hasNext();) { Object value = (Object)it.next(); Object key = t.transform(value); List bucket = (List)buckets.get(key); if (bucket == null) { buckets.put(key, bucket = new LinkedList()); } bucket.add(value); } return buckets; } public static void reverse(Map source, Map target) { for (Iterator it = source.keySet().iterator(); it.hasNext();) { Object key = it.next(); target.put(source.get(key), key); } } public static Collection filter(Collection c, Predicate p) { Iterator it = c.iterator(); while (it.hasNext()) { if (!p.evaluate(it.next())) { it.remove(); } } return c; } public static List transform(Collection c, Transformer t) { List result = new ArrayList(c.size()); for (Iterator it = c.iterator(); it.hasNext();) { result.add(t.transform(it.next())); } return result; } public static Map getIndexMap(List list) { Map indexes = new HashMap(); int index = 0; for (Iterator it = list.iterator(); it.hasNext();) { indexes.put(it.next(), new Integer(index++)); } return indexes; } }
[ "yong9981@gmail.com" ]
yong9981@gmail.com
baca8faedfb359797d8c60378f50af081564d2d2
f37a6564e1642c79926be69c7fee13f43b4df76a
/halcon/capa-halcon-portlet/WEB-INF/service/com/ext/portlet/halcon/model/CargaDescuento.java
4285259e14be44ca814012da65f6a6b927fa51c4
[]
no_license
mshelzr/portlets-business
edc75e3bd5afbf7f51d9df58799bdd4ad4b7be36
9cf59a531524d8cafeb415bc6f711db5c4304aae
refs/heads/master
2021-01-01T06:32:43.719845
2014-09-10T06:04:23
2014-09-10T06:04:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,400
java
/** * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 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. */ package com.ext.portlet.halcon.model; import com.liferay.portal.model.PersistedModel; /** * The extended model interface for the CargaDescuento service. Represents a row in the &quot;T_CARGA_DESCUENTO&quot; database table, with each column mapped to a property of this class. * * @author Infonet-Consulting * @see CargaDescuentoModel * @see com.ext.portlet.halcon.model.impl.CargaDescuentoImpl * @see com.ext.portlet.halcon.model.impl.CargaDescuentoModelImpl * @generated */ public interface CargaDescuento extends CargaDescuentoModel, PersistedModel { /* * NOTE FOR DEVELOPERS: * * Never modify this interface directly. Add methods to {@link com.ext.portlet.halcon.model.impl.CargaDescuentoImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. */ }
[ "mshelzr@gmail.com" ]
mshelzr@gmail.com
724cf1f83854d214317098df350da19baed7ad60
13ef5b7aab8afc11f6939c2dd8d68f3ac1fef308
/src/main/java/cn/com/zhihetech/online/dao/ISkuAttributeDao.java
871fcaa2d568039abe42c967984922dcc7fe9a27
[]
no_license
lydja520/zhihe-online
5a3873ae368587e2d2ddf94afe9e04c69934b294
515ecefed95332e1559faa4d820d0895f24a1b28
refs/heads/master
2020-06-29T06:55:40.414598
2016-11-22T07:05:24
2016-11-22T07:05:24
74,444,464
0
1
null
null
null
null
UTF-8
Java
false
false
263
java
package cn.com.zhihetech.online.dao; import cn.com.zhihetech.online.bean.SkuAttribute; import cn.com.zhihetech.util.hibernate.dao.SupportDao; /** * Created by YangDaiChun on 2015/12/2. */ public interface ISkuAttributeDao extends SupportDao<SkuAttribute> { }
[ "lydja@qq.com" ]
lydja@qq.com
6d731fdbe092b110f495cbb68977d9454fa9adcd
2d2ea594adee21154e0d5ce60302c2e2c6cc21ad
/mpserverless-20190615/src/main/java/com/aliyun/mpserverless20190615/models/RunFunctionResponseBody.java
41c467f31124c845a31edb3a4ac55b36e22c408e
[ "Apache-2.0" ]
permissive
yndu13/alibabacloud-java-sdk
b67816695b8999b7e9be929929af43b9e289dbcc
39b0fd9d6f0ef4f924f92fb6cd4e50694079745b
refs/heads/master
2023-07-15T07:07:47.705726
2021-08-12T08:55:26
2021-08-12T08:55:26
395,252,858
0
0
null
2021-08-12T08:43:07
2021-08-12T08:43:06
null
UTF-8
Java
false
false
3,021
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.mpserverless20190615.models; import com.aliyun.tea.*; public class RunFunctionResponseBody extends TeaModel { @NameInMap("RequestId") public String requestId; @NameInMap("RuntimeMeta") public RunFunctionResponseBodyRuntimeMeta runtimeMeta; @NameInMap("Result") public String result; public static RunFunctionResponseBody build(java.util.Map<String, ?> map) throws Exception { RunFunctionResponseBody self = new RunFunctionResponseBody(); return TeaModel.build(map, self); } public RunFunctionResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public RunFunctionResponseBody setRuntimeMeta(RunFunctionResponseBodyRuntimeMeta runtimeMeta) { this.runtimeMeta = runtimeMeta; return this; } public RunFunctionResponseBodyRuntimeMeta getRuntimeMeta() { return this.runtimeMeta; } public RunFunctionResponseBody setResult(String result) { this.result = result; return this; } public String getResult() { return this.result; } public static class RunFunctionResponseBodyRuntimeMeta extends TeaModel { @NameInMap("InvocationDuration") public Integer invocationDuration; @NameInMap("RequestId") public String requestId; @NameInMap("BillingDuration") public Integer billingDuration; @NameInMap("MaxMemoryUsage") public Integer maxMemoryUsage; public static RunFunctionResponseBodyRuntimeMeta build(java.util.Map<String, ?> map) throws Exception { RunFunctionResponseBodyRuntimeMeta self = new RunFunctionResponseBodyRuntimeMeta(); return TeaModel.build(map, self); } public RunFunctionResponseBodyRuntimeMeta setInvocationDuration(Integer invocationDuration) { this.invocationDuration = invocationDuration; return this; } public Integer getInvocationDuration() { return this.invocationDuration; } public RunFunctionResponseBodyRuntimeMeta setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public RunFunctionResponseBodyRuntimeMeta setBillingDuration(Integer billingDuration) { this.billingDuration = billingDuration; return this; } public Integer getBillingDuration() { return this.billingDuration; } public RunFunctionResponseBodyRuntimeMeta setMaxMemoryUsage(Integer maxMemoryUsage) { this.maxMemoryUsage = maxMemoryUsage; return this; } public Integer getMaxMemoryUsage() { return this.maxMemoryUsage; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
341479845b5fca581aa1fdca000270495a3e3422
c885ef92397be9d54b87741f01557f61d3f794f3
/results/JacksonDatabind-111/com.fasterxml.jackson.databind.deser.impl.MethodProperty/BBC-F0-opt-80/tests/6/com/fasterxml/jackson/databind/deser/impl/MethodProperty_ESTest.java
84054609840a586b78a4b9350b5ff71a62c51e52
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
2,708
java
/* * This file was automatically generated by EvoSuite * Wed Oct 13 13:42:02 GMT 2021 */ package com.fasterxml.jackson.databind.deser.impl; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectReader; import com.fasterxml.jackson.databind.PropertyName; import com.fasterxml.jackson.databind.deser.impl.MethodProperty; import com.fasterxml.jackson.databind.introspect.BasicBeanDescription; import com.fasterxml.jackson.databind.module.SimpleModule; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class MethodProperty_ESTest extends MethodProperty_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { JsonDeserializer<BasicBeanDescription> jsonDeserializer0 = (JsonDeserializer<BasicBeanDescription>) mock(JsonDeserializer.class, new ViolatedAssumptionAnswer()); MethodProperty methodProperty0 = null; try { methodProperty0 = new MethodProperty((MethodProperty) null, jsonDeserializer0, jsonDeserializer0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase", e); } } @Test(timeout = 4000) public void test1() throws Throwable { PropertyName propertyName0 = PropertyName.construct("&"); MethodProperty methodProperty0 = null; try { methodProperty0 = new MethodProperty((MethodProperty) null, propertyName0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase", e); } } @Test(timeout = 4000) public void test2() throws Throwable { ObjectMapper objectMapper0 = new ObjectMapper(); Class<SimpleModule> class0 = SimpleModule.class; ObjectReader objectReader0 = objectMapper0.readerFor(class0); assertNotNull(objectReader0); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
e9f839347a540ee809ab7feb66747a78036612a0
6b490de160da9cda93cf62d79f5df70f4881ef04
/src/Problem_107.java
50eec4d2d4a19af1abc63438b174987455a1c4c9
[]
no_license
wahidullahmayar2020/ReplSolutions
c688fa0e649d8f7e6b98a9523dd5c354d42a05af
051cd1e5c4c3c4a2892757f2fdd1e16f62e7ce92
refs/heads/master
2023-04-02T12:53:42.709284
2021-04-07T22:16:19
2021-04-07T22:16:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
/* How would you reverse a String using StringBuffer Class Given String = "Hello Friends" Expected Output: sdneirF olleH */ public class Problem_107 { public static void main(String[] args) { String text = "Hello Friends"; StringBuilder stringBuilder = new StringBuilder(text); System.out.println(stringBuilder.reverse()); } }
[ "asghar@syntaxtech.com" ]
asghar@syntaxtech.com
38a29f3a5fc905582269b15700310347d8d2fb17
bbcd1ca59601057feaca183ef534028853d9300e
/lwh-micromall/micromall-common/common-base/src/main/java/com/lwhtarena/microMall/common/base/dto/MqMessageDto.java
e50a678a3cef7cf3d1cde6c5bbb2c07f8e333095
[]
no_license
hkkkkq/cloud
214f95e1c0a07af99339219119b7200ff6b8056f
ee21c997ed02ec69ff5b97c78851894c5c25301b
refs/heads/master
2023-01-01T05:03:44.237792
2020-10-22T16:32:56
2020-10-22T16:32:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
package com.lwhtarena.micromall.common.base.dto; import lombok.AllArgsConstructor; import lombok.Data; import java.io.Serializable; /** * The class Tpc message dto. * * @author paascloud.net @gmail.com */ @Data @AllArgsConstructor public class MqMessageDto implements Serializable { private static final long serialVersionUID = -995670498005087805L; /** * 消息key */ private String messageKey; /** * topic */ private String messageTopic; }
[ "lwhtarena@163.com" ]
lwhtarena@163.com
5291f0245514eade93bc2e04ab010ae31a2bbcfc
7bea7fb60b5f60f89f546a12b43ca239e39255b5
/src/com/sun/org/apache/xerces/internal/util/PrimeNumberSequenceGenerator.java
2b9926683743485e5c4db388f5f044440f500022
[]
no_license
sorakeet/fitcorejdk
67623ab26f1defb072ab473f195795262a8ddcdd
f946930a826ddcd688b2ddbb5bc907d2fc4174c3
refs/heads/master
2021-01-01T05:52:19.696053
2017-07-15T01:33:41
2017-07-15T01:33:41
97,292,673
0
0
null
null
null
null
UTF-8
Java
false
false
2,651
java
/** * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.sun.org.apache.xerces.internal.util; import java.util.Random; final class PrimeNumberSequenceGenerator{ private static final int[] PRIMES={ 3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59, 61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137, 139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227, 229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313, 317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419, 421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509, 521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617, 619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727}; static void generateSequence(int[] arrayToFill){ Random r=new Random(); for(int i=0;i<arrayToFill.length;i++){ arrayToFill[i]=PRIMES[r.nextInt(PRIMES.length)]; } } }
[ "panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7" ]
panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7