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
b62d761f81e9a770ea5142653efedba1879a15de
4f08bcb953fd6a6dea9166c1ce22e5755222c4c1
/src/main/java/com/ele/pojo/MenuTypeReal.java
34fb85d07edd3cb7f4267eec504657bbce83e71a
[]
no_license
Fish-Fan/ele-spring
0ecceff712c37599b3da48adc04c5a9e69cbaea9
93be5fc079619c6ad1e6bf8178ade84d96d7f048
refs/heads/master
2020-12-03T02:00:43.959439
2017-07-21T01:55:20
2017-07-21T01:55:20
95,892,741
1
1
null
null
null
null
UTF-8
Java
false
false
838
java
package com.ele.pojo; /** * Created by yanfeng-mac on 2017/7/13. */ public class MenuTypeReal { private Integer id; private Integer shopId; private Integer menuTypeId; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getShopId() { return shopId; } public void setShopId(Integer shopId) { this.shopId = shopId; } public Integer getMenuTypeId() { return menuTypeId; } public void setMenuTypeId(Integer menuTypeId) { this.menuTypeId = menuTypeId; } @Override public String toString() { return "MenuTypeReal{" + "id=" + id + ", shopId=" + shopId + ", menuTypeId=" + menuTypeId + '}'; } }
[ "fanyank@126.com" ]
fanyank@126.com
dd6b4b80bc92de66c9f6e866f1ebd402e063a3d2
81480f1ff5a5d94b5dc38a0a0f8fcf724f556c73
/shopping-parent/shopping-dao/src/main/java/com/palmble/sp/manger/dao/UserPermissionMapper.java
3678a274802e54c4e47e26c96dc8b1cdadfd93ab
[]
no_license
15638836857/shoppingManager
6c3cf8571d20eb921110747a2c29a4d5fee8f278
0be206eb6a9815e0cf5440ec1ba0ad79efd9d840
refs/heads/master
2020-03-26T05:04:39.945070
2018-08-20T02:21:15
2018-08-20T02:21:15
144,537,191
0
0
null
null
null
null
UTF-8
Java
false
false
681
java
package com.palmble.sp.manger.dao; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Mapper; import com.palmble.sp.manger.model.UserPermission; @Mapper public interface UserPermissionMapper{ int deleteByPrimaryKey(Integer id); int insert(UserPermission record); int insertSelective(UserPermission record); List<UserPermission> selectByGroupOrUserId(Integer id); int updateByPrimaryKeySelective(UserPermission record); int updateByPrimaryKey(UserPermission record); List<Integer> selectPrivilegeUrlByGroupOrUserId(Integer userid); Map<String,Object> getByUserIdAndUrl(Map<String,Object> map); }
[ "15638836857@163.com" ]
15638836857@163.com
ced69fb8cc383397c478bbc2fa225d545d7e9052
684092ddea8fa0f46e2adf4a2c1bd7d2fad386d7
/bean/src/main/java/com/tqmall/athena/bean/webParam/carMaintain/CarMaintainPO.java
6997f174fb68290540dd14b10ac1bfa4dfc7a773
[]
no_license
xie-summer/athena-1
1b90ff3d41feef88f3f0c0009c742e71994dde4b
3c1e8244142a69f7b4a127ca936d8b68425f586e
refs/heads/master
2021-06-16T04:20:20.861534
2017-05-11T07:57:18
2017-05-11T07:57:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
218
java
package com.tqmall.athena.bean.webParam.carMaintain; import lombok.Data; /** * Created by huangzhangting on 15/11/7. */ @Data public class CarMaintainPO { private Integer yearId; private Integer mileage; }
[ "zhangting.huang@tqmall.com" ]
zhangting.huang@tqmall.com
4524906a2417fa5582d8b53e2ac18d55e4c96e4b
e89dc01c95b8b45404f971517c2789fd21657749
/src/main/java/com/alipay/api/response/KoubeiCateringPosPrintQueryResponse.java
72c8b4cd4c56ab794cdc753966f623ab1e8063f6
[ "Apache-2.0" ]
permissive
guoweiecust/alipay-sdk-java-all
3370466eec70c5422c8916c62a99b1e8f37a3f46
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
refs/heads/master
2023-05-05T07:06:47.823723
2021-05-25T15:26:21
2021-05-25T15:26:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
884
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.PrintModel; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.catering.pos.print.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiCateringPosPrintQueryResponse extends AlipayResponse { private static final long serialVersionUID = 6223541897178791746L; /** * ๆ‰“ๅฐๆœบModelๅฏน่ฑก้›†ๅˆ */ @ApiListField("print_model_list") @ApiField("print_model") private List<PrintModel> printModelList; public void setPrintModelList(List<PrintModel> printModelList) { this.printModelList = printModelList; } public List<PrintModel> getPrintModelList( ) { return this.printModelList; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
9c6881c770e0cc5c5d9698b0bfde47d1a30da1b3
d14cca066573aab1e0f66f995d40ecff4080fea4
/final_project/src/main/java/com/guem/go/eunbyul/SurveyController.java
b1ae9e4fc83f4265021f6e39fdf9f6cf72fd9087
[]
no_license
rkdxhdvk/guemgo
2e986fea8a369659b13f2240c95c7d800bbcb9f3
4ad8eeb562361476d099e9b14df9ee1a66118bb9
refs/heads/master
2020-04-02T09:59:05.179545
2018-11-26T03:10:26
2018-11-26T03:10:26
154,319,436
0
1
null
null
null
null
UHC
Java
false
false
1,854
java
package com.guem.go.eunbyul; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; @Controller public class SurveyController { @Autowired private SurveyDao dao; @RequestMapping(value = "/survey", method = RequestMethod.GET) public String survey(HttpServletRequest request, Model model){ String area=request.getParameter("area"); System.out.println(area); //์—ฌ๊ธฐ์„œ area๋ž‘ ์นดํ…Œ๊ณ ๋ฆฌ(์†Œ)ํ…Œ์ด๋ธ” ๋ช…์นญ์„ ๋น„๊ตํ•ด์„œ ํ•ด๋‹น ๋ช…์นญ์˜ ์ค‘๋„˜๋ฒ„๋ฅผ ์ฐพ๋Š”๋‹ค //์ค‘๋„˜๋ฒ„๋ฅผ ์ฐพ์•„์„œ ์นดํ…Œ๊ณ ๋ฆฌ ์ค‘์œผ๋กœ ๊ฐ€๊ณ  model.addAttribute("area", area); return "eunbyul/survey"; } @RequestMapping(value = "/survey", method = RequestMethod.POST) public ModelAndView surveyOk(String s_name, String area,String purpose, String experience, int age, String times, String time, String start, String addr1,String addr2, String anything) { System.out.println(s_name); System.out.println(purpose); System.out.println(experience); System.out.println(age); System.out.println(times); System.out.println(addr1); System.out.println(addr2); System.out.println(anything); System.out.println("11111111111111111111111111"); /* SurveyDao dao= new SurveyDao();*/ CatemVo mvo=dao.selectcatem(s_name); System.out.println(mvo.m_num); RequireVo vo=new RequireVo(0, "test@10", mvo.m_num, 0); int n=dao.insert(vo); ModelAndView mv = new ModelAndView(); mv.addObject("n", n); mv.setViewName("eunbyul/surveyOk"); return mv; } }
[ "JHTA@JHTA-PC" ]
JHTA@JHTA-PC
aac1cdf4657ab44f41566697e9aa4bdc80522d74
f7fbc015359f7e2a7bae421918636b608ea4cef6
/base/tags/2.0.0-rc9/src/org/hsqldb/rowio/RowInputBinary.java
1340f507dc8ea70871c75231048da7d516fc75fc
[]
no_license
svn2github/hsqldb
cdb363112cbdb9924c816811577586f0bf8aba90
52c703b4d54483899d834b1c23c1de7173558458
refs/heads/master
2023-09-03T10:33:34.963710
2019-01-18T23:07:40
2019-01-18T23:07:40
155,365,089
0
0
null
null
null
null
UTF-8
Java
false
false
7,818
java
/* Copyright (c) 2001-2010, The HSQL Development Group * 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 HSQL Development Group 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 HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * 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. */ package org.hsqldb.rowio; import java.io.EOFException; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; import org.hsqldb.lib.StringConverter; import org.hsqldb.store.ValuePool; import org.hsqldb.types.BinaryData; import org.hsqldb.types.BlobData; import org.hsqldb.types.BlobDataID; import org.hsqldb.types.ClobData; import org.hsqldb.types.ClobDataID; import org.hsqldb.types.IntervalMonthData; import org.hsqldb.types.IntervalSecondData; import org.hsqldb.types.IntervalType; import org.hsqldb.types.JavaObjectData; import org.hsqldb.types.TimeData; import org.hsqldb.types.TimestampData; import org.hsqldb.types.Type; import org.hsqldb.types.Types; /** * Provides methods for reading the data for a row from a * byte array. The format of data is that used for storage of cached * tables by v.1.6.x databases, apart from strings. * * @author Bob Preston (sqlbob@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net) * @version 1.9.0 * @since 1.7.0 */ public class RowInputBinary extends RowInputBase implements org.hsqldb.rowio.RowInputInterface { private RowOutputBinary out; public RowInputBinary(byte[] buf) { super(buf); } /** * uses the byte[] buffer from out. At each reset, the buffer is set * to the current one for out. */ public RowInputBinary(RowOutputBinary out) { super(out.getBuffer()); this.out = out; } public int readType() throws IOException { return readShort(); } public String readString() throws IOException { int length = readInt(); String s = StringConverter.readUTF(buffer, pos, length); s = ValuePool.getString(s); pos += length; return s; } protected boolean checkNull() throws IOException { int b = readByte(); return b == 0 ? true : false; } protected String readChar(Type type) throws IOException { return readString(); } protected Integer readSmallint() throws IOException { return ValuePool.getInt(readShort()); } protected Integer readInteger() throws IOException { return ValuePool.getInt(readInt()); } protected Long readBigint() throws IOException { return ValuePool.getLong(readLong()); } protected Double readReal() throws IOException { return ValuePool.getDouble(readLong()); } protected BigDecimal readDecimal(Type type) throws IOException { byte[] bytes = readByteArray(); int scale = readInt(); BigInteger bigint = new BigInteger(bytes); return ValuePool.getBigDecimal(new BigDecimal(bigint, scale)); } protected Boolean readBoole() throws IOException { return readBoolean() ? Boolean.TRUE : Boolean.FALSE; } protected TimeData readTime(Type type) throws IOException { if (type.typeCode == Types.SQL_TIME) { return new TimeData(readInt(), readInt(), 0); } else { return new TimeData(readInt(), readInt(), readInt()); } } protected TimestampData readDate(Type type) throws IOException { long date = readLong(); return new TimestampData(date); } protected TimestampData readTimestamp(Type type) throws IOException { if (type.typeCode == Types.SQL_TIMESTAMP) { return new TimestampData(readLong(), readInt()); } else { return new TimestampData(readLong(), readInt(), readInt()); } } protected IntervalMonthData readYearMonthInterval(Type type) throws IOException { long months = readLong(); return new IntervalMonthData(months, (IntervalType) type); } protected IntervalSecondData readDaySecondInterval(Type type) throws IOException { long seconds = readLong(); int nanos = readInt(); return new IntervalSecondData(seconds, nanos, (IntervalType) type); } protected Object readOther() throws IOException { return new JavaObjectData(readByteArray()); } protected BinaryData readBit() throws IOException { int length = readInt(); byte[] b = new byte[(length + 7) / 8]; readFully(b); return BinaryData.getBitData(b, length); } protected BinaryData readBinary() throws IOException { return new BinaryData(readByteArray(), false); } protected ClobData readClob() throws IOException { long id = super.readLong(); return new ClobDataID(id); } protected BlobData readBlob() throws IOException { long id = super.readLong(); return new BlobDataID(id); } public Object[] readData(Type[] colTypes) throws IOException { return super.readData(colTypes); } // helper methods public byte[] readByteArray() throws IOException { byte[] b = new byte[readInt()]; readFully(b); return b; } public char[] readCharArray() throws IOException { char[] c = new char[readInt()]; if (count - pos < c.length) { pos = count; throw new EOFException(); } for (int i = 0; i < c.length; i++) { int ch1 = buffer[pos++] & 0xff; int ch2 = buffer[pos++] & 0xff; c[i] = (char) ((ch1 << 8) + (ch2)); } return c; } /** * Used to reset the row, ready for Result data to be written into the * byte[] buffer by an external routine. * */ public void resetRow(int rowsize) { if (out != null) { out.reset(rowsize); buffer = out.getBuffer(); } super.reset(); } /** * Used to reset the row, ready for a new db row to be written into the * byte[] buffer by an external routine. * */ public void resetRow(int filepos, int rowsize) throws IOException { if (out != null) { out.reset(rowsize); buffer = out.getBuffer(); } super.resetRow(filepos, rowsize); } }
[ "unsaved@7c7dc5f5-a22d-0410-a3af-b41755a11667" ]
unsaved@7c7dc5f5-a22d-0410-a3af-b41755a11667
f74fca47291a85c3df8f5667e3fa3cf554bd4d4c
cfc60fc1148916c0a1c9b421543e02f8cdf31549
/src/testcases/CWE369_Divide_By_Zero/CWE369_Divide_By_Zero__random_divide_16.java
4b37bd7a4fbd5fb3241ebcdd7d0e999bae41423b
[ "LicenseRef-scancode-public-domain" ]
permissive
zhujinhua/GitFun
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
987f72fdccf871ece67f2240eea90e8c1971d183
refs/heads/master
2021-01-18T05:46:03.351267
2012-09-11T16:43:44
2012-09-11T16:43:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,272
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE369_Divide_By_Zero__random_divide_16.java Label Definition File: CWE369_Divide_By_Zero.label.xml Template File: sources-sinks-16.tmpl.java */ /* * @description * CWE: 369 Divide by zero * BadSource: random Set data to a random value * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: divide * GoodSink: Check for zero before dividing * BadSink : Dividing by a value that may be zero * Flow Variant: 16 Control flow: while(true) and while(local_f) * * */ package testcases.CWE369_Divide_By_Zero; import testcasesupport.*; import java.sql.*; import javax.servlet.http.*; import java.security.SecureRandom; import java.security.SecureRandom; import java.util.logging.Logger; public class CWE369_Divide_By_Zero__random_divide_16 extends AbstractTestCase { public void bad() throws Throwable { int data; boolean local_f = false; /* This local variable is used becuase the Java compiler will generate an error on while(false) and similar constructs that evaluate to false. This is the simplest construct that will always be false and still compile. */ while(local_f) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger"); /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; break; } while(true) { Logger log_bad = Logger.getLogger("local-logger"); SecureRandom r = new SecureRandom(); data = r.nextInt(); break; } while(true) { /* POTENTIAL FLAW: Zero denominator will cause an issue. An integer division will result in an exception. */ IO.writeLine("bad: 100/" + String.valueOf(data) + " = " + (100 / data) + "\n"); break; } while(local_f) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ /* FIX: test for a zero denominator */ if( data != 0 ) { IO.writeLine("100/" + String.valueOf(data) + " = " + (100 / data) + "\n"); } else { IO.writeLine("This would result in a divide by zero"); } break; } } /* goodG2B() - use goodsource and badsink by changing the conditions on the first and second while statements */ private void goodG2B() throws Throwable { int data; boolean local_f = false; while(true) { java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger"); /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; break; } while(local_f) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ Logger log_bad = Logger.getLogger("local-logger"); SecureRandom r = new SecureRandom(); data = r.nextInt(); break; } while(true) { /* POTENTIAL FLAW: Zero denominator will cause an issue. An integer division will result in an exception. */ IO.writeLine("bad: 100/" + String.valueOf(data) + " = " + (100 / data) + "\n"); break; } while(local_f) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ /* FIX: test for a zero denominator */ if( data != 0 ) { IO.writeLine("100/" + String.valueOf(data) + " = " + (100 / data) + "\n"); } else { IO.writeLine("This would result in a divide by zero"); } break; } } /* goodB2G() - use badsource and goodsink by changing the conditions on the third and fourth while statements */ private void goodB2G() throws Throwable { int data; boolean local_f = false; while(local_f) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger"); /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; break; } while(true) { Logger log_bad = Logger.getLogger("local-logger"); SecureRandom r = new SecureRandom(); data = r.nextInt(); break; } while(local_f) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ /* POTENTIAL FLAW: Zero denominator will cause an issue. An integer division will result in an exception. */ IO.writeLine("bad: 100/" + String.valueOf(data) + " = " + (100 / data) + "\n"); break; } while(true) { /* FIX: test for a zero denominator */ if( data != 0 ) { IO.writeLine("100/" + String.valueOf(data) + " = " + (100 / data) + "\n"); } else { IO.writeLine("This would result in a divide by zero"); } break; } } public void good() throws Throwable { goodG2B(); goodB2G(); } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "amitf@chackmarx.com" ]
amitf@chackmarx.com
2cad0944bba61c1eafd4b13d7158d848f4edaa3c
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/sellhouse/app/CustomerOriginController.java
7bb06735d6d28d666bd13ce8135739fa9f87b904
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
1,838
java
package com.kingdee.eas.fdc.sellhouse.app; import com.kingdee.bos.BOSException; //import com.kingdee.bos.metadata.*; import com.kingdee.bos.framework.*; import com.kingdee.bos.util.*; import com.kingdee.bos.Context; import java.lang.String; import com.kingdee.eas.common.EASBizException; import com.kingdee.bos.metadata.entity.EntityViewInfo; import com.kingdee.bos.dao.IObjectPK; import com.kingdee.bos.metadata.entity.SelectorItemCollection; import com.kingdee.eas.framework.CoreBaseCollection; import com.kingdee.eas.fdc.sellhouse.CustomerOriginCollection; import com.kingdee.bos.util.*; import com.kingdee.eas.fdc.basedata.app.FDCDataBaseController; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.bos.framework.*; import com.kingdee.eas.fdc.sellhouse.CustomerOriginInfo; import java.rmi.RemoteException; import com.kingdee.bos.framework.ejb.BizController; public interface CustomerOriginController extends FDCDataBaseController { public CustomerOriginCollection getCustomerOriginCollection(Context ctx, String oql) throws BOSException, RemoteException; public CustomerOriginCollection getCustomerOriginCollection(Context ctx, EntityViewInfo view) throws BOSException, RemoteException; public CustomerOriginCollection getCustomerOriginCollection(Context ctx) throws BOSException, RemoteException; public CustomerOriginInfo getCustomerOriginInfo(Context ctx, String oql) throws BOSException, EASBizException, RemoteException; public CustomerOriginInfo getCustomerOriginInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException, RemoteException; public CustomerOriginInfo getCustomerOriginInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException; }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
09f65a1e815387afd41fb2297c98fa7d4af3b744
1c93016200257ea893ef7c7c7ec0226afbbfe554
/android/app/src/main/java/com/training/MyAppPackage.java
1e3f1b2e79fa58920cfcbe402eae90df2697e81c
[]
no_license
mikroserwisy/react-native-android-integration
1681dc876bdb06cc33ef19e19b0b1dd3587a1d3b
9e5f64c7b4f57bad4e0849f4875684b4ec3291eb
refs/heads/master
2023-08-23T15:09:27.519004
2021-10-13T13:12:01
2021-10-13T13:12:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
739
java
package com.training; import com.facebook.react.ReactPackage; import com.facebook.react.bridge.NativeModule; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.ViewManager; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class MyAppPackage implements ReactPackage { @Override public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) { return Collections.emptyList(); } @Override public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) { List<NativeModule> modules = new ArrayList<>(); modules.add(new TrainingModule(reactContext)); return modules; } }
[ "landrzejewski.poczta@gmail.com" ]
landrzejewski.poczta@gmail.com
e5eb4160ef1c553c6e908d2a4527e626be5018ef
af97dc2f22b960264ab6cf14dbc4303156eed9db
/platform/cn.gmuni.enrollment.homepage/src/main/java/cn/gmuni/enrollment/homepage/service/IIndexService.java
f6db29857e69f407546c1786c509aba9336d0cae
[]
no_license
zhuxin3230213/springboot
e212badd4de725cb36dd5994add509c0cc5499d9
365154bad86899bf38ce553759d315fcef695efb
refs/heads/master
2020-04-11T10:32:07.141578
2019-01-21T03:44:55
2019-01-21T03:44:55
161,716,379
0
0
null
null
null
null
UTF-8
Java
false
false
491
java
package cn.gmuni.enrollment.homepage.service; import java.util.List; import java.util.Map; public interface IIndexService { List<Map<String,Object>> loadPvData(String format, String format1); List<Map<String,Object>> loadPvDataByMonth(String s, String s1); List<Map<String, Object>> loadModulePvData(String time); List<Map<String,Object>> loadPlanData(Map<String,String> params); List<Map<String,Object>> loadScoreData(Map<String,String> params); }
[ "zhuxin_123" ]
zhuxin_123
c3454e0cda2fcfa1d53b4d96398a9d16afb07d6d
aa6997aba1475b414c1688c9acb482ebf06511d9
/src/javax/xml/transform/SourceLocator.java
af6c319f8b8d84ea4cfd59027232de1d62f4c901
[]
no_license
yueny/JDKSource1.8
eefb5bc88b80ae065db4bc63ac4697bd83f1383e
b88b99265ecf7a98777dd23bccaaff8846baaa98
refs/heads/master
2021-06-28T00:47:52.426412
2020-12-17T13:34:40
2020-12-17T13:34:40
196,523,101
4
2
null
null
null
null
UTF-8
Java
false
false
2,687
java
/* * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.xml.transform; /** * This interface is primarily for the purposes of reporting where * an error occurred in the XML source or transformation instructions. */ public interface SourceLocator { /** * Return the public identifier for the current document event. * * <p>The return value is the public identifier of the document * entity or of the external parsed entity in which the markup that * triggered the event appears.</p> * * @return A string containing the public identifier, or null if none is available. * @see #getSystemId */ public String getPublicId(); /** * Return the system identifier for the current document event. * * <p>The return value is the system identifier of the document * entity or of the external parsed entity in which the markup that * triggered the event appears.</p> * * <p>If the system identifier is a URL, the parser must resolve it * fully before passing it to the application.</p> * * @return A string containing the system identifier, or null if none is available. * @see #getPublicId */ public String getSystemId(); /** * Return the line number where the current document event ends. * * <p><strong>Warning:</strong> The return value from the method * is intended only as an approximation for the sake of error * reporting; it is not intended to provide sufficient information * to edit the character content of the original XML document.</p> * * <p>The return value is an approximation of the line number * in the document entity or external parsed entity where the * markup that triggered the event appears.</p> * * @return The line number, or -1 if none is available. * @see #getColumnNumber */ public int getLineNumber(); /** * Return the character position where the current document event ends. * * <p><strong>Warning:</strong> The return value from the method * is intended only as an approximation for the sake of error * reporting; it is not intended to provide sufficient information * to edit the character content of the original XML document.</p> * * <p>The return value is an approximation of the column number * in the document entity or external parsed entity where the * markup that triggered the event appears.</p> * * @return The column number, or -1 if none is available. * @see #getLineNumber */ public int getColumnNumber(); }
[ "yueny09@163.com" ]
yueny09@163.com
94aebe108845d2282775f6d98575b2c7d6d49dd8
07399d93a482f7565a97e69d8b9197ad25adf688
/com.astra.ses.spell.gui.procs/src/com/astra/ses/spell/gui/procs/interfaces/model/ICodeModel.java
cb4b5da1a7b6374d950b370aefaeeee01500d775
[]
no_license
CalypsoCubesat/SPELL-GUI-4.0.2-SRC
1fda020fb3edc11f5ad2fd59ba1c5cea5b0c1074
a171a26ea9413c9787f0c7b4e98aeb8c2ab378ab
refs/heads/master
2020-08-29T07:26:22.789627
2019-10-28T04:34:16
2019-10-28T04:34:16
217,966,403
0
0
null
null
null
null
UTF-8
Java
false
false
1,814
java
package com.astra.ses.spell.gui.procs.interfaces.model; import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; import com.astra.ses.spell.gui.core.model.types.BreakpointType; public interface ICodeModel { /************************************************************************** * *************************************************************************/ public String getCodeId(); /************************************************************************** * *************************************************************************/ public ICodeLine getLine(int lineNo); /************************************************************************** * *************************************************************************/ public List<ICodeLine> getLines(); /************************************************************************** * *************************************************************************/ public void initialize(IProgressMonitor monitor); /************************************************************************** * *************************************************************************/ public void clearNotifications(); /************************************************************************** * *************************************************************************/ public void reset(); /************************************************************************** * *************************************************************************/ public void clearBreakpoints(); /************************************************************************** * *************************************************************************/ public void setBreakpoint(int lineNo, BreakpointType type); }
[ "matthew.travis@aresinstitute.org" ]
matthew.travis@aresinstitute.org
d21ea5f99aee0434479fa5e294c3b67f9fd329b1
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/2.4.5/code/base/clustered-iBatis-2.2.0/tests.system/com/tctest/domain/CustomerDAO.java
3350fc7557549d2038d39a0cd4137d0c6f8f6d33
[]
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
286
java
package com.tctest.domain; import com.ibatis.dao.client.Dao; import com.ibatis.dao.client.DaoManager; public interface CustomerDAO extends Dao { public int insertCustomer(Customer customer); public Customer selectCustomer(int customerId); public DaoManager getDaoManager(); }
[ "hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864
c647eaac01fcdc427729657436744e905173f7ab
5bc9d8f92f38967cc9ecc03000c0606dbbb38f74
/sca4j/tests/tags/0.1.1/test-jpa-core/src/test/java/org/sca4j/jpa/provider/ThirdPersistenceUnitTest.java
4e1c321c4afddfcd0d4cb42cf720a8538e522fa3
[]
no_license
codehaus/service-conduit
795332fad474e12463db22c5e57ddd7cd6e2956e
4687d4cfc16f7a863ced69ce9ca81c6db3adb6d2
refs/heads/master
2023-07-20T00:35:11.240347
2011-08-24T22:13:28
2011-08-24T22:13:28
36,342,601
2
0
null
null
null
null
UTF-8
Java
false
false
1,416
java
/* * SCA4J * Copyright (c) 2008-2012 Service Symphony Limited * * This proprietary software may be used only in connection with the SCA4J license * (the ?License?), a copy of which is included in the software or may be obtained * at: http://www.servicesymphony.com/licenses/license.html. * * Software distributed under the License is distributed on an as is basis, without * warranties or conditions of any kind. See the License for the specific language * governing permissions and limitations of use of the software. This software is * distributed in conjunction with other software licensed under different terms. * See the separate licenses for those programs included in the distribution for the * permitted and restricted uses of such software. * */ package org.sca4j.jpa.provider; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.PersistenceUnit; import junit.framework.TestCase; /** * @version $Revision: 2755 $ $Date: 2008-02-13 08:02:41 +0000 (Wed, 13 Feb 2008) $ */ public class ThirdPersistenceUnitTest extends TestCase { private EntityManagerFactory emf; @PersistenceUnit(unitName="employeeUnitThree") public void setEmfOne(EntityManagerFactory emf) { this.emf = emf; } public void testEmfExists() { EntityManager em = emf.createEntityManager(); assertNotNull(em); } }
[ "meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e" ]
meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e
b7e9b97626ca0adc14e6d0a7efe2371d9aa5e7ff
0ceafc2afe5981fd28ce0185e0170d4b6dbf6241
/AlgoKit (3rdp)/Code-store v1.0/yaal/lib/test/on2012_01/on2012_0_31/monsterfarm/Main.java
db73c05f5cbc23b41588d69786a0da390268d6bc
[]
no_license
brainail/.happy-coooding
1cd617f6525367133a598bee7efb9bf6275df68e
cc30c45c7c9b9164095905cc3922a91d54ecbd15
refs/heads/master
2021-06-09T02:54:36.259884
2021-04-16T22:35:24
2021-04-16T22:35:24
153,018,855
2
1
null
null
null
null
UTF-8
Java
false
false
540
java
package on2012_01.on2012_0_31.monsterfarm; import net.egork.chelper.tester.TopCoderTester; import org.junit.Assert; import org.junit.Test; public class Main { @Test public void test() throws Exception { if (!TopCoderTester.test("int numMonsters(String[] transforms)", "on2012_01.on2012_0_31.monsterfarm.MonsterFarm", "1;;1;;true::1 1;;-1;;true::2,3,1;;1;;true::1,3 4,2,2;;1;;true::2 2,3,4 4 4,5,6,7 7 7 7,7;;24;;true::2 3,5 7,2 4,5,6,4,7;;5;;true::2 3 4,3,4,2;;3;;true::1 2 3 4,2,3,4;;-1;;true")) { Assert.fail(); } } }
[ "wsemirz@gmail.com" ]
wsemirz@gmail.com
74faebf22dffc9d4a212065f2161a16e5a87add0
5ee0c4e14ad16de059f84b380b76ea4f50d70229
/app/src/main/java/org/robobinding/albumsample/presentationmodel/AlbumItemPresentationModel.java
4b07db0d20bc7bcacac3473ca7d3f764bd47fbbc
[ "Apache-2.0" ]
permissive
WilliamRen/RoboBinding-album-sample
3eaed33a58a01f4c29aeaa387bdfb4ac478b66e3
3cc585a6ce614d4b0c006bafe82379d373ad8741
refs/heads/master
2021-01-15T13:37:09.655498
2014-09-18T14:52:00
2014-09-18T14:52:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
558
java
package org.robobinding.albumsample.presentationmodel; import org.robobinding.albumsample.model.Album; import org.robobinding.itempresentationmodel.ItemPresentationModel; /** * * @since 1.0 * @author Robert Taylor */ public class AlbumItemPresentationModel implements ItemPresentationModel<Album> { protected Album album; public String getTitle() { return album.getTitle(); } public String getArtist() { return album.getArtist(); } @Override public void updateData(int index, Album bean) { this.album = bean; } }
[ "weicheng112@gmail.com" ]
weicheng112@gmail.com
bb6bfb1ac910f07f6ee026a33b1d983a40f0861b
d15f0d388d41e00f146e6c0d5c55e2282ada2af4
/LIgnorance/src/main/java/com/livelearn/ignorance/model/db/dbhelper/DiseaseDBHelper.java
61ffb66976f64298db5ad8186ba6d1e642a08101
[]
no_license
FPhoenixCorneaE/Ignorance
0ed600d128918c01590c4e236939e185a9d05bce
8737327768d1ab9e5010f6ecca0f3347bae7cbdd
refs/heads/master
2021-08-07T22:35:50.683896
2021-06-16T03:45:01
2021-06-16T03:45:01
95,649,709
2
1
null
null
null
null
UTF-8
Java
false
false
5,401
java
package com.livelearn.ignorance.model.db.dbhelper; import com.livelearn.ignorance.model.db.GreenDaoManager; import com.livelearn.ignorance.model.db.dbdao.DiseaseDao; import com.livelearn.ignorance.model.db.dbentity.Department; import com.livelearn.ignorance.model.db.dbentity.Disease; import java.util.ArrayList; import java.util.List; public class DiseaseDBHelper { private volatile static DiseaseDBHelper mInstance; private DiseaseDBHelper() { } /** * ้ฅฟๆฑ‰ๅผๅ•ไพ‹ๆจกๅผ */ public static DiseaseDBHelper getInstance() { if (mInstance == null) { synchronized (DiseaseDBHelper.class) { if (mInstance == null) { mInstance = new DiseaseDBHelper(); } } } return mInstance; } /** * ๆ นๆฎ็–พ็—…ๅๆŸฅ่ฏขๅฏนๅบ”็š„id * * @param diseaseName ็–พ็—…ๅ * @return Diseaseid */ public String queryDiseaseIdByDiseaseName(String diseaseName) { List<Disease> diseaseList = GreenDaoManager.getInstance().getSession().getDiseaseDao().queryBuilder().where(DiseaseDao.Properties.Disease_name.eq(diseaseName)).list(); return !diseaseList.isEmpty() ? diseaseList.get(0).getDisease_id() : ""; } /** * ๆ นๆฎ็–พ็—…id่Žทๅพ—ๅฏนๅบ”็–พ็—…ๅฎžไฝ“ * * @param diseaseId ็–พ็—…id * @return ็–พ็—…ๅฎžไฝ“ */ public Disease queryDiseaseByDiseaseId(String diseaseId) { List<Disease> diseaseList = GreenDaoManager.getInstance().getSession().getDiseaseDao().queryBuilder().where(DiseaseDao.Properties.Disease_id.eq(diseaseId)).list(); return !diseaseList.isEmpty() ? diseaseList.get(0) : null; } /** * ๆ นๆฎ็ง‘ๅฎคid่Žทๅ–็–พ็—…ๅฎžไฝ“ๅˆ—่กจ * * @param departmentId ็ง‘ๅฎคid * @return ็–พ็—…ๅฎžไฝ“ๅˆ—่กจ */ public List<Disease> queryDiseaseListByDepartmentId(String departmentId) { List<Disease> diseaseList = GreenDaoManager.getInstance().getSession().getDiseaseDao().queryBuilder().where(DiseaseDao.Properties.Dept_id.eq(departmentId)).list(); List<Disease> diseases = new ArrayList<>(); //็–พ็—…ๅ็งฐๅฏ่ƒฝไผš้‡ๅค List<String> diseaseNameList = new ArrayList<>(); for (Disease disease : diseaseList) { if (!diseaseNameList.contains(disease.getDisease_name())) { diseaseNameList.add(disease.getDisease_name()); diseases.add(disease); } } return diseases; } /** * ่Žทๅ–Disease่กจไธญๆ‰€ๆœ‰็š„็ง‘ๅฎคid */ public List<String> queryAllDepartmentId() { List<Disease> diseaseList = GreenDaoManager.getInstance().getSession().getDiseaseDao().queryBuilder().list(); List<String> diseaseIdList = new ArrayList<>(); for (Disease disease : diseaseList) { if (!diseaseIdList.contains(disease.getDept_id())) { diseaseIdList.add(disease.getDept_id()); } } return diseaseIdList; } /** * ๆŸฅ่ฏขๆ‰€ๆœ‰็–พ็—… */ public List<Disease> queryAllDisease() { List<Disease> diseaseList = GreenDaoManager.getInstance().getSession().getDiseaseDao().queryBuilder().list(); List<Disease> diseases = new ArrayList<>(); List<String> diseaseNameList = new ArrayList<>(); for (Disease disease : diseaseList) { if (!diseaseNameList.contains(disease.getDisease_name())) { diseaseNameList.add(disease.getDisease_name()); diseases.add(disease); } } return diseases; } /** * ๆ นๆฎๅ…ณ้”ฎๅญ—ๆจก็ณŠๆŸฅ่ฏข็–พ็—… */ public List<String> queryDiseaseNameListByKeyword(String keyword) { List<Disease> diseaseList = GreenDaoManager.getInstance().getSession().getDiseaseDao().queryBuilder().where(DiseaseDao.Properties.Disease_name.like("%" + keyword + "%")).list(); List<String> diseaseNameList = new ArrayList<>(); for (Disease disease : diseaseList) { if (!diseaseNameList.contains(disease.getDisease_name())) { diseaseNameList.add(disease.getDisease_name()); } } return diseaseNameList; } /** * ๆ นๆฎ็–พ็—…id่Žทๅ–ๅฏนๅบ”ไบŒ็บง็ง‘ๅฎคๅ็งฐ */ public String querySubDepartmentNameByDiseaseId(String diseaseId) { List<Disease> diseaseList = GreenDaoManager.getInstance().getSession().getDiseaseDao().queryBuilder().where(DiseaseDao.Properties.Disease_id.eq(diseaseId)).list(); String subDepartmentName = ""; if (!diseaseList.isEmpty()) { Department department = DepartmentDBHelper.getInstance().queryDepartmentByDepartmentId(diseaseList.get(0).getDept_id()); if (department != null) { return department.getSub_dept_name(); } } return subDepartmentName; } /** * ๆ นๆฎ็–พ็—…ๅๅ’Œ็ง‘ๅฎคid่Žทๅ–็–พ็—…ๅฎžไฝ“็ฑป */ public Disease queryDiseaseByDiseaseNameAndDeptId(String diseaseName, String departmentId) { List<Disease> diseaseList = GreenDaoManager.getInstance().getSession().getDiseaseDao().queryBuilder().where(DiseaseDao.Properties.Disease_name.eq(diseaseName)).where(DiseaseDao.Properties.Dept_id.eq(departmentId)).list(); return !diseaseList.isEmpty() ? diseaseList.get(0) : null; } }
[ "wangkz@digi123.cn" ]
wangkz@digi123.cn
df8bc39d79f821ed639d107873584699eb126115
3807fb9fdf1756a55ed2525186c6ade3bf411219
/src/main/lib/com/feed_the_beast/ftbl/lib/guide/GuideTitlePage.java
f55d131e2d380deed78862c028a9add2473fe6a8
[]
no_license
TartaricAcid/FTBLib
02328942f4d13aacb00216eb285fb4f5545d984c
3c4e7772c693e4b02d3afdd521335c87bffcf3ab
refs/heads/1.9
2020-03-26T19:31:03.988051
2017-06-12T00:00:50
2017-06-12T00:00:50
68,087,520
0
0
null
2016-09-13T07:56:33
2016-09-13T07:56:33
null
UTF-8
Java
false
false
3,176
java
package com.feed_the_beast.ftbl.lib.guide; import com.feed_the_beast.ftbl.api.guide.GuideFormat; import com.feed_the_beast.ftbl.api.guide.GuideType; import com.feed_the_beast.ftbl.api.guide.SpecialGuideButton; import com.feed_the_beast.ftbl.lib.client.ImageProvider; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentTranslation; import net.minecraftforge.fml.common.ModContainer; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; /** * @author LatvianModder */ public class GuideTitlePage extends GuidePage { private final GuideType type; private final GuideFormat format; private final List<String> authors; private final List<String> guideAuthors; public GuideTitlePage(String id, GuideType t, Collection<String> _authors, Collection<String> _guideAuthors) { super(id); type = t; format = GuideFormat.JSON; authors = _authors.isEmpty() ? Collections.emptyList() : new ArrayList<>(_authors); guideAuthors = _guideAuthors.isEmpty() ? Collections.emptyList() : new ArrayList<>(_guideAuthors); } public GuideTitlePage(ModContainer mod) { this(mod.getModId(), GuideType.MOD, mod.getMetadata().authorList, Collections.singleton("Autogenerated")); if(!mod.getMetadata().description.isEmpty()) { for(String s : mod.getMetadata().description.split("\n")) { println(s); } } setTitle(new TextComponentString(mod.getName())); } public GuideTitlePage(String id, JsonObject o) { super(id); setTitle(new TextComponentTranslation(id + ".guide")); if(o.has("icon")) { setIcon(ImageProvider.get(o.get("icon"))); } else { setIcon(ImageProvider.get(id + ":textures/icon.png")); } if(o.has("button")) { addSpecialButton(new SpecialGuideButton(o.get("button").getAsJsonObject())); } type = o.has("type") ? GuideType.getFromString(o.get("type").getAsString()) : GuideType.OTHER; format = o.has("format") ? GuideFormat.getFromString(o.get("format").getAsString()) : GuideFormat.JSON; List<String> l = new ArrayList<>(); for(JsonElement e : o.get("authors").getAsJsonArray()) { l.add(e.getAsString()); } authors = Collections.unmodifiableList(l); l = new ArrayList<>(); if(o.has("guide_authors")) { for(JsonElement e : o.get("guide_authors").getAsJsonArray()) { l.add(e.getAsString()); } } guideAuthors = Collections.unmodifiableList(l); } public GuideType getType() { return type; } public GuideFormat getFormat() { return format; } public List<String> getAuthors() { return authors; } public List<String> getGuideAuthors() { return guideAuthors; } }
[ "latvianmodder@gmail.com" ]
latvianmodder@gmail.com
33704080e36694b6854de2c9ed119cf8a35cc56b
bf1c305666549d0f317f8bc61c3dcfc669b9766f
/src/main/java/nl/lakedigital/djfc/domain/particulier/ZorgVerzekering.java
f4505fd62bd86b8cef42d0f789b77d8be7d38eb9
[]
no_license
pheidotting/DJFC-PolisAdministratie
111c7f7767f5f3e64d04e46ecce841c90dd063ff
78046c3f0126533dc1134ee5a4539f870e5e9317
refs/heads/master
2021-01-10T05:35:54.625240
2017-10-31T21:03:25
2017-10-31T21:03:25
55,436,422
0
0
null
2017-11-01T06:03:24
2016-04-04T18:50:15
Java
UTF-8
Java
false
false
1,188
java
package nl.lakedigital.djfc.domain.particulier; import nl.lakedigital.djfc.domain.Polis; import nl.lakedigital.djfc.domain.SoortEntiteit; import nl.lakedigital.djfc.domain.SoortVerzekering; import org.springframework.stereotype.Component; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.Table; //@Audited @Component @Entity @Table(name = "POLIS") @DiscriminatorValue(value = "Z") public class ZorgVerzekering extends Polis { public ZorgVerzekering() { } public ZorgVerzekering(SoortEntiteit soortEntiteit, Long entiteitId) { super(soortEntiteit, entiteitId); } @Override public SoortVerzekering getSoortVerzekering() { return SoortVerzekering.PARTICULIER; } @Override public String getSchermNaam() { String pakket = this.getClass().getPackage().toString().replace("package ", "") + "."; return this.getClass().getCanonicalName().replace("Verzekering", "").replace(pakket, ""); } @Override public ZorgVerzekering nieuweInstantie(SoortEntiteit soortEntiteit, Long entiteitId) { return new ZorgVerzekering(soortEntiteit,entiteitId); } }
[ "patrick@lakedigital.nl" ]
patrick@lakedigital.nl
c0e95418a73dca3363753d4f4994489cc41ede8a
208ba847cec642cdf7b77cff26bdc4f30a97e795
/aj/ac/src/main/java/org.wp.ac/models/ReaderTag.java
82de7d0a4098e4bba9f5ffb1df73922046e31e38
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
7,034
java
package org.wp.ac.models; import android.text.TextUtils; import org.wp.ac.ui.reader.utils.ReaderUtils; import org.wp.ac.util.StringUtils; import java.io.Serializable; import java.util.regex.Pattern; public class ReaderTag implements Serializable, FilterCriteria { private String tagSlug; // tag for API calls private String tagDisplayName; // tag for display, usually the same as the slug private String tagTitle; // title, used for default tags private String endpoint; // endpoint for updating posts with this tag public final ReaderTagType tagType; // these are the default tags, which aren't localized in the /read/menu/ response private static final String TAG_TITLE_LIKED = "Posts I Like"; private static final String TAG_TITLE_DISCOVER = "Discover"; public static final String TAG_TITLE_DEFAULT = TAG_TITLE_DISCOVER; public static final String TAG_TITLE_FOLLOWED_SITES = "Followed Sites"; public ReaderTag(String slug, String displayName, String title, String endpoint, ReaderTagType tagType) { // we need a slug since it's used to uniquely ID the tag (including setting it as the // primary key in the tag table) if (TextUtils.isEmpty(slug)) { if (!TextUtils.isEmpty(title)) { setTagSlug(ReaderUtils.sanitizeWithDashes(title)); } else { setTagSlug(getTagSlugFromEndpoint(endpoint)); } } else { setTagSlug(slug); } setTagDisplayName(displayName); setTagTitle(title); setEndpoint(endpoint); this.tagType = tagType; } public String getEndpoint() { return StringUtils.notNullStr(endpoint); } private void setEndpoint(String endpoint) { this.endpoint = StringUtils.notNullStr(endpoint); } public String getTagTitle() { return StringUtils.notNullStr(tagTitle); } private void setTagTitle(String title) { this.tagTitle = StringUtils.notNullStr(title); } private boolean hasTagTitle() { return !TextUtils.isEmpty(tagTitle); } public String getTagDisplayName() { return StringUtils.notNullStr(tagDisplayName); } private void setTagDisplayName(String displayName) { this.tagDisplayName = StringUtils.notNullStr(displayName); } public String getTagSlug() { return StringUtils.notNullStr(tagSlug); } private void setTagSlug(String slug) { this.tagSlug = StringUtils.notNullStr(slug); } /* * returns the tag name for use in the application log - if this is a default tag it returns * the full tag name, otherwise it abbreviates the tag name since exposing followed tags * in the log could be considered a privacy issue */ public String getTagNameForLog() { String tagSlug = getTagSlug(); if (tagType == ReaderTagType.DEFAULT) { return tagSlug; } else if (tagSlug.length() >= 6) { return tagSlug.substring(0, 3) + "..."; } else if (tagSlug.length() >= 4) { return tagSlug.substring(0, 2) + "..."; } else if (tagSlug.length() >= 2) { return tagSlug.substring(0, 1) + "..."; } else { return "..."; } } /* * used to ensure a tag name is valid before adding it */ private static final Pattern INVALID_CHARS = Pattern.compile("^.*[~#@*+%{}<>\\[\\]|\"\\_].*$"); public static boolean isValidTagName(String tagName) { return !TextUtils.isEmpty(tagName) && !INVALID_CHARS.matcher(tagName).matches(); } /* * extracts the tag slug from a valid read/tags/[tagSlug]/posts endpoint */ private static String getTagSlugFromEndpoint(final String endpoint) { if (TextUtils.isEmpty(endpoint)) return ""; // make sure passed endpoint is valid if (!endpoint.endsWith("/posts")) return ""; int start = endpoint.indexOf("/read/tags/"); if (start == -1) return ""; // skip "/read/tags/" then find the next "/" start += 11; int end = endpoint.indexOf("/", start); if (end == -1) return ""; return endpoint.substring(start, end); } /* * is the passed string one of the default tags? */ public static boolean isDefaultTagTitle(String title) { if (TextUtils.isEmpty(title)) { return false; } return (title.equalsIgnoreCase(TAG_TITLE_FOLLOWED_SITES) || title.equalsIgnoreCase(TAG_TITLE_DISCOVER) || title.equalsIgnoreCase(TAG_TITLE_LIKED)); } public static boolean isSameTag(ReaderTag tag1, ReaderTag tag2) { if (tag1 == null || tag2 == null) { return false; } return tag1.tagType == tag2.tagType && tag1.getTagSlug().equalsIgnoreCase(tag2.getTagSlug()); } public boolean isPostsILike() { return tagType == ReaderTagType.DEFAULT && getEndpoint().endsWith("/read/liked"); } public boolean isFollowedSites() { return tagType == ReaderTagType.DEFAULT && getEndpoint().endsWith("/read/following"); } public boolean isDiscover() { return tagType == ReaderTagType.DEFAULT && getTagSlug().equals(TAG_TITLE_DISCOVER); } public boolean isTagTopic() { String endpoint = getEndpoint(); return endpoint.toLowerCase().contains("/read/tags/"); } public boolean isListTopic() { String endpoint = getEndpoint(); return endpoint.toLowerCase().contains("/read/list/"); } /* * the label is the text displayed in the dropdown filter */ @Override public String getLabel() { if (tagType == ReaderTagType.DEFAULT) { return getTagTitle(); } else if (isTagDisplayNameAlphaNumeric()) { return getTagDisplayName().toLowerCase(); } else if (hasTagTitle()) { return getTagTitle(); } else { return getTagDisplayName(); } } /* * returns true if the tag display name contains only alpha-numeric characters or hyphens */ private boolean isTagDisplayNameAlphaNumeric() { if (TextUtils.isEmpty(tagDisplayName)) { return false; } for (int i=0; i < tagDisplayName.length(); i++) { char c = tagDisplayName.charAt(i); if (!Character.isLetterOrDigit(c) && c != '-') { return false; } } return true; } @Override public boolean equals(Object object){ if (object instanceof ReaderTag) { ReaderTag tag = (ReaderTag) object; return (tag.tagType == this.tagType && tag.getLabel().equals(this.getLabel())); } else { return false; } } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
28711bc86267ee3949dd9621dfbcb63e52db3110
2d4f089cbae649ebbe1d4c9c4a17ac46862d63f9
/src/main/java/com/ivoronline/entity_entity/repositories/PersonRepository.java
6915558d43e8ef69b850d9ddeed9f1cb843ec2e7
[]
no_license
ivoronline/entity_entity
590d092a28eccd9a33265054b76b4a888900a677
58b4f4a6dcee9829bb355fb9b075891196791081
refs/heads/master
2023-02-27T23:39:59.856043
2021-02-02T10:18:34
2021-02-02T10:18:34
335,248,155
0
0
null
null
null
null
UTF-8
Java
false
false
255
java
package com.ivoronline.entity_entity.repositories; import com.ivoronline.entity_entity.entities.PersonEntity; import org.springframework.data.repository.CrudRepository; public interface PersonRepository extends CrudRepository<PersonEntity, Integer> { }
[ "ivoronline@gmail.com" ]
ivoronline@gmail.com
e09d38b65de53b1cc1527dacc1a40231021a35a3
18cfb24c4914acd5747e533e88ce7f3a52eee036
/src/main/jdk8/javax/swing/plaf/multi/MultiToolTipUI.java
0028454f4cb27d3d1f5f10d4a48ede2be4741430
[]
no_license
douguohai/jdk8-code
f0498e451ec9099e4208b7030904e1b4388af7c5
c8466ed96556bfd28cbb46e588d6497ff12415a0
refs/heads/master
2022-12-19T03:10:16.879386
2020-09-30T05:43:20
2020-09-30T05:43:20
273,399,965
0
0
null
null
null
null
UTF-8
Java
false
false
6,635
java
/* * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing.plaf.multi; import java.util.Vector; import javax.swing.plaf.ToolTipUI; import javax.swing.plaf.ComponentUI; import javax.swing.JComponent; import java.awt.Graphics; import java.awt.Dimension; import javax.accessibility.Accessible; /** * A multiplexing UI used to combine <code>ToolTipUI</code>s. * * <p>This file was automatically generated by AutoMulti. * * @author Otto Multey */ public class MultiToolTipUI extends ToolTipUI { /** * The vector containing the real UIs. This is populated * in the call to <code>createUI</code>, and can be obtained by calling * the <code>getUIs</code> method. The first element is guaranteed to be the real UI * obtained from the default look and feel. */ protected Vector uis = new Vector(); //////////////////// // Common UI methods //////////////////// /** * Returns the list of UIs associated with this multiplexing UI. This * allows processing of the UIs by an application aware of multiplexing * UIs on components. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } //////////////////// // ToolTipUI methods //////////////////// //////////////////// // ComponentUI methods //////////////////// /** * Invokes the <code>contains</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */ public boolean contains(JComponent a, int b, int c) { boolean returnValue = ((ComponentUI) (uis.elementAt(0))).contains(a,b,c); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).contains(a,b,c); } return returnValue; } /** * Invokes the <code>update</code> method on each UI handled by this object. */ public void update(Graphics a, JComponent b) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).update(a,b); } } /** * Returns a multiplexing UI instance if any of the auxiliary * <code>LookAndFeel</code>s supports this UI. Otherwise, just returns the * UI object obtained from the default <code>LookAndFeel</code>. */ public static ComponentUI createUI(JComponent a) { ComponentUI mui = new MultiToolTipUI(); return MultiLookAndFeel.createUIs(mui, ((MultiToolTipUI) mui).uis, a); } /** * Invokes the <code>installUI</code> method on each UI handled by this object. */ public void installUI(JComponent a) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).installUI(a); } } /** * Invokes the <code>uninstallUI</code> method on each UI handled by this object. */ public void uninstallUI(JComponent a) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).uninstallUI(a); } } /** * Invokes the <code>paint</code> method on each UI handled by this object. */ public void paint(Graphics a, JComponent b) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).paint(a,b); } } /** * Invokes the <code>getPreferredSize</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */ public Dimension getPreferredSize(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getPreferredSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getPreferredSize(a); } return returnValue; } /** * Invokes the <code>getMinimumSize</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */ public Dimension getMinimumSize(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getMinimumSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getMinimumSize(a); } return returnValue; } /** * Invokes the <code>getMaximumSize</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */ public Dimension getMaximumSize(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getMaximumSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getMaximumSize(a); } return returnValue; } /** * Invokes the <code>getAccessibleChildrenCount</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */ public int getAccessibleChildrenCount(JComponent a) { int returnValue = ((ComponentUI) (uis.elementAt(0))).getAccessibleChildrenCount(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getAccessibleChildrenCount(a); } return returnValue; } /** * Invokes the <code>getAccessibleChild</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */ public Accessible getAccessibleChild(JComponent a, int b) { Accessible returnValue = ((ComponentUI) (uis.elementAt(0))).getAccessibleChild(a,b); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getAccessibleChild(a,b); } return returnValue; } }
[ "douguohai@163.com" ]
douguohai@163.com
5dcca21b51ce281acccf89d62eaadd9177e2636e
046da477a4ff3bec99fb7871117d78e0f18167d7
/src/main/java/co/zync/vertx/managers/StorageManager.java
e7de3cc7a79f03ce78c9919c72558a10a0bb06c4
[]
no_license
Zyncco/Java-Vertx-Server
ff1f67961c584b9c18b59f8b87c6d4dd7bacf888
99dd0921e905442366aee68992be9eb3cfefea14
refs/heads/master
2021-01-18T20:22:53.420123
2017-08-26T23:32:26
2017-08-26T23:32:26
86,959,976
0
0
null
null
null
null
UTF-8
Java
false
false
983
java
package co.zync.vertx.managers; import com.google.cloud.storage.Bucket; import com.google.cloud.storage.Storage; import com.google.cloud.storage.StorageOptions; public class StorageManager { private static StorageManager ourInstance = new StorageManager(); public static StorageManager getInstance(){ return ourInstance; } private final Storage storage; private final Bucket bucket; private StorageManager(){ this.storage = StorageOptions.newBuilder() .setProjectId(CredentialsManager.getInstance().getProjectId()) .setCredentials(CredentialsManager.getInstance().getGoogleCredentials()) .build() .getService(); this.bucket = this.storage.get(CredentialsManager.getInstance().getBucketName()); } public Storage getStorage(){ return storage; } public Bucket getBucket(){ return bucket; } }
[ "vilsol2000@gmail.com" ]
vilsol2000@gmail.com
165cc8cf108be244a2c1b4df36e5a101051e93c8
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_partial/12747342.java
f5da4e95cd8b3f362611a28ef7dbc8801b3cf215
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
508
java
class c12747342 { public void bubbleSort(final int[] s) { source = s; if (source.length < 2) return; boolean go = true; while (go) { go = false; for (int i = 0; i < source.length - 1; i++) { int temp = source[i]; if (temp > source[i + 1]) { source[i] = source[i + 1]; source[i + 1] = temp; go = true; } } } } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
e5c54e309a9c711330ff6ad6fdf82f3adb0bf40f
f4375449027462f5767774945ae79e4a1694af4d
/src/main/java/mods/immibis/redlogic/chips/ingame/RenderTileChipCompiler.java
1f054378b435c77befbff3a0f439ec67b13460f2
[ "MIT" ]
permissive
asiekierka/RedLogic-asie
fca054425e804f89f5309b18c2d3e8e95410cbfa
f2baacdb039072e561663ccbb09751df9b984b26
refs/heads/main
2021-01-19T07:44:07.058604
2015-07-24T08:57:54
2020-12-30T14:56:59
35,234,377
3
4
null
null
null
null
UTF-8
Java
false
false
2,449
java
package mods.immibis.redlogic.chips.ingame; import org.lwjgl.opengl.GL11; import mods.immibis.core.RenderUtilsIC; import mods.immibis.core.api.util.Dir; import mods.immibis.redlogic.RotatedTessellator; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; public class RenderTileChipCompiler extends TileEntitySpecialRenderer { RotatedTessellator rt = new RotatedTessellator(); @Override public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { int visualState = ((TileChipCompiler)tileentity).visualState; if(visualState == 0) return; rt.base = Tessellator.instance; rt.flipped = false; rt.front = ((TileChipCompiler)tileentity).front ^ 1; rt.side = Dir.NY; rt.x = d0; rt.y = d1; rt.z = d2; GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_LIGHTING); GL11.glColor3f(1, 1, 1); RenderUtilsIC.setBrightness(tileentity.getWorldObj(), tileentity.xCoord, tileentity.yCoord, tileentity.zCoord); if((visualState & 1) != 0) { // schematic is inserted Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("redlogic", "textures/items/schematic.png")); double y = 13.5 / 16; double minx = 2.0 / 16; double maxx = 14.0 / 16; double minz = 0.5; double maxz = minz + (maxx - minx); rt.base.startDrawingQuads(); rt.addVertexWithUV(maxx, y, maxz, 0, 0); rt.addVertexWithUV(maxx, y, minz, 1, 0); rt.addVertexWithUV(minx, y, minz, 1, 1); rt.addVertexWithUV(minx, y, maxz, 0, 1); rt.base.draw(); } if((visualState & 2) != 0) { // photomask is inserted Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("redlogic", "textures/items/photomask.png")); double y = 11.5 / 16; double minx = 2.0 / 16; double maxx = 14.0 / 16; double minz = 0.5; double maxz = minz + (maxx - minx); rt.base.startDrawingQuads(); rt.addVertexWithUV(maxx, y, maxz, 0, 0); rt.addVertexWithUV(maxx, y, minz, 1, 0); rt.addVertexWithUV(minx, y, minz, 1, 1); rt.addVertexWithUV(minx, y, maxz, 0, 1); rt.base.draw(); } GL11.glEnable(GL11.GL_CULL_FACE); } }
[ "kontakt@asie.pl" ]
kontakt@asie.pl
5193ee8f539196d9eee2dfa2b3b28a27a73eeffd
b61cfd8d0eb8fc6d4423e980c682af78383993eb
/vehicle-compliance/src/main/java/uk/gov/caz/vcc/dto/ComplianceResultsDto.java
fe4459efe76ce42adeb3ea5747baeea97029e248
[ "OGL-UK-3.0" ]
permissive
DEFRA/clean-air-zones-api
984e6ba7d16cc484e74dd57b1fab6150e230ce1c
e6437781ff5dc71b01ffce9fd6f8bec2226ee0a6
refs/heads/master
2023-07-24T13:59:03.152029
2021-05-06T16:24:20
2021-05-06T16:24:20
232,327,284
0
2
NOASSERTION
2023-07-13T17:02:58
2020-01-07T13:10:59
Java
UTF-8
Java
false
false
830
java
package uk.gov.caz.vcc.dto; import io.swagger.annotations.ApiModelProperty; import java.util.List; import lombok.Builder; import lombok.Value; /** * A data transport layer object for returning a collection of * compliance results to external callers. */ @Value @Builder public class ComplianceResultsDto { @ApiModelProperty(value = "${swagger.model.descriptions.complianceResults.registationNumber}") String registrationNumber; @ApiModelProperty(value = "${swagger.model.descriptions.complianceResults.isRetrofitted}") Boolean isRetrofitted; @ApiModelProperty(value = "${swagger.model.descriptions.complianceResults.isExempt}") Boolean isExempt; @ApiModelProperty(value = "${swagger.model.descriptions.complianceResults.complianceOutcomes}") List<ComplianceOutcomeDto> complianceOutcomes; }
[ "james.cruddas@informed.com" ]
james.cruddas@informed.com
8284bbcba4262f983991542408ba281c2dfa440e
22fe87920e0e34fb7d0853cc60225ce1e92143c1
/jbehave-guice/src/test/java/org/jbehave/core/steps/guice/GuiceStepsFactoryBehaviour.java
f9ac2412398af053de6c78a66c7bca1daf9485eb
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
speedmax123/jbehave-core
f4fb9be484374f8ca34c97a495dbebee212f1619
3bf773606d4d1ca787615985f8bd9bbe980fb948
refs/heads/master
2021-01-22T11:03:59.328762
2018-02-09T08:29:26
2018-02-09T08:29:26
102,344,884
0
0
BSD-3-Clause
2020-11-23T05:26:34
2017-09-04T09:39:22
Java
UTF-8
Java
false
false
3,476
java
package org.jbehave.core.steps.guice; import java.util.List; import org.jbehave.core.annotations.Given; import org.jbehave.core.configuration.MostUsefulConfiguration; import org.jbehave.core.steps.AbstractStepsFactory; import org.jbehave.core.steps.CandidateSteps; import org.jbehave.core.steps.Steps; import org.junit.Test; import com.google.inject.AbstractModule; import com.google.inject.CreationException; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Scopes; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public class GuiceStepsFactoryBehaviour { @Test public void assertThatStepsCanBeCreated() throws NoSuchFieldException, IllegalAccessException { // Given Injector parent = Guice.createInjector(new AbstractModule() { @Override protected void configure() { bind(FooSteps.class).in(Scopes.SINGLETON); } }); AbstractStepsFactory factory = new GuiceStepsFactory(new MostUsefulConfiguration(), parent); // When List<CandidateSteps> steps = factory.createCandidateSteps(); // Then assertFooStepsFound(steps); } @Test public void assertThatStepsWithStepsWithDependencyCanBeCreated() throws NoSuchFieldException, IllegalAccessException { Injector parent = Guice.createInjector(new AbstractModule() { @Override protected void configure() { bind(Integer.class).toInstance(42); bind(FooStepsWithDependency.class).in(Scopes.SINGLETON); } }); // When AbstractStepsFactory factory = new GuiceStepsFactory(new MostUsefulConfiguration(), parent); List<CandidateSteps> steps = factory.createCandidateSteps(); // Then assertFooStepsFound(steps); assertEquals(42, (int) ((FooStepsWithDependency) stepsInstance(steps.get(0))).integer); } private void assertFooStepsFound(List<CandidateSteps> steps) throws NoSuchFieldException, IllegalAccessException { assertEquals(1, steps.size()); assertTrue(steps.get(0) instanceof CandidateSteps); Object instance = stepsInstance(steps.get(0)); assertTrue(instance instanceof FooSteps); } private Object stepsInstance(CandidateSteps candidateSteps) { return ((Steps)candidateSteps).instance(); } @Test(expected=CreationException.class) public void assertThatStepsWithMissingDependenciesCannotBeCreated() throws NoSuchFieldException, IllegalAccessException { Injector parent = Guice.createInjector(new AbstractModule() { @Override protected void configure() { bind(FooStepsWithDependency.class); } }); AbstractStepsFactory factory = new GuiceStepsFactory(new MostUsefulConfiguration(), parent); // When factory.createCandidateSteps(); // Then ... expected exception is thrown } public static class FooSteps { @Given("a step with a $param") public void aStepWithAParam(String param) { } } public static class FooStepsWithDependency extends FooSteps { private final Integer integer; @Inject public FooStepsWithDependency(Integer steps) { this.integer = steps; } } }
[ "mauro.talevi@aquilonia.org" ]
mauro.talevi@aquilonia.org
b3a538850308c78f6af9d9dfbd4a8a4994805ee3
096b557af3b68947cb31685221f14d911e84f918
/src/net/mindview/containers/RandomBounds.java
318a623d2c944e5a9d163de28e6f130f5631daef
[]
no_license
kuchikigit/SrcCodes
34d84eaca5a970143489c969d7063c88453bb19f
feb3198a382d106e37d6d34da9452ddf3482c6d3
refs/heads/master
2021-01-20T19:05:23.083737
2016-08-10T12:13:35
2016-08-10T12:13:35
63,997,411
0
0
null
null
null
null
UTF-8
Java
false
false
709
java
package net.mindview.containers; //: containers/RandomBounds.java // Does Math.random() produce 0.0 and 1.0? // {RunByHand} import static net.mindview.util.Print.*; public class RandomBounds { static void usage() { print("Usage:"); print("\tRandomBounds lower"); print("\tRandomBounds upper"); System.exit(1); } public static void main(String[] args) { if(args.length != 1) usage(); if(args[0].equals("lower")) { while(Math.random() != 0.0) ; // Keep trying print("Produced 0.0!"); } else if(args[0].equals("upper")) { while(Math.random() != 1.0) ; // Keep trying print("Produced 1.0!"); } else usage(); } } ///:~
[ "rainy.kuchiki@yahoo.com" ]
rainy.kuchiki@yahoo.com
20e33c30977f8ebe0556b99b87dbb7d79f579b80
cb6af9407c5f043d70ddb71653ba77a6cdbbe034
/src/main/java/pl/pronux/sokker/downloader/managers/ReportsXmlManager.java
b19baeed57b2719e8464d7a3aeaba43288397762
[ "Apache-2.0" ]
permissive
rrymaszewski/SokkerViewer
a4bf00d77d6bb0708148730f6c2daf67f244c7a0
8014aa5de08f2aa86cb4d66aa974e203c15bda20
refs/heads/master
2020-05-17T11:14:55.540124
2013-05-11T23:50:21
2013-05-11T23:50:21
9,796,420
1
2
null
null
null
null
UTF-8
Java
false
false
1,888
java
package pl.pronux.sokker.downloader.managers; import java.io.IOException; import java.io.StringReader; import java.sql.SQLException; import java.util.List; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import pl.pronux.sokker.actions.TeamManager; import pl.pronux.sokker.downloader.xml.XMLDownloader; import pl.pronux.sokker.downloader.xml.parsers.ReportsXmlParser; import pl.pronux.sokker.model.Date; import pl.pronux.sokker.model.Report; public class ReportsXmlManager extends XmlManager<Report> { private TeamManager teamManager = TeamManager.getInstance(); private List<Report> reports; public ReportsXmlManager(String name, String destination, XMLDownloader downloader, Date currentDay) { super(name, destination, downloader, currentDay); } public ReportsXmlManager(String destination, XMLDownloader downloader, Date currentDay) { super("reports", destination, downloader, currentDay); } public ReportsXmlManager(String content, Date currentDay, int teamID) { super(content, currentDay, teamID); } @Override public void download() throws IOException { setContent(getDownloader().getReports()); } @Override public void importToSQL() throws SQLException { teamManager.importReports(this.reports); } public List<Report> parseXML() throws SAXException { return parseXML(getContent()); } @Override public List<Report> parseXML(String xml) throws SAXException { ReportsXmlParser reportsXmlParser = new ReportsXmlParser(); InputSource input = new InputSource(new StringReader(xml)); try { reportsXmlParser.parseXmlSax(input, null); } catch (SAXException ex) { input = new InputSource(new StringReader(filterCharacters(xml))); reportsXmlParser.parseXmlSax(input, null); } this.reports = reportsXmlParser.getReports(); return reports; } }
[ "radoslaw.rymaszewski@gmail.com" ]
radoslaw.rymaszewski@gmail.com
843c1cc16c15ece3eaf004e250b60f8c2a034db0
e2f74b43886a74c1a9b99fa64af33d5f72ede8f2
/rapidoid-integration-tests/src/test/java/org/rapidoid/http/AsyncHttpServerTest.java
6277583334a2abaf47882d522efc285e707f17ff
[ "LicenseRef-scancode-proprietary-license", "Apache-2.0" ]
permissive
xwt-benchmarks/rapidoid
9fd711bda90f60d612740f4bd18903f6fd96d7bc
26a41baee15bfba77dff84834b4db0f1affe85ed
refs/heads/master
2022-07-15T15:37:59.186832
2020-05-12T14:23:08
2020-05-12T14:23:08
258,783,476
0
0
Apache-2.0
2020-05-12T14:23:09
2020-04-25T13:33:27
null
UTF-8
Java
false
false
3,279
java
/*- * #%L * rapidoid-integration-tests * %% * Copyright (C) 2014 - 2018 Nikolche Mihajlovski and contributors * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ package org.rapidoid.http; import org.junit.jupiter.api.Test; import org.rapidoid.annotation.Authors; import org.rapidoid.annotation.Since; import org.rapidoid.io.IO; import org.rapidoid.setup.On; import org.rapidoid.u.U; import org.rapidoid.util.Msc; import java.io.IOException; import java.io.OutputStream; import java.time.Duration; import static org.junit.jupiter.api.Assertions.assertTimeout; @Authors("Nikolche Mihajlovski") @Since("4.1.0") public class AsyncHttpServerTest extends IsolatedIntegrationTest { private static final int REQUESTS = Msc.normalOrHeavy(100, 10000); @Test public void testAsyncHttpServer() { On.req(req -> { U.must(!req.isAsync()); req.async(); U.must(req.isAsync()); async(() -> { IO.write(req.out(), "O"); async(() -> { IO.write(req.out(), "K"); try { req.out().close(); } catch (IOException e) { e.printStackTrace(); } req.done(); }); }); return req; }); assertTimeout(Duration.ofSeconds(20), () -> { Self.get("/").expect("OK").execute(); Self.get("/").expect("OK").benchmark(1, 100, REQUESTS); Self.post("/").expect("OK").benchmark(1, 100, REQUESTS); }); } @Test public void testAsyncHttpServerNested() { On.req(req -> { U.must(!req.isAsync()); req.async(); U.must(req.isAsync()); async(() -> appendTo(req, "O", false, () -> async(() -> { appendTo(req, "K", true, null); // req.done() is in "appendTo" }))); return req; }); assertTimeout(Duration.ofSeconds(20), () -> { Self.get("/").expect("OK").execute(); Self.get("/").expect("OK").benchmark(1, 100, REQUESTS); Self.post("/").expect("OK").benchmark(1, 100, REQUESTS); }); } @Test public void testAsyncHttpServer2() { On.req(req -> async(() -> { Resp resp = req.response(); resp.chunk("A".getBytes()); async(() -> { resp.chunk("SYNC".getBytes()); IO.close(resp.out(), false); req.done(); }); })); assertTimeout(Duration.ofSeconds(20), () -> { Self.get("/").expect("ASYNC").execute(); Self.get("/").expect("ASYNC").benchmark(1, 100, REQUESTS); Self.post("/").expect("ASYNC").benchmark(1, 100, REQUESTS); }); } private void appendTo(Req req, String data, boolean complete, Runnable then) { req.response().resume(() -> { OutputStream out = req.out(); IO.write(out, data); try { out.flush(); } catch (IOException e) { throw U.rte(e); } if (then != null) { then.run(); } if (complete) { IO.close(out, false); req.done(); } return complete; }); } }
[ "nikolce.mihajlovski@gmail.com" ]
nikolce.mihajlovski@gmail.com
a35cb03b3092ea98a4fd0ac1a50c70c39882bb33
59e245e08f64d0b0e3ccfb72222d88d64ce94540
/loanboxsdk/src/main/java/com/yc/loanbox/view/fragment/NewProductFragment2.java
d2514c2dca3d21c00faebe45786e802b66bbd459
[]
no_license
huarong0212/tnzbsqApp
3518e71b21b59dc8165a50fb286337683f02c97e
4536952b68c3b032ff65fb0907df3f7a36896cf2
refs/heads/master
2020-06-15T02:23:26.593130
2019-06-13T15:00:21
2019-06-13T15:00:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,447
java
package com.yc.loanbox.view.fragment; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import com.chad.library.adapter.base.BaseQuickAdapter; import com.yc.loanbox.R; import com.yc.loanbox.R2; import com.yc.loanbox.model.bean.DayInfo; import com.yc.loanbox.model.bean.ListInfo; import com.yc.loanbox.view.NewMouthActivity; import com.yc.loanbox.view.adpater.NewMouthAdapter; import java.util.ArrayList; import java.util.List; import butterknife.BindView; public class NewProductFragment2 extends BaseFragment { @BindView(R2.id.recycler_linear) RecyclerView mProductRecyclerView; NewMouthAdapter newMouthAdapter; private int tab; @Override protected int getLayoutId() { return R.layout.loanbox_fragment_new_product2; } public static Fragment newInstance(int tab) { NewProductFragment2 productFragment2 = new NewProductFragment2(); productFragment2.tab = tab; return productFragment2; } @Override protected void initViews() { LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity()); mProductRecyclerView.setLayoutManager(linearLayoutManager); newMouthAdapter = new NewMouthAdapter(null, tab); mProductRecyclerView.setAdapter(newMouthAdapter); newMouthAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { @Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { } }); } @Override protected void initData() { List<ListInfo> listInfos = new ArrayList<>(); NewMouthActivity newMouthActivity = (NewMouthActivity)getActivity(); DayInfo today = null; if(newMouthActivity.newListInfo != null) { if (tab == 0) { today = newMouthActivity.newListInfo.getToday(); } else { today = newMouthActivity.newListInfo.getTomorrow(); } } if(today != null) { listInfos.add(today.getTen_show()); listInfos.add(today.getFourteen_show()); listInfos.add(today.getSixteen_show()); listInfos.add(today.getTwenty_show()); newMouthAdapter.setNewData(listInfos); newMouthAdapter.loadMoreEnd(); } } }
[ "512710257@qq.com" ]
512710257@qq.com
0d656642cae83e9bbd0be6c7500a87c2ca021456
3f9cdecedf0d432a0135e6388f2367ef8ccf6bac
/src/com/leozhi/topic947/Main.java
21d2c95034bf8b9566d2afcfd2216c3297a4830e
[]
no_license
Leozhi-nian/LeetCode
119154c467ff3d06ac4b2afd9ddf7a800544909d
4506775b2ae7c318842f2f2e29f34ce1db00982a
refs/heads/master
2023-05-28T19:09:05.033466
2021-06-10T11:59:25
2021-06-10T11:59:25
304,465,323
1
0
null
null
null
null
UTF-8
Java
false
false
690
java
package com.leozhi.topic947; /** * @author leozhi * 947. ็งป้™คๆœ€ๅคš็š„ๅŒ่กŒๆˆ–ๅŒๅˆ—็Ÿณๅคด * n ๅ—็Ÿณๅคดๆ”พ็ฝฎๅœจไบŒ็ปดๅนณ้ขไธญ็š„ไธ€ไบ›ๆ•ดๆ•ฐๅๆ ‡็‚นไธŠใ€‚ๆฏไธชๅๆ ‡็‚นไธŠๆœ€ๅคšๅช่ƒฝๆœ‰ไธ€ๅ—็Ÿณๅคดใ€‚ * * ๅฆ‚ๆžœไธ€ๅ—็Ÿณๅคด็š„ ๅŒ่กŒๆˆ–่€…ๅŒๅˆ— ไธŠๆœ‰ๅ…ถไป–็Ÿณๅคดๅญ˜ๅœจ๏ผŒ้‚ฃไนˆๅฐฑๅฏไปฅ็งป้™ค่ฟ™ๅ—็Ÿณๅคดใ€‚ * * ็ป™ไฝ ไธ€ไธช้•ฟๅบฆไธบ n ็š„ๆ•ฐ็ป„ stones ๏ผŒๅ…ถไธญ stones[i] = [xi, yi] ่กจ็คบ็ฌฌ i ๅ—็Ÿณๅคด็š„ไฝ็ฝฎ๏ผŒ่ฟ”ๅ›ž ๅฏไปฅ็งป้™ค็š„็Ÿณๅญ ็š„ๆœ€ๅคงๆ•ฐ้‡ใ€‚ */ public class Main { public static void main(String[] args) { Solution01 solution = new Solution01(); solution.removeStones(new int[][]{{0,0},{0,1},{1,0},{1,2},{2,1},{2,2}}); } }
[ "leozhi819@gmail.com" ]
leozhi819@gmail.com
a6d4ee4d2c4a3c835a9ab20092b53bbc362a6454
4e6745b1b7f5802da0f4157d1dbe647b8fd88d33
/framework/saxon-adapter/src/main/java/org/daisy/common/xpath/saxon/XPathFunctionRegistry.java
e5f0c67adc73b96ecbcae5e867abfded0d5bcab4
[]
no_license
daisy/pipeline
d2bf3e76df47ab74241274bd83425d8c68949f11
3946dbede7088e3d3e2cb523d2cb902b20226839
refs/heads/master
2023-08-31T06:57:53.647550
2023-06-20T16:20:30
2023-07-19T15:59:47
18,717,712
18
21
null
2023-07-20T10:23:51
2014-04-13T00:04:25
HTML
UTF-8
Java
false
false
2,412
java
package org.daisy.common.xpath.saxon; import java.util.HashMap; import java.util.HashSet; import java.util.Set; import javax.xml.namespace.QName; import net.sf.saxon.lib.ExtensionFunctionDefinition; import net.sf.saxon.trans.XPathException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.osgi.service.component.annotations.ReferencePolicy; @Component( name = "xpath-registry", service = { XPathFunctionRegistry.class } ) public class XPathFunctionRegistry { private static final Logger mLogger = LoggerFactory.getLogger(XPathFunctionRegistry.class); HashMap<QName,ExtensionFunctionDefinition> mFunctions = new HashMap<QName, ExtensionFunctionDefinition>(); @Reference( name = "ExtensionFunctionDefinition", unbind = "removeFunction", service = ExtensionFunctionDefinition.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC ) public void addFunction(ExtensionFunctionDefinition functionDefinition) throws XPathException { mLogger.info("Adding extension function definition to registry {}", functionDefinition.getFunctionQName().toString()); mFunctions.put(functionDefinition.getFunctionQName().toJaxpQName(), functionDefinition); } public void removeFunction(ExtensionFunctionDefinition functionDefinition) { mLogger.info("Deleting extension function definition to registry {}",functionDefinition.getFunctionQName().toString()); mFunctions.remove(functionDefinition.getFunctionQName().toJaxpQName()); } @Reference( name = "ExtensionFunctionProvider", unbind = "removeFunctionProvider", service = ExtensionFunctionProvider.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC ) public void addFunctionProvider(ExtensionFunctionProvider functionProvider) throws XPathException { for (ExtensionFunctionDefinition f : functionProvider.getDefinitions()) addFunction(f); } public void removeFunctionProvider(ExtensionFunctionProvider functionProvider) { for (ExtensionFunctionDefinition f : functionProvider.getDefinitions()) removeFunction(f); } public Set<ExtensionFunctionDefinition> getFunctions() { return new HashSet<ExtensionFunctionDefinition>(mFunctions.values()); } }
[ "bertfrees@gmail.com" ]
bertfrees@gmail.com
64dee30eea043976cf11e0fbc737516c5b34ec1b
742ae5ccc0f79e153c2c3862249c0b9d6a5a03be
/Achievements/src/me/frostythedev/frostengine/modules/achievements/api/AchievementIdCallback.java
d74cb08d5600133f562795aabe42722f412aa2df
[]
no_license
frostythedev/FrostEngine
0a808f05152f17e5d91aac906a72e6b2c3e0aa55
7f0665f0c24d0a05e63856ed52afc4dea6c6ed95
refs/heads/master
2022-07-15T22:03:53.052594
2020-05-12T03:41:39
2020-05-12T03:41:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
625
java
package me.frostythedev.frostengine.modules.achievements.api; import me.frostythedev.frostengine.data.core.Callback; import java.sql.ResultSet; import java.sql.SQLException; public class AchievementIdCallback implements Callback<Integer> { private int result; @Override public void read(ResultSet rs) throws SQLException { if (rs == null) { return; } this.result = rs.getInt("id"); } @Override public void digestSync() { } @Override public void digestAsync() { } @Override public Integer result() { return result; } }
[ "frostythedev@gmail.com" ]
frostythedev@gmail.com
8f4168c074f654a5d0a4c90312f859ffe862df67
6f73a0d38addee468dd21aba1d5d53963be84825
/application/src/main/java/org/mifos/application/customer/util/helpers/CustomerAccountView.java
7e521a1fee314a6dfaab9ddac8e08c49b7a332d4
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
mifos/1.4.x
0f157f74220e8e65cc13c4252bf597c80aade1fb
0540a4b398407b9415feca1f84b6533126d96511
refs/heads/master
2020-12-25T19:26:15.934566
2010-05-11T23:34:08
2010-05-11T23:34:08
2,946,607
0
0
null
null
null
null
UTF-8
Java
false
false
3,697
java
/* * Copyright (c) 2005-2009 Grameen Foundation USA * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. * * See also http://www.apache.org/licenses/LICENSE-2.0.html for an * explanation of the license and how it is applied. */ package org.mifos.application.customer.util.helpers; import java.util.ArrayList; import java.util.List; import org.mifos.application.collectionsheet.business.CollectionSheetEntryCustomerAccountInstallmentView; import org.mifos.application.collectionsheet.business.CollectionSheetEntryInstallmentView; import org.mifos.framework.business.View; import org.mifos.framework.util.helpers.Money; public class CustomerAccountView extends View { private Integer accountId; private String customerAccountAmountEntered; private List<CollectionSheetEntryInstallmentView> accountActionDates; private boolean isValidCustomerAccountAmountEntered; private final Integer customerId; public CustomerAccountView(Integer accountId) { this.accountId = accountId; this.customerId = null; customerAccountAmountEntered = "0.0"; accountActionDates = new ArrayList<CollectionSheetEntryInstallmentView>(); isValidCustomerAccountAmountEntered = true; } public CustomerAccountView(final Integer accountId, final Integer customerId) { this.accountId = accountId; this.customerId = customerId; customerAccountAmountEntered = "0.0"; accountActionDates = new ArrayList<CollectionSheetEntryInstallmentView>(); isValidCustomerAccountAmountEntered = true; } public List<CollectionSheetEntryInstallmentView> getAccountActionDates() { return accountActionDates; } public void setAccountActionDates(List<CollectionSheetEntryInstallmentView> accountActionDates) { this.accountActionDates = accountActionDates; } public Integer getAccountId() { return accountId; } public void setAccountId(Integer accountId) { this.accountId = accountId; } public String getCustomerAccountAmountEntered() { return customerAccountAmountEntered; } public void setCustomerAccountAmountEntered(String customerAccountAmountEntered) { this.customerAccountAmountEntered = customerAccountAmountEntered; } public boolean isValidCustomerAccountAmountEntered() { return isValidCustomerAccountAmountEntered; } public void setValidCustomerAccountAmountEntered(boolean isValidCustomerAccountAmountEntered) { this.isValidCustomerAccountAmountEntered = isValidCustomerAccountAmountEntered; } public Money getTotalAmountDue() { Money totalAmount = new Money(); if (accountActionDates != null && accountActionDates.size() > 0) { for (CollectionSheetEntryInstallmentView accountAction : accountActionDates) { totalAmount = totalAmount.add(((CollectionSheetEntryCustomerAccountInstallmentView) accountAction) .getTotalDueWithFees()); } } return totalAmount; } public Integer getCustomerId() { return this.customerId; } }
[ "meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4" ]
meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4
2d9eeddaa18f312ae61e9e11a8ea2a024b8bbacd
19b9b4323dc04b1b476b23fb8a7f85037ac8c7bf
/src/edu/yale/plugins/tasks/PartialEadImporter.java
36653c40ecfea5375ce6b67ee3be4834a9a36530
[]
no_license
anarchivist/AT-plugin-Yale-custom-tasks
3d184c0396f6214551ddbb6d1efbb9bf492de4f6
99cbea3d7af719bbcda216bc974eee37c953a0b8
refs/heads/master
2021-01-15T16:05:35.123347
2010-01-04T16:57:28
2010-01-04T16:57:28
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
2,754
java
/** * Archivists' Toolkit(TM) Copyright ยฉ 2005-2007 Regents of the University of California, New York University, & Five Colleges, Inc. * All rights reserved. * * This software is free. You can redistribute it and / or modify it under the terms of the Educational Community License (ECL) * version 1.0 (http://www.opensource.org/licenses/ecl1.php) * * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ECL license for more details about permissions and limitations. * * * Archivists' Toolkit(TM) * http://www.archiviststoolkit.org * info@archiviststoolkit.org * * @author Lee Mandell * Date: Sep 16, 2009 * Time: 12:40:36 PM */ package edu.yale.plugins.tasks; import org.archiviststoolkit.model.Resources; import org.archiviststoolkit.ApplicationFrame; import org.archiviststoolkit.importer.ImportUtils; import org.archiviststoolkit.swing.ATProgressUtil; import org.archiviststoolkit.swing.InfiniteProgressPanel; import org.archiviststoolkit.dialog.ATFileChooser; import org.archiviststoolkit.mydomain.DomainTableWorkSurface; import org.archiviststoolkit.mydomain.DomainSortableTable; import org.archiviststoolkit.mydomain.ResourcesDAO; import javax.swing.*; import java.io.File; import java.util.ArrayList; public class PartialEadImporter { public PartialEadImporter() { } public void doTask() { ApplicationFrame frame = ApplicationFrame.getInstance(); DomainTableWorkSurface workSurface= frame.getWorkSurfaceContainer().getCurrentWorkSurface(); final DomainSortableTable worksurfaceTable = (DomainSortableTable)workSurface.getTable(); final ResourcesDAO access = new ResourcesDAO(); if (workSurface.getClazz() != Resources.class) { JOptionPane.showMessageDialog(frame, "This function only works for the resources module"); } else if (worksurfaceTable.getSelectedRowCount() != 1) { JOptionPane.showMessageDialog(frame, "You must select one resource record"); } else { ATFileChooser filechooser = new ATFileChooser(); if(filechooser.showSaveDialog(ApplicationFrame.getInstance()) == JFileChooser.APPROVE_OPTION) { final File importFile = filechooser.getSelectedFile(); Thread performer = new Thread(new Runnable() { public void run() { InfiniteProgressPanel monitor = ATProgressUtil.createModalProgressMonitor(ApplicationFrame.getInstance(), 1000); monitor.start("Importing partial EAD file..."); try { ArrayList<String> lines = ImportUtils.loadFileIntoStringArray(importFile); } finally { monitor.close(); } } }, "Partial EAD Import"); performer.start(); } } } }
[ "lee@boswyckfarms.org" ]
lee@boswyckfarms.org
a086f75ac354e08cb58754fe65b34ecc23ecc9ab
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/follow/recommend/follow/viewModel/C29543c.java
475f81eadf36535db452e3dee0dc1533cd342757
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
878
java
package com.p280ss.android.ugc.aweme.follow.recommend.follow.viewModel; import kotlin.jvm.internal.C7575l; import kotlin.jvm.internal.PropertyReference1; import kotlin.reflect.C7585d; import kotlin.reflect.C7599l; /* renamed from: com.ss.android.ugc.aweme.follow.recommend.follow.viewModel.c */ final /* synthetic */ class C29543c extends PropertyReference1 { /* renamed from: a */ public static final C7599l f77852a = new C29543c(); C29543c() { } public final String getName() { return "listState"; } public final C7585d getOwner() { return C7575l.m23595a(RecommendFollowState.class); } public final String getSignature() { return "getListState()Lcom/bytedance/jedi/arch/ext/list/ListState;"; } public final Object get(Object obj) { return ((RecommendFollowState) obj).getListState(); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
928d7ff2c03f0e8cddb52e4ba9369b788231477f
fda5d5904f2b3fbf4868f8da89a41ba49255ec4c
/demo (1)/src/main/java/com/example/demo/controller/CategoryController.java
ce3bfac6f0c58ea3088b74bfe81f8ad5ad3b5a22
[]
no_license
camnguyet21500/finalproject
186b7c5c3ec9cedb49dc10339c85e3eb2369ce49
41444510749774de6570f504ec108999acc46b37
refs/heads/main
2023-06-01T00:59:36.483817
2021-06-28T16:46:35
2021-06-28T16:46:35
376,032,406
0
0
null
null
null
null
UTF-8
Java
false
false
1,868
java
package com.example.demo.controller; import com.example.demo.entity.Category; import com.example.demo.service.ICategoryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.List; @CrossOrigin @RestController @RequestMapping("/api/v1") public class CategoryController { @Autowired private ICategoryService categoryService; @GetMapping("/category") public ResponseEntity<?> getAllcategory() { List<Category> allcategory = categoryService.findAllCategory(); return new ResponseEntity<>(allcategory, HttpStatus.OK); } @GetMapping("/category/search") public ResponseEntity<?> getCategoryByType(@RequestParam String keyword){ Category categoryByType = categoryService.findCategoryByType(keyword); return new ResponseEntity<>(categoryByType, HttpStatus.OK); } @PostMapping("/category") public ResponseEntity<?> createCategory(@RequestBody Category category){ Category newcategory = categoryService.createCategory(category); return new ResponseEntity<>(newcategory, HttpStatus.OK); } @PutMapping("/category/update/{id}") public ResponseEntity<?> updateCategory(@RequestBody Category category, @PathVariable Long id){ category.setId(id); Category updateCategory = categoryService.updateCategory(category); return new ResponseEntity<>(updateCategory, HttpStatus.OK); } @DeleteMapping("/category/delete/{id}") public ResponseEntity<?> deleteCategory(@PathVariable Long id){ if(categoryService.deleteCategory(id)) { return new ResponseEntity<>(HttpStatus.OK); } return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } }
[ "you@example.com" ]
you@example.com
759f0934f08787bffe72727e114fd64e3c15ea6c
8160730dbfc837ba0f5882743c84e5ec22756879
/cloudnet-modules/cloudnet-bridge/src/main/java/de/dytanic/cloudnet/ext/bridge/bukkit/BukkitCloudNetPlayerInfo.java
db2c5d5a0b895f1986835dea4747230ca610222d
[]
no_license
derrop/CloudNet-v3
60198fdbade1e6a532650811f61e3e939f326163
754a196b07efb2a4b8574001b996d9e0a133f30c
refs/heads/master
2020-07-25T23:00:44.559269
2019-06-21T12:28:55
2019-06-21T12:29:54
208,450,593
0
0
null
2019-12-22T12:40:04
2019-09-14T14:17:37
null
UTF-8
Java
false
false
514
java
package de.dytanic.cloudnet.ext.bridge.bukkit; import de.dytanic.cloudnet.driver.network.HostAndPort; import de.dytanic.cloudnet.ext.bridge.WorldPosition; import lombok.AllArgsConstructor; import lombok.Data; import java.util.UUID; @Data @AllArgsConstructor final class BukkitCloudNetPlayerInfo { protected UUID uniqueId; protected String name; protected double health, maxHealth, saturation; protected int level; protected WorldPosition location; protected HostAndPort address; }
[ "tarekhosni1410@hotmail.com" ]
tarekhosni1410@hotmail.com
fdf3e767c814d5c8666e44bc21e3c9b7886059a3
f2c59bc86c53a848d2cf92bc25a50d1368755755
/src/main/java/com/ccnode/codegenerator/log/handler/LoggerHandler.java
6ea72af9a0b2ef4ea3f888347ceeff75804d2ba6
[ "Apache-2.0" ]
permissive
Cnto/MyBatisCodeHelper
1f19213d8be9028097cad3875a4b1c3411151229
134f12039a3cc926448163a289512344fa329746
refs/heads/master
2021-01-20T00:53:53.875086
2017-04-11T14:03:13
2017-04-11T14:03:13
89,210,027
1
0
null
2017-04-24T07:26:48
2017-04-24T07:26:48
null
UTF-8
Java
false
false
437
java
package com.ccnode.codegenerator.log.handler; import com.ccnode.codegenerator.log.LogEvent; /** * @Author bruce.ge * @Date 2017/2/27 * @Description */ public abstract class LoggerHandler { private LoggerHandler next; public LoggerHandler(LoggerHandler next) { this.next = next; } public void handleRequest(LogEvent req) { if (next != null) { next.handleRequest(req); } } }
[ "gejunxxx@163.com" ]
gejunxxx@163.com
553c4b99e35037c1a8e46122bf6d3552ec693f2d
5dc3650814f32e89fa7b1ce3f35e852c56c7aff8
/src/com/proteus/cgen/verilogprime/ext/Production_itemContextExt.java
560eb8c5f2c43fa08aad8b5bdd6965ce3da10fcc
[]
no_license
sureshgl/Verilog-Parser
3beda56a12f9d8e8110b225a090c73c8e7d6a850
6981223d8e5dc6b3da56acc6f17c28e12c7e6d47
refs/heads/master
2020-12-24T11:47:11.340855
2017-03-21T19:22:58
2017-03-21T19:22:58
85,744,141
1
0
null
null
null
null
UTF-8
Java
false
false
1,045
java
package com.proteus.cgen.verilogprime.ext; import org.antlr.v4.runtime.ParserRuleContext; import lombok.Getter; import com.proteus.cgen.verilogprime.PopulateExtendedContextVisitor; import com.proteus.cgen.verilogprime.gen.VerilogPrimeParser.Production_itemContext; public class Production_itemContextExt extends AbstractBaseExt{ @Getter private Production_itemContext ctx; public Production_itemContextExt(Production_itemContext ctx) { this.ctx = ctx; } @Override public ParserRuleContext getContext(){ return ctx; } @Override public ParserRuleContext getContext(String str){ return new PopulateExtendedContextVisitor().visit(getPrimeParser(str).production_item()); } @Override public void setContext(ParserRuleContext ctx){ if(ctx != null){ if(ctx instanceof Production_itemContext){ this.ctx = (Production_itemContext) ctx; } else { throw new ClassCastException(ctx.getClass().getSimpleName() + " cannot be cased to "+Production_itemContext.class.getName()); } } else { this.ctx= null; } } }
[ "suresh.goduguluru@gmail.com" ]
suresh.goduguluru@gmail.com
d22a9c0caacc9493ca978a651fc133718162398a
5a959164902dad87f927d040cb4b243d39b8ebe3
/qafe-business/src/main/java/com/qualogy/qafe/business/integration/adapter/PredefinedAdapterFactory.java
f51d9697b803915a3a95a1d07540b6c1d911e23a
[ "Apache-2.0" ]
permissive
JustusM/qafe-platform
0c8bc824d1faaa6021bc0742f26733bf78408606
0ef3b3d1539bcab16ecd6bfe5485d727606fecf1
refs/heads/master
2021-01-15T11:38:04.044561
2014-09-25T09:20:38
2014-09-25T09:20:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,685
java
/** * Copyright 2008-2014 Qualogy Solutions B.V. * * 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.qualogy.qafe.business.integration.adapter; import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.Map; import com.qualogy.qafe.bind.commons.type.TypeDefinition; import com.qualogy.qafe.business.integration.builder.BooleanBuilder; import com.qualogy.qafe.business.integration.builder.CharacterBuilder; import com.qualogy.qafe.business.integration.builder.DoubleBuilder; import com.qualogy.qafe.business.integration.builder.IntegerBuilder; import com.qualogy.qafe.business.integration.builder.LongBuilder; import com.qualogy.qafe.business.integration.builder.PredefinedClassTypeConverter; import com.qualogy.qafe.business.integration.builder.StringBuilder; import com.qualogy.qafe.business.integration.builder.UnImplementedBuilderException; /** * //TODO: dateconversion * @author mvanderwurff * */ public class PredefinedAdapterFactory { /** * allows null values for type * @param type * @return */ private static boolean canCreate(TypeDefinition type){ return PredefinedClassTypeConverter.isPredefined(type); } private static Map<Class, Class> converters = new HashMap<Class, Class>(); static{ converters.put(Integer.class, IntegerBuilder.class); converters.put(Long.class, LongBuilder.class); //converters.put(Short.class, ShortAdapter.class); //converters.put(Float.class, FloatAdapter.class); converters.put(Double.class, DoubleBuilder.class); converters.put(Character.class, CharacterBuilder.class); //converters.put(Byte.class, ByteAdapter.class); converters.put(Boolean.class, BooleanBuilder.class); converters.put(String.class, StringBuilder.class); //converters.put(Date.class, DateAdapter.class); } public static PredefinedAdapter create(TypeDefinition type){ Class toClass = null; if(canCreate(type)){ toClass = PredefinedClassTypeConverter.convert(type); }else{ throw new UnImplementedBuilderException("className " + ((type!=null)?type:null) + " not implemented"); } return create(toClass); } public static PredefinedAdapter create(Class toClass){ if(!converters.containsKey(toClass)){ throw new UnImplementedBuilderException("Class " + toClass + " not implemented"); } PredefinedAdapter converter = null; try{ converter = (PredefinedAdapter)((Class)converters.get(toClass)).getConstructor(new Class[]{}).newInstance(new Object[]{}); }catch(InvocationTargetException e){ throw new UnImplementedBuilderException("Class " + toClass + " not implemented", e); }catch (SecurityException e) { throw new UnImplementedBuilderException("Class " + toClass + " not implemented", e); } catch (InstantiationException e) { throw new UnImplementedBuilderException("Class " + toClass + " not implemented", e); } catch (IllegalAccessException e) { throw new UnImplementedBuilderException("Class " + toClass + " not implemented", e); } catch (NoSuchMethodException e) { throw new UnImplementedBuilderException("Class " + toClass + " not implemented", e); } return converter; } /** * method to check wheter the given typedefinition has a predeefined type * and the given object is instance of one of the predefined types, so an * actual adapter can convert the object. * @param type * @return */ public static boolean canObjectBeConverted(TypeDefinition type, Object objectToConvert){ return PredefinedClassTypeConverter.isPredefined(type) && objectToConvert!=null && PredefinedClassTypeConverter.isPredefined(objectToConvert.getClass()); } public static boolean mustConvert(TypeDefinition type, Object o){ boolean mustConvert = false; if(type!=null && type.getId()!=null && o!=null){ String name = null; if(PredefinedClassTypeConverter.isPredefined(type)) name = PredefinedClassTypeConverter.convert(type).getName(); else name = type.getId(); mustConvert = !o.getClass().getName().equals(name); } return mustConvert; } }
[ "rkha@f87ad13a-6d31-43dd-9311-282d20640c02" ]
rkha@f87ad13a-6d31-43dd-9311-282d20640c02
6c5ddca0f60f0702b27610866d93606a3a00c6e5
955c4ee07d0a1835ba9fc453e7916afd0c132c7d
/src/senior/hrms/emps/dto/EmpInjuryTrg.java
08cf13118f5a966810aacf1b2a9651352d317fbe
[]
no_license
yahia-momtaz/HRMS
7cdc7bb09521fdcf569fe42ed80e279790046e4f
460f6c2d0b27dc95b58f0eb21b991360db915701
refs/heads/master
2021-01-13T08:13:54.656798
2016-10-23T12:41:59
2016-10-23T12:41:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
724
java
/* * This source file was generated by FireStorm/DAO. * * If you purchase a full license for FireStorm/DAO you can customize this header file. * * For more information please visit http://www.codefutures.com/products/firestorm */ package senior.hrms.emps.dto; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; public class EmpInjuryTrg implements Serializable { /** * Method 'EmpInjuryTrg' * */ public EmpInjuryTrg() { } /** * Method 'toString' * * @return String */ public String toString() { StringBuffer ret = new StringBuffer(); ret.append( "senior.hrms.emps.dto.EmpInjuryTrg: " ); return ret.toString(); } }
[ "Administrator@yahia-PC" ]
Administrator@yahia-PC
2f7aed7b541c8df8ccb4355e57a3c4ab71273a32
49a2953cd45517844ecb0163319ada8c0cf62eca
/app/src/main/java/youngjee/com/examapp01/fragment/ImageListFragment.java
43998767838671966d527f5ba2f8756267603bff
[]
no_license
astraltear/ExamApp01
2cdfcfc8883b2b0112d31d31dfba473a387ef8ed
fb9767f0dba401ce5deb5d4fe591b53c36b0ae24
refs/heads/master
2021-01-22T11:37:24.866866
2018-11-15T07:14:57
2018-11-15T07:14:57
29,900,727
0
0
null
null
null
null
UTF-8
Java
false
false
4,659
java
package youngjee.com.examapp01.fragment; import android.content.Context; import android.graphics.Bitmap; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import com.nostra13.universalimageloader.core.DisplayImageOptions; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer; import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; import com.nostra13.universalimageloader.core.listener.SimpleImageLoadingListener; import java.util.Collections; import java.util.LinkedList; import java.util.List; import youngjee.com.examapp01.AuilConstants; import youngjee.com.examapp01.R; public class ImageListFragment extends AbsListViewBaseFragment { public static final int INDEX=0; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fr_image_list, container, false); listView = (ListView) rootView.findViewById(android.R.id.list); ((ListView)listView).setAdapter(new ImageAapter(getActivity())); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { startImagePagerActivity(position); } }); return rootView; } @Override public void onDestroy() { super.onDestroy(); AnimateFirstDisplayListener.displayedImages.clear(); } private static class ImageAapter extends BaseAdapter{ private static final String[] IMAGES_URLS = AuilConstants.IMAGES; private LayoutInflater inflater; private ImageLoadingListener animateFirstListener = new AnimateFirstDisplayListener(); private DisplayImageOptions options; ImageAapter(Context context) { inflater = LayoutInflater.from(context); options = new DisplayImageOptions.Builder() .showImageOnLoading(R.drawable.ic_stub) .showImageForEmptyUri(R.drawable.ic_empty) .showImageOnFail(R.drawable.ic_error) .cacheInMemory(true) .cacheOnDisk(true) .considerExifParams(true) .displayer(new RoundedBitmapDisplayer(20)).build(); } @Override public int getCount() { return IMAGES_URLS.length; } @Override public Object getItem(int position) { return position; } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; final ViewHolder holder; if (convertView == null) { view = inflater.inflate(R.layout.item_list_image, parent, false); holder = new ViewHolder(); holder.text = (TextView) view.findViewById(R.id.text); holder.image = (ImageView) view.findViewById(R.id.image); view.setTag(holder); } else { holder = (ViewHolder) view.getTag(); } holder.text.setText("item " + (position + 1)); ImageLoader.getInstance().displayImage(IMAGES_URLS[position], holder.image, options, animateFirstListener); return view; } } static class ViewHolder{ TextView text; ImageView image; } private static class AnimateFirstDisplayListener extends SimpleImageLoadingListener{ static final List<String> displayedImages = Collections.synchronizedList(new LinkedList<String>()); @Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { if (loadedImage != null) { ImageView imageView = (ImageView) view; boolean firstDisplay = !displayedImages.contains(imageUri); if (firstDisplay){ FadeInBitmapDisplayer.animate(imageView,500); displayedImages.add(imageUri); } } } } }
[ "astraltear@gmail.com" ]
astraltear@gmail.com
03215d43766d53c02ba195b36962596ca8489bed
332113dabc48b15e48fc915e2d9e446b115dddac
/base/base/ListNode.java
4cc9d8db18b7f06ebf3ad6f33245412bbc34957e
[]
no_license
wolfworld6/AlgorithmNote
447ee12c58d2fb832d0b1054848fe93a4fee00b4
3995b4bce23c7c31b4dbcc6fe5ba488085b13fbf
refs/heads/master
2022-02-25T23:13:33.691782
2019-11-08T10:36:19
2019-11-08T10:36:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
297
java
package base; //้“พ่กจ็š„่Š‚็‚น public class ListNode { public ListNode(int value) { this.value = value; } public int value; public ListNode nextNode = null; public ListNode() { } @Override public String toString() { return "" + value; } }
[ "1398738509@qq.com" ]
1398738509@qq.com
b0967e88af7e9c73ff0a48e484ecfc8c924c2dc1
e63363389e72c0822a171e450a41c094c0c1a49c
/Mate20_9_0_0/src/main/java/com/android/server/ethernet/-$$Lambda$EthernetNetworkFactory$NetworkInterfaceState$1$f_QeN95E84S9ECYxfdEhjw7SAFc.java
37333ee50f2d39f1f328d0d3873cb045cee2a57a
[]
no_license
solartcc/HwFrameWorkSource
fc23ca63bcf17865e99b607cc85d89e16ec1b177
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
refs/heads/master
2022-12-04T21:14:37.581438
2020-08-25T04:30:43
2020-08-25T04:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
808
java
package com.android.server.ethernet; import android.net.LinkProperties; import com.android.server.ethernet.EthernetNetworkFactory.NetworkInterfaceState.AnonymousClass1; /* compiled from: lambda */ public final /* synthetic */ class -$$Lambda$EthernetNetworkFactory$NetworkInterfaceState$1$f_QeN95E84S9ECYxfdEhjw7SAFc implements Runnable { private final /* synthetic */ AnonymousClass1 f$0; private final /* synthetic */ LinkProperties f$1; public /* synthetic */ -$$Lambda$EthernetNetworkFactory$NetworkInterfaceState$1$f_QeN95E84S9ECYxfdEhjw7SAFc(AnonymousClass1 anonymousClass1, LinkProperties linkProperties) { this.f$0 = anonymousClass1; this.f$1 = linkProperties; } public final void run() { NetworkInterfaceState.this.onIpLayerStopped(this.f$1); } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
260479d60b9771506a1dd5983079b66019a410f7
9856541e29e2597f2d0a7ef4729208190d9bbebe
/spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java
d77da3b1bd4babe2777798a4dbfb0fcd88baf7b9
[ "Apache-2.0" ]
permissive
lakeslove/springSourceCodeTest
74bffc0756fa5ea844278827d86a085b9fe4c14e
25caac203de57c4b77268be60df2dcb2431a03e1
refs/heads/master
2020-12-02T18:10:14.048955
2017-07-07T00:41:55
2017-07-07T00:41:55
96,483,747
1
0
null
null
null
null
UTF-8
Java
false
false
4,194
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.beans; import org.junit.Test; import static org.junit.Assert.*; /** * Tests for {@link MutablePropertyValues}. * * @author Rod Johnson * @author Chris Beams */ public final class MutablePropertyValuesTests extends AbstractPropertyValuesTests { @Test public void testValid() throws Exception { MutablePropertyValues pvs = new MutablePropertyValues(); pvs.addPropertyValue(new PropertyValue("forname", "Tony")); pvs.addPropertyValue(new PropertyValue("surname", "Blair")); pvs.addPropertyValue(new PropertyValue("age", "50")); doTestTony(pvs); MutablePropertyValues deepCopy = new MutablePropertyValues(pvs); doTestTony(deepCopy); deepCopy.setPropertyValueAt(new PropertyValue("name", "Gordon"), 0); doTestTony(pvs); assertEquals("Gordon", deepCopy.getPropertyValue("name").getValue()); } @Test public void testAddOrOverride() throws Exception { MutablePropertyValues pvs = new MutablePropertyValues(); pvs.addPropertyValue(new PropertyValue("forname", "Tony")); pvs.addPropertyValue(new PropertyValue("surname", "Blair")); pvs.addPropertyValue(new PropertyValue("age", "50")); doTestTony(pvs); PropertyValue addedPv = new PropertyValue("rod", "Rod"); pvs.addPropertyValue(addedPv); assertTrue(pvs.getPropertyValue("rod").equals(addedPv)); PropertyValue changedPv = new PropertyValue("forname", "Greg"); pvs.addPropertyValue(changedPv); assertTrue(pvs.getPropertyValue("forname").equals(changedPv)); } @Test public void testChangesOnEquals() throws Exception { MutablePropertyValues pvs = new MutablePropertyValues(); pvs.addPropertyValue(new PropertyValue("forname", "Tony")); pvs.addPropertyValue(new PropertyValue("surname", "Blair")); pvs.addPropertyValue(new PropertyValue("age", "50")); MutablePropertyValues pvs2 = pvs; PropertyValues changes = pvs2.changesSince(pvs); assertTrue("changes are empty", changes.getPropertyValues().length == 0); } @Test public void testChangeOfOneField() throws Exception { MutablePropertyValues pvs = new MutablePropertyValues(); pvs.addPropertyValue(new PropertyValue("forname", "Tony")); pvs.addPropertyValue(new PropertyValue("surname", "Blair")); pvs.addPropertyValue(new PropertyValue("age", "50")); MutablePropertyValues pvs2 = new MutablePropertyValues(pvs); PropertyValues changes = pvs2.changesSince(pvs); assertTrue("changes are empty, not of length " + changes.getPropertyValues().length, changes.getPropertyValues().length == 0); pvs2.addPropertyValue(new PropertyValue("forname", "Gordon")); changes = pvs2.changesSince(pvs); assertEquals("1 change", 1, changes.getPropertyValues().length); PropertyValue fn = changes.getPropertyValue("forname"); assertTrue("change is forname", fn != null); assertTrue("new value is gordon", fn.getValue().equals("Gordon")); MutablePropertyValues pvs3 = new MutablePropertyValues(pvs); changes = pvs3.changesSince(pvs); assertTrue("changes are empty, not of length " + changes.getPropertyValues().length, changes.getPropertyValues().length == 0); // add new pvs3.addPropertyValue(new PropertyValue("foo", "bar")); pvs3.addPropertyValue(new PropertyValue("fi", "fum")); changes = pvs3.changesSince(pvs); assertTrue("2 change", changes.getPropertyValues().length == 2); fn = changes.getPropertyValue("foo"); assertTrue("change in foo", fn != null); assertTrue("new value is bar", fn.getValue().equals("bar")); } }
[ "lakeslove@126.com" ]
lakeslove@126.com
7032997c886853bb080265b5979dad9ec752d307
f570108cb787f278b58fb090791047192c72ae34
/app/src/main/java/com/wensoft/ojeku/pojo/Cart.java
5454ff41bba8f22a27b86fea93a1f64f28b3acc1
[]
no_license
pahlevikun/ojekita
e36111a0ff2feb4ec0ea8afe6e4214471eabc5a3
01b31ad0755ae0457cc4021351ca865121143f13
refs/heads/master
2021-03-27T11:33:53.047332
2017-04-19T14:06:23
2017-04-19T14:06:23
85,324,196
0
0
null
null
null
null
UTF-8
Java
false
false
1,505
java
package com.wensoft.ojeku.pojo; import java.io.Serializable; /** * Created by farhan on 4/7/17. */ public class Cart implements Serializable { private String idCart; private String idMenu; private String menu; private String harga; private String jumlah; private String total_harga; public Cart() {} public String getIdMenu() { return idMenu; } public void setIdMenu(String idMenu) { this.idMenu = idMenu; } public Cart(String idCart, String idMenu, String menu, String harga, String jumlah, String total_harga) { this.idCart = idCart; this.idMenu = idMenu; this.menu = menu; this.harga = harga; this.jumlah = jumlah; this.total_harga = total_harga; } public String getIdCart() { return idCart; } public void setIdCart(String idCart) { this.idCart = idCart; } public String getMenu() { return menu; } public void setMenu(String menu) { this.menu = menu; } public String getHarga() { return harga; } public void setHarga(String harga) { this.harga = harga; } public String getJumlah() { return jumlah; } public void setJumlah(String jumlah) { this.jumlah = jumlah; } public String getTotal_harga() { return total_harga; } public void setTotal_harga(String total_harga) { this.total_harga = total_harga; } }
[ "pahlevi.kun@gmail.com" ]
pahlevi.kun@gmail.com
6becf7723e2bfe72835dada47941442d69c7cd9c
d42d957c1d2924d554d9912e19aecd7f6b6c8a88
/src/com/project/mgjandroid/model/GetAlipayInfoModel.java
6a30b745b357488efd55e1274e2891a3a6ee20cd
[]
no_license
rjpacket/mgj
3121a4222c884efff772d6a89526d7f6535c0413
7007440c952faa16a358f240eae26e45828d7716
refs/heads/master
2020-03-10T22:32:24.489959
2018-04-24T06:24:06
2018-04-24T06:24:06
129,621,282
1
0
null
null
null
null
UTF-8
Java
false
false
1,427
java
package com.project.mgjandroid.model; /** * Created by ning on 2016/3/26. */ public class GetAlipayInfoModel extends Entity { /** * code : 0 * uuid : A00000552D1815 * value : _input_charset="UTF-8"&body="2016032600002626"&it_b_pay="1h"&notify_url="http://120.24.16.64/merchant/alipayNotifies/backend"&out_trade_no="2016032600000202"&partner="2088811120305454"&pay_method="directPay"&payment_type="1"&seller_id="2088811120305454"&service="mobile.securitypay.pay"&subject="่ฎขๅ•-2016032600002626"&total_fee="39.20"&sign_type="RSA"&sign="hqP7bX9wFwr9IyrvSWS7XCCYCGWkDZEcWxxjPi1UnpA%2FR3SCYbTBa%2FFjTuYIvkzOweiN4Jo%2FVfG9NR3OiRQ%2BiYo%2BgVrknXQ35jVJaq7%2FtTiBAhi3ptjerOvJZX2efCUyFqTOLdbF3%2BEj%2FmkpDm8yCIUeZAR2pvRDW4Rwl3V%2FnNs%3D" * success : true */ private int code; private String uuid; private String value; private boolean success; public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getUuid() { return uuid; } public void setUuid(String uuid) { this.uuid = uuid; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public boolean isSuccess() { return success; } public void setSuccess(boolean success) { this.success = success; } }
[ "jimbo922@163.com" ]
jimbo922@163.com
64d0583d658f0c275e3300029dd671cd1451147a
04993ec330462593a8d64d3cbda0275053420ace
/JHPaymentGatewayPro/src/main/java/com/jh/paymentgateway/pojo/JFXRegister.java
6e3e8c0c82beb5fe10e718baa55d4420919ab514
[]
no_license
jsy579579/jh
60af71fada0462c45f527943f22c1a9ccd8268fd
44858ab7fbf461cd382efe436473d9581d4c067a
refs/heads/master
2022-05-13T22:28:16.095115
2020-04-29T03:20:14
2020-04-29T03:20:14
259,813,186
0
1
null
null
null
null
UTF-8
Java
false
false
2,263
java
package com.jh.paymentgateway.pojo; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import com.fasterxml.jackson.annotation.JsonFormat; @Entity @Table(name = "t_jfx_register") public class JFXRegister { private static final long serialVersionUID = 114L; @Id @Column(name = "id") private long id; @Column(name = "phone") private String phone; @Column(name = "bank_card") private String bankCard; @Column(name = "idcard") private String idCard; @Column(name = "merchant_no") private String merchantNo; @Column(name = "rate_one") private String rateOne; @Column(name = "extra_fee_one") private String extraFeeOne; @Column(name = "rate_two") private String rateTwo; @Column(name = "extra_fee_two") private String extraFeeTwo; @Column(name = "create_time") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getBankCard() { return bankCard; } public void setBankCard(String bankCard) { this.bankCard = bankCard; } public String getIdCard() { return idCard; } public void setIdCard(String idCard) { this.idCard = idCard; } public String getMerchantNo() { return merchantNo; } public void setMerchantNo(String merchantNo) { this.merchantNo = merchantNo; } public String getRateOne() { return rateOne; } public void setRateOne(String rateOne) { this.rateOne = rateOne; } public String getExtraFeeOne() { return extraFeeOne; } public void setExtraFeeOne(String extraFeeOne) { this.extraFeeOne = extraFeeOne; } public String getRateTwo() { return rateTwo; } public void setRateTwo(String rateTwo) { this.rateTwo = rateTwo; } public String getExtraFeeTwo() { return extraFeeTwo; } public void setExtraFeeTwo(String extraFeeTwo) { this.extraFeeTwo = extraFeeTwo; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } }
[ "593380806@qq.com" ]
593380806@qq.com
6b146795949584d136754a80de720dd693e3ac99
69276b63e50054ab28fab2c4ff222a9846fd566f
/jpa-inheritence/src/main/java/inheritence/ContractEmployee.java
f978508216945ced76866e9aef3a6006c118e69f
[]
no_license
BirkasTivadar/senior-solutions
2dbde7780edeb7ecd09fa1730a5e9ad7ac446b25
32b691dfabfe93ccedcec7668e3db1492f8ed8f1
refs/heads/master
2023-08-20T18:13:00.221615
2021-10-26T19:11:04
2021-10-26T19:11:04
308,442,029
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
package inheritence; import javax.persistence.Entity; @Entity public class ContractEmployee extends Employee { private int dailyRate; public ContractEmployee() { } public ContractEmployee(String name, int dailyRate) { super(name); this.dailyRate = dailyRate; } public int getDailyRate() { return dailyRate; } public void setDailyRate(int dailyRate) { this.dailyRate = dailyRate; } }
[ "birkastivadar@gmail.com" ]
birkastivadar@gmail.com
653967e48927a90d85028147bb1757d45d32aafa
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/37/org/apache/commons/math/random/RandomData_nextGaussian_164.java
f49b51076dca82429c947be23c02648359ceb31c
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
689
java
org apach common math random random data gener util version random data randomdata gener random normal gaussian distribut standard deviat strong definit strong href http www itl nist gov div898 handbook eda section3 eda3661 htm normal distribut param distribut param sigma standard deviat distribut random gaussian distribut org apach common math except strictli posit except notstrictlypositiveexcept code sigma gaussian nextgaussian sigma
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
e40fbe5f75392f6c6a6c93726b907dfdca2ccc7a
a70919f0ea3904bf2304267990fbcc024ba5a784
/zweb/src/z/pn/server/UserExistsException.java
918dcd44fd136c50ef0da7f35544a604af3a84de
[]
no_license
marszhanglin/zweb
4f549c9ea03c9f8b5e0096f9f1dd09ab2a975f2e
3a50ad2e5906f4d0dda1d2feb77f99c9e0da5f63
refs/heads/master
2021-01-18T23:44:55.326659
2016-07-20T16:05:00
2016-07-20T16:05:00
50,090,671
1
0
null
null
null
null
UTF-8
Java
false
false
1,348
java
/* * Copyright (C) 2010 Moduad Co., Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ package z.pn.server; /** * Thrown if an unique constraint violation occured during saving a user. * * @author Sehwan Noh (devnoh@gmail.com) */ public class UserExistsException extends Exception { private static final long serialVersionUID = 1L; public UserExistsException() { super(); } public UserExistsException(String message) { super(message); } public UserExistsException(Throwable cause) { super(cause); } public UserExistsException(String message, Throwable cause) { super(message, cause); } }
[ "780965203@qq.com" ]
780965203@qq.com
5642e0c1a734e1562532046c8f88548d96d8efe6
e89d45f9e6831afc054468cc7a6ec675867cd3d7
/src/main/java/com/microsoft/graph/requests/extensions/AndroidImportedPFXCertificateProfileRequestBuilder.java
f134548c5457c97dd88977280e0785660ce957e1
[ "MIT" ]
permissive
isabella232/msgraph-beta-sdk-java
67d3b9251317f04a465042d273fe533ef1ace13e
7d2b929d5c99c01ec1af1a251f4bf5876ca95ed8
refs/heads/dev
2023-03-12T05:44:24.349020
2020-11-19T15:51:17
2020-11-19T15:51:17
318,158,544
0
0
MIT
2021-02-23T20:48:09
2020-12-03T10:37:46
null
UTF-8
Java
false
false
7,148
java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.requests.extensions; import com.microsoft.graph.http.IRequestBuilder; import com.microsoft.graph.core.ClientException; import com.microsoft.graph.concurrency.ICallback; import com.microsoft.graph.models.extensions.AndroidImportedPFXCertificateProfile; import com.microsoft.graph.requests.extensions.IManagedDeviceCertificateStateCollectionRequestBuilder; import com.microsoft.graph.requests.extensions.IManagedDeviceCertificateStateRequestBuilder; import com.microsoft.graph.requests.extensions.ManagedDeviceCertificateStateCollectionRequestBuilder; import com.microsoft.graph.requests.extensions.ManagedDeviceCertificateStateRequestBuilder; import java.util.Arrays; import java.util.EnumSet; import com.microsoft.graph.core.IBaseClient; import com.microsoft.graph.http.BaseRequestBuilder; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The class for the Android Imported PFXCertificate Profile Request Builder. */ public class AndroidImportedPFXCertificateProfileRequestBuilder extends BaseRequestBuilder implements IAndroidImportedPFXCertificateProfileRequestBuilder { /** * The request builder for the AndroidImportedPFXCertificateProfile * * @param requestUrl the request URL * @param client the service client * @param requestOptions the options for this request */ public AndroidImportedPFXCertificateProfileRequestBuilder(final String requestUrl, final IBaseClient client, final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { super(requestUrl, client, requestOptions); } /** * Creates the request * * @param requestOptions the options for this request * @return the IAndroidImportedPFXCertificateProfileRequest instance */ public IAndroidImportedPFXCertificateProfileRequest buildRequest(final com.microsoft.graph.options.Option... requestOptions) { return buildRequest(getOptions(requestOptions)); } /** * Creates the request with specific requestOptions instead of the existing requestOptions * * @param requestOptions the options for this request * @return the IAndroidImportedPFXCertificateProfileRequest instance */ public IAndroidImportedPFXCertificateProfileRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { return new com.microsoft.graph.requests.extensions.AndroidImportedPFXCertificateProfileRequest(getRequestUrl(), getClient(), requestOptions); } public IDeviceConfigurationAssignmentCollectionRequestBuilder assignments() { return new DeviceConfigurationAssignmentCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("assignments"), getClient(), null); } public IDeviceConfigurationAssignmentRequestBuilder assignments(final String id) { return new DeviceConfigurationAssignmentRequestBuilder(getRequestUrlWithAdditionalSegment("assignments") + "/" + id, getClient(), null); } public ISettingStateDeviceSummaryCollectionRequestBuilder deviceSettingStateSummaries() { return new SettingStateDeviceSummaryCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("deviceSettingStateSummaries"), getClient(), null); } public ISettingStateDeviceSummaryRequestBuilder deviceSettingStateSummaries(final String id) { return new SettingStateDeviceSummaryRequestBuilder(getRequestUrlWithAdditionalSegment("deviceSettingStateSummaries") + "/" + id, getClient(), null); } public IDeviceConfigurationDeviceStatusCollectionRequestBuilder deviceStatuses() { return new DeviceConfigurationDeviceStatusCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("deviceStatuses"), getClient(), null); } public IDeviceConfigurationDeviceStatusRequestBuilder deviceStatuses(final String id) { return new DeviceConfigurationDeviceStatusRequestBuilder(getRequestUrlWithAdditionalSegment("deviceStatuses") + "/" + id, getClient(), null); } /** * Gets the request builder for DeviceConfigurationDeviceOverview * * @return the IDeviceConfigurationDeviceOverviewRequestBuilder instance */ public IDeviceConfigurationDeviceOverviewRequestBuilder deviceStatusOverview() { return new DeviceConfigurationDeviceOverviewRequestBuilder(getRequestUrlWithAdditionalSegment("deviceStatusOverview"), getClient(), null); } public IDeviceConfigurationGroupAssignmentCollectionRequestBuilder groupAssignments() { return new DeviceConfigurationGroupAssignmentCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("groupAssignments"), getClient(), null); } public IDeviceConfigurationGroupAssignmentRequestBuilder groupAssignments(final String id) { return new DeviceConfigurationGroupAssignmentRequestBuilder(getRequestUrlWithAdditionalSegment("groupAssignments") + "/" + id, getClient(), null); } public IDeviceConfigurationUserStatusCollectionRequestBuilder userStatuses() { return new DeviceConfigurationUserStatusCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("userStatuses"), getClient(), null); } public IDeviceConfigurationUserStatusRequestBuilder userStatuses(final String id) { return new DeviceConfigurationUserStatusRequestBuilder(getRequestUrlWithAdditionalSegment("userStatuses") + "/" + id, getClient(), null); } /** * Gets the request builder for DeviceConfigurationUserOverview * * @return the IDeviceConfigurationUserOverviewRequestBuilder instance */ public IDeviceConfigurationUserOverviewRequestBuilder userStatusOverview() { return new DeviceConfigurationUserOverviewRequestBuilder(getRequestUrlWithAdditionalSegment("userStatusOverview"), getClient(), null); } /** * Gets the request builder for AndroidTrustedRootCertificate * * @return the IAndroidTrustedRootCertificateWithReferenceRequestBuilder instance */ public IAndroidTrustedRootCertificateWithReferenceRequestBuilder rootCertificate() { return new AndroidTrustedRootCertificateWithReferenceRequestBuilder(getRequestUrlWithAdditionalSegment("rootCertificate"), getClient(), null); } public IManagedDeviceCertificateStateCollectionRequestBuilder managedDeviceCertificateStates() { return new ManagedDeviceCertificateStateCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("managedDeviceCertificateStates"), getClient(), null); } public IManagedDeviceCertificateStateRequestBuilder managedDeviceCertificateStates(final String id) { return new ManagedDeviceCertificateStateRequestBuilder(getRequestUrlWithAdditionalSegment("managedDeviceCertificateStates") + "/" + id, getClient(), null); } }
[ "GraphTooling@service.microsoft.com" ]
GraphTooling@service.microsoft.com
6aedda2ba421e44fb9ab6d10ff488aa86b025728
e63363389e72c0822a171e450a41c094c0c1a49c
/Mate20_9_0_0/src/main/java/android/icu/impl/ICUDataVersion.java
d1e6f4fa2268905e19f5bc8761edf370783222e4
[]
no_license
solartcc/HwFrameWorkSource
fc23ca63bcf17865e99b607cc85d89e16ec1b177
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
refs/heads/master
2022-12-04T21:14:37.581438
2020-08-25T04:30:43
2020-08-25T04:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
708
java
package android.icu.impl; import android.icu.util.UResourceBundle; import android.icu.util.VersionInfo; import java.util.MissingResourceException; public final class ICUDataVersion { private static final String U_ICU_DATA_KEY = "DataVersion"; private static final String U_ICU_VERSION_BUNDLE = "icuver"; public static VersionInfo getDataVersion() { UResourceBundle icudatares = null; try { return VersionInfo.getInstance(UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, U_ICU_VERSION_BUNDLE, ICUResourceBundle.ICU_DATA_CLASS_LOADER).get(U_ICU_DATA_KEY).getString()); } catch (MissingResourceException e) { return null; } } }
[ "lygforbs0@gmail.com" ]
lygforbs0@gmail.com
c828fcc6b07068969a571af1ff688deb9c682503
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_277/Testnull_27658.java
244debf26dfe326dcc5e2497f48768368b947b64
[]
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
308
java
package org.gradle.test.performancenull_277; import static org.junit.Assert.*; public class Testnull_27658 { private final Productionnull_27658 production = new Productionnull_27658("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
16a233cd3843e4f0acdc525cdde0657da4b9b232
c64a8e84347832ec0911b73925e871423285d450
/sdklibrary/src/main/java/com/facebook/login/LoginFragment.java
c2c1e9584a97644893cc0553d3c2c6a90738656d
[]
no_license
game-platform-awaresome/GamaterSDK_AS
b2cddff761b895b8c61b05595fac584113be0282
c3e4afa96053ee5f9b6ccde7c373ce2ce1fbfacc
refs/heads/master
2020-04-01T07:26:04.126776
2017-09-18T09:19:48
2017-09-18T09:19:48
152,989,847
1
0
null
null
null
null
UTF-8
Java
false
false
5,504
java
/** * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use * in connection with the web services and APIs provided by Facebook. * * As with any software that integrates with the Facebook platform, your use of * this software is subject to the Facebook Developer Principles and Policies * [http://developers.facebook.com/policy/]. This copyright 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.facebook.login; import com.gamater.util.ResourceUtil; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; /** * This Fragment is a necessary part of the overall Facebook login process but * is not meant to be used directly. * * @see com.facebook.FacebookActivity */ public class LoginFragment extends Fragment { static final String RESULT_KEY = "com.facebook.LoginFragment:Result"; private static final String TAG = "LoginActivityFragment"; private static final String NULL_CALLING_PKG_ERROR_MSG = "Cannot call LoginActivity with a null calling package. " + "This can occur if the launchMode of the caller is singleInstance."; private static final String EXTRA_REQUEST = "request"; private static final String SAVED_LOGIN_CLIENT = "loginClient"; private String callingPackage; private LoginClient loginClient; private LoginClient.Request request; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { loginClient = savedInstanceState.getParcelable(SAVED_LOGIN_CLIENT); loginClient.setFragment(this); } else { loginClient = new LoginClient(this); } callingPackage = getActivity().getCallingActivity().getPackageName(); request = (LoginClient.Request) getActivity().getIntent() .getParcelableExtra(EXTRA_REQUEST); loginClient .setOnCompletedListener(new LoginClient.OnCompletedListener() { @Override public void onCompleted(LoginClient.Result outcome) { onLoginClientCompleted(outcome); } }); } @Override public void onDestroy() { loginClient.cancelCurrentHandler(); super.onDestroy(); } @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { final View view = inflater.inflate( ResourceUtil.getLayoutId("com_facebook_login_fragment"), container, false); loginClient .setBackgroundProcessingListener(new LoginClient.BackgroundProcessingListener() { @Override public void onBackgroundProcessingStarted() { view.findViewById( ResourceUtil .getId("com_facebook_login_activity_progress_bar")) .setVisibility(View.VISIBLE); } @Override public void onBackgroundProcessingStopped() { view.findViewById( ResourceUtil .getId("com_facebook_login_activity_progress_bar")) .setVisibility(View.GONE); } }); return view; } private void onLoginClientCompleted(LoginClient.Result outcome) { request = null; int resultCode = (outcome.code == LoginClient.Result.Code.CANCEL) ? Activity.RESULT_CANCELED : Activity.RESULT_OK; Bundle bundle = new Bundle(); bundle.putParcelable(RESULT_KEY, outcome); Intent resultIntent = new Intent(); resultIntent.putExtras(bundle); getActivity().setResult(resultCode, resultIntent); getActivity().finish(); } @Override public void onResume() { super.onResume(); // If the calling package is null, this generally means that the callee // was started // with a launchMode of singleInstance. Unfortunately, Android does not // allow a result // to be set when the callee is a singleInstance, so we log an error and // return. if (callingPackage == null) { Log.e(TAG, NULL_CALLING_PKG_ERROR_MSG); getActivity().finish(); return; } loginClient.startOrContinueAuth(request); } @Override public void onPause() { super.onPause(); getActivity().findViewById( ResourceUtil.getId("com_facebook_login_activity_progress_bar")) .setVisibility(View.GONE); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); loginClient.onActivityResult(requestCode, resultCode, data); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putParcelable(SAVED_LOGIN_CLIENT, loginClient); } static Bundle populateIntentExtras(LoginClient.Request request) { Bundle extras = new Bundle(); extras.putParcelable(EXTRA_REQUEST, request); return extras; } }
[ "616041023@qq.com" ]
616041023@qq.com
9a18b0abaf4ffb41877121068637c8c86e32608b
d932716790743d0e2ae7db7218fa6d24f9bc85dc
/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestRemoveBillingAddressTest.java
d7bf7f572e77b9acb0de19493fee5e66e1447b79
[ "BSD-3-Clause" ]
permissive
vade/chromium
c43f0c92fdede38e8a9b858abd4fd7c2bb679d9c
35c8a0b1c1a76210ae000a946a17d8979b7d81eb
refs/heads/Syphon
2023-02-28T00:10:11.977720
2017-05-24T16:38:21
2017-05-24T16:38:21
80,049,719
19
3
null
2017-05-24T19:05:34
2017-01-25T19:31:53
null
UTF-8
Java
false
false
5,273
java
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.payments; import static org.chromium.chrome.browser.payments.PaymentRequestTestRule.DECEMBER; import static org.chromium.chrome.browser.payments.PaymentRequestTestRule.FIRST_BILLING_ADDRESS; import static org.chromium.chrome.browser.payments.PaymentRequestTestRule.NEXT_YEAR; import android.content.DialogInterface; import android.support.test.filters.MediumTest; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.Feature; import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.autofill.AutofillTestHelper; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityStartCallback; import org.chromium.chrome.test.ChromeActivityTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; /** * A payment integration test for removing a billing address that is associated with a credit card. */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, }) public class PaymentRequestRemoveBillingAddressTest implements MainActivityStartCallback { @Rule public PaymentRequestTestRule mPaymentRequestTestRule = new PaymentRequestTestRule("payment_request_no_shipping_test.html", this); @Override public void onMainActivityStarted() throws InterruptedException, ExecutionException, TimeoutException { AutofillTestHelper helper = new AutofillTestHelper(); helper.setProfile(new AutofillProfile("", "https://example.com", true, "Jane Smith", "Google", "1600 Amphitheatre Pkwy", "CA", "Mountain View", "", "94043", "", "US", "555-555-5555", "jane.smith@google.com", "en-US")); String billingAddressId = helper.setProfile(new AutofillProfile("", "https://example.com", true, "Jon Doe", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "555-555-5555", "jon.doe@google.com", "en-US")); helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Alice", "4111111111111111", "1111", "1", "2050", "visa", R.drawable.pr_visa, billingAddressId, "" /* serverId */)); helper.deleteProfile(billingAddressId); } /** * The billing address for the credit card has been removed. Using this card should bring up an * editor that requires selecting a new billing address. */ @Test @MediumTest @Feature({"Payments"}) public void testPayWithCard() throws InterruptedException, ExecutionException, TimeoutException { mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getReadyForInput()); // Expand the payment section. mPaymentRequestTestRule.clickInPaymentMethodAndWait( R.id.payments_section, mPaymentRequestTestRule.getReadyForInput()); // Selecting the credit card should bring up the editor. mPaymentRequestTestRule.clickInPaymentMethodAndWait( R.id.payments_first_radio_button, mPaymentRequestTestRule.getReadyToEdit()); // Tapping "save" in the editor should trigger a validation error. mPaymentRequestTestRule.clickInCardEditorAndWait( R.id.payments_edit_done_button, mPaymentRequestTestRule.getEditorValidationError()); // Fix the validation error by selecting a billing address. mPaymentRequestTestRule.setSpinnerSelectionsInCardEditorAndWait( new int[] {DECEMBER, NEXT_YEAR, FIRST_BILLING_ADDRESS}, mPaymentRequestTestRule.getBillingAddressChangeProcessed()); // Tapping "save" in the editor now should close the editor dialog and enable the "pay" // button. mPaymentRequestTestRule.clickInCardEditorAndWait( R.id.payments_edit_done_button, mPaymentRequestTestRule.getReadyToPay()); // Pay with this card. mPaymentRequestTestRule.clickAndWait( R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskInput()); mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask()); mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed()); mPaymentRequestTestRule.expectResultContains(new String[] {"4111111111111111", "Alice", "12", "123", "Jane Smith", "Google", "1600 Amphitheatre Pkwy", "CA", "Mountain View", "94043", "US", "+15555555555", "en-US"}); } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
b70f7ae1bf7d2150efa94491172d5cd229766b9c
d578687c34d9c9cd0162c66045ff680ac9952308
/bpm/bonita-core/bonita-category/bonita-category-api-impl/src/main/java/org/bonitasoft/engine/core/category/persistence/SelectDescriptorBuilder.java
edea6be956739acc422ea0c0af41faf3b2b1f48b
[]
no_license
gdmSISouth/bonita-engine
cdd98c7eff5c3cccc463060211d7d67c80416955
6425cdbaec130b9b0305364578b4d46c0cdba0e5
refs/heads/master
2021-01-15T16:52:15.303888
2013-07-29T13:33:34
2013-07-29T13:33:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,956
java
/** * Copyright (C) 2012-2013 BonitaSoft S.A. * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble * 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 * version 2.1 of the License. * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301, USA. **/ package org.bonitasoft.engine.core.category.persistence; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.bonitasoft.engine.core.category.model.SCategory; import org.bonitasoft.engine.core.category.model.SProcessCategoryMapping; import org.bonitasoft.engine.persistence.OrderByType; import org.bonitasoft.engine.persistence.PersistentObject; import org.bonitasoft.engine.persistence.QueryOptions; import org.bonitasoft.engine.persistence.SelectByIdDescriptor; import org.bonitasoft.engine.persistence.SelectListDescriptor; import org.bonitasoft.engine.persistence.SelectOneDescriptor; /** * @author Yanyan Liu * @author Matthieu Chaffotte * @author Celine Souchet */ public class SelectDescriptorBuilder { private static final String PROCESS_ID = "processId"; public static SelectByIdDescriptor<SCategory> getCategory(final long categoryId) { return new SelectByIdDescriptor<SCategory>("getCategoryById", SCategory.class, categoryId); } public static SelectOneDescriptor<SCategory> getCategory(final String categoryName) { final Map<String, Object> parameters = Collections.singletonMap("name", (Object) categoryName); return new SelectOneDescriptor<SCategory>("getCategoryByName", parameters, SCategory.class); } public static SelectOneDescriptor<Long> getNumberOfElement(final String elementName, final Class<? extends PersistentObject> clazz) { final Map<String, Object> parameters = Collections.emptyMap(); return new SelectOneDescriptor<Long>("getNumberOf" + elementName, parameters, clazz, Long.class); } public static SelectListDescriptor<SCategory> getCategories(final String field, final OrderByType order, final int fromIndex, final int numberOfProcesses) { final Map<String, Object> parameters = Collections.emptyMap(); final QueryOptions queryOptions = new QueryOptions(fromIndex, numberOfProcesses, SCategory.class, field, order); return new SelectListDescriptor<SCategory>("getCategories", parameters, SCategory.class, queryOptions); } public static SelectListDescriptor<Long> getProcessIdsOfCategory(final long categoryId) { final Map<String, Object> parameters = Collections.singletonMap("categoryId", (Object) categoryId); return new SelectListDescriptor<Long>("getProcessIdsOfCategory", parameters, SProcessCategoryMapping.class, Long.class); } public static SelectListDescriptor<SProcessCategoryMapping> getProcessCategoryMappingsOfCategory(final long categoryId) { final Map<String, Object> parameters = Collections.singletonMap("categoryId", (Object) categoryId); return new SelectListDescriptor<SProcessCategoryMapping>("getProcessCategoryMappingsOfCategory", parameters, SProcessCategoryMapping.class); } public static SelectListDescriptor<SProcessCategoryMapping> getProcessCategoryMappingsOfProcess(final long processId) { final Map<String, Object> parameters = Collections.singletonMap(PROCESS_ID, (Object) processId); return new SelectListDescriptor<SProcessCategoryMapping>("getProcessCategoryMappingsOfProcess", parameters, SProcessCategoryMapping.class); } public static SelectListDescriptor<SCategory> getCategoriesOfProcess(final long processId, final int fromIndex, final int numberOfCategories, final OrderByType order) { final Map<String, Object> parameters = Collections.singletonMap(PROCESS_ID, (Object) processId); final QueryOptions queryOptions = new QueryOptions(fromIndex, numberOfCategories, SCategory.class, "name", order); return new SelectListDescriptor<SCategory>("getCategoriesOfProcess", parameters, SCategory.class, queryOptions); } public static SelectListDescriptor<SCategory> getCategoriesUnrelatedToProcess(final long processId, final int fromIndex, final int numberOfCategories, final OrderByType order) { final Map<String, Object> parameters = Collections.singletonMap(PROCESS_ID, (Object) processId); final QueryOptions queryOptions = new QueryOptions(fromIndex, numberOfCategories, SCategory.class, "name", order); return new SelectListDescriptor<SCategory>("getCategoriesUnrelatedToProcess", parameters, SCategory.class, queryOptions); } public static SelectOneDescriptor<Long> getNumberOfCategoriesOfProcess(final long processId) { final Map<String, Object> parameters = Collections.singletonMap(PROCESS_ID, (Object) processId); return new SelectOneDescriptor<Long>("getNumberOfCategoriesOfProcess", parameters, SProcessCategoryMapping.class); } public static SelectOneDescriptor<Long> getNumberOfCategoriesUnrelatedToProcess(final long processId) { final Map<String, Object> parameters = Collections.singletonMap(PROCESS_ID, (Object) processId); return new SelectOneDescriptor<Long>("getNumberOfCategoriesUnrelatedToProcess", parameters, SProcessCategoryMapping.class); } public static SelectOneDescriptor<Long> getNumberOfCategorizedProcessIds(final List<Long> processIds) { final Map<String, Object> parameters = Collections.singletonMap("processIds", (Object) processIds); return new SelectOneDescriptor<Long>("getNumberOfCategorizedProcessIds", parameters, SProcessCategoryMapping.class, Long.class); } public static SelectListDescriptor<Long> getCategorizedProcessIds(final List<Long> processIds) { final Map<String, Object> parameters = Collections.singletonMap("processIds", (Object) processIds); return new SelectListDescriptor<Long>("getCategorizedProcessIds", parameters, SProcessCategoryMapping.class); } public static SelectOneDescriptor<Long> isCategoryExistsInProcess(final long categoryId, final long processDefinitionId) { final Map<String, Object> parameters = new HashMap<String, Object>(2); parameters.put("categoryId", categoryId); parameters.put("processDefinitionId", processDefinitionId); return new SelectOneDescriptor<Long>("isCategoryExistsInProcess", parameters, SProcessCategoryMapping.class); } }
[ "emmanuel.duchastenier@bonitasoft.com" ]
emmanuel.duchastenier@bonitasoft.com
3817b9f9f49ef8cdb5b8162b01eeeab465de34d5
04b1803adb6653ecb7cb827c4f4aa616afacf629
/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/ChannelsUpdater.java
ec14afd247415ff3158433c32811ae9e3758e10a
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
Java
false
false
3,038
java
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.notifications.channels; import android.content.SharedPreferences; import android.os.Build; import org.chromium.base.ContextUtils; import org.chromium.base.VisibleForTesting; import org.chromium.chrome.browser.notifications.NotificationManagerProxyImpl; /** * Contains helper methods for checking if we should update channels and updating them if so. */ public class ChannelsUpdater { @VisibleForTesting static final String CHANNELS_VERSION_KEY = "channels_version_key"; private final ChannelsInitializer mChannelsInitializer; private final SharedPreferences mSharedPreferences; private final boolean mIsAtLeastO; private final int mChannelsVersion; public static ChannelsUpdater getInstance() { return LazyHolder.INSTANCE; } private static class LazyHolder { // If pre-O, initialize with nulls as a small optimization to avoid getting AppContext etc // when we won't need it. It's ok for these parameters to be null when mIsAtLeastO is false. public static final ChannelsUpdater INSTANCE = Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? new ChannelsUpdater(false /* isAtLeastO */, null, null, -1) : new ChannelsUpdater(true /* isAtLeastO */, ContextUtils.getAppSharedPreferences(), new ChannelsInitializer(new NotificationManagerProxyImpl( ContextUtils.getApplicationContext()), ContextUtils.getApplicationContext().getResources()), ChannelDefinitions.CHANNELS_VERSION); } @VisibleForTesting ChannelsUpdater(boolean isAtLeastO, SharedPreferences sharedPreferences, ChannelsInitializer channelsInitializer, int channelsVersion) { mIsAtLeastO = isAtLeastO; mSharedPreferences = sharedPreferences; mChannelsInitializer = channelsInitializer; mChannelsVersion = channelsVersion; } public boolean shouldUpdateChannels() { return mIsAtLeastO && mSharedPreferences.getInt(CHANNELS_VERSION_KEY, -1) != mChannelsVersion; } public void updateChannels() { if (!mIsAtLeastO) return; assert mChannelsInitializer != null; mChannelsInitializer.deleteLegacyChannels(); mChannelsInitializer.initializeStartupChannels(); storeChannelVersionInPrefs(); } public void updateLocale() { if (!mIsAtLeastO) return; assert mChannelsInitializer != null; mChannelsInitializer.updateLocale(ContextUtils.getApplicationContext().getResources()); } private void storeChannelVersionInPrefs() { assert mSharedPreferences != null; mSharedPreferences.edit().putInt(CHANNELS_VERSION_KEY, mChannelsVersion).apply(); } }
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
b63e8a3d3e51863326ea3a953ab4e2103545fae0
995f73d30450a6dce6bc7145d89344b4ad6e0622
/P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/com/android/internal/util/HexDump.java
2f69df700a91e3c6c4d05ecaf986745ba033a85a
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,206
java
package com.android.internal.util; import android.annotation.UnsupportedAppUsage; import android.net.wifi.WifiEnterpriseConfig; import android.text.format.DateFormat; import com.android.internal.midi.MidiConstants; public class HexDump { private static final char[] HEX_DIGITS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', DateFormat.CAPITAL_AM_PM, 'B', 'C', 'D', DateFormat.DAY, 'F'}; private static final char[] HEX_LOWER_CASE_DIGITS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', DateFormat.AM_PM, 'b', 'c', DateFormat.DATE, 'e', 'f'}; public static String dumpHexString(byte[] array) { if (array == null) { return "(null)"; } return dumpHexString(array, 0, array.length); } public static String dumpHexString(byte[] array, int offset, int length) { if (array == null) { return "(null)"; } StringBuilder result = new StringBuilder(); byte[] line = new byte[16]; int lineIndex = 0; result.append("\n0x"); result.append(toHexString(offset)); int i = offset; while (i < offset + length) { if (lineIndex == 16) { result.append(WifiEnterpriseConfig.CA_CERT_ALIAS_DELIMITER); for (int j = 0; j < 16; j++) { if (line[j] <= 32 || line[j] >= 126) { result.append("."); } else { result.append(new String(line, j, 1)); } } result.append("\n0x"); result.append(toHexString(i)); lineIndex = 0; } byte b = array[i]; result.append(WifiEnterpriseConfig.CA_CERT_ALIAS_DELIMITER); result.append(HEX_DIGITS[(b >>> 4) & 15]); result.append(HEX_DIGITS[b & MidiConstants.STATUS_CHANNEL_MASK]); line[lineIndex] = b; i++; lineIndex++; } if (lineIndex != 16) { int count = ((16 - lineIndex) * 3) + 1; for (int i2 = 0; i2 < count; i2++) { result.append(WifiEnterpriseConfig.CA_CERT_ALIAS_DELIMITER); } for (int i3 = 0; i3 < lineIndex; i3++) { if (line[i3] <= 32 || line[i3] >= 126) { result.append("."); } else { result.append(new String(line, i3, 1)); } } } return result.toString(); } public static String toHexString(byte b) { return toHexString(toByteArray(b)); } @UnsupportedAppUsage public static String toHexString(byte[] array) { return toHexString(array, 0, array.length, true); } @UnsupportedAppUsage public static String toHexString(byte[] array, boolean upperCase) { return toHexString(array, 0, array.length, upperCase); } @UnsupportedAppUsage public static String toHexString(byte[] array, int offset, int length) { return toHexString(array, offset, length, true); } public static String toHexString(byte[] array, int offset, int length, boolean upperCase) { char[] digits = upperCase ? HEX_DIGITS : HEX_LOWER_CASE_DIGITS; char[] buf = new char[(length * 2)]; int bufIndex = 0; for (int i = offset; i < offset + length; i++) { byte b = array[i]; int bufIndex2 = bufIndex + 1; buf[bufIndex] = digits[(b >>> 4) & 15]; bufIndex = bufIndex2 + 1; buf[bufIndex2] = digits[b & MidiConstants.STATUS_CHANNEL_MASK]; } return new String(buf); } @UnsupportedAppUsage public static String toHexString(int i) { return toHexString(toByteArray(i)); } public static byte[] toByteArray(byte b) { return new byte[]{b}; } public static byte[] toByteArray(int i) { byte[] array = new byte[4]; array[3] = (byte) (i & 255); array[2] = (byte) ((i >> 8) & 255); array[1] = (byte) ((i >> 16) & 255); array[0] = (byte) ((i >> 24) & 255); return array; } private static int toByte(char c) { if (c >= '0' && c <= '9') { return c - '0'; } if (c >= 'A' && c <= 'F') { return (c - 'A') + 10; } if (c >= 'a' && c <= 'f') { return (c - 'a') + 10; } throw new RuntimeException("Invalid hex char '" + c + "'"); } @UnsupportedAppUsage public static byte[] hexStringToByteArray(String hexString) { int length = hexString.length(); byte[] buffer = new byte[(length / 2)]; for (int i = 0; i < length; i += 2) { buffer[i / 2] = (byte) ((toByte(hexString.charAt(i)) << 4) | toByte(hexString.charAt(i + 1))); } return buffer; } public static StringBuilder appendByteAsHex(StringBuilder sb, byte b, boolean upperCase) { char[] digits = upperCase ? HEX_DIGITS : HEX_LOWER_CASE_DIGITS; sb.append(digits[(b >> 4) & 15]); sb.append(digits[b & MidiConstants.STATUS_CHANNEL_MASK]); return sb; } }
[ "dstmath@163.com" ]
dstmath@163.com
e8c382f6efbebab152721344cada8a9b0235e0cb
e73a3f082bc2dd481713a8d850f7391037182c2f
/chrome/android/java/src/org/chromium/chrome/browser/browserservices/trustedwebactivityui/controller/VerifierDelegate.java
97da95cf54585ffd154f3a8900b3681f95da7957
[ "BSD-3-Clause" ]
permissive
LumiumBrowser/chromium
6dd4a06550807b989d4b113b58c6ea57aaa4b04b
c9e5e9109e714a37a77e67911742251a3f6199ec
refs/heads/master
2023-01-06T11:48:33.045170
2019-10-25T19:38:52
2019-10-25T19:38:52
217,601,634
0
0
BSD-3-Clause
2019-10-25T19:38:53
2019-10-25T19:27:02
null
UTF-8
Java
false
false
1,014
java
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.browserservices.trustedwebactivityui.controller; import org.chromium.base.Promise; import org.chromium.chrome.browser.browserservices.Origin; /** * A Delegate for the {@link Verifier} that provides implementation specific to * Trusted Web Activities, WebAPKs or A2HS as appropriate. */ public interface VerifierDelegate { // TODO(peconn): Make distinction between verify and wasPreviouslyVerified more clear. /** Asynchronously checks whether the given Origin is verified. */ Promise<Boolean> verify(Origin origin); /** Synchronously checks whether verification was successful for the given Origin. */ boolean wasPreviouslyVerified(Origin origin); // TODO(peconn): Get rid of this method. /** Gets the package name of the connected app. */ String getClientPackageName(); }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
03ccaab247b858ed9d8a634fce3b4ba3367b59aa
5ac5f43848b36154198172172e3867d41e6692b2
/src/leetcode/FindandReplacePattern.java
fdc9bf3480c40c4083a5424caaf4f4f2027653ea
[]
no_license
kingraser/leetcode
619aba7e5afe2c1655f1430f23d9c9de8a3ff34b
c1a47d6f83a3f3f6bd1395ed32f0ba42f2885e77
refs/heads/master
2023-08-18T01:35:28.032279
2023-08-09T07:39:59
2023-08-09T07:39:59
41,731,944
0
0
null
null
null
null
UTF-8
Java
false
false
2,378
java
package leetcode; import leetcode.util.TestUtil; import org.junit.Test; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; /** * @author Wit */ public class FindandReplacePattern { /* Given a list of strings words and a string pattern, return a list of words[i] that match pattern. You may return the answer in any order. A word matches the pattern if there exists a permutation of letters p so that after replacing every letter x in the pattern with p(x), we get the desired word. Recall that a permutation of letters is a bijection from letters to letters: every letter maps to another letter, and no two letters map to the same letter. Example 1: Input: words = ["abc","deq","mee","aqq","dkd","ccc"], pattern = "abb" Output: ["mee","aqq"] Explanation: "mee" matches the pattern because there is a permutation {a -> m, b -> e, ...}. "ccc" does not match the pattern because {a -> c, b -> c, ...} is not a permutation, since a and b map to the same letter. Example 2: Input: words = ["a","b","c"], pattern = "a" Output: ["a","b","c"] Constraints: 1 <= pattern.length <= 20 1 <= words.length <= 50 words[i].length == pattern.length pattern and words[i] are lowercase English letters. */ @Test public void test() { TestUtil.testEquals(new Object[][]{ {List.of("mee", "aqq"), new String[]{"abc", "deq", "mee", "aqq", "dkd", "ccc"}, "abb"}, {List.of("a", "b", "c"), new String[]{"a", "b", "c"}, "a"} }); } public List<String> findAndReplacePattern(String[] words, String pattern) { int[] patternArray = getPattern(pattern); return Arrays.stream(words).filter(word -> matches(word, patternArray)).collect(Collectors.toList()); } int[] getPattern(String pattern) { int[] result = new int[pattern.length()]; for (int i = 0, j = 0, k, l, map[] = new int[128]; i < result.length; ) result[i] = (l = map[k = pattern.charAt(i++)]) == 0 ? map[k] = ++j : l; return result; } private boolean matches(String word, int[] pattern) { for (int i = 0, j = 0, k, l, map[] = new int[128]; i < pattern.length; ) if (pattern[i] != ((l = map[k = word.charAt(i++)]) == 0 ? map[k] = ++j : l)) return false; return true; } }
[ "kingraser@gmail.com" ]
kingraser@gmail.com
c79cc224f8e041e8a92a00be19310929dcdb40b7
05a13d640ed10e217f17311c96d3a9d8a4a030c2
/api/src/main/java/com/dumptruckman/minecraft/matchmaker/api/Arena.java
afac38dcf22bf6b682d2c5f671bfb7c919075df7
[]
no_license
dumptruckman/MatchMaker
2b2dc48b2d5f7184d3f785099cbe61cf9eb769df
65ccb175755943487cdc0ed4309f80a449f50cf4
refs/heads/master
2020-05-29T16:33:58.802966
2012-04-14T18:05:01
2012-04-14T18:05:01
3,606,768
0
0
null
null
null
null
UTF-8
Java
false
false
1,006
java
package com.dumptruckman.minecraft.matchmaker.api; import com.dumptruckman.minecraft.matchmaker.api.config.ArenaConfig; import com.dumptruckman.minecraft.matchmaker.api.config.ArenaRecord; import com.dumptruckman.minecraft.matchmaker.api.config.Config; import com.sk89q.worldedit.BlockVector; import com.sk89q.worldedit.CuboidClipboard; import java.io.IOException; /** * Represents a single Arena location in the world. */ public interface Arena extends MMRegion<ArenaConfig>, Iterable<BlockVector> { String getName(); void setName(String name); ArenaMap getMap(); void setMap(ArenaMap map); boolean isMapValid(CuboidClipboard clipboard); ArenaMatch getMatch(); void setMatch(ArenaMatch match) throws IllegalStateException; Config<ArenaConfig> config(); Config<ArenaRecord> record(); /** * Saves the Arena data to database. */ void save(); String getWorld(); void setWorld(String localWorld); }
[ "farachan@gmail.com" ]
farachan@gmail.com
bddc09d8c8468d35e86a3e6b88d283d26cea152e
97e29489566dff2c2b309aebc66c91a69db234a3
/braintreecscockpit/src/com/braintree/cscockpit/widgets/renderers/impl/BraintreeCallContextWidgetRenderer.java
d0de6b1ca1c242f15912a306e2d190d1ae0d6837
[]
no_license
vamshivushakola/Home_asianpaints_b2b
f8ea6568dca3e87375a100c5d9e8f801e702404c
9ea46652e699fc843f8bb55f94a826bb1a9c4fd0
refs/heads/master
2020-12-31T04:56:13.029311
2016-05-22T18:28:48
2016-05-22T18:28:48
58,956,762
0
1
null
null
null
null
UTF-8
Java
false
false
7,859
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package com.braintree.cscockpit.widgets.renderers.impl; import de.hybris.platform.cockpit.events.CockpitEventAcceptor; import de.hybris.platform.cockpit.session.UISessionUtils; import de.hybris.platform.cockpit.widgets.Widget; import de.hybris.platform.cscockpit.session.impl.OrderedConfigurableBrowserArea; import de.hybris.platform.cscockpit.utils.CssUtils; import de.hybris.platform.cscockpit.utils.LabelUtils; import de.hybris.platform.cscockpit.widgets.controllers.CallContextController; import de.hybris.platform.cscockpit.widgets.models.impl.CallContextWidgetModel; import de.hybris.platform.cscockpit.widgets.renderers.impl.CallContextWidgetRenderer; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.api.HtmlBasedComponent; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zul.Div; import org.zkoss.zul.Label; import org.zkoss.zul.Toolbarbutton; public class BraintreeCallContextWidgetRenderer extends CallContextWidgetRenderer { private static final int TRANSACTION_WIDGET_WIDTH = 1050; private static final int NEW_TRANSACTION_WIDGET_WIDTH = 460; private static final int CUSTOMER_WIDGET_WIDTH = 700; @Override protected HtmlBasedComponent createContentInternal(final Widget<CallContextWidgetModel, CallContextController> widget, final HtmlBasedComponent rootContainer) { final CockpitEventAcceptor addressNotificationEventAcceptor = this.createAddressNotificationEventAcceptor(widget); final OrderedConfigurableBrowserArea browserArea = (OrderedConfigurableBrowserArea) UISessionUtils.getCurrentSession() .getCurrentPerspective().getBrowserArea(); browserArea.addNotificationListener(widget.getWidgetCode(), addressNotificationEventAcceptor); final Div content = new Div(); content.appendChild(createSiteContent(widget)); content.appendChild(createCustomerContent(widget)); content.appendChild(createOrderContent(widget)); content.appendChild(createBraintreeContent(widget)); content.appendChild(createBraintreeCustomerContent(widget)); content.appendChild(createTicketContent(widget)); content.appendChild(createCurrencyContent(widget)); content.appendChild(createEndCallContent(widget)); return content; } protected Component createBraintreeContent(final Widget<CallContextWidgetModel, CallContextController> widget) { final Div container = new Div(); container.setClass("csCallContextContainer"); final Div transactionInfoContainer = new Div(); transactionInfoContainer.setParent(container); final Label customerLabel = new Label(LabelUtils.getLabel(widget, "braintree", new Object[0])); customerLabel.setSclass(CssUtils.combine("infoLabel")); customerLabel.setParent(transactionInfoContainer); findTransactionContent(widget, container); newTransactionContent(widget, container); newTransactionByTokenContent(widget, container); return container; } private void findTransactionContent(final Widget<CallContextWidgetModel, CallContextController> widget, final Div container) { final Toolbarbutton searchBraintreeTransactionBtn = new Toolbarbutton(LabelUtils.getLabel(widget, "findTransaction", new Object[0])); searchBraintreeTransactionBtn.setParent(container); searchBraintreeTransactionBtn.setSclass(CssUtils.combine("csCallContextContainerPopupBtn", "blueLink")); searchBraintreeTransactionBtn.addEventListener("onClick", new EventListener() { @Override public void onEvent(final Event event) throws Exception { handleOpenBraintreeTransactionSearchEvent(widget, event, container); } }); } private void newTransactionContent(final Widget<CallContextWidgetModel, CallContextController> widget, final Div container) { final Toolbarbutton newTransactionBtn = new Toolbarbutton(LabelUtils.getLabel(widget, "createTransaction", new Object[0])); newTransactionBtn.setParent(container); newTransactionBtn.setSclass(CssUtils.combine("csCallContextContainerPopupBtn", "blueLink")); newTransactionBtn.addEventListener("onClick", new EventListener() { @Override public void onEvent(final Event event) throws Exception { handleOpenCreateBraintreeTransactionEvent(widget, event, container); } }); } private void newTransactionByTokenContent(final Widget<CallContextWidgetModel, CallContextController> widget, final Div container) { final Toolbarbutton newTransactionBtn = new Toolbarbutton(LabelUtils.getLabel(widget, "createByTokenTransaction", new Object[0])); newTransactionBtn.setParent(container); newTransactionBtn.setSclass(CssUtils.combine("csCallContextContainerPopupBtn", "blueLink")); newTransactionBtn.addEventListener("onClick", new EventListener() { @Override public void onEvent(final Event event) throws Exception { handleOpenCreateBraintreeTransactionByTokenEvent(widget, event, container); } }); } protected Component createBraintreeCustomerContent(final Widget<CallContextWidgetModel, CallContextController> widget) { final Div container = new Div(); container.setClass("csCallContextContainer"); final Div customerInfoContainer = new Div(); customerInfoContainer.setParent(container); final Toolbarbutton searchBraintreeCustomerBtn = new Toolbarbutton(LabelUtils.getLabel(widget, "findBraintreeCustomer", new Object[0])); searchBraintreeCustomerBtn.setParent(container); searchBraintreeCustomerBtn.setSclass(CssUtils.combine("csCallContextContainerPopupBtn", "blueLink")); searchBraintreeCustomerBtn.addEventListener("onClick", new EventListener() { @Override public void onEvent(final Event event) throws Exception { handleOpenBraintreeCustomerSearchEvent(widget, event, container); } }); return container; } protected void handleOpenBraintreeTransactionSearchEvent(final Widget widget, final Event event, final Div container) { this.getPopupWidgetHelper().createPopupWidget(container, "csBraintreeTransactionSearchWidgetConfig", "csBraintreeTransactionSearchWidget-Popup", "csBraintreeTransactionSearchPopup", LabelUtils.getLabel(widget, "popup.btTransactionSearchTitle", new Object[0]), TRANSACTION_WIDGET_WIDTH); } private void handleOpenBraintreeCustomerSearchEvent(final Widget widget, final Event event, final Div container) { this.getPopupWidgetHelper().createPopupWidget(container, "csBraintreeCustomerSearchWidgetConfig", "csBraintreeCustomerSearchWidget-Popup", "csBraintreeCustomerSearchPopup", LabelUtils.getLabel(widget, "popup.btCustomerSearchTitle", new Object[0]), CUSTOMER_WIDGET_WIDTH); } private void handleOpenCreateBraintreeTransactionEvent(final Widget<CallContextWidgetModel, CallContextController> widget, final Event event, final Div container) { this.getPopupWidgetHelper().createPopupWidget(container, "defaultCsNewTransactionWidgetConfig", "csBraintreeNewTransactionWidget-Popup", "csBraintreeNewTransactionPopup", LabelUtils.getLabel(widget, "popup.btNewTransactionTitle", new Object[0]), NEW_TRANSACTION_WIDGET_WIDTH); } private void handleOpenCreateBraintreeTransactionByTokenEvent( final Widget<CallContextWidgetModel, CallContextController> widget, final Event event, final Div container) { this.getPopupWidgetHelper().createPopupWidget(container, "defaultCsNewTransactionByTokenWidgetConfig", "csBraintreeNewTransactionWidget-Popup", "csBraintreeNewTransactionPopup", LabelUtils.getLabel(widget, "popup.btNewTransactionTitle", new Object[0]), NEW_TRANSACTION_WIDGET_WIDTH); } }
[ "vamshi.vshk@gmail.com" ]
vamshi.vshk@gmail.com
982703db9c4903816a49a710cec9a1a1aabdc370
7a637e9654f3b6720d996e9b9003f53e40f94814
/aylson-dao/src/main/java/com/aylson/dc/pioneer/vo/PioneerAgentVo.java
a79f7f140e2f98b5664f775f5d7119891cc6311a
[]
no_license
hemin1003/aylson-parent
118161fc9f7a06b583aa4edd23d36bdd6e000f33
1a2a4ae404705871717969449370da8531028ff9
refs/heads/master
2022-12-26T14:12:19.452615
2019-09-20T01:58:40
2019-09-20T01:58:40
97,936,256
161
103
null
2022-12-16T07:38:18
2017-07-21T10:30:03
JavaScript
UTF-8
Java
false
false
1,644
java
package com.aylson.dc.pioneer.vo; import java.util.List; import com.aylson.dc.pioneer.po.PioneerAgent; public class PioneerAgentVo extends PioneerAgent{ private static final long serialVersionUID = 6017528812010789132L; private String submitter; //ๆไบคไบบ่ดฆๅทๅ private String submitterRealName; //ๆไบคไบบๅง“ๅ private String submitterPhone; //ๆไบคไบบ็”ต่ฏ private Integer submitterReferral; //ๆไบคไบบ็š„ๆŽจ่ไบบ private String wxOpenId; //ๅพฎไฟกid private List<String> shopImgList; //้—จๅบ—ๅ›พ็‰‡ๅˆ—่กจ public String getSubmitter() { return submitter; } public void setSubmitter(String submitter) { this.submitter = submitter; } public String getSubmitterRealName() { return submitterRealName; } public void setSubmitterRealName(String submitterRealName) { this.submitterRealName = submitterRealName; } public String getSubmitterPhone() { return submitterPhone; } public void setSubmitterPhone(String submitterPhone) { this.submitterPhone = submitterPhone; } public Integer getSubmitterReferral() { return submitterReferral; } public void setSubmitterReferral(Integer submitterReferral) { this.submitterReferral = submitterReferral; } public String getWxOpenId() { return wxOpenId; } public void setWxOpenId(String wxOpenId) { this.wxOpenId = wxOpenId; } public List<String> getShopImgList() { return shopImgList; } public void setShopImgList(List<String> shopImgList) { this.shopImgList = shopImgList; } }
[ "hemin_it@163.com" ]
hemin_it@163.com
35196f0579d01ac1dd8f6857809b279e7b5f2cf7
3f2a61d5ecc1f974785e837258da29c899ee33d2
/oop/src/main/java/com/bvan/jc/oop/textsearcher/spec/Counter.java
f0b73e7f6a5eef4acb2f9be9d1ff3d550460bead
[]
no_license
bohdanvan/bvan-java-community
5a770060507b11f6abc72c1b676dd9586643cf58
d3f6d3d9f153d98e0b418fe094bbf73bda665768
refs/heads/master
2021-01-12T16:27:28.173650
2016-12-25T15:41:10
2016-12-25T15:44:24
69,152,199
0
1
null
null
null
null
UTF-8
Java
false
false
135
java
package com.bvan.jc.oop.textsearcher.spec; /** * @author bvanchuhov */ public interface Counter<T> { int count(Spec<T> spec); }
[ "bodya.van@gmail.com" ]
bodya.van@gmail.com
085eb4bea440e94e8939eb371b2fac0046d735fa
8065e6cbb5b1bbf3c1c0cc90e83364602c6c5eb7
/collect_app/src/main/java/org/odk/collect/android/notifications/NotificationManagerNotifier.java
05931ed194a231ac7c48ad2c9281f1ae96d8167f
[ "Apache-2.0" ]
permissive
nshestiuk/collect
77876e26dcfbd0cc71af113c327666fabaff7302
6a3051c6268e23205ad21d5960f8ea82b4d0886b
refs/heads/master
2021-07-02T18:58:17.987332
2020-08-31T15:21:54
2020-08-31T15:21:54
151,015,799
0
0
NOASSERTION
2020-09-01T01:57:38
2018-09-30T23:23:41
Java
UTF-8
Java
false
false
7,709
java
package org.odk.collect.android.notifications; import android.app.Application; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.Configuration; import android.content.res.Resources; import org.odk.collect.android.R; import org.odk.collect.android.activities.FillBlankFormActivity; import org.odk.collect.android.activities.FormDownloadListActivity; import org.odk.collect.android.activities.NotificationActivity; import org.odk.collect.android.formmanagement.FormApiExceptionMapper; import org.odk.collect.android.formmanagement.ServerFormDetails; import org.odk.collect.android.openrosa.api.FormApiException; import org.odk.collect.android.preferences.MetaKeys; import org.odk.collect.android.preferences.PreferencesProvider; import org.odk.collect.android.utilities.LocaleHelper; import org.odk.collect.android.utilities.NotificationUtils; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; import javax.annotation.Nullable; import static android.content.Context.NOTIFICATION_SERVICE; import static java.util.Collections.emptySet; import static java.util.stream.Collectors.toSet; import static org.odk.collect.android.activities.FormDownloadListActivity.DISPLAY_ONLY_UPDATED_FORMS; import static org.odk.collect.android.utilities.ApplicationConstants.RequestCodes.FORMS_DOWNLOADED_NOTIFICATION; import static org.odk.collect.android.utilities.ApplicationConstants.RequestCodes.FORMS_UPLOADED_NOTIFICATION; import static org.odk.collect.android.utilities.ApplicationConstants.RequestCodes.FORM_UPDATES_AVAILABLE_NOTIFICATION; import static org.odk.collect.android.utilities.NotificationUtils.showNotification; public class NotificationManagerNotifier implements Notifier { private final Application application; private final NotificationManager notificationManager; private final PreferencesProvider preferencesProvider; private static final int FORM_UPDATE_NOTIFICATION_ID = 0; private static final int FORM_SYNC_NOTIFICATION_ID = 1; private static final int AUTO_SEND_RESULT_NOTIFICATION_ID = 1328974928; public NotificationManagerNotifier(Application application, PreferencesProvider preferencesProvider) { this.application = application; notificationManager = (NotificationManager) application.getSystemService(NOTIFICATION_SERVICE); this.preferencesProvider = preferencesProvider; } @Override public void onUpdatesAvailable(List<ServerFormDetails> updates) { SharedPreferences metaPrefs = preferencesProvider.getMetaSharedPreferences(); Set<String> updateId = updates.stream().map(f -> f.getFormId() + f.getHash() + f.getManifestFileHash()).collect(toSet()); if (metaPrefs.getStringSet(MetaKeys.LAST_UPDATED_NOTIFICATION, emptySet()).equals(updateId)) { return; } Intent intent = new Intent(application, FormDownloadListActivity.class); intent.putExtra(DISPLAY_ONLY_UPDATED_FORMS, true); PendingIntent contentIntent = PendingIntent.getActivity(application, FORM_UPDATES_AVAILABLE_NOTIFICATION, intent, PendingIntent.FLAG_UPDATE_CURRENT); Resources localizedResources = getLocalizedResources(application); showNotification( application, notificationManager, localizedResources.getString(R.string.form_updates_available), null, contentIntent, FORM_UPDATE_NOTIFICATION_ID ); metaPrefs.edit() .putStringSet(MetaKeys.LAST_UPDATED_NOTIFICATION, updateId) .apply(); } @Override public void onUpdatesDownloaded(HashMap<ServerFormDetails, String> result) { Resources localizedResources = getLocalizedResources(application); Intent intent = new Intent(application, NotificationActivity.class); intent.putExtra(NotificationActivity.NOTIFICATION_TITLE, localizedResources.getString(R.string.download_forms_result)); intent.putExtra(NotificationActivity.NOTIFICATION_MESSAGE, FormDownloadListActivity.getDownloadResultMessage(result)); PendingIntent contentIntent = PendingIntent.getActivity(application, FORMS_DOWNLOADED_NOTIFICATION, intent, PendingIntent.FLAG_UPDATE_CURRENT); showNotification( application, notificationManager, localizedResources.getString(R.string.odk_auto_download_notification_title), localizedResources.getString(allFormsDownloadedSuccessfully(application, result) ? R.string.success : R.string.failures), contentIntent, FORM_UPDATE_NOTIFICATION_ID ); } @Override public void onSync(@Nullable FormApiException exception) { if (exception != null) { Intent intent = new Intent(application, FillBlankFormActivity.class); PendingIntent contentIntent = PendingIntent.getActivity(application, FORM_SYNC_NOTIFICATION_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT); Resources localizedResources = getLocalizedResources(application); showNotification( application, notificationManager, localizedResources.getString(R.string.form_update_error), new FormApiExceptionMapper(localizedResources).getMessage(exception), contentIntent, FORM_SYNC_NOTIFICATION_ID ); } else { notificationManager.cancel(FORM_SYNC_NOTIFICATION_ID); } } @Override public void onSubmission(boolean failure, String message) { Resources localizedResources = getLocalizedResources(application); Intent notifyIntent = new Intent(application, NotificationActivity.class); notifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); notifyIntent.putExtra(NotificationActivity.NOTIFICATION_TITLE, localizedResources.getString(R.string.upload_results)); notifyIntent.putExtra(NotificationActivity.NOTIFICATION_MESSAGE, message.trim()); PendingIntent pendingNotify = PendingIntent.getActivity(application, FORMS_UPLOADED_NOTIFICATION, notifyIntent, PendingIntent.FLAG_UPDATE_CURRENT); NotificationUtils.showNotification( application, (NotificationManager) application.getSystemService(Context.NOTIFICATION_SERVICE), localizedResources.getString(R.string.odk_auto_note), failure ? localizedResources.getString(R.string.failures) : localizedResources.getString(R.string.success), pendingNotify, AUTO_SEND_RESULT_NOTIFICATION_ID ); } private boolean allFormsDownloadedSuccessfully(Context context, HashMap<ServerFormDetails, String> result) { for (Map.Entry<ServerFormDetails, String> item : result.entrySet()) { if (!item.getValue().equals(context.getString(R.string.success))) { return false; } } return true; } // The application context will give us the system's locale private Resources getLocalizedResources(Context context) { Configuration conf = context.getResources().getConfiguration(); conf = new Configuration(conf); conf.setLocale(new Locale(LocaleHelper.getLocaleCode(context))); Context localizedContext = context.createConfigurationContext(conf); return localizedContext.getResources(); } }
[ "callum@seadowg.com" ]
callum@seadowg.com
241255dc0e6583cc610a0f66b5698b2b3edb7281
8e3808e0570cce407027e4bb05a77ecf0c1d05e6
/cj.studio.ecm.corelib/src/cj/studio/ecm/container/registry/JsonServiceDefinition.java
a0a017023830539f2a6b2700a2c488e42345d10d
[]
no_license
carocean/cj.studio.ecm
22bdfa9dc339f76ffc635dcd8d8d7fb49017f0c3
b1e4594b51e738cf70ed2e91195b76e070ddc719
refs/heads/master
2021-07-06T12:03:48.715469
2020-07-26T05:57:18
2020-07-26T05:57:18
151,696,042
5
1
null
null
null
null
UTF-8
Java
false
false
189
java
package cj.studio.ecm.container.registry; public class JsonServiceDefinition extends ServiceDefinition { public JsonServiceDefinition() { // TODO Auto-generated constructor stub } }
[ "carocean.jofers@icloud.com" ]
carocean.jofers@icloud.com
209c92fad36d4587eef777bb6b7335539c3aa9fa
979a5622440bf604d0853c0503adeee1fbe2e016
/src/main/java/cn/hctech2006/product/product/bean/Input.java
74e5999fda7cb351b3bdfd271893286caef2db4e
[]
no_license
lidengyin/product
ff118d7a1471b996f3161f9921257c2c4ee67ad8
b9108bdbcdbda4428351b4ea5b180a1715144a3b
refs/heads/master
2022-11-12T06:34:27.582674
2020-05-29T08:22:48
2020-05-29T08:22:48
267,805,013
0
0
null
2020-06-15T22:05:02
2020-05-29T08:21:59
Java
UTF-8
Java
false
false
2,929
java
package cn.hctech2006.product.product.bean; import java.io.Serializable; import java.util.Date; public class Input implements Serializable { private Long id; private Integer number; private Long price; private String commit; private String providerId; private Date time; private String operatorId; private String sponsor; private String type; private String goodsId; private String inputId; private static final long serialVersionUID = 1L; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Integer getNumber() { return number; } public void setNumber(Integer number) { this.number = number; } public Long getPrice() { return price; } public void setPrice(Long price) { this.price = price; } public String getCommit() { return commit; } public void setCommit(String commit) { this.commit = commit; } public String getProviderId() { return providerId; } public void setProviderId(String providerId) { this.providerId = providerId; } public Date getTime() { return time; } public void setTime(Date time) { this.time = time; } public String getOperatorId() { return operatorId; } public void setOperatorId(String operatorId) { this.operatorId = operatorId; } public String getSponsor() { return sponsor; } public void setSponsor(String sponsor) { this.sponsor = sponsor; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getGoodsId() { return goodsId; } public void setGoodsId(String goodsId) { this.goodsId = goodsId; } public String getInputId() { return inputId; } public void setInputId(String inputId) { this.inputId = inputId; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", number=").append(number); sb.append(", price=").append(price); sb.append(", commit=").append(commit); sb.append(", providerId=").append(providerId); sb.append(", time=").append(time); sb.append(", operatorId=").append(operatorId); sb.append(", sponsor=").append(sponsor); sb.append(", type=").append(type); sb.append(", goodsId=").append(goodsId); sb.append(", inputId=").append(inputId); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }
[ "2743853037@qq.com" ]
2743853037@qq.com
635e600cebf47a240a666d74c7bffa88adb56b17
af8f2d1b600d794aea496f5f8005a20ed016960b
/basedata/trunk/src/java/net/zdsoft/eis/base/data/dao/impl/BaseOrderDaoImpl.java
350268e2ab63e60bdd788a719cdb62a3b94bac7e
[]
no_license
thyjxcf/learn
46c033f8434c0b0b0809e2a6b1d5601910b36c0d
99b9e04aa9c0e7ee00571dffb8735283cf33b1c1
refs/heads/master
2021-01-06T20:43:53.071081
2017-09-15T10:11:53
2017-09-15T10:11:53
99,546,817
0
0
null
null
null
null
UTF-8
Java
false
false
3,288
java
package net.zdsoft.eis.base.data.dao.impl; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; import java.util.Date; import org.apache.commons.lang.StringUtils; import net.zdsoft.eis.base.common.entity.Order; import net.zdsoft.eis.base.data.dao.BaseOrderDao; import net.zdsoft.eis.base.sync.EventSourceType; import net.zdsoft.eis.frame.client.BaseDao; public class BaseOrderDaoImpl extends BaseDao<Order> implements BaseOrderDao { private static final String SQL_INSERT_ORDER = "INSERT INTO base_order(id,customer_id,customer_type," + "ware_id,start_time,end_time,state,creation_time," + "server_id,pay_type,region_code,event_source,is_deleted) " + "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)"; private static final String SQL_DELETE_ORDER_BY_IDS = "UPDATE base_order SET is_deleted = 1,event_source=? WHERE id IN "; private static final String SQL_UPDATE_ORDER = "UPDATE base_order SET customer_id=?,customer_type=?," + "ware_id=?,start_time=?,end_time=?,state=?," + "server_id=?,pay_type=?,region_code=?,event_source=?,is_deleted=? WHERE id=?"; public Order setField(ResultSet rs) throws SQLException { Order order = new Order(); order.setId(rs.getString("id")); order.setCustomerId(rs.getString("customer_id")); order.setCustomerType(rs.getInt("customer_type")); order.setWareId(rs.getString("ware_id")); order.setStartTime(rs.getTimestamp("start_time")); order.setEndTime(rs.getTimestamp("end_time")); order.setState(rs.getInt("state")); order.setCreationTime(rs.getTimestamp("creation_time")); order.setServerId(rs.getLong("server_id")); order.setPayType(rs.getInt("pay_type")); order.setRegionCode(rs.getString("region_code")); return order; } @Override public void deleteOrder(String[] ids, EventSourceType eventSource) { updateForInSQL(SQL_DELETE_ORDER_BY_IDS, new Object[] { eventSource .getValue() }, ids); } @Override public void insertOrder(Order order) { if (StringUtils.isEmpty(order.getId())) { order.setId(createId()); } order.setCreationTime(new Date()); order.setModifyTime(new Date()); order.setIsdeleted(false); update(SQL_INSERT_ORDER, new Object[] { order.getId(), order.getCustomerId(), order.getCustomerType(), order.getWareId(), order.getStartTime(), order.getEndTime(), order.getState(), order.getCreationTime(), order.getServerId(), order.getPayType(), order.getRegionCode(), order.getEventSourceValue(), order.getIsdeleted() ? 1 : 0 }, new int[] { Types.CHAR, Types.CHAR, Types.INTEGER, Types.CHAR, Types.DATE, Types.DATE, Types.INTEGER, Types.TIMESTAMP, Types.INTEGER, Types.INTEGER, Types.CHAR, Types.INTEGER, Types.INTEGER }); } @Override public void updateOrder(Order order) { update(SQL_UPDATE_ORDER, new Object[] { order.getCustomerId(), order.getCustomerType(), order.getWareId(), order.getStartTime(), order.getEndTime(), order.getState(), order.getServerId(), order.getPayType(), order.getRegionCode(), order.getEventSourceValue(), order.getIsdeleted() ? 1 : 0, order.getId() }, new int[] { Types.CHAR, Types.INTEGER, Types.CHAR, Types.DATE, Types.DATE, Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.CHAR, Types.INTEGER, Types.INTEGER, Types.CHAR }); } }
[ "1129820421@qq.com" ]
1129820421@qq.com
05b831da16eb12acdb93e56a8856bff45da74a2c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_ee3fab88ca5969967d83e210635e77068334120d/DogUtil/1_ee3fab88ca5969967d83e210635e77068334120d_DogUtil_t.java
d27cce395ca864b4887d9dcf0a5ad0a1b1897b6f
[]
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
7,126
java
package mx.ferreyra.dogapp; import android.app.Application; import android.content.ComponentName; import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.content.pm.PackageInfo; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Build; import com.facebook.android.AsyncFacebookRunner; import com.facebook.android.Facebook; import com.facebook.android.Util; import com.google.android.apps.analytics.GoogleAnalyticsTracker; public class DogUtil extends Application { public static final String DEBUG_TAG = "DogChowMx"; public static final int DOGWELFARE = 0x01; public static final int STATISTICS = 0x02; public static final int LOAD_ROUTE = 0x03; public static final int NEW_ROUTE = 0x04; public static final int DOG_PROFILE = 0x05; /** * Id for user logged. */ private Integer currentUserId; /** * Id for dog registered. */ private Integer currentDogId; /** * Singleton reference for application object. */ private static DogUtil app; public static final String FACEBOOK_APPID = "360694843999854"; public static final String GOGGLE_ANALYTICS_TRACK_ID = "UA-27608007-1"; public Facebook mFacebook; private AsyncFacebookRunner mAsyncRunner; private String routeName; private static String DEVICE_ID; private GoogleAnalyticsTracker gTracker; public static int TRACKER_VALUE = 55613156; private static final String[] PERMISSIONS = new String[] {Utilities.PERMISSION_OFFLINE_ACCESS, Utilities.PERMISSION_USER_RELATIONSHIP, Utilities.PERMISSION_EMAIL, Utilities.PERMISSION_PUBLISH_STREAM, Utilities.PERMISSION_READ_STREAM}; public String getRouteName() { return routeName; } public void setRouteName(String routeName) { this.routeName = routeName; } public void onCreate() { super.onCreate(); if(app == null) app = this; // Loading preferences loadCurrentUserId(); initFacebook(); if(gTracker == null){ gTracker = GoogleAnalyticsTracker.getInstance(); gTracker.startNewSession(GOGGLE_ANALYTICS_TRACK_ID, this); setTrackerInformation(); } } public void initFacebook(){ if(DogUtil.FACEBOOK_APPID == null) { Util.showAlert(getApplicationContext(), getResources().getString(R.string.warning), getResources().getString(R.string.invalid_facebook_id)); } if(mFacebook ==null) mFacebook = new Facebook(DogUtil.FACEBOOK_APPID); if(mAsyncRunner ==null) mAsyncRunner = new AsyncFacebookRunner(mFacebook); } public Facebook getFacebook(){ return mFacebook; } public AsyncFacebookRunner getAsyncFacebookRunner(){ return mAsyncRunner; } public String[] getPermissions(){ return PERMISSIONS; } public GoogleAnalyticsTracker getTracker(){ if(gTracker == null){ gTracker = GoogleAnalyticsTracker.getInstance(); gTracker.startNewSession(GOGGLE_ANALYTICS_TRACK_ID, this); } return gTracker; } public void setTrackerInformation(){ gTracker.setCustomVar(1, "Application Details", "Android, "+getVersionName(this, DogUtil.class) +", "+ Build.MODEL+ ", "+android.os.Build.VERSION.RELEASE , 1); } public static String getVersionName(Context context, Class cls) { try { return context.getPackageManager() .getPackageInfo(new ComponentName(context, cls).getPackageName() , 0).versionName; } catch(NameNotFoundException e) { return null; } } public static boolean checkNumber(String string){ try { for(int i=0; i<string.length(); i++) if (!Character.isDigit(string.charAt(i))) return false; return true; } catch(NumberFormatException e) { return false; } } public static void setDeviceID(String deviceId){ DogUtil.DEVICE_ID = deviceId; } public static String getDeviceUniqueNumber(){ return DogUtil.DEVICE_ID; } public static DogUtil getInstance() { return app; } public Integer getCurrentUserId() { return this.currentUserId; } public void loadCurrentUserId() { SharedPreferences pref = getSharedPreferences(getString(R.string.preferences_name), 0); int possible = pref.getInt(getString(R.string.preference_user_id), -1); this.currentUserId = possible>=0 ? possible : null; } public void saveCurrentUserId(Integer userId) { // Store user id on preferences SharedPreferences pref = getSharedPreferences(getString(R.string.preferences_name), 0); Editor e = pref.edit(); e.putInt(getString(R.string.preference_user_id), userId); e.putString(Utilities.USER_ID, userId.toString()); e.commit(); // Reload value this.currentUserId = userId; } public Integer getCurrentDogId() { return this.currentDogId; } public void loadCurrentDogId() { SharedPreferences pref = getSharedPreferences(getString(R.string.preferences_name), 0); int possible = pref.getInt(getString(R.string.preference_dog_id), -1); this.currentDogId = possible>=0 ? possible : null; } public void deleteCurrentUserId(){ SharedPreferences pref = getSharedPreferences(getString(R.string.preferences_name), 0); Editor e = pref.edit(); e.remove(getString(R.string.preference_user_id)); e.remove(Utilities.USER_ID); e.commit(); currentUserId = null; } public void saveCurrentDogId(Integer dogId) { SharedPreferences pref = getSharedPreferences(getString(R.string.preferences_name), 0); Editor e = pref.edit(); if(dogId == null || dogId < 0) { // Store dog id on preferences e.remove(getString(R.string.preference_dog_id)); e.commit(); // Reload value this.currentDogId = null; } else { // Store dog id on preferences e.putInt(getString(R.string.preference_dog_id), dogId); e.commit(); // Reload value this.currentDogId = dogId; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ae1843db990b69f16f3f67417abd4fb8290c7199
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5630113748090880_0/java/Tellmarch/ExoB.java
47d4b2f5f7aad97cc39b14839531616b6a39121c
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
4,685
java
package gcj2016.r1a; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.PrintWriter; import java.util.Scanner; import java.util.logging.Level; import java.util.logging.Logger; public class ExoB { public static void main(final String[] args) { final String base = "/home/jfortin/workspace-gcj/Codejam2016/r1a/ExoB/"; final String input = base + "s2.in"; final String output = base + "s2.out"; try { final Scanner sc = new Scanner(new FileReader(input)); final PrintWriter pw = new PrintWriter(output); final int n = sc.nextInt(); sc.nextLine(); for (int c = 0; c < n; c++) { System.out.println("Test case " + (c + 1) + "..."); pw.print("Case #" + (c + 1) + ": "); test(sc, pw); pw.println(); } pw.println(); pw.flush(); pw.close(); sc.close(); } catch (final FileNotFoundException ex) { Logger.getLogger(ExoB.class.getName()).log(Level.SEVERE, null, ex); } } private static void test(final Scanner sc, final PrintWriter pw) { int N = sc.nextInt(); int[][] in = new int[2 * N - 1][N]; for (int i = 0; i < 2 * N - 1; i++) { for (int j = 0; j < N; j++) { in[i][j] = sc.nextInt(); } } int pow = (int) Math.pow(2, N); for (int choices = 0; choices < pow; choices++) { try { boolean[] used = new boolean[2 * N - 1]; int[][] grid = new int[N][N]; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { grid[i][j] = -1; } } solve(in, used, grid, 0, N, choices, pw); break; } catch (Exception e) { // System.out.println("Invalid"); } } } private static void solve(final int[][] in, final boolean[] used, final int[][] grid, final int o, final int N, final int choices, final PrintWriter pw) { // printGrid(grid, N); if (o == N) { findMissing(in, grid, N, pw); return; } int min = Integer.MAX_VALUE; int i1 = -1; int i2 = -1; for (int i = 0; i < 2 * N - 1; i++) { if (!used[i] && in[i][o] <= min) { if (in[i][o] < min) { i1 = i; i2 = -1; } else { i2 = i; } min = in[i][o]; } } if (i1 != -1) { used[i1] = true; } if (i2 != -1) { used[i2] = true; } // System.out.println("i1: " + i1 + ", i2: " + i2); if (((choices >> o) & 1) == 0) { if (i1 != -1) { copyRow(in, grid, o, N, i1); } if (i2 != -1) { copyColumn(in, grid, o, N, i2); } } else { if (i1 != -1) { copyColumn(in, grid, o, N, i1); } if (i2 != -1) { copyRow(in, grid, o, N, i2); } } solve(in, used, grid, o + 1, N, choices, pw); } private static void findMissing(final int[][] in, final int[][] grid, final int N, final PrintWriter pw) { boolean[] used = new boolean[2 * N - 1]; outer: for (int c = 0; c < N; c++) { for (int i = 0; i < 2 * N - 1; i++) { if (!used[i]) { boolean id = true; for (int k = 0; k < N; k++) { if (grid[c][k] != in[i][k]) { id = false; } } if (id) { used[i] = true; continue outer; } } } for (int k = 0; k < N; k++) { pw.print(grid[c][k] + " "); } return; } outer: for (int c = 0; c < N; c++) { for (int i = 0; i < 2 * N - 1; i++) { if (!used[i]) { boolean id = true; for (int k = 0; k < N; k++) { if (grid[k][c] != in[i][k]) { id = false; } } if (id) { used[i] = true; continue outer; } } } for (int k = 0; k < N; k++) { pw.print(grid[k][c] + " "); } return; } } private static void copyColumn(final int[][] in, final int[][] grid, final int o, final int N, final int i2) { for (int i = 0; i < N; i++) { if (grid[i][o] != -1 && grid[i][o] != in[i2][i]) { throw new RuntimeException(); } grid[i][o] = in[i2][i]; } } private static void copyRow(final int[][] in, final int[][] grid, final int o, final int N, final int i1) { for (int i = 0; i < N; i++) { if (grid[o][i] != -1 && grid[o][i] != in[i1][i]) { throw new RuntimeException(); } grid[o][i] = in[i1][i]; } } public static void printGrid(final int[][] grid, final int N) { for (int i = 0; i < N; i++) { for (int k = 0; k < N; k++) { System.out.print(grid[i][k] + " "); } System.out.println(); } } private static boolean rowCompat(final int[][] in, final int[][] grid, final int o, final int si, final int N) { for (int i = 0; i < N; i++) { // column int found = 0; piece: for (int k = 0; k < 2 * N - 1; k++) { for (int j = 0; j < o; j++) { // row if (grid[i][j] != -1 && grid[i][j] != in[k][j]) { continue piece; } } found++; } } return false; } }
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
4c58ec9b615c5b61520eebdc041dde68ea38dea9
1d6bb70d12d995f922b05961aceef091c1d5e29c
/android/app/src/main/java/com/virjar/echo/android/EchoReactPackage.java
80dab7be4bca36e3afa7ad72c83be8eefddc5210
[]
no_license
Jasonxgw/echo-android
edc38a13b094acdf3075a14c345894ccd1757751
a5bf8ea8967a058c6e0889bbba7779ef0e3fdc2c
refs/heads/master
2023-03-18T16:38:33.967567
2021-03-14T08:52:22
2021-03-14T08:52:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
845
java
package com.virjar.echo.android; import androidx.annotation.NonNull; import com.facebook.react.ReactPackage; import com.facebook.react.bridge.NativeModule; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.ViewManager; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class EchoReactPackage implements ReactPackage { @NonNull @Override public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) { List<NativeModule> modules = new ArrayList<>(); modules.add(new EchoReactModule(reactContext)); return modules; } @NonNull @Override public List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactContext) { return Collections.emptyList(); } }
[ "virjar@virjar.com" ]
virjar@virjar.com
c96270157265cba00fa29a817177eade4d1f8574
4ba41cbf1333656276b13bd03b30da315b67fe2b
/car-app/src/main/java/car/app/ClientUploadApp.java
1938f36d3e7a43831b98fc9fad8fa79d9d1129f0
[ "Apache-2.0" ]
permissive
Iurii-Dziuban/demo-reactive-spring
b53451e8cd5906d35ae1c6bf584aecb01af90813
a4dd450d876048dcb1690e3416c56c7dc85efc6f
refs/heads/master
2022-07-09T17:38:53.151628
2017-08-25T12:31:03
2017-08-25T12:31:03
101,399,697
0
0
Apache-2.0
2019-03-07T06:59:50
2017-08-25T12:01:50
Java
UTF-8
Java
false
false
1,549
java
/* * Copyright 2002-2017 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 car.app; import java.time.Duration; import car.Car; import car.LocationGenerator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import reactor.core.publisher.Flux; import org.springframework.http.MediaType; import org.springframework.web.reactive.function.client.WebClient; public class ClientUploadApp { private static Logger logger = LoggerFactory.getLogger(ClientUploadApp.class); public static void main(String[] args) { WebClient client = WebClient.create("http://localhost:8081"); LocationGenerator gen = new LocationGenerator(40.740900, -73.988000); Flux<Car> cars = Flux.interval(Duration.ofSeconds(2)).map(i -> new Car(i + 200, gen.location())); client.post() .uri("/cars") .contentType(MediaType.APPLICATION_STREAM_JSON) .body(cars, Car.class) .retrieve() .bodyToFlux(Car.class) .doOnNext(car -> logger.debug("Uploaded: " + car)) .blockLast(); } }
[ "ydzyuban@gmail.com" ]
ydzyuban@gmail.com
35d3abd848f874380ba09f3c4e1d728ab5ba0a2d
6b8bcd288111e4ffefcd0f42ae3d14f8404ccc65
/Part7LeetCode/src/main/java/C04_ไบŒๅ‰ๆ ‘/ไบŒๅ‰ๆ ‘้€’ๅฝ’/T113_่ทฏๅพ„ๆ€ปๅ’ŒII/Solution.java
aa6da8d8da4135d4dd9eae825e8c3458fb0b2abf
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-mulanpsl-1.0-en", "MulanPSL-1.0" ]
permissive
luqian2017/algorithms
943c1365022e307ca2770d121cf8662ba6959e22
e83a17ecf1a7cfea77c5b4ecddc92eb9f1fc329c
refs/heads/master
2020-12-29T22:56:49.445532
2020-02-05T14:57:16
2020-02-05T14:57:16
238,765,020
1
0
NOASSERTION
2020-02-06T19:15:35
2020-02-06T19:15:35
null
UTF-8
Java
false
false
1,486
java
/*********************************************************** * @Description : 113.่ทฏๅพ„ๆ€ปๅ’ŒII * https://leetcode-cn.com/problems/path-sum-ii/ * @author : ๆขๅฑฑๅนฟ(Liang Shan Guang) * @date : 2020/1/30 22:15 * @email : liangshanguang2@gmail.com ***********************************************************/ package C04_ไบŒๅ‰ๆ ‘.ไบŒๅ‰ๆ ‘้€’ๅฝ’.T113_่ทฏๅพ„ๆ€ปๅ’ŒII; import C04_ไบŒๅ‰ๆ ‘.TreeNode; import java.util.ArrayList; import java.util.List; class Solution { public List<List<Integer>> pathSum(TreeNode root, int sum) { List<List<Integer>> pathList = new ArrayList<>(); List<Integer> path = new ArrayList<>(); pathSum(root, sum, path, pathList); return pathList; } public void pathSum(TreeNode node, int sum, List<Integer> path, List<List<Integer>> pathList) { if (node == null) { return; } // ๅฝ“ๅ‰่Š‚็‚น path.add(node.val); // ๅทฆๅณๅญๆ ‘้ƒฝไธบ็ฉบ่ฏดๆ˜Žๅˆฐไบ†ๅถๅญ่Š‚็‚น๏ผŒๆŠŠๅฝ“ๅ‰่ทฏๅพ„ๅŠ ๅˆฐ่ทฏๅพ„ๅˆ—่กจไธญ if (node.left == null && node.right == null) { if (node.val == sum) { // ๅฟ…้กปไปŽpathไธญๆ–ฐๅปบไธ€ไธชๆฅๅญ˜ๅ‚จๅฝ“ๅ‰่ทฏๅพ„๏ผŒๅฆๅˆ™ๅŽ็ปญไฟฎๆ”นpathไผšไผšๅฝฑๅ“ pathList.add(new ArrayList<>(path)); } } pathSum(node.left, sum - node.val, path, pathList); pathSum(node.right, sum - node.val, path, pathList); path.remove(path.size() - 1); } }
[ "1648266192@qq.com" ]
1648266192@qq.com
c705e5c6565d565693d42a58d029362f19f1b1a5
365dd8ebb72f54cedeed37272d4db23d139522f4
/src/main/java/com/kentington/thaumichorizons/common/tiles/TileInspiratron.java
08e30b54676717ae23fbe893431c266691469a15
[]
no_license
Bogdan-G/ThaumicHorizons
c05b1fdeda0bdda6d427a39b74cac659661c4cbe
83caf754f51091c6b7297c0c68fe8df309d7d7f9
refs/heads/master
2021-09-10T14:13:54.532269
2018-03-27T16:58:15
2018-03-27T16:58:15
122,425,516
0
0
null
null
null
null
UTF-8
Java
false
false
7,593
java
package com.kentington.thaumichorizons.common.tiles; import com.kentington.thaumichorizons.common.tiles.ISoulReceiver; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import thaumcraft.api.TileThaumcraft; import thaumcraft.common.config.ConfigItems; public class TileInspiratron extends TileThaumcraft implements ISoulReceiver, ISidedInventory { public ItemStack paper; public ItemStack knowledge; public int progress; private final int PROGRESS_MAX = 100; public float rota; public float rotb; public float field_40063_b; public float field_40061_d; public float field_40059_f; public float field_40066_q; public void updateEntity() { super.updateEntity(); if(super.worldObj.isRemote) { EntityPlayer entity = null; this.rotb = this.rota; if(entity == null) { entity = super.worldObj.getClosestPlayer((double)((float)super.xCoord + 0.5F), (double)((float)super.yCoord + 0.5F), (double)((float)super.zCoord + 0.5F), 6.0D); } if(entity != null) { double f = entity.posX - (double)((float)super.xCoord + 0.5F); double d1 = entity.posZ - (double)((float)super.zCoord + 0.5F); this.field_40066_q = (float)Math.atan2(d1, f); this.field_40059_f += 0.1F; if(this.field_40059_f < 0.5F || entity.worldObj.rand.nextInt(40) == 0) { float f3 = this.field_40061_d; do { this.field_40061_d += (float)(entity.worldObj.rand.nextInt(4) - entity.worldObj.rand.nextInt(4)); } while(f3 == this.field_40061_d); } } else { this.field_40066_q += 0.01F; } while(this.rota >= 3.141593F) { this.rota -= 6.283185F; } while(this.rota < -3.141593F) { this.rota += 6.283185F; } while(this.field_40066_q >= 3.141593F) { this.field_40066_q -= 6.283185F; } while(this.field_40066_q < -3.141593F) { this.field_40066_q += 6.283185F; } float f1; for(f1 = this.field_40066_q - this.rota; f1 < -3.141593F; f1 += 6.283185F) { ; } this.rota += f1 * 0.04F; } } public void addSoulBits(int bits) { for(int i = 0; i < bits; ++i) { if((new org.bogdang.modifications.random.XSTR()).nextFloat() >= 0.97D) { super.worldObj.playSoundEffect((double)super.xCoord + 0.5D, (double)super.yCoord + 0.5D, (double)super.zCoord + 0.5D, "thaumcraft:write", 0.2F, super.worldObj.rand.nextFloat()); ++this.progress; } } if(this.progress >= 100) { this.progress -= 100; if(this.knowledge == null) { this.knowledge = new ItemStack(ConfigItems.itemResource, 1, 9); } else { ++this.knowledge.stackSize; } --this.paper.stackSize; if(this.paper.stackSize <= 0) { this.paper = null; } } } public boolean canAcceptSouls() { return this.paper != null && this.paper.stackSize > 0 && (this.knowledge == null || this.knowledge.stackSize < 64); } public int getSizeInventory() { return 2; } public ItemStack getStackInSlot(int p_70301_1_) { return p_70301_1_ == 0?this.paper:(p_70301_1_ == 1?this.knowledge:null); } public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { int oldsize; if(p_70298_1_ == 0) { oldsize = this.paper.stackSize; this.paper.stackSize -= p_70298_2_; if(this.paper.stackSize <= 0) { this.paper = null; } return new ItemStack(Items.paper, Math.min(p_70298_2_, oldsize)); } else if(p_70298_1_ == 1) { oldsize = this.knowledge.stackSize; this.knowledge.stackSize -= p_70298_2_; if(this.knowledge.stackSize <= 0) { this.knowledge = null; } return new ItemStack(ConfigItems.itemResource, Math.min(p_70298_2_, oldsize), 9); } else { return null; } } public ItemStack getStackInSlotOnClosing(int p_70304_1_) { return null; } public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { if(p_70299_1_ == 0) { this.paper = p_70299_2_; } else if(p_70299_1_ == 1) { this.knowledge = p_70299_2_; } } public String getInventoryName() { return "container.inspiratron"; } public boolean hasCustomInventoryName() { return false; } public int getInventoryStackLimit() { return 64; } public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { return super.worldObj.getTileEntity(super.xCoord, super.yCoord, super.zCoord) != this?false:p_70300_1_.getDistanceSq((double)super.xCoord + 0.5D, (double)super.yCoord + 0.5D, (double)super.zCoord + 0.5D) <= 64.0D; } public void openInventory() {} public void closeInventory() {} public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { return p_94041_1_ == 0?p_94041_2_.isItemEqual(new ItemStack(Items.paper)):(p_94041_1_ == 1?p_94041_2_.isItemEqual(new ItemStack(ConfigItems.itemResource, 1, 9)):false); } public int[] getAccessibleSlotsFromSide(int p_94128_1_) { return new int[]{0, 1}; } public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) { return p_102007_1_ == 1?false:this.isItemValidForSlot(p_102007_1_, p_102007_2_); } public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) { return p_102008_1_ == 1 && this.knowledge != null; } public void writeCustomNBT(NBTTagCompound nbttagcompound) { super.writeCustomNBT(nbttagcompound); nbttagcompound.setInteger("progress", this.progress); NBTTagList nbttaglist = new NBTTagList(); NBTTagCompound nbttagcompound1 = new NBTTagCompound(); if(this.paper != null) { this.paper.writeToNBT(nbttagcompound1); } nbttaglist.appendTag(nbttagcompound1); NBTTagCompound nbttagcompound2 = new NBTTagCompound(); if(this.knowledge != null) { this.knowledge.writeToNBT(nbttagcompound2); } nbttaglist.appendTag(nbttagcompound2); nbttagcompound.setTag("Items", nbttaglist); } public void readCustomNBT(NBTTagCompound nbttagcompound) { super.readCustomNBT(nbttagcompound); this.progress = nbttagcompound.getInteger("progress"); NBTTagList nbttaglist = nbttagcompound.getTagList("Items", 10); NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(0); this.paper = ItemStack.loadItemStackFromNBT(nbttagcompound1); nbttagcompound1 = nbttaglist.getCompoundTagAt(1); this.knowledge = ItemStack.loadItemStackFromNBT(nbttagcompound1); } @SideOnly(Side.CLIENT) public int getTimeRemainingScaled(int p_145955_1_) { int var10000 = this.progress * p_145955_1_; this.getClass(); return var10000 / 100; } }
[ "bogdangtt@gmail.com" ]
bogdangtt@gmail.com
8c0b5b4e4caf88be79af85fd8989603e73c2b02a
69ae87b8692cc3d6e18b5d45dfccc3a09a3a3eb2
/src/main/java/ua/com/vtkachenko/ciklum/kyiv/algorythms/unitfactorycontest/task2/Solution.java
3f8acada5db408feca4e4923bb11e49839dd90e4
[]
no_license
McLoy/CiklumKyivAlgorithmClub
4326b149546bc4dbfa2d11faa3b0c3fca1c1cc67
95b0d21f80c4f5099fa4fbe8642525c2a39605de
refs/heads/master
2021-01-13T09:35:59.626125
2017-04-03T18:51:35
2017-04-03T18:51:35
72,055,183
0
0
null
null
null
null
UTF-8
Java
false
false
1,326
java
package ua.com.vtkachenko.ciklum.kyiv.algorythms.unitfactorycontest.task2; import java.util.*; /* ะŸะฐั€ะธ ะ”ะฐะฝะพ N ั†ั–ะปะธั… ั‡ะธัะตะป. ะŸะพั€ะฐั…ัƒะฒะฐั‚ะธ ะฒัั– ะฟะฐั€ะธ ั‡ะธัะตะป ััƒะผะฐ ัะบะธั… ะดะพั€ั–ะฒะฝัŽั” S. ะ’ัั– ั‡ะธัะปะฐ ัƒะฝั–ะบะฐะปัŒะฝั–. ะกะฟั€ะพะฑัƒะนั‚ะต ะทะฝะฐะนั‚ะธ ั€ั–ัˆะตะฝะฝั ะทั– ัะบะปะฐะดะฝั–ัั‚ัŽ ะฟะพ ั‡ะฐััƒ O(N*log(N)). ะ’ั…ั–ะดะฝั– ะดะฐะฝั– ะ’ ะฟะตั€ัˆะพะผัƒ ั€ัะดะบัƒ ะทะฐะฟะธัะฐะฝั– N ั– S. ะ’ ะฝะฐัั‚ัƒะฟะฝะพะผัƒ, ั‡ะตั€ะตะท ะฟั€ะพะฑั–ะป, N ั‡ะธัะตะป. ะ’ะธั…ั–ะดะฝั– ะดะฐะฝั– ะ„ะดะธะฝะต ั‡ะธัะปะพ - ะบั–ะปัŒะบั–ัั‚ัŒ ะฟะฐั€, ััƒะผะฐ ัะบะธั… ะดะพั€ั–ะฒะฝัŽั” S. ะŸั€ะธะบะปะฐะด Input 5 6 2 5 1 3 4 Output 2 ะŸะพััะฝะตะฝะฝั : ะ„ ะปะธัˆะต 2 ะฟะฐั€ะธ ั‡ะธัะปะตะป (5, 1) ั– (2, 4) ััƒะผะฐ ัะบะธั… ะดะฐั” 6. */ public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); long s = in.nextLong(); int fin = 0; long[] digits = new long[n]; for (int i = 0; i < n; i++) { digits[i] = in.nextLong(); } for (int i = 0; i < n - 1; i++) { for (int j = i + 1; j < n; j++) { if (digits[i] + digits[j] == s) fin++; } } System.out.println(fin); } }
[ "tkachenko.vlad@hotmail.com" ]
tkachenko.vlad@hotmail.com
d45de1ea0002821509b12c3bd0ab6a42b7b4d092
320b1d078a91e7f5f5b59ab24343feccd3653608
/src/test/java/tech/simter/jxls/ext/TwoSubListTest.java
21fe1c2ecf789daf1ecaaac0bd64c24946554018
[ "MIT" ]
permissive
szhifeng/simter-jxls-ext
471d2ce081c24864db26e3f35172cac2fdb23769
671117cb67222fb873180a9de6310512aadf0eca
refs/heads/master
2020-07-19T11:43:51.991957
2020-01-08T09:31:49
2020-01-08T09:31:49
206,442,581
0
0
MIT
2019-09-05T00:49:10
2019-09-05T00:49:09
null
UTF-8
Java
false
false
3,548
java
package tech.simter.jxls.ext; import org.junit.jupiter.api.Test; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; /** * The Jxls test. * * @author RJ */ class TwoSubListTest { @Test void test() throws Exception { // template InputStream template = getClass().getClassLoader().getResourceAsStream("templates/two-sub-list.xlsx"); // output to File out = new File("target/two-sub-list-result.xlsx"); if (out.exists()) out.delete(); OutputStream output = new FileOutputStream(out); // template data Map<String, Object> data = generateData(); // render JxlsUtils.renderTemplate(template, data, output); // verify assertThat(out.getTotalSpace()).isGreaterThan(0); } private Map<String, Object> generateData() { Map<String, Object> data = new HashMap<>(); data.put("subject", "JXLS two-sub-list test"); List<Map<String, Object>> rows = new ArrayList<>(); data.put("rows", rows); int rowNumber = 0; boolean align = true; rows.add(createRow(++rowNumber, 2, 2, align)); rows.add(createRow(++rowNumber, 2, 1, align)); rows.add(createRow(++rowNumber, 2, 0, align)); // 0 ไปฃ่กจ็ฉบ็š„้›†ๅˆ๏ผˆไธๆ˜ฏ null ่€Œๆ˜ฏ size = 0๏ผ‰ // -1 ไปฃ่กจไธๅญ˜ๅœจ็š„้›†ๅˆ๏ผŒไผšๅฏผ่‡ด jx:each ๆŠฅ้”™๏ผšorg.jxls.common.JxlsException: r.subs2 expression is not a collection //rows.add(createRow(++rowNumber, 2, -1, align)); rows.add(createRow(++rowNumber, 1, 1, align)); rows.add(createRow(++rowNumber, 1, 0, align)); rows.add(createRow(++rowNumber, 0, 0, align)); rows.add(createRow(++rowNumber, 1, 2, align)); rows.add(createRow(++rowNumber, 0, 2, align)); return data; } @SuppressWarnings("unchecked") private Map<String, Object> createRow(int rowNumber, int leftSubsCount, int rightSubsCount, boolean align) { Map<String, Object> row = new HashMap<>(); row.put("sn", rowNumber); row.put("name", "row" + rowNumber); if (leftSubsCount >= 0) row.put("subs1", createSubs(rowNumber, 1, leftSubsCount)); if (rightSubsCount >= 0) row.put("subs2", createSubs(rowNumber, 2, rightSubsCount)); // ๅฆ‚ๆžœ leftSubsCount != rightSubsCount, ๅ–ไธค่€…็š„ๆœ€ๅคงๅ€ผ๏ผŒๅฐ†ๅ„่‡ช็š„้›†ๅˆ่ฟฝๅŠ ็ฉบๅ…ƒ็ด ๆฅๅฏน้ฝ้›†ๅˆ็š„ๆ€ป้•ฟๅบฆ // ็›ฎ็š„ๆ˜ฏไฟ่ฏไธไผš็”Ÿๆˆๆฒกๆœ‰ๆ ผๅผ็š„็ฉบ็™ฝๅ•ๅ…ƒๆ ผ List<Map<String, Object>> subs; if (align && (leftSubsCount != rightSubsCount || leftSubsCount == 0)) { int maxCount = Math.max(1, Math.max(leftSubsCount, rightSubsCount)); if (leftSubsCount < maxCount) { subs = (List<Map<String, Object>>) row.get("subs1"); for (int i = 0; i < maxCount - leftSubsCount; i++) subs.add(new HashMap<>()); } if (rightSubsCount < maxCount) { subs = (List<Map<String, Object>>) row.get("subs2"); for (int i = 0; i < maxCount - rightSubsCount; i++) subs.add(new HashMap<>()); } } return row; } private List<Map<String, Object>> createSubs(int rowNumber, int subNumber, int count) { List<Map<String, Object>> subs = new ArrayList<>(); Map<String, Object> sub; for (int i = 1; i <= count; i++) { sub = new HashMap<>(); subs.add(sub); sub.put("sn", rowNumber + "-" + i); sub.put("name", "row" + rowNumber + "sub" + subNumber + "-" + i); } return subs; } }
[ "rongjihuang@gmail.com" ]
rongjihuang@gmail.com
e0cefba7e6d9c946e1bbb9bb42f72e6246c5b327
58d9997a806407a09c14aa0b567e57d486b282d4
/com/planet_ink/coffee_mud/Abilities/Spells/Spell_LimbRack.java
0766cb698c0726fd2329fe4f3590aa56e605429d
[ "Apache-2.0" ]
permissive
kudos72/DBZCoffeeMud
553bc8619a3542fce710ba43bac01144148fe2ed
19a3a7439fcb0e06e25490e19e795394da1df490
refs/heads/master
2021-01-10T07:57:01.862867
2016-03-17T23:04:25
2016-03-17T23:04:25
39,215,834
0
0
null
null
null
null
UTF-8
Java
false
false
5,922
java
package com.planet_ink.coffee_mud.Abilities.Spells; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2004-2014 Bo Zimmerman 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. */ @SuppressWarnings("rawtypes") public class Spell_LimbRack extends Spell { @Override public String ID() { return "Spell_LimbRack"; } private final static String localizedName = CMLib.lang().L("Limb Rack"); @Override public String name() { return localizedName; } private final static String localizedStaticDisplay = CMLib.lang().L("(Being pulled apart)"); @Override public String displayText() { return localizedStaticDisplay; } @Override public int abstractQuality(){return Ability.QUALITY_MALICIOUS;} @Override protected int canAffectCode(){return CAN_MOBS;} @Override public int classificationCode(){ return Ability.ACODE_SPELL|Ability.DOMAIN_EVOCATION;} public List<String> limbsToRemove=new Vector<String>(); @Override public boolean tick(Tickable ticking, int tickID) { if(!super.tick(ticking,tickID)) return false; final MOB mob=(MOB)affected; final MOB invoker=(invoker()!=null) ? invoker() : mob; if((mob.location()!=null) &&(mob.charStats().getMyRace().bodyMask()[Race.BODY_ARM]>=0) &&(mob.charStats().getMyRace().bodyMask()[Race.BODY_LEG]>=0)) { final String str=(text().equalsIgnoreCase("ARMSONLY"))? L("<T-NAME> <T-IS-ARE> having <T-HIS-HER> arms pulled from <T-HIS-HER> body!"):L("<T-NAME> <T-IS-ARE> having <T-HIS-HER> arms and legs pulled from <T-HIS-HER> body!"); CMLib.combat().postDamage(invoker,mob,this,mob.maxState().getHitPoints()/(10-(getXLEVELLevel(invoker)/2)),CMMsg.MASK_ALWAYS|CMMsg.TYP_JUSTICE,Weapon.TYPE_BURSTING,str); } return true; } @Override public void unInvoke() { if((affected instanceof MOB) &&(((MOB)affected).amDead())) { final MOB mob=(MOB)affected; if((mob.location()!=null) &&(mob.charStats().getMyRace().bodyMask()[Race.BODY_ARM]>0) &&(mob.charStats().getMyRace().bodyMask()[Race.BODY_LEG]>0)) { if(text().equalsIgnoreCase("ARMSONLY")) mob.location().show(mob,null,null,CMMsg.MSG_OK_VISUAL,L("<S-NAME> has <S-HIS-HER> arms TORN OFF!")); else mob.location().show(mob,null,null,CMMsg.MSG_OK_VISUAL,L("<S-NAME> has <S-HIS-HER> arms and legs TORN OFF!")); LimbDamage ampuA=(LimbDamage)mob.fetchEffect("Amputation"); if(ampuA==null) { ampuA=(LimbDamage)CMClass.getAbility("Amputation"); ampuA.setAffectedOne(mob); } boolean success=true; for(int i=0;i<limbsToRemove.size();i++) success=success && (ampuA.damageLimb(limbsToRemove.get(i))!=null); if(success) { if(mob.fetchEffect(ampuA.ID())==null) mob.addNonUninvokableEffect(ampuA); } } CMLib.utensils().confirmWearability(mob); } super.unInvoke(); } @Override public boolean invoke(MOB mob, Vector commands, Physical givenTarget, boolean auto, int asLevel) { final MOB target=this.getTarget(mob,commands,givenTarget); if(target==null) return false; LimbDamage A=(LimbDamage)target.fetchEffect("Amputation"); if(A==null) { A=(LimbDamage)CMClass.getAbility("Amputation"); A.setAffectedOne(target); } final List<String> remainingLimbList=A.unaffectedLimbSet(); for(int i=remainingLimbList.size()-1;i>=0;i--) { final String gone=remainingLimbList.get(i); if((!gone.toUpperCase().endsWith(" ARM")) &&(!gone.toUpperCase().endsWith(" LEG"))) remainingLimbList.remove(i); } if((remainingLimbList.size()==0) ||((target.charStats().getMyRace().bodyMask()[Race.BODY_ARM]<=0) &&(target.charStats().getMyRace().bodyMask()[Race.BODY_LEG]<=0))) { if(!auto) mob.tell(L("There is nothing left on @x1 to rack off!",target.name(mob))); return false; } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; // now see if it worked final boolean success=proficiencyCheck(mob,0,auto); if(success) { final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto),L(auto?"!":"^S<S-NAME> invoke(s) a stretching spell upon <T-NAMESELF>")); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); if(msg.value()<=0) { super.maliciousAffect(mob,target,asLevel,12,-1); final Ability A2=target.fetchEffect(ID()); if(A2!=null) { ((Spell_LimbRack)A2).limbsToRemove=new Vector<String>(); ((Spell_LimbRack)A2).limbsToRemove.addAll(remainingLimbList); } } } } else return maliciousFizzle(mob,target,L("<S-NAME> incant(s) stretchingly at <T-NAMESELF>, but flub(s) the spell.")); // return whether it worked return success; } }
[ "kirk.narey@gmail.com" ]
kirk.narey@gmail.com
d4788389648fde50e8d290e79ef77f626fff73c1
e53daa94a988135b8b1379c2a1e19e25bb045091
/cp_movie/app/src/main/java/com/uyt/ying/yuan/uuuu/iuymn/mkjnb/activity/mine_top_activity/GameReportActivity.java
6e2721288a8d9b8bb5fe9bb5ede7fded4b806d42
[]
no_license
2020xiaotu/trunk
f90c9bf15c9000a1bb18c7c0a3c0a96d4daf8e68
ba19836c64828c2994e1f0db22fb5d26b4a014f5
refs/heads/master
2023-08-27T08:10:41.709940
2021-10-05T06:27:12
2021-10-05T06:27:12
413,684,673
0
0
null
null
null
null
UTF-8
Java
false
false
4,199
java
package com.uyt.ying.yuan.uuuu.iuymn.mkjnb.activity.mine_top_activity; import androidx.core.content.ContextCompat; import androidx.viewpager.widget.ViewPager; import android.content.Context; import android.graphics.Color; import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.androidkun.xtablayout.XTabLayout; import com.uyt.ying.yuan.R; import com.uyt.ying.yuan.uuuu.iuymn.mkjnb.adapter.mine_fragemnt_adapter.GameReportTabAdapter; import com.uyt.ying.yuan.uuuu.iuymn.mkjnb.base.BaseActivity; import com.uyt.ying.yuan.uuuu.iuymn.mkjnb.utils.CommonToolbarUtil; import com.uyt.ying.yuan.uuuu.iuymn.mkjnb.utils.StatusBarUtils2; import java.util.ArrayList; import butterknife.BindView; import butterknife.ButterKnife; public class GameReportActivity extends BaseActivity implements XTabLayout.OnTabSelectedListener { @BindView(R.id.game_report_tab) XTabLayout game_report_tab; @BindView(R.id.game_report_viewpager) ViewPager game_report_viewpager; @BindView(R.id.toolbar_back_iv) ImageView toolbar_back_iv; @BindView(R.id.toolbar_title_tv) TextView toolbar_title_tv; public ArrayList<String> titleList = new ArrayList<>(); public GameReportTabAdapter gameReportTabAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_game_report); ButterKnife.bind(this); initTab(); View viewById = findViewById(R.id.toolbar_linear); viewById.setBackgroundColor(ContextCompat.getColor(this,R.color.transparent));//toolbar่ฎพ็ฝฎ้€ๆ˜Ž toolbar_back_iv.setImageResource(R.drawable.icon_arrow_back);//่ฎพ็ฝฎ็™ฝ่‰ฒ่ฟ”ๅ›ž้”ฎ toolbar_title_tv.setTextColor(Color.WHITE); CommonToolbarUtil.initToolbar(this,"ๆธธๆˆ่ฏฆๆƒ…");//ๆ ‡้ข˜ //rootView็ฌฌไธ€ไธชๅญview็š„ๅ›พ็‰‡้กถๅ…ฅ็Šถๆ€ๆ  StatusBarUtils2.with(this) .init(); //่ฎพ็ฝฎtoolBar็ˆถview็š„marginTop() ViewGroup.LayoutParams layoutParams = viewById.getLayoutParams(); LinearLayout.LayoutParams layoutParams1 = (LinearLayout.LayoutParams) layoutParams; layoutParams1.setMargins(0, getStatusBarHeight(this),0,0); viewById.setLayoutParams(layoutParams1); } private void initTab() { titleList.add("ไปŠๆ—ฅ"); titleList.add("ๆ˜จๆ—ฅ"); titleList.add("่ฟ‘ไธƒๅคฉ"); // titleList.add("ๅผ€ๅฅ–"); // titleList.add("้ข‘้“"); gameReportTabAdapter =new GameReportTabAdapter(getSupportFragmentManager(),titleList,this); game_report_viewpager.setAdapter(gameReportTabAdapter); game_report_tab.setupWithViewPager(game_report_viewpager); for (int i = 0; i < titleList.size(); i++) { XTabLayout.Tab tabAt = game_report_tab.getTabAt(i); tabAt.setCustomView(gameReportTabAdapter.getTabView(i)); if(i==0){ TextView textView= tabAt.getCustomView().findViewById(R.id.home_tab_title_tv); textView.setTextSize(20); } } game_report_tab.addOnTabSelectedListener(this); } private static int getStatusBarHeight(Context context) { // ่Žทๅพ—็Šถๆ€ๆ ้ซ˜ๅบฆ int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android"); return context.getResources().getDimensionPixelSize(resourceId); } @Override protected void init() { } @Override public void onNetChange(boolean netWorkState) { } @Override public void onTabSelected(XTabLayout.Tab tab) { TextView textView= tab.getCustomView().findViewById(R.id.home_tab_title_tv); textView.setTextSize(20); boolean isHotTab = tab.getPosition() == 0; } @Override public void onTabUnselected(XTabLayout.Tab tab) { TextView textView= tab.getCustomView().findViewById(R.id.home_tab_title_tv); textView.setTextSize(16); } @Override public void onTabReselected(XTabLayout.Tab tab) { } }
[ "xiaotu20201016@gmail.com" ]
xiaotu20201016@gmail.com
d884afd505a4a59a15d82668410ab55d728124ae
0fb7a2ed774983f2ac12c8403b6269808219e9bc
/yikatong-core/src/main/java/com/alipay/api/domain/ServiceOrderInfo.java
96e1b7616a4e8fd9c92359f14da626c41b64799c
[]
no_license
zhangzh56/yikatong-parent
e605b4025c934fb4099d5c321faa3a48703f8ff7
47e8f627ba3471eff71f593189e82c6f08ceb1a3
refs/heads/master
2020-03-19T11:23:47.000077
2018-04-26T02:26:48
2018-04-26T02:26:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,505
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * ๅˆฐไฝๆœๅŠก่ฎขๅ•ไฟกๆฏ * * @author auto create * @since 1.0, 2017-03-14 16:37:23 */ public class ServiceOrderInfo extends AlipayObject { private static final long serialVersionUID = 7537258495142234442L; /** * ๆœๅŠกๆ€ป้‡‘้ข๏ผŒๅ•ไฝไธบๅ…ƒ */ @ApiField("amount") private String amount; /** * ๅ•†ๅ“ๆœๅŠกๆ‰€ๅœจ็ฑป็›ฎ็š„id */ @ApiField("category_code") private String categoryCode; /** * ่ฎขๅ•ๅˆ›ๅปบๆ—ถ้—ด๏ผŒๆ ผๅผไธบ yyyy-MM-dd HH:mm:ss */ @ApiField("gmt_create") private String gmtCreate; /** * ่ฎขๅ•ไฟฎๆ”นๆ—ถ้—ด๏ผŒๆ ผๅผไธบ yyyy-MM-dd HH:mm:ss */ @ApiField("gmt_modified") private String gmtModified; /** * ่ฎขๅ•ๆœ€ๅŽๆ”ฏไป˜ๆ—ถ้—ด๏ผŒๆ ผๅผ๏ผš yyyy-MM-dd HH:mm:ss */ @ApiField("gmt_payment") private String gmtPayment; /** * ่ฎขๅ•ๆœ€ๅŽ้€€ๆฌพๆ—ถ้—ด๏ผŒๆ ผๅผ๏ผš yyyy-MM-dd HH:mm:ss */ @ApiField("gmt_refund") private String gmtRefund; /** * ๆถˆ่ดน่€…ๆ ‡ๆณจ่ฎขๅ•ๅค‡ๆณจ */ @ApiField("memo") private String memo; /** * ็ฌฌไธ‰ๆ–นๆœๅŠกid */ @ApiField("out_service_id") private String outServiceId; /** * ๅ•†ๅ“็š„ๅ•†ๅฎถ็ซฏ็ซฏSKU ID */ @ApiField("out_sku_id") private String outSkuId; /** * ็ฌฌไธ‰ๆ–นๆœๅŠก่€…idๅˆ—่กจ๏ผŒไพ‹ๅญ๏ผš [โ€œ2323โ€,โ€ฆ]๏ผŒๅฆ‚ๆžœๆฒกๆœ‰ๆœๅŠก่€…๏ผŒๅˆ™ไธบ[] */ @ApiListField("out_sp_id") @ApiField("string") private List<String> outSpId; /** * ๆœๅŠกๅทฒไป˜้‡‘้ข๏ผŒๅ•ไฝไธบๅ…ƒ */ @ApiField("payment_amount") private String paymentAmount; /** * ๅ•ไปท๏ผŒๅ•ไฝไธบๅ…ƒ */ @ApiField("price") private String price; /** * ไปฝๆ•ฐ */ @ApiField("quantity") private Long quantity; /** * ๆœๅŠกๅฎž้™…้‡‘้ข๏ผŒๅ•ไฝไธบๅ…ƒ */ @ApiField("real_amount") private String realAmount; /** * ่ฎขๅ•้€€ๆฌพ้‡‘้ข๏ผŒๅ•ไฝไธบๅ…ƒ */ @ApiField("refund_amount") private String refundAmount; /** * ๅˆฐไฝ็š„ๆœๅŠกid */ @ApiField("service_id") private String serviceId; /** * ๆœๅŠก่ฎขๅ•ๅท */ @ApiField("service_order_no") private String serviceOrderNo; /** * ๅ•†ๅ“็š„ๅ†…้ƒจSKU ID */ @ApiField("sku_id") private String skuId; /** * ๆ”ฏไป˜ๅฎไบคๆ˜“ๅท */ @ApiField("trade_no") private String tradeNo; /** * ๅ•†ๅ“ไปทๆ ผๅ•ไฝ */ @ApiField("unit") private String unit; public String getAmount() { return this.amount; } public void setAmount(String amount) { this.amount = amount; } public String getCategoryCode() { return this.categoryCode; } public void setCategoryCode(String categoryCode) { this.categoryCode = categoryCode; } public String getGmtCreate() { return this.gmtCreate; } public void setGmtCreate(String gmtCreate) { this.gmtCreate = gmtCreate; } public String getGmtModified() { return this.gmtModified; } public void setGmtModified(String gmtModified) { this.gmtModified = gmtModified; } public String getGmtPayment() { return this.gmtPayment; } public void setGmtPayment(String gmtPayment) { this.gmtPayment = gmtPayment; } public String getGmtRefund() { return this.gmtRefund; } public void setGmtRefund(String gmtRefund) { this.gmtRefund = gmtRefund; } public String getMemo() { return this.memo; } public void setMemo(String memo) { this.memo = memo; } public String getOutServiceId() { return this.outServiceId; } public void setOutServiceId(String outServiceId) { this.outServiceId = outServiceId; } public String getOutSkuId() { return this.outSkuId; } public void setOutSkuId(String outSkuId) { this.outSkuId = outSkuId; } public List<String> getOutSpId() { return this.outSpId; } public void setOutSpId(List<String> outSpId) { this.outSpId = outSpId; } public String getPaymentAmount() { return this.paymentAmount; } public void setPaymentAmount(String paymentAmount) { this.paymentAmount = paymentAmount; } public String getPrice() { return this.price; } public void setPrice(String price) { this.price = price; } public Long getQuantity() { return this.quantity; } public void setQuantity(Long quantity) { this.quantity = quantity; } public String getRealAmount() { return this.realAmount; } public void setRealAmount(String realAmount) { this.realAmount = realAmount; } public String getRefundAmount() { return this.refundAmount; } public void setRefundAmount(String refundAmount) { this.refundAmount = refundAmount; } public String getServiceId() { return this.serviceId; } public void setServiceId(String serviceId) { this.serviceId = serviceId; } public String getServiceOrderNo() { return this.serviceOrderNo; } public void setServiceOrderNo(String serviceOrderNo) { this.serviceOrderNo = serviceOrderNo; } public String getSkuId() { return this.skuId; } public void setSkuId(String skuId) { this.skuId = skuId; } public String getTradeNo() { return this.tradeNo; } public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } public String getUnit() { return this.unit; } public void setUnit(String unit) { this.unit = unit; } }
[ "xiangyu.zhang@foxmail.com" ]
xiangyu.zhang@foxmail.com
bfc7a71809d34b479950a4a4a2069d3309b7f2be
c3fd5e06226d5fe3d15548313cec5dc783d1d306
/tags/1.6.0/jbidibc/src/main/java/org/bidib/jbidibc/node/RootNode.java
8df4c02190ea1c721ab23ee42c8b4a6c129c6151
[]
no_license
svn2github/jbidibc
37917bead3721f0781bedf267afa0c71f7ab7975
12184930eaa7af18c38dc83dccad2f8d330bcf06
refs/heads/master
2021-01-13T02:03:00.163181
2015-01-18T14:45:10
2015-01-18T14:45:10
20,271,028
0
1
null
null
null
null
UTF-8
Java
false
false
2,472
java
package org.bidib.jbidibc.node; import java.util.Calendar; import org.bidib.jbidibc.BidibLibrary; import org.bidib.jbidibc.MessageReceiver; import org.bidib.jbidibc.exception.NoAnswerException; import org.bidib.jbidibc.exception.ProtocolException; import org.bidib.jbidibc.message.SysClockMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * This class represents the interface node in the BiDiB system. * */ public class RootNode extends BidibNode { private static final Logger LOGGER = LoggerFactory.getLogger(RootNode.class); public static final byte[] ROOTNODE_ADDR = new byte[] { 0 }; RootNode(MessageReceiver messageReceiver, boolean ignoreWaitTimeout) { super(new byte[] { 0 }, messageReceiver, ignoreWaitTimeout); } /** * Send the sys clock message. * * @param date * the current date * @param factor * the time factor * @throws ProtocolException */ public void clock(Calendar date, int factor) throws ProtocolException { sendNoWait(new SysClockMessage(date, factor)); } /** * Send the system reset message to the node. * * @throws ProtocolException */ public void reset() throws ProtocolException { super.reset(); // TODO reset the counters } @Override public int getMagic() throws ProtocolException { LOGGER.trace("Get magic from root node!"); int magic = super.getMagic(); LOGGER.info("Get magic from root node returns: {}", magic); if (BIDIB_MAGIC_UNKNOWN == magic || BidibLibrary.BIDIB_BOOT_MAGIC == magic) { LOGGER.warn("The interface did not respond the get magic request!"); StringBuffer sb = new StringBuffer("The interface did not respond the get magic request!"); String errorInfo = getMessageReceiver().getErrorInformation(); if (errorInfo != null) { String buffer = new String(errorInfo); LOGGER.warn("Found received data that was not identifed as BiDiB messages: {}", buffer); sb.append("\r\n"); sb.append(buffer); } NoAnswerException ex = new NoAnswerException("Establish communication with interface failed."); ex.setDescription(sb.toString()); LOGGER.warn("Prepared exception to throw:", ex); throw ex; } return magic; } }
[ "akuhtz@87107999-b52a-42af-a34b-1e85ba8a0939" ]
akuhtz@87107999-b52a-42af-a34b-1e85ba8a0939
cb1528e248db98647fcd39c3eed9ece4bb7bbac2
da1d8461495382220679b4ac99c2e9a3111e551c
/lexuncomm/app/src/main/java/io/cordova/lexuncompany/amap/LocationHelperService.java
a25eaa7a6ee35f579c4c2ee8db3046c65a5e4f09
[]
no_license
P79N6A/lexuncomm
0fb9f9d77db9b897d8669d3064951cbfc1cfc18b
76bdeb30dadcc5ee5c49dbed95c3d4ae87e26d98
refs/heads/master
2020-07-23T10:08:29.159449
2019-09-10T09:45:44
2019-09-10T09:45:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,690
java
package io.cordova.lexuncompany.amap; import android.app.Service; import android.content.ComponentName; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; import android.os.RemoteException; import android.support.annotation.Nullable; /** * Created by liangchao_suxun on 17/1/18. */ public class LocationHelperService extends Service { private Utils.CloseServiceReceiver mCloseReceiver; @Override public void onCreate() { super.onCreate(); startBind(); mCloseReceiver = new Utils.CloseServiceReceiver(this); registerReceiver(mCloseReceiver, Utils.getCloseServiceFilter()); } @Override public void onDestroy() { if (mInnerConnection != null) { unbindService(mInnerConnection); mInnerConnection = null; } if (mCloseReceiver != null) { unregisterReceiver(mCloseReceiver); mCloseReceiver = null; } super.onDestroy(); } private ServiceConnection mInnerConnection; private void startBind() { final String locationServiceName = "io.cordova.lexuncompany.amap.LocationService"; mInnerConnection = new ServiceConnection() { @Override public void onServiceDisconnected(ComponentName name) { Intent intent = new Intent(); intent.setAction(locationServiceName); startService(Utils.getExplicitIntent(getApplicationContext(), intent)); } @Override public void onServiceConnected(ComponentName name, IBinder service) { ILocationServiceAIDL l = ILocationServiceAIDL.Stub.asInterface(service); try { l.onFinishBind(); } catch (RemoteException e) { e.printStackTrace(); } } }; Intent intent = new Intent(); intent.setAction(locationServiceName); bindService(Utils.getExplicitIntent(getApplicationContext(), intent), mInnerConnection, Service.BIND_AUTO_CREATE); } private HelperBinder mBinder; private class HelperBinder extends ILocationHelperServiceAIDL.Stub{ @Override public void onFinishBind(int notiId) throws RemoteException { startForeground(notiId, Utils.buildNotification(LocationHelperService.this.getApplicationContext())); stopForeground(true); } } @Nullable @Override public IBinder onBind(Intent intent) { if (mBinder == null) { mBinder = new HelperBinder(); } return mBinder; } }
[ "1993911441@qq.com" ]
1993911441@qq.com
5f41054854c9ef1f0daac9c8dfe15fbadeef946b
f5a57a8fe70ff7042e27fdea36ccad3d1715e5b3
/lambda4j/src/test/java/org/lambda4j/consumer/tri/ThrowableTriByteConsumerTest.java
43437b753052654bcb29e756118199fe81a690a6
[ "Apache-2.0" ]
permissive
djessich/lambda4j
035103413138f02801e07097d80bd477ab6beb72
c8f8f2a8693001f159c740464d3bf39bd1ed094c
refs/heads/master
2023-03-22T05:49:53.513219
2022-07-14T21:18:58
2022-07-14T21:18:58
40,265,220
0
0
null
null
null
null
UTF-8
Java
false
false
1,331
java
/* * Copyright (c) 2021 The lambda4j 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.lambda4j.consumer.tri; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; class ThrowableTriByteConsumerTest { @Test void of_givenExpression_returnsFunctionalInterface() { ThrowableTriByteConsumer<Throwable> consumer = ThrowableTriByteConsumer.of((value1, value2, value3) -> { Assertions.assertNotNull(value1); Assertions.assertNotNull(value2); Assertions.assertNotNull(value3); }); Assertions.assertNotNull(consumer); } @Test void of_givenNull_returnsNull() { ThrowableTriByteConsumer<Throwable> consumer = ThrowableTriByteConsumer.of(null); Assertions.assertNull(consumer); } }
[ "dominik.jessich@chello.at" ]
dominik.jessich@chello.at
89f847590fef3f201ce0145762df8fd62e1245e3
e89d45f9e6831afc054468cc7a6ec675867cd3d7
/src/main/java/com/microsoft/graph/requests/extensions/ICircularGeofenceManagementConditionRequestBuilder.java
4167135df322ec4b0859b8ce0276455a8b288f6d
[ "MIT" ]
permissive
isabella232/msgraph-beta-sdk-java
67d3b9251317f04a465042d273fe533ef1ace13e
7d2b929d5c99c01ec1af1a251f4bf5876ca95ed8
refs/heads/dev
2023-03-12T05:44:24.349020
2020-11-19T15:51:17
2020-11-19T15:51:17
318,158,544
0
0
MIT
2021-02-23T20:48:09
2020-12-03T10:37:46
null
UTF-8
Java
false
false
1,818
java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.requests.extensions; import com.microsoft.graph.http.IRequestBuilder; import com.microsoft.graph.core.ClientException; import com.microsoft.graph.concurrency.ICallback; import com.microsoft.graph.models.extensions.CircularGeofenceManagementCondition; import java.util.Arrays; import java.util.EnumSet; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The interface for the Circular Geofence Management Condition Request Builder. */ public interface ICircularGeofenceManagementConditionRequestBuilder extends IRequestBuilder { /** * Creates the request * * @param requestOptions the options for this request * @return the ICircularGeofenceManagementConditionRequest instance */ ICircularGeofenceManagementConditionRequest buildRequest(final com.microsoft.graph.options.Option... requestOptions); /** * Creates the request with specific options instead of the existing options * * @param requestOptions the options for this request * @return the ICircularGeofenceManagementConditionRequest instance */ ICircularGeofenceManagementConditionRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions); IManagementConditionStatementCollectionWithReferencesRequestBuilder managementConditionStatements(); IManagementConditionStatementWithReferenceRequestBuilder managementConditionStatements(final String id); }
[ "GraphTooling@service.microsoft.com" ]
GraphTooling@service.microsoft.com
cff3e56c249b9830af589f38926031736baa58e6
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_partial/22323688.java
0864df328e6489ee544f7db9d17249415c3dd049
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
849
java
class c22323688 { public String makeLeoNounCall(String noun) { String ret = ""; StringBuffer buf = new StringBuffer(); try { URL url = new URL("http://dict.leo.org" + noun); BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), Charset.forName("ISO8859_1"))); String inputLine; boolean display = false; while ((inputLine = in.readLine()) != null) { if (inputLine.contains("contentholder")) { display = true; } if (display) buf.append(inputLine); } ret = FilterFunctions.findEndTag("<td", buf.toString()); sleepRandomTime(); } catch (Exception e) { e.printStackTrace(); } return ret; } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
48280bc761c23b0c4ae6d27d3806a39e700c2a53
b2d7b0517bc16e6a0cf281b1424178413b55b947
/java-project2-server/src10/main/java/com/eomcs/lms/handler/AbstractCommand.java
32d899dc70d0c62cbfb466965c0df30e56e30c3b
[]
no_license
gwanghosong/bitcamp-java-2018-12
5ea3035c1beb5b9ce7c5348503daf5ed72304dc9
8782553c4505c5943db0009b6a2ebf742c84e38c
refs/heads/master
2021-08-06T20:30:07.181054
2019-06-26T16:18:50
2019-06-26T16:18:50
163,650,672
0
0
null
2020-04-30T06:28:29
2018-12-31T08:00:40
Java
UTF-8
Java
false
false
1,027
java
package com.eomcs.lms.handler; import java.io.BufferedReader; import java.io.PrintWriter; import java.sql.SQLException; import com.eomcs.lms.ApplicationInitializer; // ์ถ”์ƒ ํด๋ž˜์Šค์˜ ๋ชฉ์ ? // => ์„œ๋ธŒ ํด๋ž˜์Šค์—๊ฒŒ ํ•„๋“œ๋‚˜ ๋ฉ”์„œ๋“œ๋ฅผ ์ƒ์†ํ•ด ์ฃผ๋Š” ์šฉ๋„. // => ์ง์ ‘ ์‚ฌ์šฉํ•˜์ง€ ๋ชปํ•œ๋‹ค. // public abstract class AbstractCommand implements Command { @Override public void execute(BufferedReader in, PrintWriter out) { try { execute(new Response(in, out)); } catch (Exception e) { out.printf("์‹คํ–‰ ์˜ค๋ฅ˜! : %s\n", e.getMessage()); } } public void execute(Response response) throws Exception { // ์„œ๋ธŒ ํด๋ž˜์Šค์—์„œ ์˜ค๋ฒ„๋ผ์ด๋”ฉ ํ•ด์•ผํ•  ๋ฉ”์„œ๋“œ์ด๋‹ค. // ๊ทธ๋Ÿฌ๋‚˜ ์„œ๋ธŒ ํด๋ž˜์Šค๊ฐ€ ๋ฐ˜๋“œ์‹œ ์˜ค๋ฒ„๋ผ์ด๋”ฉ ํ•˜๋„๋ก ๊ฐ•์š”ํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด ์ถ”์ƒ ๋ฉ”์„œ๋“œ๋กœ ์„ ์–ธํ•˜์ง€ ์•Š๋Š”๋‹ค. // ์™œ? ์„œ๋ธŒ ํด๋ž˜์Šค๋Š” Command์˜ execute(BufferedReader, PrintWriter)๋ฅผ // ์˜ค๋ฒ„๋ผ์ด๋”ฉ ํ• ์ง€๋„ ๋ชจ๋ฅด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. // } }
[ "gwanghosong91@gmail.com" ]
gwanghosong91@gmail.com
2a1e9ba9e3137582d2248330fe86888b1a6895be
a2785f0632f19a6c4494ca40634b05b982b34975
/src/main/java/com/github/vindell/dbperms/jdbc/common/Permsable.java
67992def16868b037a45ba1eb31e5c27acbc85ef
[ "Apache-2.0" ]
permissive
pologood/dbperms-jdbc
fb8c88ee22834d8f86cef098da146c4db089fde1
da0a9e9123d49de729c41212fa31495f620d77e1
refs/heads/master
2020-05-24T14:25:44.643516
2018-04-28T07:32:47
2018-04-28T07:32:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,036
java
/* * Copyright (c) 2018, vindell (https://github.com/vindell). * * 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.vindell.dbperms.jdbc.common; public interface Permsable { /** * @return Original {@code SQL}. */ String getSql(); /** * @return The {@code SQL} having '?' replaced with real values used. */ String getSqlWithValues(); /** * @return the connection information. */ ConnectionInformation getConnectionInformation(); }
[ "hnxyhcwdl1003@163.com" ]
hnxyhcwdl1003@163.com
b7ea2ac80d87fcf3ad1c5d9944b54c180bde0045
ccc532ff1950d8c394741655f442b1d9175da55d
/app/src/main/java/com/takwolf/android/lock9view/NormalActivity.java
f8ffbb3feb7c56542d5ca4cffc18670a426d4010
[ "Apache-2.0" ]
permissive
changhaismile/Android-Lock9View
0a0d8450a2cc5bd5f2e2c96f6dd3fc816859dad4
f5b19504cfe90222ea4a6bd3ee18ff255f32ac43
refs/heads/master
2021-01-12T07:09:16.838962
2016-03-08T07:57:16
2016-03-08T07:57:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,811
java
/* * Copyright 2015-2016 TakWolf * * 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.takwolf.android.lock9view; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.MenuItem; import android.widget.Toast; import com.takwolf.android.lock9.Lock9View; import butterknife.Bind; import butterknife.ButterKnife; public class NormalActivity extends AppCompatActivity { @Bind(R.id.lock_9_view) protected Lock9View lock9View; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_normal); ButterKnife.bind(this); getSupportActionBar().setDisplayHomeAsUpEnabled(true); lock9View.setCallBack(new Lock9View.CallBack() { @Override public void onFinish(String password) { Toast.makeText(NormalActivity.this, password, Toast.LENGTH_SHORT).show(); } }); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); return true; default: return super.onOptionsItemSelected(item); } } }
[ "takwolf@foxmail.com" ]
takwolf@foxmail.com
bba40ea7d066829818ec1a198d63fd6680652197
b31120cefe3991a960833a21ed54d4e10770bc53
/modules/org.clang.astmatchers/src/org/clang/astmatchers/ast_matchers/internal/TypeMatcherhasDeducedTypeGetter.java
8d71bd211cbac1f06715e323e987a39533d81937
[]
no_license
JianpingZeng/clank
94581710bd89caffcdba6ecb502e4fdb0098caaa
bcdf3389cd57185995f9ee9c101a4dfd97145442
refs/heads/master
2020-11-30T05:36:06.401287
2017-10-26T14:15:27
2017-10-26T14:15:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,053
java
/** * This file was converted to Java from the original LLVM source file. The original * source file follows the LLVM Release License, outlined below. * * ============================================================================== * LLVM Release License * ============================================================================== * University of Illinois/NCSA * Open Source License * * Copyright (c) 2003-2017 University of Illinois at Urbana-Champaign. * All rights reserved. * * Developed by: * * LLVM Team * * University of Illinois at Urbana-Champaign * * http://llvm.org * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal with * 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: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimers. * * * Redistributions in binary form must reproduce the above copyright notice * this list of conditions and the following disclaimers in the * documentation and/or other materials provided with the distribution. * * * Neither the names of the LLVM Team, University of Illinois at * Urbana-Champaign, nor the names of its contributors may be used to * endorse or promote products derived from this Software without specific * prior written permission. * * 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 * CONTRIBUTORS 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 WITH THE * SOFTWARE. * * ============================================================================== * Copyrights and Licenses for Third Party Software Distributed with LLVM: * ============================================================================== * The LLVM software contains code written by third parties. Such software will * have its own individual LICENSE.TXT file in the directory in which it appears. * This file will describe the copyrights, license, and restrictions which apply * to that code. * * The disclaimer of warranty in the University of Illinois Open Source License * applies to all code in the LLVM Distribution, and nothing in any of the * other licenses gives permission to use the names of the LLVM Team or the * University of Illinois to endorse or promote products derived from this * Software. * * The following pieces of software have additional or alternate copyrights, * licenses, and/or restrictions: * * Program Directory * ------- --------- * Autoconf llvm/autoconf * llvm/projects/ModuleMaker/autoconf * Google Test llvm/utils/unittest/googletest * OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} * pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} * ARM contributions llvm/lib/Target/ARM/LICENSE.TXT * md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h */ package org.clang.astmatchers.ast_matchers.internal; import org.clank.java.*; import org.clank.support.*; import org.clank.support.aliases.*; import org.clank.support.JavaDifferentiators.*; import static org.clank.java.built_in.*; import static org.clank.support.Casts.*; import static org.clank.java.io.*; import static org.clank.java.std.*; import static org.clank.java.std_pair.*; import static org.llvm.adt.ADTAliases.*; import static org.llvm.support.llvm.*; import static org.clank.support.NativePointer.*; import static org.clank.support.NativeType.*; import static org.clank.support.Native.*; import static org.clank.support.Unsigned.*; import org.clank.support.NativeCallback.*; import org.llvm.support.*; import org.llvm.adt.*; import org.llvm.adt.aliases.*; import org.clang.ast.*; import org.clang.ast.ast_type_traits.*; import org.clang.ast.java.AstMemberPointers.*; import org.clang.astmatchers.ast_matchers.*; import org.clang.astmatchers.ast_matchers.internal.*; import org.clang.astmatchers.ast_matchers.internal.impl.*; import org.clang.astmatchers.dynamic.ast_matchers.*; import org.clang.astmatchers.dynamic.ast_matchers.impl.*; import org.clang.astmatchers.dynamic.ast_matchers.internal.impl.*; import org.clang.astmatchers.ast_matchers.java.AstMatchersFunctionPointers.*; import org.clang.basic.java.*; import org.clang.basic.llvm.*; import org.clang.lex.*; import org.clang.lex.java.*; import org.clang.lex.llvm.*; /// \brief Matches \c AutoType nodes where the deduced type is a specific type. /// /// Note: There is no \c TypeLoc for the deduced type and thus no /// \c getDeducedLoc() matcher. /// /// Given /// \code /// auto a = 1; /// auto b = 2.0; /// \endcode /// autoType(hasDeducedType(isInteger())) /// matches "auto a" /// /// Usable as: Matcher<AutoType> /*template <typename T> TEMPLATE*/ //<editor-fold defaultstate="collapsed" desc="clang::ast_matchers::internal::TypeMatcherhasDeducedTypeGetter"> @Converted(kind = Converted.Kind.AUTO_NO_BODY, source = "${LLVM_SRC}/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h", line = 4580, FQN="clang::ast_matchers::internal::TypeMatcherhasDeducedTypeGetter", NM="_ZN5clang12ast_matchers8internal31TypeMatcherhasDeducedTypeGetterE", cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.astmatchers/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp -nm=_ZN5clang12ast_matchers8internal31TypeMatcherhasDeducedTypeGetterE") //</editor-fold> public class/*struct*/ TypeMatcherhasDeducedTypeGetter</*typename*/ T> { //<editor-fold defaultstate="collapsed" desc="clang::ast_matchers::internal::TypeMatcherhasDeducedTypeGetter::value"> @Converted(kind = Converted.Kind.AUTO_NO_BODY, source = "${LLVM_SRC}/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h", line = 4580, FQN="clang::ast_matchers::internal::TypeMatcherhasDeducedTypeGetter::value", NM="_ZN5clang12ast_matchers8internal31TypeMatcherhasDeducedTypeGetter5valueEv", cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.astmatchers/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp -nm=_ZN5clang12ast_matchers8internal31TypeMatcherhasDeducedTypeGetter5valueEv") //</editor-fold> public static T$getQualType value() { throw new UnsupportedOperationException("EmptyBody"); } @Override public String toString() { return ""; // NOI18N } }
[ "voskresensky.vladimir@gmail.com" ]
voskresensky.vladimir@gmail.com
9e0b1a9068ad3791a0c970131c234e6aa5f71d7c
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/3/org/joda/time/LocalDate_monthOfYear_1771.java
bf50c8b2f361328b25192ef66dad4f8f05207af1
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,955
java
org joda time local date locald immut datetim repres date time zone local date locald link readabl partial readableparti method focu kei field year month year monthofyear dai month dayofmonth date field fact queri local date locald differ date midnight datemidnight time zone repres singl instant time calcul local date locald perform link chronolog chronolog set intern utc time zone calcul individu field queri wai code month year getmonthofyear code code month year monthofyear code techniqu access method field numer text text maximum minimum valu add subtract set round local date locald thread safe immut provid chronolog standard chronolog class suppli thread safe immut author stephen colebourn local date locald month year properti access advanc function month year properti properti month year monthofyear properti chronolog getchronolog month year monthofyear
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
6fbb34c4698dfe58523b8ad795da6020084d65a8
a17dd1e9f5db1c06e960099c13a5b70474d90683
/app-back/src/main/java/jp/co/sint/webshop/web/bean/back/analysis/SearchKeywordLogBean.java
e0f63bd19ea604e2cd4ea1c2144ba9c62ce5ba10
[]
no_license
giagiigi/ec_ps
4e404afc0fc149c9614d0abf63ec2ed31d10bebb
6eb19f4d14b6f3a08bfc2c68c33392015f344cdd
refs/heads/master
2020-12-14T07:20:24.784195
2015-02-09T10:00:44
2015-02-09T10:00:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,170
java
package jp.co.sint.webshop.web.bean.back.analysis; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import jp.co.sint.webshop.code.CodeAttribute; import jp.co.sint.webshop.data.attribute.Datetime; import jp.co.sint.webshop.data.attribute.Digit; import jp.co.sint.webshop.data.attribute.Metadata; import jp.co.sint.webshop.data.attribute.Required; import jp.co.sint.webshop.web.bean.UISearchBean; import jp.co.sint.webshop.web.bean.back.UIBackBean; import jp.co.sint.webshop.web.text.back.Messages; import jp.co.sint.webshop.web.webutility.PagerValue; import jp.co.sint.webshop.web.webutility.RequestParameter; /** * U1070910:ๆคœ็ดขใ‚ญใƒผใƒฏใƒผใƒ‰้›†่จˆใฎใƒ‡ใƒผใ‚ฟใƒขใƒ‡ใƒซใงใ™ใ€‚ * * @author System Integrator Corp. */ public class SearchKeywordLogBean extends UIBackBean implements UISearchBean { /** serial version UID */ private static final long serialVersionUID = 1L; /** ๆคœ็ดข้–‹ๅง‹ๆ—ฅ */ @Datetime @Required @Metadata(name = "ๆคœ็ดขๆœŸ้–“(From)", order = 1) private String searchStartDate; /** ๆคœ็ดข็ต‚ไบ†ๆ—ฅ */ @Datetime @Required @Metadata(name = "ๆคœ็ดขๆœŸ้–“(To)", order = 2) private String searchEndDate; /** ๆคœ็ดขใ‚ญใƒผใƒชใ‚นใƒˆ */ private List<CodeAttribute> searchKeyList = new ArrayList<CodeAttribute>(); /** ๆคœ็ดขใ‚ญใƒผ */ private String searchKeyCondition; /** ๆคœ็ดข็ตๆžœ */ private List<SearchKeywordLogBeanDetail> searchResult = new ArrayList<SearchKeywordLogBeanDetail>(); /** ใ‚ฐใƒฉใƒ•่กจ็คบใ‚นใ‚ฑใƒผใƒซ */ @Required @Digit private String scaleCondition; /** CSVๅ‡บๅŠ›ๆจฉ้™ๆœ‰็„ก true:CSVๅ‡บๅŠ›ๅฏ่ƒฝ false:CSVๅ‡บๅŠ›ไธๅฏ */ private boolean exportAuthority; /** ใƒšใƒผใ‚ธใƒณใ‚ฐๅˆถๅพก */ private PagerValue pagerValue = new PagerValue(); /** * U1070910:ๆคœ็ดขใ‚ญใƒผใƒฏใƒผใƒ‰้›†่จˆใฎใ‚ตใƒ–ใƒขใƒ‡ใƒซใงใ™ใ€‚ * * @author System Integrator Corp. */ public static class SearchKeywordLogBeanDetail implements Serializable { /** serial version UID */ private static final long serialVersionUID = 1L; /** ๆคœ็ดขใ‚ญใƒผ */ private String searchKey; /** ๆคœ็ดขใƒฏใƒผใƒ‰ */ private String searchWord; /** ๆคœ็ดขๅ›žๆ•ฐ */ private String searchCount; /** ใ‚ฐใƒฉใƒ•่กจ็คบๆ•ฐ */ private String graphCount; /** ็ซฏๆ•ฐใฎๆœ‰็„ก */ private boolean fraction; /** * fractionใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return fraction */ public boolean isFraction() { return fraction; } /** * fractionใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param fraction * fraction */ public void setFraction(boolean fraction) { this.fraction = fraction; } /** * graphCountใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return graphCount */ public String getGraphCount() { return graphCount; } /** * graphCountใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param graphCount * graphCount */ public void setGraphCount(String graphCount) { this.graphCount = graphCount; } /** * searchCountใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return searchCount */ public String getSearchCount() { return searchCount; } /** * searchKeyใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return searchKey */ public String getSearchKey() { return searchKey; } /** * searchWordใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return searchWord */ public String getSearchWord() { return searchWord; } /** * searchCountใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param searchCount * searchCount */ public void setSearchCount(String searchCount) { this.searchCount = searchCount; } /** * searchKeyใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param searchKey * searchKey */ public void setSearchKey(String searchKey) { this.searchKey = searchKey; } /** * searchWordใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param searchWord * searchWord */ public void setSearchWord(String searchWord) { this.searchWord = searchWord; } } /** * ใ‚ตใƒ–JSPใ‚’่จญๅฎšใ—ใพใ™ใ€‚ */ @Override public void setSubJspId() { } /** * ใƒชใ‚ฏใ‚จใ‚นใƒˆใƒ‘ใƒฉใƒกใƒผใ‚ฟใ‹ใ‚‰ๅ€คใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @param reqparam * ใƒชใ‚ฏใ‚จใ‚นใƒˆใƒ‘ใƒฉใƒกใƒผใ‚ฟ */ public void createAttributes(RequestParameter reqparam) { this.setSearchStartDate(reqparam.getDateString("searchStartDate")); this.setSearchEndDate(reqparam.getDateString("searchEndDate")); this.setSearchKeyCondition(reqparam.get("searchKey")); this.setScaleCondition(reqparam.get("scale")); } /** * ใƒขใ‚ธใƒฅใƒผใƒซIDใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return ใƒขใ‚ธใƒฅใƒผใƒซID */ public String getModuleId() { return "U1070910"; } /** * ใƒขใ‚ธใƒฅใƒผใƒซๅใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return ใƒขใ‚ธใƒฅใƒผใƒซๅ */ public String getModuleName() { return Messages.getString("web.bean.back.analysis.SearchKeywordLogBean.0"); } /** * scaleใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return scale */ public String getScaleCondition() { return scaleCondition; } /** * searchEndDateใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return searchEndDate */ public String getSearchEndDate() { return searchEndDate; } /** * searchKeyใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return searchKey */ public String getSearchKeyCondition() { return searchKeyCondition; } /** * searchStartDateใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return searchStartDate */ public String getSearchStartDate() { return searchStartDate; } /** * scaleใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param scaleCondition * ใ‚ฐใƒฉใƒ•่กจ็คบใ‚นใ‚ฑใƒผใƒซ */ public void setScaleCondition(String scaleCondition) { this.scaleCondition = scaleCondition; } /** * searchEndDateใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param searchEndDate * searchEndDate */ public void setSearchEndDate(String searchEndDate) { this.searchEndDate = searchEndDate; } /** * searchKeyใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param searchKeyCondition * ๆคœ็ดขใ‚ญใƒผ */ public void setSearchKeyCondition(String searchKeyCondition) { this.searchKeyCondition = searchKeyCondition; } /** * searchStartDateใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param searchStartDate * searchStartDate */ public void setSearchStartDate(String searchStartDate) { this.searchStartDate = searchStartDate; } /** * searchKeyListใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return searchKeyList */ public List<CodeAttribute> getSearchKeyList() { return searchKeyList; } /** * searchKeyListใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param searchKeyList * searchKeyList */ public void setSearchKeyList(List<CodeAttribute> searchKeyList) { this.searchKeyList = searchKeyList; } /** * pagerValueใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return pagerValue */ public PagerValue getPagerValue() { return pagerValue; } /** * pagerValueใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param pagerValue * pagerValue */ public void setPagerValue(PagerValue pagerValue) { this.pagerValue = pagerValue; } /** * searchResultใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return searchResult */ public List<SearchKeywordLogBeanDetail> getSearchResult() { return searchResult; } /** * searchResultใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param searchResult * searchResult */ public void setSearchResult(List<SearchKeywordLogBeanDetail> searchResult) { this.searchResult = searchResult; } /** * hasExportAuthorityใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ * * @return exportAuthority */ public boolean isExportAuthority() { return exportAuthority; } /** * hasExportAuthorityใ‚’่จญๅฎšใ—ใพใ™ใ€‚ * * @param exportAuthority * CSVๅ‡บๅŠ›ๆจฉ้™ๆœ‰็„ก true:CSVๅ‡บๅŠ›ๅฏ่ƒฝ false:CSVๅ‡บๅŠ›ไธๅฏ */ public void setExportAuthority(boolean exportAuthority) { this.exportAuthority = exportAuthority; } }
[ "fengperfect@126.com" ]
fengperfect@126.com
4096c8bb625839eba3d51605141a5b3b2388ddcd
07e33132ef60c9bba1ef49d586db81ab04b0763c
/event/src/main/java/org/bekit/event/extension/support/ClassEventTypeResolver.java
f692fa9f9d732c1a3f12678306b47e0d41d00f78
[ "Apache-2.0" ]
permissive
poundhu/bekit
94aea29b49e29a2e79c50b9eac038024b192a0ce
3af4c4401fe40c3227686ec0fbf6d870c131c1df
refs/heads/master
2021-02-08T08:57:51.568863
2020-02-09T12:09:37
2020-02-09T12:09:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
589
java
/* * ไฝœ่€…๏ผš้’Ÿๅ‹‹ (e-mail:zhongxunking@163.com) */ /* * ไฟฎ่ฎข่ฎฐๅฝ•: * @author ้’Ÿๅ‹‹ 2017-09-29 11:51 ๅˆ›ๅปบ */ package org.bekit.event.extension.support; import org.bekit.event.extension.EventTypeResolver; /** * Classไบ‹ไปถ็ฑปๅž‹่งฃๅ†ณๅ™จ๏ผˆไบ‹ไปถ็ฑปๅž‹ๅฐฑๆ˜ฏไบ‹ไปถๅฏนๅบ”็š„Class็ฑป๏ผ‰ */ public class ClassEventTypeResolver implements EventTypeResolver { /** * ๅฎžไพ‹ */ public static final ClassEventTypeResolver INSTANCE = new ClassEventTypeResolver(); @Override public Object resolve(Object event) { return event.getClass(); } }
[ "zhongxunking@163.com" ]
zhongxunking@163.com
2a21576485527773c5403fb8b9ce238743809c18
b97bc0706448623a59a7f11d07e4a151173b7378
/src/main/java/com/tcmis/internal/hub/beans/ItemConsignmentInputBean.java
3f7c32721fe34bd3cd314b12d00a3d524b007ae7
[]
no_license
zafrul-ust/tcmISDev
576a93e2cbb35a8ffd275fdbdd73c1f9161040b5
71418732e5465bb52a0079c7e7e7cec423a1d3ed
refs/heads/master
2022-12-21T15:46:19.801950
2020-02-07T21:22:50
2020-02-07T21:22:50
241,601,201
0
0
null
2022-12-13T19:29:34
2020-02-19T11:08:43
Java
UTF-8
Java
false
false
3,942
java
package com.tcmis.internal.hub.beans; import java.math.BigDecimal; import java.util.Date; import java.util.Locale; import org.apache.struts.action.ActionForm; import com.tcmis.common.framework.HubBaseInputBean; import com.tcmis.common.util.StringHandler; public class ItemConsignmentInputBean extends HubBaseInputBean { public static final String COUNT_BY_ITEM = "item"; public static final String COUNT_BY_RECEIPT = "receipt"; private static final long serialVersionUID = 1L; private String countBy; private Date dateDelivered; private BigDecimal itemId; private BigDecimal receiptId; private boolean rowUpdated; private String searchField; private String searchMode; private String searchText; private String shippingReference; private BigDecimal usedQuantity; private String distCustomerPartList; private String poNumber; private BigDecimal catalogPrice; private boolean isNewCatalogPrice; private String currencyId; public ItemConsignmentInputBean() { } public ItemConsignmentInputBean(ActionForm inputForm, Locale locale) { super(inputForm, locale); } public String getCurrencyId() { return currencyId; } public String getCountBy() { return countBy; } public Date getDateDelivered() { return dateDelivered; } public BigDecimal getCatalogPrice() { return catalogPrice; } public BigDecimal getItemId() { return itemId; } public BigDecimal getReceiptId() { return receiptId; } public String getSearchField() { return searchField; } public String getSearchMode() { return searchMode; } public String getSearchText() { return searchText; } public String getShippingReference() { return shippingReference; } public BigDecimal getUsedQuantity() { return usedQuantity; } public boolean hasFieldSearch() { return !StringHandler.isBlankString(getSearchText()); } public boolean isCountByItem() { return COUNT_BY_ITEM.equals(countBy); } public boolean isCountByReceipt() { return COUNT_BY_RECEIPT.equals(countBy); } public boolean isRowUpdated() { return rowUpdated; } public boolean isNewCatalogPrice() { return isNewCatalogPrice; } public boolean isSearchFieldReceiptId() { return "receiptId".equals(this.searchField); } public void setCurrencyId(String currencyId) { this.currencyId = currencyId; } public void setCountBy(String countBy) { this.countBy = countBy; } public void setDateDelivered(Date dateDelivered) { this.dateDelivered = dateDelivered; } @Override public void setHiddenFormFields() { addHiddenFormField("searchText"); addHiddenFormField("searchField"); addHiddenFormField("searchMode"); addHiddenFormField("countBy"); } public void setCatalogPrice(BigDecimal catalogPrice) { this.catalogPrice = catalogPrice; } public void setItemId(BigDecimal itemId) { this.itemId = itemId; } public void setReceiptId(BigDecimal receiptId) { this.receiptId = receiptId; } public void setRowUpdated(boolean update) { this.rowUpdated = update; } public void setIsNewCatalogPrice(boolean isNewCatalogPrice) { this.isNewCatalogPrice = isNewCatalogPrice; } public void setSearchField(String searchField) { this.searchField = searchField; } public void setSearchMode(String searchType) { this.searchMode = searchType; } public void setSearchText(String searchText) { this.searchText = searchText; } public void setShippingReference(String shippingReference) { this.shippingReference = shippingReference; } public void setUsedQuantity(BigDecimal countedQuantity) { this.usedQuantity = countedQuantity; } public String getDistCustomerPartList() { return distCustomerPartList; } public void setDistCustomerPartList(String distCustomerPartList) { this.distCustomerPartList = distCustomerPartList; } public String getPoNumber() { return poNumber; } public void setPoNumber(String poNumber) { this.poNumber = poNumber; } }
[ "julio.rivero@wescoair.com" ]
julio.rivero@wescoair.com
7230df75953400f665487c736ab91645aff17465
85502cbfdf6dc0b002d6496357526d595b328c28
/src/main/java/com/leetcode/problems/combinationSumII/Solution.java
952107da19e9fddb5ecfc51402199d8e4a328923
[]
no_license
pbelevich/leetcode
e4e74f31a2a23e69b4618052d87a9016a0d2a364
7031ed13f337d2dbd7d7e08c54bd83f6b08d9f51
refs/heads/master
2021-01-13T12:49:14.411852
2017-06-05T02:30:27
2017-06-05T02:30:27
72,327,640
1
0
null
2016-10-30T05:17:24
2016-10-30T05:00:17
Java
UTF-8
Java
false
false
1,801
java
package com.leetcode.problems.combinationSumII; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * https://leetcode.com/problems/combination-sum-ii/#/description * <p> * 40. Combination Sum II * <p> * Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. * <p> * Each number in C may only be used once in the combination. * <p> * Note: * All numbers (including target) will be positive integers. * The solution set must not contain duplicate combinations. * For example, given candidate set [10, 1, 2, 7, 6, 1, 5] and target 8, * A solution set is: * [ * [1, 7], * [1, 2, 5], * [2, 6], * [1, 1, 6] * ] * * @author Pavel Belevich */ public class Solution { public List<List<Integer>> combinationSum2(int[] candidates, int target) { Arrays.sort(candidates); List<List<Integer>> result = new ArrayList<>(); combinationSum(candidates, 0, target, new ArrayList<>(), result); return result; } private void combinationSum(int[] candidates, int c, int target, ArrayList<Integer> res, List<List<Integer>> result) { if (target == 0) { result.add(new ArrayList<>(res)); } else { for (int i = c; i < candidates.length && candidates[i] <= target; i += f(candidates, i)) { res.add(candidates[i]); combinationSum(candidates, i + 1, target - candidates[i], res, result); res.remove((Integer) candidates[i]); } } } int f(int[] candidates, int i) { int result; for (result = 0; i + result < candidates.length && candidates[i + result] == candidates[i]; result++) ; return result; } }
[ "belevichp@gmail.com" ]
belevichp@gmail.com
3a7cb881f5671bd4372cc127e07bcdb08a44f504
75231940a2b62bc05d039abcd3bec5be542dc682
/wanxinp2p_apollo/wanxinp2p-content-search-service/src/main/java/cn/itcast/wanxinp2p/search/service/ProjectIndexServiceImpl.java
491fcb082aa500df7a655154f91fae0d8d01f255
[]
no_license
q2315648899/wanxin-p2p-apollo
dd04465478b3e3110be5c3b5a43d194985eed519
16c6f1609dfeab658ada07d484ed25252768750e
refs/heads/master
2023-06-18T13:47:53.491868
2021-07-17T09:11:52
2021-07-17T09:11:52
380,989,537
0
1
null
null
null
null
UTF-8
Java
false
false
5,058
java
package cn.itcast.wanxinp2p.search.service; import cn.itcast.wanxinp2p.api.search.model.ProjectQueryParamsDTO; import cn.itcast.wanxinp2p.api.transaction.model.ProjectDTO; import cn.itcast.wanxinp2p.common.domain.PageVO; import org.apache.commons.lang.StringUtils; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.sort.SortOrder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Map; @Service public class ProjectIndexServiceImpl implements ProjectIndexService{ @Autowired private RestHighLevelClient restHighLevelClient; @Value("${wanxinp2p.es.index}") private String projectIndex; @Override public PageVO<ProjectDTO> queryProjectIndex(ProjectQueryParamsDTO projectQueryParamsDTO, Integer pageNo, Integer pageSize, String sortBy, String order) { //1.ๅˆ›ๅปบๆœ็ดข่ฏทๆฑ‚ๅฏน่ฑก SearchRequest searchRequest=new SearchRequest(projectIndex); //2.ๆœ็ดขๆกไปถ //2.1 ๅˆ›ๅปบๆกไปถๅฐ่ฃ…ๅฏน่ฑก BoolQueryBuilder queryBuilder= QueryBuilders.boolQuery(); //2.2 ้ž็ฉบๅˆคๆ–ญๅนถๅฐ่ฃ…ๆกไปถ if(StringUtils.isNotBlank(projectQueryParamsDTO.getName())){ queryBuilder.must(QueryBuilders.termQuery("name",projectQueryParamsDTO.getName())); } if(projectQueryParamsDTO.getStartPeriod()!=null){ queryBuilder.must(QueryBuilders.rangeQuery("period").gte(projectQueryParamsDTO.getStartPeriod())); } if(projectQueryParamsDTO.getEndPeriod()!=null){ queryBuilder.must(QueryBuilders.rangeQuery("period").lte(projectQueryParamsDTO.getEndPeriod())); } //3.ๅˆ›ๅปบSearchSourceBuilderๅฏน่ฑก---ๆ€ป็š„ๅฐ่ฃ…ๅฏน่ฑก SearchSourceBuilder searchSourceBuilder=new SearchSourceBuilder(); //3.1 ๅฐ่ฃ…ๆกไปถ searchSourceBuilder.query(queryBuilder); //3.2 ่ฎพ็ฝฎๆŽ’ๅบๅ‚ๆ•ฐ if(StringUtils.isNotBlank(sortBy)&&StringUtils.isNotBlank(order)){ if(order.toLowerCase().equals("asc")){ searchSourceBuilder.sort(sortBy, SortOrder.ASC); } if(order.toLowerCase().equals("desc")){ searchSourceBuilder.sort(sortBy, SortOrder.DESC); } }else{ searchSourceBuilder.sort("createdate",SortOrder.DESC); } //3.2 ่ฎพ็ฝฎๅˆ†้กตๅ‚ๆ•ฐ searchSourceBuilder.from((pageNo-1)*pageSize); searchSourceBuilder.size(pageSize); //4.ๅฎŒๆˆๅฐ่ฃ… searchRequest.source(searchSourceBuilder); //5.ๆ‰ง่กŒๆœ็ดข List<ProjectDTO> list=new ArrayList<>(); PageVO<ProjectDTO> pageVO = new PageVO<>(); try { SearchResponse searchResponse = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT); //6.่Žทๅ–ๅ“ๅบ”็ป“ๆžœ SearchHits hits = searchResponse.getHits(); long totalHits = hits.getTotalHits().value;//ๅŒน้…็š„ๆ€ป่ฎฐๅฝ•ๆ•ฐ pageVO.setTotal(totalHits); SearchHit[] searchHits = hits.getHits();//่Žทๅ–ๅŒน้…ๆ•ฐๆฎ //7.ๅพช็Žฏๅฐ่ฃ…DTO for(SearchHit hit:searchHits) { ProjectDTO projectDTO = new ProjectDTO(); Map<String, Object> sourceAsMap = hit.getSourceAsMap(); Double amount = (Double) sourceAsMap.get("amount"); String projectstatus = (String) sourceAsMap.get("projectstatus"); Integer period = Integer.parseInt(sourceAsMap.get("period").toString()); String name = (String) sourceAsMap.get("name"); String description = (String) sourceAsMap.get("description"); BigDecimal annualRate=new BigDecimal(sourceAsMap.get("annualrate").toString()); projectDTO.setAmount(new BigDecimal(amount)); projectDTO.setProjectStatus(projectstatus); projectDTO.setPeriod(period); projectDTO.setName(name); projectDTO.setDescription(description); projectDTO.setId(Long.parseLong(sourceAsMap.get("id").toString())); projectDTO.setAnnualRate(annualRate); list.add(projectDTO); } }catch(Exception e){ return null; } //8.ๅฐ่ฃ…ไธบPageVOๅฏน่ฑกๅนถ่ฟ”ๅ›ž pageVO.setContent(list); pageVO.setPageSize(pageSize); pageVO.setPageNo(pageNo); return pageVO; } }
[ "406972433@qq.com" ]
406972433@qq.com
8f0abfe004ac960c014d189715505597aad16132
b33e3ad7e9b73074cef6c5b0bed30c160266ea35
/์ˆ˜ํ•™p2/src/์ˆ˜ํ•™p2/n_10984.java
899310953fbf3e4d332c2555ea3d7783553482fd
[]
no_license
Jaejeong98/java
9bea9e8fa072abf5e36407c44c526876754ff572
8b8c31266031b59a0d60727b1c83576bb48827e8
refs/heads/master
2022-05-26T12:59:56.430185
2022-03-16T11:24:50
2022-03-16T11:24:50
176,660,171
1
0
null
null
null
null
ISO-8859-7
Java
false
false
695
java
package ฮŒฯ†ฮ—ฮ p2; import java.io.*; public class n_10984 { public static void main(String[] args)throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out)); int T=Integer.parseInt(br.readLine()); for(int i=0; i<T; i++) { int n=Integer.parseInt(br.readLine()), sum_1=0; double sum_2=0; for(int j=0; j<n; j++) { String[] st=br.readLine().split(" "); int n1=Integer.parseInt(st[0]); double n2=Double.parseDouble(st[1]); sum_1+=n1; sum_2+=n1*n2; } bw.write(sum_1+" "+String.format("%.1f",sum_2/sum_1)+"\n"); } bw.flush(); bw.close(); } }
[ "jaejeong98@naver.com" ]
jaejeong98@naver.com
47294538a711e1df7d01ed7fb1e63fc04c637c00
afab90e214f8cb12360443e0877ab817183fa627
/bitcamp-spring-web/src/main/java/bitcamp/config/App2Config.java
2d090e4c607b61f6dcd45ca257184acbed42edb5
[]
no_license
oreoTaste/bitcamp-study
40a96ef548bce1f80b4daab0eb650513637b46f3
8f0af7cd3c5920841888c5e04f30603cbeb420a5
refs/heads/master
2020-09-23T14:47:32.489490
2020-05-26T09:05:40
2020-05-26T09:05:40
225,523,347
1
0
null
null
null
null
UTF-8
Java
false
false
5,747
java
package bitcamp.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.view.InternalResourceViewResolver; import org.springframework.web.util.UrlPathHelper; import bitcamp.app2.Controller04_1_Interceptor4; @ComponentScan("bitcamp.app2") // => ์ง€์ •๋œ ํŒจํ‚ค์ง€๋ฅผ ๋’ค์ ธ์„œ @Component, @Controller ๋“ฑ ๋ถ™์€ ํด๋ž˜์Šค์— ๋Œ€ํ•ด ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•œ๋‹ค. // @EnableWebMvc // => Web MVC ๊ด€๋ จ ๊ฐ์ฒด๋ฅผ ๋“ฑ๋กํ•˜๊ณ  ์„ค์ •(!!)ํ•œ๋‹ค. // => WebMvcConfigurer ๊ตฌํ˜„์ฒด๋ฅผ ์ฐพ์•„ ๋ฉ”์„œ๋“œ๋ฅผ ํ˜ธ์ถœํ•œ๋‹ค. // public class App2Config implements WebMvcConfigurer { // DispatcherServlet์˜ ๊ธฐ๋ณธ ViewResolver๋ฅผ ๊ต์ฒดํ•˜๊ธฐ // 1) XML ์„ค์ • // <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> // <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> // <property name="prefix" value="/WEB-INF/jsp/"/> // <property name="suffix" value=".jsp"/> // </bean> // // 2) Java Config ์„ค์ • @Bean public ViewResolver viewResolver() { InternalResourceViewResolver vr = new InternalResourceViewResolver( "/WEB-INF/jsp2/", ".jsp"); return vr; } // @MatrixVariable ์• ๋…ธํ…Œ์ด์…˜์„ ์ฒ˜๋ฆฌ๋ฅผ ํ™œ์„ฑํ™”์‹œํ‚จ๋‹ค. // => ์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ ค๋ฉด MVC ๊ด€๋ จ ์„ค์ • ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก // WebMvcConfigurer ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ตฌํ˜„ํ•ด์•ผ ํ•œ๋‹ค. // => ๊ทธ๋ฆฌ๊ณ  ๋‹ค์Œ ๋ฉ”์„œ๋“œ๋ฅผ ์˜ค๋ฒ„๋ผ์ด๋”ฉ ํ•˜์—ฌ ๊ธฐ์กด ์„ค์ •์„ ๋ณ€๊ฒฝํ•œ๋‹ค. // // DispatcherServlet ์ด MVC ๊ด€๋ จ ์„ค์ •์„ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ณผ์ • // => WebMVC ์„ค์ •์„ ํ™œ์„ฑํ™”์‹œ์ผฐ๋Š”์ง€ ๊ฒ€์‚ฌํ•œ๋‹ค. // => ํ™œ์„ฑํ™”์‹œ์ผฐ์œผ๋ฉด, IoC ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ๊ด€๋ฆฌํ•˜๋Š” ๊ฐ์ฒด ์ค‘์—์„œ // WebMvcConfigurer ๊ตฌํ˜„์ฒด๋ฅผ ์ฐพ๋Š”๋‹ค. // ๊ด€๋ฆฌํ•˜๋Š” ๊ฐ์ฒด? // - IoC ์ปจํ…Œ์ด๋„ˆ์— ๋“ค์–ด ์žˆ๋Š” ๊ฐ์ฒด // - @Component, @Service, @Controller, @RestController, @Repository // ์• ๋…ธํ…Œ์ด์…˜์ด ๋ถ™์€ ํด๋ž˜์Šค๋“ค์€ IoC ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์ž๋™์œผ๋กœ ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ๋ณด๊ด€ํ•œ๋‹ค. // - ํ•˜์ง€๋งŒ WebMvcConfigurer ๊ตฌํ˜„์ฒด๋Š” Java Config ํด๋ž˜์Šค์ด๊ธฐ ๋•Œ๋ฌธ์— // ์ผ๋ฐ˜ ๊ฐ์ฒด๋กœ ํ‘œ์‹œํ•˜์ง€ ๋ง๊ณ , @Configuration ์„ ๋ถ™์—ฌ // Java Config ํด๋ž˜์Šค์ž„์„ ๋ช…ํ™•ํžˆ ํ•˜๋Š” ๊ฒƒ์ด ์œ ์ง€๋ณด์ˆ˜์— ์ข‹๋‹ค. // ๋ฌผ๋ก , @Configuration ๊ฐ€ ๋ถ™์€ ํด๋ž˜์Šค๋„ ๊ฐ์ฒด๊ฐ€ ์ƒ์„ฑ๋˜์–ด IoC ์ปจํ…Œ์ด๋„ˆ์— ๋ณด๊ด€๋˜๋Š” ๊ฒƒ์€ ๊ฐ™๋‹ค. // // => ๊ฐ์ฒด๋ฅผ ์ฐพ์•˜์œผ๋ฉด, WebMvcConfigurer ๊ทœ์น™์— ๋”ฐ๋ผ ๋ฉ”์„œ๋“œ๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ // ์„ค์ •์„ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ๊ธฐ์กด ์„ค์ •์„ ๋ณ€๊ฒฝํ•œ๋‹ค. // => WebMVC ์„ค์ •์„ ํ™œ์„ฑํ™”์‹œํ‚ค์ง€ ์•Š์œผ๋ฉด, // WebMvcConfigurer ๊ตฌํ˜„์ฒด๊ฐ€ ์žˆ๋‹ค ํ•˜๋”๋ผ๋„ ๋ฌด์‹œํ•œ๋‹ค. // => WebMVC ์„ค์ •์„ ํ™œ์„ฑํ™”์‹œํ‚ค๋Š” ๋ฐฉ๋ฒ• // 1) XML ์„ค์ • // <mvc:annotation-driven/> // 2) Java Config ์„ค์ • // @EnableWebMvc ์• ๋…ธํ…Œ์ด์…˜ ํ‘œ์‹œ @Override public void configurePathMatch(PathMatchConfigurer configurer) { UrlPathHelper helper = new UrlPathHelper(); helper.setRemoveSemicolonContent(false); // DispatcherServlet์˜ MVC Path ๊ด€๋ จ ์„ค์ •์„ ๋ณ€๊ฒฝํ•œ๋‹ค. configurer.setUrlPathHelper(helper); } // ์ด ์„ค์ •์„ ์‚ฌ์šฉํ•˜๋Š” ํ”„๋ก ํŠธ ์ปจํŠธ๋กค๋Ÿฌ์— ์ ์šฉํ•  ์ธํ„ฐ์…‰ํ„ฐ ์„ค์ •ํ•˜๊ธฐ @Override public void addInterceptors(InterceptorRegistry registry) { // 1) ๋ชจ๋“  ์š”์ฒญ์— ๋Œ€ํ•ด ์‹คํ–‰ํ•  ์ธํ„ฐ์…‰ํ„ฐ ๋“ฑ๋กํ•˜๊ธฐ // => ์ธํ„ฐ์…‰ํ„ฐ๋ฅผ ์ ์šฉํ•  URL์„ ์ง€์ •ํ•˜์ง€ ์•Š์œผ๋ฉด ํ˜„์žฌ ํ”„๋ก ํŠธ ์ปจํŠธ๋กค๋Ÿฌ์˜ ๋ชจ๋“  ์š”์ฒญ์— ๋Œ€ํ•ด ์ ์šฉ๋œ๋‹ค. // registry.addInterceptor(new Controller04_1_Interceptor1()); // 2) ํŠน์ • ์š”์ฒญ์— ๋Œ€ํ•ด ์‹คํ–‰ํ•  ์ธํ„ฐ์…‰ํ„ฐ ๋“ฑ๋กํ•˜๊ธฐ // => ํŒจํ„ด: /c04_1/* // ์ ์šฉ ๊ฐ€๋Šฅ: // /c04_1/x // /c04_1/y // ์ ์šฉ ๋ถˆ๊ฐ€: // /x // /c03_1/x // /c04_1/a/x // /c04_1/a/b/x // ์ฆ‰, /c04_1/ ๋ฐ”๋กœ ๋ฐ‘์˜ ์žˆ๋Š” ์ž์›์— ๋Œ€ํ•ด์„œ๋งŒ ์ธํ„ฐ์…‰ํ„ฐ๋ฅผ ์ ์šฉํ•œ๋‹ค. // registry.addInterceptor(new Controller04_1_Interceptor2()) // .addPathPatterns("/c04_1/*"); // 3) ํŠน์ • ์š”์ฒญ์— ๋Œ€ํ•ด ์‹คํ–‰ํ•  ์ธํ„ฐ์…‰ํ„ฐ ๋“ฑ๋กํ•˜๊ธฐ // => ํŒจํ„ด: /c04_1/** // ์ ์šฉ ๊ฐ€๋Šฅ: // /c04_1/x // /c04_1/y // /c04_1/a/x // /c04_1/a/b/x // ์ ์šฉ ๋ถˆ๊ฐ€: // /x // /c03_1/x // ์ฆ‰, /c04_1/ ์˜ ๋ชจ๋“  ํ•˜์œ„ ๊ฒฝ๋กœ์— ์žˆ๋Š” ์ž์›์— ๋Œ€ํ•ด์„œ๋งŒ ์ธํ„ฐ์…‰ํ„ฐ๋ฅผ ์ ์šฉํ•œ๋‹ค. // registry.addInterceptor(new Controller04_1_Interceptor3()) // .addPathPatterns("/c04_1/**"); // 4) ํŠน์ • ์š”์ฒญ์— ๋Œ€ํ•ด ์ธํ„ฐ์…‰ํ„ฐ ์ ์šฉ์„ ์ œ์™ธํ•˜๊ธฐ // => ํŒจํ„ด: /c04_1/** (include), /c04_1/a/** (exclude) // ์ ์šฉ ๊ฐ€๋Šฅ: // /c04_1/x // /c04_1/y // /c04_1/b/x // /c04_1/b/c/x // ์ ์šฉ ๋ถˆ๊ฐ€: // /x // /c03_1/x // /c04_1/a/x // /c04_1/a/b/x // ์ฆ‰, /c04_1/ ์˜ ๋ชจ๋“  ํ•˜์œ„ ๊ฒฝ๋กœ์— ์žˆ๋Š” ์ž์›์— ๋Œ€ํ•ด์„œ๋งŒ ์ธํ„ฐ์…‰ํ„ฐ๋ฅผ ์ ์šฉํ•œ๋‹ค. // ๋‹จ /c04_1/a/ ์˜ ๋ชจ๋“  ํ•˜์œ„ ๊ฒฝ๋กœ์— ์žˆ๋Š” ์ž์›์€ ์ œ์™ธํ•œ๋‹ค. registry.addInterceptor(new Controller04_1_Interceptor4()) .addPathPatterns("/c04_1/**") .excludePathPatterns("/c04_1/a/**"); } }
[ "youngkuk.sohn@gmail.com" ]
youngkuk.sohn@gmail.com
bc93d1943f207ce8d5b6522d27a2f306ec50f5f2
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/4_rif-com.densebrain.rif.client.RIFClassLoader-1.0-3/com/densebrain/rif/client/RIFClassLoader_ESTest_scaffolding.java
6252a7b595e53635d78e2c1a2381ab8d6daac00c
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
546
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 15:30:09 GMT 2019 */ package com.densebrain.rif.client; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class RIFClassLoader_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl