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
ca11a383bfba5fcaa1cd379c993e1129403641c9
e9faf07f168cfe7a5d7d02c303f74a876b6883fe
/src/main/java/net/abusingjava/sql/v1/impl/GenericActiveRecordFactory.java
d60b1a43b3204fb2969e24d9b6fb802aeb3339de
[ "BSD-2-Clause", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
sarndt/AbusingSQL
5b591e03d2a76b93d3f5744955f29983d16b9498
3fe09ab7cb0655bd227cc6f1891d39c307d9d685
refs/heads/master
2016-09-05T18:40:44.802625
2012-03-20T10:47:11
2012-03-20T10:47:11
3,817,405
0
1
null
null
null
null
UTF-8
Java
false
false
535
java
package net.abusingjava.sql.v1.impl; import java.sql.ResultSet; import net.abusingjava.sql.v1.ActiveRecord; import net.abusingjava.sql.v1.ActiveRecordFactory; public class GenericActiveRecordFactory implements ActiveRecordFactory { @Override public <T extends ActiveRecord<T>> T create(Class<T> $class) { // TODO Auto-generated method stub return null; } @Override public <T extends ActiveRecord<T>> T createFromResultSet(Class<T> $class, ResultSet $resultSet) { // TODO Auto-generated method stub return null; } }
[ "julian.fleischer@fu-berlin.de" ]
julian.fleischer@fu-berlin.de
a9927f7e016df72f19365cf36c1da0cbd1edc3a3
88ed30ae68858ad6365357d4b0a95ad07594c430
/agent/arcus-zw-controller/src/main/java/com/iris/agent/zw/ZWUtils.java
cc589b4f4aeb7b59d276bdb4847c4288f91ed8ff
[ "Apache-2.0" ]
permissive
Diffblue-benchmarks/arcusplatform
686f58654d2cdf3ca3c25bc475bf8f04db0c4eb3
b95cb4886b99548a6c67702e8ba770317df63fe2
refs/heads/master
2020-05-23T15:41:39.298441
2019-05-01T03:56:47
2019-05-01T03:56:47
186,830,996
0
0
Apache-2.0
2019-05-30T11:13:52
2019-05-15T13:22:26
Java
UTF-8
Java
false
false
1,765
java
/* * Copyright 2019 Arcus 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.iris.agent.zw; import java.nio.ByteOrder; import java.nio.charset.StandardCharsets; import com.iris.agent.hal.IrisHal; import com.iris.agent.util.ByteUtils; import com.iris.messages.address.ProtocolDeviceId; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; public class ZWUtils { public static boolean isValidNodeId(int nid) { return (nid > 0 && nid <= 232); } public static ProtocolDeviceId getDeviceId(long homeIdAsLong, int nodeIdAsInt) { int homeId = ByteUtils.from32BitToInt(ByteUtils.to32Bits(homeIdAsLong)); byte nodeId = (byte)nodeIdAsInt; byte[] hubId = ZWConfig.HAS_AGENT ? IrisHal.getHubId().getBytes(StandardCharsets.UTF_8) : "LWW-1202".getBytes(StandardCharsets.UTF_8); ByteBuf buffer = Unpooled.buffer(hubId.length + 6, hubId.length + 6).order(ByteOrder.BIG_ENDIAN); buffer.writeByte(nodeId); buffer.writeBytes(hubId); buffer.writeInt(homeId); buffer.writeByte(nodeId); return ProtocolDeviceId.fromBytes(buffer.array()); } public static int safeInt(Integer i, int def) { return i != null ? i : def; } }
[ "b@yoyo.com" ]
b@yoyo.com
141aaf4bcc3abc3077b71f58dd6220e9810605db
a5dfb6f0a0152d6142e6ddd0bc7c842fdea3daf9
/second_semester/second_semester_sdj/ClientServer/src/chat/domain/view/ClientView.java
a0f679e64c269e9001cb5fd2948e9b0cf82af6fe
[]
no_license
jimmi280586/Java_school_projects
e7c97dfe380cd3f872487232f1cc060e1fabdc1c
86b0cb5d38c65e4f7696bc841e3c5eed74e4d552
refs/heads/master
2021-01-11T11:58:06.578737
2016-12-16T20:55:48
2016-12-16T20:55:48
76,685,030
2
0
null
null
null
null
UTF-8
Java
false
false
3,593
java
package chat.domain.view; import java.awt.BorderLayout; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Observable; import java.util.Observer; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import chat.domain.mediator.ClientController; import chat.domain.model.AbstractMessage; public class ClientView extends JFrame implements ActionListener, Observer { private JTextField textFieldInput; private JTextArea textAreaOutput; private JButton buttonSend; private JButton buttonQuit; private ClientController controller; public ClientView() { super("Client View"); initialize(); addComponentsToFrame(); } public void start(ClientController controller) { this.controller = controller; buttonSend.addActionListener(this); buttonQuit.addActionListener(this); textFieldInput.addActionListener(this); setVisible(true); } public String getAndRemoveInput() { String txt = textFieldInput.getText(); textFieldInput.setText(""); return txt; } public String getNickName() { return JOptionPane.showInputDialog("Nickname?"); } private void initialize() { textFieldInput = new JTextField(); textAreaOutput = new JTextArea(); textAreaOutput.setEditable(false); textAreaOutput.setBackground(Color.LIGHT_GRAY); buttonSend = new JButton("Send"); buttonQuit = new JButton("Quit"); setSize(400, 500); // set frame size setLocationRelativeTo(null); // center of the screen setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } private void addComponentsToFrame() { JPanel panelButtons = new JPanel(); panelButtons.add(buttonSend); panelButtons.add(buttonQuit); JPanel panel1 = new JPanel(new BorderLayout()); panel1.add(textFieldInput, BorderLayout.CENTER); panel1.add(panelButtons, BorderLayout.EAST); JScrollPane scrollPane = new JScrollPane(textAreaOutput); JPanel contentPane = new JPanel(new BorderLayout()); contentPane.add(panel1, BorderLayout.NORTH); contentPane.add(scrollPane, BorderLayout.CENTER); setContentPane(contentPane); } @Override public void actionPerformed(ActionEvent e) { if ((e.getSource() instanceof JTextField)) { try { controller.execute("Send"); } catch (TransformerException | ParserConfigurationException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } else { try { controller.execute(((JButton) (e.getSource())).getText()); } catch (TransformerException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } catch (ParserConfigurationException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } @Override public void update(Observable o, Object arg) { String old = textAreaOutput.getText(); if (old.length() > 1) old = "\n" + old; AbstractMessage msg = (AbstractMessage) arg; textAreaOutput.setText(msg.getFrom() + " >" + msg.getBody() + old); textAreaOutput.setCaretPosition(0); } }
[ "joa@jimmiandersen.dk" ]
joa@jimmiandersen.dk
081509b1dd7ab4bdaf346befbe1ae1f84d191874
0ff078e4db3c0c9b60cf1bd24200fcb7c38662e9
/src/main/java/top/zbeboy/isy/web/bean/error/ErrorBean.java
89fdf00af9fd1528b150863fadc05f0238915904
[ "MIT" ]
permissive
pin062788/ISY
aabada9feca8210793b60d9309bfa5e7befd3777
df1e916dd5b14366f2d7dced9dd0b9848c74fcbe
refs/heads/master
2021-08-06T23:36:31.134588
2017-10-23T14:51:23
2017-10-23T14:51:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
package top.zbeboy.isy.web.bean.error; import lombok.Data; import java.util.List; import java.util.Map; /** * Created by zbeboy on 2016/11/24. */ @Data(staticConstructor = "of") public class ErrorBean<T> { private boolean hasError; private String errorMsg; private T data; private Map<String, Object> mapData; private List<T> listData; }
[ "863052317@qq.com" ]
863052317@qq.com
030ebb0c6f8cb4ce7a02f807ff7e0432792e2ad6
47a0f826caf858d7e58901059624b09e314c1308
/my_weibo/gen/com/coderdream/weibo/BuildConfig.java
d284c08f62d933ad6b1897465f379e52dc765433
[]
no_license
CoderDream/my_weibo
77a1a93b925453dd97c3c46e346ea4c9331e6873
652536cfaf3b2632efe0ae6ee1685f1460bc0a2b
refs/heads/master
2016-09-05T14:31:42.249093
2014-12-29T13:44:19
2014-12-29T13:44:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
162
java
/** Automatically generated file. DO NOT MODIFY */ package com.coderdream.weibo; public final class BuildConfig { public final static boolean DEBUG = true; }
[ "coderdream@gmail.com" ]
coderdream@gmail.com
11d1a97da46ef4ad5d48e0e05f5a408180373bd3
2bf30c31677494a379831352befde4a5e3d8ed19
/vipr-portal/com.iwave.ext.linux/src/java/com/iwave/ext/linux/command/MultipathException.java
399a1acba7496b631a960a9491a41c5d27cac9d3
[]
no_license
dennywangdengyu/coprhd-controller
fed783054a4970c5f891e83d696a4e1e8364c424
116c905ae2728131e19631844eecf49566e46db9
refs/heads/master
2020-12-30T22:43:41.462865
2015-07-23T18:09:30
2015-07-23T18:09:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
443
java
/* * Copyright 2012-2015 iWave Software LLC * All Rights Reserved */ package com.iwave.ext.linux.command; import com.iwave.ext.command.CommandException; import com.iwave.ext.command.CommandOutput; public class MultipathException extends CommandException { private static final long serialVersionUID = 1470336800328054076L; public MultipathException(String message, CommandOutput output) { super(message, output); } }
[ "review-coprhd@coprhd.org" ]
review-coprhd@coprhd.org
625a53f8e552db7efda01a18f8f0d35da9b666b7
08b8d598fbae8332c1766ab021020928aeb08872
/src/gcom/financeiro/ControladorFinanceiroCAERNSEJB.java
d38891a4a260d1ba96c96e5dcac3fb2df1172c01
[]
no_license
Procenge/GSAN-CAGEPA
53bf9bab01ae8116d08cfee7f0044d3be6f2de07
dfe64f3088a1357d2381e9f4280011d1da299433
refs/heads/master
2020-05-18T17:24:51.407985
2015-05-18T23:08:21
2015-05-18T23:08:21
25,368,185
3
1
null
null
null
null
WINDOWS-1252
Java
false
false
2,994
java
/* * Copyright (C) 2007-2007 the GSAN – Sistema Integrado de Gestão de Serviços de Saneamento * * This file is part of GSAN, an integrated service management system for Sanitation * * GSAN is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License. * * GSAN is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA */ /* * GSAN – Sistema Integrado de Gestão de Serviços de Saneamento * Copyright (C) <2007> * Adriano Britto Siqueira * Alexandre Santos Cabral * Ana Carolina Alves Breda * Ana Maria Andrade Cavalcante * Aryed Lins de Araújo * Bruno Leonardo Rodrigues Barros * Carlos Elmano Rodrigues Ferreira * Cláudio de Andrade Lira * Denys Guimarães Guenes Tavares * Eduardo Breckenfeld da Rosa Borges * Fabíola Gomes de Araújo * Flávio Leonardo Cavalcanti Cordeiro * Francisco do Nascimento Júnior * Homero Sampaio Cavalcanti * Ivan Sérgio da Silva Júnior * José Edmar de Siqueira * José Thiago Tenório Lopes * Kássia Regina Silvestre de Albuquerque * Leonardo Luiz Vieira da Silva * Márcio Roberto Batista da Silva * Maria de Fátima Sampaio Leite * Micaela Maria Coelho de Araújo * Nelson Mendonça de Carvalho * Newton Morais e Silva * Pedro Alexandre Santos da Silva Filho * Rafael Corrêa Lima e Silva * Rafael Francisco Pinto * Rafael Koury Monteiro * Rafael Palermo de Araújo * Raphael Veras Rossiter * Roberto Sobreira Barbalho * Rodrigo Avellar Silveira * Rosana Carvalho Barbosa * Sávio Luiz de Andrade Cavalcante * Tai Mu Shih * Thiago Augusto Souza do Nascimento * Tiago Moreno Rodrigues * Vivianne Barbosa Sousa * * Este programa é software livre; você pode redistribuí-lo e/ou * modificá-lo sob os termos de Licença Pública Geral GNU, conforme * publicada pela Free Software Foundation; versão 2 da * Licença. * Este programa é distribuído na expectativa de ser útil, mas SEM * QUALQUER GARANTIA; sem mesmo a garantia implícita de * COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM * PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais * detalhes. * Você deve ter recebido uma cópia da Licença Pública Geral GNU * junto com este programa; se não, escreva para Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307, USA. */ package gcom.financeiro; import javax.ejb.SessionBean; public class ControladorFinanceiroCAERNSEJB extends ControladorFinanceiro implements SessionBean { }
[ "Yara.Souza@procenge.com.br" ]
Yara.Souza@procenge.com.br
fb0838acef684907616f934a4dc81ddf3bc75006
8b2c9d9914939cadc99c6190706521be0cd577b9
/src/main/java/cc/mrbird/common/service/impl/BaseService.java
907081ab56cc4e86727675e6c9cc5c419b51fa2d
[ "Apache-2.0" ]
permissive
iclockwork/febs
a1c66f3aef265a5d5a3c940298052b2295c367bb
cc55cd2b034ba36c7b2e1dd75d4bf3042428d79a
refs/heads/master
2022-09-13T02:25:11.255843
2019-07-15T09:34:15
2019-07-15T09:34:15
170,794,507
1
0
null
2022-09-01T23:02:50
2019-02-15T03:11:55
Java
UTF-8
Java
false
false
1,845
java
package cc.mrbird.common.service.impl; import java.util.List; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import cc.mrbird.common.dao.SeqenceMapper; import cc.mrbird.common.service.IService; import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.entity.Example; @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public abstract class BaseService<T> implements IService<T> { @Autowired protected Mapper<T> mapper; @Autowired protected SeqenceMapper seqenceMapper; public Mapper<T> getMapper() { return mapper; } @Override public Long getSequence(@Param("seqName") String seqName) { return seqenceMapper.getSequence(seqName); } @Override public List<T> selectAll() { return mapper.selectAll(); } @Override public T selectByKey(Object key) { return mapper.selectByPrimaryKey(key); } @Override @Transactional public int save(T entity) { return mapper.insert(entity); } @Override @Transactional public int delete(Object key) { return mapper.deleteByPrimaryKey(key); } @Override @Transactional public int batchDelete(List<String> list, String property, Class<T> clazz) { Example example = new Example(clazz); example.createCriteria().andIn(property, list); return this.mapper.deleteByExample(example); } @Override @Transactional public int updateAll(T entity) { return mapper.updateByPrimaryKey(entity); } @Override @Transactional public int updateNotNull(T entity) { return mapper.updateByPrimaryKeySelective(entity); } @Override public List<T> selectByExample(Object example) { return mapper.selectByExample(example); } }
[ "852252810@qq.com" ]
852252810@qq.com
0d1d6b89b29915a8902eb799285979268cc3df2a
d9f4fd57f7836b0d7a292264dca22b9b97eba174
/Alkitab/src/main/java/yuku/alkitab/reminder/widget/HackedTimePickerDialog.java
c562e295ee5b84a57675052ff27dbcf6d25cc887
[ "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
BitJetKit/androidbible
cf5e9faa54204ee553b20992252e64374a3079e1
fb1d6c209f95b11f8c45f7cfd3da1f553703b3ac
refs/heads/develop
2020-08-08T07:23:16.169654
2019-05-28T05:57:53
2019-05-28T05:57:53
213,776,850
0
0
Apache-2.0
2020-05-13T01:01:06
2019-10-08T23:35:19
null
UTF-8
Java
false
false
5,289
java
/* * Copyright (C) 2007 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 yuku.alkitab.reminder.widget; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.widget.TimePicker; import yuku.alkitab.debug.R; /** * A dialog that prompts the user for the time of day using a {@link android.widget.TimePicker}. * * <p>See the <a href="{@docRoot}guide/topics/ui/controls/pickers.html">Pickers</a> * guide.</p> */ public class HackedTimePickerDialog extends AlertDialog implements DialogInterface.OnClickListener, TimePicker.OnTimeChangedListener { /** * The callback interface used to indicate the user is done filling in * the time (they clicked on the 'Set' button). */ public interface HackedTimePickerListener { /** * @param view The view associated with this listener. * @param hourOfDay The hour that was set. * @param minute The minute that was set. */ void onTimeSet(TimePicker view, int hourOfDay, int minute); /** * @param view The view associated with this listener. */ void onTimeOff(TimePicker view); } private static final String HOUR = "hour"; private static final String MINUTE = "minute"; private static final String IS_24_HOUR = "is24hour"; private final TimePicker mTimePicker; private final HackedTimePickerListener mCallback; int mInitialHourOfDay; int mInitialMinute; boolean mIs24HourView; /** * @param context Parent. * @param callBack How parent is notified. * @param hourOfDay The initial hour. * @param minute The initial minute. * @param is24HourView Whether this is a 24 hour view, or AM/PM. */ public HackedTimePickerDialog(Context context, CharSequence dialogTitle, CharSequence setButtonTitle, CharSequence offButtonTitle, HackedTimePickerListener callBack, int hourOfDay, int minute, boolean is24HourView) { super(context, 0); mCallback = callBack; mInitialHourOfDay = hourOfDay; mInitialMinute = minute; mIs24HourView = is24HourView; setIcon(0); setTitle(dialogTitle); Context themeContext = getContext(); setButton(BUTTON_POSITIVE, setButtonTitle, this); setButton(BUTTON_NEGATIVE, offButtonTitle, this); LayoutInflater inflater = (LayoutInflater) themeContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View view = inflater.inflate(R.layout.dialog_hacked_time_picker, null); setView(view); mTimePicker = view.findViewById(R.id.timePicker); // initialize state mTimePicker.setIs24HourView(mIs24HourView); mTimePicker.setCurrentHour(mInitialHourOfDay); mTimePicker.setCurrentMinute(mInitialMinute); mTimePicker.setOnTimeChangedListener(this); } @Override public void onClick(DialogInterface dialog, int which) { if (mCallback != null) { mTimePicker.clearFocus(); if (which == AlertDialog.BUTTON_POSITIVE) { mCallback.onTimeSet(mTimePicker, mTimePicker.getCurrentHour(), mTimePicker.getCurrentMinute()); } else if (which == AlertDialog.BUTTON_NEGATIVE) { mCallback.onTimeOff(mTimePicker); } } } public void updateTime(int hourOfDay, int minutOfHour) { mTimePicker.setCurrentHour(hourOfDay); mTimePicker.setCurrentMinute(minutOfHour); } @Override public void onTimeChanged(TimePicker view, int hourOfDay, int minute) { /* do nothing */ } /* Removed on this hacked version protected void onStop() { tryNotifyTimeSet(); super.onStop(); } */ @Override public Bundle onSaveInstanceState() { Bundle state = super.onSaveInstanceState(); state.putInt(HOUR, mTimePicker.getCurrentHour()); state.putInt(MINUTE, mTimePicker.getCurrentMinute()); state.putBoolean(IS_24_HOUR, mTimePicker.is24HourView()); return state; } @Override public void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); int hour = savedInstanceState.getInt(HOUR); int minute = savedInstanceState.getInt(MINUTE); mTimePicker.setIs24HourView(savedInstanceState.getBoolean(IS_24_HOUR)); mTimePicker.setCurrentHour(hour); mTimePicker.setCurrentMinute(minute); } }
[ "yukuku@gmail.com" ]
yukuku@gmail.com
51e7e4405ea9e82ebf597be7bd1c140c4f390373
5f833db272928e1490ff62e8296c3d65b39c1992
/modules/core/test/com/haulmont/cuba/core/SpringPersistenceTest.java
2c57f8f1a19b615fd97f06c3b0d4daed121e9806
[ "Apache-2.0" ]
permissive
cuba-platform/cuba-thesis
4f1e563ec3f6ba3d1f252939af9de9ee217438e6
540baeedafecbc11d139e16cadefccb351e50e51
refs/heads/master
2021-01-08T16:58:33.119292
2017-05-25T06:23:01
2017-05-25T06:30:56
242,084,081
3
2
null
null
null
null
UTF-8
Java
false
false
2,362
java
/* * Copyright (c) 2008-2016 Haulmont. * * 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.haulmont.cuba.core; import com.haulmont.cuba.testsupport.TestContainer; import org.junit.ClassRule; import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class SpringPersistenceTest { @ClassRule public static TestContainer cont = TestContainer.Common.INSTANCE; @Test public void test() { Transaction tx = cont.persistence().createTransaction(); try { EntityManager em = cont.persistence().getEntityManager(); em.setSoftDeletion(false); assertFalse(em.isSoftDeletion()); nestedMethod(); nestedTxMethod(); em = cont.persistence().getEntityManager(); assertFalse(em.isSoftDeletion()); tx.commit(); } finally { tx.end(); } } private void nestedMethod() { EntityManager em = cont.persistence().getEntityManager(); assertFalse(em.isSoftDeletion()); } private void nestedTxMethod() { Transaction tx = cont.persistence().createTransaction(); try { EntityManager em = cont.persistence().getEntityManager(); assertTrue(em.isSoftDeletion()); nestedTxMethod2(); tx.commit(); } finally { tx.end(); } } private void nestedTxMethod2() { Transaction tx = cont.persistence().createTransaction(); try { EntityManager em = cont.persistence().getEntityManager(); assertTrue(em.isSoftDeletion()); tx.commit(); } finally { tx.end(); } } }
[ "krivopustov@haulmont.com" ]
krivopustov@haulmont.com
6385e3ae189394597b6a927494f97f947b977a4c
32197545c804daccd40eea4a2e1f49cd5e845740
/sharding-sphere/sharding-jdbc-core/src/test/java/io/shardingjdbc/core/AllTests.java
b02dff243af1db1557c57de5ed62759abe3a22bd
[ "Apache-2.0" ]
permissive
dream7319/personal_study
4235a159650dcbc7713a43d8be017d204ef3ecda
19b49b00c9f682f9ef23d40e6e60b73772f8aad4
refs/heads/master
2020-03-18T17:25:04.225765
2018-07-08T11:54:41
2018-07-08T11:54:44
135,027,431
1
1
null
null
null
null
UTF-8
Java
false
false
977
java
/* * Copyright 1999-2015 dangdang.com. * <p> * 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. * </p> */ package io.shardingjdbc.core; import io.shardingjdbc.core.integrate.AllIntegrateTests; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) @SuiteClasses({ AllUnitTests.class, AllIntegrateTests.class }) public class AllTests { }
[ "lierlei@xingyoucai.com" ]
lierlei@xingyoucai.com
966490dee82d47c1ea396e413a3d70baa3fd1568
a6aa78e28472878be55651e2cc86d9dfaf4601ce
/code/source/tundra/hjson.java
6dc1c48f7ce7a867f26ff44832d5165f9be25ab6
[ "MIT" ]
permissive
sasimanam/Tundra
e7a4be9787cfa836d3be5755d0533be1e001ccd1
5f241745d1fd1cf2625bef1418d05a85a4ff8dbd
refs/heads/master
2021-05-02T07:48:12.083820
2018-01-09T02:36:08
2018-01-09T02:36:08
120,838,453
0
0
null
2018-02-09T01:08:16
2018-02-09T01:08:16
null
UTF-8
Java
false
false
2,825
java
package tundra; // -----( IS Java Code Template v1.2 // -----( CREATED: 2017-05-07 10:50:33 EST // -----( ON-HOST: 192.168.66.129 import com.wm.data.*; import com.wm.util.Values; import com.wm.app.b2b.server.Service; import com.wm.app.b2b.server.ServiceException; // --- <<IS-START-IMPORTS>> --- import java.io.IOException; import java.nio.charset.Charset; import permafrost.tundra.data.IDataHelper; import permafrost.tundra.data.IDataHjsonParser; import permafrost.tundra.io.InputStreamHelper; import permafrost.tundra.lang.CharsetHelper; import permafrost.tundra.lang.ExceptionHelper; import permafrost.tundra.lang.ObjectConvertMode; import permafrost.tundra.lang.ObjectHelper; // --- <<IS-END-IMPORTS>> --- public final class hjson { // ---( internal utility methods )--- final static hjson _instance = new hjson(); static hjson _newInstance() { return new hjson(); } static hjson _cast(Object o) { return (hjson)o; } // ---( server methods )--- public static final void emit (IData pipeline) throws ServiceException { // --- <<IS-START(emit)>> --- // @subtype unknown // @sigtype java 3.5 // [i] record:0:optional $document // [i] - object:1:optional recordWithNoID // [i] field:0:optional $encoding // [i] field:0:optional $mode {"stream","bytes","string"} // [o] object:0:optional $content IDataCursor cursor = pipeline.getCursor(); try { IData document = IDataHelper.get(cursor, "$document", IData.class); Charset charset = IDataHelper.get(cursor, "$encoding", Charset.class); ObjectConvertMode mode = IDataHelper.get(cursor, "$mode", ObjectConvertMode.class); if (document != null) { IDataHelper.put(cursor, "$content", ObjectHelper.convert(IDataHjsonParser.getInstance().emit(document, charset), charset, mode), false); } } catch (IOException ex) { ExceptionHelper.raise(ex); } finally { cursor.destroy(); } // --- <<IS-END>> --- } public static final void parse (IData pipeline) throws ServiceException { // --- <<IS-START(parse)>> --- // @subtype unknown // @sigtype java 3.5 // [i] object:0:optional $content // [i] field:0:optional $encoding // [o] record:0:optional $document // [o] - object:1:optional recordWithNoID IDataCursor cursor = pipeline.getCursor(); try { Object content = IDataHelper.get(cursor, "$content"); Charset charset = IDataHelper.get(cursor, "$encoding", Charset.class); if (content != null) { IDataHelper.put(cursor, "$document", IDataHjsonParser.getInstance().parse(InputStreamHelper.normalize(content, charset), charset), false); } } catch (IOException ex) { ExceptionHelper.raise(ex); } finally { cursor.destroy(); } // --- <<IS-END>> --- } }
[ "lachlan@permafro.st" ]
lachlan@permafro.st
8dc40031a8152d331b5ddb21cf5cb018375553cb
3283e61cedc185edfb7cf7867513275f4b242484
/usbserial/src/main/java/com/lz/usbserial/driver/UsbSpiInterface.java
e55dcf7f33130e326a571478b7147f726093bc05
[]
no_license
liuzhao1006/Serial_liuzhao
bd91c50021751d8025746c3f07ea31c3754101a9
50d49d6f3d50d942427e503f5ce01c904ea15b1a
refs/heads/master
2020-04-13T12:01:06.806697
2019-04-25T01:44:17
2019-04-25T01:44:17
163,190,290
0
0
null
null
null
null
UTF-8
Java
false
false
759
java
package com.lz.usbserial.driver; public interface UsbSpiInterface { // Clock dividers; int DIVIDER_2 = 2; int DIVIDER_4 = 4; int DIVIDER_8 = 8; int DIVIDER_16 = 16; int DIVIDER_32 = 32; int DIVIDER_64 = 64; int DIVIDER_128 = 128; // Common SPI operations boolean connectSPI(); void writeMOSI(byte[] buffer); void readMISO(int lengthBuffer); void writeRead(byte[] buffer, int lenghtRead); void setClock(int clockDivider); void selectSlave(int nSlave); void setMISOCallback(UsbMISOCallback misoCallback); void closeSPI(); // Status information int getClockDivider(); int getSelectedSlave(); interface UsbMISOCallback { int onReceivedData(byte[] data); } }
[ "zhaoliu1006@gmail.com" ]
zhaoliu1006@gmail.com
d87a81377e16a687636b9dbb747ee74208ec227b
5c8b7185e2f3799cc66b6818aa4ee583485c7829
/com/planet_ink/coffee_mud/Abilities/Spells/Spell_ForkedLightning.java
040d393989e89fbc366302808dfa713b4fb22203
[ "Apache-2.0" ]
permissive
cmk8514/BrainCancerMud
6ec70a47afac7a9239a6181554ce309b211ed790
cc2ca1defc9dd9565b169871c8310a3eece2500a
refs/heads/master
2021-04-07T01:28:52.961472
2020-03-21T16:29:03
2020-03-21T16:29:03
248,631,086
1
1
null
null
null
null
UTF-8
Java
false
false
3,664
java
package com.planet_ink.coffee_mud.Abilities.Spells; import java.util.List; import java.util.Set; import com.planet_ink.coffee_mud.Abilities.interfaces.Ability; import com.planet_ink.coffee_mud.Common.interfaces.CMMsg; import com.planet_ink.coffee_mud.Items.interfaces.Weapon; import com.planet_ink.coffee_mud.MOBS.interfaces.MOB; import com.planet_ink.coffee_mud.core.CMClass; import com.planet_ink.coffee_mud.core.CMLib; import com.planet_ink.coffee_mud.core.CMath; import com.planet_ink.coffee_mud.core.interfaces.Physical; /* Copyright 2003-2017 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Spell_ForkedLightning extends Spell { @Override public String ID() { return "Spell_ForkedLightning"; } private final static String localizedName = CMLib.lang().L("Forked Lightning"); @Override public String name() { return localizedName; } @Override public int maxRange() { return adjustedMaxInvokerRange(2); } @Override public int abstractQuality() { return Ability.QUALITY_MALICIOUS; } @Override public int classificationCode() { return Ability.ACODE_SPELL|Ability.DOMAIN_EVOCATION; } @Override public long flags() { return Ability.FLAG_AIRBASED; } @Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { final Set<MOB> h=properTargets(mob,givenTarget,auto); if(h==null) { mob.tell(L("There doesn't appear to be anyone here worth electrocuting.")); return false; } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final boolean success=proficiencyCheck(mob,0,auto); if(success) { if(mob.location().show(mob,null,this,verbalCastCode(mob,null,auto),L(auto?"A thunderous crack of lightning erupts!":"^S<S-NAME> invoke(s) a thunderous crack of forked lightning.^?")+CMLib.protocol().msp("lightning.wav",40))) { for (final Object element : h) { final MOB target=(MOB)element; final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto),null); final CMMsg msg2=CMClass.getMsg(mob,target,this,CMMsg.MSK_CAST_MALICIOUS_VERBAL|CMMsg.TYP_ELECTRIC|(auto?CMMsg.MASK_ALWAYS:0),null); if((mob.location().okMessage(mob,msg))&&((mob.location().okMessage(mob,msg2)))) { mob.location().send(mob,msg); mob.location().send(mob,msg2); invoker=mob; final int maxDie=(int)Math.round(CMath.div(adjustedLevel(mob,asLevel)+(2*super.getX1Level(mob)),2.0)); int damage = CMLib.dice().roll(maxDie,7,1); if((msg.value()>0)||(msg2.value()>0)) damage = (int)Math.round(CMath.div(damage,2.0)); if(target.location()==mob.location()) CMLib.combat().postDamage(mob,target,this,damage,CMMsg.MASK_ALWAYS|CMMsg.TYP_ELECTRIC,Weapon.TYPE_STRIKING,L("A bolt <DAMAGE> <T-NAME>!")); } } } } else return maliciousFizzle(mob,null,L("<S-NAME> attempt(s) to invoke a ferocious spell, but the spell fizzles.")); // return whether it worked return success; } }
[ "cscordias@gmail.com" ]
cscordias@gmail.com
57a46b6fab34e498db7ea828827ae4d758e80807
ba1f1dece609de547aa5d2b8bf5ee53913776504
/_src/Chapter01/src/com/ioc/di/setter/BalanceSheet.java
e3ef27403b7cfe0ca0417d6936368ea7acb9b98e
[ "Apache-2.0", "MIT" ]
permissive
paullewallencom/java-978-1-7882-9625-0
7d5d4394ab67faa14c2ebc26a5611101296a5d68
99fa2992eb46214c94d72465b0fe5c3f02fc64dd
refs/heads/main
2023-02-14T02:23:43.043655
2020-12-27T00:48:53
2020-12-27T00:48:53
319,158,421
0
0
null
null
null
null
UTF-8
Java
false
false
665
java
package com.ioc.di.setter; import java.util.List; import com.ioc.di.IExportData; import com.ioc.di.IFetchData; public class BalanceSheet { private IExportData exportDataObj= null; private IFetchData fetchDataObj= null; //Setter injection for Export Data public void setExportDataObj(IExportData exportDataObj) { this.exportDataObj = exportDataObj; } //Setter injection for Fetch Data public void setFetchDataObj(IFetchData fetchDataObj) { this.fetchDataObj = fetchDataObj; } public Object generateBalanceSheet(){ List<Object[]> dataLst = fetchDataObj.fetchData(); return exportDataObj.exportData(dataLst); } }
[ "paullewallencom@users.noreply.github.com" ]
paullewallencom@users.noreply.github.com
ed3539f93aed5f264adde2ee3f14c3077596530d
a28a2e3792ebf56408a55a4a990002acd5b4dd43
/konig-core/src/main/java/io/konig/formula/DirectionStep.java
79f597ce4c6cc0a35c034daf45c541df27e052ac
[]
no_license
zednis/konig
e01a77e40bf934af928b457f3afc0d1f2bc2e623
9b3e52f0fe53fec7ce2ffcf239d33256b4067a44
refs/heads/master
2021-07-11T18:11:06.415290
2017-10-12T11:51:43
2017-10-12T11:51:43
106,723,389
0
0
null
2017-10-12T17:19:14
2017-10-12T17:19:14
null
UTF-8
Java
false
false
1,414
java
package io.konig.formula; /* * #%L * Konig Core * %% * Copyright (C) 2015 - 2017 Gregory McFall * %% * 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% */ import io.konig.core.io.PrettyPrintWriter; public class DirectionStep extends AbstractFormula implements PathStep { private Direction direction; private PathTerm term; public DirectionStep(Direction direction, PathTerm term) { this.direction = direction; this.term = term; } public Direction getDirection() { return direction; } public PathTerm getTerm() { return term; } @Override public void print(PrettyPrintWriter out) { if (!(term instanceof VariableTerm)) { direction.print(out); } term.print(out); } @Override public void dispatch(FormulaVisitor visitor) { visitor.enter(this); direction.dispatch(visitor); term.dispatch(visitor); visitor.exit(this); } }
[ "gregory.mcfall@gmail.com" ]
gregory.mcfall@gmail.com
96189c585adee18c548997b8431cfa782fd34c63
e601d79823b855026fabe9c97e816c5b2a6819a2
/authorize/src/main/java/com/wang/authorize/service/impl/LogServiceImpl.java
d26225111a6f5e7282fbaa7c3ac9b384519dead9
[]
no_license
wangjunhao330/cloud
d6e3331df08732ef910b9ab2b703c3a5b77794c5
d2f0f25a2660979b732b742e368f72dea7fface8
refs/heads/master
2022-11-20T05:21:32.889685
2020-04-27T14:06:37
2020-04-27T14:06:37
230,350,849
0
0
null
2022-11-15T23:35:19
2019-12-27T01:22:10
Java
UTF-8
Java
false
false
1,665
java
package com.wang.authorize.service.impl; import com.wang.authorize.entity.User; import com.wang.authorize.jwtUtils.JwtUtils; import com.wang.authorize.service.LogService; import io.jsonwebtoken.Claims; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.HashMap; import java.util.Map; /** * 登录相关service实现类 * 用于获取token、 * * @author wangjunhao * @version 1.0 * @date 2020/1/4 19:01 * @since JDK 1.8 */ @Service(value = "logService") public class LogServiceImpl implements LogService { private Logger logger = LoggerFactory.getLogger(LogServiceImpl.class); @Autowired private JwtUtils jwtUtils; @Override public String getToken(User user) { Map<String, Object> map = new HashMap<>(4); map.put("username", user.getUsernmae()); map.put("roleId", user.getRoleId()); return jwtUtils.createJwt(user.getUserId() + "", user.getUsernmae(), map, "login"); } @Override public User parseToken(String token) { if (null == token) { return null; } Claims claims = jwtUtils.parseJwt(token); return claimsToUser(claims); } /** * 将claims内容装换为user实体类 * * @param claims * @return com.wang.authorize.entity.User * @throws * @Date 2020/1/5 14:47 * @Author wangjunhao **/ private User claimsToUser(Claims claims) { User user = new User(); user.setUsernmae(claims.get("usernmae", String.class)); return user; } }
[ "you@example.com" ]
you@example.com
3bd8573da8dd38152ab2913c0c6feaf690d8833a
28921a1faba8b61a076cca5857b12755537acffb
/example/android/app/src/main/java/com/vdian/flutter/hybridrouterexample/translucent/NoTranslucentActivity.java
50265a23e0769b5656dcaf6592b850823fb37048
[ "MIT" ]
permissive
weidian/hybrid_router
42b7650a98444c5b35b80977586db15dcdb9e07f
80d516ea9b55e796f22b8a2c680e11855b5c5b63
refs/heads/develop
2021-08-22T01:57:59.439627
2020-05-20T09:18:15
2020-05-20T09:18:15
185,332,968
152
9
MIT
2020-03-16T02:47:53
2019-05-07T06:15:31
Java
UTF-8
Java
false
false
3,440
java
// MIT License // ----------- // Copyright (c) 2019 WeiDian Group // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation // files (the "Software"), to deal in the Software without // restriction, including without limitation the rights to use, // copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following // conditions: // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. package com.vdian.flutter.hybridrouterexample.translucent; import android.app.Activity; import android.content.Intent; import android.os.Build; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import android.util.Log; import android.view.View; import com.vdian.flutter.hybridrouter.page.FlutterRouteOptions; import com.vdian.flutter.hybridrouterexample.FlutterExampleActivity; import com.vdian.flutter.hybridrouterexample.R; public class NoTranslucentActivity extends AppCompatActivity { public static final String TAG = "FlutterLifecycle" + Build.VERSION.SDK_INT; private static final int REQUEST_CODE = 1000; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.e(TAG, "onCreate:" + this); setContentView(R.layout.activity_notranslucent); findViewById(R.id.button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivityForResult(new Intent(NoTranslucentActivity.this, SetResultActivity.class), REQUEST_CODE); } }); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == REQUEST_CODE && resultCode == Activity.RESULT_OK) { Intent intent = FlutterExampleActivity.builder().route(new FlutterRouteOptions.Builder("example") .setArgs("Jump from no translucent theme activity") .build()).buildIntent(getApplicationContext()); startActivity(intent); finish(); } } @Override public void onStart() { super.onStart(); Log.e(TAG, "onStart:" + this); } @Override public void onResume() { super.onResume(); Log.e(TAG, "onResume:" + this); } @Override public void onPause() { super.onPause(); Log.e(TAG, "onPause:" + this); } @Override public void onStop() { super.onStop(); Log.e(TAG, "onStop:" + this); } @Override public void onDestroy() { super.onDestroy(); Log.e(TAG, "onDestroy:" + this); } }
[ "lizhangqu@weidian.com" ]
lizhangqu@weidian.com
c335bd7d92119d3cc1062cefc728e328fcbe42bc
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/geoserver/security/web/jdbc/group/JDBCGroupListPageTest.java
9a3ef3dc2f5eca0bea96922e73234c6c3528c631
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
791
java
/** * (c) 2014 Open Source Geospatial Foundation - all rights reserved * (c) 2001 - 2013 OpenPlans * This code is licensed under the GPL 2.0 license, available at the root * application directory. */ package org.geoserver.security.web.jdbc.group; import org.geoserver.security.web.group.GroupListPageTest; import org.junit.Test; public class JDBCGroupListPageTest extends GroupListPageTest { @Test public void testRemoveWithRoles() throws Exception { withRoles = true; addAdditonalData(); doRemove(((getTabbedPanelPath()) + ":panel:header:removeSelectedWithRoles")); } @Test public void testRemoveJDBC() throws Exception { addAdditonalData(); doRemove(((getTabbedPanelPath()) + ":panel:header:removeSelected")); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
9768f052842c3afb925a4641e395494f01d82231
92e1ffd5222afd335ea4a29c619f6e0b43740d0e
/src/amat/report/PropertyReport.java
ff666a12eefb30be8a6133427d7f16aab3039de8
[ "Apache-2.0" ]
permissive
tipplerow/amat
5e0d215065bd8653db26659b449c06df4d3a9ab4
353f07c5f8b71aa8f8c8beb0e16e1a8547d0312c
refs/heads/master
2021-09-12T16:45:35.405288
2018-04-18T22:52:59
2018-04-18T22:52:59
120,043,918
0
0
null
null
null
null
UTF-8
Java
false
false
2,249
java
package amat.report; import java.io.PrintWriter; import java.util.Map; import java.util.Properties; import java.util.TreeMap; import jam.app.JamProperties; import jam.io.IOUtil; import amat.driver.AmatDriver; /** * Records the system properties that were set during the simulation. */ public final class PropertyReport extends AmatReport { private final Map<String, String> propertyMap = new TreeMap<String, String>(); private PropertyReport() {} private static PropertyReport instance = null; /** * The system property with this name must be {@code true} to * schedule the report for execution. */ public static final String RUN_PROPERTY = "amat.PropertyReport.run"; /** * Base name of the report file. */ public static final String REPORT_NAME = "system-prop.txt"; /** * Returns the single report instance. * * @return the single report instance. */ public static PropertyReport instance() { if (instance == null) instance = new PropertyReport(); return instance; } /** * Runs the system property report if the system property * {@link PropertyReport#RUN_PROPERTY} is {@code true}. */ public static void run() { if (runRequested()) instance().report(); } private static boolean runRequested() { return JamProperties.getOptionalBoolean(RUN_PROPERTY, false); } private void report() { assemble(); PrintWriter writer = openWriter(REPORT_NAME); for (Map.Entry<String, String> entry : propertyMap.entrySet()) writer.println(String.format("%-50s = %s", entry.getKey(), entry.getValue())); IOUtil.close(writer); } private void assemble() { Properties properties = System.getProperties(); for (Map.Entry<Object, Object> entry : properties.entrySet()) { String key = entry.getKey().toString(); String value = entry.getValue().toString(); if (reportProperty(key)) propertyMap.put(key, value); } } private boolean reportProperty(String key) { return key.startsWith("jam.") || key.startsWith("amat."); } }
[ "jsshaff@berkeley.edu" ]
jsshaff@berkeley.edu
cfc3d9b2664f9a62414696bf5502718f39bc83f2
256a3596eb3a9c694d2015b173c51b4e20b82ae0
/DailyRhythmPortal/drp-ws-client/target/generated-sources/wsimport/com/bestbuy/bbym/ise/iseclientucs/NotificationStatusWithCachedUpgradeCheckPutRequest.java
ec49c447f6cf6adfdcb36b922e7697b35d20967b
[]
no_license
sellasiyer/maven-drp
a8487325586bb6018d08a6cdb4078ce0ef5d5989
cbbab7027e1ee64cdaf9956a82c6ad964bb9ec86
refs/heads/master
2021-01-01T19:15:47.427243
2012-11-03T13:04:14
2012-11-03T13:04:14
5,146,773
0
0
null
null
null
null
UTF-8
Java
false
false
7,485
java
package com.bestbuy.bbym.ise.iseclientucs; import java.util.ArrayList; import java.util.List; 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 NotificationStatusWithCachedUpgradeCheckPutRequest complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="NotificationStatusWithCachedUpgradeCheckPutRequest"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="subscriberStatuses" type="{http://bestbuy.com/bbym/ucs}SubscriberNotificationStatus" maxOccurs="unbounded"/> * &lt;element name="mobilePhoneNumber" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="zip" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="internationalBusinessHierarchy" type="{http://bestbuy.com/bbym/ucs}InternationalBusinessHierarchy"/> * &lt;element name="sourceSystem" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="capTransactionId" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="locationId" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;element name="userId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="language" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "NotificationStatusWithCachedUpgradeCheckPutRequest", propOrder = { "subscriberStatuses", "mobilePhoneNumber", "zip", "internationalBusinessHierarchy", "sourceSystem", "capTransactionId", "locationId", "userId", "language" }) public class NotificationStatusWithCachedUpgradeCheckPutRequest { @XmlElement(required = true) protected List<SubscriberNotificationStatus> subscriberStatuses; @XmlElement(required = true) protected String mobilePhoneNumber; @XmlElement(required = true) protected String zip; @XmlElement(required = true) protected InternationalBusinessHierarchy internationalBusinessHierarchy; @XmlElement(required = true) protected String sourceSystem; @XmlElement(required = true) protected String capTransactionId; protected int locationId; protected String userId; protected String language; /** * Gets the value of the subscriberStatuses property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the subscriberStatuses property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSubscriberStatuses().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link SubscriberNotificationStatus } * * */ public List<SubscriberNotificationStatus> getSubscriberStatuses() { if (subscriberStatuses == null) { subscriberStatuses = new ArrayList<SubscriberNotificationStatus>(); } return this.subscriberStatuses; } /** * Gets the value of the mobilePhoneNumber property. * * @return * possible object is * {@link String } * */ public String getMobilePhoneNumber() { return mobilePhoneNumber; } /** * Sets the value of the mobilePhoneNumber property. * * @param value * allowed object is * {@link String } * */ public void setMobilePhoneNumber(String value) { this.mobilePhoneNumber = value; } /** * Gets the value of the zip property. * * @return * possible object is * {@link String } * */ public String getZip() { return zip; } /** * Sets the value of the zip property. * * @param value * allowed object is * {@link String } * */ public void setZip(String value) { this.zip = value; } /** * Gets the value of the internationalBusinessHierarchy property. * * @return * possible object is * {@link InternationalBusinessHierarchy } * */ public InternationalBusinessHierarchy getInternationalBusinessHierarchy() { return internationalBusinessHierarchy; } /** * Sets the value of the internationalBusinessHierarchy property. * * @param value * allowed object is * {@link InternationalBusinessHierarchy } * */ public void setInternationalBusinessHierarchy(InternationalBusinessHierarchy value) { this.internationalBusinessHierarchy = value; } /** * Gets the value of the sourceSystem property. * * @return * possible object is * {@link String } * */ public String getSourceSystem() { return sourceSystem; } /** * Sets the value of the sourceSystem property. * * @param value * allowed object is * {@link String } * */ public void setSourceSystem(String value) { this.sourceSystem = value; } /** * Gets the value of the capTransactionId property. * * @return * possible object is * {@link String } * */ public String getCapTransactionId() { return capTransactionId; } /** * Sets the value of the capTransactionId property. * * @param value * allowed object is * {@link String } * */ public void setCapTransactionId(String value) { this.capTransactionId = value; } /** * Gets the value of the locationId property. * */ public int getLocationId() { return locationId; } /** * Sets the value of the locationId property. * */ public void setLocationId(int value) { this.locationId = value; } /** * Gets the value of the userId property. * * @return * possible object is * {@link String } * */ public String getUserId() { return userId; } /** * Sets the value of the userId property. * * @param value * allowed object is * {@link String } * */ public void setUserId(String value) { this.userId = value; } /** * Gets the value of the language property. * * @return * possible object is * {@link String } * */ public String getLanguage() { return language; } /** * Sets the value of the language property. * * @param value * allowed object is * {@link String } * */ public void setLanguage(String value) { this.language = value; } }
[ "sella.s.iyer@gmail.com" ]
sella.s.iyer@gmail.com
6269e2833724f8e85d102d0fcc549fa47f9f6a16
e2d1ad7bfd684f4d49469130e166efd6f47b59af
/design_pattern/src/main/java/com/study/book/interpreter/example5/ReadXmlExpression.java
e98c44f5a6495c4979c0d598ff8d7157f813a801
[]
no_license
snowbuffer/jdk-java-basic
8545aef243c2d0a2749ea888dbe92bec9b49751c
2414167f93569d878b2d802b9c70af906b605c7a
refs/heads/master
2022-12-22T22:10:11.575240
2021-07-06T06:13:38
2021-07-06T06:13:38
172,832,856
0
1
null
2022-12-16T04:40:12
2019-02-27T03:04:57
Java
GB18030
Java
false
false
406
java
package com.study.book.interpreter.example5; /** * 用于处理自定义Xml取值表达式的接口 */ public abstract class ReadXmlExpression { /** * 解释表达式 * * @param c 上下文 * @return 解析过后的值,为了通用,可能是单个值,也可能是多个值, * 因此就返回一个数组 */ public abstract String[] interpret(Context c); }
[ "timmydargon@sina.com" ]
timmydargon@sina.com
94394e8f0434fd7b3191d7224b76a3bbf0d07010
0429ec7192a11756b3f6b74cb49dc1ba7c548f60
/src/main/java/com/linkage/module/itms/resource/act/FunctionDeploymentByDevTypeACT.java
190eeb4f92bfca161aee067c38987d2dcd55bc30
[]
no_license
lichao20000/WEB
5c7730779280822619782825aae58506e8ba5237
5d2964387d66b9a00a54b90c09332e2792af6dae
refs/heads/master
2023-06-26T16:43:02.294375
2021-07-29T08:04:46
2021-07-29T08:04:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,046
java
package com.linkage.module.itms.resource.act; import java.text.SimpleDateFormat; import java.util.GregorianCalendar; import java.util.List; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.struts2.interceptor.ServletRequestAware; import org.apache.struts2.interceptor.SessionAware; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.linkage.litms.common.util.DateTimeUtil; import com.linkage.module.itms.resource.bio.FunctionDeploymentByDevTypeBIO; import action.splitpage.splitPageAction; /** * @author Administrator (Ailk No.) * @version 1.0 * @since 2013-12-9 * @category com.linkage.module.itms.resource.act * @copyright Ailk NBS-Network Mgt. RD Dept. */ public class FunctionDeploymentByDevTypeACT extends splitPageAction implements SessionAware, ServletRequestAware { private static Logger logger = LoggerFactory .getLogger(FunctionDeploymentByDevTypeACT.class); private Map session; private HttpServletRequest request; // 结束时间 private String endOpenDate = ""; // 结束时间 private String endOpenDate1 = ""; // 厂商文件列表 private Map<String, String> vendorMap; // 功能 private String gn; // 厂商 private String vendorId; // 型号 private String modelId; private String ajax; private List<Map> data; // 需要导出的结果集,必须是处理过的可以直接显示的结果 private String[] column; // 需要导出的列名,对应data中的键值 private String[] title; // 显示在导出文档上的列名 private String fileName; // 导出的文件名(不包括后缀名) // 统计信息 private List<Map> deployList; // 统计详细明细 private List<Map> deployDevTypeList; private FunctionDeploymentByDevTypeBIO bio; /** * 初始化页面数据 */ @Override public String execute() throws Exception { logger.debug("FunctionDeploymentByDevTypeACT=>execute()"); endOpenDate = getEndDate(); vendorMap = bio.getVendor(); return "init"; } /** * 查询新增功能部署报表设备型号情况 * * @return */ public String quertFunctionDeployByDevType() { logger.debug("FunctionDeploymentByDevTypeACT=>quertFunctionDeployByDevTypeList()"); this.setTime(); deployList = bio .quertFunctionDeployByDevType(vendorId, modelId, endOpenDate1, gn); return "list"; } /** * 导出新增功能部署报表设备型号情况 * * @return */ public String quertFunctionDeployByDevTypeExcel() { logger.debug("FunctionDeploymentByDevTypeACT=>quertFunctionDeployByDevTypeList()"); this.setTime(); deployList = bio .quertFunctionDeployByDevType(vendorId, modelId, endOpenDate1, gn); String excelCol = "modelType#deploy_total"; String excelTitle = "设备型号#已开通终端数"; column = excelCol.split("#"); title = excelTitle.split("#"); fileName = "deployTypeListTotal"; data = deployList; return "excel"; } /** * 新增功能部署报表设备型号情况明细页面 * * @return */ public String quertFunctionDeployByDevTypeList() { logger.debug("FunctionDeploymentByDevTypeACT=>quertFunctionDeployByDevTypeList()"); this.setTime(); deployDevTypeList = bio.quertFunctionDeployByDevTypeList(vendorId, modelId, endOpenDate1, gn, curPage_splitPage, num_splitPage); maxPage_splitPage = bio.countQuertFunctionDeployByDevTypeList(vendorId, modelId, endOpenDate1, gn, curPage_splitPage, num_splitPage); return "devlist"; } /** * 导出新增功能部署报表设备型号情况明细页面 * * @return */ public String quertFunctionDeployByDevTypeListExcel() { logger.debug("FunctionDeploymentByDevTypeACT=>quertFunctionDeployByDevTypeListExcel()"); this.setTime(); deployDevTypeList = bio.excelQuertFunctionDeployByDevTypeList(vendorId, modelId, gn, endOpenDate1); String excelCol = "city_name#loid#device_serialnumber#start_time#status#timelist#device_model"; String excelTitle = "区域#LOID#设备序列号#部署时间#开通状态#采样周期#设备型号"; column = excelCol.split("#"); title = excelTitle.split("#"); fileName = "deployDevTypeList"; data = deployDevTypeList; return "excel"; } // 当前时间的23:59:59,如 2011-05-11 23:59:59 private String getEndDate() { GregorianCalendar now = new GregorianCalendar(); SimpleDateFormat fmtrq = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US); // now.set(Calendar.HOUR_OF_DAY, 23); // now.set(Calendar.MINUTE, 59); // now.set(Calendar.SECOND, 59); String time = fmtrq.format(now.getTime()); return time; } /** * 时间转化 */ private void setTime() { logger.debug("setTime()" + endOpenDate); DateTimeUtil dt = null;// 定义DateTimeUtil if (endOpenDate == null || "".equals(endOpenDate)) { endOpenDate1 = null; } else { dt = new DateTimeUtil(endOpenDate); endOpenDate1 = String.valueOf(dt.getLongTime()); } } @Override public void setServletRequest(HttpServletRequest request) { this.request = request; } @Override public void setSession(Map<String, Object> session) { this.session = session; } public String getEndOpenDate() { return endOpenDate; } public void setEndOpenDate(String endOpenDate) { this.endOpenDate = endOpenDate; } public String getEndOpenDate1() { return endOpenDate1; } public void setEndOpenDate1(String endOpenDate1) { this.endOpenDate1 = endOpenDate1; } public Map<String, String> getVendorMap() { return vendorMap; } public void setVendorMap(Map<String, String> vendorMap) { this.vendorMap = vendorMap; } public String getGn() { return gn; } public void setGn(String gn) { this.gn = gn; } public String getVendorId() { return vendorId; } public void setVendorId(String vendorId) { this.vendorId = vendorId; } public String getModelId() { return modelId; } public void setModelId(String modelId) { this.modelId = modelId; } public String getAjax() { return ajax; } public void setAjax(String ajax) { this.ajax = ajax; } public List<Map> getData() { return data; } public void setData(List<Map> data) { this.data = data; } public String[] getColumn() { return column; } public void setColumn(String[] column) { this.column = column; } public String[] getTitle() { return title; } public void setTitle(String[] title) { this.title = title; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public List<Map> getDeployList() { return deployList; } public void setDeployList(List<Map> deployList) { this.deployList = deployList; } public FunctionDeploymentByDevTypeBIO getBio() { return bio; } public void setBio(FunctionDeploymentByDevTypeBIO bio) { this.bio = bio; } public List<Map> getDeployDevTypeList() { return deployDevTypeList; } public void setDeployDevTypeList(List<Map> deployDevTypeList) { this.deployDevTypeList = deployDevTypeList; } }
[ "di4zhibiao.126.com" ]
di4zhibiao.126.com
c3e8dcd7014477f112977ee8a7f85e645d103e40
3c7651266f384282ed5642eca51c154d8e29ae03
/src/test/java/de/danielflow/project/PermissionsLite/AppTest.java
44e6d44dd3e904688c595a2dd7150b1ac210225a
[]
no_license
BukkitFlow/PermissionsLite
530be32e17e3375f65d6701dd612307032e3f0cc
f4eadf710a085f99749f48874ff351628f6da69c
refs/heads/master
2021-01-25T14:55:49.981687
2018-03-03T23:03:23
2018-03-03T23:03:23
123,735,809
0
0
null
null
null
null
UTF-8
Java
false
false
703
java
package de.danielflow.project.PermissionsLite; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue( true ); } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
3e23735bf7759b2123df74c651d01b07f8e7e879
5bf1d631977f22aee3d2caf4a23988af0994bcce
/hazelcast/src/main/java/com/hazelcast/concurrent/atomicreference/SetAndGetOperation.java
7a3aa73aa352cea4cc77da55b9244b251a57bdb1
[ "Apache-2.0" ]
permissive
drewrm/hazelcast
b0a898e1aedb9344e42036e4d21bd4b24a14e6ac
b5eaf967dfc2137a116ce5e3e0d1974aa9002c6c
refs/heads/master
2020-12-26T01:30:11.205588
2014-02-14T05:19:30
2014-02-14T05:19:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,264
java
package com.hazelcast.concurrent.atomicreference; import com.hazelcast.nio.ObjectDataInput; import com.hazelcast.nio.ObjectDataOutput; import com.hazelcast.nio.serialization.Data; import com.hazelcast.spi.Operation; import java.io.IOException; public class SetAndGetOperation extends AtomicReferenceBackupAwareOperation { private Data newValue; private Data returnValue; public SetAndGetOperation() { } public SetAndGetOperation(String name, Data newValue) { super(name); this.newValue = newValue; } @Override public void run() throws Exception { ReferenceWrapper reference = getReference(); reference.getAndSet(newValue); returnValue = newValue; } @Override public Object getResponse() { return returnValue; } @Override protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); out.writeObject(newValue); } @Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); newValue = in.readObject(); } @Override public Operation getBackupOperation() { return new SetBackupOperation(name, newValue); } }
[ "alarmnummer@gmail.com" ]
alarmnummer@gmail.com
a31ea6b1fd687a212c07824a639dbba0a5642c15
79864def3f1baca500e640a8ace2ec87c469d56e
/java01/src/step06/Test01_5.java
f9bea20117f9d8d5a5a0931712c144cd9f32f4be
[]
no_license
kwonbongsoo/BIT93
d483fa0b1f3e3698fa79bf442b09614b56854115
880c81e0a3c8953dc8d7195a417b3f3dd46cdcd8
refs/heads/master
2021-05-15T12:26:17.113391
2017-10-26T17:36:41
2017-10-26T17:36:41
108,443,715
0
0
null
null
null
null
UTF-8
Java
false
false
675
java
/* */ package step06; public class Test01_5 { public static void main(String[] args) { Student2 s1 = new Student2(); s1.init( "홍길동", 100, 100, 100); s1.compute(); s1.print(); Student2 s2 = new Student2(); s2.init("임꺽정", 90, 90, 90); s2.compute(); s2.print(); Student s3 = new Student(); Student.init(s3, "유관순", 80, 80, 80); Student.compute(s3); Student.print(s3); //객체 인스턴스 함수의 static 의 차이 //사용법이 다르다. //static 으로 선언하면 this 기능이 내장 되어 있지 않아 파라미터로 객체주소를 넘겨줘야 한다. } }
[ "star1231076@gmail.com" ]
star1231076@gmail.com
2dbf0a1a03c02b0afb3e3502c0cd3b01a72b2f73
8a8254c83cc2ec2c401f9820f78892cf5ff41384
/baseline/materialistic/app/src/test/java/baseline/io/github/hidroh/materialistic/test/TestListActivity.java
88adbf20dc50fbb201f17812fae3e61b35a0e6e5
[ "Apache-2.0" ]
permissive
VU-Thesis-2019-2020-Wesley-Shann/subjects
46884bc6f0f9621be2ab3c4b05629e3f6d3364a0
14a6d6bb9740232e99e7c20f0ba4ddde3e54ad88
refs/heads/master
2022-12-03T05:52:23.309727
2020-08-19T12:18:54
2020-08-19T12:18:54
261,718,101
0
0
null
2020-07-11T12:19:07
2020-05-06T09:54:05
Java
UTF-8
Java
false
false
493
java
package baseline.io.github.hidroh.materialistic.test; import android.view.Menu; import static org.robolectric.Shadows.shadowOf; public class TestListActivity extends baseline.io.github.hidroh.materialistic.ListActivity { @Override public void supportInvalidateOptionsMenu() { Menu optionsMenu = shadowOf(this).getOptionsMenu(); if (optionsMenu != null) { onCreateOptionsMenu(optionsMenu); onPrepareOptionsMenu(optionsMenu); } } }
[ "sshann95@outlook.com" ]
sshann95@outlook.com
7ff00b6e95b2b4f80c4bf9b8218d33c9263fb2d2
79595075622ded0bf43023f716389f61d8e96e94
/app/src/main/java/android/webkit/JsPromptResult.java
ecece3810b9f386f96673ab506d324d25381d46c
[]
no_license
dstmath/OppoR15
96f1f7bb4d9cfad47609316debc55095edcd6b56
b9a4da845af251213d7b4c1b35db3e2415290c96
refs/heads/master
2020-03-24T16:52:14.198588
2019-05-27T02:24:53
2019-05-27T02:24:53
142,840,716
7
4
null
null
null
null
UTF-8
Java
false
false
425
java
package android.webkit; import android.webkit.JsResult.ResultReceiver; public class JsPromptResult extends JsResult { private String mStringResult; public void confirm(String result) { this.mStringResult = result; confirm(); } public JsPromptResult(ResultReceiver receiver) { super(receiver); } public String getStringResult() { return this.mStringResult; } }
[ "toor@debian.toor" ]
toor@debian.toor
319201b26c7b11243e6459a6007c7199eaf61056
6705ac34d021b8cf4802fd54d8e1d28e0a32b956
/d_24_homework_xiejun/src/main/java/com/example/d_24_homework/Special/SpecialFragment.java
d37316fd62617d775d61289d00b608d0546a2908
[]
no_license
androidxiejun/xiejunproject
d1b13cc3e536aa70a4f624c11d5d91b7bd8b7888
d3648467217f6dcb95ab66e0eb8ea60bfae1fd3a
refs/heads/master
2020-09-27T09:35:25.381879
2016-08-20T02:37:20
2016-08-20T02:37:20
66,050,794
0
0
null
null
null
null
UTF-8
Java
false
false
2,832
java
package com.example.d_24_homework.Special; import android.content.Context; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.example.d_24_homework.R; import java.util.ArrayList; import java.util.List; /** * Created by Administrator on 2016/8/7. */ public class SpecialFragment extends Fragment{ private Context mContext; private TabLayout mTabLayout; private ViewPager mVp; private MySpecialAdapter mAdapter; private SpecialFragmentLeft specialFragmentLeft; private SpecialFragmentRight specialFragmentRight; private List<String>titleList=new ArrayList<>(); private List<Fragment>fragmentList=new ArrayList<>(); public static SpecialFragment newInstance(){ return new SpecialFragment(); } @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); mContext=getContext(); specialFragmentLeft=SpecialFragmentLeft.newInstance(); specialFragmentRight=SpecialFragmentRight.newInstance(); mAdapter=new MySpecialAdapter(getFragmentManager()); } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view=inflater.inflate(R.layout.special_fragment_layout,container,false); mVp= (ViewPager) view.findViewById(R.id.view_pager_special); initTabLayout(view); initTitle(); mVp.setAdapter(mAdapter); mTabLayout.setupWithViewPager(mVp); return view; } private void initTitle(){ titleList.add(" 暴打星期三 "); titleList.add(" 新游周刊 "); fragmentList.add(specialFragmentLeft); fragmentList.add(specialFragmentRight); } private void initTabLayout(View view){ mTabLayout= (TabLayout) view.findViewById(R.id.special_tab_layout); } class MySpecialAdapter extends FragmentPagerAdapter { public MySpecialAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int position) { return fragmentList.get(position); } @Override public int getCount() { return fragmentList==null? 0:fragmentList.size(); } @Override public CharSequence getPageTitle(int position) { return titleList.get(position); } } }
[ "1019163135@qq.com" ]
1019163135@qq.com
de62d853d41cafbe52507c3e89d677bb66a78308
b4b62c5c77ec817db61820ccc2fee348d1d7acc5
/src/main/java/com/alipay/api/domain/KbAdvertAddChannelRequest.java
c620d76b3c05480312116f2470acca162f0dfc93
[ "Apache-2.0" ]
permissive
zhangpo/alipay-sdk-java-all
13f79e34d5f030ac2f4367a93e879e0e60f335f7
e69305d18fce0cc01d03ca52389f461527b25865
refs/heads/master
2022-11-04T20:47:21.777559
2020-06-15T08:31:02
2020-06-15T08:31:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,023
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 口碑客渠道信息 * * @author auto create * @since 1.0, 2017-03-03 10:40:48 */ public class KbAdvertAddChannelRequest extends AlipayObject { private static final long serialVersionUID = 1692477237218825325L; /** * 描述信息(页面上不展现) */ @ApiField("memo") private String memo; /** * 渠道名称 */ @ApiField("name") private String name; /** * 类型可以通过koubei.advert.data.conf.query查询 OFFLINE:线下推广 */ @ApiField("type") private String type; public String getMemo() { return this.memo; } public void setMemo(String memo) { this.memo = memo; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getType() { return this.type; } public void setType(String type) { this.type = type; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
a0fd477863e6d376a04068be524162b68ee6da3c
c55ba96bdf1983126b6944b0f90bc5c564e0601f
/src/main/java/org/gbif/cli/converter/UuidConverter.java
dc28fc42034b33be127bb30b9248e1420b421b29
[ "Apache-2.0" ]
permissive
gbif/gbif-cli
c39f778a77b9bce7eae5e06f26d96c4ac054a972
e10aec43a4848d082e08b973732c1f325f9afefc
refs/heads/master
2023-05-02T12:46:40.788822
2021-01-20T08:14:49
2021-01-20T08:14:49
15,904,171
0
1
Apache-2.0
2023-04-15T17:03:53
2014-01-14T14:21:05
Java
UTF-8
Java
false
false
478
java
package org.gbif.cli.converter; import java.util.UUID; import com.beust.jcommander.IStringConverter; import com.beust.jcommander.ParameterException; /** * Converts parameters into UUIDs. */ public class UuidConverter implements IStringConverter<UUID> { @Override public UUID convert(String value) { try { return UUID.fromString(value); } catch(IllegalArgumentException ex) { throw new ParameterException(value + " is not a valid uuid"); } } }
[ "mdoering@gbif.org" ]
mdoering@gbif.org
5e79dc2e6f7151f941db1d44bae786f7c4a80845
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
/services/dli/src/main/java/com/huaweicloud/sdk/dli/v1/model/ListDatabasesResponse.java
ae1543e4daf742cc6ccaae92abd38e430d1ad508
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-java-v3
51b32a451fac321a0affe2176663fed8a9cd8042
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
refs/heads/master
2023-08-29T06:50:15.642693
2023-08-24T08:34:48
2023-08-24T08:34:48
262,207,545
91
57
NOASSERTION
2023-09-08T12:24:55
2020-05-08T02:27:00
Java
UTF-8
Java
false
false
4,507
java
package com.huaweicloud.sdk.dli.v1.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.huaweicloud.sdk.core.SdkResponse; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.function.Consumer; /** * Response Object */ public class ListDatabasesResponse extends SdkResponse { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "is_success") private Boolean isSuccess; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "message") private String message; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "database_count") private Integer databaseCount; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "databases") private List<Database> databases = null; public ListDatabasesResponse withIsSuccess(Boolean isSuccess) { this.isSuccess = isSuccess; return this; } /** * 执行请求是否成功。“true”表示请求执行成功。 * @return isSuccess */ public Boolean getIsSuccess() { return isSuccess; } public void setIsSuccess(Boolean isSuccess) { this.isSuccess = isSuccess; } public ListDatabasesResponse withMessage(String message) { this.message = message; return this; } /** * 系统提示信息,执行成功时,信息可能为空。 * @return message */ public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public ListDatabasesResponse withDatabaseCount(Integer databaseCount) { this.databaseCount = databaseCount; return this; } /** * 数据库的总数。 * @return databaseCount */ public Integer getDatabaseCount() { return databaseCount; } public void setDatabaseCount(Integer databaseCount) { this.databaseCount = databaseCount; } public ListDatabasesResponse withDatabases(List<Database> databases) { this.databases = databases; return this; } public ListDatabasesResponse addDatabasesItem(Database databasesItem) { if (this.databases == null) { this.databases = new ArrayList<>(); } this.databases.add(databasesItem); return this; } public ListDatabasesResponse withDatabases(Consumer<List<Database>> databasesSetter) { if (this.databases == null) { this.databases = new ArrayList<>(); } databasesSetter.accept(this.databases); return this; } /** * 查询所有数据库的响应参数。 * @return databases */ public List<Database> getDatabases() { return databases; } public void setDatabases(List<Database> databases) { this.databases = databases; } @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } ListDatabasesResponse that = (ListDatabasesResponse) obj; return Objects.equals(this.isSuccess, that.isSuccess) && Objects.equals(this.message, that.message) && Objects.equals(this.databaseCount, that.databaseCount) && Objects.equals(this.databases, that.databases); } @Override public int hashCode() { return Objects.hash(isSuccess, message, databaseCount, databases); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListDatabasesResponse {\n"); sb.append(" isSuccess: ").append(toIndentedString(isSuccess)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" databaseCount: ").append(toIndentedString(databaseCount)).append("\n"); sb.append(" databases: ").append(toIndentedString(databases)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
6c50a4984027c30d7dd6b8376f8bbf3d3dd4f2cd
7d28d457ababf1b982f32a66a8896b764efba1e8
/platform-dao/src/test/java/ua/com/fielden/platform/dao/EntityWithHyperlinkDao.java
f953b2b414ff0292c232dfc132ce31ec28acedc7
[ "MIT" ]
permissive
fieldenms/tg
f742f332343f29387e0cb7a667f6cf163d06d101
f145a85a05582b7f26cc52d531de9835f12a5e2d
refs/heads/develop
2023-08-31T16:10:16.475974
2023-08-30T08:23:18
2023-08-30T08:23:18
20,488,386
17
9
MIT
2023-09-14T17:07:35
2014-06-04T15:09:44
JavaScript
UTF-8
Java
false
false
586
java
package ua.com.fielden.platform.dao; import com.google.inject.Inject; import ua.com.fielden.platform.entity.annotation.EntityType; import ua.com.fielden.platform.entity.query.IFilter; import ua.com.fielden.platform.serialisation.jackson.entities.EntityWithHyperlink; /** * A DAO for {@link EntityWithHyperlink} used for testing. * * @author 01es * */ @EntityType(EntityWithHyperlink.class) public class EntityWithHyperlinkDao extends CommonEntityDao<EntityWithHyperlink> { @Inject protected EntityWithHyperlinkDao(final IFilter filter) { super(filter); } }
[ "jhou.pro@gmail.com" ]
jhou.pro@gmail.com
e8730b9c8dff1b12cd96d431f3b16d5d8b5a0871
30cf12e4016cc89018b554465406e8f9fa4ec3b3
/javaEE/src/test_Practice/day03Test/test13.java
852bdca5aed6de5741bcf553660a53a40ef47dde
[]
no_license
guangjianwei/ssm_sum
9f9b3279ca35599a0495457ab6f9f9db3c9ad025
7545c1e7f4a8626f1a3d8f832bd73cc296523f19
refs/heads/master
2020-04-04T12:52:47.394638
2018-11-03T02:51:03
2018-11-03T02:51:03
155,940,658
1
1
null
null
null
null
UTF-8
Java
false
false
425
java
package test_Practice.day03Test; /* */ public class test13 { public static void main(String[] args) { Student stu[]={new Student("liusan",20,90.0f), new Student("lisi",22,90.0f), new Student("wangwu",20,99.0f), new Student("sunliu",22,100.0f)}; java.util.Arrays.sort(stu); for(Student s:stu){ System.out.println(s); } } }
[ "admin@qq.com" ]
admin@qq.com
867b6366b3d85ec9157b62ca2f2f772235aa4525
3441de0b93c9bc4dc40e1a46abd7d36cafe51c2d
/passcloud-common/passcloud-security-core/src/main/java/com/passcloud/security/core/social/weixin/connect/WeixinConnectionFactory.java
00c3e14d742bd3a8cee5fdf23d76312a27c279dd
[]
no_license
XinxiJiang/passcloud-master
23baeb1c4360432585c07e49e7e2366dc2955398
212c2d7c2c173a788445c21de4775c4792a11242
refs/heads/master
2023-04-11T21:31:27.208057
2018-12-11T04:42:18
2018-12-11T04:44:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,500
java
package com.passcloud.security.core.social.weixin.connect; import com.passcloud.security.core.social.weixin.api.Weixin; import org.springframework.social.connect.ApiAdapter; import org.springframework.social.connect.Connection; import org.springframework.social.connect.ConnectionData; import org.springframework.social.connect.support.OAuth2Connection; import org.springframework.social.connect.support.OAuth2ConnectionFactory; import org.springframework.social.oauth2.AccessGrant; import org.springframework.social.oauth2.OAuth2ServiceProvider; /** * 微信连接工厂 * * @author liyuzhang */ public class WeixinConnectionFactory extends OAuth2ConnectionFactory<Weixin> { /** * Instantiates a new Weixin connection factory. * * @param providerId the provider id * @param appId the app id * @param appSecret the app secret */ public WeixinConnectionFactory(String providerId, String appId, String appSecret) { super(providerId, new WeixinServiceProvider(appId, appSecret), new WeixinAdapter()); } /** * 由于微信的openId是和accessToken一起返回的,所以在这里直接根据accessToken设置providerUserId即可,不用像QQ那样通过QQAdapter来获取 * * @param accessGrant the access grant * * @return the string */ @Override protected String extractProviderUserId(AccessGrant accessGrant) { if (accessGrant instanceof WeixinAccessGrant) { return ((WeixinAccessGrant) accessGrant).getOpenId(); } return null; } /** * Create connection connection. * * @param accessGrant the access grant * * @return the connection */ @Override public Connection<Weixin> createConnection(AccessGrant accessGrant) { return new OAuth2Connection<>(getProviderId(), extractProviderUserId(accessGrant), accessGrant.getAccessToken(), accessGrant.getRefreshToken(), accessGrant.getExpireTime(), getOAuth2ServiceProvider(), getApiAdapter(extractProviderUserId(accessGrant))); } /** * Create connection connection. * * @param data the data * * @return the connection */ @Override public Connection<Weixin> createConnection(ConnectionData data) { return new OAuth2Connection<>(data, getOAuth2ServiceProvider(), getApiAdapter(data.getProviderUserId())); } private ApiAdapter<Weixin> getApiAdapter(String providerUserId) { return new WeixinAdapter(providerUserId); } private OAuth2ServiceProvider<Weixin> getOAuth2ServiceProvider() { return (OAuth2ServiceProvider<Weixin>) getServiceProvider(); } }
[ "35205889+mliyz@users.noreply.github.com" ]
35205889+mliyz@users.noreply.github.com
9ee362b82c56bb48f8c4345647c45e0064c86fea
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/open-keychain_open-keychain/libkeychain/src/main/java/org/sufficientlysecure/keychain/LibConstants.java
e1f20a6db4fa77ebb3a3aacd4d2fc27ab61acc6e
[]
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
464
java
// isComment package org.sufficientlysecure.keychain; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.sufficientlysecure.libkeychain.BuildConfig; public final class isClassOrIsInterface { public static final boolean isVariable = isNameExpr.isFieldAccessExpr; public static final String isVariable = isNameExpr ? "isStringConstant" : "isStringConstant"; public static final String isVariable = isNameExpr.isFieldAccessExpr; }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
76848af504d24351bac6348577d57cb835be07af
68374eb2631cb33ccd8d7924a16bfb79ad08040a
/core/src/test/java/com/gengoai/hermes/annotator/DocumentProvider.java
1df6c1f9cdf60413e5e665fe30a4ccaf33d445c8
[ "Apache-2.0" ]
permissive
gengoai/hermes
92f413788f2870b51369b440d8e479824bdd3ce0
78f48e9edee397907d7ac0bda32fb5ea24f6be4a
refs/heads/master
2021-06-02T06:27:26.783582
2020-07-31T16:47:23
2020-07-31T16:47:23
130,230,032
2
1
Apache-2.0
2020-05-03T15:02:55
2018-04-19T14:41:39
Java
UTF-8
Java
false
false
3,629
java
/* * (c) 2005 David B. Bracewell * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.gengoai.hermes.annotator; import com.gengoai.Language; import com.gengoai.hermes.Document; import com.gengoai.hermes.DocumentFactory; import com.gengoai.hermes.Types; /** * @author David B. Bracewell */ public interface DocumentProvider { static Document getAnnotatedDocument() { Document doc = getDocument(); doc.annotate(Types.TOKEN, Types.SENTENCE); return doc; } static Document getAnnotatedEmoticonDocument() { Document doc = DocumentFactory.getInstance().create("I had a great time at the party ;-). " + "See all the video at http://www.somevideo.com/video.html " + "I don't even mind being out $100.", Language.ENGLISH); doc.annotate(Types.TOKEN, Types.SENTENCE); doc.setCompleted(Types.PART_OF_SPEECH, "a"); return doc; } static Document getChineseDocument() { return DocumentFactory.getInstance().fromTokens(Language.CHINESE, "我", "爱", "你"); } static Document getDocument() { return DocumentFactory.getInstance().create( " Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or " + "twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, " + "'and what is the use of a book,' thought Alice 'without pictures or conversations?'\n" + "So she was considering in her own mind (as well as she could, for the hot day made her feel very sleepy " + "and stupid), whether the pleasure of making a daisy-chain would be worth the trouble of getting up and " + "picking the daisies, when suddenly a White Rabbit with pink eyes ran close by her.\n" + "There was nothing so very remarkable in that; nor did Alice think it so very much out of the way to hear " + "the Rabbit say to itself, 'Oh dear! Oh dear! I shall be late!' (when she thought it over afterwards, it " + "occurred to her that she ought to have wondered at this, but at the time it all seemed quite natural); but " + "when the Rabbit actually took a watch out of its waistcoat-pocket, and looked at it, and then hurried on, " + "Alice started to her feet, for it flashed across her mind that she had never before seen a rabbit with either " + "a waistcoat-pocket, or a watch to take out of it, and burning with curiosity, she ran across the field after " + "it, and fortunately was just in time to see it pop down a large rabbit-hole under the hedge.\n" ); } }//END OF DocumentProvider
[ "david@davidbracewell.com" ]
david@davidbracewell.com
11c7dbc79648339292c4884f6aebaed89b3c6c09
e77777b387a7c9908956ac398652ba1ca3bfbf92
/src/main/java/com/axisdesignsolution/gateway/config/DateTimeFormatConfiguration.java
0ee9b5c2cd450e3ec2987a63ede604978e1a7e73
[]
no_license
leorajesh/AxisDesignSolutionWebApp
cc2de4952ac0ab61eb57ac2d73682e8a2e011eff
33c272dcc53814e42461872d1c0deec89d911fd4
refs/heads/master
2022-10-29T23:30:34.574700
2018-11-19T15:32:30
2018-11-19T15:32:30
158,247,664
0
0
null
2022-10-05T19:15:33
2018-11-19T15:32:21
Java
UTF-8
Java
false
false
737
java
package com.axisdesignsolution.gateway.config; import org.springframework.context.annotation.Configuration; import org.springframework.format.FormatterRegistry; import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * Configure the converters to use the ISO format for dates by default. */ @Configuration public class DateTimeFormatConfiguration implements WebMvcConfigurer { @Override public void addFormatters(FormatterRegistry registry) { DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); registrar.setUseIsoFormat(true); registrar.registerFormatters(registry); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
e54ab4544ca509899fd086582fa0ad8d50429cc3
f2b70e4c2f38ff4a814650df12ee9cecd877c65a
/src/main/java/osm5/ns/yang/ietf/network/rev180226/$YangModelBindingProvider.java
c9fb1b8494f64d16b7a86e9f66d5d5fbe23cb5d5
[ "Apache-2.0" ]
permissive
5GinFIRE/eu.5ginfire.nbi.osm5java
34f17f78930178bdf3b428db7a0e9b24982c7c2a
19b6a70cd39e5b0eddd1d0a63069532fa2a1cee0
refs/heads/master
2021-08-11T15:50:07.182421
2019-06-14T12:25:45
2019-06-14T12:25:45
182,989,539
0
0
Apache-2.0
2021-08-02T17:16:53
2019-04-23T10:15:57
Java
UTF-8
Java
false
false
335
java
package osm5.ns.yang.ietf.network.rev180226; public final class $YangModelBindingProvider implements org.opendaylight.yangtools.yang.binding.YangModelBindingProvider { @java.lang.Override public org.opendaylight.yangtools.yang.binding.YangModuleInfo getModuleInfo() { return $YangModuleInfoImpl.getInstance(); } }
[ "ioannischatzis@gmail.com" ]
ioannischatzis@gmail.com
eed7850869ce1bae30f34ab87d9cb7835a137a63
01993ce8cfce657279aeb2cd0e33579c4da32c48
/src/main/java/com/hyd/salto/IndexController.java
57f32cf5866fb986cd84528127f465c97cb03a53
[ "Apache-2.0" ]
permissive
yiding-he/salto
8a1ab27a3a303c159b501e16cc80173f4a21216a
3c6b43d9eedc31e45270aa59c6e2f99d0466e9e3
refs/heads/master
2021-01-01T06:36:42.645012
2017-07-18T12:16:21
2017-07-18T12:16:21
97,468,876
0
0
null
null
null
null
UTF-8
Java
false
false
272
java
package com.hyd.salto; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @Controller public class IndexController { @GetMapping("/") public String index() { return "index"; } }
[ "yiding.he@gmail.com" ]
yiding.he@gmail.com
8ee15589214eb0d72809625f37a3da2b3b9b8814
7908299834b5dea6b82330c96b2c06052c9f11b1
/src/_07_abstract_class_interface/baitap/Rectangle.java
331423f3c05e3402b0acd65524962008e852f827
[]
no_license
phucnguyen1995/phucnguyen1995-C0421G1__NguyenKhacPhuc_Module2
75875847e688fe998fb97a380f2c095392a104cd
2def78adbbe4eee5008a58988221f103463f1579
refs/heads/main
2023-07-19T20:00:51.643915
2021-09-04T14:22:41
2021-09-04T14:22:41
372,704,762
0
0
null
null
null
null
UTF-8
Java
false
false
1,381
java
package _07_abstract_class_interface.baitap; public class Rectangle extends Shape implements Resizeable { private double width = 1.0; private double length = 1.0; public Rectangle() { } public Rectangle(double width, double length) { this.width = width; this.length = length; } public Rectangle(double width, double length, String color, boolean filled) { super(color, filled); this.width = width; this.length = length; } public double getWidth() { return width; } public void setWidth(double width) { this.width = width; } public double getLength() { return length; } public void setLength(double length) { this.length = length; } public double getArea() { return width * this.length; } public double getPerimeter() { return 2 * (width + this.length); } @Override public String toString() { return "A Rectangle with width=" + getWidth() + " and length=" + getLength() + ", which is a subclass of " + super.toString(); } @Override public void resize(double percent) { this.length = this.length * ((percent + 100)/100); this.width = this.width * ((percent + 100)/100); } }
[ "phuckhac1995@gmail.com" ]
phuckhac1995@gmail.com
26238adae2eb4f76adabaebd8cde68a0322c107a
10cba34c5ef8792a918780bd4b3d0e2b8decdaca
/src/main/java/dev/gigaherz/elementsofpower/client/package-info.java
60704bebfae0114ca073397938e5ca6420bae823
[]
no_license
gigaherz/ElementsOfPower
0536a177ca01587baa138f226c84c30272a6cde3
2a4b531f6d8523db0bc5ec6e7567cf066dcb259b
refs/heads/master
2023-07-07T04:14:54.015613
2023-07-02T22:25:07
2023-07-02T22:25:07
7,384,096
13
10
null
2015-11-25T01:51:24
2012-12-31T05:48:49
Java
UTF-8
Java
false
false
215
java
@MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault package dev.gigaherz.elementsofpower.client; import net.minecraft.MethodsReturnNonnullByDefault; import javax.annotation.ParametersAreNonnullByDefault;
[ "gigaherz@gmail.com" ]
gigaherz@gmail.com
10f7470a2147c759098a2c7925da2d1fb1e7adf0
2388a977f81c0794ca5ddb8bb0dad0c11805f56b
/src/me/martin/main/Commands/ConfigReload.java
63866f8b5bc33dcf1dbfc95dfa2573cab88d5924
[]
no_license
yungmartin/theminingdeadrt
6d25b883ad2d0abd6fffd90670f0dc3bc9c00606
a0da23306a94d875052c6066e8fb0b02db268a6b
refs/heads/master
2023-07-06T10:57:04.593851
2021-08-11T19:36:55
2021-08-11T19:36:55
393,679,630
1
1
null
null
null
null
UTF-8
Java
false
false
1,130
java
package me.martin.main.Commands; import me.martin.main.Main; import me.martin.main.Utils.Utils; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public class ConfigReload implements CommandExecutor { Main main; public ConfigReload(Main main){ this.main = main; } @Override public boolean onCommand(CommandSender commandSender, Command command, String s, String[] args) { if(commandSender instanceof Player){ Player player = (Player) commandSender; if(args.length > 0) { if(args[0].equalsIgnoreCase("reload")) { main.reloadConfig(); player.sendMessage(Utils.chatColor("&8[&a●&8] &7Config has been reloaded!")); } }else{ player.sendMessage(" "); player.sendMessage(Utils.chatColor("&c/config reload &7- &7&oReloads configuration file")); player.sendMessage(" "); } } return false; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
a2a5e090d1ab6138928aa2a09c78765184cec0b7
32364ab81af8bf4d7c0d4283ab3077bc70cba8b8
/src/test/java/spring_framework/head_01_test/becomejavasenior_com/MyApplicationTest.java
084d50e7d326c6b151babdbd05dc2d2d32a63e33
[]
no_license
dimaSkalora/Spring_Easyjava_ru
77fc115bd1996d4b2b2f7e7e91488f3d42eff208
bbf9ee244df81174aca28c4dc8efa7e0cbd1b9be
refs/heads/master
2021-05-08T03:11:16.405255
2017-11-08T17:26:10
2017-11-08T17:26:10
108,232,637
0
0
null
null
null
null
UTF-8
Java
false
false
1,557
java
package spring_framework.head_01_test.becomejavasenior_com; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import spring_framework.head_01.becomejavasenior_com.becomejavasenior.spring.di.consumer.MyApplication; import spring_framework.head_01.becomejavasenior_com.becomejavasenior.spring.di.services.MessageService; @Configuration @ComponentScan(value= "spring_framework.head_01.becomejavasenior_com.becomejavasenior.spring.di.consumer") public class MyApplicationTest { private AnnotationConfigApplicationContext context = null; @Bean public MessageService getMessageService() { return new MessageService(){ public boolean sendMessage(String msg, String rec) { System.out.println("Mock Service"); return true; } }; } @Before public void setUp() throws Exception { context = new AnnotationConfigApplicationContext(MyApplicationTest.class); } @After public void tearDown() throws Exception { context.close(); } @Test public void test() { MyApplication app = context.getBean(MyApplication.class); Assert.assertTrue(app.processMessage("Hi Dmytro", "dmytro@becomejavasenior_com.com")); } }
[ "timon2@ukr.net" ]
timon2@ukr.net
a61acd50bc08108af6dd71e811f99ac26f9d1b27
f40ba0be10e056339daf3be94b80363ed46bc416
/src/main/java/codeWars/directionsReduction_20200427/DirReductionBestPractice.java
e03ddef97f9024e62816e7edbaed49fc2ab92157
[]
no_license
JinHoooooou/codeWarsChallenge
e94a3d078389bc35eb25928ddc6c963f5878eb3e
4f6cbc7351e6f027f2451b5237db05aa1dc5f857
refs/heads/master
2022-05-21T03:04:36.139987
2021-10-25T06:29:05
2021-10-25T06:29:05
253,538,045
1
1
null
null
null
null
UTF-8
Java
false
false
1,127
java
package codeWars.directionsReduction_20200427; import java.util.Stack; public class DirReductionBestPractice { public static String[] dirReduc(String[] arr) { final Stack<String> stack = new Stack<>(); for (final String direction : arr) { final String lastElement = stack.size() > 0 ? stack.lastElement() : null; switch (direction) { case "NORTH": if ("SOUTH".equals(lastElement)) { stack.pop(); } else { stack.push(direction); } break; case "SOUTH": if ("NORTH".equals(lastElement)) { stack.pop(); } else { stack.push(direction); } break; case "EAST": if ("WEST".equals(lastElement)) { stack.pop(); } else { stack.push(direction); } break; case "WEST": if ("EAST".equals(lastElement)) { stack.pop(); } else { stack.push(direction); } break; } } return stack.stream().toArray(String[]::new); } }
[ "jinho4744@naver.com" ]
jinho4744@naver.com
7e2b8e9f6605a4abacd90075f8dd46c91321e5ea
7b34a5a10a7f1d905a9b3ac2f2f06d4bdde29b60
/app/src/main/java/com/solarexsoft/tableview/MatrixTableAdapter.java
fbc5e049332e5949bdbb8791b0b23f7e17f5234c
[ "Apache-2.0" ]
permissive
flyfire/TableView
ebf2b3a619af47a18d87281864488d53fae071cd
153bd706afb83a0f320cfa0d99f828df6b304141
refs/heads/master
2021-01-15T12:02:07.596296
2017-08-08T02:47:56
2017-08-08T02:47:56
99,641,751
0
0
null
null
null
null
UTF-8
Java
false
false
2,125
java
package com.solarexsoft.tableview; import android.content.Context; import android.content.res.Resources; import android.util.TypedValue; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.solarexsoft.solarextableview.adapter.BaseTableAdapter; /** * <pre> * Author: houruhou * Project: https://solarex.github.io/projects * CreatAt: 08/08/2017 * Desc: * </pre> */ public class MatrixTableAdapter<T> extends BaseTableAdapter { private static final int WIDTH = 110; private static final int HEIGHT = 32; private final Context mContext; private T[][] table; private final int width; private final int height; public MatrixTableAdapter(Context context) { this(context, null); } public MatrixTableAdapter(Context context, T[][] table) { mContext = context; Resources r = context.getResources(); width = Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, WIDTH, r .getDisplayMetrics())); height = Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, HEIGHT, r .getDisplayMetrics())); this.table = table; } @Override public int getRowCount() { return table.length - 1; } @Override public int getColumnCount() { return table[0].length - 1; } @Override public View getView(int row, int column, View convertView, ViewGroup parent) { if (convertView == null){ convertView = new TextView(mContext); ((TextView)convertView).setGravity(Gravity.CENTER); } ((TextView)convertView).setText(table[row+1][column+1].toString()); return convertView; } @Override public int getWidth(int column) { return width; } @Override public int getHeight(int row) { return height; } @Override public int getItemViewType(int row, int column) { return 0; } @Override public int getViewTypeCount() { return 1; } }
[ "rh.hou.work@gmail.com" ]
rh.hou.work@gmail.com
345aa452caadefa9e62ed3880bd61cb6bd0b3db7
7fa49925ed7c8517c65d9f9543621d08309bc2cf
/sources\ca\albertahealthservices\contacttracing\services\BluetoothMonitoringService$isBluetoothEnabled$bluetoothAdapter$2.java
11a5e49382c851c6c403124939c42d1131850331
[]
no_license
abtt-decompiled/abtracetogether_1.0.0.apk_disassembled
c8717a47f384fb7e8da076e48abe1e4ef8500837
d81b0ee1490911104ab36056d220be7fe3a19e1c
refs/heads/master
2022-06-24T02:51:29.783727
2020-05-08T21:05:20
2020-05-08T21:05:20
262,426,826
2
1
null
null
null
null
UTF-8
Java
false
false
1,402
java
package ca.albertahealthservices.contacttracing.services; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothManager; import kotlin.Metadata; import kotlin.TypeCastException; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.Lambda; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\n\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\n \u0002*\u0004\u0018\u00010\u00010\u0001H\n¢\u0006\u0002\b\u0003"}, d2 = {"<anonymous>", "Landroid/bluetooth/BluetoothAdapter;", "kotlin.jvm.PlatformType", "invoke"}, k = 3, mv = {1, 1, 16}) /* compiled from: BluetoothMonitoringService.kt */ final class BluetoothMonitoringService$isBluetoothEnabled$bluetoothAdapter$2 extends Lambda implements Function0<BluetoothAdapter> { final /* synthetic */ BluetoothMonitoringService this$0; BluetoothMonitoringService$isBluetoothEnabled$bluetoothAdapter$2(BluetoothMonitoringService bluetoothMonitoringService) { this.this$0 = bluetoothMonitoringService; super(0); } public final BluetoothAdapter invoke() { Object systemService = this.this$0.getSystemService("bluetooth"); if (systemService != null) { return ((BluetoothManager) systemService).getAdapter(); } throw new TypeCastException("null cannot be cast to non-null type android.bluetooth.BluetoothManager"); } }
[ "patrick.f.king+abtt@gmail.com" ]
patrick.f.king+abtt@gmail.com
f3bddd7db13b7085c55da417f596fb202230cb06
c897b075a1890c38100cf0e5726b8998b672a8ab
/AllCollections/src/test.java
b4290243ab4efb12bec83207227acdd443479bf5
[]
no_license
hemantjava/Spring_Framework_2016
91e173e8703c24a3a22c6bd1635eec2f920654e9
c440c9d0eadfc729dd7871c5dc816d7b207021c8
refs/heads/master
2023-07-18T00:23:49.763328
2021-08-13T06:37:55
2021-08-13T06:37:55
395,531,898
0
0
null
null
null
null
UTF-8
Java
false
false
165
java
public class test { static int j=f(); static int i=10; static int f(){ return i; } public static void main(String[] args) { System.out.println(i+" "+j); } }
[ "hemantjava90@gmail.com" ]
hemantjava90@gmail.com
e596e8a50b9257c984fa391b583b9832eaec47cb
bd5d7bbffc14bfa340575c8dffed69f8175c1f8c
/netty_iot/src/main/java/com/example/netty_iot/IotApplication.java
856daa899b5534a38682f2827088b3e9bf1b09eb
[]
no_license
peiqingliu/springboot_netty_all
d1325c3068670e0cdcaadcd865854a171b4bef1f
8b71d5fb8666ccb90cf644765a4087a15eb7e4f2
refs/heads/master
2022-10-06T05:21:09.150253
2020-02-08T03:25:31
2020-02-08T03:25:31
237,787,233
0
0
null
2022-10-04T23:55:53
2020-02-02T14:56:18
Java
UTF-8
Java
false
false
387
java
package com.example.netty_iot; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * @Author Liupeiqing * @Date 2020/2/3 19:31 * @Version 1.0 */ @SpringBootApplication public class IotApplication { public static void main(String[] args) { SpringApplication.run(IotApplication.class,args); } }
[ "1226880979@qq.com" ]
1226880979@qq.com
8eb432f9aaf1a4ea534ab9241781c2d8d7b224d3
ff7105c0b628206aca25691e0fffb90f6b8184dc
/app/src/main/java/com/example/xiaojun/linghejiedao/beans/TianQiBean.java
b8a34d46cbb15eb27895cabb11bfbe2694763609
[]
no_license
yoyo89757001/linhejiedaoXiaoTV
e5ff793e665b4db35a24867847f23dcb54093ae7
44a49126d7166005a5190992023453f06a8019f9
refs/heads/master
2021-01-19T06:02:39.926493
2017-08-17T10:03:39
2017-08-17T10:03:39
100,589,658
0
0
null
null
null
null
UTF-8
Java
false
false
7,060
java
package com.example.xiaojun.linghejiedao.beans; import java.util.List; /** * Created by chenjun on 2017/5/15. */ public class TianQiBean { /** * desc : OK * status : 1000 * data : {"wendu":"25","ganmao":"风较大,阴冷潮湿,较易发生感冒,体质较弱的朋友请注意适当防护。","forecast":[{"fengxiang":"南风","fengli":"3-4级","high":"高温 27℃","type":"暴雨","low":"低温 23℃","date":"15日星期一"},{"fengxiang":"北风","fengli":"3-4级","high":"高温 29℃","type":"多云","low":"低温 23℃","date":"16日星期二"},{"fengxiang":"无持续风向","fengli":"微风级","high":"高温 30℃","type":"多云","low":"低温 24℃","date":"17日星期三"},{"fengxiang":"无持续风向","fengli":"微风级","high":"高温 29℃","type":"多云","low":"低温 25℃","date":"18日星期四"},{"fengxiang":"无持续风向","fengli":"微风级","high":"高温 29℃","type":"多云","low":"低温 23℃","date":"19日星期五"}],"yesterday":{"fl":"微风","fx":"无持续风向","high":"高温 29℃","type":"多云","low":"低温 23℃","date":"14日星期日"},"aqi":"27","city":"广州"} */ private String desc; private int status; private DataBean data; public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public DataBean getData() { return data; } public void setData(DataBean data) { this.data = data; } public static class DataBean { /** * wendu : 25 * ganmao : 风较大,阴冷潮湿,较易发生感冒,体质较弱的朋友请注意适当防护。 * forecast : [{"fengxiang":"南风","fengli":"3-4级","high":"高温 27℃","type":"暴雨","low":"低温 23℃","date":"15日星期一"},{"fengxiang":"北风","fengli":"3-4级","high":"高温 29℃","type":"多云","low":"低温 23℃","date":"16日星期二"},{"fengxiang":"无持续风向","fengli":"微风级","high":"高温 30℃","type":"多云","low":"低温 24℃","date":"17日星期三"},{"fengxiang":"无持续风向","fengli":"微风级","high":"高温 29℃","type":"多云","low":"低温 25℃","date":"18日星期四"},{"fengxiang":"无持续风向","fengli":"微风级","high":"高温 29℃","type":"多云","low":"低温 23℃","date":"19日星期五"}] * yesterday : {"fl":"微风","fx":"无持续风向","high":"高温 29℃","type":"多云","low":"低温 23℃","date":"14日星期日"} * aqi : 27 * city : 广州 */ private String wendu; private String ganmao; private YesterdayBean yesterday; private String aqi; private String city; private List<ForecastBean> forecast; public String getWendu() { return wendu; } public void setWendu(String wendu) { this.wendu = wendu; } public String getGanmao() { return ganmao; } public void setGanmao(String ganmao) { this.ganmao = ganmao; } public YesterdayBean getYesterday() { return yesterday; } public void setYesterday(YesterdayBean yesterday) { this.yesterday = yesterday; } public String getAqi() { return aqi; } public void setAqi(String aqi) { this.aqi = aqi; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public List<ForecastBean> getForecast() { return forecast; } public void setForecast(List<ForecastBean> forecast) { this.forecast = forecast; } public static class YesterdayBean { /** * fl : 微风 * fx : 无持续风向 * high : 高温 29℃ * type : 多云 * low : 低温 23℃ * date : 14日星期日 */ private String fl; private String fx; private String high; private String type; private String low; private String date; public String getFl() { return fl; } public void setFl(String fl) { this.fl = fl; } public String getFx() { return fx; } public void setFx(String fx) { this.fx = fx; } public String getHigh() { return high; } public void setHigh(String high) { this.high = high; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getLow() { return low; } public void setLow(String low) { this.low = low; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } } public static class ForecastBean { /** * fengxiang : 南风 * fengli : 3-4级 * high : 高温 27℃ * type : 暴雨 * low : 低温 23℃ * date : 15日星期一 */ private String fengxiang; private String fengli; private String high; private String type; private String low; private String date; public String getFengxiang() { return fengxiang; } public void setFengxiang(String fengxiang) { this.fengxiang = fengxiang; } public String getFengli() { return fengli; } public void setFengli(String fengli) { this.fengli = fengli; } public String getHigh() { return high; } public void setHigh(String high) { this.high = high; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getLow() { return low; } public void setLow(String low) { this.low = low; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } } } }
[ "332663557@qq.com" ]
332663557@qq.com
5f925c1d1b9eb39ab5e2404f93b0791f87aefa90
11fced7d40e3e46d85a2d5afea272dbc6ad8c3c2
/src/chapter15/PE1513_Client.java
37d0b3cf15853e284f7b0d0f3f03b9391a1ab961
[]
no_license
Lo1s/JavaIntroduction
152c94c45f99992df9e32fc5608eda617cd8b9d5
9aa4f37210706ec30f49a15ed339dfff3d175f47
refs/heads/master
2016-09-06T17:55:26.432493
2015-07-03T09:34:38
2015-07-03T09:34:38
37,971,996
0
0
null
null
null
null
UTF-8
Java
false
false
513
java
/** * */ package chapter15; /** * @author jslapnicka * @Date & @Time 8. 9. 2014 2014 8:24:07 */ public class PE1513_Client { /** * @param args */ public static void main(String[] args) throws CloneNotSupportedException { // TODO Auto-generated method stub PE1513_Octagon o1 = new PE1513_Octagon(6); PE1513_Octagon o2 = (PE1513_Octagon)o1.clone(); @SuppressWarnings("unused") PE1513_Octagon o3 = new PE1513_Octagon(5); System.out.println("o1.compareTo(o2): " + o1.compareTo(o2)); } }
[ "hydRwa@gmail.com" ]
hydRwa@gmail.com
22c6361f624fb0d8d89302f61e65253940c19cb9
8ccd1c071b19388f1f2e92c5e5dbedc78fead327
/src/main/java/ohos/appexecfwk/utils/PerfProfile.java
e69e0855bd914b9e0e28ad70baa10dff54be4fa4
[]
no_license
yearsyan/Harmony-OS-Java-class-library
d6c135b6a672c4c9eebf9d3857016995edeb38c9
902adac4d7dca6fd82bb133c75c64f331b58b390
refs/heads/main
2023-06-11T21:41:32.097483
2021-06-24T05:35:32
2021-06-24T05:35:32
379,816,304
6
3
null
null
null
null
UTF-8
Java
false
false
918
java
package ohos.appexecfwk.utils; import ohos.hiviewdfx.HiLogLabel; public class PerfProfile { private static final HiLogLabel PERFPROFILE_LABEL = new HiLogLabel(3, 218108160, "AppPerfProfile"); private static final int TIME_UNIT = 1000; public static long getTimeStamp() { return System.nanoTime(); } public static void printDurationTime(long j, long j2, String str) { if (j2 < j) { AppLog.w(PERFPROFILE_LABEL, "PerfProfile::printDurationTime stop must greater or equal to start", new Object[0]); } else if (str == null || str.isEmpty()) { AppLog.w(PERFPROFILE_LABEL, "PerfProfile::printDurationTime message invalid", new Object[0]); } else { String valueOf = String.valueOf((j2 - j) / 1000); AppLog.i(PERFPROFILE_LABEL, "%{public}s spend time %{public}s us", str, valueOf); } } }
[ "yearsyan@gmail.com" ]
yearsyan@gmail.com
8bada3ef95e56c6de640921ba674bed1c53d9b80
840d06787d44056decb54c6da4a42c0f1adf958b
/src/main/java/pl/alkom/spring/repositories/TeamRepository.java
394a5479c73a9698ca2d12e366ba3b31eac1cb5b
[]
no_license
DanielMichalski/altkom-spring-mvc
893f066b159fec71b88bb21c10e5fe35cd5ab9cd
b58a5e7aa355bc4ee02dfba312f161e209501803
refs/heads/master
2021-01-01T19:46:41.917237
2014-08-31T11:23:50
2014-08-31T11:23:50
23,369,575
1
2
null
null
null
null
UTF-8
Java
false
false
231
java
package pl.alkom.spring.repositories; import org.springframework.data.repository.CrudRepository; import pl.alkom.spring.model.Team; /** * Author: Daniel */ public interface TeamRepository extends CrudRepository<Team, Long> { }
[ "michalskidaniel2@gmail.com" ]
michalskidaniel2@gmail.com
1ac3e931b91ea5c4409a006d058fb7f6e1583447
6dc27545eceaa0fe130139c62e36f2c4b17de8f3
/src/main/java/com/norconex/committer/core3/impl/MemoryCommitter.java
54597b6f063cebc3489e12c588467ed38cc5a259
[ "Apache-2.0" ]
permissive
Norconex/committer-core
30059fa960c21e03def13c71cef3bd60ca3f876b
0ed3718c6484b820c5dc2e81fa01a87288a589b7
refs/heads/master
2023-02-09T09:28:06.924160
2022-01-02T21:50:16
2022-01-02T21:50:16
12,910,531
6
11
Apache-2.0
2023-02-08T23:07:44
2013-09-18T00:47:26
Java
UTF-8
Java
false
false
7,337
java
/* Copyright 2019-2020 Norconex Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.norconex.committer.core3.impl; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.Map.Entry; import java.util.stream.Collectors; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.norconex.committer.core3.AbstractCommitter; import com.norconex.committer.core3.CommitterException; import com.norconex.committer.core3.DeleteRequest; import com.norconex.committer.core3.ICommitterRequest; import com.norconex.committer.core3.UpsertRequest; import com.norconex.commons.lang.map.Properties; import com.norconex.commons.lang.text.TextMatcher; import com.norconex.commons.lang.xml.XML; /** * <p> * <b>WARNING: Not intended for production use.</b> * </p> * <p> * A Committer that stores every document received into memory. * This can be useful for testing or troubleshooting applications using * Committers. * Given this committer can eat up memory pretty quickly, its use is strongly * discouraged for regular production use. * </p> * * {@nx.xml.usage * <committer class="com.norconex.committer.core3.impl.MemoryCommitter"> * {@nx.include com.norconex.committer.core3.AbstractCommitter@nx.xml.usage} * </committer> * } * * @author Pascal Essiembre * @since 3.0.0 */ @SuppressWarnings("javadoc") public class MemoryCommitter extends AbstractCommitter { private static final Logger LOG = LoggerFactory.getLogger(MemoryCommitter.class); private final List<ICommitterRequest> requests = new ArrayList<>(); private int upsertCount = 0; private int deleteCount = 0; private boolean ignoreContent; private final TextMatcher fieldMatcher = new TextMatcher(); /** * Constructor. */ public MemoryCommitter() { super(); } public boolean isIgnoreContent() { return ignoreContent; } public void setIgnoreContent(boolean ignoreContent) { this.ignoreContent = ignoreContent; } public TextMatcher getFieldMatcher() { return fieldMatcher; } public void setFieldMatcher(TextMatcher fieldMatcher) { this.fieldMatcher.copyFrom(fieldMatcher); } @Override protected void doInit() { //NOOP } public boolean removeRequest(ICommitterRequest req) { return requests.remove(req); } public List<ICommitterRequest> getAllRequests() { return requests; } public List<UpsertRequest> getUpsertRequests() { return requests.stream() .filter(o -> o instanceof UpsertRequest) .map(o -> (UpsertRequest) o) .collect(Collectors.toList()); } public List<DeleteRequest> getDeleteRequests() { return requests.stream() .filter(o -> o instanceof DeleteRequest) .map(o -> (DeleteRequest) o) .collect(Collectors.toList()); } public int getUpsertCount() { return upsertCount; } public int getDeleteCount() { return deleteCount; } public int getRequestCount() { return requests.size(); } @Override protected void doUpsert(UpsertRequest upsertRequest) throws CommitterException { String memReference = upsertRequest.getReference(); LOG.debug("Committing upsert request for {}", memReference); InputStream memContent = null; InputStream reqContent = upsertRequest.getContent(); if (!ignoreContent && reqContent != null) { try { memContent = new ByteArrayInputStream( IOUtils.toByteArray(reqContent)); } catch (IOException e) { throw new CommitterException( "Could not do upsert for " + memReference); } } Properties memMetadata = filteredMetadata(upsertRequest.getMetadata()); requests.add(new UpsertRequest(memReference, memMetadata, memContent)); upsertCount++; } @Override protected void doDelete(DeleteRequest deleteRequest) { String memReference = deleteRequest.getReference(); LOG.debug("Committing delete request for {}", memReference); Properties memMetadata = filteredMetadata(deleteRequest.getMetadata()); requests.add(new DeleteRequest(memReference, memMetadata)); deleteCount++; } private Properties filteredMetadata(Properties reqMetadata) { Properties memMetadata = new Properties(); if (reqMetadata != null) { if (fieldMatcher.getPattern() == null) { memMetadata.loadFromMap(reqMetadata); } else { memMetadata.loadFromMap(reqMetadata.entrySet().stream() .filter(en -> fieldMatcher.matches(en.getKey())) .collect(Collectors.toMap( Entry::getKey, Entry::getValue))); } } return memMetadata; } @Override protected void doClose() throws com.norconex.committer.core3.CommitterException { LOG.info("{} upserts committed.", upsertCount); LOG.info("{} deletions committed.", deleteCount); } @Override protected void doClean() throws CommitterException { // NOOP } @Override public boolean equals(final Object other) { return EqualsBuilder.reflectionEquals(this, other); } @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } @Override public String toString() { // Cannot use ReflectionToStringBuilder here to prevent // "An illegal reflective access operation has occurred" return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) .appendSuper(super.toString()) .append("requests", requests, false) .append("upsertCount", upsertCount) .append("deleteCount", deleteCount) .build(); } @Override public void loadCommitterFromXML(XML xml) { //NOOP } @Override public void saveCommitterToXML(XML xml) { //NOOP } }
[ "pascal.essiembre@norconex.com" ]
pascal.essiembre@norconex.com
c6fdc8d1339eb51a8dd3c91876d83c96c7419830
d13fb02bb909606b9314bfbe67873deb00197fae
/app/src/main/java/com/xy/wk/BaseFragmentActivity.java
163c5ddc8924da9a54966403747b990a5a65ce3d
[]
no_license
chinafengqiang/wkPhone
1ff4e2e8feac47a97f193dc704b7c707a2b43e11
60d8e04fac5fd5c635f146aba4f33899091bd109
refs/heads/master
2020-12-13T03:35:41.420420
2016-08-02T10:41:11
2016-08-02T10:41:11
55,571,229
0
0
null
null
null
null
UTF-8
Java
false
false
1,692
java
package com.xy.wk; import android.content.Context; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.view.View; import com.xy.view.FProgrssDialog; /** * Created by FQ.CHINA on 2015/8/31. */ public abstract class BaseFragmentActivity extends FragmentActivity implements View.OnClickListener{ protected Context mContext; protected FProgrssDialog progressDialog; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //mContext = getApplicationContext(); mContext = this; initView(); } private void initView() { loadViewLayout(); findViewById(); initSp(); initTitle(); setListener(); processLogic(); } protected void showProgressDialog() { closeProgressDialog(); if ((!isFinishing()) && (this.progressDialog == null)) { this.progressDialog = new FProgrssDialog(mContext); } this.progressDialog.show(); } protected void closeProgressDialog() { if (this.progressDialog != null){ this.progressDialog.dismiss(); this.progressDialog = null; } } @Override protected void onDestroy() { super.onDestroy(); closeProgressDialog(); mContext = null; } protected abstract void findViewById(); protected abstract void initTitle(); protected abstract void initSp(); /** * setContentView() * */ protected abstract void loadViewLayout(); protected abstract void processLogic(); protected abstract void setListener(); }
[ "chinafengqiang@sina.com" ]
chinafengqiang@sina.com
c31e103290a3e388e0ea81dbd1c1de76fde06e7b
500b104bc8ed57d5daead3df2b20738059b7ef9a
/android/src/com/android/tools/idea/lint/AndroidLintAnimatorKeepInspection.java
1d70ff3a221209e9e7d1e9cfc1c1b95df41fbdfe
[]
no_license
RepoForks/android-2
a9eb30effe202ef0b1ae7ff44d1b24ffde863aff
a69a3102b8bde36f434d72bb30bfe7e7628cf4ef
refs/heads/master
2021-09-01T05:40:37.325999
2017-12-21T16:54:18
2017-12-21T16:54:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,587
java
/* * Copyright (C) 2016 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.tools.idea.lint; import com.android.tools.lint.checks.ObjectAnimatorDetector; import com.android.tools.lint.detector.api.TextFormat; import com.intellij.codeInsight.AnnotationUtil; import com.intellij.codeInsight.FileModificationService; import com.intellij.codeInsight.intention.AddAnnotationFix; import com.intellij.openapi.project.Project; import com.intellij.psi.PsiAnnotation; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiModifierList; import com.intellij.psi.PsiModifierListOwner; import com.intellij.psi.util.PsiTreeUtil; import org.jetbrains.android.inspections.lint.AndroidLintInspectionBase; import org.jetbrains.android.inspections.lint.AndroidLintQuickFix; import org.jetbrains.android.inspections.lint.AndroidQuickfixContexts; import org.jetbrains.android.util.AndroidBundle; import org.jetbrains.annotations.NotNull; import static com.android.tools.lint.checks.ObjectAnimatorDetector.KEEP_ANNOTATION; public class AndroidLintAnimatorKeepInspection extends AndroidLintInspectionBase { public AndroidLintAnimatorKeepInspection() { super(AndroidBundle.message("android.lint.inspections.animator.keep"), ObjectAnimatorDetector.MISSING_KEEP); } @NotNull @Override public AndroidLintQuickFix[] getQuickFixes(@NotNull PsiElement startElement, @NotNull PsiElement endElement, @NotNull String message) { return new AndroidLintQuickFix[]{ new AndroidLintQuickFix() { @Override public void apply(@NotNull PsiElement startElement, @NotNull PsiElement endElement, @NotNull AndroidQuickfixContexts.Context context) { if (!ObjectAnimatorDetector.isAddKeepErrorMessage(message, TextFormat.RAW)) { return; } PsiModifierListOwner container = PsiTreeUtil.getParentOfType(startElement, PsiModifierListOwner.class); if (container == null) { return; } if (!FileModificationService.getInstance().preparePsiElementForWrite(container)) { return; } final PsiModifierList modifierList = container.getModifierList(); if (modifierList != null) { PsiAnnotation annotation = AnnotationUtil.findAnnotation(container, KEEP_ANNOTATION); if (annotation == null) { Project project = startElement.getProject(); new AddAnnotationFix(KEEP_ANNOTATION, container).invoke(project, null, container.getContainingFile()); } } } @Override public boolean isApplicable(@NotNull PsiElement startElement, @NotNull PsiElement endElement, @NotNull AndroidQuickfixContexts.ContextType contextType) { return true; } @NotNull @Override public String getName() { return "Annotate with @Keep"; } } }; } }
[ "tnorbye@google.com" ]
tnorbye@google.com
d5f6dba0cd49be8c6801d3117fa3817ffe479c27
f5da190caa872091c18e68c82eae5ad887892bc9
/src/main/java/com/ats/test/web/rest/vm/LoginVM.java
adef3270b8becc97e1c3934e861803ef81090f0e
[]
no_license
koyaja/jhipsterTest
de89f13ff8d224db9e024d334d62526201a7e112
cf1456d66cd9f0e3958a2dca7efb64b6d5e7f5a8
refs/heads/master
2020-03-14T03:39:34.457397
2018-04-28T16:12:00
2018-04-28T16:12:00
131,424,644
0
0
null
2018-04-28T19:44:21
2018-04-28T16:11:58
Java
UTF-8
Java
false
false
1,111
java
package com.ats.test.web.rest.vm; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** * View Model object for storing a user's credentials. */ public class LoginVM { @NotNull @Size(min = 1, max = 50) private String username; @NotNull @Size(min = ManagedUserVM.PASSWORD_MIN_LENGTH, max = ManagedUserVM.PASSWORD_MAX_LENGTH) private String password; private Boolean rememberMe; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Boolean isRememberMe() { return rememberMe; } public void setRememberMe(Boolean rememberMe) { this.rememberMe = rememberMe; } @Override public String toString() { return "LoginVM{" + "username='" + username + '\'' + ", rememberMe=" + rememberMe + '}'; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
bc6a0e94e8f95a8107e21d1981ca30b9ea27dee2
ae0d4f528c889cbaba046197ac1a58fb774d38fe
/optaplanner-persistence/optaplanner-persistence-jackson/src/test/java/org/optaplanner/persistence/jackson/api/score/buildin/simplelong/SimpleLongScoreJacksonJsonSerializerAndDeserializerTest.java
4494d6304cd1368af77f17d213185d6d8c269bc9
[ "Apache-2.0" ]
permissive
guotechfin/optaplanner
9ee4771bd55c7511c8a4f9753a3105f3dd511c9d
f66b33b580af92ec4b55f9ec2ac926a27dab3b1c
refs/heads/master
2021-01-25T11:39:20.868655
2018-02-28T18:08:34
2018-02-28T18:08:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,337
java
/* * Copyright 2016 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.persistence.jackson.api.score.buildin.simplelong; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.junit.Test; import org.optaplanner.core.api.score.buildin.simplelong.SimpleLongScore; import org.optaplanner.persistence.jackson.api.score.AbstractScoreJacksonJsonSerializerAndDeserializerTest; import org.optaplanner.persistence.jackson.api.score.ScoreJacksonJsonSerializer; public class SimpleLongScoreJacksonJsonSerializerAndDeserializerTest extends AbstractScoreJacksonJsonSerializerAndDeserializerTest { @Test public void serializeAndDeserialize() { assertSerializeAndDeserialize(null, new TestSimpleLongScoreWrapper(null)); SimpleLongScore score = SimpleLongScore.valueOf(1234L); assertSerializeAndDeserialize(score, new TestSimpleLongScoreWrapper(score)); score = SimpleLongScore.valueOfUninitialized(-7, 1234L); assertSerializeAndDeserialize(score, new TestSimpleLongScoreWrapper(score)); } public static class TestSimpleLongScoreWrapper extends AbstractScoreJacksonJsonSerializerAndDeserializerTest.TestScoreWrapper<SimpleLongScore> { @JsonSerialize(using = ScoreJacksonJsonSerializer.class) @JsonDeserialize(using = SimpleLongScoreJacksonJsonDeserializer.class) private SimpleLongScore score; @SuppressWarnings("unused") private TestSimpleLongScoreWrapper() { } public TestSimpleLongScoreWrapper(SimpleLongScore score) { this.score = score; } @Override public SimpleLongScore getScore() { return score; } } }
[ "gds.geoffrey.de.smet@gmail.com" ]
gds.geoffrey.de.smet@gmail.com
fbbcb1a590bfcc9372da67f58a5e30b25e0a75cc
70daf318d027f371ada3abeaaa31dd47651640d7
/src/jdo/sta/bean/ABDSType.java
1bcbc868147aa17c490e649d2a23ae815b142ae4
[]
no_license
wangqing123654/web
00613f6db653562e2e8edc14327649dc18b2aae6
bd447877400291d3f35715ca9c7c7b1e79653531
refs/heads/master
2023-04-07T15:23:34.705954
2020-11-02T10:10:57
2020-11-02T10:10:57
309,329,277
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
2,110
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // 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: 2015.06.30 at 10:28:02 ÉÏÎç CST // package jdo.sta.bean; import java.util.ArrayList; import java.util.List; 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 ABDSType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ABDSType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="ABD" type="{}ABDType" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ABDSType", propOrder = { "abd" }) public class ABDSType { @XmlElement(name = "ABD", required = true, nillable = true) protected List<ABDType> abd; /** * Gets the value of the abd property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the abd property. * * <p> * For example, to add a new item, do as follows: * <pre> * getABD().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ABDType } * * */ public List<ABDType> getABD() { if (abd == null) { abd = new ArrayList<ABDType>(); } return this.abd; } }
[ "1638364772@qq.com" ]
1638364772@qq.com
33173dbd7028e1422f12663c55f8d38ca3b00ec6
dda81b93a12e0695dc1c85a6a8ca3785f2e36e23
/spigot/work/decompile-93a89a75/net/minecraft/server/LootItemConditionBlockStateProperty.java
be01f43e71c06972a3bfc9d33b3e20fa43793378
[]
no_license
skychwang/MindCraft
a4a8a337738b884af6ecc65c133b314418757a7d
48923ed1c2b9fbc807a61619cc17001312082b83
refs/heads/master
2023-07-20T14:36:48.872240
2021-09-07T20:00:04
2021-09-07T20:00:04
336,148,107
2
0
null
null
null
null
UTF-8
Java
false
false
6,657
java
package net.minecraft.server; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonSerializationContext; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.Map.Entry; import java.util.function.Predicate; public class LootItemConditionBlockStateProperty implements LootItemCondition { private final Block a; private final Map<IBlockState<?>, Object> b; private final Predicate<IBlockData> c; private LootItemConditionBlockStateProperty(Block block, Map<IBlockState<?>, Object> map) { this.a = block; this.b = ImmutableMap.copyOf(map); this.c = a(block, map); } private static Predicate<IBlockData> a(Block block, Map<IBlockState<?>, Object> map) { int i = map.size(); if (i == 0) { return (iblockdata) -> { return iblockdata.getBlock() == block; }; } else if (i == 1) { Entry<IBlockState<?>, Object> entry = (Entry) map.entrySet().iterator().next(); IBlockState<?> iblockstate = (IBlockState) entry.getKey(); Object object = entry.getValue(); return (iblockdata) -> { return iblockdata.getBlock() == block && object.equals(iblockdata.get(iblockstate)); }; } else { Predicate<IBlockData> predicate = (iblockdata) -> { return iblockdata.getBlock() == block; }; IBlockState iblockstate1; Object object1; for (Iterator iterator = map.entrySet().iterator(); iterator.hasNext();predicate = predicate.and((iblockdata) -> { return object1.equals(iblockdata.get(iblockstate1)); })) { Entry<IBlockState<?>, Object> entry1 = (Entry) iterator.next(); iblockstate1 = (IBlockState) entry1.getKey(); object1 = entry1.getValue(); } return predicate; } } @Override public Set<LootContextParameter<?>> a() { return ImmutableSet.of(LootContextParameters.BLOCK_STATE); } public boolean test(LootTableInfo loottableinfo) { IBlockData iblockdata = (IBlockData) loottableinfo.getContextParameter(LootContextParameters.BLOCK_STATE); return iblockdata != null && this.c.test(iblockdata); } public static LootItemConditionBlockStateProperty.a a(Block block) { return new LootItemConditionBlockStateProperty.a(block); } public static class b extends LootItemCondition.b<LootItemConditionBlockStateProperty> { private static <T extends Comparable<T>> String a(IBlockState<T> iblockstate, Object object) { return iblockstate.a((Comparable) object); } protected b() { super(new MinecraftKey("block_state_property"), LootItemConditionBlockStateProperty.class); } public void a(JsonObject jsonobject, LootItemConditionBlockStateProperty lootitemconditionblockstateproperty, JsonSerializationContext jsonserializationcontext) { jsonobject.addProperty("block", IRegistry.BLOCK.getKey(lootitemconditionblockstateproperty.a).toString()); JsonObject jsonobject1 = new JsonObject(); lootitemconditionblockstateproperty.b.forEach((iblockstate, object) -> { jsonobject1.addProperty(iblockstate.a(), a(iblockstate, object)); }); jsonobject.add("properties", jsonobject1); } @Override public LootItemConditionBlockStateProperty b(JsonObject jsonobject, JsonDeserializationContext jsondeserializationcontext) { MinecraftKey minecraftkey = new MinecraftKey(ChatDeserializer.h(jsonobject, "block")); Block block = (Block) IRegistry.BLOCK.getOptional(minecraftkey).orElseThrow(() -> { return new IllegalArgumentException("Can't find block " + minecraftkey); }); BlockStateList<Block, IBlockData> blockstatelist = block.getStates(); Map<IBlockState<?>, Object> map = Maps.newHashMap(); if (jsonobject.has("properties")) { JsonObject jsonobject1 = ChatDeserializer.t(jsonobject, "properties"); jsonobject1.entrySet().forEach((entry) -> { String s = (String) entry.getKey(); IBlockState<?> iblockstate = blockstatelist.a(s); if (iblockstate == null) { throw new IllegalArgumentException("Block " + IRegistry.BLOCK.getKey(block) + " does not have property '" + s + "'"); } else { String s1 = ChatDeserializer.a((JsonElement) entry.getValue(), "value"); Object object = iblockstate.b(s1).orElseThrow(() -> { return new IllegalArgumentException("Block " + IRegistry.BLOCK.getKey(block) + " property '" + s + "' does not have value '" + s1 + "'"); }); map.put(iblockstate, object); } }); } return new LootItemConditionBlockStateProperty(block, map); } } public static class a implements LootItemCondition.a { private final Block a; private final Set<IBlockState<?>> b; private final Map<IBlockState<?>, Object> c = Maps.newHashMap(); public a(Block block) { this.a = block; this.b = Sets.newIdentityHashSet(); this.b.addAll(block.getStates().d()); } public <T extends Comparable<T>> LootItemConditionBlockStateProperty.a a(IBlockState<T> iblockstate, T t0) { if (!this.b.contains(iblockstate)) { throw new IllegalArgumentException("Block " + IRegistry.BLOCK.getKey(this.a) + " does not have property '" + iblockstate + "'"); } else if (!iblockstate.getValues().contains(t0)) { throw new IllegalArgumentException("Block " + IRegistry.BLOCK.getKey(this.a) + " property '" + iblockstate + "' does not have value '" + t0 + "'"); } else { this.c.put(iblockstate, t0); return this; } } @Override public LootItemCondition build() { return new LootItemConditionBlockStateProperty(this.a, this.c); } } }
[ "sky.wang@yahoo.com" ]
sky.wang@yahoo.com
dcc68ed7ff9f248e5e6d9538935951c3e4ee4673
10186b7d128e5e61f6baf491e0947db76b0dadbc
/org/apache/batik/css/engine/Messages.java
c61e1dc9c39f4df179526ed8838d5a7c196f7e0f
[ "SMLNJ", "Apache-1.1", "Apache-2.0", "BSD-2-Clause" ]
permissive
MewX/contendo-viewer-v1.6.3
7aa1021e8290378315a480ede6640fd1ef5fdfd7
69fba3cea4f9a43e48f43148774cfa61b388e7de
refs/heads/main
2022-07-30T04:51:40.637912
2021-03-28T05:06:26
2021-03-28T05:06:26
351,630,911
2
0
Apache-2.0
2021-10-12T22:24:53
2021-03-26T01:53:24
Java
UTF-8
Java
false
false
1,662
java
/* */ package org.apache.batik.css.engine; /* */ /* */ import java.util.Locale; /* */ import java.util.MissingResourceException; /* */ import org.apache.batik.i18n.LocalizableSupport; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class Messages /* */ { /* */ protected static final String RESOURCES = "org.apache.batik.css.engine.resources.Messages"; /* 49 */ protected static LocalizableSupport localizableSupport = new LocalizableSupport("org.apache.batik.css.engine.resources.Messages", Messages.class.getClassLoader()); /* */ /* */ /* */ /* */ /* */ /* */ public static void setLocale(Locale l) { /* 56 */ localizableSupport.setLocale(l); /* */ } /* */ /* */ /* */ /* */ /* */ public static Locale getLocale() { /* 63 */ return localizableSupport.getLocale(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ public static String formatMessage(String key, Object[] args) throws MissingResourceException { /* 72 */ return localizableSupport.formatMessage(key, args); /* */ } /* */ } /* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/batik/css/engine/Messages.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "xiayuanzhong+gpg2020@gmail.com" ]
xiayuanzhong+gpg2020@gmail.com
ffada42a66517df1606f142a4a9c596b685295b3
28e356d56e3682cdaa53a14f2ef22a2dbb9799c0
/2.3.04-Exercise-AddDebugPlatforms/core/src/com/udacity/gamedev/gigagal/entities/Platform.java
3b8559968fec2e5b5391ce7a134adb8642fac8c6
[ "MIT" ]
permissive
udacity/ud406
31fb5e8ef02f6f78e500ad8998bae38bf4296494
191d46352271cc74f4232a3f75db3563c200b1c9
refs/heads/master
2023-03-28T21:01:07.283156
2021-10-21T13:33:06
2021-10-21T13:33:06
45,005,805
60
134
MIT
2023-05-08T19:41:40
2015-10-27T00:05:43
Java
UTF-8
Java
false
false
679
java
package com.udacity.gamedev.gigagal.entities; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.udacity.gamedev.gigagal.util.Assets; public class Platform { float top; float bottom; float left; float right; public Platform(float left, float top, float width, float height) { this.top = top; this.bottom = top - height; this.left = left; this.right = left + width; } public void render(SpriteBatch batch) { float width = right - left; float height = top - bottom; Assets.instance.platformAssets.platformNinePatch.draw(batch, left - 1, bottom - 1, width + 2, height + 2); } }
[ "jeremy@udacity.com" ]
jeremy@udacity.com
28c774a0b04046ae5419fd02fdc814e75d6b23b8
52db46cda46618dbd3028e5f54df0864c8ff65b8
/src/main/java/com/intellij/uiDesigner/impl/actions/GroupButtonsAction.java
f32a81c581f381eb06cb55c110eabb1833b1f4df
[ "Apache-2.0" ]
permissive
consulo/consulo-ui-designer
73279cdcce6b7006200a08aba56493ae1bd46ac9
1a7872cd107c90d8775d3c0e433b4a14bbae418f
refs/heads/master
2023-08-31T00:23:34.185990
2023-05-07T11:01:58
2023-05-07T11:01:58
13,801,786
0
0
null
null
null
null
UTF-8
Java
false
false
3,145
java
/* * Copyright 2000-2009 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.intellij.uiDesigner.impl.actions; import consulo.ui.ex.awt.Messages; import com.intellij.uiDesigner.impl.radComponents.RadButtonGroup; import com.intellij.uiDesigner.impl.radComponents.RadComponent; import com.intellij.uiDesigner.impl.radComponents.RadRootContainer; import com.intellij.uiDesigner.impl.designSurface.GuiEditor; import com.intellij.uiDesigner.impl.propertyInspector.properties.IdentifierValidator; import com.intellij.uiDesigner.impl.UIDesignerBundle; import consulo.ui.ex.action.AnActionEvent; import javax.annotation.Nonnull; import javax.swing.*; import java.util.ArrayList; import java.util.List; /** * @author yole */ public class GroupButtonsAction extends AbstractGuiEditorAction { protected void actionPerformed(final GuiEditor editor, final List<RadComponent> selection, final AnActionEvent e) { groupButtons(editor, selection); } public static void groupButtons(final GuiEditor editor, final List<RadComponent> selectedComponents) { if (!editor.ensureEditable()) return; String groupName = Messages.showInputDialog(editor.getProject(), UIDesignerBundle.message("group.buttons.name.prompt"), UIDesignerBundle.message("group.buttons.title"), Messages.getQuestionIcon(), editor.getRootContainer().suggestGroupName(), new IdentifierValidator(editor.getProject())); if (groupName == null) return; RadRootContainer rootContainer = editor.getRootContainer(); RadButtonGroup group = rootContainer.createGroup(groupName); for(RadComponent component: selectedComponents) { rootContainer.setGroupForComponent(component, group); } editor.refreshAndSave(true); } protected void update(@Nonnull GuiEditor editor, final ArrayList<RadComponent> selection, final AnActionEvent e) { e.getPresentation().setVisible(allButtons(selection)); e.getPresentation().setEnabled(allButtons(selection) && selection.size() >= 2 && !UngroupButtonsAction.isSameGroup(editor, selection)); } public static boolean allButtons(final ArrayList<RadComponent> selection) { for(RadComponent component: selection) { if (!(component.getDelegee() instanceof AbstractButton) || component.getDelegee() instanceof JButton) { return false; } } return true; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
c18040df65e56609c09fe5be50580ac2e4a7920a
d0bfc9d12bf822bb2f93e5e1ec38fffe69353253
/benefits/benefits-moudle/benefits-bean/src/main/java/com/lx/benefits/bean/bo/order/SellerOrderReverseOverviewBO.java
f4036d82adb140d1659f95632547c0bd0974874b
[]
no_license
wuyizhong/SpringFramework.wangmeng.definition
11f3f2958079baad8e4f39a7b6953a87c29fde5f
dd346624d89150836f4a26f1be21192602376b13
refs/heads/master
2020-07-23T23:15:23.948727
2019-09-09T02:51:36
2019-09-09T02:51:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
240
java
package com.lx.benefits.bean.bo.order; import lombok.Data; @Data public class SellerOrderReverseOverviewBO { /**全部订单*/ private int allCount; /**退款成功订单(逆向状态2,4)*/ private int overCount; }
[ "15070083409@163.com" ]
15070083409@163.com
b432541e04666bef7d3147048005aa55ba5a7fc4
ba7cab056c31fded038d49ccee0c1c9c54a6f3d4
/dist/gameserver/data/scripts/quests/_033_MakeAPairOfDressShoes.java
167e55f9ceecb4953a692f7e147556e74f05aea5
[]
no_license
MaicoSautner/l2script-teste
48052f6408be26038e692f48b38f1582a3eded06
196979a27575fd3ff48c28d416f2d820ba02059e
refs/heads/master
2022-07-26T09:08:00.639245
2020-05-22T02:12:02
2020-05-22T02:16:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,731
java
package quests; import l2s.gameserver.model.instances.NpcInstance; import l2s.gameserver.model.quest.Quest; import l2s.gameserver.model.quest.QuestState; public class _033_MakeAPairOfDressShoes extends Quest { int LEATHER = 36516; int GEM_FOR_ACC = 36556; int DRESS_SHOES_BOX = 7113; public _033_MakeAPairOfDressShoes() { super(PARTY_NONE, REPEATABLE); addStartNpc(30838); addTalkId(30838); addTalkId(30838); addTalkId(30164); addTalkId(31520); addLevelCheck("30838-00.htm", 60); } @Override public String onEvent(String event, QuestState st, NpcInstance npc) { String htmltext = event; if(event.equals("30838-1.htm")) { st.setCond(1); } else if(event.equals("31520-1.htm")) st.setCond(2); else if(event.equals("30838-3.htm")) st.setCond(3); else if(event.equals("30838-5.htm")) { if(st.getQuestItemsCount(LEATHER) >= 360 && st.getQuestItemsCount(GEM_FOR_ACC) >= 90 && st.getQuestItemsCount(ADENA_ID) >= 500000) { st.takeItems(LEATHER, 360); st.takeItems(GEM_FOR_ACC, 90); st.takeItems(ADENA_ID, 500000); st.setCond(4); } else htmltext = "You don't have enough materials"; } else if(event.equals("30164-1.htm")) { if(st.getQuestItemsCount(ADENA_ID) >= 300000) { st.takeItems(ADENA_ID, 300000); st.setCond(5); } else htmltext = "30164-havent.htm"; } else if(event.equals("30838-7.htm")) { st.giveItems(DRESS_SHOES_BOX, 1); st.finishQuest(); } return htmltext; } @Override public String onTalk(NpcInstance npc, QuestState st) { String htmltext = NO_QUEST_DIALOG; int npcId = npc.getNpcId(); int cond = st.getCond(); if(npcId == 30838) { QuestState fwear = st.getPlayer().getQuestState(37); if(cond == 0 && st.getQuestItemsCount(DRESS_SHOES_BOX) == 0 && fwear != null && fwear.isStarted()) htmltext = "30838-0.htm"; else if(cond == 1) htmltext = "30838-1.htm"; else if(cond == 2) htmltext = "30838-2.htm"; else if(cond == 3 && st.getQuestItemsCount(LEATHER) >= 360 && st.getQuestItemsCount(GEM_FOR_ACC) >= 90 && st.getQuestItemsCount(ADENA_ID) >= 500000) htmltext = "30838-4.htm"; else if(cond == 3 && (st.getQuestItemsCount(LEATHER) < 360 || st.getQuestItemsCount(GEM_FOR_ACC) < 90 || st.getQuestItemsCount(ADENA_ID) < 500000)) htmltext = "30838-4r.htm"; else if(cond == 4) htmltext = "30838-5r.htm"; else if(cond == 5) htmltext = "30838-6.htm"; } else if(npcId == 31520) { if(cond == 1) htmltext = "31520-0.htm"; else if(cond == 2) htmltext = "31520-1r.htm"; } else if(npcId == 30164) if(cond == 4) htmltext = "30164-0.htm"; else if(cond == 5) htmltext = "30164-2.htm"; return htmltext; } }
[ "As69839314" ]
As69839314
eaec568ed45d07e2397b00c89255aef956396087
6cfab0fcbfdf8b36d6ea01003867163b17579f4a
/collector/JH-Collector/src/main/java/com/jh/collector/mapping/CalibrationInfoMapper.java
e201f565b79255104a953323e3c1a4a5f08dcdef
[]
no_license
Fairy008/JiaHeDC
ac5ed60ae3db608d8656957ce0b0364c2253e51b
bf31ffe8f452f33d2554dd587770467cecd994ee
refs/heads/master
2020-12-27T13:42:30.153810
2020-02-02T10:28:31
2020-02-02T10:28:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
976
java
package com.jh.collector.mapping; import com.jh.collector.entity.CalibrationInfo; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Component; import java.util.List; @Mapper @Component public interface CalibrationInfoMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table is_calibration_info * * @mbggenerated */ int insert(CalibrationInfo record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table is_calibration_info * * @mbggenerated */ int insertSelective(CalibrationInfo record); void updateInfoById(CalibrationInfo calibrationInfo); /** * 根据条件返回多个地块信息 * @param calibrationInfo * xzg 2019/7/31 14:27 * @return */ List<CalibrationInfo> selectCalibrationInfoList(CalibrationInfo calibrationInfo); }
[ "fanglei613@hotmail.com" ]
fanglei613@hotmail.com
b51b1c3755551b01bb1aa357ff4f1bcfc2385f70
dbfef24b8e48968baa87dcd2d8d94af6c9821d98
/lynx-api/src/com/dikshatech/portal/dao/LoanEligibilityCriteriaDao.java
b27625187f29c3ad7e9f1b4a2452a226021fb1cd
[]
no_license
sudheer999/vijay-gradle
7ab62da1b41120b48ab5c8f06f3e3be5c4a5530e
c03d167319ec915c3eb25e394761682144e1e3b3
refs/heads/master
2021-04-26T23:02:03.684417
2018-03-02T11:03:07
2018-03-02T11:03:07
123,918,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,965
java
/* * This source file was generated by FireStorm/DAO. * * If you purchase a full license for FireStorm/DAO you can customize this header file. * * For more information please visit http://www.codefutures.com/products/firestorm */ package com.dikshatech.portal.dao; import com.dikshatech.portal.dto.*; import com.dikshatech.portal.exceptions.*; public interface LoanEligibilityCriteriaDao { /** * Inserts a new row in the LOAN_ELIGIBILITY_CRITERIA table. */ public LoanEligibilityCriteriaPk insert(LoanEligibilityCriteria dto) throws LoanEligibilityCriteriaDaoException; /** * Updates a single row in the LOAN_ELIGIBILITY_CRITERIA table. */ public void update(LoanEligibilityCriteriaPk pk, LoanEligibilityCriteria dto) throws LoanEligibilityCriteriaDaoException; /** * Deletes a single row in the LOAN_ELIGIBILITY_CRITERIA table. */ public void delete(LoanEligibilityCriteriaPk pk) throws LoanEligibilityCriteriaDaoException; /** * Returns the rows from the LOAN_ELIGIBILITY_CRITERIA table that matches the specified primary-key value. */ public LoanEligibilityCriteria findByPrimaryKey(LoanEligibilityCriteriaPk pk) throws LoanEligibilityCriteriaDaoException; /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the criteria 'ID = :id'. */ public LoanEligibilityCriteria findByPrimaryKey(int id) throws LoanEligibilityCriteriaDaoException; /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the criteria ''. */ public LoanEligibilityCriteria[] findAll() throws LoanEligibilityCriteriaDaoException; /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the criteria 'TYPE_ID = :typeId'. */ public LoanEligibilityCriteria[] findByLoanType(int typeId) throws LoanEligibilityCriteriaDaoException; /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the criteria 'ID = :id'. */ public LoanEligibilityCriteria[] findWhereIdEquals(int id) throws LoanEligibilityCriteriaDaoException; /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the criteria 'LABEL = :label'. */ public LoanEligibilityCriteria[] findWhereLabelEquals(String label) throws LoanEligibilityCriteriaDaoException; /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the criteria 'ELIGIBILITY_AMOUNT = :eligibilityAmount'. */ public LoanEligibilityCriteria[] findWhereEligibilityAmountEquals(String eligibilityAmount) throws LoanEligibilityCriteriaDaoException; /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the criteria 'EMI_ELIGIBILITY = :emiEligibility'. */ public LoanEligibilityCriteria[] findWhereEmiEligibilityEquals(int emiEligibility) throws LoanEligibilityCriteriaDaoException; /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the criteria 'MAX_AMOUNT_LIMIT = :maxAmountLimit'. */ public LoanEligibilityCriteria[] findWhereMaxAmountLimitEquals(double maxAmountLimit) throws LoanEligibilityCriteriaDaoException; /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the criteria 'TYPE_ID = :typeId'. */ public LoanEligibilityCriteria[] findWhereTypeIdEquals(int typeId) throws LoanEligibilityCriteriaDaoException; /** * Sets the value of maxRows */ public void setMaxRows(int maxRows); /** * Gets the value of maxRows */ public int getMaxRows(); /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the specified arbitrary SQL statement */ public LoanEligibilityCriteria[] findByDynamicSelect(String sql, Object[] sqlParams) throws LoanEligibilityCriteriaDaoException; /** * Returns all rows from the LOAN_ELIGIBILITY_CRITERIA table that match the specified arbitrary SQL statement */ public LoanEligibilityCriteria[] findByDynamicWhere(String sql, Object[] sqlParams) throws LoanEligibilityCriteriaDaoException; }
[ "sudheer.tsm9@gmail.com" ]
sudheer.tsm9@gmail.com
59ed04b921ee0099ddf639e7eb0f82582d64a5b2
6d3fccfe86c0fe4d92632f1d6992990ddc31a05c
/hsweb-easy-orm-rdb/src/main/java/org/hswebframework/ezorm/rdb/mapping/defaults/DefaultReactiveQuery.java
7a864a62a59b4a330b0dd6b66c5bca817c4402c0
[]
no_license
MethodLevelAnalyzer/hsweb-easy-orm
7f81cc218f0a7c14c09861a1bd8946e13e42be1f
31659eaac403423bffbd021868e4786e21cd8050
refs/heads/master
2023-05-14T21:33:30.015536
2021-06-08T08:45:56
2021-06-08T08:45:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,842
java
package org.hswebframework.ezorm.rdb.mapping.defaults; import org.hswebframework.ezorm.rdb.events.ContextKeyValue; import org.hswebframework.ezorm.rdb.executor.wrapper.ResultWrapper; import org.hswebframework.ezorm.rdb.mapping.EntityColumnMapping; import org.hswebframework.ezorm.rdb.mapping.ReactiveQuery; import org.hswebframework.ezorm.rdb.mapping.events.EventSupportWrapper; import org.hswebframework.ezorm.rdb.mapping.events.MappingEventTypes; import org.hswebframework.ezorm.rdb.metadata.TableOrViewMetadata; import org.hswebframework.ezorm.rdb.operator.DMLOperator; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import static org.hswebframework.ezorm.rdb.events.ContextKeys.source; import static org.hswebframework.ezorm.rdb.events.ContextKeys.tableMetadata; import static org.hswebframework.ezorm.rdb.executor.wrapper.ResultWrappers.*; import static org.hswebframework.ezorm.rdb.mapping.events.EventSupportWrapper.*; import static org.hswebframework.ezorm.rdb.mapping.events.MappingContextKeys.*; import static org.hswebframework.ezorm.rdb.mapping.events.MappingContextKeys.type; import static org.hswebframework.ezorm.rdb.operator.dml.query.Selects.count1; public class DefaultReactiveQuery<T> extends DefaultQuery<T, ReactiveQuery<T>> implements ReactiveQuery<T> { public DefaultReactiveQuery(TableOrViewMetadata tableMetadata, EntityColumnMapping mapping, DMLOperator operator, ResultWrapper<T, ?> wrapper, ContextKeyValue<?>... keyValues) { super(tableMetadata, mapping, operator, wrapper,keyValues); } @Override public Flux<T> fetch() { return operator .query(tableMetadata) .select(getSelectColumn()) .where(param.getTerms()) .orderBy(getSortOrder()) .when(param.isPaging(), query -> query.paging(param.getPageIndex(), param.getPageSize())) .accept(queryOperator -> tableMetadata.fireEvent(MappingEventTypes.select_before, eventContext -> eventContext.set( source(DefaultReactiveQuery.this), query(queryOperator), tableMetadata(tableMetadata), dml(operator), executorType("reactive"), type("fetch") ))) .fetch(eventWrapper(tableMetadata, wrapper, executorType("reactive"), type("fetch"))) .reactive(); } @Override public Mono<T> fetchOne() { return operator .query(tableMetadata) .select(getSelectColumn()) .where(param.getTerms()) .orderBy(getSortOrder()) .paging(0, 1) .accept(queryOperator -> tableMetadata.fireEvent(MappingEventTypes.select_before, eventContext -> eventContext.set( source(DefaultReactiveQuery.this), query(queryOperator), dml(operator), tableMetadata(tableMetadata), executorType("reactive"), type("fetchOne") ))) .fetch(eventWrapper(tableMetadata, wrapper, executorType("reactive"), type("fetchOne"))) .reactive() .as(Mono::from); } @Override public Mono<Integer> count() { return operator .query(tableMetadata) .select(count1().as("total")) .where(param.getTerms()) .accept(queryOperator -> tableMetadata.fireEvent(MappingEventTypes.select_before, eventContext -> eventContext.set( source(DefaultReactiveQuery.this), query(queryOperator), dml(operator), tableMetadata(tableMetadata), executorType("reactive"), type("count") ))) .fetch(column("total", Number.class::cast)) .reactive() .map(Number::intValue) .reduce(Math::addExact) .switchIfEmpty(Mono.just(0)); } }
[ "admin@hsweb.me" ]
admin@hsweb.me
c8d93a386444e8a19af5f0d7384c250ac69fbe22
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/ta/audid/db/SqliteHelper.java
0238c0ad5649c62606fbf0b8e450c30e84c21330
[]
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
6,815
java
package com.ta.audid.db; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import com.alipay.mobile.common.transport.monitor.RPCDataItems; import com.ta.audid.utils.UtdidLogger; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicInteger; public class SqliteHelper extends SQLiteOpenHelper { private static final int DATABASE_VERSION = 2; private DelayCloseDbTask mCloseDbTask = new DelayCloseDbTask(); /* access modifiers changed from: private */ public AtomicInteger mWritableCounter = new AtomicInteger(); /* access modifiers changed from: private */ public SQLiteDatabase mWritableDatabase; private Future<?> mcloseFuture; class DelayCloseDbTask implements Runnable { DelayCloseDbTask() { } public void run() { synchronized (SqliteHelper.this) { if (SqliteHelper.this.mWritableCounter.get() == 0 && SqliteHelper.this.mWritableDatabase != null) { SqliteHelper.this.mWritableDatabase.close(); SqliteHelper.this.mWritableDatabase = null; } } } } public void onCreate(SQLiteDatabase sQLiteDatabase) { } public void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) { } public SqliteHelper(Context context, String str) { super(context, str, null, 2); } /* JADX WARNING: type inference failed for: r0v0, types: [java.lang.String[], android.database.Cursor] */ /* JADX WARNING: Multi-variable type inference failed. Error: jadx.core.utils.exceptions.JadxRuntimeException: No candidate types for var: r0v0, types: [java.lang.String[], android.database.Cursor] assigns: [?[int, float, boolean, short, byte, char, OBJECT, ARRAY]] uses: [android.database.Cursor, java.lang.String[]] mth insns count: 10 at jadx.core.dex.visitors.typeinference.TypeSearch.fillTypeCandidates(TypeSearch.java:237) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.dex.visitors.typeinference.TypeSearch.run(TypeSearch.java:53) at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runMultiVariableSearch(TypeInferenceVisitor.java:104) at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:97) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:27) at jadx.core.dex.visitors.DepthTraversal.lambda$visit$1(DepthTraversal.java:14) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14) at jadx.core.ProcessClass.process(ProcessClass.java:30) at jadx.core.ProcessClass.lambda$processDependencies$0(ProcessClass.java:49) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:49) at jadx.core.ProcessClass.process(ProcessClass.java:35) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:217) */ /* Code decompiled incorrectly, please refer to instructions dump. */ public void onOpen(android.database.sqlite.SQLiteDatabase r3) { /* r2 = this; r0 = 0 java.lang.String r1 = "PRAGMA journal_mode=DELETE" android.database.Cursor r1 = r3.rawQuery(r1, r0) // Catch:{ Throwable -> 0x0010, all -> 0x000b } r2.closeCursor(r1) goto L_0x0013 L_0x000b: r3 = move-exception r2.closeCursor(r0) throw r3 L_0x0010: r2.closeCursor(r0) L_0x0013: super.onOpen(r3) return */ throw new UnsupportedOperationException("Method not decompiled: com.ta.audid.db.SqliteHelper.onOpen(android.database.sqlite.SQLiteDatabase):void"); } public synchronized SQLiteDatabase getWritableDatabase() { try { if (this.mWritableDatabase == null) { this.mWritableDatabase = super.getWritableDatabase(); } this.mWritableCounter.incrementAndGet(); } catch (Throwable th) { UtdidLogger.w(RPCDataItems.SWITCH_TAG_LOG, "e", th); } return this.mWritableDatabase; } /* JADX WARNING: Code restructure failed: missing block: B:12:0x0027, code lost: return; */ /* Code decompiled incorrectly, please refer to instructions dump. */ public synchronized void closeWritableDatabase(android.database.sqlite.SQLiteDatabase r5) { /* r4 = this; monitor-enter(r4) if (r5 != 0) goto L_0x0005 monitor-exit(r4) return L_0x0005: java.util.concurrent.atomic.AtomicInteger r5 = r4.mWritableCounter // Catch:{ Throwable -> 0x002b, all -> 0x0028 } int r5 = r5.decrementAndGet() // Catch:{ Throwable -> 0x002b, all -> 0x0028 } if (r5 != 0) goto L_0x0026 java.util.concurrent.Future<?> r5 = r4.mcloseFuture // Catch:{ Throwable -> 0x002b, all -> 0x0028 } if (r5 == 0) goto L_0x0017 java.util.concurrent.Future<?> r5 = r4.mcloseFuture // Catch:{ Throwable -> 0x002b, all -> 0x0028 } r0 = 0 r5.cancel(r0) // Catch:{ Throwable -> 0x002b, all -> 0x0028 } L_0x0017: com.ta.audid.utils.TaskExecutor r5 = com.ta.audid.utils.TaskExecutor.getInstance() // Catch:{ Throwable -> 0x002b, all -> 0x0028 } r0 = 0 com.ta.audid.db.SqliteHelper$DelayCloseDbTask r1 = r4.mCloseDbTask // Catch:{ Throwable -> 0x002b, all -> 0x0028 } r2 = 30000(0x7530, double:1.4822E-319) java.util.concurrent.ScheduledFuture r5 = r5.schedule(r0, r1, r2) // Catch:{ Throwable -> 0x002b, all -> 0x0028 } r4.mcloseFuture = r5 // Catch:{ Throwable -> 0x002b, all -> 0x0028 } L_0x0026: monitor-exit(r4) return L_0x0028: r5 = move-exception monitor-exit(r4) throw r5 L_0x002b: monitor-exit(r4) return */ throw new UnsupportedOperationException("Method not decompiled: com.ta.audid.db.SqliteHelper.closeWritableDatabase(android.database.sqlite.SQLiteDatabase):void"); } public void closeCursor(Cursor cursor) { if (cursor != null) { try { cursor.close(); } catch (Throwable unused) { } } } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
0d0d5abf0f6ef08b18f11676c806cf4390199989
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a044/A044128Test.java
22b13e02bd3fe0f99f35632b7d24d8cd5d4c563b
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a044; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A044128Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
866f0c84d5e6c717d46ec5501db490b739d279cc
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/net/lingala/zip4j/headers/VersionNeededToExtract.java
1aa9d17998bf66e25c2b2349fad200509b59375b
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
327
java
package net.lingala.zip4j.headers; public enum VersionNeededToExtract { DEFAULT(10), DEFLATE_COMPRESSED(20), ZIP_64_FORMAT(45), AES_ENCRYPTED(51); private int code; private VersionNeededToExtract(int i) { this.code = i; } public int getCode() { return this.code; } }
[ "test@gmail.com" ]
test@gmail.com
dc64add0e367138cd32949196ee7cb29941e99c0
7480717e8866db20d8738742630b1733410d6d2b
/ApacheDatasets/PIG-0.9.0/pig-0.8.1/test/org/apache/pig/test/TestExampleGenerator.java
2dee27b5674c5b7c829affb124ab11092bd7993a
[ "Apache-2.0" ]
permissive
abcdefghiklk/SeekChanges
600ecffeceedbc2caf1672fc7bb553e37b00131a
82103108425f22e2b535f43e424c23dbdea3b6f2
refs/heads/master
2020-04-06T07:02:43.703757
2016-08-17T10:43:59
2016-08-17T10:43:59
57,231,049
1
1
null
null
null
null
UTF-8
Java
false
false
6,169
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.pig.test; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.Map; import java.util.Random; import junit.framework.TestCase; import org.apache.pig.ExecType; import org.apache.pig.PigServer; import org.apache.pig.backend.executionengine.ExecException; import org.apache.pig.data.DataBag; import org.apache.pig.impl.PigContext; import org.apache.pig.impl.io.FileLocalizer; import org.apache.pig.impl.logicalLayer.LogicalOperator; import org.junit.AfterClass; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public class TestExampleGenerator extends TestCase { static MiniCluster cluster = MiniCluster.buildCluster(); PigContext pigContext = new PigContext(ExecType.MAPREDUCE, cluster .getProperties()); Random rand = new Random(); int MAX = 100; String A, B; { try { pigContext.connect(); } catch (ExecException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Before public void setUp() throws Exception { File fileA, fileB; fileA = File.createTempFile("dataA", ".dat"); fileB = File.createTempFile("dataB", ".dat"); writeData(fileA); writeData(fileB); A = "'" + FileLocalizer.hadoopify(fileA.toString(), pigContext) + "'"; B = "'" + FileLocalizer.hadoopify(fileB.toString(), pigContext) + "'"; System.out.println("A : " + A + "\n" + "B : " + B); System.out.println("Test data created."); fileA.deleteOnExit(); fileB.deleteOnExit(); } @AfterClass public static void oneTimeTearDown() throws Exception { cluster.shutDown(); } private void writeData(File dataFile) throws Exception { // File dataFile = File.createTempFile(name, ".dat"); FileOutputStream dat = new FileOutputStream(dataFile); Random rand = new Random(); for (int i = 0; i < MAX; i++) dat.write((rand.nextInt(10) + "\t" + rand.nextInt(10) + "\n") .getBytes()); dat.close(); } @Test public void testFilter() throws Exception { PigServer pigserver = new PigServer(pigContext); String query = "A = load " + A + " using PigStorage() as (x : int, y : int);\n"; pigserver.registerQuery(query); query = "B = filter A by x > 10;"; pigserver.registerQuery(query); Map<LogicalOperator, DataBag> derivedData = pigserver.getExamples("B"); assertTrue(derivedData != null); } @Test public void testForeach() throws ExecException, IOException { PigServer pigServer = new PigServer(pigContext); pigServer.registerQuery("A = load " + A + " using PigStorage() as (x : int, y : int);"); pigServer.registerQuery("B = foreach A generate x + y as sum;"); Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("B"); assertTrue(derivedData != null); } @Test public void testJoin() throws IOException, ExecException { PigServer pigServer = new PigServer(pigContext); pigServer.registerQuery("A1 = load " + A + " as (x, y);"); pigServer.registerQuery("B1 = load " + B + " as (x, y);"); pigServer.registerQuery("E = join A1 by x, B1 by x;"); Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("E"); assertTrue(derivedData != null); } @Test public void testCogroupMultipleCols() throws Exception { PigServer pigServer = new PigServer(pigContext); pigServer.registerQuery("A = load " + A + " as (x, y);"); pigServer.registerQuery("B = load " + B + " as (x, y);"); pigServer.registerQuery("C = cogroup A by (x, y), B by (x, y);"); Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("C"); assertTrue(derivedData != null); } @Test public void testCogroup() throws Exception { PigServer pigServer = new PigServer(pigContext); pigServer.registerQuery("A = load " + A + " as (x, y);"); pigServer.registerQuery("B = load " + B + " as (x, y);"); pigServer.registerQuery("C = cogroup A by x, B by x;"); Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("C"); assertTrue(derivedData != null); } @Test public void testGroup() throws Exception { PigServer pigServer = new PigServer(pigContext); pigServer.registerQuery("A = load " + A.toString() + " as (x, y);"); pigServer.registerQuery("B = group A by x;"); Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("B"); assertTrue(derivedData != null); } @Test public void testUnion() throws Exception { PigServer pigServer = new PigServer(pigContext); pigServer.registerQuery("A = load " + A.toString() + " as (x, y);"); pigServer.registerQuery("B = load " + B.toString() + " as (x, y);"); pigServer.registerQuery("C = union A, B;"); Map<LogicalOperator, DataBag> derivedData = pigServer.getExamples("C"); assertTrue(derivedData != null); } }
[ "Qiuchi.Li@open.ac.uk" ]
Qiuchi.Li@open.ac.uk
6768e9c407410bef1be41d39e413228b840bb96b
a464211147d0fd47d2be533a5f0ced0da88f75f9
/EvoSuiteTests/evosuite_3/evosuite-tests/org/mozilla/javascript/NativeJavaClass_ESTest.java
34ae5ce9b5d3875d7e8a97af1fb4527e96f6b1fb
[ "MIT" ]
permissive
LASER-UMASS/Swami
63016a6eccf89e4e74ca0ab775e2ef2817b83330
5bdba2b06ccfad9d469f8122c2d39c45ef5b125f
refs/heads/master
2022-05-19T12:22:10.166574
2022-05-12T13:59:18
2022-05-12T13:59:18
170,765,693
11
5
NOASSERTION
2022-05-12T13:59:19
2019-02-14T22:16:01
HTML
UTF-8
Java
false
false
6,263
java
/* * This file was automatically generated by EvoSuite * Wed Aug 01 22:00:47 GMT 2018 */ package org.mozilla.javascript; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.mozilla.javascript.BaseFunction; import org.mozilla.javascript.Context; import org.mozilla.javascript.ContextFactory; import org.mozilla.javascript.Delegator; import org.mozilla.javascript.ImporterTopLevel; import org.mozilla.javascript.NativeArray; import org.mozilla.javascript.NativeJavaClass; import org.mozilla.javascript.NativeJavaObject; import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.TopLevel; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class NativeJavaClass_ESTest extends NativeJavaClass_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { Context context0 = Context.enter(); ImporterTopLevel importerTopLevel0 = new ImporterTopLevel(context0, true); TopLevel.Builtins topLevel_Builtins0 = TopLevel.Builtins.Object; BaseFunction baseFunction0 = importerTopLevel0.getBuiltinCtor(topLevel_Builtins0); Class<Delegator> class0 = Delegator.class; NativeJavaClass nativeJavaClass0 = new NativeJavaClass(baseFunction0, class0, true); boolean boolean0 = nativeJavaClass0.has("error reporter", (Scriptable) baseFunction0); assertFalse(boolean0); } @Test(timeout = 4000) public void test1() throws Throwable { NativeJavaClass nativeJavaClass0 = new NativeJavaClass(); // Undeclared exception! try { nativeJavaClass0.getIds(); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.mozilla.javascript.NativeJavaClass", e); } } @Test(timeout = 4000) public void test2() throws Throwable { NativeJavaClass nativeJavaClass0 = new NativeJavaClass(); Class<Delegator> class0 = Delegator.class; Object object0 = nativeJavaClass0.getDefaultValue(class0); assertSame(object0, nativeJavaClass0); } @Test(timeout = 4000) public void test3() throws Throwable { NativeJavaClass nativeJavaClass0 = new NativeJavaClass(); double double0 = Context.toNumber(nativeJavaClass0); assertEquals(Double.NaN, double0, 0.01); } @Test(timeout = 4000) public void test4() throws Throwable { NativeJavaClass nativeJavaClass0 = new NativeJavaClass(); // Undeclared exception! try { nativeJavaClass0.getDefaultValue((Class<?>) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.mozilla.javascript.NativeJavaClass", e); } } @Test(timeout = 4000) public void test5() throws Throwable { Context context0 = Context.enter(); ImporterTopLevel importerTopLevel0 = new ImporterTopLevel(context0, true); TopLevel.Builtins topLevel_Builtins0 = TopLevel.Builtins.Object; BaseFunction baseFunction0 = importerTopLevel0.getBuiltinCtor(topLevel_Builtins0); Class<Delegator> class0 = Delegator.class; NativeJavaClass nativeJavaClass0 = new NativeJavaClass(baseFunction0, class0, true); NativeArray nativeArray0 = null; try { nativeArray0 = new NativeArray(context0.emptyArgs); // fail("Expecting exception: NullPointerException"); // Unstable assertion } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.mozilla.javascript.NativeArray", e); } } @Test(timeout = 4000) public void test6() throws Throwable { ContextFactory contextFactory0 = ContextFactory.getGlobal(); Context context0 = contextFactory0.enterContext(); ImporterTopLevel importerTopLevel0 = new ImporterTopLevel(context0); TopLevel.NativeErrors topLevel_NativeErrors0 = TopLevel.NativeErrors.ReferenceError; BaseFunction baseFunction0 = importerTopLevel0.getNativeErrorCtor(topLevel_NativeErrors0); Class<String> class0 = String.class; NativeJavaClass nativeJavaClass0 = new NativeJavaClass(baseFunction0, class0); // Undeclared exception! try { nativeJavaClass0.get("error reporter", (Scriptable) baseFunction0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Java class \"java.lang.String\" has no public instance field or method named \"error reporter\". // verifyException("org.mozilla.javascript.DefaultErrorReporter", e); } } @Test(timeout = 4000) public void test7() throws Throwable { ContextFactory contextFactory0 = ContextFactory.getGlobal(); Context context0 = contextFactory0.enterContext(); ImporterTopLevel importerTopLevel0 = new ImporterTopLevel(context0); TopLevel.NativeErrors topLevel_NativeErrors0 = TopLevel.NativeErrors.ReferenceError; BaseFunction baseFunction0 = importerTopLevel0.getNativeErrorCtor(topLevel_NativeErrors0); Class<String> class0 = String.class; NativeJavaClass nativeJavaClass0 = new NativeJavaClass(baseFunction0, class0); Object[] objectArray0 = new Object[1]; objectArray0[0] = (Object) nativeJavaClass0; NativeJavaObject nativeJavaObject0 = (NativeJavaObject)nativeJavaClass0.call(context0, nativeJavaClass0, nativeJavaClass0, objectArray0); assertEquals("JavaObject", nativeJavaObject0.getClassName()); } @Test(timeout = 4000) public void test8() throws Throwable { NativeJavaClass nativeJavaClass0 = new NativeJavaClass(); String string0 = nativeJavaClass0.getClassName(); assertEquals("JavaClass", string0); } }
[ "mmotwani@cs.umass.edu" ]
mmotwani@cs.umass.edu
de61115778ad9d4b9b717c3a6307981442de2aa2
7195a8f1125c55d42c5b6fb0a820ca055583031a
/modules/andes-core/common/src/main/java/org/wso2/andes/messaging/util/Lexicon.java
cc94d819d30c365e5e6a30c7f16ae41194197e0f
[ "Apache-2.0" ]
permissive
wso2/andes
355d3a3b94ee376ae1bef01871216925199f9065
85434f648e56ce5f88cd5abcc6db738edce90af9
refs/heads/master
2023-08-16T09:55:41.020956
2023-06-07T08:40:22
2023-06-07T08:40:22
20,559,270
38
124
Apache-2.0
2023-06-07T07:07:35
2014-06-06T10:04:24
Java
UTF-8
Java
false
false
2,619
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.wso2.andes.messaging.util; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; /** * Lexicon * */ public class Lexicon { private List<Token.Type> types; private Token.Type eof; public Lexicon() { this.types = new ArrayList<Token.Type>(); this.eof = null; } public Token.Type define(String name, String pattern) { Token.Type t = new Token.Type(name, pattern); types.add(t); return t; } public Token.Type eof(String name) { Token.Type t = new Token.Type(name, null); eof = t; return t; } public Lexer compile() { StringBuilder joined = new StringBuilder(); for (Token.Type t : types) { if (joined.length() > 0) { joined.append('|'); } joined.append('(').append(t.getPattern()).append(')'); } Pattern rexp = Pattern.compile(joined.toString()); return new Lexer(new ArrayList<Token.Type>(types), eof, rexp); } public static final void main(String[] args) { StringBuilder input = new StringBuilder(); for (String a : args) { if (input.length() > 0) { input.append(" "); } input.append(a); } Lexicon lxi = new Lexicon(); lxi.define("FOR", "for"); lxi.define("IF", "if"); lxi.define("LPAREN", "\\("); lxi.define("RPAREN", "\\)"); lxi.define("ID", "[\\S]+"); lxi.define("WSPACE", "[\\s]+"); lxi.eof("EOF"); Lexer lx = lxi.compile(); for (Token t : lx.lex(input.toString())) { System.out.println(t); } } }
[ "shammi@Shammis-MacBook-Pro.local" ]
shammi@Shammis-MacBook-Pro.local
d389a930036dbab2c7d9f4aabc97cb266b8c3a67
29b6a856a81a47ebab7bfdba7fe8a7b845123c9e
/dingtalk/java/src/main/java/com/aliyun/dingtalkdatacenter_1_0/models/GetAdministrativeLicensingRequest.java
8930eb425ec897350f55586f6ec4dda1279f86f2
[ "Apache-2.0" ]
permissive
aliyun/dingtalk-sdk
f2362b6963c4dbacd82a83eeebc223c21f143beb
586874df48466d968adf0441b3086a2841892935
refs/heads/master
2023-08-31T08:21:14.042410
2023-08-30T08:18:22
2023-08-30T08:18:22
290,671,707
22
9
null
2021-08-12T09:55:44
2020-08-27T04:05:39
PHP
UTF-8
Java
false
false
1,268
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.dingtalkdatacenter_1_0.models; import com.aliyun.tea.*; public class GetAdministrativeLicensingRequest extends TeaModel { @NameInMap("pageNumber") public Integer pageNumber; @NameInMap("pageSize") public Integer pageSize; @NameInMap("searchKey") public String searchKey; public static GetAdministrativeLicensingRequest build(java.util.Map<String, ?> map) throws Exception { GetAdministrativeLicensingRequest self = new GetAdministrativeLicensingRequest(); return TeaModel.build(map, self); } public GetAdministrativeLicensingRequest setPageNumber(Integer pageNumber) { this.pageNumber = pageNumber; return this; } public Integer getPageNumber() { return this.pageNumber; } public GetAdministrativeLicensingRequest setPageSize(Integer pageSize) { this.pageSize = pageSize; return this; } public Integer getPageSize() { return this.pageSize; } public GetAdministrativeLicensingRequest setSearchKey(String searchKey) { this.searchKey = searchKey; return this; } public String getSearchKey() { return this.searchKey; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
da5211cf697d5935d226cae842f687d63a034316
034dd8550e48d4b7dfd26fae7bbbfe25a23706d0
/subprojects/lensFlare/src/water/WaterRenderer.java
560feeaa3c0ef9c221cc30ed2ab98ada1c2a03b4
[]
no_license
dtrajko/lwjgl_game
3182a970fc542dc1fb1e606f7c72349d8934e354
91e7e01930f411af3ddc545ce742c6eebf2f5d95
refs/heads/master
2021-05-12T03:02:43.863050
2020-05-01T23:36:35
2020-05-01T23:36:35
117,606,702
1
0
null
null
null
null
UTF-8
Java
false
false
2,974
java
package water; import java.util.List; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL13; import org.lwjgl.util.vector.Matrix4f; import org.lwjgl.util.vector.Vector3f; import openglObjects.Vao; import textures.Texture; import utils.ICamera; import utils.MyFile; import utils.OpenGlUtils; public class WaterRenderer { private static final MyFile DUDV_MAP = new MyFile("res", "waterDUDV.png"); private static final MyFile NORMAL_MAP = new MyFile("res", "normal.png"); // private static final float WAVE_SPEED = 0.03f; private Vao quad; private WaterShader shader; private WaterFrameBuffers fbos; private float moveFactor = 0; private Texture dudvTexture; private Texture normalMap; public WaterRenderer(WaterFrameBuffers fbos) { this.shader = new WaterShader(); this.fbos = fbos; this.quad = QuadGenerator.generateQuad(); this.normalMap = Texture.newTexture(NORMAL_MAP).create(); this.dudvTexture = Texture.newTexture(DUDV_MAP).anisotropic().create(); } public void render(List<WaterTile> water, ICamera camera, Vector3f lightDir) { prepareRender(camera, lightDir); for (WaterTile tile : water) { Matrix4f modelMatrix = createModelMatrix(tile.getX(), tile.getHeight(), tile.getZ(), WaterTile.TILE_SIZE); shader.modelMatrix.loadMatrix(modelMatrix); GL11.glDrawElements(GL11.GL_TRIANGLES, quad.getIndexCount(), GL11.GL_UNSIGNED_INT, 0); } finish(); } public void cleanUp() { quad.delete(); dudvTexture.delete(); normalMap.delete(); fbos.cleanUp(); shader.cleanUp(); } private void prepareRender(ICamera camera, Vector3f lightDir) { shader.start(); shader.projectionMatrix.loadMatrix(camera.getProjectionMatrix()); shader.viewMatrix.loadMatrix(camera.getViewMatrix()); shader.cameraPosition.loadVec3(camera.getPosition()); moveFactor += 0.0005f; moveFactor %= 1; shader.moveFactor.loadFloat(moveFactor); shader.lightDirection.loadVec3(lightDir); quad.bind(0); bindTextures(); doRenderSettings(); } private void bindTextures() { GL13.glActiveTexture(GL13.GL_TEXTURE0); GL11.glBindTexture(GL11.GL_TEXTURE_2D, fbos.getReflectionTexture()); GL13.glActiveTexture(GL13.GL_TEXTURE1); GL11.glBindTexture(GL11.GL_TEXTURE_2D, fbos.getRefractionTexture()); dudvTexture.bindToUnit(2); normalMap.bindToUnit(3); GL13.glActiveTexture(GL13.GL_TEXTURE4); GL11.glBindTexture(GL11.GL_TEXTURE_2D, fbos.getRefractionDepthTexture()); } private void doRenderSettings() { OpenGlUtils.enableDepthTesting(true); OpenGlUtils.antialias(false); OpenGlUtils.cullBackFaces(true); OpenGlUtils.enableAlphaBlending(); } private void finish() { quad.unbind(0); shader.stop(); } private Matrix4f createModelMatrix(float x, float y, float z, float scale) { Matrix4f modelMatrix = new Matrix4f(); Matrix4f.translate(new Vector3f(x, y, z), modelMatrix, modelMatrix); Matrix4f.scale(new Vector3f(scale, scale, scale), modelMatrix, modelMatrix); return modelMatrix; } }
[ "dtrajko@gmail.com" ]
dtrajko@gmail.com
4ff04c000b955680c96ba513d33ab8ef85de0628
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_4e41553096ed8825e7d1ce4b0a0a6bdb6699cddc/SVTableModel/14_4e41553096ed8825e7d1ce4b0a0a6bdb6699cddc_SVTableModel_s.java
9a125a744cb9dc31e328bbaccc2fe4fece2a39dd
[]
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
4,012
java
/* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache POI" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Apache POI", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.poi.hssf.contrib.view; import java.util.Iterator; import javax.swing.table.*; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFCell; /** * Sucky Viewer Table Model - The model for the Sucky Viewer just overrides things. * @author Andrew C. Oliver */ public class SVTableModel extends AbstractTableModel { private HSSFSheet st = null; int maxcol = 0; public SVTableModel(HSSFSheet st, int maxcol) { this.st = st; this.maxcol=maxcol; } public SVTableModel(HSSFSheet st) { this.st = st; Iterator i = st.rowIterator(); while (i.hasNext()) { HSSFRow row = (HSSFRow)i.next(); if (maxcol < (row.getLastCellNum()+1)) { this.maxcol = row.getLastCellNum(); } } } public int getColumnCount() { return this.maxcol+1; } public Object getValueAt(int row, int col) { HSSFRow r = st.getRow(row); HSSFCell c = null; if (r != null) { c = r.getCell((short)col); } return c; } public int getRowCount() { return st.getLastRowNum() + 1; } public Class getColumnClass(int c) { return getValueAt(0, c).getClass(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d85b05ebdbb32381b66516b09db6a4c9fae1e0ad
000c7ff03a7da1788bc596ce519751de515e846e
/greendaostudy/src/main/java/com/assassin/greendaostudy/app/GreenDaoApp.java
9a1a405241a6aa4554f68ce8b21fc6a68934ee44
[]
no_license
shaycormac/ShayPatrickCormacStudy
bd4faacd9d74781b3130f66590e6775cdf1fc099
4f4c685c45b079bc968a01c3bba4d60ffde4c856
refs/heads/master
2021-01-20T12:23:05.319732
2017-07-15T04:46:25
2017-07-15T04:46:25
90,359,265
0
0
null
null
null
null
UTF-8
Java
false
false
701
java
package com.assassin.greendaostudy.app; import android.app.Application; import com.assassin.greendaostudy.greendaohelper.DBManager; import com.facebook.stetho.Stetho; /** * @Author: Shay-Patrick-Cormac * @Email: fang47881@126.com * @Ltd: GoldMantis * @Date: 2017/5/2 13:42 * @Version: * @Description: */ public class GreenDaoApp extends Application { public static GreenDaoApp instance; @Override public void onCreate() { super.onCreate(); instance = this; // GreenDaoHelper.intDatabase(); //初始化数据库 DBManager.INSTANCE.initDataBase(); //facebook调试数据库 Stetho.initializeWithDefaults(this); } }
[ "574583006@qq.com" ]
574583006@qq.com
8a7a3ded885877d7965f9c5646bb17071b63c165
f0d25d83176909b18b9989e6fe34c414590c3599
/app/src/main/java/com/google/android/gms/internal/ya.java
b8f7773d374464f4623bd4ff40f817ef8ba5275b
[]
no_license
lycfr/lq
e8dd702263e6565486bea92f05cd93e45ef8defc
123914e7c0d45956184dc908e87f63870e46aa2e
refs/heads/master
2022-04-07T18:16:31.660038
2020-02-23T03:09:18
2020-02-23T03:09:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
578
java
package com.google.android.gms.internal; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CodingErrorAction; final class ya extends ThreadLocal<CharsetDecoder> { ya() { } /* access modifiers changed from: protected */ public final /* synthetic */ Object initialValue() { CharsetDecoder newDecoder = Charset.forName("UTF8").newDecoder(); newDecoder.onMalformedInput(CodingErrorAction.REPORT); newDecoder.onUnmappableCharacter(CodingErrorAction.REPORT); return newDecoder; } }
[ "quyenlm.vn@gmail.com" ]
quyenlm.vn@gmail.com
bc1245770467b73c29709477c7cf58f80fbfe264
47984d3b623e74e8029f3b8b7422893f1bfdfefa
/src/npc/Sugar.java
cc49d7f0744203b833e1c78809c0e8c4dfbdd017
[]
no_license
SetosanMs/MapleStory2
71467682165a85f6b31ee16aecce009847ee27d9
311bd8fa3f832f2a34dee41d43e7daf9766044a3
refs/heads/master
2022-12-10T00:44:55.389534
2020-08-26T15:22:17
2020-08-26T15:22:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
656
java
package npc; import java.io.Serializable; import map.MapleMap; import map.PointMapName; import map.UpdatedMapInfor; import maplestory.Player; public class Sugar extends Npc implements Serializable { private static final long serialVersionUID = 1L; public Sugar(String image, String name, PointMapName pointMapName) { super(image, name, pointMapName); } public void clearEvent(Player player) { } public void requestQuest(Player player) { } @Override public void normalEvent(Player player) { if(process == 25) { player.addUpdatedMap(new UpdatedMapInfor(new PointMapName(4, 9, "초보자의숲1"), MapleMap.MAP_PORTAL_STATE)); } } }
[ "hwasub1115@naver.com" ]
hwasub1115@naver.com
510f0f21dbfaad3dbf68d9fc980a0c09fbc6e1c6
752769cdbde5709ec894e46509ea26d072f63860
/jsf-demos/mservice/src/main/java/com/jsf/service/OrderRestService.java
c30595d7fa608a11b20fa82df0e1eedcd9a0a3f7
[ "BSD-3-Clause" ]
permissive
cjg208/JSF
dca375b472d16e2a7cb9ac56e939b63d60cc86cf
693041b6bb6a1b753d3be072c8ee7d879622e6b5
refs/heads/master
2023-01-01T08:39:47.925873
2020-10-27T08:35:08
2020-10-27T08:35:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,177
java
package com.jsf.service; import com.jsf.model.User; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; import java.util.Map; /** * Created with IntelliJ IDEA. * Description: Feign方式实现,自带负载均衡 * User: xujunfei * Date: 2018-02-27 * Time: 10:27 */ // 如果接入网关(目前默认使用nacos),FeignClient设置为nc-gateway @FeignClient(value = "ms-provider", fallback = OrderRestServiceHystrix.class) public interface OrderRestService { /** * 下单服务 * * @param userId * @param productId * @return */ @GetMapping("/order") String order(@RequestParam("userId") Integer userId, @RequestParam("productId") Integer productId); /** * GET请求多个参数 * * @param map * @return */ @GetMapping("/get") String get(@RequestParam Map<String, Object> map); /** * POST请求多个参数 * * @param user * @return */ @PostMapping("/post") String post(@RequestBody User user); @GetMapping("/getUserById/{id}") User getUserById(@PathVariable("id") Integer id); }
[ "809573150@qq.com" ]
809573150@qq.com
7eeb0a97e499e9f2cb3d9d59c9f8644417d4222b
12c766729bb082bf593578fa982981ef65c3fc9b
/SmartCity/src/sjtu/dclab/smartcity/ui/minzheng/CivilAffairHomeAty.java
7f415bb8bb85d39fe1844d5dccd908a7c3045e7c
[]
no_license
m122469119/smartcity-android
876ef5b64762ffe4562856d879d2426b88d1af17
a89d55f28bb18370ba54b96fc268adc5f0c34456
refs/heads/main
2021-06-08T22:00:25.097541
2015-09-28T03:06:17
2015-09-28T03:06:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,613
java
package sjtu.dclab.smartcity.ui.minzheng; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ImageButton; import android.widget.ListView; import android.widget.SimpleAdapter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import sjtu.dclab.smartcity.R; /** * Created by hp on 2015/7/30. */ public class CivilAffairHomeAty extends Activity implements View.OnClickListener { private ListView listView; private ImageButton ib1,ib2; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.civil_affair_home); ib1 = (ImageButton)findViewById(R.id.civil_left); ib1.setOnClickListener(this); ib2 = (ImageButton)findViewById(R.id.civil_right); this.ib2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setClass(CivilAffairHomeAty.this, CivilAffairEditAty.class); startActivity(intent); } }); listView = (ListView)findViewById(R.id.civil_affair_list); SimpleAdapter adapter = new SimpleAdapter(this,getData(), R.layout.image_listitem, new String[]{"title","info","img"}, new int[]{R.id.title, R.id.info, R.id.img}); listView.setAdapter(adapter); } private List<Map<String, Object>> getData(){ List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); Map<String, Object> map = new HashMap<String, Object>(); map.put("title", "高龄服务"); map.put("info", "example info..."); map.put("img", R.drawable.tmp_img); list.add(map); map = new HashMap<String, Object>(); map.put("title", "助残服务"); map.put("info", "example info..."); map.put("img", R.drawable.tmp_img); list.add(map); return list; } @Override public void onClick(View v) { switch (v.getId()) { case R.id.civil_left: CivilMenuWindow menuPopupWindow = new CivilMenuWindow(CivilAffairHomeAty.this); menuPopupWindow.showPopupWindow(ib1); break; default: break; } } }
[ "ernestyj@outlook.com" ]
ernestyj@outlook.com
2d461c41a568b67241a4b0e9a03f7e272ac49f26
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
/SQuirrel_SQL/rev4007-4212/base-branch-4007/test/src/net/sourceforge/squirrel_sql/fw/codereformat/AllTests.java
99d682f2ae20544a81f461f06c1489591be78330
[]
no_license
joliebig/featurehouse_fstmerge_examples
af1b963537839d13e834f829cf51f8ad5e6ffe76
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
refs/heads/master
2016-09-05T10:24:50.974902
2013-03-28T16:28:47
2013-03-28T16:28:47
9,080,611
3
2
null
null
null
null
UTF-8
Java
false
false
359
java
package net.sourceforge.squirrel_sql.fw.codereformat; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; public class AllTests extends TestCase { public static Test suite() { TestSuite suite = new TestSuite("SQL codereformat tests"); suite.addTestSuite(CodeReformatorTest.class); return suite; } }
[ "joliebig@fim.uni-passau.de" ]
joliebig@fim.uni-passau.de
1c7cbf825034995d487a68b00ef6e675714ea0d5
9208ba403c8902b1374444a895ef2438a029ed5c
/sources/com/google/android/gms/internal/cast/zzcm.java
b8aca1571bb8ffe2c1e932567fc14898f7f9fe74
[]
no_license
MewX/kantv-decompiled-v3.1.2
3e68b7046cebd8810e4f852601b1ee6a60d050a8
d70dfaedf66cdde267d99ad22d0089505a355aa1
refs/heads/main
2023-02-27T05:32:32.517948
2021-02-02T13:38:05
2021-02-02T13:44:31
335,299,807
0
0
null
null
null
null
UTF-8
Java
false
false
1,254
java
package com.google.android.gms.internal.cast; import android.text.TextUtils; import androidx.annotation.NonNull; public class zzcm { private final String namespace; protected final zzdg zzvq; private zzdl zzvr; protected zzcm(String str, String str2, String str3) { zzcu.zzo(str); this.namespace = str; this.zzvq = new zzdg(str2); setSessionLabel(str3); } public void zza(long j, int i) { } public void zzdc() { } public void zzn(@NonNull String str) { } public final void setSessionLabel(String str) { if (!TextUtils.isEmpty(str)) { this.zzvq.zzt(str); } } public final String getNamespace() { return this.namespace; } public final void zza(zzdl zzdl) { this.zzvr = zzdl; if (this.zzvr == null) { zzdc(); } } /* access modifiers changed from: protected */ public final void zza(String str, long j, String str2) throws IllegalStateException { Object[] objArr = {str, null}; this.zzvr.zza(this.namespace, str, j, null); } /* access modifiers changed from: protected */ public final long zzde() { return this.zzvr.zzl(); } }
[ "xiayuanzhong@gmail.com" ]
xiayuanzhong@gmail.com
0b1f22bb2f6a0fbc0f2acf128f3330c7d1a675be
7ad92fdcde0ddb852fa2cae5700442a9875ae8c1
/android-studio/BabyBox/app/src/main/java/com/babybox/viewmodel/NewCommentVM.java
2ba5b621156b81750ab55d7a4a3b42afa1471359
[]
no_license
mybabybox/BB-Android
0a12b85cdca31e27bcddd4435008a18f49d83382
8d76123a26c97a0b7a5dd3746c962dabd6d589bd
refs/heads/master
2021-01-21T04:37:00.929265
2016-04-17T14:20:58
2016-04-17T14:20:58
41,082,515
1
0
null
null
null
null
UTF-8
Java
false
false
361
java
package com.babybox.viewmodel; import com.babybox.app.AppController; public class NewCommentVM { public Long postId; public String body; public String deviceType; public NewCommentVM(Long postId, String body) { this.postId = postId; this.body = body; this.deviceType = AppController.DeviceType.ANDROID.name(); } }
[ "keithlei01@gmail.com" ]
keithlei01@gmail.com
9a30c75abaea5bb966eab836450e4783c603e0e9
ae35d831bab14899f961a0b8784903708149a907
/core/src/lando/systems/trainjam2016/TrainJam2016.java
bd63b2297c383e8d7cee31cf66899a9f2c233cb3
[]
no_license
mtolly/trainjam-2016
854bb799ba5a078cc3a079796dede96307a0e364
4139862536d0be3c378bc828163c555369699439
refs/heads/master
2021-01-18T07:29:31.471383
2016-03-13T22:00:33
2016-03-13T22:00:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
736
java
package lando.systems.trainjam2016; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import lando.systems.trainjam2016.screens.BaseScreen; import lando.systems.trainjam2016.screens.MenuScreen; import lando.systems.trainjam2016.utils.Assets; public class TrainJam2016 extends ApplicationAdapter { public static TrainJam2016 game; public BaseScreen screen; @Override public void create() { Assets.load(); game = this; screen = new MenuScreen(); } @Override public void dispose() { Assets.dispose(); } @Override public void render() { float dt = Math.min(Gdx.graphics.getDeltaTime(), 1f / 30f); Assets.tween.update(dt); screen.update(dt); screen.render(Assets.batch); } }
[ "brian.ploeckelman@gmail.com" ]
brian.ploeckelman@gmail.com
6ab15a1e846fdbf80b991ec25f2f8164c1f226fa
c548d09d6f80c939f694d7404043f50a040f0e0c
/src/main/java/org/projectodd/vertx/jgroups/VertxAddress.java
cbe9229d7ae81dd3153de9c94454b339d53efbc2
[]
no_license
bobmcwhirter/vertx-infinispan-module
b63b4a9348d8210a9b3465fefdb2c665aab75275
7ab8eb85a45af3196217be479665c0bdbb68e3ec
refs/heads/master
2020-05-20T07:21:59.361293
2013-07-12T21:07:22
2013-07-12T21:07:22
11,319,971
2
1
null
null
null
null
UTF-8
Java
false
false
1,252
java
package org.projectodd.vertx.jgroups; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import org.jgroups.Address; import org.jgroups.PhysicalAddress; public class VertxAddress implements PhysicalAddress { private String address; public VertxAddress() { } public VertxAddress(String address) { this.address = address; } @Override public int size() { return this.address.getBytes().length; } @Override public void writeTo(DataOutput out) throws Exception { out.writeUTF( this.address ); } @Override public void readFrom(DataInput in) throws Exception { this.address = in.readUTF(); } @Override public int compareTo(Address o) { return this.address.compareTo( ((VertxAddress)o).address ); } @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeUTF(this.address); } @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.address = in.readUTF(); } public String toString() { return this.address; } }
[ "bob@mcwhirter.org" ]
bob@mcwhirter.org
5c9a552bfea5bcf7489b7a9c20fc5ce81a1e82aa
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/emoji/ui/v2/EmojiStoreV2RewardUI$9.java
8dea8dba5025c9ad9d9cd97d62fbb3e6c13f3895
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
package com.tencent.mm.plugin.emoji.ui.v2; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; class EmojiStoreV2RewardUI$9 implements OnClickListener { final /* synthetic */ EmojiStoreV2RewardUI iqC; EmojiStoreV2RewardUI$9(EmojiStoreV2RewardUI emojiStoreV2RewardUI) { this.iqC = emojiStoreV2RewardUI; } public final void onClick(DialogInterface dialogInterface, int i) { } }
[ "707194831@qq.com" ]
707194831@qq.com
e82a26e0fff6021188dd21668ba293bce8d7e247
7a3234d282fda192fed2c0aacc57c79477a27074
/net/minecraft/world/storage/MapInfo.java
62e0cee502af3c91a1b03604ef96130890efe363
[]
no_license
mjuniper/mod-design
88a70724730492f9637f210410bcb128b7f7fe8d
9106cbffb1eb8113add8da7cfbb2bf37e9f1b38c
refs/heads/master
2021-01-10T06:46:12.944366
2016-10-03T21:59:05
2016-10-03T21:59:05
44,486,038
1
0
null
null
null
null
UTF-8
Java
false
false
4,274
java
package net.minecraft.world.storage; import java.util.Iterator; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; public class MapInfo { /** Reference for EntityPlayer object in MapInfo */ public final EntityPlayer entityplayerObj; public int[] field_76209_b; public int[] field_76210_c; /** * updated by x = mod(x*11,128) +1 x-1 is used to index field_76209_b and field_76210_c */ private int currentRandomNumber; private int ticksUntilPlayerLocationMapUpdate; /** * a cache of the result from getPlayersOnMap so that it is not resent when nothing changes */ private byte[] lastPlayerLocationOnMap; public int field_82569_d; private boolean field_82570_i; /** reference in MapInfo to MapData object */ final MapData mapDataObj; public MapInfo(MapData par1MapData, EntityPlayer par2EntityPlayer) { this.mapDataObj = par1MapData; this.field_76209_b = new int[128]; this.field_76210_c = new int[128]; this.entityplayerObj = par2EntityPlayer; for (int i = 0; i < this.field_76209_b.length; ++i) { this.field_76209_b[i] = 0; this.field_76210_c[i] = 127; } } /** * returns a 1+players*3 array, of x,y, and color . the name of this function may be partially wrong, as there is a * second branch to the code here */ public byte[] getPlayersOnMap(ItemStack par1ItemStack) { byte[] abyte; if (!this.field_82570_i) { abyte = new byte[] {(byte)2, this.mapDataObj.scale}; this.field_82570_i = true; return abyte; } else { int i; int j; if (--this.ticksUntilPlayerLocationMapUpdate < 0) { this.ticksUntilPlayerLocationMapUpdate = 4; abyte = new byte[this.mapDataObj.playersVisibleOnMap.size() * 3 + 1]; abyte[0] = 1; i = 0; for (Iterator iterator = this.mapDataObj.playersVisibleOnMap.values().iterator(); iterator.hasNext(); ++i) { MapCoord mapcoord = (MapCoord)iterator.next(); abyte[i * 3 + 1] = (byte)(mapcoord.iconSize << 4 | mapcoord.iconRotation & 15); abyte[i * 3 + 2] = mapcoord.centerX; abyte[i * 3 + 3] = mapcoord.centerZ; } boolean flag = !par1ItemStack.isOnItemFrame(); if (this.lastPlayerLocationOnMap != null && this.lastPlayerLocationOnMap.length == abyte.length) { for (j = 0; j < abyte.length; ++j) { if (abyte[j] != this.lastPlayerLocationOnMap[j]) { flag = false; break; } } } else { flag = false; } if (!flag) { this.lastPlayerLocationOnMap = abyte; return abyte; } } for (int k = 0; k < 1; ++k) { i = this.currentRandomNumber++ * 11 % 128; if (this.field_76209_b[i] >= 0) { int l = this.field_76210_c[i] - this.field_76209_b[i] + 1; j = this.field_76209_b[i]; byte[] abyte1 = new byte[l + 3]; abyte1[0] = 0; abyte1[1] = (byte)i; abyte1[2] = (byte)j; for (int i1 = 0; i1 < abyte1.length - 3; ++i1) { abyte1[i1 + 3] = this.mapDataObj.colors[(i1 + j) * 128 + i]; } this.field_76210_c[i] = -1; this.field_76209_b[i] = -1; return abyte1; } } return null; } } }
[ "mjuniper@gmail.com" ]
mjuniper@gmail.com
45f4aa7c7057cdffc0cdf763d4cdc8bf004a0a2a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_f316941c0477e728135b13c2cb5f2300d7ecb1c1/VersionUtils/9_f316941c0477e728135b13c2cb5f2300d7ecb1c1_VersionUtils_t.java
cc36547eee94ad6b4f97c255e0a715976345d5fd
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,326
java
/** * Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC. * Copyright (C) 2008-2012 Marvin Froeder <marvin@flexmojos.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.sonatype.flexmojos.compatibilitykit; import java.util.Arrays; public class VersionUtils { public static int[] splitVersion( String version, int size ) { int[] versions = splitVersion( version ); if ( versions.length != size ) { int[] temp = new int[size]; Arrays.fill( temp, 0 ); System.arraycopy( versions, 0, temp, 0, Math.min( versions.length, size ) ); versions = temp; } return versions; } public static int[] splitVersion( String version ) { if ( version == null || version.trim().equals( "" ) ) { return new int[0]; } int endIndex = version.indexOf( '-' ); if ( endIndex != -1 ) { version = version.substring( 0, endIndex ); } String[] versionsStr = version.split( "\\." ); int[] versions = new int[versionsStr.length]; for ( int i = 0; i < versionsStr.length; i++ ) { try { versions[i] = new Integer( versionsStr[i] ); } catch ( NumberFormatException e ) { versions[i] = 0; } } return versions; } public static boolean isMinVersionOK( int[] fdkVersion, int[] minVersion ) { return isVersionOK( fdkVersion, minVersion ); } public static boolean isMaxVersionOK( int[] fdkVersion, int[] maxVersion ) { return isVersionOK( maxVersion, fdkVersion ); } private static boolean isVersionOK( int[] fdkVersion, int[] minVersion ) { int lenght = getSmaller( fdkVersion.length, minVersion.length ); int result = 0; for ( int i = 0; i < lenght; i++ ) { result = fdkVersion[i] - minVersion[i]; if ( result != 0 ) { return result > -1; } } return result > -1; } private static int getSmaller( int... integers ) { if ( integers.length == 0 ) { return 0; } int smaller = Integer.MAX_VALUE; for ( int integer : integers ) { if ( integer < smaller ) { smaller = integer; } } return smaller; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
741441f303ea0d470980da00863fd1c50474ec00
b23f4fb8323a223abb26da107b589245142fce33
/src/com/leozzy/nine/HorrorShow.java
b20b08202f369b296be0cc6cee2fd89b62d421c2
[]
no_license
leozhiyu/thinking-in-java
d9f61ccf6657026ae223c36aeb2a5e9a62c24b20
72440f4b4a11022adfa14dd839770843f59079db
refs/heads/master
2021-09-08T02:27:34.035030
2018-03-06T00:54:58
2018-03-06T00:54:58
112,142,580
1
0
null
null
null
null
UTF-8
Java
false
false
1,512
java
package com.leozzy.nine; /** * Created by Leo */ interface Monster{ void menace(); } interface DangerousMonster extends Monster{ void destroy(); } interface Lethal{ void kill(); } class DragonZilla implements DangerousMonster{ @Override public void menace(){ System.out.println("DragonZilla.menace()"); } @Override public void destroy(){ System.out.println("DragonZilla.destroy()"); } } interface Vampire extends DangerousMonster,Lethal{ void drinkBlood(); } class VeryBadVampire implements Vampire{ @Override public void menace() { System.out.println("VeryBanVampire.menace()"); } @Override public void destroy() { System.out.println("VeryBanVampire.destroy()"); } @Override public void kill() { System.out.println("VeryBanVampire.kill()"); } @Override public void drinkBlood() { System.out.println("VeryBanVampire.drinkBlood()"); } } public class HorrorShow { static void u(Monster b){ b.menace(); } static void v(DangerousMonster d){ d.menace(); d.destroy(); } static void w(Lethal l){ l.kill(); } public static void main(String[] args) { DangerousMonster barney = new DragonZilla(); u(barney); v(barney); Vampire vlad = new VeryBadVampire(); u(vlad); v(vlad); w(vlad); } }
[ "18779775257@163.com" ]
18779775257@163.com
b8fd549fd0c017bbebf62ea0a537a345b9d09b06
319b6fac5f0e8872bdc569b11c9adde66e8eefef
/src/main/java/com/bhuwan/spring/di/dependson/A.java
66854bf909f18316011965edf13eb738c2232fd0
[]
no_license
bhuwang/spring_playground
2613a40706d424bee44a6cb9db76c75538483319
5a2a8bbbdcb43310e6d177e49d06eed61cb0c2e1
refs/heads/master
2021-01-20T21:01:01.238271
2016-06-13T04:25:47
2016-06-13T04:25:47
60,771,327
0
0
null
null
null
null
UTF-8
Java
false
false
178
java
/** * */ package com.bhuwan.spring.di.dependson; /** * @author bhuwan * */ public class A { public A() { System.out.println("A object created....."); } }
[ "bhuwangautam@lftechnology.com" ]
bhuwangautam@lftechnology.com
11680450d5bc47d69a540dda5ef2afe6c4dcf5ed
1abc25e5f4fc1ed08175684b9ac956c5274c8b3d
/monitron/src/main/java/net/fortytwo/smsn/monitron/events/MonitronEvent.java
ec04283d113fef21bf1e32ee4fac8ef46f24313e
[ "MIT" ]
permissive
JeffreyBenjaminBrown/smsn
d2420b73a91a554e12e6d039de8402ce816be226
e4ecb2affbb8f4f2b6f8bfc012dd33d100c0fbbd
refs/heads/master
2021-01-14T13:08:35.341690
2016-08-13T19:16:49
2016-08-13T19:16:49
63,748,191
0
0
null
2016-07-20T03:45:28
2016-07-20T03:45:26
null
UTF-8
Java
false
false
1,894
java
package net.fortytwo.smsn.monitron.events; import net.fortytwo.rdfagents.model.Dataset; import net.fortytwo.smsn.SemanticSynchrony; import net.fortytwo.smsn.monitron.Context; import net.fortytwo.smsn.monitron.ontologies.Universe; import org.openrdf.model.IRI; import org.openrdf.model.Literal; import org.openrdf.model.Resource; import org.openrdf.model.Value; import org.openrdf.model.ValueFactory; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; import java.util.Date; import java.util.GregorianCalendar; import java.util.LinkedList; public abstract class MonitronEvent { private static final DatatypeFactory DATATYPE_FACTORY; static { try { DATATYPE_FACTORY = DatatypeFactory.newInstance(); } catch (DatatypeConfigurationException e) { throw new ExceptionInInitializerError(e); } } private final Context context; protected final ValueFactory valueFactory; public MonitronEvent(final Context context) { this.context = context; this.valueFactory = context.getValueFactory(); } public Dataset toRDF() { return new Dataset(new LinkedList<>()); } protected IRI coinEventIRI() { return valueFactory.createIRI(Universe.NAMESPACE + "event-" + SemanticSynchrony.createRandomKey()); } protected Literal toLiteral(final Date d) { GregorianCalendar c = new GregorianCalendar(); c.setTime(d); return valueFactory.createLiteral(DATATYPE_FACTORY.newXMLGregorianCalendar(c)); } protected void addStatement(final Dataset d, final Resource subject, final IRI predicate, final Value object) { d.getStatements().add(valueFactory.createStatement(subject, predicate, object)); } }
[ "josh@fortytwo.net" ]
josh@fortytwo.net
112c4c6c06fc8a5e65d8ab649d2519eeaad32d63
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14263-60-24-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest_scaffolding.java
285e1b6225debdf7c01f80835bb3da22084138de
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
459
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 04 05:04:46 UTC 2020 */ package com.xpn.xwiki.internal.template; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class InternalTemplateManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
739de9136d959c9df1d92cc8bd3e7b55496c14d7
630e08722bec5ab15acc30ae072b8f037b9e4740
/modules/lib-sip/src/main/java/de/fhg/fokus/ims/core/media/StreamMedia2.java
121a8c264c5caef4ebe9ac95b773d159569c9e81
[ "Apache-2.0" ]
permissive
fhg-fokus-nubomedia/signaling-plane
f54feef2b77cca498501523bbd06fd203dedeba1
2ab48dfde4556bd6920d6cbaa1d80a8646ba737f
refs/heads/master
2021-01-10T11:28:03.998041
2016-01-08T11:44:57
2016-01-29T21:41:18
49,268,585
1
0
null
null
null
null
UTF-8
Java
false
false
417
java
package de.fhg.fokus.ims.core.media; import javax.ims.core.media.StreamMedia; public interface StreamMedia2 extends StreamMedia { int HOLDSTATE_NONE = 0; int HOLDSTATE_LOCAL = 1; int HOLDSTATE_REMOTE = 2; boolean isTelephoneEventEnabled(); void setTelephoneEventEnabled(boolean enabled); void startTelephoneEvent(int number, int volume); void stopTelephoneEvent(); void setHoldState(int state); }
[ "alice.cheambe@fokus.fraunhofer.de" ]
alice.cheambe@fokus.fraunhofer.de
85ee26411f6c610e30657a5ef39f93ece2b03966
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_4b8f126e35047a3ca7e364d2d30994974b337bb8/MonitorFrameInfo/3_4b8f126e35047a3ca7e364d2d30994974b337bb8_MonitorFrameInfo_s.java
9e0505e1324b03fb080099cd774c9b83c1d225f0
[]
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
5,731
java
/* * Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ /** * @test * @bug 6230699 * @summary Test ThreadReference.ownedMonitorsAndFrames() * @bug 6701700 * @summary MonitorInfo objects aren't invalidated when the owning thread is resumed * @author Swamy Venkataramanappa * * @run build TestScaffold VMConnection TargetListener TargetAdapter * @run compile -g MonitorFrameInfo.java * @run main MonitorFrameInfo */ import com.sun.jdi.*; import com.sun.jdi.event.*; import com.sun.jdi.request.*; import java.util.*; /********** target program **********/ class MonitorTestTarg { static void foo3() { System.out.println("executing foo3"); } static void foo2() { Object l1 = new Object(); synchronized(l1) { foo3(); } } static void foo1() { foo2(); } public static void main(String[] args){ System.out.println("Howdy!"); Object l1 = new Object(); synchronized(l1) { foo1(); } } } /********** test program **********/ public class MonitorFrameInfo extends TestScaffold { ReferenceType targetClass; ThreadReference mainThread; List monitors; static int expectedCount = 2; static int[] expectedDepth = { 1, 3 }; static String[] expectedNames = {"foo3", "foo2", "foo1", "main"}; MonitorFrameInfo (String args[]) { super(args); } public static void main(String[] args) throws Exception { new MonitorFrameInfo(args).startTests(); } /********** test core **********/ protected void runTests() throws Exception { /* * Get to the top of main() * to determine targetClass and mainThread */ BreakpointEvent bpe = startToMain("MonitorTestTarg"); targetClass = bpe.location().declaringType(); mainThread = bpe.thread(); int initialSize = mainThread.frames().size(); resumeTo("MonitorTestTarg", "foo3", "()V"); if (!mainThread.frame(0).location().method().name() .equals("foo3")) { failure("FAILED: frame failed"); } if (mainThread.frames().size() != (initialSize + 3)) { failure("FAILED: frames size failed"); } if (mainThread.frames().size() != mainThread.frameCount()) { failure("FAILED: frames size not equal to frameCount"); } /* Test monitor frame info. */ if (vm().canGetMonitorFrameInfo()) { System.out.println("Get monitors"); monitors = mainThread.ownedMonitorsAndFrames(); if (monitors.size() != expectedCount) { failure("monitors count is not equal to expected count"); } MonitorInfo mon = null; for (int j=0; j < monitors.size(); j++) { mon = (MonitorInfo)monitors.get(j); System.out.println("Monitor obj " + mon.monitor() + "depth =" +mon.stackDepth()); if (mon.stackDepth() != expectedDepth[j]) { failure("FAILED: monitor stack depth is not equal to expected depth"); } } // The last gotten monInfo is in mon. When we resume the thread, // it should become invalid. We will step out of the top frame // so that the frame depth in this mon object will no longer be correct. // That is why the monInfo's have to become invalid when the thread is // resumed. stepOut(mainThread); boolean ok = false; try { System.out.println("*** Saved Monitor obj " + mon.monitor() + "depth =" +mon.stackDepth()); } catch(InvalidStackFrameException ee) { // ok ok = true; System.out.println("Got expected InvalidStackFrameException after a resume"); } if (!ok) { failure("FAILED: MonitorInfo object was not invalidated by a resume"); } } else { System.out.println("can not get monitors frame info"); } /* * resume until end */ listenUntilVMDisconnect(); /* * deal with results of test * if anything has called failure("foo") testFailed will be true */ if (!testFailed) { println("MonitorFrameInfo: passed"); } else { throw new Exception("MonitorFrameInfo: failed"); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a25d99f4d5801ed874ec8663f8b50a98205d4588
9543f1302522ab515d29b668adeb8238f325bd06
/Sniffer-Search/src/main/java/com/jpznm/dht/sniffersearch/core/tags/impl/NewTimeTagsImpl.java
a154b77a8e19d0c03b14be61c223c68e0ad7c838
[]
no_license
lianshufeng/dht
9ae537b88868216ce3e3606b22f39bf944f755f7
5b3447cc44e2c904b8f0cc717cd96552d2636959
refs/heads/master
2021-06-13T23:57:43.732952
2021-02-04T06:50:12
2021-02-04T06:50:12
152,176,713
0
0
null
2021-02-04T06:50:55
2018-10-09T02:40:04
Java
UTF-8
Java
false
false
318
java
package com.jpznm.dht.sniffersearch.core.tags.impl; import com.jpznm.dht.sniffersearch.core.tags.TagsTransform; import org.springframework.stereotype.Component; @Component public class NewTimeTagsImpl implements TagsTransform { @Override public boolean execute(String info) { return false; } }
[ "251708339@qq.com" ]
251708339@qq.com
682446ba530ed7fba6fb9faf446ef5e260d2ac71
48541b2e7137ad1b8fc5639c954a2c55ee208e78
/jodconverter-core/src/main/java/org/jodconverter/job/DocumentSpecs.java
5ac7eb54091f0f9a3eee05408c497fc1990dfc36
[ "Apache-2.0" ]
permissive
gary-dgc/jodconverter
cf099a33f62de2ab52db0baa104eb9cdfc2b5c66
eafd1b73a0ffb9953649eb2997ec5a5e7f8f0cbc
refs/heads/master
2020-12-07T14:04:16.614523
2020-01-08T19:39:15
2020-01-08T19:39:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,271
java
/* * Copyright 2004 - 2012 Mirko Nasato and contributors * 2016 - 2020 Simon Braconnier and contributors * * This file is part of JODConverter - Java OpenDocument Converter. * * 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.jodconverter.job; import java.io.File; import org.jodconverter.document.DocumentFormat; /** * An interface that provides, for a document, the physical file and format required by a conversion * process. */ interface DocumentSpecs { /** * Gets the file where is located the document. * * @return A file instance. */ File getFile(); /** * Gets the {@link DocumentFormat} specification for the document. * * @return The document format. */ DocumentFormat getFormat(); }
[ "simonbraconnier@gmail.com" ]
simonbraconnier@gmail.com
b7ae83664e6c22c6c5ff389ad60843e9d8feb076
42fcf1d879cb75f08225137de5095adfdd63fa21
/src/main/java/org/jooq/routines/GetEqualSetSkuidNrforFsc.java
59dcc89f441b19b1b9879b017d73428e47dc21f8
[]
no_license
mpsgit/JOOQTest
e10e9c8716f2688c8bf0160407b1244f9e70e8eb
6af2922bddc55f591e94a5a9a6efd1627747d6ad
refs/heads/master
2021-01-10T06:11:40.862153
2016-02-28T09:09:34
2016-02-28T09:09:34
52,711,455
0
0
null
null
null
null
UTF-8
Java
false
false
2,259
java
/** * This class is generated by jOOQ */ package org.jooq.routines; import java.math.BigDecimal; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Parameter; import org.jooq.Wetrn; import org.jooq.impl.AbstractRoutine; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class GetEqualSetSkuidNrforFsc extends AbstractRoutine<BigDecimal> { private static final long serialVersionUID = -816648109; /** * The parameter <code>WETRN.GET_EQUAL_SET_SKUID_NRFOR_FSC.RETURN_VALUE</code>. */ public static final Parameter<BigDecimal> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.NUMERIC, false); /** * The parameter <code>WETRN.GET_EQUAL_SET_SKUID_NRFOR_FSC.T_SET_ID</code>. */ public static final Parameter<BigDecimal> T_SET_ID = createParameter("T_SET_ID", org.jooq.impl.SQLDataType.NUMERIC, false); /** * The parameter <code>WETRN.GET_EQUAL_SET_SKUID_NRFOR_FSC.S_SET_ID</code>. */ public static final Parameter<BigDecimal> S_SET_ID = createParameter("S_SET_ID", org.jooq.impl.SQLDataType.NUMERIC, false); /** * Create a new routine call instance */ public GetEqualSetSkuidNrforFsc() { super("GET_EQUAL_SET_SKUID_NRFOR_FSC", Wetrn.WETRN, org.jooq.impl.SQLDataType.NUMERIC); setReturnParameter(RETURN_VALUE); addInParameter(T_SET_ID); addInParameter(S_SET_ID); } /** * Set the <code>T_SET_ID</code> parameter IN value to the routine */ public void setTSetId(Number value) { setNumber(T_SET_ID, value); } /** * Set the <code>T_SET_ID</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void setTSetId(Field<? extends Number> field) { setNumber(T_SET_ID, field); } /** * Set the <code>S_SET_ID</code> parameter IN value to the routine */ public void setSSetId(Number value) { setNumber(S_SET_ID, value); } /** * Set the <code>S_SET_ID</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void setSSetId(Field<? extends Number> field) { setNumber(S_SET_ID, field); } }
[ "krisztian.koller@gmail.com" ]
krisztian.koller@gmail.com
0780c9ccc6b656923b5f9044d0724dc3b81525a7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/20/20_8dc860b920dd9f98fee5901adb878be298e121dd/ChangeVmConfiguration/20_8dc860b920dd9f98fee5901adb878be298e121dd_ChangeVmConfiguration_s.java
e313876ddcc7a1729c3d0211f7dc33a43c8a80f0
[]
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
6,903
java
package at.ac.tuwien.lsdc.actions; import java.util.List; import at.ac.tuwien.lsdc.Configuration; import at.ac.tuwien.lsdc.resources.Resource; import at.ac.tuwien.lsdc.resources.VirtualMachine; public class ChangeVmConfiguration extends Action { private VirtualMachine vm; private int optimizedCpuAllocation; private int optimizedMemoryAllocation; private int optimizedStorageAllocation; private static int configurationChangeCosts; private static int topRegion; private static int bottomRegion; // tick count to look in the past private final int tickCount = 10; @Override public void init(Resource problem) { if (problem instanceof VirtualMachine) { this.vm = (VirtualMachine) problem; } // set init values ChangeVmConfiguration.setConfigurationChangeCosts(Configuration.getInstance().getVmConfigurationChangeCosts()); ChangeVmConfiguration.setTopRegion(Configuration.getInstance().getTopRegion()); ChangeVmConfiguration.setBottomRegion(Configuration.getInstance().getBottomRegion()); } public static int getBottomRegion() { return bottomRegion; } public static void setBottomRegion(int bottomRegion) { ChangeVmConfiguration.bottomRegion = bottomRegion; } @Override public int predict() { this.calculateBetterAllocationValues(); // decide how urgent a configurationchange is 0-100, 100 = urgent int prediction = 0; prediction = (Math.abs(this.vm.getCurrentCpuAllocation() - this.optimizedCpuAllocation) + Math.abs(this.vm.getCurrentMemoryAllocation() - this.optimizedMemoryAllocation) + Math.abs(this.vm.getCurrentStorageAllocation() - this.optimizedStorageAllocation)) / 3; int slaViolationUrgency = 10; int slaViolationCount = this.vm.getNumberOfSlaViolations(this.tickCount); if (prediction < slaViolationUrgency && slaViolationCount > 0) { // reallocation should be neccessary, chose 10% importance prediction = slaViolationUrgency + slaViolationCount; if (prediction > 100) { prediction = 100; } } return 0; } /** * Calculates better VM allocation values for the given VM, depending in which zone it's currently in. */ private void calculateBetterAllocationValues() { this.optimizedCpuAllocation = this.calculateOptimizedCpuAllocation(this.tickCount); this.optimizedMemoryAllocation = this.calculateOptimizedMemoryAllocation(this.tickCount); this.optimizedStorageAllocation = this.calculateOptimizedStorageAllocation(this.tickCount); } /** * Calculates an optimized CPU allocation value for the VM * * @param ticks Based on the last n ticks * @return The optimized CPU allocation value */ private int calculateOptimizedCpuAllocation(int ticks) { return this.calculateOptimizedAllocation(this.vm.getCurrentCpuAllocation(), this.vm.getCpuAllocationHistory(this.tickCount), this.vm.getCpuUsageHistory(this.tickCount)); } /** * Calculates an optimized memory allocation value for the VM * * @param ticks Based on the last n ticks * @return The optimized memory allocation value */ private int calculateOptimizedMemoryAllocation(int ticks) { return this.calculateOptimizedAllocation(this.vm.getCurrentMemoryAllocation(), this.vm.getMemoryAllocationHistory(this.tickCount), this.vm.getMemoryUsageHistory(this.tickCount)); } /** * Calculates an optimized storage allocation value for the VM * * @param ticks Based on the last n ticks * @return The optimized storage allocation value */ private int calculateOptimizedStorageAllocation(int ticks) { return this.calculateOptimizedAllocation(this.vm.getCurrentStorageAllocation(), this.vm.getStorageAllocationHistory(this.tickCount), this.vm.getStorageUsageHistory(this.tickCount)); } /** * Calculates an optimized allocation value for a given history of values * * @param currentAllocation * @param allocationHistory * @param usageHistory * @return Optimized allocation value */ private int calculateOptimizedAllocation(int currentAllocation, List<Integer> allocationHistory, List<Integer> usageHistory) { int allocation = currentAllocation; int optimizedAllocation = 0; int topRegionReached = 0; int bottomRegionReached = 0; // calculate how often the VM went into a dangerous zone in the last n ticks (compare allocated to used resources) for (int i = 0; i < allocationHistory.size(); i++) { Integer allocated = allocationHistory.get(i); Integer used = usageHistory.get(i); // calculate percentage of the used resources vs. the allocated resources int ratio = (int) ((used / (float) allocated) * 100); if (ratio > ChangeVmConfiguration.topRegion) { // need more resources topRegionReached++; } else if (ratio < ChangeVmConfiguration.bottomRegion) { // need less resources bottomRegionReached++; } else { // resource allocation is perfect // do nothing } // calculate allocation so that "used" is 95% of the allocation optimizedAllocation = (int) ((float) used / ChangeVmConfiguration.topRegion * 100); if (topRegionReached > 1 || bottomRegionReached > 1) { // need to change the allocation if (allocation < optimizedAllocation) { allocation = optimizedAllocation; } } } if (allocation > 100) { allocation = 100; } else if (allocation < 0) { allocation = 0; } return allocation; } @Override public int estimate() { return ChangeVmConfiguration.configurationChangeCosts; } @Override public boolean preconditions() { // VMs can always be changed return true; } @Override public void execute() { // change CPU allocation if (this.vm.getCurrentCpuAllocation() != this.optimizedCpuAllocation) { this.vm.setCurrentCpuAlloction(this.optimizedCpuAllocation); } // change memory allocation if (this.vm.getCurrentMemoryAllocation() != this.optimizedMemoryAllocation) { this.vm.setCurrentMemoryAlloction(this.optimizedMemoryAllocation); } // change storage allocation if (this.vm.getCurrentStorageAllocation() != this.optimizedStorageAllocation) { this.vm.setCurrentStorageAlloction(this.optimizedStorageAllocation); } } @Override public boolean evaluate() { // nothing to do here return true; } @Override public void terminate() { // unused } public static int getConfigurationChangeCosts() { return configurationChangeCosts; } public static void setConfigurationChangeCosts(int configurationChangeCosts) { ChangeVmConfiguration.configurationChangeCosts = configurationChangeCosts; } public static int getTopRegion() { return topRegion; } public static void setTopRegion(int topRegion) { ChangeVmConfiguration.topRegion = topRegion; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com