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
d8f6ebb3949d5fdf9b912e698baea90d5cf24246
784f18fad4a05aa8135f8470792cb4c5f9e4d758
/src/main/java/com/xinbo/fundstransfer/domain/entity/BizBankLogCommission.java
19bfbf2d71774e6bedb10d3c0cc562ae1e1cd223
[]
no_license
daMaoCoding/project1
b73fdd1d1b43653923645df025c611617886a8a9
0592de7014a581cc2f64ccad8825f26b21dbcb6f
refs/heads/master
2020-08-03T15:13:51.622527
2019-09-30T07:33:03
2019-09-30T07:33:03
211,796,528
1
0
null
null
null
null
UTF-8
Java
false
false
1,978
java
package com.xinbo.fundstransfer.domain.entity; import javax.persistence.*; import java.math.BigDecimal; @Entity @Table(name = "biz_bank_log_commission") public class BizBankLogCommission { private Long id; private Long bankLogId; private Long returnSummaryId; private Integer accountId; private String uid; private String calcTime; private String commission; private BigDecimal amount; private Integer flwActivity; public BizBankLogCommission() { } @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id", updatable = false) public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(name = "bank_log_id") public Long getBankLogId() { return bankLogId; } public void setBankLogId(Long bankLogId) { this.bankLogId = bankLogId; } @Column(name = "return_summary_id") public Long getReturnSummaryId() { return returnSummaryId; } public void setReturnSummaryId(Long returnSummaryId) { this.returnSummaryId = returnSummaryId; } @Column(name = "account_id") public Integer getAccountId() { return accountId; } public void setAccountId(Integer accountId) { this.accountId = accountId; } @Column(name = "uid") public String getUid() { return uid; } public void setUid(String uid) { this.uid = uid; } @Column(name = "calc_time") public String getCalcTime() { return calcTime; } public void setCalcTime(String calcTime) { this.calcTime = calcTime; } @Column(name = "commission") public String getCommission() { return commission; } public void setCommission(String commission) { this.commission = commission; } @Column(name = "amount") public BigDecimal getAmount() { return amount; } public void setAmount(BigDecimal amount) { this.amount = amount; } @Column(name = "flw_activity") public Integer getFlwActivity() { return flwActivity; } public void setFlwActivity(Integer flwActivity) { this.flwActivity = flwActivity; } }
[ "chowleo0606@gmail.com" ]
chowleo0606@gmail.com
823844bba45508649698d72cba664229959de98d
d5c4d2f5d42ab62dc1d5e9d33e44695c1e756d86
/hl7-mdm-library/src/src/test/java/au/gov/nehta/vendorlibrary/mdm/test/MDMUtilTest.java
25882c36a3f94250bcd0289ffec97fd578651939
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
shruthisetty/integration-toolkit-sample-code-java
9d39ba42c1967620172ee05e40721ce1140b956b
bde3f532de3cb8c5d090919da7e4f197f92bd483
refs/heads/master
2020-05-31T23:12:50.461233
2018-09-19T00:47:31
2018-09-19T00:47:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,570
java
package au.gov.nehta.vendorlibrary.mdm.test; import au.gov.nehta.vendorlibrary.mdm.core.Message; import au.gov.nehta.vendorlibrary.mdm.util.MDMUtil; import org.junit.Assert; import org.junit.Test; import java.io.File; import java.io.IOException; public class MDMUtilTest { @Test public void testWriteMDMMessageToFile() throws Exception { Message in1 = MDMUtil.readMDMMessageFromFile("src\\test\\resources\\Example-HL7-MDM-20111117.txt"); String outPath = "C:\\projects\\MDM\\src\\test\\resources\\out.txt"; MDMUtil.writeMDMMessageToFile(in1, outPath); String compareVal = MDMUtil.readMDMMessageFromFile(outPath).toString(); // Must run this to get allow deletion of temp file. System.gc(); System.out.println("Temp file deletable: " + new File(outPath).canWrite()); System.out.println("Temp file deleted: " + new File(outPath).delete()); Assert.assertEquals(in1.toString(), compareVal); } @Test public void testRead_NetMDMMessage() throws IOException{ //read a mdm created by .net Message in1 = MDMUtil.readMDMMessageFromFile("src\\test\\resources\\netExample.hl7"); } @Test public void testWriteMDMMessageToFileEmpty() throws Exception { Message msg = MDMUtil.readMDMMessageFromFile("src\\test\\resources\\Empty.txt"); Assert.assertNull(msg); } @Test public void testReadMDMMessageFromFile() throws Exception { Message message = MDMUtil.readMDMMessageFromFile("C:\\projects\\MDM\\src\\test\\resources\\Example-HL7-MDM-20111117.txt"); Assert.assertNotNull(message); } }
[ "philip.wilford@digitalhealth.gov.au" ]
philip.wilford@digitalhealth.gov.au
7149f9a78189da740be28650165d856407e6a485
2c42d04cba77776514bc15407cd02f6e9110b554
/src/org/processmining/analysis/orgsimilarity/ui/SimilarityResultTableUI.java
c0de3de4588be03b8313aab57ff6e5b38c4bea8c
[]
no_license
pinkpaint/BPMNCheckingSoundness
7a459b55283a0db39170c8449e1d262e7be21e11
48cc952d389ab17fc6407a956006bf2e05fac753
refs/heads/master
2021-01-10T06:17:58.632082
2015-06-22T14:58:16
2015-06-22T14:58:16
36,382,761
0
1
null
2015-06-14T10:15:32
2015-05-27T17:11:29
null
UTF-8
Java
false
false
6,547
java
/*********************************************************** * This software is part of the ProM package * * http://www.processmining.org/ * * * * Copyright (c) 2003-2006 TU/e Eindhoven * * and is licensed under the * * Common Public License, Version 1.0 * * by Eindhoven University of Technology * * Department of Information Systems * * http://is.tm.tue.nl * * * **********************************************************/ package org.processmining.analysis.orgsimilarity.ui; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.util.HashMap; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.SwingConstants; import javax.swing.table.DefaultTableCellRenderer; import org.deckfour.slickerbox.components.RoundedPanel; import org.processmining.framework.log.LogReader; import org.processmining.framework.models.orgmodel.OrgEntity; import org.processmining.framework.plugin.ProvidedObject; import org.processmining.framework.plugin.Provider; import org.processmining.framework.ui.Message; import org.processmining.analysis.orgsimilarity.SimilarityResultTableModel; import org.processmining.analysis.orgsimilarity.SimilarityModel; /** * On the panel originator by task matrix is shown. The matrix show how frequent each originator executes specific tasks. <br/> * * @author Minseok Song * @version 1.0 */ public class SimilarityResultTableUI extends RoundedPanel { private SimilarityUI sUI; private SimilarityResultTableModel matrix; protected static Color COLOR_BG = new Color(140, 140, 140); private JTable table; public SimilarityResultTableUI(SimilarityUI sUI, SimilarityResultTableModel matrix) { super(10, 5, 5); setBackground(COLOR_BG); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); //add(Box.createVerticalStrut(8)); //add(Box.createVerticalStrut(8)); this.sUI = sUI; this.matrix = matrix; try { jbInit(); } catch (Exception ex) { ex.printStackTrace(); } } public void jbInit() throws Exception { table = new JTable(matrix); table.setBackground(COLOR_BG); for (int i = 1; i < table.getColumnCount(); i++) { DefaultTableCellRenderer renderer = new ColoredCellRenderer(matrix,sUI.getSelectedMetric()); renderer.setHorizontalAlignment(SwingConstants.RIGHT); table.getColumnModel().getColumn(i).setCellRenderer(renderer); } JScrollPane listScrollPane = new JScrollPane(table); listScrollPane.setBorder(BorderFactory.createEmptyBorder()); listScrollPane.setBackground(COLOR_BG); this.add(listScrollPane); /// PLUGIN TEST START // Message.add("<OriginatorByTaskMatrix>", Message.TEST); // matrix.writeToTestLog(); // Message.add("<SummaryOfMatrix sumOfCells=\"" + matrix.getSumOfOTMatrix() + "\" numberOfEvents=\"" + // log.getLogSummary().getNumberOfAuditTrailEntries() + "\">", Message.TEST); // Message.add("</OriginatorByTaskMatrix>", Message.TEST); // PLUGIN TEST END } } class ColoredCellRenderer extends DefaultTableCellRenderer { private HashMap<OrgEntity,OrgEntity> mapping; private SimilarityResultTableModel matrix; private String metric; public ColoredCellRenderer(SimilarityResultTableModel mtx, String metric) { this.metric = metric; this.matrix = mtx; this.mapping = (HashMap<OrgEntity,OrgEntity>) matrix.getMapping(); } public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { // Color color = new Color(0xFF, 0xFF, 0xFF); // for(OrgEntity entity:mapping.keySet()){ // if(entity.getID().equals(matrix.getRowIndex(row))){ // if(column!=0&&mapping.get(entity).getID().equals(matrix.getColumnIndex(column-1))){ // color = new Color(0xFF, 0xFF, 0xAA); // } // } // } // setText("" + freq); // setForeground(table.getForeground()); // setBackground(color); if(metric==SimilarityUI.HURESTIC){ int freq = (int) Math.round(Double.parseDouble(value.toString())); int maxvalue = (int) Math.round(matrix.getMaximumInRow(row)); int color = maxvalue <= 0 ? 0 : freq * 0xFF / maxvalue; setBackground(new Color(0xFF - color, 0xFF, 0xFF - color)); setText("" + freq); setBackground(new Color(0xFF - color, 0xFF, 0xFF - color)); } else { double freq = (double)Double.parseDouble(value.toString()); Color color = new Color(0xFF, 0xFF, 0xFF); for(OrgEntity entity:mapping.keySet()){ if(entity.getID().equals(matrix.getRowIndex(row))){ if(column!=0&&mapping.get(entity).getID().equals(matrix.getColumnIndex(column-1))){ color = new Color(0, 0xFF, 0); } } } setText("" + freq); setBackground(color); } // else if(metric==SimilarityUI.HURESTIC){ // int freq = (int) Math.round(Double.parseDouble(value.toString())); // int maxvalue = (int) Math.round(matrix.getMaximumInRow(row)); // int color = maxvalue <= 0 ? 0 : freq * 0xFF / maxvalue; // setBackground(new Color(0xFF - color, 0xFF, 0xFF - color)); // setText("" + freq); // setBackground(new Color(0xFF - color, 0xFF, 0xFF - color)); // } else if(matrix.getMaximumInRow(row)<=1.0){ // double freq = (double)Double.parseDouble(value.toString()); // Color color = new Color(0xFF, 0xFF, 0xFF); // for(OrgEntity entity:mapping.keySet()){ // if(entity.getID().equals(matrix.getRowIndex(row))){ // if(column!=0&&mapping.get(entity).getID().equals(matrix.getColumnIndex(column-1))){ // color = new Color(0, 0xFF, 0); // } // } // } // setText("" + freq); // setBackground(color); // } else { // double freq = Double.parseDouble(value.toString()); // int maxvalue = (int) Math.round(matrix.getMaximumInRow(row)); // int color = maxvalue <= 0 ? 0 : (int)freq * 0xFF / maxvalue; // if(color>0xFF) color=0xFF; // setBackground(new Color(0xFF - color, 0xFF, 0xFF - color)); // setText("" + freq); // setBackground(new Color(0xFF - color, 0xFF, 0xFF - color)); // // } // int freq = (int) Math.round(Double.parseDouble(value.toString())); // int color = maxValue <= 0 ? 0 : freq * 0xFF / maxValue; setForeground(table.getForeground()); return this; } }
[ "pinkpaint.ict@gmail.com" ]
pinkpaint.ict@gmail.com
fc2d2e72eef1ca4a10fcfe45e1bd9862b611e733
388d3ce23269d5f5e6d8d3393060e729d2025c42
/oskar-core/src/main/java/org/opencb/oskar/core/exceptions/OskarException.java
4e0b239e537486905223f8d8955af4f65667adbc
[ "Apache-2.0" ]
permissive
opencb/oskar
081d65558c3257c4237df581ea5bb0352dd802e1
cc5984b832feda43681037e7f0dc3bcaee8ec4c2
refs/heads/develop
2023-05-25T22:14:02.696385
2023-05-05T13:36:45
2023-05-05T13:36:45
155,799,804
4
0
Apache-2.0
2022-10-18T23:29:20
2018-11-02T01:52:53
Java
UTF-8
Java
false
false
3,437
java
package org.opencb.oskar.core.exceptions; import java.io.IOException; import java.util.Collection; /** * Created on 27/09/18. * * @author Jacobo Coll &lt;jacobo167@gmail.com&gt; */ public class OskarException extends Exception { // Do not use constructor from outside. Add a factory method. protected OskarException(String message) { super(message); } // Do not use constructor from outside. Add a factory method. protected OskarException(String message, Throwable cause) { super(message, cause); } // Do not use constructor from outside. Add a factory method. protected OskarException(Throwable cause) { super(cause); } public static OskarRuntimeException unsupportedFileFormat(String path) { return new OskarRuntimeException("Unsupported format for file " + path); } public static OskarException errorLoadingVariantMetadataFile(IOException e, String path) { return new OskarException("Error loading variant metadata file " + path, e); } public static OskarRuntimeException errorReadingVariantMetadataFromDataframe(IOException e) { return new OskarRuntimeException("Error reading variant metadata from dataframe", e); } public static OskarRuntimeException internalException(RuntimeException e) { return internalException("Unexpected internal exception: " + e.getMessage(), e); } public static OskarRuntimeException internalException(String msg, RuntimeException e) { return new OskarRuntimeException(msg, e); } public static OskarRuntimeException missingStudy(Collection<String> studies) { return missingParam("study", studies); } public static OskarRuntimeException missingParam(String paramName) { return missingParam(paramName, null); } public static OskarRuntimeException missingParam(String paramName, Collection<String> availableValues) { if (availableValues != null && !availableValues.isEmpty()) { return new OskarRuntimeException("Missing param " + paramName + ". Select one from " + availableValues); } else { return new OskarRuntimeException("Missing param " + paramName + "."); } } public static OskarRuntimeException unknownStudy(String study, Collection<String> studies) { return new OskarRuntimeException("Unknown study '" + study + "'. Select one from " + studies); } public static OskarRuntimeException unknownFamily(String studyId, String family, Collection<String> families) { return unknownFromStudy(studyId, "family", family, families); } public static OskarRuntimeException unknownSample(String studyId, String sample, Collection<String> samples) { return unknownFromStudy(studyId, "sample", sample, samples); } private static OskarRuntimeException unknownFromStudy(String studyId, String resource, String value, Collection<String> availableValues) { if (availableValues != null && !availableValues.isEmpty()) { return new OskarRuntimeException("Unknown " + resource + " '" + value + "' from study '" + studyId + "'. " + "Select one from " + availableValues); } else { return new OskarRuntimeException("Unknown " + resource + " '" + value + "' from study '" + studyId + "'."); } } }
[ "jacobo167@gmail.com" ]
jacobo167@gmail.com
6d46898b4dc29a6b3e77a8437ea8e011155fdb0c
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/28/org/apache/commons/math3/util/OpenIntToDoubleHashMap_changeIndexSign_331.java
e25163fd3e5d059131843cc5ba3bd448c5116d06
[]
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
991
java
org apach common math3 util open address map dedic map integ doubl smaller memori overhead standard code java util map code special iter return link iter fail fast code concurr modif except concurrentmodificationexcept code detect map modifi iter version open int doubl hash map openinttodoublehashmap serializ chang index sign param index initi index chang index chang index sign changeindexsign index index
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
f0837605cac1c857e2c6237c6eb9ba8c88988e08
6c2934dbd6ee7989a6f7b9ca1227cf223cd5749f
/src/main/java/com/huayun/cms/entity/TbUserInfo.java
4952f3ecfdbab91cde9feb3c8355d94986f0904c
[]
no_license
yuzhihui199229/manage
264092ac3b1107f87dfb471330cd8be8273bce7b
9024812f7bea2c72a922dae24e2d961ad55a5b10
refs/heads/master
2023-06-25T16:40:32.379936
2021-08-02T12:14:33
2021-08-02T12:14:33
388,290,084
0
0
null
null
null
null
UTF-8
Java
false
false
1,546
java
package com.huayun.cms.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import java.io.Serializable; /** * <p> * * </p> * * @author yuzh * @since 2021-07-20 */ @Data @Accessors(chain = true) public class TbUserInfo implements Serializable { private static final long serialVersionUID = 1L; /** * 解码系统名 */ @TableId("SYS_NAME") private String sysName; /** * 用户名 */ @TableField("USER_NAME") private String userName; /** * 密码 */ @TableField("USER_PASSWORD") private String userPassword; /** * 机房 */ @TableField("CENTER") private String center; /** * 用户状态 */ @TableField("USER_STATUS") private Integer userStatus; /** * 用户全称 */ @TableField("USER_FULL_NAME") private String userFullName; /** * 用户机器IP */ @TableField("USER_IP") private String userIp; /** * 市场权限 */ @TableField("MARKET_PERMISSION") private Integer marketPermission; /** * 行情数据权限 */ @TableField("DATA_PERMISSION") private Integer dataPermission; /** * 开始日期 */ @TableField("START_DATE") private String startDate; /** * 结束日期 */ @TableField("END_DATE") private String endDate; }
[ "844370396@qq.com" ]
844370396@qq.com
e7c68b40e859844fa3034f17db9bcc73b6b09ae1
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5644738749267968_0/java/dgalbraith33/P4.java
9eacd3aea8401f95ec74403dc2d55876898758b1
[]
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
2,461
java
import java.util.Scanner; import java.util.Arrays; import java.util.ArrayList; public class P4 { public static Scanner stdin = new Scanner(System.in); public static void main(String[] args) { int numCases = Integer.parseInt(stdin.nextLine()); for(int i = 1; i <= numCases; i++) { execute(i); } } public static void execute(int run) { int numCards = Integer.parseInt(stdin.nextLine()); double[] nArray = parseArray(); double[] kArray = parseArray(); Arrays.sort(nArray); Arrays.sort(kArray); ArrayList<Double> n = asList(nArray); ArrayList<Double> k = asList(kArray); int reg = regularWar(n,k); int dec = deceitWar(n,k); System.out.println("Case #"+run+": "+dec+" "+reg); } public static double[] parseArray() { String[] row = stdin.nextLine().split(" "); double[] res = new double[row.length]; for(int i = 0; i < row.length; i++) { res[i] = Double.parseDouble(row[i]); } return res; } public static int regularWar(ArrayList<Double> n, ArrayList<Double> k) { n = (ArrayList<Double>)n.clone(); k = (ArrayList<Double>)k.clone(); int wins = 0; while(n.size() > 0) { if(n.get(0) > k.get(k.size()-1)) { wins++; n.remove(0); k.remove(0); } else { int index = findBeats(n.get(0),k); n.remove(0); k.remove(index); } } return wins; } public static int findBeats(double d, ArrayList<Double> k) { for(int i = 0; i < k.size(); i++) { if(k.get(i) > d) { return i; } } return -1; } public static int deceitWar(ArrayList<Double> n , ArrayList<Double> k) { int wins = 0; while(n.size() > 0) { if(n.get(0) > k.get(0)) { wins++; n.remove(0); k.remove(0); } else { n.remove(0); k.remove(k.size()-1); } } return wins; } public static ArrayList<Double> asList(double[] arr) { ArrayList<Double> list = new ArrayList<Double>(); for(double d : arr) { list.add(d); } return list; } }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
7148c3b5b88d11e20138ceb0d937e72a231b5c92
38933bae7638a11fef6836475fef0d73e14c89b5
/magma-asserts/src/main/java/eu/lunisolar/magma/asserts/func/function/from/LIntFunctionAttest.java
276f9c2160a3fc67ff4bae65ab3581429771a2de
[ "Apache-2.0" ]
permissive
lunisolar/magma
b50ed45ce2f52daa5c598e4760c1e662efbbc0d4
41d3db2491db950685fe403c934cfa71f516c7dd
refs/heads/master
2023-08-03T10:13:20.113127
2023-07-24T15:01:49
2023-07-24T15:01:49
29,874,142
5
0
Apache-2.0
2023-05-09T18:25:01
2015-01-26T18:03:44
Java
UTF-8
Java
false
false
3,549
java
/* * This file is part of "lunisolar-magma". * * (C) Copyright 2014-2023 Lunisolar (http://lunisolar.eu/). * * 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 eu.lunisolar.magma.asserts.func.function.from; import eu.lunisolar.magma.asserts.func.FunctionalAttest.AssertionsCheck; import eu.lunisolar.magma.asserts.func.FunctionalAttest.SemiEvaluation; import eu.lunisolar.magma.func.supp.Be; import eu.lunisolar.magma.asserts.func.FunctionalAttest; import eu.lunisolar.magma.asserts.func.FunctionalAttest.*; import javax.annotation.Nonnull; // NOSONAR import javax.annotation.Nullable; // NOSONAR import eu.lunisolar.magma.func.supp.check.Checks; // NOSONAR import eu.lunisolar.magma.basics.meta.*; // NOSONAR import eu.lunisolar.magma.basics.meta.functional.*; // NOSONAR import eu.lunisolar.magma.basics.meta.functional.type.*; // NOSONAR import eu.lunisolar.magma.basics.meta.functional.domain.*; // NOSONAR import eu.lunisolar.magma.func.action.*; // NOSONAR import java.util.function.*; import eu.lunisolar.magma.func.function.from.*; import eu.lunisolar.magma.func.action.*; // NOSONAR import eu.lunisolar.magma.func.consumer.*; // NOSONAR import eu.lunisolar.magma.func.consumer.primitives.*; // NOSONAR import eu.lunisolar.magma.func.consumer.primitives.bi.*; // NOSONAR import eu.lunisolar.magma.func.consumer.primitives.obj.*; // NOSONAR import eu.lunisolar.magma.func.consumer.primitives.tri.*; // NOSONAR import eu.lunisolar.magma.func.function.*; // NOSONAR import eu.lunisolar.magma.func.function.conversion.*; // NOSONAR import eu.lunisolar.magma.func.function.from.*; // NOSONAR import eu.lunisolar.magma.func.function.to.*; // NOSONAR import eu.lunisolar.magma.func.operator.binary.*; // NOSONAR import eu.lunisolar.magma.func.operator.ternary.*; // NOSONAR import eu.lunisolar.magma.func.operator.unary.*; // NOSONAR import eu.lunisolar.magma.func.predicate.*; // NOSONAR import eu.lunisolar.magma.func.supplier.*; // NOSONAR /** Assert class for LIntFunction. */ public final class LIntFunctionAttest<R> extends FunctionalAttest.Full<LIntFunctionAttest<R>, LIntFunction<R>, LIntConsumer, Checks.Check<R>> { public LIntFunctionAttest(LIntFunction<R> actual) { super(actual); } public LIntFunctionAttest(LIntFunction<R> actual, String name) { super(actual, name); } @Nonnull public static <R> LIntFunctionAttest<R> attestIntFunc(LIntFunction<R> func) { return new LIntFunctionAttest(func); } @Nonnull public static <R> LIntFunctionAttest<R> attestIntFunc(LIntFunction<R> func, String name) { return new LIntFunctionAttest(func, name); } @Nonnull public Evaluation<LIntFunctionAttest<R>, LIntConsumer, R> doesApply(int a) { return new Evaluation<LIntFunctionAttest<R>, LIntConsumer, R>(this, () -> String.format("(%s)", a), (desc, pc) -> { var func = value(); Checks.check(func).must(Be::notNull, "Actual function is null."); if (pc != null) { pc.accept(a); } var result = func.apply(a); return Checks.attest(result, desc); }, recurringAssert); } }
[ "open@lunisolar.eu" ]
open@lunisolar.eu
7892357c5d5873c8e7dad1b1ae59bd2a0fa00ec5
b7c28a6cbfa3d8def83fa4bbefcc1f1dac8a9690
/services/src/main/java/org/keycloak/protocol/oidc/installation/KeycloakOIDCJbossSubsystemClientInstallation.java
87514414feed5955f189376df6703e08d66b29c1
[ "Apache-2.0" ]
permissive
zhouwanfeng/keycloak
45d4117d5039e4bd35f040dd011cb15c49291b7b
db78ea76b80ec12397773a33fd90571f7cb03f01
refs/heads/master
2020-04-03T08:46:57.958098
2016-01-30T13:40:10
2016-01-30T13:40:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,221
java
package org.keycloak.protocol.oidc.installation; import org.keycloak.Config; import org.keycloak.models.ClientModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.RealmModel; import org.keycloak.protocol.ClientInstallationProvider; import org.keycloak.protocol.oidc.OIDCLoginProtocol; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.net.URI; import java.util.Map; /** * @author <a href="mailto:bill@burkecentral.com">Bill Burke</a> * @version $Revision: 1 $ */ public class KeycloakOIDCJbossSubsystemClientInstallation implements ClientInstallationProvider { @Override public Response generateInstallation(KeycloakSession session, RealmModel realm, ClientModel client, URI baseUri) { StringBuffer buffer = new StringBuffer(); buffer.append("<secure-deployment name=\"WAR MODULE NAME.war\">\n"); buffer.append(" <realm>").append(realm.getName()).append("</realm>\n"); buffer.append(" <realm-public-key>").append(realm.getPublicKeyPem()).append("</realm-public-key>\n"); buffer.append(" <auth-server-url>").append(baseUri.toString()).append("</auth-server-url>\n"); if (client.isBearerOnly()){ buffer.append(" <bearer-only>true</bearer-only>\n"); } else if (client.isPublicClient()) { buffer.append(" <public-client>true</public-client>\n"); } buffer.append(" <ssl-required>").append(realm.getSslRequired().name()).append("</ssl-required>\n"); buffer.append(" <resource>").append(client.getClientId()).append("</resource>\n"); String cred = client.getSecret(); if (KeycloakOIDCClientInstallation.showClientCredentialsAdapterConfig(client)) { Map<String, Object> adapterConfig = KeycloakOIDCClientInstallation.getClientCredentialsAdapterConfig(session, client); for (Map.Entry<String, Object> entry : adapterConfig.entrySet()) { buffer.append(" <credential name=\"" + entry.getKey() + "\">"); Object value = entry.getValue(); if (value instanceof Map) { buffer.append("\n"); Map<String, Object> asMap = (Map<String, Object>) value; for (Map.Entry<String, Object> credEntry : asMap.entrySet()) { buffer.append(" <" + credEntry.getKey() + ">" + credEntry.getValue().toString() + "</" + credEntry.getKey() + ">\n"); } buffer.append(" </credential>\n"); } else { buffer.append(value.toString()).append("</credential>\n"); } } } if (client.getRoles().size() > 0) { buffer.append(" <use-resource-role-mappings>true</use-resource-role-mappings>\n"); } buffer.append("</secure-deployment>\n"); return Response.ok(buffer.toString(), MediaType.TEXT_PLAIN_TYPE).build(); } @Override public String getProtocol() { return OIDCLoginProtocol.LOGIN_PROTOCOL; } @Override public String getDisplayType() { return "Keycloak OIDC JBoss Subsystem XML"; } @Override public String getHelpText() { return "XML snippet you must edit and add to the Keycloak OIDC subsystem on your client app server. This type of configuration is useful when you can't or don't want to crack open your WAR file."; } @Override public void close() { } @Override public ClientInstallationProvider create(KeycloakSession session) { return this; } @Override public void init(Config.Scope config) { } @Override public void postInit(KeycloakSessionFactory factory) { } @Override public String getId() { return "keycloak-oidc-jboss-subsystem"; } @Override public boolean isDownloadOnly() { return false; } @Override public String getFilename() { return "keycloak-oidc-subsystem.xml"; } @Override public String getMediaType() { return MediaType.APPLICATION_XML; } }
[ "bburke@redhat.com" ]
bburke@redhat.com
02f22d1df43eeb7723a712ca5522cdfabc1b7e76
55bc52871df83e322a8fc5089a9f725ddcaebcfd
/src/main/java/com/isoftstone/jhipster/application/service/AuditEventService.java
b014bf42af25801a1a6f3a32f929f3a2f750ef27
[]
no_license
qqzhangl/jhipsterSampleApplication
5d93615a68fa70c4e519568fd801306dbc92ae8d
9a8c705ad91d0014cef32adc9b4024e6d7bfc0f7
refs/heads/master
2020-03-22T03:17:24.699748
2018-07-02T09:44:58
2018-07-02T09:44:58
139,423,230
0
0
null
2018-07-02T09:55:38
2018-07-02T09:44:48
Java
UTF-8
Java
false
false
1,907
java
package com.isoftstone.jhipster.application.service; import com.isoftstone.jhipster.application.config.audit.AuditEventConverter; import com.isoftstone.jhipster.application.repository.PersistenceAuditEventRepository; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.util.Optional; /** * Service for managing audit events. * <p> * This is the default implementation to support SpringBoot Actuator AuditEventRepository */ @Service @Transactional public class AuditEventService { private final PersistenceAuditEventRepository persistenceAuditEventRepository; private final AuditEventConverter auditEventConverter; public AuditEventService( PersistenceAuditEventRepository persistenceAuditEventRepository, AuditEventConverter auditEventConverter) { this.persistenceAuditEventRepository = persistenceAuditEventRepository; this.auditEventConverter = auditEventConverter; } public Page<AuditEvent> findAll(Pageable pageable) { return persistenceAuditEventRepository.findAll(pageable) .map(auditEventConverter::convertToAuditEvent); } public Page<AuditEvent> findByDates(Instant fromDate, Instant toDate, Pageable pageable) { return persistenceAuditEventRepository.findAllByAuditEventDateBetween(fromDate, toDate, pageable) .map(auditEventConverter::convertToAuditEvent); } public Optional<AuditEvent> find(Long id) { return Optional.ofNullable(persistenceAuditEventRepository.findById(id)) .filter(Optional::isPresent) .map(Optional::get) .map(auditEventConverter::convertToAuditEvent); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
1ef2e2459fb1a4ca82c2ecc30ecb4d6a1dd51f20
edb6910171402be6db714fa7a702aceeb80779bb
/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/widgetinform/WidgetInFormUIDefinition.java
136532ed1c24f779593c4f1cf2b110d137281f33
[ "Apache-2.0" ]
permissive
eid101/InjazErp
2e87b9f0f66fcb5c8b3db251496968f9029c6b7f
6d7c69a9d3a6023e093ab0d7b356983fdee1e4c8
refs/heads/master
2021-05-09T20:04:10.687300
2018-01-24T01:39:46
2018-01-24T01:39:46
118,670,797
0
0
Apache-2.0
2018-08-29T03:51:21
2018-01-23T21:15:39
Java
UTF-8
Java
false
false
2,615
java
/* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.1 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2011-2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ package org.openbravo.client.myob.widgetinform; import org.apache.log4j.Logger; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; import org.openbravo.client.kernel.reference.UIDefinition; import org.openbravo.client.myob.WidgetClass; import org.openbravo.client.myob.WidgetReference; import org.openbravo.dal.service.OBDal; import org.openbravo.model.ad.ui.Field; /** * Implementation of the Widget in Form UIdefinition * * @author huehner * */ public class WidgetInFormUIDefinition extends UIDefinition { private static Logger widgetLog = Logger.getLogger(WidgetInFormUIDefinition.class); @Override public String getFormEditorType() { return "OBWidgetInFormItem"; } @Override public String getFieldProperties(Field field) { String fieldProperties = super.getFieldProperties(field); if (field == null) { return fieldProperties; } // get widgetClass from reference WidgetReference wr = OBDal.getInstance().get(WidgetReference.class, getReference().getId()); WidgetClass widgetClass = wr.getWidgetClass(); try { JSONObject o = (fieldProperties == null || fieldProperties.trim().length() == 0) ? new JSONObject() : new JSONObject(fieldProperties); o.put("widgetClassId", widgetClass.getId()); o.put("showTitle", wr.isShowFieldTitle()); return o.toString(); } catch (JSONException e) { // be robust widgetLog.error(e.getMessage(), e); return fieldProperties; } } @Override public boolean showHover() { return false; } }
[ "eid.almutari@gmail.com" ]
eid.almutari@gmail.com
29ac17c744920bf76b2daca35249d2e9fdcfc8a3
0c818a1b062cf3efa09de53e87653fc33ff08b09
/src/com/nisira/alien/ReaderAlien.java
944c2f0bcf3c5ff175a4f6e47e483c8f13b886e4
[]
no_license
aburgosd91/MasterNisiraPatos
786dac77c43114d66c5624721b4760900fd8ffdf
92c7a503c29e89097f4f0513bec66aaf061fae6d
refs/heads/master
2021-01-20T01:23:28.380985
2017-04-24T20:25:53
2017-04-24T20:25:53
85,764,472
0
0
null
null
null
null
UTF-8
Java
false
false
7,744
java
package com.nisira.alien; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.joda.time.DateTime; import com.alien.enterpriseRFID.reader.AlienReaderCommandErrorException; import com.alien.enterpriseRFID.reader.AlienReaderConnectionException; import com.alien.enterpriseRFID.reader.AlienReaderException; import com.alien.enterpriseRFID.reader.AlienReaderTimeoutException; import com.alien.enterpriseRFID.tags.Tag; import com.nisira.Inicio; import com.nisira.entidad.ANTENA; public class ReaderAlien extends AlienRfid{ public static List<Tag> lecturaRfid() throws AlienReaderException{ String console=""; List<Tag> chips=new ArrayList(); String datosConsole[]; Tag tag; ComandosRfid.openConsoleComand(); /*********************CONFIGURACION INICIAL******************************/ ComandosRfid.reader.doReaderCommand(ComandosRfid.comandParametro(ComandosRfid.comandoGeneralCommands[0],"2","1"));//Configurar Antena que Leerá /************************************************************************/ StringTokenizer tokens; console=ComandosRfid.reader.doReaderCommand(ComandosRfid.comandoTaglist[0]).trim(); // System.out.println("Console:"+console); // addConsole("Console:"+console); if(console!=null){ if(!console.equalsIgnoreCase(ComandosRfid.comandoRestricciones[0])){// Result = (No Tags) tokens = new StringTokenizer(console,"\n"); while(tokens.hasMoreTokens()){ datosConsole=tokens.nextToken().split(","); tag=new Tag(datosConsole[0].split(":")[1]);//Id // tag.setDiscoverTime(new DateTime(datosConsole[1].split(":")[1]).getMillis()); // tag.setRenewTime(new DateTime(datosConsole[2].split(":")[1]).getMillis()); tag.setRenewCount(Integer.parseInt(datosConsole[3].split(":")[1])); tag.setAntenna(Integer.parseInt(datosConsole[4].split(":")[1])); // tag.setProtocol(Integer.parseInt(datosConsole[5].split(":")[1])); chips.add(tag); } } ReaderAlien.response(chips); //System.out.println("\nAntena: "+ComandosRfid.reader.getAntennaSequence()); //addConsole("Antena: "+ComandosRfid.reader.getAntennaSequence()); } ComandosRfid.closeConsole(); return chips; } public static List<Tag> lecturaRfidMejora1() throws AlienReaderException{ List<Tag> chips=new ArrayList(); Tag tag=null; if(ComandosRfid.openConsoleComand()){ /*<COM> -> ASIGNADO*/ /******************CODIGO MEJORADO********************/ Tag tagList[] = ComandosRfid.reader.getTagList(); if (tagList == null) { System.out.println("No Tags Found"); } else { System.out.println("Tag(s) found:"); for (int i=0; i<tagList.length; i++) { tag = tagList[i]; // System.out.println("ID:" + tag.getTagID() + // ", Discovered:" + tag.getDiscoverTime() + // ", Last Seen:" + tag.getRenewTime() + // ", Antenna:" + tag.getAntenna() + // ", Reads:" + tag.getRenewCount() // ); if(tag!=null) chips.add(tag); } ReaderAlien.response(chips); } ComandosRfid.closeConsole(); } return chips; } public static List<Tag> lecturaRfidAntena(List<String> ant) throws AlienReaderException{ String console=""; boolean solountag; List<Tag> chips=new ArrayList(); String datosConsole[]; Tag tag; // ComandosRfid.closeConsole(); if(ComandosRfid.openConsoleComand()){ for(String a : ant){ ComandosRfid.reader.doReaderCommand(ComandosRfid.comandParametro_object(ComandosRfid.comandoGeneralCommands[0],a)); StringTokenizer tokens; console=ComandosRfid.reader.doReaderCommand(ComandosRfid.comandoTaglist[0]).trim(); if(console!=null){ if(!console.equalsIgnoreCase(ComandosRfid.comandoRestricciones[0])){// Result = (No Tags) tokens = new StringTokenizer(console,"\n"); solountag=true; while(tokens.hasMoreTokens() & solountag){ datosConsole=tokens.nextToken().split(","); tag=new Tag(datosConsole[0].split(":")[1]);//Id // tag.setDiscoverTime(new DateTime(datosConsole[1].split(":")[1]).getMillis()); // tag.setRenewTime(new DateTime(datosConsole[2].split(":")[1]).getMillis()); tag.setRenewCount(Integer.parseInt(datosConsole[3].split(":")[1])); tag.setAntenna(Integer.parseInt(datosConsole[4].split(":")[1])); // tag.setProtocol(Integer.parseInt(datosConsole[5].split(":")[1])); chips.add(tag); solountag=false; } } } } } if(Inicio.consolesRfid){ System.out.println(" TEST "); ReaderAlien.response(chips);} ComandosRfid.closeConsole(); return chips; } public static void response(List result){ System.out.println("\nTotal Tag: "+result.size()); for(int i=0;i<result.size();i++){ System.out.println("ID:" + ((Tag)result.get(i)).getTagID() + ", Discovered:" + ((Tag)result.get(i)).getDiscoverTime() + ", Last Seen:" + ((Tag)result.get(i)).getRenewTime() + ", Antenna:" + ((Tag)result.get(i)).getAntenna() + ", Reads:" + ((Tag)result.get(i)).getRenewCount() ); } } /* public static void response(List result){ System.out.println("\nTotal Tag: "+result.size()); for(int i=0;i<result.size();i++){ System.out.println("N°"+(i+1)+" Tag: "+((Tag)result.get(i)).getTagID()); addConsole("N°"+(i+1)+" Tag: "+((Tag)result.get(i)).getTagID()); } } */ public static List<TagsRfid> getDatosTag() throws AlienReaderException{ List<TagsRfid> listTag = new ArrayList<>(); for(ANTENA an : ComandosRfid.lstAntena) listTag.add(new TagsRfid(an)); List<Tag> lTag=lecturaRfidAntena(ComandosRfid.lstAntena_String); for(int i=0;i<listTag.size();i++){/*POR NUMERO DE ANTENA*/ Tag x = deleteSoloUnoPorAntena(lTag,listTag.get(i).getAntena().getIdantena()-1); listTag.get(i).setTag(x); } return listTag; } public static Tag deleteSoloUnoPorAntena(List<Tag> lTag,int antena){ Tag tg = null; for(Tag obj:lTag){ if(obj.getAntenna()==antena){ tg=obj; break; } } return tg; } public static boolean validarListTagsRfid(List<TagsRfid> listTag){ boolean flag =false; for(TagsRfid obj :listTag){ if(obj.getTag()==null){ flag=true; break; } } return flag; } public static void main(String[] args) throws InterruptedException, AlienReaderException { // TODO Auto-generated method stub do{ ReaderAlien.lecturaRfidMejora1(); Thread.sleep(100); }while(true); } public static void exectComando(String cmd,String port,List<String> ant) throws AlienReaderException{ ComandosRfid.openConsoleComand(port); String console; /*********************CONFIGURACION INICIAL******************************/ ComandosRfid.reader.doReaderCommand(ComandosRfid.comandParametro(ComandosRfid.comandoGeneralCommands[0],ant));//Configurar Antena que Leerá /************************************************************************/ console=ComandosRfid.reader.doReaderCommand(cmd.trim()); if(Inicio.consolesRfid)addConsole(console); } public static void executeComando(String cmd) throws AlienReaderException{ ComandosRfid.openConsoleComand(ComandosRfid.puertoCom); String console; /*********************CONFIGURACION INICIAL******************************/ ComandosRfid.reader.doReaderCommand(ComandosRfid.comandParametro(ComandosRfid.comandoGeneralCommands[0],ComandosRfid.lstAntena_String));//Configurar Antena que Leerá /************************************************************************/ console=ComandosRfid.reader.doReaderCommand(cmd.trim()); if(Inicio.consolesRfid)addConsole(console); } }
[ "aburgosd91@gmail.com" ]
aburgosd91@gmail.com
cb5e0b89a6f2649ac3fea765535ec67cace4af81
7b46d6109c2e57c651c0911dae5220fd4f232a2b
/app/src/main/java/megvii/testfacepass/pa/severs/AutoSendMsgService.java
7edac566fb89d76afeee462bff76cc9d5bb7f815
[]
no_license
yoyo89757001/dezhichuangxinjiudian
0f8088afd533f5806ce2d4d2e24fa71dbfe4fee0
3dd3ce9c463e4f3b50cefbdaf1a8a6b3e875e8d7
refs/heads/master
2020-12-03T22:37:46.268408
2020-01-08T09:55:26
2020-01-08T09:55:26
231,508,042
0
1
null
null
null
null
UTF-8
Java
false
false
895
java
package megvii.testfacepass.pa.severs; import android.accessibilityservice.AccessibilityService; import android.util.Log; import android.view.accessibility.AccessibilityEvent; public class AutoSendMsgService extends AccessibilityService { /** * 必须重写的方法,响应各种事件。 * * @param event */ @Override public void onAccessibilityEvent(final AccessibilityEvent event) { int eventType = event.getEventType(); switch (eventType) { case AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED: { String currentActivity = event.getClassName().toString(); Log.d("AutoSendMsgService", currentActivity); Log.d("AutoSendMsgService", "event.getAction():" + event.getAction()); } break; } } @Override public void onInterrupt() { } }
[ "332663557@qq.com" ]
332663557@qq.com
9cda9ad85f260af37a4ef4f5e6433032bf773cc1
cca4912acfe823cdf593e164c052872d2342fe75
/unitygvr110/src/main/java/com/google/vr/cardboard/MutableEglConfigChooser.java
2fe74ecd1f52e6c51b0f233a3d282bea486274be
[]
no_license
playbar/libgvr
21eb4df9038e9573c2ccce2e95cabc64c682014e
303e230f95d26c1a9312dd61a0eead0983d6b267
refs/heads/master
2023-06-07T14:58:30.221723
2017-12-14T08:13:41
2017-12-14T08:13:41
78,094,662
5
0
null
null
null
null
UTF-8
Java
false
false
5,098
java
package com.google.vr.cardboard; import android.opengl.EGLExt; import android.opengl.GLSurfaceView.EGLConfigChooser; import javax.microedition.khronos.egl.EGL10; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.egl.EGLDisplay; public class MutableEglConfigChooser implements EGLConfigChooser { private static final int EGL_MUTABLE_RENDER_BUFFER_BIT = 4096; private static final int EGL_OPENGL_ES3_BIT_KHR = 64; private boolean forceMutableBuffer = false; public MutableEglConfigChooser() { } public MutableEglConfigChooser(boolean var1) { this.forceMutableBuffer = var1; } public EGLConfig chooseConfig(EGL10 var1, EGLDisplay var2) { int [] config_num = new int[1]; var1.eglGetConfigs(var2, null, 0, config_num); EGLConfig []configs = new EGLConfig[config_num[0]]; var1.eglGetConfigs(var2, configs, config_num[0], config_num); for ( int i = 0; i < config_num[0]; ++i){ // var1.eglGetConfigAttrib(var2, configs[i], ) } // int[] var3 = new int[]{12324, 8, 12323, 8, 12322, 8, 12321, 0, 12325, 0, 12326, 0, 12352, 64, 12339, 4100, 12344}; int[] attrlist = new int[]{ EGL10.EGL_RED_SIZE, 8, EGL10.EGL_GREEN_SIZE, 8, EGL10.EGL_BLUE_SIZE, 8, EGL10.EGL_ALPHA_SIZE, 0, EGL10.EGL_DEPTH_SIZE, 0, EGL10.EGL_STENCIL_SIZE, 0, EGL10.EGL_RENDERABLE_TYPE, 64, EGL10.EGL_SURFACE_TYPE, EGL10.EGL_WINDOW_BIT, // EGLExt.EGL_MUTABLE_RENDER_BUFFER_BIT_KHR, // EGL10.EGL_SURFACE_TYPE, 0x1004, EGL10.EGL_NONE }; int[] configsize = new int[1]; if(!var1.eglChooseConfig(var2, attrlist, (EGLConfig[])null, 0, configsize) && this.forceMutableBuffer) { throw new IllegalArgumentException("eglChooseConfig failed"); } else { attrlist[15] = 4; if(!var1.eglChooseConfig(var2, attrlist, (EGLConfig[])null, 0, configsize)) { throw new IllegalArgumentException("eglChooseConfig failed"); } else { int var5; if((var5 = configsize[0]) <= 0) { throw new IllegalArgumentException("No configs match configSpec"); } else { EGLConfig[] var6 = new EGLConfig[var5]; if(!var1.eglChooseConfig(var2, attrlist, var6, var5, configsize)) { throw new IllegalArgumentException("eglChooseConfig#2 failed"); } else { EGLConfig var7; if((var7 = chooseConfig(var1, var2, var6, this.forceMutableBuffer)) == null) { throw new IllegalArgumentException("No config chosen"); } else { return var7; } } } } } } private static EGLConfig chooseConfig(EGL10 var0, EGLDisplay var1, EGLConfig[] var2, boolean var3) { EGLConfig[] var4 = var2; int var5 = var2.length; for(int var6 = 0; var6 < var5; ++var6) { EGLConfig var7 = var4[var6]; int var8 = findConfigAttrib(var0, var1, var7, 12325, 0); int var9 = findConfigAttrib(var0, var1, var7, 12326, 0); int var10 = findConfigAttrib(var0, var1, var7, 12324, 0); int var11 = findConfigAttrib(var0, var1, var7, 12323, 0); int var12 = findConfigAttrib(var0, var1, var7, 12322, 0); int var13 = findConfigAttrib(var0, var1, var7, 12339, 0); if(var10 == 8 && var11 == 8 && var12 == 8 && var8 == 0 && var9 == 0 && (!var3 || (var13 & 0x1000) != 0)) { return var7; } } // for(int var6 = 0; var6 < var5; ++var6) // { // EGLConfig var7 = var4[var6]; // int var8 = findConfigAttrib(var0, var1, var7, EGL10.EGL_DEPTH_SIZE, 0); // int var9 = findConfigAttrib(var0, var1, var7, EGL10.EGL_STENCIL_SIZE, 0); // int var10 = findConfigAttrib(var0, var1, var7, EGL10.EGL_RED_SIZE, 0); // int var11 = findConfigAttrib(var0, var1, var7, EGL10.EGL_GREEN_SIZE, 0); // int var12 = findConfigAttrib(var0, var1, var7, EGL10.EGL_BLUE_SIZE, 0); // int var13 = findConfigAttrib(var0, var1, var7, EGL10.EGL_SURFACE_TYPE, 0); //// boolean bre = (var10 == 8 && var11 == 8 && var12 == 8 && var8 == 0 && var9 == 0 && (!var3 || (var13 & 4096) != 0)); // boolean bre = (var10 == 8 && var11 == 8 && var12 == 8 && var8 == 0 && var9 == 0 ); // if(bre) // { // return var7; // } // } return null; } private static int findConfigAttrib(EGL10 var0, EGLDisplay var1, EGLConfig var2, int var3, int var4) { int[] var5 = new int[1]; return var0.eglGetConfigAttrib(var1, var2, var3, var5)?var5[0]:var4; } }
[ "hgl868@126.com" ]
hgl868@126.com
549ec75da5dcf9f44adb5f29f4926de9b62a2280
867467cd01c7bac85f2ef4be0fc9e1b2ab63ce1d
/src/main/java/com/bookstore/service/util/RandomUtil.java
835f1fa6d73a95c4aee4d59f8835cdf5e5a509d4
[]
no_license
RRanjitha/JhipsterPostgresApplication
9e8c0e66179b3de56be91f18690882aafed6872c
ecbd24e31ab9306814d9920d9dcc23a6987a88b7
refs/heads/master
2020-03-24T22:48:42.435571
2018-08-01T04:49:47
2018-08-01T04:49:47
143,104,042
0
0
null
null
null
null
UTF-8
Java
false
false
1,458
java
package com.bookstore.service.util; import org.apache.commons.lang3.RandomStringUtils; /** * Utility class for generating random Strings. */ public final class RandomUtil { private static final int DEF_COUNT = 20; private RandomUtil() { } /** * Generate a password. * * @return the generated password */ public static String generatePassword() { return RandomStringUtils.randomAlphanumeric(DEF_COUNT); } /** * Generate an activation key. * * @return the generated activation key */ public static String generateActivationKey() { return RandomStringUtils.randomNumeric(DEF_COUNT); } /** * Generate a reset key. * * @return the generated reset key */ public static String generateResetKey() { return RandomStringUtils.randomNumeric(DEF_COUNT); } /** * Generate a unique series to validate a persistent token, used in the * authentication remember-me mechanism. * * @return the generated series data */ public static String generateSeriesData() { return RandomStringUtils.randomAlphanumeric(DEF_COUNT); } /** * Generate a persistent token, used in the authentication remember-me mechanism. * * @return the generated token data */ public static String generateTokenData() { return RandomStringUtils.randomAlphanumeric(DEF_COUNT); } }
[ "ranji.cs016@gmail.com" ]
ranji.cs016@gmail.com
f9362c11f39c54a57a9d1194fca69392923c2bb9
14f20bfd78bbb0d7f76801fde8a971eefcb56dd4
/megatron-api/src/main/java/com/mycila/megatron/DefaultMegatronConfiguration.java
551c9ddeb1921add2a6e0e26ac24f0895d87c31d
[ "Apache-2.0" ]
permissive
mathieucarbou/megatron
4b44fba4ea99f58b5393f35ff364e25f2ca782fd
eb01e2877f4563f1bdb79e80ee3a8f2e360f8deb
refs/heads/master
2018-11-06T11:32:01.310684
2018-08-27T15:11:57
2018-08-27T15:11:57
105,298,228
0
3
Apache-2.0
2018-03-20T22:48:03
2017-09-29T17:13:48
Java
UTF-8
Java
false
false
3,402
java
/* * Copyright © 2017 Mathieu Carbou (mathieu.carbou@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.mycila.megatron; import com.tc.classloader.CommonComponent; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.Properties; import java.util.concurrent.TimeUnit; /** * @author Mathieu Carbou */ @CommonComponent public class DefaultMegatronConfiguration implements MegatronConfiguration { private long statisticCollectorInterval = 10_000L; private final Properties properties = new Properties(); @Override public long getStatisticCollectorInterval() { return statisticCollectorInterval; } @Override public String getProperty(String key, String def) { String val = System.getenv(key.toUpperCase().replace('.', '_')); if (val != null) { return val; } val = System.getProperty(key); if (val != null) { return val; } return properties.getProperty(key, def); } @Override public Properties getProperties() { return properties; } public DefaultMegatronConfiguration loadProperties(File propertyFile) { try { return loadProperties(propertyFile.toURI().toURL()); } catch (MalformedURLException e) { throw new IllegalArgumentException(propertyFile.toString(), e); } } public DefaultMegatronConfiguration loadProperties(URL url) { Properties properties = new Properties(); try (InputStream is = url.openStream()) { properties.load(is); return setProperties(properties); } catch (IOException e) { throw new IllegalArgumentException("Unable to real location " + url + " : " + e.getMessage(), e); } } public DefaultMegatronConfiguration setStatisticCollectorInterval(long statisticCollectorInterval, TimeUnit timeUnit) { this.statisticCollectorInterval = TimeUnit.MILLISECONDS.convert(statisticCollectorInterval, timeUnit); return this; } public DefaultMegatronConfiguration setProperty(String name, String val) { properties.setProperty(name, val); return this; } @SuppressWarnings("CollectionAddedToSelf") public DefaultMegatronConfiguration setProperties(Properties properties) { this.properties.putAll(properties); return this; } public DefaultMegatronConfiguration merge(DefaultMegatronConfiguration configuration) { this.statisticCollectorInterval = configuration.statisticCollectorInterval; this.properties.putAll(configuration.properties); return this; } @Override public String toString() { final StringBuilder sb = new StringBuilder("DefaultMegatronConfiguration{"); sb.append("statisticCollectorInterval=").append(statisticCollectorInterval); sb.append(", properties=").append(properties); sb.append('}'); return sb.toString(); } }
[ "mathieu.carbou@gmail.com" ]
mathieu.carbou@gmail.com
285c4eb6279c762033a6a57f77b63c3567cb0f1d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_840e71e4d324d41fbbaaff81ec5759453d494720/Term/7_840e71e4d324d41fbbaaff81ec5759453d494720_Term_t.java
7caf425a2d5544642c39e8a06a20f5d3d5966912
[]
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
524
java
package uk.ac.ox.oucs.oxam.model; import java.io.Serializable; public class Term implements Serializable{ private static final long serialVersionUID = 1L; private final String code; private final String name; public Term(String code, String name) { this.code = code; this.name = name; } public String getCode() { return code; } public String getName() { return name; } @Override public String toString() { return "Term [code=" + code + ", name=" + name + "]"; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b7e37f78697530ae3230c64c1f609636f0f48bc0
7752465c7ebe4619381e8296089070e0d6dbd5e6
/indexer/src/main/java/org/jboss/windup/maven/nexusindexer/BomBasedArtifactFilterFactory.java
60add9d41628dbf8875e415713d18cd46f4c173b
[]
no_license
windup/nexus-repository-indexer
6deb2c0ccc1537e067a0ce776b24d6a2e4f5957d
cc97c9eb54372efe345e260e6e1991efad31f100
refs/heads/master
2023-06-07T17:12:49.725934
2023-06-01T13:38:50
2023-06-01T13:38:50
30,382,702
3
8
null
2023-06-01T11:31:28
2015-02-05T22:46:15
Java
UTF-8
Java
false
false
2,543
java
package org.jboss.windup.maven.nexusindexer; import java.util.List; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; import org.eclipse.aether.graph.Dependency; /** * Creates an ArtifactFilter which accepts any artifact specified in given BOM. * * @author <a href="http://ondra.zizka.cz/">Ondrej Zizka, zizka@seznam.cz</a> */ public class BomBasedArtifactFilterFactory { private static final Logger LOG = Logger.getLogger( BomBasedArtifactFilterFactory.class.getName() ); // G:A:V[:C[:P]] // Maven uses G:A[:P[:C]]:V" //public static final Pattern REGEX_GAVCP = Pattern.compile("([-.\\w]+):([-.\\w]+):([-.\\w]+)(:[-.\\w]+)?(:[-.\\w]+)?"); public static final Pattern REGEX_GAVCP = Pattern.compile("([^: ]+):([^: ]+):([^: ]+)(:[^: ]+)?(:[^: ]+)?"); private final ArtifactDownloader downloader = new ArtifactDownloader(); /** * * @param coords Format: G:A:V; classifier and packaging not supported for BOM. * @return */ public ArtifactFilter createArtifactFilterFromBom(String coords) { Matcher mat = REGEX_GAVCP.matcher(coords); if (!mat.matches()) throw new IllegalArgumentException("Wrong Maven coordinates format, must be G:A:V[:C[:P]] . " + coords); if (mat.groupCount() != 3 && (!StringUtils.isBlank(mat.group(4)) || !StringUtils.isBlank(mat.group(5))) ) throw new IllegalArgumentException("Classifier and packaging is not supported for BOM, invalid: " + coords + " " + mat.groupCount()); return createArtifactFilterFromBom(mat.group(1), mat.group(2), mat.group(3)); } public ArtifactFilter createArtifactFilterFromBom(String groupId, String artifactId, String version) { final DefaultArtifact bom = new DefaultArtifact(groupId, artifactId, "pom", version); LOG.info("Resolving BOM: " + bom); Artifact artifact = downloader.downloadArtifact(bom); LOG.info("Getting dependencies for BOM: " + bom); List<Dependency> deps = downloader.getDependenciesFor(artifact, true); DefinitionArtifactFilter filter = new DefinitionArtifactFilter(); for (Dependency dep : deps) { final Artifact art = dep.getArtifact(); filter.addArtifact(art.getGroupId(), art.getArtifactId(), art.getVersion()); } return filter; } }
[ "zizka@seznam.cz" ]
zizka@seznam.cz
0eb0f8db45d3c64cb529b87e612042e6052be7f6
c04e424a5282b06598fe2d6f689f69b2bcf00786
/isap-dao/src/main/java/com/gosun/isap/dao/po/TGuard.java
04d051f65dbfef973d6d84e9ce6ccd8886bfc74c
[]
no_license
soon14/isap-parent
859d9c0d4adc0e7d60f92a537769b237c1c5095b
2f6c1ec4e635e08eab57d4df4c92e90e4e09e044
refs/heads/master
2021-12-15T03:09:00.641560
2017-07-26T02:13:40
2017-07-26T02:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,855
java
package com.gosun.isap.dao.po; import java.io.Serializable; import java.util.Date; public class TGuard implements Serializable { private Long id; private String name; private String phone; private String guardDesc; private Long groupId; private String cid; private String homeAddress; private Date birthday; private Long userId; private static final long serialVersionUID = 1L; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name == null ? null : name.trim(); } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone == null ? null : phone.trim(); } public String getGuardDesc() { return guardDesc; } public void setGuardDesc(String guardDesc) { this.guardDesc = guardDesc == null ? null : guardDesc.trim(); } public Long getGroupId() { return groupId; } public void setGroupId(Long groupId) { this.groupId = groupId; } public String getCid() { return cid; } public void setCid(String cid) { this.cid = cid == null ? null : cid.trim(); } public String getHomeAddress() { return homeAddress; } public void setHomeAddress(String homeAddress) { this.homeAddress = homeAddress == null ? null : homeAddress.trim(); } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } }
[ "lzk90s@163.com" ]
lzk90s@163.com
b44c08bdb5829ca462a9247d2c5430359c202aa5
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/148/711/CWE90_LDAP_Injection__getParameter_Servlet_22b.java
bdb63df16d1d2da354d25e51ae0fe3653d48a85c
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
2,661
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE90_LDAP_Injection__getParameter_Servlet_22b.java Label Definition File: CWE90_LDAP_Injection.label.xml Template File: sources-sink-22b.tmpl.java */ /* * @description * CWE: 90 LDAP Injection * BadSource: getParameter_Servlet Read data from a querystring using getParameter() * GoodSource: A hardcoded string * Sinks: * BadSink : data concatenated into LDAP search, which could result in LDAP Injection * Flow Variant: 22 Control flow: Flow controlled by value of a public static variable. Sink functions are in a separate file from sources. * * */ import javax.servlet.http.*; public class CWE90_LDAP_Injection__getParameter_Servlet_22b { public String badSource(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; if (CWE90_LDAP_Injection__getParameter_Servlet_22a.badPublicStatic) { /* POTENTIAL FLAW: Read data from a querystring using getParameter */ data = request.getParameter("name"); } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = null; } return data; } /* goodG2B1() - use goodsource and badsink by setting the static variable to false instead of true */ public String goodG2B1Source(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; if (CWE90_LDAP_Injection__getParameter_Servlet_22a.goodG2B1PublicStatic) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = null; } else { /* FIX: Use a hardcoded string */ data = "foo"; } return data; } /* goodG2B2() - use goodsource and badsink by reversing the blocks in the if in the sink function */ public String goodG2B2Source(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; if (CWE90_LDAP_Injection__getParameter_Servlet_22a.goodG2B2PublicStatic) { /* FIX: Use a hardcoded string */ data = "foo"; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = null; } return data; } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
8f986e08bc16af6163a435e1318e1142d319cb44
3ab35f8af2058e822e060172c1213567a48f1fa4
/asis_sharel_files/shareL/sources/okhttp3/internal/http/HttpHeaders.java
f5f436529dc35c5fd4f6c07d60aecc81fe956c92
[]
no_license
Voorivex/ctf
9aaf4e799e0ae47bb7959ffd830bd82f4a7e7b78
a0adad53cbdec169c72cf08c86fa481cd00918b6
refs/heads/master
2021-06-06T03:46:43.844696
2019-11-17T16:25:25
2019-11-17T16:25:25
222,276,972
3
0
null
null
null
null
UTF-8
Java
false
false
6,429
java
package okhttp3.internal.http; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; import java.util.TreeSet; import java.util.regex.Matcher; import java.util.regex.Pattern; import okhttp3.Challenge; import okhttp3.Cookie; import okhttp3.CookieJar; import okhttp3.Headers; import okhttp3.Headers.Builder; import okhttp3.HttpUrl; import okhttp3.Request; import okhttp3.Response; import okhttp3.internal.Util; public final class HttpHeaders { private static final Pattern PARAMETER = Pattern.compile(" +([^ \"=]*)=(:?\"([^\"]*)\"|([^ \"=]*)) *(:?,|$)"); private static final String QUOTED_STRING = "\"([^\"]*)\""; private static final String TOKEN = "([^ \"=]*)"; private HttpHeaders() { } public static long contentLength(Response response) { return contentLength(response.headers()); } public static long contentLength(Headers headers) { return stringToLong(headers.get("Content-Length")); } private static long stringToLong(String str) { long j = -1; if (str == null) { return -1; } try { j = Long.parseLong(str); } catch (NumberFormatException unused) { } return j; } public static boolean varyMatches(Response response, Headers headers, Request request) { for (String str : varyFields(response)) { if (!Util.equal(headers.values(str), request.headers(str))) { return false; } } return true; } public static boolean hasVaryAll(Response response) { return hasVaryAll(response.headers()); } public static boolean hasVaryAll(Headers headers) { return varyFields(headers).contains("*"); } private static Set<String> varyFields(Response response) { return varyFields(response.headers()); } public static Set<String> varyFields(Headers headers) { Set emptySet = Collections.emptySet(); int size = headers.size(); Set set = emptySet; for (int i = 0; i < size; i++) { if ("Vary".equalsIgnoreCase(headers.name(i))) { String value = headers.value(i); if (set.isEmpty()) { set = new TreeSet(String.CASE_INSENSITIVE_ORDER); } for (String trim : value.split(",")) { set.add(trim.trim()); } } } return set; } public static Headers varyHeaders(Response response) { return varyHeaders(response.networkResponse().request().headers(), response.headers()); } public static Headers varyHeaders(Headers headers, Headers headers2) { Set varyFields = varyFields(headers2); if (varyFields.isEmpty()) { return new Builder().build(); } Builder builder = new Builder(); int size = headers.size(); for (int i = 0; i < size; i++) { String name = headers.name(i); if (varyFields.contains(name)) { builder.add(name, headers.value(i)); } } return builder.build(); } public static List<Challenge> parseChallenges(Headers headers, String str) { ArrayList arrayList = new ArrayList(); for (String str2 : headers.values(str)) { int indexOf = str2.indexOf(32); if (indexOf != -1) { String substring = str2.substring(0, indexOf); Matcher matcher = PARAMETER.matcher(str2); String str3 = null; String str4 = null; while (matcher.find(indexOf)) { if (str2.regionMatches(true, matcher.start(1), "realm", 0, 5)) { str3 = matcher.group(3); } else { if (str2.regionMatches(true, matcher.start(1), "charset", 0, 7)) { str4 = matcher.group(3); } } if (str3 != null && str4 != null) { break; } indexOf = matcher.end(); } if (str3 != null) { Challenge challenge = new Challenge(substring, str3); if (str4 != null) { if (str4.equalsIgnoreCase("UTF-8")) { challenge = challenge.withCharset(Util.UTF_8); } } arrayList.add(challenge); } } } return arrayList; } public static void receiveHeaders(CookieJar cookieJar, HttpUrl httpUrl, Headers headers) { if (cookieJar != CookieJar.NO_COOKIES) { List parseAll = Cookie.parseAll(httpUrl, headers); if (!parseAll.isEmpty()) { cookieJar.saveFromResponse(httpUrl, parseAll); } } } public static boolean hasBody(Response response) { if (response.request().method().equals("HEAD")) { return false; } int code = response.code(); if (((code >= 100 && code < 200) || code == 204 || code == 304) && contentLength(response) == -1) { if ("chunked".equalsIgnoreCase(response.header("Transfer-Encoding"))) { return true; } return false; } return true; } public static int skipUntil(String str, int i, String str2) { while (i < str.length() && str2.indexOf(str.charAt(i)) == -1) { i++; } return i; } public static int skipWhitespace(String str, int i) { while (i < str.length()) { char charAt = str.charAt(i); if (charAt != ' ' && charAt != 9) { break; } i++; } return i; } public static int parseSeconds(String str, int i) { try { long parseLong = Long.parseLong(str); if (parseLong > 2147483647L) { return ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED; } if (parseLong < 0) { return 0; } i = (int) parseLong; return i; } catch (NumberFormatException unused) { } } }
[ "voorivex@tutanota.com" ]
voorivex@tutanota.com
6e8a39c4e279261716022fa8f9f53ba433911889
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-cdn/src/main/java/com/aliyuncs/cdn/transform/v20180510/DescribeDomainCustomLogConfigResponseUnmarshaller.java
a483437c3748c014f5eac409c345ba82f0d1dbe2
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,627
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.cdn.transform.v20180510; import com.aliyuncs.cdn.model.v20180510.DescribeDomainCustomLogConfigResponse; import com.aliyuncs.transform.UnmarshallerContext; public class DescribeDomainCustomLogConfigResponseUnmarshaller { public static DescribeDomainCustomLogConfigResponse unmarshall(DescribeDomainCustomLogConfigResponse describeDomainCustomLogConfigResponse, UnmarshallerContext _ctx) { describeDomainCustomLogConfigResponse.setRequestId(_ctx.stringValue("DescribeDomainCustomLogConfigResponse.RequestId")); describeDomainCustomLogConfigResponse.setConfigId(_ctx.stringValue("DescribeDomainCustomLogConfigResponse.ConfigId")); describeDomainCustomLogConfigResponse.setTag(_ctx.stringValue("DescribeDomainCustomLogConfigResponse.Tag")); describeDomainCustomLogConfigResponse.setRemark(_ctx.stringValue("DescribeDomainCustomLogConfigResponse.Remark")); describeDomainCustomLogConfigResponse.setSample(_ctx.stringValue("DescribeDomainCustomLogConfigResponse.Sample")); return describeDomainCustomLogConfigResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
fa1ad061c8f3e74b5d168c16f2e799748288c2b7
c6ed09339ff21fa70f154f34328e869f0dd8e394
/java/lagom/sample_error_handling/counter-impl/src/main/java/sample/counter/impl/CounterEvent.java
ca5af583089815bbe7abaf391b3ebee0c67e8a33
[]
no_license
fits/try_samples
f9b15b309a67f7274b505669db4486b17bd1678b
0986e22d78f35d57fe1dd94673b68a4723cb3177
refs/heads/master
2023-08-22T14:35:40.838419
2023-08-07T12:25:07
2023-08-07T12:25:07
642,078
30
19
null
2022-12-28T06:31:24
2010-05-02T02:23:55
Java
UTF-8
Java
false
false
342
java
package sample.counter.impl; import com.lightbend.lagom.serialization.Jsonable; import lombok.Value; public interface CounterEvent extends Jsonable { @Value public class CreatedCounter implements CounterEvent { private String name; } @Value public class IncrementalUpdatedCounter implements CounterEvent { private int diff; } }
[ "wadays_wozx@nifty.com" ]
wadays_wozx@nifty.com
9f4bbc5e0caa4ce6b735c8493e1cc095a6d3c76f
cc2d6ff05315bc3f36d0e2f72599d8eb79bec090
/app/src/main/java/com/appzone/eyeres/adapters/AutocompleteSearchAdapter.java
b8113d1f81066f6e3eb400ec74f2695c2b77631c
[]
no_license
freelanceapp/Eyeres
5848cc3914c683a4fa15677c8c2ccf497d899bf7
74d2524e2427cff57df0375b9cbcc19e6af343f5
refs/heads/master
2020-05-16T23:42:23.532595
2019-04-18T11:18:27
2019-04-18T11:18:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,051
java
package com.appzone.eyeres.adapters; import android.content.Context; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.appzone.eyeres.R; import com.appzone.eyeres.activities_fragments.activity_home.fragments.fragment_search.Fragment_Search; import java.util.List; public class AutocompleteSearchAdapter extends RecyclerView.Adapter<AutocompleteSearchAdapter.MyHolder> { private List<String> queriesList; private Context context; private Fragment_Search fragment; public AutocompleteSearchAdapter(Context context,List<String> queriesList,Fragment_Search fragment) { this.queriesList = queriesList; this.context = context; this.fragment = fragment; } @NonNull @Override public MyHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(context).inflate(R.layout.autocomplete_search_row, parent, false); return new MyHolder(view); } @Override public void onBindViewHolder(@NonNull final MyHolder holder, int position) { String query = queriesList.get(position); holder.BindData(query); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String query = queriesList.get(holder.getAdapterPosition()); fragment.setItemDataForSearch(query); } }); } @Override public int getItemCount() { return queriesList.size(); } public class MyHolder extends RecyclerView.ViewHolder { private TextView tv_name; public MyHolder(View itemView) { super(itemView); tv_name = itemView.findViewById(R.id.tv_name); } public void BindData(String query) { tv_name.setText(query); } } }
[ "emadmagdi.151995@gmai.com" ]
emadmagdi.151995@gmai.com
6a03eafe9ac49d044074e3625a49d357da1b30cb
e612d59983e91772117c6607e3a3dfe25db6a78b
/meizuguide/build/generated/source/buildConfig/debug/setup/meizu/com/mzsetupwizard/BuildConfig.java
25109a491bb0fc85befbc0283b85374463fb127f
[]
no_license
pikingdom/MyProject001
65d3ff3ba35acd05e6f1716796b37d70edd25897
a1a564a4b20e4337464e49867ba8307428e4320b
refs/heads/master
2020-03-24T22:29:49.115821
2018-10-21T02:20:19
2018-10-21T02:20:19
143,088,389
0
0
null
null
null
null
UTF-8
Java
false
false
465
java
/** * Automatically generated file. DO NOT MODIFY */ package setup.meizu.com.mzsetupwizard; public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String APPLICATION_ID = "setup.meizu.com.mzsetupwizard"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = ""; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; }
[ "zhenghonglin@felink.com" ]
zhenghonglin@felink.com
83a89d8c26e5c9782f28339b6fd002607b14592c
02f1586bd5cf2fca6417ed13dc74411031ac6fe0
/lixu11/app/src/main/java/com/example/lixu11/RecyclerStaggeredActivity.java
d97032d0cad17bba80c408a6a6ab47416a1cc123
[]
no_license
904995755/lixu003
1a1b0615c45da0cc20f36e1d250fdb6fe606f8e7
fca514d7a935428081240f3827a63643847a41a2
refs/heads/main
2023-02-01T00:39:30.157772
2020-12-18T12:09:57
2020-12-18T12:09:57
304,784,630
0
1
null
null
null
null
UTF-8
Java
false
false
1,992
java
package com.example.lixu11; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.DefaultItemAnimator; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.StaggeredGridLayoutManager; import com.example.lixu11.adapter.RecyclerStaggeredAdapter; import com.example.lixu11.bean.GoodsInfo; import com.example.lixu11.widget.SpacesItemDecoration; public class RecyclerStaggeredActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_recycler_staggered); initRecyclerStaggered(); // 初始化瀑布流布局的循环视图 } // 初始化瀑布流布局的循环视图 private void initRecyclerStaggered() { // 从布局文件中获取名叫rv_staggered的循环视图 RecyclerView rv_staggered = findViewById(R.id.rv_staggered); // 创建一个垂直方向的瀑布流布局管理器 StaggeredGridLayoutManager manager = new StaggeredGridLayoutManager( 3, RecyclerView.VERTICAL); // 设置循环视图的布局管理器 rv_staggered.setLayoutManager(manager); // 构建一个服装列表的瀑布流适配器 RecyclerStaggeredAdapter adapter = new RecyclerStaggeredAdapter(this, GoodsInfo.getDefaultStag()); // 设置瀑布流列表的点击监听器 adapter.setOnItemClickListener(adapter); // 设置瀑布流列表的长按监听器 adapter.setOnItemLongClickListener(adapter); // 给rv_staggered设置服装瀑布流适配器 rv_staggered.setAdapter(adapter); // 设置rv_staggered的默认动画效果 rv_staggered.setItemAnimator(new DefaultItemAnimator()); // 给rv_staggered添加列表项之间的空白装饰 rv_staggered.addItemDecoration(new SpacesItemDecoration(3)); } }
[ "your_email@youremail.com" ]
your_email@youremail.com
aaae7a5316e133281c92239033124f0e611beaff
95599e7a3508f2d12a8dc10c39ff36fdfb055ba2
/apple-jms-springkafka/src/main/java/com/appleframework/jms/kafka/consumer/ErrorConsumerRecordsProcessor.java
caa57d50eb4ab882043e914e543358782cd02859
[ "Apache-2.0" ]
permissive
lenkeai/apple-jms
b17fdf048cdfb202169e6ecfdf9024734546fc8a
d5b53c72ac890dee41b707e1f3534c275c91ec27
refs/heads/master
2023-04-10T14:58:37.127875
2021-01-08T08:31:03
2021-01-08T08:31:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,403
java
package com.appleframework.jms.kafka.consumer; import java.io.Closeable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.PriorityBlockingQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.appleframework.jms.core.consumer.AbstractMessageConusmer; import com.appleframework.jms.core.consumer.ErrorMessageProcessor; import com.appleframework.jms.core.consumer.IMessageConusmer; import com.appleframework.jms.core.thread.NamedThreadFactory; /** * Error Consumer Records Processor * */ public class ErrorConsumerRecordsProcessor<Message> implements Closeable, ErrorMessageProcessor<ConsumerRecord<Object, Message>> { private static final Logger logger = LoggerFactory.getLogger(ErrorConsumerRecordsProcessor.class); private static final long RETRY_PERIOD_UNIT = 15 * 1000; private final PriorityBlockingQueue<PriorityTask> taskQueue = new PriorityBlockingQueue<PriorityTask>(1000); private ExecutorService executor; private AtomicBoolean closed = new AtomicBoolean(false); public ErrorConsumerRecordsProcessor() { this(1); } public ErrorConsumerRecordsProcessor(int poolSize) { executor = Executors.newFixedThreadPool(poolSize, new NamedThreadFactory("errorConsumerRecordsProcessor")); executor.submit(new Runnable() { @Override public void run() { while (!closed.get()) { try { PriorityTask task = taskQueue.take(); if (null == task.getMessage()) { break; } if (task.nextFireTime - System.currentTimeMillis() > 0) { TimeUnit.MILLISECONDS.sleep(1000); taskQueue.put(task); continue; } task.run(); } catch (Exception e) { logger.error("", e); } } } }); } public void submit(final ConsumerRecord<Object, Message> message, final AbstractMessageConusmer<ConsumerRecord<Object, Message>> metadataMessageConusmer) { int taskCount; if ((taskCount = taskQueue.size()) > 1000) { logger.warn("ErrorByteMessageProcessor queue task count over:{}", taskCount); } taskQueue.add(new PriorityTask(message, metadataMessageConusmer)); } public void close() { closed.set(true); taskQueue.add(new PriorityTask()); try { Thread.sleep(1000); } catch (Exception e) { } executor.shutdown(); logger.info("ErrorByteMessageProcessor closed"); } class PriorityTask implements Runnable, Comparable<PriorityTask> { ConsumerRecord<Object, Message> message; AbstractMessageConusmer<ConsumerRecord<Object, Message>> messageConusmer1; IMessageConusmer<ConsumerRecord<Object, Message>> messageConusmer2; int retryCount = 0; long nextFireTime; public PriorityTask() {} public PriorityTask(ConsumerRecord<Object, Message> message, AbstractMessageConusmer<ConsumerRecord<Object, Message>> metadataMessageConusmer) { this(message, metadataMessageConusmer, System.currentTimeMillis() + RETRY_PERIOD_UNIT); } public PriorityTask(ConsumerRecord<Object, Message> message, AbstractMessageConusmer<ConsumerRecord<Object, Message>> messageConusmer, long nextFireTime) { super(); this.message = message; this.messageConusmer1 = messageConusmer; this.nextFireTime = nextFireTime; } public PriorityTask(ConsumerRecord<Object, Message> message, IMessageConusmer<ConsumerRecord<Object, Message>> messageConusmer) { this(message, messageConusmer, System.currentTimeMillis() + RETRY_PERIOD_UNIT); } public PriorityTask(ConsumerRecord<Object, Message> message, IMessageConusmer<ConsumerRecord<Object, Message>> messageConusmer, long nextFireTime) { super(); this.message = message; this.messageConusmer2 = messageConusmer; this.nextFireTime = nextFireTime; } public ConsumerRecord<Object, Message> getMessage() { return message; } @Override public void run() { try { if(null != messageConusmer1) { messageConusmer1.processMessage(message); } else if(null != messageConusmer2) { messageConusmer2.onMessage(message); } else { logger.error("MessageConusmer is not exist !!!!"); } } catch (Exception e) { retryCount++; retry(); } } private void retry() { if (retryCount == 3) { logger.warn("retry_skip skip!!!"); return; } nextFireTime = nextFireTime + retryCount * RETRY_PERIOD_UNIT; taskQueue.add(this); } @Override public int compareTo(PriorityTask o) { return (int) (this.nextFireTime - o.nextFireTime); } } @Override public void processErrorMessage(ConsumerRecord<Object, Message> message, AbstractMessageConusmer<ConsumerRecord<Object, Message>> messageConusmer) { int taskCount; if ((taskCount = taskQueue.size()) > 1000) { logger.warn("ErrorByteMessageProcessor queue task count over:" + taskCount); } taskQueue.add(new PriorityTask(message, messageConusmer)); } @Override public void processErrorMessage(ConsumerRecord<Object, Message> message, IMessageConusmer<ConsumerRecord<Object, Message>> messageConusmer) { int taskCount; if ((taskCount = taskQueue.size()) > 1000) { logger.warn("ErrorByteMessageProcessor queue task count over:" + taskCount); } taskQueue.add(new PriorityTask(message, messageConusmer)); } }
[ "xushaomin@foxmail.com" ]
xushaomin@foxmail.com
bb38c0d834bd644bdbf081498432cab4cfeb1f28
ba6c702902259cedcd88bb5614b8f130a3828ac1
/Minecraft-Utils/1.13/src/eu/the5zig/mod/asm/transformers/PatchGuiTextfield.java
dbb47eb6c8ae6b6fd1cbfdfadeb337a3aef62fdc
[ "MIT" ]
permissive
6zig/6zig
8047102edde5c4dd075208fd94096e83630eaff7
8631fc0641907d3ea4ab5eb0e47533868cf7caf3
refs/heads/master
2020-06-23T16:04:56.841671
2019-07-24T17:29:30
2019-07-24T17:29:30
198,672,193
0
0
null
2019-07-24T16:29:16
2019-07-24T16:29:15
null
UTF-8
Java
false
false
1,956
java
package eu.the5zig.mod.asm.transformers; import eu.the5zig.mod.asm.LogUtil; import eu.the5zig.mod.asm.Names; import net.minecraft.launchwrapper.IClassTransformer; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.MethodVisitor; import static org.objectweb.asm.Opcodes.*; /** * Created by 5zig. * All rights reserved © 2015 */ public class PatchGuiTextfield implements IClassTransformer { @Override public byte[] transform(String s, String s1, byte[] bytes) { LogUtil.startClass("GuiTextfield (%s)", Names.guiTextfield.getName()); ClassReader reader = new ClassReader(bytes); ClassWriter writer = new ClassWriter(reader, ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES); ClassPatcher visitor = new ClassPatcher(writer); reader.accept(visitor, 0); LogUtil.endClass(); return writer.toByteArray(); } public class ClassPatcher extends ClassVisitor { public ClassPatcher(ClassVisitor visitor) { super(ASM5, visitor); } @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { if (name.equals("<init>") && desc.equals(Names.guiTextfield.getDesc())) { LogUtil.startMethod(Names.guiTextfield.getName() + "(%s)", Names.guiTextfield.getDesc()); return new PatchInit(cv.visitMethod(access, name, desc, signature, exceptions)); } LogUtil.endMethod(); return super.visitMethod(access, name, desc, signature, exceptions); } } public class PatchInit extends MethodVisitor { public PatchInit(MethodVisitor methodVisitor) { super(ASM5, methodVisitor); } @Override public void visitInsn(int opcode) { if (opcode == RETURN) { LogUtil.log("init"); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKESTATIC, "BytecodeHook", "onTextfieldInit", "(Ljava/lang/Object;)V", false); } super.visitInsn(opcode); } } }
[ "the5zig@gmail.com" ]
the5zig@gmail.com
72d0cecb4982bd9f8c4dca0e6aaf070c1630f582
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_a48269dedb1c6abd37b6555fca8cbcf59c3b064e/Anagram/9_a48269dedb1c6abd37b6555fca8cbcf59c3b064e_Anagram_s.java
720ac5d75e8aef2d47062c84bd7aed9000c68cd4
[]
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
1,634
java
package com.github.kpacha.jkata.anagram; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; public class Anagram { public static Set<String> generate(String source) { Set<String> result = new HashSet<String>(); List<Character> chars = getAsCharacterList(source); if (chars.size() == 3) { for (int currentChar = 0; currentChar < 3; currentChar++) { Character character = chars.get(currentChar); for (String part : Anagram.generate(new String(getCharsToMix( chars, character)))) { result.add(character + part); } } } if (chars.size() == 2) { for (int currentChar = 0; currentChar < 2; currentChar++) { Character character = chars.get(currentChar); for (String part : Anagram.generate(new String(getCharsToMix( chars, character)))) { result.add(character + part); } } } if (chars.size() == 1) { result.add(source); } return result; } private static char[] getCharsToMix(List<Character> chars, Character character) { List<Character> characters = new ArrayList<Character>(chars); characters.remove(character); char[] charArrayToMix = new char[characters.size()]; for (int currentChar = 0; currentChar < characters.size(); currentChar++) { charArrayToMix[currentChar] = characters.get(currentChar); } return charArrayToMix; } private static List<Character> getAsCharacterList(String source) { List<Character> chars = new ArrayList<Character>(); for (char c : source.toCharArray()) { chars.add(c); } return chars; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c97ac9a19de323209ba4fdb0fe6c1e4a89644e85
a36dce4b6042356475ae2e0f05475bd6aed4391b
/2005/julypersistenceEJB/ejbModule/com/hps/july/persistence/EJSCMPTRXResourceHomeBean.java
9abe353fa689e630c6c0cff6b408c08c473e8eef
[]
no_license
ildar66/WSAD_NRI
b21dbee82de5d119b0a507654d269832f19378bb
2a352f164c513967acf04d5e74f36167e836054f
refs/heads/master
2020-12-02T23:59:09.795209
2017-07-01T09:25:27
2017-07-01T09:25:27
95,954,234
0
1
null
null
null
null
UTF-8
Java
false
false
784
java
package com.hps.july.persistence; /** * EJSCMPTRXResourceHomeBean */ public class EJSCMPTRXResourceHomeBean extends com.hps.july.persistence.EJSCMPTRXResourceHomeBean_92b2ea12 { /** * EJSCMPTRXResourceHomeBean */ public EJSCMPTRXResourceHomeBean() throws java.rmi.RemoteException { super(); } /** * postCreateWrapper */ public com.hps.july.persistence.TRXResource postCreateWrapper(com.ibm.ejs.container.BeanO beanO, Object ejsKey) throws javax.ejb.CreateException, java.rmi.RemoteException { return (com.hps.july.persistence.TRXResource) super.postCreate(beanO, ejsKey); } /** * afterPostCreateWrapper */ public void afterPostCreateWrapper(com.ibm.ejs.container.BeanO beanO, Object ejsKey) throws javax.ejb.CreateException, java.rmi.RemoteException { } }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
55fdde0b14021388f523f03fb472ccb9a7bf8d15
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module608/src/main/java/module608packageJava0/Foo723.java
13822e79288a05a91ecdd1395082fafaffdae4a4
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
351
java
package module608packageJava0; import java.lang.Integer; public class Foo723 { Integer int0; Integer int1; public void foo0() { new module608packageJava0.Foo722().foo4(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
50f2065a8fec71cb6f973efab18d08dfc7c57c0e
9fbd2ba8247f7bc8cd884c1c2f89c45e4ee54bf6
/lib/org.apache.lucene/lucene-3.0.3/src/test/org/apache/lucene/analysis/tokenattributes/TestTermAttributeImpl.java
e787f6edeca22c85332e723823aa725d4d40a1f8
[ "MIT", "BSD-3-Clause", "Apache-2.0", "ICU", "Python-2.0", "LicenseRef-scancode-unicode-mappings" ]
permissive
rappazzo/PartyDJ
94906fc5d93dad9d7d45aa6ccf20bdd4050b5ac2
7c3abe4ae0402dbdbb1a0ddaabe141c3112be6c6
refs/heads/master
2021-01-10T19:36:47.817717
2012-02-16T17:31:09
2012-02-16T17:31:25
1,173,147
4
1
null
null
null
null
UTF-8
Java
false
false
6,092
java
package org.apache.lucene.analysis.tokenattributes; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.apache.lucene.util.LuceneTestCase; public class TestTermAttributeImpl extends LuceneTestCase { public TestTermAttributeImpl(String name) { super(name); } public void testResize() { TermAttributeImpl t = new TermAttributeImpl(); char[] content = "hello".toCharArray(); t.setTermBuffer(content, 0, content.length); for (int i = 0; i < 2000; i++) { t.resizeTermBuffer(i); assertTrue(i <= t.termBuffer().length); assertEquals("hello", t.term()); } } public void testGrow() { TermAttributeImpl t = new TermAttributeImpl(); StringBuilder buf = new StringBuilder("ab"); for (int i = 0; i < 20; i++) { char[] content = buf.toString().toCharArray(); t.setTermBuffer(content, 0, content.length); assertEquals(buf.length(), t.termLength()); assertEquals(buf.toString(), t.term()); buf.append(buf.toString()); } assertEquals(1048576, t.termLength()); assertEquals(1179654, t.termBuffer().length); // now as a string, first variant t = new TermAttributeImpl(); buf = new StringBuilder("ab"); for (int i = 0; i < 20; i++) { String content = buf.toString(); t.setTermBuffer(content, 0, content.length()); assertEquals(content.length(), t.termLength()); assertEquals(content, t.term()); buf.append(content); } assertEquals(1048576, t.termLength()); assertEquals(1179654, t.termBuffer().length); // now as a string, second variant t = new TermAttributeImpl(); buf = new StringBuilder("ab"); for (int i = 0; i < 20; i++) { String content = buf.toString(); t.setTermBuffer(content); assertEquals(content.length(), t.termLength()); assertEquals(content, t.term()); buf.append(content); } assertEquals(1048576, t.termLength()); assertEquals(1179654, t.termBuffer().length); // Test for slow growth to a long term t = new TermAttributeImpl(); buf = new StringBuilder("a"); for (int i = 0; i < 20000; i++) { String content = buf.toString(); t.setTermBuffer(content); assertEquals(content.length(), t.termLength()); assertEquals(content, t.term()); buf.append("a"); } assertEquals(20000, t.termLength()); assertEquals(20167, t.termBuffer().length); // Test for slow growth to a long term t = new TermAttributeImpl(); buf = new StringBuilder("a"); for (int i = 0; i < 20000; i++) { String content = buf.toString(); t.setTermBuffer(content); assertEquals(content.length(), t.termLength()); assertEquals(content, t.term()); buf.append("a"); } assertEquals(20000, t.termLength()); assertEquals(20167, t.termBuffer().length); } public void testToString() throws Exception { char[] b = {'a', 'l', 'o', 'h', 'a'}; TermAttributeImpl t = new TermAttributeImpl(); t.setTermBuffer(b, 0, 5); assertEquals("term=aloha", t.toString()); t.setTermBuffer("hi there"); assertEquals("term=hi there", t.toString()); } public void testMixedStringArray() throws Exception { TermAttributeImpl t = new TermAttributeImpl(); t.setTermBuffer("hello"); assertEquals(t.termLength(), 5); assertEquals(t.term(), "hello"); t.setTermBuffer("hello2"); assertEquals(t.termLength(), 6); assertEquals(t.term(), "hello2"); t.setTermBuffer("hello3".toCharArray(), 0, 6); assertEquals(t.term(), "hello3"); // Make sure if we get the buffer and change a character // that term() reflects the change char[] buffer = t.termBuffer(); buffer[1] = 'o'; assertEquals(t.term(), "hollo3"); } public void testClone() throws Exception { TermAttributeImpl t = new TermAttributeImpl(); char[] content = "hello".toCharArray(); t.setTermBuffer(content, 0, 5); char[] buf = t.termBuffer(); TermAttributeImpl copy = (TermAttributeImpl) TestSimpleAttributeImpls.assertCloneIsEqual(t); assertEquals(t.term(), copy.term()); assertNotSame(buf, copy.termBuffer()); } public void testEquals() throws Exception { TermAttributeImpl t1a = new TermAttributeImpl(); char[] content1a = "hello".toCharArray(); t1a.setTermBuffer(content1a, 0, 5); TermAttributeImpl t1b = new TermAttributeImpl(); char[] content1b = "hello".toCharArray(); t1b.setTermBuffer(content1b, 0, 5); TermAttributeImpl t2 = new TermAttributeImpl(); char[] content2 = "hello2".toCharArray(); t2.setTermBuffer(content2, 0, 6); assertTrue(t1a.equals(t1b)); assertFalse(t1a.equals(t2)); assertFalse(t2.equals(t1b)); } public void testCopyTo() throws Exception { TermAttributeImpl t = new TermAttributeImpl(); TermAttributeImpl copy = (TermAttributeImpl) TestSimpleAttributeImpls.assertCopyIsEqual(t); assertEquals("", t.term()); assertEquals("", copy.term()); t = new TermAttributeImpl(); char[] content = "hello".toCharArray(); t.setTermBuffer(content, 0, 5); char[] buf = t.termBuffer(); copy = (TermAttributeImpl) TestSimpleAttributeImpls.assertCopyIsEqual(t); assertEquals(t.term(), copy.term()); assertNotSame(buf, copy.termBuffer()); } }
[ "mrappazzo@tradecard.com" ]
mrappazzo@tradecard.com
07e537ed51fd232500b272c32b2799434344d91a
5eaa885e1bb98a2204f895688a8e22adead47d37
/src/main/java/web/models/anonymous/AnonymousSession.java
d7e3dff1cb096cb56a7e1c3e709b74a44f7a15c7
[ "Apache-2.0" ]
permissive
sergio11/springmvc-webflow-ecommerce
49ba6422e55045096916f75c0b09eb7822403f30
07fb83fdaa83555c8d86dcd965d4025829b95a19
refs/heads/master
2022-12-24T01:50:07.849023
2022-12-17T19:47:16
2022-12-17T19:47:16
77,217,777
2
3
null
null
null
null
UTF-8
Java
false
false
1,005
java
package web.models.anonymous; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import javax.annotation.PostConstruct; import org.apache.mahout.cf.taste.model.Preference; import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.ScopedProxyMode; import org.springframework.stereotype.Component; /** * * @author sergio */ @Component("anonymous") @Scope( value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS) public class AnonymousSession implements Serializable { private Set<Long> trackedProducts = new HashSet<Long>(); public void trackViewedProduct(Long id){ trackedProducts.add(id); } public Set<Long> getTrackedProducts() { return trackedProducts; } public void setTrackedProducts(Set<Long> trackedProducts) { this.trackedProducts = trackedProducts; } @PostConstruct public void init() { } }
[ "sss4esob@gmail.com" ]
sss4esob@gmail.com
c504fcde06e4370742dfa7f79b55d8bf0e37b596
4b593ccdf07f5c7f3788f6f3a5aa8ae6867631ad
/src/main/java/org/objectweb/asm/Handler.java
75d29ee4d9bb60fb7220461536010445aba182a6
[]
no_license
smallclover/0xCafebabe
639cf8ca10a40186f2ceb524b6c8b4254b7adc73
6d2d65f2678c03996268144101eab6361fc63cb4
refs/heads/master
2023-04-09T15:47:01.786290
2021-03-21T11:47:19
2021-03-21T11:47:19
348,548,540
1
0
null
null
null
null
UTF-8
Java
false
false
8,164
java
// ASM: a very small and fast Java bytecode manipulation framework // Copyright (c) 2000-2011 INRIA, France Telecom // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // 2. 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. // 3. Neither the name of the copyright holders nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF // THE POSSIBILITY OF SUCH DAMAGE. package org.objectweb.asm; /** * Information about an exception handler. Corresponds to an element of the exception_table array of a Code attribute, as defined in the Java Virtual Machine Specification (JVMS). Handler instances can be chained together, with their {@link #nextHandler} field, to describe a full JVMS exception_table array. * * @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.3">JVMS 4.7.3</a> * @author Eric Bruneton */ final class Handler { /** * The start_pc field of this JVMS exception_table entry. Corresponds to the beginning of the exception handler's scope (inclusive). */ final Label startPc; /** * The end_pc field of this JVMS exception_table entry. Corresponds to the end of the exception handler's scope (exclusive). */ final Label endPc; /** * The handler_pc field of this JVMS exception_table entry. Corresponding to the beginning of the exception handler's code. */ final Label handlerPc; /** * The catch_type field of this JVMS exception_table entry. This is the constant pool index of the internal name of the type of exceptions handled by this handler, or 0 to catch any exceptions. */ final int catchType; /** * The internal name of the type of exceptions handled by this handler, or {@literal null} to catch any exceptions. */ final String catchTypeDescriptor; /** The next exception handler. */ Handler nextHandler; /** * Constructs a new Handler. * * @param startPc * the start_pc field of this JVMS exception_table entry. * @param endPc * the end_pc field of this JVMS exception_table entry. * @param handlerPc * the handler_pc field of this JVMS exception_table entry. * @param catchType * The catch_type field of this JVMS exception_table entry. * @param catchTypeDescriptor * The internal name of the type of exceptions handled by this handler, or {@literal null} to catch any exceptions. */ Handler(final Label startPc, final Label endPc, final Label handlerPc, final int catchType, final String catchTypeDescriptor) { this.startPc = startPc; this.endPc = endPc; this.handlerPc = handlerPc; this.catchType = catchType; this.catchTypeDescriptor = catchTypeDescriptor; } /** * Constructs a new Handler from the given one, with a different scope. * * @param handler * an existing Handler. * @param startPc * the start_pc field of this JVMS exception_table entry. * @param endPc * the end_pc field of this JVMS exception_table entry. */ Handler(final Handler handler, final Label startPc, final Label endPc) { this(startPc, endPc, handler.handlerPc, handler.catchType, handler.catchTypeDescriptor); this.nextHandler = handler.nextHandler; } /** * Removes the range between start and end from the Handler list that begins with the given element. * * @param firstHandler * the beginning of a Handler list. May be {@literal null}. * @param start * the start of the range to be removed. * @param end * the end of the range to be removed. Maybe {@literal null}. * @return the exception handler list with the start-end range removed. */ static Handler removeRange(final Handler firstHandler, final Label start, final Label end) { if (firstHandler == null) { return null; } else { firstHandler.nextHandler = removeRange(firstHandler.nextHandler, start, end); } int handlerStart = firstHandler.startPc.bytecodeOffset; int handlerEnd = firstHandler.endPc.bytecodeOffset; int rangeStart = start.bytecodeOffset; int rangeEnd = end == null ? Integer.MAX_VALUE : end.bytecodeOffset; // Return early if [handlerStart,handlerEnd[ and [rangeStart,rangeEnd[ don't intersect. if (rangeStart >= handlerEnd || rangeEnd <= handlerStart) { return firstHandler; } if (rangeStart <= handlerStart) { if (rangeEnd >= handlerEnd) { // If [handlerStart,handlerEnd[ is included in [rangeStart,rangeEnd[, remove firstHandler. return firstHandler.nextHandler; } else { // [handlerStart,handlerEnd[ - [rangeStart,rangeEnd[ = [rangeEnd,handlerEnd[ return new Handler(firstHandler, end, firstHandler.endPc); } } else if (rangeEnd >= handlerEnd) { // [handlerStart,handlerEnd[ - [rangeStart,rangeEnd[ = [handlerStart,rangeStart[ return new Handler(firstHandler, firstHandler.startPc, start); } else { // [handlerStart,handlerEnd[ - [rangeStart,rangeEnd[ = // [handlerStart,rangeStart[ + [rangeEnd,handerEnd[ firstHandler.nextHandler = new Handler(firstHandler, end, firstHandler.endPc); return new Handler(firstHandler, firstHandler.startPc, start); } } /** * Returns the number of elements of the Handler list that begins with the given element. * * @param firstHandler * the beginning of a Handler list. May be {@literal null}. * @return the number of elements of the Handler list that begins with 'handler'. */ static int getExceptionTableLength(final Handler firstHandler) { int length = 0; Handler handler = firstHandler; while (handler != null) { length++; handler = handler.nextHandler; } return length; } /** * Returns the size in bytes of the JVMS exception_table corresponding to the Handler list that begins with the given element. <i>This includes the exception_table_length field.</i> * * @param firstHandler * the beginning of a Handler list. May be {@literal null}. * @return the size in bytes of the exception_table_length and exception_table structures. */ static int getExceptionTableSize(final Handler firstHandler) { return 2 + 8 * getExceptionTableLength(firstHandler); } /** * Puts the JVMS exception_table corresponding to the Handler list that begins with the given element. <i>This includes the exception_table_length field.</i> * * @param firstHandler * the beginning of a Handler list. May be {@literal null}. * @param output * where the exception_table_length and exception_table structures must be put. */ static void putExceptionTable(final Handler firstHandler, final ByteVector output) { output.putShort(getExceptionTableLength(firstHandler)); Handler handler = firstHandler; while (handler != null) { output.putShort(handler.startPc.bytecodeOffset).putShort(handler.endPc.bytecodeOffset) .putShort(handler.handlerPc.bytecodeOffset).putShort(handler.catchType); handler = handler.nextHandler; } } }
[ "18363998103@163.com" ]
18363998103@163.com
29ed29258de5cf7101ec0fe7c77f5873b0bfde71
bc2c3d6948d0727629188996df8cf798a98d2b6f
/org.gnstudio.apdt.model/src/org/gnstudio/apdt/model/TrySequence.java
2f3dadfc40ac05c396aea6381d51dce4f3163160
[]
no_license
GiorgioNatili/apdt-core
5d26f74207d70fca0209a55315af2f427f4d6196
bf762f3d48d41603373a85a7a230310f7dd62ba8
refs/heads/master
2020-05-02T17:44:53.477300
2014-01-16T04:50:46
2014-01-16T04:50:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,772
java
/******************************************************************************* * Copyright (c) 2010, 2012 GNstudio s.r.l. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser General Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl-3.0.html * * Contributors: * GNstudio s.r.l. - initial API and implementation *******************************************************************************/ package org.gnstudio.apdt.model; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Try Sequence</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link org.gnstudio.apdt.model.TrySequence#getTryGroup <em>Try Group</em>}</li> * <li>{@link org.gnstudio.apdt.model.TrySequence#getCatchGroups <em>Catch Groups</em>}</li> * <li>{@link org.gnstudio.apdt.model.TrySequence#getFinallyGroup <em>Finally Group</em>}</li> * </ul> * </p> * * @see org.gnstudio.apdt.model.ModelPackage#getTrySequence() * @model * @generated */ public interface TrySequence extends Sequence { /** * Returns the value of the '<em><b>Try Group</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Try Group</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Try Group</em>' containment reference. * @see #setTryGroup(SequenceGroup) * @see org.gnstudio.apdt.model.ModelPackage#getTrySequence_TryGroup() * @model containment="true" * @generated */ SequenceGroup getTryGroup(); /** * Sets the value of the '{@link org.gnstudio.apdt.model.TrySequence#getTryGroup <em>Try Group</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Try Group</em>' containment reference. * @see #getTryGroup() * @generated */ void setTryGroup(SequenceGroup value); /** * Returns the value of the '<em><b>Catch Groups</b></em>' containment reference list. * The list contents are of type {@link org.gnstudio.apdt.model.SequenceGroup}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Catch Groups</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Catch Groups</em>' containment reference list. * @see org.gnstudio.apdt.model.ModelPackage#getTrySequence_CatchGroups() * @model containment="true" * @generated */ EList<SequenceGroup> getCatchGroups(); /** * Returns the value of the '<em><b>Finally Group</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Finally Group</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Finally Group</em>' containment reference. * @see #setFinallyGroup(SequenceGroup) * @see org.gnstudio.apdt.model.ModelPackage#getTrySequence_FinallyGroup() * @model containment="true" * @generated */ SequenceGroup getFinallyGroup(); /** * Sets the value of the '{@link org.gnstudio.apdt.model.TrySequence#getFinallyGroup <em>Finally Group</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Finally Group</em>' containment reference. * @see #getFinallyGroup() * @generated */ void setFinallyGroup(SequenceGroup value); } // TrySequence
[ "theanuradha@gmail.com" ]
theanuradha@gmail.com
f1008d232bfcdf4c5479a00ee62d33335bbaa263
fd4bfa200ce7aecc131ebe62ae7bbe4a47aae37f
/iDPProxy/src/main/java/org/wso2/iot/nfcprovisioning/proxy/interfaces/APIResultCallBack.java
45a8551557f50f7f1c586137a80e0d6ef7afd605
[ "Apache-2.0" ]
permissive
pasindujw/devicemgt-nfc-provisioning-android
af7e529f6016c5b871ae1be483892f880b8da419
098548ca38579ca80b7067ced7d138046bf71477
refs/heads/master
2021-01-21T16:28:38.910227
2017-06-28T05:51:15
2017-06-28T05:51:15
95,406,888
1
0
null
2017-06-26T03:56:51
2017-06-26T03:56:51
null
UTF-8
Java
false
false
1,064
java
/* * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.wso2.iot.nfcprovisioning.proxy.interfaces; import java.util.Map; /** * This interface handles API result callback when the application * is able to receive the API results by passing access token. Applications * can implement this when API access is required. */ public interface APIResultCallBack { void onReceiveAPIResult(Map<String, String> result, int requestCode); }
[ "janakamarasena@gmail.com" ]
janakamarasena@gmail.com
c58f89aeb4a1e31ea406e09f4573eccdcee0c6a5
20bb52d42bd57d804706b18d53edd91d06487aad
/SpringProjects/microfundit-api - Copy/src/main/java/com/microfundit/listener/StoryEventHandler.java
3b7dff2c8fe8cd13232dcfcd2797a9699b383b44
[]
no_license
KevinKimaru/java_practice-projects
03e673a0ac0e4c6a008ef579eeb9579a566b2c3d
c4a880d5e77c16e9a6dba40ffc790ec4fe773597
refs/heads/master
2021-05-12T02:12:08.771849
2018-04-18T06:49:07
2018-04-18T06:49:07
117,579,936
0
0
null
null
null
null
UTF-8
Java
false
false
1,278
java
package com.microfundit.listener; import com.microfundit.dao.StoryRepository; import com.microfundit.model.Story; import com.microfundit.service.StoryCloseService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.rest.core.annotation.*; import org.springframework.scheduling.TaskScheduler; import org.springframework.stereotype.Component; import java.util.Date; /** * Created by Kevin Kimaru Chege on 3/21/2018. */ @Component @RepositoryEventHandler(Story.class) public class StoryEventHandler { @Autowired private StoryCloseService storyCloseService; @Autowired private TaskScheduler taskScheduler; @Autowired private StoryRepository stories; @HandleBeforeCreate private void setDefaultsBeforeAddingStory(Story story) { story.setDateAdded(new Date()); story.setStatus(1); } @HandleAfterCreate private void afterCreatingActions(Story story) { storyCloseService = new StoryCloseService(taskScheduler, stories); storyCloseService.schedule(story); } @HandleAfterSave private void afterSavngActions(Story story) { storyCloseService = new StoryCloseService(taskScheduler, stories); storyCloseService.schedule(story); } }
[ "kevinkimaru99@gmail.com" ]
kevinkimaru99@gmail.com
cded212f2d7bfca1c5595bff0a94ef2e2489db82
edf0d8ff1d9cacef26b267c247e206c41ce7905f
/backend/src/main/java/com/example/movieration/model/UserReview.java
b8f4a37d02df3af71a05dc7176a5d335c8166095
[]
no_license
furk2sahin/movieration-spring-react
92ff6c95ad715a972623f79d633d993113f172d6
8d64e7af7c38c4576db436808171809bf92df08e
refs/heads/master
2023-07-10T07:36:13.035813
2021-08-19T14:46:55
2021-08-19T14:46:55
397,976,815
1
0
null
null
null
null
UTF-8
Java
false
false
1,374
java
package com.example.movieration.model; import org.hibernate.annotations.Type; import javax.persistence.*; @Entity @Table(name = "user_reviews") public class UserReview { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Lob @Type(type = "text") @Column(name ="comment") private String comment; @Column(name = "rate") private double rate; @ManyToOne @JoinColumn(name = "user_id", foreignKey = @ForeignKey(name = "fk_review_user")) private User user; @ManyToOne @JoinColumn(name = "movie_id", foreignKey = @ForeignKey(name = "fk_review_movie")) private Movie movie; public UserReview() { // no-args constructor } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getComment() { return comment; } public void setComment(String comment) { this.comment = comment; } public double getRate() { return rate; } public void setRate(double rate) { this.rate = rate; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public Movie getMovie() { return movie; } public void setMovie(Movie movie) { this.movie = movie; } }
[ "furkannsahin.7@gmail.com" ]
furkannsahin.7@gmail.com
e3a5a6f9a0825f60ec59e2e9a71a6154003804b5
e92a0a22c637db8235d771c924b9c672e0c77d3e
/src/main/java/com/playernguyen/weaponist/command/weapon/reload/CommandWeaponReload.java
a1390f81e95c68c1a533a351a0cc3f2c14816d9c
[]
no_license
PlayerNguyen/Weaponist
cca932c881203c568594365143f61b4558ebbd52
277a99cdf20847b609232a5ea55c3d2f9cc76582
refs/heads/master
2023-01-20T10:46:15.979981
2020-11-29T23:50:20
2020-11-29T23:50:20
288,635,332
0
0
null
null
null
null
UTF-8
Java
false
false
929
java
package com.playernguyen.weaponist.command.weapon.reload; import com.playernguyen.weaponist.command.Command; import com.playernguyen.weaponist.command.CommandResult; import com.playernguyen.weaponist.command.DefaultSubCommand; import com.playernguyen.weaponist.language.LanguageFlag; import org.bukkit.command.CommandSender; import java.util.List; public class CommandWeaponReload extends DefaultSubCommand { public CommandWeaponReload(Command pre) { super("reload", "", "Reload weaponist plugin", pre); } @Override public CommandResult onCommand(CommandSender sender, List<String> params) { reloadWeaponist(); sender.sendMessage(getLanguageConfiguration().getLanguageWithPrefix(LanguageFlag.COMMAND_RELOAD_SUCCEED)); return CommandResult.NOTHING; } @Override public List<String> onTab(CommandSender sender, List<String> params) { return null; } }
[ "daudaua3782@gmail.com" ]
daudaua3782@gmail.com
d1ba993c2c33bdfcb8f970efb6d775b333fc3106
f4fc3fe6ba2bec43ac2960b1897b0dba16b4d121
/src/main/java/mods/immibis/chunkloader/R.java
99a9d4dee7b3336e6ace755cee484d84c0be4e2b
[ "MIT" ]
permissive
asiekierka/DimensionalAnchors
734d628e1eed2b2daeea6b09f546866fe44d4955
daaf10e8b9c6a3bb9fa9a230bff8d369c8a276fc
refs/heads/master
2020-06-05T16:54:23.419480
2014-03-23T08:36:58
2014-03-23T08:36:58
17,979,565
1
2
null
2017-02-07T10:21:48
2014-03-21T12:43:11
Java
UTF-8
Java
false
false
1,892
java
package mods.immibis.chunkloader; import net.minecraft.util.ResourceLocation; public class R { public static class gui { public static final ResourceLocation fuel = new ResourceLocation("dimanchor", "textures/gui/fueled.png"); public static final ResourceLocation nofuel = new ResourceLocation("dimanchor", "textures/gui/unfueled.png"); } // relative to textures/blocks public static class block { public static final String chunkloader = "dimanchor:chunkloader"; } public static class string { public static class block { // tile. prefix, .name suffix public static final String chunkloader = "dimanchor"; } public static class gui { public static final String setOwnerToYou = "gui.dimanchor.setOwnerToYou"; public static final String setOwnerToServer = "gui.dimanchor.setOwnerToServer"; public static final String shape = "gui.dimanchor.shape"; public static final String square = "gui.dimanchor.shape.square"; public static final String lineX = "gui.dimanchor.shape.lineX"; public static final String lineZ = "gui.dimanchor.shape.lineZ"; public static final String serverowned = "gui.dimanchor.owner.server"; public static final String owner = "gui.dimanchor.owner"; public static final String unlimited = "gui.dimanchor.unlimited"; public static final String yourChunkLimit = "gui.dimanchor.limit.yours"; public static final String theirChunkLimit = "gui.dimanchor.limit.other"; public static final String area = "gui.dimanchor.area"; public static final String areaNone = "gui.dimanchor.area.none"; public static final String lastLine = "gui.dimanchor.lastline"; public static final String active = "gui.dimanchor.active"; public static final String inactive = "gui.dimanchor.inactive"; public static final String fuelLeft = "gui.dimanchor.fuelleft"; } } }
[ "asiekierka@gmail.com" ]
asiekierka@gmail.com
459c85c81acda5493d27b3b72f6b3203f8140ee2
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-1.0/mule/src/java/org/mule/umo/lifecycle/DisposeException.java
98f2889c48c60c10db9b1a886eaa38127af1a438
[ "LicenseRef-scancode-symphonysoft", "LicenseRef-scancode-unknown-license-reference" ]
permissive
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
1,588
java
/* * $Header$ * $Revision$ * $Date$ * ------------------------------------------------------------------------------------------------------ * * Copyright (c) SymphonySoft Limited. All rights reserved. * http://www.symphonysoft.com * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.mule.umo.lifecycle; import org.mule.config.i18n.Message; /** * <code>DisposeException</code> is an exception thrown * * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a> * @version $Revision$ */ public class DisposeException extends LifecycleException { /** * @param message the exception message * @param component the object that failed during a lifecycle method call */ public DisposeException(Message message, Object component) { super(message, component); } /** * @param message the exception message * @param cause the exception that cause this exception to be thrown * @param component the object that failed during a lifecycle method call */ public DisposeException(Message message, Throwable cause, Object component) { super(message, cause, component); } /** * @param cause the exception that cause this exception to be thrown * @param component the object that failed during a lifecycle method call */ public DisposeException(Throwable cause, Object component) { super(cause, component); } }
[ "(no author)@bf997673-6b11-0410-b953-e057580c5b09" ]
(no author)@bf997673-6b11-0410-b953-e057580c5b09
bf1b7d2c22a6f412073292ebf64106b38a983fad
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-481-89-5-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/render/DefaultVelocityManager_ESTest_scaffolding.java
6208003a76ed341865081da0da8c2f8f246b6cf2
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Apr 08 14:29:22 UTC 2020 */ package com.xpn.xwiki.render; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultVelocityManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
454b6320264b7013bb5c56e2a8ea546abfde64f9
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes5/soi.java
8edc51447d574c64e44ae929bbe209ec569c4704
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
653
java
import android.os.Parcel; import android.os.Parcelable.Creator; import com.tencent.mobileqq.freshnews.FreshNewsComment; import com.tencent.mobileqq.hotpatch.NotVerifyClass; public final class soi implements Parcelable.Creator { public soi() { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } public FreshNewsComment a(Parcel paramParcel) { return new FreshNewsComment(paramParcel); } public FreshNewsComment[] a(int paramInt) { return new FreshNewsComment[paramInt]; } } /* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\soi.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
7f10cc8184ec04dc7ec43d44878439dfc56d162a
d765d62ee0376f36876ecb0c3bf6677215374918
/CalculatorIntentDemo/app/src/main/java/com/anukul/calculatorintentdemo/calculatorminiiActivity.java
7246ae6b0b94e9e69ac2fefc69d92257ef117e96
[]
no_license
MehtaAnukul/Android-Learn-Tasks
6ecad36313f59c736930c733bfdd933c768c5853
0585aca08a73d01f91615db15df2e5bf392138bd
refs/heads/master
2020-03-27T11:13:00.562876
2019-06-07T06:42:00
2019-06-07T06:42:00
146,472,580
0
0
null
null
null
null
UTF-8
Java
false
false
3,207
java
package com.anukul.calculatorintentdemo; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class calculatorminiiActivity extends AppCompatActivity implements View.OnClickListener{ private EditText valueOneEd; private TextView opreatorTv; private EditText valueSecondEd; private Button addBtn; private Button subBtn; private Button mulBtn; private Button divBtn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_calulatorminii); initView(); } private void initView() { valueOneEd = findViewById(R.id.activity_calculatormini_valueOneEd); valueSecondEd = findViewById(R.id.activity_calculatormini_valueSecondTv); opreatorTv = findViewById(R.id.activity_calculatormini_operatorTv); addBtn = findViewById(R.id.activity_calculatormini_addBtn); subBtn = findViewById(R.id.activity_calculatormini_subBtn); mulBtn = findViewById(R.id.activity_calculatormini_mulBtn); divBtn = findViewById(R.id.activity_calculatormini_divBtn); addBtn.setOnClickListener(this); subBtn.setOnClickListener(this); mulBtn.setOnClickListener(this); divBtn.setOnClickListener(this); } @Override public void onClick(View v) { final int value1 = Integer.parseInt(valueOneEd.getText().toString().trim()); final int value2 = Integer.parseInt(valueSecondEd.getText().toString().trim()); switch (v.getId()){ case R.id.activity_calculatormini_addBtn: //result = value1 + value2; opreatorTv.setText(addBtn.getText().toString()); gotoSecondActivity(value1,value2,1); break; case R.id.activity_calculatormini_subBtn: //result = value1 - value2; opreatorTv.setText(subBtn.getText().toString()); gotoSecondActivity(value1,value2,2); break; case R.id.activity_calculatormini_mulBtn: //result = value1 * value2; opreatorTv.setText(mulBtn.getText().toString()); gotoSecondActivity(value1,value2,3); break; case R.id.activity_calculatormini_divBtn: //result = value1 / value2; opreatorTv.setText(divBtn.getText().toString()); gotoSecondActivity(value1,value2,4); break; } } private void gotoSecondActivity(int value1,int value2,int operatorCode) { final Intent gotosecondActivity = new Intent(calculatorminiiActivity.this,calulatorminiAnswerActivity.class); // gotosecondActivity.putExtra("KEY_ANSWER",result); gotosecondActivity.putExtra("KEY_VALUEONE",value1); gotosecondActivity.putExtra("KEY_OPERATOR",operatorCode); gotosecondActivity.putExtra("KEY_VALUESEC",value2); startActivity(gotosecondActivity); } }
[ "mehtaanukul@gmail.com" ]
mehtaanukul@gmail.com
8f2d6ba54724825b1c3ec64ac2b0a954907ede0d
3e5fca4469af37054ce3893f18597bdca42ff5c7
/snap-compile/src/test/java/org/snapscript/compile/StackCountTest.java
509cfeae4697f32401add21bbd6182308874492b
[]
no_license
Tubbz-alt/snap
657247ac2c6bb3ba56e3a88413170526e5ca32f9
1f87d13d807d974a5cfdf391bcd9f62271eb064c
refs/heads/master
2021-10-16T09:00:53.032672
2019-02-09T16:21:55
2019-02-09T16:21:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
732
java
package org.snapscript.compile; import junit.framework.TestCase; public class StackCountTest extends TestCase { private static final String SOURCE = "var x =10;\n"+ "if(x > 0){\n"+ " var y = x;\n"+ " y++;\n"+ "}\n"+ "if(x >0){\n"+ " var y = 0;\n"+ " y++;\n"+ "}\n"+ "if(x !=77){\n"+ " if(x > 0){\n"+ " var y =1;\n"+ " y--;\n"+ " } else {\n"+ " var y=33;\n"+ " y++;\n"+ " }\n"+ "}\n"; public void testStackCount() throws Exception { Compiler compiler = ClassPathCompilerBuilder.createCompiler(); Executable executable = compiler.compile(SOURCE); System.err.println(SOURCE); executable.execute(); } }
[ "gallagher_niall@yahoo.com" ]
gallagher_niall@yahoo.com
8cd25203deaa61bee1ccda13529628f74408429e
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5695413893988352_0/java/ASotelo/B_CloseMatch.java
5f48c32d4ca1b194af2a77fcca3300a5c4d5b0cb
[]
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
2,041
java
// Author: Alejandro Sotelo Arevalo package round1b; import java.io.*; import java.util.*; public class B_CloseMatch { // small: OK, large: private static final String FILENAME="src/round1b/B-small-attempt0"; private static final boolean STANDARD_OUTPUT=false; public static void main(String[] args) throws Throwable { try (BufferedReader in=new BufferedReader(new FileReader(FILENAME+".in"))) { try (PrintStream out=!STANDARD_OUTPUT?new PrintStream(FILENAME+".out"):System.out) { for (int test=1,TESTS=Integer.parseInt(in.readLine()); test<=TESTS; test++) { StringTokenizer tokenizer=new StringTokenizer(in.readLine()); out.println("Case #"+test+": "+solveSlow(tokenizer.nextToken(),tokenizer.nextToken())); } } } } static int n; static char[] array1,array2; static int minScore[]=null; static String answer=""; static String solveSlow(String C, String J) { n=C.length(); array1=C.toCharArray(); array2=J.toCharArray(); minScore=null; answer=""; solveSlow(0,0); return answer; } static void solveSlow(int i, int j) { if (i==n&&j==n) { int number1=Integer.parseInt(new String(array1)); int number2=Integer.parseInt(new String(array2)); int score[]={Math.abs(number1-number2),number1,number2}; if (minScore==null||score[0]<minScore[0]||(score[0]==minScore[0]&&(score[1]<minScore[1]||(score[1]==minScore[1]&&score[2]<minScore[2])))) { minScore=score; answer=new String(array1)+" "+new String(array2); } } else if (i==n) { if (array2[j]=='?') { for (char ch='0'; ch<='9'; ch++) { array2[j]=ch; solveSlow(i,j+1); array2[j]='?'; } } else { solveSlow(i,j+1); } } else { if (array1[i]=='?') { for (char ch='0'; ch<='9'; ch++) { array1[i]=ch; solveSlow(i+1,j); array1[i]='?'; } } else { solveSlow(i+1,j); } } } }
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
516fb7c302ea6161a6c9f984afe553db39205acc
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/appbrand/dynamic/d/l.java
d31b55667857a9af0a214c803746a840a7d91828
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
1,807
java
package com.tencent.mm.plugin.appbrand.dynamic.d; import android.os.Bundle; import com.samsung.android.sdk.look.airbutton.SlookAirButtonFrequentContactAdapter; import com.tencent.mm.ipcinvoker.extension.XIPCInvoker; import com.tencent.mm.ipcinvoker.i; import com.tencent.mm.plugin.appbrand.dynamic.d.a.a; import com.tencent.mm.sdk.platformtools.ac; import com.tencent.mm.u.b.b; import com.tencent.mm.z.u; import org.json.JSONObject; public final class l extends a { public l(int i) { super("setWidgetSize", i); } protected final void a(com.tencent.mm.u.c.a aVar, JSONObject jSONObject, final b.a<JSONObject> aVar2) { u.b Cb = aVar.Cb(); com.tencent.mm.plugin.appbrand.dynamic.widget.a.a aVar3 = new com.tencent.mm.plugin.appbrand.dynamic.widget.a.a(); aVar3.id = Cb.getString("__page_view_id", ""); aVar3.width = jSONObject.optInt("width", Cb.getInt("__page_view_width", 0)); aVar3.height = jSONObject.optInt("height", Cb.getInt("__page_view_height", 0)); XIPCInvoker.a(Cb.getString("__process_name", ac.Br()), aVar3, a.class, new i<Bundle>(this) { final /* synthetic */ l iTx; public final /* synthetic */ void as(Object obj) { boolean z; String string; Bundle bundle = null; Bundle bundle2 = (Bundle) obj; if (bundle2 != null) { z = bundle2.getBoolean("ret"); string = bundle2.getString("reason"); bundle = bundle2.getBundle(SlookAirButtonFrequentContactAdapter.DATA); } else { z = false; string = null; } aVar2.aw(this.iTx.a(z, string, bundle)); } }); } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
a1317c816675ea820e3a8463a68387bfb0fc1591
f60e74a5bed4c8b48a1f9a8602efcb7eb167069d
/estatioapp/module/lease/dom/src/main/java/org/estatio/dom/lease/invoicing/dnc/Invoice_sendByPostPrelimLetterOrInvoiceDocAbstract.java
3d7ceeda3dd72b827eafd91950ca877cfa5b0a01
[ "Apache-2.0" ]
permissive
johnmahugu/estatio
c3e56c82c3a0c488cd5f16b76edaf1a81b501b69
700e9d15cb283d416ace41e763c93e58627b42c1
refs/heads/master
2020-06-22T00:16:13.576758
2017-06-08T10:24:07
2017-06-08T10:24:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,198
java
/* * * Copyright 2012-2014 Eurocommercial Properties NV * * * 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.estatio.dom.lease.invoicing.dnc; import java.io.IOException; import java.util.Collections; import java.util.Set; import org.apache.isis.applib.annotation.Action; import org.apache.isis.applib.annotation.ActionLayout; import org.apache.isis.applib.annotation.Contributed; import org.apache.isis.applib.annotation.ParameterLayout; import org.apache.isis.applib.annotation.SemanticsOf; import org.apache.isis.applib.services.eventbus.ActionDomainEvent; import org.apache.isis.applib.value.Blob; import org.incode.module.communications.dom.impl.commchannel.PostalAddress; import org.incode.module.communications.dom.mixins.DocumentConstants; import org.incode.module.document.dom.impl.docs.Document; import org.estatio.dom.invoice.DocumentTypeData; import org.estatio.dom.invoice.Invoice; /** * Provides the ability to send an print. */ public abstract class Invoice_sendByPostPrelimLetterOrInvoiceDocAbstract extends Invoice_sendPrelimLetterOrInvoiceDocAbstract { public Invoice_sendByPostPrelimLetterOrInvoiceDocAbstract(final Invoice invoice, final DocumentTypeData documentTypeData) { super(invoice, documentTypeData); } public static class DomainEvent extends ActionDomainEvent<Invoice_sendByPostPrelimLetterOrInvoiceDocAbstract> { } @Action( semantics = SemanticsOf.NON_IDEMPOTENT, domainEvent = DomainEvent.class ) @ActionLayout( contributed = Contributed.AS_ACTION ) public Blob $$( @ParameterLayout(named = "to:") final PostalAddress toChannel) throws IOException { final Document document = findDocument(); createPostalCommunicationAsSent(document, toChannel); final byte[] mergedBytes = mergePdfBytes(document); final String fileName = document.getName(); return new Blob(fileName, DocumentConstants.MIME_TYPE_APPLICATION_PDF, mergedBytes); } public String disable$$() { final Document document = findDocument(); if (document == null) { return "No document available to send"; } return document_sendByPost(document).disableAct(); } public Set<PostalAddress> choices0$$() { final Document document = findDocument(); return document == null ? Collections.emptySet() : document_sendByPost(document).choices0Act(); } public PostalAddress default0$$() { final Document document = findDocument(); return document == null ? null : document_sendByPost(document).default0Act(); } }
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk
ef0563848cf8fd0d9032d133260488c16491c5c6
48304c1ae3f5fa2c235a851979be6e6a77b7e7b8
/day02/src/cn/com/mryhlUp/demo04StringExercise/GenerateVerificaCode.java
e6a82fbe49afcde0018891ce1a2e35ffa1ab1336
[]
no_license
mr-yhl/javajybc
e5647e093765a4d0893f1f34059baa38b8b8bbaa
bc22c226b901817d6a535328d8a598871bddf5c0
refs/heads/master
2023-01-03T18:21:53.509449
2020-10-24T03:28:07
2020-10-24T03:28:07
284,627,147
0
0
null
null
null
null
UTF-8
Java
false
false
1,936
java
package cn.com.mryhlUp.demo04StringExercise; import java.util.Random; /* 请查看Random、StringBuilder相关API,定义方法,获取一个包含4个字符的验证码,每一位字符是随机选择的字母和数字,可包含a-z,A-Z,0-9。 步骤 1、定义方法,返回值是String,参数列表为空。 2、定义StringBuilder对象,将可选择的字符都放到StringBuilder对象中。 ​ 2.1、定义循环从a-z,使用StringBuilder的append方法依次添加所有小写字母 ​ 2.2、定义循环从A-Z,使用StringBuilder的append方法依次添加所有大写字母 ​ 2.3、定义循环从0-9,使用StringBuilder的append方法依次添加所有数字字符 3、创建Random对象。定义一个空字符串用于保存验证码。 4、定义一个执行4次的循环,用于获取4个字符。 ​ 4.1、在循环中,使用Random的nextInt方法,随机获取一个从索引0(包含)到字符串的长度(不包含)的索引。 ​ 4.2、使用StringBuilder的charAt方法,获取该索引上的字符,将其拼接到验证码字符串中。 5、返回结果,并在主方法中调用方法查看结果。 */ public class GenerateVerificaCode { public static void main(String[] args) { for (int i = 0; i < 10; i++) { System.out.println(renturnCode()); } } public static String renturnCode(){ StringBuilder stringBuilder = new StringBuilder(); for (char ch='a';ch<='z';ch++) stringBuilder.append(ch); for (char ch='A';ch<='Z';ch++) stringBuilder.append(ch); for (char ch='0';ch<='9';ch++) stringBuilder.append(ch); Random random = new Random(); String code = ""; for (int i = 0; i < 4; i++) { int num=random.nextInt(stringBuilder.length()); code+=stringBuilder.charAt(num); } return code; } }
[ "jyhlbx@outlook.com" ]
jyhlbx@outlook.com
af177ecc08741c49e7520d57454989197aa9d80c
5bc9d8f92f38967cc9ecc03000c0606dbbb38f74
/sca4j/modules/tags/sca4j-modules-parent-pom-0.9.1/extension/implementation/sca4j-java/src/main/java/org/sca4j/java/runtime/JavaComponentBuilder.java
e0562d63416174a079d952643485ec2ad4ff42f4
[]
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
7,571
java
/** * SCA4J * Copyright (c) 2009 - 2099 Service Symphony Ltd * * Licensed to you under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. A copy of the license * is included in this distrubtion or you may obtain a copy at * * http://www.opensource.org/licenses/apache2.0.php * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * This project contains code licensed from the Apache Software Foundation under * the Apache License, Version 2.0 and original code from project contributors. * * * Original Codehaus Header * * Copyright (c) 2007 - 2008 fabric3 project contributors * * Licensed to you under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. A copy of the license * is included in this distrubtion or you may obtain a copy at * * http://www.opensource.org/licenses/apache2.0.php * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * This project contains code licensed from the Apache Software Foundation under * the Apache License, Version 2.0 and original code from project contributors. * * Original Apache Header * * Copyright (c) 2005 - 2006 The Apache Software Foundation * * Apache Tuscany is an effort undergoing incubation at The Apache Software * Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is * required of all newly accepted projects until a further review indicates that * the infrastructure, communications, and decision making process have stabilized * in a manner consistent with other successful ASF projects. While incubation * status is not necessarily a reflection of the completeness or stability of the * code, it does indicate that the project has yet to be fully endorsed by the ASF. * * This product includes software developed by * The Apache Software Foundation (http://www.apache.org/). */ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.sca4j.java.runtime; import java.net.URI; import org.oasisopen.sca.annotation.EagerInit; import org.oasisopen.sca.annotation.Init; import org.oasisopen.sca.annotation.Reference; import org.sca4j.java.provision.JavaComponentDefinition; import org.sca4j.pojo.builder.PojoComponentBuilder; import org.sca4j.pojo.component.PojoComponentContext; import org.sca4j.pojo.component.PojoRequestContext; import org.sca4j.pojo.injection.ConversationIDObjectFactory; import org.sca4j.pojo.instancefactory.InstanceFactoryBuilderRegistry; import org.sca4j.pojo.provision.InstanceFactoryDefinition; import org.sca4j.scdl.InjectableAttribute; import org.sca4j.scdl.Scope; import org.sca4j.spi.SingletonObjectFactory; import org.sca4j.spi.builder.BuilderException; import org.sca4j.spi.builder.component.ComponentBuilderRegistry; import org.sca4j.spi.component.InstanceFactoryProvider; import org.sca4j.spi.component.ScopeContainer; import org.sca4j.spi.component.ScopeRegistry; import org.sca4j.spi.services.proxy.ProxyService; import org.sca4j.transform.PullTransformer; import org.sca4j.transform.TransformerRegistry; /** * Builds a JavaComponent from a physical definition. * * @version $Rev: 5250 $ $Date: 2008-08-21 02:18:25 +0100 (Thu, 21 Aug 2008) $ * @param <T> the implementation class for the defined component */ @EagerInit public class JavaComponentBuilder<T> extends PojoComponentBuilder<T, JavaComponentDefinition, JavaComponent<T>> { private ProxyService proxyService; public JavaComponentBuilder(@Reference ComponentBuilderRegistry builderRegistry, @Reference ScopeRegistry scopeRegistry, @Reference InstanceFactoryBuilderRegistry providerBuilders, @Reference(name = "transformerRegistry")TransformerRegistry<PullTransformer<?, ?>> transformerRegistry, @Reference ProxyService proxyService) { super(builderRegistry, scopeRegistry, providerBuilders, transformerRegistry); this.proxyService = proxyService; } @Init public void init() { builderRegistry.register(JavaComponentDefinition.class, this); } public JavaComponent<T> build(JavaComponentDefinition definition) throws BuilderException { URI componentId = definition.getComponentId(); int initLevel = definition.getInitLevel(); URI groupId = definition.getGroupId(); ClassLoader classLoader = getClass().getClassLoader(); // get the scope container for this component String scopeName = definition.getScope(); Scope<?> scope = scopeRegistry.getScope(scopeName); ScopeContainer<?> scopeContainer = scopeRegistry.getScopeContainer(scope); // create the InstanceFactoryProvider based on the definition in the model InstanceFactoryDefinition providerDefinition = definition.getProviderDefinition(); InstanceFactoryProvider<T> provider = providerBuilders.build(providerDefinition, classLoader); createPropertyFactories(definition, provider); JavaComponent<T> component = new JavaComponent<T>(componentId, provider, scopeContainer, groupId, initLevel, definition.getMaxIdleTime(), definition.getMaxAge(), proxyService); PojoRequestContext requestContext = new PojoRequestContext(); provider.setObjectFactory(InjectableAttribute.REQUEST_CONTEXT, new SingletonObjectFactory<PojoRequestContext>(requestContext)); PojoComponentContext componentContext = new PojoComponentContext(component, requestContext); provider.setObjectFactory(InjectableAttribute.COMPONENT_CONTEXT, new SingletonObjectFactory<PojoComponentContext>(componentContext)); provider.setObjectFactory(InjectableAttribute.CONVERSATION_ID, new ConversationIDObjectFactory()); return component; } }
[ "meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e" ]
meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e
62a2f2c55b6c5899ea041a206a4d053c47cc9f4d
dec6bd85db1d028edbbd3bd18fe0ca628eda012e
/netbeans-projects/ExerLista3/src/View/Exe13.java
5334368a77eb0897c2b12cc3231007d59cc67836
[]
no_license
MatheusGrenfell/java-projects
21b961697e2c0c6a79389c96b588e142c3f70634
93c7bfa2e4f73a232ffde2d38f30a27f2a816061
refs/heads/master
2022-12-29T12:55:00.014296
2020-10-16T00:54:30
2020-10-16T00:54:30
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,020
java
package View; import java.util.Scanner; public class Exe13 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] vet = new int[30]; System.out.println("Preenchendo o vetor"); int n = 0; while (true) { System.out.println("Entre com o tamanho do vetor"); n = scan.nextInt(); if (n > 0 && n <= 30) { for (int i = 0; i < n; i++) { System.out.println("Entre com o " + (i + 1) + "° elemento"); vet[i] = scan.nextInt(); } break; } else { System.out.println("Tamanho não alocado, tente novamente"); } } if (n != 0) { System.out.println("Vetor preenchido:"); System.out.print("[ "); for (int i = 0; i < n; i++) { System.out.print(vet[i] + " "); } System.out.println("]"); } } }
[ "caiohobus@gmail.com" ]
caiohobus@gmail.com
9bde4c5823b8f568b9c02dd0d73cfc2fe2dea719
ba4d5fff8fd816aaf20f624e9cb4421ff6d380b2
/Jan2020/src/inheritanceDemo/doubt.java
3ce9bef1ccbc0c494f0adb2f3456e056e0d2e2bc
[]
no_license
abhisheksawai/JanDemo
5b0641faf352293f4a3062421b121e4e43a7a558
f7b61c7c7fc1a4a52e4db14e9894455f2486171f
refs/heads/master
2021-04-13T13:34:15.621635
2020-03-22T12:16:26
2020-03-22T12:16:26
249,166,227
0
0
null
null
null
null
UTF-8
Java
false
false
293
java
package inheritanceDemo; public class doubt extends methodloadingDemo2{ public int addition(int num1,int num2) { System.out.println("from doubt"); return num2; } public static void main(String[] args) { doubt d = new doubt(); d.addition(10, 20); } }
[ "sawai.abhishek@gmail.com" ]
sawai.abhishek@gmail.com
58c1e3239f1f67dbe15a05f71a9867074fcef4d5
f1d27f76959c1749367682267673148633f8e0e1
/src/printTable.java
96fe246db4ae44b4d9eef7cd456c2778a94ad812
[]
no_license
rabbyshamim92/AUTOMATION-SELENIUM-CODE
83e11888f00c10f8d008e94a3c3ddddc9acd90e2
7af6124335a9bdb322431de0bf3037a6299ab1c5
refs/heads/master
2023-06-18T16:19:08.142493
2021-07-12T22:47:20
2021-07-12T22:47:20
385,404,469
0
0
null
null
null
null
UTF-8
Java
false
false
786
java
import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class printTable { public static void main(String[] args) { // TODO Auto-generated method stub System.setProperty("webdriver.chrome.driver","C:\\Users\\rabby\\OneDrive\\Desktop\\selenium prosmart\\webdriver\\chromedriver_win32\\chromedriver.exe"); ChromeDriver driver = new ChromeDriver(); driver.get("https://www.timeanddate.com/worldclock/"); driver.manage().window().fullscreen(); List<WebElement>elements = driver.findElements(By.tagName("tr")); for(WebElement elem:elements) { System.out.println(elem.getText()); } } }
[ "you@example.com" ]
you@example.com
434c24f5e410e22afcc17fa34b0e9eed8ec711af
8dadce08a76ce387608951673fc0364feaa9a06a
/flexodesktop/externalmodels/flexoexecutionmodel/src/main/java/org/openflexo/foundation/exec/EndActionNodeDesactivation.java
8ab2d7b8c85f4bbf317c0ed8f404e0755ae573d2
[]
no_license
melbarra/openflexo
b8e1a97d73a9edebad198df4e776d396ae8e9a09
9b2d8efe1982ec8f64dee8c43a2e7207594853f3
refs/heads/master
2021-01-24T02:22:47.141424
2012-03-12T00:15:57
2012-03-12T00:15:57
2,756,256
0
0
null
null
null
null
UTF-8
Java
false
false
1,520
java
/* * (c) Copyright 2010-2011 AgileBirds * * This file is part of OpenFlexo. * * OpenFlexo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenFlexo 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 OpenFlexo. If not, see <http://www.gnu.org/licenses/>. * */ package org.openflexo.foundation.exec; import org.openflexo.antar.ControlGraph; import org.openflexo.antar.Nop; import org.openflexo.foundation.wkf.node.ActionNode; public class EndActionNodeDesactivation extends NodeDesactivation<ActionNode> { public EndActionNodeDesactivation(ActionNode node) { super(node); } @Override public ControlGraph makeSpecificControlGraph(boolean interprocedural) { // Nothing special to do return new Nop(); } @Override protected ControlGraph makeControlGraphCommonPostlude(boolean interprocedural) throws NotSupportedException, InvalidModelException { return makeSequentialControlGraph( super.makeControlGraphCommonPostlude(interprocedural), NodeDesactivation.desactivateNode(getNode().getOperationNode(),interprocedural)); } }
[ "guillaume.polet@gmail.com" ]
guillaume.polet@gmail.com
508795223e075a156497d370680ff6a8a25061ce
e9f77cc80015bc81cea0ee4418e179b2112d808c
/common/lang/src/main/java/de/tweerlei/common5/func/ternary/TernaryFunctionBuilder.java
a61a1932e6fb6a67f211399b20c1d58cfd8f3842
[ "Apache-2.0" ]
permissive
tweerlei/dbgrazer
2d3754596a51e293ed0a232d7b0128bf523789c2
2cec20e9730c14e6e6c18c274765647a369f7175
refs/heads/master
2023-08-08T22:28:11.633335
2023-07-26T13:05:30
2023-07-26T13:05:30
144,776,073
4
1
Apache-2.0
2023-03-27T14:00:05
2018-08-14T21:58:01
Java
UTF-8
Java
false
false
2,583
java
/* * Copyright 2018 tweerlei Wruck + Buchmeier GbR - http://www.tweerlei.de/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package de.tweerlei.common5.func.ternary; import de.tweerlei.common5.func.unary.UnaryFunction; /** * Builder for BinaryFunctions * @param <L> Type of first argument * @param <M> Type of second argument * @param <R> Type of third argument * @param <O> Return type * * @author Robert Wruck */ public class TernaryFunctionBuilder<L, M, R, O> { private static class ChainFunction<L, M, R, O, O2> implements TernaryFunction<L, M, R, O2> { private final TernaryFunction<L, M, R, O> g; private final UnaryFunction<O, O2> f; public ChainFunction(TernaryFunction<L, M, R, O> g, UnaryFunction<O, O2> f) { this.f = f; this.g = g; } public O2 applyTo(L l, M m, R r) { return (f.applyTo(g.applyTo(l, m, r))); } } private TernaryFunction<?, ?, ?, ?> func; private TernaryFunctionBuilder(TernaryFunction<L, M, R, O> func) { this.func = func; } /** * Get the function * @return TernaryFunction */ @SuppressWarnings("unchecked") public TernaryFunction<L, M, R, O> getFunction() { return ((TernaryFunction<L, M, R, O>) func); } /** * Create an instance * @param <L> Type of first argument * @param <M> Type of second argument * @param <R> Type of third argument * @param <O> Return type * @param func Initial function * @return TernaryFunctionBuilder */ public static <L, M, R, O> TernaryFunctionBuilder<L, M, R, O> of(TernaryFunction<L, M, R, O> func) { return (new TernaryFunctionBuilder<L, M, R, O>(func)); } /** * Create a new BinaryFunction that operates on the result of this one * @param <O2> Result type of the chained function * @param f Function to chain * @return BinaryFunctionBuilder */ @SuppressWarnings("unchecked") public <O2> TernaryFunctionBuilder<L, M, R, O2> chain(UnaryFunction<O, O2> f) { func = new ChainFunction<L, M, R, O, O2>(getFunction(), f); return ((TernaryFunctionBuilder<L, M, R, O2>) this); } }
[ "wruck@tweerlei.de" ]
wruck@tweerlei.de
b2ecca07975c701be91301907b03cbb220702334
ea282cc70de0f867f671a71fc515cc7641d3d3fe
/src/DAO/Impl/TipoUsuarioDAOImpl.java
46f3ddb0969bbf0785a50c5edbc7e36a8335ce7d
[ "MIT" ]
permissive
dayse/gesplan
aff1cc1e38ec22231099063592648674d77b575d
419ee1dcad2fa96550c99032928e9ea30e7da7cd
refs/heads/master
2021-01-23T07:03:23.606901
2014-08-12T14:38:26
2014-08-12T14:38:26
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
752
java
/* * * Copyright (c) 2013 - 2014 INT - National Institute of Technology & COPPE - Alberto Luiz Coimbra Institute - Graduate School and Research in Engineering. * See the file license.txt for copyright permission. * */ package DAO.Impl; import modelo.TipoUsuario; import DAO.TipoUsuarioDAO; import DAO.generico.JPADaoGenerico; /** * As classes DAOImpl implementam aqueles métodos que são específicos, * ou que ainda não foram generalizados * * @author daysemou * */ public abstract class TipoUsuarioDAOImpl extends JPADaoGenerico<TipoUsuario, Long> implements TipoUsuarioDAO { public TipoUsuarioDAOImpl() { super(TipoUsuario.class); } }
[ "felipe.arruda.pontes@gmail.com" ]
felipe.arruda.pontes@gmail.com
8f5a1ed463159f36f046165af8973cb653e0c441
de4cacdc57f101fd60ec5680d9185c56c7367d35
/webfx-kit/webfx-kit-javafxcontrols-peers-base/src/main/java/webfx/kit/mapper/peers/javafxcontrols/base/ButtonBasePeerBase.java
ac1806628e7ee8e12913122fc8791284c5054267
[]
no_license
doytsujin/webfx
7efd181ce0e0ff133fbaf6e6ba4632d3b048cc25
50b1ac03b1be2a52f3effa363893dea86e294a42
refs/heads/master
2022-12-08T23:14:19.381279
2020-09-04T11:02:35
2020-09-04T11:02:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
322
java
package webfx.kit.mapper.peers.javafxcontrols.base; import javafx.scene.control.ButtonBase; /** * @author Bruno Salmon */ public class ButtonBasePeerBase <N extends ButtonBase, NB extends ButtonBasePeerBase<N, NB, NM>, NM extends ButtonBasePeerMixin<N, NB, NM>> extends LabeledPeerBase<N, NB, NM> { }
[ "dev.salmonb@gmail.com" ]
dev.salmonb@gmail.com
b91fe6f88b21fef2d7dd4b3b69e6b3dbf98e27e7
153bb7f16575c78b38bb1186ad888acdd600cbbf
/app/src/main/java/com/threelinksandonedefense/myapplication/utils/DonwloadSaveImg.java
213a4deead12ac9ced0bf24c55208282bab6f6a7
[]
no_license
zhangchengku/Threelinksandonedefense
ec74344edbc0e768bfff931c67c221c81017c15f
a105043ac87dd9b6eb3a78f885fb609c0efa0976
refs/heads/master
2022-02-17T10:36:24.720925
2019-08-26T08:28:16
2019-08-26T08:28:16
198,345,001
0
0
null
null
null
null
UTF-8
Java
false
false
2,882
java
package com.threelinksandonedefense.myapplication.utils; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Environment; import android.os.Handler; import android.os.Message; import android.text.TextUtils; import android.util.Log; import android.widget.Toast; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; /** * Created by 张成昆 on 2019-5-31. */ public class DonwloadSaveImg { private static Context context; private static Bitmap mBitmap; private static String mSaveMessage = "失败"; public static void donwloadImg(Context contexts, Bitmap bitmap) { context = contexts; mBitmap = bitmap; new Thread(saveFileRunnable).start(); } private static Runnable saveFileRunnable = new Runnable() { @Override public void run() { try { saveFile(mBitmap); // mSaveMessage = "图片保存成功!"; } catch (IOException e) { // mSaveMessage = "图片保存失败!"; e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } // messageHandler.sendMessage(messageHandler.obtainMessage()); } }; private static Handler messageHandler = new Handler() { @Override public void handleMessage(Message msg) { ToastUtils.showShortToast(mSaveMessage); } }; /** * 保存图片 DonwloadSaveImg.donwloadImg(MainActivity.this,"http://106.37.229.146:5566/Files/YHXC/TEMP/PIC/1556606716549_41e3a36c-ae74-4d9d-b87a-41e5cda28032.jpg");//iPath * @param bm * @throws IOException */ public static void saveFile(Bitmap bm ) throws IOException { File dirFile = new File(Environment.getExternalStorageDirectory().getPath()); if (!dirFile.exists()) { dirFile.mkdir(); } String fileName = System.currentTimeMillis() + ".jpg"; File myCaptureFile = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/threelinksandonedefense/" + fileName); BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(myCaptureFile)); bm.compress(Bitmap.CompressFormat.JPEG, 80, bos); bos.flush(); bos.close(); //把图片保存后声明这个广播事件通知系统相册有新图片到来 Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); Uri uri = Uri.fromFile(myCaptureFile); intent.setData(uri); context.sendBroadcast(intent); } }
[ "13552008150@163.com" ]
13552008150@163.com
1a9624f3064dcc5c3950240e6c7ef86252869b4a
6ef4869c6bc2ce2e77b422242e347819f6a5f665
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/telephony/ims/_$$Lambda$RcsFileTransferPart$eRysznIV0Pr9U0YPttLhvYxp2JE.java
fab6233d2a9959449645718d7f19311fd45d8280
[]
no_license
hacking-android/frameworks
40e40396bb2edacccabf8a920fa5722b021fb060
943f0b4d46f72532a419fb6171e40d1c93984c8e
refs/heads/master
2020-07-03T19:32:28.876703
2019-08-13T03:31:06
2019-08-13T03:31:06
202,017,534
2
0
null
2019-08-13T03:33:19
2019-08-12T22:19:30
Java
UTF-8
Java
false
false
852
java
/* * Decompiled with CFR 0.145. */ package android.telephony.ims; import android.telephony.ims.RcsControllerCall; import android.telephony.ims.RcsFileTransferPart; import android.telephony.ims.aidl.IRcs; public final class _$$Lambda$RcsFileTransferPart$eRysznIV0Pr9U0YPttLhvYxp2JE implements RcsControllerCall.RcsServiceCallWithNoReturn { private final /* synthetic */ RcsFileTransferPart f$0; private final /* synthetic */ String f$1; public /* synthetic */ _$$Lambda$RcsFileTransferPart$eRysznIV0Pr9U0YPttLhvYxp2JE(RcsFileTransferPart rcsFileTransferPart, String string2) { this.f$0 = rcsFileTransferPart; this.f$1 = string2; } @Override public final void methodOnIRcs(IRcs iRcs, String string2) { this.f$0.lambda$setFileTransferSessionId$0$RcsFileTransferPart(this.f$1, iRcs, string2); } }
[ "me@paulo.costa.nom.br" ]
me@paulo.costa.nom.br
adfae4efcfb2b3d0f022744a84810dcb8e619cfe
09c72393f451df8a13d04d5dcf68d0b8352be19a
/ecom-you163-api/src/main/java/com/cn/thinkx/ecom/you163/api/vo/order/OrderSkuVO.java
b1cacf365c1c55ac82b9c893a76df601ff18825e
[]
no_license
wang-shun/ecom-maindir
4a1ed73643297d2891498ed4c877cff6265898d0
81b0255b26083b31c5f3c3e74bb7fce3f01f94b9
refs/heads/master
2022-04-08T19:34:58.645719
2019-05-04T05:20:08
2019-05-04T05:20:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,678
java
package com.cn.thinkx.ecom.you163.api.vo.order; import java.math.BigDecimal; public class OrderSkuVO { /*** * SKU ID */ private String skuId; /*** * 商品名称 */ private String productName; /*** * 商品数量 */ private int saleCount; /*** * 商品单价 */ private BigDecimal originPrice; /*** * 金额小计 */ private BigDecimal subtotalAmount; /*** * 优惠卷金额,可省略 */ private BigDecimal couponTotalAmount; /*** * 活动优惠金额,可省略 */ private BigDecimal activityTotalAmount; public String getSkuId() { return skuId; } public void setSkuId(String skuId) { this.skuId = skuId; } public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public int getSaleCount() { return saleCount; } public void setSaleCount(int saleCount) { this.saleCount = saleCount; } public BigDecimal getOriginPrice() { return originPrice; } public void setOriginPrice(BigDecimal originPrice) { this.originPrice = originPrice; } public BigDecimal getSubtotalAmount() { return subtotalAmount; } public void setSubtotalAmount(BigDecimal subtotalAmount) { this.subtotalAmount = subtotalAmount; } public BigDecimal getCouponTotalAmount() { return couponTotalAmount; } public void setCouponTotalAmount(BigDecimal couponTotalAmount) { this.couponTotalAmount = couponTotalAmount; } public BigDecimal getActivityTotalAmount() { return activityTotalAmount; } public void setActivityTotalAmount(BigDecimal activityTotalAmount) { this.activityTotalAmount = activityTotalAmount; } }
[ "zhu_qiuyou@ebeijia.com" ]
zhu_qiuyou@ebeijia.com
99da30429a52d193998e9bb3ab48f435146a5211
8dcdb46fbb6a9ba9ebcd4fd827ce2670c1953069
/threatconnect-app/playbooks-test/src/main/java/com/threatconnect/apps/playbooks/test/db/EmbeddedMapDBService.java
0a6c3dff7558da3585fb76ef9bb3b9880a031437
[ "Apache-2.0" ]
permissive
ThreatConnect-Inc/threatconnect-java
1243d812cae54724710276dab60418cd7e2e97ed
af1397e9e9d49c4391e321cbd627340bfd3003bc
refs/heads/master
2023-08-31T18:22:06.686473
2021-08-25T15:06:28
2021-08-25T15:06:28
27,193,063
5
3
NOASSERTION
2022-05-20T20:49:45
2014-11-26T19:38:13
Java
UTF-8
Java
false
false
721
java
package com.threatconnect.apps.playbooks.test.db; import com.threatconnect.app.playbooks.db.DBReadException; import com.threatconnect.app.playbooks.db.DBService; import com.threatconnect.app.playbooks.db.DBWriteException; import java.util.HashMap; import java.util.Map; /** * @author Greg Marut */ public class EmbeddedMapDBService implements DBService { private final Map<String, byte[]> database; public EmbeddedMapDBService() { this.database = new HashMap<String, byte[]>(); } @Override public void saveValue(String key, byte[] value) throws DBWriteException { database.put(key, value); } @Override public byte[] getValue(String key) throws DBReadException { return database.get(key); } }
[ "gmarut@threatconnect.com" ]
gmarut@threatconnect.com
1c33f625dc80e6c65e94922ba37a4909f7e41e70
f1cb0ba1a39ee8f1f96e8385119d3a182105e4a6
/impl/v1_18_R1/src/main/java/de/derfrzocker/ore/control/impl/v1_18_R1/placement/HeightRangeModifierHook.java
4b84bcbe7a9de24df29a155144e343b672ae728f
[ "MIT" ]
permissive
DerFrZocker/Ore-Control
70dd8c130d3f0db6aedf61c42e60f37f757427ed
f30f636033fe4147eee96c0b645c7724868f99e1
refs/heads/main
2023-08-31T01:34:50.808982
2023-08-24T10:16:57
2023-08-24T10:16:57
194,907,949
19
13
MIT
2023-08-24T10:16:59
2019-07-02T17:33:56
Java
UTF-8
Java
false
false
8,118
java
/* * MIT License * * Copyright (c) 2019 - 2022 Marvin (DerFrZocker) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * */ package de.derfrzocker.ore.control.impl.v1_18_R1.placement; import de.derfrzocker.feature.api.FeaturePlacementModifier; import de.derfrzocker.feature.common.feature.placement.configuration.HeightRangeModifierConfiguration; import de.derfrzocker.feature.common.value.number.IntegerValue; import de.derfrzocker.feature.common.value.number.integer.FixedDoubleToIntegerValue; import de.derfrzocker.feature.common.value.number.integer.trapezoid.TrapezoidIntegerValue; import de.derfrzocker.feature.common.value.number.integer.uniform.UniformIntegerValue; import de.derfrzocker.feature.impl.v1_18_R1.value.offset.NMSAboveBottomOffsetIntegerValue; import de.derfrzocker.feature.impl.v1_18_R1.value.offset.NMSBelowTopOffsetIntegerValue; import de.derfrzocker.ore.control.api.Biome; import de.derfrzocker.ore.control.api.OreControlManager; import de.derfrzocker.ore.control.impl.v1_18_R1.NMSReflectionNames; import net.minecraft.world.level.levelgen.VerticalAnchor; import net.minecraft.world.level.levelgen.heightproviders.ConstantHeight; import net.minecraft.world.level.levelgen.heightproviders.HeightProvider; import net.minecraft.world.level.levelgen.heightproviders.HeightProviderType; import net.minecraft.world.level.levelgen.placement.HeightRangePlacement; import org.bukkit.NamespacedKey; import org.bukkit.generator.LimitedRegion; import org.bukkit.generator.WorldInfo; import org.bukkit.util.BlockVector; import org.jetbrains.annotations.NotNull; import java.lang.reflect.Field; import java.util.Random; public class HeightRangeModifierHook extends MinecraftPlacementModifierHook<HeightRangePlacement, HeightRangeModifierConfiguration> { public HeightRangeModifierHook(@NotNull OreControlManager oreControlManager, @NotNull Biome biome, @NotNull NamespacedKey namespacedKey, @NotNull HeightRangePlacement defaultModifier) { super(oreControlManager, "height_range", defaultModifier, biome, namespacedKey); } public static HeightRangeModifierConfiguration createDefaultConfiguration(@NotNull HeightRangePlacement defaultModifier, @NotNull FeaturePlacementModifier<?> modifier) { try { Field height = HeightRangePlacement.class.getDeclaredField(NMSReflectionNames.HEIGHT_RANGE_PLACEMENT_HEIGHT); height.setAccessible(true); HeightProvider value = (HeightProvider) height.get(defaultModifier); IntegerValue integerValue; if (value.getType() == HeightProviderType.CONSTANT) { integerValue = getIntegerValue(value.toString()); } else if (value.getType() == HeightProviderType.UNIFORM) { String uniform = value.toString(); uniform = uniform.substring(1); uniform = uniform.substring(0, uniform.length() - 1); int charType = uniform.indexOf("-", 1); String[] anchors = new String[]{uniform.substring(0, charType), uniform.substring(charType + 1)}; integerValue = new UniformIntegerValue(getIntegerValue(anchors[0]), getIntegerValue(anchors[1])); } else if (value.getType() == HeightProviderType.TRAPEZOID) { String trapezoid = value.toString(); if (trapezoid.startsWith("triangle")) { trapezoid = trapezoid.replace("triangle (", ""); trapezoid = trapezoid.substring(0, trapezoid.length() - 1); int charType = trapezoid.indexOf("-", 1); String[] anchors = new String[]{trapezoid.substring(0, charType), trapezoid.substring(charType + 1)}; integerValue = new TrapezoidIntegerValue(getIntegerValue(anchors[0]), getIntegerValue(anchors[1]), new FixedDoubleToIntegerValue(0)); } else if (trapezoid.startsWith("trapezoid")) { trapezoid = trapezoid.replace("trapezoid (", ""); trapezoid = trapezoid.substring(0, trapezoid.length() - 1); String[] split = trapezoid.split("\\) in \\["); if (split.length != 2) { throw new IllegalStateException(String.format("Expected a split of size '2', but got '%s' for input '%s'", split.length, trapezoid)); } int plateau = Integer.parseInt(split[0]); int charType = trapezoid.indexOf("-", 1); String[] anchors = new String[]{trapezoid.substring(0, charType), trapezoid.substring(charType + 1)}; integerValue = new TrapezoidIntegerValue(getIntegerValue(anchors[0]), getIntegerValue(anchors[1]), new FixedDoubleToIntegerValue(plateau)); } else { throw new UnsupportedOperationException(String.format("Unknown trapezoid value '%s'", trapezoid)); } } else { // TODO add rest of HeightProvider types throw new UnsupportedOperationException(String.format("No integer value equivalent for HeightProvider '%s'", value)); } return new HeightRangeModifierConfiguration(modifier, integerValue); } catch (NoSuchFieldException | IllegalAccessException e) { throw new RuntimeException(e); } } private static IntegerValue getIntegerValue(String anchor) { String[] values = anchor.split(" "); int value = Integer.parseInt(values[0]); if (values.length == 2 && values[1].equals("absolute")) { return new FixedDoubleToIntegerValue(value); } if (values.length == 3 && values[1].equals("above") && values[2].equals("bottom")) { return new NMSAboveBottomOffsetIntegerValue(new FixedDoubleToIntegerValue(value)); } if (values.length == 3 && values[1].equals("below") && values[2].equals("top")) { return new NMSBelowTopOffsetIntegerValue(new FixedDoubleToIntegerValue(value)); } throw new UnsupportedOperationException(String.format("Unknown vertical anchor '%s'", anchor)); } @Override public HeightRangeModifierConfiguration createDefaultConfiguration(@NotNull HeightRangePlacement defaultModifier) { return createDefaultConfiguration(defaultModifier, getPlacementModifier()); } @Override public HeightRangePlacement createModifier(@NotNull HeightRangeModifierConfiguration defaultConfiguration, @NotNull WorldInfo worldInfo, @NotNull Random random, @NotNull BlockVector position, @NotNull LimitedRegion limitedRegion, @NotNull HeightRangeModifierConfiguration configuration) { int height; if (configuration.getHeight() == null) { height = defaultConfiguration.getHeight().getValue(worldInfo, random, position, limitedRegion); } else { height = configuration.getHeight().getValue(worldInfo, random, position, limitedRegion); } return HeightRangePlacement.of(ConstantHeight.of(VerticalAnchor.absolute(height))); } }
[ "derrieple@gmail.com" ]
derrieple@gmail.com
7367fe0551a2fdb609b35b8046b8004efb23a844
af280e5d529695c86e05dc22e10d4aa85ef8af45
/app/src/main/java/com/bfurns/activity/AppointmentListActivity.java
284fc1932224f6d445412517e821eb88b92e3203
[]
no_license
Dummyurl/DoctorApp-
9ef88e153f96efb55573bad55b1106c2874ec3ae
bb21ddc3e7be935499a76688b0c7b7697560dc4a
refs/heads/master
2020-04-10T01:04:41.785249
2018-03-12T09:45:10
2018-03-12T09:45:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,820
java
package com.bfurns.activity; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import com.bfurns.R; /** * Created by Mahesh on 21/08/16. */ public class AppointmentListActivity extends AppCompatActivity implements View.OnClickListener { private Toolbar toolbar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.doctor_appointment_list); setUpViews(); } private void setUpViews() { toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setTitle("Appointment List"); LinearLayout linearLayout=(LinearLayout)findViewById(R.id.details); linearLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(AppointmentListActivity.this,AppointmentDetailsActivity.class)); } }); } @Override public void onClick(View v) { switch (v.getId()){ case R.id.add: finish(); break; } } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()){ case android.R.id.home: onBackPressed(); break; } return super.onOptionsItemSelected(item); } }
[ "karishmanadaf77@outlook.com" ]
karishmanadaf77@outlook.com
14dd2a0efb70087831670205f4ede30679b1823c
caf76991b058e77da493c3d4f66f34add461ec91
/book-crazy-java-5-codes/15/15.8/transient/Person.java
7d03d27911ed5547b80c58c219c7a442112905cd
[ "Apache-2.0" ]
permissive
zou-zhicheng/awesome-java
44122083582e85ecc40ddcd1a422c2e70e327efe
99eaaf93525ffe48598b28c9eb342ddde8de4492
refs/heads/main
2023-09-03T22:20:55.729979
2021-10-29T06:44:20
2021-10-29T06:44:20
366,591,784
1
1
null
null
null
null
UTF-8
Java
false
false
890
java
/** * Description: * 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a><br> * Copyright (C), 2001-2020, Yeeku.H.Lee<br> * This program is protected by copyright laws.<br> * Program Name:<br> * Date:<br> * @author Yeeku.H.Lee kongyeeku@163.com * @version 5.0 */ public class Person implements java.io.Serializable { private String name; private transient int age; // 注意此处没有提供无参数的构造器! public Person(String name, int age) { System.out.println("有参数的构造器"); this.name = name; this.age = age; } // 省略name与age的setter和getter方法 // name的setter和getter方法 public void setName(String name) { this.name = name; } public String getName() { return this.name; } // age的setter和getter方法 public void setAge(int age) { this.age = age; } public int getAge() { return this.age; } }
[ "zhichengzou@creditease.cn" ]
zhichengzou@creditease.cn
d7e84cbd953da488c11e82fe08c730f3788a7871
56fad0fd8a7b55c683274f8a39ccdac21a648cfd
/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/adapter/DefaultZoomAdapter.java
5359d7589a91f070f82504c7d9748800c46b6e01
[ "Apache-2.0" ]
permissive
naimdjon/JRebirth
3c6fa1b8192595353352151fb248b47b18f4e506
ef88023e44e850ec0c9e74f0a8f01cba9e0a96f7
refs/heads/master
2021-01-15T17:08:14.396441
2014-08-13T10:52:29
2014-08-13T10:52:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,831
java
/** * Get more info at : www.jrebirth.org . * Copyright JRebirth.org © 2011-2013 * Contact : sebastien.bordes@jrebirth.org * * 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.jrebirth.af.core.ui.adapter; import javafx.scene.input.ZoomEvent; import org.jrebirth.af.core.ui.AbstractBaseController; /** * The class <strong>DefaultZoomAdapter</strong>. * * @author Sébastien Bordes * * @param <C> The controller class which manage this event adapter */ public class DefaultZoomAdapter<C extends AbstractBaseController<?, ?>> extends AbstractDefaultAdapter<C> implements ZoomAdapter { /** * {@inheritDoc} */ @Override public void anyZoom(final ZoomEvent zoomEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void zoomStarted(final ZoomEvent zoomEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void zoom(final ZoomEvent zoomEvent) { // Nothing to do yet must be overridden } /** * {@inheritDoc} */ @Override public void zoomFinished(final ZoomEvent zoomEvent) { // Nothing to do yet must be overridden } }
[ "sebastien.bordes@jrebirth.org" ]
sebastien.bordes@jrebirth.org
a441a9d75941f132b9c1b4aa4a323fd772e1e8f1
90f9d0d74e6da955a34a97b1c688e58df9f627d0
/com.ibm.ccl.soa.deploy.uml/src/com/ibm/ccl/soa/deploy/uml/internal/provider/UMLComponentCapabilityProvider.java
2f91f9a3027a2b193f79ac8e4a22aab24309c49d
[]
no_license
kalapriyakannan/UMLONT
0431451674d7b3eb744fb436fab3d13e972837a4
560d9f5d2ba6a800398a24fd8265e5a946179fd3
refs/heads/master
2020-03-30T03:16:44.327160
2018-09-28T03:28:11
2018-09-28T03:28:11
150,679,726
1
1
null
null
null
null
UTF-8
Java
false
false
2,490
java
package com.ibm.ccl.soa.deploy.uml.internal.provider; import org.eclipse.uml2.uml.Component; import com.ibm.ccl.soa.deploy.analysis.AnalysisPackage; import com.ibm.ccl.soa.deploy.core.Capability; import com.ibm.ccl.soa.deploy.core.CapabilityLinkTypes; import com.ibm.ccl.soa.deploy.core.CoreFactory; import com.ibm.ccl.soa.deploy.core.Requirement; import com.ibm.ccl.soa.deploy.core.RequirementLinkTypes; import com.ibm.ccl.soa.deploy.core.RequirementUsage; import com.ibm.ccl.soa.deploy.core.util.UnitUtil; import com.ibm.ccl.soa.deploy.uml.UMLComponent; import com.ibm.ccl.soa.deploy.uml.UmlFactory; /** * Capability provider for UML component * * @since 7.0 * */ public class UMLComponentCapabilityProvider extends UMLCapabilityProvider { public Object[] resolveCapabilities(Object anObject) { if (anObject instanceof Component) { Component comp = (Component) anObject; UMLComponent umlcomp = UmlFactory.eINSTANCE.createUMLComponent(); String name = comp.getName(); umlcomp.setName(comp.getName()); umlcomp.setName(UnitUtil.fixNameForID(name)); umlcomp.setDisplayName(name); umlcomp.setLinkType(CapabilityLinkTypes.ANY_LITERAL); umlcomp.setUmlVisibilityKind(getVisibility(comp)); umlcomp.setAbstract(comp.isAbstract()); umlcomp.setLeaf(comp.isLeaf()); return new Capability[] { umlcomp }; } return NO_CAPS; } public Object[] resolveRequirements(Object anObject) { Requirement hostingRequirement = CoreFactory.eINSTANCE.createRequirement(); hostingRequirement.setLinkType(RequirementLinkTypes.HOSTING_LITERAL); hostingRequirement.setDmoEType(AnalysisPackage.Literals.NODE); hostingRequirement.setName("HostingRequirement"); //$NON-NLS-1$ hostingRequirement.setDisplayName("Node Hosting Requirement"); //$NON-NLS-1$ hostingRequirement.setUse(RequirementUsage.OPTIONAL_LITERAL); Requirement membershipRequirement = CoreFactory.eINSTANCE.createRequirement(); membershipRequirement.setLinkType(RequirementLinkTypes.MEMBER_LITERAL); membershipRequirement.setDmoEType(AnalysisPackage.Literals.DEPLOYMENT_UNIT); membershipRequirement.setName("MembershipRequirement"); //$NON-NLS-1$ membershipRequirement.setDisplayName("Deployment Unit Membership Requirement"); //$NON-NLS-1$ membershipRequirement.setUse(RequirementUsage.OPTIONAL_LITERAL); // TODO a constraint? return new Requirement[] { hostingRequirement, membershipRequirement }; } }
[ "kalapriya.kannan@in.ibm.com" ]
kalapriya.kannan@in.ibm.com
d3cc257b9d909ea6c58e5494d669e5d18d3c533c
9549b6ca938e060bc5eac393fb406655384a932e
/TongRen/src/com/tr/ui/customization/CustomizationActivity.java
bce54bdc56caffb9e068915c6cba74811e7ffa1e
[]
no_license
JTAndroid/JTAndroid
1d66a35c73b786e94a6d57c1d5b8dede111c6e3f
de125ab12e9e979511933234cf4edb22106cda50
refs/heads/master
2021-01-10T16:27:26.388155
2016-03-31T03:44:16
2016-03-31T03:44:16
52,493,595
1
3
null
null
null
null
UTF-8
Java
false
false
5,924
java
package com.tr.ui.customization; import java.util.ArrayList; import com.tr.R; import com.tr.ui.base.JBaseActivity; import com.utils.common.ApolloUtils; import android.app.ActionBar; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; 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 android.widget.AdapterView.OnItemClickListener; /** * @ClassName: CustomizationActivity.java * @Description: 个性化定制 选择列表页面 * @author xuxinjian * @version V1.0 * @Date 2014-3-28 上午8:21:05 */ public class CustomizationActivity extends JBaseActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_custom); initListView(); } private void initListView() { //绑定Layout里面的ListView ListView list = (ListView)findViewById(R.id.CustomizationListview); //生成动态数组,加入数据 ArrayList<MCustomItem> listItem = new ArrayList<MCustomItem>(); String[] strTitle = {"定制投资意向", "定制融资意向", "定制机会", "资讯", "动态展示内容"}; for(int i=0; i<strTitle.length; i++) { MCustomItem customItem = new MCustomItem(); customItem.setTitle(strTitle[i]); customItem.setContent("text" + i); listItem.add(customItem); } //生成适配器的Item和动态数组对应的元素 CustomAdapter listItemAdapter = new CustomAdapter(this); listItemAdapter.setData(listItem); list.setAdapter(listItemAdapter); //添加点击单击事件 list.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { switch(arg2){ case 0: break; default: break; } } }); } @Override public void initJabActionBar() { // 将下拉列表添加到actionbar中 ActionBar actionbar = jabGetActionBar(); actionbar.setDisplayHomeAsUpEnabled(true); actionbar.setDisplayShowTitleEnabled(true); actionbar.setIcon(R.drawable.refresh);// 设置左上角图标 actionbar.setTitle("返回");// 设置显示标题 } /** * actionbar 中菜单点击事件 */ @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: //Toast.makeText(this, "delete", Toast.LENGTH_SHORT).show(); finish(); break; } return super.onOptionsItemSelected(item); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.jtmenu_null, menu); return true; } @Override public void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); } @Override protected void onDestroy() { super.onDestroy(); } /** * @ClassName: MCustomItem.java * @Description: 个性化定制选择页面元素数据对象 */ public class MCustomItem { private String mTitle; private String mContent; private String mImageUrl;//图片链接地址 public String getContent() { return mContent; } public void setContent(String content) { this.mContent = content; } public String getTitle() { return mTitle; } public void setTitle(String title) { this.mTitle = title; } public String getmImageUrl() { return mImageUrl; } public void setmImageUrl(String mImageUrl) { this.mImageUrl = mImageUrl; } } public class CustomAdapter extends BaseAdapter { private Context mContext; private ArrayList<MCustomItem> mData; public CustomAdapter(Context context) { this.mContext = context; mData = new ArrayList<MCustomItem>(); } public void setData(ArrayList<MCustomItem> mData) { this.mData = mData; } @Override public int getCount() { return mData.size(); } @Override public Object getItem(int i) { return mData.get(i); } @Override public long getItemId(int i) { return i; } @Override public View getView(final int position, View convertView, final ViewGroup parent) { ItemHolder holder; if (convertView == null) { convertView = LayoutInflater.from(mContext).inflate(R.layout.home_frg_find_listview_item, parent, false); holder = new ItemHolder(); holder.mTitle = (TextView) convertView.findViewById(R.id.ItemTitle); holder.mContent = (TextView)convertView.findViewById(R.id.ItemText); convertView.setTag(holder); } else { holder = (ItemHolder) convertView.getTag(); } // Retrieve the data holder final MCustomItem dataHolder = mData.get(position); holder.mTitle.setText(dataHolder.getTitle()); holder.mContent.setText(dataHolder.getContent()); ApolloUtils.getImageFetcher((Activity) mContext).loadHomeImage(dataHolder.getmImageUrl(), holder.mImg); return convertView; } private class ItemHolder { public ImageView mImg; public TextView mTitle; public TextView mContent; } } }
[ "chang@example.com" ]
chang@example.com
2aa06b14824af16b6202cc1a60425e2c921d857c
7363aa5bfd1406af5094e50a8f2a4077f509897a
/firefly-nettool/src/main/java/com/firefly/net/Handler.java
cb353cea586e16c857bee602202ca2f66a5efb14
[ "Apache-2.0" ]
permissive
oidwuhaihua/firefly
b3078b8625574ecf227ae7494aa75d073cc77e3d
87f60b4a1bfdc6a2c730adc97de471e86e4c4d8c
refs/heads/master
2021-01-21T05:29:15.914195
2017-02-10T16:35:14
2017-02-10T16:35:14
83,196,072
3
0
null
2017-02-26T09:05:57
2017-02-26T09:05:57
null
UTF-8
Java
false
false
496
java
package com.firefly.net; public interface Handler { void sessionOpened(Session session) throws Throwable; void sessionClosed(Session session) throws Throwable; void messageReceived(Session session, Object message) throws Throwable; void exceptionCaught(Session session, Throwable t) throws Throwable; default void failedOpeningSession(Integer sessionId, Throwable t) throws Throwable { } default void failedAcceptingSession(Integer sessionId, Throwable t) throws Throwable { } }
[ "qptkk@163.com" ]
qptkk@163.com
b46bad86a78108e868c0d453c34e79bd0852a68e
96aa3b6ebadb26a6db810b28c816ebc3b01d5703
/src/test/java/org/decimal4j/op/AbstractDecimalDecimalToAnyTest.java
5305baab80566471d34f12eb046e4b29d5d5538f
[ "MIT" ]
permissive
majerv/decimal4j
6092525889306779986a2d2babffcec6ebcf5549
0327ffd454d5533aa14ba832448c8ecd0c29277f
refs/heads/master
2020-12-14T18:46:24.351617
2015-05-27T15:12:35
2015-05-27T15:12:35
35,378,422
0
0
null
2015-05-10T16:20:38
2015-05-10T16:20:38
null
UTF-8
Java
false
false
3,957
java
/** * The MIT License (MIT) * * Copyright (c) 2015 decimal4j (tools4j), Marco Terzer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.decimal4j.op; import java.math.BigDecimal; import org.decimal4j.api.Decimal; import org.decimal4j.api.DecimalArithmetic; import org.decimal4j.scale.ScaleMetrics; import org.decimal4j.test.ArithmeticResult; /** * Base class for tests comparing the result of some binary operation of the * {@link Decimal} with the expected result produced by the equivalent operation * of the {@link BigDecimal}. The test operand values are created based on * random long values. * * @param <R> * the result type of the operation, common type for {@link Decimal} * and {@link BigDecimal} */ abstract public class AbstractDecimalDecimalToAnyTest<R> extends AbstractRandomAndSpecialValueTest { /** * Constructor with arithemtics determining scale, rounding mode and * overflow policy. * * @param arithmetic * the arithmetic determining scale, rounding mode and overlfow * policy */ public AbstractDecimalDecimalToAnyTest(DecimalArithmetic arithmetic) { super(arithmetic); } abstract protected R expectedResult(BigDecimal a, BigDecimal b); abstract protected <S extends ScaleMetrics> R actualResult(Decimal<S> a, Decimal<S> b); @Override protected <S extends ScaleMetrics> void runRandomTest(S scaleMetrics, int index) { final Decimal<S> dOpA = randomDecimal(scaleMetrics); final Decimal<S> dOpB = randomDecimal(scaleMetrics); runTest(scaleMetrics, "[" + index + "]", dOpA, dOpB); } @Override protected <S extends ScaleMetrics> void runSpecialValueTest(S scaleMetrics) { final long[] specialValues = getSpecialValues(scaleMetrics); for (int i = 0; i < specialValues.length; i++) { for (int j = 0; j < specialValues.length; j++) { final Decimal<S> dOpA = newDecimal(scaleMetrics, specialValues[i]); final Decimal<S> dOpB = newDecimal(scaleMetrics, specialValues[j]); runTest(scaleMetrics, "[" + i + ", " + j + "]", dOpA, dOpB); } } } protected <S extends ScaleMetrics> void runTest(S scaleMetrics, String name, Decimal<S> dOpA, Decimal<S> dOpB) { final BigDecimal bdOpA = toBigDecimal(dOpA); final BigDecimal bdOpB = toBigDecimal(dOpB); // expected ArithmeticResult<R> expected; try { final R exp = expectedResult(bdOpA, bdOpB); expected = ArithmeticResult.forResult(exp.toString(), exp); } catch (ArithmeticException e) { expected = ArithmeticResult.forException(e); } // actual ArithmeticResult<R> actual; try { final R act = actualResult(dOpA, dOpB); actual = ArithmeticResult.forResult(act.toString(), act); } catch (ArithmeticException e) { actual = ArithmeticResult.forException(e); } // assert actual.assertEquivalentTo(expected, getClass().getSimpleName() + name + ": " + dOpA + " " + operation() + " " + dOpB); } }
[ "terzerm@gmail.com" ]
terzerm@gmail.com
cdabb29821e75a236c138225d267eaade5fc9e0d
f909ec612f17254be491c3ef9cdc1f0b186e8daf
/java_plugin/jun_websocket/src/jun_plugin_websocket/MyWebSocket.java
d23286f397d576ea13977f9ff0f566a8712db00a
[]
no_license
kingking888/jun_java_plugin
8853f845f242ce51aaf01dc996ed88784395fd83
f57e31fa496d488fc96b7e9bab3c245f90db5f21
refs/heads/master
2023-06-04T19:30:29.554726
2021-06-24T17:19:55
2021-06-24T17:19:55
null
0
0
null
null
null
null
GB18030
Java
false
false
3,381
java
package jun_plugin_websocket; import java.io.IOException; import java.util.concurrent.CopyOnWriteArraySet; import javax.websocket.OnClose; import javax.websocket.OnError; import javax.websocket.OnMessage; import javax.websocket.OnOpen; import javax.websocket.Session; import javax.websocket.server.ServerEndpoint; //该注解用来指定一个URI,客户端可以通过这个URI来连接到WebSocket。类似Servlet的注解mapping。无需在web.xml中配置。 @ServerEndpoint("/websocket") public class MyWebSocket { //静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。 private static int onlineCount = 0; //concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。若要实现服务端与单一客户端通信的话,可以使用Map来存放,其中Key可以为用户标识 private static CopyOnWriteArraySet<MyWebSocket> webSocketSet = new CopyOnWriteArraySet<MyWebSocket>(); //与某个客户端的连接会话,需要通过它来给客户端发送数据 private Session session; /** * 连接建立成功调用的方法 * @param session 可选的参数。session为与某个客户端的连接会话,需要通过它来给客户端发送数据 */ @OnOpen public void onOpen(Session session){ this.session = session; webSocketSet.add(this); //加入set中 addOnlineCount(); //在线数加1 System.out.println("有新连接加入!当前在线人数为" + getOnlineCount()); } /** * 连接关闭调用的方法 */ @OnClose public void onClose(){ webSocketSet.remove(this); //从set中删除 subOnlineCount(); //在线数减1 System.out.println("有一连接关闭!当前在线人数为" + getOnlineCount()); } /** * 收到客户端消息后调用的方法 * @param message 客户端发送过来的消息 * @param session 可选的参数 */ @OnMessage public void onMessage(String message, Session session) { System.out.println("来自客户端的消息:" + message); //群发消息 for(MyWebSocket item: webSocketSet){ try { item.sendMessage(message); } catch (IOException e) { e.printStackTrace(); continue; } } } /** * 发生错误时调用 * @param session * @param error */ @OnError public void onError(Session session, Throwable error){ System.out.println("发生错误"); error.printStackTrace(); } /** * 这个方法与上面几个方法不一样。没有用注解,是根据自己需要添加的方法。 * @param message * @throws IOException */ public void sendMessage(String message) throws IOException{ this.session.getBasicRemote().sendText(message); //this.session.getAsyncRemote().sendText(message); } public static synchronized int getOnlineCount() { return onlineCount; } public static synchronized void addOnlineCount() { MyWebSocket.onlineCount++; } public static synchronized void subOnlineCount() { MyWebSocket.onlineCount--; } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
dd3ba6ffcd1733c5d1b3bd5b90d5812fcba68af6
2deecbee80ea0d45ee668cedec5f1bb95aefed42
/src/com/reason/lang/core/psi/impl/PsiFunctionCallParamsImpl.java
1c8359062d3c242f95b89ee3dcc716bd0bc2bcfa
[ "MIT" ]
permissive
nirvdrum/reasonml-idea-plugin
494a9302fa9d11ef761fe5b43aaab49d737ff099
6491a9294ee19c4e1d6c39e3f950b9fe0d9f3f91
refs/heads/master
2020-07-15T18:07:11.522556
2019-08-30T12:50:04
2019-08-30T12:50:17
205,621,613
0
0
MIT
2019-09-01T02:54:48
2019-09-01T02:54:48
null
UTF-8
Java
false
false
822
java
package com.reason.lang.core.psi.impl; import com.intellij.lang.ASTNode; import com.reason.lang.core.ORUtil; import com.reason.lang.core.psi.PsiFunctionCallParams; import com.reason.lang.core.psi.PsiParameter; import com.reason.lang.core.type.ORTypes; import org.jetbrains.annotations.NotNull; import java.util.Collection; public class PsiFunctionCallParamsImpl extends PsiToken<ORTypes> implements PsiFunctionCallParams { public PsiFunctionCallParamsImpl(@NotNull ORTypes types, @NotNull ASTNode node) { super(types, node); } @NotNull @Override public String toString() { return "function call params"; } @Override @NotNull public Collection<PsiParameter> getParameterList() { return ORUtil.findImmediateChildrenOfClass(this, PsiParameter.class); } }
[ "giraud.contact@yahoo.fr" ]
giraud.contact@yahoo.fr
74f45a0138c442c248fd478b301bbd9828ad422d
9e72d2ec74a613a586499360707910e983a14370
/src/org/ace/insurance/report/life/report/LifeMonthlyReport.java
e5c3a054b72bec42d47e9968bcbf067dbd101ec3
[]
no_license
pyaesonehein1141991/FNI-LIFE
30ecefca8b12455c0a90906004f85f32217c5bf4
a40b502147b32193d467c2db7d49e2872f2fcab6
refs/heads/master
2020-08-31T11:20:22.757995
2019-10-30T11:02:47
2019-10-30T11:02:47
218,678,685
0
2
null
null
null
null
UTF-8
Java
false
false
4,091
java
package org.ace.insurance.report.life.report; import java.util.Date; import org.ace.insurance.common.ISorter; import org.ace.insurance.common.Utils; import org.ace.insurance.report.life.view.LifeMonthlyReportView; import org.ace.insurance.report.life.view.LifeRenewalMonthlyReportView; import org.joda.time.DateTime; import org.joda.time.Period; public class LifeMonthlyReport implements ISorter { private String policyNo; private String customerName; private String customerAddress; private String cashReceiptAndPaymentDate; private int age; private double sumInsured; private double premium; private int commission; private String periodOfMonth; private String paymentType; private String agentNameWithLiscenceNo; private int noOfInsu; public LifeMonthlyReport(LifeMonthlyReportView view) { this.policyNo = view.getPolicyNo(); if (view.getCustomerName() == null) { this.customerName = view.getOrganizationName(); } else { this.customerName = view.getCustomerName(); } if (view.getCustomerAddress() == null) { this.customerAddress = view.getOrganizationAddress(); } else { this.customerAddress = view.getCustomerAddress(); } this.cashReceiptAndPaymentDate = view.getReceiptNo() + " \n (" + Utils.getDateFormatString(view.getPaymentDate()) + ")"; this.age = view.getAge(); this.sumInsured = view.getSumInsured(); this.premium = view.getPremium(); this.commission = view.getPercentage(); this.periodOfMonth = view.getPeriodOfMonth(); this.paymentType = view.getPaymentTypeName(); this.agentNameWithLiscenceNo = view.getAgentNameAndCodeNo(); this.noOfInsu = view.getNoOfInsu(); } public LifeMonthlyReport(LifeRenewalMonthlyReportView view) { this.policyNo = view.getPolicyNo(); if (view.getCustomerName() == null) { this.customerName = view.getOrganizationName(); } else { this.customerName = view.getCustomerName(); } if (view.getCustomerAddress() == null) { this.customerAddress = view.getOrganizationAddress(); } else { this.customerAddress = view.getCustomerAddress(); } this.cashReceiptAndPaymentDate = view.getReceiptNo() + " \n (" + Utils.getDateFormatString(view.getPaymentDate()) + ")"; this.age = view.getAge(); this.sumInsured = view.getSumInsured(); this.premium = view.getPremium(); this.commission = view.getPercentage(); this.periodOfMonth = view.getPeriodOfMonth(); this.paymentType = view.getPaymentTypeName(); this.agentNameWithLiscenceNo = view.getAgentNameAndCodeNo(); this.noOfInsu = view.getNoOfInsu(); } public String getCurrentAge(Date dob) { DateTime startDate = new DateTime(dob); DateTime endDate = new DateTime(new Date()); Period period = new Period(startDate, endDate); StringBuffer result = new StringBuffer(); result.append(period.getYears() + 1 + ""); return result.toString(); } public int getNoOfInsu() { return noOfInsu; } public String getPolicyNo() { return policyNo; } public String getCustomerName() { return customerName; } public String getCustomerAddress() { return customerAddress; } public String getCashReceiptAndPaymentDate() { return cashReceiptAndPaymentDate; } public double getAge() { return age; } public double getSumInsured() { return sumInsured; } public double getPremium() { return premium; } public int getCommission() { return commission; } public String getPeriodOfMonth() { return periodOfMonth; } public String getPaymentType() { return paymentType; } public String getAgentNameWithLiscenceNo() { return agentNameWithLiscenceNo; } public String changeMonthType(int months) { StringBuffer result = new StringBuffer(); int year = months / 12; if (year > 0) { result.append(year + " Year "); } int month = months % 12; if (month > 0) { result.append(month + " Months"); } return result.toString(); } @Override public String getRegistrationNo() { return policyNo; } }
[ "ASUS@DESKTOP-37IOB4I" ]
ASUS@DESKTOP-37IOB4I
bdc8c69d9a653f7ee2faffff51e06ff87bfd00a9
454fb79dbf1eed5e224002ffa91b38d6dceddf1c
/yy/src/com/dzrcx/jiaan/widget/YYOneButtonDialog.java
6a99f83b2edd95c98ad623c7ad4189fe849d8e10
[]
no_license
wujie0919/ATSAPP
f1d7487be6267c033eae7a2b27b1ec87084a7722
1d125dd9b8d7558a59c972dd49ad74bbb2d21a72
refs/heads/master
2020-04-10T04:45:35.460419
2018-12-12T16:20:26
2018-12-12T16:20:26
160,808,257
0
0
null
null
null
null
UTF-8
Java
false
false
2,599
java
package com.dzrcx.jiaan.widget; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.TextView; import com.dzrcx.jiaan.R; import com.dzrcx.jiaan.tools.MyUtils; /** * Created by zhangyu on 16-8-25. */ public class YYOneButtonDialog extends Dialog implements View.OnClickListener { private Context context; private TextView tv_button, tv_message, tv_title; private String buttonStr, messageStr, titleStri; private DialogClick dialogClick; /** * @param context * @param title * @param message * @param buttonStr */ public YYOneButtonDialog(Context context, String title, String message, String buttonStr ) { super(context, R.style.MyDialog); this.context = context; this.titleStri = title; this.messageStr = message; this.buttonStr = buttonStr; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.dlg_recommend_more); setCanceledOnTouchOutside(false); tv_title = (TextView) findViewById(R.id.tv_title); tv_message = (TextView) findViewById(R.id.tv_content); tv_button = (TextView) findViewById(R.id.tv_do_txt); tv_button.setOnClickListener(this); } @Override public void onClick(View v) { if (dialogClick != null) { switch (v.getId()) { case R.id.tv_do_txt: dialogClick.buttonClick(v, this); dismiss(); break; } } else { dismiss(); } } /** * 如果处理外部点击事件则传入相应的接口 */ public interface DialogClick { void buttonClick(View v, Dialog dialog); } public void setOnDialogClick( DialogClick onDialogClick) { dialogClick = onDialogClick; } @Override public void show() { super.show(); if (titleStri != null) { tv_title.setText(titleStri); } if (buttonStr != null) { tv_button.setText(buttonStr); } tv_message.setText(messageStr); Window w = getWindow(); WindowManager.LayoutParams lp = w.getAttributes(); lp.gravity = Gravity.CENTER; lp.width = MyUtils.getScreenWidth(context) / 10 * 8; onWindowAttributesChanged(lp); } }
[ "admin@example.com" ]
admin@example.com
00ec6b4e4573adb97b10844d557d55377615a2be
f2893b3141066418b72f1348da6d6285de2512c6
/documentView/withoutFactoryMethod/src/main/java/usantatecla/tictactoe/views/graphics/Constraints.java
92cb712c0dbda3e2d293fff0cffbc3a05d7d0491
[]
no_license
x-USantaTecla-game-connect4/java.swing.socket.sql
26f8028451aab3c8e5c26db1b1509e6e84108b0d
28dcc3879d782ace1752c2970d314498ee50b243
refs/heads/master
2023-09-01T11:43:43.053572
2021-10-16T16:19:50
2021-10-16T16:19:50
417,161,784
0
1
null
null
null
null
UTF-8
Java
false
false
312
java
package usantatecla.tictactoe.views.graphics; import java.awt.*; class Constraints extends GridBagConstraints { Constraints(int gridX, int gridY, int gridWidth, int gridHeight) { this.gridx = gridX; this.gridy = gridY; this.gridwidth = gridWidth; this.gridheight = gridHeight; this.fill = 1; } }
[ "setillofm@gmail.com" ]
setillofm@gmail.com
200ec92319083efee57bf5c36637ef41f46df0ec
094642ba71e1bc701c7725ce1b4d836efadac0c1
/yunpukeji/src/main/java/com/zhiluo/android/yunpu/statistics/account/event/ScreenConditionEvent.java
00c0e9421be88212131ca66d735918e0486d58d0
[]
no_license
czq080/Trunk
80a521bab8c6cc8482b55a291a79e8be634ae1d6
dcfcb5d6be83a87620c74d4092455bf844ff99d7
refs/heads/master
2023-03-17T20:01:14.790638
2020-03-25T06:26:10
2020-03-25T06:26:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,495
java
package com.zhiluo.android.yunpu.statistics.account.event; /** * 筛选条件事件 * 作者:罗咏哲 on 2017/9/6 13:55. * 邮箱:137615198@qq.com */ public class ScreenConditionEvent { private String startDate; private String endDate; private String vipCondition; private String order; private String payWayCode; private String device; private String big; private String small; private String serviceName; private String type; private String gid; private String creator; public String getCreator() { return creator; } public void setCreator(String creator) { this.creator = creator; } public String getProjectNum() { return projectNum; } public void setProjectNum(String projectNum) { this.projectNum = projectNum; } private String projectNum; public String getType() { return type; } public void setType(String type) { this.type = type; } public String getServiceName() { return serviceName; } public void setServiceName(String serviceName) { this.serviceName = serviceName; } public String getStartDate() { return startDate; } public void setStartDate(String startDate) { this.startDate = startDate; } public String getEndDate() { return endDate; } public void setEndDate(String endDate) { this.endDate = endDate; } public String getVipCondition() { return vipCondition; } public void setVipCondition(String vipCondition) { this.vipCondition = vipCondition; } public String getOrder() { return order; } public void setOrder(String order) { this.order = order; } public String getPayWayCode() { return payWayCode; } public void setPayWayCode(String payWayCode) { this.payWayCode = payWayCode; } public String getDevice() { return device; } public void setDevice(String device) { this.device = device; } public String getBig() { return big; } public void setBig(String big) { this.big = big; } public String getSmall() { return small; } public void setSmall(String small) { this.small = small; } public String getGid() { return gid; } public void setGid(String gid) { this.gid = gid; } }
[ "guting@kuaimashi.com" ]
guting@kuaimashi.com
1cb305a751d15f46c00ecc2971080aef91e9a580
4e100859f2a83ebe7ecce656c53240f1fa1c593a
/src/main/java/com/microsoft/azure/plugins/bundler/Preparer.java
23ca17780bcc6979c2490a1c121cf403496e96ef
[ "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
Azure/maven-bundler
6f583bdf020e04ecdfaa6c68c9e5d7ebfc68c5c5
ff7b8a4ad49e4e5c725d0c73d4425a0784825578
refs/heads/master
2023-08-17T14:48:00.392766
2023-05-31T18:48:30
2023-05-31T18:48:30
124,949,226
3
4
MIT
2023-01-24T16:40:17
2018-03-12T20:44:48
Java
UTF-8
Java
false
false
3,694
java
package com.microsoft.azure.plugins.bundler; import com.google.common.base.Joiner; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; /** * Bundles all poms and jars with corresponding names. */ @Mojo(name = "prepare" , aggregator = true) public class Preparer extends AbstractMojo { @Parameter(defaultValue = "${session}", readonly = true, required = true) private MavenSession session; MavenSession session() { return session; } @Parameter(defaultValue="${project}", readonly=true, required=true) private MavenProject project; MavenProject project() { return project; } @Parameter(property = "version") private String version; @Parameter(property = "devVersion") private String devVersion; @Parameter(property = "versionConfig") private String versionConfig; private Map<String, String> versionMap = new HashMap<>(); public String getVersion(String artifactId) { if (versionMap.isEmpty()) { return version; } else { return versionMap.get(artifactId); } } @Override public void execute() throws MojoExecutionException, MojoFailureException { if (!project.getVersion().endsWith("-SNAPSHOT")) { throw new MojoFailureException("Prepare goal can only be run for SNAPSHOT projects"); } String tag = "v" + version; CommandRunner runner = new CommandRunner(this, session); String prepareCmd = "mvn -B release:prepare -DpushChanges=false -Darguments=\"-DskipTests=true\" -Dresume=false"; prepareCmd = prepareCmd + " -Dtag=" + tag; if (versionConfig != null) { prepareCmd = prepareCmd + " " + Joiner.on(" ").join(loadVersions(versionConfig)); } else if (version != null && devVersion != null) { prepareCmd = prepareCmd + String.format(" -DreleaseVersion=%s -DdevelopmentVersion=%s", version, devVersion); } else { throw new MojoFailureException("Either 'versionConfig' or the combination of 'version' and 'devVersion' must be provided"); } runner.runCommand(prepareCmd); } private List<String> loadVersions(String versionConfig) throws MojoFailureException{ List<String> args = new ArrayList<>(); try { BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(versionConfig))); String line; while ((line = br.readLine()) != null) { String[] info = line.split(","); assert info.length == 4; String groupId = info[0]; String artifactId = info[1]; String version = info[2]; String devVersion = info[3]; args.add(String.format("-Dproject.rel.%s:%s=%s -Dproject.dev.%s:%s=%s", groupId, artifactId, version, groupId, artifactId, devVersion)); versionMap.put(artifactId, version); } } catch (IOException e) { throw new MojoFailureException(e.getMessage(), e); } return args; } }
[ "jianghaolu@users.noreply.github.com" ]
jianghaolu@users.noreply.github.com
585ef9e87f03945b6438cc4c9a1f22359cac8ec7
99d338387d9ccea73eba0a7039c14a7b9fe7f0b8
/src/main/java/fredboat/command/music/ListCommand.java
e27294202490e3ae138723086142573d9e0db367
[ "MIT" ]
permissive
MasterMapMaker/FredBoat
7ca460bc07ed54fcb21e4571999fef09d74b9fb3
4bc6ad656ba53300b0c71f90bec70d332b4772e0
refs/heads/master
2021-01-11T03:26:10.076333
2016-10-15T22:44:57
2016-10-15T22:44:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,251
java
package fredboat.command.music; import com.sedmelluq.discord.lavaplayer.track.AudioTrack; import fredboat.audio.GuildPlayer; import fredboat.audio.PlayerRegistry; import fredboat.commandmeta.abs.Command; import fredboat.commandmeta.abs.IMusicCommand; import fredboat.util.TextUtils; import net.dv8tion.jda.MessageBuilder; import net.dv8tion.jda.entities.Guild; import net.dv8tion.jda.entities.Message; import net.dv8tion.jda.entities.TextChannel; import net.dv8tion.jda.entities.User; public class ListCommand extends Command implements IMusicCommand { @Override public void onInvoke(Guild guild, TextChannel channel, User invoker, Message message, String[] args) { GuildPlayer player = PlayerRegistry.get(guild.getId()); player.setCurrentTC(channel); if (!player.isQueueEmpty()) { MessageBuilder mb = new MessageBuilder(); int i = 0; for (AudioTrack at : player.getRemainingTracks()) { if (i == 0) { String status = player.isPlaying() ? "[PLAYING] " : "[PAUSED] "; mb.appendString(status, MessageBuilder.Formatting.BOLD) .appendString(at.getInfo().title) .appendString("\n"); } else { mb.appendString(at.getInfo().title) .appendString("\n"); if (i == 10) { break; } } i++; } //Now add a timestamp for how much is remaining long t = player.getTotalRemainingMusicTimeSeconds(); String timestamp = TextUtils.formatTime(t); mb.appendString("\n\nThere are a total of **") .appendString(String.valueOf(player.getRemainingTracks().size()), MessageBuilder.Formatting.BOLD) .appendString("** queued songs with a remaining length of **[" + timestamp + "]**."); channel.sendMessage(mb.build()); } else { channel.sendMessage("Not currently playing anything."); } } public String forceTwoDigits(int i) { return i < 10 ? "0" + i : Integer.toString(i); } }
[ "frogkr@gmail.com" ]
frogkr@gmail.com
8375c89b5c3ae3617de17708db372b7903fe3d7c
480d76232ca7293194c69ba57a5039c6507d5bc7
/mcp811 1.6.4/temp/src/minecraft/net/minecraft/src/Packet43Experience.java
a3000ebf8031e443411df722e0b04a89fb60fb3a
[]
no_license
interactivenyc/Minecraft_SRC_MOD
bee868e7adf9c548ddafd8549a55a759cfa237ce
4b311f43fd312521c1df39010b0ae34ed81bc406
refs/heads/master
2016-09-07T18:33:22.494356
2014-01-27T19:10:47
2014-01-27T19:10:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,315
java
package net.minecraft.src; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import net.minecraft.src.NetHandler; import net.minecraft.src.Packet; public class Packet43Experience extends Packet { public float field_73396_a; public int field_73394_b; public int field_73395_c; public Packet43Experience() {} public Packet43Experience(float p_i1468_1_, int p_i1468_2_, int p_i1468_3_) { this.field_73396_a = p_i1468_1_; this.field_73394_b = p_i1468_2_; this.field_73395_c = p_i1468_3_; } public void func_73267_a(DataInput p_73267_1_) throws IOException { this.field_73396_a = p_73267_1_.readFloat(); this.field_73395_c = p_73267_1_.readShort(); this.field_73394_b = p_73267_1_.readShort(); } public void func_73273_a(DataOutput p_73273_1_) throws IOException { p_73273_1_.writeFloat(this.field_73396_a); p_73273_1_.writeShort(this.field_73395_c); p_73273_1_.writeShort(this.field_73394_b); } public void func_73279_a(NetHandler p_73279_1_) { p_73279_1_.func_72522_a(this); } public int func_73284_a() { return 4; } public boolean func_73278_e() { return true; } public boolean func_73268_a(Packet p_73268_1_) { return true; } }
[ "steve@speakaboos.com" ]
steve@speakaboos.com
2dc37f2479ad572446f8624a16fea6bdba042910
6dbd2548e6df1ed25cb914af5e1af5066529f3bf
/app/src/main/java/com/k/baselayout/BaseSDKCallback.java
5fd40c81fee8ff747263cf566fec910baab7f597
[]
no_license
w493549442/BaseLayout
84af214984365b1470d1b9329fffb03184194e14
f63c94b5e61855cc8b1bbcc4d70de54b213e4cff
refs/heads/master
2021-01-22T19:18:10.344617
2017-03-16T10:55:29
2017-03-16T10:55:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
415
java
package com.k.baselayout; /** * Created by k on 2017/3/16. */ public interface BaseSDKCallback { public static enum ZTOFaceLivenessError { ZTOFaceLivenessCancel, //用户取消 ZTOFaceLivenessForbidden, //权限不足 ZTOFaceLivenessFail, //检查失败 } void onCheckResult(boolean success, String token); void onCheckFail(ZTOFaceLivenessError error); }
[ "123456" ]
123456
36b46d0d0837f952377f4a54fb00bae9a36dd58a
160a34361073a54d39ffa14fdae6ce3cbc7d6e6b
/src/main/java/com/alipay/api/response/AlipayFundStudentloanRepayQueryResponse.java
4dbcccb56e08613556ca9f391708c702a9732b4f
[ "Apache-2.0" ]
permissive
appbootup/alipay-sdk-java-all
6a5e55629b9fc77e61ee82ea2c4cdab2091e0272
9ae311632a4053b8e5064b83f97cf1503a00147b
refs/heads/master
2020-05-01T09:45:44.940180
2019-03-15T09:52:14
2019-03-15T09:52:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,239
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.RepayDetail; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.fund.studentloan.repay.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayFundStudentloanRepayQueryResponse extends AlipayResponse { private static final long serialVersionUID = 4231558173578244835L; /** * 业务类型 A生源地 B高校 */ @ApiField("biz_type") private String bizType; /** * 学生所在分行名称 */ @ApiField("branch_name") private String branchName; /** * 学生所在区县或高校 */ @ApiField("org_name") private String orgName; /** * 还款日期,格式yyyy-MM-dd */ @ApiField("repay_date") private String repayDate; /** * 还款明细列表 */ @ApiListField("repay_list") @ApiField("repay_detail") private List<RepayDetail> repayList; /** * 学生当前应还金额汇总 */ @ApiField("should_amount") private String shouldAmount; /** * 李某 */ @ApiField("student_name") private String studentName; public void setBizType(String bizType) { this.bizType = bizType; } public String getBizType( ) { return this.bizType; } public void setBranchName(String branchName) { this.branchName = branchName; } public String getBranchName( ) { return this.branchName; } public void setOrgName(String orgName) { this.orgName = orgName; } public String getOrgName( ) { return this.orgName; } public void setRepayDate(String repayDate) { this.repayDate = repayDate; } public String getRepayDate( ) { return this.repayDate; } public void setRepayList(List<RepayDetail> repayList) { this.repayList = repayList; } public List<RepayDetail> getRepayList( ) { return this.repayList; } public void setShouldAmount(String shouldAmount) { this.shouldAmount = shouldAmount; } public String getShouldAmount( ) { return this.shouldAmount; } public void setStudentName(String studentName) { this.studentName = studentName; } public String getStudentName( ) { return this.studentName; } }
[ "liuqun.lq@alibaba-inc.com" ]
liuqun.lq@alibaba-inc.com
470bd8debc0bc1a2733a73c86f87b8eaed80a9c6
3d0987d1872a35b8cb34c8b394be8bbedf60b335
/src/main/java/org/dependencytrack/upgrade/v350/v350Updater.java
819488ae9f1db1836e2ab6c9fe928d8b16eaa620
[ "Apache-2.0" ]
permissive
PeterMosmans/dependency-track
b7521ad5643292e65eb197b232c4aa2ead8cde19
791faa52168d1968edf6380e41e8bca68e52ca40
refs/heads/master
2020-04-25T15:39:45.490290
2019-02-18T05:49:07
2019-02-18T05:49:07
172,885,919
0
1
Apache-2.0
2019-02-27T09:35:29
2019-02-27T09:35:29
null
UTF-8
Java
false
false
1,946
java
/* * This file is part of Dependency-Track. * * 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. * * Copyright (c) Steve Springett. All Rights Reserved. */ package org.dependencytrack.upgrade.v350; import alpine.logging.Logger; import alpine.persistence.AlpineQueryManager; import alpine.upgrade.AbstractUpgradeItem; import org.apache.commons.lang.StringUtils; import org.dependencytrack.model.Project; import org.dependencytrack.persistence.QueryManager; import java.sql.Connection; import java.sql.SQLException; public class v350Updater extends AbstractUpgradeItem { private static final Logger LOGGER = Logger.getLogger(v350Updater.class); public String getSchemaVersion() { return "3.5.0"; } public void executeUpgrade(AlpineQueryManager aqm, Connection connection) throws SQLException { LOGGER.info("Validating project names"); try (QueryManager qm = new QueryManager(aqm.getPersistenceManager())) { for (Project project: qm.getAllProjects()) { if (null == StringUtils.trimToNull(project.getName())) { project.setName("(Undefined)"); qm.persist(project); } if (project.getVersion() != null && StringUtils.trimToNull(project.getVersion()) == null) { project.setVersion(null); qm.persist(project); } } } } }
[ "steve@springett.us" ]
steve@springett.us
019e4f77496d4647db65e4cf65565bcfd659d55e
893bdc59bb8ff233ad4567182a04ff23a4ee13ae
/spring/spring3/SpringDev/src/com/rueggerllc/test/AllTests.java
970cd0c43d4072ebfce68083b715a56675ff4512
[]
no_license
rueggerc/rueggerllc-public
33f5396f04a423a62f6c7e7124fa02c8f455c2c8
a86950de18c1d5ec23aaf1051268f297b4bc4f78
refs/heads/master
2021-01-13T14:38:17.480642
2017-10-10T22:14:30
2017-10-10T22:14:30
76,731,748
0
0
null
null
null
null
UTF-8
Java
false
false
270
java
package com.rueggerllc.test; import org.junit.runner.RunWith; import org.junit.runners.Suite; @RunWith(Suite.class) // @Suite.SuiteClasses({AopTest.class}) // @Suite.SuiteClasses({JDBCTest.class}) @Suite.SuiteClasses({HibernateTest.class}) public class AllTests { }
[ "chris.ruegger@gmail.com" ]
chris.ruegger@gmail.com
b450909bfd6419dabfc09124136fd49fbc593afd
04a99f6b54343509fad1ecb9ad90a1d152ebcdc0
/src/main/java/br/indie/fiscal4j/cte300/classes/enviolote/consulta/CTeConsultaRecLote.java
37bb1a43dc45db46bf21edd5646fad75f907e4f1
[ "Apache-2.0" ]
permissive
BLACKFISHLABS/fiscal4j
6461f97c2eac2cb5124d9a02fec4848e440480ee
113b8dfda402353730ee949bd9ec3879adaebda6
refs/heads/master
2023-04-27T05:40:57.798577
2023-04-24T20:05:34
2023-04-24T20:05:34
101,763,126
12
10
Apache-2.0
2020-11-13T16:50:09
2017-08-29T13:14:49
Java
UTF-8
Java
false
false
1,659
java
package br.indie.fiscal4j.cte300.classes.enviolote.consulta; import br.indie.fiscal4j.DFAmbiente; import br.indie.fiscal4j.DFBase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Root; /** * @author Caio * @info Tipo Pedido de Consulta do Recibo do Lote de CT-e */ @Root(name = "consReciCTe") @Namespace(reference = "http://www.portalfiscal.inf.br/cte") public class CTeConsultaRecLote extends DFBase { private static final long serialVersionUID = -1071906898535302580L; @Element(name = "tpAmb") private DFAmbiente ambiente; @Element(name = "nRec") private String numeroRecebimento; @Attribute(name = "versao") private String versao; public CTeConsultaRecLote() { this.ambiente = null; this.numeroRecebimento = null; this.versao = null; } public DFAmbiente getAmbiente() { return this.ambiente; } /** * Identificação do Ambiente:<br> * 1 - Produção<br> * 2 - Homologação */ public void setAmbiente(final DFAmbiente ambiente) { this.ambiente = ambiente; } public String getNumeroRecebimento() { return this.numeroRecebimento; } /** * Número do Recibo do lote a ser consultado */ public void setNumeroRecebimento(final String numeroRecebimento) { this.numeroRecebimento = numeroRecebimento; } public String getVersao() { return this.versao; } /** * */ public void setVersao(final String versao) { this.versao = versao; } }
[ "dev.blackfishlabs@gmail.com" ]
dev.blackfishlabs@gmail.com
b87e05cfc3704c9e4b53db54e240d978d338c725
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/protocal/protobuf/aof.java
fae3f7f420bd0c1d8aa686df33d77d16e6aaea2a
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,634
java
package com.tencent.p177mm.protocal.protobuf; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.p177mm.p205bt.C1331a; import java.util.LinkedList; import p690e.p691a.p692a.C6087a; import p690e.p691a.p692a.C6092b; import p690e.p691a.p692a.p693a.C6086a; import p690e.p691a.p692a.p695b.p697b.C6091a; import p690e.p691a.p692a.p698c.C6093a; /* renamed from: com.tencent.mm.protocal.protobuf.aof */ public final class aof extends btd { public String kdS; /* renamed from: op */ public final int mo4669op(int i, Object... objArr) { AppMethodBeat.m2504i(89105); C6092b c6092b; int ix; if (i == 0) { C6093a c6093a = (C6093a) objArr[0]; if (this.BaseResponse == null) { c6092b = new C6092b("Not all required fields were included: BaseResponse"); AppMethodBeat.m2505o(89105); throw c6092b; } if (this.BaseResponse != null) { c6093a.mo13479iy(1, this.BaseResponse.computeSize()); this.BaseResponse.writeFields(c6093a); } if (this.kdS != null) { c6093a.mo13475e(2, this.kdS); } AppMethodBeat.m2505o(89105); return 0; } else if (i == 1) { if (this.BaseResponse != null) { ix = C6087a.m9557ix(1, this.BaseResponse.computeSize()) + 0; } else { ix = 0; } if (this.kdS != null) { ix += C6091a.m9575f(2, this.kdS); } AppMethodBeat.m2505o(89105); return ix; } else if (i == 2) { C6086a c6086a = new C6086a((byte[]) objArr[0], unknownTagHandler); for (ix = C1331a.getNextFieldNumber(c6086a); ix > 0; ix = C1331a.getNextFieldNumber(c6086a)) { if (!super.populateBuilderWithField(c6086a, this, ix)) { c6086a.ems(); } } if (this.BaseResponse == null) { c6092b = new C6092b("Not all required fields were included: BaseResponse"); AppMethodBeat.m2505o(89105); throw c6092b; } AppMethodBeat.m2505o(89105); return 0; } else if (i == 3) { C6086a c6086a2 = (C6086a) objArr[0]; aof aof = (aof) objArr[1]; int intValue = ((Integer) objArr[2]).intValue(); switch (intValue) { case 1: LinkedList Vh = c6086a2.mo13445Vh(intValue); int size = Vh.size(); for (intValue = 0; intValue < size; intValue++) { byte[] bArr = (byte[]) Vh.get(intValue); BaseResponse baseResponse = new BaseResponse(); C6086a c6086a3 = new C6086a(bArr, unknownTagHandler); for (boolean z = true; z; z = baseResponse.populateBuilderWithField(c6086a3, baseResponse, C1331a.getNextFieldNumber(c6086a3))) { } aof.BaseResponse = baseResponse; } AppMethodBeat.m2505o(89105); return 0; case 2: aof.kdS = c6086a2.BTU.readString(); AppMethodBeat.m2505o(89105); return 0; default: AppMethodBeat.m2505o(89105); return -1; } } else { AppMethodBeat.m2505o(89105); return -1; } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
416000c17b51881b2ece3dc9a092fd0b49bd1607
4d0f2d62d1c156d936d028482561585207fb1e49
/Ma nguon/zcs-8.0.2_GA_5570-src/ZimbraSoap/src/java/com/zimbra/soap/mail/message/DeleteDeviceRequest.java
33cf6d46346d7de485e69c7b5d69e14004f4a418
[]
no_license
vuhung/06-email-captinh
e3f0ff2e84f1c2bc6bdd6e4167cd7107ec42c0bd
af828ac73fc8096a3cc096806c8080e54d41251f
refs/heads/master
2020-07-08T09:09:19.146159
2013-05-18T12:57:24
2013-05-18T12:57:24
32,319,083
0
2
null
null
null
null
UTF-8
Java
false
false
1,969
java
/* * ***** BEGIN LICENSE BLOCK ***** * Zimbra Collaboration Suite Server * Copyright (C) 2011 Zimbra, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.zimbra.com/license. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * ***** END LICENSE BLOCK ***** */ package com.zimbra.soap.mail.message; import com.google.common.base.Objects; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import com.zimbra.common.soap.MailConstants; import com.zimbra.common.soap.OctopusXmlConstants; import com.zimbra.soap.type.Id; /** * @zm-api-command-auth-required true * @zm-api-command-admin-auth-required false * @zm-api-command-description Permanently deletes mapping for indicated device. */ @XmlAccessorType(XmlAccessType.NONE) @XmlRootElement(name=OctopusXmlConstants.E_DELETE_DEVICE_REQUEST) public class DeleteDeviceRequest { /** * @zm-api-field-description Device ID */ @XmlElement(name=MailConstants.E_DEVICE /* device */, required=true) private final Id device; /** * no-argument constructor wanted by JAXB */ @SuppressWarnings("unused") private DeleteDeviceRequest() { this((Id) null); } public DeleteDeviceRequest(Id device) { this.device = device; } public Id getDevice() { return device; } public Objects.ToStringHelper addToStringInfo(Objects.ToStringHelper helper) { return helper .add("device", device); } @Override public String toString() { return addToStringInfo(Objects.toStringHelper(this)).toString(); } }
[ "vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931" ]
vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931
f87c28994f5de0a15ad2881a71975a048f6e7aec
87fe2f7872b802ecbd59bac6b3b4b8ad1e67500a
/app/src/main/java/ab/selector/ImageGridActivity.java
2f0c9e32916346dd739e8548cb626f551a9b2738
[]
no_license
RRrongrui/sreyey
0beeef15daf06c082f528cf973d670979713a0e9
6ac2818df6d7bd24ed8caca9bd73a256e456a8f0
refs/heads/master
2021-01-13T08:49:22.266064
2016-10-23T08:12:36
2016-10-23T08:12:36
71,898,864
0
0
null
null
null
null
UTF-8
Java
false
false
3,155
java
package ab.selector; import android.annotation.SuppressLint; import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.view.View; import android.view.View.OnClickListener; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.Button; import android.widget.GridView; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import spfworld.spfworld.R; import spfworld.spfworld.activity.Tribune.PostTribuneDateActivity; import spfworld.spfworld.base.BaseActivity; import spfworld.spfworld.utils.ToastUtils; import spfworld.spfworld.utils.UiUtils; /** * 相册展示页 * @author zhouyou */ @SuppressLint("HandlerLeak") public class ImageGridActivity extends BaseActivity { public static final String EXTRA_IMAGE_LIST = "imagelist"; private ImageGridAdapter mAdapter; private List<ImageItem> mDataList; private AlbumHelper mHelper; private GridView mGridView; private Button mBt; Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { switch (msg.what) { case 0: ToastUtils.showToast(UiUtils.getContext(), R.string.select_photo_hint); break; default: break; } } }; @SuppressWarnings("unchecked") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_image_grid); mHelper = AlbumHelper.getHelper(); mHelper.init(getApplicationContext()); mDataList = (List<ImageItem>) getIntent().getSerializableExtra(EXTRA_IMAGE_LIST); initView(); mBt = (Button) findViewById(R.id.bt); mBt.setOnClickListener(new OnClickListener() { public void onClick(View v) { ArrayList<String> list = new ArrayList<String>(); Collection<String> c = mAdapter.mMap.values(); Iterator<String> it = c.iterator(); for (; it.hasNext();) { list.add(it.next()); } if (Bimp.mActBool) { Intent intent = new Intent(ImageGridActivity.this, PostTribuneDateActivity.class); startActivity(intent); Bimp.mActBool = false; } for (int i = 0; i < list.size(); i++) { if (Bimp.mDrr.size() < 9) { Bimp.mDrr.add(list.get(i)); } } finish(); } }); } private void initView() { setTitle(UiUtils.getString(R.string.album)); setTitleLeftImg(R.mipmap.ico_back); mGridView = (GridView) findViewById(R.id.gridview); mGridView.setSelector(new ColorDrawable(Color.TRANSPARENT)); mAdapter = new ImageGridAdapter(ImageGridActivity.this, mDataList, mHandler); mGridView.setAdapter(mAdapter); mAdapter.setTextCallback(new ImageGridAdapter.TextCallback() { public void onListen(int count) { mBt.setText(UiUtils.getString(R.string.finish) + "(" + count + ")"); } }); mGridView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { mAdapter.notifyDataSetChanged(); } }); } }
[ "rongrui4918@163.com" ]
rongrui4918@163.com
480b5e8d461ea3bdffe407c33016d5e7e855fc71
6e256043a49ecf35801c657ef41dee29bc064452
/.svn/pristine/81/8138c792dbe853b6a9f2e75418b3676a89e96d16.svn-base
d87c9ae6c285203ec997e75eb9e8c43ac95f6af1
[]
no_license
chinthakasajith/epic
19ac105981176edf7f8a585b60bd4144c10be605
a6bf9555663d85bb3b1fdc3fedb71443c38b3491
refs/heads/master
2021-01-01T02:49:52.954515
2020-02-08T14:24:32
2020-02-08T14:24:32
239,144,084
0
0
null
null
null
null
UTF-8
Java
false
false
3,643
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.epic.cms.prem.bulkcardmgt.bulkcardrequest.bean; /** * * @author sajith_g */ public class ECMSOnlineTransBean { private String cardNumber; private String txnId; private String rrn; private String txnCurrency; private String currenctexponent; private String formattedTxnAmount; private String txnDate; private String txnTime; private String accepterName; private String subType; private String txnAmount; private String statusCode; private String statusDes; private String toAmount; private String fromAmount; private String fromDate; private String txnCurrencyCode; public String getTxnDate() { return txnDate; } public void setTxnDate(String txnDate) { this.txnDate = txnDate; } public String getTxnTime() { return txnTime; } public void setTxnTime(String txnTime) { this.txnTime = txnTime; } public String getAccepterName() { return accepterName; } public void setAccepterName(String accepterName) { this.accepterName = accepterName; } public String getSubType() { return subType; } public void setSubType(String subType) { this.subType = subType; } public String getTxnAmount() { return txnAmount; } public void setTxnAmount(String txnAmount) { this.txnAmount = txnAmount; } public String getStatusCode() { return statusCode; } public void setStatusCode(String statusCode) { this.statusCode = statusCode; } public String getStatusDes() { return statusDes; } public void setStatusDes(String statusDes) { this.statusDes = statusDes; } public String getCardNumber() { return cardNumber; } public void setCardNumber(String cardNumber) { this.cardNumber = cardNumber; } public String getToAmount() { return toAmount; } public void setToAmount(String toAmount) { this.toAmount = toAmount; } public String getFromAmount() { return fromAmount; } public void setFromAmount(String fromAmount) { this.fromAmount = fromAmount; } public String getFromDate() { return fromDate; } public void setFromDate(String fromDate) { this.fromDate = fromDate; } public String getTxnId() { return txnId; } public void setTxnId(String txnId) { this.txnId = txnId; } public String getRrn() { return rrn; } public void setRrn(String rrn) { this.rrn = rrn; } public String getTxnCurrency() { return txnCurrency; } public void setTxnCurrency(String txnCurrency) { this.txnCurrency = txnCurrency; } public String getCurrenctexponent() { return currenctexponent; } public void setCurrenctexponent(String currenctexponent) { this.currenctexponent = currenctexponent; } public String getFormattedTxnAmount() { return formattedTxnAmount; } public void setFormattedTxnAmount(String formattedTxnAmount) { this.formattedTxnAmount = formattedTxnAmount; } public String getTxnCurrencyCode() { return txnCurrencyCode; } public void setTxnCurrencyCode(String txnCurrencyCode) { this.txnCurrencyCode = txnCurrencyCode; } }
[ "sajithdoo@gmail.com" ]
sajithdoo@gmail.com
a743ba2bc1c604df7bfbef8c84487a9ad29071a9
28b6e7c633829a5a6b2bf51b00fd36c6e07cb02e
/src/java/com/pracbiz/b2bportal/core/holder/BuyerOperationHolder.java
1b4b2a1dd431721022689878c7a30e00847fffa0
[]
no_license
OuYangLiang/pracbiz-Ntuc-B2B
db3aa7cc3cbd019b720c97342ffce966d1c4c3da
a6a36fbd0be941c19b9223aab5d0ec129b9752f1
refs/heads/master
2021-01-01T16:55:23.897814
2015-02-17T16:04:03
2015-02-17T16:04:03
30,924,377
0
0
null
null
null
null
UTF-8
Java
false
false
1,404
java
//***************************************************************************** // // File Name : BuyerOperationHolder.java // Date Created : Dec 17, 2012 // Last Changed By : $Author: ouyang $ // Last Changed On : $Date: Dec 17, 2012 1:31:09 PM$ // Revision : $Rev: 15 $ // Description : TODO To fill in a brief description of the purpose of // this class. // // PracBiz Pte Ltd. Copyright (c) 2012. All Rights Reserved. // //***************************************************************************** package com.pracbiz.b2bportal.core.holder; import java.math.BigDecimal; import com.pracbiz.b2bportal.base.holder.BaseHolder; /** * TODO To provide an overview of this class. * * @author ouyang */ public class BuyerOperationHolder extends BaseHolder { private static final long serialVersionUID = 1565345518304734570L; private BigDecimal buyerOid; private String opnId; public BigDecimal getBuyerOid() { return buyerOid; } public void setBuyerOid(BigDecimal buyerOid) { this.buyerOid = buyerOid; } public String getOpnId() { return opnId; } public void setOpnId(String opnId) { this.opnId = opnId; } @Override public String getCustomIdentification() { return buyerOid == null ? null : buyerOid.toString() + opnId; } }
[ "ouyanggod@gmail.com" ]
ouyanggod@gmail.com
a3ea8497792fea168b1951f7f14756d455483724
2b4f4b41e8a28a5024d41223b2876c87ee1eaa1a
/Eis-portlet/docroot/WEB-INF/service/com/idetronic/eis/model/StateSoap.java
807d5813ac389b3c7651c76b672b1f6089699b57
[]
no_license
merbauraya/lportal6.2
48bb99e5b6b937fce6e20e5c76303c4982bcad02
e7446107fd793a8ab557b4748f3214a83dbe6ce6
refs/heads/master
2021-01-21T19:51:52.682108
2017-08-08T14:42:38
2017-08-08T14:42:38
92,167,957
0
0
null
null
null
null
UTF-8
Java
false
false
2,587
java
/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.idetronic.eis.model; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * This class is used by SOAP remote services. * * @author Mazlan Mat * @generated */ public class StateSoap implements Serializable { public static StateSoap toSoapModel(State model) { StateSoap soapModel = new StateSoap(); soapModel.setStateId(model.getStateId()); soapModel.setStateName(model.getStateName()); soapModel.setStateCode(model.getStateCode()); return soapModel; } public static StateSoap[] toSoapModels(State[] models) { StateSoap[] soapModels = new StateSoap[models.length]; for (int i = 0; i < models.length; i++) { soapModels[i] = toSoapModel(models[i]); } return soapModels; } public static StateSoap[][] toSoapModels(State[][] models) { StateSoap[][] soapModels = null; if (models.length > 0) { soapModels = new StateSoap[models.length][models[0].length]; } else { soapModels = new StateSoap[0][0]; } for (int i = 0; i < models.length; i++) { soapModels[i] = toSoapModels(models[i]); } return soapModels; } public static StateSoap[] toSoapModels(List<State> models) { List<StateSoap> soapModels = new ArrayList<StateSoap>(models.size()); for (State model : models) { soapModels.add(toSoapModel(model)); } return soapModels.toArray(new StateSoap[soapModels.size()]); } public StateSoap() { } public long getPrimaryKey() { return _stateId; } public void setPrimaryKey(long pk) { setStateId(pk); } public long getStateId() { return _stateId; } public void setStateId(long stateId) { _stateId = stateId; } public String getStateName() { return _stateName; } public void setStateName(String stateName) { _stateName = stateName; } public String getStateCode() { return _stateCode; } public void setStateCode(String stateCode) { _stateCode = stateCode; } private long _stateId; private String _stateName; private String _stateCode; }
[ "mazlan.mat@gmail.com" ]
mazlan.mat@gmail.com
668ba9cc5fbedf12488cad535156f8a81365b709
9dd0c692b32af141cc09c13d26b6464b77f5af38
/src/main/java/com/terracina/r/crm/CrmApp.java
0822a0ec0dc8dc833c1d538e5f10b1f3b2a8c935
[]
no_license
terracina-r/crm
fce8b088402a8dc4aa0883316bf9d6811a15e4b7
94b5dbdb15dfff2f1477c6b15931689c279888e1
refs/heads/master
2022-12-21T08:06:20.882315
2019-11-05T10:38:21
2019-11-05T10:38:21
219,716,032
0
0
null
2022-12-16T04:40:50
2019-11-05T10:16:58
Java
UTF-8
Java
false
false
4,526
java
package com.terracina.r.crm; import com.terracina.r.crm.config.ApplicationProperties; import com.terracina.r.crm.config.DefaultProfileUtil; import io.github.jhipster.config.JHipsterConstants; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.core.env.Environment; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; import java.util.Collection; @SpringBootApplication @EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class}) @EnableDiscoveryClient public class CrmApp implements InitializingBean { private static final Logger log = LoggerFactory.getLogger(CrmApp.class); private final Environment env; public CrmApp(Environment env) { this.env = env; } /** * Initializes crm. * <p> * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile * <p> * You can find more information on how profiles work with JHipster on <a href="https://www.jhipster.tech/profiles/">https://www.jhipster.tech/profiles/</a>. */ @Override public void afterPropertiesSet() throws Exception { Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles()); if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { log.error("You have misconfigured your application! It should not run " + "with both the 'dev' and 'prod' profiles at the same time."); } if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) { log.error("You have misconfigured your application! It should not " + "run with both the 'dev' and 'cloud' profiles at the same time."); } } /** * Main method, used to run the application. * * @param args the command line arguments. */ public static void main(String[] args) { SpringApplication app = new SpringApplication(CrmApp.class); DefaultProfileUtil.addDefaultProfile(app); Environment env = app.run(args).getEnvironment(); logApplicationStartup(env); } private static void logApplicationStartup(Environment env) { String protocol = "http"; if (env.getProperty("server.ssl.key-store") != null) { protocol = "https"; } String serverPort = env.getProperty("server.port"); String contextPath = env.getProperty("server.servlet.context-path"); if (StringUtils.isBlank(contextPath)) { contextPath = "/"; } String hostAddress = "localhost"; try { hostAddress = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { log.warn("The host name could not be determined, using `localhost` as fallback"); } log.info("\n----------------------------------------------------------\n\t" + "Application '{}' is running! Access URLs:\n\t" + "Local: \t\t{}://localhost:{}{}\n\t" + "External: \t{}://{}:{}{}\n\t" + "Profile(s): \t{}\n----------------------------------------------------------", env.getProperty("spring.application.name"), protocol, serverPort, contextPath, protocol, hostAddress, serverPort, contextPath, env.getActiveProfiles()); String configServerStatus = env.getProperty("configserver.status"); if (configServerStatus == null) { configServerStatus = "Not found or not setup for this application"; } log.info("\n----------------------------------------------------------\n\t" + "Config Server: \t{}\n----------------------------------------------------------", configServerStatus); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
82b6e56fe684d4a5cea3e159e701109d2cbcf563
288151cf821acf7fe9430c2b6aeb19e074a791d4
/mfoyou-agent-server/mfoyou-agent-center/src/main/java/org/mfoyou/agent/center/dao/mfoyou/inf/MfoyouSystemMapper.java
a3573281e7faae814a84b9c7c44c1cece72ff677
[]
no_license
jiningeast/distribution
60022e45d3a401252a9c970de14a599a548a1a99
c35bfc5923eaecf2256ce142955ecedcb3c64ae5
refs/heads/master
2020-06-24T11:27:51.899760
2019-06-06T12:52:59
2019-06-06T12:52:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,003
java
package org.mfoyou.agent.center.dao.mfoyou.inf; import java.util.Date; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Param; import org.mfoyou.agent.common.dao.mfoyou.domain.MfoyouGoodsInfoExample; import org.mfoyou.agent.common.entity.AdminMainCount; import org.mfoyou.agent.common.entity.GoodsInfo; import org.mfoyou.agent.common.entity.MfoyouOrderStatic; import org.mfoyou.agent.common.entity.MfoyouServiceOrderStatic; import org.mfoyou.agent.common.entity.SearchStoreInfo; public interface MfoyouSystemMapper { Map<String, Object> select_item(String sql); List<Map<String, Object>> select_list(String sql); int update_item(String sql); List<Map<String, Object>> selectByExample(@Param("resultColumn") String resultColumn, @Param("tableName") String tableName, @Param("example") Object example); int countGoods(@Param("date") String date); Integer selectCount(); Integer getDayid(); List<GoodsInfo> selectGoodsByExample(@Param("example") MfoyouGoodsInfoExample example); List<SearchStoreInfo> selectStoreByExample(@Param("sKey") String sKey,@Param("lat")Double lat, @Param("lon")Double lon, @Param("sStart") Integer sStart,@Param("sLimit") Integer sLimit,@Param("agentId") Integer agentid); Integer selectSumGoods(@Param("storeId")Integer storeId); List<AdminMainCount> selectStatistics(); Integer relaseStore(); int modifyPower(@Param("userId")Integer userId,@Param("type")Integer type,@Param("power")Integer power); List<MfoyouOrderStatic> selectdate(@Param("userId")Integer userId,@Param("dayCount")Integer dayCount,@Param("type")Integer type); void unbindStation(@Param("stationId")Integer stationId); void updateMfoyoustoreInfo(@Param("userId")Integer userId, @Param("agentId")Integer agentId); List<MfoyouServiceOrderStatic> selectServiceStatistics(@Param("userId")int userId,@Param("type")int type, @Param("sDate")Date sDate,@Param("eDate")Date eDate); }
[ "15732677882@163.com" ]
15732677882@163.com
fb5c9d731efc5de063af406ead798d1b3fa9103a
bd9d3ca2abac11c45a281075f7c5af9302d76644
/base-dist-shop-portal/src/main/java/com/towcent/dist/shop/portal/share/vo/input/DistMemberCustomerCountIn.java
df2e7411583bb893a5f1539f1582e4dddbf6398a
[]
no_license
towcentTeam01/base-dist-shop
bf39c06541864949a7b981e07da67e8bad0df003
1f9f952f4afc14eb05e7d77e43b14c6adc84ba42
refs/heads/master
2020-04-08T18:18:10.585396
2018-11-29T06:57:49
2018-11-29T06:57:49
159,602,760
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
package com.towcent.dist.shop.portal.share.vo.input; import org.hibernate.validator.constraints.NotBlank; import com.towcent.dist.shop.portal.common.vo.BaseParam; import lombok.Data; /** * 4.0.3 客户管理汇总信息 * @author huangtao * @version 0.0.1 */ @Data public class DistMemberCustomerCountIn extends BaseParam { private static final long serialVersionUID = 1L; }
[ "taohuanga@163.com" ]
taohuanga@163.com
d565ec9e4a772eb32317a38dd5b0c54470f09feb
572ab44a5612fa7c48c1c3b29b5f4375f3b08ed1
/BIMfoBA.src/jsdai/SIfc4/AIfcsectionproperties.java
315427b18daada01e684bc7b830f3177c533db71
[]
no_license
ren90/BIMforBA
ce9dd9e5c0b8cfd2dbd2b84f3e2bcc72bc8aa18e
4a83d5ecb784b80a217895d93e0e30735dc83afb
refs/heads/master
2021-01-12T20:49:32.561833
2015-03-09T11:00:40
2015-03-09T11:00:40
24,721,790
0
0
null
null
null
null
UTF-8
Java
false
false
543
java
/* Generated by JSDAI Express Compiler, version 4.3.2, build 500, 2011-12-13 */ // Java class implementing aggregate of IfcSectionProperties of level 1 package jsdai.SIfc4; import jsdai.lang.*; public class AIfcsectionproperties extends AEntity { public EIfcsectionproperties getByIndex(int index) throws SdaiException { return (EIfcsectionproperties)getByIndexEntity(index); } public EIfcsectionproperties getCurrentMember(SdaiIterator iter) throws SdaiException { return (EIfcsectionproperties)getCurrentMemberObject(iter); } }
[ "renato.filipe.vieira@gmail.com" ]
renato.filipe.vieira@gmail.com
5b5116279aece1416b2366d8bb09cdc6b0bd6035
418069061994f4f23a07564665950960f6b1b281
/au.org.greekwelfaresa.idempiere.autogen.annotations/src/au/org/greekwelfaresa/idempiere/autogen/annotation/package-info.java
16b8699e53ecd14d0aef8e66a4705102d4c8019b
[]
no_license
greekwelfaresa/idempiere-autogen
fce4295391b6d4f2472ba720d7d74ce9cca7c095
8d51f58efd9648c79058e65ee7506fb4ed9fdea6
refs/heads/main
2023-01-05T19:31:35.743901
2020-10-28T23:03:30
2020-10-28T23:03:30
306,558,747
0
0
null
null
null
null
UTF-8
Java
false
false
177
java
@Version("1.0.0") @Export package au.org.greekwelfaresa.idempiere.autogen.annotation; import org.osgi.annotation.bundle.Export; import org.osgi.annotation.versioning.Version;
[ "fr.jkrieg@greekwelfaresa.org.au" ]
fr.jkrieg@greekwelfaresa.org.au
f1c9335edf12dfcbe2d7571659dc4ee6b7a34de5
b6d7f8baf5ab8474d29a85247d946fdd867128f2
/src/org/mvnsearch/intellij/plugins/rest/action/CreateSwaggerRestFile.java
355bbfdea6408f6399f3a4f9d2578055c515b750
[]
no_license
cn-src/rest-editor-client-contrib
eaa5c2046f12e35958f166da37e1945d2bea8185
56b29ec587ddb9da8d580cffb005c798eaf1adc1
refs/heads/master
2021-09-07T13:04:57.724404
2018-02-23T06:55:42
2018-02-23T06:55:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,103
java
package org.mvnsearch.intellij.plugins.rest.action; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.DataKeys; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.vfs.VirtualFile; import org.mvnsearch.intellij.plugins.rest.HttpCall; import java.io.IOException; import java.util.List; /** * create rest file for Swagger json * * @author linux_china */ public class CreateSwaggerRestFile extends AnAction { @Override public void actionPerformed(AnActionEvent e) { VirtualFile virtualFile = e.getData(DataKeys.VIRTUAL_FILE); if (virtualFile != null && virtualFile.getName().endsWith("-swagger.json")) { //parse swagger json and get http calls StringBuilder builder = new StringBuilder(); List<HttpCall> calls = SwaggerGenerator.getInstance().parseSwagger(virtualFile.getCanonicalPath()); for (HttpCall call : calls) { builder.append(call.toString()); builder.append("\n"); } //write content to rest virtual file ApplicationManager.getApplication().runWriteAction(() -> { try { String newFileName = virtualFile.getName().replace(".json", ".http"); VirtualFile directory = virtualFile.getParent(); VirtualFile httpFile = directory.createChildData(virtualFile, newFileName); httpFile.setBinaryContent(builder.toString().getBytes()); directory.refresh(true, false); } catch (IOException e1) { e1.printStackTrace(); } }); } } @Override public void update(AnActionEvent e) { VirtualFile virtualFile = e.getData(DataKeys.VIRTUAL_FILE); if (virtualFile != null && virtualFile.getName().endsWith("-swagger.json")) { getTemplatePresentation().setEnabled(true); } super.update(e); } }
[ "linux_china@hotmail.com" ]
linux_china@hotmail.com
2848fe25d5baeb0775f7cb54702603bd54022a79
1f12340d4049996aeed2d35b9d0134fee3bd3f4b
/fastrpc-demo/fastrpc-demo-api/src/main/java/com/fastrpc/demo/service/UserService.java
ac68833eba5d1a267746696899b91c398f1775c6
[]
no_license
Fi-Null/fastRpc
e66a1928d26989b3ab8ff2c2738cd6522c723609
49981bc72aad43627b701b6702d1266d201bf0c3
refs/heads/master
2021-06-11T23:23:32.496094
2019-09-11T02:14:23
2019-09-11T02:14:23
193,369,283
0
0
null
2021-06-07T18:30:01
2019-06-23T16:11:58
Java
UTF-8
Java
false
false
336
java
package com.fastrpc.demo.service; import com.fastrpc.demo.model.User; import java.util.List; /** * @ClassName UserService * @Description TODO * @Author xiangke * @Date 2019/7/3 23:08 * @Version 1.0 **/ public interface UserService { Long insert(User user); List<User> getUsers(int age); int update(User user); }
[ "xiangke@imdada.cn" ]
xiangke@imdada.cn
a207c427b17c3f4bd0b7ec535b3d0914d7fd1bf6
3a01015491c3ed8549a9a8b68665ceb4c5208199
/src/main/java/littleMaidMobX/LMM_EntityAISwimming.java
091c087a892bcb90463bfc3c61a6391c841d5b1b
[]
no_license
asiekierka/littleMaidMobX
a39acf6e04b7c1db74fa45670a5435f27c06bf13
e6da9e93fcb59ff4cafd41bf385b5bc0e9fab5df
refs/heads/master
2023-08-23T08:34:00.903616
2015-07-24T07:24:37
2015-07-24T07:24:37
38,424,062
13
7
null
2015-07-24T06:18:36
2015-07-02T09:36:09
Java
UTF-8
Java
false
false
682
java
package littleMaidMobX; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.ai.EntityAISwimming; public class LMM_EntityAISwimming extends EntityAISwimming { protected EntityLiving theEntity; public LMM_EntityAISwimming(EntityLiving par1EntityLiving) { super(par1EntityLiving); theEntity = par1EntityLiving; } @Override public boolean shouldExecute() { // 足がつくなら泳がない return (theEntity.getNavigator().noPath() ? (!theEntity.onGround || theEntity.isInsideOfMaterial(Material.water)) : theEntity.isInWater()) || theEntity.handleLavaMovement(); } }
[ "kontakt@asie.pl" ]
kontakt@asie.pl
6ab435e8fffcbaa0922364ed853f6c9125b2ec0c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/20/20_b41ae087aa3f7b655ec37d7da1960496f043c5cb/Weapon/20_b41ae087aa3f7b655ec37d7da1960496f043c5cb_Weapon_s.java
f087414bdbdfc2232f20100e3ec440cdde14d8a6
[]
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
1,838
java
package com.game.jetpack; public class Weapon { private int bulletsRemaining; private float damage; private float fireRate; private int type; private float bulletSpeed; public static int WEAPON_PISTOL = 0; public static int WEAPON_SHOTGUN = 1; public static int WEAPON_RIFLE = 2; public static int WEAPON_ROCKET = 3; public Weapon(int type) { super(); this.type = type; assignWeaponProperties(type); } private void assignWeaponProperties(int type) { if(type == WEAPON_PISTOL) { this.bulletsRemaining = 1; this.damage = 10; this.fireRate = 0.5f; this.bulletSpeed = 30; } else if(type == WEAPON_SHOTGUN) { this.bulletsRemaining = 25; this.damage = 15; this.fireRate = 2.0f; this.bulletSpeed = 17; } else if(type == WEAPON_RIFLE) { this.bulletsRemaining = 50; this.damage = 8.0f; this.fireRate = 0.1f; this.bulletSpeed = 30; } else if(type == WEAPON_ROCKET) { this.bulletsRemaining = 15; this.damage = 25f; this.fireRate = 2.5f; this.bulletSpeed = 17; } } public void fire() { if(type != WEAPON_PISTOL) { bulletsRemaining--; } if(bulletsRemaining <= 0) { setType(WEAPON_PISTOL); } } public float getDamage() { return damage; } public void setDamage(float damage) { this.damage = damage; } public float getFireRate() { return fireRate; } public void setFireRate(float fireRate) { this.fireRate = fireRate; } public int getType() { return type; } public void setType(int type) { this.type = type; assignWeaponProperties(type); } public float getBulletSpeed() { return bulletSpeed; } public void setBulletSpeed(float bulletSpeed) { this.bulletSpeed = bulletSpeed; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
fb5d8d8a6d726776078d50548a278e89a244675b
d36d5ba4d8d1df1ad4494c94bd39252e128c5b5b
/com.jaspersoft.studio/src/com/jaspersoft/studio/editor/expression/IExpressionContextSetter.java
40c73ac39a81c615e92e06f248bb6ee77c8c49c2
[]
no_license
xviakoh/jaspersoft-xvia-plugin
6dfca36eb27612f136edc4c206e631d8dd8470f0
c037a0568a518e858a201fda257a8fa416af3908
refs/heads/master
2021-01-01T19:35:32.905460
2015-06-18T15:21:11
2015-06-18T15:21:11
37,666,261
0
0
null
null
null
null
UTF-8
Java
false
false
1,318
java
/******************************************************************************* * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved. * http://www.jaspersoft.com. * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ package com.jaspersoft.studio.editor.expression; /** * Interface shared among different kind of classes that need * a setter method for an expression context information. * * @author Massimo Rabbi (mrabbi@users.sourceforge.net) * */ public interface IExpressionContextSetter { /** * Sets the expression context. * * <p> * Internal state of the interested class should be updated inside this method. * For example a complex widget that implements this interface should take care * of propagating the update of the expression context to its internal widgets too. * * @param expContext the new expression context */ void setExpressionContext(ExpressionContext expContext); }
[ "kyungseog.oh@trackvia.com" ]
kyungseog.oh@trackvia.com
c1658864e42cbe889d15cda0a348af42f61e7412
90c40b17b2b09e53bbb14946a5c07296bc72fd6f
/ThreadDemo/src/com/xingen/threaddemo/designmode/ProducerThread.java
71ad9a7a22e940241c28898e2306dabc3733e0f1
[]
no_license
13767004362/JavaTraining
5f75165b024c55cb1c87bba45ee779bbf0121d43
f897994217cafff8c4d430942125450c4dd2cbd2
refs/heads/master
2021-06-18T16:03:31.263165
2021-04-07T02:27:53
2021-04-07T02:27:53
195,752,050
0
0
null
null
null
null
UTF-8
Java
false
false
856
java
package com.xingen.threaddemo.designmode; /** * 生产线程 */ public class ProducerThread implements Runnable { private static final String TAG=ProducerThread.class.getSimpleName(); private ProductHandler product; public ProducerThread(ProductHandler product) { this.product = product; } @Override public void run() { try { Thread.currentThread().setName(TAG); for (int i=0;i<10;++i){ product.producer(createProduct(i+1)); } }catch (Exception e){ e.printStackTrace(); } } private String createProduct(int i){ StringBuffer stringBuffer=new StringBuffer(); stringBuffer.append("第"); stringBuffer.append(i); stringBuffer.append("个产品"); return stringBuffer.toString(); } }
[ "13767004362@163.com" ]
13767004362@163.com