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
cd3ea94528f8f4ec09aa48cb43fa82f9585a6402
5a4d7a23e849b5b4d6b201f9a8c07a6ba2817455
/br.com.calculadora/src/test/java/br/com/calculadora/teste/CalculadoraTest.java
fcf695411489dc558e8f567bbaa7811d84d52eb2
[]
no_license
MatheusLB/aula_testJava
0654052d74d3daaa20733245dd0d40a37f1c3edc
e181baadf0b47634f5bfd53e9d3d913b30162fea
refs/heads/master
2022-12-29T23:23:34.523728
2020-10-19T12:34:36
2020-10-19T12:34:36
295,150,590
0
0
null
null
null
null
UTF-8
Java
false
false
410
java
package br.com.calculadora.teste; import static org.junit.Assert.*; import org.junit.Test; import br.com.calculadora.Calculadora; public class CalculadoraTest { @Test public void testSomar() { Calculadora calc = new Calculadora(); int soma = calc.somar("1+1+3"); assertEquals(5, soma); } @Test public void testeSomarMock() { //Calculadora calc = mock (Calculadora.class); } }
[ "you@example.com" ]
you@example.com
3412a4449ab86563391113a946e79e113e2a3b5c
53e1530d418dcda795cd140db4d736a65695f37b
/IdeaProjects/src/part2/chapter26/CardLayoutDemo.java
a1f757243ebb43aad247762a42414c0544f5a2f5
[]
no_license
Zed180881/Zed_repo
a03bac736e3c61c0bea61b2f81624c4bc604870b
6e9499e7ec3cfa9dc11f9d7a92221522c56b5f61
refs/heads/master
2020-04-05T18:57:47.596468
2016-11-02T07:51:30
2016-11-02T07:51:30
52,864,144
0
0
null
null
null
null
UTF-8
Java
false
false
2,035
java
package part2.chapter26; import java.applet.Applet; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; public class CardLayoutDemo extends Applet implements ActionListener, MouseListener { Checkbox windowsXP, windows7, windows8, android, solaris, mac; Panel osCards; CardLayout cardLO; Button win, other; @Override public void init() { win = new Button("Windows"); other = new Button("Other"); add(win); add(other); cardLO = new CardLayout(); osCards = new Panel(); osCards.setLayout(cardLO); windowsXP = new Checkbox("Windows XP", null, true); windows7 = new Checkbox("Windows 7", null, false); windows8 = new Checkbox("Windows 8", null, false); android = new Checkbox("Android"); solaris = new Checkbox("Solaris"); mac = new Checkbox("Mac OS"); Panel winPan = new Panel(); winPan.add(windowsXP); winPan.add(windows7); winPan.add(windows8); Panel otherPan = new Panel(); otherPan.add(android); otherPan.add(solaris); otherPan.add(mac); osCards.add(winPan, "Windows"); osCards.add(otherPan, "Other"); add(osCards); win.addActionListener(this); other.addActionListener(this); addMouseListener(this); } @Override public void actionPerformed(ActionEvent e) { if (e.getSource() == win) cardLO.show(osCards, "Windows"); else cardLO.show(osCards, "Other"); } @Override public void mouseClicked(MouseEvent e) { } @Override public void mousePressed(MouseEvent e) { cardLO.next(osCards); } @Override public void mouseReleased(MouseEvent e) { } @Override public void mouseEntered(MouseEvent e) { } @Override public void mouseExited(MouseEvent e) { } }
[ "zed180881@gmail.com" ]
zed180881@gmail.com
92dfdb7bc4e7227f4f3cd18d18de7f61de6275e7
b7d00d4cce06fd692aa3b45d9fd269b61c7b4421
/ajah-html/src/main/java/com/ajah/html/element/CData.java
9faa4de41298482de7dd8260e82fa22901d8fff6
[ "Apache-2.0" ]
permissive
efsavage/ajah
6aeb210230b91e43418909df7ceae23a3aa72be0
8d6c0233061a185194c742c58b6b4158210dc23d
refs/heads/master
2022-10-04T13:15:34.548378
2020-02-12T03:18:15
2020-02-12T03:18:15
1,445,299
2
2
Apache-2.0
2022-09-01T22:57:08
2011-03-06T04:00:15
Java
UTF-8
Java
false
false
1,480
java
/* * Copyright 2011 Eric F. Savage, code@efsavage.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.ajah.html.element; import java.io.IOException; import java.io.Writer; import lombok.Data; import lombok.EqualsAndHashCode; import com.ajah.html.HtmlElement; /** * CDATA (text) element * * @author <a href="http://efsavage.com">Eric F. Savage</a>, <a * href="mailto:code@efsavage.com">code@efsavage.com</a>. * */ @Data @EqualsAndHashCode() public class CData implements HtmlElement<CData> { private String value; /** * Creates a text element for a string. * * @param value * The text to render. */ public CData(final String value) { this.value = value; } /** * Writes the value attribute. * * @see com.ajah.html.HtmlElement#render(java.io.Writer, int) */ @Override public void render(final Writer out, final int depth) throws IOException { out.write(this.value); } }
[ "code@efsavage.com" ]
code@efsavage.com
1e57241fc733b5c921b77cf21bb5ce47ea2da247
842a417608acb4e324ab3301b5d6ddfb72ec6d3c
/app/src/main/java/com/kingja/trainingday/util/Sp.java
34a44544e8c05145e1c19bec6507d1868ae34112
[]
no_license
KingJA/TrainingDay
fb60b108beaad1c21f624359f8527ee12a7681a1
f8fc7eb25233bea6dc1b1d4ae2f8b14fdc3aa74e
refs/heads/master
2021-01-23T10:07:51.013091
2017-06-20T09:12:11
2017-06-20T09:12:11
93,040,398
0
0
null
null
null
null
UTF-8
Java
false
false
1,956
java
package com.kingja.trainingday.util; import android.content.Context; import android.content.SharedPreferences; /** * Description:TODO * Create Time:2017/6/15 15:56 * Author:KingJA * Email:kingjavip@gmail.com */ public class Sp { private static Sp mInstance; private final SharedPreferences mSp; private Sp(Context context) { mSp = context.getApplicationContext().getSharedPreferences(Constants.SHAREDPREFERENCES_NAME, Context .MODE_PRIVATE); } public static Sp getInstance(Context context) { if (mInstance == null) { synchronized (Sp.class) { if (mInstance == null) { mInstance = new Sp(context); } } } return mInstance; } public void putData(String key, Object data) { if (data instanceof Boolean) { mSp.edit().putBoolean(key, (Boolean) data).apply(); } else if (data instanceof String) { mSp.edit().putString(key, (String) data).apply(); } else if (data instanceof Integer) { mSp.edit().putInt(key, (Integer) data).apply(); } else if (data instanceof Float) { mSp.edit().putFloat(key, (Float) data).apply(); } else if (data instanceof Long) { mSp.edit().putLong(key, (Long) data).apply(); } } public Object getData(String key, Object defautData) { if (defautData instanceof Boolean) { return mSp.getBoolean(key, (Boolean) defautData); } else if (defautData instanceof String) { return mSp.getString(key, (String) defautData); } else if (defautData instanceof Integer) { return mSp.getInt(key, (Integer) defautData); } else if (defautData instanceof Float) { return mSp.getFloat(key, (Float) defautData); } else { return mSp.getLong(key, (long) defautData); } } }
[ "kingjavip@gmail.com" ]
kingjavip@gmail.com
23c198f31fd84e94fa4fd030709e41426cbacd22
964601fff9212bec9117c59006745e124b49e1e3
/matos-android/src/main/java/com/android/internal/telephony/gsm/SimSmsInterfaceManager.java
293a8f20849417115b1bf0b6518a6283e0926b08
[ "Apache-2.0" ]
permissive
vadosnaprimer/matos-profiles
bf8300b04bef13596f655d001fc8b72315916693
fb27c246911437070052197aa3ef91f9aaac6fc3
refs/heads/master
2020-05-23T07:48:46.135878
2016-04-05T13:14:42
2016-04-05T13:14:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,755
java
package com.android.internal.telephony.gsm; /* * #%L * Matos * $Id:$ * $HeadURL:$ * %% * Copyright (C) 2010 - 2014 Orange SA * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ public class SimSmsInterfaceManager extends com.android.internal.telephony.IccSmsInterfaceManager{ // Constructors public SimSmsInterfaceManager(GSMPhone arg1, com.android.internal.telephony.SMSDispatcher arg2){ super((com.android.internal.telephony.PhoneBase) null); } // Methods protected void finalize(){ } protected void log(java.lang.String arg1){ } public void dispose(){ } public java.util.List<com.android.internal.telephony.SmsRawData> getAllMessagesFromIccEf(){ return (java.util.List) null; } public boolean updateMessageOnIccEf(int arg1, int arg2, byte [] arg3){ return false; } public boolean copyMessageToIccEf(int arg1, byte [] arg2, byte [] arg3){ return false; } public boolean enableCellBroadcast(int arg1){ return false; } public boolean disableCellBroadcast(int arg1){ return false; } public boolean enableCellBroadcastRange(int arg1, int arg2){ return false; } public boolean disableCellBroadcastRange(int arg1, int arg2){ return false; } }
[ "pierre.cregut@orange.com" ]
pierre.cregut@orange.com
539f1a1154458b96b01cbeb1db47d20dcf7afe45
d67559f81c2abf49ca17fcc2b97f6e6a0067d196
/src/com/preparation/common/graph/ShortestReach.java
56487492f94756ae3f5cad29321a22de17e9c142
[]
no_license
amanjadon54/AlgorithmsDS
94ea64d560626e6f1077fb8e64f3cd0960b45cfd
a9415e2812b35c2e7f61aa8b567f9218ccc062ad
refs/heads/master
2022-07-19T03:56:21.886028
2020-05-21T11:01:00
2020-05-21T11:01:00
265,825,670
0
0
null
null
null
null
UTF-8
Java
false
false
3,775
java
package com.preparation.common.graph; import java.io.IOException; import java.util.*; public class ShortestReach { // Complete the bfs function below. static class Node { int data; int level; public Node(int data, int level) { this.data = data; this.level = level; } } static HashMap<Integer, HashSet<Integer>> history; static int[] bfs(int n, int m, int[][] edges, int s) { history = new HashMap<>(); int values[] = new int[n]; for (int i = 0; i < edges.length; i++) { add(edges[i][0], edges[i][1]); } HashMap<Integer, Boolean> visited = new HashMap(); Queue<Node> queue = new LinkedList(); for (int i = 0; i < n; i++) { values[i] = -1; } values[s - 1] = 0; if (!history.containsKey(s)) { return values; } Node sourceNode = new Node(s, 0); queue.add(sourceNode); while (!queue.isEmpty()) { Node poll = queue.poll(); if (!visited.containsKey(poll.data)) { visited.put(poll.data, true); values[poll.data - 1] = 6 * poll.level; if (history.containsKey(poll.data)) { int i = 0; HashSet<Integer> set = history.get(poll.data); for(Integer setValue: set){ if(setValue>m){ i++; continue; } Node tempNode = new Node(setValue, poll.level + 1); queue.add(tempNode); i++; } } } } int[] result = new int[values.length - 1]; int j = 0; for (int i : values) { if (i != 0) { result[j] = i; j++; } } return result; } public static void add(int s, int t) { if (history.containsKey(s)) { history.get(s).add(t); } else { HashSet<Integer> set = new HashSet<>(); set.add(t); history.put(s, set); } if (history.containsKey(t)) { history.get(t).add(s); } else { HashSet<Integer> set = new HashSet(); set.add(s); history.put(t, set); } } private static final Scanner scanner = new Scanner(System.in); public static void main(String[] args) throws IOException { int q = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); for (int qItr = 0; qItr < q; qItr++) { String[] nm = scanner.nextLine().split(" "); int n = Integer.parseInt(nm[0]); int m = Integer.parseInt(nm[1]); int[][] edges = new int[m][2]; for (int i = 0; i < m; i++) { String[] edgesRowItems = scanner.nextLine().split(" "); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); for (int j = 0; j < 2; j++) { int edgesItem = Integer.parseInt(edgesRowItems[j]); edges[i][j] = edgesItem; } } int s = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); int[] result = bfs(n, m, edges, s); for (int i = 0; i < result.length; i++) { System.out.println(String.valueOf(result[i])); if (i != result.length - 1) { System.out.print(" "); } } System.out.println(); } scanner.close(); } }
[ "amanjadon54@gmail.com" ]
amanjadon54@gmail.com
b5605c81706d04479541298620a5736ee0edf423
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
/flakiness-predicter/input_data/original_tests/activiti-activiti/nonFlakyMethods/org.activiti.engine.test.api.history.HistoryServiceTest-testHistoricProcessInstanceQueryByDeploymentId.java
8e42f2413693d3730a3bc177270b3e0f1fa053ed
[ "BSD-3-Clause" ]
permissive
Taher-Ghaleb/FlakeFlagger
6fd7c95d2710632fd093346ce787fd70923a1435
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
refs/heads/main
2023-07-14T16:57:24.507743
2021-08-26T14:50:16
2021-08-26T14:50:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,200
java
@Deployment(resources={"org/activiti/engine/test/api/oneTaskProcess.bpmn20.xml","org/activiti/engine/test/api/runtime/oneTaskProcess2.bpmn20.xml"}) public void testHistoricProcessInstanceQueryByDeploymentId(){ org.activiti.engine.repository.Deployment deployment=repositoryService.createDeploymentQuery().singleResult(); HashSet<String> processInstanceIds=new HashSet<String>(); for (int i=0; i < 4; i++) { processInstanceIds.add(runtimeService.startProcessInstanceByKey("oneTaskProcess",i + "").getId()); } processInstanceIds.add(runtimeService.startProcessInstanceByKey("oneTaskProcess2","1").getId()); HistoricProcessInstanceQuery processInstanceQuery=historyService.createHistoricProcessInstanceQuery().deploymentId(deployment.getId()); assertEquals(5,processInstanceQuery.count()); assertEquals(deployment.getId(),processInstanceQuery.list().get(0).getDeploymentId()); List<HistoricProcessInstance> processInstances=processInstanceQuery.list(); assertNotNull(processInstances); assertEquals(5,processInstances.size()); processInstanceQuery=historyService.createHistoricProcessInstanceQuery().deploymentId("invalid"); assertEquals(0,processInstanceQuery.count()); }
[ "aalsha2@masonlive.gmu.edu" ]
aalsha2@masonlive.gmu.edu
ce16811dcec5d92acaa1c6bc771a8299ae28cded
6f64fc10e47395e66269524bbc74d94dcc288e5d
/src/main/java/com/jhon/service/BuyerService.java
bd7cf688f9cc7c1aee40ebd7faaab16ff0a3d8fa
[]
no_license
YuJhon/Rain-Seller
3886ee4cb1bf24146c728747b39fa16254a9a1d1
61087b7e6de3c4a6ed6a70caff7705ea4c143706
refs/heads/master
2021-07-23T07:27:32.561607
2017-11-02T02:58:27
2017-11-02T02:58:27
109,209,001
0
0
null
null
null
null
UTF-8
Java
false
false
560
java
package com.jhon.service; import com.jhon.dto.OrderDTO; /** * <p>功能描述</br> 买家业务逻辑接口定义 </p> * * @author jiangy19 * @version v1.0 * @FileName BuyerService * @date 2017/9/14 19:30 */ public interface BuyerService { /** * 查询唯一的订单 * @param openid 买家的微信openId * @param orderId 订单Id * @return */ OrderDTO findOrderOne(String openid, String orderId); /** * 取消订单操作 * @param openid * @param orderId * @return */ OrderDTO cancleOrder(String openid, String orderId); }
[ "3291371805@qq.com" ]
3291371805@qq.com
1da56993f04d09559f2c789b1f20f9092d0433b6
41763feae5c326dcfd36b75ed23a27ed5ee3e4a8
/src/main/java/com/online/dao/impl/RawMeterialsUnitConfigDaoImpl.java
0aa9c526b64f0fde489ff7c5f4460a5f81296873
[]
no_license
aner47/online
a7d53c8e7e6d72065c129a31d2e4ba5614c96e94
9ad7c285e170e6d5642c86eab95f657e9e23f4d7
refs/heads/master
2020-04-27T11:19:41.111136
2019-03-07T07:36:03
2019-03-07T07:36:03
174,291,169
0
0
null
null
null
null
UTF-8
Java
false
false
446
java
package com.online.dao.impl; import org.springframework.stereotype.Repository; import com.online.dao.RawMeterialsUnitConfigDao; import com.online.entity.online.RawMeterialsUnitConfig; /** * * @author 左志平 * * dao-原辅料单位配置实现 * */ @Repository("rawMeterialsUnitConfigDaoImpl") public class RawMeterialsUnitConfigDaoImpl extends BaseDaoImpl<RawMeterialsUnitConfig, Integer> implements RawMeterialsUnitConfigDao { }
[ "zyq_glb@hqevn.com" ]
zyq_glb@hqevn.com
96ce226dbfc0a1794c98783924fb3d0d13e39218
c6d08841e420751579f0b302167c9e4a30246288
/source/src/com/Banjo226/commands/server/CoreCommand.java
6d76fe8a82071ed1f468c85fe57be77a242f1566
[ "MIT" ]
permissive
Banjo-226/bottom-line
23c72ee4bb61de9e4689cb6a51e948970175ccd8
59529f63d3d7d18717d31ba27bff97ea062f269d
refs/heads/master
2021-06-09T00:46:27.561447
2017-09-12T08:03:51
2017-09-12T08:03:51
47,732,943
3
5
null
2017-09-12T07:58:57
2015-12-10T02:35:03
Java
UTF-8
Java
false
false
650
java
package com.Banjo226.commands.server; import java.util.List; import org.bukkit.command.CommandSender; public abstract class CoreCommand { private String name, desc, args; private List<String> aliases; public CoreCommand(String name, String desc, String args, List<String> aliases) { this.name = name; this.desc = desc; this.args = args; this.aliases = aliases; } public String getName() { return name; } public String getDescription() { return desc; } public String getArgs() { return args; } public List<String> getAliases() { return aliases; } public abstract void run(CommandSender sender, String[] args); }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
545dca094ee931c5fccaecfdfdc07ea0fd4194c0
6f05f7d5a67b6bb87956a22b988067ec772ba966
/data/train/java/733f67377a23b9d65082686821e2f23cb04becdbServiceModuleTest.java
733f67377a23b9d65082686821e2f23cb04becdb
[ "MIT" ]
permissive
harshp8l/deep-learning-lang-detection
93b6d24a38081597c610ecf9b1f3b92c7d669be5
2a54293181c1c2b1a2b840ddee4d4d80177efb33
refs/heads/master
2020-04-07T18:07:00.697994
2018-11-29T23:21:23
2018-11-29T23:21:23
158,597,498
0
0
MIT
2018-11-21T19:36:42
2018-11-21T19:36:41
null
UTF-8
Java
false
false
1,392
java
package com.thoughtworks.yak; import org.junit.Test; import static org.hamcrest.CoreMatchers.nullValue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; public class ServiceModuleTest { @Test public void shouldBeAbleToGetAddedService() throws Exception { ServiceModule serviceModule = new ServiceModule() { @Override protected void configure() { addService(TestService.class).implementedBy(TestServiceProvider.class); } }; serviceModule.initialize(); ServiceDefinition<TestService> serviceDefinition = serviceModule.getService(TestService.class, null); assertEquals(serviceDefinition.getServiceProvider(), TestServiceProvider.class); } @Test public void shouldNotGetServiceBeforeInitialize() throws Exception { ServiceModule serviceModule = new ServiceModule() { @Override protected void configure() { addService(TestService.class).implementedBy(TestServiceProvider.class); } }; ServiceDefinition<TestService> serviceDefinition = serviceModule.getService(TestService.class, null); assertThat(serviceDefinition, nullValue()); } public interface TestService { } public static class TestServiceProvider implements TestService { } }
[ "aliostad+github@gmail.com" ]
aliostad+github@gmail.com
778523a588c5daeae6d14065efbdf481e8e5f8d1
c164d8f1a6068b871372bae8262609fd279d774c
/src/main/java/edu/uiowa/slis/VIVOISF/BFO_0000002/BFO_0000002NationalityEN.java
93de4fbcacd3e0b602327415e4d8d806f01af70e
[ "Apache-2.0" ]
permissive
eichmann/VIVOISF
ad0a299df177d303ec851ff2453cbcbd7cae1ef8
e80cd8b74915974fac7ebae8e5e7be8615355262
refs/heads/master
2020-03-19T03:44:27.662527
2018-06-03T22:44:58
2018-06-03T22:44:58
135,757,275
0
1
null
null
null
null
UTF-8
Java
false
false
1,001
java
package edu.uiowa.slis.VIVOISF.BFO_0000002; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; @SuppressWarnings("serial") public class BFO_0000002NationalityEN extends edu.uiowa.slis.VIVOISF.TagLibSupport { static BFO_0000002NationalityEN currentInstance = null; private static final Log log = LogFactory.getLog(BFO_0000002NationalityEN.class); // non-functional property public int doStartTag() throws JspException { try { BFO_0000002NationalityENIterator theBFO_0000002 = (BFO_0000002NationalityENIterator)findAncestorWithClass(this, BFO_0000002NationalityENIterator.class); pageContext.getOut().print(theBFO_0000002.getNationalityEN()); } catch (Exception e) { log.error("Can't find enclosing BFO_0000002 for nationalityEN tag ", e); throw new JspTagException("Error: Can't find enclosing BFO_0000002 for nationalityEN tag "); } return SKIP_BODY; } }
[ "david-eichmann@uiowa.edu" ]
david-eichmann@uiowa.edu
9cc9b0218959fef619f0e4814b8e4b6e7d8d66e4
b9c27fd24be992cde75c4ec1bf61fdf2d5ac11b5
/platform-camel/ihe/mllp/src/main/java/org/openehealth/ipf/platform/camel/ihe/mllp/iti30/Iti30Component.java
8f32f0a299a99f8ab41066592607d445cc7a914b
[ "Apache-2.0" ]
permissive
JurrianFahner/ipf
5d7affbc9abc41d56e5875bd0786a3810873373b
ddc1e3c2166c0d04038984d9c7dfd63fe91bdb76
refs/heads/master
2021-03-16T14:53:49.424251
2020-03-09T15:28:07
2020-03-09T15:28:07
146,447,201
0
0
Apache-2.0
2018-08-28T12:53:31
2018-08-28T12:53:30
null
UTF-8
Java
false
false
3,029
java
/* * Copyright 2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openehealth.ipf.platform.camel.ihe.mllp.iti30; import org.apache.camel.CamelContext; import org.openehealth.ipf.commons.ihe.core.TransactionOptionsUtils; import org.openehealth.ipf.commons.ihe.hl7v2.Hl7v2TransactionOptions; import org.openehealth.ipf.commons.ihe.hl7v2.Hl7v2TransactionOptionsProvider; import org.openehealth.ipf.commons.ihe.hl7v2.audit.FeedAuditDataset; import org.openehealth.ipf.commons.ihe.hl7v2.options.Iti30OptionsProvider; import org.openehealth.ipf.commons.ihe.hl7v2.options.Iti30Options; import org.openehealth.ipf.platform.camel.ihe.mllp.core.MllpTransactionComponent; import org.openehealth.ipf.platform.camel.ihe.mllp.core.MllpTransactionEndpointConfiguration; import java.util.List; import java.util.Map; import static org.openehealth.ipf.commons.ihe.hl7v2.PAM.Interactions.ITI_30; /** * Camel component for ITI-30 (Patient Identity Management). * The endpoints take an additional parameter "options", that refer to the * transaction options as specified in {@link Iti30Options} that need to be supported. * You can also provide different options specified by an additional parameter "optionsProvider". * * @author Christian Ohr */ public class Iti30Component extends MllpTransactionComponent<FeedAuditDataset> { public Iti30Component() { super(ITI_30); } public Iti30Component(CamelContext camelContext) { super(camelContext, ITI_30); } @Override protected MllpTransactionEndpointConfiguration createConfig(String uri, Map<String, Object> parameters) throws Exception { MllpTransactionEndpointConfiguration config = super.createConfig(uri, parameters); Hl7v2TransactionOptionsProvider<FeedAuditDataset, ? extends Hl7v2TransactionOptions> optionsProvider = getAndRemoveOrResolveReferenceParameter(parameters, "optionsProvider", Hl7v2TransactionOptionsProvider.class, new Iti30OptionsProvider()); String options = getAndRemoveParameter(parameters, "options", String.class, optionsProvider.getDefaultOption().name()); List<? extends Hl7v2TransactionOptions> iti30Options = TransactionOptionsUtils.split(options, Iti30Options.class); if (iti30Options.isEmpty()) { throw new IllegalArgumentException("Options parameter for pam-iti30 is invalid"); } getInteractionId().init(optionsProvider, iti30Options); return config; } }
[ "christian.ohr@gmail.com" ]
christian.ohr@gmail.com
953363da3959d32d7255a4384993a74c42a305ff
a4178e5042f43f94344789794d1926c8bdba51c0
/iwxxm2Converter/src/test/resources/iwxxm/3.1/output/aero/aixm/schema/_5_1/RadarComponentPropertyType.java
3347fe5b7954f2b42fb0efe67a9ca2963c1aa963
[ "Apache-2.0" ]
permissive
moryakovdv/iwxxmConverter
c6fb73bc49765c4aeb7ee0153cca04e3e3846ab0
5c2b57e57c3038a9968b026c55e381eef0f34dad
refs/heads/master
2023-07-20T06:58:00.317736
2023-07-05T10:10:10
2023-07-05T10:10:10
128,777,786
11
7
Apache-2.0
2023-07-05T10:03:12
2018-04-09T13:38:59
Java
UTF-8
Java
false
false
2,164
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2019.05.06 at 11:11:25 PM MSK // package aero.aixm.schema._5_1; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for RadarComponentPropertyType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="RadarComponentPropertyType"> * &lt;complexContent> * &lt;extension base="{http://www.aixm.aero/schema/5.1.1}AbstractAIXMPropertyType"> * &lt;sequence> * &lt;element ref="{http://www.aixm.aero/schema/5.1.1}RadarComponent"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RadarComponentPropertyType", propOrder = { "radarComponent" }) public class RadarComponentPropertyType extends AbstractAIXMPropertyType { @XmlElement(name = "RadarComponent", required = true) protected RadarComponentType radarComponent; /** * Gets the value of the radarComponent property. * * @return * possible object is * {@link RadarComponentType } * */ public RadarComponentType getRadarComponent() { return radarComponent; } /** * Sets the value of the radarComponent property. * * @param value * allowed object is * {@link RadarComponentType } * */ public void setRadarComponent(RadarComponentType value) { this.radarComponent = value; } public boolean isSetRadarComponent() { return (this.radarComponent!= null); } }
[ "moryakovdv@gmail.com" ]
moryakovdv@gmail.com
30fff0b461df09181899f1b343f9d795586cf418
258a8585ed637342645b56ab76a90a1256ecbb45
/Folitics/src/main/java/com/ohmuk/folitics/hibernate/entity/verdict/lookup/AgeGroup.java
b11e8fc1f490b6c61befe1da051c2b468c8e251f
[]
no_license
exatip407/folitics
06e899aae2dbfdeda981c40c0ce578d223979568
aff3392e09c35f5f799e3fb1c4534b5343a22f01
refs/heads/master
2021-01-01T16:23:14.684470
2017-07-20T10:27:08
2017-07-20T10:27:08
97,819,592
0
0
null
null
null
null
UTF-8
Java
false
false
1,402
java
package com.ohmuk.folitics.hibernate.entity.verdict.lookup; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import javax.validation.constraints.NotNull; /** * Entity class for Age Groups * @author Abhishek * */ @Entity @Table(name = "agegroup") public class AgeGroup implements Serializable { /** * */ private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(nullable = false) @NotNull(message = "error.ageGroup.startAge.notNull") private Integer startAge; @Column(nullable = false) @NotNull(message = "error.ageGroup.endAge.notNull") private Integer endAge; public AgeGroup() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Integer getStartAge() { return startAge; } public void setStartAge(Integer startAge) { this.startAge = startAge; } public Integer getEndAge() { return endAge; } public void setEndAge(Integer endAge) { this.endAge = endAge; } }
[ "gautam@exatip.com" ]
gautam@exatip.com
60236bbe10fd1d074803ba6cfc5e1085339c4210
6e86574300d67ebd23ffefd09210286dc71761a0
/src/src/net/idtoki/instelec/model/LineaspartePeer.java
55af3aa02bed408bb1b47e1ffc25d647911f2675
[]
no_license
esle-elkartea/lankidetza00017
7dacf5b178c8d822ceffece30aefdc2f94770de6
d1106c83af5c36c925b0b89edf600afd3096ccc9
refs/heads/master
2021-01-20T17:58:17.300668
2016-06-24T12:12:36
2016-06-24T12:12:36
61,881,929
0
0
null
null
null
null
UTF-8
Java
false
false
434
java
package net.idtoki.instelec.model; /** * The skeleton for this class was autogenerated by Torque on: * * [Thu Aug 10 13:35:35 CEST 2006] * * You should add additional methods to this class to meet the * application requirements. This class will only be generated as * long as it does not already exist in the output directory. */ public class LineaspartePeer extends net.idtoki.instelec.model.BaseLineaspartePeer { }
[ "noreply@esle.eu" ]
noreply@esle.eu
38d7dcfef5525174cc9f528e4b23324bf7ccc611
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/101/org/apache/commons/math/stat/regression/SimpleRegression_getN_181.java
67fbb4bb66212173bd04c791a2551d460abe431a
[]
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
1,201
java
org apach common math stat regress estim ordinari squar regress model independ variabl code intercept slope code standard error code intercept code code slope code anova squar pearson' statist observ pair ad model time provid dimension arrai observ store memori limit number observ ad model strong usag note strong fewer observ model variat valu valu statist code nan code observ coordin requr estim bivari regress model getter statist comput valu base current set observ statist add data updat statist instanc comput method updat statist getter perform comput request statist version revis date simpl regress simpleregress serializ return number observ ad model number observ ad getn
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
334c6acb1f40c76521565f2fe57d8e072ae93c22
fb7cfbc4a914ba3f27344a3fe85db601a21dd57e
/app/src/main/java/com/yj/robust/model/SettlementCartEntity.java
f08d6aa866638f5fab15bf9855216c901e4cb33d
[]
no_license
zhouxiang130/Robust
f163d68a2e00bee72a985ee6cebe37a8131e2c0d
fb1faf755d4dd6aab267960a95bf9aea00d8c6b0
refs/heads/master
2020-07-14T15:16:51.019563
2019-09-08T13:00:10
2019-09-08T13:00:10
205,341,732
0
0
null
null
null
null
UTF-8
Java
false
false
5,506
java
package com.yj.robust.model; import java.util.List; /** * Created by Suo on 2018/3/26. */ public class SettlementCartEntity { private String code; private String msg; private SettlementCartData data; public final String HTTP_OK = "200"; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public SettlementCartData getData() { return data; } public void setData(SettlementCartData data) { this.data = data; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public class SettlementCartData { private String addressDefault; private String receiverTel; private String productTotal; private String orderTotalMoney; private String areaDetail; private String receiverName; private String addressId; private String userMoney; private String postage; private String systemValue; private List<SettlementCartItem> proArray; private List<CouponsBean> coupons; public class CouponsBean { /** * couponName : 满100.0可用,当前可抵扣10.0元 * couponType : 2 * couponRequire : 100 * faceValue : 10 * couponDiscount : * userCouponId : 520 * faceValueZk : 100 */ private String couponName; private int couponType; private String couponRequire; private String faceValue; private String couponDiscount; private int userCouponId; private String faceValueZk; public String getCouponName() { return couponName; } public void setCouponName(String couponName) { this.couponName = couponName; } public int getCouponType() { return couponType; } public void setCouponType(int couponType) { this.couponType = couponType; } public String getCouponRequire() { return couponRequire; } public void setCouponRequire(String couponRequire) { this.couponRequire = couponRequire; } public String getFaceValue() { return faceValue; } public void setFaceValue(String faceValue) { this.faceValue = faceValue; } public String getCouponDiscount() { return couponDiscount; } public void setCouponDiscount(String couponDiscount) { this.couponDiscount = couponDiscount; } public int getUserCouponId() { return userCouponId; } public void setUserCouponId(int userCouponId) { this.userCouponId = userCouponId; } public String getFaceValueZk() { return faceValueZk; } public void setFaceValueZk(String faceValueZk) { this.faceValueZk = faceValueZk; } } public List<CouponsBean> getCoupons() { return coupons; } public void setCoupons(List<CouponsBean> coupons) { this.coupons = coupons; } public String getAddressDefault() { return addressDefault; } public void setAddressDefault(String addressDefault) { this.addressDefault = addressDefault; } public String getAddressId() { return addressId; } public void setAddressId(String addressId) { this.addressId = addressId; } public String getAreaDetail() { return areaDetail; } public void setAreaDetail(String areaDetail) { this.areaDetail = areaDetail; } public String getOrderTotalMoney() { return orderTotalMoney; } public void setOrderTotalMoney(String orderTotalMoney) { this.orderTotalMoney = orderTotalMoney; } public String getPostage() { return postage; } public void setPostage(String postage) { this.postage = postage; } public List<SettlementCartItem> getProArray() { return proArray; } public void setProArray(List<SettlementCartItem> proArray) { this.proArray = proArray; } public String getProductTotal() { return productTotal; } public void setProductTotal(String productTotal) { this.productTotal = productTotal; } public String getReceiverName() { return receiverName; } public void setReceiverName(String receiverName) { this.receiverName = receiverName; } public String getReceiverTel() { return receiverTel; } public void setReceiverTel(String receiverTel) { this.receiverTel = receiverTel; } public String getSystemValue() { return systemValue; } public void setSystemValue(String systemValue) { this.systemValue = systemValue; } public String getUserMoney() { return userMoney; } public void setUserMoney(String userMoney) { this.userMoney = userMoney; } public class SettlementCartItem { private String skuPropertiesName; private String num; private String skuPrice; private String proName; private String cartId; private String proImg; public String getCartId() { return cartId; } public void setCartId(String cartId) { this.cartId = cartId; } public String getNum() { return num; } public void setNum(String num) { this.num = num; } public String getProImg() { return proImg; } public void setProImg(String proImg) { this.proImg = proImg; } public String getProName() { return proName; } public void setProName(String proName) { this.proName = proName; } public String getSkuPrice() { return skuPrice; } public void setSkuPrice(String skuPrice) { this.skuPrice = skuPrice; } public String getSkuPropertiesName() { return skuPropertiesName; } public void setSkuPropertiesName(String skuPropertiesName) { this.skuPropertiesName = skuPropertiesName; } } } }
[ "1141681281@qq.com" ]
1141681281@qq.com
dc752e92aa11598a54944a4d9da60178ecbdf9bc
48e7889b3675686891d391a19f23d519efe5c98c
/app/src/main/java/com/openxu/autobean/ExamExamineproject.java
deb76f7453156533fc77badfe1a2ff2a63673e62
[]
no_license
openXu/AutoBeanGradlePlugin
a63b76697f43c75d0cbd3130b82e584c23b32a35
a21780bcdda15c37f87adeba7bb1128d5e8ff5d9
refs/heads/master
2022-07-17T02:19:17.241892
2020-05-20T02:58:22
2020-05-20T02:58:22
264,146,079
1
0
null
null
null
null
UTF-8
Java
false
false
941
java
package com.openxu.autobean; import lombok.Data; /** * Author: openXu * Time: 2020/05/15 16:51:35 * class: ExamExamineproject * Description: */ @Data public class ExamExamineproject { private String ProjectID; private String ProjectCode; private String ProjectName; private String Descript; private Integer ExamObjectType; private String ExamineModelID; private String CompanyID; private String CompanyName; private Integer Effectived; private Integer LimitMode; private Integer ExamineMode; private Integer RouteMode; private Integer RectifyTimeLimit; private Integer ProjectStatus; private Integer EnableUploadAttach; private Integer IsRisk; private String ProjectType; private String CreatedBy; private String CreatedByName; private String CreatedDate; private String ModifiedBy; private String ModifiedByName; private String ModifiedDate; }
[ "2896034886@qq.com" ]
2896034886@qq.com
53df660e0bd81639efc743f4adc7c642dd21c431
83959e6624e6b3e4f3824171f115ef8de1f96848
/hsbank_cms/src/com/thinkgem/jeesite/common/yeepay/cancelAuthorizeAutoTransfer/CancelAuthorizeAutoTransferReq.java
ec267cf203d26a1789ead80f6e5eec900b0b49dc
[]
no_license
cash2one/ionic
6deefa2c62b644745b08f03a69db8efdd11dd9d4
be29386e5e9fdbbde66dd636c72454eed3720919
refs/heads/master
2020-05-23T22:45:09.813492
2016-11-08T03:01:04
2016-11-08T03:01:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,157
java
/** * */ package com.thinkgem.jeesite.common.yeepay.cancelAuthorizeAutoTransfer; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import com.thinkgem.jeesite.common.mapper.JaxbMapper; /** * @author yangtao * */ @XmlRootElement(name = "request") @XmlAccessorType(XmlAccessType.FIELD) public class CancelAuthorizeAutoTransferReq { @XmlAttribute(name = "platformNo") public String platformNo; //商户编号 public String platformUserNo; //平台会员编号 public String requestNo; //请求流水号 public String getPlatformNo() { return platformNo; } public void setPlatformNo(String platformNo) { this.platformNo = platformNo; } public String getPlatformUserNo() { return platformUserNo; } public void setPlatformUserNo(String platformUserNo) { this.platformUserNo = platformUserNo; } public String getRequestNo() { return requestNo; } public void setRequestNo(String requestNo) { this.requestNo = requestNo; } public String toReq(){ return JaxbMapper.toXml(this); } }
[ "jiaoxiaojie@fdjf.net" ]
jiaoxiaojie@fdjf.net
64e41576d9b272619fbdbaca654d72e625cdb3f6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_51b5c2efeb8a7f2720b7ac6d2c2782f6ec8bbff3/mainActivity/7_51b5c2efeb8a7f2720b7ac6d2c2782f6ec8bbff3_mainActivity_s.java
ccbd3688f6e8f4181f109eff27c4a594255f9e86
[]
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,451
java
package com.indexer.shorturl; import android.app.Activity; import android.os.AsyncTask; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import com.indexer.shorturl.tinyurl.tinyurl; import java.io.IOException; public class mainActivity extends Activity { /** * Called when the activity is first created. */ String orignalurl; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView txtview = (TextView)findViewById(R.id.txturl); orignalurl = txtview.getText().toString(); Button btnshort = (Button)findViewById(R.id.btnclick); btnshort.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { TextView txtshorturl = (TextView)findViewById(R.id.txturlshortcut); try { String shorturl = tinyurl.urlShort(orignalurl); } catch (IOException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } txtshorturl.getText(); //To change body of implemented methods use File | Settings | File Templates. } }); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
96fa67523924b1d452062075de86de62187757c0
e461611c69fe9187a8e44609df182dd00d8f5875
/algorithm/src/BiShi/CVTE.java
912c4ae55025d6e1910b66bf50a21d885bbaeca8
[]
no_license
songjiawang/myCoding
a704d8b94733f3591eb4150ff8658a17e0165cc0
fa31efcba4816ca5b079a9dcff30c3f98dfad3e7
refs/heads/master
2020-03-29T01:01:05.200374
2018-09-19T00:08:47
2018-09-19T00:08:47
149,367,114
0
0
null
null
null
null
GB18030
Java
false
false
1,031
java
package BiShi; public class CVTE { /** * 最长回文子序列 * @param str * @return */ public static String maxHuiwenXunLei(String str){ char[]ch = str.toCharArray(); String[]res = new String[1]; res[0]=""; StringBuffer sb = new StringBuffer(); for (int i = 0; i < ch.length; i++) { count(sb,i,ch,res); } return res[0]; } private static void count(StringBuffer sb, int i, char[] ch, String[]res) { // TODO Auto-generated method stub sb.append(ch[i]); if(isHuiWen(sb.toString())){ if(sb.toString().length()>res[0].length()){ res[0] = sb.toString(); } } for (int j = i+1; j < ch.length; j++) { count(sb,j,ch,res); } sb.deleteCharAt(sb.length()-1); } public static boolean isHuiWen(String str){ for (int i = 0; i < (str.length()/2)+1; i++) { if(str.charAt(i)!=str.charAt(str.length()-1-i)){ return false; } } return true; } public static void main(String[] args) { System.out.println(maxHuiwenXunLei("412345565545434421")); } }
[ "33470505+songjiawang@users.noreply.github.com" ]
33470505+songjiawang@users.noreply.github.com
324b14e3b9b45826cdd434bd9a2e0b98ed195525
bbf68230f58d811b0dc1c5af410abbf480472603
/trainee_003/src/main/java/ru/job4j/bank/exceptions/AccountNotFoundException.java
346460c2de680d21db07eabd8fdd538177196cc1
[ "Apache-2.0" ]
permissive
zCRUSADERz/AlexanderYakovlev
2de343bd16e2749fee0a61ae5a19e8ed2374cc4d
9b098fb876b5a60d5e5fdc8274b3b47e994d88ba
refs/heads/master
2022-09-14T05:36:48.554661
2019-06-12T11:05:21
2019-06-12T11:05:21
115,723,226
2
0
Apache-2.0
2022-09-08T00:48:33
2017-12-29T13:07:29
Java
UTF-8
Java
false
false
306
java
package ru.job4j.bank.exceptions; /** * Account not found exception. * * @author Alexander Yakovlev (sanyakovlev@yandex.ru) * @since 26.01.2017 * @version 1.0 */ public class AccountNotFoundException extends Exception { public AccountNotFoundException(String msg) { super(msg); } }
[ "sanyakovlev@yandex.ru" ]
sanyakovlev@yandex.ru
f3a0160ff9fdaf94843d757021c51b38254c9c76
0deb56bdcf91ca229bf61da0cf3cf3406223fb2c
/SmartLife-webrtc/MallLib/src/main/java/com/coocaa/smartmall/data/mobile/data/BaseResult.java
49c76ae284165015db395b3be411533f93dd118a
[]
no_license
soulcure/airplay
2ceb0a6707b2d4a69f85dd091b797dcb6f2c9d46
37dd3a890148a708d8aa6f95ac84355606af6a18
refs/heads/master
2023-04-11T03:49:15.246072
2021-04-16T09:15:03
2021-04-16T09:15:03
357,804,553
1
2
null
null
null
null
UTF-8
Java
false
false
664
java
package com.coocaa.smartmall.data.mobile.data; import java.io.Serializable; public class BaseResult implements Serializable { /** * state : true * code : 200 * msg : 成功 */ private boolean state; private int code; private String msg; public boolean isState() { return state; } public void setState(boolean state) { this.state = state; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } }
[ "chenqiongyao@coocaa.com" ]
chenqiongyao@coocaa.com
8679eb96db7d1f129e89835835b2f506da7b04d0
82e2fa3b1128edc8abd2bd84ecfc01c932831bc0
/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/impl/LPAgendaEntry.java
7331569aee4de1b9aaf824545bd1d18f6246d9ee
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
apache/jena
b64f6013582f2b5aa38d1c9972d7b14e55686316
fb41e79d97f065b8df9ebbc6c69b3f983b6cde04
refs/heads/main
2023-08-14T15:16:21.086308
2023-08-03T08:34:08
2023-08-03T08:34:08
7,437,073
966
760
Apache-2.0
2023-09-02T09:04:08
2013-01-04T08:00:32
Java
UTF-8
Java
false
false
1,403
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.reasoner.rulesys.impl; /** * The signature of classes that can go on the LPEngines processing * agenda. */ public interface LPAgendaEntry { /** * Cycle this object, recording new results in any associated memoization * table until hit a stop or suspend point. */ public void pump(); /** * Tests true if this state is ready to be usefully run. */ public boolean isReady(); /** * Return the generator associated with this entry (might be the entry itself) */ public Generator getGenerator(); }
[ "andy@apache.org" ]
andy@apache.org
22624c6513e68fbf51068f01a62d82d0f052ac0e
64fa951d13f33be9c7a248ba140d519290611a0e
/code-examples/org.springframework.boot.SpringApplication.setBannerMode9.java
7b2b75cea4619b8d51783d1460582ba14f580e28
[]
no_license
andrehora/jss-code-examples
1ee99d7be0a998284f44ecc7c033fdf12c9c01a8
ae98f124e1f15411f8a97d410920c05d6f1b1cea
refs/heads/main
2023-03-25T12:45:42.691780
2021-03-25T13:25:51
2021-03-25T13:25:51
312,898,657
1
0
null
null
null
null
UTF-8
Java
false
false
519
java
public static void main(String... args) { final SpringApplication app = new SpringApplication(MongoMigration.class); app.setBannerMode(Banner.Mode.OFF); boolean hasError = false; try (ConfigurableApplicationContext context = app.run(args)) { context.getBean(MongoDbMigrationService.class).runDatabaseMigration(); } catch (IOException e) { hasError = true; log.error("Error while running database-migration: {}", e.getMessage(), e); } if (hasError) System.exit(1); }
[ "andrehoraa@gmail.com" ]
andrehoraa@gmail.com
0ddfc39c7d59eba2469f0a7ee19641da1863703d
0fc139b0be17056f58c789933bf2a4a056a3f44e
/src/chapter07/sec07/exam03_field_polymorphism/Tire.java
014eb3276e0b4af1ab5ccc595daad9ba4491768b
[]
no_license
Jinah-engineer/TIL-Today-I-learned-
bf8993faf0abcc97a92a7e0c28534711bac69f93
2938789526396a16779d2b842585423f8e297df2
refs/heads/master
2023-05-10T22:40:12.540705
2021-05-10T14:47:05
2021-05-10T14:47:05
346,193,702
0
0
null
null
null
null
UTF-8
Java
false
false
761
java
package chapter07.sec07.exam03_field_polymorphism; public class Tire { // field public int maxRotation; // 타이어의 최대 회전 수 (타이어 수명) public int accumulatedRotation; // 타이어의 누적 회전 수 public String location; // 타이어의 위치 // constructor public Tire(String location, int maxRotation) { this.location = location; this.maxRotation = maxRotation; } // method public boolean roll() { ++accumulatedRotation; // 누적 회전 수 1증가 if (accumulatedRotation < maxRotation) { System.out.println(location + " Tire 수명 : " + (maxRotation - accumulatedRotation) + "회"); return true; } else { System.out.println("*** " + location + " Tire 펑크 ***"); return false; } } }
[ "jeeeengineer@gmail.com" ]
jeeeengineer@gmail.com
6e76027d1257d9e8fae5a5e053939ae628eb19a0
f092b324893863904dde7aaddfc24c2bd940752f
/hook/src/main/java/projectnine/cn/com/hook/util/HookStartActivityUtil.java
1cba740b72575335f5d7d9be76f009a98aa3fa1d
[]
no_license
wangxiongfeng/HttpUpload
26e9e287f816b3e73c7fd35f887a0878c7a64f31
f35cb35bd95fd867d06c68a937c4ab8206c026f7
refs/heads/master
2020-05-18T04:35:26.706356
2019-04-30T02:49:13
2019-04-30T02:49:13
184,176,712
0
0
null
null
null
null
UTF-8
Java
false
false
5,231
java
package projectnine.cn.com.hook.util; import android.content.Context; import android.content.Intent; import android.nfc.Tag; import android.os.Handler; import android.os.Message; import android.util.Log; import java.lang.reflect.Field; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; /** * Created by wang on 2018/5/17. */ public class HookStartActivityUtil { private final String EXTRA_ORIGIN_INTENT = "EXTRA_ORIGIN_INTENT"; private String TAG = "HookStartActivityUtil"; private Context mContent; private Class<?> mProxyClass; public HookStartActivityUtil(Context context, Class<?> proxyClass) { this.mContent = context.getApplicationContext(); this.mProxyClass = proxyClass; } /** * 换回原来的intent * * @throws Exception */ public void hookLaunchActivity() throws Exception { //获取ActivityThread实例 Class<?> atClass = Class.forName("android.app.ActivityThread"); Field atField = atClass.getDeclaredField("sCurrentActivityThread"); atField.setAccessible(true); Object sCurrentActivityThread = atField.get(null); //sCurrentActivityThread 就是ActivityThread //获取ActivityThread中的mH Field mHField = atClass.getDeclaredField("mH"); mHField.setAccessible(true); Object mHandler = mHField.get(sCurrentActivityThread); //给Handler设置CallBack回调 反射 Class<?> handlerClass = Class.forName("android.os.Handler"); Field mCallbackField = handlerClass.getDeclaredField("mCallback"); mCallbackField.setAccessible(true); mCallbackField.set(mHandler, new HandlerCallBack()); // 重新设置mCallback的值 } private class HandlerCallBack implements Handler.Callback { @Override public boolean handleMessage(Message msg) { //没发一个消息 都会走callback方法 if (msg.what == 100) { Log.e(TAG, "handmessage"); handLaunchActivity(msg); } return false; } /** * 启动创建activity拦截 * * @param msg */ private void handLaunchActivity(Message msg) { try { Object record = msg.obj;//ActivityThread中的ActivityClientRecord //1 从record获取过安检的Intent Field intentField = record.getClass().getDeclaredField("intent"); intentField.setAccessible(true); Intent safeIntent = (Intent) intentField.get(record); // 2 从safeIntent中获取原来的intent Intent originIntent = safeIntent.getParcelableExtra(EXTRA_ORIGIN_INTENT); // 3 重新设置回去 if (originIntent != null) { intentField.set(record, originIntent); } } catch (Exception e) { e.printStackTrace(); } } } public void hookStartActivity() throws Exception { // 获取ActivityManagerNative里面的gDefault Class<?> amnClass = Class.forName("android.app.ActivityManagerNative"); //获取属性 Field gDefaultField = amnClass.getDeclaredField("gDefault"); gDefaultField.setAccessible(true); Object gDefault = gDefaultField.get(null); //gDefault 的值 // 获取gDefault 中的instance属性 gDefault是Singleton类型 Class<?> singletonClass = Class.forName("android.util.Singleton"); Field mInstanceField = singletonClass.getDeclaredField("mInstance"); mInstanceField.setAccessible(true); Object iamInstance = mInstanceField.get(gDefault); // mInstance 的值 IActivityManager的一个实例 Class<?> iamclass = Class.forName("android.app.IActivityManager"); iamInstance = Proxy.newProxyInstance(HookStartActivityUtil.class.getClassLoader(), new Class[]{iamclass}, new StartInvocationHandler(iamInstance) //iamInstance是执行者 ); //重新指定 mInstanceField.set(gDefault, iamInstance); } private class StartInvocationHandler implements InvocationHandler { private Object object2; public StartInvocationHandler(Object object) { this.object2 = object; } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Log.e(TAG, method.getName()); //IActivityManager 里所有方法 if (method.getName().equals("startActivity")) { //重新写startActivity方法 //首先获取原來的intent Intent originItent = (Intent) args[2]; //创建一个安全 Intent safeIntent = new Intent(mContent, mProxyClass); // mProxyClass -->ProxyActivity.class args[2] = safeIntent; //绑定原来的intent originItent==Start2Activity safeIntent.putExtra(EXTRA_ORIGIN_INTENT, originItent); } return method.invoke(object2, args); } } }
[ "2862336742@qq.com" ]
2862336742@qq.com
af21268372e52a6e3705b0e025dc4b81b2821e01
85d93664f7756f6e4e66a7deeb1d5d7a1cfa0f9a
/Eclipse_Core_Java/Core_Java/src/app12/P.java
93dece147b6355dd31c83ad9ab9b42f5c83a7e97
[]
no_license
Vijay-Ky/Alpha_Java_Morning
cc36653b54ba1a50abad158369eddcb45a3f5dc7
b4bb44350dc376cf6d0dfdc3c7fb73b2070155b9
refs/heads/main
2023-07-13T04:49:21.239804
2021-08-26T07:21:22
2021-08-26T07:21:22
383,386,584
0
0
null
null
null
null
UTF-8
Java
false
false
234
java
package app12; class P { int i; static void test(P obj) { System.out.println("test: "+ obj.i); } public static void main(String[] args) { P p1 = new P(); System.out.println("main: " + p1.i); p1.i = 10; test(p1); } }
[ "vijayky007@gmail.com" ]
vijayky007@gmail.com
0efe71f8ec068baf3337288298e140e7e8c3d070
ac75ef7ce08d1acbabf651f01d50b6c1c90a0c7d
/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/LoginLogApi.java
dc0c0faee47acec0d500affa46b77950c57878cf
[ "LicenseRef-scancode-unknown-license-reference", "MulanPSL-1.0", "LicenseRef-scancode-mulanpsl-1.0-en" ]
permissive
yydo/onemall
ac16ef4e72fc8b8452ed19b118b6a5fd84de9a05
7c27fd28b4d001fd038cbfc9729bd1fbeeba26d3
refs/heads/master
2022-09-15T00:38:30.584862
2022-08-27T06:00:37
2022-08-27T06:00:37
196,519,053
0
0
null
2019-07-12T06:10:29
2019-07-12T06:10:27
null
UTF-8
Java
false
false
908
java
package cn.iocoder.yudao.module.system.api.logger; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.logger.dto.LoginLogCreateReqDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import javax.validation.Valid; @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = @Api(tags = "RPC 服务 - 登录日志") public interface LoginLogApi { String PREFIX = ApiConstants.PREFIX + "/login-log"; @PostMapping(PREFIX + "/create") @ApiOperation("创建登录日志") CommonResult<Boolean> createLoginLog(@Valid @RequestBody LoginLogCreateReqDTO reqDTO); }
[ "zhijiantianya@gmail.com" ]
zhijiantianya@gmail.com
d90014213d922a4450aed3d2b875ff6ca305bb67
a4469318865d15dd57cc7e8248838861d47e81fe
/branch/crm-billing-client/src/main/java/h8ssrms/AddPlan.java
0fc949b940638bf904450a4470fb76a405b570a8
[]
no_license
shailendrasemilo/Timbl
f002efa9c39470302fce66492cfabd3d8a1b4379
f6a13de62694db287afa464303b0d0c7afbab6ed
refs/heads/master
2023-01-04T15:51:48.001632
2020-11-03T05:30:38
2020-11-03T05:30:38
309,582,556
0
0
null
null
null
null
UTF-8
Java
false
false
2,856
java
package h8ssrms; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.datacontract.schemas._2004._07.ApiRequest; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="changePlan" type="{http://schemas.datacontract.org/2004/07/}AddPlan" minOccurs="0"/> * &lt;element name="Request" type="{http://schemas.datacontract.org/2004/07/}ApiRequest" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "changePlan", "request" }) @XmlRootElement(name = "AddPlan") public class AddPlan { @XmlElementRef(name = "changePlan", namespace = "h8SSRMS", type = JAXBElement.class) protected JAXBElement<org.datacontract.schemas._2004._07.AddPlan> changePlan; @XmlElementRef(name = "Request", namespace = "h8SSRMS", type = JAXBElement.class) protected JAXBElement<ApiRequest> request; /** * Gets the value of the changePlan property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link org.datacontract.schemas._2004._07.AddPlan }{@code >} * */ public JAXBElement<org.datacontract.schemas._2004._07.AddPlan> getChangePlan() { return changePlan; } /** * Sets the value of the changePlan property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link org.datacontract.schemas._2004._07.AddPlan }{@code >} * */ public void setChangePlan(JAXBElement<org.datacontract.schemas._2004._07.AddPlan> value) { this.changePlan = ((JAXBElement<org.datacontract.schemas._2004._07.AddPlan> ) value); } /** * Gets the value of the request property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link ApiRequest }{@code >} * */ public JAXBElement<ApiRequest> getRequest() { return request; } /** * Sets the value of the request property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link ApiRequest }{@code >} * */ public void setRequest(JAXBElement<ApiRequest> value) { this.request = ((JAXBElement<ApiRequest> ) value); } }
[ "shailendrasemilo@gmail.com" ]
shailendrasemilo@gmail.com
e2fdded50dc090f571d93096caacec67f1297b18
8c4aeb8d95c08a02ad5918cefb18940d29f0374d
/src/main/fujure-bootstrap-compiler/fbc-bnfc-parser/src/main/java/org/fujure/fbc/parser/bnfc/antlr/fujure/Absyn/BoolTrueLiteral.java
9df1e5b039474de8a5adfe8515c2541eeb60ee8c
[]
no_license
skinny85/fujure
539c311180317843abe872eb0470c283dc2fddf7
4d057cafdeba20993f31d6331cb1ff462a62a8e0
refs/heads/master
2022-05-13T18:25:23.865750
2021-05-09T18:34:38
2021-05-09T18:34:38
99,875,677
2
0
null
null
null
null
UTF-8
Java
false
false
578
java
package org.fujure.fbc.parser.bnfc.antlr.fujure.Absyn; // Java Package generated by the BNF Converter. public class BoolTrueLiteral extends Literal { public BoolTrueLiteral() { } public <R,A> R accept(org.fujure.fbc.parser.bnfc.antlr.fujure.Absyn.Literal.Visitor<R,A> v, A arg) { return v.visit(this, arg); } public boolean equals(java.lang.Object o) { if (this == o) return true; if (o instanceof org.fujure.fbc.parser.bnfc.antlr.fujure.Absyn.BoolTrueLiteral) { return true; } return false; } public int hashCode() { return 37; } }
[ "adamruka85@gmail.com" ]
adamruka85@gmail.com
b868dc993518899e01e2d2d825dc136da2e21662
610e3f2d3ee2d04241bc0d05dd91cef127d842c0
/src/org/datacontract/schemas/_2004/_07/cxs_subsystem/TransactionInfoGridSectionType.java
e544b76425572bb97a9c0cb86993d106de61e22d
[]
no_license
MasterInc/InventoryUpdateWS
5d9ff02b7cf868035e68a6410714b087edcde367
a768dfefc0ee4dc6b6e4467a0a74b49707846dcf
refs/heads/master
2021-01-10T16:16:46.270984
2015-11-27T21:34:01
2015-11-27T21:34:01
46,999,934
0
0
null
null
null
null
UTF-8
Java
false
false
1,644
java
package org.datacontract.schemas._2004._07.cxs_subsystem; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for TransactionInfoGridSectionType. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="TransactionInfoGridSectionType"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="Customer"/> * &lt;enumeration value="LineItem"/> * &lt;enumeration value="QuickButtonPanel"/> * &lt;enumeration value="MatrixItem"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "TransactionInfoGridSectionType", namespace = "http://schemas.datacontract.org/2004/07/CXS.SubSystem.RetailConfig") @XmlEnum public enum TransactionInfoGridSectionType { @XmlEnumValue("Customer") CUSTOMER("Customer"), @XmlEnumValue("LineItem") LINE_ITEM("LineItem"), @XmlEnumValue("QuickButtonPanel") QUICK_BUTTON_PANEL("QuickButtonPanel"), @XmlEnumValue("MatrixItem") MATRIX_ITEM("MatrixItem"); private final String value; TransactionInfoGridSectionType(String v) { value = v; } public String value() { return value; } public static TransactionInfoGridSectionType fromValue(String v) { for (TransactionInfoGridSectionType c: TransactionInfoGridSectionType.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "jahir.nava@gmail.com" ]
jahir.nava@gmail.com
ec75cdf5b0ef56d0209c1504e314bc1bd1db0270
a423b6d9704d399dc24a98699781b40725236cf5
/src/test/java/com/hz/dafeiji/ai/user/modules/award/AwardModuleTest.java
3629d2b1b6b5afef29414d32d7ce19f8e58ea74e
[]
no_license
babizhu/dafeiji
7dc527893eb18984cbc4446c9bb1572dafffc5b4
999253fbb4a7e374511889c7d591f3d0fd2fee22
refs/heads/master
2021-01-18T14:01:49.162719
2015-01-21T02:52:38
2015-01-21T02:52:38
28,163,868
0
0
null
null
null
null
UTF-8
Java
false
false
4,393
java
package com.hz.dafeiji.ai.user.modules.award; import com.hz.dafeiji.ai.ClientException; import com.hz.dafeiji.ai.ErrorCode; import com.hz.dafeiji.ai.user.User; import com.hz.dafeiji.ai.user.modules.property.PropertyModule; import com.hz.util.D; import org.junit.After; import org.junit.Test; import static junit.framework.Assert.assertEquals; public class AwardModuleTest{ private String uname = D.TEST_USER_NAME; User user = new User( uname ); AwardModule module = user.getModuleManager().getAwardModule(); PropertyModule propertyModule = user.getModuleManager().getPropertyModule(); /** * 清空测试数据 */ @After public void remove(){ propertyModule.removeUserData(); } @Test public void testAddAward() throws Exception{ int cash = propertyModule.getCash(); assertEquals( 0, cash ); //增加1000金币,剩余1000 module.addAward( "500001,1000", "test" ); assertEquals( 1000, propertyModule.getCash() ); //扣除300金币,剩余700 module.reduceAward( "500001,300", "test" ); assertEquals( 700, propertyModule.getCash() ); try { //扣除1300金币,不够扣应该抛出异常,并且金币数据不变 module.reduceAward( "500001,1300", "test" ); } catch( ClientException e ) { assertEquals( e.getCode(), ErrorCode.USER_CASH_NOT_ENOUGH ); } assertEquals( 700, propertyModule.getCash() ); //尝试扣除负数,会抛出异常 try { module.reduceAward( "500001,-1300", "test" ); } catch( ClientException e ) { assertEquals( ErrorCode.AWARD_REDUCE_COUNT_ILLEGAL, e.getCode() ); } //尝试扣除不存在的属性 try { module.reduceAward( "50000001,1300", "test" ); } catch( ClientException e ) { assertEquals( ErrorCode.AWARD_PROP_NOT_FOUND, e.getCode() ); } //清空数据,为下面测试做准备 module.reduceAward( "500001,700", "test" ); /////////////////////////////上面是单独属性测试,下面测试多个属性同时操作////////////////////////////////// //propertyModule.get //增加1000金币,500钻石,剩余金币1000,钻石500 module.addAward( "500001,1000,500002,500", "test" ); assertEquals( 1000, propertyModule.getCash() ); assertEquals( 500, propertyModule.getDiamond() ); //扣除300金币,剩余700,扣除50钻石,剩余450 module.reduceAward( "500001,300,500002,50", "test" ); assertEquals( 700, propertyModule.getCash() ); assertEquals( 450, propertyModule.getDiamond() ); try { //扣除1300金币,50钻石,金币不够,应该抛出异常,并且金币数据不变 module.reduceAward( "500001,1300,500002,50", "test" ); } catch( ClientException e ) { assertEquals( e.getCode(), ErrorCode.USER_CASH_NOT_ENOUGH ); } assertEquals( 700, propertyModule.getCash() ); assertEquals( 450, propertyModule.getDiamond() ); //金币尝试扣除负数,会抛出异常,金币和钻石数据都应该不变 try { module.reduceAward( "500001,-300,500002,50", "test" ); } catch( ClientException e ) { assertEquals( ErrorCode.AWARD_REDUCE_COUNT_ILLEGAL, e.getCode() ); } assertEquals( 700, propertyModule.getCash() ); assertEquals( 450, propertyModule.getDiamond() ); //尝试扣除的两个道具,其中一个道具id是不存在的,金币和钻石数据都应该不变 try { module.reduceAward( "500322001,300,500002,50", "test" ); } catch( ClientException e ) { assertEquals( ErrorCode.AWARD_PROP_NOT_FOUND, e.getCode() ); } assertEquals( 700, propertyModule.getCash() ); assertEquals( 450, propertyModule.getDiamond() ); //增加1000金币,500钻石,剩余金币1000,钻石500 module.addAward( "500001,1000,500002,500", "test" ); assertEquals( 1700, propertyModule.getCash() ); assertEquals( 950, propertyModule.getDiamond() ); } /** * 测试赠送飞机 * * @throws Exception */ @Test public void testBuyPlane() throws Exception{ } }
[ "liu_kun@msn.com" ]
liu_kun@msn.com
f465cb4be0d5bae621a730c80da773cc9c83bd57
0260e9b9f8befa39871f6cd0aefb3e368f40d0ef
/org.panlab.officedl/src/org/panlab/officedl/OfficeDLRuntimeModule.java
d084b32c469f33bd0dad6d3dbc276804956a7e00
[]
no_license
ctranoris/fstoolkit
ae84a98a9196fae4ad094e1b0aa53ef876715e37
4adf7fa92135a002107f0c750d1068dc39857f6f
refs/heads/master
2016-09-06T07:30:31.100001
2012-10-17T07:31:55
2012-10-17T07:31:55
2,185,607
0
0
null
null
null
null
UTF-8
Java
false
false
878
java
/* * generated by Xtext */ package org.panlab.officedl; import org.eclipse.xtext.conversion.IValueConverterService; import org.eclipse.xtext.naming.IQualifiedNameProvider; import org.panlab.officedl.scoping.MyOfficeDLQualifiedNameProvider; import org.panlab.officedl.valueconvert.MyVTDLValueConverter; /** * Use this class to register components to be used within the IDE. */ public class OfficeDLRuntimeModule extends org.panlab.officedl.AbstractOfficeDLRuntimeModule { //chris check http://pettergraff.blogspot.com/2009/11/xtext-valueconverter.html //for the value converter! @Override public Class<? extends IValueConverterService> bindIValueConverterService() { return MyVTDLValueConverter.class; } @Override public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() { return MyOfficeDLQualifiedNameProvider.class; } }
[ "tranoris@88d6be61-b049-4d1a-ac2d-38c3f0f8cafa" ]
tranoris@88d6be61-b049-4d1a-ac2d-38c3f0f8cafa
6f063053635a2bf7f2eebfb8b910e0a767df630b
953e9a57aa425f92c96ed917d6c76daf90ce6bda
/dataset/grade/18/008/src/main/java/introclassJava/grade_98d873cd_008.java
72fda19455cd8e14fdc0ca6c32bcc9e7b76d21cc
[]
no_license
gisselFdez/IntroClassJava
106a70df19f1a2c416fc734bddb97e73f3e14301
cc7879f83a4067f56247c802fc6d1e4ec64a7cc7
refs/heads/master
2021-01-18T15:07:24.773829
2016-01-06T15:08:42
2016-01-06T15:13:46
49,139,235
0
0
null
2016-01-06T14:14:29
2016-01-06T14:14:28
null
UTF-8
Java
false
false
2,459
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_98d873cd_008 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_98d873cd_008 mainClass = new grade_98d873cd_008 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { FloatObj a = new FloatObj (), b = new FloatObj (), c = new FloatObj (), d = new FloatObj (), student = new FloatObj (); output += (String.format ("Enter thresholds for A, B, C, D")); output += (String.format ("\nin that order, decreasing percentages > ")); a.value = scanner.nextFloat (); b.value = scanner.nextFloat (); c.value = scanner.nextFloat (); d.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) >")); student.value = scanner.nextFloat (); if (student.value >= a.value) { output += (String.format ("Student has an A grade\n")); } else if (student.value >= b.value) { output += (String.format ("Student has an B grade\n")); } else if (student.value >= c.value) { output += (String.format ("Student has an C grade\n")); } else if (student.value >= d.value) { output += (String.format ("Student has an D grade\n")); } else if (student.value < d.value) { output += (String.format ("Student has failed the course\n")); } if (true) return;; } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
bcdfa37a36a46a251c98f557004b40fe881e9578
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/jonan_ForkHub/app/src/main/java/com/github/mobile/ui/user/UserPagerAdapter.java
6e7f182b93ece218b503be1c6937075aacfb8154
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,076
java
// isComment package com.github.mobile.ui.user; import static com.github.mobile.ui.user.UserViewActivity.TAB_ACTIVITY; import static com.github.mobile.ui.user.UserViewActivity.TAB_FOLLOWEES; import static com.github.mobile.ui.user.UserViewActivity.TAB_FOLLOWERS; import static com.github.mobile.ui.user.UserViewActivity.TAB_REPOSITORIES; import static com.github.mobile.ui.user.UserViewActivity.TAB_STARS; import android.content.res.Resources; import android.support.v4.app.Fragment; import android.support.v7.app.AppCompatActivity; import com.github.mobile.R; import com.github.mobile.ui.FragmentPagerAdapter; import com.github.mobile.ui.repo.UserOwnedRepositoryListFragment; import com.github.mobile.ui.repo.UserStarredRepositoryListFragment; import com.github.mobile.ui.team.TeamListFragment; /** * isComment */ public class isClassOrIsInterface extends FragmentPagerAdapter { private final boolean isVariable; private final boolean isVariable; private final Resources isVariable; /** * isComment */ public isConstructor(final AppCompatActivity isParameter, final boolean isParameter, final boolean isParameter) { super(isNameExpr); isNameExpr = isNameExpr.isMethod(); this.isFieldAccessExpr = isNameExpr; this.isFieldAccessExpr = isNameExpr; } @Override public Fragment isMethod(final int isParameter) { switch(isNameExpr) { case isNameExpr: return new UserCreatedNewsFragment(); case isNameExpr: return new UserOwnedRepositoryListFragment(); case isNameExpr: return isNameExpr ? new OrgMembersFragment() : new UserStarredRepositoryListFragment(); case isNameExpr: return isNameExpr ? new TeamListFragment() : new UserFollowersFragment(); case isNameExpr: return new UserFollowingFragment(); default: return null; } } @Override public int isMethod() { if (isNameExpr) { return isNameExpr ? isIntegerConstant : isIntegerConstant; } return isIntegerConstant; } @Override public CharSequence isMethod(int isParameter) { switch(isNameExpr) { case isNameExpr: return isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); case isNameExpr: return isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); case isNameExpr: return isNameExpr.isMethod(isNameExpr ? isNameExpr.isFieldAccessExpr.isFieldAccessExpr : isNameExpr.isFieldAccessExpr.isFieldAccessExpr); case isNameExpr: return isNameExpr.isMethod(isNameExpr ? isNameExpr.isFieldAccessExpr.isFieldAccessExpr : isNameExpr.isFieldAccessExpr.isFieldAccessExpr); case isNameExpr: return isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); default: return null; } } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
6606817398a8084628892f3ea14a2a551b33f759
3b76056bebbf834d29cbf82ed57fd273d442f39f
/pptviewer/app/src/main/java/org/openxmlformats/schemas/presentationml/x2006/main/impl/PresentationDocumentImpl.java
4f2a3fdcbd47d34273a460dc7f76cbbfe380da69
[]
no_license
PetarPeric/pptviewer
52dc428e2eb2bc3e3d82deaff11d8be0fc06cf96
533c0b504e5139779fbf61fa75c403b0b3190399
refs/heads/master
2020-03-27T19:56:32.669031
2018-10-10T10:39:27
2018-10-10T10:39:27
147,023,279
2
0
null
null
null
null
UTF-8
Java
false
false
2,863
java
/* * An XML document type. * Localname: presentation * Namespace: http://schemas.openxmlformats.org/presentationml/2006/main * Java type: org.openxmlformats.schemas.presentationml.x2006.main.PresentationDocument * * Automatically generated - do not modify. */ package org.openxmlformats.schemas.presentationml.x2006.main.impl; /** * A document containing one presentation(@http://schemas.openxmlformats.org/presentationml/2006/main) element. * * This is a complex type. */ public class PresentationDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.openxmlformats.schemas.presentationml.x2006.main.PresentationDocument { public PresentationDocumentImpl(org.apache.xmlbeans.SchemaType sType) { super(sType); } private static final javax.xml.namespace.QName PRESENTATION$0 = new javax.xml.namespace.QName("http://schemas.openxmlformats.org/presentationml/2006/main", "presentation"); /** * Gets the "presentation" element */ public org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation getPresentation() { synchronized (monitor()) { check_orphaned(); org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation target = null; target = (org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation)get_store().find_element_user(PRESENTATION$0, 0); if (target == null) { return null; } return target; } } /** * Sets the "presentation" element */ public void setPresentation(org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation presentation) { synchronized (monitor()) { check_orphaned(); org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation target = null; target = (org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation)get_store().find_element_user(PRESENTATION$0, 0); if (target == null) { target = (org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation)get_store().add_element_user(PRESENTATION$0); } target.set(presentation); } } /** * Appends and returns a new empty "presentation" element */ public org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation addNewPresentation() { synchronized (monitor()) { check_orphaned(); org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation target = null; target = (org.openxmlformats.schemas.presentationml.x2006.main.CTPresentation)get_store().add_element_user(PRESENTATION$0); return target; } } }
[ "petarperic93@gmail.com" ]
petarperic93@gmail.com
1a91d7e19dc59437d98bdd05868acc3926ed69f4
9e8b8d5949a35c55cfac8ebe4c7b6fed043dc267
/cluster-manager/src/main/java/com/codeabovelab/dm/cluman/cluster/registry/model/DockerRegistryConfig.java
cb257adf6c9ade84c8e0f32499ecd5e023e84f3c
[]
no_license
awsautomation/Docker-Orchestration-master
5fac7dc060a6021371c95e4a5e52fb4c42d605f3
0c1544f4d2f6ceb869661b2f75e9216f990025ae
refs/heads/master
2021-08-28T11:40:05.834148
2020-02-06T15:45:19
2020-02-06T15:45:19
238,753,850
1
0
null
null
null
null
UTF-8
Java
false
false
586
java
package com.codeabovelab.dm.cluman.cluster.registry.model; import com.codeabovelab.dm.common.kv.mapping.KvMapping; import com.codeabovelab.dm.common.kv.mapping.PropertyCipher; import lombok.Data; import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Data public abstract class DockerRegistryConfig extends RegistryConfig implements RegistryCredentials { @KvMapping private String username; @KvMapping(interceptors = PropertyCipher.class) private String password; @Override public void cleanCredentials() { setPassword(null); } }
[ "tech_fur@outlook.com" ]
tech_fur@outlook.com
5834127ed4cf5cd5a2a288b717931b162e7c0096
90981d6e08384e5f133a1db7c40153564675c36d
/src/main/java/org/jeecgframework/web/cgform/entity/config/CgFormFieldVO.java
568a5af01ad3e5b4a337c4dc334d62af10329fb4
[]
no_license
ronwxy/jeecg-web
c2c1336508545b422d796e1123f6f343d62fbbee
8a7e35c49d999e65a08ed3f3710a214f5cb4e324
refs/heads/master
2020-05-02T12:27:47.156589
2019-03-27T09:18:19
2019-03-27T09:18:19
177,958,498
0
0
null
null
null
null
UTF-8
Java
false
false
2,854
java
package org.jeecgframework.web.cgform.entity.config; import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecgframework.poi.excel.annotation.ExcelTarget; /** * @author jueyue * @version V1.0 * @Title: Entity * @Description: 自动生成表的列属性 * @date 2013-06-30 11:37:32 */ @ExcelTarget("cgFormFieldVO") public class CgFormFieldVO implements java.io.Serializable { private static final long serialVersionUID = 8248068871232905945L; /** * id */ private String id; /** * 字段名称 */ @Excel(name = "字段名称", orderNum = "1") private String fieldName; /** * 功能注释 */ @Excel(name = "字段备注", orderNum = "2") private String content; /** * 字段类型 */ @Excel(name = "字段类型", orderNum = "3") private String type; /** * 字段长度 */ @Excel(name = "字段长度", orderNum = "4") private String length; /** * 小数点长度 */ @Excel(name = "小数点长度", orderNum = "5") private String pointLength; /** * 默认值 */ @Excel(name = "默认值", orderNum = "6") private String fieldDefault; /** * 是否允许空值 */ @Excel(name = "允许空值", orderNum = "7") private String isNull; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getFieldName() { return fieldName; } public void setFieldName(String fieldName) { this.fieldName = fieldName; } public String getLength() { return length; } public void setLength(String length) { this.length = length; } public String getPointLength() { return pointLength; } public void setPointLength(String pointLength) { this.pointLength = pointLength; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getIsNull() { return isNull; } public void setIsNull(String isNull) { this.isNull = isNull; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getFieldDefault() { return fieldDefault; } public void setFieldDefault(String fieldDefault) { this.fieldDefault = fieldDefault; } @Override public String toString() { return "CgFormFieldVO [id=" + id + ", fieldName=" + fieldName + ", content=" + content + ", type=" + type + ", length=" + length + ", pointLength=" + pointLength + ", fieldDefault=" + fieldDefault + ", isNull=" + isNull + "]"; } }
[ "ray4work@126.com" ]
ray4work@126.com
b38f7aa668113a11c310bcd2837837527ddfa6ae
ca7da6499e839c5d12eb475abe019370d5dd557d
/spring-context/src/main/java/org/springframework/format/FormatterRegistry.java
1bdcf14a9e215f19ffafac9996e1d43276df3e63
[ "Apache-2.0" ]
permissive
yangfancoming/spring-5.1.x
19d423f96627636a01222ba747f951a0de83c7cd
db4c2cbcaf8ba58f43463eff865d46bdbd742064
refs/heads/master
2021-12-28T16:21:26.101946
2021-12-22T08:55:13
2021-12-22T08:55:13
194,103,586
0
1
null
null
null
null
UTF-8
Java
false
false
2,353
java
package org.springframework.format; import java.lang.annotation.Annotation; import org.springframework.core.convert.converter.ConverterRegistry; /** * A registry of field formatting logic. * * @author Keith Donald * @since 3.0 */ public interface FormatterRegistry extends ConverterRegistry { /** * Adds a Formatter to format fields of a specific type. * The field type is implied by the parameterized Formatter instance. * @param formatter the formatter to add * @since 3.1 * @see #addFormatterForFieldType(Class, Formatter) */ void addFormatter(Formatter<?> formatter); /** * Adds a Formatter to format fields of the given type. * On print, if the Formatter's type T is declared and {@code fieldType} is not assignable to T, * a coercion to T will be attempted before delegating to {@code formatter} to print a field value. * On parse, if the parsed object returned by {@code formatter} is not assignable to the runtime field type, * a coercion to the field type will be attempted before returning the parsed field value. * @param fieldType the field type to format * @param formatter the formatter to add */ void addFormatterForFieldType(Class<?> fieldType, Formatter<?> formatter); /** * Adds a Printer/Parser pair to format fields of a specific type. * The formatter will delegate to the specified {@code printer} for printing * and the specified {@code parser} for parsing. * On print, if the Printer's type T is declared and {@code fieldType} is not assignable to T, * a coercion to T will be attempted before delegating to {@code printer} to print a field value. * On parse, if the object returned by the Parser is not assignable to the runtime field type, * a coercion to the field type will be attempted before returning the parsed field value. * @param fieldType the field type to format * @param printer the printing part of the formatter * @param parser the parsing part of the formatter */ void addFormatterForFieldType(Class<?> fieldType, Printer<?> printer, Parser<?> parser); /** * Adds a Formatter to format fields annotated with a specific format annotation. * @param annotationFormatterFactory the annotation formatter factory to add */ void addFormatterForFieldAnnotation(AnnotationFormatterFactory<? extends Annotation> annotationFormatterFactory); }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
0d2ac86d058927024d44665fb0ffd3a2262d65e1
98e6e5f765712f6cdd067f20b2743512ef348796
/Exams/Java OOP Advanced Retake Exam - 12 May 2017/src/main/java/cresla/interpreters/CommandInterpreter.java
728b28e03fc0b903a779e2c60cfb27386c153e81
[]
no_license
GeorgeK95/JavaOOPAdvanced
1cb0a47f0cbb61509995fcb2293a64e790238839
1566a84552114097924a850332081d4f1c144cb7
refs/heads/master
2021-09-03T11:22:48.944404
2018-01-08T17:31:37
2018-01-08T17:31:37
110,693,137
0
1
null
null
null
null
UTF-8
Java
false
false
1,764
java
package cresla.interpreters; import cresla.annotations.InjectArgs; import cresla.commands.Executable; import cresla.interfaces.Manager; import cresla.interfaces.Parser; import cresla.utils.InputParser; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; /** * Created by George-Lenovo on 6/29/2017. */ public class CommandInterpreter implements Interpreter { private static final String PACKAGE = "cresla.commands."; private static final String COMMAND_SUFFIX = "Command"; private Manager system; private Parser parser; public CommandInterpreter(Manager system) { this.system = system; this.parser = new InputParser(); } @Override public Executable interpretCommand(String line) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { String[] params = this.parser.parseInputAsArray(line); /*class->ctor->newInstance*/ Class<Executable> clazz = (Class<Executable>) Class.forName(PACKAGE + params[0] + COMMAND_SUFFIX); Constructor<Executable> ctor = clazz.getDeclaredConstructor(Manager.class); Executable executable = ctor.newInstance(this.system); this.injectDependencies(executable, params); return executable; } private void injectDependencies(Executable executable, String[] params) throws IllegalAccessException { for (Field field : executable.getClass().getDeclaredFields()) { if (field.isAnnotationPresent(InjectArgs.class)) { field.setAccessible(true); field.set(executable, params); break; } } } }
[ "george_it@abv.bg" ]
george_it@abv.bg
6fa10ea14158ab2f863fa49240287f9408b6d467
9286472cb0286b117c62b3a6b30e4b4f2de0a3d7
/src-gui/main/Formatter.java
04e0cc95e5db2892d7f8f088b6bedbea57a2df4b
[ "Apache-2.0" ]
permissive
muratartim/SolidMAT
08b5ca7aca60ea9d8391922e43f6f5d0ea5c2435
418eb170c60d21c9f3440643d31ff1a6ca45e77d
refs/heads/master
2021-07-07T01:00:28.770587
2019-01-13T11:56:04
2019-01-13T11:56:04
136,175,614
22
11
null
null
null
null
UTF-8
Java
false
false
2,642
java
/* * Copyright 2018 Murat Artim (muratartim@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 main; import java.util.Locale; /** * Class for formatting numeric values in GUIs. * * @author Murat Artim * */ public class Formatter { /** Format type of formatter. */ private String format_ = "a"; /** Number of digits after comma separator. */ private int digits_ = 4; /** * Sets format type (a -> automatic, f -> real number, E -> scientific * number). * * @param format * Format type (a -> automatic, f -> real number, E -> scientific * number). */ public void setFormat(String format) { format_ = format; } /** * Sets number of digits after comma separator. * * @param digits * Number of digits after comma separator. */ public void setDigits(int digits) { digits_ = digits; } /** * Returns format type (a -> automatic, f -> real number, E -> scientific * number). * * @return Format type (a -> automatic, f -> real number, E -> scientific * number). */ public String getFormat() { return format_; } /** * Returns number of digits after comma separator. * * @return Number of digits after comma separator. */ public int getDigits() { return digits_; } /** * Formats given double number. Automatic formating rule: If the absolute * value of the number is >= 1.00E-03 and <= 1.00E+03, it is formatted as a * decimal number with 4 digits after the decimal separator. Otherwise, it * is formatted as a scientific number with 4 digits after the decimal * seperator. * * @param number * The number to be formatted. * @return The formatted string. */ public String format(double number) { // automatic formating if (format_.equalsIgnoreCase("a")) { if (Math.abs(number) >= 1.00E-03 && Math.abs(number) <= 1.00E+03) return String.format(Locale.US, "%.4f", number); else return String.format(Locale.US, "%.4E", number); } // user defined formatting else return String.format(Locale.US, "%." + digits_ + format_, number); } }
[ "muratartim@gmail.com" ]
muratartim@gmail.com
d6715cc85aab3694f7f482adc041bc9ff6086e10
0f65eb77622cb171f2356342081fae0db36d69df
/src/test/java/com/luigiagosti/seba/utils/ConcurrencyBaseEventBusTest.java
2e12d55313f71764e76cb326e156076aae1131c8
[ "Apache-2.0" ]
permissive
morristech/seba
c39e67a416828ac6668694562b59b0827658f4ad
f9787325d7db051e7200e5f5c1bd08c5a6935f05
refs/heads/master
2020-12-25T02:10:12.110893
2013-04-22T22:13:08
2013-04-22T22:13:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,003
java
package com.luigiagosti.seba.utils; import static com.jayway.awaitility.Awaitility.with; import static org.junit.Assert.assertEquals; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; import org.junit.Assert; import com.jayway.awaitility.Duration; public class ConcurrencyBaseEventBusTest { protected static final int LARGE_NUMBER_OF_EVENT = 1000; protected void checkCosumers(EventConsumer...eventConsumers) { for(EventConsumer ec : eventConsumers) { assertEquals(LARGE_NUMBER_OF_EVENT, ec.getEventConsumedCounter()); } } protected void waitForConsumers(final EventConsumer...eventConsumers) { try { with().pollInterval(Duration.ONE_HUNDRED_MILLISECONDS).and() .with().pollDelay(20, TimeUnit.MILLISECONDS).await("event producer finished") .atMost(2, TimeUnit.SECONDS).until(new Callable<Boolean>() { @Override public Boolean call() throws Exception { for(EventConsumer ec : eventConsumers) { if(ec.getEventConsumedCounter() != LARGE_NUMBER_OF_EVENT) { return false; } } return true; } }); } catch (Exception re) { re.printStackTrace(); Assert.fail(re.getMessage()); } } protected void waitForFinish(final EventProducer...eventProducers) { try { with().pollInterval(Duration.ONE_HUNDRED_MILLISECONDS).and() .with().pollDelay(20, TimeUnit.MILLISECONDS).await("event producer finished") .atMost(2, TimeUnit.SECONDS).until(new Callable<Boolean>() { @Override public Boolean call() throws Exception { for(EventProducer ep : eventProducers) { if(!ep.finished()) { return false; } } return true; } }); } catch (Exception re) { re.printStackTrace(); Assert.fail(re.getMessage()); } } protected void start(Runnable...rs) { for (Runnable r : rs) { new Thread(r).start(); } } }
[ "luigi.agosti@gmail.com" ]
luigi.agosti@gmail.com
c50610fd573736223bdfc19367b266b70e2aa754
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/core/src/main/java/org/gradle/testcore/performancenull_39/Productionnull_3879.java
47a043d30e0a29a26ff0377e69c7ade7d67e2c25
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
589
java
package org.gradle.testcore.performancenull_39; public class Productionnull_3879 { private final String property; public Productionnull_3879(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
df6f3312bd71d9f5fab7f843c891cb52507f2633
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/vlog/ui/timelineeditor/c$g$$ExternalSyntheticLambda0.java
dd2e845f4551514d507a4cdfae550cc12923850c
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
487
java
package com.tencent.mm.plugin.vlog.ui.timelineeditor; import android.view.View; import android.view.View.OnClickListener; public final class c$g$$ExternalSyntheticLambda0 implements View.OnClickListener { public final void onClick(View arg1) {} } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes3.jar * Qualified Name: com.tencent.mm.plugin.vlog.ui.timelineeditor.c.g..ExternalSyntheticLambda0 * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
92c3c83b380d6ca8098ceafbcb36b9147eb5b7e6
6ff0600e2387d777f430d5b9875a91d2e0f9f42b
/src/main/java/_3_java_proffessional/homework00/ex3/Employee.java
f86f5bd222de90baedea6acfaa0ff47835230e5b
[]
no_license
Sinelife/MyJavaDeveloper
13965154355888f4e420ff9abfaf28ff84db7a77
088a97131917af104150f50d7c0acb9421788d5d
refs/heads/master
2023-05-25T23:31:23.309112
2021-06-03T16:06:26
2021-06-03T16:06:26
373,540,917
0
0
null
null
null
null
UTF-8
Java
false
false
1,473
java
package _3_java_proffessional.homework00.ex3; public class Employee implements Comparable<Employee> { private String name; private String surname; private String secondName; private double salary; public Employee(String name, String surname, String secondName, double salary) { this.name = name; this.surname = surname; this.secondName = secondName; this.salary = salary; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSurname() { return surname; } public void setSurname(String surname) { this.surname = surname; } public String getSecondName() { return secondName; } public void setSecondName(String secondName) { this.secondName = secondName; } public double getSalary() { return salary; } public void setSalary(double salary) { this.salary = salary; } @Override public String toString() { return "Employee{" + "name='" + name + '\'' + ", surname='" + surname + '\'' + ", secondName='" + secondName + '\'' + ", salary=" + salary + "}\n"; } @Override public int compareTo(Employee employee) { if (employee.salary > this.salary) { return 1; } return -1; } }
[ "ya.serzhan@gmail.com" ]
ya.serzhan@gmail.com
1a5f33094a0dbf867afaac7f3fbad4e904e5b40f
e51de484e96efdf743a742de1e91bce67f555f99
/Android/triviacrack_src/src/com/etermax/preguntados/ui/d/c.java
dbe6991cd68c42337fd75be9d0166dee9bb59f2c
[]
no_license
adumbgreen/TriviaCrap
b21e220e875f417c9939f192f763b1dcbb716c69
beed6340ec5a1611caeff86918f107ed6807d751
refs/heads/master
2021-03-27T19:24:22.401241
2015-07-12T01:28:39
2015-07-12T01:28:39
28,071,899
0
0
null
null
null
null
UTF-8
Java
false
false
4,367
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.etermax.preguntados.ui.d; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.etermax.preguntados.datasource.dto.GameDTO; import com.etermax.preguntados.datasource.e; import org.a.a.b.a; import org.a.a.b.b; // Referenced classes of package com.etermax.preguntados.ui.d: // a, j, d public final class c extends com.etermax.preguntados.ui.d.a implements a, b { private final org.a.a.b.c j = new org.a.a.b.c(); private View k; public c() { } private void a(Bundle bundle) { org.a.a.b.c.a(this); i(); e = e.a(getActivity()); d = com.etermax.preguntados.ui.d.j.g(getActivity()); } public static d h() { return new d(); } private void i() { Bundle bundle = getArguments(); if (bundle != null) { if (bundle.containsKey("mTipType")) { c = bundle.getInt("mTipType"); } if (bundle.containsKey("mGame")) { b = (GameDTO)bundle.getSerializable("mGame"); } if (bundle.containsKey("mToTypeQuestion")) { a = bundle.getInt("mToTypeQuestion"); } } } public void a(a a1) { View view = a1.findViewById(0x7f0a028f); if (view != null) { view.setOnClickListener(new android.view.View.OnClickListener() { final c a; public void onClick(View view5) { a.e(); } { a = c.this; super(); } }); } View view1 = a1.findViewById(0x7f0a028c); if (view1 != null) { view1.setOnClickListener(new android.view.View.OnClickListener() { final c a; public void onClick(View view5) { a.d(); } { a = c.this; super(); } }); } View view2 = a1.findViewById(0x7f0a0295); if (view2 != null) { view2.setOnClickListener(new android.view.View.OnClickListener() { final c a; public void onClick(View view5) { a.g(); } { a = c.this; super(); } }); } View view3 = a1.findViewById(0x7f0a0292); if (view3 != null) { view3.setOnClickListener(new android.view.View.OnClickListener() { final c a; public void onClick(View view5) { a.f(); } { a = c.this; super(); } }); } View view4 = a1.findViewById(0x7f0a0505); if (view4 != null) { view4.setOnClickListener(new android.view.View.OnClickListener() { final c a; public void onClick(View view5) { a.c(); } { a = c.this; super(); } }); } b(); } public View findViewById(int l) { if (k == null) { return null; } else { return k.findViewById(l); } } public void onCreate(Bundle bundle) { org.a.a.b.c c1 = org.a.a.b.c.a(j); a(bundle); super.onCreate(bundle); org.a.a.b.c.a(c1); } public View onCreateView(LayoutInflater layoutinflater, ViewGroup viewgroup, Bundle bundle) { k = super.onCreateView(layoutinflater, viewgroup, bundle); return k; } public void onViewCreated(View view, Bundle bundle) { super.onViewCreated(view, bundle); j.a(this); } }
[ "klayderpus@chimble.net" ]
klayderpus@chimble.net
e62d1e0fd002faaef243fd00b67e18a6a9484c84
4ff9b1fe3e8024687ab0cd3090a45a38f702c56e
/app/src/main/java/com/zhailr/caipiao/pay/alipay/Base64.java
3ca58fcd9e23f56235f3b14587e0af98d2058473
[]
no_license
DavyJohn/trunk
9a24cb3c9d099ab8bfa4c3cead881857bfb91e4f
8a8b06ceb2bf53e36ada42452ed4ba1078d8ad08
refs/heads/master
2021-01-17T16:04:13.622181
2017-10-12T10:34:41
2017-10-12T10:34:41
74,008,911
0
0
null
null
null
null
UTF-8
Java
false
false
7,361
java
package com.zhailr.caipiao.pay.alipay; public final class Base64 { private static final int BASELENGTH = 128; private static final int LOOKUPLENGTH = 64; private static final int TWENTYFOURBITGROUP = 24; private static final int EIGHTBIT = 8; private static final int SIXTEENBIT = 16; private static final int FOURBYTE = 4; private static final int SIGN = -128; private static char PAD = '='; private static byte[] base64Alphabet = new byte[BASELENGTH]; private static char[] lookUpBase64Alphabet = new char[LOOKUPLENGTH]; static { for (int i = 0; i < BASELENGTH; ++i) { base64Alphabet[i] = -1; } for (int i = 'Z'; i >= 'A'; i--) { base64Alphabet[i] = (byte) (i - 'A'); } for (int i = 'z'; i >= 'a'; i--) { base64Alphabet[i] = (byte) (i - 'a' + 26); } for (int i = '9'; i >= '0'; i--) { base64Alphabet[i] = (byte) (i - '0' + 52); } base64Alphabet['+'] = 62; base64Alphabet['/'] = 63; for (int i = 0; i <= 25; i++) { lookUpBase64Alphabet[i] = (char) ('A' + i); } for (int i = 26, j = 0; i <= 51; i++, j++) { lookUpBase64Alphabet[i] = (char) ('a' + j); } for (int i = 52, j = 0; i <= 61; i++, j++) { lookUpBase64Alphabet[i] = (char) ('0' + j); } lookUpBase64Alphabet[62] = (char) '+'; lookUpBase64Alphabet[63] = (char) '/'; } private static boolean isWhiteSpace(char octect) { return (octect == 0x20 || octect == 0xd || octect == 0xa || octect == 0x9); } private static boolean isPad(char octect) { return (octect == PAD); } private static boolean isData(char octect) { return (octect < BASELENGTH && base64Alphabet[octect] != -1); } /** * Encodes hex octects into Base64 * * @param binaryData * Array containing binaryData * @return Encoded Base64 array */ public static String encode(byte[] binaryData) { if (binaryData == null) { return null; } int lengthDataBits = binaryData.length * EIGHTBIT; if (lengthDataBits == 0) { return ""; } int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP; int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP; int numberQuartet = fewerThan24bits != 0 ? numberTriplets + 1 : numberTriplets; char encodedData[] = null; encodedData = new char[numberQuartet * 4]; byte k = 0, l = 0, b1 = 0, b2 = 0, b3 = 0; int encodedIndex = 0; int dataIndex = 0; for (int i = 0; i < numberTriplets; i++) { b1 = binaryData[dataIndex++]; b2 = binaryData[dataIndex++]; b3 = binaryData[dataIndex++]; l = (byte) (b2 & 0x0f); k = (byte) (b1 & 0x03); byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); byte val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0); byte val3 = ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc); encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)]; encodedData[encodedIndex++] = lookUpBase64Alphabet[(l << 2) | val3]; encodedData[encodedIndex++] = lookUpBase64Alphabet[b3 & 0x3f]; } // form integral number of 6-bit groups if (fewerThan24bits == EIGHTBIT) { b1 = binaryData[dataIndex]; k = (byte) (b1 & 0x03); byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex++] = lookUpBase64Alphabet[k << 4]; encodedData[encodedIndex++] = PAD; encodedData[encodedIndex++] = PAD; } else if (fewerThan24bits == SIXTEENBIT) { b1 = binaryData[dataIndex]; b2 = binaryData[dataIndex + 1]; l = (byte) (b2 & 0x0f); k = (byte) (b1 & 0x03); byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); byte val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0); encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)]; encodedData[encodedIndex++] = lookUpBase64Alphabet[l << 2]; encodedData[encodedIndex++] = PAD; } return new String(encodedData); } /** * Decodes Base64 data into octects * * @param encoded * string containing Base64 data * @return Array containind decoded data. */ public static byte[] decode(String encoded) { if (encoded == null) { return null; } char[] base64Data = encoded.toCharArray(); // remove white spaces int len = removeWhiteSpace(base64Data); if (len % FOURBYTE != 0) { return null;// should be divisible by four } int numberQuadruple = (len / FOURBYTE); if (numberQuadruple == 0) { return new byte[0]; } byte decodedData[] = null; byte b1 = 0, b2 = 0, b3 = 0, b4 = 0; char d1 = 0, d2 = 0, d3 = 0, d4 = 0; int i = 0; int encodedIndex = 0; int dataIndex = 0; decodedData = new byte[(numberQuadruple) * 3]; for (; i < numberQuadruple - 1; i++) { if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++])) || !isData((d3 = base64Data[dataIndex++])) || !isData((d4 = base64Data[dataIndex++]))) { return null; }// if found "no data" just return null b1 = base64Alphabet[d1]; b2 = base64Alphabet[d2]; b3 = base64Alphabet[d3]; b4 = base64Alphabet[d4]; decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4); decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); decodedData[encodedIndex++] = (byte) (b3 << 6 | b4); } if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++]))) { return null;// if found "no data" just return null } b1 = base64Alphabet[d1]; b2 = base64Alphabet[d2]; d3 = base64Data[dataIndex++]; d4 = base64Data[dataIndex++]; if (!isData((d3)) || !isData((d4))) {// Check if they are PAD characters if (isPad(d3) && isPad(d4)) { if ((b2 & 0xf) != 0)// last 4 bits should be zero { return null; } byte[] tmp = new byte[i * 3 + 1]; System.arraycopy(decodedData, 0, tmp, 0, i * 3); tmp[encodedIndex] = (byte) (b1 << 2 | b2 >> 4); return tmp; } else if (!isPad(d3) && isPad(d4)) { b3 = base64Alphabet[d3]; if ((b3 & 0x3) != 0)// last 2 bits should be zero { return null; } byte[] tmp = new byte[i * 3 + 2]; System.arraycopy(decodedData, 0, tmp, 0, i * 3); tmp[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4); tmp[encodedIndex] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); return tmp; } else { return null; } } else { // No PAD e.g 3cQl b3 = base64Alphabet[d3]; b4 = base64Alphabet[d4]; decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4); decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); decodedData[encodedIndex++] = (byte) (b3 << 6 | b4); } return decodedData; } /** * remove WhiteSpace from MIME containing encoded Base64 data. * * @param data * the byte array of base64 data (with WS) * @return the new length */ private static int removeWhiteSpace(char[] data) { if (data == null) { return 0; } // count characters that's not whitespace int newSize = 0; int len = data.length; for (int i = 0; i < len; i++) { if (!isWhiteSpace(data[i])) { data[newSize++] = data[i]; } } return newSize; } }
[ "1139099003@qq.com" ]
1139099003@qq.com
40feeec82ee17715c681b718b9c4729bd6213cb3
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/alipay/mobile/account4insideservice/insideservice/AliAutoLoginService.java
ba969db2395f39c9add37f6a50b190a9d8b44f23
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,244
java
package com.alipay.mobile.account4insideservice.insideservice; import android.os.Bundle; import com.alipay.android.phone.inside.framework.service.IInsideService; import com.alipay.android.phone.inside.framework.service.IInsideServiceCallback; import com.alipay.mobile.account4insideservice.AliAutoLoginProviderImpl; import com.alipay.mobile.account4insideservice.common.Account4InsideBehaviorLogger; import com.alipay.mobile.account4insideservice.common.Account4InsideTraceLogger; import com.alipay.mobile.securitycommon.aliauth.AliAuthConstants.Key; import com.alipay.mobile.securitycommon.aliauth.AliAuthResult; import com.alipay.mobile.securitycommon.aliauth.AliAuthService; import com.alipay.sdk.util.j; import com.taobao.accs.common.Constants; import org.json.JSONObject; public class AliAutoLoginService implements IInsideService<JSONObject, Bundle> { public /* synthetic */ void start(IInsideServiceCallback iInsideServiceCallback, Object obj) throws Exception { String str; String str2; String str3; boolean z; boolean z2; JSONObject jSONObject = (JSONObject) obj; try { Account4InsideBehaviorLogger.a("action", "AliAutoLoginServiceStart"); AliAuthService service = AliAuthService.getService(); service.setAuthProvider(AliAutoLoginProviderImpl.a()); String str4 = ""; String str5 = ""; boolean z3 = false; if (jSONObject != null) { str4 = jSONObject.optString(Key.SOURCE_TYPE); str5 = jSONObject.optString("targetUrl"); z3 = jSONObject.optBoolean(Key.SHOW_UI); z2 = jSONObject.optBoolean(Key.BIND_TAOBAO); z = jSONObject.optBoolean(Key.FORCE_AUTH); str3 = jSONObject.optString("source"); str2 = jSONObject.optString(Key.BIZ_SCENE); str = jSONObject.optString(Key.SAVE_ALI_LOGIN_COOKIE); } else { str2 = ""; str = ""; z = false; str3 = ""; z2 = false; } Bundle bundle = new Bundle(); bundle.putString(Key.SOURCE_TYPE, str4); bundle.putString("targetUrl", str5); bundle.putBoolean(Key.SHOW_UI, z3); bundle.putBoolean(Key.BIND_TAOBAO, z2); bundle.putBoolean(Key.FORCE_AUTH, z); bundle.putString("source", str3); bundle.putString(Key.BIZ_SCENE, str2); bundle.putString(Key.SAVE_ALI_LOGIN_COOKIE, str); AliAuthResult autoLogin = service.autoLogin(bundle); Bundle bundle2 = new Bundle(); if (autoLogin != null) { bundle2.putBoolean("success", autoLogin.success); bundle2.putString("memo", autoLogin.memo); bundle2.putString("ecode", autoLogin.ecode); bundle2.putString("noticeUrl", autoLogin.noticeUrl); bundle2.putString("redirectUrl", autoLogin.redirectUrl); bundle2.putString(Constants.KEY_SID, autoLogin.sid); bundle2.putString("statusAction", autoLogin.statusAction); bundle2.putString(j.a, autoLogin.resultStatus); bundle2.putString("tbNick", autoLogin.tbNick); bundle2.putString("tbUserId", autoLogin.tbUserId); bundle2.putLong("timeStamp", autoLogin.timeStamp); } Account4InsideBehaviorLogger.a("action", "AliAutoLoginResultCode", autoLogin != null ? autoLogin.resultStatus : "resIsNull", "", ""); iInsideServiceCallback.onComplted(bundle2); } catch (Throwable th) { Account4InsideTraceLogger.a("AliAutoLoginService", "AliAutoLoginService_start", th); Account4InsideBehaviorLogger.a("aliautologin", "AliAutoLoginService_start", th); iInsideServiceCallback.onException(th); } } public /* synthetic */ Object startForResult(Object obj) throws Exception { throw new UnsupportedOperationException(); } public /* synthetic */ void start(Object obj) throws Exception { throw new UnsupportedOperationException(); } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
08cde745dd5ea1b283c68a92cb75eaefab8b68c0
2696b09417f4038e1206334d47821807ba5d76f7
/Simulator/src/main/java/simulator/elements/RunElementUserStatistic.java
e129a5dc9c442abe05e98a788054c3bb09177a54
[ "Apache-2.0", "LGPL-3.0-only", "LicenseRef-scancode-proprietary-license", "BSD-3-Clause", "CC-BY-4.0", "CC0-1.0", "CC-BY-3.0", "CDDL-1.1", "CC-BY-NC-4.0", "LGPL-2.1-only", "CC-BY-NC-SA-4.0", "EPL-2.0", "JSON", "CDDL-1.0", "MIT", "LGPL-2.0-or-later", "Zlib", "MPL-2.0", "Classpath-exception-2.0", "GPL-2.0-only", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "PostgreSQL", "LicenseRef-scancode-unknown-license-reference" ]
permissive
A-Herzog/Warteschlangensimulator
d62b39ae58006da5dff497cf993de40f35f0a79b
ea5f804f8d9425c30c0eb666bfee2c96f93e111a
refs/heads/master
2023-09-01T08:50:54.103199
2023-08-31T23:56:23
2023-08-31T23:56:23
253,913,348
31
7
Apache-2.0
2023-07-07T22:09:19
2020-04-07T21:13:47
Java
ISO-8859-1
Java
false
false
6,593
java
/** * Copyright 2020 Alexander Herzog * * 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 simulator.elements; import java.util.List; import language.Language; import simulator.builder.RunModelCreatorStatus; import simulator.coreelements.RunElementPassThrough; import simulator.editmodel.EditModel; import simulator.events.StationLeaveEvent; import simulator.runmodel.RunDataClient; import simulator.runmodel.RunModel; import simulator.runmodel.SimulationData; import simulator.simparser.ExpressionCalc; import ui.modeleditor.coreelements.ModelElement; import ui.modeleditor.elements.ModelElementSub; import ui.modeleditor.elements.ModelElementUserStatistic; /** * Äquivalent zu <code>ModelElementUserStatistic</code> * @author Alexander Herzog * @see ModelElementUserStatistic */ public class RunElementUserStatistic extends RunElementPassThrough { /** Erfassung der Statistikdaten global über alle Kundentypen hinweg? */ private boolean recordModeGlobal; /** Erfassung der Statistikdaten pro Kundentyp? */ private boolean recordModeClientType; /** Array der Nutzerdaten-Statistik-Bezeichner unter denen die Werte erfasst werden sollen */ private String[] keys; /** Array der Angaben, ob die Nutzerdaten Zeitangaben sind oder nicht */ private boolean[] isTime; /** Array der Ausdrücke die ausgewertet und in der Nutzerdaten-Statistik erfasst werden sollen */ private String[] expressions; /** Array der Angaben, ob die Nutzerdaten diskret oder kontinuierlich erfasst werden sollen */ private boolean[] isContinuous; /** * Konstruktor der Klasse * @param element Zugehöriges Editor-Element */ public RunElementUserStatistic(final ModelElementUserStatistic element) { super(element,buildName(element,Language.tr("Simulation.Element.UserStatistic.Name"))); } @Override public Object build(final EditModel editModel, final RunModel runModel, final ModelElement element, final ModelElementSub parent, final boolean testOnly) { if (!(element instanceof ModelElementUserStatistic)) return null; final ModelElementUserStatistic userStatisticElement=(ModelElementUserStatistic)element; final RunElementUserStatistic userStatistic=new RunElementUserStatistic(userStatisticElement); /* Auslaufende Kante */ final String edgeError=userStatistic.buildEdgeOut(userStatisticElement); if (edgeError!=null) return edgeError; /* Statistikgrößen */ userStatistic.recordModeGlobal=userStatisticElement.getRecordMode().containsGlobal; userStatistic.recordModeClientType=userStatisticElement.getRecordMode().containsClientType; final List<String> keys=userStatisticElement.getKeys(); final List<Boolean> isTime=userStatisticElement.getIsTime(); final List<String> expressions=userStatisticElement.getExpressions(); final List<Boolean> isContinuous=userStatisticElement.getIsContinuous(); final int min=Math.min(Math.min(Math.min(keys.size(),expressions.size()),isTime.size()),isContinuous.size()); userStatistic.keys=new String[min]; userStatistic.isTime=new boolean[min]; userStatistic.isContinuous=new boolean[min]; userStatistic.expressions=new String[min]; for (int i=0;i<min;i++) { final String s=keys.get(i).trim(); if (s.isEmpty()) return String.format(Language.tr("Simulation.Creator.StatisticKeyMissing"),i+1,element.getId()); userStatistic.keys[i]=s; userStatistic.isTime[i]=isTime.get(i); final String t=expressions.get(i).trim(); if (t.isEmpty()) return String.format(Language.tr("Simulation.Creator.StatisticExpressionMissing"),i+1,element.getId()); final ExpressionCalc calc=new ExpressionCalc(runModel.variableNames); final int error=calc.parse(t); if (error>=0) return String.format(Language.tr("Simulation.Creator.StatisticExpressionInvalid"),i+1,element.getId(),error+1); userStatistic.expressions[i]=t; userStatistic.isContinuous[i]=isContinuous.get(i); } return userStatistic; } @Override public RunModelCreatorStatus test(final ModelElement element) { if (!(element instanceof ModelElementUserStatistic)) return null; final ModelElementUserStatistic userStatisticElement=(ModelElementUserStatistic)element; /* Auslaufende Kante */ final RunModelCreatorStatus edgeError=testEdgeOut(userStatisticElement); if (edgeError!=null) return edgeError; /* Statistikgrößen */ final List<String> keys=userStatisticElement.getKeys(); final List<String> expressions=userStatisticElement.getExpressions(); final int min=Math.min(keys.size(),expressions.size()); for (int i=0;i<min;i++) { final String s=keys.get(i).trim(); if (s.isEmpty()) return new RunModelCreatorStatus(String.format(Language.tr("Simulation.Creator.StatisticKeyMissing"),i+1,element.getId())); final String t=expressions.get(i).trim(); if (t.isEmpty()) return new RunModelCreatorStatus(String.format(Language.tr("Simulation.Creator.StatisticExpressionMissing"),i+1,element.getId())); } return RunModelCreatorStatus.ok; } @Override public RunElementUserStatisticData getData(final SimulationData simData) { RunElementUserStatisticData data; data=(RunElementUserStatisticData)(simData.runData.getStationData(this)); if (data==null) { data=new RunElementUserStatisticData(this,recordModeGlobal,recordModeClientType,keys,isTime,expressions,isContinuous,simData.runModel.variableNames,simData.runModel.clientTypes); simData.runData.setStationData(this,data); } return data; } @Override public void processArrival(final SimulationData simData, final RunDataClient client) { /* Logging */ if (simData.loggingActive) log(simData,Language.tr("Simulation.Log.UserStatistic"),String.format(Language.tr("Simulation.Log.UserStatistic.Info"),client.logInfo(simData),name)); /* Statistikerfassung durchführen */ if (!simData.runData.isWarmUp) getData(simData).processClient(simData,client); /* Kunde zur nächsten Station leiten */ StationLeaveEvent.addLeaveEvent(simData,client,this,0); } }
[ "alexander.herzog@gmx.de" ]
alexander.herzog@gmx.de
c5f259f1254472ed3d48b94af663540fcb744fd9
e31e6de6ec1587d4e94d0ef3a17e3ac4d0df3ff9
/src/sunfish/SunFishApp.java
909492c04feee2b8e77faa4e805fdf2688ccf536
[]
no_license
drilett/SunFish
a588d238c0f21dbf241e95897d86180206b01c35
ea895dc49568f0ee1fbb005b7d641258b41bb133
refs/heads/master
2021-01-22T08:32:35.817203
2011-10-25T13:55:49
2011-10-25T13:55:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,436
java
/* * SunFishApp.java */ package sunfish; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.List; import java.util.Properties; import java.util.logging.Logger; import display.Display; import plugin.Plugin; import plugin.PluginLoader; import plugin.PluginLoaderException; import topLevelGUI.FileParser; import topLevelGUI.SunFishFrame; import topLevelGUI.analyzer.Analyzable; import errorHandling.ErrorWindow; /** * The main class of the application. This is responsible for loading properties and creating the main window */ public class SunFishApp { private static Logger logger = Logger.getLogger(SunFishApp.class.getName()); public static final String userPropsFilename = "sunfishuser.props"; public static final String defaultPropsFilename = "sunfishdefault.props"; static SunFishApp sunfishApp; SunFishFrame sunfish; protected Properties loadDefaultProperties() { Properties defaultProps = new Properties(); String propsFilename = defaultPropsFilename; final String homeDir = System.getProperty("user.home"); final String fileSep = System.getProperty("file.separator"); final String thisDir = System.getProperty("user.dir"); //The following string determines the String[] propsPaths ={"", thisDir + fileSep, homeDir + fileSep + "SunFish" + fileSep}; boolean loadedProps = false; int pathIndex = 0; //Loop through the various directories looking for anything with the name sunfishdefault.props while (!loadedProps && pathIndex < propsPaths.length) { String fullPath = propsPaths[pathIndex] + propsFilename; pathIndex++; try { FileInputStream in = new FileInputStream(fullPath); defaultProps.load(in); logger.info("Found default props in : " + fullPath); in.close(); loadedProps = true; } catch (IOException ioe) { //Shouldn't worry about this.. } } if (loadedProps == false) { ErrorWindow.showErrorWindow(new FileNotFoundException("Could not find default properties file"), logger); logger.warning("Could not find an appropriate properties file"); } return defaultProps; } protected Properties loadUserProperties(Properties defaultProps) { Properties userProps; if (defaultProps != null) userProps = new Properties(defaultProps); else userProps = new Properties(); String propsFilename = userPropsFilename; final String homeDir = System.getProperty("user.home"); final String fileSep = System.getProperty("file.separator"); final String thisDir = System.getProperty("user.dir"); //The following string determines the String[] propsPaths ={"", thisDir + fileSep, homeDir + fileSep + "SunFish" + fileSep}; boolean loadedProps = false; int pathIndex = 0; //Loop through the various directories looking for anything with the name sunfishdefault.props while (!loadedProps && pathIndex < propsPaths.length) { String fullPath = propsPaths[pathIndex] + propsFilename; pathIndex++; try { FileInputStream in = new FileInputStream(fullPath); userProps.load(in); logger.info("Found user props in : " + fullPath); in.close(); loadedProps = true; userProps.setProperty("this.path", propsPaths[pathIndex]); } catch (IOException ioe) { //Shouldn't worry about this.. } } return userProps; } protected void loadPlugins(SunFishFrame sunfish) { PluginLoader loader = new PluginLoader("plugins"); try { loader.loadAllPlugins(); } catch (PluginLoaderException e) { ErrorWindow.showErrorWindow(e); } List<Plugin> plugins = loader.getPlugins(); for(Plugin plugin : plugins) { try { List<Display> displays = plugin.getDisplays(); for(Display display : displays) { String msg = "Registering display: " + display.getName() + " version: " + display.getVersionNumber(); logger.info(msg); } sunfish.registerDisplays(displays); List<FileParser> parsers = plugin.getParsers(); for(FileParser parser : parsers) { String msg = "Registering parser: " + parser.getName() + " version: " + parser.getVersionNumber(); logger.info(msg); } sunfish.registerParsers(parsers); List<Analyzable> analyzers = plugin.getAnalyzers(); //do we ever want to do this? } catch (java.lang.NoClassDefFoundError err) { ErrorWindow.showErrorWindow(new PluginLoaderException("Error loading class: " + err.getMessage())); } } } /** * At startup create and show the main frame of the application. */ protected void startup() { try { //Attempt to load properties .. Properties defaultProps = loadDefaultProperties(); Properties userProps = loadUserProperties(defaultProps); sunfishApp = this; sunfish = new SunFishFrame(logger, userProps); sunfish.setVisible(true); loadPlugins(sunfish); sunfish.associateParsers(); sunfish.reopenFiles(); } catch (Exception ex) { ErrorWindow.showErrorWindow(ex, logger); } } /** * Called on application shutdown. We do two things here - close all of the displays so the * user can chose to save any if there are unsaved changed, and then we write all properties to * the properties file. */ public void shutdown() { sunfish.writeProperties(); boolean cancelled = sunfish.getDisplayPane().closeAndPromptToSave(); //This should come after writeProperties since prop //writing looks at the display pane to remember which displays are open. if (! cancelled) System.exit(0); } /** * A convenient static getter for the application instance. * @return the instance of SunFishApp */ public static SunFishApp getApplication() { return sunfishApp; } public static void launchApplication() { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { SunFishApp app = new SunFishApp(); app.startup(); } }); } /** * Main method launching the application. */ public static void main(String[] args) { launchApplication(); } }
[ "brendanofallon@fastmail.fm" ]
brendanofallon@fastmail.fm
51ae7697699c0a4fc36b635fb8b2c339b9607177
2977d049607c093471f48b7089b741590f7a7399
/LanqiaoOJ/2014lanqiaoOJ/src/Test21位水仙花数2.java
71c222de65af546d9e9b0d2889da77a137fac556
[]
no_license
Silocean/JustForFun
dfc78f815e1ceeef0c2d485bd1718ae9b53c9e2b
185b6dd815ebeba786c479fd9e40a3c9e5d3ef74
refs/heads/master
2021-01-11T06:06:02.830713
2019-01-21T13:13:08
2019-01-21T13:13:08
71,687,465
1
1
null
null
null
null
GB18030
Java
false
false
1,667
java
import java.math.BigInteger; public class Test21位水仙花数2 { public static int[] count = new int[10]; public static int[] count2 = new int[10]; public static BigInteger[] number = new BigInteger[10]; public static void main(String[] args) { long start = System.currentTimeMillis(); init(); go(0, 0, 0); long end = System.currentTimeMillis(); System.out.println((end-start)/1000 + "秒"); } public static void init() { for(int i=0; i<number.length; i++) { number[i] = new BigInteger(String.valueOf(i)).pow(21); } } /* * 递归方法找出0~9每个数可能出现的次数 */ public static void go(int index, int use, int num) { if(index == 9) { count[index] = 21 - use; /*for(int i=0; i<count.length; i++) { System.out.print(count[i] + " "); } System.out.println();*/ judge(number, count); for(int i=0; i<10; i++) { count2[i] = 0; } return; } else { for(int i=0; i<=21-use; i++) { count[index] = i; go(index+1, use+i, i); } } } public static void judge(BigInteger[] number, int[] count) { boolean flag = true; BigInteger sum = BigInteger.ZERO; for(int i=0; i<10; i++) { sum = sum.add(number[i].multiply(new BigInteger(String.valueOf(count[i])))); } String str = String.valueOf(sum); if(str.length() != 21) { return; } else { for(int i=0; i<str.length(); i++) { int m = str.charAt(i) - '0'; for(int j=0; j<10; j++) { if(m==j) { count2[j] ++; } } } for(int i=0; i<10; i++) { if(count[i] != count2[i]) { flag = false; return; } } if(flag) { System.out.println(str); } } } }
[ "silenceocean@live.com" ]
silenceocean@live.com
e44d8b1746e87c97099e1ff82721296bf9c23d98
25346f238005b26857afb2a635c325ffa24a95d7
/amems/src/main/java/enu/common/DocumentEnum.java
4f591f5595bd1285cb80e07e75a489a03693643a
[]
no_license
xyd104449/amems
93491ff8fcf1d0650a9af764fa1fa38d7a25572a
74a0ef8dc31d27ee5d1a0e91ff4d74af47b08778
refs/heads/master
2021-09-15T03:21:15.399980
2018-05-25T03:15:58
2018-05-25T03:15:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,062
java
package enu.common; /** * @Description 文档模块枚举 * @CreateTime 2017-9-5 下午3:11:22 * @CreateBy 刘兵 */ public enum DocumentEnum { FD_ZLWD("FD_ZLWD", "质量文档") ,FD_SCWD("FD_SCWD", "手册文档") ,FD_GCWD("FD_GCWD", "工程文档") ,WDGL_SC("WDGL_SC", "生产文档") ,WDGL_PX("WDGL_PX", "培训文档") ,WDGL_HC("WDGL_HC", "航材文档") ; private String code; private String name; private DocumentEnum(String code, String name) { this.code = code; this.name = name; } public static String getName(String code) { for (DocumentEnum c : DocumentEnum.values()) { if (c.getCode().equals(code)) { return c.name; } } return null; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } }
[ "903654879@qq.com" ]
903654879@qq.com
a4694131ee083dc6e1c3c597c1e885b6cc7604a7
9965a5193c8230acbb0e7a7caa468c7dc9b4a099
/src/test/java/chap10/survey/Question.java
1130ccea46a2d6ccd857d66944289e39682fc01d
[]
no_license
eeswk/myTdd
3e0e65062a4815f2416583c57b53123e41d7799c
f922dc906e4db19ed021dc125c0c828bc622fb3a
refs/heads/master
2021-03-12T10:38:31.132621
2020-04-02T15:17:38
2020-04-02T15:17:38
246,613,083
0
0
null
2023-09-08T12:20:36
2020-03-11T15:46:42
Java
UTF-8
Java
false
false
325
java
package chap10.survey; import java.util.List; public class Question { private int number; private String question; private List<Item> itmes; public Question(int number, String question, List<Item> itmes) { this.number = number; this.question = question; this.itmes = itmes; } }
[ "themorning84@gmail.com" ]
themorning84@gmail.com
4e15677db2673c461ae89ab3340fb1b7cda040c7
06780aeb787b2dd60e6872631b9dfea4c846545d
/KalturaClient/src/main/java/com/kaltura/client/types/BeaconBaseFilter.java
622d8af41da8e24bfd0eccfdd384ecb3873b2fbe
[]
no_license
fossabot/KalturaGeneratedAPIClientsAndroid
e74d31a9c86ca06f63cd5107bf3bda5fc4763a92
ad556110aebe9bebde7b5bf41d5a6332ba9033b8
refs/heads/master
2020-05-30T07:01:09.265490
2019-05-31T12:42:51
2019-05-31T12:42:51
189,592,106
0
0
null
2019-05-31T12:42:46
2019-05-31T12:42:45
null
UTF-8
Java
false
false
6,809
java
// =================================================================================================== // _ __ _ _ // | |/ /__ _| | |_ _ _ _ _ __ _ // | ' </ _` | | _| || | '_/ _` | // |_|\_\__,_|_|\__|\_,_|_| \__,_| // // This file is part of the Kaltura Collaborative Media Suite which allows users // to do with audio, video, and animation what Wiki platfroms allow them to do with // text. // // Copyright (C) 2006-2019 Kaltura Inc. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // // @ignore // =================================================================================================== package com.kaltura.client.types; import android.os.Parcel; import com.google.gson.JsonObject; import com.kaltura.client.Params; import com.kaltura.client.enums.BeaconObjectTypes; import com.kaltura.client.utils.GsonParser; import com.kaltura.client.utils.request.MultiRequestBuilder; /** * This class was generated using generate.php * against an XML schema provided by Kaltura. * * MANUAL CHANGES TO THIS CLASS WILL BE OVERWRITTEN. */ @SuppressWarnings("serial") @MultiRequestBuilder.Tokenizer(BeaconBaseFilter.Tokenizer.class) public abstract class BeaconBaseFilter extends Filter { public interface Tokenizer extends Filter.Tokenizer { String updatedAtGreaterThanOrEqual(); String updatedAtLessThanOrEqual(); String relatedObjectTypeIn(); String relatedObjectTypeEqual(); String eventTypeIn(); String objectIdIn(); } private Integer updatedAtGreaterThanOrEqual; private Integer updatedAtLessThanOrEqual; private String relatedObjectTypeIn; private BeaconObjectTypes relatedObjectTypeEqual; private String eventTypeIn; private String objectIdIn; // updatedAtGreaterThanOrEqual: public Integer getUpdatedAtGreaterThanOrEqual(){ return this.updatedAtGreaterThanOrEqual; } public void setUpdatedAtGreaterThanOrEqual(Integer updatedAtGreaterThanOrEqual){ this.updatedAtGreaterThanOrEqual = updatedAtGreaterThanOrEqual; } public void updatedAtGreaterThanOrEqual(String multirequestToken){ setToken("updatedAtGreaterThanOrEqual", multirequestToken); } // updatedAtLessThanOrEqual: public Integer getUpdatedAtLessThanOrEqual(){ return this.updatedAtLessThanOrEqual; } public void setUpdatedAtLessThanOrEqual(Integer updatedAtLessThanOrEqual){ this.updatedAtLessThanOrEqual = updatedAtLessThanOrEqual; } public void updatedAtLessThanOrEqual(String multirequestToken){ setToken("updatedAtLessThanOrEqual", multirequestToken); } // relatedObjectTypeIn: public String getRelatedObjectTypeIn(){ return this.relatedObjectTypeIn; } public void setRelatedObjectTypeIn(String relatedObjectTypeIn){ this.relatedObjectTypeIn = relatedObjectTypeIn; } public void relatedObjectTypeIn(String multirequestToken){ setToken("relatedObjectTypeIn", multirequestToken); } // relatedObjectTypeEqual: public BeaconObjectTypes getRelatedObjectTypeEqual(){ return this.relatedObjectTypeEqual; } public void setRelatedObjectTypeEqual(BeaconObjectTypes relatedObjectTypeEqual){ this.relatedObjectTypeEqual = relatedObjectTypeEqual; } public void relatedObjectTypeEqual(String multirequestToken){ setToken("relatedObjectTypeEqual", multirequestToken); } // eventTypeIn: public String getEventTypeIn(){ return this.eventTypeIn; } public void setEventTypeIn(String eventTypeIn){ this.eventTypeIn = eventTypeIn; } public void eventTypeIn(String multirequestToken){ setToken("eventTypeIn", multirequestToken); } // objectIdIn: public String getObjectIdIn(){ return this.objectIdIn; } public void setObjectIdIn(String objectIdIn){ this.objectIdIn = objectIdIn; } public void objectIdIn(String multirequestToken){ setToken("objectIdIn", multirequestToken); } public BeaconBaseFilter() { super(); } public BeaconBaseFilter(JsonObject jsonObject) throws APIException { super(jsonObject); if(jsonObject == null) return; // set members values: updatedAtGreaterThanOrEqual = GsonParser.parseInt(jsonObject.get("updatedAtGreaterThanOrEqual")); updatedAtLessThanOrEqual = GsonParser.parseInt(jsonObject.get("updatedAtLessThanOrEqual")); relatedObjectTypeIn = GsonParser.parseString(jsonObject.get("relatedObjectTypeIn")); relatedObjectTypeEqual = BeaconObjectTypes.get(GsonParser.parseString(jsonObject.get("relatedObjectTypeEqual"))); eventTypeIn = GsonParser.parseString(jsonObject.get("eventTypeIn")); objectIdIn = GsonParser.parseString(jsonObject.get("objectIdIn")); } public Params toParams() { Params kparams = super.toParams(); kparams.add("objectType", "KalturaBeaconBaseFilter"); kparams.add("updatedAtGreaterThanOrEqual", this.updatedAtGreaterThanOrEqual); kparams.add("updatedAtLessThanOrEqual", this.updatedAtLessThanOrEqual); kparams.add("relatedObjectTypeIn", this.relatedObjectTypeIn); kparams.add("relatedObjectTypeEqual", this.relatedObjectTypeEqual); kparams.add("eventTypeIn", this.eventTypeIn); kparams.add("objectIdIn", this.objectIdIn); return kparams; } @Override public void writeToParcel(Parcel dest, int flags) { super.writeToParcel(dest, flags); dest.writeValue(this.updatedAtGreaterThanOrEqual); dest.writeValue(this.updatedAtLessThanOrEqual); dest.writeString(this.relatedObjectTypeIn); dest.writeInt(this.relatedObjectTypeEqual == null ? -1 : this.relatedObjectTypeEqual.ordinal()); dest.writeString(this.eventTypeIn); dest.writeString(this.objectIdIn); } public BeaconBaseFilter(Parcel in) { super(in); this.updatedAtGreaterThanOrEqual = (Integer)in.readValue(Integer.class.getClassLoader()); this.updatedAtLessThanOrEqual = (Integer)in.readValue(Integer.class.getClassLoader()); this.relatedObjectTypeIn = in.readString(); int tmpRelatedObjectTypeEqual = in.readInt(); this.relatedObjectTypeEqual = tmpRelatedObjectTypeEqual == -1 ? null : BeaconObjectTypes.values()[tmpRelatedObjectTypeEqual]; this.eventTypeIn = in.readString(); this.objectIdIn = in.readString(); } }
[ "community@kaltura.com" ]
community@kaltura.com
b102f7f30ec6fe05ea0f38f1ae44ab856e48bcd1
3bd551e46f30a6a5bcdd6510694ce940daa8c3f2
/1.8.9-Forge/src/main/java/net/ccbluex/liquidbounce/ui/GuiWelcome.java
9357a978aad641100a79d8680bcbe844c1b72f4d
[ "WTFPL" ]
permissive
GithubKingXingXing/LiquidBounce-b62-deobfed
64864ab598c0377ddc00feb5fd862ff295e2e228
a0d6b871de14014a3083f9997d967bc40c0517b5
refs/heads/main
2022-12-31T12:48:08.547416
2020-10-21T15:30:31
2020-10-21T15:30:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,727
java
package net.ccbluex.liquidbounce.ui; import net.ccbluex.liquidbounce.ui.mainmenu.GuiMainMenu; import java.io.IOException; import java.awt.Color; import org.lwjgl.opengl.GL11; import org.lwjgl.input.Keyboard; import net.ccbluex.liquidbounce.features.module.ModuleManager; import net.ccbluex.liquidbounce.features.module.modules.render.ClickGUI; import net.ccbluex.liquidbounce.ui.font.Fonts; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; public class GuiWelcome extends GuiScreen { public void initGui() { this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height - 40, "Ok")); } public void drawScreen(final int mouseX, final int mouseY, final float partialTicks) { this.drawBackground(0); Fonts.font35.drawCenteredString("Thank you for downloading and installing our client!", this.width / 2, this.height / 8 + 70, 16777215, true); Fonts.font35.drawCenteredString("Here is some information you might need if you are using liquidbounce for the first time.", this.width / 2, this.height / 8 + 70 + Fonts.font35.FONT_HEIGHT, 16777215, true); Fonts.font35.drawCenteredString("§lClickGUI:", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 3, 16777215, true); Fonts.font35.drawCenteredString("Press " + Keyboard.getKeyName(ModuleManager.getModule(ClickGUI.class).getKeyBind()) + " to open up the ClickGUI", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 4, 16777215, true); Fonts.font35.drawCenteredString("Rightclick modules with a little + next to it to edit it's settings.", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 5, 16777215, true); Fonts.font35.drawCenteredString("Hover a module to see what it does.", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 6, 16777215, true); Fonts.font35.drawCenteredString("§lImportant Commands:", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 8, 16777215, true); Fonts.font35.drawCenteredString(".bind <module> <key> / .bind <module> none", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 9, 16777215, true); Fonts.font35.drawCenteredString(".autosettings <servername>", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 10, 16777215, true); Fonts.font35.drawCenteredString("§lNeed help? Feel free to contact us!", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 12, 16777215, true); Fonts.font35.drawCenteredString("YouTube: https://youtube.com/ccbluex", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 13, 16777215, true); Fonts.font35.drawCenteredString("Twitter: https://twitter.com/ccbluex", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 14, 16777215, true); Fonts.font35.drawCenteredString("Forum: https://forum.ccbluex.net/", this.width / 2, this.height / 8 + 80 + Fonts.font35.FONT_HEIGHT * 15, 16777215, true); super.drawScreen(mouseX, mouseY, partialTicks); GL11.glScalef(2.0f, 2.0f, 2.0f); Fonts.font40.drawCenteredString("Welcome!", this.width / 2 / 2, this.height / 8 / 2 + 20, new Color(0, 140, 255).getRGB(), true); } protected void keyTyped(final char typedChar, final int keyCode) throws IOException { if (1 == keyCode) { return; } super.keyTyped(typedChar, keyCode); } protected void actionPerformed(final GuiButton button) { switch (button.id) { case 1: { this.mc.displayGuiScreen((GuiScreen)new GuiMainMenu()); break; } } } }
[ "55242111+TheFleksisCekcu@users.noreply.github.com" ]
55242111+TheFleksisCekcu@users.noreply.github.com
83be4d9d50c957b26cbbf4a35de693675e7eaf50
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_fb352273cff8a0499a20d16f6a39c438d216f2be/Pack200ProcessorTest/18_fb352273cff8a0499a20d16f6a39c438d216f2be_Pack200ProcessorTest_t.java
3b6f97182fc56cafec5eef7a99197a568cbb92c5
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,907
java
/******************************************************************************* * Copyright (c) 2007, 2008 IBM Corporation and others. * All rights reserved. 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 * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.equinox.p2.tests.artifact.processors; import java.io.*; import java.util.Arrays; import junit.framework.TestCase; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.artifact.processors.pack200.Pack200ProcessorStep; import org.eclipse.equinox.internal.p2.core.helpers.FileUtils; import org.eclipse.equinox.internal.p2.jarprocessor.PackStep; import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep; import org.eclipse.equinox.p2.tests.TestActivator; import org.osgi.framework.Bundle; public class Pack200ProcessorTest extends TestCase { public Pack200ProcessorTest(String name) { super(name); } public Pack200ProcessorTest() { super(""); } public void testUnpack() throws IOException { //this test is only applicable if pack200 is available if (!PackStep.canPack()) return; // Setup the processor ProcessingStep step = new Pack200ProcessorStep(); ByteArrayOutputStream destination = new ByteArrayOutputStream(); step.link(destination, new NullProgressMonitor()); // drive the source data through the step Bundle bundle = TestActivator.getContext().getBundle(); InputStream inputStream = bundle.getEntry("testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz").openStream(); FileUtils.copyStream(inputStream, true, step, true); // Get the test data inputStream = bundle.getEntry("testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar").openStream(); ByteArrayOutputStream expected = new ByteArrayOutputStream(); FileUtils.copyStream(inputStream, true, expected, true); // Compare assertTrue(Arrays.equals(expected.toByteArray(), destination.toByteArray())); } public void testUnpackFailsBecauseOfZeroLengthPackedFile() throws IOException { // Setup the processor ProcessingStep step = new Pack200ProcessorStep(); ByteArrayOutputStream destination = new ByteArrayOutputStream(); step.link(destination, new NullProgressMonitor()); // drive the source data (zero length) through the step InputStream inputStream = new ByteArrayInputStream(new byte[0]); FileUtils.copyStream(inputStream, true, step, true); // This must fail, i.e. the status is not ok! assertFalse(step.getStatus().isOK()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4ef1ee5ef3f16063f1f94903548b9710177b4e1d
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
/DDRemix/src/com/puttysoftware/ddremix/maze/effects/UTurned.java
adb8ba84caab12193303f93d296bafd9be56d5bf
[ "Unlicense" ]
permissive
retropipes/older-java-games
777574e222f30a1dffe7936ed08c8bfeb23a21ba
786b0c165d800c49ab9977a34ec17286797c4589
refs/heads/master
2023-04-12T14:28:25.525259
2021-05-15T13:03:54
2021-05-15T13:03:54
235,693,016
0
0
null
null
null
null
UTF-8
Java
false
false
1,424
java
/* DDRemix: An RPG Copyright (C) 2008-2010 Eric Ahnell Any questions should be directed to the author via email at: mazer5d@worldwizard.net */ package com.puttysoftware.ddremix.maze.effects; import com.puttysoftware.ddremix.maze.utilities.DirectionConstants; public class UTurned extends MazeEffect { // Constructor public UTurned(final int newRounds) { super("U-Turned", newRounds); } @Override public int modifyMove1(final int arg) { switch (arg) { case DirectionConstants.DIRECTION_NORTH: return DirectionConstants.DIRECTION_SOUTH; case DirectionConstants.DIRECTION_SOUTH: return DirectionConstants.DIRECTION_NORTH; case DirectionConstants.DIRECTION_WEST: return DirectionConstants.DIRECTION_EAST; case DirectionConstants.DIRECTION_EAST: return DirectionConstants.DIRECTION_WEST; case DirectionConstants.DIRECTION_NORTHWEST: return DirectionConstants.DIRECTION_SOUTHEAST; case DirectionConstants.DIRECTION_NORTHEAST: return DirectionConstants.DIRECTION_SOUTHWEST; case DirectionConstants.DIRECTION_SOUTHWEST: return DirectionConstants.DIRECTION_NORTHEAST; case DirectionConstants.DIRECTION_SOUTHEAST: return DirectionConstants.DIRECTION_NORTHWEST; default: break; } return 0; } }
[ "eric.ahnell@puttysoftware.com" ]
eric.ahnell@puttysoftware.com
a77444bd4ba4cd54c9867dd9cbafc169d968d812
2f335445c48265fd9790fed06713601d340ad342
/src/main/java/net/shopxx/dao/NavigationDao.java
ce32f8ff43aecb8f5d485af10e6f00665033c797
[]
no_license
liongo/vggo
70ed7deabda43dd5a1a7b35b8fe439359d97c623
02026802f9f6aa475460cadb02a89aff6ce2ed71
refs/heads/master
2021-01-22T01:28:52.667906
2015-09-01T09:37:24
2015-09-01T09:37:24
58,535,396
1
0
null
2016-05-11T10:25:29
2016-05-11T10:25:28
null
UTF-8
Java
false
false
542
java
/* * Copyright 2005-2015 shopxx.net. All rights reserved. * Support: http://www.shopxx.net * License: http://www.shopxx.net/license */ package net.shopxx.dao; import java.util.List; import net.shopxx.entity.Navigation; /** * Dao - 导航 * * @author SHOP++ Team * @version 4.0 */ public interface NavigationDao extends BaseDao<Navigation, Long> { /** * 查找导航 * * @param position * 位置 * @return 导航 */ List<Navigation> findList(Navigation.Position position); }
[ "zhao.wang01@jrj.com.cn" ]
zhao.wang01@jrj.com.cn
415c7d260f62fac662114637f8c7d53ad9edfcf1
97a4b3ab4021b9785f6bb26d7198df01b80120b4
/actor-apps/core/src/main/java/im/actor/model/network/connection/AsyncConnectionInterface.java
8eeddaa80578834a03810c53df306da8457ffdf0
[ "MIT" ]
permissive
DragonStuff/actor-platform
473c3b1d9b0c842b8f5fc591d7d874a3aa7ab584
d262e6bb3c18b20eb35551313bce16c471cd2928
refs/heads/master
2021-01-18T17:10:17.176242
2015-07-15T22:27:36
2015-07-15T22:27:36
39,132,856
0
0
MIT
2020-07-26T04:03:53
2015-07-15T11:20:21
Objective-C
UTF-8
Java
false
false
387
java
/* * Copyright (C) 2015 Actor LLC. <https://actor.im> */ package im.actor.model.network.connection; import com.google.j2objc.annotations.ObjectiveCName; public interface AsyncConnectionInterface { @ObjectiveCName("onConnected") void onConnected(); @ObjectiveCName("onReceived:") void onReceived(byte[] data); @ObjectiveCName("onClosed") void onClosed(); }
[ "me@ex3ndr.com" ]
me@ex3ndr.com
1bf51067bcf6b4c91dd19b27886a521037b98463
9a857d1407cf27764f402399adb9fc81c3511b6c
/src/20141123/partner-sdk/src/main/java/com/lodogame/ldsg/partner/sdk/KuaiBoSdk.java
3050f9801a25401a164988ed400e369517a6ab13
[]
no_license
zihanbobo/smsg-server
fcfec6fc6b55441d7ab64bb8b769d072752592c0
abfebf8b1fff83332090b922e390b892483da6ed
refs/heads/master
2021-06-01T00:01:43.208825
2016-05-10T10:10:01
2016-05-10T10:10:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,050
java
package com.lodogame.ldsg.partner.sdk; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Properties; import org.apache.log4j.Logger; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.support.PropertiesLoaderUtils; import com.lodogame.game.utils.MD5; import com.lodogame.game.utils.UrlRequestUtils; import com.lodogame.game.utils.UrlRequestUtils.Mode; import com.lodogame.game.utils.json.Json; import com.lodogame.ldsg.partner.model.kuaibo.KuaiBoPaymentObj; public class KuaiBoSdk extends BaseSdk { private static final Logger logger = Logger.getLogger(KuaiBoSdk.class); private static KuaiBoSdk ins; private static Properties prop; private final static String PROTOCOL_HEAD = "http://"; private String partnerId; private String apiKey; private String appId; private String host; private String requetCode; public static KuaiBoSdk instance() { synchronized (KuaiBoSdk.class) { if (ins == null) { ins = new KuaiBoSdk(); } } return ins; } private KuaiBoSdk() { loadSdkProperties(); } public void reload(){ loadSdkProperties(); } private void loadSdkProperties() { try { prop = PropertiesLoaderUtils.loadProperties(new ClassPathResource("sdk.properties")); appId = prop.getProperty("KuaiBoSdk.appId"); apiKey = prop.getProperty("KuaiBoSdk.appKey"); partnerId = prop.getProperty("KuaiBoSdk.partnerId"); host = prop.getProperty("KuaiBoSdk.host"); requetCode = prop.getProperty("KuaiBoSdk.requetCode"); } catch (IOException e) { throw new RuntimeException(e); } } public boolean verifySession(String session, String uid){ String url = PROTOCOL_HEAD + host; Map<String, String> params = new HashMap<String, String>(); params.put("MerId",getAppId()); params.put("Act",getRequetCode()); params.put("Uin",uid); params.put("SessionKey",session); String sign = ""; try { sign = loginMakeSign(session,uid); params.put("EncString", sign); } catch (Exception e) { logger.error(e.getMessage(), e); } String jsonStr = UrlRequestUtils.execute(url, params, Mode.GET); Map<String, Object> ret = Json.toObject(jsonStr, Map.class); if(ret != null && ret.containsKey("ErrorCode") && ret.get("ErrorCode").equals(1)){ return true; } return false; } public boolean checkPayCallbackSign(KuaiBoPaymentObj cb) { try { String sign = MD5.MD5Encode(cb.getMerId()+cb.getOrderId()+cb.getMoney()+getApiKey()); if(sign.equals(cb.getEncString())){ return true; } } catch (Exception e) { logger.error(e.getMessage(), e); } return false; } private String loginMakeSign(String token,String uid) throws Exception{ return MD5.MD5Encode(getAppId()+getRequetCode()+uid+token+getApiKey()); } public String getPartnerId() { return partnerId; } public String getApiKey() { return apiKey; } public String getAppId() { return appId; } public String getHost() { return host; } public String getRequetCode() { return requetCode; } }
[ "dogdog7788@qq.com" ]
dogdog7788@qq.com
a6d21713b0faff8e48ca1238bc39579412cc9a26
7889c6d8f2e4314b777fe9ff2af02e742fd3f35a
/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/stats/JettyWebConnectorStatsImpl.java
11646a326d2602fd8271de6678ec168141361e81
[ "LicenseRef-scancode-generic-cla", "LGPL-2.1-or-later", "MPL-1.1", "JSON", "LGPL-2.1-only", "MPL-1.0", "Apache-2.0", "LicenseRef-scancode-unknown", "X11", "W3C", "GPL-1.0-or-later", "CPL-1.0", "LicenseRef-scancode-oracle-openjdk-exception-2.0", "W3C-19980720", "LicenseRef-scancode-indiana-extreme", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "EPL-1.0", "AFL-2.1", "LGPL-2.0-or-later", "LicenseRef-scancode-warranty-disclaimer", "Apache-1.1", "GPL-2.0-only", "Plexus", "xpp", "CDDL-1.0", "MIT", "BSD-2-Clause" ]
permissive
apache/geronimo
62a342bd56d55fbcc614a62df85ec55b4f8c19c6
9a930877a047348d82ba5b3b544ffa55af5b150f
refs/heads/trunk
2023-08-22T08:17:26.852926
2013-03-21T00:35:41
2013-03-21T00:35:41
240,468
27
34
Apache-2.0
2023-07-25T17:23:50
2009-07-01T08:09:43
Java
UTF-8
Java
false
false
3,812
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.geronimo.management.geronimo.stats; import org.apache.geronimo.management.stats.CountStatisticImpl; import org.apache.geronimo.management.stats.RangeStatisticImpl; import org.apache.geronimo.management.stats.StatisticImpl; import org.apache.geronimo.management.stats.TimeStatisticImpl; import org.apache.geronimo.management.stats.StatsImpl; import org.apache.geronimo.management.stats.WebConnectorStatsImpl; import javax.management.j2ee.statistics.RangeStatistic; import javax.management.j2ee.statistics.TimeStatistic; import javax.management.j2ee.statistics.CountStatistic; /** * Jetty Web Connector class for JSR-77 stats. */ public class JettyWebConnectorStatsImpl extends WebConnectorStatsImpl implements JettyWebConnectorStats { private CountStatisticImpl requestCount; private TimeStatisticImpl connectionsDuration; private RangeStatisticImpl connectionsRequest; public JettyWebConnectorStatsImpl() { requestCount = new CountStatisticImpl("Request Count", StatisticImpl.UNIT_COUNT, "Total number of requests made to server", 0); connectionsDuration = new TimeStatisticImpl("Connections Duration", StatisticImpl.UNIT_TIME_MILLISECOND, "Duration of a connection"); connectionsRequest = new RangeStatisticImpl("Connections Request", StatisticImpl.UNIT_COUNT, "Range for connections requested during the observed period", 0); // all 0's addStat("RequestCount", requestCount); addStat("ConnectionsDuration", connectionsDuration); addStat("ConnectionsRequest", connectionsRequest); } /** * Gets the number of request count since statistics gathering started. */ public CountStatistic getRequestCount() { return requestCount; } /** * Gets the avg, min, max, and total connection duration time since * statistics gathering started. */ public TimeStatistic getConnectionsDuration() { return connectionsDuration; } /** * Gets the min, max, current number of connection requests since statistics gathering started. */ public RangeStatistic getConnectionsRequest() { return connectionsRequest; } /** * Gets the number of request count since statistics gathering started. */ public CountStatisticImpl getRequestCountImpl() { return requestCount; } /** * Gets the count, min, max, and total connection duration time since * statistics gathering started. The avg is total/count */ public TimeStatisticImpl getConnectionsDurationImpl() { return connectionsDuration; } /** * Gets the min, max, current number of connection requests since statistics gathering started. */ public RangeStatisticImpl getConnectionsRequestImpl() { return connectionsRequest; } }
[ "djencks@apache.org" ]
djencks@apache.org
8a913045e6ec99ac11c60c1ba7c6af983d9a7425
80cba156e567bfac9091b03505bae968916c91ea
/src/main/java/com/divergentsl/cmsjspspringconvert/service/PatientService.java
d8f2e5c93ce10c54efaa4ef1f805012f42d5a442
[]
no_license
prateekpatel-divergent/cms-springmvc
c2e33b0c7128717c3586d1b694edc4a2520c64b2
a0419882c18c63bc1a8dc571e6cdf64615e06d95
refs/heads/master
2023-04-23T19:10:39.994327
2021-05-10T13:50:20
2021-05-10T13:50:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
379
java
package com.divergentsl.cmsjspspringconvert.service; import java.util.List; import com.divergentsl.cmsjspspringconvert.entity.Patient; public interface PatientService { public void add(String name, int age, int weight, String gender, int contactNumber, String address); public boolean remove(int id); public Patient searchById(int id); public List<Patient> list(); }
[ "prateek.patel@divergentsl.com" ]
prateek.patel@divergentsl.com
5db57c3ed4d546626420d92d09a2aaf95701e60a
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/mt/submatrout/dm/MT_SUBMATROUT_1602_LDM.java
4782b833f39fdc0210e39c151a8c232bbbb56420
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
6,765
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.mt.submatrout.dm; import java.sql.*; import oracle.jdbc.driver.*; import somo.framework.db.*; import somo.framework.util.*; import chosun.ciis.mt.submatrout.ds.*; import chosun.ciis.mt.submatrout.rec.*; /** * */ public class MT_SUBMATROUT_1602_LDM extends somo.framework.db.BaseDM implements java.io.Serializable{ public String cmpy_cd; public String owh_dt; public String occr_dt; public String seq; public String matr_cd; public String fac_clsf; public MT_SUBMATROUT_1602_LDM(){} public MT_SUBMATROUT_1602_LDM(String cmpy_cd, String owh_dt, String occr_dt, String seq, String matr_cd, String fac_clsf){ this.cmpy_cd = cmpy_cd; this.owh_dt = owh_dt; this.occr_dt = occr_dt; this.seq = seq; this.matr_cd = matr_cd; this.fac_clsf = fac_clsf; } public void setCmpy_cd(String cmpy_cd){ this.cmpy_cd = cmpy_cd; } public void setOwh_dt(String owh_dt){ this.owh_dt = owh_dt; } public void setOccr_dt(String occr_dt){ this.occr_dt = occr_dt; } public void setSeq(String seq){ this.seq = seq; } public void setMatr_cd(String matr_cd){ this.matr_cd = matr_cd; } public void setFac_clsf(String fac_clsf){ this.fac_clsf = fac_clsf; } public String getCmpy_cd(){ return this.cmpy_cd; } public String getOwh_dt(){ return this.owh_dt; } public String getOccr_dt(){ return this.occr_dt; } public String getSeq(){ return this.seq; } public String getMatr_cd(){ return this.matr_cd; } public String getFac_clsf(){ return this.fac_clsf; } public String getSQL(){ return "{ call MISMAT.SP_MT_SUBMATROUT_1602_L(? ,? ,? ,? ,? ,? ,? ,? ,?) }"; } public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{ MT_SUBMATROUT_1602_LDM dm = (MT_SUBMATROUT_1602_LDM)bdm; cstmt.registerOutParameter(1, Types.VARCHAR); cstmt.registerOutParameter(2, Types.VARCHAR); cstmt.setString(3, dm.cmpy_cd); cstmt.setString(4, dm.owh_dt); cstmt.setString(5, dm.occr_dt); cstmt.setString(6, dm.seq); cstmt.setString(7, dm.matr_cd); cstmt.setString(8, dm.fac_clsf); cstmt.registerOutParameter(9, OracleTypes.CURSOR); } public BaseDataSet createDataSetObject(){ return new chosun.ciis.mt.submatrout.ds.MT_SUBMATROUT_1602_LDataSet(); } public void print(){ System.out.println("SQL = " + this.getSQL()); System.out.println("cmpy_cd = [" + getCmpy_cd() + "]"); System.out.println("owh_dt = [" + getOwh_dt() + "]"); System.out.println("occr_dt = [" + getOccr_dt() + "]"); System.out.println("seq = [" + getSeq() + "]"); System.out.println("matr_cd = [" + getMatr_cd() + "]"); System.out.println("fac_clsf = [" + getFac_clsf() + "]"); } } /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오. String cmpy_cd = req.getParameter("cmpy_cd"); if( cmpy_cd == null){ System.out.println(this.toString+" : cmpy_cd is null" ); }else{ System.out.println(this.toString+" : cmpy_cd is "+cmpy_cd ); } String owh_dt = req.getParameter("owh_dt"); if( owh_dt == null){ System.out.println(this.toString+" : owh_dt is null" ); }else{ System.out.println(this.toString+" : owh_dt is "+owh_dt ); } String occr_dt = req.getParameter("occr_dt"); if( occr_dt == null){ System.out.println(this.toString+" : occr_dt is null" ); }else{ System.out.println(this.toString+" : occr_dt is "+occr_dt ); } String seq = req.getParameter("seq"); if( seq == null){ System.out.println(this.toString+" : seq is null" ); }else{ System.out.println(this.toString+" : seq is "+seq ); } String matr_cd = req.getParameter("matr_cd"); if( matr_cd == null){ System.out.println(this.toString+" : matr_cd is null" ); }else{ System.out.println(this.toString+" : matr_cd is "+matr_cd ); } String fac_clsf = req.getParameter("fac_clsf"); if( fac_clsf == null){ System.out.println(this.toString+" : fac_clsf is null" ); }else{ System.out.println(this.toString+" : fac_clsf is "+fac_clsf ); } ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.checkString(req.getParameter("cmpy_cd")); String owh_dt = Util.checkString(req.getParameter("owh_dt")); String occr_dt = Util.checkString(req.getParameter("occr_dt")); String seq = Util.checkString(req.getParameter("seq")); String matr_cd = Util.checkString(req.getParameter("matr_cd")); String fac_clsf = Util.checkString(req.getParameter("fac_clsf")); ----------------------------------------------------------------------------------------------------*//*---------------------------------------------------------------------------------------------------- Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("cmpy_cd"))); String owh_dt = Util.Uni2Ksc(Util.checkString(req.getParameter("owh_dt"))); String occr_dt = Util.Uni2Ksc(Util.checkString(req.getParameter("occr_dt"))); String seq = Util.Uni2Ksc(Util.checkString(req.getParameter("seq"))); String matr_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("matr_cd"))); String fac_clsf = Util.Uni2Ksc(Util.checkString(req.getParameter("fac_clsf"))); ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 DM 파일의 변수를 설정시 사용하십시오. dm.setCmpy_cd(cmpy_cd); dm.setOwh_dt(owh_dt); dm.setOccr_dt(occr_dt); dm.setSeq(seq); dm.setMatr_cd(matr_cd); dm.setFac_clsf(fac_clsf); ----------------------------------------------------------------------------------------------------*/ /* 작성시간 : Mon Sep 21 22:13:05 KST 2009 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
e7068f464ea4772b2a2a5fd0ee85e7e3e9c4df38
2d3ab742d830ea30b702c186d61d34cf8c324183
/springcloud/atguigu-cloud2020/nacos-seata-order2001/src/main/java/todo/springcloud/atguigucloud2020/seata/order/controller/OrderController.java
73e11adcc21ae4ba69d9ffef0a6bd3cc6bd86401
[ "MIT" ]
permissive
jianchengwang/todo-java
39893627fc9e1250b50c41f34a2b13c90d98de2c
0b697590fd7f08027844c00abb352c2fddc18175
refs/heads/main
2023-08-28T03:30:20.723137
2023-08-01T07:16:50
2023-08-01T07:16:50
175,554,847
1
0
MIT
2023-06-14T22:34:00
2019-03-14T05:34:19
Java
UTF-8
Java
false
false
768
java
package todo.springcloud.atguigucloud2020.seata.order.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import todo.springcloud.atguigucloud2020.common.entity.CommonResult; import todo.springcloud.atguigucloud2020.seata.order.domain.Order; import todo.springcloud.atguigucloud2020.seata.order.service.OrderService; import javax.annotation.Resource; /** * @author wjc * @date 2021/1/18 */ @RestController public class OrderController { @Resource private OrderService orderService; @RequestMapping("/order/create") public CommonResult create(Order order) { orderService.create(order); return new CommonResult(200,"订单创建成功"); } }
[ "jiancheng_wang@yahoo.com" ]
jiancheng_wang@yahoo.com
74df502e093aa679a0459a9298b9ed4392974209
c474b03758be154e43758220e47b3403eb7fc1fc
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/tinder/superlikeable/view/SuperLikeableGridView$onFlingCompleteListener$1.java
aad66f89e1174fc5f86d99e82194cd23e79ff8e0
[]
no_license
EstebanDalelR/tinderAnalysis
f80fe1f43b3b9dba283b5db1781189a0dd592c24
941e2c634c40e5dbf5585c6876ef33f2a578b65c
refs/heads/master
2020-04-04T09:03:32.659099
2018-11-23T20:41:28
2018-11-23T20:41:28
155,805,042
0
0
null
2018-11-18T16:02:45
2018-11-02T02:44:34
null
UTF-8
Java
false
false
882
java
package com.tinder.superlikeable.view; import kotlin.C15813i; import kotlin.Metadata; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.Lambda; @Metadata(bv = {1, 0, 2}, d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 1, 10}) final class SuperLikeableGridView$onFlingCompleteListener$1 extends Lambda implements Function0<C15813i> { /* renamed from: a */ public static final SuperLikeableGridView$onFlingCompleteListener$1 f58613a = new SuperLikeableGridView$onFlingCompleteListener$1(); SuperLikeableGridView$onFlingCompleteListener$1() { super(0); } /* renamed from: a */ public final void m67448a() { } public /* synthetic */ Object invoke() { m67448a(); return C15813i.f49016a; } }
[ "jdguzmans@hotmail.com" ]
jdguzmans@hotmail.com
c408049da8e43ff19dafc3da1e9bbcf9ca1170a5
21e3d5f861e3bb2b7d64aa9c914f300a542235cb
/src/main/java/io/growing/graphql/model/CountKpiAnalysesQueryRequest.java
59aef86277f3d6eb28927a82233349abc49c7818
[ "MIT" ]
permissive
okpiaoxuefeng98/growingio-graphql-javasdk
d274378dad69d971fe14207f74d7a3135959460b
97a75faf337446fa16536a42a3b744f7fc992fb4
refs/heads/master
2023-02-04T15:38:13.627500
2020-12-24T07:25:32
2020-12-24T07:25:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,681
java
package io.growing.graphql.model; import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation; import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperationRequest; import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; @javax.annotation.Generated( value = "com.kobylynskyi.graphql.codegen.GraphQLCodegen", date = "2020-12-22T15:45:58+0800" ) public class CountKpiAnalysesQueryRequest implements GraphQLOperationRequest { private static final GraphQLOperation OPERATION_TYPE = GraphQLOperation.QUERY; private static final String OPERATION_NAME = "countKpiAnalyses"; private Map<String, Object> input = new LinkedHashMap<>(); public CountKpiAnalysesQueryRequest() { } public void setProjectId(String projectId) { this.input.put("projectId", projectId); } @Override public GraphQLOperation getOperationType() { return OPERATION_TYPE; } @Override public String getOperationName() { return OPERATION_NAME; } @Override public Map<String, Object> getInput() { return input; } @Override public String toString() { return Objects.toString(input); } public static class Builder { private String projectId; public Builder() { } public Builder setProjectId(String projectId) { this.projectId = projectId; return this; } public CountKpiAnalysesQueryRequest build() { CountKpiAnalysesQueryRequest obj = new CountKpiAnalysesQueryRequest(); obj.setProjectId(projectId); return obj; } } }
[ "dreamylost@outlook.com" ]
dreamylost@outlook.com
1a8db743f3a53e3e54dce15f472c49b83f23ec65
2d815b23b3b5c1c9110eedeac30a60063dea349c
/lingmoney-dao/src/main/java/com/mrbt/lingmoney/mapper/EnterpriseAccountMapper.java
975a917a837648a8137757f0bd38dcfc8b090086
[]
no_license
shiwuyisheng/lingmoney
9f7a9e1216017cf3a0762e42a1f1f6fdeebda8ba
19cafe72b8dbc7100bec40415c431e969227057f
refs/heads/master
2020-06-13T20:53:31.503482
2018-06-15T03:37:41
2018-06-15T03:37:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,384
java
package com.mrbt.lingmoney.mapper; import com.mrbt.lingmoney.model.EnterpriseAccount; import com.mrbt.lingmoney.model.EnterpriseAccountExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface EnterpriseAccountMapper { /** * 根据指定的条件获取数据库记录数,enterprise_account * * @param example */ int countByExample(EnterpriseAccountExample example); /** * 根据指定的条件删除数据库符合条件的记录,enterprise_account * * @param example */ int deleteByExample(EnterpriseAccountExample example); /** * 根据主键删除数据库的记录,enterprise_account * * @param id */ int deleteByPrimaryKey(String id); /** * 新写入数据库记录,enterprise_account * * @param record */ int insert(EnterpriseAccount record); /** * 动态字段,写入数据库记录,enterprise_account * * @param record */ int insertSelective(EnterpriseAccount record); /** * 根据指定的条件查询符合条件的数据库记录,enterprise_account * * @param example */ List<EnterpriseAccount> selectByExample(EnterpriseAccountExample example); /** * 根据指定主键获取一条数据库记录,enterprise_account * * @param id */ EnterpriseAccount selectByPrimaryKey(String id); /** * 动态根据指定的条件来更新符合条件的数据库记录,enterprise_account * * @param record * @param example */ int updateByExampleSelective(@Param("record") EnterpriseAccount record, @Param("example") EnterpriseAccountExample example); /** * 根据指定的条件来更新符合条件的数据库记录,enterprise_account * * @param record * @param example */ int updateByExample(@Param("record") EnterpriseAccount record, @Param("example") EnterpriseAccountExample example); /** * 动态字段,根据主键来更新符合条件的数据库记录,enterprise_account * * @param record */ int updateByPrimaryKeySelective(EnterpriseAccount record); /** * 根据主键来更新符合条件的数据库记录,enterprise_account * * @param record */ int updateByPrimaryKey(EnterpriseAccount record); }
[ "252544983@qq.com" ]
252544983@qq.com
94349259c3fd7e585062d0a758acc1ca62adc076
75604d83db3d7c6e783a54097687a1bb9d1be338
/src/_Algorithm/Stack/P2493_2.java
ce04ffa6f97cc92fa67b795bce811ba29cd0ed9c
[]
no_license
nn98/Algorithm
262cbe20c71ff9b5de292c244b95a2a0c25e5bd7
c1999a8ef3bfc1370abee56c0597c286a1cb81af
refs/heads/master
2023-08-17T04:39:41.236707
2022-09-07T06:22:56
2022-09-07T06:22:56
178,701,901
0
0
null
null
null
null
UTF-8
Java
false
false
630
java
package _Algorithm.Stack; import java.io.*; public class P2493_2 { public static void main(String[] args)throws Exception{ BufferedReader r=new BufferedReader(new InputStreamReader(System.in)); BufferedWriter w=new BufferedWriter(new OutputStreamWriter(System.out)); int n=Integer.parseInt(r.readLine()),a[]=new int[n],i=0,j,k; for(String s:r.readLine().split(" "))a[i++]=Integer.parseInt(s); for(i=n;i-->0;) { k=0; for(j=i;j-->0;) if(a[i]<=a[j]) { a[i]=j+1; k=1; break; } if(k==0)a[i]=0; } // System.out.println(Arrays.toString(b)); for(int c:a)w.write(c+" "); w.flush(); } }
[ "jkllhgb@gmail.com" ]
jkllhgb@gmail.com
052cde3de3bd1ff082dd1c8da43ef6b198cbfd9a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_8a0a7c42db4ef199092e0ea64f27d43624d9ba3a/LoggingConfigurationTestCase/16_8a0a7c42db4ef199092e0ea64f27d43624d9ba3a_LoggingConfigurationTestCase_s.java
33b53ea421af7d6b20e97e09f3f517f870ff92f3
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,558
java
/* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.test.capedwarf.log.test; import java.util.logging.Logger; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.jboss.test.capedwarf.common.support.All; import org.jboss.test.capedwarf.common.test.TestContext; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; /** * @author Marko Luksa */ @RunWith(Arquillian.class) @Category(All.class) public class LoggingConfigurationTestCase extends AbstractLoggingTest { @Deployment public static Archive getDeployment() { final TestContext context = newTextContext().setAppEngineWebXmlFile("appengine-web-with-logging-properties.xml"); final WebArchive war = getDefaultDeployment(context); war.addAsWebInfResource("logging.properties"); return war; } @Test public void testLoggingPropertiesAreHonored() { String infoHello = "info hello"; String severeHello = "severe hello"; assertLogDoesntContain(infoHello); assertLogDoesntContain(severeHello); Logger log = Logger.getLogger(LoggingConfigurationTestCase.class.getName()); log.info(infoHello); log.severe(severeHello); flush(log); assertLogDoesntContain(infoHello); assertLogContains(severeHello); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ab723b182ba37385eeb8a03e2bf8c6a5136eddcf
14870176285721939a445840cb1e77a53bf885cc
/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateTestSupportMethodActionTestGenerated.java
b615856b229ca4fbf553cd30c020c426780c5986
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
fxsg20151212/intellij-community
40a25220f0f3302976fdfa8b740bc88ff5c01322
39bef905dc15531399d1453e737317c0232e636a
refs/heads/master
2023-08-03T07:09:41.800618
2021-09-18T06:28:33
2021-09-18T06:28:33
290,156,977
0
0
Apache-2.0
2020-08-25T08:20:06
2020-08-25T08:20:05
null
UTF-8
Java
false
false
5,898
java
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.kotlin.idea.codeInsight.generate; import com.intellij.testFramework.TestDataPath; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestRoot; import org.junit.runner.RunWith; /** * This class is generated by {@link org.jetbrains.kotlin.testGenerator.generator.TestGenerator}. * DO NOT MODIFY MANUALLY. */ @SuppressWarnings("all") @TestRoot("idea/tests") @TestDataPath("$CONTENT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/codeInsight/generate/testFrameworkSupport") public abstract class GenerateTestSupportMethodActionTestGenerated extends AbstractGenerateTestSupportMethodActionTest { @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/codeInsight/generate/testFrameworkSupport/jUnit4") public static class JUnit4 extends AbstractGenerateTestSupportMethodActionTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @TestMetadata("dataMethod.kt") public void testDataMethod() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/jUnit4/dataMethod.kt"); } @TestMetadata("setUp.kt") public void testSetUp() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/jUnit4/setUp.kt"); } @TestMetadata("setUpExists.kt") public void testSetUpExists() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/jUnit4/setUpExists.kt"); } @TestMetadata("setUpOverrides.kt") public void testSetUpOverrides() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/jUnit4/setUpOverrides.kt"); } @TestMetadata("tearDown.kt") public void testTearDown() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/jUnit4/tearDown.kt"); } @TestMetadata("tearDownExists.kt") public void testTearDownExists() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/jUnit4/tearDownExists.kt"); } @TestMetadata("testMethod.kt") public void testTestMethod() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/jUnit4/testMethod.kt"); } } @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/codeInsight/generate/testFrameworkSupport/junit3") public static class Junit3 extends AbstractGenerateTestSupportMethodActionTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @TestMetadata("setUp.kt") public void testSetUp() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/junit3/setUp.kt"); } @TestMetadata("setUpExists.kt") public void testSetUpExists() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/junit3/setUpExists.kt"); } @TestMetadata("tearDown.kt") public void testTearDown() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/junit3/tearDown.kt"); } @TestMetadata("tearDownExists.kt") public void testTearDownExists() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/junit3/tearDownExists.kt"); } @TestMetadata("testMethod.kt") public void testTestMethod() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/junit3/testMethod.kt"); } } @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("testData/codeInsight/generate/testFrameworkSupport/testNG") public static class TestNG extends AbstractGenerateTestSupportMethodActionTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @TestMetadata("dataMethod.kt") public void testDataMethod() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/testNG/dataMethod.kt"); } @TestMetadata("setUp.kt") public void testSetUp() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/testNG/setUp.kt"); } @TestMetadata("setUpExists.kt") public void testSetUpExists() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/testNG/setUpExists.kt"); } @TestMetadata("setUpOverrides.kt") public void testSetUpOverrides() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/testNG/setUpOverrides.kt"); } @TestMetadata("tearDown.kt") public void testTearDown() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/testNG/tearDown.kt"); } @TestMetadata("tearDownExists.kt") public void testTearDownExists() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/testNG/tearDownExists.kt"); } @TestMetadata("testMethod.kt") public void testTestMethod() throws Exception { runTest("testData/codeInsight/generate/testFrameworkSupport/testNG/testMethod.kt"); } } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
d552776fa02f68c93def332a6e571010e3fb4b2a
706f2ca614a4a8fbb97c35bd8fd84701cb35e796
/06. 2. Functional-Programming-Exercises/src/p06_Reverse_and_Exclude.java
f3d74439ef257e2a53e883ea4a8716641daef5c4
[ "MIT" ]
permissive
kostadinlambov/Java-Advanced
b4c3602d79ed8edc66e370be78fc199442e9c506
e11f22cc1fd74fdc444672f6a602d40817c1ac9b
refs/heads/master
2021-09-04T01:17:46.072106
2018-01-13T23:14:14
2018-01-13T23:14:14
117,341,065
1
0
null
null
null
null
UTF-8
Java
false
false
1,367
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.function.BiFunction; public class p06_Reverse_and_Exclude { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); Integer[] inputNumbers = Arrays.stream(reader.readLine().split("\\s+")) .map(Integer::parseInt) .toArray(Integer[]::new); int num = Integer.parseInt(reader.readLine()); BiFunction<Integer[], Integer, ArrayList<Integer>> reverseAndDeleteByNumber = (inputArr, number) -> { Integer[] reversedArr = new Integer[inputArr.length]; for (int i = 0; i < inputArr.length; i++) { reversedArr[i] = inputArr[inputArr.length - 1 - i]; } ArrayList<Integer> resultList = new ArrayList<>(); for (int i = 0; i <reversedArr.length; i++) { if(reversedArr[i] % number != 0){ resultList.add(reversedArr[i]); } } return resultList; }; System.out.printf(reverseAndDeleteByNumber.apply(inputNumbers, num) .toString() .replaceAll("[\\[\\],]", "")); } }
[ "valchak@abv.bg" ]
valchak@abv.bg
b4835efa0229d770d78c6af800f81aca72fa710b
d83d8f63fdefca89c1c6a89ba55992ad0a7d51c2
/src/amata1219/kerisute/gomen/old/ClientData.java
944a693eab10592ddd7abd40e0407bd132d4b8a3
[]
no_license
Smurfgar/KerisuteGomen
153432596a625f3f26e0bcb848406d2191866d34
4ead7565da5e55c6e0394de205383ed2d8269e7e
refs/heads/master
2020-04-15T13:45:48.779694
2018-12-26T17:22:22
2018-12-26T17:22:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,477
java
package amata1219.kerisute.gomen.old; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.bukkit.entity.Player; import amata1219.kerisute.gomen.ModOld; public class ClientData { private Player player; private String clientName; private List<String> otherClients = new ArrayList<String>(); private Set<String> usingChannels = new HashSet<String>(); private boolean isForgeClient, isLiteLoaderClient, isLabyModClient; private List<ModOld> forgeMods = new ArrayList<ModOld>(), liteLoaderMods = new ArrayList<ModOld>(); private boolean isUsing5zig; private List<ModOld> blockedMods = new ArrayList<ModOld>(); private boolean shouldKick; private boolean fcheck, lcheck; public ClientData(Player player){ this.player = player; } public Player getPlayer() { return player; } public void setPlayer(Player player) { this.player = player; } public boolean isIgnoreModCheck(){ return player.hasPermission("kerisute.samurai.ignore"); } public String getClientName() { return clientName; } public void setClientName(String clientName) { this.clientName = clientName; } public List<String> getOtherClients() { return otherClients; } public void setOtherClients(List<String> otherClients) { this.otherClients = otherClients; } public Set<String> getUsingChannels() { return usingChannels; } public void setUsingChannels(Set<String> usingChannels) { this.usingChannels = usingChannels; } public boolean isVanillaClient(){ return clientName.equals("vanilla") && !isNonForge5zigClient(); } public boolean isForgeClient() { return isForgeClient; } public void setForgeClient(boolean isForgeClient) { this.isForgeClient = isForgeClient; } public boolean isLiteLoaderClient() { return isLiteLoaderClient; } public void setLiteLoaderClient(boolean isLiteLoaderClient) { this.isLiteLoaderClient = isLiteLoaderClient; } public boolean isNonForge5zigClient() { return clientName.equals("vanilla") && isUsing5zig; } public void setLabyModClient(boolean isLabyModClient){ this.isLabyModClient = isLabyModClient; } public boolean isLabyModClient(){ return isLabyModClient; } public boolean isForgeWurstClient() { boolean b = false; for(ModOld mod : forgeMods){ if(mod.getId().equals("forgewurst")){ b = true; continue; } } return b; } public boolean isOtherClient(){ return !otherClients.isEmpty(); } public List<ModOld> getForgeMods() { return forgeMods; } public void setForgeMods(List<ModOld> forgeMods) { this.forgeMods = forgeMods; } public List<ModOld> getLiteLoaderMods() { return liteLoaderMods; } public void setLiteloaderMods(List<ModOld> liteLoaderMods) { this.liteLoaderMods = liteLoaderMods; } public void setUsing5zig(boolean isUsing5zig){ this.isUsing5zig = isUsing5zig; } public boolean isUsing5zig(){ return isUsing5zig; } public List<ModOld> getBlockedMods() { return blockedMods; } public void setBlockedMods(List<ModOld> blockedMods) { this.blockedMods = blockedMods; } public boolean shouldKick() { return shouldKick; } public void setShouldKick(boolean shouldKick) { this.shouldKick = shouldKick; } public boolean isFcheck() { return fcheck; } public void setFcheck(boolean fcheck) { this.fcheck = fcheck; } public boolean isLcheck() { return lcheck; } public void setLcheck(boolean lcheck) { this.lcheck = lcheck; } }
[ "suzukiamata@gmail.com" ]
suzukiamata@gmail.com
8d34f0767af03f04501beae23d5db376edbe7770
bf2a484bcaab563251c2cbaea0e3c7a1a5c2cfdb
/moco-core/src/main/java/com/github/dreamhead/moco/MocoException.java
9bec7696762863c82cd591f2914495d17d12c8c7
[ "MIT" ]
permissive
easyops-cn/moco
693fec49e30e4f3a476c4f9a00096a4a3d8790ae
9aac2cba7c251f6df98c4e657e7065453e094aa8
refs/heads/master
2023-04-06T14:27:07.546088
2018-07-19T15:41:47
2018-07-19T15:41:47
141,593,914
2
0
MIT
2023-04-04T00:31:43
2018-07-19T14:50:01
Java
UTF-8
Java
false
false
362
java
package com.github.dreamhead.moco; public class MocoException extends RuntimeException { public MocoException(final String message) { super(message); } public MocoException(final Throwable cause) { super(cause); } public MocoException(final String message, final Throwable cause) { super(message, cause); } }
[ "dreamhead.cn@gmail.com" ]
dreamhead.cn@gmail.com
bd748e4132d3279f32d2f92e48bf3c88a28c953a
d8ad832b122e21fb15d8cb48900b58340f9f77f6
/zfPayBackOver/src/main/java/com/ruoyi/project/deveagent/summary/service/impl/AgentSummaryTraditionalPosTransMonthServiceImpl.java
e63d8717d9e731f6368a69f402bdc22059efba3a
[ "MIT" ]
permissive
s284309258/zfpay
1aa3e954f693004b54e151ce292a89122a77ff10
b05510a6fadc33d4f97658865c0d59082690c887
refs/heads/master
2022-12-20T05:22:04.281543
2020-07-31T02:03:27
2020-07-31T02:03:27
253,762,177
0
0
null
2022-12-12T21:42:12
2020-04-07T10:34:58
Java
UTF-8
Java
false
false
1,596
java
package com.ruoyi.project.deveagent.summary.service.impl; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.common.utils.security.ShiroUtils; import com.ruoyi.project.deveagent.summary.domain.AgentSummaryTraditionalPosTransMonth; import com.ruoyi.project.deveagent.summary.mapper.AgentSummaryTraditionalPosTransMonthMapper; import com.ruoyi.project.deveagent.summary.service.AgentSummaryTraditionalPosTransMonthService; /** * 代理======传统POS商户数据汇总(每月)管理 * @author Administrator * */ @Service public class AgentSummaryTraditionalPosTransMonthServiceImpl implements AgentSummaryTraditionalPosTransMonthService { @Autowired private AgentSummaryTraditionalPosTransMonthMapper agentSummaryTraditionalPosTransMonthMapper; /** * 查询传统POS商户数据汇总(每月)列表 */ @Override public List<Map<String, Object>> getAgentSummaryTraditionalPosTransMonthList(Map<String, Object> params) { params.put("manager_id", ShiroUtils.getUserId()); return agentSummaryTraditionalPosTransMonthMapper.getAgentSummaryTraditionalPosTransMonthList(params); } /** * 导出传统POS商户数据汇总(每月)列表 */ @Override public List<AgentSummaryTraditionalPosTransMonth> selectAgentSummaryTraditionalPosTransMonthList(Map<String, Object> params) { params.put("manager_id", ShiroUtils.getUserId()); return agentSummaryTraditionalPosTransMonthMapper.selectAgentSummaryTraditionalPosTransMonthList(params); } }
[ "s284309258@163.com" ]
s284309258@163.com
ce5812e4791d2e4817d8beccd780742280ba477d
6a73c05f6de364388de2bd9b16fcfd45f20dbfc0
/Android5ActivityAnimator/src/main/java/com/zuimeia/android5activityanimator/image/MyChangeImageTransform.java
6116863bcd0260b7826697dafef1d357f8d3b7b3
[]
no_license
Adan0225/androiddemo
9eaf2ce33abd31d06c71a66bbfbdf51bea6d6108
c6e823f89eef3d36d90ab8d83ed0bcfe4e28fd3f
refs/heads/master
2020-03-28T18:35:13.616255
2018-09-15T10:52:28
2018-09-15T10:52:28
148,893,740
0
0
null
null
null
null
UTF-8
Java
false
false
4,628
java
package com.zuimeia.android5activityanimator.image; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.content.Context; import android.graphics.Rect; import android.text.TextUtils; import android.transition.Transition; import android.transition.TransitionValues; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import com.imczy.common_util.PhoneUtil; import com.imczy.common_util.log.LogUtil; import java.util.Map; /** * Created by chenzhiyong on 16/1/12. */ public class MyChangeImageTransform extends Transition { private static final String TAG = "MyChangeImageTransform"; private static final String PROPNAME_TRANSLATION_X = "android:changeImageTransform:transX"; private static final String PROPNAME_TRANSLATION_Y = "android:changeImageTransform:transY"; private static final String[] sTransitionProperties = { PROPNAME_TRANSLATION_X, PROPNAME_TRANSLATION_Y }; Context mContext; public MyChangeImageTransform(Context context) { init(context); } public MyChangeImageTransform(Context context, AttributeSet attrs) { super(context, attrs); init(context); } private void init(Context context) { mContext = context; } private void captureValues(TransitionValues transitionValues, boolean isStarted) { View view = transitionValues.view; if (view.getVisibility() != View.VISIBLE || TextUtils.isEmpty(view.getTransitionName()) || !"img".equals(view.getTransitionName()) ) { return; } LogUtil.d(TAG, "captureValues , view = " + view + " , transitionValues.view.getTransitionName() = " + transitionValues.view.getTransitionName()); Map<String, Object> values = transitionValues.values; if (isStarted) { int tranX = (int) view.getTranslationX(); int tranY = (int) view.getTranslationY(); values.put(PROPNAME_TRANSLATION_X, tranX); values.put(PROPNAME_TRANSLATION_Y, tranY); } else { Rect rect = new Rect(); view.getGlobalVisibleRect(rect); int screenWidth = PhoneUtil.getDisplayWidth(mContext); int screenHeight = PhoneUtil.getDisplayHeight(mContext) - PhoneUtil.getStatusBarHeight(); int viewCenterX = (rect.left + rect.right) / 2; int viewCenterY = (rect.top + rect.bottom) / 2; int tranX = screenWidth / 2 - viewCenterX; int tranY = screenHeight / 2 + PhoneUtil.getStatusBarHeight() - viewCenterY; LogUtil.d(TAG, "rect = " + rect + " , screenWidth = " + PhoneUtil.getScreentHeight(mContext) + " , screenHeight = " + screenHeight + " , viewCenterX = " + viewCenterX + " , viewCenterY = " + viewCenterY); values.put(PROPNAME_TRANSLATION_X, tranX); values.put(PROPNAME_TRANSLATION_Y, tranY); } } @Override public void captureStartValues(TransitionValues transitionValues) { captureValues(transitionValues, true); } @Override public void captureEndValues(TransitionValues transitionValues) { captureValues(transitionValues, false); } @Override public String[] getTransitionProperties() { return sTransitionProperties; } @Override public Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) { if (startValues == null || endValues == null) { return null; } int startTranx = (int) startValues.values.get(PROPNAME_TRANSLATION_X); int startTranY = (int) startValues.values.get(PROPNAME_TRANSLATION_Y); int endTranx = (int) endValues.values.get(PROPNAME_TRANSLATION_X); int endTranY = (int) endValues.values.get(PROPNAME_TRANSLATION_Y); View view = endValues.view; AnimatorSet anim = new AnimatorSet(); Animator mObjectAnimator1 = ObjectAnimator.ofFloat(view, "translationX", startTranx, endTranx); Animator mObjectAnimator2 = ObjectAnimator.ofFloat(view, "translationY", startTranY, endTranY); anim.playTogether(mObjectAnimator1, mObjectAnimator2); return anim; } }
[ "jason_yao" ]
jason_yao
fe332f74fbe794ce84b57ecb7c63e73f38d12b41
f0568343ecd32379a6a2d598bda93fa419847584
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201302/InvalidColorErrorReason.java
0545c7394f741e1dce33abe632aa3a1ddb1ad091
[ "Apache-2.0" ]
permissive
frankzwang/googleads-java-lib
bd098b7b61622bd50352ccca815c4de15c45a545
0cf942d2558754589a12b4d9daa5902d7499e43f
refs/heads/master
2021-01-20T23:20:53.380875
2014-07-02T19:14:30
2014-07-02T19:14:30
21,526,492
1
0
null
null
null
null
UTF-8
Java
false
false
1,149
java
package com.google.api.ads.dfp.jaxws.v201302; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for InvalidColorError.Reason. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="InvalidColorError.Reason"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="INVALID_FORMAT"/> * &lt;enumeration value="UNKNOWN"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "InvalidColorError.Reason") @XmlEnum public enum InvalidColorErrorReason { /** * * The provided value is not a valid hexadecimal color. * * */ INVALID_FORMAT, /** * * The value returned if the actual value is not exposed by the requested API version. * * */ UNKNOWN; public String value() { return name(); } public static InvalidColorErrorReason fromValue(String v) { return valueOf(v); } }
[ "jradcliff@google.com" ]
jradcliff@google.com
546a0642d6f61f9a33aaecf2974da7052f3424d7
435016c5e2d4cfbfe9f939db725aab59dd8b9240
/java-basic/src/main/java/ch28/e/Test04.java
aec2891ce291897fedbcfb8fcfa9e1ce83762fc6
[]
no_license
kmincheol/bitcamp-java-2018-12
59b3c5709b1aa905035a390d553002547243a13a
32b2df6e295412207a27bfc57069e9069f85a0a4
refs/heads/master
2021-08-06T22:04:08.819338
2019-06-12T02:16:22
2019-06-12T02:16:22
163,650,686
1
1
null
2020-04-30T03:50:33
2018-12-31T08:00:45
Java
UTF-8
Java
false
false
1,257
java
// 애노테이션 프로퍼티 추출하기 // package ch28.e; import java.lang.annotation.Annotation; @MyAnnotation7(name = "홍길동", age = 20) public class Test04 { public static void main(String[] args) { Class<?> clazz = Test04.class; MyAnnotation7 anno1 = clazz.getAnnotation(MyAnnotation7.class); for (String s : anno1.value()) System.out.println(s); System.out.println(anno1.name()); System.out.println(anno1.age()); System.out.println(anno1.working()); System.out.println("-----------------------------"); // 위와 같다. MyAnnotation7 anno2 = Test04.class.getAnnotation(MyAnnotation7.class); for (String s : anno2.value()) System.out.println(s); System.out.println(anno2.name()); System.out.println(anno2.age()); System.out.println(anno2.working()); System.out.println("-----------------------------"); Annotation[] annototions = Test04.class.getAnnotations(); MyAnnotation7 anno3 = (MyAnnotation7) annototions[0]; for (String s : anno3.value()) System.out.println(s); System.out.println(anno3.name()); System.out.println(anno3.age()); System.out.println(anno3.working()); System.out.println("-----------------------------"); } }
[ "mincheol.kmc@gmail.com" ]
mincheol.kmc@gmail.com
1d00230c62202cdd0b2e925040c63062b6a5360b
7256b730f7f6a5e78380f07a4c96c3e985ab654b
/net/src/main/java/com/example/net/entity/TokenRespEntity.java
afcb595ab7ec90c06fada937e7aea5e54d906c6f
[]
no_license
18516813036/mylib
bf661fcc3985bc069e3c64a54110426afb0dd2b1
46e7bc3bdbb43b47b4744635172ac1b7961d45b3
refs/heads/master
2022-11-05T06:03:38.995208
2020-06-29T02:40:45
2020-06-29T02:40:45
275,708,208
0
0
null
null
null
null
UTF-8
Java
false
false
662
java
package com.example.net.entity; public class TokenRespEntity { private String access_token; private int expires_in; private String token_type; public String getAccess_token() { return access_token; } public void setAccess_token(String access_token) { this.access_token = access_token; } public int getExpires_in() { return expires_in; } public void setExpires_in(int expires_in) { this.expires_in = expires_in; } public String getToken_type() { return token_type; } public void setToken_type(String token_type) { this.token_type = token_type; } }
[ "=" ]
=
7b7bf3943c758f8bcd9fc42bad51cb573e112c43
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_066d127b74f407796511fbd606032e83f12d8203/UNIXProcess/26_066d127b74f407796511fbd606032e83f12d8203_UNIXProcess_s.java
4c58d514d250fa871d2688ae82de0557f795b02a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,074
java
/* * Java core library component. * * Copyright (c) 1997, 1998 * Transvirtual Technologies, Inc. All rights reserved. * * See the file "license.terms" for information on usage and redistribution * of this file. */ package kaffe.lang; import java.io.FileDescriptor; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PipedOutputStream; public class UNIXProcess extends Process implements Runnable { boolean isalive; int exit_code; FileDescriptor stdin_fd; FileDescriptor stdout_fd; FileDescriptor stderr_fd; FileDescriptor sync_fd; int pid; OutputStream stdin_stream; InputStream raw_stdout; InputStream raw_stderr; ProcessInputStream piped_stdout_in; ProcessInputStream piped_stderr_in; PipedOutputStream piped_stdout_out; PipedOutputStream piped_stderr_out; int numReaders; private static Thread tidy; static { tidy = new Thread(new UNIXProcess()); tidy.setDaemon(true); tidy.start(); } public UNIXProcess() { } public UNIXProcess(String argv[], String arge[]) { stdin_fd = new FileDescriptor(); stdout_fd = new FileDescriptor(); stderr_fd = new FileDescriptor(); sync_fd = new FileDescriptor(); pid = forkAndExec(argv, arge); isalive = true; FileOutputStream sync = new FileOutputStream(sync_fd); byte[] sbuf = new byte[1]; try { sync.write(sbuf); } catch (IOException _) { } } public void destory() { } native public void destroy(); public int exitValue() { return exit_code; } native public int forkAndExec(Object cmd[], Object env[]); public InputStream getErrorStream() { return raw_stderr; } public InputStream getInputStream() { return raw_stdout; } public OutputStream getOutputStream() { return stdin_stream; } native public void notifyReaders(); native public void run(); public int waitFor() throws InterruptedException { synchronized(this) { while (isalive == true) { wait(); } } return (exit_code); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d393e2f68d4059b954897a44114528f3791cd0b4
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/Shopkick_com.shopkick.app/javafiles/com/bumptech/glide/load/resource/bitmap/DownsampleStrategy$FitCenter.java
9c61cb7322e7d7ac3e2e3165494db436e6432729
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
1,366
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.bumptech.glide.load.resource.bitmap; // Referenced classes of package com.bumptech.glide.load.resource.bitmap: // DownsampleStrategy private static class DownsampleStrategy$FitCenter extends DownsampleStrategy { public Rounding getSampleSizeRounding(int i, int j, int k, int l) { return Rounding.QUALITY; // 0 0:getstatic #18 <Field DownsampleStrategy$SampleSizeRounding DownsampleStrategy$SampleSizeRounding.QUALITY> // 1 3:areturn } public float getScaleFactor(int i, int j, int k, int l) { return Math.min((float)k / (float)i, (float)l / (float)j); // 0 0:iload_3 // 1 1:i2f // 2 2:iload_1 // 3 3:i2f // 4 4:fdiv // 5 5:iload 4 // 6 7:i2f // 7 8:iload_2 // 8 9:i2f // 9 10:fdiv // 10 11:invokestatic #26 <Method float Math.min(float, float)> // 11 14:freturn } DownsampleStrategy$FitCenter() { // 0 0:aload_0 // 1 1:invokespecial #9 <Method void DownsampleStrategy()> // 2 4:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
9d9b9b8e3ef8db76d04452ccfdcc2419ba57c10c
bf92629bef0dea162c468a9b939dec3ac55ae677
/examples/composition/envfsm/SimpleALEnv/src-gen/evalsimpleal/revisitor/operations/evalsimpleal/impl/IfStmtOperationImpl.java
53148ead510e19bd85e7c1c2e86b888f7628b349
[]
no_license
tdegueul/ale-xbase
32db3ee08792e53769971698962a9dcdc80a90a4
3f6de93c322367fd78b1d4d23b20a24edba268d3
refs/heads/master
2021-01-21T21:15:12.645906
2018-08-27T13:47:15
2018-08-27T13:47:15
98,518,635
1
1
null
null
null
null
UTF-8
Java
false
false
2,559
java
package evalsimpleal.revisitor.operations.evalsimpleal.impl; import evalsimpleal.revisitor.operations.evalsimpleal.ALVarRefOperation; import evalsimpleal.revisitor.operations.evalsimpleal.ArithLitOperation; import evalsimpleal.revisitor.operations.evalsimpleal.ArithMinusOperation; import evalsimpleal.revisitor.operations.evalsimpleal.ArithOpOperation; import evalsimpleal.revisitor.operations.evalsimpleal.ArithOperation; import evalsimpleal.revisitor.operations.evalsimpleal.ArithPlusOperation; import evalsimpleal.revisitor.operations.evalsimpleal.AssignOperation; import evalsimpleal.revisitor.operations.evalsimpleal.BlockOperation; import evalsimpleal.revisitor.operations.evalsimpleal.EqualityTestOperation; import evalsimpleal.revisitor.operations.evalsimpleal.IfStmtOperation; import evalsimpleal.revisitor.operations.evalsimpleal.PrintOperation; import evalsimpleal.revisitor.operations.evalsimpleal.RandRangeOperation; import evalsimpleal.revisitor.operations.evalsimpleal.StmtOperation; import simpleALEnv.Assign; import simpleALEnv.IfStmt; import simpleALEnv.revisitor.SimpleALEnvRevisitor; import simpleALEnv.runtime.Env; @SuppressWarnings("all") public class IfStmtOperationImpl implements IfStmtOperation { private IfStmt obj; private SimpleALEnvRevisitor<? extends ALVarRefOperation, ? extends ArithOperation, ? extends ArithLitOperation, ? extends ArithMinusOperation, ? extends ArithOpOperation, ? extends ArithPlusOperation, ? extends AssignOperation, ? extends BlockOperation, ? extends EqualityTestOperation, ? extends IfStmtOperation, ? extends PrintOperation, ? extends RandRangeOperation, ? extends StmtOperation> alg; public IfStmtOperationImpl(final IfStmt obj, final SimpleALEnvRevisitor<? extends ALVarRefOperation, ? extends ArithOperation, ? extends ArithLitOperation, ? extends ArithMinusOperation, ? extends ArithOpOperation, ? extends ArithPlusOperation, ? extends AssignOperation, ? extends BlockOperation, ? extends EqualityTestOperation, ? extends IfStmtOperation, ? extends PrintOperation, ? extends RandRangeOperation, ? extends StmtOperation> alg) { this.obj = obj; this.alg = alg; } @Override public void eval(final Env env) { boolean _test = this.alg.$(this.obj.getTest()).test(env); if (_test) { this.alg.$(this.obj.getIfBranch()).eval(env); } else { Assign _elseBranch = this.obj.getElseBranch(); boolean _tripleNotEquals = (_elseBranch != null); if (_tripleNotEquals) { this.alg.$(this.obj.getElseBranch()).eval(env); } } } }
[ "manuel.leduc@inria.fr" ]
manuel.leduc@inria.fr
7a3cae1a59db6616b827592bb2ed7c575c0cbf80
96670d2b28a3fb75d2f8258f31fc23d370af8a03
/reverse_engineered/sources/com/beastbikes/android/modules/cycling/club/ui/ClubActivityInfoBrowserActivity.java
54032f677162d749cb4bed5a72e56878236834ff
[]
no_license
P79N6A/speedx
81a25b63e4f98948e7de2e4254390cab5612dcbd
800b6158c7494b03f5c477a8cf2234139889578b
refs/heads/master
2020-05-30T18:43:52.613448
2019-06-02T07:57:10
2019-06-02T08:15:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,256
java
package com.beastbikes.android.modules.cycling.club.ui; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.Menu; import android.view.MenuItem; import android.webkit.WebView; import com.beastbikes.android.C1371a; import com.beastbikes.android.C1373R; import com.beastbikes.android.C1768c; import com.beastbikes.android.embapi.BrowserActivity; import com.beastbikes.android.locale.C1849a; public class ClubActivityInfoBrowserActivity extends BrowserActivity implements C1371a { /* renamed from: k */ private int f9451k; /* renamed from: l */ private int f9452l; /* renamed from: m */ private String f9453m; /* renamed from: a */ public static String m10682a(String str, Context context) { StringBuilder stringBuilder = new StringBuilder(C1768c.f8077c); stringBuilder.append("/club-activity-share-detail.html?activityId="); stringBuilder.append(str); stringBuilder.append("&areaCode=" + C1849a.m9639a(context)); return stringBuilder.toString(); } protected void onCreate(Bundle bundle) { super.onCreate(bundle); super.overridePendingTransition(C1373R.anim.activity_in_from_right, C1373R.anim.activity_none); Intent intent = getIntent(); if (intent != null) { this.f9451k = intent.getIntExtra("activity_type", -1); this.f9452l = intent.getIntExtra("club_level", 0); this.f9453m = intent.getStringExtra("activity_id"); this.c = true; } } public boolean onCreateOptionsMenu(Menu menu) { switch (this.f9451k) { case 0: if (this.f9452l == 128) { getMenuInflater().inflate(C1373R.menu.add_menu, menu); break; } return false; case 1: if (!TextUtils.isEmpty(this.f9453m)) { this.c = true; getMenuInflater().inflate(C1373R.menu.share_menu, menu); break; } return false; default: return false; } return super.onCreateOptionsMenu(menu); } public boolean onOptionsItemSelected(MenuItem menuItem) { switch (menuItem.getItemId()) { case C1373R.id.menu_item_share: if (TextUtils.isEmpty(this.f9453m)) { return false; } WebView browser = getBrowser(); if (browser != null) { browser.loadUrl("javascript:closeEnrollForm()"); } if (!TextUtils.isEmpty(this.d) && !TextUtils.isEmpty(this.e)) { a(); } else if (browser != null) { browser.loadUrl("javascript:getShareInfo('android')"); } return true; default: return super.onOptionsItemSelected(menuItem); } } public void finish() { setResult(-1); super.finish(); super.overridePendingTransition(C1373R.anim.activity_none, C1373R.anim.activity_out_to_right); } }
[ "Gith1974" ]
Gith1974
c85f218be890d71c75afa7251ea6a306ecb0aa51
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/amap/location/b/c/j.java
6c351590f2dfc969469f97d8a968a6a6fb7cfc54
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
690
java
package com.amap.location.b.c; /* compiled from: Satellite */ public class j { public byte a; public byte b; public byte c; public short d; public byte e; public byte f; public String toString() { StringBuilder sb = new StringBuilder("Satellite{prn="); sb.append(this.a); sb.append(", snr="); sb.append(this.b); sb.append(", elevation="); sb.append(this.c); sb.append(", azimuth="); sb.append(this.d); sb.append(", usedInFix="); sb.append(this.e); sb.append(", constellationType="); sb.append(this.f); sb.append('}'); return sb.toString(); } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
e4818b455d2bdb1a24f5b2205a304d9553e82211
3437c7b2ba1fd01fecfa2fc9ad4552fb8950bf3a
/NHBCrawler/src/main/java/nhb/utils/webview/headless/impl/AbstractHeadlessWebview.java
583b7a6e375559a466c15b682a49d767062b288f
[]
no_license
bachden/nhb-crawler
f805b802f7b499681d8051f240bc3b64284908c9
e1a7e51d868f7b36fe56013f25587b7be7733235
refs/heads/master
2021-01-23T03:59:18.110250
2017-03-25T11:46:38
2017-03-25T11:46:38
86,141,268
0
0
null
null
null
null
UTF-8
Java
false
false
2,030
java
package nhb.utils.webview.headless.impl; import java.io.IOException; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.http.HttpResponse; import org.apache.http.ParseException; import org.apache.http.client.CookieStore; import org.apache.http.client.protocol.HttpClientContext; import org.apache.http.util.EntityUtils; import com.nhb.common.Loggable; import lombok.Getter; import lombok.Setter; import nhb.utils.webview.headless.HeadlessWebview; import nhb.utils.webview.headless.HeadlessWebviewCallback; public abstract class AbstractHeadlessWebview implements HeadlessWebview, Loggable { @Setter @Getter private String userAgent; @Getter private final CookieStore cookieStore; @Getter private String uri; @Getter private String targetHost; private String pageSource; private AtomicBoolean parsePageSource = new AtomicBoolean(true); protected AbstractHeadlessWebview(CookieStore cookieStore) { this.cookieStore = cookieStore; } protected String extractUri(HttpClientContext context) { return HeadlessWebview.extractUri(context); } @Override public void setParsePageSource(boolean parsePageSource) { this.parsePageSource.set(parsePageSource); } @Override public boolean getParsePageSource() { return this.parsePageSource.get(); } @Override public String getPageSource() { if (this.parsePageSource.get()) { return this.pageSource; } throw new IllegalStateException("Cannot get page source when 'parsePageSource' is setting to false"); } protected void processResponse(HttpClientContext context, HttpResponse response, HeadlessWebviewCallback callback) { this.uri = extractUri(context); this.targetHost = context.getTargetHost().toURI(); try { if (this.getParsePageSource()) { this.pageSource = EntityUtils.toString(response.getEntity()); } if (callback != null) { callback.onComplete(context, response); } } catch (ParseException | IOException e) { if (callback != null) { callback.onFailure(context, e); } } } }
[ "hoangbach.bk@gmail.com" ]
hoangbach.bk@gmail.com
164df6a3f154b80fe221375786851d475b60be6c
571ce46236afb5d836b713c5f3cc165db5d2ae77
/packages/apps/PrizeDialerV8/src/com/android/dialer/calllog/PhoneAccountUtils.java
e7700554146286df591fd9250290e7c114bccdf4
[]
no_license
sengeiou/prize
d6f56746ba82e0bbdaa47b5bea493ceddb0abd0c
e27911e194c604bf651f7bed0f5f9ce8f7dc8d4d
refs/heads/master
2020-04-28T04:45:42.207852
2018-11-23T13:50:20
2018-11-23T13:50:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,124
java
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.dialer.calllog; import android.content.ComponentName; import android.content.Context; import android.support.annotation.Nullable; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.text.TextUtils; import com.android.contacts.common.compat.CompatUtils; import com.android.dialer.util.TelecomUtil; import com.mediatek.dialer.ext.ExtensionManager; import java.util.ArrayList; import java.util.List; /** * Methods to help extract {@code PhoneAccount} information from database and Telecomm sources. */ public class PhoneAccountUtils { /** * Return a list of phone accounts that are subscription/SIM accounts. */ public static List<PhoneAccountHandle> getSubscriptionPhoneAccounts(Context context) { List<PhoneAccountHandle> subscriptionAccountHandles = new ArrayList<PhoneAccountHandle>(); final List<PhoneAccountHandle> accountHandles = TelecomUtil.getCallCapablePhoneAccounts(context); for (PhoneAccountHandle accountHandle : accountHandles) { PhoneAccount account = TelecomUtil.getPhoneAccount(context, accountHandle); /// M: Judge whether the account is null if (account != null && account.hasCapabilities( PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) { subscriptionAccountHandles.add(accountHandle); } } return subscriptionAccountHandles; } /** * Compose PhoneAccount object from component name and account id. */ @Nullable public static PhoneAccountHandle getAccount(@Nullable String componentString, @Nullable String accountId) { if (TextUtils.isEmpty(componentString) || TextUtils.isEmpty(accountId)) { return null; } final ComponentName componentName = ComponentName.unflattenFromString(componentString); if (componentName == null) { return null; } return new PhoneAccountHandle(componentName, accountId); } /** * Extract account label from PhoneAccount object. */ @Nullable public static String getAccountLabel(Context context, @Nullable PhoneAccountHandle accountHandle) { PhoneAccount account = getAccountOrNull(context, accountHandle); if (account != null && account.getLabel() != null) { return account.getLabel().toString(); } return null; } /** * Extract account color from PhoneAccount object. */ public static int getAccountColor(Context context, @Nullable PhoneAccountHandle accountHandle) { final PhoneAccount account = TelecomUtil.getPhoneAccount(context, accountHandle); // For single-sim devices the PhoneAccount will be NO_HIGHLIGHT_COLOR by default, so it is // safe to always use the account highlight color. return account == null ? PhoneAccount.NO_HIGHLIGHT_COLOR : account.getHighlightColor(); } /** * Determine whether a phone account supports call subjects. * * @return {@code true} if call subjects are supported, {@code false} otherwise. */ public static boolean getAccountSupportsCallSubject(Context context, @Nullable PhoneAccountHandle accountHandle) { final PhoneAccount account = TelecomUtil.getPhoneAccount(context, accountHandle); return account == null ? false : account.hasCapabilities(PhoneAccount.CAPABILITY_CALL_SUBJECT); } /** * Retrieve the account metadata, but if the account does not exist or the device has only a * single registered and enabled account, return null. */ @Nullable private static PhoneAccount getAccountOrNull(Context context, @Nullable PhoneAccountHandle accountHandle) { /// M: for ALPS02430078 /// Plug-in OP09 do not return null in one account case @{ if (TelecomUtil.getCallCapablePhoneAccounts(context).size() <= 1 && ExtensionManager.getInstance().getCallLogExtension().shouldReturnAccountNull()) { return null; } /// @} return TelecomUtil.getPhoneAccount(context, accountHandle); } /** M: [Call Log Account Filter] * Retrieve the account by given id, return null if not find @{ */ public static PhoneAccountHandle getPhoneAccountById(Context context, String id) { if (!TextUtils.isEmpty(id)) { final TelecomManager telecomManager = (TelecomManager) context .getSystemService(Context.TELECOM_SERVICE); final List<PhoneAccountHandle> accounts = telecomManager.getCallCapablePhoneAccounts(); for (PhoneAccountHandle account : accounts) { if (id.equals(account.getId())) { return account; } } } return null; } public static PhoneAccount getPhoneAccount(Context context, PhoneAccountHandle acctHandle) { TelecomManager telecomManager = (TelecomManager) context .getSystemService(Context.TELECOM_SERVICE); return telecomManager.getPhoneAccount(acctHandle); } public static String getAccountNumber(Context context, PhoneAccountHandle phoneAccount) { final PhoneAccount account = getPhoneAccount(context, phoneAccount); if (account == null) { return null; } return account.getAddress().getSchemeSpecificPart(); } public static boolean hasMultipleCallCapableAccounts(Context context) { TelecomManager telecomManager = (TelecomManager) context .getSystemService(Context.TELECOM_SERVICE); return telecomManager.getCallCapablePhoneAccounts().size() > 1; } /** @} */ /** * M: [IMS Call] Return true if given account is subscription/SIM account. */ public static boolean isSubScriptionAccount(Context context, PhoneAccountHandle accountHandle) { TelecomManager telecomManager = (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE); final PhoneAccount account = telecomManager.getPhoneAccount(accountHandle); if (account != null && account.hasCapabilities( PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) { return true; } return false; } }
[ "18218724438@163.com" ]
18218724438@163.com
b0fc0dd2d6de5dc2de2b3cccc807f0fc276fb115
93389ce8f12223ef3e7c58e6c8fc9f84ed03f2ec
/authentication/mp-jwt-server/src/test/java/be/c4j/ee/security/credentials/authentication/mp/filter/MPBearerTokenVerifierTest.java
334895b74c96950b8f98ced6b1b3b5b677bb3dae
[ "Apache-2.0" ]
permissive
rdebusscher/octopus-backup
315d0028e3eeef481c47168937c9c8c322e7f26a
954f60fe791982f79e013eccad2e4cfbafd47960
refs/heads/master
2020-03-17T00:45:45.359993
2018-05-04T14:22:57
2018-05-04T14:22:57
133,128,645
0
0
null
null
null
null
UTF-8
Java
false
false
6,024
java
/* * Copyright 2014-2018 Rudy De Busscher (https://www.atbash.be) * * 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 be.c4j.ee.security.credentials.authentication.mp.filter; import be.c4j.ee.security.credentials.authentication.mp.config.MPConfiguration; import be.c4j.ee.security.exception.OctopusConfigurationException; import be.c4j.test.util.ReflectionUtil; import com.nimbusds.jose.JOSEObjectType; import com.nimbusds.jose.JWSAlgorithm; import com.nimbusds.jose.JWSHeader; import com.nimbusds.jwt.JWTClaimsSet; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.slf4j.Logger; import uk.org.lidalia.slf4jtest.TestLoggerFactory; import java.util.Arrays; import java.util.Date; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; /** * */ @RunWith(MockitoJUnitRunner.class) public class MPBearerTokenVerifierTest { private static final String AUDIENCE = "aud"; @Mock private MPConfiguration mpConfigurationMock; @InjectMocks private MPBearerTokenVerifier mpBearerTokenVerifier; private Logger logger; @Before public void setup() throws IllegalAccessException { logger = TestLoggerFactory.getTestLogger(MPBearerTokenVerifier.class); ReflectionUtil.injectDependencies(mpBearerTokenVerifier, logger); } @After public void clearLoggers() { TestLoggerFactory.clear(); } @Test public void init() { when(mpConfigurationMock.getAudience()).thenReturn(AUDIENCE); mpBearerTokenVerifier.init(); } @Test(expected = OctopusConfigurationException.class) public void init_missingAud() { mpBearerTokenVerifier.init(); } @Test public void verify_header() { assertThat(mpBearerTokenVerifier.verify(createHeader(HEADER_CONTENT.CORRECT_ALGORITHM, HEADER_CONTENT.CORRECT_TYPE))).isTrue(); } @Test public void verify_header_wrongAlgo() { assertThat(mpBearerTokenVerifier.verify(createHeader(HEADER_CONTENT.WRONG_ALGORITHM, HEADER_CONTENT.CORRECT_TYPE))).isFalse(); } @Test public void verify_header_wrongType() { assertThat(mpBearerTokenVerifier.verify(createHeader(HEADER_CONTENT.CORRECT_ALGORITHM, HEADER_CONTENT.WRONG_TYPE))).isFalse(); } @Test public void verify_header_wrongAlgoAndType() { assertThat(mpBearerTokenVerifier.verify(createHeader(HEADER_CONTENT.WRONG_ALGORITHM, HEADER_CONTENT.WRONG_TYPE))).isFalse(); } @Test public void verify_claimSet() { when(mpConfigurationMock.getAudience()).thenReturn(AUDIENCE); assertThat(mpBearerTokenVerifier.verify(createClaims(CLAIM_CONTENT.CORRECT_AUDIENCE, CLAIM_CONTENT.CORRECT_DATE))).isTrue(); } @Test public void verify_wrongAudience() { when(mpConfigurationMock.getAudience()).thenReturn(AUDIENCE); assertThat(mpBearerTokenVerifier.verify(createClaims(CLAIM_CONTENT.WRONG_AUDIENCE, CLAIM_CONTENT.CORRECT_DATE))).isFalse(); } @Test public void verify_wrongDate() { when(mpConfigurationMock.getAudience()).thenReturn(AUDIENCE); assertThat(mpBearerTokenVerifier.verify(createClaims(CLAIM_CONTENT.CORRECT_AUDIENCE, CLAIM_CONTENT.WRONG_DATE))).isFalse(); } @Test public void verify_wrongAudienceAndDate() { when(mpConfigurationMock.getAudience()).thenReturn(AUDIENCE); assertThat(mpBearerTokenVerifier.verify(createClaims(CLAIM_CONTENT.WRONG_AUDIENCE, CLAIM_CONTENT.WRONG_DATE))).isFalse(); } private JWTClaimsSet createClaims(CLAIM_CONTENT... claimContent) { List<CLAIM_CONTENT> content = Arrays.asList(claimContent); JWTClaimsSet.Builder builder = new JWTClaimsSet.Builder(); if (content.contains(CLAIM_CONTENT.WRONG_AUDIENCE)) { builder.audience("SomeAudience"); } if (content.contains(CLAIM_CONTENT.CORRECT_AUDIENCE)) { builder.audience(AUDIENCE); } if (content.contains(CLAIM_CONTENT.WRONG_DATE)) { builder.expirationTime(createDate(-2)); } if (content.contains(CLAIM_CONTENT.CORRECT_DATE)) { builder.expirationTime(createDate(2)); } return builder.build(); } private Date createDate(int addSeconds) { return new Date(System.currentTimeMillis() + addSeconds * 1000); } private JWSHeader createHeader(HEADER_CONTENT... headerContent) { List<HEADER_CONTENT> content = Arrays.asList(headerContent); JWSHeader.Builder builder = null; if (content.contains(HEADER_CONTENT.CORRECT_ALGORITHM)) { builder = new JWSHeader.Builder(JWSAlgorithm.RS256); } if (content.contains(HEADER_CONTENT.WRONG_ALGORITHM)) { builder = new JWSHeader.Builder(JWSAlgorithm.RS512); } if (content.contains(HEADER_CONTENT.CORRECT_TYPE)) { builder.type(JOSEObjectType.JWT); } if (content.contains(HEADER_CONTENT.WRONG_TYPE)) { builder.type(JOSEObjectType.JOSE); } return builder.build(); } private static enum CLAIM_CONTENT { WRONG_AUDIENCE, CORRECT_AUDIENCE, WRONG_DATE, CORRECT_DATE; } private static enum HEADER_CONTENT { WRONG_ALGORITHM, CORRECT_ALGORITHM, WRONG_TYPE, CORRECT_TYPE; } }
[ "rdebusscher@gmail.com" ]
rdebusscher@gmail.com
5aaebba9308181505762906d162ba09b93136bb7
5c02567570b038edfe1ff3f43cc7a256da788fc3
/bibliotheque-serveur/bibliotheque-serveur-consumer/src/main/java/fr/oc/projet/consumer/contract/dao/utilisateur/NiveauAccesDao.java
226d0ad05da1af89e76916db2b621f77d7346fcd
[]
no_license
YoannR09/Projet_7_OC_old
8648848577ecff51b4fc1589a2ba054df7d40242
3fd7dfc8ed7ac87f6261440cf9b731ecc3463276
refs/heads/master
2022-10-06T02:52:11.752230
2019-06-13T06:49:23
2019-06-13T06:49:23
190,861,806
0
0
null
2022-09-22T18:45:36
2019-06-08T08:03:26
Java
UTF-8
Java
false
false
266
java
package fr.oc.projet.consumer.contract.dao.utilisateur; import fr.oc.projet.model.beans.utilisateur.NiveauAcces; import java.util.List; public interface NiveauAccesDao { NiveauAcces getNiveauAcces(Integer pId); List<NiveauAcces> getListNiveauAcces(); }
[ "el-rambo-poto@hotmail.fr" ]
el-rambo-poto@hotmail.fr
1193ef944ea36f77d926810eb6cf667902d125ba
70583bbcf0d17588e08dabd73387274385066bea
/src/main/java/database/sql/type/CustomerManagementSQL.java
7d98103037b84c1548a5be902dc4ad06d78428ac
[ "MIT" ]
permissive
ivantha/pos-system
9e653022289a58e7bbda28af018e90d8de45b490
ca8016901e63a5f4dd2206573b7d8ad23cc46da1
refs/heads/master
2022-11-08T09:17:09.835212
2020-07-03T06:00:18
2020-07-03T06:00:18
110,659,001
0
0
MIT
2020-07-03T05:50:48
2017-11-14T08:01:58
Java
UTF-8
Java
false
false
4,981
java
/* * Copyright © 02.10.2015 by O.I.Mudannayake. All Rights Reserved. */ package database.sql.type; import cache.CustomerCache; import entity.Customer; import database.sql.SQL; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.table.DefaultTableModel; /** * * @author Ivantha */ public class CustomerManagementSQL extends SQL { public String generateNewID() { String preID = this.getLastValue("customer", "customer_id"); String idX = String.format("%07d", Integer.parseInt(preID.substring(3, 10)) + 1); result = "cu." + idX; return result; } public void newCustomer(Customer customer) { query = "INSERT INTO customer(customer_id, name, telephone, address) VALUES (" + "'" + customer.getCustomerID() + "'," + "'" + customer.getName() + "'," + "'" + customer.getTelephone() + "'," + "'" + customer.getAddress() + "')"; c.setQuery(query); CustomerCache.setCustomerListChanged(); CustomerCache.setCustomerDetailsChanged(); } public void updateCustomer(Customer customer) { query = "UPDATE customer SET " + "name = '" + customer.getName() + "', " + "telephone = '" + customer.getTelephone() + "', " + "address = '" + customer.getAddress() + "' " + "WHERE customer_id = '" + customer.getCustomerID() + "'"; c.setQuery(query); CustomerCache.setCustomerListChanged(); CustomerCache.setCustomerDetailsChanged(); } public void removeCustomer(String customerID) { query = "DELETE FROM customer WHERE customer_id = '" + customerID + "'"; c.setQuery(query); CustomerCache.setCustomerListChanged(); CustomerCache.setCustomerDetailsChanged(); } public void getCustomers(ArrayList<String> customerList) { query = "SELECT name FROM customer ORDER BY row ASC"; rs = c.getQuery(query); try { while (rs.next()) { String customerName = rs.getString("name"); customerList.add(customerName); } } catch (SQLException ex) { Logger.getLogger(CustomerManagementSQL.class.getName()).log(Level.SEVERE, null, ex); } } public void getCustomerDetail(HashMap<String, String> customerIDMap, HashMap<String, String> customerTelephoneMap, HashMap<String, String> customerAddressMap) { query = "SELECT customer_id, name, address, telephone FROM customer ORDER BY row ASC"; rs = c.getQuery(query); try { while (rs.next()) { String customerID = rs.getString("customer_id"); String name = rs.getString("name"); String address = rs.getString("address"); String telephone = rs.getString("telephone"); customerIDMap.put(name, customerID); customerTelephoneMap.put(name, telephone); customerAddressMap.put(name, address); } } catch (SQLException ex) { Logger.getLogger(CustomerManagementSQL.class.getName()).log(Level.SEVERE, null, ex); } } public void showCustomers(DefaultTableModel dtm) { query = "SELECT customer_id, name, telephone, address FROM customer ORDER BY row ASC"; rs = c.getQuery(query); try { while (rs.next()) { String customerID = rs.getString("customer_id"); String name = rs.getString("name"); String telephone = rs.getString("telephone"); String address = rs.getString("address"); dtm.addRow(new Object[]{customerID, name, telephone, address}); } } catch (SQLException ex) { Logger.getLogger(EmployeeManagementSQL.class.getName()).log(Level.SEVERE, null, ex); } } public void showCustomerHistory(Customer customer, DefaultTableModel dtm) { query = "SELECT invoice.invoice_no, invoice.date, srn.srn_no, srn.date " + "FROM invoice " + "LEFT JOIN srn ON invoice.invoice_no = srn.invoice_no " + "WHERE invoice.customer = " + "'" + customer.getCustomerID() + "'"; rs = c.getQuery(query); try { while (rs.next()) { String invoiceNo = rs.getString("invoice.invoice_no"); String invoiceDate = rs.getString("invoice.date"); String srnNo = rs.getString("srn.srn_no"); String srnDate = rs.getString("srn.date"); dtm.addRow(new Object[]{invoiceNo, invoiceDate, srnNo, srnDate}); } } catch (SQLException ex) { Logger.getLogger(CustomerManagementSQL.class.getName()).log(Level.SEVERE, null, ex); } } }
[ "oshan.ivantha@gmail.com" ]
oshan.ivantha@gmail.com
2cd204a453dc08505eb3e26fc21ad3163d05cc70
fa29571ec1a5c6988e2054078b144262b5fbbef0
/fml-parser/src/main/java/org/openflexo/foundation/fml/parser/node/AStrictfpModifier.java
0efaf19f20b54c0a2f12c76c5a3cca970247dcfb
[]
no_license
woutersl/openflexo-core
e4dde5b21b7fa5f416bd4ac99d5d88398419493b
85fe6334f5534b57d22fbef7d4f6138062890ca2
refs/heads/1.7.1
2021-01-22T20:34:43.071812
2015-04-02T08:45:59
2015-04-02T08:45:59
33,298,501
0
0
null
2015-04-02T08:38:01
2015-04-02T08:38:01
null
UTF-8
Java
false
false
1,944
java
/* This file was generated by SableCC (http://www.sablecc.org/). */ package org.openflexo.foundation.fml.parser.node; import org.openflexo.foundation.fml.parser.analysis.*; @SuppressWarnings("nls") public final class AStrictfpModifier extends PModifier { private TStrictfp _strictfp_; public AStrictfpModifier() { // Constructor } public AStrictfpModifier( @SuppressWarnings("hiding") TStrictfp _strictfp_) { // Constructor setStrictfp(_strictfp_); } @Override public Object clone() { return new AStrictfpModifier( cloneNode(this._strictfp_)); } public void apply(Switch sw) { ((Analysis) sw).caseAStrictfpModifier(this); } public TStrictfp getStrictfp() { return this._strictfp_; } public void setStrictfp(TStrictfp node) { if(this._strictfp_ != null) { this._strictfp_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } this._strictfp_ = node; } @Override public String toString() { return "" + toString(this._strictfp_); } @Override void removeChild(@SuppressWarnings("unused") Node child) { // Remove child if(this._strictfp_ == child) { this._strictfp_ = null; return; } throw new RuntimeException("Not a child."); } @Override void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) { // Replace child if(this._strictfp_ == oldChild) { setStrictfp((TStrictfp) newChild); return; } throw new RuntimeException("Not a child."); } }
[ "sylvain@openflexo.org" ]
sylvain@openflexo.org
21d4db85b1ea15a003b5532d020337bcd1360253
14958b9a960b30fcb146f2c7f05ba7dc37472491
/crnk-gen/crnk-gen-openapi/src/main/java/io/crnk/gen/openapi/internal/schemas/ResourcesResponseSchema.java
c5d64bec87bade4bb6c5ed5a80cf9d3f943d5a02
[ "Apache-2.0" ]
permissive
macleodbroad-wf/crnk-framework
15ef0e742df556ef980159784cb71c1a0f348876
00fc807a8a66fbc18513960d5bb012402a0329f0
refs/heads/master
2020-08-07T02:02:32.275912
2019-10-06T08:47:00
2019-10-06T08:47:00
213,251,940
0
0
Apache-2.0
2019-10-06T22:13:08
2019-10-06T22:13:08
null
UTF-8
Java
false
false
908
java
package io.crnk.gen.openapi.internal.schemas; import io.crnk.meta.model.resource.MetaResource; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.ComposedSchema; import io.swagger.v3.oas.models.media.Schema; import java.util.Arrays; import java.util.Collections; public class ResourcesResponseSchema extends AbstractSchemaGenerator { public ResourcesResponseSchema(MetaResource metaResource) { super(metaResource); } public Schema schema() { return new ComposedSchema() .allOf( Arrays.asList( new ListResponseMixin().$ref(), new Schema() .addProperties( "data", new ArraySchema() .items(new ResourceSchema(metaResource).$ref())) .required(Collections.singletonList("data")))); } }
[ "remo.meier.ch@gmail.com" ]
remo.meier.ch@gmail.com
60ece85ea9b6f645ddd26c46fb4e29539f62795b
2d43832096f8b4f7e84777c326aa94f7c61643d8
/atcrowdfunding03-admin-component/src/main/java/com/atguigu/crowd/mvc/interceptor/LoginInterceptor.java
654f8b4e7aea5f360275b5398f3c66309532912a
[]
no_license
wuduzhun/atcrowdfunding01-admin-parent
c2cd7a0edcecca35e4a9eb3b8f08c5eb282874cb
a84fb7c4f23ba1c7f9d2613f069dbc9812269a11
refs/heads/master
2023-04-07T04:57:20.031119
2021-04-18T13:11:51
2021-04-18T13:11:51
359,146,675
0
0
null
null
null
null
UTF-8
Java
false
false
1,256
java
package com.atguigu.crowd.mvc.interceptor; import com.atguigu.crowd.constant.CrowdConstant; import com.atguigu.crowd.entity.Admin; import com.atguigu.crowd.exception.AccessForBiddenException; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; public class LoginInterceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object o) throws Exception { // 1.通过request对象获取session对象 HttpSession session = request.getSession(); // 2.尝试从session域中获取Admin对象 Admin admin = (Admin) session.getAttribute(CrowdConstant.ATTR_NAME_LOGIN_ADMIN); // 3.判断Admin对象是否为空 if (admin == null) { // 4.抛出异常 throw new AccessForBiddenException(CrowdConstant.MESSAGE_ACCESS_FORBIDEN); } // 5.如果admin不为null,则返回true放行 return true; } }
[ "test@qq.com" ]
test@qq.com
1d83699d25bd807e9512c4850219a578710d9b20
2719cab59432235e9529f06b86486e159ed9dd49
/day-16-/src/main/java/com/ming16/Test02.java
29bcda8a8a0854e0dadbd025b5cb06feb938dece
[]
no_license
Magiewire/Employment-class
86e4aa00a23550156427025ef2ddb9983f72ab87
fff0233ead3ac485015becf1d3845f86a26fd38c
refs/heads/master
2022-04-10T13:24:25.682348
2020-02-24T03:30:06
2020-02-24T03:30:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
948
java
package com.ming16; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.SocketException; public class Test02 { public static void main(String[] args) throws IOException { // 创建接收器对象 DatagramSocket datagramSocket = new DatagramSocket(12345); // 创建数据报对象 byte[] bytes = new byte[104]; // 创建数据报 DatagramPacket datagramPacket = new DatagramPacket(bytes, bytes.length); // 进行数据阻塞 datagramSocket.receive(datagramPacket); // 进行数据发送 System.out.println("------"); // 进行输出 int len = datagramPacket.getLength(); byte[] data = datagramPacket.getData(); // 进行数据发送 System.out.println("数据发送成功 " + new String(data, 0, len)); // 进行释放 datagramSocket.close(); } }
[ "mingming@mingming.email" ]
mingming@mingming.email
110cac5acb84836ace1f0e5c248745140df4b216
dbf430b1a6fd20fa1d18aeac2e72329d043cc073
/optaplanner-core/src/main/java/org/optaplanner/core/config/heuristic/selector/move/generic/PillarChangeMoveSelectorConfig.java
bfd07e1e45f1a7acafa25a150f51dfaa43be777f
[ "Apache-2.0" ]
permissive
radster360/optaplanner
26b5a7c62a9d5697478878aaebe8a46227c16b8f
8b8280423cef3950c9e836a360e81f1db1b7c911
refs/heads/master
2021-05-21T12:37:05.217360
2020-08-18T00:40:02
2020-08-18T00:40:02
12,590,299
0
0
Apache-2.0
2020-08-18T00:40:04
2013-09-04T12:34:50
Objective-C
UTF-8
Java
false
false
2,027
java
/* * Copyright 2020 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.optaplanner.core.config.heuristic.selector.move.generic; import javax.xml.bind.annotation.XmlElement; import org.optaplanner.core.config.heuristic.selector.value.ValueSelectorConfig; import org.optaplanner.core.config.util.ConfigUtils; public class PillarChangeMoveSelectorConfig extends AbstractPillarMoveSelectorConfig<PillarChangeMoveSelectorConfig> { public static final String XML_ELEMENT_NAME = "pillarChangeMoveSelector"; @XmlElement(name = "valueSelector") private ValueSelectorConfig valueSelectorConfig = null; public ValueSelectorConfig getValueSelectorConfig() { return valueSelectorConfig; } public void setValueSelectorConfig(ValueSelectorConfig valueSelectorConfig) { this.valueSelectorConfig = valueSelectorConfig; } @Override public PillarChangeMoveSelectorConfig inherit(PillarChangeMoveSelectorConfig inheritedConfig) { super.inherit(inheritedConfig); valueSelectorConfig = ConfigUtils.inheritConfig(valueSelectorConfig, inheritedConfig.getValueSelectorConfig()); return this; } @Override public PillarChangeMoveSelectorConfig copyConfig() { return new PillarChangeMoveSelectorConfig().inherit(this); } @Override public String toString() { return getClass().getSimpleName() + "(" + pillarSelectorConfig + ", " + valueSelectorConfig + ")"; } }
[ "gds.geoffrey.de.smet@gmail.com" ]
gds.geoffrey.de.smet@gmail.com
40bb2f3e992e0515b25ce42f971b755fdab537f7
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/LibriVox_app.librivox.android/javafiles/android/support/v7/widget/ViewBoundsCheck$Callback.java
1783cb7f8b008bf67ca1e1f668346ee0078948f6
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
556
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package android.support.v7.widget; import android.view.View; interface ViewBoundsCheck$Callback { public abstract View getChildAt(int i); public abstract int getChildCount(); public abstract int getChildEnd(View view); public abstract int getChildStart(View view); public abstract View getParent(); public abstract int getParentEnd(); public abstract int getParentStart(); }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
8cccd0ea1b6c5cf60df9f99e5092cb139e004435
e949ab5a99ac25629fcde45d6445e42b776ba6f0
/uizacoresdk/src/main/java/vn/uiza/views/overscroll/lib/overscroll/adapters/StaticOverScrollDecorAdapter.java
ed929fe31b40e30d1fbdc87a355bb6f60450f350
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
GianhTran/uiza-android-sdk-player
056a29a315d2f41aca69a96d3e62f6dca4358bcf
13f78c299907867073bae21867c3533d31531cc4
refs/heads/master
2020-03-30T00:33:32.145718
2018-09-17T04:55:56
2018-09-17T04:55:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
731
java
package vn.uiza.views.overscroll.lib.overscroll.adapters; import android.view.View; /** * A static adapter for views that are ALWAYS over-scroll-able (e.g. image view). * * @author amit * * @see HorizontalOverScrollBounceEffectDecorator * @see VerticalOverScrollBounceEffectDecorator */ public class StaticOverScrollDecorAdapter implements IOverScrollDecoratorAdapter { protected final View mView; public StaticOverScrollDecorAdapter(View view) { mView = view; } @Override public View getView() { return mView; } @Override public boolean isInAbsoluteStart() { return true; } @Override public boolean isInAbsoluteEnd() { return true; } }
[ "loitp@pateco.vn" ]
loitp@pateco.vn
95ac41b4903a7583d23bca1ac384a99716fae241
86215bd7ab2457497727be0193d3960feec3b524
/demo-fpml/src/main/generated-source/org/fpml/reporting/TradeCashflowsId.java
cf2d2dc2340cfd1490518c46269893d0ecb2516f
[]
no_license
prasobhpk/stephennimmo-templates
4770d5619488fe39ffa289b6ede36578c29d6c4d
ce2b04c09b6352311df65ad8643f682452f9d6a7
refs/heads/master
2016-09-11T13:47:44.366025
2013-08-21T18:29:55
2013-08-21T18:29:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,973
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2011.06.01 at 08:58:10 AM CDT // package org.fpml.reporting; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.adapters.NormalizedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * An identifier used to identify the collection of cashflows for a particular trade on a particular day. * * <p>Java class for TradeCashflowsId complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="TradeCashflowsId"> * &lt;simpleContent> * &lt;extension base="&lt;http://www.fpml.org/FpML-5/reporting>Scheme"> * &lt;attribute name="tradeCashflowsIdScheme" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TradeCashflowsId", propOrder = { "value" }) public class TradeCashflowsId implements Serializable { private final static long serialVersionUID = 1L; @XmlValue @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String value; @XmlAttribute @XmlSchemaType(name = "anyURI") protected String tradeCashflowsIdScheme; /** * The base class for all types which define coding schemes. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * Gets the value of the tradeCashflowsIdScheme property. * * @return * possible object is * {@link String } * */ public String getTradeCashflowsIdScheme() { return tradeCashflowsIdScheme; } /** * Sets the value of the tradeCashflowsIdScheme property. * * @param value * allowed object is * {@link String } * */ public void setTradeCashflowsIdScheme(String value) { this.tradeCashflowsIdScheme = value; } }
[ "stephennimmo@gmail.com@ea902603-27ce-0092-70ca-3da810587992" ]
stephennimmo@gmail.com@ea902603-27ce-0092-70ca-3da810587992
d3812210b9db46ee45cf51fae589dcd4b33a1f35
b8176d00409d65787a9f0e72f82fcdd96e18764d
/agent/src/main/java/com/zte/ums/zenap/itm/agent/plugin/linux/util/CipherAlgorithm.java
c372caa544e5598c341007cf02e7c56e839631c7
[]
no_license
Aires1208/DatabaseMonitor
9baa36fbb1a9cf93c145a315934ac469073edce2
62f755fb1b694108940cabe3881f793983bfeb17
refs/heads/master
2021-01-18T08:13:12.845079
2017-07-27T02:21:39
2017-07-27T02:21:39
84,301,835
0
0
null
null
null
null
UTF-8
Java
false
false
4,526
java
package com.zte.ums.zenap.itm.agent.plugin.linux.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESKeySpec; import java.security.NoSuchAlgorithmException; /** * <p> * 文件名称: 加解密算法 * </p> * <p> * 文件描述: 加解密算法类,提供加密和解密两种算法 * </p> * <p> * 版权所有: 版权所有(C)2001-2004 * </p> * <p> * 公 司: 深圳市中兴通讯股份有限公司 * </p> * <p> * 内容摘要: * </p> * <p> * 其他说明: * </p> * <p> * 完成日期:2002年10月20日 * </p> * <p> * 修改记录1: * </p> * * @version 1.0 * @author 孙旭东 * @JTIUSN */ public class CipherAlgorithm { private static final Logger dMsg = LoggerFactory.getLogger(CipherAlgorithm.class); /* 加密口令的密钥数据 */ private final static byte[] RAW_KEY_DATA = new byte[] { (byte) 0xF1, (byte) 0xF7, (byte) 0xDF, (byte) 0x9D, (byte) 0x91, (byte) 0xF7, (byte) 0x3D, (byte) 0xA7 }; /* 定义 加密算法,可用 DES,DESede,Blowfish */ private final static String ALGORITHM = "DES"; /* 密钥,生成密钥的时间比较长 */ private static SecretKey key = null; /** * */ private static void getKey() { try { // 添加新安全算法,如果用JCE就要把它添加进去 // Security.addProvider(new com.sun.crypto.provider.SunJCE()); // 获取密匙数据 // DES算法要求有一个可信任的随机数源 // SecureRandom sr = new SecureRandom(); DESKeySpec dks = new DESKeySpec(RAW_KEY_DATA); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(ALGORITHM); key = keyFactory.generateSecret(dks); } catch (NoSuchAlgorithmException e1) { dMsg.info(e1.getMessage(), e1); } catch (Exception e3) { dMsg.info(e3.getMessage(), e3); } } /** * 加密算法 * * @param clearText * 明文 * @return String 密文 */ public static String encrypt(String clearText) { String result = null; if (key == null) { getKey(); } try { Cipher c1 = Cipher.getInstance(ALGORITHM); c1.init(Cipher.ENCRYPT_MODE, key); byte[] cipherByte = c1.doFinal(clearText.getBytes()); result = byte2hex(cipherByte); } catch (Exception e1) { dMsg.info(e1.getMessage()); } return result; } /** * 解密算法 * * @param cipherText * 密文 * @return String 明文 */ public static String decrypt(String cipherText) { String result = cipherText; if (key == null) { getKey(); } try { /* 先转化字符串成为字节流 */ byte[] cipherByte = string2byte(cipherText); // 解密 Cipher c1 = Cipher.getInstance(ALGORITHM); c1.init(Cipher.DECRYPT_MODE, key); byte[] clearByte = c1.doFinal(cipherByte); result = new String(clearByte); return result; } catch (Exception e1) { dMsg.info(e1.getMessage()); } return result; } /** * 二进制转字符串 * * @param textByte * @return */ private static String byte2hex(byte[] textByte) { String hs = ""; String stmp = ""; for (int n = 0; n < textByte.length; n++) { stmp = (Integer.toHexString(textByte[n] & 0XFF)); if (stmp.length() == 1) { hs = hs + "0" + stmp; } else { hs = hs + stmp; } // if (n<b.length-1) hs=hs+":"; } return hs.toUpperCase(); } /** * 字符串转二进制 * * @param hexText * @return */ private static byte[] string2byte(String hexText) { int len = hexText.length(); /* 一个字节是由两个字符组成的 */ byte[] hexByte = new byte[len / 2]; String stmp = ""; for (int i = 0; i < len; i += 2) { stmp = hexText.substring(i, i + 2); // hexByte[i/2]=(byte)(Integer.parseInt(stmp,16)&((int)0xFF)); hexByte[i / 2] = (byte) Integer.parseInt(stmp, 16); } return hexByte; } }
[ "zhang.pei162@zte.com.cn" ]
zhang.pei162@zte.com.cn
c2e42c2c6b7fa0e7368cb2a034ebed3b9064bcbd
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/arc071/B/1239816.java
a9709fe279690cd575d28030958cde18e1ce0590
[]
no_license
Kawser-nerd/CLCDSA
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
aee32551795763b54acb26856ab239370cac4e75
refs/heads/master
2022-02-09T11:08:56.588303
2022-01-26T18:53:40
2022-01-26T18:53:40
211,783,197
23
9
null
null
null
null
UTF-8
Java
false
false
694
java
import java.util.Arrays; import java.util.Scanner; public class Main{ public static void main(String[] args){ long PRIME=1000000007; Scanner sc=new Scanner(System.in); int N =Integer.parseInt(sc.next()); int M =Integer.parseInt(sc.next()); long[] x= new long[N]; long[] y= new long[M]; for(int i=0;i<N;i++)x[i]=Long.parseLong(sc.next()); for(int j=0;j<M;j++)y[j]=Long.parseLong(sc.next()); Arrays.sort(x); Arrays.sort(y); long xans =0; long yans =0; for(int i=0;i<N;i++){ xans=(xans+(i-(N-1-i))*x[i])%PRIME; } for(int j=0;j<M;j++){ yans=(yans+(j-(M-1-j))*y[j])%PRIME; } System.out.println((xans*yans)%PRIME); sc.close(); } }
[ "kwnafi@yahoo.com" ]
kwnafi@yahoo.com