blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2
values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82
values | src_encoding stringclasses 28
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 7 5.41M | extension stringclasses 11
values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7898c4a87f8cc0c991e0f9ed535aa15260436aa6 | 6d1eb5cdf4e1f001d9133f516e545cde73e4832e | /environmenturl/src/main/java/net/webservicex/CurrencyConvertor.java | 105392a64f5cb1f2b2bfa5f2db61ef4f0bb30917 | [] | no_license | ragnar-lothbrok/Spring_hibernate_demo | efc311565e056b2af7197abacd37f310525953ae | e7a24b7bc97f982e1cc1f8d296a3db9548d4ebec | refs/heads/master | 2016-09-05T11:17:50.745053 | 2015-02-16T16:09:08 | 2015-02-16T16:09:08 | 30,830,652 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,294 | java |
package net.webservicex;
import java.net.MalformedURLException;
import java.net.URL;
import javax.jws.HandlerChain;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.1.1 in JDK 6
* Generated source version: 2.1
*
*/
@WebServiceClient(name = "CurrencyConvertor", targetNamespace = "http://www.webserviceX.NET/", wsdlLocation = "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL")
@HandlerChain(file = "handler_chain.xml")
public class CurrencyConvertor
extends Service
{
private final static URL CURRENCYCONVERTOR_WSDL_LOCATION;
static {
URL url = null;
try {
url = new URL("http://www.webservicex.net/CurrencyConvertor.asmx?WSDL");
} catch (MalformedURLException e) {
e.printStackTrace();
}
CURRENCYCONVERTOR_WSDL_LOCATION = url;
}
public CurrencyConvertor(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public CurrencyConvertor() {
super(CURRENCYCONVERTOR_WSDL_LOCATION, new QName("http://www.webserviceX.NET/", "CurrencyConvertor"));
}
/**
*
* @return
* returns CurrencyConvertorSoap
*/
@WebEndpoint(name = "CurrencyConvertorSoap")
public CurrencyConvertorSoap getCurrencyConvertorSoap() {
return (CurrencyConvertorSoap)super.getPort(new QName("http://www.webserviceX.NET/", "CurrencyConvertorSoap"), CurrencyConvertorSoap.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns CurrencyConvertorSoap
*/
@WebEndpoint(name = "CurrencyConvertorSoap")
public CurrencyConvertorSoap getCurrencyConvertorSoap(WebServiceFeature... features) {
return (CurrencyConvertorSoap)super.getPort(new QName("http://www.webserviceX.NET/", "CurrencyConvertorSoap"), CurrencyConvertorSoap.class, features);
}
}
| [
"raghunitb@gmail.com"
] | raghunitb@gmail.com |
9d6912bdd2c797e75d1c76b70e953d59817814fe | eddfae753b30f431caceab8e2d1deeccd6291923 | /JCXSystemPro/src/main/java/internalFrame/RuKuTuiHuoChaXun.java | 2a6a84cf6b80af036b9812c4aac4a80043849464 | [] | no_license | liujinguang/JXCSystem | 638aab08376bdf98ae8ffd27ea5880c38945c846 | bed640f8c9d1e6fbfac9516f2add6d0166f803df | refs/heads/master | 2020-06-15T12:52:06.130192 | 2016-12-02T12:52:24 | 2016-12-02T12:52:24 | 75,289,518 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,996 | java | package internalFrame;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
import javax.swing.table.DefaultTableModel;
import model.TbRukuDetail;
import model.TbUserlist;
import com.lzw.dao.*;
public class RuKuTuiHuoChaXun extends JInternalFrame {
private JCheckBox selectDate;
private JLabel label;
private JTextField endDate;
private JTextField startDate;
private JTable table;
private JTextField content;
private JComboBox operation;
private JComboBox condition;
private TbUserlist user;
private JButton button;
private DefaultTableModel dftm;
public RuKuTuiHuoChaXun() {
super();
addInternalFrameListener(new InternalFrameAdapter() {
public void internalFrameActivated(final InternalFrameEvent e) {
java.sql.Date date = new java.sql.Date(System
.currentTimeMillis());
endDate.setText(date.toString());
date.setMonth(0);
date.setDate(1);
startDate.setText(date.toString());
}
});
setMaximizable(true);
setIconifiable(true);
setClosable(true);
setTitle("商品入库退货查询");
getContentPane().setLayout(new GridBagLayout());
setBounds(100, 100, 620, 375);
label = new JLabel();
label.setFont(new Font("", Font.PLAIN, 14));
label.setText(" 选择查询条件:");
final GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridy = 0;
gridBagConstraints.gridx = 0;
getContentPane().add(label, gridBagConstraints);
condition = new JComboBox();
condition.setModel(new DefaultComboBoxModel(new String[]{"商品名称",
"商品编号", "供应商全称"}));
condition.setFont(new Font("", Font.PLAIN, 14));
final GridBagConstraints gridBagConstraints_1 = new GridBagConstraints();
gridBagConstraints_1.gridy = 0;
gridBagConstraints_1.gridx = 1;
getContentPane().add(condition, gridBagConstraints_1);
operation = new JComboBox();
operation.setModel(new DefaultComboBoxModel(new String[]{"等于", "包含"}));
operation.setFont(new Font("", Font.PLAIN, 14));
final GridBagConstraints gridBagConstraints_2 = new GridBagConstraints();
gridBagConstraints_2.gridy = 0;
gridBagConstraints_2.gridx = 4;
gridBagConstraints_2.ipadx = 30;
getContentPane().add(operation, gridBagConstraints_2);
content = new JTextField();
content.addKeyListener(new KeyAdapter() {
public void keyPressed(final KeyEvent e) {
if (e.getKeyCode() == 13) {
button.doClick();
}
}
});
content.setFont(new Font("", Font.PLAIN, 14));
final GridBagConstraints gridBagConstraints_3 = new GridBagConstraints();
gridBagConstraints_3.ipadx = 105;
gridBagConstraints_3.insets = new Insets(0, 10, 0, 10);
gridBagConstraints_3.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints_3.weightx = 1.0;
gridBagConstraints_3.gridy = 0;
gridBagConstraints_3.gridx = 6;
getContentPane().add(content, gridBagConstraints_3);
button = new JButton();
button.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
List list = null;
String conditionStr, operationStr;
String contentStr = content.getText();
switch (condition.getSelectedIndex()) {
case 0 :
conditionStr = "spname";
break;
case 1 :
conditionStr = "id";
break;
case 2 :
conditionStr = "gysname";
break;
default :
conditionStr = "id";
break;
}
switch (operation.getSelectedIndex()) {
case 0 :
operationStr = "= '" + contentStr + "'";
break;
case 1 :
operationStr = "like '%" + contentStr + "%'";
break;
default :
operationStr = "= '" + contentStr + "'";
break;
}
String sql = "select * from v_rkthView where ";
if (selectDate.isSelected()) {
String sDate = startDate.getText().trim();
String eDate = endDate.getText().trim();
list = Dao.findForList(sql + conditionStr + " "
+ operationStr + " and rtdate>='" + sDate
+ "' and rtdate<='" + eDate + " 23:59:59'");
} else {
list = Dao.findForList(sql + conditionStr + " "
+ operationStr);
}
updateTable(list.iterator());
}
});
final GridBagConstraints gridBagConstraints_4 = new GridBagConstraints();
gridBagConstraints_4.gridy = 0;
gridBagConstraints_4.gridx = 7;
getContentPane().add(button, gridBagConstraints_4);
button.setFont(new Font("", Font.PLAIN, 12));
button.setText("查询");
selectDate = new JCheckBox();
selectDate.setFont(new Font("", Font.PLAIN, 14));
final GridBagConstraints gridBagConstraints_7 = new GridBagConstraints();
gridBagConstraints_7.anchor = GridBagConstraints.EAST;
gridBagConstraints_7.gridy = 1;
gridBagConstraints_7.gridx = 0;
getContentPane().add(selectDate, gridBagConstraints_7);
final JLabel label_1 = new JLabel();
label_1.setFont(new Font("", Font.PLAIN, 14));
label_1.setText("指定查询日期 从");
final GridBagConstraints gridBagConstraints_8 = new GridBagConstraints();
gridBagConstraints_8.anchor = GridBagConstraints.EAST;
gridBagConstraints_8.gridy = 1;
gridBagConstraints_8.gridx = 1;
getContentPane().add(label_1, gridBagConstraints_8);
startDate = new JTextField();
final GridBagConstraints gridBagConstraints_9 = new GridBagConstraints();
gridBagConstraints_9.ipadx = 70;
gridBagConstraints_9.insets = new Insets(0, 0, 0, 0);
gridBagConstraints_9.gridwidth = 3;
gridBagConstraints_9.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints_9.gridy = 1;
gridBagConstraints_9.gridx = 2;
getContentPane().add(startDate, gridBagConstraints_9);
final JLabel label_2 = new JLabel();
label_2.setFont(new Font("", Font.PLAIN, 14));
final GridBagConstraints gridBagConstraints_10 = new GridBagConstraints();
gridBagConstraints_10.gridy = 1;
gridBagConstraints_10.gridx = 5;
getContentPane().add(label_2, gridBagConstraints_10);
label_2.setText("到");
endDate = new JTextField();
final GridBagConstraints gridBagConstraints_11 = new GridBagConstraints();
gridBagConstraints_11.ipadx = 80;
gridBagConstraints_11.weightx = 1;
gridBagConstraints_11.anchor = GridBagConstraints.WEST;
gridBagConstraints_11.insets = new Insets(0, 0, 0, 0);
gridBagConstraints_11.gridy = 1;
gridBagConstraints_11.gridx = 6;
getContentPane().add(endDate, gridBagConstraints_11);
final JButton showallButton_1 = new JButton();
showallButton_1.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
content.setText("");
List list = Dao.findForList("select * from v_rkthView");
Iterator iterator = list.iterator();
updateTable(iterator);
}
});
final GridBagConstraints gridBagConstraints_5 = new GridBagConstraints();
gridBagConstraints_5.insets = new Insets(0, 10, 0, 10);
gridBagConstraints_5.gridy = 1;
gridBagConstraints_5.gridx = 7;
getContentPane().add(showallButton_1, gridBagConstraints_5);
showallButton_1.setFont(new Font("", Font.PLAIN, 12));
showallButton_1.setText("显示全部数据");
final JScrollPane scrollPane = new JScrollPane();
final GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();
gridBagConstraints_6.weighty = 1.0;
gridBagConstraints_6.anchor = GridBagConstraints.NORTH;
gridBagConstraints_6.insets = new Insets(0, 10, 0, 10);
gridBagConstraints_6.fill = GridBagConstraints.BOTH;
gridBagConstraints_6.gridwidth = 9;
gridBagConstraints_6.gridy = 2;
gridBagConstraints_6.gridx = 0;
getContentPane().add(scrollPane, gridBagConstraints_6);
table = new JTable();
table.setEnabled(false);
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
table.setShowGrid(true);
table.putClientProperty("Quaqua.Table.style", "striped");
dftm = (DefaultTableModel) table.getModel();
String[] tableHeads = new String[]{"入退票号", "商品编号", "商品名称", "规格", "单价",
"数量", "金额", "供应商全称", "入退日期", "操作员", "经手人", "结算方式"};
dftm.setColumnIdentifiers(tableHeads);
scrollPane.setViewportView(table);
}
private void updateTable(Iterator iterator) {
int rowCount = dftm.getRowCount();
for (int i = 0; i < rowCount; i++) {
dftm.removeRow(0);
}
while (iterator.hasNext()) {
Vector vector = new Vector();
List view = (List) iterator.next();
vector.addAll(view);
dftm.addRow(vector);
}
}
} | [
"jinguang.liu@qq.com"
] | jinguang.liu@qq.com |
6198a16266883d3b1d9650657834e12eaeb9e787 | e13b082644c0d29ea63e8e992d4009578687c5cd | /ProtoDeclarations/EneterProtoBufPrimitivesDeclarations.java | 0b87cac17744a14e52ecffe3092f510b77768a6a | [
"MIT"
] | permissive | ng-eneter/eneter-protobuf | e1f3fc8542eb730e762184191c97401c71d2ea30 | 616b0664347a5d500b7445c1ef66d86b6daffeea | refs/heads/master | 2023-02-04T09:56:59.668026 | 2020-12-26T11:07:35 | 2020-12-26T11:07:35 | 324,123,132 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | true | 219,218 | java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: EneterProtoBufPrimitivesDeclarations.proto
public final class EneterProtoBufPrimitivesDeclarations {
private EneterProtoBufPrimitivesDeclarations() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface StringWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:StringWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>required string Value = 1;</code>
*/
boolean hasValue();
/**
* <code>required string Value = 1;</code>
*/
java.lang.String getValue();
/**
* <code>required string Value = 1;</code>
*/
com.google.protobuf.ByteString
getValueBytes();
}
/**
* Protobuf type {@code StringWrapper}
*
* <pre>
* String
* </pre>
*/
public static final class StringWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:StringWrapper)
StringWrapperOrBuilder {
// Use StringWrapper.newBuilder() to construct.
private StringWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private StringWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final StringWrapper defaultInstance;
public static StringWrapper getDefaultInstance() {
return defaultInstance;
}
public StringWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StringWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
value_ = bs;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_StringWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_StringWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.StringWrapper.class, EneterProtoBufPrimitivesDeclarations.StringWrapper.Builder.class);
}
public static com.google.protobuf.Parser<StringWrapper> PARSER =
new com.google.protobuf.AbstractParser<StringWrapper>() {
public StringWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StringWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<StringWrapper> getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private java.lang.Object value_;
/**
* <code>required string Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required string Value = 1;</code>
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
value_ = s;
}
return s;
}
}
/**
* <code>required string Value = 1;</code>
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private void initFields() {
value_ = "";
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasValue()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getValueBytes());
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, getValueBytes());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.StringWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.StringWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.StringWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.StringWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.StringWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.StringWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.StringWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.StringWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.StringWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.StringWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.StringWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code StringWrapper}
*
* <pre>
* String
* </pre>
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:StringWrapper)
EneterProtoBufPrimitivesDeclarations.StringWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_StringWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_StringWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.StringWrapper.class, EneterProtoBufPrimitivesDeclarations.StringWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.StringWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_StringWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.StringWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.StringWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.StringWrapper build() {
EneterProtoBufPrimitivesDeclarations.StringWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.StringWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.StringWrapper result = new EneterProtoBufPrimitivesDeclarations.StringWrapper(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.value_ = value_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.StringWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.StringWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.StringWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.StringWrapper.getDefaultInstance()) return this;
if (other.hasValue()) {
bitField0_ |= 0x00000001;
value_ = other.value_;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasValue()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.StringWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.StringWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object value_ = "";
/**
* <code>required string Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required string Value = 1;</code>
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
value_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>required string Value = 1;</code>
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>required string Value = 1;</code>
*/
public Builder setValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
/**
* <code>required string Value = 1;</code>
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
/**
* <code>required string Value = 1;</code>
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:StringWrapper)
}
static {
defaultInstance = new StringWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:StringWrapper)
}
public interface StringArrayWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:StringArrayWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated string Value = 1;</code>
*/
com.google.protobuf.ProtocolStringList
getValueList();
/**
* <code>repeated string Value = 1;</code>
*/
int getValueCount();
/**
* <code>repeated string Value = 1;</code>
*/
java.lang.String getValue(int index);
/**
* <code>repeated string Value = 1;</code>
*/
com.google.protobuf.ByteString
getValueBytes(int index);
}
/**
* Protobuf type {@code StringArrayWrapper}
*/
public static final class StringArrayWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:StringArrayWrapper)
StringArrayWrapperOrBuilder {
// Use StringArrayWrapper.newBuilder() to construct.
private StringArrayWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private StringArrayWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final StringArrayWrapper defaultInstance;
public static StringArrayWrapper getDefaultInstance() {
return defaultInstance;
}
public StringArrayWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StringArrayWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
value_.add(bs);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = value_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_StringArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_StringArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.StringArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.StringArrayWrapper.Builder.class);
}
public static com.google.protobuf.Parser<StringArrayWrapper> PARSER =
new com.google.protobuf.AbstractParser<StringArrayWrapper>() {
public StringArrayWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StringArrayWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<StringArrayWrapper> getParserForType() {
return PARSER;
}
public static final int VALUE_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList value_;
/**
* <code>repeated string Value = 1;</code>
*/
public com.google.protobuf.ProtocolStringList
getValueList() {
return value_;
}
/**
* <code>repeated string Value = 1;</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated string Value = 1;</code>
*/
public java.lang.String getValue(int index) {
return value_.get(index);
}
/**
* <code>repeated string Value = 1;</code>
*/
public com.google.protobuf.ByteString
getValueBytes(int index) {
return value_.getByteString(index);
}
private void initFields() {
value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (int i = 0; i < value_.size(); i++) {
output.writeBytes(1, value_.getByteString(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < value_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(value_.getByteString(i));
}
size += dataSize;
size += 1 * getValueList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.StringArrayWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code StringArrayWrapper}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:StringArrayWrapper)
EneterProtoBufPrimitivesDeclarations.StringArrayWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_StringArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_StringArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.StringArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.StringArrayWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.StringArrayWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_StringArrayWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.StringArrayWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.StringArrayWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.StringArrayWrapper build() {
EneterProtoBufPrimitivesDeclarations.StringArrayWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.StringArrayWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.StringArrayWrapper result = new EneterProtoBufPrimitivesDeclarations.StringArrayWrapper(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = value_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.value_ = value_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.StringArrayWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.StringArrayWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.StringArrayWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.StringArrayWrapper.getDefaultInstance()) return this;
if (!other.value_.isEmpty()) {
if (value_.isEmpty()) {
value_ = other.value_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureValueIsMutable();
value_.addAll(other.value_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.StringArrayWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.StringArrayWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringList value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureValueIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new com.google.protobuf.LazyStringArrayList(value_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated string Value = 1;</code>
*/
public com.google.protobuf.ProtocolStringList
getValueList() {
return value_.getUnmodifiableView();
}
/**
* <code>repeated string Value = 1;</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated string Value = 1;</code>
*/
public java.lang.String getValue(int index) {
return value_.get(index);
}
/**
* <code>repeated string Value = 1;</code>
*/
public com.google.protobuf.ByteString
getValueBytes(int index) {
return value_.getByteString(index);
}
/**
* <code>repeated string Value = 1;</code>
*/
public Builder setValue(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureValueIsMutable();
value_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated string Value = 1;</code>
*/
public Builder addValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureValueIsMutable();
value_.add(value);
onChanged();
return this;
}
/**
* <code>repeated string Value = 1;</code>
*/
public Builder addAllValue(
java.lang.Iterable<java.lang.String> values) {
ensureValueIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, value_);
onChanged();
return this;
}
/**
* <code>repeated string Value = 1;</code>
*/
public Builder clearValue() {
value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <code>repeated string Value = 1;</code>
*/
public Builder addValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureValueIsMutable();
value_.add(value);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:StringArrayWrapper)
}
static {
defaultInstance = new StringArrayWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:StringArrayWrapper)
}
public interface BooleanWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:BooleanWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>required bool Value = 1;</code>
*/
boolean hasValue();
/**
* <code>required bool Value = 1;</code>
*/
boolean getValue();
}
/**
* Protobuf type {@code BooleanWrapper}
*
* <pre>
* Boolean
* </pre>
*/
public static final class BooleanWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:BooleanWrapper)
BooleanWrapperOrBuilder {
// Use BooleanWrapper.newBuilder() to construct.
private BooleanWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private BooleanWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final BooleanWrapper defaultInstance;
public static BooleanWrapper getDefaultInstance() {
return defaultInstance;
}
public BooleanWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BooleanWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
bitField0_ |= 0x00000001;
value_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_BooleanWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_BooleanWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.BooleanWrapper.class, EneterProtoBufPrimitivesDeclarations.BooleanWrapper.Builder.class);
}
public static com.google.protobuf.Parser<BooleanWrapper> PARSER =
new com.google.protobuf.AbstractParser<BooleanWrapper>() {
public BooleanWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BooleanWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<BooleanWrapper> getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private boolean value_;
/**
* <code>required bool Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required bool Value = 1;</code>
*/
public boolean getValue() {
return value_;
}
private void initFields() {
value_ = false;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasValue()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBool(1, value_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, value_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.BooleanWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.BooleanWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code BooleanWrapper}
*
* <pre>
* Boolean
* </pre>
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:BooleanWrapper)
EneterProtoBufPrimitivesDeclarations.BooleanWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_BooleanWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_BooleanWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.BooleanWrapper.class, EneterProtoBufPrimitivesDeclarations.BooleanWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.BooleanWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = false;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_BooleanWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.BooleanWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.BooleanWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.BooleanWrapper build() {
EneterProtoBufPrimitivesDeclarations.BooleanWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.BooleanWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.BooleanWrapper result = new EneterProtoBufPrimitivesDeclarations.BooleanWrapper(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.value_ = value_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.BooleanWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.BooleanWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.BooleanWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.BooleanWrapper.getDefaultInstance()) return this;
if (other.hasValue()) {
setValue(other.getValue());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasValue()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.BooleanWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.BooleanWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private boolean value_ ;
/**
* <code>required bool Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required bool Value = 1;</code>
*/
public boolean getValue() {
return value_;
}
/**
* <code>required bool Value = 1;</code>
*/
public Builder setValue(boolean value) {
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
/**
* <code>required bool Value = 1;</code>
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = false;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:BooleanWrapper)
}
static {
defaultInstance = new BooleanWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:BooleanWrapper)
}
public interface BooleanArrayWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:BooleanArrayWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
java.util.List<java.lang.Boolean> getValueList();
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
int getValueCount();
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
boolean getValue(int index);
}
/**
* Protobuf type {@code BooleanArrayWrapper}
*/
public static final class BooleanArrayWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:BooleanArrayWrapper)
BooleanArrayWrapperOrBuilder {
// Use BooleanArrayWrapper.newBuilder() to construct.
private BooleanArrayWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private BooleanArrayWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final BooleanArrayWrapper defaultInstance;
public static BooleanArrayWrapper getDefaultInstance() {
return defaultInstance;
}
public BooleanArrayWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BooleanArrayWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new java.util.ArrayList<java.lang.Boolean>();
mutable_bitField0_ |= 0x00000001;
}
value_.add(input.readBool());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
value_ = new java.util.ArrayList<java.lang.Boolean>();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
value_.add(input.readBool());
}
input.popLimit(limit);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = java.util.Collections.unmodifiableList(value_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_BooleanArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_BooleanArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper.Builder.class);
}
public static com.google.protobuf.Parser<BooleanArrayWrapper> PARSER =
new com.google.protobuf.AbstractParser<BooleanArrayWrapper>() {
public BooleanArrayWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BooleanArrayWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<BooleanArrayWrapper> getParserForType() {
return PARSER;
}
public static final int VALUE_FIELD_NUMBER = 1;
private java.util.List<java.lang.Boolean> value_;
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
public java.util.List<java.lang.Boolean>
getValueList() {
return value_;
}
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
public boolean getValue(int index) {
return value_.get(index);
}
private int valueMemoizedSerializedSize = -1;
private void initFields() {
value_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getValueList().size() > 0) {
output.writeRawVarint32(10);
output.writeRawVarint32(valueMemoizedSerializedSize);
}
for (int i = 0; i < value_.size(); i++) {
output.writeBoolNoTag(value_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
dataSize = 1 * getValueList().size();
size += dataSize;
if (!getValueList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
valueMemoizedSerializedSize = dataSize;
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code BooleanArrayWrapper}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:BooleanArrayWrapper)
EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_BooleanArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_BooleanArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_BooleanArrayWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper build() {
EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper result = new EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = java.util.Collections.unmodifiableList(value_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.value_ = value_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper.getDefaultInstance()) return this;
if (!other.value_.isEmpty()) {
if (value_.isEmpty()) {
value_ = other.value_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureValueIsMutable();
value_.addAll(other.value_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.BooleanArrayWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<java.lang.Boolean> value_ = java.util.Collections.emptyList();
private void ensureValueIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new java.util.ArrayList<java.lang.Boolean>(value_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
public java.util.List<java.lang.Boolean>
getValueList() {
return java.util.Collections.unmodifiableList(value_);
}
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
public boolean getValue(int index) {
return value_.get(index);
}
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
public Builder setValue(
int index, boolean value) {
ensureValueIsMutable();
value_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
public Builder addValue(boolean value) {
ensureValueIsMutable();
value_.add(value);
onChanged();
return this;
}
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
public Builder addAllValue(
java.lang.Iterable<? extends java.lang.Boolean> values) {
ensureValueIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, value_);
onChanged();
return this;
}
/**
* <code>repeated bool Value = 1 [packed = true];</code>
*/
public Builder clearValue() {
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:BooleanArrayWrapper)
}
static {
defaultInstance = new BooleanArrayWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:BooleanArrayWrapper)
}
public interface ByteWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:ByteWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>required bytes Value = 1;</code>
*/
boolean hasValue();
/**
* <code>required bytes Value = 1;</code>
*/
com.google.protobuf.ByteString getValue();
}
/**
* Protobuf type {@code ByteWrapper}
*
* <pre>
* Byte (this is also array of bytes)
* </pre>
*/
public static final class ByteWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:ByteWrapper)
ByteWrapperOrBuilder {
// Use ByteWrapper.newBuilder() to construct.
private ByteWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private ByteWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final ByteWrapper defaultInstance;
public static ByteWrapper getDefaultInstance() {
return defaultInstance;
}
public ByteWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ByteWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
value_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_ByteWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_ByteWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.ByteWrapper.class, EneterProtoBufPrimitivesDeclarations.ByteWrapper.Builder.class);
}
public static com.google.protobuf.Parser<ByteWrapper> PARSER =
new com.google.protobuf.AbstractParser<ByteWrapper>() {
public ByteWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ByteWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<ByteWrapper> getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString value_;
/**
* <code>required bytes Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required bytes Value = 1;</code>
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
private void initFields() {
value_ = com.google.protobuf.ByteString.EMPTY;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasValue()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, value_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, value_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.ByteWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.ByteWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.ByteWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.ByteWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.ByteWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.ByteWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.ByteWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.ByteWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.ByteWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.ByteWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.ByteWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code ByteWrapper}
*
* <pre>
* Byte (this is also array of bytes)
* </pre>
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:ByteWrapper)
EneterProtoBufPrimitivesDeclarations.ByteWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_ByteWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_ByteWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.ByteWrapper.class, EneterProtoBufPrimitivesDeclarations.ByteWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.ByteWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_ByteWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.ByteWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.ByteWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.ByteWrapper build() {
EneterProtoBufPrimitivesDeclarations.ByteWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.ByteWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.ByteWrapper result = new EneterProtoBufPrimitivesDeclarations.ByteWrapper(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.value_ = value_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.ByteWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.ByteWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.ByteWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.ByteWrapper.getDefaultInstance()) return this;
if (other.hasValue()) {
setValue(other.getValue());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasValue()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.ByteWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.ByteWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
/**
* <code>required bytes Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required bytes Value = 1;</code>
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
/**
* <code>required bytes Value = 1;</code>
*/
public Builder setValue(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
/**
* <code>required bytes Value = 1;</code>
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:ByteWrapper)
}
static {
defaultInstance = new ByteWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:ByteWrapper)
}
public interface IntWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:IntWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>required int32 Value = 1;</code>
*/
boolean hasValue();
/**
* <code>required int32 Value = 1;</code>
*/
int getValue();
}
/**
* Protobuf type {@code IntWrapper}
*
* <pre>
* Int, Short and Char
* </pre>
*/
public static final class IntWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:IntWrapper)
IntWrapperOrBuilder {
// Use IntWrapper.newBuilder() to construct.
private IntWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private IntWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final IntWrapper defaultInstance;
public static IntWrapper getDefaultInstance() {
return defaultInstance;
}
public IntWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private IntWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
bitField0_ |= 0x00000001;
value_ = input.readInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_IntWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_IntWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.IntWrapper.class, EneterProtoBufPrimitivesDeclarations.IntWrapper.Builder.class);
}
public static com.google.protobuf.Parser<IntWrapper> PARSER =
new com.google.protobuf.AbstractParser<IntWrapper>() {
public IntWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new IntWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<IntWrapper> getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private int value_;
/**
* <code>required int32 Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required int32 Value = 1;</code>
*/
public int getValue() {
return value_;
}
private void initFields() {
value_ = 0;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasValue()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(1, value_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, value_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.IntWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.IntWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.IntWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.IntWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.IntWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.IntWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.IntWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.IntWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.IntWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.IntWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.IntWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code IntWrapper}
*
* <pre>
* Int, Short and Char
* </pre>
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:IntWrapper)
EneterProtoBufPrimitivesDeclarations.IntWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_IntWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_IntWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.IntWrapper.class, EneterProtoBufPrimitivesDeclarations.IntWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.IntWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_IntWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.IntWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.IntWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.IntWrapper build() {
EneterProtoBufPrimitivesDeclarations.IntWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.IntWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.IntWrapper result = new EneterProtoBufPrimitivesDeclarations.IntWrapper(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.value_ = value_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.IntWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.IntWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.IntWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.IntWrapper.getDefaultInstance()) return this;
if (other.hasValue()) {
setValue(other.getValue());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasValue()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.IntWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.IntWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int value_ ;
/**
* <code>required int32 Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required int32 Value = 1;</code>
*/
public int getValue() {
return value_;
}
/**
* <code>required int32 Value = 1;</code>
*/
public Builder setValue(int value) {
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
/**
* <code>required int32 Value = 1;</code>
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:IntWrapper)
}
static {
defaultInstance = new IntWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:IntWrapper)
}
public interface IntArrayWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:IntArrayWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
java.util.List<java.lang.Integer> getValueList();
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
int getValueCount();
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
int getValue(int index);
}
/**
* Protobuf type {@code IntArrayWrapper}
*/
public static final class IntArrayWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:IntArrayWrapper)
IntArrayWrapperOrBuilder {
// Use IntArrayWrapper.newBuilder() to construct.
private IntArrayWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private IntArrayWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final IntArrayWrapper defaultInstance;
public static IntArrayWrapper getDefaultInstance() {
return defaultInstance;
}
public IntArrayWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private IntArrayWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000001;
}
value_.add(input.readInt32());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
value_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
value_.add(input.readInt32());
}
input.popLimit(limit);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = java.util.Collections.unmodifiableList(value_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_IntArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_IntArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.IntArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.IntArrayWrapper.Builder.class);
}
public static com.google.protobuf.Parser<IntArrayWrapper> PARSER =
new com.google.protobuf.AbstractParser<IntArrayWrapper>() {
public IntArrayWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new IntArrayWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<IntArrayWrapper> getParserForType() {
return PARSER;
}
public static final int VALUE_FIELD_NUMBER = 1;
private java.util.List<java.lang.Integer> value_;
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
public java.util.List<java.lang.Integer>
getValueList() {
return value_;
}
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
public int getValue(int index) {
return value_.get(index);
}
private int valueMemoizedSerializedSize = -1;
private void initFields() {
value_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getValueList().size() > 0) {
output.writeRawVarint32(10);
output.writeRawVarint32(valueMemoizedSerializedSize);
}
for (int i = 0; i < value_.size(); i++) {
output.writeInt32NoTag(value_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < value_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(value_.get(i));
}
size += dataSize;
if (!getValueList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
valueMemoizedSerializedSize = dataSize;
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.IntArrayWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code IntArrayWrapper}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:IntArrayWrapper)
EneterProtoBufPrimitivesDeclarations.IntArrayWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_IntArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_IntArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.IntArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.IntArrayWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.IntArrayWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_IntArrayWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.IntArrayWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.IntArrayWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.IntArrayWrapper build() {
EneterProtoBufPrimitivesDeclarations.IntArrayWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.IntArrayWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.IntArrayWrapper result = new EneterProtoBufPrimitivesDeclarations.IntArrayWrapper(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = java.util.Collections.unmodifiableList(value_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.value_ = value_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.IntArrayWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.IntArrayWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.IntArrayWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.IntArrayWrapper.getDefaultInstance()) return this;
if (!other.value_.isEmpty()) {
if (value_.isEmpty()) {
value_ = other.value_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureValueIsMutable();
value_.addAll(other.value_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.IntArrayWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.IntArrayWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<java.lang.Integer> value_ = java.util.Collections.emptyList();
private void ensureValueIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new java.util.ArrayList<java.lang.Integer>(value_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
public java.util.List<java.lang.Integer>
getValueList() {
return java.util.Collections.unmodifiableList(value_);
}
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
public int getValue(int index) {
return value_.get(index);
}
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
public Builder setValue(
int index, int value) {
ensureValueIsMutable();
value_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
public Builder addValue(int value) {
ensureValueIsMutable();
value_.add(value);
onChanged();
return this;
}
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
public Builder addAllValue(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensureValueIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, value_);
onChanged();
return this;
}
/**
* <code>repeated int32 Value = 1 [packed = true];</code>
*/
public Builder clearValue() {
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:IntArrayWrapper)
}
static {
defaultInstance = new IntArrayWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:IntArrayWrapper)
}
public interface LongWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:LongWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>required int64 Value = 1;</code>
*/
boolean hasValue();
/**
* <code>required int64 Value = 1;</code>
*/
long getValue();
}
/**
* Protobuf type {@code LongWrapper}
*
* <pre>
* Long
* </pre>
*/
public static final class LongWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:LongWrapper)
LongWrapperOrBuilder {
// Use LongWrapper.newBuilder() to construct.
private LongWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private LongWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final LongWrapper defaultInstance;
public static LongWrapper getDefaultInstance() {
return defaultInstance;
}
public LongWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LongWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
bitField0_ |= 0x00000001;
value_ = input.readInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_LongWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_LongWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.LongWrapper.class, EneterProtoBufPrimitivesDeclarations.LongWrapper.Builder.class);
}
public static com.google.protobuf.Parser<LongWrapper> PARSER =
new com.google.protobuf.AbstractParser<LongWrapper>() {
public LongWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LongWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<LongWrapper> getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private long value_;
/**
* <code>required int64 Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required int64 Value = 1;</code>
*/
public long getValue() {
return value_;
}
private void initFields() {
value_ = 0L;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasValue()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt64(1, value_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, value_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.LongWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.LongWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.LongWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.LongWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.LongWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.LongWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.LongWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.LongWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.LongWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.LongWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.LongWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code LongWrapper}
*
* <pre>
* Long
* </pre>
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:LongWrapper)
EneterProtoBufPrimitivesDeclarations.LongWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_LongWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_LongWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.LongWrapper.class, EneterProtoBufPrimitivesDeclarations.LongWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.LongWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_LongWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.LongWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.LongWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.LongWrapper build() {
EneterProtoBufPrimitivesDeclarations.LongWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.LongWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.LongWrapper result = new EneterProtoBufPrimitivesDeclarations.LongWrapper(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.value_ = value_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.LongWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.LongWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.LongWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.LongWrapper.getDefaultInstance()) return this;
if (other.hasValue()) {
setValue(other.getValue());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasValue()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.LongWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.LongWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long value_ ;
/**
* <code>required int64 Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required int64 Value = 1;</code>
*/
public long getValue() {
return value_;
}
/**
* <code>required int64 Value = 1;</code>
*/
public Builder setValue(long value) {
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
/**
* <code>required int64 Value = 1;</code>
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = 0L;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:LongWrapper)
}
static {
defaultInstance = new LongWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:LongWrapper)
}
public interface LongArrayWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:LongArrayWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
java.util.List<java.lang.Long> getValueList();
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
int getValueCount();
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
long getValue(int index);
}
/**
* Protobuf type {@code LongArrayWrapper}
*/
public static final class LongArrayWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:LongArrayWrapper)
LongArrayWrapperOrBuilder {
// Use LongArrayWrapper.newBuilder() to construct.
private LongArrayWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private LongArrayWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final LongArrayWrapper defaultInstance;
public static LongArrayWrapper getDefaultInstance() {
return defaultInstance;
}
public LongArrayWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LongArrayWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new java.util.ArrayList<java.lang.Long>();
mutable_bitField0_ |= 0x00000001;
}
value_.add(input.readInt64());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
value_ = new java.util.ArrayList<java.lang.Long>();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
value_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = java.util.Collections.unmodifiableList(value_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_LongArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_LongArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.LongArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.LongArrayWrapper.Builder.class);
}
public static com.google.protobuf.Parser<LongArrayWrapper> PARSER =
new com.google.protobuf.AbstractParser<LongArrayWrapper>() {
public LongArrayWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LongArrayWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<LongArrayWrapper> getParserForType() {
return PARSER;
}
public static final int VALUE_FIELD_NUMBER = 1;
private java.util.List<java.lang.Long> value_;
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
public java.util.List<java.lang.Long>
getValueList() {
return value_;
}
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
public long getValue(int index) {
return value_.get(index);
}
private int valueMemoizedSerializedSize = -1;
private void initFields() {
value_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getValueList().size() > 0) {
output.writeRawVarint32(10);
output.writeRawVarint32(valueMemoizedSerializedSize);
}
for (int i = 0; i < value_.size(); i++) {
output.writeInt64NoTag(value_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < value_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(value_.get(i));
}
size += dataSize;
if (!getValueList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
valueMemoizedSerializedSize = dataSize;
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.LongArrayWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code LongArrayWrapper}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:LongArrayWrapper)
EneterProtoBufPrimitivesDeclarations.LongArrayWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_LongArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_LongArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.LongArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.LongArrayWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.LongArrayWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_LongArrayWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.LongArrayWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.LongArrayWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.LongArrayWrapper build() {
EneterProtoBufPrimitivesDeclarations.LongArrayWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.LongArrayWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.LongArrayWrapper result = new EneterProtoBufPrimitivesDeclarations.LongArrayWrapper(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = java.util.Collections.unmodifiableList(value_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.value_ = value_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.LongArrayWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.LongArrayWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.LongArrayWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.LongArrayWrapper.getDefaultInstance()) return this;
if (!other.value_.isEmpty()) {
if (value_.isEmpty()) {
value_ = other.value_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureValueIsMutable();
value_.addAll(other.value_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.LongArrayWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.LongArrayWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<java.lang.Long> value_ = java.util.Collections.emptyList();
private void ensureValueIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new java.util.ArrayList<java.lang.Long>(value_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
public java.util.List<java.lang.Long>
getValueList() {
return java.util.Collections.unmodifiableList(value_);
}
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
public long getValue(int index) {
return value_.get(index);
}
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
public Builder setValue(
int index, long value) {
ensureValueIsMutable();
value_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
public Builder addValue(long value) {
ensureValueIsMutable();
value_.add(value);
onChanged();
return this;
}
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
public Builder addAllValue(
java.lang.Iterable<? extends java.lang.Long> values) {
ensureValueIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, value_);
onChanged();
return this;
}
/**
* <code>repeated int64 Value = 1 [packed = true];</code>
*/
public Builder clearValue() {
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:LongArrayWrapper)
}
static {
defaultInstance = new LongArrayWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:LongArrayWrapper)
}
public interface FloatWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:FloatWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>required float Value = 1;</code>
*/
boolean hasValue();
/**
* <code>required float Value = 1;</code>
*/
float getValue();
}
/**
* Protobuf type {@code FloatWrapper}
*
* <pre>
* Float
* </pre>
*/
public static final class FloatWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:FloatWrapper)
FloatWrapperOrBuilder {
// Use FloatWrapper.newBuilder() to construct.
private FloatWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private FloatWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final FloatWrapper defaultInstance;
public static FloatWrapper getDefaultInstance() {
return defaultInstance;
}
public FloatWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private FloatWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 13: {
bitField0_ |= 0x00000001;
value_ = input.readFloat();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_FloatWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_FloatWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.FloatWrapper.class, EneterProtoBufPrimitivesDeclarations.FloatWrapper.Builder.class);
}
public static com.google.protobuf.Parser<FloatWrapper> PARSER =
new com.google.protobuf.AbstractParser<FloatWrapper>() {
public FloatWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new FloatWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<FloatWrapper> getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private float value_;
/**
* <code>required float Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required float Value = 1;</code>
*/
public float getValue() {
return value_;
}
private void initFields() {
value_ = 0F;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasValue()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeFloat(1, value_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(1, value_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.FloatWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.FloatWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.FloatWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.FloatWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.FloatWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.FloatWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.FloatWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.FloatWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.FloatWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.FloatWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.FloatWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code FloatWrapper}
*
* <pre>
* Float
* </pre>
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:FloatWrapper)
EneterProtoBufPrimitivesDeclarations.FloatWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_FloatWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_FloatWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.FloatWrapper.class, EneterProtoBufPrimitivesDeclarations.FloatWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.FloatWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = 0F;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_FloatWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.FloatWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.FloatWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.FloatWrapper build() {
EneterProtoBufPrimitivesDeclarations.FloatWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.FloatWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.FloatWrapper result = new EneterProtoBufPrimitivesDeclarations.FloatWrapper(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.value_ = value_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.FloatWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.FloatWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.FloatWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.FloatWrapper.getDefaultInstance()) return this;
if (other.hasValue()) {
setValue(other.getValue());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasValue()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.FloatWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.FloatWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private float value_ ;
/**
* <code>required float Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required float Value = 1;</code>
*/
public float getValue() {
return value_;
}
/**
* <code>required float Value = 1;</code>
*/
public Builder setValue(float value) {
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
/**
* <code>required float Value = 1;</code>
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = 0F;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:FloatWrapper)
}
static {
defaultInstance = new FloatWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:FloatWrapper)
}
public interface FloatArrayWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:FloatArrayWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
java.util.List<java.lang.Float> getValueList();
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
int getValueCount();
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
float getValue(int index);
}
/**
* Protobuf type {@code FloatArrayWrapper}
*/
public static final class FloatArrayWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:FloatArrayWrapper)
FloatArrayWrapperOrBuilder {
// Use FloatArrayWrapper.newBuilder() to construct.
private FloatArrayWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private FloatArrayWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final FloatArrayWrapper defaultInstance;
public static FloatArrayWrapper getDefaultInstance() {
return defaultInstance;
}
public FloatArrayWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private FloatArrayWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 13: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new java.util.ArrayList<java.lang.Float>();
mutable_bitField0_ |= 0x00000001;
}
value_.add(input.readFloat());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
value_ = new java.util.ArrayList<java.lang.Float>();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
value_.add(input.readFloat());
}
input.popLimit(limit);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = java.util.Collections.unmodifiableList(value_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_FloatArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_FloatArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper.Builder.class);
}
public static com.google.protobuf.Parser<FloatArrayWrapper> PARSER =
new com.google.protobuf.AbstractParser<FloatArrayWrapper>() {
public FloatArrayWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new FloatArrayWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<FloatArrayWrapper> getParserForType() {
return PARSER;
}
public static final int VALUE_FIELD_NUMBER = 1;
private java.util.List<java.lang.Float> value_;
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
public java.util.List<java.lang.Float>
getValueList() {
return value_;
}
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
public float getValue(int index) {
return value_.get(index);
}
private int valueMemoizedSerializedSize = -1;
private void initFields() {
value_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getValueList().size() > 0) {
output.writeRawVarint32(10);
output.writeRawVarint32(valueMemoizedSerializedSize);
}
for (int i = 0; i < value_.size(); i++) {
output.writeFloatNoTag(value_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
dataSize = 4 * getValueList().size();
size += dataSize;
if (!getValueList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
valueMemoizedSerializedSize = dataSize;
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code FloatArrayWrapper}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:FloatArrayWrapper)
EneterProtoBufPrimitivesDeclarations.FloatArrayWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_FloatArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_FloatArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_FloatArrayWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper build() {
EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper result = new EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = java.util.Collections.unmodifiableList(value_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.value_ = value_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper.getDefaultInstance()) return this;
if (!other.value_.isEmpty()) {
if (value_.isEmpty()) {
value_ = other.value_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureValueIsMutable();
value_.addAll(other.value_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.FloatArrayWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<java.lang.Float> value_ = java.util.Collections.emptyList();
private void ensureValueIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new java.util.ArrayList<java.lang.Float>(value_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
public java.util.List<java.lang.Float>
getValueList() {
return java.util.Collections.unmodifiableList(value_);
}
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
public float getValue(int index) {
return value_.get(index);
}
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
public Builder setValue(
int index, float value) {
ensureValueIsMutable();
value_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
public Builder addValue(float value) {
ensureValueIsMutable();
value_.add(value);
onChanged();
return this;
}
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
public Builder addAllValue(
java.lang.Iterable<? extends java.lang.Float> values) {
ensureValueIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, value_);
onChanged();
return this;
}
/**
* <code>repeated float Value = 1 [packed = true];</code>
*/
public Builder clearValue() {
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:FloatArrayWrapper)
}
static {
defaultInstance = new FloatArrayWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:FloatArrayWrapper)
}
public interface DoubleWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:DoubleWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>required double Value = 1;</code>
*/
boolean hasValue();
/**
* <code>required double Value = 1;</code>
*/
double getValue();
}
/**
* Protobuf type {@code DoubleWrapper}
*
* <pre>
* Double
* </pre>
*/
public static final class DoubleWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:DoubleWrapper)
DoubleWrapperOrBuilder {
// Use DoubleWrapper.newBuilder() to construct.
private DoubleWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private DoubleWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final DoubleWrapper defaultInstance;
public static DoubleWrapper getDefaultInstance() {
return defaultInstance;
}
public DoubleWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DoubleWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 9: {
bitField0_ |= 0x00000001;
value_ = input.readDouble();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_DoubleWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_DoubleWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.DoubleWrapper.class, EneterProtoBufPrimitivesDeclarations.DoubleWrapper.Builder.class);
}
public static com.google.protobuf.Parser<DoubleWrapper> PARSER =
new com.google.protobuf.AbstractParser<DoubleWrapper>() {
public DoubleWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DoubleWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<DoubleWrapper> getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private double value_;
/**
* <code>required double Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required double Value = 1;</code>
*/
public double getValue() {
return value_;
}
private void initFields() {
value_ = 0D;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasValue()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeDouble(1, value_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, value_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.DoubleWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.DoubleWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code DoubleWrapper}
*
* <pre>
* Double
* </pre>
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:DoubleWrapper)
EneterProtoBufPrimitivesDeclarations.DoubleWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_DoubleWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_DoubleWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.DoubleWrapper.class, EneterProtoBufPrimitivesDeclarations.DoubleWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.DoubleWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = 0D;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_DoubleWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.DoubleWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.DoubleWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.DoubleWrapper build() {
EneterProtoBufPrimitivesDeclarations.DoubleWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.DoubleWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.DoubleWrapper result = new EneterProtoBufPrimitivesDeclarations.DoubleWrapper(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.value_ = value_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.DoubleWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.DoubleWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.DoubleWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.DoubleWrapper.getDefaultInstance()) return this;
if (other.hasValue()) {
setValue(other.getValue());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasValue()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.DoubleWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.DoubleWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private double value_ ;
/**
* <code>required double Value = 1;</code>
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>required double Value = 1;</code>
*/
public double getValue() {
return value_;
}
/**
* <code>required double Value = 1;</code>
*/
public Builder setValue(double value) {
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
/**
* <code>required double Value = 1;</code>
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = 0D;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:DoubleWrapper)
}
static {
defaultInstance = new DoubleWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:DoubleWrapper)
}
public interface DoubleArrayWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:DoubleArrayWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
java.util.List<java.lang.Double> getValueList();
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
int getValueCount();
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
double getValue(int index);
}
/**
* Protobuf type {@code DoubleArrayWrapper}
*/
public static final class DoubleArrayWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:DoubleArrayWrapper)
DoubleArrayWrapperOrBuilder {
// Use DoubleArrayWrapper.newBuilder() to construct.
private DoubleArrayWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private DoubleArrayWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final DoubleArrayWrapper defaultInstance;
public static DoubleArrayWrapper getDefaultInstance() {
return defaultInstance;
}
public DoubleArrayWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DoubleArrayWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 9: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new java.util.ArrayList<java.lang.Double>();
mutable_bitField0_ |= 0x00000001;
}
value_.add(input.readDouble());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
value_ = new java.util.ArrayList<java.lang.Double>();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
value_.add(input.readDouble());
}
input.popLimit(limit);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
value_ = java.util.Collections.unmodifiableList(value_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_DoubleArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_DoubleArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper.Builder.class);
}
public static com.google.protobuf.Parser<DoubleArrayWrapper> PARSER =
new com.google.protobuf.AbstractParser<DoubleArrayWrapper>() {
public DoubleArrayWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DoubleArrayWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<DoubleArrayWrapper> getParserForType() {
return PARSER;
}
public static final int VALUE_FIELD_NUMBER = 1;
private java.util.List<java.lang.Double> value_;
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
public java.util.List<java.lang.Double>
getValueList() {
return value_;
}
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
public double getValue(int index) {
return value_.get(index);
}
private int valueMemoizedSerializedSize = -1;
private void initFields() {
value_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getValueList().size() > 0) {
output.writeRawVarint32(10);
output.writeRawVarint32(valueMemoizedSerializedSize);
}
for (int i = 0; i < value_.size(); i++) {
output.writeDoubleNoTag(value_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
dataSize = 8 * getValueList().size();
size += dataSize;
if (!getValueList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
valueMemoizedSerializedSize = dataSize;
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code DoubleArrayWrapper}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:DoubleArrayWrapper)
EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return EneterProtoBufPrimitivesDeclarations.internal_static_DoubleArrayWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return EneterProtoBufPrimitivesDeclarations.internal_static_DoubleArrayWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper.class, EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper.Builder.class);
}
// Construct using EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return EneterProtoBufPrimitivesDeclarations.internal_static_DoubleArrayWrapper_descriptor;
}
public EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper getDefaultInstanceForType() {
return EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper.getDefaultInstance();
}
public EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper build() {
EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper buildPartial() {
EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper result = new EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = java.util.Collections.unmodifiableList(value_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.value_ = value_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper) {
return mergeFrom((EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper other) {
if (other == EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper.getDefaultInstance()) return this;
if (!other.value_.isEmpty()) {
if (value_.isEmpty()) {
value_ = other.value_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureValueIsMutable();
value_.addAll(other.value_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (EneterProtoBufPrimitivesDeclarations.DoubleArrayWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<java.lang.Double> value_ = java.util.Collections.emptyList();
private void ensureValueIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
value_ = new java.util.ArrayList<java.lang.Double>(value_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
public java.util.List<java.lang.Double>
getValueList() {
return java.util.Collections.unmodifiableList(value_);
}
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
public int getValueCount() {
return value_.size();
}
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
public double getValue(int index) {
return value_.get(index);
}
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
public Builder setValue(
int index, double value) {
ensureValueIsMutable();
value_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
public Builder addValue(double value) {
ensureValueIsMutable();
value_.add(value);
onChanged();
return this;
}
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
public Builder addAllValue(
java.lang.Iterable<? extends java.lang.Double> values) {
ensureValueIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, value_);
onChanged();
return this;
}
/**
* <code>repeated double Value = 1 [packed = true];</code>
*/
public Builder clearValue() {
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:DoubleArrayWrapper)
}
static {
defaultInstance = new DoubleArrayWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:DoubleArrayWrapper)
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_StringWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_StringWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_StringArrayWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_StringArrayWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_BooleanWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_BooleanWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_BooleanArrayWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_BooleanArrayWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_ByteWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_ByteWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_IntWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_IntWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_IntArrayWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_IntArrayWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_LongWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_LongWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_LongArrayWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_LongArrayWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_FloatWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_FloatWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_FloatArrayWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_FloatArrayWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_DoubleWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_DoubleWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_DoubleArrayWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_DoubleArrayWrapper_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n*EneterProtoBufPrimitivesDeclarations.p" +
"roto\"\036\n\rStringWrapper\022\r\n\005Value\030\001 \002(\t\"#\n\022" +
"StringArrayWrapper\022\r\n\005Value\030\001 \003(\t\"\037\n\016Boo" +
"leanWrapper\022\r\n\005Value\030\001 \002(\010\"(\n\023BooleanArr" +
"ayWrapper\022\021\n\005Value\030\001 \003(\010B\002\020\001\"\034\n\013ByteWrap" +
"per\022\r\n\005Value\030\001 \002(\014\"\033\n\nIntWrapper\022\r\n\005Valu" +
"e\030\001 \002(\005\"$\n\017IntArrayWrapper\022\021\n\005Value\030\001 \003(" +
"\005B\002\020\001\"\034\n\013LongWrapper\022\r\n\005Value\030\001 \002(\003\"%\n\020L" +
"ongArrayWrapper\022\021\n\005Value\030\001 \003(\003B\002\020\001\"\035\n\014Fl" +
"oatWrapper\022\r\n\005Value\030\001 \002(\002\"&\n\021FloatArrayW",
"rapper\022\021\n\005Value\030\001 \003(\002B\002\020\001\"\036\n\rDoubleWrapp" +
"er\022\r\n\005Value\030\001 \002(\001\"\'\n\022DoubleArrayWrapper\022" +
"\021\n\005Value\030\001 \003(\001B\002\020\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_StringWrapper_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_StringWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_StringWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_StringArrayWrapper_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_StringArrayWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_StringArrayWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_BooleanWrapper_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_BooleanWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_BooleanWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_BooleanArrayWrapper_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_BooleanArrayWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_BooleanArrayWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_ByteWrapper_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_ByteWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_ByteWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_IntWrapper_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_IntWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_IntWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_IntArrayWrapper_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_IntArrayWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_IntArrayWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_LongWrapper_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_LongWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_LongWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_LongArrayWrapper_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_LongArrayWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_LongArrayWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_FloatWrapper_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_FloatWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_FloatWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_FloatArrayWrapper_descriptor =
getDescriptor().getMessageTypes().get(10);
internal_static_FloatArrayWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_FloatArrayWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_DoubleWrapper_descriptor =
getDescriptor().getMessageTypes().get(11);
internal_static_DoubleWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_DoubleWrapper_descriptor,
new java.lang.String[] { "Value", });
internal_static_DoubleArrayWrapper_descriptor =
getDescriptor().getMessageTypes().get(12);
internal_static_DoubleArrayWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_DoubleArrayWrapper_descriptor,
new java.lang.String[] { "Value", });
}
// @@protoc_insertion_point(outer_class_scope)
}
| [
"ondrej.uzovic@gmail.com"
] | ondrej.uzovic@gmail.com |
9cea0a8242cdb65549ba4964d83c227535f9b900 | 17b8dc0c16280610b669f906e50e012c397bc07f | /main/teamcode/LCHSTensorFlow.java | ce07e83853fb24e7955fbd091ce62e9b1ee1409b | [
"MIT"
] | permissive | LCHSEngineering5921/5921-Rover-Ruckus | 86a68aed9d19b9fa844ea50183e7d18217f754a7 | eba251b219fcecd1fe88e2888435b61dffde2973 | refs/heads/master | 2020-04-08T17:58:33.860903 | 2019-01-23T07:27:07 | 2019-01-23T07:27:07 | 159,588,967 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,614 | java | /* Copyright (c) 2018 FIRST. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted (subject to the limitations in the disclaimer below) provided that
* the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* Neither the name of FIRST nor the names of its contributors may be used to endorse or
* promote products derived from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS
* LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.util.RobotLog;
import org.firstinspires.ftc.robotcore.external.ClassFactory;
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer;
import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection;
import org.firstinspires.ftc.robotcore.external.tfod.Recognition;
import org.firstinspires.ftc.robotcore.external.tfod.TFObjectDetector;
import java.util.List;
/**
* This 2018-2019 OpMode illustrates the basics of using the TensorFlow Object Detection API to
* determine the position of the gold and silver minerals.
* <p>
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
* Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list.
* <p>
* IMPORTANT: In order to use this OpMode, you need to obtain your own Vuforia license key as
* is explained below.
*/
@TeleOp(name = "Concept: TensorFlow Object Detection", group = "Concept")
@Disabled
public class LCHSTensorFlow extends LinearOpMode {
private static final String TFOD_MODEL_ASSET = "RoverRuckus.tflite";
private static final String LABEL_GOLD_MINERAL = "Gold Mineral";
private static final String LABEL_SILVER_MINERAL = "Silver Mineral";
/*
* IMPORTANT: You need to obtain your own license key to use Vuforia. The string below with which
* 'parameters.vuforiaLicenseKey' is initialized is for illustration only, and will not function.
* A Vuforia 'Development' license key, can be obtained free of charge from the Vuforia developer
* web site at https://developer.vuforia.com/license-manager.
*
* Vuforia license keys are always 380 characters long, and look as if they contain mostly
* random data. As an example, here is a example of a fragment of a valid key:
* ... yIgIzTqZ4mWjk9wd3cZO9T1axEqzuhxoGlfOOI2dRzKS4T0hQ8kT ...
* Once you've obtained a license key, copy the string from the Vuforia web site
* and paste it in to your code on the next line, between the double quotes.
*/
private static final String VUFORIA_KEY = "AblqOtv/////AAAAGdNKXPkjgkKGpGIKO9aGT7wPTFlXhki/3S+80P7yBeTE37kLJOvzyL57aik4RAD6LXyHPDRMdo4PJnxwaCzQj1+8CxEv1Z/dTr1IcjnZmsGC1d6zui4rxx1docFTjjpebkimp6A95reel2toZqogkexy/txx0KPHyF09E6jzZSV9AjFlexbSLe1/SfqoMa4TRLIBgWK3/Sj/TYY/b0WAwJOJYnFoqZAtvEyasqnBG9wulo/A6UKtKmRxmiWQ6QY/x2NAi4giPONyaWRAvFvSWUQjRkTFzCc9npy10RMX4qHZK0ow79YfMnyZqnRwHAR4Fp4HzPgdnmlf0yK/lQ3jxCLKT9cDdhNcayDeOrx6Y197";
/**8
* {@link #vuforia} is the variable we will use to store our instance of the Vuforia
* localization engine.
*/
private VuforiaLocalizer vuforia;
/**
* {@link #tfod} is the variable we will use to store our instance of the Tensor Flow Object
* Detection engine.
*/
private TFObjectDetector tfod;
@Override
public void runOpMode() {
// The TFObjectDetector uses the camera frames from the VuforiaLocalizer, so we create that
// first.
initVuforia();
if (ClassFactory.getInstance().canCreateTFObjectDetector()) {
initTfod();
} else {
telemetry.addData("Sorry!", "This device is not compatible with TFOD");
}
/** Wait for the game to begin */
telemetry.addData(">", "Press Play to start tracking");
telemetry.update();
waitForStart();
if (opModeIsActive()) {
/** Activate Tensor Flow Object Detection. */
if (tfod != null) {
tfod.activate();
}
while (opModeIsActive()) {
if (tfod != null) {
// getUpdatedRecognitions() will return null if no new information is available since
// the last time that call was made.
List<Recognition> updatedRecognitions = tfod.getUpdatedRecognitions();
if (updatedRecognitions != null) {
if (updatedRecognitions.size() != 0) {
telemetry.addData("# Objects Detected", updatedRecognitions.size());
RobotLog.dd("Tensor", "Number of objects detected " + updatedRecognitions.size());
String label = null;
int left = 0;
int right = 0;
double angle = 0.0;
double top = 0.0;
double bottom = 0;
float height = 0.0f;
float width = 0.0f;
float confidence = 0.0f;
for (Recognition recognition : updatedRecognitions) {
label = recognition.getLabel();
if (label.equals(LABEL_GOLD_MINERAL) || (label.equals(LABEL_SILVER_MINERAL))) {
left = (int) recognition.getLeft();
right = (int) recognition.getRight();
angle = recognition.estimateAngleToObject(AngleUnit.DEGREES);
top = recognition.getTop();
bottom = recognition.getBottom();
height = recognition.getHeight();
width = recognition.getWidth();
confidence = recognition.getConfidence();
telemetry.addData("Found mineral", recognition.getLabel());
RobotLog.dd("Tensor", "Found " + label);
RobotLog.dd("Tensor", "Left " + left + ", Right " + right);
RobotLog.dd("Tensor", "Top " + top + ", Bottom " + bottom);
RobotLog.dd("Tensor", "Height " + height + ", Width " + width);
RobotLog.dd("Tensor", "Angle " + angle + ", Confidence " + confidence);
}
}
}
telemetry.update();
android.os.SystemClock.sleep(3000); // limit logging
}
}
}
}
if (tfod != null) {
tfod.shutdown();
}
}
/**
* Initialize the Vuforia localization engine.
*/
private void initVuforia() {
/*
* Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.
*/
VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();
parameters.vuforiaLicenseKey = VUFORIA_KEY;
parameters.cameraDirection = CameraDirection.BACK;
// Instantiate the Vuforia engine
vuforia = ClassFactory.getInstance().createVuforia(parameters);
// Loading trackables is not necessary for the Tensor Flow Object Detection engine.
}
/**
* Initialize the Tensor Flow Object Detection engine.
*/
private void initTfod() {
int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(
"tfodMonitorViewId", "id", hardwareMap.appContext.getPackageName());
TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);
tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);
tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);
}
}
| [
"lchsrobotics5921@gmail.com"
] | lchsrobotics5921@gmail.com |
572636b1d65e671413c245844eea4d6843dd336d | 77b01cd9fbd58123c79941c6891d1da053ba2fe5 | /src/com/gsh/dao/ProvinceDao.java | 7020da8b9ad32c1057f9ecfbb784c1534bbdea9b | [] | no_license | gsh978079141/JXXKHotel | 01f789f22edc105b074d28a5e9fb60893f786db5 | 284ad01c87197fbb05ad6570fe4dcd1b5c8e056d | refs/heads/master | 2021-09-10T15:34:12.589853 | 2018-03-28T15:54:01 | 2018-03-28T15:54:01 | 125,835,409 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 265 | java | package com.gsh.dao;
import java.util.List;
import com.gsh.base.BaseDAO;
import com.gsh.model.City;
import com.gsh.model.Province;
public interface ProvinceDao extends BaseDAO<Province>{
List<City> findCitiesByProId(int parseInt) throws Exception;
}
| [
"978079141@qq.com"
] | 978079141@qq.com |
df875f4e8b24e1a1be290ab562a3ca71d9c3734d | 4b9ba0065b0f114fd87ef8f5d789503f830956e5 | /app/src/main/java/com/chrislai/chris/amitofu2/MainActivity.java | 7fe86eb7a9b26408a1250b335fe952bc616f3936 | [] | no_license | chrislai0621/Amitofu | 5c4f64ce5c59b00ffa7c5856ae85fb581018067b | 00c6f1e3db426e6abcc83f6d493fdf6e79023096 | refs/heads/master | 2020-06-03T02:36:39.171672 | 2019-06-11T15:36:48 | 2019-06-11T15:36:48 | 191,399,165 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,009 | java | package com.chrislai.chris.amitofu2;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import com.google.android.gms.ads.AdView;
public class MainActivity extends AppCompatActivity {
private LinearLayout LinearLayout1;
private Button mBtnTitle1, mBtnTitle2, mBtnTitle3, mBtnTitle4, mBtnTitle5, mBtnTitle6;
private Button[] mArrayBtn = {mBtnTitle1, mBtnTitle2, mBtnTitle3, mBtnTitle4, mBtnTitle5, mBtnTitle6};
private String[] mArrayTCTitle;
private String[] mArraySCTitle;
public static int contextIndex; //第幾篇經文
static int ScreenWidth;
static int ScreenHight;
private SharedPreferences sp;
private AdView mAdView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Init();
setBtnText();
// mAdView = (AdView) findViewById(R.id.adView);
// AdRequest adRequest = new AdRequest.Builder().build();
// mAdView.loadAd(adRequest);
}
private void Init() {
LinearLayout1 = (LinearLayout) findViewById(R.id.LinearLayout1);
mArrayBtn[0] = (Button) findViewById(R.id.btnTitle1);
mArrayBtn[1] = (Button) findViewById(R.id.btnTitle2);
mArrayBtn[2] = (Button) findViewById(R.id.btnTitle3);
mArrayBtn[3] = (Button) findViewById(R.id.btnTitle4);
mArrayBtn[4] = (Button) findViewById(R.id.btnTitle5);
mArrayBtn[5] = (Button) findViewById(R.id.btnTitle6);
mArrayTCTitle = getResources().getStringArray(R.array.tc_title);
mArraySCTitle = getResources().getStringArray(R.array.sc_title);
sp = getSharedPreferences("PREF_LOGIN",
Context.MODE_PRIVATE);
Setting.Language = sp.getString("language", "TC");
Setting.fontSize = sp.getInt("fontsize", 20);
// Toast.makeText(this,Setting.Language+","+Setting.fontSize ,Toast.LENGTH_LONG).show();
}
private void setBtnText() {
switch (Setting.Language) {
case "TC":
for (int i = 0; i < mArrayBtn.length; i++) {
mArrayBtn[i].setText(mArrayTCTitle[i]);
mArrayBtn[i].setTextSize(Setting.fontSize);
}
break;
case "SC":
for (int i = 0; i < mArrayBtn.length; i++) {
mArrayBtn[i].setText(mArraySCTitle[i]);
mArrayBtn[i].setTextSize(Setting.fontSize);
}
break;
}
}
// public boolean onCreateOptionsMenu(Menu menu) {
// super.onCreateOptionsMenu(menu);
// /*建立選單*/
// menu.add(0, 0, Menu.NONE, "設定/设定");
// menu.add(0, 1, Menu.NONE, "關於/关于");
// return true;
//
// }
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// menu.add(0, 1, 0, "選單一");//groupid,itemid,order,選單名稱
// menu.add(0, 2, 0, "選單二");
getMenuInflater().inflate(R.menu.mymenu, menu);
return super.onCreateOptionsMenu(menu);
}
public boolean onOptionsItemSelected(MenuItem item) {
// if (item.getGroupId() == 0) {
// switch (item.getItemId()) {
// case 0:
// Intent intent = new Intent(this, Setting.class);
// this.startActivity(intent);
// break;
// case 1:
// Intent intent2 = new Intent(this, About.class);
// this.startActivity(intent2);
// break;
//
// }
// }
switch (item.getItemId()) {
case R.id.menu1:
Intent intent = new Intent(this, Setting.class);
this.startActivity(intent);
break;
case R.id.menu2:
Intent intent2 = new Intent(this, About.class);
this.startActivity(intent2);
break;
}
return super.onOptionsItemSelected(item);
}
public void NextPage(View v) {
switch (v.getId()) {
case R.id.btnTitle1:
contextIndex = 0;
break;
case R.id.btnTitle2:
contextIndex = 1;
break;
case R.id.btnTitle3:
contextIndex = 2;
break;
case R.id.btnTitle4:
contextIndex = 3;
break;
case R.id.btnTitle5:
contextIndex = 4;
break;
case R.id.btnTitle6:
contextIndex = 5;
break;
}
Intent in = new Intent(this, Context.class);
startActivity(in);
}
}
| [
"kristy.lai621@gmail.com"
] | kristy.lai621@gmail.com |
0e5965213b0843a963532165397963abba82e26d | 54b09bdfbf59ba935de8185a7d43a85aa18e5a75 | /9 - Generator transakcji - Docker/src/main/java/Config/AppConfig.java | 8a7c0c7f97d99dcfd2ff206738da2bea9926f6b3 | [] | no_license | timur27/Java-Study | 4157b9a4379930b009e5db06ff3852abbd6ee3db | 2bbcb242fec8a3927e38018d2cc5f6109febcc16 | refs/heads/master | 2021-04-12T01:57:04.162155 | 2018-06-14T08:13:22 | 2018-06-14T08:13:22 | 125,753,174 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,522 | java | package Config;
import Logic.OptionsFiller;
import Logic.OptionsGenerator;
import Logic.TransactionGenerator;
import Reader.Parser;
import Writer.JSONWriter;
import Writer.XMLWriter;
import Writer.YAMLWriter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class AppConfig {
@Bean(name = "OptionsFiller")
public OptionsFiller optionsFiller(){
OptionsFiller optionsFiller = new OptionsFiller();
return optionsFiller;
}
@Bean(name = "Parser")
public Parser parser(){
Parser parser = new Parser();
return parser;
}
@Bean(name = "TransactionGenerator")
public TransactionGenerator transactionGenerator(){
TransactionGenerator transactionGenerator = new TransactionGenerator();
return transactionGenerator;
}
@Bean(name = "OptionsGenerator")
public OptionsGenerator optionsGenerator(){
OptionsGenerator optionsGenerator = new OptionsGenerator();
return optionsGenerator;
}
@Bean(name = "XMLWriter")
public XMLWriter xmlWriter(){
XMLWriter xmlWriter = new XMLWriter();
return xmlWriter;
}
@Bean(name = "JSONWriter")
public JSONWriter jsonWriter(){
JSONWriter jsonWriter = new JSONWriter();
return jsonWriter;
}
@Bean(name = "YAMLWriter")
public YAMLWriter yamlWriter(){
YAMLWriter yamlWriter = new YAMLWriter();
return yamlWriter;
}
}
| [
"timur.karimow.95@gmail.com"
] | timur.karimow.95@gmail.com |
e202a50ad2d97ea6d0cc8f45ad6df8cbbb8e26b1 | 2b2ef83a39ed6b9ce8c3aa3153b9d0f759a59372 | /javasource/timeseriesconnector/actions/JA_SearchMeasurementsBetweenDates_Periodic.java | 5e303843775ccfe880c71d8e02e47db10520bb2a | [
"Apache-2.0"
] | permissive | Mcpoowl/TimeSeriesConnector | 8bf5f234b6f9eeffb1adc73c95deb4bc7e276e91 | 9cf3421162e2e9f88db6731d9f8142152aa11cf8 | refs/heads/master | 2021-01-21T23:08:51.204769 | 2019-05-24T06:22:27 | 2019-05-24T06:22:27 | 95,194,112 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,923 | java | // This file was generated by Mendix Modeler.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
// Special characters, e.g., é, ö, à, etc. are supported in comments.
package timeseriesconnector.actions;
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.webui.CustomJavaAction;
import com.mendix.systemwideinterfaces.core.IMendixObject;
public class JA_SearchMeasurementsBetweenDates_Periodic extends CustomJavaAction<java.util.List<IMendixObject>>
{
private String assetID;
private String channelKey;
private String measurementType;
private String period;
private Long dateTimeStart;
private Long dateTimeEnd;
private String zoneID;
private IMendixObject measurementParameter;
public JA_SearchMeasurementsBetweenDates_Periodic(IContext context, String assetID, String channelKey, String measurementType, String period, Long dateTimeStart, Long dateTimeEnd, String zoneID, IMendixObject measurementParameter)
{
super(context);
this.assetID = assetID;
this.channelKey = channelKey;
this.measurementType = measurementType;
this.period = period;
this.dateTimeStart = dateTimeStart;
this.dateTimeEnd = dateTimeEnd;
this.zoneID = zoneID;
this.measurementParameter = measurementParameter;
}
@Override
public java.util.List<IMendixObject> executeAction() throws Exception
{
// BEGIN USER CODE
throw new com.mendix.systemwideinterfaces.MendixRuntimeException("Java action was not implemented");
// END USER CODE
}
/**
* Returns a string representation of this action
*/
@Override
public String toString()
{
return "JA_SearchMeasurementsBetweenDates_Periodic";
}
// BEGIN EXTRA CODE
// END EXTRA CODE
}
| [
"ketelaars@gmail.com"
] | ketelaars@gmail.com |
2c67f2b77ab960e62b775defbec186623f242eb0 | 0388fe30e05a96b920d891055735c8ec4078656d | /workflows/src/test/java/com/template/NodeDriver.java | 3d330fcb8553f98284834075576534ca264d9d0f | [
"Apache-2.0"
] | permissive | Yara1990/twoPartyContract_r3_corda | 64220dfafeff77900a8f102032057bd67add43da | 51c5c28419c801bb041d0cb1498988486e8f97e5 | refs/heads/master | 2022-12-26T09:39:44.828232 | 2020-09-26T05:33:53 | 2020-09-26T05:33:53 | 298,652,293 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,567 | java | package com.template;
import com.google.common.collect.ImmutableList;
import net.corda.core.identity.CordaX500Name;
import net.corda.testing.driver.DriverParameters;
import net.corda.testing.driver.NodeParameters;
import net.corda.testing.node.User;
import com.google.common.collect.ImmutableSet;
import java.util.List;
import static net.corda.testing.driver.Driver.driver;
/**
* Allows you to run your nodes through an IDE (as opposed to using deployNodes). Do not use in a production
* environment.
*/
public class NodeDriver {
public static void main(String[] args) {
final List<User> rpcUsers =
ImmutableList.of(new User("user1", "test", ImmutableSet.of("ALL")));
driver(new DriverParameters().withStartNodesInProcess(true).withWaitForAllNodesToFinish(true), dsl -> {
try {
dsl.startNode(new NodeParameters()
.withProvidedName(new CordaX500Name("HSBC", "London", "GB"))
.withRpcUsers(rpcUsers)).get();
dsl.startNode(new NodeParameters()
.withProvidedName(new CordaX500Name("WellsFargo", "New York", "US"))
.withRpcUsers(rpcUsers)).get();
} catch (Throwable e) {
System.err.println("Encountered exception in node startup: " + e.getMessage());
e.printStackTrace();
}
return null;
}
);
}
}
| [
"yara.developer@gmail.com"
] | yara.developer@gmail.com |
7854b3c68c6779c67583253f71eaf3badc476268 | 1ed33f4d24b7e094b1a9f4ef78ceba63697888a7 | /src/main/java/com/king/blockchainexplorer/po/TransactionDetail.java | ef3cc63f2b0070c1c92fc2ebeb94148e3c48d0e5 | [] | no_license | KingBaby1228/blockchainexplorer | 91dca3796dead681d17da69c60611258f96029e5 | 45d2bcb6536219c42ef2630762ad9bc87cac8487 | refs/heads/master | 2020-05-14T00:15:37.360850 | 2019-04-26T05:33:54 | 2019-04-26T05:33:54 | 181,678,291 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 423 | java | package com.king.blockchainexplorer.po;
public class TransactionDetail extends TransactionDetailKey {
private Byte type;
private Double amount;
public Byte getType() {
return type;
}
public void setType(Byte type) {
this.type = type;
}
public Double getAmount() {
return amount;
}
public void setAmount(Double amount) {
this.amount = amount;
}
} | [
"keaide772349718@foxmail.com"
] | keaide772349718@foxmail.com |
6bd22f1bce92274f87b16eace33f429fc94e14ee | 91e37be0b02b36f0545b5e9f48c8959c70b5f3dc | /Java/SystemStudy/java_oop/src/com/pcq/_extends/Gender.java | 3dfd36e22a1b5820bfdc4f6253dbe2b62bf4ae23 | [] | no_license | PeiChangqiang/StudySpace | 698e801b55601a910e2e13ecab6fee8bb146c865 | 8c64f2262c77545e4cf0aadb50f13640791a3141 | refs/heads/master | 2022-07-18T14:06:20.689144 | 2021-02-09T13:30:17 | 2021-02-09T13:30:17 | 143,507,661 | 0 | 1 | null | 2022-06-21T03:51:11 | 2018-08-04T07:28:08 | HTML | WINDOWS-1252 | Java | false | false | 140 | java | package com.pcq._extends;
public class Gender {
public static final String MALE = "ÄÐ";
public static final String FEMALE = "Å®";
}
| [
"1156368718@qq.com"
] | 1156368718@qq.com |
32329aae4b8374258d85a880348de4eebdff07df | a06704dc03bc5bfb39a3eeb551472155f91006db | /java/AULAS/src/lacosDeRepeticaoEmJavaEx6.java | 46f08fcf0f9d3685001e39b528adaff9cd8f0bf6 | [] | no_license | carol-gonzalez/turma30java | f3214bd30b6c49102dd9cd40cb9ed44286207a3e | 34260cfdbb71b597d896a73c503a84dbd2447f7a | refs/heads/main | 2023-08-10T16:58:45.495821 | 2021-09-13T18:53:20 | 2021-09-13T18:53:20 | 388,225,635 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 692 | java | import java.util.Scanner;
/*
Escrever um programa que receba vários números inteiros no teclado. E no
final imprimir a média dos números múltiplos de 3. Para sair digitar
0(zero).
*/
public class lacosDeRepeticaoEmJavaEx6 {
public static void main(String[] args) {
Scanner leia = new Scanner(System.in);
int numero;
int soma = 0;
int media = 0;
int quantidade = 0;
do {
System.out.println("Digite um número: ");
numero = leia.nextInt();
if (numero % 3 == 0) {
quantidade++;
soma += numero;
}
} while (numero != 0);
media = soma / quantidade;
System.out.printf("A média dos números múltiplos de 3 é: %d." ,media);
}
}
| [
"98carolinagonzalez@gmail.com"
] | 98carolinagonzalez@gmail.com |
72d2539276b98e4b3eb5391b2b6622d01b79de59 | 91ac53d48b6375cb03dc1653e32aaf7a7c8c4226 | /vkbot/src/main/java/rf/androidovshchik/vk_bot_android_sdk/callbacks/CallbackTriple.java | 70dc7b23d7bb158e4e1bed692b74e410ef5decd1 | [] | no_license | androidovshchik/VKBotOnAndroid | 8c642e490d5991879e80859436a31237d145dc25 | 421a08112f82031e02d6c07e003e7cdb81f04962 | refs/heads/master | 2020-03-25T10:31:31.436822 | 2018-08-10T17:31:39 | 2018-08-10T17:31:39 | 143,695,615 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 218 | java | package rf.androidovshchik.vk_bot_android_sdk.callbacks;
/**
* Created by PeterSamokhin on 29/09/2017 00:27
*/
public interface CallbackTriple<T, M, R> extends AbstractCallback {
void onEvent(T t, M m, R r);
}
| [
"gimrcpp@gmail.com"
] | gimrcpp@gmail.com |
8b8277a746225d8fc8a5c1afc99b0672bf7a90e1 | 9012f4ef50b219d7aaa33287d15030b69d891716 | /src/main/java/com/example/demo/CarAssignmentApplication.java | b6d9eef8ae12d65e6a285e20274b3de79a64bbb0 | [] | no_license | luiz158/CarAssignment | bc35fa55f31a81999c65c2463b5891216a636f35 | 97e30a0a4a7b38c8a20ee4a91deb356fa8d3f33b | refs/heads/master | 2020-12-23T23:07:00.464503 | 2018-11-01T21:06:01 | 2018-11-01T21:06:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 334 | java | package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class CarAssignmentApplication {
public static void main(String[] args) {
SpringApplication.run(CarAssignmentApplication.class, args);
}
}
| [
"sehrishwilliam@gmail.com"
] | sehrishwilliam@gmail.com |
eba70e6c7317c39a032b71b993594cbb3a9764b8 | 86a5a8896a35fb385c9b13b15cbdc5a29db3a598 | /app/src/main/java/com/example/graeme/dnd5echaracterroller/RollArrayAdapter.java | 9663b0b14238cd5be3905c160ada11709fa92301 | [] | no_license | WarSame/DnD5eCharacterRoller | 2bb6768238f976e3e2a29980fea023b362331fab | bda4c4fd2bd6b5915d71d2e455c2ba75d9924cba | refs/heads/master | 2021-01-10T15:25:55.473188 | 2015-11-21T02:59:55 | 2015-11-21T02:59:55 | 44,063,166 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,251 | java | package com.example.graeme.dnd5echaracterroller;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
public class RollArrayAdapter extends ArrayAdapter<RollStringEnum> {
private final Context context;
private final RollStringEnum[] values;
public RollArrayAdapter(Context context, RollStringEnum[] values) {
super(context, R.layout.roll_layout, values);
this.context = context;
this.values = values;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rowView = inflater.inflate(R.layout.roll_layout, parent, false);
TextView textView = (TextView) rowView.findViewById(R.id.rollname);
ImageView imageView = (ImageView) rowView.findViewById(R.id.rollicon);
textView.setText(values[position].getRollString());
// Change icon based on name
imageView.setImageResource(values[position].getRollIcon());
return rowView;
}
} | [
"graemecliffe@gmail.com"
] | graemecliffe@gmail.com |
7849d12c8cf69b4f901cdc80290ad16102cd3356 | 14746c4b8511abe301fd470a152de627327fe720 | /soroush-android-1.10.0_source_from_JADX/com/google/android/gms/internal/zzcew.java | eb81800123960375494c067385da3434fbac2e22 | [] | no_license | maasalan/soroush-messenger-apis | 3005c4a43123c6543dbcca3dd9084f95e934a6f4 | 29867bf53a113a30b1aa36719b1c7899b991d0a8 | refs/heads/master | 2020-03-21T21:23:20.693794 | 2018-06-28T19:57:01 | 2018-06-28T19:57:01 | 139,060,676 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,642 | java | package com.google.android.gms.internal;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.aa;
import java.util.Arrays;
import java.util.List;
@Deprecated
public final class zzcew extends zzbej {
public static final Creator<zzcew> CREATOR = new en();
private final String f18514a;
private final String f18515b;
private final List<zzceu> f18516c;
zzcew(String str, String str2, List<zzceu> list) {
this.f18514a = str;
this.f18515b = str2;
this.f18516c = list;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof zzcew)) {
return false;
}
zzcew com_google_android_gms_internal_zzcew = (zzcew) obj;
return this.f18514a.equals(com_google_android_gms_internal_zzcew.f18514a) && this.f18515b.equals(com_google_android_gms_internal_zzcew.f18515b) && this.f18516c.equals(com_google_android_gms_internal_zzcew.f18516c);
}
public final int hashCode() {
return Arrays.hashCode(new Object[]{this.f18514a, this.f18515b, this.f18516c});
}
public final String toString() {
return aa.m4373a(this).m4375a("accountName", this.f18514a).m4375a("placeId", this.f18515b).m4375a("placeAliases", this.f18516c).toString();
}
public final void writeToParcel(Parcel parcel, int i) {
i = dm.m4723a(parcel, 20293);
dm.m4733a(parcel, 1, this.f18514a);
dm.m4733a(parcel, 2, this.f18515b);
dm.m4745c(parcel, 6, this.f18516c);
dm.m4742b(parcel, i);
}
}
| [
"Maasalan@riseup.net"
] | Maasalan@riseup.net |
ba72d7b96b3e128a1611e070462152449abd3938 | 0e8a901968ee105c9d0dc89216266f58cd29e567 | /Module4/case_study/furama_resort_management_application/src/main/java/com/codegym/model/repository/IEducationDegreeRepository.java | 975f3611f0226e978fcd45cefceca9e147844b76 | [] | no_license | acuonghero/C0221G1-NguyenVanCuong | 6529879af6b3fc7a9b1191fa93c727779e9e07db | b85b14c57158066ed753f43797c409fc403b18ce | refs/heads/main | 2023-06-28T11:40:32.459616 | 2021-08-02T04:04:51 | 2021-08-02T04:04:51 | 342,121,070 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 303 | java | package com.codegym.model.repository;
import com.codegym.model.entity.EducationDegree;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface IEducationDegreeRepository extends CrudRepository<EducationDegree,Long> {
}
| [
"acuonghero@gmail.com"
] | acuonghero@gmail.com |
81b8357b16fd26b7f010f404ac9a6e321dae99cd | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/4874535d59de2aced9de57621ebfdae1061bb3a6/before/ModuleLibraryOrderEntryImpl.java | 4eb82b914040cc4a694d47495e4467a36428a12b | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,253 | 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.openapi.roots.impl;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.roots.*;
import com.intellij.openapi.roots.impl.libraries.LibraryEx;
import com.intellij.openapi.roots.impl.libraries.LibraryTableImplUtil;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.libraries.LibraryType;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.openapi.vfs.pointers.VirtualFilePointerManager;
import com.intellij.util.PathUtil;
import org.jdom.Element;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
/**
* Library entry for module ("in-place") libraries
* @author dsl
*/
public class ModuleLibraryOrderEntryImpl extends LibraryOrderEntryBaseImpl implements LibraryOrderEntry, ClonableOrderEntry, WritableOrderEntry {
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.roots.impl.LibraryOrderEntryImpl");
private final Library myLibrary;
@NonNls public static final String ENTRY_TYPE = "module-library";
private boolean myExported;
@NonNls public static final String EXPORTED_ATTR = "exported";
//cloning
private ModuleLibraryOrderEntryImpl(Library library, RootModelImpl rootModel, boolean isExported, DependencyScope scope) {
super(rootModel, ProjectRootManagerImpl.getInstanceImpl(rootModel.getProject()));
myLibrary = ((LibraryEx)library).cloneLibrary(getRootModel());
doinit();
myExported = isExported;
myScope = scope;
}
ModuleLibraryOrderEntryImpl(String name, final LibraryType<?> type, RootModelImpl rootModel, ProjectRootManagerImpl projectRootManager) {
super(rootModel, projectRootManager);
myLibrary = LibraryTableImplUtil.createModuleLevelLibrary(name, type, getRootModel());
doinit();
}
ModuleLibraryOrderEntryImpl(Element element, RootModelImpl rootModel, ProjectRootManagerImpl projectRootManager) throws InvalidDataException {
super(rootModel, projectRootManager);
LOG.assertTrue(ENTRY_TYPE.equals(element.getAttributeValue(OrderEntryFactory.ORDER_ENTRY_TYPE_ATTR)));
myExported = element.getAttributeValue(EXPORTED_ATTR) != null;
myScope = DependencyScope.readExternal(element);
myLibrary = LibraryTableImplUtil.loadLibrary(element, getRootModel());
doinit();
}
private void doinit() {
Disposer.register(this, myLibrary);
init();
}
@Override
public void dispose() {
super.dispose();
}
protected RootProvider getRootProvider() {
return myLibrary.getRootProvider();
}
public Library getLibrary() {
return myLibrary;
}
public boolean isModuleLevel() {
return true;
}
public String getLibraryName() {
return myLibrary.getName();
}
public String getLibraryLevel() {
return LibraryTableImplUtil.MODULE_LEVEL;
}
public String getPresentableName() {
final String name = myLibrary.getName();
if (name != null) {
return name;
}
else {
if (myLibrary instanceof LibraryEx && ((LibraryEx)myLibrary).isDisposed()) {
return "<unknown>";
}
final String[] urls = myLibrary.getUrls(OrderRootType.CLASSES);
if (urls.length > 0) {
String url = urls[0];
return PathUtil.toPresentableUrl(url);
}
else {
return null;
}
}
}
public boolean isValid() {
return !isDisposed() && myLibrary != null;
}
public <R> R accept(RootPolicy<R> policy, R initialValue) {
return policy.visitLibraryOrderEntry(this, initialValue);
}
public boolean isSynthetic() {
return true;
}
public OrderEntry cloneEntry(RootModelImpl rootModel,
ProjectRootManagerImpl projectRootManager,
VirtualFilePointerManager filePointerManager) {
return new ModuleLibraryOrderEntryImpl(myLibrary, rootModel, myExported, myScope);
}
public void writeExternal(Element rootElement) throws WriteExternalException {
final Element element = OrderEntryFactory.createOrderEntryElement(ENTRY_TYPE);
if (myExported) {
element.setAttribute(EXPORTED_ATTR, "");
}
myScope.writeExternal(element);
myLibrary.writeExternal(element);
rootElement.addContent(element);
}
public boolean isExported() {
return myExported;
}
public void setExported(boolean value) {
myExported = value;
}
@NotNull
public DependencyScope getScope() {
return myScope;
}
public void setScope(@NotNull DependencyScope scope) {
myScope = scope;
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
5cc30125dc49eaa4175786b7657fe59371163f99 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a266/A266797Test.java | 8028280ae2a8819c2c06ddd2351716af6b4790bb | [] | 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.a266;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A266797Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
251ee25b3bb538ed17dd877ca614e26b16e72752 | 1fb843b05318b0c6bd2d58600d592f15ecee5dde | /startallplayer/src/test/java/com/blue/startallplayer/ExampleUnitTest.java | 6cf13a77c38863fb483e7867fb346c9568438f33 | [] | no_license | lantian0314/BlueMediaPlayer | ae4b93fd08352a417c3b448545dae0fa90c6c959 | 83a196c4a236cd911635d4d7fa3c687b017ac645 | refs/heads/master | 2020-03-07T20:17:29.728078 | 2018-08-07T06:15:08 | 2018-08-07T06:15:08 | 127,693,622 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 384 | java | package com.blue.startallplayer;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"384289339@qq.com"
] | 384289339@qq.com |
9dfbda72ccb672500ee4fb9c1c7e964ff075ecb0 | f51e706d0607dd08cf32119ed68f46ed615b308f | /CommandLine/examples/com/virtenio/preon32/examples/advanced/varisen/ITG3200Example.java | d7da898e52063e36af2687d85c3ce90a87e93d9f | [] | no_license | felicia-11/WSN-FTSP | 6b4ca3523a56ca560953865a1fa525a15bf7096c | 8c705959352a02da1e61c8c38e4f4e9ebf9cf6db | refs/heads/master | 2020-06-27T14:52:58.626117 | 2019-11-25T08:40:29 | 2019-11-25T08:40:29 | 199,981,158 | 2 | 1 | null | null | null | null | ISO-8859-1 | Java | false | false | 2,248 | java | /*
* Copyright (c) 2011., Virtenio GmbH
* All rights reserved.
*
* Commercial software license.
* Only for test and evaluation purposes.
* Use in commercial products prohibited.
* No distribution without permission by Virtenio.
* Ask Virtenio for other type of license at info@virtenio.de
*
* Kommerzielle Softwarelizenz.
* Nur zum Test und Evaluierung zu verwenden.
* Der Einsatz in kommerziellen Produkten ist verboten.
* Ein Vertrieb oder eine Veröffentlichung in jeglicher Form ist nicht ohne Zustimmung von Virtenio erlaubt.
* Für andere Formen der Lizenz nehmen Sie bitte Kontakt mit info@virtenio.de auf.
*/
package com.virtenio.preon32.examples.advanced.varisen;
import java.util.Arrays;
import com.virtenio.driver.device.ITG3200;
import com.virtenio.driver.gpio.GPIO;
import com.virtenio.driver.gpio.NativeGPIO;
import com.virtenio.driver.i2c.I2C;
import com.virtenio.driver.i2c.NativeI2C;
/**
* Example application for the Triple-Axis Gyro sensor ITG3200.
*/
public class ITG3200Example {
private NativeI2C i2c;
private ITG3200 gyroSensor;
private GPIO gyroFrameSyncPin;
private GPIO gyroIrqPin;
private void init() throws Exception {
System.out.println("ITG3200(Init)");
// open I2C instance where the sensor is connected to
i2c = NativeI2C.getInstance(1);
i2c.open(I2C.DATA_RATE_400);
// get gyro pins, not used in this example
gyroFrameSyncPin = NativeGPIO.getInstance(1);
gyroIrqPin = NativeGPIO.getInstance(0);
// create gyro sensor instance
gyroSensor = new ITG3200(i2c, ITG3200.ADDR_L);
gyroSensor.open();
System.out.println("Done(Init)");
}
public void run() throws Exception {
init();
short[] gyroValues = new short[3];
int gyroTRaw = 0;
float gyroT = 0;
while (true) {
try {
gyroSensor.getGyroRaw(gyroValues, 0);
gyroTRaw = gyroSensor.getTemperatureRaw();
gyroT = ITG3200.convertRawTemperatureToCelsius(gyroTRaw);
System.out.print("ITG3200: " + Arrays.toString(gyroValues));
System.out.println(", rawT=" + gyroTRaw + ", T=" + gyroT);
Thread.sleep(1000);
} catch (Exception e) {
System.out.println("ITG3200 error");
}
}
}
public static void main(String[] args) throws Exception {
new ITG3200Example().run();
}
}
| [
"feliciachristiany@yahoo.com"
] | feliciachristiany@yahoo.com |
45ef589173702f1fd9c934c9939d5f9423a02473 | 07ec674fc957af38488147b402e95523c190683f | /localtion/src/main/java/com/ydh/gva/location/util/PingYinUtil.java | 3ff5bbcdc03b9ec1d59913b670fdf61fc29bd244 | [] | no_license | liujianying/GvaAppNew | 66eec0775cdcf064fcdb147ab1156695dafee578 | 0168faa240c6925e957a568a21d531fcf17ba8fc | refs/heads/master | 2020-05-18T12:14:25.633089 | 2015-06-12T08:14:58 | 2015-06-12T08:14:58 | 37,310,485 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,233 | java | package com.ydh.gva.location.util;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
import gva.ydh.com.util.StringUtil;
public class PingYinUtil {
public static String getPingYin(String inputString) {
HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
format.setCaseType(HanyuPinyinCaseType.UPPERCASE);
format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
format.setVCharType(HanyuPinyinVCharType.WITH_V);
if( null == inputString) inputString="";
if(!StringUtil.isValidStart(inputString))//非字母和中文开头直接返回
{ char end='Z'+1;
return String.valueOf(end);
}
char[] input = inputString.trim().toCharArray();
String output = "";
try {
for (int i = 0; i < input.length; i++) {
if (Character.toString(input[i]).matches("[\\u4E00-\\u9FA5]+")) {
String[] temp = PinyinHelper.toHanyuPinyinStringArray(input[i],format);
if( null != temp && temp.length >0){
output += temp[0];
}else{
char end='Z'+1;
return String.valueOf(end);
}
} else{
output += Character.toString(input[i]);
}
}
} catch (BadHanyuPinyinOutputFormatCombination e) {
e.printStackTrace();
}
return output.toUpperCase();
}
public static String converterToFirstSpell(String chinese) {
StringBuffer pybf = new StringBuffer();
if( null == chinese) chinese="";
char[] arr = chinese.trim().toCharArray();
HanyuPinyinOutputFormat defaultFormat = new HanyuPinyinOutputFormat();
defaultFormat.setCaseType(HanyuPinyinCaseType.UPPERCASE);
defaultFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
for (int i = 0; i < arr.length; i++) {
if (arr[i] > 128) {
try {
String[] _t = PinyinHelper.toHanyuPinyinStringArray(arr[i], defaultFormat);
if (_t != null) {
pybf.append(_t[0].charAt(0));
}
} catch (BadHanyuPinyinOutputFormatCombination e) {
e.printStackTrace();
}
} else {
pybf.append(arr[i]);
}
}
if(pybf.length()==0 || !StringUtil.isValidStart(pybf.toString())){//特殊字符的过滤和名字的过滤
return "#";
}
return pybf.toString().replaceAll("\\W", "").trim();
}
}
| [
"925279861@qq.com"
] | 925279861@qq.com |
8df815c449f227c937233b2438f322e9b11ecb33 | 5bc4de9bbd850ed3d6dbafa34e7b387cebbc4911 | /net-util/src/main/java/org/doclerholding/codechallenge/netutil/service/reporting/ReportHandler.java | bd6bbc870e619f2a39aafba3a68f5f73ca6ef761 | [
"Apache-2.0"
] | permissive | HyeongD/netmonitorJ | eb2cbd380c1eef66e8505e227f5cb29e066829b1 | 0f90fd75c76f015f68a40229e513ab0d48a7d0d4 | refs/heads/master | 2023-03-19T19:32:51.129781 | 2018-01-29T14:05:46 | 2018-01-29T14:05:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 501 | java | /**
* netUtilJ
* Copyright 2018 and beyond, Nuwan Walisundara
* <p/>
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3
* You contribute feedback, fixes, and requests for features
* User: Nuwan Walisundara
* Date: Jan 28, 2018
* Time: 10:02:25 PM
*/
package org.doclerholding.codechallenge.netutil.service.reporting;
class ReportHandler {
// JsonObjectBuilder b = Json.createObjectBuilder().build();
}
| [
"nuwan@wso2telco.com"
] | nuwan@wso2telco.com |
01faea259758d76da912b57c8a312832577b4f8b | 671eb147384ed7e70f668a0ce66b59b8171862e9 | /src/main/java/com/davie/model/Employee.java | 9d6cdf3b2683169b1a83b2b156888d9b7675e82e | [] | no_license | daviemukungi/employeeregistration | 0bb9cbb537dca67e1cecdde52e2ea70ad0023be7 | c6b180c3b90440a798c3d083577d9207192a2acf | refs/heads/master | 2022-12-26T18:43:45.761433 | 2019-05-26T13:37:19 | 2019-05-26T13:37:19 | 188,686,754 | 0 | 0 | null | 2022-12-16T04:24:08 | 2019-05-26T13:31:36 | Java | UTF-8 | Java | false | false | 4,349 | java | package com.davie.model;
import org.hibernate.annotations.Type;
import org.hibernate.validator.constraints.NotEmpty;
import org.joda.time.LocalDate;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
/**
* Created by Davie on 5/25/2019.
*/
@Entity
@Table(name="EMPLOYEE")
public class Employee {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@Size(min=3, max=50)
@Column(name = "FIRST_NAME", nullable = false)
private String name;
@NotNull
@DateTimeFormat(pattern="dd/MM/yyyy")
@Column(name = "JOINING_DATE", nullable = false)
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentLocalDate")
private LocalDate joiningDate;
@NotEmpty
@Column(name = "EMPLOYMENT_NUMBER", unique=true, nullable = false)
private String employmentnumber;
@Size(min=3, max=50)
@Column(name = "MIDDLE_NAME", nullable = false)
private String middle;
@Size(min=3, max=50)
@Column(name = "SURNAME", nullable = false)
private String surname;
@Size(min=3, max=50)
@Column(name = "ADDRESS", nullable = false)
private String address;
@Size(min=3, max=50)
@Column(name = "CONTRACT_TYPE", nullable = false)
private String contracttype;
@NotNull
@DateTimeFormat(pattern="dd/MM/yyyy")
@Column(name = "CONTRACT_SIGN_DATE", nullable = false)
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentLocalDate")
private LocalDate contractSignDate;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public LocalDate getJoiningDate() {
return joiningDate;
}
public void setJoiningDate(LocalDate joiningDate) {
this.joiningDate = joiningDate;
}
public String getEmploymentnumber() {
return employmentnumber;
}
public void setEmploymentnumber(String employmentnumber) {
this.employmentnumber = employmentnumber;
}
public String getMiddle() {
return middle;
}
public void setMiddle(String middle) {
this.middle = middle;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getContracttype() {
return contracttype;
}
public void setContracttype(String contracttype) {
this.contracttype = contracttype;
}
public LocalDate getContractSignDate() {
return contractSignDate;
}
public void setContractSignDate(LocalDate contractSignDate) {
this.contractSignDate = contractSignDate;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + id;
result = prime * result + ((employmentnumber == null) ? 0 : employmentnumber.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (!(obj instanceof Employee))
return false;
Employee other = (Employee) obj;
if (id != other.id)
return false;
if (employmentnumber == null) {
if (other.employmentnumber != null)
return false;
} else if (!employmentnumber.equals(other.employmentnumber))
return false;
return true;
}
@Override
public String toString() {
return "Employee [id=" + id + ", name = " + name + " , joiningDate="
+ joiningDate + ", employmentnumber = " + employmentnumber + ", middle = " + middle + " , surname = " + surname + " , address = " + address + " , contracttype = " + contracttype + "" +
" , contractSignDate = " + contractSignDate + "]";
}
}
| [
"mukungidavid@gmail.com"
] | mukungidavid@gmail.com |
f17250dc649359578953ff76726dfccf0df5bd6b | ebc9544a9681e8b8ab43fdec0077d2237a1f2a18 | /src/almostbeast/math/distributions/AlmostLogNormalDistributionModel.java | 3987efeda345507fdae49eeb8b63b45370f2b1d3 | [] | no_license | rbouckaert/AlmostDistributions | ad7e0906253b655b8b984dde226712ff5e7e1b42 | deb5c87faf40bf4679c614cc53b8698154f0b156 | refs/heads/master | 2023-05-12T22:30:05.533125 | 2023-05-08T00:06:21 | 2023-05-08T00:06:21 | 109,171,998 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,518 | java | package almostbeast.math.distributions;
import org.apache.commons.math.MathException;
import beast.base.core.Input;
import beast.base.inference.distribution.LogNormalDistributionModel;
public class AlmostLogNormalDistributionModel extends LogNormalDistributionModel implements AlmostDistribution {
public Input<Double> penaltyInput = new Input<Double>("penalty", "penalty for being outside range", 10000.0);
double _lower, _upper, penalty;
@Override
public void initAndValidate() {
dist = new AlmostLogNormalImpl(0.0, 1.0);
super.initAndValidate();
penalty = penaltyInput.get();
try {
_lower = dist.inverseCumulativeProbability(0.025);
_upper = dist.inverseCumulativeProbability(0.975);
} catch (MathException e) {
e.printStackTrace();
throw new IllegalArgumentException(e);
}
}
class AlmostLogNormalImpl extends LogNormalImpl {
public AlmostLogNormalImpl(double mean, double stdDev) {
super(mean, stdDev);
}
@Override
public double logDensity(final double x) {
if (x >= _lower && x <= _upper) {
return Math.log(density(x));
} else if (x < _lower) {
return -penalty * (_lower - x);
} else {
return -penalty * (x - _upper);
}
}
} // class AlmostLogNormalImpl
@Override
public double getLowerTarget() throws MathException {
return _lower;
}
@Override
public double getUpperTarget() throws MathException {
return _upper;
}
}
| [
"higgs.ml@gmail.com"
] | higgs.ml@gmail.com |
c7f6de1588fa115527c0445529e67ba59c3a6677 | 82da70787e9e3705da81da62e30aacba8cb234c3 | /app/src/main/java/com/ngajiyuk/islamicmovie/Tvshow/Tvshow.java | b63201253f6b72697bb1f16292d7ebc0bbfa08b4 | [] | no_license | pastibelanja/Islamic-Movie | b49cd5771eceb453f98a0ef0ecda77b1e4468118 | f5aed19dc2d4a4560594b133002415f4b7d5fd35 | refs/heads/master | 2020-06-23T01:51:02.158650 | 2019-07-23T16:34:22 | 2019-07-23T16:34:22 | 198,466,104 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,777 | java | package com.ngajiyuk.islamicmovie.Tvshow;
import android.os.Parcel;
import android.os.Parcelable;
public class Tvshow implements Parcelable {
private String title, date, category, descrip, image;
protected Tvshow(Parcel in) {
title = in.readString();
date = in.readString();
category = in.readString();
descrip = in.readString();
image = in.readString();
}
public Tvshow() {
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(title);
dest.writeString(date);
dest.writeString(category);
dest.writeString(descrip);
dest.writeString(image);
}
@Override
public int describeContents() {
return 0;
}
public static final Creator<Tvshow> CREATOR = new Creator<Tvshow>() {
@Override
public Tvshow createFromParcel(Parcel in) {
return new Tvshow(in);
}
@Override
public Tvshow[] newArray(int size) {
return new Tvshow[size];
}
};
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getDescrip() {
return descrip;
}
public void setDescrip(String descrip) {
this.descrip = descrip;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
}
| [
"info.pastibelanja@gmail.com"
] | info.pastibelanja@gmail.com |
a58b3bce8ace7ac378297ff468160b0e303ffe40 | 842a3453019652780adfc2f8cef6e72fa27f0aa3 | /app/src/main/java/schnauzer/digital/life2048/players_dialog.java | cd95f7a99b92259a1d187d24eac10fe57c805e19 | [] | no_license | DigitalSchnauzer/Life2048 | 1c47bb1494cdcd07f24adbcaf99eb9e14843d44d | 5f6d822cef6d93e4d58fa4b8da96b8fd85f3485b | refs/heads/master | 2021-01-10T17:10:17.568011 | 2015-12-12T17:57:04 | 2015-12-12T17:57:04 | 46,377,410 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,614 | java | package schnauzer.digital.life2048;
import android.app.Activity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ListView;
import android.widget.Toast;
import java.util.ArrayList;
public class players_dialog extends Activity {
static boolean active = false;
static private ListView playersListView;
private Button goBack;
static protected ArrayList<Player> playersList = new ArrayList<>();;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
active = true;
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.players_dialog);
playersListView = (ListView) findViewById(R.id.playersListView);
goBack = (Button) findViewById(R.id.goBack);
PlayerAdapter playerAdapter = new PlayerAdapter(this, R.layout.item_player, playersList);
playersListView.setAdapter(playerAdapter);
ServiceManager.playersDialog = this;
ServiceManager.getListOfPlayers();
Toast.makeText(getBaseContext(), "Loading list of players...", Toast.LENGTH_SHORT).show();
playersListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Player player = playersList.get(position);
if (player.getStatus().equalsIgnoreCase("D")) {
MainActivity.host = true;
MainActivity.otherid = Integer.toString(player.getId());
MainActivity.multiAlreadyStarted = false;
ServiceManager.invitePlayer(Integer.parseInt(MainActivity.userid), player.getId());
Toast.makeText(getBaseContext(), "Inviting " + player.getName() + "...", Toast.LENGTH_SHORT).show();
finish();
}
}
});
goBack.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
finish();
}
});
}
@Override
protected void onStop() {
super.onStop();
active = false;
}
protected void updateAdapter () {
PlayerAdapter playerAdapter = new PlayerAdapter(this, R.layout.item_player, playersList);
playersListView.setAdapter(playerAdapter);
}
}
| [
"rogelio.gonzalez@cetys.edu.mx"
] | rogelio.gonzalez@cetys.edu.mx |
4e688b0b980093cfedc5e4d6575bea26212bb568 | f767d97d7f7407ffa01a3a25a68f6072eb894276 | /main/java/hundun/dontstarve/entity/EntityTallBird.java | f21920fb0d687be8c2046528fd7e1d8d3fad9cf0 | [] | no_license | hundun000/minecraftMod_dontStarve | 5ccc2f37ea84745f3a9bd00e76470e0a6361d917 | a412b3cf6b9b97330813dcfe15f4236c9b90a91a | refs/heads/master | 2021-09-17T04:19:47.220646 | 2018-06-27T13:15:49 | 2018-06-27T13:15:49 | 129,214,626 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,129 | java | package hundun.dontstarve.entity;
import java.util.Set;
import javax.annotation.Nullable;
import com.google.common.collect.Sets;
import hundun.dontstarve.item.ItemLoader;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackMelee;
import net.minecraft.entity.ai.EntityAIFollowParent;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMate;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAIPanic;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAITempt;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityIronGolem;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.monster.EntitySpider;
import net.minecraft.entity.monster.EntityIronGolem;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.pathfinding.PathNodeType;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.storage.loot.LootTableList;
public class EntityTallBird extends EntityMob {
private static final Set<Item> TEMPTATION_ITEMS = Sets.newHashSet(new Item[] {Items.WHEAT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.BEETROOT_SEEDS});
public float wingRotation;
public float destPos;
public float oFlapSpeed;
public float oFlap;
public float wingRotDelta = 1.0F;
/** The time until the next egg is spawned. */
public int timeUntilNextEgg;
public EntityTallBird(World worldIn)
{
super(worldIn);
setSize(0.8F, 3.5F);
this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
this.setPathPriority(PathNodeType.WATER, 0.0F);
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(4.0D);
this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D);
}
protected void initEntityAI()
{
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIPanic(this, 1.4D));
this.tasks.addTask(3, new EntityAITempt(this, 1.0D, false, TEMPTATION_ITEMS));
this.tasks.addTask(4, new EntityTallBird.AITallBirdAttack(this));
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(7, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false, new Class[0]));
this.targetTasks.addTask(2, new EntityTallBird.AITallBirdTarget(this, EntityPlayer.class));
this.targetTasks.addTask(3, new EntityTallBird.AITallBirdTarget(this, EntityIronGolem.class));
}
static class AITallBirdTarget<T extends EntityLivingBase> extends EntityAINearestAttackableTarget<T>
{
public AITallBirdTarget(EntityTallBird tallBird, Class<T> classTarget)
{
super(tallBird, classTarget, true);
}
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute()
{
float f = this.taskOwner.getBrightness(1.0F);
return f >= 0.5F ? false : super.shouldExecute();
}
}
static class AITallBirdAttack extends EntityAIAttackMelee
{
public AITallBirdAttack(EntityTallBird tallBird)
{
super(tallBird, 1.0D, true);
}
/**
* Returns whether an in-progress EntityAIBase should continue executing
*/
public boolean continueExecuting()
{
float f = this.attacker.getBrightness(1.0F);
if (f >= 0.5F && this.attacker.getRNG().nextInt(100) == 0)
{
this.attacker.setAttackTarget((EntityLivingBase)null);
return false;
}
else
{
return super.continueExecuting();
}
}
protected double getAttackReachSqr(EntityLivingBase attackTarget)
{
return (double)(4.0F + attackTarget.width);
}
}
//I don't know why this not called when it killed and drops items.
@Override
protected void dropFewItems(boolean arg1, int arg2)
{
System.out.println("Ask dropFewItems!");
if (this.rand.nextInt(3) == 0)
{
this.dropItem(ItemLoader.bigMeat, 1);
}
super.dropFewItems(arg1, arg2);
}
//override lay egg
@Override
public void onLivingUpdate()
{
super.onLivingUpdate();
this.oFlap = this.wingRotation;
this.oFlapSpeed = this.destPos;
this.destPos = (float)((double)this.destPos + (double)(this.onGround ? -1 : 4) * 0.3D);
this.destPos = MathHelper.clamp_float(this.destPos, 0.0F, 1.0F);
if(!this.onGround){
System.out.println("Tall bird thinks itself is not on ground!");
}
if (!this.onGround && this.wingRotDelta < 1.0F)
{
this.wingRotDelta = 1.0F;
}
this.wingRotDelta = (float)((double)this.wingRotDelta * 0.9D);
if (!this.onGround && this.motionY < 0.0D)
{
this.motionY *= 0.6D;
}
this.wingRotation += this.wingRotDelta * 2.0F;
if (!this.worldObj.isRemote && !this.isChild() && --this.timeUntilNextEgg <= 0)
{
this.playSound(SoundEvents.ENTITY_CHICKEN_EGG, 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
this.dropItem(ItemLoader.tallBirdEgg, 1);
this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
}
}
//---------------below same as chicken
public float getEyeHeight()
{
return this.height;
}
public void fall(float distance, float damageMultiplier)
{
}
protected SoundEvent getAmbientSound()
{
return SoundEvents.ENTITY_CHICKEN_AMBIENT;
}
protected SoundEvent getHurtSound()
{
return SoundEvents.ENTITY_CHICKEN_HURT;
}
protected SoundEvent getDeathSound()
{
return SoundEvents.ENTITY_CHICKEN_DEATH;
}
protected void playStepSound(BlockPos pos, Block blockIn)
{
this.playSound(SoundEvents.ENTITY_CHICKEN_STEP, 0.15F, 1.0F);
}
@Nullable
protected ResourceLocation getLootTable()
{
System.out.println("Ask loottable!");
return LootTableList.ENTITIES_CHICKEN;
}
/**
* Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on
* the animal type)
*/
public boolean isBreedingItem(@Nullable ItemStack stack)
{
return stack != null && TEMPTATION_ITEMS.contains(stack.getItem());
}
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound compound)
{
super.readEntityFromNBT(compound);
if (compound.hasKey("EggLayTime"))
{
this.timeUntilNextEgg = compound.getInteger("EggLayTime");
}
}
/**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/
public void writeEntityToNBT(NBTTagCompound compound)
{
super.writeEntityToNBT(compound);
compound.setInteger("EggLayTime", this.timeUntilNextEgg);
}
/**
* Determines if an entity can be despawned, used on idle far away entities
*/
protected boolean canDespawn()
{
return !this.isBeingRidden();
}
public void updatePassenger(Entity passenger)
{
super.updatePassenger(passenger);
float f = MathHelper.sin(this.renderYawOffset * 0.017453292F);
float f1 = MathHelper.cos(this.renderYawOffset * 0.017453292F);
float f2 = 0.1F;
float f3 = 0.0F;
passenger.setPosition(this.posX + (double)(f2 * f), this.posY + (double)(this.height * 0.5F) + passenger.getYOffset() + (double)f3, this.posZ - (double)(f2 * f1));
if (passenger instanceof EntityLivingBase)
{
((EntityLivingBase)passenger).renderYawOffset = this.renderYawOffset;
}
}
}
| [
"wwj.hddjj@gmail.com"
] | wwj.hddjj@gmail.com |
143a675b5debbd56f94570d1509eadfb22251312 | 8a01d67604b281491d54b41a9b86e8ba835f6b48 | /jModex/src/ro/ieat/isummarize/ProgramPhiExpression.java | 1aa64e08d88f47e7273b67c9c8c9482d7918fbb9 | [
"MIT"
] | permissive | petrufm/jModex | 585e774db72e48e3e33aac684d2ff555cc5ca5c6 | 6045c58f7b845ca20ddfd438cf996ffa77158484 | refs/heads/master | 2021-01-10T05:32:31.939142 | 2017-02-07T08:24:16 | 2017-02-07T08:24:16 | 43,284,278 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,097 | java | /*
* Copyright (c) 2013-2014 Institute eAustria Timisoara
*
* 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 ro.ieat.isummarize;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.ibm.wala.ssa.SSAPhiInstruction;
public class ProgramPhiExpression extends ProgramExpression {
private SSAPhiInstruction instruction;
private List<ProgramIndexExpression> allUses;
public ProgramPhiExpression(SSAPhiInstruction instruction, List<ProgramIndexExpression> allUses) {
this.instruction = instruction;
this.allUses = new ArrayList<ProgramIndexExpression>();
this.allUses.addAll(allUses);
}
@Override
public ProgramExpression substitute(ProgramSubstitutableVariable sub, ProgramExpression newExpression) {
if(sub instanceof ProgramIndexExpression) {
for(int i = 0; i < instruction.getNumberOfUses(); i++) {
if(((ProgramIndexExpression)sub).getUse() == instruction.getUse(i)) {
return newExpression;
}
}
}
return this;
}
@Override
public String toString() {
return instruction + "";
}
@Override
public boolean structuralEquals(ProgramExpression o) {
if(o instanceof ProgramPhiExpression) {
return this.getAllUses().equals(((ProgramPhiExpression) o).getAllUses());
}
return false;
}
private Set<Integer> getAllUses() {
Set<Integer> res = new HashSet<Integer>();
for(int i = 0; i < instruction.getNumberOfUses(); i++) {
res.add(instruction.getUse(i));
}
return res;
}
@Override
public Set<ProgramExpression> getVariables() {
HashSet<ProgramExpression> result = new HashSet<ProgramExpression>();
for(ProgramExpression aUse : allUses) {
result.addAll(aUse.getVariables());
}
return result;
}
@Override
public Object accept(ExpressionAcyclicVisitor visitor) {
return visitor.visitProgramPhiExpression(this);
}
@Override
protected int getHashCode() {
return 37 * getAllUses().hashCode();
}
@Override
public List<ProgramExpressionProxy> getProxies() {
return new ArrayList<ProgramExpressionProxy>();
}
}
| [
"petrum@gmail.com"
] | petrum@gmail.com |
efa30259d1d20ee37c501d383a571e0132b982b2 | 7b2def185b331fd4aa14e0f54308b1b9677d1f2c | /_practice/01/z01/src/z01/Test.java | b7cf12d86742b64aec692b8b59b6495627834876 | [] | no_license | L4v/op_school | a573bdf156b250e85cf43979156a5ce3093fadd5 | b32d85e4011b52f75411f8aabddddc76fea4fa56 | refs/heads/master | 2020-04-03T13:08:14.815518 | 2019-01-08T21:06:28 | 2019-01-08T21:06:28 | 155,274,912 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,692 | java | package z01;
/**
* Ovo je prepisan zadatak iz C++ -> Java
* v06/z02
* @author Jovan Ivosevic
*/
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
/**
* Main klasa
*/
public class Test {
public static Application a1, a2, a3, a4;
public static AndroidApp aa1, aa2, aa3, aa4;
public static DesktopApp da1, da2, da3, da4;
public static Computer c1, c2, c3;
/**
* Main metoda za testiranje
* Destrukcija objekata necemo testirati jer Java je "garbage collected language" i
* objekte cuva na heap-u, te nismo sto posto sigurni kada se koji objekat
* unistava
*
* Za razliku od C++, static polja su odmah definisana unutar svojih klasa i
* getteri ne vracaju "const" jer Java to nema posto drugacije funkcionise
* od C++, vise ovde:
* https://docs.oracle.com/javase/tutorial/essential/concurrency/imstrat.html
*
* << operator je ovde toString
*
*/
public static void main(String[] args) {
c1 = new Computer();
c2 = new Computer(256.5, 8, "2080Ti", "Arch");
c3 = new Computer(c2);
a1 = new Application();
a2 = new Application("C", "Petar Petrovic", 123.2);
a3 = new Application("RUST", "Joe Smarty", 12.3);
a4 = new Application(a3);
aa1 = new AndroidApp();
aa2 = new AndroidApp(40.2, 42, 12);
aa3 = new AndroidApp(1, 42.314, 3.14);
aa4 = new AndroidApp(aa3);
da1 = new DesktopApp();
da2 = new DesktopApp(c1, c2, "C", 100);
da3 = new DesktopApp(c1, c3, "JAVA", 123);
da4 = new DesktopApp(da3);
System.out.println("Broj aplikacija: " + Application.appCount);
System.out.println("Broj android aplikacija: " + AndroidApp.androidCount);
System.out.println("Broj desktop aplikacija: " + DesktopApp.desktopCount);
System.out.println("Ispis kompjutera:");
System.out.println(c1);
System.out.println(c2);
System.out.println(c3);
System.out.println("Ispis aplikacija:");
System.out.println(a1);
System.out.println(a2);
System.out.println(a3);
System.out.println(a4);
System.out.println("Ispis android aplikacija:");
System.out.println(aa1);
System.out.println(aa2);
System.out.println(aa3);
System.out.println(aa4);
System.out.println("Ispis desktop aplikacija:");
System.out.println(da1);
System.out.println(da2);
System.out.println(da3);
System.out.println(da4);
System.out.println("Testiranje upisa u txt fajl...");
saveAsText("src/z01/a2.txt", a2);
System.out.println("Testiranje visestrukog upisa u txt fajl...");
ArrayList<Application> apps = new ArrayList<Application>();
apps.add(a2);
apps.add(aa3);
apps.add(da2);
saveMultipleAsText("src/z01/mul.txt", apps);
System.out.println("Testiranje upisa u bin fajl...");
saveAsBin("src/z01/obj.bin", a2);
System.out.println("Testiranje citanja iz txt fajla...");
for(String s : loadFromText("src/z01/mul.txt"))
System.out.println(s);
System.out.println("Testiranje citanja iz bin fajla...");
Application loadedApp = loadFromBin("src/z01/obj.bin");
System.out.println(loadedApp != null ? loadedApp : "Ucitan je NULL");
}
/**
* Cuva Application objekat u tekstualni fajl
* @param path Predstavlja relativnu putanju fajla u projektu
* @param app Predstavlja objekat koji ce se sacuvati
*/
public static void saveAsText(String path, Application app) {
BufferedWriter out = null;
try {
// Pokusava otvoriti novi fajl, putanje path
out = new BufferedWriter(new FileWriter(path));
// Ako uspesno otvori, upisuje u fajl
out.write(app.toString()); // Upisuje objekat u vidu stringa
}catch(Exception e) {
e.printStackTrace();
}finally {
if(out != null) { // Ako out nije null, tj ako je otvoren fajl, pokusava ga zatvoriti
try {
out.close();
}catch(Exception e) {
e.printStackTrace();
}
}
}
}
/**
* Snima vise objekata u jedan fajl
* @param path relativna putanja fajla u projektu
* @param apps list objekata
*/
public static void saveMultipleAsText(String path, ArrayList<Application> apps) {
BufferedWriter out = null;
try {
out = new BufferedWriter(new FileWriter(path));
for(Application app : apps) {
out.write(app.toString() + "\n"); // Upisuje objekat u vidu stringa u novi red
}
}catch(Exception e) {
e.printStackTrace();
}finally {
if (out != null) {
try {
out.close();
}catch(Exception e) {
e.printStackTrace();
}
}
}
}
/**
* Cuva prosledjeni objekat u binarnu datoteku
* @param path relativna putanja u projektu
* @param app objekat za cuvanje
*/
public static void saveAsBin(String path, Application app) {
ObjectOutputStream out = null;
try {
out = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream((path))));
out.writeObject(app); // Pretvara objekat u niz bajtova i upisuje u bin fajl
} catch (Exception e) {
e.printStackTrace();
}finally {
if(out != null) {
try {
out.close();
}catch(Exception e) {
e.printStackTrace();
}
}
}
}
/**
* Ucitava viselinijski txt fajl
* @param path relativna putanja txt fajla
* @return ArrayList stringova
*/
public static ArrayList<String> loadFromText(String path) {
ArrayList<String> appInfo = new ArrayList<String>(); // Ovde se cuvaju redovi fajla
String line; // Ovo cuva pojedinacan red fajla
BufferedReader in = null;
try {
in = new BufferedReader(new FileReader(path)); // Pokusava otvoriti fajl
while((line = in.readLine()) != null) // Dokle god ne dodje do kraja fajla, ucitava
appInfo.add(line); // red u line
}catch(Exception e) {
e.printStackTrace();
}finally {
if (in != null) {
try {
in.close();
}catch(Exception e) {
e.printStackTrace();
}
}
}
return appInfo;
}
/**
* Ucitava objekat iz binarnog fajla
* @param path relativna putanja fajla u projektu
* @return povratni objekat, ako nije uspelo ucitavanje, vraca null
*/
public static Application loadFromBin(String path) {
Application app = null;
ObjectInputStream in = null;
try {
in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(path)));
app = (Application)in.readObject(); // Cast-uje ucitani objekat
}catch(Exception e) {
e.printStackTrace();
}finally {
if (in != null) {
try {
in.close();
}catch(Exception e) {
e.printStackTrace();
}
}
}
return app;
}
}
| [
"ivos.jovan@gmail.com"
] | ivos.jovan@gmail.com |
329354be3a97904d5449bfd07118a06a1b0ec1dc | 796cd9a66b84d4e1859e047e89d167ad840ddd63 | /company/common/net/company/vo/ManagerbackstageVo.java | 4383819e1033444edc9f7064d057bf704c38a4f6 | [] | no_license | blueissky/blueissky | ec960fa5e18a784a3d38aa122f175fa4472550b8 | 8b08dd9f0741090d83f553310a8e4e916b4d1f6d | refs/heads/master | 2021-03-12T23:50:09.891554 | 2015-11-11T03:17:01 | 2015-11-11T03:17:01 | 25,769,921 | 0 | 0 | null | 2014-10-28T00:14:21 | 2014-10-26T11:54:51 | null | UTF-8 | Java | false | false | 1,061 | java | package net.company.vo;
import com.mchange.v2.resourcepool.ResourcePool.Manager;
/**
* Managerbackstage entity. @author MyEclipse Persistence Tools
*/
public class ManagerbackstageVo implements java.io.Serializable {
// Fields
private Integer id;
private ManagerVo manager;
private BackstageVo backstage;
private Boolean enable;
// Constructors
/** default constructor */
public ManagerbackstageVo() {
}
/** minimal constructor */
public ManagerbackstageVo(Boolean enable) {
this.enable = enable;
}
// Property accessors
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public ManagerVo getManager() {
return this.manager;
}
public void setManager(ManagerVo manager) {
this.manager = manager;
}
public BackstageVo getBackstage() {
return this.backstage;
}
public void setBackstage(BackstageVo backstage) {
this.backstage = backstage;
}
public Boolean getEnable() {
return this.enable;
}
public void setEnable(Boolean enable) {
this.enable = enable;
}
} | [
"blueissky@outlook.com"
] | blueissky@outlook.com |
dab96e31cee26cc53f3a3e8ce8c212c8f21b1a69 | 9c9c53974b3b3996a4c61fba38046987fb5911d6 | /RPG-Fighting-games/code/src/pkg0306/v5/Rocket.java | 70e8365e0ee49d751359a2c786fef5c7956f9687 | [] | no_license | shiguanghai/University-projects | 38a8d77182320eb70153bfecb9e8b1a06c67c552 | 8005b20b0429ccdbc401c1ac138cabaf79896936 | refs/heads/master | 2023-05-04T04:13:20.976630 | 2021-05-27T08:00:55 | 2021-05-27T08:00:55 | 308,266,397 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 207 | java | package pkg0306.v5;
public class Rocket extends Duck {
public Rocket(){
super(new FlyWithFire(),new Roar());
}
public void display(){
System.out.println("I am Rocket.");
}
}
| [
"1932275668@qq.com"
] | 1932275668@qq.com |
e8e3d87cd91a0a88b2eb04f3f9c204df3dc6f0c3 | 48179442495d0882005b8c9feffe0c5f4f9033ee | /app/src/main/java/com/mapfunction/copycode/LMapUtil.java | 4369670aabf7ecd9fdf8097b2c1443135e849fc0 | [] | no_license | silencer1994/MapFuncationTest | 1114d9563074a5434287400672df2b8f0b611512 | 5aabf7c1ce473d00c7cdeb68907bd34b3e6d1146 | refs/heads/master | 2021-01-25T11:48:31.629167 | 2018-03-01T12:11:04 | 2018-03-01T12:11:04 | 123,429,918 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,513 | java | /**
*
*/
package com.mapfunction.copycode;
import android.os.Environment;
import android.text.Html;
import android.text.Spanned;
import android.widget.EditText;
import com.leador.api.maps.model.LatLng;
import com.leador.api.services.core.LatLonPoint;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class LMapUtil {
public static final String Kilometer = "\u516c\u91cc";// "公里";
public static final String Meter = "\u7c73";// "米";
/**
* 判断edittext是否null
*/
public static String checkEditText(EditText editText) {
if (editText != null && editText.getText() != null
&& !(editText.getText().toString().trim().equals(""))) {
return editText.getText().toString().trim();
} else {
return "";
}
}
public static Spanned stringToSpan(String src) {
return src == null ? null : Html.fromHtml(src.replace("\n", "<br />"));
}
public static String colorFont(String src, String color) {
StringBuffer strBuf = new StringBuffer();
strBuf.append("<font color=").append(color).append(">").append(src)
.append("</font>");
return strBuf.toString();
}
public static String makeHtmlNewLine() {
return "<br />";
}
public static String makeHtmlSpace(int number) {
final String space = " ";
StringBuilder result = new StringBuilder();
for (int i = 0; i < number; i++) {
result.append(space);
}
return result.toString();
}
public static String getFriendlyLength(int lenMeter) {
if (lenMeter > 10000) // 10 km
{
int dis = lenMeter / 1000;
return dis + Kilometer;
}
if (lenMeter > 1000) {
float dis = (float) lenMeter / 1000;
DecimalFormat fnum = new DecimalFormat("##0.0");
String dstr = fnum.format(dis);
return dstr + Kilometer;
}
if (lenMeter > 100) {
int dis = lenMeter / 50 * 50;
return dis + Meter;
}
int dis = lenMeter / 10 * 10;
if (dis == 0) {
dis = 10;
}
return dis + Meter;
}
public static boolean IsEmptyOrNullString(String s) {
return (s == null) || (s.trim().length() == 0);
}
/**
* 把LatLng对象转化为LatLonPoint对象
*/
public static LatLonPoint convertToLatLonPoint(LatLng latlon) {
return new LatLonPoint(latlon.latitude, latlon.longitude);
}
/**
* 把LatLonPoint对象转化为LatLon对象
*/
public static LatLng convertToLatLng(LatLonPoint latLonPoint) {
return new LatLng(latLonPoint.getLatitude(), latLonPoint.getLongitude());
}
/**
* 把集合体的LatLonPoint转化为集合体的LatLng
*/
public static ArrayList<LatLng> convertArrList(List<LatLonPoint> shapes) {
ArrayList<LatLng> lineShapes = new ArrayList<LatLng>();
for (LatLonPoint point : shapes) {
LatLng latLngTemp = LMapUtil.convertToLatLng(point);
lineShapes.add(latLngTemp);
}
return lineShapes;
}
/**
* long类型时间格式化
*/
public static String convertToTime(long time) {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date(time);
return df.format(date);
}
public static final String HtmlBlack = "#000000";
public static final String HtmlGray = "#808080";
public static String getDataRootPath(){
java.io.File fExternalStorageDirectory = Environment
.getExternalStorageDirectory();
return fExternalStorageDirectory.getAbsolutePath()+"/leador";
}
}
| [
"1932876700@qq.com"
] | 1932876700@qq.com |
636d447f4f7b3e5561a0ce6bd26e103a256997f4 | 946f1bd928852799e8fa30bc24724f77051a3cd4 | /src/org/filehide/filehidelibrary/NotFHFileAnymoreException.java | b9c4f03c430e355812311b10d135fba5cd51a3ca | [] | no_license | Alex1s/FileHideLibrary | 1c306473920fdf35cbe14739add93eb30fd066d2 | 0007b1d434b397856d8717c0f6a43a367876023b | refs/heads/master | 2021-01-13T01:08:44.843200 | 2017-03-22T19:31:25 | 2017-03-22T19:31:25 | 81,466,558 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 697 | java | package org.filehide.filehidelibrary;
/**
* Signals an attempt to access information of a {@link FHFile} although the file is not a FHFile anymore.
*
* <p> This exception will be thrown by the many of the {@link FHFile} methods if they are beeing used after the {@link FHFile#deleteHiddenData()} has been called.
* @author alex1s
*/
@SuppressWarnings("serial")
public class NotFHFileAnymoreException extends FHRuntimeException {
/**
* Constructs a {@code NotFHFileAnymoreException} with a appropriate detail message. The detail message can be retrieved later by the {@link #getMessage()} method.
*/
NotFHFileAnymoreException() {
super("The file is not a FHFile anymore.");
}
}
| [
"alexis@thecoolguy.com"
] | alexis@thecoolguy.com |
590c1651a2f95c2078a8b44d688ad22019f7a41d | ea77e630c9eedbcb75890b3228e84129a3fae4bd | /src/test/java/com/clearqa/test/RestApiTestCases.java | 9ad8c2b2f51fe04c3db1b2cade957aa4148b712c | [] | no_license | njaiswal/restITframework | b6c634c967d21f2fd4d6b2553e8a1105df33c2d2 | 4e1cb5afd01e9d990a27246eb816cbf4218a6710 | refs/heads/master | 2021-01-13T02:32:47.191539 | 2014-04-10T11:22:16 | 2014-04-10T11:22:16 | 18,564,347 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,896 | java | package com.clearqa.test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.AfterClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
import com.clearqa.test.utils.Http2Json;
import com.clearqa.test.utils.SchemaManager;
import com.clearqa.test.utils.TestScenarios;
import com.fasterxml.jackson.databind.JsonNode;
import com.github.fge.jsonschema.main.JsonSchema;
import com.github.fge.jsonschema.report.ProcessingReport;
import org.testng.Reporter;
import org.testng.Assert;
public class RestApiTestCases {
@BeforeClass
public void oneTimeSetUp() throws Exception {
SchemaManager.loadSchemas();
}
@DataProvider(name = "services", parallel = true)
public Object[][] service_testcases() throws FileNotFoundException {
Yaml yaml = new Yaml(new Constructor(TestScenarios.class));
// TODO: Make this read services_testcases.yml from inside the target dir.
TestScenarios testScenarios = (TestScenarios) yaml.load(new FileInputStream(new File("src/test/resources/testcases.yml")));
return testScenarios.getDataProviderFormatedTestUrls();
}
@Test(dataProvider = "services", enabled = true)
public void testServices(String q) throws Exception {
JsonNode response = Http2Json.readJsonFromUrl(q);
JsonSchema s = SchemaManager.getSchema(q);
// Validate reponse againts json schema
ProcessingReport report = s.validateUnchecked(response);
Reporter.log("<pre>" + report.toString() + "</pre>");
Assert.assertTrue(s.validInstance(response), "JSON response not valid against schema");
}
@AfterClass
public void oneTimeTearDown() {
}
}
| [
"njaiswal@gmail.com"
] | njaiswal@gmail.com |
a19747ec8f73e1db939a59364563129bfb2a6370 | 1d0b1b8ae1c7b72a77e6d18f3c463ef3ae275e4b | /src/main/java/org/fogbowcloud/sebal/model/image/HOutput.java | e5d48f85a334efbc9b7fb2b14b36745015ca460b | [] | no_license | ufcg-lsd/SEBAL | da95061636863a5ce3f178e91bc7053503df7e08 | 9a9aa7c4189c68e6e398102af0c5ca58b6c783ce | refs/heads/master | 2022-07-11T11:17:18.972352 | 2019-02-06T20:17:46 | 2019-02-06T20:17:46 | 19,751,225 | 2 | 6 | null | 2022-06-30T14:45:30 | 2014-05-13T18:42:24 | Java | UTF-8 | Java | false | false | 773 | java | package org.fogbowcloud.sebal.model.image;
public class HOutput {
private double H;
private double a;
private double b;
private double rah;
private double uAsterisk;
private double L;
public double getB() {
return b;
}
public void setB(double b) {
this.b = b;
}
public double getA() {
return a;
}
public void setA(double a) {
this.a = a;
}
public double getH() {
return H;
}
public void setH(double h) {
H = h;
}
public double getRah() {
return rah;
}
public void setRah(double rah) {
this.rah = rah;
}
public double getuAsterisk() {
return uAsterisk;
}
public void setuAsterisk(double uAsterisk) {
this.uAsterisk = uAsterisk;
}
public double getL() {
return L;
}
public void setL(double l) {
L = l;
}
}
| [
"rafaelc@lsd.ufcg.edu.br"
] | rafaelc@lsd.ufcg.edu.br |
4eb77265c10d8c96e034f1016232b36b2d361fc8 | 2713c165392681b881347f82d26b03b019243ae7 | /DashboardProject/src/events/SliderListener.java | 7fb35206cd68b35324af4e0e874d072194e4b209 | [] | no_license | WillianCieslak/TrainDashoard | 44d7afb9b51ab83b7273d3147c17e799bee3590d | cadcdf5ec4109a1f1ecab882721a7046c9481ac4 | refs/heads/master | 2022-09-21T02:04:23.010481 | 2020-06-01T23:01:08 | 2020-06-01T23:01:08 | 268,646,962 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,344 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package events;
import javax.swing.JSlider;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import dashboardproject.DashboardProject;
/**
*
* @author florinoprea, williancieslak
*/
public class SliderListener implements ChangeListener {
public SliderListener() {
}
@Override
public void stateChanged(ChangeEvent e) {
JSlider source = (JSlider) e.getSource();
if (!source.getValueIsAdjusting()) {
float fps = (float) source.getValue();
DashboardProject.speedGauge.increaseSpeed((double) fps);
if (fps > 0) {
DashboardProject.fuelGauge.setValue(
DashboardProject.fuelGauge.getValue() - 0.11);
DashboardProject.btnScript.setEnabled(false);
DashboardProject.btnStart.setEnabled(false);
DashboardProject.fuelLabl.setEnabled(false);
} else {
DashboardProject.btnScript.setEnabled(true);
DashboardProject.btnStart.setEnabled(true);
DashboardProject.fuelLabl.setEnabled(true);
}
}
}
}
| [
"willian.cieslak@hotmail.com"
] | willian.cieslak@hotmail.com |
182a83044b76501410f3d419df1eb1abe71af83c | 2924a16f40205e2743338fcaa124e12938841b5b | /s6/src/main/java/Office.java | 27115c6ecf530ab6ca7e9b6d1b1cce5dec067f10 | [
"Apache-2.0"
] | permissive | code-mds/ingsw2 | f74147de430a4e7c76e6e3334075dc72af21dddd | ab15dc8758312fde40dfbe54fdd125389a69196a | refs/heads/master | 2021-02-22T19:09:00.355339 | 2020-06-19T07:44:16 | 2020-06-19T07:44:16 | 245,383,085 | 0 | 0 | Apache-2.0 | 2020-10-13T21:51:24 | 2020-03-06T09:48:21 | Java | UTF-8 | Java | false | false | 102 | java | public class Office extends Composite {
public Office(String name) {
super(name);
}
}
| [
"43860962+code-mds@users.noreply.github.com"
] | 43860962+code-mds@users.noreply.github.com |
2c63c5426ffff2a94bebc315b9dd97186fb58c8c | 0cfd2cb397c1b78120f0d91c48387dfa063f88c9 | /platforms/android/src/com/edflock/spafast/MainActivity.java | e6ad2280746498f64ea9fe1fc3d7d22dc22b0de6 | [] | no_license | utkarshx/Fast-hybrid-templating | 6cadfaa5ea4b60dbbcfd4f9e123f37dc0acc2962 | b468caf7dfd675cb075588c4b769cde6c3028565 | refs/heads/master | 2021-01-21T02:24:18.961214 | 2015-06-15T12:11:14 | 2015-06-15T12:11:14 | 37,418,196 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,212 | 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 com.edflock.spafast;
import android.os.Bundle;
import org.apache.cordova.*;
public class MainActivity extends CordovaActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Set by <content src="index.html" /> in config.xml
loadUrl(launchUrl);
}
}
| [
"utk.shukla@gmail.com"
] | utk.shukla@gmail.com |
93884b279b0118229b36bc6245d1829b0af3643a | 04d8a39f1f941a1dfd5fb7cf573a6ac59cc19b7e | /portal/src/main/java/utils/servlet/LogRequest.java | f58b4b4bf0896314d37f814bda75e1a41833729b | [] | no_license | wujinbiao94/portal | e86719757218a351d1730effdb9bcc3447389ee8 | f74b3aaeb1763b893bdb69fe85cc00492b252a8e | refs/heads/master | 2021-03-27T20:02:40.295110 | 2018-05-16T16:07:59 | 2018-05-16T16:07:59 | 121,132,045 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,562 | java | package utils.servlet;
import controller.LoginCheck;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
/**
* Created by 你敬爱的彪哥 on 2018/2/11.
*/
public class LogRequest extends HttpServlet {
private static final long serialVersionUID = 369840050351775312L;
private static final Logger logger = LoggerFactory.getLogger(LogRequest.class);
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// 接收客户端信息
String username = request.getParameter("username");
username = new String(username.getBytes("ISO-8859-1"), "UTF-8");
String password = request.getParameter("password");
logger.info("用户名:{},密码:{}", username,password);
// 后台处理
LoginCheck loginCheck= new LoginCheck();
String res = loginCheck.logCheck(username,password);
logger.info("登录结果:{}",res);
// 返回信息到客户端
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.print(res);
out.flush();
out.close();
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
}
}
| [
"4768872612qq.com"
] | 4768872612qq.com |
0a99a26cb4d1a6605eda0df2a54b849e8f50fc25 | 2403b45082d3380ddc4b117135dfe37b317f5490 | /fr.inria.diverse.swhModel.generator/xtend-gen/fr/inria/diverse/swhModel/generator/aspects/AssociationClassCallExpAspectAssociationClassCallExpAspectProperties.java | cf4b43cc69ec75c88bfe7fb08bfca0814830b28c | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | RomainLefeuvre/DatasetBuilder | 1bb30f72513ff81fdfd6e7624c18ffb7d404a982 | 80648785603e49b43eb1c451389210e7fbea36fb | refs/heads/master | 2023-05-31T11:59:03.843668 | 2023-02-20T18:11:05 | 2023-02-20T18:11:05 | 580,346,138 | 4 | 0 | null | 2023-02-19T09:10:44 | 2022-12-20T10:34:59 | Java | UTF-8 | Java | false | false | 165 | java | package fr.inria.diverse.swhModel.generator.aspects;
@SuppressWarnings("all")
public class AssociationClassCallExpAspectAssociationClassCallExpAspectProperties {
}
| [
"noreply@github.com"
] | noreply@github.com |
660f1ca1ad4b8fd410fb0e40ead3b2783a31f7b1 | dc1b688b98a24a2f53a87e47ae37c78fc5281898 | /backend/src/main/java/com/sabercompartir/config/UserAuthenticationProvider.java | d9aa62384e4c1d4675ae8a36e2f9ac99f365c93d | [] | no_license | dieguezezequiel/saberCompartir | c26b35d0c13a4a03604d4145e3dc03d7126ded29 | 7c3b73f35e9251359d814b0be8cbc6540f9b97b9 | refs/heads/master | 2020-03-20T22:34:26.460799 | 2017-11-08T23:20:34 | 2017-11-08T23:20:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,746 | java | package com.sabercompartir.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;
/**
* Created by cesar on 19/11/16.
*/
@Component
public class UserAuthenticationProvider extends AbstractUserDetailsAuthenticationProvider {
@Autowired
UserDetailsService userDetailsService;
@Autowired
PasswordEncoder passwordEncoder;
@Override
protected void additionalAuthenticationChecks(UserDetails userDetails, UsernamePasswordAuthenticationToken token)
throws AuthenticationException {
if(token.getCredentials() == null || userDetails.getPassword() == null){
throw new BadCredentialsException("No hay credenciales");
}
if(!passwordEncoder.matches((String) token.getCredentials(), userDetails.getPassword())){
throw new BadCredentialsException("Invalid credentials");
}
}
@Override
protected UserDetails retrieveUser(String username, UsernamePasswordAuthenticationToken token)
throws AuthenticationException {
UserDetails userDetails = userDetailsService.loadUserByUsername(username);
return userDetails;
}
}
| [
"Cesar David Veron"
] | Cesar David Veron |
77a6373c7cb838dd47502046afd62d35351f0ef4 | 08dfe0965893fc3bb2b5e6c54e999d9e2f12f4a2 | /src/main/java/com/kdn/ecsi/epengine/domain/oxm/fields/H15.java | 81a92e2949dd92c9ed58358cf84e2108da2b8eec | [] | no_license | ygpark2/spring-boot-rest-api | 27be58ee309316e92a6ec77e2359f24fb66c6f94 | 7b1de2593651d1d94819f89cf08d558533c9cde9 | refs/heads/master | 2021-01-19T05:18:30.350430 | 2016-06-01T00:55:29 | 2016-06-01T00:55:29 | 60,133,585 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 502 | java | package com.kdn.ecsi.epengine.domain.oxm.fields;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import lombok.Getter;
@XmlType(name="ResponseBodyFieldH15")
@XmlAccessorType(XmlAccessType.FIELD)
public final class H15 {
@Getter
@XmlAttribute(name="v")
private int h15;
public H15() {}
public H15(int h15) {
this.h15 = h15;
}
} | [
"ygpark2@gmail.com"
] | ygpark2@gmail.com |
7c16349bad31337c80e6ce5a5c130baa9fe06443 | 28b2a33d1f61f1d1d0264936e298d49ef772b008 | /datatables4j-core-impl/src/main/java/org/datatables4j/tag/AbstractColumnTag.java | a4e5fb0a66ac8f4cfa249198b0188645ed580e7a | [] | no_license | mperin/datatables4j-core | cfb31d57ff459294c60e53feddf5b22ae861d771 | 26ed972632980a936d8dc9a2412f261a804ca445 | refs/heads/master | 2020-04-25T04:40:14.045719 | 2012-09-14T08:33:23 | 2012-09-14T08:33:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,437 | java | package org.datatables4j.tag;
import java.lang.reflect.InvocationTargetException;
import javax.servlet.jsp.tagext.BodyTagSupport;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang.StringUtils;
import org.datatables4j.model.HtmlColumn;
public abstract class AbstractColumnTag extends BodyTagSupport {
private static final long serialVersionUID = 1L;
// Tag attributes
protected String title;
protected String property;
protected String cssStyle;
protected String cssCellStyle;
protected String cssClass;
protected String cssCellClass;
protected Boolean sortable = true;
protected int processDoStartTag(){
TableTag parent = (TableTag) getParent();
if (parent.getLoadingType() == "AJAX") {
return EVAL_PAGE;
}
else if (parent.getLoadingType() == "DOM") {
if (getBodyContent() != null) {
// System.out.println("BODYCONTENT EXISTE");
return EVAL_BODY_BUFFERED;
} else {
// System.out.println("BODYCONTENT VIDE");
if (property != null) {
// AbstractTableTag parent = (AbstractTableTag) getParent();
try {
this.addColumn(
false,
PropertyUtils.getNestedProperty(parent.getCurrentObject(),
this.property).toString());
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchMethodException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return EVAL_PAGE;
}
}
// Never reached
return SKIP_BODY;
}
protected int processDoEndTag(){
TableTag parent = (TableTag) getParent();
if (parent.getLoadingType() == "AJAX") {
HtmlColumn column = new HtmlColumn(true, this.title);
column.setProperty(this.property);
column.setSortable(this.sortable);
parent.getTable().getLastHeaderRow().addColumn(column);
System.out.println("************************ FIN AjaxColumnTag doEndTag");
return EVAL_PAGE;
} else if (parent.getLoadingType() == "DOM") {
// System.out.println("parent.isFirstRow() = " +
// parent.isFirstRow());
// System.out.println(parent.getRowNumber());
if (parent.isFirstRow()) {
this.addColumn(true, this.title);
}
return EVAL_PAGE;
}
return SKIP_PAGE;
}
protected void addColumn(Boolean isHeader, String content){
HtmlColumn column = new HtmlColumn(isHeader, content);
// System.out.println("=========== sortable = " + sortable);
column.setSortable(this.sortable);
AbstractTableTag parent = (AbstractTableTag) getParent();
if(!isHeader){
if(StringUtils.isNotBlank(this.cssCellClass)){
column.setCssCellClass(this.cssCellClass);
}
if(StringUtils.isNotBlank(this.cssCellStyle)){
column.setCssCellStyle(this.cssCellStyle);
}
// System.out.println("parent = " + parent);
// System.out.println("parent.getTable() = " + parent.getTable());
parent.getTable().getLastRow().addColumn(column);
}
else{
if(StringUtils.isNotBlank(this.cssClass)){
column.setCssClass(this.cssClass);
}
if(StringUtils.isNotBlank(this.cssStyle)){
column.setCssStyle(this.cssStyle);
}
parent.getTable().getLastHeaderRow().addColumn(column);
}
}
public void setId(String id) {
this.id = id;
}
public void setProperty(String property) {
this.property = property;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getCssStyle() {
return cssStyle;
}
public void setCssStyle(String cssStyle) {
this.cssStyle = cssStyle;
}
public String getCssClass() {
return cssClass;
}
public void setCssClass(String cssClass) {
this.cssClass = cssClass;
}
public Boolean getSortable() {
return sortable;
}
public void setSortable(Boolean sortable) {
this.sortable = sortable;
}
public String getCssCellStyle() {
return cssCellStyle;
}
public void setCssCellStyle(String cssCellStyle) {
this.cssCellStyle = cssCellStyle;
}
public String getCssCellClass() {
return cssCellClass;
}
public void setCssCellClass(String cssCellClass) {
this.cssCellClass = cssCellClass;
}
}
| [
"thibault.duchateau@gmail.com"
] | thibault.duchateau@gmail.com |
7f9146688c2b598c82566d565f0056773ba819f2 | 0af329c04437d5a2b8baeef464c032f919c71475 | /src/test/java/com/crm/services/AccountService10.java | 0288fdac7f93531c1e35644df05bd7386320a2c2 | [] | no_license | TammineediMadhuSri/QAautomation | 19a2a5cfb459ed812ec1a6fb22c036dbd22ce0c3 | b8a8e7c170ddb049dd98106a829824c37de18cec | refs/heads/master | 2023-07-16T06:10:54.099907 | 2021-08-26T12:07:53 | 2021-08-26T12:07:53 | 397,221,524 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,654 | java | package com.crm.services;
import org.apache.log4j.Logger;
import org.openqa.selenium.support.PageFactory;
import com.crm.config.BrowserDriver;
import com.crm.pages.AccountContainerPage;
import com.crm.util.CommonUtil;
public class AccountService10 {
public static AccountContainerPage accountContainerPage;
private static Logger log = Logger.getLogger(AccountService10.class);
public void clickOnCreateAccount() {
accountContainerPage.getCreateAccount().click();
}
public String insertAccountNameAndEmail() {
accountContainerPage.getTxtAccountName().sendKeys(CommonUtil.generateRandomName());
accountContainerPage.getTxtAccountEmail().sendKeys("madhu@gmail.com");
return null;
}
public String insertAccountWebSite() {
accountContainerPage.getTxtAccountWebSite().sendKeys("www.madhu.com");
return null;
}
public void insertPhoneNumber() {
String num = Integer.toString(CommonUtil.generateRandomNumber());
BrowserDriver.selectDropDownItem(accountContainerPage.getPhoneDropDown(), "Mobile");
accountContainerPage.getTxtAccountPhoneNumber().sendKeys(num);
}
public String insertAccountBillingAddress() {
//String num = Integer.toString(CommonUtil.generateRandomNumber());
accountContainerPage.getTxtAccountBillingAddressStreet().sendKeys("MVP Colony");
accountContainerPage.getTxtAccountBillingAddressCity().sendKeys("vizag");
accountContainerPage.getTxtAccountBillingAddressState().sendKeys("AP");
accountContainerPage.getTxtAccountBillingAddressPostalCode().sendKeys("123456789");
accountContainerPage.getTxtAccountBillingAddressCountry().sendKeys("India");
log.info("Billing Address validates Successfully");
return null;
}
public void CopyBillingAddress() {
accountContainerPage.getTxtCopyBillingAddress().click();
}
public String getBillingAdressFromWebPage() {
String str = accountContainerPage.getBillingAddress.getText();
System.out.println(str);
return str;
}
public void SaveTheDetails() throws InterruptedException {
accountContainerPage.getTxtSaveTheDetails().click();
log.info("Account created sucessfully");
Thread.sleep(8000);
}
public static void init() {
accountContainerPage = PageFactory.initElements(BrowserDriver.getCurrentDriver(), AccountContainerPage.class);
}
public void DeleteAccount() {
accountContainerPage.getTxtDeleteTheDetails().click();
accountContainerPage.getDeleteAccount().click();
accountContainerPage.getSelectAction().click();
accountContainerPage.getButtonRemove().click();
accountContainerPage.getButtonConfirm().click();
return;
}
}
| [
"madhu@LAPTOP-QIATRTB7"
] | madhu@LAPTOP-QIATRTB7 |
7e26dbae65b7228c5bc7fab31e943e37ae63ac7a | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/15/15_f9ae64c71d0e65662db9092c5c211d9355b94820/UISelect/15_f9ae64c71d0e65662db9092c5c211d9355b94820_UISelect_s.java | c10cb1111652d52000d4d93bc9048f1d0c10ce6e | [] | 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,186 | java | /*
* Created on 13-Jan-2006
*/
package uk.org.ponder.rsf.components;
import uk.org.ponder.stringutil.StringSet;
/**
* Backs a selection control of some kind, where named values are presented in a
* list to the user. The returned value which is submitted may be a single
* selection, multiple selection, or empty, depending on the component type in
* the <code>selection</code> field.
* <p>
* The value binding <code>valuebinding</code> in the superclass, if
* non-empty, will retrieve an object list, which will be supplied during fixup
* to the resolving beans referenced by <code>nameresolver</code> (which must
* not be empty in this case) and <code>idresolver</code>. If idresolver is
* empty, the list is assumed to be a list of IDs already.
*
*/
public class UISelect extends UIComponent implements FixableComponent {
public UIBoundList optionlist;
/** A component representing the rendered labels for the list control */
public UIBoundList optionnames;
/**
* The input component representing the actual selected value. Expected to be
* either UIInput or UIInputMany.
*/
public UIBound selection;
/**
* This field is set during fixup for reference of the renderer. Do not set
* this manually.
*/
public StringSet selected;
/** Creates a selection control without a value binding, either
* non-submitting, or suitable for use in a GET form */
public static UISelect make(UIContainer tofill, String ID, String[] values,
String[] labels, String value, boolean willinput) {
UISelect togo = new UISelect();
togo.optionlist = new UIOutputMany();
togo.ID = ID;
togo.optionlist.setValue(values);
togo.optionnames = new UIBoundList();
togo.optionnames.setValue(labels);
togo.selection = new UIBoundString();
if (value != null) {
((UIBoundString) togo.selection).setValue(value);
}
togo.selection.willinput = willinput;
tofill.addComponent(togo);
return togo;
}
/** A "skeleton" make method to prepare for more complex constructions */
public static UISelect make(UIContainer tofill, String ID) {
UISelect togo = new UISelect();
togo.ID = ID;
tofill.addComponent(togo);
return togo;
}
// TODO: perhaps split this as a "postConstruct()" and "postFixup()"
// method. Will we actually ever have complex components?
public void fixupComponent() {
if (optionnames != null) {
if (optionnames.valuebinding == null) {
optionnames.valuebinding = optionlist.valuebinding;
}
}
else {
throw new IllegalArgumentException("UISelect component with full ID " +
getFullID() + " does not have optionnames set");
}
selected = computeSelectionSet(selection);
}
public static StringSet computeSelectionSet(UIBound selection) {
StringSet togo = new StringSet();
if (selection instanceof UIBoundList) {
togo.addAll(((UIBoundList) selection).getValue());
}
else if (selection instanceof UIBoundString) {
togo.add(((UIBoundString) selection).getValue());
}
return togo;
}
protected static UISelect make(UIContainer tofill, String ID,
String[] options, String valuebinding) {
UISelect togo = new UISelect();
togo.ID = ID;
togo.optionlist = togo.optionnames = UIOutputMany.make(options);
tofill.addComponent(togo);
return togo;
}
/**
* Constructs a single selection control, where the submitted values are
* identical with the rendered labels
*/
public static UISelect make(UIContainer tofill, String ID, String[] options,
String valuebinding, String initvalue) {
UISelect togo = make(tofill, ID, options, valuebinding);
UIInput selection = UIInput.make(valuebinding);
if (initvalue != null) {
selection.setValue(initvalue);
}
togo.selection = selection;
return togo;
}
/**
* Constructs a single selection control, with labels distinct from the
* submitting values.
*/
public static UISelect make(UIContainer tofill, String ID, String[] options,
String[] labels, String valuebinding, String initvalue) {
UISelect togo = make(tofill, ID, options, valuebinding, initvalue);
if (labels != null) {
togo.optionnames = UIOutputMany.make(labels);
}
return togo;
}
/**
* Constructs a multiple selection control, where the submitted values are
* identical with the rendered labels. Named differently to allow overload
* where the final parameter is null.
*/
public static UISelect makeMultiple(UIContainer tofill, String ID,
String[] options, String valuebinding, String[] initvalue) {
UISelect togo = make(tofill, ID, options, valuebinding);
UIInputMany selection = UIInputMany.make(valuebinding);
if (initvalue != null) {
selection.setValue(initvalue);
}
togo.selection = selection;
return togo;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
7e4bf9a62ef13ff935e78a8519f698ffac1e27c3 | 28d62135d02d9c792c8539958ad4695e2dcd175d | /oopsdemo/src/oopsdemo4/Calculator.java | 645239b57ef1b8dc269eee73a49f1667a603908b | [] | no_license | KumarSatyam2110/oopsdemo | e76d4d847f7642cc756360ad27af025b98053d90 | e691b8a55aaffc4677b0814e1848b22c1d576b20 | refs/heads/master | 2023-07-12T19:26:44.621656 | 2021-08-04T11:09:44 | 2021-08-04T11:09:44 | 392,645,352 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,536 | java | package oopsdemo4;
import java.util.Scanner;
public class Calculator implements IMath {
Scanner kb;
@Override
public void add() {
kb = new Scanner(System.in);
System.out.println("Enter any two integer values to perform addition");
int a=kb.nextInt();
int b=kb.nextInt();
int s=a+b;
System.out.println("Sum of "+a+" and "+b+" is "+s);
}
@Override
public void sub() {
kb = new Scanner(System.in);
System.out.println("Enter any two integer values to perform Substraction");
int a=kb.nextInt();
int b=kb.nextInt();
int s=a-b;
System.out.println("Sub of "+a+" and "+b+" is "+s);
}
@Override
public void mul() {
kb = new Scanner(System.in);
System.out.println("Enter any two integer values to perform Multiplication");
int a=kb.nextInt();
int b=kb.nextInt();
int s=a*b;
System.out.println("Mul of "+a+" and "+b+" is "+s);
}
@Override
public void div() {
kb = new Scanner(System.in);
System.out.println("Enter any two integer values to perform Division");
int a=kb.nextInt();
int b=kb.nextInt();
int s=a/b;
System.out.println("Div of "+a+" and "+b+" is "+s);
}
void display()
{
System.out.println("My calculator - designed by Raj");
}
public static void main(String[] args) {
Calculator c1=new Calculator();
c1.add();
c1.sub();
c1.mul();
c1.div();
}
}
| [
"krsatyam211098@gmail.com"
] | krsatyam211098@gmail.com |
3515152ec53f963e95c0ae90c8436ea38d03d7f3 | 80335729b4f362157bcee2446c66518510255873 | /forx-parser/src/main/java/com/github/s262316/forx/style/selectors/SelectorElement.java | aa6db4b7de28bc4a499ae9d0c80b7e7211d47270 | [] | no_license | s262316/forx | b2573c2ef4226296d586989424ec4468c7b6888d | a93261206b033bd5c2ec820d10eb297d51ad2714 | refs/heads/master | 2020-07-02T11:21:06.728449 | 2018-11-14T00:20:00 | 2018-11-14T00:20:00 | 74,310,919 | 0 | 0 | null | 2018-11-14T00:20:01 | 2016-11-21T00:04:19 | Java | UTF-8 | Java | false | false | 5,646 | java | package com.github.s262316.forx.style.selectors;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import com.github.s262316.forx.css.StyleXNodes;
import com.github.s262316.forx.css.VisualConstants;
import com.github.s262316.forx.css.VisualState;
import com.github.s262316.forx.tree.XAttribute;
import com.github.s262316.forx.tree.XElement;
import com.github.s262316.forx.style.selectors.util.Selectors;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
public class SelectorElement extends SelectorPart
{
public String name;
public List<SelectorAttr> attrs;
public List<PseudoClass> pseudoClasses;
public List<PseudoElementType> pseudoElements; // should this be a single PseudoElementType?
public List<String> ids;
public SelectorElement(String name)
{
this(name, Collections.<SelectorAttr>emptyList(), Collections.<PseudoClass>emptyList(), Collections.<PseudoElementType>emptyList(), Collections.<String>emptyList());
}
public SelectorElement(String name, List<SelectorAttr> attrs, List<PseudoClass> pseudoClasses, List<PseudoElementType> pseudoElements, List<String> ids)
{
this.name = name;
this.attrs = attrs;
this.pseudoClasses = pseudoClasses;
this.pseudoElements = pseudoElements;
this.ids = ids;
}
public boolean attributeMatch(XElement e)
{
boolean match=true;
Iterator<SelectorAttr> it=attrs.iterator();
while(it.hasNext() && match==true)
match=it.next().apply(e);
return match;
}
@Override
public boolean isMatch(XElement e, PseudoElementType pseudoType)
{
boolean matches=false;
if(e.getName().equals(name) || name.equals("*"))
{
if(attributeMatch(e)==true)
{
matches=true;
// check pseudo classes
if(pseudoClasses.size()==0)
matches=true;
else
{
VisualState state=e.getProperty(VisualConstants.VISUAL_STATE, VisualState.class);
Iterator<PseudoClass> it=pseudoClasses.iterator();
while(it.hasNext()&&matches==true)
{
PseudoClass pc=it.next();
switch(pc.type)
{
case PCT_FIRST_CHILD:
{
// if this is the first child of its parent
if(StyleXNodes.firstMember(e.parentNode())!=e)
matches=false;
break;
}
case PCT_LINK:
if(!state.isLink())
matches=false;
break;
case PCT_VISITED:
if(!state.isVisited())
matches=false;
break;
case PCT_HOVER:
if(!state.isHover())
matches=false;
break;
case PCT_ACTIVE:
if(!state.isActive())
matches=false;
break;
case PCT_FOCUS:
if(!state.isFocus())
matches=false;
break;
case PCT_LANG:
{
matches=Selectors.dashmatch(pc.info, e.lang());
break;
}
default:
matches=false;
break;
}
}
}
if(matches==true)
{
// is it possible to have multiple pseudo-elements?????
// let's assume it's not. and the selector checks
// for the presence of pseudoType.
// PE_NOT_PSEUDO must have ZERO pseudoElements
// check pseudo elements
if(pseudoElements.size()==0 && pseudoType==PseudoElementType.PE_NOT_PSEUDO)
matches=true;
else
{
if(!pseudoElements.contains(pseudoType))
matches=false;
}
// check IDs
Iterator<String> it=ids.iterator();
while(it.hasNext()&&matches==true)
{
XAttribute a=e.getAttr("id");
if(a!=null)
{
if(!it.next().equals(a.getValue()))
matches=false;
}
else
matches=false;
}
}
}
}
return matches;
}
@Override
public String toString()
{
return MoreObjects.toStringHelper(this)
.add("name", name)
.add("attrs", attrs)
.add("pseudoClasses", pseudoClasses)
.add("pseudoElements", pseudoElements)
.add("ids", ids)
.toString();
}
}
| [
"s262316@users.noreply.github.com"
] | s262316@users.noreply.github.com |
c0b46b3a4627744d288d0d4e4996afe0d5b93fda | 6b4c7b27ba9c533da0ceb137b79aa820556b5578 | /src/main/java/cn/eqianyuan/core/exception/ExceptionMsgConstant.java | 32075dcd411f37ebd794d26f2470ffba9077becf | [] | no_license | eqianyuan/bbsoho | 264d1db3096bd746b7a5dc8d1ef0722918e1269f | e7f60e7f360c3247d3e0aa97babdae0b79fa5bd9 | refs/heads/master | 2020-05-22T04:19:59.283939 | 2016-10-29T08:16:22 | 2016-10-29T08:16:22 | 65,515,501 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 17,769 | java | package cn.eqianyuan.core.exception;
/**
* 自定义异常错误消息静态常量类
* Created by jason on 2016-05-19.
*/
public class ExceptionMsgConstant {
/**********
* 系统级异常配置
**********/
//系统运行时错误
public static final String SYSTEM_RUNTIME_EXCEPTION = "1001001";
//验证码是空
public static final String VALIDATA_CODE_IS_EMPTY = "1001002";
//验证码内容超长
public static final String VALIDATA_CODE_CONTENT_LENGTH_TO0_LONG = "1001003";
//验证码校验错误
public static final String VALIDATA_CODE_VALIDATION_ERROR = "1001004";
//验证码发送时间间隔小于60s
public static final String VALIDATA_CODE_INTERVAL_INSUFFICIENT = "1001005";
//短信验证码发送失败
public static final String VALIDATA_CODE_SEND_ERROR = "1001006";
//获取配置文件信息错误
public static final String GET_CONFIGURATION_ERROR = "1001007";
//短信验证码为空
public static final String VALIDATA_CODE_BY_SMS_IS_EMPTY = "1001008";
//注册激活邮件发送失败
public static final String REGISTRATION_ACTIVATION_EMAIL_SEND_ERROR = "1001009";
//获取字符串字节错误
public static final String SYSTEM_GET_BYTE_FAIL = "1001010";
//附件不存在
public static final String FILE_NO_EXISTS = "1001011";
//附件上传失败
public static final String FILE_UPDATE_ERROR = "1001012";
/********** 系统级异常配置 **********/
/**********
* 客户端系统异常配置
**********/
//会员(供应商)用户注册,手机号码不正确
public static final String SUPPLIER_USER_REGISTER_BY_MOBILE_IS_FAIL = "2001001";
//会员(供应商)用户注册,登录密码为空
public static final String SUPPLIER_USER_REGISTER_BY_LOGIN_PASSWORD_IS_EMPTY = "2001002";
//会员(供应商)用户注册,登录密码包含无效字符
public static final String SUPPLIER_USER_REGISTER_BY_LOGIN_PASSWORD_CONTAINS_INVALID_CHARACTERS = "2001003";
//会员(供应商)用户注册,登录密码复杂度不够
public static final String SUPPLIER_USER_REGISTER_BY_LOGIN_PASSWORD_COMPLEXITY_IS_NOT_ENOUGH = "2001004";
//会员(供应商)用户注册,手机号码已经注册
public static final String SUPPLIER_USER_REGISTER_BY_MOBILE_IS_ALREADY_REGISTER = "2001005";
//会员(供应商)用户登录,账号或密码错误
public static final String SUPPLIER_USER_LOGIN_BY_ACCOUNT_ERROR = "2001006";
//会员(供应商)用户基本信息,真实姓名为空
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_REAL_NAME_IS_EMPTY = "2001007";
//会员(供应商)用户基本信息,性别为空
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_SEX_IS_EMPTY = "2001008";
//会员(供应商)用户基本信息,真实姓名太长
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_REAL_NAME_TO_LONG = "2001009";
//会员(供应商)用户基本信息,昵称为空
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_NICK_NAME_IS_EMPTY = "2001010";
//会员(供应商)用户基本信息,生日不正确
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_BIRTHDAY_IS_FAIL = "2001011";
//会员(供应商)用户基本信息,邮箱为空
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_EMAIL_IS_EMPTY = "2001012";
//会员(供应商)用户基本信息,邮箱不正确
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_EMAIL_IS_FAIL = "2001013";
//会员(供应商)用户基本信息,工作年限为空
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_WORKING_YEARS_IS_EMPTY = "2001014";
//会员(供应商)用户基本信息,学历不正确
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_SCHOOLING_IS_FAIL = "2001015";
//会员(供应商)用户基本信息,昵称太长
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_NICK_NAME_TO_LONG = "2001016";
//会员(供应商)用户基本信息,邮箱太长
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_EMAIL_TO_LONG = "2001017";
//会员(供应商)用户基本信息,学校名称太长
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_SCHOOL_NAME_TO_LONG = "2001018";
//会员(供应商)用户基本信息,专业太长
public static final String SUPPLIER_USER_BASIC_INFORMATION_BY_PROFESSIONAL_NAME_TO_LONG = "2001019";
//会员(供应商)用户简历信息,行业为空
public static final String SUPPLIER_USER_RESUME_BY_INDUSTRY_IS_EMPTY = "2001020";
//会员(供应商)用户简历信息,行业工种类别为空
public static final String SUPPLIER_USER_RESUME_BY_WORK_TYPE_IS_EMPTY = "2001021";
//会员(供应商)用户简历信息,行业工种为空
public static final String SUPPLIER_USER_RESUME_BY_WORK_IS_FAIL = "2001022";
//会员(供应商)用户简历信息,工作时间为空
public static final String SUPPLIER_USER_RESUME_BY_EXPECT_WORK_TIME_IS_EMPTY = "2001023";
//会员(供应商)用户简历信息,期望薪资为空
public static final String SUPPLIER_USER_RESUME_BY_EXPECT_PAY_IS_EMPTY = "2001024";
//会员(供应商)用户简历信息,行业工种选择太多项了
public static final String SUPPLIER_USER_RESUME_BY_WORK_CHOOSE_TOO_MANY = "2001025";
//会员(供应商)用户简历信息,擅长方向内容太多了
public static final String SUPPLIER_USER_RESUME_BY_DISCRIBE_TOO_MANY = "2001026";
//会员(供应商)简历信息,简历查询失败
public static final String SUPPLIER_USER_RESUME_BY_QUERY_FAIL = "2001027";
//会员(需求商)用户注册,邮箱为空
public static final String DEMAND_USER_REGISTER_BY_EMAIL_IS_EMPTY = "2002001";
//会员(需求商)用户注册,邮箱不正确
public static final String DEMAND_USER_REGISTER_BY_EMAIL_IS_FAIL = "2002002";
//会员(需求商)用户注册,登录密码为空
public static final String DEMAND_USER_REGISTER_BY_LOGIN_PASSWORD_IS_EMPTY = "2002003";
//会员(需求商)用户注册,确认密码为空
public static final String DEMAND_USER_REGISTER_BY_LOGIN_CONFIRM_PASSWORD_IS_EMPTY = "2002004";
//会员(需求商)用户注册,两次密码不一致
public static final String DEMAND_USER_REGISTER_BY_LOGIN_TWO_PASSWORD_NOT_CONSISTENT = "2002005";
//会员(需求商)用户注册,登录密码包含无效字符
public static final String DEMAND_USER_REGISTER_BY_LOGIN_PASSWORD_CONTAINS_INVALID_CHARACTERS = "2002006";
//会员(需求商)用户注册,登录密码复杂度不够
public static final String DEMAND_USER_REGISTER_BY_LOGIN_PASSWORD_COMPLEXITY_IS_NOT_ENOUGH = "2002007";
//会员(需求商)用户注册,邮箱号码已经注册
public static final String DEMAND_USER_REGISTER_BY_EMAIL_IS_ALREADY_REGISTER = "2002008";
//会员(需求商)账号激活,激活失败
public static final String DEMAND_USER_ACCOUNT_ACTIVATION_FAIL = "2002009";
//会员(需求商)账号不存在
public static final String DEMAND_USER_ACCOUNT_IS_NOT_EXISTS = "2002010";
//会员(需求商)用户登录,账号或密码错误
public static final String DEMAND_USER_LOGIN_BY_ACCOUNT_ERROR = "2001006";
//会员(需求商)用户基本信息,企业名称为空
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_NAME_IS_EMPTY = "2002011";
//会员(需求商)用户基本信息,企业性质为空
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_ENTERPRISE_NATURE_IS_EMPTY = "2002012";
//会员(需求商)用户基本信息,企业规模为空
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_ENTERPRISE_SCALE_IS_EMPTY = "2002013";
//会员(需求商)用户基本信息,企业名称太长
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_NAME_TO_LONG = "2002014";
//会员(需求商)用户基本信息,企业联系人为空
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_CONTACT_IS_EMPTY = "2002015";
//会员(需求商)用户基本信息,企业联系人尊称为空
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_RESPECTFUL_NAME_IS_EMPTY = "2002016";
//会员(需求商)用户基本信息,企业联系电话-移动号码不能为空
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_MOBILE_NUMBER_IS_EMPTY = "2002017";
//会员(需求商)用户基本信息,企业联系电话-移动号码不正确
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_MOBILE_NUMBER_IS_FAIL = "2002018";
//会员(需求商)用户基本信息,企业地区-省不能为空
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_PROVINCE_IS_FAIL = "2002019";
//会员(需求商)用户基本信息,企业地区-市不能为空
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_CITY_IS_FAIL = "2002020";
//会员(需求商)用户基本信息,企业地区-区不能为空
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_COUNTY_IS_FAIL = "2002021";
//会员(需求商)用户基本信息,企业详细地址能为空
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_ADDRESS_IS_FAIL = "2002022";
//会员(需求商)用户基本信息,企业联系人太长
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_CONTACT_TO_LONG = "2002023";
//会员(需求商)用户基本信息,企业联系固话-区号不是数字
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_PHONE_AREA_CODE_IS_FAIL = "2002024";
//会员(需求商)用户基本信息,企业联系固话-区号太长
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_PHONE_AREA_CODE_TO_LONG = "2002025";
//会员(需求商)用户基本信息,企业联系固话号码不是数字
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_TELEPHONE_NUMBER_IS_FAIL = "2002026";
//会员(需求商)用户基本信息,企业联系固话-分机号不是数字
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_EXTENSION_NUMBER_IS_FAIL = "2002027";
//会员(需求商)用户基本信息,企业联系固话-分机号太长
public static final String DEMAND_USER_BASIC_INFORMATION_BY_COMPANY_EXTENSION_NUMBER_TO_LONG = "2002028";
//会员(需求商)用户基本信息,企业详细地址太长
public static final String DEMAND_USER_BASIC_INFORMATION_BY_ADDRESS_TO_LONG = "2002029";
//会员(需求商)需求信息,需求查询失败
public static final String DEMAND_USER_DEMAND_BY_QUERY_FAIL = "2002030";
//会员(需求商)需求信息,需求名称为空
public static final String DEMAND_USER_DEMAND_BY_NAME_IS_EMPTY = "2002031";
//会员(需求商)需求信息,需求周期开始时间为空
public static final String DEMAND_USER_DEMAND_BY_BEGIN_CYCLE_IS_EMPTY = "2002032";
//会员(需求商)需求信息,需求周期结束时间为空
public static final String DEMAND_USER_DEMAND_BY_END_CYCLE_IS_EMPTY = "2002033";
//会员(需求商)需求信息,需求周期开始时间格式不正确
public static final String DEMAND_USER_DEMAND_BY_BEGIN_CYCLE_FORMAT_IS_FAIL = "2002034";
//会员(需求商)需求信息,需求周期结束时间格式不正确
public static final String DEMAND_USER_DEMAND_BY_END_CYCLE_FORMAT_IS_FAIL = "2002035";
//会员(需求商)需求信息,需求联系人为空
public static final String DEMAND_USER_DEMAND_BY_COMPANY_CONTACT_IS_EMPTY = "2002036";
//会员(需求商)需求信息,需求联系人尊称为空
public static final String DEMAND_USER_DEMAND_BY_COMPANY_RESPECTFUL_NAME_IS_EMPTY = "2002037";
//会员(需求商)需求信息,需求联系电话-移动号码不能为空
public static final String DEMAND_USER_DEMAND_BY_COMPANY_MOBILE_NUMBER_IS_EMPTY = "2002038";
//会员(需求商)需求信息,需求联系电话-移动号码不正确
public static final String DEMAND_USER_DEMAND_BY_COMPANY_MOBILE_NUMBER_IS_FAIL = "2002039";
//会员(需求商)需求信息,需求名称太长
public static final String DEMAND_USER_DEMAND_BY_NAME_TO_LONG = "2002040";
//会员(需求商)需求信息,联系固话-区号不是数字
public static final String DEMAND_USER_DEMAND_BY_PHONE_AREA_CODE_IS_FAIL = "2002041";
//会员(需求商)需求信息,联系固话-区号太长
public static final String DEMAND_USER_DEMAND_BY_PHONE_AREA_CODE_TO_LONG = "2002042";
//会员(需求商)需求信息,联系固话号码不是数字
public static final String DEMAND_USER_DEMAND_BY_TELEPHONE_NUMBER_IS_FAIL = "2002043";
//会员(需求商)需求信息,联系固话-分机号不是数字
public static final String DEMAND_USER_DEMAND_BY_EXTENSION_NUMBER_IS_FAIL = "2002044";
//会员(需求商)需求信息,联系固话-分机号太长
public static final String DEMAND_USER_DEMAND_BY_EXTENSION_NUMBER_TO_LONG = "2002045";
//会员(需求商)需求信息,详细地址太长
public static final String DEMAND_USER_DEMAND_BY_ADDRESS_TO_LONG = "2002046";
//会员(需求商)需求信息,工作内容太长
public static final String DEMAND_USER_DEMAND_BY_DISCRIBE_TO_LONG = "2002047";
//会员(需求商)需求信息,需求用人为空
public static final String DEMAND_USER_DEMAND_BY_EMPLOY_PERSONS_IS_EMPTY = "2002048";
//需求操作,找不到需求
public static final String DEMAND_IS_EMPTY = "2003001";
//需求操作,已报过名
public static final String DEMAND_HAS_SIGN_UP = "2003002";
//需求操作,约见失败
public static final String DEMAND_MEET_FAIL = "2003003";
//需求操作,约见表单-约见时间为空
public static final String DEMAND_MEET_TIME_IS_EMPTY = "2003004";
//需求操作,约见表单-约见地址为空
public static final String DEMAND_MEET_ADDRESS_IS_EMPTY = "2003005";
//需求操作,约见表单-约见联系人为空
public static final String DEMAND_MEET_CONTACT_IS_EMPTY = "2003006";
//需求操作,约见表单-约见联系人尊称为空
public static final String DEMAND_MEET_RESPECTFULNAME_IS_EMPTY = "2003007";
//需求操作,约见表单-约见联系电话-移动号码为空
public static final String DEMAND_MEET_MOBILE_IS_EMPTY = "2003008";
//需求操作,约见表单-约见联系电话-固话-区号为空
public static final String DEMAND_MEET_PHONEAREACODE_IS_EMPTY= "2003009";
//需求操作,约见表单-约见联系电话-固话-号码为空
public static final String DEMAND_MEET_TELEPHONENUMBER_IS_EMPTY = "2003010";
//需求操作,约见表单-约见联系电话-固话-分机号码为空
public static final String DEMAND_MEET_EXTENSIONNUMBER_IS_EMPTY = "2003011";
//需求操作,约见表单-约见联系电话-移动号码不正确
public static final String DEMAND_MEET_BY_MOBILE_NUMBER_IS_FAIL = "2003012";
//需求操作,约见表单-联系人太长
public static final String DEMAND_MEET_BY_COMPANY_CONTACT_TO_LONG = "2003013";
//需求操作,约见表单-约见联系固话-区号不是数字
public static final String DEMAND_MEET_BY_COMPANY_PHONE_AREA_CODE_IS_FAIL = "2003014";
//需求操作,约见表单-约见联系固话-区号太长
public static final String DEMAND_MEET_BY_COMPANY_PHONE_AREA_CODE_TO_LONG = "2003015";
//需求操作,约见表单-约见联系固话号码不是数字
public static final String DEMAND_MEET_BY_COMPANY_TELEPHONE_NUMBER_IS_FAIL = "2003016";
//需求操作,约见表单-约见联系固话-分机号不是数字
public static final String DEMAND_MEET_BY_COMPANY_EXTENSION_NUMBER_IS_FAIL = "2003017";
//需求操作,约见表单-约见联系固话-分机号太长
public static final String DEMAND_MEET_BY_COMPANY_EXTENSION_NUMBER_TO_LONG = "2003018";
//需求操作,约见表单-约见详细地址太长
public static final String DEMAND_MEET_BY_ADDRESS_TO_LONG = "2003019";
//需求操作,约见信息查询失败
public static final String DEMAND_MEET_BY_QUERY_FAIL = "2003020";
//需求操作,聘用失败
public static final String DEMAND_HIRE_FAIL = "2003021";
//需求操作,聘用表单-合同生效时间为空
public static final String DEMAND_HIRE_CONTRACT_COMES_INTO_EFFECT_TIME_IS_EMPTY = "2003022";
//需求操作,聘用表单-合同失效时间为空
public static final String DEMAND_MEET_CONTRACT_EXPIRES_TIME_IS_EMPTY = "2003023";
//需求操作,聘用表单-薪资报酬为空
public static final String DEMAND_MEET_REMUNERATION_IS_EMPTY = "2003024";
//需求操作,聘用表单-薪资报酬不是正确金额
public static final String DEMAND_MEET_REMUNERATION_IS_NOT_MONEY = "2003025";
//需求操作,聘用信息查询失败
public static final String DEMAND_HIRE_BY_QUERY_FAIL = "2003026";
//需求操作,关闭报名通道失败
public static final String DEMAND_SIGN_UP_BY_WORK_CLOSE_FAIL = "2003027";
/********** 客户端系统异常配置 **********/
}
| [
"422065325@qq.com"
] | 422065325@qq.com |
e3023ce3d7fb56e2ab718501b5eeda41df8603cf | df147df2a82dd46368c5288ce838592dbaa551fb | /BookAssi/src/BookDB.java | a8a0b7c881e39dd1f8e9e8f8c91f02719062453e | [] | no_license | alice8347/BookAssi | c585f725fffb4b2588c1f0e7c77f784bbe8f65aa | 4165c786e69dd33b5962570aa8eb50caec456f15 | refs/heads/master | 2021-01-21T12:46:15.307120 | 2015-08-26T20:38:20 | 2015-08-26T20:38:20 | 41,448,702 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 832 | java | public class BookDB {
public static Book getBook(String title, double price) {
Book myBook = new Book();
myBook.setTitle(title);
if (title.equalsIgnoreCase("java")) {
myBook.setAuthor("Murach");
myBook.setDescription("Murach's Beginning Java");
myBook.setPrice(price);
myBook.setInStock(true);
} else if (title.equalsIgnoreCase("jsps")){
myBook.setAuthor("Murach");
myBook.setDescription("Murach's Java Servlets and JSP");
myBook.setPrice(price);
myBook.setInStock(true);
} else if (title.equalsIgnoreCase("mcb2")) {
myBook.setAuthor("Murach");
myBook.setDescription("Murach's Mainframe COBOL");
myBook.setPrice(price);
myBook.setInStock(true);
} else {
myBook.setAuthor("Unknown");
myBook.setDescription("Unknown");
}
return myBook;
}
}
| [
"alice8347@hotmail.com"
] | alice8347@hotmail.com |
f78714229968d89f9ca4cae1a7b93babfb586d33 | 3834bfdc839f972a5126788c6dbb637f338f1a7f | /methodhook-master/src/androidTest/java/com/example/methodhook_master/ExampleInstrumentedTest.java | d645aa08e04f75dc8a07b4f2e8d0a43b4797dfa1 | [] | no_license | onegithuber/hook_and_parse_dex2 | 022a1261d5e24668942996d1c327c0a81a9d1c16 | da35df56204bf83a1f9b1264d602cbf83fc905d4 | refs/heads/master | 2020-04-03T15:08:51.339616 | 2018-10-30T08:45:53 | 2018-10-30T08:45:53 | 155,352,214 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 759 | java | package com.example.methodhook_master;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.methodhook_master", appContext.getPackageName());
}
}
| [
"zk@zkdeMacBook-Air.local"
] | zk@zkdeMacBook-Air.local |
0f1a0a12bc22940e0a40dd6e95b456cd8c6dcc6c | a2bbd2ae2e9f83b1f06ca2dd71509c6febd35427 | /LS_Server/src/main/java/dataimpl/stockdata/StockInitialData.java | ac6a451166c11f4e7ae84c9aab3bd3ca990432d1 | [] | no_license | disinuo/Logistics-System | 0c15645d79881cc7c59bbe424de765d70ede9bc1 | 88de29f512d4a5a0acbbcc351407ac433175b035 | refs/heads/master | 2021-01-11T09:58:27.837194 | 2016-01-05T13:46:09 | 2016-01-05T13:46:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,907 | java | /**
*
*/
package dataimpl.stockdata;
import java.io.IOException;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
import util.enumData.City;
import util.enumData.ResultMessage;
import PO.StockNumPO;
import dataservice.stockdataservice.StockInitialDataService;
import datautil.DataUtility;
/**
* @author G
*
*/
public class StockInitialData extends UnicastRemoteObject implements StockInitialDataService{
String filename = "StockIniNum.txt";
DataUtility du = new DataUtility();
/**
* @throws RemoteException
*/
public StockInitialData() throws RemoteException {
super();
}
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 初始化库存数量
*/
@Override
public ResultMessage initial(StockNumPO po) throws RemoteException {
try {
try {
ArrayList<Object> list = du.getAll(filename);
if (list != null){
for(int i = 0;i < list.size();++i) {
StockNumPO stocknumpo = (StockNumPO) list.get(i);
if(stocknumpo.getCityNum().equals(po.getCityNum())){
list.remove(i);
}
}
} else{
list = new ArrayList<Object>();
}
list.add(po);
du.SaveAll(list, filename);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
} catch (IOException e) {
e.printStackTrace();
return ResultMessage.FAILED;
}
return ResultMessage.SUCCESS;
}
/**
* 得到库存初始化的值
*/
@Override
public StockNumPO getInitialNum(City citynum) throws RemoteException {
ArrayList<Object> list;
try {
list = du.getAll(filename);
for(int i = 0;i < list.size();++i) {
StockNumPO po = (StockNumPO)list.get(i);
if(po.getCityNum().equals(citynum)){
return po;
}
}
du.SaveAll(list, filename);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
| [
"ctg14@software.nju.edu.cn"
] | ctg14@software.nju.edu.cn |
33c2db6baa6562418bed295d9d2ab703cbceb1e5 | 62c5688ee23f59f283755bc63d35bc65592ca496 | /app/src/androidTest/java/com/example/appstore/ExampleInstrumentedTest.java | 92a5c66cec86c77ee42fb21c15dba34ca0abf64b | [] | no_license | guyga/AppStore | d32a4eeb96421c78dbe8e5d09cccb0a45f37e8f6 | e03af49b8cf11de9805c6d0cbbc95d9551f7b778 | refs/heads/master | 2023-03-29T18:15:23.617742 | 2021-04-08T10:16:40 | 2021-04-08T10:16:40 | 355,857,011 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 728 | java | package com.example.appstore;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest
{
@Test
public void useAppContext()
{
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.appstore", appContext.getPackageName());
}
} | [
"guy.ga@action-item.co.il"
] | guy.ga@action-item.co.il |
e83de90a8012f36ba58a2b29bda9e5306581c441 | 2ccffea6d945c25203ded9cd539dd968de1ce3e6 | /ATM-CASE-STUDY/Account.java | fa0c9d74a3f2f103182fe465fdc78bc7a6338e9d | [] | no_license | Satabdi-stack/Capgemini-JA-17 | 8f34a06c7987a44c2e2f3c2afded41afaa1db690 | 26a2d1e2b715e8451b917f9dc52d21a49de6432d | refs/heads/main | 2023-05-25T09:30:28.086863 | 2021-06-14T16:30:33 | 2021-06-14T16:30:33 | 368,937,188 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 608 | java | package com.capgemini.bank;
public class Account // Account Class for instantiating Account fields like account no. , balance and account type
{
int IAccountNumber;
double Balance;
String AccountType;
public Account(int iAccountNumber, double balance, String accountType) {
super();
IAccountNumber = iAccountNumber;
Balance = balance;
AccountType = accountType;
}
@Override
public String toString() {
String sm_decimal_format="%.2f";
return "Account Number : " + IAccountNumber + "\nBalance : Rs." + sm_decimal_format.formatted(Balance) + "\nAccount Type : " + AccountType;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
d46e9e7050c9cc4cda42d08285c3324ae99738bd | bccb3b808f6c68677922313136d9813327767b26 | /src/test/java/com/charlesasilva61/testjwtjava/jjwt/EncodeJJWTTest.java | 96fae927d5c2c435bbed16a0ea20b8fe9ac1685d | [] | no_license | charlesardsilva/example-jwt-java | 1361d6d17c1d3919836d0304450ba20c0e06189a | fbb9bc9c423a106f946bc671b69df885d0d62d4e | refs/heads/master | 2021-09-02T08:20:06.792458 | 2017-12-31T22:25:54 | 2017-12-31T22:25:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,017 | java | package com.charlesasilva61.testjwtjava.jjwt;
import java.util.Calendar;
import java.util.GregorianCalendar;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.Test;
import io.jsonwebtoken.JwtBuilder;
public class EncodeJJWTTest {
@Test(expected=IllegalArgumentException.class)
public void ifSecretIsNullThrowExceptino() {
EncodeJJWT.encodeHS256(null, 0);
}
@Test(expected=IllegalArgumentException.class)
public void ifSecretIsEmptyThrowExceptino() {
EncodeJJWT.encodeHS256("", 0);
}
@Test
public void generateTokenWithSuccess() {
JwtBuilder jwtBuilder = EncodeJJWT.encodeHS256("my-secret", 100);
jwtBuilder.setId("my-id");
jwtBuilder.setExpiration(null);
jwtBuilder.setIssuedAt(new GregorianCalendar(2017, Calendar.DECEMBER, 31).getTime());
String expectedToken = "eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1MTQ2ODU2MDAsImp0aSI6Im15LWlkIn0.EiasFBmFVfS3ystNbrl8vVcH4zZmzO25QBF2nvGdv-Y";
Assert.assertThat(jwtBuilder.compact(), Matchers.equalTo(expectedToken));
}
}
| [
"charles@ciandt.com"
] | charles@ciandt.com |
515d720ddde01cc3e6a0b8d160da7c412f1ce371 | 01bc506b46fa9facf1f8b5af01864589576bc34d | /src/gauss/jordan/elimination/Algorithm.java | 52a70cc55f67025a41d16a8ccabb04fc364df695 | [] | no_license | svadlamudi/GaussJordanElimination | 2284d5572ea48d14337da6286d63b528fa8d2610 | ab643d13843d9d04a5f50ca26c6289ea8290e63d | refs/heads/master | 2016-09-06T03:22:06.964736 | 2014-10-25T01:52:33 | 2014-10-25T01:52:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,099 | java | package gauss.jordan.elimination;
// Imports
import javafx.collections.ObservableList;
import javafx.scene.control.TableView;
/**
* Performs the Gauss Jordan Elimination on the given matrix.
*/
public class Algorithm {
private static final double EPSILON = 1e-8;
private final int N; // N-by-N system
private double[][] a; // N-by-N+1 augmented matrix
public static StringBuilder result;
private static boolean infiniteSolutions = false;
private static int columnsGiven = 0;
private static int rowsGiven = 0;
public Algorithm(double[][] A, double[] b) {
N = b.length;
a = new double[N][N+N+1];
for (int i = 0; i < N; i++)
for (int j = 0; j < N; j++)
a[i][j] = A[i][j];
for (int i = 0; i < N; i++)
a[i][N+i] = 1.0;
for (int i = 0; i < N; i++) a[i][N+N] = b[i];
solve();
assert check(A, b);
}
private void solve() {
for (int p = 0; p < N; p++) {
int max = p;
for (int i = p+1; i < N; i++) {
if (Math.abs(a[i][p]) > Math.abs(a[max][p])) {
max = i;
}
}
swap(p, max);
if (Math.abs(a[p][p]) <= EPSILON) {
continue;
// throw new RuntimeException("Matrix is singular or nearly singular");
}
pivot(p, p);
}
}
private void swap(int row1, int row2) {
double[] temp = a[row1];
a[row1] = a[row2];
a[row2] = temp;
}
private void pivot(int p, int q) {
for (int i = 0; i < N; i++) {
double alpha = a[i][q] / a[p][q];
for (int j = 0; j <= N+N; j++) {
if (i != p && j != q) a[i][j] -= alpha * a[p][j];
}
}
for (int i = 0; i < N; i++)
if (i != p) a[i][q] = 0.0;
for (int j = 0; j <= N+N; j++)
if (j != q) a[p][j] /= a[p][q];
a[p][q] = 1.0;
}
public double[] primal() {
double[] x = new double[N];
for (int i = 0; i < N; i++) {
if (Math.abs(a[i][i]) > EPSILON)
x[i] = a[i][N+N] / a[i][i];
else if (Math.abs(a[i][N+N]) > EPSILON)
return null;
}
return x;
}
public double[] dual() {
double[] y = new double[N];
for (int i = 0; i < N; i++) {
if ( (Math.abs(a[i][i]) <= EPSILON) && (Math.abs(a[i][N+N]) > EPSILON) ) {
for (int j = 0; j < N; j++)
y[j] = a[i][N+j];
return y;
}
}
return null;
}
public boolean isFeasible() {
return primal() != null;
}
private void show() {
infiniteSolutions = false;
double[] temp = new double[columnsGiven+2];
int M = N;
if(columnsGiven == rowsGiven)
M--;
for (int i = 0; i < N; i++) {
result.append("|");
for (int j = 0; j < M; j++) {
result.append(String.format(" %8.3f ", a[i][j]));
temp[j] = a[i][j];
}
result.append(String.format("| %8.3f |\n", a[i][N+N]));
temp[columnsGiven] = a[i][N+N];
if(infiniteSolutions == false)
infiniteSolutions = testInfinite(temp);
}
result.append(String.format("\n\n"));
}
private boolean check(double[][] A, double[] b) {
if (isFeasible()) {
double[] x = primal();
for (int i = 0; i < N; i++) {
double sum = 0.0;
for (int j = 0; j < N; j++) {
sum += A[i][j] * x[j];
}
if (Math.abs(sum - b[i]) > EPSILON) {
result.append(String.format("Not Feasible\n"));
result.append(String.format("b[%d] = %8.3f, sum = %8.3f\n\n", i, b[i], sum));
return false;
}
}
return true;
}
else {
double[] y = dual();
for (int j = 0; j < N; j++) {
double sum = 0.0;
for (int i = 0; i < N; i++) {
sum += A[i][j] * y[i];
}
if (Math.abs(sum) > EPSILON) {
result.append(String.format("Invalid Certificate of Infeasibility\n\n"));
result.append(String.format("sum = %8.3f\n", sum));
return false;
}
}
double sum = 0.0;
for (int i = 0; i < N; i++) {
sum += y[i] * b[i];
}
if (Math.abs(sum) < EPSILON) {
result.append(String.format("Invalid Certificate of Infeasibility\n\n"));
result.append(String.format("yb = %8.3f\n", sum));
return false;
}
return true;
}
}
public static void test(double[][] A, double[] b) {
Algorithm gaussian = new Algorithm(A, b);
result.append("Final Form:\n\n");
gaussian.show();
if (gaussian.isFeasible()) {
double[] x = gaussian.primal();
if(infiniteSolutions)
result.append(String.format("Infinitely Many Solutions to Ax = b\n\n"));
else{
result.append(String.format("Unique Solution to Ax = b\n\n"));
for (int i = 0; i < x.length; i++) {
result.append(String.format("%10.6f\n", x[i]));
}
}
result.append(String.format("\n\n"));
}
else {
result.append(String.format("No Solution to Ax = b\n\n"));
// double[] y = gaussian.dual();
// for (int j = 0; j < y.length; j++) {
// result.append(String.format("%10.6f\n", y[j]));
// }
}
}
private static boolean testInfinite(double[] x){
double sum = 0.0;
for(double temp : x){
sum += Math.abs(temp);
}
if(sum == 0.0)
return true;
else
return false;
}
/**
* @author Sai Kiran Vadlamudi
*
* Converts given TableView to a matrix to be solved by the Algorithm.
*
* @param matrix
* @param rows
* @param columns
*/
public static void startCalculate(TableView<String[]> matrix, int rows, int columns){
double[][] matrixArray = findMatrix(matrix, rows, columns);
double[] matrixConstant = findConstants(matrix, rows, columns);
result = new StringBuilder();
columnsGiven = columns;
rowsGiven = rows;
result.append("\nInitial Matrix:\n\n");
for(int i = 0; i < rows; i++){
result.append("|");
for(int j = 0; j < columns; j++){
if(j == columns-1)
result.append(String.format(" | %10.6f ", matrixConstant[i]));
else
result.append(String.format(" %10.6f ", matrixArray[i][j]));
}
result.append(" |\n");
}
result.append("\n\n");
test(matrixArray, matrixConstant);
StringBuilder temp = new StringBuilder();
temp.append(MainController.resultsField.getText());
temp.append("-------------------------------------------------Manual--------------------------------------------------");
temp.append(result);
MainController.resultsField.setText(temp.toString());
MainController.resultsField.setScrollTop(Double.MIN_VALUE);
MainController.resultsField.appendText("");
}
/**
* @author Sai Kiran Vadlamudi
*
* Returns the variables in the given TableView as an array, matrix.
*
* @param matrixTable
* @param rows
* @param columns
* @return double[][]
*/
public static double[][] findMatrix(TableView<String[]> matrixTable, int rows, int columns){
ObservableList<String[]> tempList = matrixTable.getItems();
double[][] matrixArray = new double[rows][columns-1];
int j = 0;
if(rows == columns)
matrixArray = new double[rows][columns];
for(int i = 0; i < rows; i++){
for(String node : tempList.get(i)){
try{
if(j+1 == columns){
if(rows == columns){
matrixArray[i][j] = 0;
}else
continue;
}
else{
matrixArray[i][j] = Double.parseDouble(node);
}
}catch(NumberFormatException e){
if(j+1 == columns){
matrixArray[i][j] = 0;
continue;
}else
matrixArray[i][j] = 0;
}
j++;
}
j = 0;
}
return matrixArray;
}
/**
* @author Sai Kiran Vadlamudi
*
* Return the constants in the given TableView as an array.
*
* @param matrixTable
* @param rows
* @param columns
* @return double[]
*/
public static double[] findConstants(TableView<String[]> matrixTable, int rows, int columns){
ObservableList<String[]> tempList = matrixTable.getItems();
double[] constantArray = new double[rows];
int j = 0;
for(int i = 0; i < rows; i++){
for(String node : tempList.get(i)){
try{
if(j+1 == columns){
constantArray[i] = Double.parseDouble(node);
}
}catch(NumberFormatException e){
if(j+1 == columns)
constantArray[i] = 0;
}
j++;
}
j = 0;
}
return constantArray;
}
/**
* @author Sai Kiran Vadlamudi
*
* Solves the given matrix using the Algorithm
*
* @param matrix
* @param rows
* @param columns
*/
public static void startCalculate(double[][] matrix, int rows, int columns){
double[][] matrixArray = new double[rows][columns-1];
double[] matrixConstant = new double[rows];
columnsGiven = columns;
rowsGiven = rows;
result = new StringBuilder();
result.append("\nInitial Matrix:\n\n");
for(int i = 0; i < rows; i++){
result.append("|");
for(int j = 0; j < columns; j++){
if(j == columns-1){
matrixConstant[i] = matrix[i][j];
result.append(String.format(" | %10.6f ", matrixConstant[i]));
}else{
matrixArray[i][j] = matrix[i][j];
result.append(String.format(" %10.6f ", matrixArray[i][j]));
}
}
result.append(" |\n");
}
result.append("\n\n");
test(matrixArray, matrixConstant);
StringBuilder temp = new StringBuilder();
temp.append(MainController.resultsField.getText());
temp.append("----------------------------------------------------File----------------------------------------------------");
temp.append(result);
MainController.resultsField.setText(temp.toString());
MainController.resultsField.setScrollTop(Double.MIN_VALUE);
MainController.resultsField.appendText("");
}
} | [
"skvadlamudi@live.com"
] | skvadlamudi@live.com |
acf835cee1f4154a1b3783e58e145b2138f55dcd | 4f596ff8915ef6688f9294ce75c49e43ca3aab64 | /app/src/main/java/com/example/packingapp/model/DriverModules/ResponeEndOfDay.java | 672221f899ba85d5e2a601a65ed1b3ac40ee9735 | [] | no_license | Hossam01/Packing-App | 255cc25d725193c229a381c644a4812e546c0d7e | 6bcf503fc908cb77ed2eff600eee35fd96d72d1f | refs/heads/master | 2023-02-03T04:50:32.192361 | 2020-12-23T13:27:12 | 2020-12-23T13:27:12 | 295,159,809 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 766 | java | package com.example.packingapp.model.DriverModules;
import com.google.gson.annotations.SerializedName;
import java.util.List;
import androidx.room.ColumnInfo;
public class ResponeEndOfDay {
@ColumnInfo(name = "records")
@SerializedName("records")
private List<EndOfDayModule> EndOfDayModule;
public ResponeEndOfDay(List<com.example.packingapp.model.DriverModules.EndOfDayModule> endOfDayModule) {
EndOfDayModule = endOfDayModule;
}
public List<com.example.packingapp.model.DriverModules.EndOfDayModule> getEndOfDayModule() {
return EndOfDayModule;
}
public void setEndOfDayModule(List<com.example.packingapp.model.DriverModules.EndOfDayModule> endOfDayModule) {
EndOfDayModule = endOfDayModule;
}
}
| [
"mustafaelsayed2010@yahoo.com"
] | mustafaelsayed2010@yahoo.com |
75dc06812f6709ef7776c9da459ec8888da5c36d | 51921d196ca0e60169b4b178479deb21c1752b69 | /app/src/androidTest/java/com/mr_abdali/aswitch/ExampleInstrumentedTest.java | 47f86df8059e9ce156f36663a508f006a36bfb16 | [] | no_license | SajidMasood/Switch | 273c36dd8ec4b91442aaae6a97f1b9849aba505b | 1f22f121b9cb4d7cf99a17f097150d398e5b91a2 | refs/heads/master | 2020-03-11T19:59:04.985534 | 2018-04-19T13:56:42 | 2018-04-19T13:56:42 | 130,223,680 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 746 | java | package com.mr_abdali.aswitch;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.mr_abdali.aswitch", appContext.getPackageName());
}
}
| [
"sajidullah_m@yahoo.com"
] | sajidullah_m@yahoo.com |
4edc7ef084a2554de7b272f73ec7ddf858643d80 | d345d6bafa7c63fcb3b367aa9a06dd4bcc29a890 | /src/test/java/org/recap/service/submitcollection/SubmitCollectionHelperServiceUT.java | 238c3916d7cf4d936c699dfdcb10964a1b80dfa2 | [
"Apache-2.0",
"MIT"
] | permissive | JancyRoachR/Phase4-SCSB-Core | d4fab0c0964e234dacddc15b6ff30e5a3a6413cd | 02d0211a05691683c5fad56025700998df231afa | refs/heads/development | 2023-09-06T05:16:14.428591 | 2020-09-25T05:37:30 | 2020-09-25T05:37:30 | 297,383,046 | 0 | 0 | NOASSERTION | 2020-09-21T15:32:24 | 2020-09-21T15:32:23 | null | UTF-8 | Java | false | false | 5,367 | java | package org.recap.service.submitcollection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.recap.model.jpa.BibliographicEntity;
import org.recap.model.jpa.HoldingsEntity;
import org.recap.model.jpa.ItemEntity;
import org.recap.repository.jpa.BibliographicDetailsRepository;
import org.recap.service.common.RepositoryService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
@RunWith(MockitoJUnitRunner.class)
public class SubmitCollectionHelperServiceUT {
@InjectMocks
SubmitCollectionHelperService submitCollectionHelperService;
@Mock
private RepositoryService repositoryService;
@Mock
BibliographicDetailsRepository bibliographicDetailsRepository;
@Test
public void getBibliographicEntityIfExist(){
String owningInstitutionBibId = "12345";
int owningInstitutionId = 12345;
BibliographicEntity bibliographicEntityList = getBibliographicEntity();
Mockito.when(repositoryService.getBibliographicDetailsRepository()).thenReturn(bibliographicDetailsRepository);
Mockito.when(repositoryService.getBibliographicDetailsRepository().findByOwningInstitutionIdAndOwningInstitutionBibId(owningInstitutionId,owningInstitutionBibId)).thenReturn(bibliographicEntityList);
BibliographicEntity bibliographicEntity = submitCollectionHelperService.getBibliographicEntityIfExist(owningInstitutionBibId,owningInstitutionId);
assertNotNull(bibliographicEntity);
}
@Test
public void attachItemToExistingBib(){
List<ItemEntity> itemEntities = new ArrayList<>();
itemEntities.add(getItemEntity());
List<HoldingsEntity> holdingsEntities = new ArrayList<>();
holdingsEntities.add(getHoldingsEntity());
BibliographicEntity existingBibliographicEntity = getBibliographicEntity();
existingBibliographicEntity.setItemEntities(itemEntities);
existingBibliographicEntity.setHoldingsEntities(holdingsEntities);
BibliographicEntity incomingBibliographicEntity = getBibliographicEntity();
HoldingsEntity holdingsEntity = getHoldingsEntity();
holdingsEntity.setOwningInstitutionHoldingsId("234");
List<HoldingsEntity> holdingsEntities1 = new ArrayList<>();
holdingsEntities1.add(holdingsEntity);
incomingBibliographicEntity.setItemEntities(itemEntities);
incomingBibliographicEntity.setHoldingsEntities(holdingsEntities1);
submitCollectionHelperService.attachItemToExistingBib(existingBibliographicEntity,incomingBibliographicEntity);
}
@Test
public void getBibliographicIdsInString(){
List<BibliographicEntity> bibliographicEntities = new ArrayList<>();
bibliographicEntities.add(getBibliographicEntity());
String result = submitCollectionHelperService.getBibliographicIdsInString(bibliographicEntities);
assertNotNull(result);
}
private BibliographicEntity getBibliographicEntity(){
BibliographicEntity bibliographicEntity = new BibliographicEntity();
bibliographicEntity.setBibliographicId(123456);
bibliographicEntity.setContent("Test".getBytes());
bibliographicEntity.setCreatedDate(new Date());
bibliographicEntity.setLastUpdatedDate(new Date());
bibliographicEntity.setCreatedBy("tst");
bibliographicEntity.setLastUpdatedBy("tst");
bibliographicEntity.setOwningInstitutionId(1);
bibliographicEntity.setOwningInstitutionBibId("1577261074");
bibliographicEntity.setDeleted(false);
HoldingsEntity holdingsEntity = getHoldingsEntity();
ItemEntity itemEntity = getItemEntity();
itemEntity.setBibliographicEntities(Arrays.asList(bibliographicEntity));
holdingsEntity.setItemEntities(Arrays.asList(itemEntity));
return bibliographicEntity;
}
private HoldingsEntity getHoldingsEntity() {
HoldingsEntity holdingsEntity = new HoldingsEntity();
holdingsEntity.setCreatedDate(new Date());
holdingsEntity.setLastUpdatedDate(new Date());
holdingsEntity.setCreatedBy("tst");
holdingsEntity.setLastUpdatedBy("tst");
holdingsEntity.setOwningInstitutionId(1);
holdingsEntity.setOwningInstitutionHoldingsId("12345");
holdingsEntity.setDeleted(false);
return holdingsEntity;
}
private ItemEntity getItemEntity(){
ItemEntity itemEntity = new ItemEntity();
itemEntity.setLastUpdatedDate(new Date());
itemEntity.setOwningInstitutionItemId("843617540");
itemEntity.setOwningInstitutionId(1);
itemEntity.setBarcode("123456");
itemEntity.setCallNumber("x.12321");
itemEntity.setCollectionGroupId(1);
itemEntity.setCallNumberType("1");
itemEntity.setCustomerCode("123");
itemEntity.setCreatedDate(new Date());
itemEntity.setCreatedBy("tst");
itemEntity.setLastUpdatedBy("tst");
itemEntity.setCatalogingStatus("Complete");
itemEntity.setItemAvailabilityStatusId(1);
itemEntity.setDeleted(false);
return itemEntity;
}
}
| [
"rajeshbabu.k@htcindia.com"
] | rajeshbabu.k@htcindia.com |
55efe4f1fc5eb2fce5065d3e32a75e69bc657e7e | 92e5b4236759e26c011638704e5ab3ec3e234de7 | /eagle-core/eagle-metric/src/main/java/eagle/metric/report/EagleSerivceMetricReport.java | 0ae2d44ed457b34bd3229542869c9399247e311e | [
"Apache-2.0"
] | permissive | imajumdar/Eagle | 2cb07ee246de17237b14f1fc09aa58405f10d722 | 7f132acfa4e6164b10aa2da81ec6099171ff45f8 | refs/heads/master | 2021-01-21T15:07:12.219576 | 2015-10-19T14:58:34 | 2015-10-19T14:58:34 | 44,562,587 | 1 | 0 | null | 2015-10-19T20:38:55 | 2015-10-19T20:38:55 | null | UTF-8 | Java | false | false | 2,428 | 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 eagle.metric.report;
import java.util.ArrayList;
import java.util.List;
import com.typesafe.config.ConfigObject;
import eagle.metric.Metric;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import eagle.log.entity.GenericMetricEntity;
import eagle.log.entity.GenericServiceAPIResponseEntity;
import eagle.service.client.impl.EagleServiceClientImpl;
public class EagleSerivceMetricReport implements MetricReport{
private EagleServiceClientImpl client;
private static final Logger LOG = LoggerFactory.getLogger(EagleSerivceMetricReport.class);
public EagleSerivceMetricReport(String host, int port, String username, String password) {
client = new EagleServiceClientImpl(host, port, username, password);
}
public EagleSerivceMetricReport(String host, int port) {
client = new EagleServiceClientImpl(host, port, null, null);
}
public void emit(List<Metric> list) {
List<GenericMetricEntity> entities = new ArrayList<GenericMetricEntity>();
for (Metric metric : list) {
entities.add(MetricEntityConvert.convert(metric));
}
try {
int total = entities.size();
GenericServiceAPIResponseEntity<String> response = client.create(entities, GenericMetricEntity.GENERIC_METRIC_SERVICE);
if(response.isSuccess()) {
LOG.info("Wrote " + total + " entities to service");
}else{
LOG.error("Failed to write " + total + " entities to service, due to server exception: "+ response.getException());
}
}
catch (Exception ex) {
LOG.error("Got exception while writing entities: ", ex);
}
}
}
| [
"yonzhang@ebay.com"
] | yonzhang@ebay.com |
295e9f043df39227d146411e8abc0ce14e10e8c6 | a2e3982724a6b9d3019beb558cc1f205559a6d6e | /src/Shop/ItemShopUpgrade.java | b3ffc177cee23bc7f1a330e1698fea33e07b07c0 | [] | no_license | waremon9/PikminFanGame | 174fcaca2e45300831a946582a19b46aaed3257f | 3ecce73a5d812a1f411e3edde8d45a1f26fc2beb | refs/heads/master | 2021-01-03T23:03:36.979158 | 2020-02-16T13:28:16 | 2020-02-16T13:28:16 | 240,273,315 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,019 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Shop;
import Application.Test;
import Application.Test;
import javax.swing.JLabel;
/**
*
* @author verhi
*/
public class ItemShopUpgrade extends ItemShop{
private int lvl;
private JLabel label;
public ItemShopUpgrade(int id, String name, int prix, String monnaie, String description, JLabel label, int lvl) {
super(id, name, prix, monnaie, description);
this.lvl = lvl;
this.label = label;
}
public int getLvl() {
return lvl;
}
public JLabel getLabel() {
return label;
}
public void setLvl(int lvl) {
this.lvl = lvl;
}
public void levelUp(String name){
this.lvl++;
Test.leJeu.joueurActuel.getMapLienItemLvl().remove(name);
Test.leJeu.joueurActuel.getMapLienItemLvl().put(name, this.lvl);
}
}
| [
"verhille.thomas@orange.fr"
] | verhille.thomas@orange.fr |
87df764854a63d9ba644a4a8f588ef6bde72c9cc | 73b79b4b8c7b98cbbe1119cde52db56092e13742 | /app/src/main/java/de/tsenger/androsmex/TextViewHandler.java | 26f4e69fcf52598e76f67b1c4d75d4470bf736eb | [] | no_license | IAmCoder/androsmex | d6200a769baeb01df42a97b04b86540bbbebfbf3 | bd7b83646efd5a00a4ee78e28d82aba726a0fbd8 | refs/heads/master | 2020-04-18T07:32:19.283594 | 2019-01-25T08:12:40 | 2019-01-25T08:12:40 | 167,363,382 | 0 | 0 | null | 2019-01-24T12:22:21 | 2019-01-24T12:22:21 | null | UTF-8 | Java | false | false | 779 | java | package de.tsenger.androsmex;
import java.util.logging.Handler;
import java.util.logging.LogRecord;
import android.app.Activity;
import android.widget.TextView;
public class TextViewHandler extends Handler {
private TextView tView=null;
private Activity activity = null;
public TextViewHandler(Activity activity, TextView tView) {
super();
this.activity = activity;
this.tView = tView;
}
@Override
public void close() {
// TODO Auto-generated method stub
}
@Override
public void flush() {
// TODO Auto-generated method stub
}
@Override
public void publish(LogRecord arg0) {
final LogRecord t1 = arg0;
activity.runOnUiThread(new Runnable() {
public void run() {
tView.append(t1.getMessage()+"\n");
}
});
}
}
| [
"mcoder@lucid-code.com"
] | mcoder@lucid-code.com |
9b988084b087c612d11b0bbbf9f69e9be5faa3c3 | f2de56c699fa959f3f691063d56c3da92d931b28 | /Converter/src/ru/lsv/gwtlib/hsqldbconverter/data/HAuthor.java | e1b69b815b73801416dc38eecc9d109b21492bae | [] | no_license | slezhnev/Librarian_GWT | c554d9f55bd8418418edd095456d9bba53a51a3f | 0202ba7e648e173f54fe1de8df63c8a2e13fdd2f | refs/heads/master | 2020-05-30T01:56:49.678193 | 2015-05-17T14:31:51 | 2015-05-17T14:31:51 | 15,650,523 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,119 | java | package ru.lsv.gwtlib.hsqldbconverter.data;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Автор книги
* User: lsv
* Date: 20.10.2010
* Time: 14:52:06
*/
public class HAuthor {
public static final String PRIMARY_KEY = "AUTHOR_ID";
/**
* Ключ при хранении
*/
private Integer authorId;
/**
* Имя автора
*/
private String firstName;
/**
* Отчество, может отсутствовать
*/
private String middleName;
/**
* Фамилия
*/
private String lastName;
/**
* Книги выбранного автора
*/
private List<HBook> books;
public HAuthor() {
books = new ArrayList<HBook>();
}
public HAuthor(String firstName, String middleName, String lastName, List<HBook> books) {
this.firstName = firstName;
this.middleName = middleName;
this.lastName = lastName;
this.books = books;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getMiddleName() {
return middleName;
}
public void setMiddleName(String middleName) {
this.middleName = middleName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String toString() {
return "authorId :" + authorId + " firstName: " + firstName + "; middleName: " + middleName + "; lastName: " + lastName;
}
public Integer getAuthorId() {
return authorId;
}
public void setAuthorId(Integer authorId) {
this.authorId = authorId;
}
@Override
public boolean equals(Object some) {
if (some == null) return false;
if (this == some) return true;
if (!(some instanceof HAuthor)) return false;
HAuthor author = (HAuthor) some;
return Utils.areEqual(author.firstName, author.firstName) &&
Utils.areEqual(author.middleName, author.middleName) &&
Utils.areEqual(author.lastName, author.lastName);
}
@Override
public int hashCode() {
return Utils.getHash(firstName) +
Utils.getHash(middleName) +
Utils.getHash(lastName);
}
public List<HBook> getBooks() {
return books;
}
public void setBooks(List<HBook> books) {
this.books = books;
}
/**
* Обрабатывает и создает имя автора
*
* @return Сформированное имя без "null"
*/
public String makeName() {
StringBuffer str = new StringBuffer();
if (lastName != null) str.append(lastName);
str.append(" ");
if (firstName != null) str.append(firstName);
str.append(" ");
if (middleName != null) str.append(middleName);
return str.toString().trim();
}
}
| [
"slezhnev@home8"
] | slezhnev@home8 |
7e0727965845fcbf9fb230a14be5fb314097975f | d0d7007a79327aae2ba41b6e18d3e2931f8e95e4 | /WebApplicationTesting/src/com/linkTesting/TSRTC_HeaderBlock_Testing.java | e7f396812d7f88f13a055d11e96bea0435593b27 | [] | no_license | kishan4/WebTesting | 8159e48d8d4d2d3720727f63fb7f98c8b2785c51 | 9b2a3dcd87a33fd301c288115376a88b4f1154e0 | refs/heads/master | 2020-03-22T18:26:57.846645 | 2018-07-10T16:42:19 | 2018-07-10T16:42:19 | 140,460,849 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,090 | java | package com.linkTesting;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.server.browserlaunchers.Sleeper;
public class TSRTC_HeaderBlock_Testing {
public static void main(String[] args) {
FirefoxDriver drd = new FirefoxDriver();
drd.get("http://tsrtconline.in/oprs-web/");
//<div class="menu-wrap">
WebElement headerblock =drd.findElementByClassName("menu-wrap");
List<WebElement>headerBlockLinks=headerblock.findElements(By.tagName("a"));
System.out.println(headerBlockLinks.size());
for(int i=0;i<headerBlockLinks.size();i++)
{
System.out.println(headerBlockLinks.get(i).getText());
headerBlockLinks.get(i).click();
System.out.println(drd.getTitle());
System.out.println(drd.getCurrentUrl());
System.out.println();
drd.navigate().back();
Sleeper.sleepTightInSeconds(5);
headerblock =drd.findElementByClassName("menu-wrap");
headerBlockLinks=headerblock.findElements(By.tagName("a"));
}
drd.close();
}
}
| [
"kkishan699@gmail.com"
] | kkishan699@gmail.com |
e0d95ef6a1f4d736d4c995702cea75159a1c1d71 | 13901d814c310143f363885c2be7cc2e544f49dd | /boss/src/com/echounion/boss/cargosmart/si/CargoSmartFtpTimer.java | 020fbed30038b23276b7f83397de770f048cf50e | [] | no_license | alokkik/carrier-services-full-list | 45950535e060c3dc2a12b833601efaa0c0624766 | 4a71f3bddaae7e4e57278caf678dd673c90f05da | refs/heads/master | 2023-07-10T16:29:40.606613 | 2018-03-09T05:54:31 | 2018-03-09T05:54:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,309 | java | package com.echounion.boss.cargosmart.si;
import java.io.File;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
import com.echounion.boss.core.cache.UrlContainer;
import com.echounion.boss.core.esb.service.IEsbService;
import com.echounion.boss.core.monitor.service.impl.IMonitorService;
import com.echounion.boss.entity.dto.Provider;
import com.echounion.boss.entity.dto.Record;
/**
* cargosmart ftp目录监控定时器
* @author 胡礼波
* 2013-11-22 上午10:56:08
*/
public class CargoSmartFtpTimer {
private static Logger log = Logger.getLogger(CargoSmartFtpTimer.class);
private CargoSmartConfig config;
private IMonitorService ftpDirMonitorService;
private IEsbService esbService;
public void setEsbService(IEsbService esbService) {
this.esbService = esbService;
}
public void setConfig(CargoSmartConfig config) {
this.config = config;
}
public void setFtpDirMonitorService(IMonitorService ftpDirMonitorService) {
this.ftpDirMonitorService = ftpDirMonitorService;
}
/**
* 监控CT
* @author 胡礼波
* 2013-11-22 上午10:57:45
*/
public void listenerCt()
{
String path=config.getMonitorLocalPath().get("ct");
log.info("定时器开始扫描"+path);
doTimer(path);
}
/**
* 监控Si的回执
* @author 胡礼波
* 2013-11-22 上午11:06:01
*/
public void listenerAck()
{
String path=config.getMonitorLocalPath().get("ack");
log.info("定时器开始扫描"+path);
doTimer(path);
}
/**
* 监控bl的目录
* @author 胡礼波
* 2013-12-17 上午9:59:57
*/
public void listenerBl()
{
String path=config.getMonitorLocalPath().get("bl");
log.info("定时器开始扫描"+path);
doTimer(path);
}
/**
* 监控si的目录
* @author 胡礼波
* 2014-3-29 下午1:03:25
*/
public void listenerSi()
{
String path=config.getMonitorLocalPath().get("si");
log.info("定时器开始扫描"+path);
doTimer(path);
}
/***
* 处理监控文件
* @author 胡礼波
* 2013-11-22 上午11:07:53
* @param dir
*/
private void doTimer(String path)
{
File dir=new File(path);
if(dir==null || !dir.isDirectory()) //不问空 且是文件夹
{
return;
}
File[] files=dir.listFiles();
if(files==null)
{
return;
}
for (File file : files) {
if(!file.isFile())
{
continue;
}
ftpDirMonitorService.onCreate(Paths.get(file.getName()));
}
}
/**
* SiCron执行计划
* @author 胡礼波
* 2013-12-9 下午4:11:41
*/
public void listenerSiCronFailure()
{
Provider provider= UrlContainer.getServiceProviderByCode("acksicron"); //前端后端各自触发
invokeSiCron(provider);
provider= UrlContainer.getServiceProviderByCode("bcacksicron"); //前端后端各自触发
invokeSiCron(provider);
}
private void invokeSiCron(Provider provider)
{
try
{
if(provider!=null)
{
Map<String,Object> params=new HashMap<String, Object>();
params.put("clientKey",provider.getAuthorKey());
provider.setParamMap(params);
Record record=esbService.invokeService(provider);
log.info(record.getMessage());
}else
{
log.warn("SI定时失败任务回调接口服务提供方为空!");
}
}catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"geng_zhang@dayhr.com"
] | geng_zhang@dayhr.com |
31ba36673cd8279832a84f19d574a49e61d6c0be | fe9e62f8aa9fd3447868bebc72b9fc61d9d733e7 | /2016-ICPC-Asia-Dalian/C.java | d4ea5fdf91daabad2084376bda867a5a67d060d3 | [] | no_license | chanhanyi0923/some_teams_naive | c03eaebee4970cc956e92a7df2c1c1a8e090dc28 | c0bfdb0c637b9351a60a3a51512d46034a03e011 | refs/heads/master | 2021-01-19T12:43:52.109572 | 2018-03-05T07:53:32 | 2018-03-05T07:53:32 | 100,802,993 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,504 | java | import java.util.*;
import java.math.BigDecimal;
public class Main
{
private static BigDecimal sqrt(int N)
{
BigDecimal L = new BigDecimal("1");
BigDecimal R = BigDecimal.valueOf(N);
BigDecimal TWO = BigDecimal.valueOf(2);
BigDecimal TEN = BigDecimal.valueOf(10);
BigDecimal eps = TEN;
for (int i = 0; i < 120; i ++) {
eps = eps.divide(TEN, 120, BigDecimal.ROUND_DOWN);
}
while (R.subtract(L).compareTo(eps) > 0) {
BigDecimal mid = L.add(R).divide(TWO, 120, BigDecimal.ROUND_DOWN);
if (mid.multiply(mid).compareTo(BigDecimal.valueOf(N)) > 0) {
R = mid;
} else {
L = mid;
}
}
return L;
}
public static void main(String args[])
{
Scanner sin = new Scanner(System.in);
BigDecimal a, b;
BigDecimal sqrt5 = sqrt(5);
BigDecimal gold = sqrt5.add(BigDecimal.valueOf(1));
while (sin.hasNext()) {
a = sin.nextBigDecimal();
b = sin.nextBigDecimal();
if (a.compareTo(b) > 0) {
BigDecimal t = b; b = a; a = t;
}
BigDecimal x = b.subtract(a).multiply(gold).divide(BigDecimal.valueOf(2));
x = x.setScale(0, BigDecimal.ROUND_DOWN);
if (x.equals(a)) {
System.out.println("0");
} else {
System.out.println("1");
}
}
}
} | [
"chanhanyi0923@gmail.com"
] | chanhanyi0923@gmail.com |
7c913219466dfcddcf720c6379acb13d4a3375e7 | 677131913b8f8cad84c3d7f0af4dea7ac5ed644a | /src/main/java/org/knowceans/util/CokusSampler.java | 4c9258c1041c5dd64701bbfae5fdf713f4d6ec2c | [] | no_license | hmetaxa/MVTopicModel | 33a7f292a63f502128cc6688fe15fce97e6e83b2 | 453e80fdd36924ebbeb438dcfe68dfeeb9f4f06c | refs/heads/master | 2023-05-26T07:31:11.077765 | 2019-07-09T12:00:00 | 2019-07-09T12:00:00 | 98,203,361 | 3 | 3 | null | 2023-05-23T20:18:35 | 2017-07-24T15:02:52 | Java | UTF-8 | Java | false | false | 7,314 | java | /*
* Copyright (c) 2006-9 Gregor Heinrich. 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.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.knowceans.util;
/**
* CokusSampler is a non-static version of the Cokus Mersenne Twister as a
* thread-safe (?) class. (Based on the C code used in LDA-C). It is not derived
* from Random because the ClassLoader interferes with class construction via
* Random constructors whose logic isn't needed here.
* <p>
* Note: nextUnsignedInt(), next(), and randDouble() are tested for conformity
* with Cokus, which means they provide sufficient randomness. The other methods
* should yet be used with caution, esp. if long random sequences are to be
* generated (Monte Carlo simulation etc.).
* <p>
* TODO: Esp. next(int) needs to be tested against randomness criteria;
* suspected Markov property seen in nextBoolean(). As point of approach,
* randDouble() and next() use the original Cokus algorithm and can be used as a
* reference to test randomness against the nextDouble() and nextInt() method
* that use the scaling mechanism of Random in connection with Cokus's next(int)
* as a random number generator.
*
* @author heinrich
*/
public class CokusSampler {
/**
* Comment for <code>serialVersionUID</code>
*/
private static final long serialVersionUID = 3256726169322797365L;
public static final long DEFAULTSEED = 4357;
/* Period parameters */
/**
* length of state vector
*/
public static final int N = 624;
/**
* a period parameter
*/
public static final int M = 397;
/**
* a magic constant
*/
public static final long K = 0x9908b0dfL;
/**
* state vector
*/
long[] state = null;
/**
* next random value is computed from here (java: index into state[])
*/
int next;
/**
* can *next++ this many times before reloading
*/
int left = -1;
/**
* @param args
*/
public static void main(String[] args) {
CokusSampler r = new CokusSampler(4357);
for (int i = 0; i < 50; i++) {
System.out.println(r.randDouble());
}
System.out.println();
for (int i = 0; i < 50; i++) {
System.out.println(r.randDouble());
}
}
/**
* initialise with standard MT seed, 4357.
*/
public CokusSampler() {
init(4357);
}
/**
* sets the seed (lower half of long taken)
*
* @param i
*/
public CokusSampler(long i) {
init(i);
}
private void init(long i) {
state = new long[N + 1];
setSeed(i);
}
/**
* mask all but highest bit of u (uint32)
*
* @param u
* @return
*/
protected final long hiBit(long u) {
return (u) & 0x80000000l;
}
/**
* mask all but lowest bit of u (uint32)
*
* @param u
* @return
*/
protected final long loBit(long u) {
return (u) & 0x00000001l;
}
/**
* mask the highest bit of u (uint32)
*
* @param u
* @return
*/
protected final long loBits(long u) {
return (u) & 0x7FFFFFFFl;
}
/**
* move hi bit of u to hi bit of v (uint32)
*
* @param u
* @param v
* @return
*/
protected final long mixBits(long u, long v) {
return hiBit(u) | loBits(v);
}
/**
* generate a random number with the number of bits in the argument
*
* @param bits (max 32)
*/
protected final int next(int bits) {
// int a = super.next(bits);
int a = next();
return a >>> (32 - bits);
}
/**
* returns the next integer
*
* @return
*/
public final int next() {
long y;
if (--left < 0)
return (reload());
y = state[next++];
y ^= (y >> 11);
y ^= (y << 7) & 0x9D2C5680l;
y ^= (y << 15) & 0xEFC60000l;
return (int) (y ^ (y >> 18));
}
/**
* returns a long in the numerical interval of an unsigned int.
*
* @return
*/
public final long nextUnsignedInt() {
return next() & 0xFFFFFFFFl;
}
/**
* returns the next double between 0 and 1.
*
* @return
*/
public final double randDouble() {
return (next() & 0xffffffffl) / (double) 0x100000000l;
}
/**
* Note: only lower half of seed is used.
*/
public void setSeed(long seed) {
// super.setSeed(seed);
long x = (seed | 1) & 0xFFFFFFFFl;
// long s = state;
long[] s = state;
int si = 0;
int j;
// s++ is done with an array
left = 0;
s[si++] = x;
for (j = N; j > 0; --j) {
s[si] = (x *= 69069);
s[si] &= 0xFFFFFFFFl;
si++;
}
}
/**
* reload the random number buffer
*
* @return
*/
public final int reload() {
int p0 = 0;
int p2 = 2;
int pM = M;
long s0, s1;
int j;
if (left < -1)
setSeed(4357);
left = N - 1;
next = 1;
// for(s0=state[0], s1=state[1], j=N-M+1; --j; s0=s1, s1=*p2++)
// *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U);
for (s0 = state[0], s1 = state[1], j = N - M + 1; --j != 0; s0 = s1, s1 = state[p2++]) {
state[p0++] = state[pM++] ^ (mixBits(s0, s1) >> 1)
^ (loBit(s1) != 0 ? K : 0);
}
// for(pM=state, j=M; --j; s0=s1, s1=*p2++)
// *p0++ = *pM++ ^ (mixBits(s0, s1) >> 1) ^ (loBit(s1) ? K : 0U);
for (pM = 0, j = M; --j != 0; s0 = s1, s1 = state[p2++]) {
state[p0++] = state[pM++] ^ (mixBits(s0, s1) >> 1)
^ (loBit(s1) != 0 ? K : 0);
}
s1 = state[0];
state[p0] = state[pM] ^ (mixBits(s0, s1) >> 1)
^ (loBit(s1) != 0 ? K : 0);
s1 ^= (s1 >> 11);
s1 ^= (s1 << 7) & 0x9D2C5680l;
s1 ^= (s1 << 15) & 0xEFC60000l;
return (int) (s1 ^ (s1 >> 18));
}
}
| [
"omiros.metaxas@gmail.com"
] | omiros.metaxas@gmail.com |
2f08eeb327d84cec9177bedd898b23140e0341c8 | f99ae8eca69c382afb65c65b82b6fec10ec26217 | /java/src/edu/stanford/nlp/jcoref/dcoref/sievepasses/StrictHeadMatch3.java | a63a56e94cbbf2bdd5312b17ce9a15f515a7b675 | [] | no_license | denizkahramaner/PA4 | 36c2dd47d2a0cd492c408a97ad04fb9555df2697 | 6b230298dae6f893b198c8c119e19a33a330da3b | refs/heads/master | 2020-04-01T15:47:02.263082 | 2012-12-04T07:13:10 | 2012-12-04T07:13:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 361 | java | package edu.stanford.nlp.jcoref.dcoref.sievepasses;
public class StrictHeadMatch3 extends DeterministicCorefSieve {
public StrictHeadMatch3() {
super();
flags.USE_iwithini = true;
flags.USE_INCLUSION_HEADMATCH = true;
flags.USE_INCOMPATIBLE_MODIFIER = true;
}
public StrictHeadMatch3(String args) {
this();
flags.set(args);
}
}
| [
"aman313@corn19.stanford.edu"
] | aman313@corn19.stanford.edu |
e1a7c45b1087b8ae779ce4f581464def87ffb9cf | 290883510a9ebbd5770c1aea5a20aa9ca4a3ac8e | /src/com/lhd/FileStream/FilecharClass.java | fc96f713863f20d749abef229d64cb3635326350 | [] | no_license | lhd24/Java | 347b22a76f1ba24aace1966b93d7c0bf4a9917f3 | cf21380b9b98b7d12ebca9a25369a10dd6e3e17a | refs/heads/master | 2021-01-17T17:45:53.095109 | 2017-07-19T02:21:40 | 2017-07-19T02:21:40 | 95,532,685 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,216 | java | package com.lhd.FileStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class FilecharClass {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
public void test1(){
//文件去除字符流对象(输入流)
FileReader fr = null;
//写入到文件(输出流)
FileWriter fw = null;
try {
//创建fr对象
fr = new FileReader("D:\\test.txt");
//创建输出对象
fw = new FileWriter("D:\\vvv.txt");
//记录实际读取到的字符数
int n=0;
//读入到内存
char[] c = new char[1024];
while((n=fr.read(c))!=-1){
String s = new String(c,0,n);
////直接打印的话,会有乱码,因为字符不足1024的话会自动补足
//System.out.println(c);
System.out.println(s);
//fw.write(c); //会有乱码
fw.write(c,0,n);
}
} catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
} finally{
try {
fw.close();
fr.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
| [
"haidong@DESKTOP-BJ2GFH0"
] | haidong@DESKTOP-BJ2GFH0 |
579da51d5749f5d785cacfe81f9144f028e8322a | 77d75680e8e412067555cc2172648a7cdde9208a | /AOP/src/main/java/com/spring/orm/aop/ImageCopy.java | e4d14e1933e5f2a7ab74bf29f0206ac0f67d2f71 | [] | no_license | Jay778/spring-study | 8e47baef4dae3b89976bd51539b0dbaf7a400b50 | a8c968fceaa0e8d589f795d41d2580be6c72a339 | refs/heads/master | 2020-04-26T17:23:57.453782 | 2019-03-15T15:22:05 | 2019-03-15T15:22:05 | 173,648,322 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 770 | java | package com.spring.aop;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
/**
* Created by 94921 on 2019/3/11.
*/
public class ImageCopy {
private static final Logger logger=LoggerFactory.getLogger(ImageCopy.class);
public void copyImage() throws IOException{
logger.info("开始将图片从D盘复制到F盘...");
File srcFile=new File("D:/bg1.jpg");
File destFile=new File("F:/bg1.jpg");
InputStream in=new FileInputStream(srcFile);
OutputStream out=new FileOutputStream(destFile);
byte[] bytes=new byte[(int)srcFile.length()];
int len;
while ((len=in.read(bytes))!=-1){
out.write(bytes,0,len);
}
in.close();
out.close();
}
}
| [
"949219778@qq.com"
] | 949219778@qq.com |
9794cd03a88b9bd20d8ed8b2f96583c5bc009a93 | a6e8e40617e7c62ac3a605528eeb05fadea730a3 | /training/src/leetcode/_36_isValidSudoku.java | 27c5ca9520aeac51058b5f4224e6a7cca7b59f6c | [] | no_license | Deadpool110/Leetcode | 8f60cfbd13f15dae889b1e0385495d7daef70eca | a47ae23e21c0590f5884c6097bb59539bf8db610 | refs/heads/master | 2023-08-18T15:12:17.066031 | 2021-09-26T02:29:40 | 2021-09-26T02:29:40 | 206,506,282 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,967 | java | package leetcode;
import java.util.HashMap;
public class _36_isValidSudoku {
public boolean isValidSudoku(char[][] board) {
for (int i = 0; i < 9; i++) {
int[] flag = new int[9];
for (int j = 0; j < 9; j++) {
if (board[i][j] != '.') {
if (flag[board[i][j] - '1'] == 0) {
flag[board[i][j] - '1'] = 1;
}
else {
return false;
}
}
}
}
for (int j = 0; j < 9; j++) {
int[] flag = new int[9];
for (int i = 0; i < 9; i++) {
if (board[i][j] != '.') {
if (flag[board[i][j] - '1'] == 0) {
flag[board[i][j] - '1'] = 1;
}
else {
return false;
}
}
}
}
for (int i = 0; i < 9; i += 3) {
for (int j = 0; j < 9; j += 3) {
int[] flag = new int[9];
for (int m = i; m < i + 3; m++) {
for (int n = j; n < j + 3; n++) {
if (board[m][n] != '.') {
if (flag[board[m][n] - '1'] == 0) {
flag[board[m][n] - '1'] = 1;
}
else {
return false;
}
}
}
}
}
}
return true;
}
// 一次迭代
public boolean isValidSudoku1(char[][] board) {
// init data
HashMap<Integer, Integer>[] rows = new HashMap[9];
HashMap<Integer, Integer> [] columns = new HashMap[9];
HashMap<Integer, Integer> [] boxes = new HashMap[9];
for (int i = 0; i < 9; i++) {
rows[i] = new HashMap<Integer, Integer>();
columns[i] = new HashMap<Integer, Integer>();
boxes[i] = new HashMap<Integer, Integer>();
}
// validate a board
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
char num = board[i][j];
if (num != '.') {
int n = (int)num;
int box_index = (i / 3 ) * 3 + j / 3;
// keep the current cell value
rows[i].put(n, rows[i].getOrDefault(n, 0) + 1);
columns[j].put(n, columns[j].getOrDefault(n, 0) + 1);
boxes[box_index].put(n, boxes[box_index].getOrDefault(n, 0) + 1);
// check if this value has been already seen before
if (rows[i].get(n) > 1 || columns[j].get(n) > 1 || boxes[box_index].get(n) > 1)
return false;
}
}
}
return true;
}
}
| [
"xin_pengpeng@bupt.edu.cn"
] | xin_pengpeng@bupt.edu.cn |
80cd9be9a4d3b9406fcd2334708555aa7dba43fd | 8d17a7f392f446d7518d5d9d93427b7334c6e800 | /src/main/java/com/leo/ssmschoolshop/entity/ShopCart.java | acfb244fefc0b2a2dc565c717565c07a15090f1c | [] | no_license | leonardxie/SpringbootSchoolShop-leo | dcbde657d5540084cfbb415e1cc9447dd29e0f5b | 5cda31df17126ecc50ea7ace27e0cd95a574d832 | refs/heads/main | 2023-06-17T04:37:24.241120 | 2021-07-07T16:14:07 | 2021-07-07T16:14:07 | 383,845,627 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 472 | java | package com.leo.ssmschoolshop.entity;
import java.util.Date;
public class ShopCart extends ShopCartKey {
private Date catedate;
private Integer goodsnum;
public Date getCatedate() {
return catedate;
}
public void setCatedate(Date catedate) {
this.catedate = catedate;
}
public Integer getGoodsnum() {
return goodsnum;
}
public void setGoodsnum(Integer goodsnum) {
this.goodsnum = goodsnum;
}
} | [
"3384322163@qq.com"
] | 3384322163@qq.com |
5356889e2da85349b492efc7c53777e0c38fd4f1 | e7823cd023023b335d59558b198f5ecf8e3b0a97 | /greendao/src/main/java/com/ngyb/greendao/db/PEClazzDao.java | f22216861a2e8bc0e12f817c926325db03c0fcdc | [] | no_license | nangongyibin/Android_DataBase | 3a25dfc922f9165004d843019ed2f4e3307d6253 | 45f34f1a62a6a5bda25d0ad0d7907778d941b7a9 | refs/heads/master | 2020-07-14T15:10:58.609555 | 2020-07-07T14:27:14 | 2020-07-07T14:27:14 | 205,341,038 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,990 | java | package com.ngyb.greendao.db;
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.internal.DaoConfig;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import com.ngyb.greendao.bean.PEClazz;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "PECLAZZ".
*/
public class PEClazzDao extends AbstractDao<PEClazz, Long> {
public static final String TABLENAME = "PECLAZZ";
/**
* Properties of entity PEClazz.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property Id = new Property(0, Long.class, "id", true, "_id");
public final static Property Credit = new Property(1, int.class, "credit", false, "CREDIT");
public final static Property Name = new Property(2, String.class, "name", false, "NAME");
};
public PEClazzDao(DaoConfig config) {
super(config);
}
public PEClazzDao(DaoConfig config, DaoSession daoSession) {
super(config, daoSession);
}
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"PECLAZZ\" (" + //
"\"_id\" INTEGER PRIMARY KEY ," + // 0: id
"\"CREDIT\" INTEGER NOT NULL ," + // 1: credit
"\"NAME\" TEXT);"); // 2: name
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"PECLAZZ\"";
db.execSQL(sql);
}
@Override
protected final void bindValues(DatabaseStatement stmt, PEClazz entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
stmt.bindLong(2, entity.getCredit());
String name = entity.getName();
if (name != null) {
stmt.bindString(3, name);
}
}
@Override
protected final void bindValues(SQLiteStatement stmt, PEClazz entity) {
stmt.clearBindings();
Long id = entity.getId();
if (id != null) {
stmt.bindLong(1, id);
}
stmt.bindLong(2, entity.getCredit());
String name = entity.getName();
if (name != null) {
stmt.bindString(3, name);
}
}
@Override
public Long readKey(Cursor cursor, int offset) {
return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
}
@Override
public PEClazz readEntity(Cursor cursor, int offset) {
PEClazz entity = new PEClazz( //
cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
cursor.getInt(offset + 1), // credit
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2) // name
);
return entity;
}
@Override
public void readEntity(Cursor cursor, PEClazz entity, int offset) {
entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
entity.setCredit(cursor.getInt(offset + 1));
entity.setName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
}
@Override
protected final Long updateKeyAfterInsert(PEClazz entity, long rowId) {
entity.setId(rowId);
return rowId;
}
@Override
public Long getKey(PEClazz entity) {
if(entity != null) {
return entity.getId();
} else {
return null;
}
}
@Override
protected final boolean isEntityUpdateable() {
return true;
}
}
| [
"nangongyibin@gmail.com"
] | nangongyibin@gmail.com |
e59591c87242683269d44d38b9b978409e269c6f | d17e2ab5098de916561cba7cb4d86586cc61a07b | /business/src/main/java/co/programacionmaster/hambrecero/business/service/OrganizationMutationsSpringImpl.java | c9910f69b1f45b7dcab5561eef68450b58780dd6 | [] | no_license | Hambre-cero/hackaton-backend | 3f0536e6bd46a982edf72d70f72650a7952becdb | 4e2a662854c3bdbf48e7de8d7cb3022e2c7332f6 | refs/heads/master | 2023-06-29T12:28:27.997666 | 2021-07-26T02:01:39 | 2021-07-26T02:01:39 | 387,051,688 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,393 | java | package co.programacionmaster.hambrecero.business.service;
import co.programacionmaster.hambrecero.businessapi.model.Organization;
import co.programacionmaster.hambrecero.businessapi.repository.OrganizationRepository;
import co.programacionmaster.hambrecero.businessapi.service.OrganizationMutations;
import co.programacionmaster.hambrecero.commons.utils.MessageUtils;
import io.vavr.control.Try;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import javax.persistence.NonUniqueResultException;
import lombok.AllArgsConstructor;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Service;
@Service
@AllArgsConstructor
@ParametersAreNonnullByDefault
public class OrganizationMutationsSpringImpl implements OrganizationMutations {
private final OrganizationRepository organizationRepository;
private final MessageSource messageSource;
@Nonnull
@Override
public Try<Organization> create(Organization organization) {
return Try.of(() -> {
if (organizationRepository
.findByIdentification(organization.getIdentification())
.isDefined()) {
throw new NonUniqueResultException(MessageUtils
.getMessage(messageSource, "error.business.organization_is_already_registered"));
}
return organizationRepository.create(organization).get();
});
}
}
| [
"barcochrist@gmail.com"
] | barcochrist@gmail.com |
f7829ed6c01e81e8e76efc39b22ab4ea52a93365 | 533452d302897f4dd0737d1a2d8b3cdd312e3a9d | /app/src/androidTest/java/com/example/list_menu_context_actionmode/ExampleInstrumentedTest.java | 77b7503d7e1d1fadebacbe871dd3fa926289d9f8 | [] | no_license | utbahoa/contextmenu | 8f16a5957366e62183f0af4d78239864529b732f | 4cb54e41c98257430c482d1a8f5d1f4045e793b0 | refs/heads/master | 2022-12-30T13:16:36.780038 | 2020-10-23T12:13:57 | 2020-10-23T12:13:57 | 306,625,573 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 794 | java | package com.example.list_menu_context_actionmode;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.list_menu_context_actionmode", appContext.getPackageName());
}
} | [
"haphuocduong1309@gmail.com"
] | haphuocduong1309@gmail.com |
89e80a5ffb1b139c6f78a4fa6b3daf2b8e4a7f4b | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-12798-37-14-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/display/internal/ConfiguredDocumentDisplayer_ESTest.java | 1735330d593bc12569a3411a9b635245c6fbaea7 | [] | 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 | 587 | java | /*
* This file was automatically generated by EvoSuite
* Fri Apr 03 21:26:38 UTC 2020
*/
package org.xwiki.display.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class ConfiguredDocumentDisplayer_ESTest extends ConfiguredDocumentDisplayer_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
9b85c3b851944cb1c42906e8fdf8eeeffbc986e4 | aef0641a9bcbb46a8021da067f1127af51d7b169 | /app/src/main/java/rxh/hb/view/RoundImageView.java | c5e2690f952f6f5e176a611a46ff98f6901b15bb | [] | no_license | fwf527019/wdb_ys | 0df5943542e17913b140ad0725871b5e8fd9a088 | 0794b82d8288fe1665438a5ff4f3d74b8d096059 | refs/heads/master | 2021-08-15T04:00:57.125197 | 2017-11-17T09:30:34 | 2017-11-17T09:30:34 | 110,638,918 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,640 | java | package rxh.hb.view;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.widget.ImageView;
public class RoundImageView extends ImageView {
public RoundImageView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public RoundImageView(Context context) {
super(context);
init();
}
private final RectF roundRect = new RectF();
private float rect_adius = 6;
private final Paint maskPaint = new Paint();
private final Paint zonePaint = new Paint();
private void init() {
maskPaint.setAntiAlias(true);
maskPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
//
zonePaint.setAntiAlias(true);
zonePaint.setColor(Color.WHITE);
//
float density = getResources().getDisplayMetrics().density;
rect_adius = rect_adius * density;
}
public void setRectAdius(float adius) {
rect_adius = adius;
invalidate();
}
@Override
protected void onLayout(boolean changed, int left, int top, int right,
int bottom) {
super.onLayout(changed, left, top, right, bottom);
int w = getWidth();
int h = getHeight();
roundRect.set(0, 0, w, h);
}
@Override
public void draw(Canvas canvas) {
canvas.saveLayer(roundRect, zonePaint, Canvas.ALL_SAVE_FLAG);
canvas.drawRoundRect(roundRect, rect_adius, rect_adius, zonePaint);
//
canvas.saveLayer(roundRect, maskPaint, Canvas.ALL_SAVE_FLAG);
super.draw(canvas);
canvas.restore();
}
}
| [
"523833653@qq.com"
] | 523833653@qq.com |
0a3fbfc0701dd56ef4e6d3eb816d48d645ca9041 | 536dbfb56422b79ab0b50d18174d825152cb6100 | /src/com/java/interview_questions/IQ_A18_Amstrong_Number.java | f2d6d26c27e427b4e5a9ade5caf17037ec0cde84 | [] | no_license | Rupa25/Java_concepts | fc8d1a4ffa0054e3ae7173a2a1f999432a06d309 | cbb3657da5d6337e1029f9f2a27217ac8b1e57a1 | refs/heads/master | 2022-03-19T07:09:55.038967 | 2019-12-07T17:00:34 | 2019-12-07T17:00:34 | 219,265,394 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 561 | java | package com.java.interview_questions;
import java.util.Scanner;
public class IQ_A18_Amstrong_Number {
public static void main(String[] args) {
int sum = 0, r, temp, c;
Scanner sc = new Scanner(System.in);
System.out.println("Enter any number");
int number = sc.nextInt();
temp = number;
while (number > 0) {
r = number % 10; // 151
c = r * r * r;
sum = sum + c;
number = number / 10;
}
if(temp==sum)
{
System.out.println("number is amstrong");
}
else
System.out.println("number is not amstrong");
}
}
| [
"roopa.rupa99@gmail.com"
] | roopa.rupa99@gmail.com |
0e896b3d201b9bf3681122a5bf3704f50de9b2ed | 429b3fd83cb2fb683be9248132f130e47a67ca94 | /com.selenium.Amogh_FrameWork/src/test/java/locators/webLocators/Index.java | bafbdf08f1705091c28c524548ba2a2d6f39f8cb | [] | no_license | RenukaMB/Mavenjava | f8af699b262d609fa14e596f1f62580e092b3540 | c7254467becc08f4eee08140dbd8b44b07c6bebf | refs/heads/master | 2022-11-16T02:37:02.880226 | 2019-12-29T11:45:17 | 2019-12-29T11:45:17 | 278,374,840 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 264 | java | package locators.webLocators;
public class Index {
public static final String URL = "https://google.com",
REGISTER_NOW = "register_now",
USERNAME = "username",
PASSWORD = "password",
LOGIN = "login_submit";
}
| [
"RenukaMB"
] | RenukaMB |
3965c6e34fd211e2b0347f031e61405d4c61c27b | c27af3635b37cbd34fcd1d607a2e2546731bdde2 | /src/au/gov/nsw/records/digitalarchive/opengov/data/UploadedFile.java | 7c0d122f3987dfb72a51dd0c026de29c5665f932 | [] | no_license | srnsw/OpenGov-Migration | d1f887fc1b53fd6cd9089077ddf85d670bb28558 | ce495ec9fdd43a3e06f98581aea290e702b49306 | refs/heads/master | 2021-01-25T05:34:12.643621 | 2012-09-25T06:15:10 | 2012-09-25T06:15:10 | 5,609,326 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,260 | java | package au.gov.nsw.records.digitalarchive.opengov.data;
// Generated Aug 29, 2012 1:21:11 PM by Hibernate Tools 3.4.0.CR1
import java.util.Date;
/**
* UploadedFile generated by hbm2java
*/
public class UploadedFile implements java.io.Serializable {
private Integer fileId;
private Publication publication;
private String fileName;
private String downloadLink;
private String inboxUrl;
private String pairtreeUrl;
private String contentType;
private String size;
private String pages;
private String uid;
private Integer fileOrder;
private Date dateUploaded;
private String uploadedBy;
private String ipAddress;
public UploadedFile() {
}
public UploadedFile(Publication publication, String fileName,
String downloadLink, String inboxUrl, String pairtreeUrl,
String contentType, String size, String pages, String uid,
Integer fileOrder, Date dateUploaded, String uploadedBy,
String ipAddress) {
this.publication = publication;
this.fileName = fileName;
this.downloadLink = downloadLink;
this.inboxUrl = inboxUrl;
this.pairtreeUrl = pairtreeUrl;
this.contentType = contentType;
this.size = size;
this.pages = pages;
this.uid = uid;
this.fileOrder = fileOrder;
this.dateUploaded = dateUploaded;
this.uploadedBy = uploadedBy;
this.ipAddress = ipAddress;
}
public Integer getFileId() {
return this.fileId;
}
public void setFileId(Integer fileId) {
this.fileId = fileId;
}
public Publication getPublication() {
return this.publication;
}
public void setPublication(Publication publication) {
this.publication = publication;
}
public String getFileName() {
return this.fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getDownloadLink() {
return this.downloadLink;
}
public void setDownloadLink(String downloadLink) {
this.downloadLink = downloadLink;
}
public String getInboxUrl() {
return this.inboxUrl;
}
public void setInboxUrl(String inboxUrl) {
this.inboxUrl = inboxUrl;
}
public String getPairtreeUrl() {
return this.pairtreeUrl;
}
public void setPairtreeUrl(String pairtreeUrl) {
this.pairtreeUrl = pairtreeUrl;
}
public String getContentType() {
return this.contentType;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
public String getSize() {
return this.size;
}
public void setSize(String size) {
this.size = size;
}
public String getPages() {
return this.pages;
}
public void setPages(String pages) {
this.pages = pages;
}
public String getUid() {
return this.uid;
}
public void setUid(String uid) {
this.uid = uid;
}
public Integer getFileOrder() {
return this.fileOrder;
}
public void setFileOrder(Integer fileOrder) {
this.fileOrder = fileOrder;
}
public Date getDateUploaded() {
return this.dateUploaded;
}
public void setDateUploaded(Date dateUploaded) {
this.dateUploaded = dateUploaded;
}
public String getUploadedBy() {
return this.uploadedBy;
}
public void setUploadedBy(String uploadedBy) {
this.uploadedBy = uploadedBy;
}
public String getIpAddress() {
return this.ipAddress;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
}
| [
"airgear01@gmail.com"
] | airgear01@gmail.com |
5130712fdb1f258dc6aa54837df27ea57b7cc757 | 1f02dcb8f6cbe706aa3fccc70a6456dd7897e0f8 | /SewebServer/src/main/java/fi/seweb/server/Application.java | 39b4f0f3755abf4521ea1e1063e141c948729473 | [] | no_license | jmoilahan/SEWEB | 6b073090959287f3b52a1a7616a62be260877952 | 9fd669555fa6257114bb5c9e1a8c579cbd7d5572 | refs/heads/master | 2020-12-02T16:37:36.272502 | 2014-08-27T09:49:43 | 2014-08-27T09:49:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,968 | java | package fi.seweb.server;
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicReference;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONObject;
import org.postgresql.ds.PGPoolingDataSource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import com.javadocmd.simplelatlng.LatLng;
import com.javadocmd.simplelatlng.LatLngTool;
import com.javadocmd.simplelatlng.util.LengthUnit;
import fi.seweb.server.dao.Position;
import fi.seweb.server.dao.User;
public class Application extends HttpServlet {
private enum State { NEW, INITIALIZING, INITIALIZED };
private final AtomicReference<State> init = new AtomicReference<State>(State.NEW);
private JdbcTemplate template;
private static Logger log = LogManager.getLogger(Application.class.getName());
@Override
public void init() {
log.debug("Application.init() is called");
if (!init.compareAndSet(State.NEW, State.INITIALIZING))
throw new IllegalStateException("Already initialized");
//loading the driver
log.debug("Loading the postgresql driver");
try {
Class.forName("org.postgresql.Driver");
} catch (ClassNotFoundException e) {
log.debug("Failed to load the driver: " + e.getMessage());
}
//preparing the datasource
log.debug("Preparing the postgresql datasource");
PGPoolingDataSource source = new PGPoolingDataSource();
source.setDataSourceName("jdbc/postgres");
source.setServerName("localhost");
source.setDatabaseName("locations");
source.setUser("seweb");
source.setPassword("steN2haj");
source.setMaxConnections(10);
//getting the connection
Connection conn = null;
try {
conn = source.getConnection();
} catch (SQLException e) {
log.debug("Failed to get a connection: " + e.getMessage());
} finally {
if (conn != null) {
try { conn.close(); } catch (SQLException e) {}
}
}
template = new JdbcTemplate(source);
boolean isClosed = false;
try {
isClosed = conn.isClosed();
} catch (SQLException e) {
log.error("Failed to test the connection {} ", e.getMessage());
}
log.debug("Initialization complete");
init.set(State.INITIALIZED);
}
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
log.debug("doGet() is called");
checkInit();
// checking if the param list is empty or has some stuff in it
Enumeration<String> params = request.getParameterNames();
if (!params.hasMoreElements()) {
//empty
log.debug("An empty param list detected: listing the database content...");
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<body>");
out.println("<h1>Seweb Database</h1>");
out.println("<p>Users Table</p>");
List<User> users = getUsers();
if (users.isEmpty()) {
out.println("The users table is empty <br>");
} else {
for (User user : users) {
out.println(user);
out.println("<br>");
}
}
out.println("<p>(Refined) Position Table </p>");
List<Position> positionsGroupped = getPositions();
if (positionsGroupped.isEmpty()) {
out.println("The result set is empty <br>");
} else {
for (Position position : positionsGroupped) {
out.println(position);
out.println("<br>");
}
}
out.println("<p>Positions Table</p>");
List<Position> positions = getAllPositions();
if (positions.isEmpty()) {
out.println("The positions table is empty <br>");
} else {
for (Position position : positions) {
out.println(position);
out.println("<br>");
}
}
out.println("</body>");
out.println("</html>");
out.close();
} else {
log.debug("Param list contains values: will query the db and return distances");
// parse params
String jid = request.getParameter("jid");
String[] location = request.getParameterValues("location");
Double latitude = Double.parseDouble(location[0]);
Double longitude = Double.parseDouble(location[1]);
// validate params
checkRequestParams(jid, location);
//add new values to the database
putPosition(jid, latitude, longitude);
//TODO: calculate "freshness" / validity of data
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String json = getDistances(jid, new LatLng(latitude, longitude));
out.println(json);
out.close();
}
}
private String getDistances(String jid, LatLng point) {
JSONObject obj = new JSONObject();
obj.put("distances", new JSONArray());
String jsonEmpty = obj.toString();
List<Position> positions = getPositions();
if (positions.isEmpty())
return jsonEmpty;
if (positions.size() == 1) {
Position position = positions.get(0);
if (position.getJid().equalsIgnoreCase(jid)) {
return jsonEmpty;
}
}
JSONArray mainArray = new JSONArray();
Iterator<Position> iterator = positions.iterator();
while(iterator.hasNext()) {
Position position = iterator.next();
String screenname = position.getJid();
if (!screenname.equalsIgnoreCase(jid)) {
LatLng remotePoint = new LatLng(position.getLatitude(), position.getLongitude());
double distance = LatLngTool.distance(remotePoint, point, LengthUnit.METER);
double roundedDistance = Math.round( distance * 100.0 ) / 100.0;
long timestamp = position.getTimestamp();
JSONObject json = new JSONObject();
json.put("jid", screenname);
json.put("distance", roundedDistance);
json.put("timestamp", timestamp);
mainArray.put(json);
}
}
JSONObject distancesObj = new JSONObject();
distancesObj.put("distances", mainArray);
return distancesObj.toString();
}
private void checkRequestParams(String jid, final String[] points) {
log.debug("checkRequestParams() called");
if (jid == null || jid.isEmpty()) {
log.error("jid parameter is null or empty");
throw new IllegalArgumentException("jid parameter is null or empty");
}
if (points == null) {
log.error("location points parameter array is null");
throw new IllegalArgumentException("location points parameter array is null");
}
if (points.length != 2) {
log.error("location parameter array should contain exactly 2 elements");
log.error("got {} instead", points.length);
throw new IllegalArgumentException("location parameter array should contain exactly 2 elements");
}
String latitude = points[0];
String longitude = points[1];
if (latitude == null || longitude == null) {
log.error("location parameter array contains null values");
throw new IllegalArgumentException("location parameter array contains null values");
}
if (latitude.isEmpty() || longitude.isEmpty()) {
log.error("location parameter array contains empty values");
throw new IllegalArgumentException("location parameter array contains empty values");
}
try {
Double.parseDouble(latitude);
Double.parseDouble(longitude);
} catch (NumberFormatException e) {
log.error("Failed to convert latitude/longitude strings to double values");
throw new IllegalArgumentException("Error parsing latitude/longitude string to double values");
}
log.debug("exiting checkRequestParams(), all params are correct/valid");
}
private void putPosition(String jid, double latitude, double longitude) {
// add data
String selectSql = "SELECT * FROM users WHERE jid = ?";
List<User> users = template.query(selectSql, new Object[] {jid}, new RowMapper<User>() {
@Override
public User mapRow(ResultSet rs, int rowNum) throws SQLException {
return new User(rs.getInt("id"), rs.getString("jid"),
rs.getBoolean("online"));
}
});
log.debug("Found {} existing users with jid={}", users.size(), jid);
if (users.size() == 0) {
int rows = 0;
rows = template.update("INSERT INTO users(jid,online) values(?,?)", jid, "T");
log.debug("Inserted {} rows to the users table", rows);
}
int rows = 0;
rows = template.update("INSERT INTO positions(user_id,latitude,longitude) VALUES((SELECT id FROM users WHERE jid = ?),?,?)", jid, latitude, longitude);
log.debug("Inserted {} rows to the positions table", rows);
}
private List<User> getUsers() {
List<User> results = template.query(
"SELECT * FROM users",
new RowMapper<User>() {
@Override
public User mapRow(ResultSet rs, int rowNum) throws SQLException {
return new User(rs.getInt("id"), rs.getString("jid"),
rs.getBoolean("online"));
}
});
return results;
}
private List<Position> getPositions() {
List<Position> positions = template.query(
"SELECT p1.*,users.jid " +
"FROM positions p1 " +
"INNER JOIN users ON p1.user_id = users.id " +
"JOIN ( " +
" SELECT user_id, MAX(p2.timestamp) AS max_timestamp " +
" FROM positions p2 " +
" GROUP BY user_id " +
") p2 ON p2.user_id = p1.user_id AND p2.max_timestamp = p1.timestamp ",
new RowMapper<Position>() {
@Override
public Position mapRow(ResultSet rs, int rowNum) throws SQLException {
return new Position(rs.getInt("id"), rs.getDouble("latitude"), rs.getDouble("longitude"),
rs.getTimestamp("timestamp").getTime(), rs.getString("jid"));
}
});
return positions;
}
private List<Position> getAllPositions() {
List<Position> positions = template.query(
"SELECT * FROM positions INNER JOIN users ON "
+ "positions.user_id = users.id ORDER BY positions.user_id",
new RowMapper<Position>() {
@Override
public Position mapRow(ResultSet rs, int rowNum) throws SQLException {
return new Position(rs.getInt("id"), rs.getDouble("latitude"), rs.getDouble("longitude"),
rs.getTimestamp("timestamp").getTime(),
rs.getString("jid"));
}
});
return positions;
}
@Override
public void destroy() {
// This manually unregisters the JDBC driver
Enumeration<Driver> drivers = DriverManager.getDrivers();
while (drivers.hasMoreElements()) {
Driver driver = drivers.nextElement();
try {
DriverManager.deregisterDriver(driver);
log.debug("Unregistered the jdbc driver: {} ", driver);
} catch (SQLException e) {
log.error("Error while unregistering the driver {} ", driver);
}
}
}
// Must call from all public and protected instance methods
private void checkInit() {
if (init.get() != State.INITIALIZED)
throw new IllegalStateException("Uninitialized");
}
public static void main(String[] args) {
throw new AssertionError("Not supposed to be called");
}
}
| [
"oleg.davidyuk@gmail.com"
] | oleg.davidyuk@gmail.com |
b16824688e9e577825e519f32505b2b353e2fd67 | 6f779fb2856e9b9e18a8a4b83c2459a6cc1bfbb0 | /QLExpress-calculate/src/main/java/com/innodealing/redis/RedisUtil.java | 175705f3f15ebdc0deeb6c16aea262fd0d6c7ff4 | [] | no_license | xiaozichen/QLExpress-reference | 9d7a1fe3ce42dc20acecd32a34d028ea87458167 | caedf3c2dae1a7d3476db6fc64915a021c6797ca | refs/heads/master | 2023-02-25T14:04:46.069073 | 2019-06-20T05:01:52 | 2019-06-20T05:01:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,633 | java | package com.innodealing.redis;
import java.io.Serializable;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Component;
/**
* redicache 工具类
*/
@SuppressWarnings("unchecked")
@Component
public class RedisUtil {
@SuppressWarnings("rawtypes")
@Autowired
private RedisTemplate redisTemplate;
/**
* 批量删除对应的value
*
* @param keys
*/
public void remove(final String... keys) {
for (String key : keys) {
remove(key);
}
}
/**
* 批量删除key
*
* @param pattern
*/
public void removePattern(final String pattern) {
Set<Serializable> keys = redisTemplate.keys(pattern);
if (keys.size() > 0)
redisTemplate.delete(keys);
}
/**
* 删除对应的value
*
* @param key
*/
public void remove(final String key) {
if (exists(key)) {
redisTemplate.delete(key);
}
}
/**
* 判断缓存中是否有对应的value
*
* @param key
* @return
*/
public boolean exists(final String key) {
return redisTemplate.hasKey(key);
}
/**
* 读取缓存
*
* @param key
* @return
*/
public Object get(final String key) {
Object result = null;
ValueOperations<Serializable, Object> operations = redisTemplate
.opsForValue();
result = operations.get(key);
return result;
}
/**
* 写入缓存
*
* @param key
* @param value
* @return
*/
public boolean set(final String key, Object value) {
boolean result = false;
try {
ValueOperations<Serializable, Object> operations = redisTemplate
.opsForValue();
operations.set(key, value);
result = true;
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
/**
* 写入缓存
*
* @param key
* @param value
* @return
*/
public boolean set(final String key, Object value, Long expireTime) {
boolean result = false;
try {
ValueOperations<Serializable, Object> operations = redisTemplate
.opsForValue();
operations.set(key, value);
redisTemplate.expire(key, expireTime, TimeUnit.SECONDS);
result = true;
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
public boolean incr(final String key, long cnt) {
boolean result = false;
try {
ValueOperations<Serializable, Object> operations = redisTemplate
.opsForValue();
operations.increment(key, cnt);
result = true;
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
} | [
"ccg5230@163.com"
] | ccg5230@163.com |
6f071b9c7ddfbae17c86b0836752ce0c00280505 | ec048da3f7bbf862d73151c80d6c71cbb94f113c | /app/src/main/java/com/team/team_project/Food.java | 85c448b3ed65fd49ca7021c133511f286680552e | [] | no_license | sherrywang0206/Android-Studio-Project | a784a85f849a960d619546aa92a64b045b404654 | 404a8ca534b4e00d364947321c1c46cd8a7a9412 | refs/heads/master | 2022-11-30T19:03:11.168998 | 2020-08-08T06:03:25 | 2020-08-08T06:03:25 | 285,871,196 | 0 | 0 | null | 2020-08-07T16:12:45 | 2020-08-07T16:12:45 | null | UTF-8 | Java | false | false | 1,822 | java | package com.team.team_project;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.os.Bundle;
public class Food extends AppCompatActivity {
Button addbutton;
Button tablebutton;
Button profilebutton;
Button chatbuttom;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_food);
addbutton = findViewById(R.id.pencil);
addbutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Food.this,AddActivity.class);
startActivity(intent);
}
});
tablebutton = findViewById(R.id.table);
tablebutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Food.this,Analysis.class);
startActivity(intent);
}
});
profilebutton = findViewById(R.id.profile);
profilebutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Food.this,PageActivity.class);
startActivity(intent);
}
});
chatbuttom = findViewById(R.id.chat);
chatbuttom.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Food.this,Chat.class);
startActivity(intent);
}
});
}
}
| [
"neko06301202@gmail.com"
] | neko06301202@gmail.com |
ad79248bf30cbc1fc4633fa708970a3ea0b3d209 | 620b2a98c0d6e0921fb99be2715e166e4bd55eca | /src/test/java/configurationTest/GeneratorConfigTest.java | 737a045e1501d7accc513a900f7f9ae21659c977 | [] | no_license | Mgarchuk/ElevatorsSimulation | 8fe32d6f53cb49eaaa09aadc3411415e62532407 | cd48e505e631dc92558ab5980188a6462d44ccfc | refs/heads/master | 2023-05-06T11:04:12.095366 | 2021-05-25T20:39:07 | 2021-05-25T20:39:07 | 370,040,823 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,494 | java | package configurationTest;
import configuration.GeneratorConfig;
import org.junit.jupiter.api.Test;
import java.util.Properties;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class GeneratorConfigTest {
@Test
public void createGeneratorConfigTest() {
Properties properties = new Properties();
properties.setProperty("maxPersonsPerTime", "4");
properties.setProperty("generationFrequency", "3000");
properties.setProperty("statisticsFrequency", "15000");
properties.setProperty("maxWeight", "170");
GeneratorConfig generatorConfig = new GeneratorConfig(properties);
assertEquals(generatorConfig.getMaxWeight(), 170);
assertEquals(generatorConfig.getMaxPersonsPerTime(), 4);
assertEquals(generatorConfig.getGenerationFrequency(), 3000);
assertEquals(generatorConfig.getStatisticsFrequency(), 15000);
generatorConfig = new GeneratorConfig();
assertEquals(generatorConfig.getMaxWeight(), 150);
assertEquals(generatorConfig.getMaxPersonsPerTime(), 5);
assertEquals(generatorConfig.getGenerationFrequency(), 5000);
assertEquals(generatorConfig.getStatisticsFrequency(), 10000);
}
@Test
public void getMaxWeightTest() {
Properties properties = new Properties();
properties.setProperty("maxWeight", "170");
GeneratorConfig generatorConfig = new GeneratorConfig(properties);
assertEquals(generatorConfig.getMaxWeight(), 170);
}
@Test
public void getMaxPersonsPerTimeTest() {
Properties properties = new Properties();
properties.setProperty("maxPersonsPerTime", "4");
GeneratorConfig generatorConfig = new GeneratorConfig(properties);
assertEquals(generatorConfig.getMaxPersonsPerTime(), 4);
}
@Test
public void getGenerationFrequencyTest() {
Properties properties = new Properties();
properties.setProperty("generationFrequency", "3000");
GeneratorConfig generatorConfig = new GeneratorConfig(properties);
assertEquals(generatorConfig.getGenerationFrequency(), 3000);
}
@Test
public void getStatisticsFrequencyTest() {
Properties properties = new Properties();
properties.setProperty("statisticsFrequency", "15000");
GeneratorConfig generatorConfig = new GeneratorConfig(properties);
assertEquals(generatorConfig.getStatisticsFrequency(), 15000);
}
}
| [
"mgarchuk6@gmail.com"
] | mgarchuk6@gmail.com |
fe11cea6ba5a873e236ddb21fdea918810458b9d | 0c8a6fb958216ae7b0fac00a0cb40bead0d849f3 | /src/Multijugador/opciones/Paquete02Move.java | 78d38eea84fd466dee1b32b8ca8517639da78fdc | [] | no_license | OsdaGomez99/Blue_Climbers | 110d60e96e331acbf96c833996dfa0450ede454c | a4d86120708cf5d709f6348b05442f9aeef6a51d | refs/heads/master | 2021-01-14T21:46:06.013046 | 2019-08-11T01:50:23 | 2019-08-11T01:50:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,138 | java | package Multijugador.opciones;
import Multijugador.Cliente;
import Multijugador.Servidor;
public class Paquete02Move extends Paquete{
private String username, personaje;
private int x, y;
private boolean isMoving, isHurt;
private int movingDir = 1;
private boolean canJump = true;
private boolean attackKey;
//construccion cuando se recibe la data
public Paquete02Move(byte[] data) {
super(02);
String[] dataArray = readData(data).split(":");
this.username = dataArray[0];
this.personaje = dataArray[1];
this.x = Integer.parseInt(dataArray[2]);
this.y = Integer.parseInt(dataArray[3]);
this.isMoving = Integer.parseInt(dataArray[4]) == 1;
this.movingDir = Integer.parseInt(dataArray[5]);
}
public Paquete02Move(String username, String personaje, int x, int y,boolean isMoving, int movingDir) {
super(02);
this.username = username;
this.personaje = personaje;
this.x = x;
this.y = y;
this.isMoving = isMoving;
this.movingDir = movingDir;
}
//enviar al server
@Override
public void writeData(Cliente cliente) {
cliente.sendData(getData());
}
//enviar a los clientes
@Override
public void writeData(Servidor server) {
server.sendDataToAll(getData());
}
@Override
public byte[] getData() {
return ("02" + username + ":" + personaje + ":" + x + ":" + y + ":" + (isMoving? 1 : 0) + ":" +movingDir).getBytes();
}
public String getUsername() {
return username;
}
public String getPersonaje() {
return personaje;
}
public int getX() {
return this.x;
}
public int getY() {
return this.y;
}
public int getMovingDir() {
return movingDir;
}
public void setMovingDir(int movingDir) {
this.movingDir = movingDir;
}
public boolean getIsMoving() {
return isMoving;
}
public void setIsMoving(boolean isMoving) {
this.isMoving = isMoving;
}
}
| [
"mariajmr1202@gmail.com"
] | mariajmr1202@gmail.com |
5fb80e8140a100c58d9173db193a4404e447b3d4 | b42f7974641bf589fc0d60b021f274fc2811e221 | /src/main/java/com/sunyue/study/string/LongestCommonContinuousSubString.java | a4fae2da398fd39b46de1c36c0fa5b2186f02bae | [] | no_license | sunyue79/javastudy | d5deae49049baf74814bbc3b0ec952b670156b4c | b22fffe0678710834a2e5293341fa0e4ca80811a | refs/heads/master | 2020-05-28T03:51:20.403715 | 2017-06-15T07:01:10 | 2017-06-15T07:01:10 | 10,991,140 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,448 | java | /**
*
*/
package com.sunyue.study.string;
import com.sunyue.study.Util;
// r e p u t a t i o n
// i 0 0 0 0 0 0 0 1 0 0
// n 0 0 0 0 0 0 0 0 0 1
// p 0 0 1 0 0 0 0 0 0 0
// u 0 0 0 2 0 0 0 0 0 0
// t 0 0 0 0 3 0 0 0 0 0
public class LongestCommonContinuousSubString {
public String getLongestCommonContinuousSubString(String s1, String s2) {
int[][] matrix = new int[s1.length()][s2.length()];
int maxLen = 0;
int index1 = 0; // common substring end in s1
int index2 = 0; // common substring end in s2
for (int i = 0; i < s1.length(); i++) {
for (int j = 0; j < s2.length(); j++) {
if (s1.charAt(i) == s2.charAt(j)) {
if (i > 0 && j > 0) {
matrix[i][j] = matrix[i - 1][j - 1] + 1;
} else {
matrix[i][j] = 1;
}
if (matrix[i][j] > maxLen) {
maxLen = matrix[i][j];
index1 = i;
index2 = j;
}
}
}
}
String c1 = s1.substring(index1 - maxLen + 1, index1 + 1);
String c2 = s2.substring(index2 - maxLen + 1, index2 + 1);
Util.out(c1.equals(c2) ? "OK" : "Fail");
return c1;
}
/**
* @param args
*/
public static void main(String[] args) {
Util.out(new LongestCommonContinuousSubString()
.getLongestCommonContinuousSubString("input", "reputation"));
Util.out(new LongestCommonContinuousSubString()
.getLongestCommonContinuousSubString(
"123456789abcdefghijklmn2131.dfdfdf",
"123456sdkk123456789abcddkfdfkd123456789abcde"));
}
}
| [
"yue.y.sun@ericsson.com"
] | yue.y.sun@ericsson.com |
34c945b7c9a6611ea966da23a2501aafdc03030b | dd4f99478247926f25b4ea4110f576a1ff385167 | /app/src/main/java/mountedwings/org/mskola_mgt/student/MskolaLogin.java | 8bd82955bf7342dfc4d0818ee67d12f47c5691f2 | [
"Apache-2.0"
] | permissive | 5ran6/mSkola | fc1620b44afe8edcf4637cab1949047111690d7f | 8e424b13c9a7cd8a9455fb71785c4bb2ad4ad2f3 | refs/heads/master | 2021-11-27T12:16:22.422635 | 2020-11-25T15:55:47 | 2020-11-25T15:55:47 | 147,432,742 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,355 | java | /*
* Copyright 2019 Mountedwings Cybersystems LTD. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//STUDENT
package mountedwings.org.mskola_mgt.student;
import android.app.Dialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatCheckBox;
import android.support.v7.widget.AppCompatEditText;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.mskola.controls.serverProcessStudents;
import com.mskola.files.storageFile;
import mountedwings.org.mskola_mgt.ChangePassword;
import mountedwings.org.mskola_mgt.ForgotPassword;
import mountedwings.org.mskola_mgt.R;
import mountedwings.org.mskola_mgt.utils.CheckNetworkConnection;
import mountedwings.org.mskola_mgt.utils.Tools;
import static mountedwings.org.mskola_mgt.SettingFlat.myPref;
public class MskolaLogin extends AppCompatActivity {
int keep_signed_in = 0;
private boolean singedIn;
private String error_from_server = "Error";
private TextInputLayout email, password1;
private AppCompatEditText emailE, pass1;
private String emailAddress, password, TAG = "mSkola";
private SharedPreferences mPrefs;
private SharedPreferences.Editor editor;
private String role;
private static final int PREFRENCE_MODE_PRIVATE = 0;
private AppCompatCheckBox checkedTextView;
private String text;
private LinearLayout parent_layout;
private LinearLayout lyt_progress;
private String name, school;
private byte[] pass;
private Intent intent;
private storageFile data;
private BroadcastReceiver mReceiver;
private int w = 0, status = 1;
private AsyncTask lastThread;
private void submitForm() {
if (!validateEmail()) {
return;
}
if (!validatePassword1()) {
return;
}
emailAddress = emailE.getText().toString().trim();
password = pass1.getText().toString();
doLogin();
}
//DONE
public void hideSoftKeyboard() {
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
}
private boolean validateEmail() {
if (emailE.getText().toString().trim().isEmpty()) {
email.setError(getString(R.string.err_msg_email));
requestFocus(emailE);
return false;
} else {
email.setErrorEnabled(false);
}
return true;
}
private boolean validatePassword1() {
if (pass1.getText().toString().trim().isEmpty()) {
password1.setError(getString(R.string.err_msg_pass1));
requestFocus(pass1);
return false;
} else {
password1.setErrorEnabled(false);
}
return true;
}
private void requestFocus(View view) {
if (view.requestFocus()) {
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
}
}
public void forgot(View view) {
startActivity(new Intent(getApplicationContext(), ForgotPassword.class));
}
private void checkKeepState() {
if (checkedTextView.isChecked()) {
keep_signed_in = 1;
singedIn = true;
} else {
keep_signed_in = 0;
singedIn = false;
}
}
private void showCustomDialogFailure(String error) {
final Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before
dialog.setContentView(R.layout.dialog_error);
dialog.setCancelable(true);
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.copyFrom(dialog.getWindow().getAttributes());
lp.width = WindowManager.LayoutParams.WRAP_CONTENT;
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
TextView error_message = dialog.findViewById(R.id.content);
error_message.setText(error);
(dialog.findViewById(R.id.bt_close)).setOnClickListener(v -> {
dialog.dismiss();
try {
if (lyt_progress.getVisibility() == View.VISIBLE || parent_layout.getVisibility() == View.GONE) {
lyt_progress.setVisibility(View.INVISIBLE);
parent_layout.setVisibility(View.VISIBLE);
}
} catch (Exception e) {
e.printStackTrace();
}
});
dialog.show();
dialog.getWindow().setAttributes(lp);
}
public void change(View view) {
startActivity(new Intent(getApplicationContext(), ChangePassword.class));
}
private class MyTextWatcher implements TextWatcher {
private View view;
private MyTextWatcher(View view) {
this.view = view;
}
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
public void afterTextChanged(Editable editable) {
switch (view.getId()) {
case R.id.email:
validateEmail();
break;
case R.id.pass1:
validatePassword1();
break;
}
}
}
@Override
protected void onResume() {
this.mReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
w++;
Log.d("mSkola", "W = " + w);
new CheckNetworkConnection(context, new CheckNetworkConnection.OnConnectionCallback() {
@Override
public void onConnectionSuccess() {
status = 1;
if (w > 1) {
try {
Tools.toast("Back Online!", MskolaLogin.this, R.color.green_900);
lastThread.execute();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
@Override
public void onConnectionFail(String errorMsg) {
status = 0;
Tools.toast(getResources().getString(R.string.no_internet_connection), MskolaLogin.this, R.color.red_900);
try {
lastThread.cancel(true);
} catch (Exception ex) {
ex.printStackTrace();
}
}
}).execute();
}
};
registerReceiver(
this.mReceiver,
new IntentFilter(
ConnectivityManager.CONNECTIVITY_ACTION));
super.onResume();
}
public static void clearSharedPreferences(Context ctx) {
ctx.getSharedPreferences("mSkola", 0).edit().clear().apply();
}
private void doLogin() {
lyt_progress = findViewById(R.id.lyt_progress);
lyt_progress.setVisibility(View.VISIBLE);
lyt_progress.setAlpha(1.0f);
parent_layout.setVisibility(View.GONE);
hideSoftKeyboard();
//toolbar.setVisibility(View.GONE);
new login().execute();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//not necessary when you have implemented logout
// clearSharedPreferences(MskolaLogin.this);
Intent intent = getIntent();
role = intent.getStringExtra("account_type");
if (getSharedPreferences(myPref, PREFRENCE_MODE_PRIVATE).toString() != null) {
mPrefs = getSharedPreferences(myPref, PREFRENCE_MODE_PRIVATE);
singedIn = mPrefs.getBoolean("signed_in", false);
// editor = mPrefs.edit();
// editor.putString("role", role);
// editor.putString("email_address", emailAddress);
// editor.apply();
}
if (singedIn) {
//startIntent to next activity
finish();
startActivity(new Intent(getApplicationContext(), Dashboard.class));
}
setContentView(R.layout.activity_login_mskola);
parent_layout = findViewById(R.id.parent_layout);
Tools.setSystemBarColor(this, android.R.color.white);
Tools.setSystemBarLight(this);
mPrefs = getSharedPreferences(myPref, PREFRENCE_MODE_PRIVATE);
checkedTextView = findViewById(R.id.keep_signed_in);
email = findViewById(R.id.email);
password1 = findViewById(R.id.password1);
emailE = findViewById(R.id.emailE);
pass1 = findViewById(R.id.pass1);
emailE.addTextChangedListener(new MyTextWatcher(emailE));
pass1.addTextChangedListener(new MyTextWatcher(pass1));
checkedTextView.setOnCheckedChangeListener((buttonView, isChecked) -> checkKeepState());
findViewById(R.id.sig_in).setOnClickListener(view -> submitForm());
}
private class login extends AsyncTask<String, Integer, Boolean> {
@Override
protected Boolean doInBackground(String... strings) {
try {
do {
storageFile storageObj = new storageFile();
storageObj.setOperation("requestlogin");
storageObj.setStrData(emailAddress + "," + password);
storageFile sentData = new serverProcessStudents().requestProcess(storageObj);
//received from server
String text = sentData.getStrData();
Log.d("mSkola", text);
boolean isSuccess;
if (text.contains("success")) {
isSuccess = true;
Log.d(TAG, "registration successful");
} else if (text.contains("invalid")) {
isSuccess = false;
error_from_server = "Email and password mismatch. Try again";
Log.d(TAG, error_from_server);
} else if (text.contains("not found")) {
isSuccess = false;
error_from_server = "Looks like you don't have an mSkola account. Make sure you register before login";
Log.d(TAG, error_from_server);
} else {
isSuccess = false;
error_from_server = "An error occurred!";
Log.d(TAG, error_from_server);
}
return isSuccess;
} while (!isCancelled());
} catch (Exception ex) {
ex.printStackTrace();
error_from_server = "Something went wrong. Try again";
return false;
}
}
@Override
protected void onPreExecute() {
super.onPreExecute();
}
@Override
protected void onPostExecute(Boolean isSuccess) {
super.onPostExecute(isSuccess);
if (isSuccess) {
intent = new Intent(getApplicationContext(), List_of_schools.class);
//sharedPref
editor = mPrefs.edit();
// editor.putBoolean("signed_in", true);
editor.putString("account_type", role);
editor.putString("email_address", emailE.getText().toString());
editor.putBoolean("signed_in", singedIn);
editor.putString("who", "student");
editor.apply();
intent.putExtra("email_address", emailE.getText().toString());
startActivity(intent);
finish();
} else {
showCustomDialogFailure(error_from_server);
lyt_progress.setVisibility(View.GONE);
//clear sharedPref
clearSharedPreferences(MskolaLogin.this);
}
}
}
@Override
protected void onPause() {
unregisterReceiver(this.mReceiver);
w = 0;
super.onPause();
finish();
}
}
| [
"5raan6@gmail.com"
] | 5raan6@gmail.com |
b7f711b2b7479b94e03614ca65a358464840c26b | 6da648bfa9724e974f28a6c43e0178649daa300f | /commlibrary/src/main/java/takjxh/android/com/commlibrary/presenter/impl/BasePresenter.java | 9a3f776145a4ddcabe9b740eddf9163589204a1d | [] | no_license | Bingoliallen/takjxhApp | 2ca44409a4e38f4ca6a4055eb347997fd755efa0 | 4fab96e53bad1806b5e48301a75b798b9beaca25 | refs/heads/master | 2023-06-16T17:23:30.364111 | 2021-07-15T07:28:35 | 2021-07-15T07:28:35 | 246,971,816 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,716 | java | package takjxh.android.com.commlibrary.presenter.impl;
import java.lang.ref.WeakReference;
import takjxh.android.com.commlibrary.presenter.IBasePresenter;
import rx.subscriptions.CompositeSubscription;
public abstract class BasePresenter<V extends IBasePresenter.IView, M> {
protected String TAG = this.getClass().getSimpleName();
protected M mModel;
private CompositeSubscription mCompositeSubscription;
private WeakReference<V> mView;
public BasePresenter(V view) {
mCompositeSubscription = new CompositeSubscription();
mView = new WeakReference(view);
mModel = createModel();
}
protected abstract M createModel();
public boolean isAttach() {
return mView != null && mView.get() != null;
}
public V getView() {
if (mView == null) {
return null;
}
return mView.get();
}
private void unsubscribe() {
if (mCompositeSubscription != null && mCompositeSubscription.hasSubscriptions()) {
mCompositeSubscription.unsubscribe();
mCompositeSubscription.clear();
mCompositeSubscription = null;
}
}
public CompositeSubscription getCompositeSubscription() {
if (mCompositeSubscription == null) {
mCompositeSubscription = new CompositeSubscription();
}
return mCompositeSubscription;
}
public void onDestroy() {
unsubscribe();
if (mView != null) {
mView.clear();
mView = null;
}
}
// public <T> boolean isValidResult(JsonCommon<T> jsonCommon, BasePresenter.IView viewCallback) {
// if (jsonCommon.getCode().equals("200")) {
// return true;
// } else {
// viewCallback.toast(jsonCommon.getMessage());
// return false;
// }
// }
} | [
"1241903717@qq.com"
] | 1241903717@qq.com |
ff4dd4b68493e49c59ac971e7437a6f8739e5a67 | ae5eb1a38b4d22c82dfd67c86db73592094edc4b | /project289/src/test/java/org/gradle/test/performance/largejavamultiproject/project289/p1446/Test28922.java | efcea8e99a1ac5383770cdaae04e9aa0098013e2 | [] | no_license | big-guy/largeJavaMultiProject | 405cc7f55301e1fd87cee5878a165ec5d4a071aa | 1cd6a3f9c59e9b13dffa35ad27d911114f253c33 | refs/heads/main | 2023-03-17T10:59:53.226128 | 2021-03-04T01:01:39 | 2021-03-04T01:01:39 | 344,307,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,113 | java | package org.gradle.test.performance.largejavamultiproject.project289.p1446;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test28922 {
Production28922 objectUnderTest = new Production28922();
@Test
public void testProperty0() {
String value = "value";
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
String value = "value";
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
String value = "value";
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
} | [
"sterling.greene@gmail.com"
] | sterling.greene@gmail.com |
fee968da8dca1af016f547d9780e5ba991d6caf2 | 849ec9ac1e97d039cf6fc6d6aedf37d747f42290 | /crawler-poc/elecom-web/src/main/java/com/elecom/crawler/common/Application.java | c5726979bfa74e826105f502ab803b81ccecba14 | [] | no_license | yueheng-li/poc | d3661a09b43bf7e3130670384799a437879be7f0 | 11d2a7d3f90343ff59de6c741d676a79f9c62619 | refs/heads/master | 2021-07-09T17:09:32.519935 | 2018-05-08T14:19:02 | 2018-05-08T14:19:02 | 95,622,821 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 875 | java | package com.elecom.crawler.common;
import org.springframework.stereotype.Component;
@Component
public class Application {
//ログインしたユーザ情報のセッションキー
public static String SESSION_KEY_LOGINUSER = "session_login_key" ;
/** Infoメッセージ設定 **/
public final static String SERVICE_INFORMATIONS = "informations";
/** Warningメッセージ設定 **/
public final static String SERVICE_WARNINGS = "warnings";
/** Errメッセージ設定 **/
public final static String SERVICE_ERRORS = "errors";
/**
* セッションユーザキー
*/
public static String DEFAULT_SESSION_AUTH_DATA = "PMI.DEFAULT_SESSION_AUTH_DATA";
public static String DEFAULT_SESSION_USER_DATA = "PMI.DEFAULT_SESSION_USER_DATA";
public static final String DEFAULT_FORWARD_URL = "/sessiontimeout";
}
| [
"chunhui.li@accenture.com"
] | chunhui.li@accenture.com |
8fb808635b3e8c2451d24cb3478df27e600d33b8 | 0d4f05c9909695a166e97b8958680945ea5c1266 | /src/minecraft/com/sun/jna/platform/win32/Shell32.java | eca6e0580a3da4494d8ddd94b7b62a22d37a9d52 | [] | no_license | MertDundar1/ETB-0.6 | 31f3f42f51064ffd7facaa95cf9b50d0c2d71995 | 145d008fed353545157cd0e73daae8bc8d7f50b9 | refs/heads/master | 2022-01-15T08:42:12.762634 | 2019-05-15T23:37:33 | 2019-05-15T23:37:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 932 | java | package com.sun.jna.platform.win32;
import com.sun.jna.Native;
import com.sun.jna.ptr.PointerByReference;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public abstract interface Shell32
extends ShellAPI, StdCallLibrary
{
public static final Shell32 INSTANCE = (Shell32)Native.loadLibrary("shell32", Shell32.class, W32APIOptions.UNICODE_OPTIONS);
public abstract int SHFileOperation(ShellAPI.SHFILEOPSTRUCT paramSHFILEOPSTRUCT);
public abstract WinNT.HRESULT SHGetFolderPath(WinDef.HWND paramHWND, int paramInt, WinNT.HANDLE paramHANDLE, WinDef.DWORD paramDWORD, char[] paramArrayOfChar);
public abstract WinNT.HRESULT SHGetDesktopFolder(PointerByReference paramPointerByReference);
public abstract WinDef.HINSTANCE ShellExecute(WinDef.HWND paramHWND, String paramString1, String paramString2, String paramString3, String paramString4, int paramInt);
}
| [
"realhcfus@gmail.com"
] | realhcfus@gmail.com |
4ed39357baf8aee7e7b5baab8743cbbbd5327adb | c4683de8a718dbb0f68f0f7ba486fb780448ffb3 | /CodingChallenge2/src/main/java/com/example/model/Food.java | a51460124de87ee04aa6733c84975c7d95409225 | [] | no_license | swarbrick/CodingChallenge2 | d45e0015df7f10d167ad90a633693ee33a19c350 | 19eb533bd6c84e4f35c0c164e1ba72e94f4f9aab | refs/heads/main | 2022-12-25T22:14:02.444036 | 2020-10-02T17:45:24 | 2020-10-02T17:45:24 | 300,689,246 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 910 | java | package com.example.model;
public class Food {
int foodId;
String dishName;
double calories;
public Food() {}
public Food(int foodId, String dishName, double calories) {
super();
this.foodId = foodId;
this.dishName = dishName;
this.calories = calories;
}
public Food(String dishName, double calories) {
super();
this.dishName = dishName;
this.calories = calories;
}
public int getFoodId() {
return foodId;
}
public void setFoodId(int foodId) {
this.foodId = foodId;
}
public String getDishName() {
return dishName;
}
public void setDishName(String dishName) {
this.dishName = dishName;
}
public double getCalories() {
return calories;
}
public void setCalories(double calories) {
this.calories = calories;
}
@Override
public String toString() {
return "Food [foodId=" + foodId + ", dishName=" + dishName + ", calories=" + calories + "]";
}
}
| [
"noreply@github.com"
] | noreply@github.com |
9abec054bbeb64a58e07a3525a9994a33e3ffa1e | 6edd64c154ed1c9d32b64b964432bd93bd596ca7 | /src/main/java/org/lable/oss/bitsandbytes/ByteVisualization.java | 2eff5b208df729995bcd9f0fc14d22c11b38ea4b | [
"Apache-2.0"
] | permissive | LableOrg/java-bitsandbytes | d20d8049744a7ecbab91de59000c185a79f31129 | 34a5b6a22f3b94139b96d7a18649208d220c91cb | refs/heads/master | 2023-08-31T11:32:10.028513 | 2023-08-29T12:10:56 | 2023-08-29T12:10:56 | 39,075,316 | 3 | 0 | Apache-2.0 | 2023-09-11T13:42:34 | 2015-07-14T13:06:19 | Java | UTF-8 | Java | false | false | 8,258 | java | /*
* Copyright © 2015 Lable (info@lable.nl)
*
* 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.lable.oss.bitsandbytes;
import java.io.ByteArrayOutputStream;
/**
* Visualize byte arrays in a variety of ways.
*/
public enum ByteVisualization {
/**
* Use the braille Unicode character range (U+2800–U+28FF) to visualize a byte. The braille dots correspond to the
* bits set.
*/
BRAILLE {
@Override
public String visualize(byte input) {
int offset = input < 0 ? 256 - Math.abs(input) : input;
return Character.toString((char) ('\u2800' + offset));
}
@Override
public byte[] parse(String input) {
if (input == null) return new byte[0];
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
input.chars()
// Skip any unparsable characters.
.filter(c -> c >= '\u2800' && c <= '\u28FF')
.map(c -> (byte) c - '\u2800')
.forEach(baos::write);
return baos.toByteArray();
}
},
/**
* Represent a byte as a string of ones and zeroes, e.g., {@code 11000000} for {@code 192}.
*/
ONES_AND_ZEROES {
@Override
public String visualize(byte input) {
char[] out = new char[8];
for (int i = 7; i > -1; i--) {
out[7 - i] = (input >> i & 0x1) == 1 ? '1' : '0';
}
return new String(out);
}
@Override
public byte[] parse(String input) {
if (input == null) return new byte[0];
StringBuilder cleanInput = new StringBuilder();
for (char c : input.toCharArray()) {
// Strip out anything that isn't a 1 or 0.
if (c == '0' || c == '1') {
cleanInput.append(c);
}
}
char[] chars = cleanInput.toString().toCharArray();
int targetLength = chars.length / 8;
int remainder = chars.length % 8;
if (remainder != 0) {
targetLength += 1;
}
byte[] output = new byte[targetLength];
// If the input was not neatly divisible by 8, pad out the first byte with 0s by starting later in the loop.
int bitCounter = remainder == 0 ? 0 : 8 - remainder;
int byteCounter = 0;
for (char bit : chars) {
if (bit == '1') {
output[byteCounter] |= 1 << (7 - bitCounter);
}
bitCounter++;
if (bitCounter == 8) {
byteCounter++;
bitCounter = 0;
}
}
return output;
}
},
/**
* Represent a byte as a hexadecimal string, e.g., {@code C0} for {@code 192}.
*/
HEXADECIMAL {
@Override
public String visualize(byte input) {
int high = input >> 4 & 0x0F;
int low = input & 0x0F;
return new String(new char[]{
(high > 9 ? (char) (high + 0x37) : (char) (high + 0x30)),
(low > 9 ? (char) (low + 0x37) : (char) (low + 0x30))
});
}
@Override
public byte[] parse(String input) {
if (input == null) return new byte[0];
input = input.trim();
if (input.startsWith("0x") || input.startsWith("0X")) {
input = input.substring(2);
}
StringBuilder cleanInput = new StringBuilder();
for (char c : input.toCharArray()) {
// Strip out anything that isn't a 1 or 0.
if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f')) {
cleanInput.append(c);
} else if (c >= 'A' && c <= 'F') {
// Turn uppercase A–F into lowercase a–f.
cleanInput.append((char) (c + 0x20));
}
}
char[] chars;
if (cleanInput.length() % 2 == 0) {
chars = cleanInput.toString().toCharArray();
} else {
// Prepend a '0' if the input string has an odd number of characters.
chars = new char[cleanInput.length() + 1];
chars[0] = '0';
cleanInput.getChars(0, cleanInput.length(), chars, 1);
}
int targetLength = chars.length / 2;
byte[] output = new byte[targetLength];
for (int i = 0; i < chars.length / 2; i++) {
output[i] = (byte) (value(chars[i * 2]) << 4 ^ value(chars[i * 2 + 1]));
}
return output;
}
private int value(char c) {
return c >= '0' && c <= '9' ? c - 0x30 : c - 0x57;
}
},
/**
* Use Unicode Block Elements to represent each byte using two glyphs.
*/
SQUARES {
// 0..F mapped to a character from the Block Elements range.
final char[] GLYPHS = new char[]{' ', '▘', '▝', '▀', '▖', '▌', '▞', '▛', '▗', '▚', '▐', '▜', '▄', '▙', '▟', '█'};
// Map each character in the Block Elements range to its byte value (if applicable).
// Invalid characters are mapped to -1. The 0 byte is represented by space (U+0020),
// which lies outside of this block.
final byte[] VALUES = new byte[]{
3, -1, -1, -1, 0xC, -1, -1, -1, 0xF, -1, -1, -1, 5, -1, -1, -1,
0xA, -1, -1, -1, -1, -1, 4, 8, 1, 0xD, 9, 7, 0xB, 2, 6, 0xE
};
@Override
public String visualize(byte input) {
return Character.toString(GLYPHS[(input & 0xff) >> 4]) + Character.toString(GLYPHS[input & 0xf]);
}
@Override
public byte[] parse(String input) {
if (input == null) return new byte[0];
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Integer firstOfPair = null;
for (char c : input.toCharArray()) {
int value = isValid(c);
// Skip all unparsable characters.
if (value >= 0) {
if (firstOfPair == null) {
firstOfPair = value;
} else {
baos.write(firstOfPair << 4 | value);
firstOfPair = null;
}
}
}
return baos.toByteArray();
}
int isValid(char c) {
if (c == ' ') return 0;
if (c >= '\u2580' && c <= '\u259F') return VALUES[c - '\u2580'];
return -1;
}
};
/**
* Visualize a byte with a printable string.
*
* @param input A byte.
* @return A printable string.
*/
public abstract String visualize(byte input);
/**
* Turn a visualization of a byte array into the byte array it represents.
*
* @param input A string visualization.
* @return A byte array.
*/
public abstract byte[] parse(String input);
/**
* Visualize a byte array with a printable string.
*
* @param input A byte array.
* @return A printable string.
*/
public String visualize(byte[] input) {
if (input == null) {
return "NULL";
}
// This method could be overridden if needed, but currently all visualization
// techniques can work on a single byte.
StringBuilder builder = new StringBuilder();
for (byte b : input) {
builder.append(visualize(b));
}
return builder.toString();
}
}
| [
"jeroen.hoek@lable.nl"
] | jeroen.hoek@lable.nl |
91b3e2914a811a4e76b142a8a645a9858735382e | dbbb1877eaf07fcf1d63f99ac1875039e9f5fd1d | /src/practica4/Ejercicio4.java | d1c51ba0d054acffc2853b3c33bee054683c4257 | [] | no_license | matey97/Programacion2 | 4124d55e7b028c4d31383e1ffa4efd40e29ce512 | 15d29a8c16ec3d37c89c8f52599faaccec45fc13 | refs/heads/master | 2021-03-19T17:18:11.974148 | 2017-10-31T18:36:10 | 2017-10-31T18:36:10 | 109,035,785 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,113 | java | package practica4;
public class Ejercicio4 {
public static int validas=0;
public static void ochoReinas(){
int[] filas = new int[8];
for (int i=0;i<filas.length;i++)
filas[i]=i+1;
ochoReinas(filas, "");
}
public static boolean esCorrecta(String solucion){
for (int i=0; i<solucion.length()-1;i++){
for (int j=i+1;j<solucion.length();j++){
if (Math.abs(solucion.charAt(i)-solucion.charAt(j))==Math.abs(i-j))
return false;
}
}
return true;
}
public static void ochoReinas (int[] disponibles,String prefijo){
if (disponibles.length==0){
if (esCorrecta(prefijo)){
System.out.println(prefijo);
validas++;
}
}else{
if (esCorrecta(prefijo)){
int[] auxiliar= new int[disponibles.length-1];
for (int e: disponibles){
int j=0;
for (int i=0; i<auxiliar.length;){
if (disponibles[j]!=e){
auxiliar[i++]=disponibles[j];
}
j++;
}
ochoReinas(auxiliar,prefijo+e);
}
}
}
}
public static void main (String[] args){
ochoReinas();
System.out.println("Hay un total de "+validas+" soluciones");
}
}
| [
"al341802@uji.es"
] | al341802@uji.es |
cac400ba7461ac5f10b1bd4b267eba39c230b878 | f05c3324bd9b564046480b07da11e8b3cb6bf26d | /app/src/main/java/cn/acewill/pos/next/ui/adapter/DishKindsNewAdp.java | ae7d024c0d75b4167d2fa5d6adf1d2edf73caf3f | [] | no_license | xiezhuolin/tesla | 6c0d8c051851e30c9312d4d98c0fc610f16010e5 | a4afb98412fdca35dff03bc4b86eadb5a75c9685 | refs/heads/master | 2020-04-04T18:56:16.195203 | 2018-12-07T06:59:37 | 2018-12-07T06:59:37 | 156,185,784 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 3,750 | java | package cn.acewill.pos.next.ui.adapter;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.HashMap;
import java.util.Map;
import cn.acewill.pos.R;
import cn.acewill.pos.next.base.adapter.BaseAdapter;
import cn.acewill.pos.next.model.dish.DishType;
import cn.acewill.pos.next.utils.ToolsUtils;
import cn.acewill.pos.next.widget.BadgeView;
/**
* Created by DHH on 2016/6/17.
*/
public class DishKindsNewAdp<T> extends BaseAdapter {
private int position = -1;
private Map<String, Integer> order_dish_mp = new HashMap<String, Integer>();
public DishKindsNewAdp(Context context) {
super(context);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
final DishType dishType = (DishType) getItem(position);
if (convertView == null) {
holder = new ViewHolder();
convertView = LayoutInflater.from(context).inflate(R.layout.lv_item_text_new, null);
holder.tv_dishKinds = (TextView) convertView.findViewById(R.id.tv_dishKinds);
// holder.tv_line = (TextView) convertView.findViewById(R.id.tv_line);
// holder.tv_bottom_line2 = (TextView) convertView.findViewById(R.id.tv_bottom_line2);
holder.badeView = new BadgeView(context, (TextView) holder.tv_dishKinds);
holder.badeView.setBadgePosition(BadgeView.POSITION_TOP_RIGHT);
holder.badeView.setTextColor(Color.WHITE);
holder.badeView.setBadgeBackgroundColor(res.getColor(R.color.blue_table_nomber_title));
holder.badeView.setTextSize(14);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
if((position+1) % 4 == 0)
{
// holder.tv_line.setVisibility(View.GONE);
}
holder.tv_dishKinds.setText(dishType.getName());
if (position == this.position) {
ToolsUtils.writeUserOperationRecords("选中了("+dishType.getName()+")分类");
holder.tv_dishKinds.setSelected(true);
// holder.tv_bottom_line2.setVisibility(View.VISIBLE);
} else {
holder.tv_dishKinds.setSelected(false);
// holder.tv_bottom_line2.setVisibility(View.GONE);
}
if (order_dish_mp != null && order_dish_mp.size() > 0)
{
if (order_dish_mp.get(String.valueOf(dishType.getId())) != null)
{
int conunt = order_dish_mp.get(String.valueOf(dishType.getId()));
if (conunt > 0)
{
holder.badeView.setText(conunt + "");
holder.badeView.show();
}
else
{
holder.badeView.hide();
}
}
else
{
holder.badeView.hide();
}
}
else
{
holder.badeView.hide();
}
return convertView;
}
class ViewHolder {
TextView tv_dishKinds;
// TextView tv_line;
// TextView tv_bottom_line2;
BadgeView badeView;
}
public void setSelect(int position) {
if (this.position != position) {
this.position = position;
notifyDataSetChanged();
}
}
public void setMap(Map<String, Integer> order_dish_mp) {
if(order_dish_mp != null && order_dish_mp.size() >0)
{
this.order_dish_mp = order_dish_mp;
}
this.notifyDataSetChanged();
}
}
| [
"xiezhuolin2011@163.com"
] | xiezhuolin2011@163.com |
75c1f61a17176a26812031bd0a54d237aa8a1ba7 | 775750c6eea54a520627b7c611ae39365e539aa0 | /blade.migrate.liferay70/test/blade/migrate/core/JavaFileCheckerTest.java | 20bd26aeadaae2d7203e79a56ec0e617b9c8bcd3 | [] | no_license | simonjhy/blade.tools | 24cdbf6524cfcf3a868f1a4963b03ea96301efca | 1b4d6b0ca3aaea67c1c5e8005f6217062d1717a0 | refs/heads/master | 2021-01-22T23:16:14.798324 | 2015-06-25T03:34:24 | 2015-06-25T03:34:24 | 38,085,005 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,235 | java | package blade.migrate.core;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.io.File;
import org.junit.Test;
import blade.migrate.core.JavaFileChecker;
import blade.migrate.core.SearchResult;
public class JavaFileCheckerTest {
@Test
public void checkStaticMethodInvocation() throws Exception {
File file = new File( "projects/filetests/JavaFileCheckerTest.java" );
JavaFileChecker javaFileChecker = new JavaFileChecker(file);
SearchResult result = javaFileChecker.findMethodInvocation("String", "valueOf");
assertNotNull(result);
assertEquals( 14, result.startLine );
assertEquals( 15, result.endLine );
assertEquals( 218, result.startOffset );
assertEquals( 240, result.endOffset );
}
@Test
public void checkMethodInvocation() throws Exception {
File file = new File( "projects/filetests/JavaFileCheckerTest.java" );
JavaFileChecker javaFileChecker = new JavaFileChecker(file);
SearchResult result = javaFileChecker.findMethodInvocation("foo", "bar");
assertNotNull(result);
assertEquals( 10, result.startLine );
assertEquals( 11, result.endLine );
assertEquals( 170, result.startOffset );
assertEquals( 189, result.endOffset );
}
}
| [
"gregory.amerson@liferay.com"
] | gregory.amerson@liferay.com |
e4ee5189bc0f2428b179be2b12033986b78148a4 | e81eb9546d121a6cb16a8e7d4cd0797b1dd62106 | /AssistanTeacher2/app/src/main/java/com/example/sam/assistanteacher/GetCourseCallback.java | 5955a8fa0c399e18a9e7f7ce013e3c4fc81a94e2 | [] | no_license | sshujonn/Assistant_Teacher | 2f01670255f351b8efb9161beeed485c536e1175 | 337032e4ad59b8f659004239dd71d2fe57ef6e5f | refs/heads/master | 2020-03-19T17:17:41.089048 | 2018-06-09T19:28:36 | 2018-06-09T19:28:36 | 136,751,865 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 182 | java | package com.example.sam.assistanteacher;
/**
* Created by ASUS on 15-Jul-16.
*/
public interface GetCourseCallback {
public abstract void done(userAddCourse returnCourse);
}
| [
"toufiqueaman@gmail.com"
] | toufiqueaman@gmail.com |
a0803d64337ce12cd0a6a563a34982e4426d0dd0 | d093e8a44f63c4610bf6f1e67c517aece4904c96 | /project_4/src/main/java/in/co/rays/project_4/bean/SubjectBean.java | 2d642832b6098efb885be03b00adfb33bffb6186 | [] | no_license | Neeraj217/ORSProject4 | 135eef5bc58742d17c04fb33d20aba60f99ee67f | 4f2653274081b8222aafff1cf30d8ed4454c6b45 | refs/heads/master | 2023-07-27T12:47:18.897301 | 2021-09-07T08:12:28 | 2021-09-07T08:12:28 | 394,598,975 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,113 | java | package in.co.rays.project_4.bean;
/**
* The Class SubjectBean.
*/
public class SubjectBean extends BaseBean {
/** The course name. */
private String courseName;
/** The course id. */
private long courseId;
/** The subject name. */
private String subjectName;
/** The subject id. */
private long subjectId;
/** The description. */
private String description;
/**
* Gets the course name.
*
* @return the course name
*/
public String getCourseName() {
return courseName;
}
/**
* Sets the course name.
*
* @param courseName the new course name
*/
public void setCourseName(String courseName) {
this.courseName = courseName;
}
/**
* Gets the course id.
*
* @return the course id
*/
public long getCourseId() {
return courseId;
}
/**
* Sets the course id.
*
* @param courseId the new course id
*/
public void setCourseId(long courseId) {
this.courseId = courseId;
}
/**
* Gets the subject name.
*
* @return the subject name
*/
public String getSubjectName() {
return subjectName;
}
/**
* Sets the subject name.
*
* @param subjectName the new subject name
*/
public void setSubjectName(String subjectName) {
this.subjectName = subjectName;
}
/**
* Gets the subject id.
*
* @return the subject id
*/
public long getSubjectId() {
return subjectId;
}
/**
* Sets the subject id.
*
* @param subjectId the new subject id
*/
public void setSubjectId(long subjectId) {
this.subjectId = subjectId;
}
/**
* Gets the description.
*
* @return the description
*/
public String getDescription() {
return description;
}
/**
* Sets the description.
*
* @param description the new description
*/
public void setDescription(String description) {
this.description = description;
}
/**
* Gets the key.
*
* @return the key
*/
public String getKey() {
// TODO Auto-generated method stub
return id+"";
}
/**
* Gets the Value.
*
* @return the Value
*/
public String getValue() {
// TODO Auto-generated method stub
return subjectName+"";
}
}
| [
"neerajmalviya.217@gmail.com"
] | neerajmalviya.217@gmail.com |
a6bf173846766972fcc77f1fec2acea22156546d | 76aa1f1887da964e93f09a47ef59d5288a310b90 | /java/recipe/SGCraftTableShapelessRecipes.java | 45d7b1e2d8052260c234b3daeec1682c7d987e41 | [] | no_license | limonadeht/GregLife-Oridinal | 5bddf136dc5cf01857ad3aa9abe1be46b497e000 | 6827ea6d38e879ab88d86bf8e2deee5f2af84d71 | refs/heads/master | 2021-01-10T08:09:34.676690 | 2016-03-26T01:41:08 | 2016-03-26T01:41:08 | 54,644,382 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,168 | java | package recipe;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.world.World;
public class SGCraftTableShapelessRecipes implements IRecipe{
private final ItemStack recipeOutput;
@SuppressWarnings("rawtypes")
public final List recipeItems;
@SuppressWarnings("rawtypes")
public SGCraftTableShapelessRecipes(ItemStack itemstack, List list){
this.recipeOutput = itemstack;
this.recipeItems = list;
}
public ItemStack getRecipeOutput()
{
return this.recipeOutput;
}
@SuppressWarnings({ "unchecked", "rawtypes" })
public boolean matches(InventoryCrafting par1InventoryCrafting, World par2World)
{
ArrayList arraylist = new ArrayList(this.recipeItems);
for (int i = 0; i < 5; ++i)
{
for (int j = 0; j < 5; ++j)
{
ItemStack itemstack = par1InventoryCrafting.getStackInRowAndColumn(j, i);
if (itemstack != null)
{
boolean flag = false;
Iterator iterator = arraylist.iterator();
while (iterator.hasNext())
{
ItemStack itemstack1 = (ItemStack)iterator.next();
if (itemstack.getItem() == itemstack1.getItem() && (itemstack1.getItemDamage() == 32767 || itemstack.getItemDamage() == itemstack1.getItemDamage()))
{
flag = true;
arraylist.remove(itemstack1);
break;
}
}
if (!flag)
{
return false;
}
}
}
}
return arraylist.isEmpty();
}
public ItemStack getCraftingResult(InventoryCrafting par1InventoryCrafting)
{
return this.recipeOutput.copy();
}
public int getRecipeSize()
{
return this.recipeItems.size();
}
}
| [
"limonadeht@yahoo.co.jp"
] | limonadeht@yahoo.co.jp |
4955f2ed52d3b9dba5145499b3d4c1b2ae02f22d | 252ae7a115dffa9ad398f486da43963ab5d90e6d | /app/src/main/java/com/example/econtact/PanelTeacher.java | a4dfe4d6f078adad17b233093b4b0bf7a1e54cba | [] | no_license | adkwas/eContact | 8e9a67a4cf7e92a26c97049c8a5073fcae8d4a4e | 36b459a98701994a2b3b8f8873c589ce5f35dfe3 | refs/heads/master | 2023-02-14T20:59:37.135897 | 2021-01-07T11:16:33 | 2021-01-07T11:16:33 | 312,035,049 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 14,816 | java | package com.example.econtact;
import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.NotificationCompat;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.firestore.CollectionReference;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.DocumentSnapshot;
import com.google.firebase.firestore.EventListener;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.firestore.FirebaseFirestoreException;
import com.google.firebase.firestore.QueryDocumentSnapshot;
import com.google.firebase.firestore.QuerySnapshot;
import com.google.firebase.storage.FileDownloadTask;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import java.io.File;
import java.io.IOException;
import java.util.Objects;
public class PanelTeacher extends AppCompatActivity {
TextView welcomeText, verifyMessageText;
Button checkNewTicketButton, logoutButton, acceptedTicketsButton, resendCodeButton, ongoingButton, settings;
String nameTeacher, surnameTeacher, facultyTeacher, fieldTeacher, emailTeacher;
FirebaseFirestore firebaseFirestore;
ImageView imageViewTeacher;
StorageReference storageReference;
int i = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_panel_teacher);
checkNewTicketButton = findViewById(R.id.checkNewTicket_panelTeacher);
welcomeText = findViewById(R.id.textview_panelTeacher);
logoutButton = findViewById(R.id.logoutButton_panelTeacher);
resendCodeButton = findViewById(R.id.verifyButton_panelTeacher);
verifyMessageText = findViewById(R.id.verifyText_panelTeacher);
ongoingButton = findViewById(R.id.ongoingTickets_panelTeacher2);
acceptedTicketsButton = findViewById(R.id.acceptedTickets_panelTeacher);
settings = findViewById(R.id.settingsPanel_panelTeacher);
imageViewTeacher = findViewById(R.id.imageView_PanelTeacher);
emailTeacher = getIntent().getStringExtra("Email");
storageReference = FirebaseStorage.getInstance().getReference().child(emailTeacher + ".jpg");
try {
final File localFile = File.createTempFile(emailTeacher, "jpg");
storageReference.getFile(localFile).addOnSuccessListener(new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
Bitmap bitmap = BitmapFactory.decodeFile(localFile.getAbsolutePath());
imageViewTeacher.setImageBitmap(bitmap);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
}
});
} catch (IOException e) {
e.printStackTrace();
}
final DocumentReference documentTeacher = FirebaseFirestore.getInstance().collection("Users Accounts").document(emailTeacher);
documentTeacher.addSnapshotListener(new EventListener<DocumentSnapshot>() {
@SuppressLint("SetTextI18n")
@Override
public void onEvent(@Nullable DocumentSnapshot documentSnapshot, @Nullable FirebaseFirestoreException e) {
assert documentSnapshot != null;
nameTeacher = documentSnapshot.getString("Name");
surnameTeacher = documentSnapshot.getString("Surname");
facultyTeacher = documentSnapshot.getString("Faculty");
fieldTeacher = documentSnapshot.getString("Field");
welcomeText.setText("Hello" + " " + nameTeacher + " " + surnameTeacher);
}
});
firebaseFirestore = FirebaseFirestore.getInstance();
CollectionReference collectionReference = firebaseFirestore.collection("Pending applications");
collectionReference.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@RequiresApi(api = Build.VERSION_CODES.O)
@SuppressLint("SetTextI18n")
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
for (QueryDocumentSnapshot document : Objects.requireNonNull(task.getResult())) {
String nameVal = document.getString("nameTeacher");
String surnameVal = document.getString("surnameTeacher");
String facultyVal = document.getString("facultyTeacher");
String fieldVal = document.getString("fieldTeacher");
String nameVal2 = document.getString("nameTeacher2");
String surnameVal2 = document.getString("surnameTeacher2");
String facultyVal2 = document.getString("facultyTeacher2");
String fieldVal2 = document.getString("fieldTeacher2");
assert nameVal != null;
assert surnameVal != null;
assert facultyVal != null;
assert fieldVal != null;
assert nameVal2 != null;
assert surnameVal2 != null;
assert facultyVal2 != null;
assert fieldVal2 != null;
if (nameVal.equals(nameTeacher) && surnameVal.equals(surnameTeacher)
&& facultyVal.equals(facultyTeacher) && fieldVal.equals(fieldTeacher)) {
i++;
}
if(nameVal2.equals(nameTeacher) && surnameVal2.equals(surnameTeacher)
&& facultyVal2.equals(facultyTeacher) && fieldVal2.equals(fieldTeacher)){
i++;
}
}
if(i>0){
NotificationChannel channel = new NotificationChannel("channel01", "name",
NotificationManager.IMPORTANCE_HIGH); // for heads-up notifications
channel.setDescription("description");
NotificationManager notificationManager = getSystemService(NotificationManager.class);
notificationManager.createNotificationChannel(channel);
Notification notification = new NotificationCompat.Builder(PanelTeacher.this, "channel01")
.setSmallIcon(android.R.drawable.ic_dialog_info)
.setContentTitle("You have a new ticket " + "(" + i + ")" + "from students!")
.setContentText("Check the news in the \"Check New Tickets\" tab")
.setDefaults(Notification.DEFAULT_ALL)
.setPriority(NotificationCompat.PRIORITY_HIGH) // heads-up
.build();
notificationManager.notify(0, notification);
}
}
}
});
final FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
assert user != null;
if (!user.isEmailVerified()) {
resendCodeButton.setVisibility(View.VISIBLE);
verifyMessageText.setVisibility(View.VISIBLE);
resendCodeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
user.sendEmailVerification().addOnSuccessListener(new OnSuccessListener<Void>() {
@RequiresApi(api = Build.VERSION_CODES.O)
@Override
public void onSuccess(Void aVoid) {
NotificationChannel channel = new NotificationChannel("channel01", "name",
NotificationManager.IMPORTANCE_HIGH); // for heads-up notifications
channel.setDescription("description");
NotificationManager notificationManager = getSystemService(NotificationManager.class);
notificationManager.createNotificationChannel(channel);
Notification notification = new NotificationCompat.Builder(PanelTeacher.this, "channel01")
.setSmallIcon(android.R.drawable.ic_dialog_info)
.setContentTitle("Success!")
.setContentText("Verification Email has been sent")
.setDefaults(Notification.DEFAULT_ALL)
.setPriority(NotificationCompat.PRIORITY_HIGH) // heads-up
.build();
notificationManager.notify(0, notification);
}
}).addOnFailureListener(new OnFailureListener() {
@RequiresApi(api = Build.VERSION_CODES.O)
@Override
public void onFailure(@NonNull Exception e) {
NotificationChannel channel = new NotificationChannel("channel01", "name",
NotificationManager.IMPORTANCE_HIGH); // for heads-up notifications
channel.setDescription("description");
NotificationManager notificationManager = getSystemService(NotificationManager.class);
notificationManager.createNotificationChannel(channel);
Notification notification = new NotificationCompat.Builder(PanelTeacher.this, "channel01")
.setSmallIcon(android.R.drawable.ic_dialog_info)
.setContentTitle("Error: ")
.setContentText(e.getMessage())
.setDefaults(Notification.DEFAULT_ALL)
.setPriority(NotificationCompat.PRIORITY_HIGH) // heads-up
.build();
notificationManager.notify(0, notification);
}
});
}
});
}
logoutButton.setOnClickListener(new View.OnClickListener() {
@RequiresApi(api = Build.VERSION_CODES.O)
@Override
public void onClick(View view) {
NotificationChannel channel = new NotificationChannel("channel01", "name",
NotificationManager.IMPORTANCE_HIGH); // for heads-up notifications
channel.setDescription("description");
NotificationManager notificationManager = getSystemService(NotificationManager.class);
notificationManager.createNotificationChannel(channel);
Notification notification = new NotificationCompat.Builder(PanelTeacher.this, "channel01")
.setSmallIcon(android.R.drawable.ic_dialog_info)
.setContentTitle("eContact")
.setContentText("You logged out!")
.setDefaults(Notification.DEFAULT_ALL)
.setPriority(NotificationCompat.PRIORITY_HIGH) // heads-up
.build();
notificationManager.notify(0, notification);
startActivity(new Intent(PanelTeacher.this, MainActivity.class));
}
});
acceptedTicketsButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(PanelTeacher.this, AcceptedTickets.class);
intent.putExtra("nameTeacher", nameTeacher);
intent.putExtra("surnameTeacher", surnameTeacher);
intent.putExtra("facultyTeacher", facultyTeacher);
intent.putExtra("fieldTeacher", fieldTeacher);
intent.putExtra("Email", emailTeacher);
startActivity(intent);
}
});
checkNewTicketButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(PanelTeacher.this, CheckNewTicket.class);
intent.putExtra("nameTeacher", nameTeacher);
intent.putExtra("surnameTeacher", surnameTeacher);
intent.putExtra("facultyTeacher", facultyTeacher);
intent.putExtra("fieldTeacher", fieldTeacher);
intent.putExtra("Email", emailTeacher);
startActivity(intent);
}
});
ongoingButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(PanelTeacher.this, OngoingTicketTeacher.class);
intent.putExtra("nameTeacher", nameTeacher);
intent.putExtra("surnameTeacher", surnameTeacher);
intent.putExtra("facultyTeacher", facultyTeacher);
intent.putExtra("fieldTeacher", fieldTeacher);
intent.putExtra("Email", emailTeacher);
startActivity(intent);
}
});
settings.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(PanelTeacher.this, SettingsPanelTeacher.class);
intent.putExtra("Email", getIntent().getStringExtra("Email"));
startActivity(intent);
}
});
}
}
| [
"kwasniaczek96@gmail.com"
] | kwasniaczek96@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.