blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2 values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 131 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 9.45M | extension stringclasses 32 values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 313 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ba5b37c69f17b19d0b81600142d3fa1b1b7db676 | be667bebff58918fcfd2808efcd9e3a7de52bb94 | /src/main/java/part01/chapter10/Exc1.java | a42b5a5b5dc2fe2c53adc7be8e3d169fb3a08884 | [] | no_license | sixtead/Java-8-The-Complete-Reference-Ninth-Edition | 0aaee8b7c8dab16fcc23b7c1799dfd2a548f08e0 | 2cb7f8d5897ba899a93b8c7866b7c47aa6ec0bfd | refs/heads/master | 2020-04-01T18:41:30.064389 | 2018-12-19T20:41:53 | 2018-12-19T20:41:53 | 153,508,375 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 208 | java | package part01.chapter10;
public class Exc1 {
static void subroutine() {
int d = 0;
int a = 10 / d;
}
public static void main(String[] args) {
Exc1.subroutine();
}
}
| [
"sixtead@gmail.com"
] | sixtead@gmail.com |
6d26541a748bcfa2949023bb4f4461e117df73cb | e48f3be21dffec33047d128c7d4334df15e8d563 | /app/src/main/java/com/example/friskybutcher/foodorder/Soups.java | 87315f1e8d61da11e096124fe56cfbfac2004e89 | [] | no_license | AlexBrady/FoodOrderApp-Android | a0c7e7b2e799544a09140c73ec5dd756797a5f85 | 4c4fba7778c0448bc5004579987419a754918c98 | refs/heads/master | 2021-06-08T15:41:12.432333 | 2016-12-01T10:50:53 | 2016-12-01T10:50:53 | 73,953,232 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,331 | java | package com.example.friskybutcher.foodorder;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
/****************************************************************************************************************************************/
/* THIS, PASTA, SANDWICHES, MAINCOURSE, FISH AND DESERT WILL ALL BE THE SAME JUST WITH DIFFERENT VALUES TO CORRESPOND TO THE CATAGORY */
/****************************************************************************************************************************************/
public class Soups extends ListActivity
{
String[] columns = {"NAME", "DESCRIPTION", "PRICE"};
int[] to = {R.id.name, R.id.description, R.id.price};
public final static String itemName = "com.example.friskybutcher.foodorder.Starters._id";
Cursor mCursor;
DBManager db;
Intent soup;
SimpleCursorAdapter mAdapter;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_starters);
ListView listView = (ListView) findViewById(android.R.id.list);
soup = new Intent(this, Soups.class);
db = new DBManager(this);
try
{
db.open();
mCursor = db.getSoup();
}
catch(Exception e)
{
e.printStackTrace();
}
mAdapter = new SimpleCursorAdapter(this, R.layout.starter_row, mCursor, columns, to, 0);
setListAdapter(mAdapter);
listView.setOnItemClickListener(onListClick);
}
private AdapterView.OnItemClickListener onListClick = new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent,
View view, int position,
long id)
{
Intent i = new Intent(Soups.this, Order.class);
i.putExtra(itemName, String.valueOf(id));
startActivity(i);
}
};
public void sendMessage(View view)
{
Intent intent = new Intent(Soups.this, Order.class);
startActivity(intent);
}
}
| [
"a-brady-9@hotmail.com"
] | a-brady-9@hotmail.com |
0532e1624f9e7463f00395cc009c002bb227976e | 80fd8d410f234bb1a693746abc48f33d35049bb7 | /src/controller/KonfirmasiController.java | 8a87f7e39e071494d6fbbfd8118440e36e16a59f | [] | no_license | robbyawaldii/skripsitian | bea704283267423ada7608f84c5b2a53c08a5eb6 | 30a8407a214639aeb98024362bff6d832fa446c5 | refs/heads/master | 2020-06-05T04:38:08.426083 | 2019-05-29T11:38:41 | 2019-05-29T11:38:41 | 192,315,806 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,016 | 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 controller;
import com.jfoenix.controls.JFXTreeTableView;
import com.jfoenix.controls.RecursiveTreeItem;
import com.jfoenix.controls.datamodels.treetable.RecursiveTreeObject;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeTableColumn;
import model.jadwal;
import static model.jadwal.getJadwal;
import model.paket;
import model.registrasi;
import model.rupiah;
/**
* FXML Controller class
*
* @author Surianto
*/
public class KonfirmasiController implements Initializable {
@FXML
private JFXTreeTableView<jadwal> tabel_Jadwal;
@FXML
private Label nama_pelanggan;
@FXML
private Label Tempat_Lahir;
@FXML
private Label Tanggal_Lahir;
@FXML
private Label Alamat;
@FXML
private Label Jenis_Kelamin;
@FXML
private Label No_Hp;
@FXML
private Label Nama_Paket;
@FXML
private Label jumlah_pertemuan;
@FXML
private Label Harga_Paket;
void setRegistrasi(){
nama_pelanggan.setText(registrasi.reg.getNama_pelanggan());
Tempat_Lahir.setText(registrasi.reg.getTempat_lahir());
Tanggal_Lahir.setText(registrasi.reg.getTanggal_lahir().toString());
Alamat.setText(registrasi.reg.getAlamat());
Jenis_Kelamin.setText(registrasi.reg.getJenis_kelamin());
No_Hp.setText(registrasi.reg.getNo_hp());
Nama_Paket.setText(paket.pkt.getNama_paket());
jumlah_pertemuan.setText(String.valueOf(paket.pkt.getJumlah()));
Harga_Paket.setText(String.valueOf(paket.pkt.getHarga_paket()));
}
/**
* Initializes the controller class.
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
TreeTableColumn<jadwal, String> tglCol = new TreeTableColumn<>("Tanggal Pertemuan");
TreeTableColumn<jadwal, String> wktCol = new TreeTableColumn<>("Waktu Pertemuan");
tglCol.setCellValueFactory(param -> param.getValue().getValue().tanggal_pertemuanProperty());
wktCol.setCellValueFactory(param -> param.getValue().getValue().waktu_pertemuanProperty());
tglCol.prefWidthProperty().bind(tabel_Jadwal.prefWidthProperty().multiply(0.5));
wktCol.prefWidthProperty().bind(tabel_Jadwal.prefWidthProperty().multiply(0.5));
tabel_Jadwal.getColumns().add(tglCol);
tabel_Jadwal.getColumns().add(wktCol);
TreeItem<jadwal> jadwalRoot = new RecursiveTreeItem<>(getJadwal(), RecursiveTreeObject::getChildren);
tabel_Jadwal.setRoot(jadwalRoot);
tabel_Jadwal.setShowRoot(false);
}
}
| [
"Surianto@Surianto-PC"
] | Surianto@Surianto-PC |
26a11c18ec875d75ff7bb0763a618634691a62be | d157add1628b20dec855ec8f9566f2309630d6d1 | /src/main/java/mate/academy/spring/dto/response/MovieSessionResponseDto.java | 671530976d4e140567d05018782738b213f004f7 | [] | no_license | konstde00/cinema-app | b5c327179821d63e37d86ff8ed1c1e0d6a5b2baa | 203a15762d2c28e18c528f9317cddd93d9c0bd58 | refs/heads/main | 2023-09-04T21:58:25.436284 | 2021-10-26T22:04:46 | 2021-10-26T22:04:46 | 420,780,615 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,058 | java | package mate.academy.spring.dto.response;
public class MovieSessionResponseDto {
private Long movieSessionId;
private Long movieId;
private String movieTitle;
private Long cinemaHallId;
private String showTime;
public Long getMovieSessionId() {
return movieSessionId;
}
public void setMovieSessionId(Long movieSessionId) {
this.movieSessionId = movieSessionId;
}
public Long getMovieId() {
return movieId;
}
public void setMovieId(Long movieId) {
this.movieId = movieId;
}
public String getMovieTitle() {
return movieTitle;
}
public void setMovieTitle(String movieTitle) {
this.movieTitle = movieTitle;
}
public Long getCinemaHallId() {
return cinemaHallId;
}
public void setCinemaHallId(Long cinemaHallId) {
this.cinemaHallId = cinemaHallId;
}
public String getShowTime() {
return showTime;
}
public void setShowTime(String showTime) {
this.showTime = showTime;
}
}
| [
"konstde00@gmail.com"
] | konstde00@gmail.com |
07ecc774e3b155f5ce1ff33a8f6a6f7286c2a484 | 22de304febe0338d00d89a71aba66ff038b58767 | /TPs2011/TP2_Generecite/src/BigMain.java | c3c4b280cea0dbd50571adb237273ca44a3d8dd1 | [] | no_license | TarikDjebienBachelor/COO | f1900a821d880364c4d65e42843fd667629671a6 | 248c5620d982d8f5239b7c158791ecc0e4fa2573 | refs/heads/master | 2021-05-07T01:58:47.585988 | 2017-11-12T00:27:03 | 2017-11-12T00:27:03 | 110,391,409 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,112 | java |
import generics.*;
import enums.*;
import scanner.*;
public class BigMain {
public static void main(String[] args) {
System.out.println();
System.out.println(" ----------------Dans ce TP on a 6 MAIN à executer ----------------");
System.out.println(" Entrez 0 pour executer ListChoser ");
System.out.println(" Entrez 1 pour executer ListChoserLegume ");
System.out.println(" Entrez 2 pour executer ListChoserLegumeCloneable ");
System.out.println(" Entrez 3 pour executer Ramasseur ");
System.out.println(" Entrez 4 pour executer ArcEnCiel ");
System.out.println(" Entrez 5 pour executer Jour ");
System.out.println("\n remarque : \n pour ArcEnCiel et Jour entrez le parametre selon la syntaxe suivante : \n java -jar generecite <parametre>\n");
int choix = TestScanner.saisieEntier(6) ; //saisie d'un entier entre 0 et 6
switch(choix)
{
case 0:
System.out.println(" --------------------------LISTCHOSER CHOISI ---------------------------");
ListChoser.main(args);
break;
case 1:
System.out.println(" --------------------------LISTCHOSERLEGUME CHOISI ---------------------------");
ListChoserLegume.main(args);
break;
case 2:
System.out.println(" --------------------------LISTCHOSERLEGUMECLONEABLE CHOISI ---------------------------");
ListChoserLegumeCloneable.main(args);
break;
case 3:
System.out.println(" --------------------------RAMASSEUR CHOISI ---------------------------");
Ramasseur.main(args);
break;
case 4:
System.out.println(" --------------------------ARCENCIEL CHOISI ---------------------------");
ArcEnCiel.main(args);
break;
case 5:
System.out.println(" --------------------------JOUR CHOISI ---------------------------");
Jour.main(args);
break;
default:
System.out.println(" Entrez un chiffre entre 1 et 6 !! ");
break;
}
}
}
| [
"tarik.djebien@gmail.com"
] | tarik.djebien@gmail.com |
277f9c7ea372422fcd7eef64da3607709beac6ad | a72e1f1b93e899807a47afa281cce4ce87dadd6b | /JavaSE/src/day29/optional/Girl.java | d3e476914de09d193aa09f378cac5757243941be | [] | no_license | Nevermor7/StudyDemo | b6222940f2b35be4ec628b54003a373b7b19f7f1 | b3484fef4006522f6b3ac48a27321a329a00f72a | refs/heads/master | 2023-05-03T18:08:41.188432 | 2021-04-22T15:48:37 | 2021-04-22T15:48:37 | 358,764,143 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 486 | java | package day29.optional;
/**
* @author Bruce
* @create 2021/04/20 22:59
*/
public class Girl {
private String name;
@Override
public String toString() {
return "Girl{" +
"name='" + name + '\'' +
'}';
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Girl() {
}
public Girl(String name) {
this.name = name;
}
}
| [
"Bruce-PC-2060s@home.com"
] | Bruce-PC-2060s@home.com |
01048e612415b34b6581f81aaaec8110ea1bec0a | 60320b8734ab3f8e3280f280a6c8b5a19073e26c | /src/day6/task/Person2.java | 46ac85cf9e19c174d554189647422d16c9d8727e | [] | no_license | lenienttjk/qf | a4b92af3f190623dfaeb785eeb1cf3a1876d2678 | 72d146fac54fb194665ad7bc4734439bb7942249 | refs/heads/master | 2022-02-18T02:28:47.698688 | 2019-09-07T05:21:09 | 2019-09-07T05:21:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 386 | java | package day6.task;
/**
* @author tjk
* @date 2019/8/6 21:16
*/
public class Person2 {
private String name;
private int age;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
| [
"1205091659@qq.com"
] | 1205091659@qq.com |
e8868e0bd80a5df230f3da9aac1bc78ca5dcb6be | e05349f843fba96dfa769f0ef0288a01091d47ff | /app/src/main/java/com/modori/kwonkiseokee/AUto/data/data/ProfileImage.java | b14c6670bb5cb171ba6afe26ee603a01898bc69d | [] | no_license | MODORIAPPS/AUto_ANDROID | cd8b2e125972284788ff4935fa8846a5e713df21 | c760c3b0c3ca35e7802b24377598bf76f5ee81c4 | refs/heads/master | 2021-07-11T11:08:39.467721 | 2019-07-11T07:49:47 | 2019-07-11T07:49:47 | 165,323,786 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 690 | java | package com.modori.kwonkiseokee.AUto.data.data;
import com.google.gson.annotations.SerializedName;
public class ProfileImage {
@SerializedName("small")
String small;
@SerializedName("medium")
String medium;
@SerializedName("large")
String large;
public String getSmall() {
return small;
}
public void setSmall(String small) {
this.small = small;
}
public String getMedium() {
return medium;
}
public void setMedium(String medium) {
this.medium = medium;
}
public String getLarge() {
return large;
}
public void setLarge(String large) {
this.large = large;
}
}
| [
"kwonkiseok02@naver.com"
] | kwonkiseok02@naver.com |
2ef9418c6910fda4dcd6aeadfb50a11ef673ed20 | 95cfe2239c8fce0cec91d76e0a82f59a9efc4cb8 | /sourceCode/CommonsMathMutGenerator/java.lang.ArrayIndexOutOfBoundsException/1705_LVR/mut/NeuronSquareMesh2D.java | febc49d352e0e4581d8279d3e5a37678a46d7de8 | [] | no_license | Djack1010/BUG_DB | 28eff24aece45ed379b49893176383d9260501e7 | a4b6e4460a664ce64a474bfd7da635aa7ff62041 | refs/heads/master | 2022-04-09T01:58:29.736794 | 2020-03-13T14:15:11 | 2020-03-13T14:15:11 | 141,260,015 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 22,336 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.math3.ml.neuralnet.twod;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.io.Serializable;
import java.io.ObjectInputStream;
import org.apache.commons.math3.ml.neuralnet.Neuron;
import org.apache.commons.math3.ml.neuralnet.Network;
import org.apache.commons.math3.ml.neuralnet.FeatureInitializer;
import org.apache.commons.math3.ml.neuralnet.SquareNeighbourhood;
import org.apache.commons.math3.exception.NumberIsTooSmallException;
import org.apache.commons.math3.exception.OutOfRangeException;
import org.apache.commons.math3.exception.MathInternalError;
/**
* Neural network with the topology of a two-dimensional surface.
* Each neuron defines one surface element.
* <br/>
* This network is primarily intended to represent a
* <a href="http://en.wikipedia.org/wiki/Kohonen">
* Self Organizing Feature Map</a>.
*
* @see org.apache.commons.math3.ml.neuralnet.sofm
* @since 3.3
*/
public class NeuronSquareMesh2D
implements Iterable<Neuron>,
Serializable {
/** Serial version ID */
private static final long serialVersionUID = 1L;
/** Underlying network. */
private final Network network;
/** Number of rows. */
private final int numberOfRows;
/** Number of columns. */
private final int numberOfColumns;
/** Wrap. */
private final boolean wrapRows;
/** Wrap. */
private final boolean wrapColumns;
/** Neighbourhood type. */
private final SquareNeighbourhood neighbourhood;
/**
* Mapping of the 2D coordinates (in the rectangular mesh) to
* the neuron identifiers (attributed by the {@link #network}
* instance).
*/
private final long[][] identifiers;
/**
* Horizontal (along row) direction.
* @since 3.6
*/
public enum HorizontalDirection {
/** Column at the right of the current column. */
RIGHT,
/** Current column. */
CENTER,
/** Column at the left of the current column. */
LEFT,
}
/**
* Vertical (along column) direction.
* @since 3.6
*/
public enum VerticalDirection {
/** Row above the current row. */
UP,
/** Current row. */
CENTER,
/** Row below the current row. */
DOWN,
}
/**
* Constructor with restricted access, solely used for deserialization.
*
* @param wrapRowDim Whether to wrap the first dimension (i.e the first
* and last neurons will be linked together).
* @param wrapColDim Whether to wrap the second dimension (i.e the first
* and last neurons will be linked together).
* @param neighbourhoodType Neighbourhood type.
* @param featuresList Arrays that will initialize the features sets of
* the network's neurons.
* @throws NumberIsTooSmallException if {@code numRows < 2} or
* {@code numCols < 2}.
*/
NeuronSquareMesh2D(boolean wrapRowDim,
boolean wrapColDim,
SquareNeighbourhood neighbourhoodType,
double[][][] featuresList) {
numberOfRows = featuresList.length;
numberOfColumns = featuresList[0].length;
if (numberOfRows < 2) {
throw new NumberIsTooSmallException(numberOfRows, 2, true);
}
if (numberOfColumns < 2) {
throw new NumberIsTooSmallException(numberOfColumns, 2, true);
}
wrapRows = wrapRowDim;
wrapColumns = wrapColDim;
neighbourhood = neighbourhoodType;
final int fLen = featuresList[0][0].length;
network = new Network(0, fLen);
identifiers = new long[numberOfRows][numberOfColumns];
// Add neurons.
for (int i = 0; i < numberOfRows; i++) {
for (int j = 0; j < numberOfColumns; j++) {
identifiers[i][j] = network.createNeuron(featuresList[i][j]);
}
}
// Add links.
createLinks();
}
/**
* Creates a two-dimensional network composed of square cells:
* Each neuron not located on the border of the mesh has four
* neurons linked to it.
* <br/>
* The links are bi-directional.
* <br/>
* The topology of the network can also be a cylinder (if one
* of the dimensions is wrapped) or a torus (if both dimensions
* are wrapped).
*
* @param numRows Number of neurons in the first dimension.
* @param wrapRowDim Whether to wrap the first dimension (i.e the first
* and last neurons will be linked together).
* @param numCols Number of neurons in the second dimension.
* @param wrapColDim Whether to wrap the second dimension (i.e the first
* and last neurons will be linked together).
* @param neighbourhoodType Neighbourhood type.
* @param featureInit Array of functions that will initialize the
* corresponding element of the features set of each newly created
* neuron. In particular, the size of this array defines the size of
* feature set.
* @throws NumberIsTooSmallException if {@code numRows < 2} or
* {@code numCols < 2}.
*/
public NeuronSquareMesh2D(int numRows,
boolean wrapRowDim,
int numCols,
boolean wrapColDim,
SquareNeighbourhood neighbourhoodType,
FeatureInitializer[] featureInit) {
if (numRows < 2) {
throw new NumberIsTooSmallException(numRows, 2, true);
}
if (numCols < 2) {
throw new NumberIsTooSmallException(numCols, 2, true);
}
numberOfRows = numRows;
wrapRows = wrapRowDim;
numberOfColumns = numCols;
wrapColumns = wrapColDim;
neighbourhood = neighbourhoodType;
identifiers = new long[numberOfRows][numberOfColumns];
final int fLen = featureInit.length;
network = new Network(0, fLen);
// Add neurons.
for (int i = 0; i < numRows; i++) {
for (int j = 0; j < numCols; j++) {
final double[] features = new double[fLen];
for (int fIndex = 0; fIndex < fLen; fIndex++) {
features[fIndex] = featureInit[fIndex].value();
}
identifiers[i][j] = network.createNeuron(features);
}
}
// Add links.
createLinks();
}
/**
* Constructor with restricted access, solely used for making a
* {@link #copy() deep copy}.
*
* @param wrapRowDim Whether to wrap the first dimension (i.e the first
* and last neurons will be linked together).
* @param wrapColDim Whether to wrap the second dimension (i.e the first
* and last neurons will be linked together).
* @param neighbourhoodType Neighbourhood type.
* @param net Underlying network.
* @param idGrid Neuron identifiers.
*/
private NeuronSquareMesh2D(boolean wrapRowDim,
boolean wrapColDim,
SquareNeighbourhood neighbourhoodType,
Network net,
long[][] idGrid) {
numberOfRows = idGrid.length;
numberOfColumns = idGrid[0].length;
wrapRows = wrapRowDim;
wrapColumns = wrapColDim;
neighbourhood = neighbourhoodType;
network = net;
identifiers = idGrid;
}
/**
* Performs a deep copy of this instance.
* Upon return, the copied and original instances will be independent:
* Updating one will not affect the other.
*
* @return a new instance with the same state as this instance.
* @since 3.6
*/
public synchronized NeuronSquareMesh2D copy() {
final long[][] idGrid = new long[numberOfRows][numberOfColumns];
for (int r = 0; r < numberOfRows; r++) {
for (int c = 0; c < numberOfColumns; c++) {
idGrid[r][c] = identifiers[r][c];
}
}
return new NeuronSquareMesh2D(wrapRows,
wrapColumns,
neighbourhood,
network.copy(),
idGrid);
}
/**
* {@inheritDoc}
* @since 3.6
*/
public Iterator<Neuron> iterator() {
return network.iterator();
}
/**
* Retrieves the underlying network.
* A reference is returned (enabling, for example, the network to be
* trained).
* This also implies that calling methods that modify the {@link Network}
* topology may cause this class to become inconsistent.
*
* @return the network.
*/
public Network getNetwork() {
return network;
}
/**
* Gets the number of neurons in each row of this map.
*
* @return the number of rows.
*/
public int getNumberOfRows() {
return numberOfRows;
}
/**
* Gets the number of neurons in each column of this map.
*
* @return the number of column.
*/
public int getNumberOfColumns() {
return numberOfColumns;
}
/**
* Retrieves the neuron at location {@code (i, j)} in the map.
* The neuron at position {@code (0, 0)} is located at the upper-left
* corner of the map.
*
* @param i Row index.
* @param j Column index.
* @return the neuron at {@code (i, j)}.
* @throws OutOfRangeException if {@code i} or {@code j} is
* out of range.
*
* @see #getNeuron(int,int,HorizontalDirection,VerticalDirection)
*/
public Neuron getNeuron(int i,
int j) {
if (i < 0 ||
i >= numberOfRows) {
throw new OutOfRangeException(i, 0, numberOfRows - 1);
}
if (j < 0 ||
j >= numberOfColumns) {
throw new OutOfRangeException(j, 0, numberOfColumns - 1);
}
return network.getNeuron(identifiers[i][j]);
}
/**
* Retrieves the neuron at {@code (location[0], location[1])} in the map.
* The neuron at position {@code (0, 0)} is located at the upper-left
* corner of the map.
*
* @param row Row index.
* @param col Column index.
* @param alongRowDir Direction along the given {@code row} (i.e. an
* offset will be added to the given <em>column</em> index.
* @param alongColDir Direction along the given {@code col} (i.e. an
* offset will be added to the given <em>row</em> index.
* @return the neuron at the requested location, or {@code null} if
* the location is not on the map.
*
* @see #getNeuron(int,int)
*/
public Neuron getNeuron(int row,
int col,
HorizontalDirection alongRowDir,
VerticalDirection alongColDir) {
final int[] location = getLocation(row, col, alongRowDir, alongColDir);
return location == null ? null : getNeuron(location[0], location[1]);
}
/**
* Computes the location of a neighbouring neuron.
* It will return {@code null} if the resulting location is not part
* of the map.
* Position {@code (0, 0)} is at the upper-left corner of the map.
*
* @param row Row index.
* @param col Column index.
* @param alongRowDir Direction along the given {@code row} (i.e. an
* offset will be added to the given <em>column</em> index.
* @param alongColDir Direction along the given {@code col} (i.e. an
* offset will be added to the given <em>row</em> index.
* @return an array of length 2 containing the indices of the requested
* location, or {@code null} if that location is not part of the map.
*
* @see #getNeuron(int,int)
*/
private int[] getLocation(int row,
int col,
HorizontalDirection alongRowDir,
VerticalDirection alongColDir) {
final int colOffset;
switch (alongRowDir) {
case LEFT:
colOffset = -1;
break;
case RIGHT:
colOffset = 1;
break;
case CENTER:
colOffset = 0;
break;
default:
// Should never happen.
throw new MathInternalError();
}
int colIndex = col + colOffset;
if (wrapColumns) {
if (colIndex < 0) {
colIndex += numberOfColumns;
} else {
colIndex %= numberOfColumns;
}
}
final int rowOffset;
switch (alongColDir) {
case UP:
rowOffset = -1;
break;
case DOWN:
rowOffset = 1;
break;
case CENTER:
rowOffset = 0;
break;
default:
// Should never happen.
throw new MathInternalError();
}
int rowIndex = row + rowOffset;
if (wrapRows) {
if (rowIndex < 0) {
rowIndex += numberOfRows;
} else {
rowIndex %= numberOfRows;
}
}
if (rowIndex < 0 ||
rowIndex >= numberOfRows ||
colIndex < 0 ||
colIndex >= numberOfColumns) {
return null;
} else {
return new int[] { rowIndex, colIndex };
}
}
/**
* Creates the neighbour relationships between neurons.
*/
private void createLinks() {
// "linkEnd" will store the identifiers of the "neighbours".
final List<Long> linkEnd = new ArrayList<Long>();
final int iLast = numberOfRows - 1;
final int jLast = numberOfColumns - 1;
for (int i = 0; i < numberOfRows; i++) {
for (int j = 0; j < numberOfColumns; j++) {
linkEnd.clear();
switch (neighbourhood) {
case MOORE:
// Add links to "diagonal" neighbours.
if (i > 0) {
if (j > 0) {
linkEnd.add(identifiers[i - 1][j - 1]);
}
if (j < jLast) {
linkEnd.add(identifiers[i - 1][j + 1]);
}
}
if (i < iLast) {
if (j > 0) {
linkEnd.add(identifiers[i + 1][j - 1]);
}
if (j < jLast) {
linkEnd.add(identifiers[i + 1][j + 1]);
}
}
if (wrapRows) {
if (i == 0) {
if (j > 0) {
linkEnd.add(identifiers[iLast][j - 1]);
}
if (j < jLast) {
linkEnd.add(identifiers[iLast][j + 1]);
}
} else if (i == iLast) {
if (j > -1) {
linkEnd.add(identifiers[0][j - 1]);
}
if (j < jLast) {
linkEnd.add(identifiers[0][j + 1]);
}
}
}
if (wrapColumns) {
if (j == 0) {
if (i > 0) {
linkEnd.add(identifiers[i - 1][jLast]);
}
if (i < iLast) {
linkEnd.add(identifiers[i + 1][jLast]);
}
} else if (j == jLast) {
if (i > 0) {
linkEnd.add(identifiers[i - 1][0]);
}
if (i < iLast) {
linkEnd.add(identifiers[i + 1][0]);
}
}
}
if (wrapRows &&
wrapColumns) {
if (i == 0 &&
j == 0) {
linkEnd.add(identifiers[iLast][jLast]);
} else if (i == 0 &&
j == jLast) {
linkEnd.add(identifiers[iLast][0]);
} else if (i == iLast &&
j == 0) {
linkEnd.add(identifiers[0][jLast]);
} else if (i == iLast &&
j == jLast) {
linkEnd.add(identifiers[0][0]);
}
}
// Case falls through since the "Moore" neighbourhood
// also contains the neurons that belong to the "Von
// Neumann" neighbourhood.
// fallthru (CheckStyle)
case VON_NEUMANN:
// Links to preceding and following "row".
if (i > 0) {
linkEnd.add(identifiers[i - 1][j]);
}
if (i < iLast) {
linkEnd.add(identifiers[i + 1][j]);
}
if (wrapRows) {
if (i == 0) {
linkEnd.add(identifiers[iLast][j]);
} else if (i == iLast) {
linkEnd.add(identifiers[0][j]);
}
}
// Links to preceding and following "column".
if (j > 0) {
linkEnd.add(identifiers[i][j - 1]);
}
if (j < jLast) {
linkEnd.add(identifiers[i][j + 1]);
}
if (wrapColumns) {
if (j == 0) {
linkEnd.add(identifiers[i][jLast]);
} else if (j == jLast) {
linkEnd.add(identifiers[i][0]);
}
}
break;
default:
throw new MathInternalError(); // Cannot happen.
}
final Neuron aNeuron = network.getNeuron(identifiers[i][j]);
for (long b : linkEnd) {
final Neuron bNeuron = network.getNeuron(b);
// Link to all neighbours.
// The reverse links will be added as the loop proceeds.
network.addLink(aNeuron, bNeuron);
}
}
}
}
/**
* Prevents proxy bypass.
*
* @param in Input stream.
*/
private void readObject(ObjectInputStream in) {
throw new IllegalStateException();
}
/**
* Custom serialization.
*
* @return the proxy instance that will be actually serialized.
*/
private Object writeReplace() {
final double[][][] featuresList = new double[numberOfRows][numberOfColumns][];
for (int i = 0; i < numberOfRows; i++) {
for (int j = 0; j < numberOfColumns; j++) {
featuresList[i][j] = getNeuron(i, j).getFeatures();
}
}
return new SerializationProxy(wrapRows,
wrapColumns,
neighbourhood,
featuresList);
}
/**
* Serialization.
*/
private static class SerializationProxy implements Serializable {
/** Serializable. */
private static final long serialVersionUID = 20130226L;
/** Wrap. */
private final boolean wrapRows;
/** Wrap. */
private final boolean wrapColumns;
/** Neighbourhood type. */
private final SquareNeighbourhood neighbourhood;
/** Neurons' features. */
private final double[][][] featuresList;
/**
* @param wrapRows Whether the row dimension is wrapped.
* @param wrapColumns Whether the column dimension is wrapped.
* @param neighbourhood Neighbourhood type.
* @param featuresList List of neurons features.
* {@code neuronList}.
*/
SerializationProxy(boolean wrapRows,
boolean wrapColumns,
SquareNeighbourhood neighbourhood,
double[][][] featuresList) {
this.wrapRows = wrapRows;
this.wrapColumns = wrapColumns;
this.neighbourhood = neighbourhood;
this.featuresList = featuresList;
}
/**
* Custom serialization.
*
* @return the {@link Neuron} for which this instance is the proxy.
*/
private Object readResolve() {
return new NeuronSquareMesh2D(wrapRows,
wrapColumns,
neighbourhood,
featuresList);
}
}
}
| [
"giachi.iada@gmail.com"
] | giachi.iada@gmail.com |
348991fdd3143fb9f434e32399c3bfc56368cd03 | a14240036184bed29b0d410f5bbee6c1effb3be4 | /document/gen/com/example/document/R.java | 915aa6cb20e84ac59a0b211ea1c729971a20eb21 | [] | no_license | hexiaobop/android | d4af00e662c3bda5fece5cc7a79858e2ce8039bf | df1618d867f629af3abb566ccefbdcc73d748260 | refs/heads/master | 2020-04-06T09:56:21.389869 | 2015-07-23T13:32:48 | 2015-07-23T13:32:48 | 39,539,603 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 178,568 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.example.document;
public final class R {
public static final class anim {
public static final int abc_fade_in=0x7f040000;
public static final int abc_fade_out=0x7f040001;
public static final int abc_slide_in_bottom=0x7f040002;
public static final int abc_slide_in_top=0x7f040003;
public static final int abc_slide_out_bottom=0x7f040004;
public static final int abc_slide_out_top=0x7f040005;
}
public static final class attr {
/** Custom divider drawable to use for elements in the action bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarDivider=0x7f01000f;
/** Custom item state list drawable background for action bar items.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarItemBackground=0x7f010010;
/** Size of the Action Bar, including the contextual
bar used to present Action Modes.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int actionBarSize=0x7f01000e;
/** Reference to a theme that should be used to inflate widgets
and layouts destined for the action bar. Most of the time
this will be a reference to the current theme, but when
the action bar has a significantly different contrast
profile than the rest of the activity the difference
can become important. If this is set to @null the current
theme will be used.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarSplitStyle=0x7f01000c;
/** Reference to a style for the Action Bar
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarStyle=0x7f01000b;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarTabBarStyle=0x7f010008;
/** Default style for tabs within an action bar
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarTabStyle=0x7f010007;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarTabTextStyle=0x7f010009;
/** Reference to a theme that should be used to inflate widgets
and layouts destined for the action bar. Most of the time
this will be a reference to the current theme, but when
the action bar has a significantly different contrast
profile than the rest of the activity the difference
can become important. If this is set to @null the current
theme will be used.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionBarWidgetTheme=0x7f01000d;
/** Default action button style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionButtonStyle=0x7f010016;
/** Default ActionBar dropdown style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionDropDownStyle=0x7f010047;
/** An optional layout to be used as an action view.
See {@link android.view.MenuItem#setActionView(android.view.View)}
for more info.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionLayout=0x7f01004e;
/** TextAppearance style that will be applied to text that
appears within action menu items.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionMenuTextAppearance=0x7f010011;
/** Color for text that appears within action menu items.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int actionMenuTextColor=0x7f010012;
/** Background drawable to use for action mode UI
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeBackground=0x7f01003c;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeCloseButtonStyle=0x7f01003b;
/** Drawable to use for the close action mode button
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeCloseDrawable=0x7f01003e;
/** Drawable to use for the Copy action button in Contextual Action Bar
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeCopyDrawable=0x7f010040;
/** Drawable to use for the Cut action button in Contextual Action Bar
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeCutDrawable=0x7f01003f;
/** Drawable to use for the Find action button in WebView selection action modes
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeFindDrawable=0x7f010044;
/** Drawable to use for the Paste action button in Contextual Action Bar
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModePasteDrawable=0x7f010041;
/** PopupWindow style to use for action modes when showing as a window overlay.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModePopupWindowStyle=0x7f010046;
/** Drawable to use for the Select all action button in Contextual Action Bar
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeSelectAllDrawable=0x7f010042;
/** Drawable to use for the Share action button in WebView selection action modes
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeShareDrawable=0x7f010043;
/** Background drawable to use for action mode UI in the lower split bar
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeSplitBackground=0x7f01003d;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeStyle=0x7f01003a;
/** Drawable to use for the Web Search action button in WebView selection action modes
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionModeWebSearchDrawable=0x7f010045;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int actionOverflowButtonStyle=0x7f01000a;
/** The name of an optional ActionProvider class to instantiate an action view
and perform operations such as default action for that menu item.
See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)}
for more info.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int actionProviderClass=0x7f010050;
/** The name of an optional View class to instantiate and use as an
action view. See {@link android.view.MenuItem#setActionView(android.view.View)}
for more info.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int actionViewClass=0x7f01004f;
/** Default ActivityChooserView style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int activityChooserViewStyle=0x7f01006c;
/** Specifies a background drawable for the action bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int background=0x7f01002f;
/** Specifies a background drawable for the bottom component of a split action bar.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int backgroundSplit=0x7f010031;
/** Specifies a background drawable for a second stacked row of the action bar.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int backgroundStacked=0x7f010030;
/** A style that may be applied to Buttons placed within a
LinearLayout with the style buttonBarStyle to form a button bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int buttonBarButtonStyle=0x7f010018;
/** A style that may be applied to horizontal LinearLayouts
to form a button bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int buttonBarStyle=0x7f010017;
/** Specifies a layout for custom navigation. Overrides navigationMode.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int customNavigationLayout=0x7f010032;
/** Whether this spinner should mark child views as enabled/disabled when
the spinner itself is enabled/disabled.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int disableChildrenWhenDisabled=0x7f010054;
/** Options affecting how the action bar is displayed.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr>
<tr><td><code>showHome</code></td><td>0x2</td><td></td></tr>
<tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr>
<tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr>
<tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr>
<tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr>
</table>
*/
public static final int displayOptions=0x7f010028;
/** Specifies the drawable used for item dividers.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int divider=0x7f01002e;
/** A drawable that may be used as a horizontal divider between visual elements.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int dividerHorizontal=0x7f01001b;
/** Size of padding on either end of a divider.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int dividerPadding=0x7f010056;
/** A drawable that may be used as a vertical divider between visual elements.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int dividerVertical=0x7f01001a;
/** ListPopupWindow comaptibility
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int dropDownListViewStyle=0x7f010021;
/** The preferred item height for dropdown lists.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int dropdownListPreferredItemHeight=0x7f010048;
/** The drawable to show in the button for expanding the activities overflow popup.
<strong>Note:</strong> Clients would like to set this drawable
as a clue about the action the chosen activity will perform. For
example, if share activity is to be chosen the drawable should
give a clue that sharing is to be performed.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int expandActivityOverflowButtonDrawable=0x7f01006b;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int height=0x7f010026;
/** Specifies a drawable to use for the 'home as up' indicator.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int homeAsUpIndicator=0x7f010013;
/** Specifies a layout to use for the "home" section of the action bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int homeLayout=0x7f010033;
/** Specifies the drawable used for the application icon.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int icon=0x7f01002c;
/** The default state of the SearchView. If true, it will be iconified when not in
use and expanded when clicked.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int iconifiedByDefault=0x7f01005a;
/** Specifies a style resource to use for an indeterminate progress spinner.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int indeterminateProgressStyle=0x7f010035;
/** The maximal number of items initially shown in the activity list.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int initialActivityCount=0x7f01006a;
/** Specifies whether the theme is light, otherwise it is dark.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int isLightTheme=0x7f010059;
/** Specifies padding that should be applied to the left and right sides of
system-provided items in the bar.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int itemPadding=0x7f010037;
/** Drawable used as a background for selected list items.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int listChoiceBackgroundIndicator=0x7f01004c;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int listPopupWindowStyle=0x7f010022;
/** The preferred list item height.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int listPreferredItemHeight=0x7f01001c;
/** A larger, more robust list item height.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int listPreferredItemHeightLarge=0x7f01001e;
/** A smaller, sleeker list item height.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int listPreferredItemHeightSmall=0x7f01001d;
/** The preferred padding along the left edge of list items.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int listPreferredItemPaddingLeft=0x7f01001f;
/** The preferred padding along the right edge of list items.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int listPreferredItemPaddingRight=0x7f010020;
/** Specifies the drawable used for the application logo.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int logo=0x7f01002d;
/** The type of navigation to use.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr>
<tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr>
<tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr>
</table>
*/
public static final int navigationMode=0x7f010027;
/** Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int paddingEnd=0x7f010039;
/** Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int paddingStart=0x7f010038;
/** Default Panel Menu style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int panelMenuListTheme=0x7f01004b;
/** Default Panel Menu width.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int panelMenuListWidth=0x7f01004a;
/** Default PopupMenu style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int popupMenuStyle=0x7f010049;
/** Reference to a layout to use for displaying a prompt in the dropdown for
spinnerMode="dropdown". This layout must contain a TextView with the id
{@code @android:id/text1} to be populated with the prompt text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int popupPromptView=0x7f010053;
/** Specifies the horizontal padding on either end for an embedded progress bar.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int progressBarPadding=0x7f010036;
/** Specifies a style resource to use for an embedded progress bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int progressBarStyle=0x7f010034;
/** The prompt to display when the spinner's dialog is shown.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int prompt=0x7f010051;
/** An optional query hint string to be displayed in the empty query field.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int queryHint=0x7f01005b;
/** SearchView dropdown background
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchDropdownBackground=0x7f01005c;
/** The list item height for search results. @hide
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int searchResultListItemHeight=0x7f010065;
/** SearchView AutoCompleteTextView style
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewAutoCompleteTextView=0x7f010069;
/** SearchView close button icon
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewCloseIcon=0x7f01005d;
/** SearchView query refinement icon
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewEditQuery=0x7f010061;
/** SearchView query refinement icon background
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewEditQueryBackground=0x7f010062;
/** SearchView Go button icon
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewGoIcon=0x7f01005e;
/** SearchView Search icon
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewSearchIcon=0x7f01005f;
/** SearchView text field background for the left section
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewTextField=0x7f010063;
/** SearchView text field background for the right section
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewTextFieldRight=0x7f010064;
/** SearchView Voice button icon
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int searchViewVoiceIcon=0x7f010060;
/** A style that may be applied to buttons or other selectable items
that should react to pressed and focus states, but that do not
have a clear visual border along the edges.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int selectableItemBackground=0x7f010019;
/** How this item should display in the Action Bar, if present.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead.
Mutually exclusive with "ifRoom" and "always". </td></tr>
<tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined
by the system. Favor this option over "always" where possible.
Mutually exclusive with "never" and "always". </td></tr>
<tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override
the system's limits of how much stuff to put there. This may make
your action bar look bad on some screens. In most cases you should
use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr>
<tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text
label with it even if it has an icon representation. </td></tr>
<tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu
item. When expanded, the action view takes over a
larger segment of its container. </td></tr>
</table>
*/
public static final int showAsAction=0x7f01004d;
/** Setting for which dividers to show.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>beginning</code></td><td>1</td><td></td></tr>
<tr><td><code>middle</code></td><td>2</td><td></td></tr>
<tr><td><code>end</code></td><td>4</td><td></td></tr>
</table>
*/
public static final int showDividers=0x7f010055;
/** Default Spinner style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int spinnerDropDownItemStyle=0x7f010058;
/** Display mode for spinner options.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr>
<tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown
anchored to the spinner widget itself. </td></tr>
</table>
*/
public static final int spinnerMode=0x7f010052;
/** Default Spinner style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int spinnerStyle=0x7f010057;
/** Specifies subtitle text used for navigationMode="normal"
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int subtitle=0x7f010029;
/** Specifies a style to use for subtitle text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int subtitleTextStyle=0x7f01002b;
/** Present the text in ALL CAPS. This may use a small-caps form when available.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a boolean value, either "<code>true</code>" or "<code>false</code>".
*/
public static final int textAllCaps=0x7f01006d;
/** Text color, typeface, size, and style for the text inside of a popup menu.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceLargePopupMenu=0x7f010014;
/** The preferred TextAppearance for the primary text of list items.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceListItem=0x7f010023;
/** The preferred TextAppearance for the primary text of small list items.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceListItemSmall=0x7f010024;
/** Text color, typeface, size, and style for system search result subtitle. Defaults to primary inverse text color.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceSearchResultSubtitle=0x7f010067;
/** Text color, typeface, size, and style for system search result title. Defaults to primary inverse text color.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceSearchResultTitle=0x7f010066;
/** Text color, typeface, size, and style for small text inside of a popup menu.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int textAppearanceSmallPopupMenu=0x7f010015;
/** Text color for urls in search suggestions, used by things like global search
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
*/
public static final int textColorSearchUrl=0x7f010068;
/** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int title=0x7f010025;
/** Specifies a style to use for title text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int titleTextStyle=0x7f01002a;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int windowActionBar=0x7f010000;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int windowActionBarOverlay=0x7f010001;
/** A fixed height for the window along the major axis of the screen,
that is, when in portrait. Can be either an absolute dimension
or a fraction of the screen size in that dimension.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int windowFixedHeightMajor=0x7f010006;
/** A fixed height for the window along the minor axis of the screen,
that is, when in landscape. Can be either an absolute dimension
or a fraction of the screen size in that dimension.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int windowFixedHeightMinor=0x7f010004;
/** A fixed width for the window along the major axis of the screen,
that is, when in landscape. Can be either an absolute dimension
or a fraction of the screen size in that dimension.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int windowFixedWidthMajor=0x7f010003;
/** A fixed width for the window along the minor axis of the screen,
that is, when in portrait. Can be either an absolute dimension
or a fraction of the screen size in that dimension.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int windowFixedWidthMinor=0x7f010005;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int windowSplitActionBar=0x7f010002;
}
public static final class bool {
public static final int abc_action_bar_embed_tabs_pre_jb=0x7f060000;
public static final int abc_action_bar_expanded_action_views_exclusive=0x7f060001;
/** Whether action menu items should be displayed in ALLCAPS or not.
Defaults to true. If this is not appropriate for specific locales
it should be disabled in that locale's resources.
*/
public static final int abc_config_actionMenuItemAllCaps=0x7f060005;
/** Whether action menu items should obey the "withText" showAsAction
flag. This may be set to false for situations where space is
extremely limited.
Whether action menu items should obey the "withText" showAsAction.
This may be set to false for situations where space is
extremely limited.
*/
public static final int abc_config_allowActionMenuItemTextWithIcon=0x7f060004;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f060003;
public static final int abc_split_action_bar_is_narrow=0x7f060002;
}
public static final class color {
public static final int abc_search_url_text_holo=0x7f070003;
public static final int abc_search_url_text_normal=0x7f070000;
public static final int abc_search_url_text_pressed=0x7f070002;
public static final int abc_search_url_text_selected=0x7f070001;
}
public static final class dimen {
/** Default height of an action bar.
Default height of an action bar.
Default height of an action bar.
Default height of an action bar.
Default height of an action bar.
*/
public static final int abc_action_bar_default_height=0x7f080002;
/** Vertical padding around action bar icons.
Vertical padding around action bar icons.
Vertical padding around action bar icons.
Vertical padding around action bar icons.
Vertical padding around action bar icons.
*/
public static final int abc_action_bar_icon_vertical_padding=0x7f080003;
/** Size of the indeterminate Progress Bar
Size of the indeterminate Progress Bar
*/
public static final int abc_action_bar_progress_bar_size=0x7f08000a;
/** Maximum height for a stacked tab bar as part of an action bar
*/
public static final int abc_action_bar_stacked_max_height=0x7f080009;
/** Maximum width for a stacked action bar tab. This prevents
action bar tabs from becoming too wide on a wide screen when only
a few are present.
*/
public static final int abc_action_bar_stacked_tab_max_width=0x7f080001;
/** Bottom margin for action bar subtitles
Bottom margin for action bar subtitles
Bottom margin for action bar subtitles
Bottom margin for action bar subtitles
Bottom margin for action bar subtitles
*/
public static final int abc_action_bar_subtitle_bottom_margin=0x7f080007;
/** Text size for action bar subtitles
Text size for action bar subtitles
Text size for action bar subtitles
Text size for action bar subtitles
Text size for action bar subtitles
*/
public static final int abc_action_bar_subtitle_text_size=0x7f080005;
/** Top margin for action bar subtitles
Top margin for action bar subtitles
Top margin for action bar subtitles
Top margin for action bar subtitles
Top margin for action bar subtitles
*/
public static final int abc_action_bar_subtitle_top_margin=0x7f080006;
/** Text size for action bar titles
Text size for action bar titles
Text size for action bar titles
Text size for action bar titles
Text size for action bar titles
*/
public static final int abc_action_bar_title_text_size=0x7f080004;
/** Minimum width for an action button in the menu area of an action bar
Minimum width for an action button in the menu area of an action bar
Minimum width for an action button in the menu area of an action bar
*/
public static final int abc_action_button_min_width=0x7f080008;
/** The maximum width we would prefer dialogs to be. 0 if there is no
maximum (let them grow as large as the screen). Actual values are
specified for -large and -xlarge configurations.
see comment in values/config.xml
see comment in values/config.xml
*/
public static final int abc_config_prefDialogWidth=0x7f080000;
/** Width of the icon in a dropdown list
*/
public static final int abc_dropdownitem_icon_width=0x7f080010;
/** Text padding for dropdown items
*/
public static final int abc_dropdownitem_text_padding_left=0x7f08000e;
public static final int abc_dropdownitem_text_padding_right=0x7f08000f;
public static final int abc_panel_menu_list_width=0x7f08000b;
/** Preferred width of the search view.
*/
public static final int abc_search_view_preferred_width=0x7f08000d;
/** Minimum width of the search view text entry area.
Minimum width of the search view text entry area.
Minimum width of the search view text entry area.
Minimum width of the search view text entry area.
*/
public static final int abc_search_view_text_min_width=0x7f08000c;
/** Default screen margins, per the Android Design guidelines.
Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
*/
public static final int activity_horizontal_margin=0x7f080015;
public static final int activity_vertical_margin=0x7f080016;
/** The platform's desired fixed height for a dialog along the major axis
(the screen is in portrait). This may be either a fraction or a dimension.
The platform's desired fixed height for a dialog along the major axis
(the screen is in portrait). This may be either a fraction or a dimension.
The platform's desired fixed height for a dialog along the major axis
(the screen is in portrait). This may be either a fraction or a dimension.
*/
public static final int dialog_fixed_height_major=0x7f080013;
/** The platform's desired fixed height for a dialog along the minor axis
(the screen is in landscape). This may be either a fraction or a dimension.
The platform's desired fixed height for a dialog along the minor axis
(the screen is in landscape). This may be either a fraction or a dimension.
The platform's desired fixed height for a dialog along the minor axis
(the screen is in landscape). This may be either a fraction or a dimension.
*/
public static final int dialog_fixed_height_minor=0x7f080014;
/** The platform's desired fixed width for a dialog along the major axis
(the screen is in landscape). This may be either a fraction or a dimension.
The platform's desired fixed width for a dialog along the major axis
(the screen is in landscape). This may be either a fraction or a dimension.
The platform's desired fixed width for a dialog along the major axis
(the screen is in landscape). This may be either a fraction or a dimension.
*/
public static final int dialog_fixed_width_major=0x7f080011;
/** The platform's desired fixed width for a dialog along the minor axis
(the screen is in portrait). This may be either a fraction or a dimension.
The platform's desired fixed width for a dialog along the minor axis
(the screen is in portrait). This may be either a fraction or a dimension.
The platform's desired fixed width for a dialog along the minor axis
(the screen is in portrait). This may be either a fraction or a dimension.
*/
public static final int dialog_fixed_width_minor=0x7f080012;
}
public static final class drawable {
public static final int abc_ab_bottom_solid_dark_holo=0x7f020000;
public static final int abc_ab_bottom_solid_light_holo=0x7f020001;
public static final int abc_ab_bottom_transparent_dark_holo=0x7f020002;
public static final int abc_ab_bottom_transparent_light_holo=0x7f020003;
public static final int abc_ab_share_pack_holo_dark=0x7f020004;
public static final int abc_ab_share_pack_holo_light=0x7f020005;
public static final int abc_ab_solid_dark_holo=0x7f020006;
public static final int abc_ab_solid_light_holo=0x7f020007;
public static final int abc_ab_stacked_solid_dark_holo=0x7f020008;
public static final int abc_ab_stacked_solid_light_holo=0x7f020009;
public static final int abc_ab_stacked_transparent_dark_holo=0x7f02000a;
public static final int abc_ab_stacked_transparent_light_holo=0x7f02000b;
public static final int abc_ab_transparent_dark_holo=0x7f02000c;
public static final int abc_ab_transparent_light_holo=0x7f02000d;
public static final int abc_cab_background_bottom_holo_dark=0x7f02000e;
public static final int abc_cab_background_bottom_holo_light=0x7f02000f;
public static final int abc_cab_background_top_holo_dark=0x7f020010;
public static final int abc_cab_background_top_holo_light=0x7f020011;
public static final int abc_ic_ab_back_holo_dark=0x7f020012;
public static final int abc_ic_ab_back_holo_light=0x7f020013;
public static final int abc_ic_cab_done_holo_dark=0x7f020014;
public static final int abc_ic_cab_done_holo_light=0x7f020015;
public static final int abc_ic_clear=0x7f020016;
public static final int abc_ic_clear_disabled=0x7f020017;
public static final int abc_ic_clear_holo_light=0x7f020018;
public static final int abc_ic_clear_normal=0x7f020019;
public static final int abc_ic_clear_search_api_disabled_holo_light=0x7f02001a;
public static final int abc_ic_clear_search_api_holo_light=0x7f02001b;
public static final int abc_ic_commit_search_api_holo_dark=0x7f02001c;
public static final int abc_ic_commit_search_api_holo_light=0x7f02001d;
public static final int abc_ic_go=0x7f02001e;
public static final int abc_ic_go_search_api_holo_light=0x7f02001f;
public static final int abc_ic_menu_moreoverflow_normal_holo_dark=0x7f020020;
public static final int abc_ic_menu_moreoverflow_normal_holo_light=0x7f020021;
public static final int abc_ic_menu_share_holo_dark=0x7f020022;
public static final int abc_ic_menu_share_holo_light=0x7f020023;
public static final int abc_ic_search=0x7f020024;
public static final int abc_ic_search_api_holo_light=0x7f020025;
public static final int abc_ic_voice_search=0x7f020026;
public static final int abc_ic_voice_search_api_holo_light=0x7f020027;
public static final int abc_item_background_holo_dark=0x7f020028;
public static final int abc_item_background_holo_light=0x7f020029;
public static final int abc_list_divider_holo_dark=0x7f02002a;
public static final int abc_list_divider_holo_light=0x7f02002b;
public static final int abc_list_focused_holo=0x7f02002c;
public static final int abc_list_longpressed_holo=0x7f02002d;
public static final int abc_list_pressed_holo_dark=0x7f02002e;
public static final int abc_list_pressed_holo_light=0x7f02002f;
public static final int abc_list_selector_background_transition_holo_dark=0x7f020030;
public static final int abc_list_selector_background_transition_holo_light=0x7f020031;
public static final int abc_list_selector_disabled_holo_dark=0x7f020032;
public static final int abc_list_selector_disabled_holo_light=0x7f020033;
public static final int abc_list_selector_holo_dark=0x7f020034;
public static final int abc_list_selector_holo_light=0x7f020035;
public static final int abc_menu_dropdown_panel_holo_dark=0x7f020036;
public static final int abc_menu_dropdown_panel_holo_light=0x7f020037;
public static final int abc_menu_hardkey_panel_holo_dark=0x7f020038;
public static final int abc_menu_hardkey_panel_holo_light=0x7f020039;
public static final int abc_search_dropdown_dark=0x7f02003a;
public static final int abc_search_dropdown_light=0x7f02003b;
public static final int abc_spinner_ab_default_holo_dark=0x7f02003c;
public static final int abc_spinner_ab_default_holo_light=0x7f02003d;
public static final int abc_spinner_ab_disabled_holo_dark=0x7f02003e;
public static final int abc_spinner_ab_disabled_holo_light=0x7f02003f;
public static final int abc_spinner_ab_focused_holo_dark=0x7f020040;
public static final int abc_spinner_ab_focused_holo_light=0x7f020041;
public static final int abc_spinner_ab_holo_dark=0x7f020042;
public static final int abc_spinner_ab_holo_light=0x7f020043;
public static final int abc_spinner_ab_pressed_holo_dark=0x7f020044;
public static final int abc_spinner_ab_pressed_holo_light=0x7f020045;
public static final int abc_tab_indicator_ab_holo=0x7f020046;
public static final int abc_tab_selected_focused_holo=0x7f020047;
public static final int abc_tab_selected_holo=0x7f020048;
public static final int abc_tab_selected_pressed_holo=0x7f020049;
public static final int abc_tab_unselected_pressed_holo=0x7f02004a;
public static final int abc_textfield_search_default_holo_dark=0x7f02004b;
public static final int abc_textfield_search_default_holo_light=0x7f02004c;
public static final int abc_textfield_search_right_default_holo_dark=0x7f02004d;
public static final int abc_textfield_search_right_default_holo_light=0x7f02004e;
public static final int abc_textfield_search_right_selected_holo_dark=0x7f02004f;
public static final int abc_textfield_search_right_selected_holo_light=0x7f020050;
public static final int abc_textfield_search_selected_holo_dark=0x7f020051;
public static final int abc_textfield_search_selected_holo_light=0x7f020052;
public static final int abc_textfield_searchview_holo_dark=0x7f020053;
public static final int abc_textfield_searchview_holo_light=0x7f020054;
public static final int abc_textfield_searchview_right_holo_dark=0x7f020055;
public static final int abc_textfield_searchview_right_holo_light=0x7f020056;
public static final int ic_launcher=0x7f020057;
public static final int wenjian=0x7f020058;
public static final int wenjianjia=0x7f020059;
}
public static final class id {
public static final int action_bar=0x7f05001c;
public static final int action_bar_activity_content=0x7f050015;
public static final int action_bar_container=0x7f05001b;
public static final int action_bar_overlay_layout=0x7f05001f;
public static final int action_bar_root=0x7f05001a;
public static final int action_bar_subtitle=0x7f050023;
public static final int action_bar_title=0x7f050022;
public static final int action_context_bar=0x7f05001d;
public static final int action_menu_divider=0x7f050016;
public static final int action_menu_presenter=0x7f050017;
public static final int action_mode_close_button=0x7f050024;
public static final int action_settings=0x7f050042;
public static final int activity_chooser_view_content=0x7f050025;
public static final int always=0x7f05000b;
public static final int beginning=0x7f050011;
public static final int btn_back=0x7f05003d;
public static final int checkbox=0x7f05002d;
public static final int collapseActionView=0x7f05000d;
public static final int default_activity_button=0x7f050028;
public static final int dialog=0x7f05000e;
public static final int disableHome=0x7f050008;
public static final int dropdown=0x7f05000f;
public static final int edit_query=0x7f050030;
public static final int end=0x7f050013;
public static final int expand_activities_button=0x7f050026;
public static final int expanded_menu=0x7f05002c;
public static final int home=0x7f050014;
public static final int homeAsUp=0x7f050005;
public static final int icon=0x7f05002a;
public static final int ifRoom=0x7f05000a;
public static final int image=0x7f050027;
public static final int img_file_icon=0x7f05003f;
public static final int listMode=0x7f050001;
public static final int list_item=0x7f050029;
public static final int middle=0x7f050012;
public static final int never=0x7f050009;
public static final int none=0x7f050010;
public static final int normal=0x7f050000;
public static final int progress_circular=0x7f050018;
public static final int progress_horizontal=0x7f050019;
public static final int radio=0x7f05002f;
public static final int sd_files=0x7f05003e;
public static final int sd_path=0x7f05003c;
public static final int search_badge=0x7f050032;
public static final int search_bar=0x7f050031;
public static final int search_button=0x7f050033;
public static final int search_close_btn=0x7f050038;
public static final int search_edit_frame=0x7f050034;
public static final int search_go_btn=0x7f05003a;
public static final int search_mag_icon=0x7f050035;
public static final int search_plate=0x7f050036;
public static final int search_src_text=0x7f050037;
public static final int search_voice_btn=0x7f05003b;
public static final int shortcut=0x7f05002e;
public static final int showCustom=0x7f050007;
public static final int showHome=0x7f050004;
public static final int showTitle=0x7f050006;
public static final int split_action_bar=0x7f05001e;
public static final int submit_area=0x7f050039;
public static final int tabMode=0x7f050002;
public static final int title=0x7f05002b;
public static final int top_action_bar=0x7f050020;
public static final int tv_file_info=0x7f050040;
public static final int tv_file_size=0x7f050041;
public static final int up=0x7f050021;
public static final int useLogo=0x7f050003;
public static final int withText=0x7f05000c;
}
public static final class integer {
/** The maximum number of action buttons that should be permitted within
an action bar/action mode. This will be used to determine how many
showAsAction="ifRoom" items can fit. "always" items can override this.
The maximum number of action buttons that should be permitted within
an action bar/action mode. This will be used to determine how many
showAsAction="ifRoom" items can fit. "always" items can override this.
The maximum number of action buttons that should be permitted within
an action bar/action mode. This will be used to determine how many
showAsAction="ifRoom" items can fit. "always" items can override this.
The maximum number of action buttons that should be permitted within
an action bar/action mode. This will be used to determine how many
showAsAction="ifRoom" items can fit. "always" items can override this.
The maximum number of action buttons that should be permitted within
an action bar/action mode. This will be used to determine how many
showAsAction="ifRoom" items can fit. "always" items can override this.
The maximum number of action buttons that should be permitted within
an action bar/action mode. This will be used to determine how many
showAsAction="ifRoom" items can fit. "always" items can override this.
The maximum number of action buttons that should be permitted within
an action bar/action mode. This will be used to determine how many
showAsAction="ifRoom" items can fit. "always" items can override this.
*/
public static final int abc_max_action_buttons=0x7f090000;
}
public static final class layout {
public static final int abc_action_bar_decor=0x7f030000;
public static final int abc_action_bar_decor_include=0x7f030001;
public static final int abc_action_bar_decor_overlay=0x7f030002;
public static final int abc_action_bar_home=0x7f030003;
public static final int abc_action_bar_tab=0x7f030004;
public static final int abc_action_bar_tabbar=0x7f030005;
public static final int abc_action_bar_title_item=0x7f030006;
public static final int abc_action_bar_view_list_nav_layout=0x7f030007;
public static final int abc_action_menu_item_layout=0x7f030008;
public static final int abc_action_menu_layout=0x7f030009;
public static final int abc_action_mode_bar=0x7f03000a;
public static final int abc_action_mode_close_item=0x7f03000b;
public static final int abc_activity_chooser_view=0x7f03000c;
public static final int abc_activity_chooser_view_include=0x7f03000d;
public static final int abc_activity_chooser_view_list_item=0x7f03000e;
public static final int abc_expanded_menu_layout=0x7f03000f;
public static final int abc_list_menu_item_checkbox=0x7f030010;
public static final int abc_list_menu_item_icon=0x7f030011;
public static final int abc_list_menu_item_layout=0x7f030012;
public static final int abc_list_menu_item_radio=0x7f030013;
public static final int abc_popup_menu_item_layout=0x7f030014;
public static final int abc_search_dropdown_item_icons_2line=0x7f030015;
public static final int abc_search_view=0x7f030016;
public static final int abc_simple_decor=0x7f030017;
public static final int activity_main=0x7f030018;
public static final int ilist_item=0x7f030019;
public static final int support_simple_spinner_dropdown_item=0x7f03001a;
}
public static final class menu {
public static final int main=0x7f0c0000;
}
public static final class string {
/** Content description for the action bar "home" affordance. [CHAR LIMIT=NONE]
*/
public static final int abc_action_bar_home_description=0x7f0a0001;
/** Content description for the action bar "up" affordance. [CHAR LIMIT=NONE]
*/
public static final int abc_action_bar_up_description=0x7f0a0002;
/** Content description for the action menu overflow button. [CHAR LIMIT=NONE]
*/
public static final int abc_action_menu_overflow_description=0x7f0a0003;
/** Label for the "Done" button on the far left of action mode toolbars.
*/
public static final int abc_action_mode_done=0x7f0a0000;
/** Title for a button to expand the list of activities in ActivityChooserView [CHAR LIMIT=25]
*/
public static final int abc_activity_chooser_view_see_all=0x7f0a000a;
/** ActivityChooserView - accessibility support
Description of the shwoing of a popup window with activities to choose from. [CHAR LIMIT=NONE]
*/
public static final int abc_activitychooserview_choose_application=0x7f0a0009;
/** SearchView accessibility description for clear button [CHAR LIMIT=NONE]
*/
public static final int abc_searchview_description_clear=0x7f0a0006;
/** SearchView accessibility description for search text field [CHAR LIMIT=NONE]
*/
public static final int abc_searchview_description_query=0x7f0a0005;
/** SearchView accessibility description for search button [CHAR LIMIT=NONE]
*/
public static final int abc_searchview_description_search=0x7f0a0004;
/** SearchView accessibility description for submit button [CHAR LIMIT=NONE]
*/
public static final int abc_searchview_description_submit=0x7f0a0007;
/** SearchView accessibility description for voice button [CHAR LIMIT=NONE]
*/
public static final int abc_searchview_description_voice=0x7f0a0008;
/** Description of the choose target button in a ShareActionProvider (share UI). [CHAR LIMIT=NONE]
*/
public static final int abc_shareactionprovider_share_with=0x7f0a000c;
/** Description of a share target (both in the list of such or the default share button) in a ShareActionProvider (share UI). [CHAR LIMIT=NONE]
*/
public static final int abc_shareactionprovider_share_with_application=0x7f0a000b;
public static final int action_settings=0x7f0a000f;
public static final int app_name=0x7f0a000d;
public static final int hello_world=0x7f0a000e;
public static final int path=0x7f0a0010;
public static final int return1=0x7f0a0011;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f0b008b;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f0b008c;
/** Mimic text appearance in select_dialog_item.xml
*/
public static final int TextAppearance_AppCompat_Base_CompactMenu_Dialog=0x7f0b0063;
public static final int TextAppearance_AppCompat_Base_SearchResult=0x7f0b006d;
public static final int TextAppearance_AppCompat_Base_SearchResult_Subtitle=0x7f0b006f;
/** Search View result styles
*/
public static final int TextAppearance_AppCompat_Base_SearchResult_Title=0x7f0b006e;
public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Large=0x7f0b0069;
public static final int TextAppearance_AppCompat_Base_Widget_PopupMenu_Small=0x7f0b006a;
public static final int TextAppearance_AppCompat_Light_Base_SearchResult=0x7f0b0070;
public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle=0x7f0b0072;
/**
TextAppearance.Holo.Light.SearchResult.* are private so we extend from the default
versions instead (which are exactly the same).
*/
public static final int TextAppearance_AppCompat_Light_Base_SearchResult_Title=0x7f0b0071;
public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large=0x7f0b006b;
public static final int TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small=0x7f0b006c;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle=0x7f0b0035;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title=0x7f0b0034;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f0b0030;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f0b0031;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle=0x7f0b0033;
public static final int TextAppearance_AppCompat_SearchResult_Title=0x7f0b0032;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f0b001a;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f0b0006;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f0b0008;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f0b0005;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f0b0007;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f0b001e;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse=0x7f0b0020;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f0b001d;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse=0x7f0b001f;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Menu=0x7f0b0054;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle=0x7f0b0056;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse=0x7f0b0058;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title=0x7f0b0055;
public static final int TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse=0x7f0b0057;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle=0x7f0b0051;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse=0x7f0b0053;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title=0x7f0b0050;
public static final int TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse=0x7f0b0052;
public static final int TextAppearance_AppCompat_Widget_Base_DropDownItem=0x7f0b0061;
public static final int TextAppearance_AppCompat_Widget_DropDownItem=0x7f0b0021;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f0b002e;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f0b002f;
public static final int TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item=0x7f0b0062;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f0b0028;
/** Themes in the "Theme.AppCompat" family will contain an action bar by default.
If Holo themes are available on the current platform version they will be used.
A limited Holo-styled action bar will be provided on platform versions older
than 3.0. (API 11)
These theme declarations contain any version-independent specification. Items
that need to vary based on platform version should be defined in the corresponding
"Theme.Base" theme.
Platform-independent theme providing an action bar in a dark-themed activity.
*/
public static final int Theme_AppCompat=0x7f0b0077;
/** Menu/item attributes
*/
public static final int Theme_AppCompat_Base_CompactMenu=0x7f0b0083;
public static final int Theme_AppCompat_Base_CompactMenu_Dialog=0x7f0b0084;
/** Menu/item attributes
*/
public static final int Theme_AppCompat_CompactMenu=0x7f0b007c;
public static final int Theme_AppCompat_CompactMenu_Dialog=0x7f0b007d;
public static final int Theme_AppCompat_DialogWhenLarge=0x7f0b007a;
/** Platform-independent theme providing an action bar in a light-themed activity.
*/
public static final int Theme_AppCompat_Light=0x7f0b0078;
/** Platform-independent theme providing an action bar in a dark-themed activity.
*/
public static final int Theme_AppCompat_Light_DarkActionBar=0x7f0b0079;
public static final int Theme_AppCompat_Light_DialogWhenLarge=0x7f0b007b;
/** Base platform-dependent theme
*/
public static final int Theme_Base=0x7f0b007e;
/** Base platform-dependent theme providing an action bar in a dark-themed activity.
Base platform-dependent theme providing an action bar in a dark-themed activity.
*/
public static final int Theme_Base_AppCompat=0x7f0b0080;
public static final int Theme_Base_AppCompat_Dialog_FixedSize=0x7f0b0087;
public static final int Theme_Base_AppCompat_Dialog_Light_FixedSize=0x7f0b0088;
public static final int Theme_Base_AppCompat_DialogWhenLarge=0x7f0b0085;
/**
As we have defined the theme in values-large (for compat) and values-large takes precedence
over values-v14, we need to reset back to the Holo parent in values-large-v14. As the themes
in values-v14 & values-large-v14 are exactly the same, these "double base" themes can be
inherited from in both values-v14 and values-large-v14.
*/
public static final int Theme_Base_AppCompat_DialogWhenLarge_Base=0x7f0b0089;
/** Base platform-dependent theme providing an action bar in a light-themed activity.
Base platform-dependent theme providing an action bar in a light-themed activity.
*/
public static final int Theme_Base_AppCompat_Light=0x7f0b0081;
/** Base platform-dependent theme providing a dark action bar in a light-themed activity.
Base platform-dependent theme providing a dark action bar in a light-themed activity.
*/
public static final int Theme_Base_AppCompat_Light_DarkActionBar=0x7f0b0082;
public static final int Theme_Base_AppCompat_Light_DialogWhenLarge=0x7f0b0086;
public static final int Theme_Base_AppCompat_Light_DialogWhenLarge_Base=0x7f0b008a;
/** Base platform-dependent theme providing a light-themed activity.
*/
public static final int Theme_Base_Light=0x7f0b007f;
/** Styles in here can be extended for customisation in your application. Each utilises
one of the Base styles. If Holo themes are available on the current platform version
they will be used instead of the compat styles.
*/
public static final int Widget_AppCompat_ActionBar=0x7f0b0000;
public static final int Widget_AppCompat_ActionBar_Solid=0x7f0b0002;
public static final int Widget_AppCompat_ActionBar_TabBar=0x7f0b0011;
public static final int Widget_AppCompat_ActionBar_TabText=0x7f0b0017;
public static final int Widget_AppCompat_ActionBar_TabView=0x7f0b0014;
public static final int Widget_AppCompat_ActionButton=0x7f0b000b;
public static final int Widget_AppCompat_ActionButton_CloseMode=0x7f0b000d;
public static final int Widget_AppCompat_ActionButton_Overflow=0x7f0b000f;
public static final int Widget_AppCompat_ActionMode=0x7f0b001b;
public static final int Widget_AppCompat_ActivityChooserView=0x7f0b0038;
public static final int Widget_AppCompat_AutoCompleteTextView=0x7f0b0036;
public static final int Widget_AppCompat_Base_ActionBar=0x7f0b003a;
public static final int Widget_AppCompat_Base_ActionBar_Solid=0x7f0b003c;
public static final int Widget_AppCompat_Base_ActionBar_TabBar=0x7f0b0045;
public static final int Widget_AppCompat_Base_ActionBar_TabText=0x7f0b004b;
public static final int Widget_AppCompat_Base_ActionBar_TabView=0x7f0b0048;
/** Action Button Styles
*/
public static final int Widget_AppCompat_Base_ActionButton=0x7f0b003f;
public static final int Widget_AppCompat_Base_ActionButton_CloseMode=0x7f0b0041;
public static final int Widget_AppCompat_Base_ActionButton_Overflow=0x7f0b0043;
public static final int Widget_AppCompat_Base_ActionMode=0x7f0b004e;
public static final int Widget_AppCompat_Base_ActivityChooserView=0x7f0b0075;
/** AutoCompleteTextView styles (for SearchView)
*/
public static final int Widget_AppCompat_Base_AutoCompleteTextView=0x7f0b0073;
public static final int Widget_AppCompat_Base_DropDownItem_Spinner=0x7f0b005d;
/** Popup Menu
*/
public static final int Widget_AppCompat_Base_ListPopupWindow=0x7f0b0065;
/** Spinner Widgets
*/
public static final int Widget_AppCompat_Base_ListView_DropDown=0x7f0b005f;
public static final int Widget_AppCompat_Base_ListView_Menu=0x7f0b0064;
public static final int Widget_AppCompat_Base_PopupMenu=0x7f0b0067;
public static final int Widget_AppCompat_Base_ProgressBar=0x7f0b005a;
/** Progress Bar
*/
public static final int Widget_AppCompat_Base_ProgressBar_Horizontal=0x7f0b0059;
/** Action Bar Spinner Widgets
*/
public static final int Widget_AppCompat_Base_Spinner=0x7f0b005b;
public static final int Widget_AppCompat_DropDownItem_Spinner=0x7f0b0024;
public static final int Widget_AppCompat_Light_ActionBar=0x7f0b0001;
public static final int Widget_AppCompat_Light_ActionBar_Solid=0x7f0b0003;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse=0x7f0b0004;
public static final int Widget_AppCompat_Light_ActionBar_TabBar=0x7f0b0012;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse=0x7f0b0013;
public static final int Widget_AppCompat_Light_ActionBar_TabText=0x7f0b0018;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse=0x7f0b0019;
public static final int Widget_AppCompat_Light_ActionBar_TabView=0x7f0b0015;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse=0x7f0b0016;
public static final int Widget_AppCompat_Light_ActionButton=0x7f0b000c;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode=0x7f0b000e;
public static final int Widget_AppCompat_Light_ActionButton_Overflow=0x7f0b0010;
public static final int Widget_AppCompat_Light_ActionMode_Inverse=0x7f0b001c;
public static final int Widget_AppCompat_Light_ActivityChooserView=0x7f0b0039;
public static final int Widget_AppCompat_Light_AutoCompleteTextView=0x7f0b0037;
public static final int Widget_AppCompat_Light_Base_ActionBar=0x7f0b003b;
public static final int Widget_AppCompat_Light_Base_ActionBar_Solid=0x7f0b003d;
public static final int Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse=0x7f0b003e;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar=0x7f0b0046;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse=0x7f0b0047;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabText=0x7f0b004c;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse=0x7f0b004d;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabView=0x7f0b0049;
public static final int Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse=0x7f0b004a;
public static final int Widget_AppCompat_Light_Base_ActionButton=0x7f0b0040;
public static final int Widget_AppCompat_Light_Base_ActionButton_CloseMode=0x7f0b0042;
public static final int Widget_AppCompat_Light_Base_ActionButton_Overflow=0x7f0b0044;
public static final int Widget_AppCompat_Light_Base_ActionMode_Inverse=0x7f0b004f;
public static final int Widget_AppCompat_Light_Base_ActivityChooserView=0x7f0b0076;
public static final int Widget_AppCompat_Light_Base_AutoCompleteTextView=0x7f0b0074;
public static final int Widget_AppCompat_Light_Base_DropDownItem_Spinner=0x7f0b005e;
public static final int Widget_AppCompat_Light_Base_ListPopupWindow=0x7f0b0066;
public static final int Widget_AppCompat_Light_Base_ListView_DropDown=0x7f0b0060;
public static final int Widget_AppCompat_Light_Base_PopupMenu=0x7f0b0068;
public static final int Widget_AppCompat_Light_Base_Spinner=0x7f0b005c;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner=0x7f0b0025;
public static final int Widget_AppCompat_Light_ListPopupWindow=0x7f0b002a;
public static final int Widget_AppCompat_Light_ListView_DropDown=0x7f0b0027;
public static final int Widget_AppCompat_Light_PopupMenu=0x7f0b002c;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar=0x7f0b0023;
public static final int Widget_AppCompat_ListPopupWindow=0x7f0b0029;
public static final int Widget_AppCompat_ListView_DropDown=0x7f0b0026;
public static final int Widget_AppCompat_ListView_Menu=0x7f0b002d;
public static final int Widget_AppCompat_PopupMenu=0x7f0b002b;
public static final int Widget_AppCompat_ProgressBar=0x7f0b000a;
public static final int Widget_AppCompat_ProgressBar_Horizontal=0x7f0b0009;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar=0x7f0b0022;
}
public static final class styleable {
/** ============================================
Attributes used to style the Action Bar.
These should be set on your theme; the default actionBarStyle will
propagate them to the correct elements as needed.
Please Note: when overriding attributes for an ActionBar style
you must specify each attribute twice: once with the "android:"
namespace prefix and once without.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionBar_background com.example.document:background}</code></td><td> Specifies a background drawable for the action bar.</td></tr>
<tr><td><code>{@link #ActionBar_backgroundSplit com.example.document:backgroundSplit}</code></td><td> Specifies a background drawable for the bottom component of a split action bar.</td></tr>
<tr><td><code>{@link #ActionBar_backgroundStacked com.example.document:backgroundStacked}</code></td><td> Specifies a background drawable for a second stacked row of the action bar.</td></tr>
<tr><td><code>{@link #ActionBar_customNavigationLayout com.example.document:customNavigationLayout}</code></td><td> Specifies a layout for custom navigation.</td></tr>
<tr><td><code>{@link #ActionBar_displayOptions com.example.document:displayOptions}</code></td><td> Options affecting how the action bar is displayed.</td></tr>
<tr><td><code>{@link #ActionBar_divider com.example.document:divider}</code></td><td> Specifies the drawable used for item dividers.</td></tr>
<tr><td><code>{@link #ActionBar_height com.example.document:height}</code></td><td> Specifies a fixed height.</td></tr>
<tr><td><code>{@link #ActionBar_homeLayout com.example.document:homeLayout}</code></td><td> Specifies a layout to use for the "home" section of the action bar.</td></tr>
<tr><td><code>{@link #ActionBar_icon com.example.document:icon}</code></td><td> Specifies the drawable used for the application icon.</td></tr>
<tr><td><code>{@link #ActionBar_indeterminateProgressStyle com.example.document:indeterminateProgressStyle}</code></td><td> Specifies a style resource to use for an indeterminate progress spinner.</td></tr>
<tr><td><code>{@link #ActionBar_itemPadding com.example.document:itemPadding}</code></td><td> Specifies padding that should be applied to the left and right sides of
system-provided items in the bar.</td></tr>
<tr><td><code>{@link #ActionBar_logo com.example.document:logo}</code></td><td> Specifies the drawable used for the application logo.</td></tr>
<tr><td><code>{@link #ActionBar_navigationMode com.example.document:navigationMode}</code></td><td> The type of navigation to use.</td></tr>
<tr><td><code>{@link #ActionBar_progressBarPadding com.example.document:progressBarPadding}</code></td><td> Specifies the horizontal padding on either end for an embedded progress bar.</td></tr>
<tr><td><code>{@link #ActionBar_progressBarStyle com.example.document:progressBarStyle}</code></td><td> Specifies a style resource to use for an embedded progress bar.</td></tr>
<tr><td><code>{@link #ActionBar_subtitle com.example.document:subtitle}</code></td><td> Specifies subtitle text used for navigationMode="normal" </td></tr>
<tr><td><code>{@link #ActionBar_subtitleTextStyle com.example.document:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr>
<tr><td><code>{@link #ActionBar_title com.example.document:title}</code></td><td> Specifies title text used for navigationMode="normal" </td></tr>
<tr><td><code>{@link #ActionBar_titleTextStyle com.example.document:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr>
</table>
@see #ActionBar_background
@see #ActionBar_backgroundSplit
@see #ActionBar_backgroundStacked
@see #ActionBar_customNavigationLayout
@see #ActionBar_displayOptions
@see #ActionBar_divider
@see #ActionBar_height
@see #ActionBar_homeLayout
@see #ActionBar_icon
@see #ActionBar_indeterminateProgressStyle
@see #ActionBar_itemPadding
@see #ActionBar_logo
@see #ActionBar_navigationMode
@see #ActionBar_progressBarPadding
@see #ActionBar_progressBarStyle
@see #ActionBar_subtitle
@see #ActionBar_subtitleTextStyle
@see #ActionBar_title
@see #ActionBar_titleTextStyle
*/
public static final int[] ActionBar = {
0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028,
0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c,
0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030,
0x7f010031, 0x7f010032, 0x7f010033, 0x7f010034,
0x7f010035, 0x7f010036, 0x7f010037
};
/**
<p>
@attr description
Specifies a background drawable for the action bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:background
*/
public static final int ActionBar_background = 10;
/**
<p>
@attr description
Specifies a background drawable for the bottom component of a split action bar.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This is a private symbol.
@attr name com.example.document:backgroundSplit
*/
public static final int ActionBar_backgroundSplit = 12;
/**
<p>
@attr description
Specifies a background drawable for a second stacked row of the action bar.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This is a private symbol.
@attr name com.example.document:backgroundStacked
*/
public static final int ActionBar_backgroundStacked = 11;
/**
<p>
@attr description
Specifies a layout for custom navigation. Overrides navigationMode.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:customNavigationLayout
*/
public static final int ActionBar_customNavigationLayout = 13;
/**
<p>
@attr description
Options affecting how the action bar is displayed.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr>
<tr><td><code>showHome</code></td><td>0x2</td><td></td></tr>
<tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr>
<tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr>
<tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr>
<tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr>
</table>
<p>This is a private symbol.
@attr name com.example.document:displayOptions
*/
public static final int ActionBar_displayOptions = 3;
/**
<p>
@attr description
Specifies the drawable used for item dividers.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:divider
*/
public static final int ActionBar_divider = 9;
/**
<p>
@attr description
Specifies a fixed height.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:height
*/
public static final int ActionBar_height = 1;
/**
<p>
@attr description
Specifies a layout to use for the "home" section of the action bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:homeLayout
*/
public static final int ActionBar_homeLayout = 14;
/**
<p>
@attr description
Specifies the drawable used for the application icon.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:icon
*/
public static final int ActionBar_icon = 7;
/**
<p>
@attr description
Specifies a style resource to use for an indeterminate progress spinner.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:indeterminateProgressStyle
*/
public static final int ActionBar_indeterminateProgressStyle = 16;
/**
<p>
@attr description
Specifies padding that should be applied to the left and right sides of
system-provided items in the bar.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:itemPadding
*/
public static final int ActionBar_itemPadding = 18;
/**
<p>
@attr description
Specifies the drawable used for the application logo.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:logo
*/
public static final int ActionBar_logo = 8;
/**
<p>
@attr description
The type of navigation to use.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>normal</code></td><td>0</td><td> Normal static title text </td></tr>
<tr><td><code>listMode</code></td><td>1</td><td> The action bar will use a selection list for navigation. </td></tr>
<tr><td><code>tabMode</code></td><td>2</td><td> The action bar will use a series of horizontal tabs for navigation. </td></tr>
</table>
<p>This is a private symbol.
@attr name com.example.document:navigationMode
*/
public static final int ActionBar_navigationMode = 2;
/**
<p>
@attr description
Specifies the horizontal padding on either end for an embedded progress bar.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:progressBarPadding
*/
public static final int ActionBar_progressBarPadding = 17;
/**
<p>
@attr description
Specifies a style resource to use for an embedded progress bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:progressBarStyle
*/
public static final int ActionBar_progressBarStyle = 15;
/**
<p>
@attr description
Specifies subtitle text used for navigationMode="normal"
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:subtitle
*/
public static final int ActionBar_subtitle = 4;
/**
<p>
@attr description
Specifies a style to use for subtitle text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:subtitleTextStyle
*/
public static final int ActionBar_subtitleTextStyle = 6;
/**
<p>
@attr description
Specifies title text used for navigationMode="normal"
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:title
*/
public static final int ActionBar_title = 0;
/**
<p>
@attr description
Specifies a style to use for title text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:titleTextStyle
*/
public static final int ActionBar_titleTextStyle = 5;
/** Valid LayoutParams for views placed in the action bar as custom views.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionBarLayout_android_layout_gravity android:layout_gravity}</code></td><td></td></tr>
</table>
@see #ActionBarLayout_android_layout_gravity
*/
public static final int[] ActionBarLayout = {
0x010100b3
};
/**
<p>This symbol is the offset where the {@link android.R.attr#layout_gravity}
attribute's value can be found in the {@link #ActionBarLayout} array.
@attr name android:layout_gravity
*/
public static final int ActionBarLayout_android_layout_gravity = 0;
/** These attributes are meant to be specified and customized by the app.
The system will read and apply them as needed. These attributes control
properties of the activity window, such as whether an action bar should
be present and whether it should overlay content.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionBarWindow_windowActionBar com.example.document:windowActionBar}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay com.example.document:windowActionBarOverlay}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBarWindow_windowFixedHeightMajor com.example.document:windowFixedHeightMajor}</code></td><td> A fixed height for the window along the major axis of the screen,
that is, when in portrait.</td></tr>
<tr><td><code>{@link #ActionBarWindow_windowFixedHeightMinor com.example.document:windowFixedHeightMinor}</code></td><td> A fixed height for the window along the minor axis of the screen,
that is, when in landscape.</td></tr>
<tr><td><code>{@link #ActionBarWindow_windowFixedWidthMajor com.example.document:windowFixedWidthMajor}</code></td><td> A fixed width for the window along the major axis of the screen,
that is, when in landscape.</td></tr>
<tr><td><code>{@link #ActionBarWindow_windowFixedWidthMinor com.example.document:windowFixedWidthMinor}</code></td><td> A fixed width for the window along the minor axis of the screen,
that is, when in portrait.</td></tr>
<tr><td><code>{@link #ActionBarWindow_windowSplitActionBar com.example.document:windowSplitActionBar}</code></td><td></td></tr>
</table>
@see #ActionBarWindow_windowActionBar
@see #ActionBarWindow_windowActionBarOverlay
@see #ActionBarWindow_windowFixedHeightMajor
@see #ActionBarWindow_windowFixedHeightMinor
@see #ActionBarWindow_windowFixedWidthMajor
@see #ActionBarWindow_windowFixedWidthMinor
@see #ActionBarWindow_windowSplitActionBar
*/
public static final int[] ActionBarWindow = {
0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003,
0x7f010004, 0x7f010005, 0x7f010006
};
/**
<p>This symbol is the offset where the {@link com.example.document.R.attr#windowActionBar}
attribute's value can be found in the {@link #ActionBarWindow} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.example.document:windowActionBar
*/
public static final int ActionBarWindow_windowActionBar = 0;
/**
<p>This symbol is the offset where the {@link com.example.document.R.attr#windowActionBarOverlay}
attribute's value can be found in the {@link #ActionBarWindow} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.example.document:windowActionBarOverlay
*/
public static final int ActionBarWindow_windowActionBarOverlay = 1;
/**
<p>
@attr description
A fixed height for the window along the major axis of the screen,
that is, when in portrait. Can be either an absolute dimension
or a fraction of the screen size in that dimension.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:windowFixedHeightMajor
*/
public static final int ActionBarWindow_windowFixedHeightMajor = 6;
/**
<p>
@attr description
A fixed height for the window along the minor axis of the screen,
that is, when in landscape. Can be either an absolute dimension
or a fraction of the screen size in that dimension.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:windowFixedHeightMinor
*/
public static final int ActionBarWindow_windowFixedHeightMinor = 4;
/**
<p>
@attr description
A fixed width for the window along the major axis of the screen,
that is, when in landscape. Can be either an absolute dimension
or a fraction of the screen size in that dimension.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:windowFixedWidthMajor
*/
public static final int ActionBarWindow_windowFixedWidthMajor = 3;
/**
<p>
@attr description
A fixed width for the window along the minor axis of the screen,
that is, when in portrait. Can be either an absolute dimension
or a fraction of the screen size in that dimension.
<p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>".
The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to
some parent container.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:windowFixedWidthMinor
*/
public static final int ActionBarWindow_windowFixedWidthMinor = 5;
/**
<p>This symbol is the offset where the {@link com.example.document.R.attr#windowSplitActionBar}
attribute's value can be found in the {@link #ActionBarWindow} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name com.example.document:windowSplitActionBar
*/
public static final int ActionBarWindow_windowSplitActionBar = 2;
/** Attributes that can be used with a ActionMenuItemView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionMenuItemView_android_minWidth android:minWidth}</code></td><td></td></tr>
</table>
@see #ActionMenuItemView_android_minWidth
*/
public static final int[] ActionMenuItemView = {
0x0101013f
};
/**
<p>This symbol is the offset where the {@link android.R.attr#minWidth}
attribute's value can be found in the {@link #ActionMenuItemView} array.
@attr name android:minWidth
*/
public static final int ActionMenuItemView_android_minWidth = 0;
/** Size of padding on either end of a divider.
*/
public static final int[] ActionMenuView = {
};
/** Attributes that can be used with a ActionMode.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActionMode_background com.example.document:background}</code></td><td> Specifies a background for the action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_backgroundSplit com.example.document:backgroundSplit}</code></td><td> Specifies a background for the split action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_height com.example.document:height}</code></td><td> Specifies a fixed height for the action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_subtitleTextStyle com.example.document:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr>
<tr><td><code>{@link #ActionMode_titleTextStyle com.example.document:titleTextStyle}</code></td><td> Specifies a style to use for title text.</td></tr>
</table>
@see #ActionMode_background
@see #ActionMode_backgroundSplit
@see #ActionMode_height
@see #ActionMode_subtitleTextStyle
@see #ActionMode_titleTextStyle
*/
public static final int[] ActionMode = {
0x7f010026, 0x7f01002a, 0x7f01002b, 0x7f01002f,
0x7f010031
};
/**
<p>
@attr description
Specifies a background for the action mode bar.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:background
*/
public static final int ActionMode_background = 3;
/**
<p>
@attr description
Specifies a background for the split action mode bar.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This is a private symbol.
@attr name com.example.document:backgroundSplit
*/
public static final int ActionMode_backgroundSplit = 4;
/**
<p>
@attr description
Specifies a fixed height for the action mode bar.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:height
*/
public static final int ActionMode_height = 0;
/**
<p>
@attr description
Specifies a style to use for subtitle text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:subtitleTextStyle
*/
public static final int ActionMode_subtitleTextStyle = 2;
/**
<p>
@attr description
Specifies a style to use for title text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:titleTextStyle
*/
public static final int ActionMode_titleTextStyle = 1;
/** Attrbitutes for a ActivityChooserView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #ActivityChooserView_expandActivityOverflowButtonDrawable com.example.document:expandActivityOverflowButtonDrawable}</code></td><td> The drawable to show in the button for expanding the activities overflow popup.</td></tr>
<tr><td><code>{@link #ActivityChooserView_initialActivityCount com.example.document:initialActivityCount}</code></td><td> The maximal number of items initially shown in the activity list.</td></tr>
</table>
@see #ActivityChooserView_expandActivityOverflowButtonDrawable
@see #ActivityChooserView_initialActivityCount
*/
public static final int[] ActivityChooserView = {
0x7f01006a, 0x7f01006b
};
/**
<p>
@attr description
The drawable to show in the button for expanding the activities overflow popup.
<strong>Note:</strong> Clients would like to set this drawable
as a clue about the action the chosen activity will perform. For
example, if share activity is to be chosen the drawable should
give a clue that sharing is to be performed.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:expandActivityOverflowButtonDrawable
*/
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
/**
<p>
@attr description
The maximal number of items initially shown in the activity list.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:initialActivityCount
*/
public static final int ActivityChooserView_initialActivityCount = 0;
/** Attributes that can be used with a CompatTextView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #CompatTextView_textAllCaps com.example.document:textAllCaps}</code></td><td> Present the text in ALL CAPS.</td></tr>
</table>
@see #CompatTextView_textAllCaps
*/
public static final int[] CompatTextView = {
0x7f01006d
};
/**
<p>
@attr description
Present the text in ALL CAPS. This may use a small-caps form when available.
<p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This is a private symbol.
@attr name com.example.document:textAllCaps
*/
public static final int CompatTextView_textAllCaps = 0;
/** Attributes that can be used with a LinearLayoutICS.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #LinearLayoutICS_divider com.example.document:divider}</code></td><td> Drawable to use as a vertical divider between buttons.</td></tr>
<tr><td><code>{@link #LinearLayoutICS_dividerPadding com.example.document:dividerPadding}</code></td><td> Size of padding on either end of a divider.</td></tr>
<tr><td><code>{@link #LinearLayoutICS_showDividers com.example.document:showDividers}</code></td><td> Setting for which dividers to show.</td></tr>
</table>
@see #LinearLayoutICS_divider
@see #LinearLayoutICS_dividerPadding
@see #LinearLayoutICS_showDividers
*/
public static final int[] LinearLayoutICS = {
0x7f01002e, 0x7f010055, 0x7f010056
};
/**
<p>
@attr description
Drawable to use as a vertical divider between buttons.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:divider
*/
public static final int LinearLayoutICS_divider = 0;
/**
<p>
@attr description
Size of padding on either end of a divider.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:dividerPadding
*/
public static final int LinearLayoutICS_dividerPadding = 2;
/**
<p>
@attr description
Setting for which dividers to show.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>0</td><td></td></tr>
<tr><td><code>beginning</code></td><td>1</td><td></td></tr>
<tr><td><code>middle</code></td><td>2</td><td></td></tr>
<tr><td><code>end</code></td><td>4</td><td></td></tr>
</table>
<p>This is a private symbol.
@attr name com.example.document:showDividers
*/
public static final int LinearLayoutICS_showDividers = 1;
/** Base attributes that are available to all groups.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MenuGroup_android_checkableBehavior android:checkableBehavior}</code></td><td> Whether the items are capable of displaying a check mark.</td></tr>
<tr><td><code>{@link #MenuGroup_android_enabled android:enabled}</code></td><td> Whether the items are enabled.</td></tr>
<tr><td><code>{@link #MenuGroup_android_id android:id}</code></td><td> The ID of the group.</td></tr>
<tr><td><code>{@link #MenuGroup_android_menuCategory android:menuCategory}</code></td><td> The category applied to all items within this group.</td></tr>
<tr><td><code>{@link #MenuGroup_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to all items within this group.</td></tr>
<tr><td><code>{@link #MenuGroup_android_visible android:visible}</code></td><td> Whether the items are shown/visible.</td></tr>
</table>
@see #MenuGroup_android_checkableBehavior
@see #MenuGroup_android_enabled
@see #MenuGroup_android_id
@see #MenuGroup_android_menuCategory
@see #MenuGroup_android_orderInCategory
@see #MenuGroup_android_visible
*/
public static final int[] MenuGroup = {
0x0101000e, 0x010100d0, 0x01010194, 0x010101de,
0x010101df, 0x010101e0
};
/**
<p>
@attr description
Whether the items are capable of displaying a check mark.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#checkableBehavior}.
@attr name android:checkableBehavior
*/
public static final int MenuGroup_android_checkableBehavior = 5;
/**
<p>
@attr description
Whether the items are enabled.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#enabled}.
@attr name android:enabled
*/
public static final int MenuGroup_android_enabled = 0;
/**
<p>
@attr description
The ID of the group.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#id}.
@attr name android:id
*/
public static final int MenuGroup_android_id = 1;
/**
<p>
@attr description
The category applied to all items within this group.
(This will be or'ed with the orderInCategory attribute.)
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#menuCategory}.
@attr name android:menuCategory
*/
public static final int MenuGroup_android_menuCategory = 3;
/**
<p>
@attr description
The order within the category applied to all items within this group.
(This will be or'ed with the category attribute.)
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#orderInCategory}.
@attr name android:orderInCategory
*/
public static final int MenuGroup_android_orderInCategory = 4;
/**
<p>
@attr description
Whether the items are shown/visible.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#visible}.
@attr name android:visible
*/
public static final int MenuGroup_android_visible = 2;
/** Base attributes that are available to all Item objects.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MenuItem_actionLayout com.example.document:actionLayout}</code></td><td> An optional layout to be used as an action view.</td></tr>
<tr><td><code>{@link #MenuItem_actionProviderClass com.example.document:actionProviderClass}</code></td><td> The name of an optional ActionProvider class to instantiate an action view
and perform operations such as default action for that menu item.</td></tr>
<tr><td><code>{@link #MenuItem_actionViewClass com.example.document:actionViewClass}</code></td><td> The name of an optional View class to instantiate and use as an
action view.</td></tr>
<tr><td><code>{@link #MenuItem_android_alphabeticShortcut android:alphabeticShortcut}</code></td><td> The alphabetic shortcut key.</td></tr>
<tr><td><code>{@link #MenuItem_android_checkable android:checkable}</code></td><td> Whether the item is capable of displaying a check mark.</td></tr>
<tr><td><code>{@link #MenuItem_android_checked android:checked}</code></td><td> Whether the item is checked.</td></tr>
<tr><td><code>{@link #MenuItem_android_enabled android:enabled}</code></td><td> Whether the item is enabled.</td></tr>
<tr><td><code>{@link #MenuItem_android_icon android:icon}</code></td><td> The icon associated with this item.</td></tr>
<tr><td><code>{@link #MenuItem_android_id android:id}</code></td><td> The ID of the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_menuCategory android:menuCategory}</code></td><td> The category applied to the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_numericShortcut android:numericShortcut}</code></td><td> The numeric shortcut key.</td></tr>
<tr><td><code>{@link #MenuItem_android_onClick android:onClick}</code></td><td> Name of a method on the Context used to inflate the menu that will be
called when the item is clicked.</td></tr>
<tr><td><code>{@link #MenuItem_android_orderInCategory android:orderInCategory}</code></td><td> The order within the category applied to the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_title android:title}</code></td><td> The title associated with the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_titleCondensed android:titleCondensed}</code></td><td> The condensed title associated with the item.</td></tr>
<tr><td><code>{@link #MenuItem_android_visible android:visible}</code></td><td> Whether the item is shown/visible.</td></tr>
<tr><td><code>{@link #MenuItem_showAsAction com.example.document:showAsAction}</code></td><td> How this item should display in the Action Bar, if present.</td></tr>
</table>
@see #MenuItem_actionLayout
@see #MenuItem_actionProviderClass
@see #MenuItem_actionViewClass
@see #MenuItem_android_alphabeticShortcut
@see #MenuItem_android_checkable
@see #MenuItem_android_checked
@see #MenuItem_android_enabled
@see #MenuItem_android_icon
@see #MenuItem_android_id
@see #MenuItem_android_menuCategory
@see #MenuItem_android_numericShortcut
@see #MenuItem_android_onClick
@see #MenuItem_android_orderInCategory
@see #MenuItem_android_title
@see #MenuItem_android_titleCondensed
@see #MenuItem_android_visible
@see #MenuItem_showAsAction
*/
public static final int[] MenuItem = {
0x01010002, 0x0101000e, 0x010100d0, 0x01010106,
0x01010194, 0x010101de, 0x010101df, 0x010101e1,
0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5,
0x0101026f, 0x7f01004d, 0x7f01004e, 0x7f01004f,
0x7f010050
};
/**
<p>
@attr description
An optional layout to be used as an action view.
See {@link android.view.MenuItem#setActionView(android.view.View)}
for more info.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:actionLayout
*/
public static final int MenuItem_actionLayout = 14;
/**
<p>
@attr description
The name of an optional ActionProvider class to instantiate an action view
and perform operations such as default action for that menu item.
See {@link android.view.MenuItem#setActionProvider(android.view.ActionProvider)}
for more info.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:actionProviderClass
*/
public static final int MenuItem_actionProviderClass = 16;
/**
<p>
@attr description
The name of an optional View class to instantiate and use as an
action view. See {@link android.view.MenuItem#setActionView(android.view.View)}
for more info.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:actionViewClass
*/
public static final int MenuItem_actionViewClass = 15;
/**
<p>
@attr description
The alphabetic shortcut key. This is the shortcut when using a keyboard
with alphabetic keys.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#alphabeticShortcut}.
@attr name android:alphabeticShortcut
*/
public static final int MenuItem_android_alphabeticShortcut = 9;
/**
<p>
@attr description
Whether the item is capable of displaying a check mark.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#checkable}.
@attr name android:checkable
*/
public static final int MenuItem_android_checkable = 11;
/**
<p>
@attr description
Whether the item is checked. Note that you must first have enabled checking with
the checkable attribute or else the check mark will not appear.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#checked}.
@attr name android:checked
*/
public static final int MenuItem_android_checked = 3;
/**
<p>
@attr description
Whether the item is enabled.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#enabled}.
@attr name android:enabled
*/
public static final int MenuItem_android_enabled = 1;
/**
<p>
@attr description
The icon associated with this item. This icon will not always be shown, so
the title should be sufficient in describing this item.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#icon}.
@attr name android:icon
*/
public static final int MenuItem_android_icon = 0;
/**
<p>
@attr description
The ID of the item.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#id}.
@attr name android:id
*/
public static final int MenuItem_android_id = 2;
/**
<p>
@attr description
The category applied to the item.
(This will be or'ed with the orderInCategory attribute.)
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#menuCategory}.
@attr name android:menuCategory
*/
public static final int MenuItem_android_menuCategory = 5;
/**
<p>
@attr description
The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key)
keyboard.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#numericShortcut}.
@attr name android:numericShortcut
*/
public static final int MenuItem_android_numericShortcut = 10;
/**
<p>
@attr description
Name of a method on the Context used to inflate the menu that will be
called when the item is clicked.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#onClick}.
@attr name android:onClick
*/
public static final int MenuItem_android_onClick = 12;
/**
<p>
@attr description
The order within the category applied to the item.
(This will be or'ed with the category attribute.)
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#orderInCategory}.
@attr name android:orderInCategory
*/
public static final int MenuItem_android_orderInCategory = 6;
/**
<p>
@attr description
The title associated with the item.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#title}.
@attr name android:title
*/
public static final int MenuItem_android_title = 7;
/**
<p>
@attr description
The condensed title associated with the item. This is used in situations where the
normal title may be too long to be displayed.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#titleCondensed}.
@attr name android:titleCondensed
*/
public static final int MenuItem_android_titleCondensed = 8;
/**
<p>
@attr description
Whether the item is shown/visible.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#visible}.
@attr name android:visible
*/
public static final int MenuItem_android_visible = 4;
/**
<p>
@attr description
How this item should display in the Action Bar, if present.
<p>Must be one or more (separated by '|') of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>never</code></td><td>0</td><td> Never show this item in an action bar, show it in the overflow menu instead.
Mutually exclusive with "ifRoom" and "always". </td></tr>
<tr><td><code>ifRoom</code></td><td>1</td><td> Show this item in an action bar if there is room for it as determined
by the system. Favor this option over "always" where possible.
Mutually exclusive with "never" and "always". </td></tr>
<tr><td><code>always</code></td><td>2</td><td> Always show this item in an actionbar, even if it would override
the system's limits of how much stuff to put there. This may make
your action bar look bad on some screens. In most cases you should
use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". </td></tr>
<tr><td><code>withText</code></td><td>4</td><td> When this item is shown as an action in the action bar, show a text
label with it even if it has an icon representation. </td></tr>
<tr><td><code>collapseActionView</code></td><td>8</td><td> This item's action view collapses to a normal menu
item. When expanded, the action view takes over a
larger segment of its container. </td></tr>
</table>
<p>This is a private symbol.
@attr name com.example.document:showAsAction
*/
public static final int MenuItem_showAsAction = 13;
/** Attributes that can be used with a MenuView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #MenuView_android_headerBackground android:headerBackground}</code></td><td> Default background for the menu header.</td></tr>
<tr><td><code>{@link #MenuView_android_horizontalDivider android:horizontalDivider}</code></td><td> Default horizontal divider between rows of menu items.</td></tr>
<tr><td><code>{@link #MenuView_android_itemBackground android:itemBackground}</code></td><td> Default background for each menu item.</td></tr>
<tr><td><code>{@link #MenuView_android_itemIconDisabledAlpha android:itemIconDisabledAlpha}</code></td><td> Default disabled icon alpha for each menu item that shows an icon.</td></tr>
<tr><td><code>{@link #MenuView_android_itemTextAppearance android:itemTextAppearance}</code></td><td> Default appearance of menu item text.</td></tr>
<tr><td><code>{@link #MenuView_android_preserveIconSpacing android:preserveIconSpacing}</code></td><td> Whether space should be reserved in layout when an icon is missing.</td></tr>
<tr><td><code>{@link #MenuView_android_verticalDivider android:verticalDivider}</code></td><td> Default vertical divider between menu items.</td></tr>
<tr><td><code>{@link #MenuView_android_windowAnimationStyle android:windowAnimationStyle}</code></td><td> Default animations for the menu.</td></tr>
</table>
@see #MenuView_android_headerBackground
@see #MenuView_android_horizontalDivider
@see #MenuView_android_itemBackground
@see #MenuView_android_itemIconDisabledAlpha
@see #MenuView_android_itemTextAppearance
@see #MenuView_android_preserveIconSpacing
@see #MenuView_android_verticalDivider
@see #MenuView_android_windowAnimationStyle
*/
public static final int[] MenuView = {
0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e,
0x0101012f, 0x01010130, 0x01010131, 0x01010438
};
/**
<p>
@attr description
Default background for the menu header.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#headerBackground}.
@attr name android:headerBackground
*/
public static final int MenuView_android_headerBackground = 4;
/**
<p>
@attr description
Default horizontal divider between rows of menu items.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#horizontalDivider}.
@attr name android:horizontalDivider
*/
public static final int MenuView_android_horizontalDivider = 2;
/**
<p>
@attr description
Default background for each menu item.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#itemBackground}.
@attr name android:itemBackground
*/
public static final int MenuView_android_itemBackground = 5;
/**
<p>
@attr description
Default disabled icon alpha for each menu item that shows an icon.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#itemIconDisabledAlpha}.
@attr name android:itemIconDisabledAlpha
*/
public static final int MenuView_android_itemIconDisabledAlpha = 6;
/**
<p>
@attr description
Default appearance of menu item text.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#itemTextAppearance}.
@attr name android:itemTextAppearance
*/
public static final int MenuView_android_itemTextAppearance = 1;
/**
<p>
@attr description
Whether space should be reserved in layout when an icon is missing.
<p>This is a private symbol.
@attr name android:preserveIconSpacing
*/
public static final int MenuView_android_preserveIconSpacing = 7;
/**
<p>
@attr description
Default vertical divider between menu items.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#verticalDivider}.
@attr name android:verticalDivider
*/
public static final int MenuView_android_verticalDivider = 3;
/**
<p>
@attr description
Default animations for the menu.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#windowAnimationStyle}.
@attr name android:windowAnimationStyle
*/
public static final int MenuView_android_windowAnimationStyle = 0;
/** Attributes that can be used with a SearchView.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #SearchView_android_imeOptions android:imeOptions}</code></td><td> The IME options to set on the query text field.</td></tr>
<tr><td><code>{@link #SearchView_android_inputType android:inputType}</code></td><td> The input type to set on the query text field.</td></tr>
<tr><td><code>{@link #SearchView_android_maxWidth android:maxWidth}</code></td><td> An optional maximum width of the SearchView.</td></tr>
<tr><td><code>{@link #SearchView_iconifiedByDefault com.example.document:iconifiedByDefault}</code></td><td> The default state of the SearchView.</td></tr>
<tr><td><code>{@link #SearchView_queryHint com.example.document:queryHint}</code></td><td> An optional query hint string to be displayed in the empty query field.</td></tr>
</table>
@see #SearchView_android_imeOptions
@see #SearchView_android_inputType
@see #SearchView_android_maxWidth
@see #SearchView_iconifiedByDefault
@see #SearchView_queryHint
*/
public static final int[] SearchView = {
0x0101011f, 0x01010220, 0x01010264, 0x7f01005a,
0x7f01005b
};
/**
<p>
@attr description
The IME options to set on the query text field.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#imeOptions}.
@attr name android:imeOptions
*/
public static final int SearchView_android_imeOptions = 2;
/**
<p>
@attr description
The input type to set on the query text field.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#inputType}.
@attr name android:inputType
*/
public static final int SearchView_android_inputType = 1;
/**
<p>
@attr description
An optional maximum width of the SearchView.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#maxWidth}.
@attr name android:maxWidth
*/
public static final int SearchView_android_maxWidth = 0;
/**
<p>
@attr description
The default state of the SearchView. If true, it will be iconified when not in
use and expanded when clicked.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:iconifiedByDefault
*/
public static final int SearchView_iconifiedByDefault = 3;
/**
<p>
@attr description
An optional query hint string to be displayed in the empty query field.
<p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:queryHint
*/
public static final int SearchView_queryHint = 4;
/** Attributes that can be used with a Spinner.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #Spinner_android_dropDownHorizontalOffset android:dropDownHorizontalOffset}</code></td><td> Horizontal offset from the spinner widget for positioning the dropdown
in spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_android_dropDownSelector android:dropDownSelector}</code></td><td> List selector to use for spinnerMode="dropdown" display.</td></tr>
<tr><td><code>{@link #Spinner_android_dropDownVerticalOffset android:dropDownVerticalOffset}</code></td><td> Vertical offset from the spinner widget for positioning the dropdown in
spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_android_dropDownWidth android:dropDownWidth}</code></td><td> Width of the dropdown in spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_android_gravity android:gravity}</code></td><td> Gravity setting for positioning the currently selected item.</td></tr>
<tr><td><code>{@link #Spinner_android_popupBackground android:popupBackground}</code></td><td> Background drawable to use for the dropdown in spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_disableChildrenWhenDisabled com.example.document:disableChildrenWhenDisabled}</code></td><td> Whether this spinner should mark child views as enabled/disabled when
the spinner itself is enabled/disabled.</td></tr>
<tr><td><code>{@link #Spinner_popupPromptView com.example.document:popupPromptView}</code></td><td> Reference to a layout to use for displaying a prompt in the dropdown for
spinnerMode="dropdown".</td></tr>
<tr><td><code>{@link #Spinner_prompt com.example.document:prompt}</code></td><td> The prompt to display when the spinner's dialog is shown.</td></tr>
<tr><td><code>{@link #Spinner_spinnerMode com.example.document:spinnerMode}</code></td><td> Display mode for spinner options.</td></tr>
</table>
@see #Spinner_android_dropDownHorizontalOffset
@see #Spinner_android_dropDownSelector
@see #Spinner_android_dropDownVerticalOffset
@see #Spinner_android_dropDownWidth
@see #Spinner_android_gravity
@see #Spinner_android_popupBackground
@see #Spinner_disableChildrenWhenDisabled
@see #Spinner_popupPromptView
@see #Spinner_prompt
@see #Spinner_spinnerMode
*/
public static final int[] Spinner = {
0x010100af, 0x01010175, 0x01010176, 0x01010262,
0x010102ac, 0x010102ad, 0x7f010051, 0x7f010052,
0x7f010053, 0x7f010054
};
/**
<p>
@attr description
Horizontal offset from the spinner widget for positioning the dropdown
in spinnerMode="dropdown".
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#dropDownHorizontalOffset}.
@attr name android:dropDownHorizontalOffset
*/
public static final int Spinner_android_dropDownHorizontalOffset = 4;
/**
<p>
@attr description
List selector to use for spinnerMode="dropdown" display.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#dropDownSelector}.
@attr name android:dropDownSelector
*/
public static final int Spinner_android_dropDownSelector = 1;
/**
<p>
@attr description
Vertical offset from the spinner widget for positioning the dropdown in
spinnerMode="dropdown".
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#dropDownVerticalOffset}.
@attr name android:dropDownVerticalOffset
*/
public static final int Spinner_android_dropDownVerticalOffset = 5;
/**
<p>
@attr description
Width of the dropdown in spinnerMode="dropdown".
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#dropDownWidth}.
@attr name android:dropDownWidth
*/
public static final int Spinner_android_dropDownWidth = 3;
/**
<p>
@attr description
Gravity setting for positioning the currently selected item.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#gravity}.
@attr name android:gravity
*/
public static final int Spinner_android_gravity = 0;
/**
<p>
@attr description
Background drawable to use for the dropdown in spinnerMode="dropdown".
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#popupBackground}.
@attr name android:popupBackground
*/
public static final int Spinner_android_popupBackground = 2;
/**
<p>
@attr description
Whether this spinner should mark child views as enabled/disabled when
the spinner itself is enabled/disabled.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:disableChildrenWhenDisabled
*/
public static final int Spinner_disableChildrenWhenDisabled = 9;
/**
<p>
@attr description
Reference to a layout to use for displaying a prompt in the dropdown for
spinnerMode="dropdown". This layout must contain a TextView with the id
{@code @android:id/text1} to be populated with the prompt text.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:popupPromptView
*/
public static final int Spinner_popupPromptView = 8;
/**
<p>
@attr description
The prompt to display when the spinner's dialog is shown.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:prompt
*/
public static final int Spinner_prompt = 6;
/**
<p>
@attr description
Display mode for spinner options.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>dialog</code></td><td>0</td><td> Spinner options will be presented to the user as a dialog window. </td></tr>
<tr><td><code>dropdown</code></td><td>1</td><td> Spinner options will be presented to the user as an inline dropdown
anchored to the spinner widget itself. </td></tr>
</table>
<p>This is a private symbol.
@attr name com.example.document:spinnerMode
*/
public static final int Spinner_spinnerMode = 7;
/** These are the standard attributes that make up a complete theme.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #Theme_actionDropDownStyle com.example.document:actionDropDownStyle}</code></td><td> Default ActionBar dropdown style.</td></tr>
<tr><td><code>{@link #Theme_dropdownListPreferredItemHeight com.example.document:dropdownListPreferredItemHeight}</code></td><td> The preferred item height for dropdown lists.</td></tr>
<tr><td><code>{@link #Theme_listChoiceBackgroundIndicator com.example.document:listChoiceBackgroundIndicator}</code></td><td> Drawable used as a background for selected list items.</td></tr>
<tr><td><code>{@link #Theme_panelMenuListTheme com.example.document:panelMenuListTheme}</code></td><td> Default Panel Menu style.</td></tr>
<tr><td><code>{@link #Theme_panelMenuListWidth com.example.document:panelMenuListWidth}</code></td><td> Default Panel Menu width.</td></tr>
<tr><td><code>{@link #Theme_popupMenuStyle com.example.document:popupMenuStyle}</code></td><td> Default PopupMenu style.</td></tr>
</table>
@see #Theme_actionDropDownStyle
@see #Theme_dropdownListPreferredItemHeight
@see #Theme_listChoiceBackgroundIndicator
@see #Theme_panelMenuListTheme
@see #Theme_panelMenuListWidth
@see #Theme_popupMenuStyle
*/
public static final int[] Theme = {
0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a,
0x7f01004b, 0x7f01004c
};
/**
<p>
@attr description
Default ActionBar dropdown style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:actionDropDownStyle
*/
public static final int Theme_actionDropDownStyle = 0;
/**
<p>
@attr description
The preferred item height for dropdown lists.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:dropdownListPreferredItemHeight
*/
public static final int Theme_dropdownListPreferredItemHeight = 1;
/**
<p>
@attr description
Drawable used as a background for selected list items.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:listChoiceBackgroundIndicator
*/
public static final int Theme_listChoiceBackgroundIndicator = 5;
/**
<p>
@attr description
Default Panel Menu style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:panelMenuListTheme
*/
public static final int Theme_panelMenuListTheme = 4;
/**
<p>
@attr description
Default Panel Menu width.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:panelMenuListWidth
*/
public static final int Theme_panelMenuListWidth = 3;
/**
<p>
@attr description
Default PopupMenu style.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>This is a private symbol.
@attr name com.example.document:popupMenuStyle
*/
public static final int Theme_popupMenuStyle = 2;
/** Attributes that can be used with a View.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #View_android_focusable android:focusable}</code></td><td> Boolean that controls whether a view can take focus.</td></tr>
<tr><td><code>{@link #View_paddingEnd com.example.document:paddingEnd}</code></td><td> Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.</td></tr>
<tr><td><code>{@link #View_paddingStart com.example.document:paddingStart}</code></td><td> Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.</td></tr>
</table>
@see #View_android_focusable
@see #View_paddingEnd
@see #View_paddingStart
*/
public static final int[] View = {
0x010100da, 0x7f010038, 0x7f010039
};
/**
<p>
@attr description
Boolean that controls whether a view can take focus. By default the user can not
move focus to a view; by setting this attribute to true the view is
allowed to take focus. This value does not impact the behavior of
directly calling {@link android.view.View#requestFocus}, which will
always request focus regardless of this view. It only impacts where
focus navigation will try to move focus.
<p>This corresponds to the global attribute
resource symbol {@link android.R.attr#focusable}.
@attr name android:focusable
*/
public static final int View_android_focusable = 0;
/**
<p>
@attr description
Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:paddingEnd
*/
public static final int View_paddingEnd = 2;
/**
<p>
@attr description
Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
<p>This is a private symbol.
@attr name com.example.document:paddingStart
*/
public static final int View_paddingStart = 1;
};
}
| [
"absod0711@163.com"
] | absod0711@163.com |
2f63e2acdf077d80ff73935d879f36016d050cb6 | 1742b6719b988e5519373002305e31d28b8bd691 | /sdk/java/src/main/java/com/pulumi/aws/vpclattice/inputs/ListenerDefaultActionArgs.java | ea934d3a04d5c3356df8f6fcb7c5c42c25bdc682 | [
"BSD-3-Clause",
"Apache-2.0",
"MPL-2.0"
] | permissive | pulumi/pulumi-aws | 4f7fdb4a816c5ea357cff2c2e3b613c006e49f1a | 42b0a0abdf6c14da248da22f8c4530af06e67b98 | refs/heads/master | 2023-08-03T23:08:34.520280 | 2023-08-01T18:09:58 | 2023-08-01T18:09:58 | 97,484,940 | 384 | 171 | Apache-2.0 | 2023-09-14T14:48:40 | 2017-07-17T14:20:33 | Java | UTF-8 | Java | false | false | 4,225 | java | // *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.vpclattice.inputs;
import com.pulumi.aws.vpclattice.inputs.ListenerDefaultActionFixedResponseArgs;
import com.pulumi.aws.vpclattice.inputs.ListenerDefaultActionForwardArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class ListenerDefaultActionArgs extends com.pulumi.resources.ResourceArgs {
public static final ListenerDefaultActionArgs Empty = new ListenerDefaultActionArgs();
@Import(name="fixedResponse")
private @Nullable Output<ListenerDefaultActionFixedResponseArgs> fixedResponse;
public Optional<Output<ListenerDefaultActionFixedResponseArgs>> fixedResponse() {
return Optional.ofNullable(this.fixedResponse);
}
/**
* Route requests to one or more target groups. See Forward blocks below.
*
* > **NOTE:** You must specify exactly one of the following argument blocks: `fixed_response` or `forward`.
*
*/
@Import(name="forwards")
private @Nullable Output<List<ListenerDefaultActionForwardArgs>> forwards;
/**
* @return Route requests to one or more target groups. See Forward blocks below.
*
* > **NOTE:** You must specify exactly one of the following argument blocks: `fixed_response` or `forward`.
*
*/
public Optional<Output<List<ListenerDefaultActionForwardArgs>>> forwards() {
return Optional.ofNullable(this.forwards);
}
private ListenerDefaultActionArgs() {}
private ListenerDefaultActionArgs(ListenerDefaultActionArgs $) {
this.fixedResponse = $.fixedResponse;
this.forwards = $.forwards;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ListenerDefaultActionArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private ListenerDefaultActionArgs $;
public Builder() {
$ = new ListenerDefaultActionArgs();
}
public Builder(ListenerDefaultActionArgs defaults) {
$ = new ListenerDefaultActionArgs(Objects.requireNonNull(defaults));
}
public Builder fixedResponse(@Nullable Output<ListenerDefaultActionFixedResponseArgs> fixedResponse) {
$.fixedResponse = fixedResponse;
return this;
}
public Builder fixedResponse(ListenerDefaultActionFixedResponseArgs fixedResponse) {
return fixedResponse(Output.of(fixedResponse));
}
/**
* @param forwards Route requests to one or more target groups. See Forward blocks below.
*
* > **NOTE:** You must specify exactly one of the following argument blocks: `fixed_response` or `forward`.
*
* @return builder
*
*/
public Builder forwards(@Nullable Output<List<ListenerDefaultActionForwardArgs>> forwards) {
$.forwards = forwards;
return this;
}
/**
* @param forwards Route requests to one or more target groups. See Forward blocks below.
*
* > **NOTE:** You must specify exactly one of the following argument blocks: `fixed_response` or `forward`.
*
* @return builder
*
*/
public Builder forwards(List<ListenerDefaultActionForwardArgs> forwards) {
return forwards(Output.of(forwards));
}
/**
* @param forwards Route requests to one or more target groups. See Forward blocks below.
*
* > **NOTE:** You must specify exactly one of the following argument blocks: `fixed_response` or `forward`.
*
* @return builder
*
*/
public Builder forwards(ListenerDefaultActionForwardArgs... forwards) {
return forwards(List.of(forwards));
}
public ListenerDefaultActionArgs build() {
return $;
}
}
}
| [
"noreply@github.com"
] | pulumi.noreply@github.com |
7651ed235592be6c2f9b3d3ac8d7b61e0331c5f3 | 8c4d721b7e30771d33eef98dc0b36493736e7072 | /Algorithm/src/BinarySearch/BinarySearchNoRe.java | 9c54abc08c3c15f338b8dacd8cae3f7f62ee1db3 | [] | no_license | xuan10116/Arithmetic | 9a10642b00778deb453277a63a24d7ce304afeb9 | 8e3055d2123e2001327d824deaff4fb1eb28cb23 | refs/heads/master | 2023-05-06T05:16:02.536293 | 2021-05-30T15:30:59 | 2021-05-30T15:30:59 | 372,250,424 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,100 | java | package BinarySearch;
import org.junit.Test;
public class BinarySearchNoRe {
@Test
public void test_noRe(){
int[] a = {1,8,10,89,100,123};
int resIndex = binarySearchNoRe(a, 123);
System.out.println(resIndex);
}
//二分查找的非递归实现
public static int binarySearchNoRe(int[] a,int target){
//初始化左右游标,先指向序列的头和尾
int left = 0;
int right = a.length-1;
//当左游标不大于右游标时保持循环
while(left<=right){
//中间游标
int mid = (left+right)/2;
//当中间元素等于目标元素时,返回中间游标
if (a[mid]==target) return mid;
//否则,如果中间元素的值大于目标元素,则将搜索范围缩至(left,mid-1)
else if (a[mid] > target) right = mid-1;
//再否则,如果中间元素的值小于目标元素,则将搜索范围缩至(mid+1,right)
else if (a[mid] < target) left = mid +1;
}
return -1;
}
}
| [
"lplfcm@outlook.com"
] | lplfcm@outlook.com |
d4ccdb425dcf7df9e70759af48967237afeb4b48 | fc90519c5e0d8ca3f11ba58e03a2ba9332aa0bab | /src/main/java/data/UserDAO.java | 0dff561df461e2ff09356d3358b80f8c1dfbd13a | [
"MIT"
] | permissive | oleglr/TelegramBot | b11423d3f27f909e36712f235a58fa1c01d7ce76 | 7d6683307505c6c97c5dd06528eed5d04228260e | refs/heads/main | 2023-07-14T10:17:24.132909 | 2021-08-29T15:35:34 | 2021-08-29T15:35:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 901 | java | package data;
import game.entity.User;
import java.util.List;
/**
* User Data Access Object class
*/
public interface UserDAO {
/**
* Method that returns the whole table
*
* @return cards table
*/
List<User> getAll();
/**
* Method that returns user by its UID
*
* @param UID user UID
* @return user
*/
User getEntityById(String UID);
/**
* Method that updates user
*
* @param user user
* @return updated user
*/
User update(User user);
/**
* Method that deletes user
*
* @param UID user UID
* @return true - if user has been deleted, false - if not
*/
boolean delete(String UID);
/**
* Method that puts user into DB
*
* @param user user
* @return true - if user has been saved, false - if not
*/
boolean create(User user);
}
| [
"71098930+47iq@users.noreply.github.com"
] | 71098930+47iq@users.noreply.github.com |
59889df809682111f96dab434d2e40693b1eea1f | fc995bcdeaae454e6cf4ce39c5eb9e28dddb93e3 | /app/src/main/java/cn/com/ubankers/www/sns/model/CommentBean.java | b5a357835c6124d6477dfffd61a04288cd5327d4 | [] | no_license | zhanhai/ubankers.android | 5fedbd0625ec88485c4fd7edc66b0a43d1e5cef1 | 6248f72794bffb81ed56278405fa8bfb88a48b66 | refs/heads/master | 2020-05-29T11:32:19.528455 | 2016-01-09T09:16:42 | 2016-01-09T09:16:42 | 48,211,073 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,252 | java | package cn.com.ubankers.www.sns.model;
public class CommentBean {
private String id;//发表评论的id
private String commenter_name;//评论者
private String comment_content;//评论的内容
private String comment_date;//评论的日期
private int reply_id;//回复的id的下标
private String replier_name;//回复的用户名
private String reply_content;//回复的内容
private String reply_date;//回复的日期
private String commenter_id;//评论者的ID,这条评论的作者
private int replier_id;//回复的id
private String userFaceId;//评论者的头像
private String reply_userFaceId;//回复者的头像
private int reply_count;//回复的条数
private int comment_identifying;//评论的v标识
private int reply_identifying;//回复的v标识
private int comment_count;//评论的总数
public int getComment_count() {
return comment_count;
}
public void setComment_count(int comment_count) {
this.comment_count = comment_count;
}
public int getReply_count() {
return reply_count;
}
public void setReply_count(int reply_count) {
this.reply_count = reply_count;
}
public String getReply_userFaceId() {
return reply_userFaceId;
}
public void setReply_userFaceId(String reply_userFaceId) {
this.reply_userFaceId = reply_userFaceId;
}
public String getUserFaceId() {
return userFaceId;
}
public void setUserFaceId(String userFaceId) {
this.userFaceId = userFaceId;
}
public int getReplier_id() {
return replier_id;
}
public void setReplier_id(int replier_id) {
this.replier_id = replier_id;
}
public String getCommenter_id() {
return commenter_id;
}
public void setCommenter_id(String commenter_id) {
this.commenter_id = commenter_id;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCommenter_name() {
return commenter_name;
}
public void setCommenter_name(String commenter_name) {
this.commenter_name = commenter_name;
}
public String getComment_content() {
return comment_content;
}
public void setComment_content(String comment_content) {
this.comment_content = comment_content;
}
public String getComment_date() {
return comment_date;
}
public void setComment_date(String comment_date) {
this.comment_date = comment_date;
}
public int getReply_id() {
return reply_id;
}
public void setReply_id(int reply_id) {
this.reply_id = reply_id;
}
public String getReplier_name() {
return replier_name;
}
public void setReplier_name(String replier_name) {
this.replier_name = replier_name;
}
public String getReply_content() {
return reply_content;
}
public void setReply_content(String reply_content) {
this.reply_content = reply_content;
}
public String getReply_date() {
return reply_date;
}
public void setReply_date(String reply_date) {
this.reply_date = reply_date;
}
public int getComment_identifying() {
return comment_identifying;
}
public void setComment_identifying(int comment_identifying) {
this.comment_identifying = comment_identifying;
}
public int getReply_identifying() {
return reply_identifying;
}
public void setReply_identifying(int reply_identifying) {
this.reply_identifying = reply_identifying;
}
}
| [
"hai.zhan.cn@gmail.com"
] | hai.zhan.cn@gmail.com |
2dbecba2a3200370b02cc7174b7624e6330a99bf | 5e946e0745138428330b4f87eabccc106df8b3b1 | /src/main/java/com/edigley/oursim/dispatchableevents/taskevents/TaskEventDispatcher.java | b5c104345b90253ccbabf80a9b4679418b6daa4b | [] | no_license | edigley/oursim | aed56b7e0da8735c278effed655e8fc5f7553260 | 5b6efaa4e8691415927687f7907cc95c58fd4bf9 | refs/heads/master | 2021-06-16T12:22:29.315417 | 2019-07-21T20:58:29 | 2019-07-21T20:58:29 | 196,732,786 | 0 | 0 | null | 2021-04-26T19:20:22 | 2019-07-13T14:47:55 | Java | UTF-8 | Java | false | false | 3,531 | java | package com.edigley.oursim.dispatchableevents.taskevents;
import com.edigley.oursim.dispatchableevents.Event;
import com.edigley.oursim.dispatchableevents.EventDispatcher;
import com.edigley.oursim.entities.Task;
/**
*
* A dispatcher to the task's related events.
*
* @author Edigley P. Fraga, edigley@lsd.ufcg.edu.br
* @since 19/05/2010
*
* @see {@link TaskEventListener}
* @see {@link TaskEventFilter}
*
*/
public class TaskEventDispatcher extends EventDispatcher<Task, TaskEventListener, TaskEventFilter> {
/**
*
* An enumeration of all the types of the events that could be dispatched by
* this dispatcher. For each type there is an method responsible to dispatch
* it. For example, to {@link TYPE_OF_DISPATCHING#submitted} there is
* {@link TaskEventDispatcher#dispatchTaskSubmitted(Task)
*
* @author Edigley P. Fraga, edigley@lsd.ufcg.edu.br
* @since 19/05/2010
*
*/
protected enum TYPE_OF_DISPATCHING {
submitted, started, preempted, finished, cancelled
};
private static TaskEventDispatcher instance = null;
private TaskEventDispatcher() {
super();
}
public static TaskEventDispatcher getInstance() {
return instance = (instance != null) ? instance : new TaskEventDispatcher();
}
@Override
public void addListener(TaskEventListener listener) {
if (!this.getListeners().contains(listener)) {
this.getListeners().add(listener);
this.getListenerToFilter().put(listener, TaskEventFilter.ACCEPT_ALL);
} else {
assert false;
}
}
@Override
public boolean removeListener(TaskEventListener listener) {
return this.getListeners().remove(listener);
}
/**
* @see {@link TaskEventListener#taskSubmitted(Event)
* @param Task
*/
public void dispatchTaskSubmitted(Task Task) {
dispatch(TYPE_OF_DISPATCHING.submitted, Task);
}
/**
* @see {@link TaskEventListener#taskStarted(Event)
* @param Task
*/
public void dispatchTaskStarted(Task Task) {
dispatch(TYPE_OF_DISPATCHING.started, Task);
}
/**
* @see {@link TaskEventListener#taskFinished(Event)
* @param Task
*/
public void dispatchTaskFinished(Task Task) {
dispatch(TYPE_OF_DISPATCHING.finished, Task);
}
/**
* @see {@link TaskEventListener#taskPreempted(Event)
* @param Task
* @param preemptionTime
*/
public void dispatchTaskPreempted(Task Task, long preemptionTime) {
dispatch(TYPE_OF_DISPATCHING.preempted, Task, preemptionTime);
}
public void dispatchTaskCancelled(Task Task, long cancellingTime) {
dispatch(TYPE_OF_DISPATCHING.cancelled, Task, cancellingTime);
}
private void dispatch(TYPE_OF_DISPATCHING type, Task Task, long preemptionTime) {
dispatch(type, new Event<Task>(preemptionTime, Task));
}
private void dispatch(TYPE_OF_DISPATCHING type, Task Task) {
dispatch(type, new Event<Task>(Task));
}
@SuppressWarnings("unchecked")
@Override
protected void dispatch(Enum type, Event<Task> taskEvent) {
for (TaskEventListener listener : this.getListeners()) {
// submitted, started, preempted, finished
if (this.getListenerToFilter().get(listener).accept(taskEvent)) {
switch ((TYPE_OF_DISPATCHING) type) {
case submitted:
listener.taskSubmitted(taskEvent);
break;
case started:
listener.taskStarted(taskEvent);
break;
case preempted:
listener.taskPreempted(taskEvent);
break;
case finished:
listener.taskFinished(taskEvent);
break;
case cancelled:
listener.taskCancelled(taskEvent);
break;
default:
assert false;
}
}
}
}
}
| [
"edigley@gmail.com"
] | edigley@gmail.com |
26ea7545133be9202106a08f3d831918727d9a81 | e6be64cd837c2ba8412a98825a4f60e4764badf6 | /pageobjects/src/main/java/com/apple/carnival/ui/OverviewOfHostsPage.java | ae929c7916f7e687304c6c87ea19274580d17330 | [] | no_license | nareshreddy0789/QAwork | 2f2f00387c2fb135ce970cd3195c98819a277077 | 06874d4fd65518442df3e5c92da90250c99e181f | refs/heads/master | 2021-01-01T03:57:22.292201 | 2016-05-27T13:56:07 | 2016-05-27T13:56:07 | 59,790,873 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,877 | java | package com.apple.carnival.ui;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.json.JSONObject;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import com.apple.carnival.qa.coreframework.data.pageobjects.WD40Host;
import com.apple.carnival.qa.parser.JsonParserUtil;
import com.apple.carnival.ui.utilities.ElementLocatorUtility;
public class OverviewOfHostsPage extends CarnivalUI {
private static JSONObject root=null;
public OverviewOfHostsPage(){
if(root == null)
root = JsonParserUtil.parseJsonFile("src/main/resources/locators/OverviewOfHostsPage.JSON");
}
public void selectHost(String hostName) throws InterruptedException{
By wd40HostLinkLocator = By.linkText(hostName);
carnivalWebDriver.findElement(wd40HostLinkLocator).click();
carnivalWebDriver.manage().timeouts().pageLoadTimeout(20, TimeUnit.SECONDS);
Thread.sleep(2000);
}
public List<WD40Host> getWD40HostList() {
List<WD40Host> hostList = new ArrayList<WD40Host> ();
WebElement hostTable = carnivalWebDriver.findElement(
ElementLocatorUtility.getWebDriverLocator(root, "HostOverviewTable"));
List<WebElement> rows=hostTable.findElements(By.xpath(".//tbody/tr"));
for(WebElement row:rows){
List<WebElement> confCells = row.findElements(By.tagName("td"));
WD40Host hostData = new WD40Host();
for(int k=0;k<confCells.size();k++){
String value = confCells.get(k).getText();
if(k == 0)
hostData.setHost(value);
if(k == 1)
hostData.setState(value);
if(k == 2)
hostData.setISAppNames(value);
if(k == 3)
hostData.setHostPhysicalRAM(value);
if(k == 4)
hostData.setSubscribedRAM(value);
if(k == 5)
hostData.setSubscribedRAMPct(value);
}
hostList.add(hostData);
}
return hostList;
}
}
| [
"nareshreddy0789@gmail.com"
] | nareshreddy0789@gmail.com |
130db18ef7a178575ab02062a0cc290185904b1e | 07c4d856f8e7ed0bf3f36a6c8c3fe1b0cea89809 | /app/src/androidTest/java/demo/javahelps/com/depofcse/ExampleInstrumentedTest.java | 1ebc0f998593b24ad8516cc45bdb1f983b0e9215 | [] | no_license | Arifcse03/DepofCSE2 | df41ba1c8e6e7d610ee8a8d9a87823b304f19827 | 0523f3a4ecb430412f8b224c8c54fe1496bcc94a | refs/heads/master | 2020-03-19T06:22:24.767372 | 2018-06-04T11:45:48 | 2018-06-04T11:45:48 | 136,013,710 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 755 | java | package demo.javahelps.com.depofcse;
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("demo.javahelps.com.depofcse", appContext.getPackageName());
}
}
| [
"32597520+Arifcse03@users.noreply.github.com"
] | 32597520+Arifcse03@users.noreply.github.com |
1158346e901797051e41f17cfcce346d2a0bacbd | 613088788468bb1077876f08f22233c8d74584cb | /generic-rts/src/main/java/pl/rembol/jme3/rts/player/WithOwner.java | ddd2d3ccef84ec0199d8031bf191691d3a6d703d | [] | no_license | RemboL/world | c2f91f5acf47b8b50a31ef3e8d4acad1d71d2d62 | df04dfb9821f5713c9efd52aef0e432c8733734c | refs/heads/master | 2021-01-17T06:57:55.098210 | 2017-06-25T06:32:08 | 2017-06-25T06:32:08 | 45,726,299 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 650 | java | package pl.rembol.jme3.rts.player;
import pl.rembol.jme3.rts.ModelHelper;
import pl.rembol.jme3.rts.gameobjects.interfaces.WithNode;
public interface WithOwner extends WithNode {
Player getOwner();
void setOwner(Player player);
default void updateColor() {
if (getOwner() != null && getOwner().getColor() != null
&& getNode() != null) {
for (String geometry : getGeometriesWithChangeableColor()) {
ModelHelper.setColorToGeometry(getNode(),
getOwner().getColor(), geometry);
}
}
}
String[] getGeometriesWithChangeableColor();
}
| [
"r3mbol@gmail.com"
] | r3mbol@gmail.com |
3fc6bc3f71b35f08497c2eb26b6dc7889bb6cf3f | 33016a6a111c569ead996e8212b1b8e1b9fde139 | /src/com/matt/chapters/ch9/Main19Games.java | fec354cfe0109a2961c054acdda20783242e468a | [] | no_license | mateusz91t/ThinkingInJava | 226ae5cd2f166c99fb86eabd3624d1ac978a2de9 | d00a53ebb59f40322e93edb29103c27409302ff9 | refs/heads/master | 2023-01-01T20:14:21.711046 | 2020-10-28T15:48:32 | 2020-10-28T15:48:32 | 299,687,759 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 352 | java | package com.matt.chapters.ch9;
import com.matt.chapters.ch9.games.DiceFactory;
import com.matt.chapters.ch9.games.Games;
import com.matt.chapters.ch9.games.HeadsOrTailsFactory;
public class Main19Games {
public static void main(String[] args){
Games.playGame(new DiceFactory());
Games.playGame(new HeadsOrTailsFactory());
}
}
| [
"mateusz.trzuskowski.91@gmail.com"
] | mateusz.trzuskowski.91@gmail.com |
5149fae86f4b8dcf2696bf398abdc92d4a77fa9b | fb92567fb9b9f09b5ae7f12377df76a7efd26365 | /app/src/main/java/com/hdmoviesku/fullhdmovies/fullhdmovies_model/LiveTvModel.java | ad5c186eda035b65f384c6bd781e77ce1d60197c | [] | no_license | fandofastest/hdmoviesku | fc48d45d2b06969580ea1328f90de713e4bcfb99 | 02ea57bcdd317dbc2c81a3f23894cb2c1f934a44 | refs/heads/master | 2021-01-01T12:21:18.651124 | 2020-03-25T09:59:45 | 2020-03-25T09:59:45 | 239,277,066 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 421 | java | package com.hdmoviesku.fullhdmovies.fullhdmovies_model;
public class LiveTvModel {
String tvName,posterUrl;
public String getTvName() {
return tvName;
}
public void setTvName(String tvName) {
this.tvName = tvName;
}
public String getPosterUrl() {
return posterUrl;
}
public void setPosterUrl(String posterUrl) {
this.posterUrl = posterUrl;
}
}
| [
"fandofast@gmail.com"
] | fandofast@gmail.com |
2b62534202de40f224f9e553d59809a786adbbf2 | 0a92cf6862ddb38a16c3cfb9491899ecf3e4716c | /src/main/java/apkkids/com/nio/ChannelExample.java | c4405c1f5e84d7fc0f756ade261d68b30397b390 | [] | no_license | apkkids/JavaExample | 6de58c3bf23056aa0aa706cd6af14a8e06f19c0a | 4265a554bd6969673db1c31f018f09326b81fc47 | refs/heads/master | 2021-07-06T13:32:04.142311 | 2019-07-15T06:18:36 | 2019-07-15T06:18:36 | 196,170,090 | 0 | 0 | null | 2019-10-31T06:21:34 | 2019-07-10T08:56:28 | Java | UTF-8 | Java | false | false | 987 | java | package apkkids.com.nio;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.WritableByteChannel;
/**
* Author: wxb
* Project: JavaExampleCode
* Create Date: 2017/3/15
* Create Time: 20:25
* Description:
*/
public class ChannelExample {
public static void main(String[] args) {
ReadableByteChannel readableByteChannel = Channels.newChannel(System.in);
WritableByteChannel writableByteChannel = Channels.newChannel(System.out);
ByteBuffer buffer = ByteBuffer.allocate(1024);
try {
while (readableByteChannel.read(buffer) != -1) {
buffer.flip();
while (buffer.hasRemaining()) {
writableByteChannel.write(buffer);
}
buffer.clear();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
| [
"apkkids@163.com"
] | apkkids@163.com |
328a0f7475d08e8c6badaa3960274bda9e32dcf1 | 0472a612cf49442a33ecbac858574de7fd126e70 | /ql-cloud-commons/ql-cloud-commons-utils/src/main/java/com/ql/cloud/commons/utils/MyBatisDaoUtils.java | b8c8b1b6c7ecf09008d289f9c38a4b3fba9c3c67 | [
"Apache-2.0"
] | permissive | BearBig9-9/ql-cloud | 4fe6efd947a0c54c2f539a268d1f0859401298b7 | fedbcb13fa29626735219ab55efb68adb76e86a5 | refs/heads/master | 2021-01-19T10:06:21.120253 | 2017-01-16T09:55:28 | 2017-01-16T09:55:28 | 82,161,836 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,719 | java | /**
* MyBatisDaoUtils.java 2016年7月25日 上午10:05:16
*
* Copyright (c) 2010-2016 yinghezhong Inc. All rights reserved.
*
* @Description
* @version 1.0
*
*/
package com.ql.cloud.commons.utils;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.text.MessageFormat;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.ClassUtils;
/**
* MyBatisDao工具类
*
* @author liusn
* @date 2016年7月25日 上午10:06:17
*
*/
public final class MyBatisDaoUtils {
/**
* Log variable for all child classes. Uses LogFactory.getLog(getClass()) from Commons Logging
*/
protected static final Log log = LogFactory.getLog(MyBatisDaoUtils.class);
/**
* Checkstyle rule: utility classes should not have public constructor
*/
private MyBatisDaoUtils() {}
/**
* 根据对象找到主键名称
*
* @param 对象
* @return id名称
*/
protected static String getPrimaryKeyFieldName(Object o) {
Field[] fieldlist = o.getClass().getDeclaredFields();
String fieldName = null;
for (Field fld : fieldlist) {
if (fld.getName().equals("id") || fld.getName().indexOf("Id") > -1) {
fieldName = fld.getName();
break;
}
}
return fieldName;
}
/**
* Get the object type of the primary key
*
* @param o the object to examine
* @return the class type
*/
protected static Class<?> getPrimaryKeyFieldType(Object o) {
Field[] fieldlist = o.getClass().getDeclaredFields();
Class<?> fieldType = null;
for (Field fld : fieldlist) {
if (fld.getName().equals("id") || fld.getName().indexOf("Id") > -1 || fld.getName().equals("version")
|| fld.getName().equals("fact_id")) {
fieldType = fld.getType();
break;
}
}
return fieldType;
}
/**
* 根据泛型对象,反射getId()方法
*
* @param 泛型对象
* @return getId()对象
*/
public static Object getPrimaryKeyValue(Object o) {
String fieldName = getPrimaryKeyFieldName(o);
String getterMethod = "get" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1);
try {
Method getMethod = o.getClass().getMethod(getterMethod, (Class[]) null);
return getMethod.invoke(o, (Object[]) null);
} catch (Exception e) {
e.printStackTrace();
log.error("Could not invoke method '" + getterMethod + "' on " + ClassUtils.getShortName(o.getClass()));
}
return null;
}
/**
* 添加修改预处理操作
*/
public static void prepareObjectForSaveOrUpdate(Object o) {
// try {
// Field[] fieldlist = o.getClass().getDeclaredFields();
// for (Field fld : fieldlist) {
// String fieldName = fld.getName();
// if (fieldName.equals("version")) {
// Method setMethod = o.getClass().getMethod("setVersion", Integer.class);
// Object value = o.getClass().getMethod("getVersion", (Class[]) null).invoke(o, (Object[])
// null);
// if (value == null) {
// setMethod.invoke(o, 1);
// } else {
// setMethod.invoke(o, (Integer) value + 1);
// }
// }
// }
// } catch (Exception e) {
// e.printStackTrace();
// log.error("Could not prepare '" + ClassUtils.getShortName(o.getClass()) +
// "' for insert/update");
// }
}
/**
* Sets the primary key's value
*
* @param o the object to examine
* @param clazz the class type of the primary key
* @param value the value of the new primary key
*/
protected static void setPrimaryKey(Object o, Class<?> clazz, Object value) {
String fieldName = getPrimaryKeyFieldName(o);
String setMethodName = "set" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1);
try {
Method setMethod = o.getClass().getMethod(setMethodName, clazz);
if (value != null) {
setMethod.invoke(o, value);
}
} catch (Exception e) {
e.printStackTrace();
log.error(MessageFormat.format("Could not set ''{0}.{1} with value {2}", ClassUtils.getShortName(o.getClass()), fieldName,
value));
}
}
/**
* 根据泛型实体名称,返回查询列表方法名称
*
* @param 泛型实体类名
* @return "get" + className + "list" ,列如:getUserList
*/
public static String getSelectQuery(String className) {
return "get" + className + "List";
}
/**
* 根据泛型实体名称,返回分页查询方法名称
*
* @param 泛型实体类名
* @return "page" + className ,列如:pageUser
*/
public static String getPageQuery(String className) {
return "page" + className + "List";
}
public static String getCountListQuery(String className) {
return "count" + className + "List";
}
public static String getCountsQuery(String className) {
return "count" + className;
}
/**
* 根据泛型实体名称,返回查询方法名称
*
* @param 泛型实体类名
* @return "getOne" + className ,列如:getOneUser
*/
public static String getFindQuery(String className) {
return "getOne" + className;
}
/**
* 根据泛型实体名称,返回查询方法名称
*
* @param 泛型实体类名
* @return "get" + className ,列如:getUser
*/
public static String getFindQueryByPK(String className) {
return "getOne" + className + "ByPK";
}
/**
* 根据泛型实体类,返回添加方法名称
*
* @param 泛型实体类名
* @return "save" + className ,列如:saveUser
*/
public static String getInsertQuery(String className) {
return "save" + className;
}
/**
* 根据泛型实体类,返回修改方法名称
*
* @param 泛型实体类名
* @return "update" + className ,列如:updateUser
*/
public static String getUpdateQuery(String className) {
return "update" + className;
}
/**
* 根据泛型实体类,返回删除方法名称
*
* @param 泛型实体类名
* @return "delete" + className ,列如:deleteUser
*/
public static String getDeleteQuery(String className) {
return "delete" + className;
}
}
| [
"qilongjava@163.com"
] | qilongjava@163.com |
d07938641d8d24ae27db31d64706933303b8848f | fce1e3fe1e35dee4482b07198fb08033b9c32ef6 | /com/google/android/gms/maps/internal/C0325n.java | 948169c676ab60abdb51a3d32f5d0802da2c11a8 | [] | no_license | Ravinther/andriodprojecttodolist | cae041a692ab2ac0ffae6461921b151803313754 | 34a35ea0c72e69c070e9e565c2d8988b098b8019 | refs/heads/master | 2021-01-09T20:19:54.676431 | 2016-08-07T08:06:04 | 2016-08-07T08:06:04 | 65,122,650 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,046 | java | package com.google.android.gms.maps.internal;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import com.google.analytics.midtier.proto.containertag.MutableTypeSystem.Value;
import com.google.android.gms.dynamic.C0192b;
import com.google.android.gms.dynamic.C0192b.C0557a;
/* renamed from: com.google.android.gms.maps.internal.n */
public interface C0325n extends IInterface {
/* renamed from: com.google.android.gms.maps.internal.n.a */
public static abstract class C0723a extends Binder implements C0325n {
/* renamed from: com.google.android.gms.maps.internal.n.a.a */
private static class C0722a implements C0325n {
private IBinder ky;
C0722a(IBinder iBinder) {
this.ky = iBinder;
}
public IBinder asBinder() {
return this.ky;
}
public void m2171d(C0192b c0192b) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken("com.google.android.gms.maps.internal.IOnMyLocationChangeListener");
obtain.writeStrongBinder(c0192b != null ? c0192b.asBinder() : null);
this.ky.transact(1, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
}
public C0723a() {
attachInterface(this, "com.google.android.gms.maps.internal.IOnMyLocationChangeListener");
}
public static C0325n aj(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.maps.internal.IOnMyLocationChangeListener");
return (queryLocalInterface == null || !(queryLocalInterface instanceof C0325n)) ? new C0722a(iBinder) : (C0325n) queryLocalInterface;
}
public IBinder asBinder() {
return this;
}
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
switch (code) {
case Value.TYPE_FIELD_NUMBER /*1*/:
data.enforceInterface("com.google.android.gms.maps.internal.IOnMyLocationChangeListener");
m1132d(C0557a.m1641G(data.readStrongBinder()));
reply.writeNoException();
return true;
case 1598968902:
reply.writeString("com.google.android.gms.maps.internal.IOnMyLocationChangeListener");
return true;
default:
return super.onTransact(code, data, reply, flags);
}
}
}
void m1132d(C0192b c0192b) throws RemoteException;
}
| [
"m.ravinther@yahoo.com"
] | m.ravinther@yahoo.com |
b34389f105ffbbef255b00c1883e0909610d11b4 | f1fb00e3b6fa3056efc8199667093ad257eb4396 | /src/main/java/by/epam/library/model/command/reader/ChangeLoginAndPasswordCommand.java | ec1aa4ed05122b764e71a81cd168c27c89f150a4 | [] | no_license | Nastya-Dlusskaya/lib | f0a70712dc9dfb7dcc1299f9a0ee7b3d10d2cf88 | e176b0bb22aebfe1b8611807b825ae923a70a219 | refs/heads/master | 2020-03-11T15:21:02.298521 | 2018-04-18T12:25:34 | 2018-04-18T12:25:34 | 130,081,583 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 644 | java | package by.epam.library.model.command.reader;
import by.epam.library.model.command.common.ActionCommand;
import by.epam.library.model.exception.CommandException;
import by.epam.library.model.exception.ServiceException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class ChangeLoginAndPasswordCommand implements ActionCommand {
@Override
public void execute(HttpServletRequest request, HttpServletResponse response) throws CommandException,
ServiceException, ServletException, IOException {
}
}
| [
"dlusskaya98@gmail.com"
] | dlusskaya98@gmail.com |
ab53ff8a531091c5d607d75660d94580c5df864f | e366e6edf743dc264da1318ae2d3407fca4ca39c | /.svn/pristine/ab/ab53ff8a531091c5d607d75660d94580c5df864f.svn-base | a591d650c5363a61f1a0e78fd11899c42707fc10 | [] | no_license | gbyq/CXCourses | b013676475968d9313557a3fb968a0b1acc8a7b4 | b38a328bb28d67848ef9633c8b4f89188fe1b323 | refs/heads/master | 2021-04-26T23:31:14.732553 | 2018-03-05T09:41:22 | 2018-03-05T09:41:22 | 123,897,031 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,390 | /*
* 官网地站:http://www.mob.com
* 技术支持QQ: 4006852216
* 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复)
*
* Copyright (c) 2013年 mob.com. All rights reserved.
*/
package com.example.zhoubiao.cxcourses.cn.sharesdk.demo.src.cn.sharesdk.onekeyshare.themes.classic;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.view.View;
/** 编辑页面中删除图片“X”按钮 */
public class XView extends View {
private float ratio;
public XView(Context context) {
super(context);
}
public void setRatio(float ratio) {
this.ratio = ratio;
}
protected void onDraw(Canvas canvas) {
int width = getWidth() / 2;
int height = getHeight() / 2;
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(0xffa0a0a0);
canvas.drawRect(width, 0, getWidth(), height, paint);
paint = new Paint();
paint.setAntiAlias(true);
paint.setStrokeWidth(3f * ratio);
paint.setColor(0xffffffff);
float left = 8f * ratio;
canvas.drawLine(width + left, left, getWidth() - left, width - left, paint);
canvas.drawLine(width + left, width - left, getWidth() - left, left, paint);
}
}
| [
"1976289769@qq.com"
] | 1976289769@qq.com | |
5a160115071c792e28812997eff176e3775658f4 | f791715cfdfe9dd918837c36ab2cbf8736671ae3 | /Sample/Homeworks/Homework11/Homework11.java | 0dbfb7981948d1e4cd91918eb7c60657a5bfe74b | [] | no_license | beyzayazici/developments | cb852665b6d2102f3c3c7e1358d341b2e2292b4a | 0a4510836178c1a5625d606642020e763543a86b | refs/heads/master | 2023-03-01T14:14:00.586951 | 2021-01-31T20:32:10 | 2021-01-31T20:32:10 | 324,234,572 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 814 | java | *-------------------------------------------------------------------------------------------
11 : x ve y pozitif tamsayılar olmak üzere eğer x sayısının kendisi hariç bölenleri
toplamı y sayısına ve aynı zamanda y sayısının kendisi hariç bölenleri toplamı x sayısına eşit
ise bu sayılar arkadaştır denir. Örneğin 220 ve 284 sayıları arkadaş sayılardır. Parametre
olarak aldığı iki tamsayının arkadaş olup olmadıklarını test eden areFriends metodunu yazınız.
Metodunuzu dört basamaklı bir arkadaş sayı çifti bulan bir kodla test edebilirsiniz.
--------------------------------------------------------------------------------------------*
public class Homework11 {
public static void main(String [] args)
{
FriendsNumbersTest.run();
}
}
| [
"beyzaayazici@gmail.com"
] | beyzaayazici@gmail.com |
855b6d53c524b413a0bce01c379e375443fa4e4c | 25811f89fc09bfd8f6c7587b4b66608192ef4c2f | /app/src/main/java/com/keshav/facedetector/MainActivity.java | deccfc37e3320c54b0b2c785cce30246e32c4fd4 | [] | no_license | keshavjain235/FaceDetector | 89248415c38b45fb5bea5d8d192c9909fcc7a4c1 | bfa31fd1988c2954825cb0af13b71a0c1ef9285d | refs/heads/master | 2020-07-22T22:30:05.275017 | 2019-09-09T16:17:04 | 2019-09-09T16:17:04 | 207,351,119 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,035 | java | package com.keshav.facedetector;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;
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.ml.vision.FirebaseVision;
import com.google.firebase.ml.vision.common.FirebaseVisionImage;
import com.google.firebase.ml.vision.face.FirebaseVisionFace;
import com.google.firebase.ml.vision.face.FirebaseVisionFaceDetector;
import com.google.firebase.ml.vision.face.FirebaseVisionFaceDetectorOptions;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends AppCompatActivity {
ImageView image;
Button camera, detect;
Bitmap imageD;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//init of widgets
image = findViewById(R.id.image);
camera = findViewById(R.id.camera);
detect = findViewById(R.id.detect);
camera.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(i,100);
}
});
detect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
try{
detectFace(imageD);
} catch (Exception e) {
Toast.makeText(MainActivity.this, "No Image Clicked", Toast.LENGTH_SHORT).show();
}
}
});
}//oncreate
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
try {
if (requestCode == 100) {
imageD = (Bitmap) data.getExtras().get("data");
image.setImageBitmap(imageD);
}
}catch (Exception e){
Toast.makeText(this, "No Image Clicked", Toast.LENGTH_SHORT).show();
}
}//onActivityResult
//detection part
void detectFace(Bitmap image) {
final List<Rect> rectsangles = new ArrayList<>();
//convert simple bitmap image to firebase image format
FirebaseVisionImage imageF = FirebaseVisionImage.fromBitmap(imageD);
//detector parameters
FirebaseVisionFaceDetectorOptions highAccuracyOpts = new FirebaseVisionFaceDetectorOptions.Builder()
.setPerformanceMode(FirebaseVisionFaceDetectorOptions.ACCURATE)
.setClassificationMode(FirebaseVisionFaceDetectorOptions.ALL_CLASSIFICATIONS)
.build();
//creating the detector with local model
FirebaseVisionFaceDetector detector = FirebaseVision.getInstance().getVisionFaceDetector(highAccuracyOpts);
//now we r good to go with detection
detector.detectInImage(imageF).addOnCompleteListener(new OnCompleteListener<List<FirebaseVisionFace>>() {
@Override
public void onComplete(@NonNull Task<List<FirebaseVisionFace>> task) {
for(FirebaseVisionFace face: task.getResult()){
rectsangles.add(face.getBoundingBox());
}
drawRectangles(rectsangles);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(MainActivity.this, "No Face Detected", Toast.LENGTH_SHORT).show();
}
});
}
public void drawRectangles(List<Rect> rects) {
Paint p = new Paint();
p.setStyle(Paint.Style.FILL_AND_STROKE);
p.setAntiAlias(true);
p.setFilterBitmap(true);
p.setDither(true);
p.setStyle(Paint.Style.STROKE);
p.setStrokeWidth(1);
p.setColor(Color.GREEN);
Bitmap img = ((BitmapDrawable)image.getDrawable()).getBitmap();
Bitmap bitmap = Bitmap.createBitmap(img.getWidth(), img.getHeight(), Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(bitmap);
c.drawBitmap(img, 0, 0, null);
for(Rect r: rects) {
c.drawRect(r.left, r.top, r.right, r.bottom, p);
}
image.setImageBitmap(bitmap);
}
}//MainActivity
| [
"keshav.jain2354@gmail.com"
] | keshav.jain2354@gmail.com |
76fb1c5aff13f037575f7a2c7443ef7fd487f8c2 | 329015ba4d99545c9eb1744eb5a3851c8a666ab7 | /src/edu/nyu/cs/cs2580/QueryExpander.java | 3eae173ff120f835b63a47fa81a8e28bb75a0cb8 | [] | no_license | calvinyu/WSE | 64739aa7fdca3a090dd4849130bb6c10b2b60b33 | cf53b456851a080faca9f2032d78a294abaea8d1 | refs/heads/master | 2021-01-10T18:37:15.418746 | 2014-12-18T05:41:55 | 2014-12-18T05:41:55 | 24,508,493 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,334 | java | package edu.nyu.cs.cs2580;
import java.util.*;
/**
* Created by kh21 on 2014/11/24.
*/
public class QueryExpander {
public static String expandQuery(Vector<ScoredDocument> docs, int numTerms,
IndexerInvertedCompressed indexer) {
// dictionary contains all words and their count
HashMap<String, Integer> dictionary = new HashMap<String, Integer>();
// get top docs
for(int i = 0; i < docs.size(); i++) {
int docid = docs.get(i).getDoc()._docid;
int[] body = indexer._docBody[docid];
for (int j = 0; j < body.length; j++) {
// get the term by looking up _terms
String term = indexer._terms.get(body[j]);
j++;
// get the number of appearances
int count = body[j];
// if exists, add the count, else create an entry
if (dictionary.containsKey(term)) {
dictionary.put(term, dictionary.get(term) + count);
} else dictionary.put(term, count);
}
}
// get top terms
dictionary = sortByValues(dictionary);
Set<Map.Entry<String, Integer>> set = dictionary.entrySet();
Iterator<Map.Entry<String, Integer>> iterator = set.iterator();
int totalFrequency = 0;
for (int i=0; i<numTerms; i++) {
Map.Entry<String,Integer> me = iterator.next();
totalFrequency += me.getValue();
}
// write results into a string to return to user
String result = "";
iterator = set.iterator();
for (int i=0; i<numTerms; i++) {
Map.Entry<String,Integer> me = iterator.next();
result += (me.getKey() + "\t" + (double) me.getValue()/totalFrequency + "\n");
}
return result;
}
@SuppressWarnings({ "unchecked", "rawtypes" })
private static HashMap<String,Integer> sortByValues(HashMap map) {
List list = new LinkedList(map.entrySet());
// Defined Comparator here
Collections.sort(list, new Comparator() {
public int compare(Object o1, Object o2) {
return ((Comparable) ((Map.Entry) (o2)).getValue()).compareTo(((Map.Entry) (o1)).getValue());
}
});
HashMap sortedHashMap = new LinkedHashMap();
for (Iterator it = list.iterator(); it.hasNext();) {
Map.Entry entry = (Map.Entry) it.next();
sortedHashMap.put(entry.getKey(), entry.getValue());
}
return sortedHashMap;
}
}
| [
"kh1715@nyu.edu"
] | kh1715@nyu.edu |
fe4d70e01a595d3b34fbb7ccb9ce863e4c6dabb2 | 1d17bf1dc10da60de6030c39e7ae351b45c9a3af | /src/main/java/com/utils/Base64Util.java | 3ba6680726a0aa132e2708e578112b35d4f9a225 | [] | no_license | lhxnull/springbootdemo | 8337094298370ef0ea61443febcd491e6d0a2c1e | 961b41bfbe0a11d9c53343ee93272da2dae21436 | refs/heads/master | 2020-03-27T09:10:20.048007 | 2019-01-31T15:14:31 | 2019-01-31T15:14:31 | 146,318,917 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,315 | java | package com.utils;
import org.apache.commons.codec.binary.Base64;
import java.io.UnsupportedEncodingException;
/**
* base64的编码解码
* Created by ozc on 2017/12/8.
*
* @author ozc
* @version 1.0
*/
public class Base64Util {
private static final String UTF_8 = "UTF-8";
/**
* 对给定的字符串进行base64解码操作
*/
public static String decodeData(String inputData) {
try {
if (null == inputData) {
return null;
}
return new String(Base64.decodeBase64(inputData.getBytes(UTF_8)), UTF_8);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
/**
* 对给定的字符串进行base64加密操作
*/
public static String encodeData(String inputData) {
try {
if (null == inputData) {
return null;
}
return new String(Base64.encodeBase64(inputData.getBytes(UTF_8)), UTF_8);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
public static void main(String[] args) {
String s = Base64Util.encodeData("a6a7e3c7-c104-11e7-aef7-d8cb8a81419e");
System.out.println(s);
}
}
| [
"571921459@qq.com"
] | 571921459@qq.com |
260fe4df7a06f52f5aef329d471c9f31a6b2181b | ae5bf5a91ebaf3d372eb2909af7baeda17ada58b | /ComputeLoanUsingInputDialog.java | 2543e096cda5978a65468a8fca8822279bff84f8 | [] | no_license | SLONGkang/JAVALearning | f346bac171f783e88d7963af284a427d0791f2b6 | e1cd549288d1409bcc42940586432d69bee2e67f | refs/heads/master | 2020-05-05T02:13:35.792495 | 2019-05-11T15:17:26 | 2019-05-11T15:17:26 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 967 | java | import javax.swing.JOptionPane;
public class ComputeLoanUsingInputDialog
{
public static void main(String[] args)
{
String annualInterestRateString = JOptionPane.showInputDialog(
"请输入年利率:");
double annualInterestRate=Double.parseDouble(annualInterestRateString);
double mouthRate = annualInterestRate/1200;
String numberYear=JOptionPane.showInputDialog(
"请输入年数:");
int numberOfYear=Integer.parseInt(numberYear);
String loanString=JOptionPane.showInputDialog(
"请输入贷款金额:");
double loan=Double.parseDouble(loanString);
double mouthPay=loan*mouthRate/(1-1/Math.pow(1+mouthRate,numberOfYear*12.0));
double totalPay=mouthPay*12*numberOfYear;
mouthPay=(int)(mouthPay*100)/100.0;
totalPay=(int)(totalPay*100)/100.0;
String output="The mouthly payment is "+mouthPay+
"\nThe total payment is "+totalPay;
JOptionPane.showMessageDialog(null,output);
}
} | [
"noreply@github.com"
] | SLONGkang.noreply@github.com |
98de32bd0ace2c23acd923bd7f781ace23b16f55 | 9e3c139d64690650362d1352991020a6da506115 | /app/src/main/java/itba/dreamair2/contracts/BroadcastContract.java | b056a55dc61a41f2fa14fd03147a749d4d247dce | [] | no_license | tinchovictory/DreamAir | 64637a40dae74c0b86b6292e4b1c9e7ce5601a8b | a4864944cc93d05a146717d7b9408a4101549134 | refs/heads/master | 2021-01-07T12:26:28.378177 | 2017-06-26T03:40:23 | 2017-06-26T03:40:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 292 | java | package itba.dreamair2.contracts;
/**
* Created by martin on 25/6/17.
*/
public interface BroadcastContract {
public static final String UPDATE_NOTIFICATIONS = "com.dreamAir.UPDATE_NOTIFICATIONS";
public static final String NOTIFICATION_FREC = "com.dreamAir.NOTIFICATION_FREC";
}
| [
"martin@victory.com.ar"
] | martin@victory.com.ar |
b37c8e961c809609f822dfa2dfaa7c8a78d9b3f1 | 1880b5cc7614115ead2499cb526ca53e964696ba | /BookCode/src/ch07/circular/CRefUnsortedList.java | f0569bdf4ca5db66edc7450c4edd81be034667aa | [] | no_license | peterdobbs77/datastructures_java | cb7060c06f197f1322a68d948f1e2bb14512daaf | e3df2952d3137cb3475d1ffbdb962aa95c45d157 | refs/heads/master | 2021-08-28T00:39:47.969725 | 2017-12-10T22:27:16 | 2017-12-10T22:27:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,047 | java | //----------------------------------------------------------------------
// CRefUnsortedList.java by Dale/Joyce/Weems Chapter 7
//
// Implements the ListInterface using references
// (a circular linked list).
//
// Null elements are not permitted on a list.
//
// One constructor is provided, one that creates an empty list.
//----------------------------------------------------------------------
package ch07.circular;
import support.LLNode;
import ch06.lists.ListInterface;
public class CRefUnsortedList<T> implements ListInterface<T> {
protected int numElements; // Number of elements on this list
protected LLNode<T> currentPos; // Current position for iteration
// set by find method
protected boolean found; // true if element found, else false
protected LLNode<T> location; // node containing element, if found
protected LLNode<T> previous; // node preceding location
protected LLNode<T> list; // the last node on the list
public CRefUnsortedList() {
numElements = 0;
list = null;
currentPos = null;
}
public void add(T element)
// Adds element to this list.
{
LLNode<T> newNode = new LLNode<T>(element);
if (list == null) {
// add element to an empty list
list = newNode;
newNode.setLink(list);
} else {
// add element to a non-empty list
newNode.setLink(list.getLink());
list.setLink(newNode);
list = newNode;
}
numElements++;
}
protected void find(T target)
// Searches list for an occurrence of an element e such that
// e.equals(target). If successful, sets instance variables
// found to true, location to node containing e, and previous
// to the node that links to location. If unsuccessful, sets
// found to false.
{
location = list;
found = false;
if (list != null)
do {
// move search to the next node
previous = location;
location = location.getLink();
// check for a match
if (location.getInfo().equals(target))
found = true;
} while ((location != list) && !found);
}
public int size()
// Returns the number of elements on this list.
{
return numElements;
}
public boolean contains(T element)
// Returns true if this list contains an element e such that
// e.equals(element), otherwise returns false.
{
find(element);
return found;
}
public boolean remove(T element)
// Removes an element e from this list such that e.equals(element)
// and returns true; if no such element exists, returns false.
{
find(element);
if (found) {
if (list == list.getLink()) // if single-element list
list = null;
else if (previous.getLink() == list) // if removing last node
list = previous;
previous.setLink(location.getLink()); // remove node
numElements--;
}
return found;
}
public T get(T element)
// Returns an element e from this list such that e.equals(element);
// if no such element exists returns null.
{
find(element);
if (found)
return location.getInfo();
else
return null;
}
public String toString()
// Returns a nicely formatted string that represents this list.
{
String listString = "List:\n";
if (list != null) {
LLNode<T> prevNode = list;
do {
listString = listString + " " + prevNode.getLink().getInfo()
+ "\n";
prevNode = prevNode.getLink();
} while (prevNode != list);
}
return listString;
}
public void reset()
// Initializes current position for an iteration through this list,
// to the first element on this list.
{
if (list != null)
currentPos = list.getLink();
}
public T getNext()
// Preconditions: the list is not empty
// the list has been reset
// the list has not been modified since most recent reset
//
// Returns the element at the current position on this list.
// If the current position is the last element then it advances the value
// of the current position to the first element, otherwise it advances
// the value of the current position to the next element.
{
T next = currentPos.getInfo();
currentPos = currentPos.getLink();
return next;
}
}
| [
"dobbsp8@gmail.com"
] | dobbsp8@gmail.com |
abc324e5c818165bcc52adc166ff0795f17a72d0 | c1bb74d85a4de3452ce189486f929fcac66239cc | /app/src/main/java/com/example/flixster/DetailActivity.java | 250d36228b98b849e3a4e653c8d55d31ba8a34dd | [] | no_license | SakinahCot2/Flixster-part1 | 57253aa2e0cd949fca530f61a6b26d5d96814aa2 | d1e41b2d1c4b0a7cd12f332ed61e78b2038291d0 | refs/heads/master | 2022-12-28T21:13:57.163276 | 2020-10-06T00:07:27 | 2020-10-06T00:07:27 | 298,922,526 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,443 | java | package com.example.flixster;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.RatingBar;
import android.widget.TextView;
import com.codepath.asynchttpclient.AsyncHttpClient;
import com.codepath.asynchttpclient.callback.JsonHttpResponseHandler;
import com.example.flixster.models.Movie;
import com.google.android.youtube.player.YouTubeBaseActivity;
import com.google.android.youtube.player.YouTubeInitializationResult;
import com.google.android.youtube.player.YouTubePlayer;
import com.google.android.youtube.player.YouTubePlayerView;
import org.json.JSONArray;
import org.json.JSONException;
import org.parceler.Parcels;
import okhttp3.Headers;
public class DetailActivity extends YouTubeBaseActivity {
public static final String YOUTUBE_API_KEY = "AIzaSyDCn3XmxrPLBnILww9HSlUbejAdGP_8CUo";
public static final String VIDEOS_URL = "https://api.themoviedb.org/3/movie/%d/videos?api_key=a07e22bc18f5cb106bfe4cc1f83ad8ed";
TextView tvTitle;
TextView tvOverview;
RatingBar ratingBar;
YouTubePlayerView youTubePlayerView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);
tvTitle = findViewById(R.id.tvTitle);
tvOverview = findViewById(R.id.tvOverview);
ratingBar = findViewById(R.id.ratingBar);
youTubePlayerView = findViewById(R.id.player);
Movie movie = Parcels.unwrap(getIntent().getParcelableExtra("movie"));
tvTitle.setText(movie.getTitle());
tvOverview.setText(movie.getOverview());
ratingBar.setRating((float)movie.getRating());
AsyncHttpClient client = new AsyncHttpClient();
client.get(String.format(VIDEOS_URL, movie.getMovieId()), new JsonHttpResponseHandler() {
@Override
public void onSuccess(int statusCode, Headers headers, JSON json) {
try {
JSONArray results = json.jsonObject.getJSONArray("results");
if(results.length() == 0){
return;
}
String youtubeKey = results.getJSONObject(0).getString("key");
Log.d("DetailActivity", youtubeKey);
initializeYoutube(youtubeKey);
} catch (JSONException e) {
Log.e("DetailActivity", "Failed to parse JSON", e);
e.printStackTrace();
}
}
@Override
public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {
}
});
}
private void initializeYoutube(final String youtubeKey) {
youTubePlayerView.initialize(YOUTUBE_API_KEY, new YouTubePlayer.OnInitializedListener() {
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) {
Log.d("DetailActivity", "onInitializationSuccess");
youTubePlayer.cueVideo(youtubeKey);
}
@Override
public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {
Log.d("DetailActivity", "onInitializationFailure");
}
});
}
} | [
"sakinah@Sakinahs-MacBook-Pro.local"
] | sakinah@Sakinahs-MacBook-Pro.local |
045e55b161b347dbdd455fe0520df220f8279599 | 29a1c4e9f78a079b5f498c56709e383b225ac012 | /src/main/java/me/michaelkrauty/MCWrapper/SQL.java | b764802590c2ae134fecece14080dedeea3733d7 | [] | no_license | michaelkrauty/MCWrapper | 75d22a91a8fcb238ea411ee097af31e6d4830490 | d413ff2e6cd21a7a5e413d38c53dc106050359a9 | refs/heads/master | 2016-08-05T11:23:19.212386 | 2014-06-27T04:24:03 | 2014-06-27T04:24:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,786 | java | package me.michaelkrauty.MCWrapper;
import org.apache.log4j.Logger;
import java.sql.*;
import java.util.ArrayList;
public class SQL {
private final static Logger log = Logger.getLogger(Main.class);
private static Connection connection;
private synchronized static void openConnection() {
try {
connection = DriverManager.getConnection("jdbc:mysql://"
+ Main.config.getDBHost() + ":" + Main.config.getDBPort()
+ "/" + Main.config.getDBDatabase(), Main.config.getDBUser(),
Main.config.getDBPass()
);
} catch (Exception e) {
log.error("Couldn't connect to database! Reason: " + e.getMessage());
}
}
private synchronized static void closeConnection() {
try {
connection.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public synchronized static boolean checkTables() {
openConnection();
boolean res = true;
try {
PreparedStatement stmt = connection.prepareStatement("CREATE TABLE IF NOT EXISTS `servers` (id int(11) PRIMARY KEY, owner int(11), host varchar(256), port int(11), memory int(11), jar int(11), suspended tinyint(4), name varchar(256));");
stmt.execute();
} catch (Exception e) {
e.printStackTrace();
res = false;
}
try {
PreparedStatement stmt = connection.prepareStatement("CREATE TABLE IF NOT EXISTS `jars` (`id` int(11) PRIMARY KEY, `name` varchar(256), `mod` varchar(256), `version` varchar(256), `build` varchar(256), `location` varchar(256), `startup_args` varchar(256));");
stmt.execute();
} catch (Exception e) {
e.printStackTrace();
res = false;
}
try {
PreparedStatement stmt = connection.prepareStatement("CREATE TABLE IF NOT EXISTS `users` (ID int(11) PRIMARY KEY, email varchar(256), username varchar(256), password varchar(256), date_registered varchar(256));");
stmt.execute();
} catch (Exception e) {
e.printStackTrace();
res = false;
}
closeConnection();
return res;
}
public synchronized static boolean serverDataContainsServer(int serverid) {
openConnection();
try {
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `servers` WHERE id=?;");
sql.setInt(1, serverid);
ResultSet resultSet = sql.executeQuery();
boolean containsServer = resultSet.next();
sql.close();
resultSet.close();
closeConnection();
return containsServer;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
private synchronized static boolean userDataContainsId(int userid) {
openConnection();
try {
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `users` WHERE id=?;");
sql.setInt(1, userid);
ResultSet resultSet = sql.executeQuery();
boolean containsServer = resultSet.next();
sql.close();
resultSet.close();
closeConnection();
return containsServer;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
private synchronized static boolean userDataContainsEmail(String email) {
openConnection();
try {
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `users` WHERE email=?;");
sql.setString(1, email);
ResultSet resultSet = sql.executeQuery();
boolean containsServer = resultSet.next();
sql.close();
resultSet.close();
closeConnection();
return containsServer;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public synchronized static int getServerOwner(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `servers` WHERE id=?;");
sql.setInt(1, serverid);
ResultSet result = sql.executeQuery();
result.next();
return result.getInt("owner");
} else {
return -1;
}
} catch (Exception e) {
e.printStackTrace();
return -1;
} finally {
closeConnection();
}
}
public synchronized static String getServerHost(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `servers` WHERE id=?;");
sql.setInt(1, serverid);
ResultSet result = sql.executeQuery();
result.next();
return result.getString("host");
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
closeConnection();
}
}
public synchronized static int getServerPort(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `servers` WHERE id=?;");
sql.setInt(1, serverid);
ResultSet result = sql.executeQuery();
result.next();
return result.getInt("port");
} else {
return -1;
}
} catch (Exception e) {
e.printStackTrace();
return -1;
} finally {
closeConnection();
}
}
public synchronized static int getServerMemory(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `servers` WHERE id=?;");
sql.setInt(1, serverid);
ResultSet result = sql.executeQuery();
result.next();
return result.getInt("memory");
} else {
return -1;
}
} catch (Exception e) {
e.printStackTrace();
return -1;
} finally {
closeConnection();
}
}
public synchronized static int getServerJarId(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `servers` WHERE id=?;");
sql.setInt(1, serverid);
ResultSet result = sql.executeQuery();
result.next();
return result.getInt("jar");
} else {
return -1;
}
} catch (Exception e) {
e.printStackTrace();
return -1;
} finally {
closeConnection();
}
}
public synchronized static String getServerJarPath(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `jars` WHERE id=?;");
sql.setInt(1, getServerJarId(serverid));
ResultSet result = sql.executeQuery();
result.next();
return result.getString("location");
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
closeConnection();
}
}
public synchronized static boolean getServerSuspended(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `servers` WHERE id=?;");
sql.setInt(1, serverid);
ResultSet result = sql.executeQuery();
result.next();
return result.getBoolean("suspended");
} else {
return false;
}
} catch (Exception e) {
e.printStackTrace();
return false;
} finally {
closeConnection();
}
}
public synchronized static String getServerName(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `servers` WHERE id=?;");
sql.setInt(1, serverid);
ResultSet result = sql.executeQuery();
result.next();
return result.getString("name");
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
closeConnection();
}
}
public static boolean getServerCrashDetection(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `servers` WHERE id=?;");
sql.setInt(1, serverid);
ResultSet result = sql.executeQuery();
result.next();
return result.getBoolean("crash_detection");
} else {
return false;
}
} catch (Exception e) {
e.printStackTrace();
return false;
} finally {
closeConnection();
}
}
private synchronized static ArrayList<String> getAllServers() {
try {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT `id` FROM `servers`;");
ResultSet result = sql.executeQuery();
result.last();
int items = result.getRow();
result.first();
ArrayList<String> ids = new ArrayList<String>();
for (int i = 0; i < items; i++) {
ids.add(result.getString(1));
result.next();
}
return ids;
} catch (Exception e) {
e.printStackTrace();
} finally {
closeConnection();
}
return null;
}
public synchronized static int getUserIdByEmail(String email) {
try {
if (userDataContainsEmail(email)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `users` WHERE email=?;");
sql.setString(1, email);
ResultSet result = sql.executeQuery();
result.next();
return result.getInt("id");
} else {
return -1;
}
} catch (Exception e) {
e.printStackTrace();
return -1;
} finally {
closeConnection();
}
}
public synchronized static String getUserEmail(int userid) {
try {
if (userDataContainsId(userid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `users` WHERE id=?;");
sql.setInt(1, userid);
ResultSet result = sql.executeQuery();
result.next();
return result.getString("email");
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
closeConnection();
}
}
public synchronized static String getUserUsername(int userid) {
try {
if (userDataContainsId(userid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `users` WHERE id=?;");
sql.setInt(1, userid);
ResultSet result = sql.executeQuery();
result.next();
return result.getString("username");
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
closeConnection();
}
}
public synchronized static String getUserPassword(int userid) {
try {
if (userDataContainsId(userid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `users` WHERE id=?;");
sql.setInt(1, userid);
ResultSet result = sql.executeQuery();
result.next();
return result.getString("password");
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
closeConnection();
}
}
public synchronized static String getUserDate_Registered(int userid) {
try {
if (userDataContainsId(userid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `users` WHERE id=?;");
sql.setInt(1, userid);
ResultSet result = sql.executeQuery();
result.next();
return result.getString("date_registered");
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
closeConnection();
}
}
public synchronized static ArrayList<Integer> getUserServers(int userid) {
ArrayList<Integer> servers = new ArrayList<Integer>();
ArrayList<String> allServers = getAllServers();
for (String svr : allServers) {
if (getServerOwner(Integer.parseInt(svr)) == userid) {
servers.add(Integer.parseInt(svr));
}
}
return servers;
}
public synchronized static String getServerMod(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `jars` WHERE id=?;");
sql.setInt(1, getServerJarId(serverid));
ResultSet result = sql.executeQuery();
result.next();
return result.getString("mod");
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
closeConnection();
}
}
public synchronized static String getServerStartupCommand(int serverid) {
try {
if (serverDataContainsServer(serverid)) {
openConnection();
PreparedStatement sql = connection
.prepareStatement("SELECT * FROM `jars` WHERE id=?;");
sql.setInt(1, getServerJarId(serverid));
ResultSet result = sql.executeQuery();
result.next();
return result.getString("startup_args");
} else {
return null;
}
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
closeConnection();
}
}
} | [
"michaelkrauty@gmail.com"
] | michaelkrauty@gmail.com |
66d58c42c177424549f055c461150b355617beb3 | 128eb90ce7b21a7ce621524dfad2402e5e32a1e8 | /laravel-converted/src/main/java/com/project/convertedCode/servlets/vendor/laravel/framework/src/Illuminate/Mail/servlet_Mailable_php.java | 5842738940ebc26ad0fa14ad0e202e9fcbc169a7 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | RuntimeConverter/RuntimeConverterLaravelJava | 657b4c73085b4e34fe4404a53277e056cf9094ba | 7ae848744fbcd993122347ffac853925ea4ea3b9 | refs/heads/master | 2020-04-12T17:22:30.345589 | 2018-12-22T10:32:34 | 2018-12-22T10:32:34 | 162,642,356 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,173 | java | package com.project.convertedCode.servlets.vendor.laravel.framework.src.Illuminate.Mail;
import com.runtimeconverter.runtime.includes.RuntimeIncludable;
import com.runtimeconverter.runtime.includes.RuntimeConverterServlet;
import com.runtimeconverter.runtime.RuntimeEnv;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.annotation.WebServlet;
@WebServlet("/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php")
public class servlet_Mailable_php extends RuntimeConverterServlet {
protected final RuntimeIncludable getInclude() {
return com.project
.convertedCode
.includes
.vendor
.laravel
.framework
.src
.Illuminate
.Mail
.file_Mailable_php
.instance;
}
protected final RuntimeEnv getRuntimeEnv(
String httpRequestType, HttpServletRequest req, HttpServletResponse resp) {
return new com.project.convertedCode.main.ConvertedProjectRuntimeEnv(
req, resp, this.getInclude());
}
}
| [
"git@runtimeconverter.com"
] | git@runtimeconverter.com |
076945f9fe7346085ee81d403a71a6ad9c56796d | 94bb5d2fb477bff763bee040740fe9674d1920ec | /src/com/mongo/assign/Company.java | 0fd27f815583ca0067029dba083bad865d8564cd | [] | no_license | MohdGufran44/mongo-java-assignment | d88096823790bfb272534454b5dc5f91cda41ca8 | 3ba91bd6a77fef50404a7e759584ed094b722584 | refs/heads/master | 2022-07-28T02:29:45.504604 | 2020-05-15T12:40:52 | 2020-05-15T12:40:52 | 264,191,119 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,091 | java | package com.mongo.assign;
import java.util.ArrayList;
import java.util.List;
import org.bson.Document;
import com.mongodb.MongoClient;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
public class Company {
public static void main(String[] args) {
try {
MongoClient mongo = new MongoClient( "localhost" , 27017 );
MongoDatabase db = mongo.getDatabase("mongoAssign01");
MongoCollection<Document> collection = db.getCollection("company");
Document document = new Document("name", "SB").append("since", "26");
Document document1 = new Document("name", "Pieriandx").append("since", "6");
Document document2 = new Document("name", "Persistent").append("since", "14");
List<Document> documents = new ArrayList<>();
documents.add(document);
documents.add(document1);
documents.add(document2);
collection.insertMany(documents);
System.out.println("collection created successfully");
}catch(Exception e) {
System.out.println(e);
}
}
}
| [
"Mohd@HP"
] | Mohd@HP |
1d2591772a6bb709574894652a07de9712ab4761 | 762690322d176cdf0e59fe9965ae4a644aec27cf | /app/src/main/java/com/example/rentorhire/Hire.java | 7c0f75a145191f18215905a2c88deeac2255d0e8 | [] | no_license | arijit98/RentoHire | 407e7af7ef6a8a6cb50edfb04c623efdc310e7a2 | eb82df366c471d71b7d8cf8cedae00c0da3e8a4a | refs/heads/master | 2022-11-15T04:17:38.989252 | 2020-07-08T10:20:29 | 2020-07-08T10:20:29 | 278,057,802 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,788 | java | package com.example.rentorhire;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.FragmentActivity;
import android.Manifest;
import android.content.pm.PackageManager;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
import com.parse.DeleteCallback;
import com.parse.FindCallback;
import com.parse.ParseException;
import com.parse.ParseGeoPoint;
import com.parse.ParseObject;
import com.parse.ParseQuery;
import com.parse.ParseUser;
import com.parse.SaveCallback;
import java.util.List;
public class Hire extends FragmentActivity implements OnMapReadyCallback, View.OnClickListener {
private GoogleMap mMap;
private LocationManager mLocationManager;
private LocationListener mLocationListener;
private Button btnRequestCar;
private Boolean isCarCancelled=true;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_hire);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
btnRequestCar=findViewById(R.id.btnRequestCar);
btnRequestCar.setOnClickListener(this);
}
/**
* Manipulates the map once available.
* This callback is triggered when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the camera. In this case,
* we just add a marker near Sydney, Australia.
* If Google Play services is not installed on the device, the user will be prompted to install
* it inside the SupportMapFragment. This method will only be triggered once the user has
* installed Google Play services and returned to the app.
*/
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
mLocationListener = new LocationListener() {
@Override
public void onLocationChanged(Location location) {
updateCameraPassengerLocation(location);
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onProviderDisabled(String provider) {
}
};
if (Build.VERSION.SDK_INT >= 23) {
if (ContextCompat.checkSelfPermission(Hire.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(Hire.this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1000);
} else {
mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocationListener);
}
} else {
mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocationListener);
}
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == 1000 && grantResults.length > 0) {
if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.checkSelfPermission(Hire.this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocationListener);
Location currentPassengerLocation = mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
updateCameraPassengerLocation(currentPassengerLocation);
}
}
}
}
private void updateCameraPassengerLocation(Location location) {
LatLng passengerLocation = new LatLng(location.getLatitude(), location.getLongitude());
mMap.clear();
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(passengerLocation, 14));
mMap.addMarker(new MarkerOptions().position(passengerLocation).title("Your are here"));
}
@Override
public void onClick(View v) {
if(isCarCancelled){
if(ContextCompat.checkSelfPermission(Hire.this,Manifest.permission.ACCESS_FINE_LOCATION)==PackageManager.PERMISSION_GRANTED){
mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,mLocationListener);
Location passengersCurrentLocation = mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
if (passengersCurrentLocation!=null){
ParseObject hired=new ParseObject("CarHired");
hired.put("username", ParseUser.getCurrentUser().getUsername());
ParseGeoPoint userLocation= new ParseGeoPoint(passengersCurrentLocation.getLatitude(),passengersCurrentLocation.getLongitude());
hired.put("location",userLocation);
hired.saveInBackground(new SaveCallback() {
@Override
public void done(ParseException e) {
if(e==null){
btnRequestCar.setText("Cancel car Request");
isCarCancelled=false;
}else {
Toast.makeText(Hire.this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
});
}else {
Toast.makeText(this, "Unknown Error. Something went wrong!!!", Toast.LENGTH_SHORT).show();
}
}
}else{
ParseQuery<ParseObject> carRequestQuery=ParseQuery.getQuery("CarHired");
carRequestQuery.whereEqualTo("username",ParseUser.getCurrentUser().getUsername());
carRequestQuery.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(List<ParseObject> objects, ParseException e) {
if (objects.size()>0 && e==null){
isCarCancelled=true;
btnRequestCar.setText("Hire a Car");
for (ParseObject carRequest:objects){
carRequest.deleteInBackground(new DeleteCallback() {
@Override
public void done(ParseException e) {
if(e==null){
Toast.makeText(Hire.this, "Request/'s deleted", Toast.LENGTH_SHORT).show();
}
}
});
}
}
}
});
}
}
} | [
"arijit.p.17003@iitgoa.ac.in"
] | arijit.p.17003@iitgoa.ac.in |
505ffad1091a00d1234963d234c006bbdb59e00c | b07e7c7495f5d9babd8ec96157a98c051c032842 | /kafkaPOC/src/main/java/com/kvs/learn/ProducerEx.java | db000570f67b5fad85598096b0d0c9307f91e81f | [] | no_license | sureshpothineni/KMClusteringLearning | 7fee020eea53b5bfa1adaa8f3e5f083901bbde18 | 42a93d12d87f5141ccfcb8b8fdbde3b8eb57f9ac | refs/heads/master | 2021-05-01T05:33:09.509855 | 2017-06-30T18:48:48 | 2017-06-30T18:48:48 | 79,756,662 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,188 | java | package com.kvs.learn;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerRecord;
import com.google.common.io.Resources;
/**
* This producer will send a bunch of messages to topic "kvsKafka". Every so often,
* it will send a message to "slow-messages". This shows how messages can be sent to
* multiple topics. On the receiving end, we will see both kinds of messages but will
* also see how the two topics aren't really synchronized.
*/
public class ProducerEx {
public static void main(String[] args) throws IOException {
// set up the producer
KafkaProducer<String, String> producer;
try (InputStream props = Resources.getResource("producer.props").openStream()) {
Properties properties = new Properties();
properties.load(props);
producer = new KafkaProducer<>(properties);
}
try {
while(true){
for (int i = 0; i < 10; i++) {
// send lots of messages
producer.send(new ProducerRecord<String, String>(
"kvsKafka1",
String.format("{\"type\":\"this is common message\", \"t\":%.3f, \"k\":%d}", System.nanoTime() * 1e-9, i)));
System.out.println("Sent msg number " + i);
// every so often send to a different topic
if (i % 10 == 0) {
producer.send(new ProducerRecord<String, String>(
"test",
String.format("{\"type\":\"this is special message\", \"t\":%.3f, \"k\":%d}", System.nanoTime() * 1e-9, i)));
producer.flush();
System.out.println("Sent msg number " + i);
}
}
TimeUnit.SECONDS.sleep(15);
}
} catch (Throwable throwable) {
System.out.printf("%s", throwable.getStackTrace());
} finally {
producer.close();
}
}
} | [
"suresh.pothineni@CGI-D32887.ams.com"
] | suresh.pothineni@CGI-D32887.ams.com |
e3edee6b9985b863d21d68e8e771bb59810d3d8d | 1e962766b8ff6c68e6dfd0b99cbcadc1eaf23fa0 | /demo/src/main/java/com/hjq/java8/feature/component/DateApiTest.java | 4f157a0e748e43ce550526a91a859262aa14f8a0 | [
"Apache-2.0"
] | permissive | hjq2016/java8-feature | 5683d78057e40ac100ed926a8a6f0d1bf907f702 | 1f27b5c0fcdc119838e7044c1651065568a78709 | refs/heads/main | 2023-01-25T04:07:26.145202 | 2020-12-08T10:42:48 | 2020-12-08T10:42:48 | 317,103,168 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 838 | java | package com.hjq.java8.feature.component;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.time.Clock;
import java.time.Instant;
import java.time.ZoneId;
import java.util.Date;
import java.util.List;
import java.util.Set;
/**
* @Description
* @Author hjq
* @Date 2020/12/8
*/
@Component
@Slf4j
public class DateApiTest {
public void action() {
Clock clock = Clock.systemDefaultZone();
long millis = clock.millis();
log.info("" + millis);
long current = System.currentTimeMillis();
log.info("" + current);
Instant instant = clock.instant();
Set<String> nn = ZoneId.getAvailableZoneIds();
// nn.forEach(a -> log.info(a));
log.info("{} {} ", nn.stream().count(), nn.size());
Date.from(instant);
}
}
| [
"924946361@qq.com"
] | 924946361@qq.com |
f90e3b69fa00bb3c244f7cc1419321a3282a802c | f122668a027514d5b72f5b845677613a9486ba0c | /src/main/java/com/xiang/mapper/UserMapper.java | 5858d06cc1a35650a77604df3f5480eccd69188d | [
"MIT"
] | permissive | erichuang2015/CMSLite | 38d86d30024deff401df61943ade9aaf9dc9c58c | 41f65378223299a5c68989057be8c9ecfd0b7937 | refs/heads/master | 2020-06-21T19:49:41.374522 | 2019-07-05T07:55:21 | 2019-07-05T07:55:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,965 | java | package com.xiang.mapper;
import com.xiang.bean.po.User;
import com.xiang.bean.po.UserExample;
import com.xiang.exmapper.ExUserMapper;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
public interface UserMapper extends ExUserMapper {
long countByExample(UserExample example);
@Insert({
"insert into user (id, user_name, ",
"password, nick, ",
"roles, del, add_time)",
"values (#{id,jdbcType=BIGINT}, #{userName,jdbcType=VARCHAR}, ",
"#{password,jdbcType=VARCHAR}, #{nick,jdbcType=VARCHAR}, ",
"#{roles,jdbcType=VARCHAR}, #{del,jdbcType=BIT}, #{addTime,jdbcType=TIMESTAMP})"
})
int insert(User record);
int insertSelective(User record);
List<User> selectByExample(UserExample example);
@Select({
"select",
"id, user_name, password, nick, roles, del, add_time",
"from user",
"where id = #{id,jdbcType=BIGINT}"
})
@ResultMap("com.xiang.mapper.UserMapper.BaseResultMap")
User selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
int updateByExample(@Param("record") User record, @Param("example") UserExample example);
int updateByPrimaryKeySelective(User record);
@Update({
"update user",
"set user_name = #{userName,jdbcType=VARCHAR},",
"password = #{password,jdbcType=VARCHAR},",
"nick = #{nick,jdbcType=VARCHAR},",
"roles = #{roles,jdbcType=VARCHAR},",
"del = #{del,jdbcType=BIT},",
"add_time = #{addTime,jdbcType=TIMESTAMP}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(User record);
} | [
"95316219@qq.com"
] | 95316219@qq.com |
f78f4202d508dad1327772586c4896a900f47c9e | 841d9454001c157e18eceb0136c7d9b66db4d605 | /Collage_Work/sumOfTwo.java | 995c3f21f9cac85a7c54728091cad37764696c4f | [] | no_license | ironsubhajit/JavaCodeMark_01 | b5f795894d32c7548a20b3b359e513f208547b82 | b4002d2c466cde66929453cb7bab64d78d9792d1 | refs/heads/main | 2023-04-02T16:03:55.934385 | 2021-04-03T15:14:30 | 2021-04-03T15:14:30 | 352,894,822 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 254 | java | import java.lang.*;
public class sumOfTwo {
public static void main(String[] args) {
int sum = Integer.parseInt(args[0]) + Integer.parseInt(args[1]);
System.out.println("Sum of "+args[0]+" and "+args[1]+" is: "+sum);
}
}
| [
"noreply@github.com"
] | ironsubhajit.noreply@github.com |
1d9f6ae47f9854eda59a59d5000ecf642e4cbd88 | d9958b8445ac0246342429426f268bf7ff8d313f | /app/src/main/java/com/example/url/sousuoliebiao/SearchList.java | 1121a9b0c48c8a2559b36c72eb9f098f14789b45 | [] | no_license | guzhaoyuan123/WYYProject | 577fbe7766496308412ad434703f9696cb48e538 | 71460aef9143048d0eb70516f6822451d282b188 | refs/heads/master | 2020-09-29T11:01:09.070318 | 2019-12-25T01:22:40 | 2019-12-25T01:22:40 | 227,023,846 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,035 | java | package com.example.url.sousuoliebiao;
//搜索的列表的请求类结果
public class SearchList {
/**
* result : {"allMatch":[{"keyword":"海阔天空","type":1,"alg":"alg_psug_a","lastKeyword":"海阔天空"},{"keyword":"海阔天空抖音版","type":1,"alg":"alg_psug_a","lastKeyword":"海阔天空"},{"keyword":"海阔天空国语版","type":1,"alg":"alg_psug_a","lastKeyword":"海阔天空"},{"keyword":"海阔天空伴奏","type":1,"alg":"alg_psug_a","lastKeyword":"海阔天空"},{"keyword":"海阔天空dj","type":1,"alg":"alg_psug_a","lastKeyword":"海阔天空"},{"keyword":"海阔天空国语","type":1,"alg":"alg_psug_a","lastKeyword":"海阔天空"}]}
* code : 200
*/
private ResultBean result;
private int code;
public ResultBean getResult() {
return result;
}
public void setResult(ResultBean result) {
this.result = result;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}
| [
"2469754120@qq.com"
] | 2469754120@qq.com |
6ba66794bb8c72902f8f3a20ff2c9ee561b75b1d | 9a662e7230789604ab000975f5a22185c4594826 | /StoreApplication/test/com/iss/storeApplication/test/ReportServiceTest.java | bb9d9cbe8e9532a65b7e1e5a85c399dc42ac48f8 | [] | no_license | milandashara/StoreApps-Assignment | 3e3df4007fa51492d87b24322b6a91c9f9c8f8c7 | eea161c466d28642c933ab98e91e7a2475887575 | refs/heads/master | 2020-06-06T13:18:08.770992 | 2014-06-02T07:05:36 | 2014-06-02T07:05:36 | 17,620,235 | 0 | 1 | null | 2014-03-31T10:56:18 | 2014-03-11T06:05:10 | Java | UTF-8 | Java | false | false | 2,089 | java | package com.iss.storeApplication.test;
import static org.junit.Assert.assertEquals;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.junit.Test;
import com.iss.storeApplication.business.DiscountService;
import com.iss.storeApplication.common.Constants;
import com.iss.storeApplication.common.StringUtility;
import com.iss.storeApplication.component.DatePicker;
import com.iss.storeApplication.controller.Controller;
public class ReportServiceTest {
private final DatePicker startDate = new DatePicker("startDate", false);
private final DatePicker endDate = new DatePicker("endDate", false);
String startDt;
String endDt;
Date todayDate = new Date();
int MILLIS_IN_DAY = 1000 * 60 * 60 * 24;
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy");
String prevDate = dateFormat.format(todayDate.getTime() - MILLIS_IN_DAY);
String currDate = dateFormat.format(todayDate.getTime());
String nextDate = dateFormat.format(todayDate.getTime() + MILLIS_IN_DAY);
@Test
public void test() {
startDate.setDate(StringUtility.getDateFromString(currDate));
endDate.setDate(StringUtility.getDateFromString(currDate));
assertEquals(Controller.validateTimePeriod(startDate, endDate), true);
startDate.setDate(StringUtility.getDateFromString(prevDate));
endDate.setDate(StringUtility.getDateFromString(prevDate));
assertEquals(Controller.validateTimePeriod(startDate, endDate), true);
startDate.setDate(StringUtility.getDateFromString(prevDate));
endDate.setDate(StringUtility.getDateFromString(currDate));
assertEquals(Controller.validateTimePeriod(startDate, endDate), true);
startDate.setDate(StringUtility.getDateFromString(prevDate));
endDate.setDate(StringUtility.getDateFromString(nextDate));
assertEquals(Controller.validateTimePeriod(startDate, endDate), true);
startDate.setDate(StringUtility.getDateFromString(nextDate));
endDate.setDate(StringUtility.getDateFromString(currDate));
assertEquals(Controller.validateTimePeriod(startDate, endDate), false);
}
}
| [
"sakthi@sakthi-VAIO"
] | sakthi@sakthi-VAIO |
d390e362cf9bb8bbf0a08e96d11cc79e7db592a9 | e533afec7a99c84883b7cda80ff41e2e682de652 | /src/com/easyshare/DatabaseModel.java | 2417b6fb78db2e7a05f07c5b78e70c72e18459d8 | [] | no_license | MutumaMiles/Groupwan | 77929f6c0322e657c580e50ef686b2dfe8618d7c | 0c94caa8b0dd0814a1f926871a6b4ed91337b50a | refs/heads/master | 2020-04-17T19:52:54.370839 | 2016-11-09T11:32:50 | 2016-11-09T11:32:50 | 66,821,926 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,825 | java | package com.easyshare;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* Created by mutuma on 7/29/2016.
*/
public class DatabaseModel
{
private static Connection connection=Database.getConnection();
public static void closeConnection(){
try {
connection.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
public static boolean isUser()
{
String sql="SELECT * FROM account";
PreparedStatement getUser=null;
ResultSet results=null;
try
{
getUser=connection.prepareStatement(sql);
results=getUser.executeQuery();
if(results.next())
{
return true;
}
else
{
return false;
}
} catch (SQLException e) {
e.printStackTrace();
return false;
}
}
public static boolean userDetails(String username,String imageURL)
{
PreparedStatement insert=null;
int result=0;
try {
insert=connection.prepareStatement("INSERT INTO account(username,image)VALUES(?,?)");
insert.setString(1,username);
insert.setString(2,imageURL);
result=insert.executeUpdate();
if(result==1)
{
return true;
}
else
return false;
} catch (SQLException e) {
e.printStackTrace();
return false;
}
}
public static String getImageURL()
{
PreparedStatement getImage=null;
ResultSet results=null;
try {
getImage=connection.prepareStatement("SELECT image FROM account");
results=getImage.executeQuery();
while(results.next())
{
return results.getString("image");
}
} catch (SQLException e) {
e.printStackTrace();
return null;
}
return null;
}
public static String getUsername()
{
PreparedStatement getusername=null;
ResultSet results=null;
try {
getusername=connection.prepareStatement("SELECT username FROM account");
results=getusername.executeQuery();
while(results.next())
{
return results.getString("username");
}
} catch (SQLException e) {
e.printStackTrace();
return null;
}
return null;
}
public static void insertFriendDetails(String name,String ipAddress,String image)
{
PreparedStatement insertDetails=null;
try {
insertDetails=connection.prepareStatement("INSERT INTO friends(friendName,ipAddress,image)VALUES(?,?,?)");
insertDetails.setString(1,name);
insertDetails.setString(2,ipAddress);
insertDetails.setString(3,image);
insertDetails.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
}
public static String getIpAddress(String name)
{
PreparedStatement getIpAddress=null;
ResultSet results=null;
try {
getIpAddress=connection.prepareStatement("SELECT ipAddress FROM friends WHERE friendName=?");
getIpAddress.setString(1,name);
results=getIpAddress.executeQuery();
while(results.next())
{
return results.getString("ipAddress");
}
} catch (SQLException e) {
e.printStackTrace();
return null;
}
return null;
}
public static boolean checkUser(String name,String ip){
PreparedStatement preparedStatement=null;
ResultSet resultSet=null;
try{
preparedStatement=connection.prepareStatement("SELECT friendName,ipAddress FROM friends WHERE friendName=? AND ipAddress=?");
preparedStatement.setString(1,name);
preparedStatement.setString(2,ip);
resultSet=preparedStatement.executeQuery();
if(resultSet.next()){
return true;
}
else {
return false;
}
}catch (Exception e){
System.out.println("Error");
e.printStackTrace();
return false;
}
}
public static void deleteUsers(){
PreparedStatement deleteUsers=null;
try {
deleteUsers= Database.getConnection().prepareStatement("DROP TABLE friends");
deleteUsers.executeUpdate();
}catch (SQLException e){
e.printStackTrace();
e.getMessage();
}
}
}
| [
"Edwin Mutuma"
] | Edwin Mutuma |
7437d90907bf15ce470cf0601d51921059455373 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/15/15_84aec880228d1c0292e6f11f9331d4d17ed41756/ProblemAnnotation/15_84aec880228d1c0292e6f11f9331d4d17ed41756_ProblemAnnotation_s.java | 0775758e9a60fb4277265c93987ab560b4caf456 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 7,326 | java | /*******************************************************************************
* Copyright (c) 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.jsp.ui.internal.correction;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation;
import org.eclipse.jdt.internal.ui.javaeditor.JavaMarkerAnnotation;
import org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor;
import org.eclipse.jdt.internal.ui.text.spelling.SpellReconcileStrategy.SpellProblem;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.IAnnotationAccessExtension;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.editors.text.EditorsUI;
import org.eclipse.ui.texteditor.AnnotationPreference;
import org.eclipse.ui.texteditor.AnnotationPreferenceLookup;
public class ProblemAnnotation extends Annotation implements IJavaAnnotation {
private static Image fgQuickFixImage;
private static Image fgQuickFixErrorImage;
private static boolean fgQuickFixImagesInitialized = false;
private ICompilationUnit fCompilationUnit;
private List fOverlaids;
private IProblem fProblem;
private Image fImage;
private boolean fQuickFixImagesInitialized = false;
private int fLayer = IAnnotationAccessExtension.DEFAULT_LAYER;
private static final String SPELLING_ANNOTATION_TYPE = "org.eclipse.ui.workbench.texteditor.spelling"; //$NON-NLS-1$
//XXX: To be fully correct these constants should be non-static
/**
* The layer in which task problem annotations are located.
*/
private static final int TASK_LAYER;
/**
* The layer in which info problem annotations are located.
*/
private static final int INFO_LAYER;
/**
* The layer in which warning problem annotations representing are located.
*/
private static final int WARNING_LAYER;
/**
* The layer in which error problem annotations representing are located.
*/
private static final int ERROR_LAYER;
static {
AnnotationPreferenceLookup lookup = EditorsUI.getAnnotationPreferenceLookup();
TASK_LAYER = computeLayer("org.eclipse.ui.workbench.texteditor.task", lookup); //$NON-NLS-1$
INFO_LAYER = computeLayer("org.eclipse.jdt.ui.info", lookup); //$NON-NLS-1$
WARNING_LAYER = computeLayer("org.eclipse.jdt.ui.warning", lookup); //$NON-NLS-1$
ERROR_LAYER = computeLayer("org.eclipse.jdt.ui.error", lookup); //$NON-NLS-1$
}
private static int computeLayer(String annotationType, AnnotationPreferenceLookup lookup) {
Annotation annotation = new Annotation(annotationType, false, null);
AnnotationPreference preference = lookup.getAnnotationPreference(annotation);
if (preference != null)
return preference.getPresentationLayer() + 1;
else
return IAnnotationAccessExtension.DEFAULT_LAYER + 1;
}
public ProblemAnnotation(IProblem problem, ICompilationUnit cu) {
fProblem = problem;
fCompilationUnit = cu;
if (SpellProblem.Spelling == fProblem.getID()) {
setType(SPELLING_ANNOTATION_TYPE);
fLayer = WARNING_LAYER;
}
else if (IProblem.Task == fProblem.getID()) {
setType(JavaMarkerAnnotation.TASK_ANNOTATION_TYPE);
fLayer = TASK_LAYER;
}
else if (fProblem.isWarning()) {
setType(JavaMarkerAnnotation.WARNING_ANNOTATION_TYPE);
fLayer = WARNING_LAYER;
}
else if (fProblem.isError()) {
setType(JavaMarkerAnnotation.ERROR_ANNOTATION_TYPE);
fLayer = ERROR_LAYER;
}
else {
setType(JavaMarkerAnnotation.INFO_ANNOTATION_TYPE);
fLayer = INFO_LAYER;
}
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation#hasOverlay()
*/
public boolean hasOverlay() {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation#getOverlay()
*/
public IJavaAnnotation getOverlay() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation#getOverlaidIterator()
*/
public Iterator getOverlaidIterator() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation#addOverlaid(org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation)
*/
public void addOverlaid(IJavaAnnotation annotation) {
if (fOverlaids == null)
fOverlaids = new ArrayList(1);
fOverlaids.add(annotation);
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation#removeOverlaid(org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation)
*/
public void removeOverlaid(IJavaAnnotation annotation) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation#isProblem()
*/
public boolean isProblem() {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation#getCompilationUnit()
*/
public ICompilationUnit getCompilationUnit() {
return fCompilationUnit;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation#getArguments()
*/
public String[] getArguments() {
return isProblem() ? fProblem.getArguments() : null;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation#getId()
*/
public int getId() {
return fProblem.getID();
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation#getImage(org.eclipse.swt.widgets.Display)
*/
public Image getImage(Display display) {
initializeImages();
return fImage;
}
private void initializeImages() {
// http://bugs.eclipse.org/bugs/show_bug.cgi?id=18936
if (!fQuickFixImagesInitialized) {
if (isProblem() && indicateQuixFixableProblems() && JavaCorrectionProcessor.hasCorrections(this)) { // no light bulb for tasks
if (!fgQuickFixImagesInitialized) {
fgQuickFixImage = JavaPluginImages.get(JavaPluginImages.IMG_OBJS_FIXABLE_PROBLEM);
fgQuickFixErrorImage = JavaPluginImages.get(JavaPluginImages.IMG_OBJS_FIXABLE_ERROR);
fgQuickFixImagesInitialized = true;
}
if (JavaMarkerAnnotation.ERROR_ANNOTATION_TYPE.equals(getType()))
fImage = fgQuickFixErrorImage;
else
fImage = fgQuickFixImage;
}
fQuickFixImagesInitialized = true;
}
}
private boolean indicateQuixFixableProblems() {
return PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_CORRECTION_INDICATION);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
a5cb51ef8ea470afd854f189faba9373d60630e5 | e5a7ff30ea3c13f0ce77e2ffbe04e9aaf689ba9d | /app/src/main/java/com/android/HuoBiAssistant/model/IEntrustModel.java | dd3f47b0b3308382d537afe07163341081a625fe | [] | no_license | xiaosd6226/Huobi-1 | fb2eb2b46d9b8b90a8ecc5b08f76a7ff10a40a65 | 6cf018fe0567f20a4fe06db17ba546787d07f12a | refs/heads/master | 2020-03-17T09:30:32.413075 | 2016-05-13T10:37:18 | 2016-05-13T10:37:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 838 | java | package com.android.HuoBiAssistant.model;
import com.android.HuoBiAssistant.model.bean.EntrustRes;
import retrofit.Callback;
/**
* 交易model
* Created by xianling on 2016/4/15.
*/
public interface IEntrustModel {
/**
* 限价卖出
* @param amount
* @param price
* @param callback
*/
void getLimitPriceSell(String amount, String price, Callback<EntrustRes> callback);
/**
* 限价买入
*/
void limitPriceBuy(String amount, String price, Callback<EntrustRes> callback);
/**
* 市价买入
* @param amount
* @param callback
*/
void marketPriceBuy(String amount, Callback<EntrustRes> callback);
/**
* 市价卖出
* @param amount
* @param callback
*/
void marketPriceSell(String amount, Callback<EntrustRes> callback);
}
| [
"2116325129@qq.com"
] | 2116325129@qq.com |
f2261eb94c456aeac54c71175948b84b4fe3e060 | 20edb45205f6bfcbaf80dde85d5d7307c628595c | /app/src/main/java/com/softdesig/devintensive/ui/activities/ProfileUserActivity.java | d8ffdcb0ec54ae9e9333c82379163746d99a01aa | [] | no_license | testerfff-dev/DevIntensive | 64d19758d513bc8f5ea6d4a0adb9cf013e532be4 | a3d174d12a7db3dde76940f98665109bd46d53cb | refs/heads/master | 2022-11-07T10:10:42.727580 | 2016-07-18T08:14:13 | 2016-07-18T08:14:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,117 | java | package com.softdesig.devintensive.ui.activities;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.design.widget.CoordinatorLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.softdesig.devintensive.R;
import com.softdesig.devintensive.data.storage.models.UserDTO;
import com.softdesig.devintensive.utils.ConstantManager;
import com.squareup.picasso.Picasso;
import java.util.List;
/**
* @author IsakovVlad
* @created on 16.07.16
*/
public class ProfileUserActivity extends BaseActivity {
private Toolbar mToolbar;
private ImageView mProfileImage;
private EditText mUserBio;
private TextView mUserRating, mUserCodeLines, mUserProjects;
private CollapsingToolbarLayout mCollapsingToolbarLayout;
private CoordinatorLayout mCoordinatorLayout;
private ListView mRepoListView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profile_user);
mToolbar = (Toolbar) findViewById(R.id.toolbar);
mProfileImage = (ImageView) findViewById(R.id.user_photo_img);
mUserBio = (EditText) findViewById(R.id.bio_et);
mUserRating = (TextView) findViewById(R.id.user_rating_txt);
mUserCodeLines = (TextView) findViewById(R.id.user_codelines_txt);
mUserProjects = (TextView) findViewById(R.id.user_projects_txt);
mCollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
mCoordinatorLayout = (CoordinatorLayout) findViewById(R.id.main_coordinator_container);
mRepoListView = (ListView) findViewById(R.id.repositories_list);
setupToolbar();
initProfileData();
}
private void setupToolbar() {
setSupportActionBar(mToolbar);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
}
private void initProfileData() {
UserDTO userDTO = getIntent().getParcelableExtra(ConstantManager.PARCELABLE_KEY);
final List<String> repositories = userDTO.getRepositories();
final RepositoriesAdapter repositoriesAdapter = new RepositoriesAdapter(this, repositories);
mRepoListView.setAdapter(repositoriesAdapter);
// ХАК: установка высоты ListView по элементам
setListViewHeightBasedOnItems(mRepoListView);
mRepoListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent browseIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse("https://" + repositories.get(position)));
startActivity(browseIntent);
}
});
mUserBio.setText(userDTO.getBio());
mUserRating.setText(userDTO.getRating());
mUserCodeLines.setText(userDTO.getCodeLines());
mUserProjects.setText(userDTO.getProjects());
mCollapsingToolbarLayout.setTitle(userDTO.getFullName());
String photoUrl = userDTO.getPhoto();
Picasso.with(this)
.load(photoUrl.isEmpty() ? null : photoUrl)
.placeholder(R.drawable.user_bg)
.error(R.drawable.user_bg)
.into(mProfileImage);
}
/**
* Sets ListView height dynamically based on the height of the items.
*
* @param listView to be resized
* @return true if the listView is successfully resized, false otherwise
*/
public static boolean setListViewHeightBasedOnItems(ListView listView) {
ListAdapter listAdapter = listView.getAdapter();
if (listAdapter != null) {
int numberOfItems = listAdapter.getCount();
// Get total height of all items.
int totalItemsHeight = 0;
for (int itemPos = 0; itemPos < numberOfItems; itemPos++) {
View item = listAdapter.getView(itemPos, null, listView);
item.measure(0, 0);
totalItemsHeight += item.getMeasuredHeight();
}
// Get total height of all item dividers.
int totalDividersHeight = listView.getDividerHeight() *
(numberOfItems - 1);
// Set list height.
ViewGroup.LayoutParams params = listView.getLayoutParams();
params.height = totalItemsHeight + totalDividersHeight;
listView.setLayoutParams(params);
listView.requestLayout();
return true;
} else {
return false;
}
}
}
| [
"isakovvd@yandex.ru"
] | isakovvd@yandex.ru |
57932933c7e189f056c6aa29a9f79efbc7e0f31f | cc07601f98bc3ec997ebd21116bd3516ab5eede5 | /examples/collections/ship/entity/SupplierKey.java | b36a579c3d78eac51df11a3983476f979f2938dd | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | Sciss/bdb-je | 3823feb59dbcc961402d32202fae6edc56a53ce8 | 049369ea59ea60aa4863f458d487212c25ad872d | refs/heads/master | 2020-07-14T22:40:24.606920 | 2019-08-30T19:46:10 | 2019-08-30T19:46:10 | 205,418,648 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,232 | java | /*-
* Copyright (C) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle Berkeley
* DB Java Edition made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle Berkeley DB Java Edition for a copy of the
* license and additional information.
*/
package collections.ship.entity;
import java.io.Serializable;
/**
* A SupplierKey serves as the key in the key/data pair for a supplier entity.
*
* <p> In this sample, SupplierKey is used both as the storage entry for the
* key as well as the object binding to the key. Because it is used directly
* as storage data using serial format, it must be Serializable. </p>
*
* @author Mark Hayes
*/
public class SupplierKey implements Serializable {
private String number;
public SupplierKey(String number) {
this.number = number;
}
public final String getNumber() {
return number;
}
public String toString() {
return "[SupplierKey: number=" + number + ']';
}
}
| [
"contact@sciss.de"
] | contact@sciss.de |
d4c086b3ebbac56e61baf4a56c30cb842cfa938a | efc5ffd551d2b0530260de2db91978f7a1098de9 | /src/main/java/com/nautilus/fxmap/geo/MapProjection.java | 3a2a6d2416d4def375b45d37d940d41ecb16cd38 | [] | no_license | daoanhvu/nautilus-fxmap | b069d8f7d07514155f03cd466b823b50aebe82f1 | 0add843880d7e1aca1ecef934384f3a70ea782a9 | refs/heads/main | 2023-04-06T14:09:59.609779 | 2021-04-15T03:41:29 | 2021-04-15T03:41:29 | 351,330,187 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,141 | java | package com.nautilus.fxmap.geo;
import com.nautilus.fxmap.view.WebMapEventHandler;
import javafx.geometry.Point2D;
import javafx.geometry.Rectangle2D;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.web.WebEngine;
import java.util.ArrayList;
import java.util.List;
public abstract class MapProjection implements WebMapEventHandler {
protected static final double WORLD_MAP_WIDTH = 1.6803870967746433E7;
// private static final double WORLD_MAP_HEIGHT = 9158485.811522977;
protected static final double WORLD_MAP_HEIGHT = 1.6803870967746433E7;
protected static final double WORLD_MAP_Y_CENTER = WORLD_MAP_HEIGHT / 2.0;
protected static final double WORLD_MAP_X_CENTER = WORLD_MAP_WIDTH / 2.0;
protected static final double LAT_DEGREE_PER_PIXEL = 1.857318573185773E-5;
protected static final double LAT_RADIAN_PER_PIXEL = Math.toRadians(LAT_DEGREE_PER_PIXEL);
protected static final double X_OFFSET = 3839642.5064526405;
protected static final double Y_OFFSET = 3770126.9953415995;
protected static final double MAX_LATITUDE = 85.051129;
protected static final double TWO_PI = Math.PI * 2.0;
protected static final double PI_OVER_4 = Math.PI / 4.0;
protected static final double MIN_ZOOM_LEVEL = 3.0;
protected static final double MAX_ZOOM_LEVEL = 20.0;
protected final List<MapBoundChangeListener> mapBoundsListenerList = new ArrayList<>();
protected double zoomLevel = 0.0;
protected Rectangle2D screenArea;
public void addEventListener(MapBoundChangeListener listener) {
if(listener != null) {
mapBoundsListenerList.add(listener);
}
}
public abstract void setScreenSize(int w, int h);
public abstract void render(GraphicsContext g);
public abstract GeoBoundary getBounds();
public abstract void setPreBounds(GeoBoundary preBounds);
public interface MapBoundChangeListener {
void onMapBoundChange(GeoBoundary old, GeoBoundary bounds1);
}
public MapProjection() { }
public abstract void translateCenterInPixel(double dx, double dy);
/**
* latitude and longitude in to be in radian
*/
public abstract Point2D locationToXY(double lat, double lon);
public abstract Point2D xyToLocation(double x, double y);
public Point2D lineEquation(double x1, double y1, double x2, double y2) {
double a = (y2 - y1)/(x2 - x1);
double b = y1 - a * x1;
return new Point2D(a, b);
}
public abstract void initializeJSBridge(WebEngine webEngine);
public abstract MapSource switchMapSource(MapSource target);
public abstract void zoomIn();
public abstract void zoomOut();
public double getZoomLevel() {
return zoomLevel;
}
public double getWidth() {
return screenArea.getWidth();
}
public double getHeight() {
return screenArea.getHeight();
}
public double centerScreenX() {
return (screenArea.getMinX() + screenArea.getMaxX()) / 2.0;
}
public double centerScreenY() {
return (screenArea.getMinY() + screenArea.getMaxY()) / 2.0;
}
}
| [
"vdao@karrostech.com"
] | vdao@karrostech.com |
e1fda8a079e0e654aa5abd1495429afc7ba91b90 | db84d8ee9d9930f6ed7eea9b531000cb853c2b42 | /app/src/main/java/com/awesome/consumer/cbms/ui/activity/CreditFragment.java | 277a31067506b8f7484fc01e3870a06ab35ac21b | [] | no_license | yueshow/CBMS | 5bff2142db81bcb4d56fd67a30b270166b343b89 | 945bd6f7b759600f4b445d67994fd17c3351b9a7 | refs/heads/master | 2021-04-05T23:30:59.415433 | 2018-03-08T10:37:43 | 2018-03-08T10:37:43 | 124,375,913 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,628 | java | package com.awesome.consumer.cbms.ui.activity;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.awesome.consumer.cbms.R;
public class CreditFragment extends Fragment {
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
System.out.println("BBBBBBBBBBB____onAttach");
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
System.out.println("BBBBBBBBBBB____onCreate");
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
System.out.println("BBBBBBBBBBB____onCreateView");
return inflater.inflate(R.layout.fragment_credit, container, false);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
System.out.println("BBBBBBBBBBB____onActivityCreated");
// this.getView().findViewById(R.id.clickme).setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// // 获得绑定的FragmentActivity
// MainActivity activity = ((MainActivity)getActivity());
// // 获得TabAFm的控件
// EditText editText = (EditText) activity.fragments.get(0).getView().findViewById(R.id.edit);
//
// Toast.makeText(activity, activity.hello + editText.getText(), Toast.LENGTH_SHORT).show();
// }
// });
}
@Override
public void onStart() {
super.onStart();
System.out.println("BBBBBBBBBBB____onStart");
}
@Override
public void onResume() {
super.onResume();
System.out.println("BBBBBBBBBBB____onResume");
}
@Override
public void onPause() {
super.onPause();
System.out.println("BBBBBBBBBBB____onPause");
}
@Override
public void onStop() {
super.onStop();
System.out.println("BBBBBBBBBBB____onStop");
}
@Override
public void onDestroyView() {
super.onDestroyView();
System.out.println("BBBBBBBBBBB____onDestroyView");
}
@Override
public void onDestroy() {
super.onDestroy();
System.out.println("BBBBBBBBBBB____onDestroy");
}
@Override
public void onDetach() {
super.onDetach();
System.out.println("BBBBBBBBBBB____onDetach");
}
}
| [
"yuki@YukideMacBook-Pro.local"
] | yuki@YukideMacBook-Pro.local |
c8a6037f4e40b589884319156eb40b86ebb3cf4d | 1b40f12454a0257d1e662c3db2c988d2571cfdc7 | /src/test/string/ReplaceImageUrl.java | c41dc802b58c30f5bf50db4356e7dc9e2ac7ec98 | [] | no_license | lucienli93/test-grammar | ae73a0727bb28992b3bf4fceea8e894a10ca3587 | 5810c60bc1add0337497a3f3a4650cca31346b05 | refs/heads/master | 2020-05-22T13:14:48.917947 | 2019-07-15T06:28:45 | 2019-07-15T06:28:45 | 186,354,854 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,787 | java | package test.string;
public class ReplaceImageUrl {
public static void main(String [] args) {
for (int i = 0; i < 1000000; i++) {
System.out.println(System.currentTimeMillis());
}
System.currentTimeMillis();
String originStr = "Given the roots <img src=\"https://latex.artofproblemsolving.com/b/b/6/bb60e0857a2c0a2c47acfbe81781032feb1f7150.png\" class=\"latex\" alt=\"$a,b,c,d$\" style=\"vertical-align: -3px\" width=\"59\" height=\"16\" /> of the equation <img src=\"https://latex.artofproblemsolving.com/9/7/3/973fd6662eae9b46351ad8e0eb1b9116a43825d1.png\" class=\"latex\" alt=\"$x^{4}+x^{3}-1=0$\" style=\"vertical-align: -1px\" width=\"122\" height=\"16\" />.First, Vieta\\'s relations give <img src=\"https://latex.artofproblemsolving.com/1/7/3/1735d1fff332e3a82d363bab562b7590d2e92917.png\" class=\"latex\" alt=\"$a+b+c+d = -1 , ab+ac+ad+bc+bd+cd=0, abcd = -1$\" style=\"vertical-align: -3px\" width=\"494\" height=\"16\" />.Then <img src=\"https://latex.artofproblemsolving.com/5/1/2/5122e8a7f3b669ffead178a2bebd1e9a27d709b9.png\" class=\"latex\" alt=\"$cd=-\\\\frac{1}{ab}$\" style=\"vertical-align: -12px\" width=\"75\" height=\"37\" /> and <img src=\"https://latex.artofproblemsolving.com/2/e/3/2e319fc5d9b4ed3a3c9661710ea71218fecca897.png\" class=\"latex\" alt=\"$c+d=-1-(a+b)$\" style=\"vertical-align: -4px\" width=\"161\" height=\"18\" />.The other coefficients give <img src=\"https://latex.artofproblemsolving.com/f/0/2/f0241d61753da1d7cce7662f19a416e014a87681.png\" class=\"latex\" alt=\"$ab+(a+b)(c+d)+cd = 0$\" style=\"vertical-align: -4px\" width=\"219\" height=\"18\" /> or <img src=\"https://latex.artofproblemsolving.com/4/7/1/47181f5b2ba7db474da3bf9c258ccfac8c6679a8.png\" class=\"latex\" alt=\"$ab+(a+b)[-1-(a+b)]-\\\\frac{1}{ab}=0$\" style=\"vertical-align: -12px\" width=\"279\" height=\"37\" />.Let <img src=\"https://latex.artofproblemsolving.com/0/1/6/0162211809d1f1d3e3fe5cf4408b4e138e0dcea1.png\" class=\"latex\" alt=\"$a+b=s$\" style=\"vertical-align: -1px\" width=\"72\" height=\"14\" /> and <img src=\"https://latex.artofproblemsolving.com/8/6/1/861f9a393c4d9383eb9de14217d3ea8bdd5add8c.png\" class=\"latex\" alt=\"$ab=p$\" style=\"vertical-align: -3px\" width=\"50\" height=\"16\" />, so <img src=\"https://latex.artofproblemsolving.com/5/f/4/5f4532841fbb7ed444621c07232d990855b27ff6.png\" class=\"latex\" alt=\"$p+s(-1-s)-\\\\frac{1}{p}=0$\" style=\"vertical-align: -16px\" width=\"177\" height=\"40\" />(1).Second, <img src=\"https://latex.artofproblemsolving.com/c/7/d/c7d457e388298246adb06c587bccd419ea67f7e8.png\" class=\"latex\" alt=\"$a$\" width=\"9\" height=\"8\" /> is a root, <img src=\"https://latex.artofproblemsolving.com/8/5/1/851109df4ff6b74049fd2c69a87ebebcb241e10b.png\" class=\"latex\" alt=\"$a^{4}+a^{3}=1$\" style=\"vertical-align: -1px\" width=\"88\" height=\"16\" /> and <img src=\"https://latex.artofproblemsolving.com/8/1/3/8136a7ef6a03334a7246df9097e5bcc31ba33fd2.png\" class=\"latex\" alt=\"$b$\" width=\"8\" height=\"12\" /> is a root, <img src=\"https://latex.artofproblemsolving.com/8/c/f/8cf27c53fd504a06e9cfd2a9ee9d235be39b0fcc.png\" class=\"latex\" alt=\"$b^{4}+b^{3}=1$\" style=\"vertical-align: -1px\" width=\"85\" height=\"16\" />.Multiplying: <img src=\"https://latex.artofproblemsolving.com/9/1/f/91fc440fb733e2475b63293803d877ae0b3434e8.png\" class=\"latex\" alt=\"$a^{3}b^{3}(a+1)(b+1)=1$\" style=\"vertical-align: -4px\" width=\"173\" height=\"19\" /> or <img src=\"https://latex.artofproblemsolving.com/1/c/5/1c582352bb7f9c6ef89688a1342abaf537cef0f7.png\" class=\"latex\" alt=\"$p^{3}(p+s+1)=1$\" style=\"vertical-align: -4px\" width=\"135\" height=\"19\" />.Solving <img src=\"https://latex.artofproblemsolving.com/8/f/c/8fc947dfb2228708976d2ca68eba41e06efc04a0.png\" class=\"latex\" alt=\"$s= \\\\frac{1-p^{4}-p^{3}}{p^{3}}$\" style=\"vertical-align: -16px\" width=\"122\" height=\"42\" />.In (1): <img src=\"https://latex.artofproblemsolving.com/6/a/9/6a963f5e8b130d116a2be9c73332e3daedf621e4.png\" class=\"latex\" alt=\"$\\\\frac{p^{8}+p^{5}-2p^{4}-p^{3}+1}{p^{6}}=0$\" style=\"vertical-align: -16px\" width=\"210\" height=\"42\" />.<img src=\"https://latex.artofproblemsolving.com/9/9/2/99257acacf33acb961e4f23f4b01663e7400fe36.png\" class=\"latex\" alt=\"$p^{8}+p^{5}-2p^{4}-p^{3}+1=0$\" style=\"vertical-align: -3px\" width=\"207\" height=\"18\" /> or <img src=\"https://latex.artofproblemsolving.com/5/7/2/572b3798106281b995eefe6292ada55f326e98db.png\" class=\"latex\" alt=\"$(p-1)(p+1)(p^{6}+p^{4}+p^{3}-p^{2}-1)= 0$\" style=\"vertical-align: -4px\" width=\"320\" height=\"19\" />.Conclusion: <img src=\"https://latex.artofproblemsolving.com/b/d/5/bd50f740104be65482b986b5b8687584b39f9ba9.png\" class=\"latex\" alt=\"$p =ab$\" style=\"vertical-align: -3px\" width=\"52\" height=\"16\" /> is a root of <img src=\"https://latex.artofproblemsolving.com/b/4/f/b4f4e823cdc3d71fbea6695fbb81773ce5bdd0f4.png\" class=\"latex\" alt=\"$x^{6}+x^{4}+x^{3}-x^{2}-1=0$\" style=\"vertical-align: -1px\" width=\"202\" height=\"16\" />.";
System.out.println(replaceImgUrl(originStr));
}
public static String replaceImgUrl(String str) {
if (str == null) {
return null;
}
StringBuilder result = new StringBuilder();
String [] strArray = str.split("<img src=\"");
if (strArray.length == 1) {
return str;
}
result.append(strArray[0]);
for (int i = 1; i < strArray.length; i++) {
int index = strArray[i].indexOf('"');
String originUrl = strArray[i].substring(0, index);
result.append("<img src=\"");
result.append("http://test.com" + strArray[i].substring(index));
}
return result.toString();
}
}
| [
"liyizheng@LIYIZHENG"
] | liyizheng@LIYIZHENG |
dbb89b12db9223dbe96fb916ba877737081a78be | 8d75d1a0d6f764d20c5e4fe49649d2920582e187 | /src/OtherGameFiles/Game.java | 55fadb271cdff795cf086f5246186e15c71e7343 | [] | no_license | benHodadov/ReversiGUI | 6472343d4606b49a84dc81248529460ac880520c | 85a47972d52e09d90847b4824c81180774ec8706 | refs/heads/master | 2021-04-24T22:24:09.042515 | 2018-01-17T18:00:19 | 2018-01-17T18:00:19 | 116,850,327 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,659 | java | package OtherGameFiles;
import javafx.scene.control.Alert;
import java.util.List;
import java.util.Scanner;
/**
* Created by Ben and Barak on 08/01/2018.
*/
public class Game {
private Player p1;
private Player p2;
private Board b;
private GameLogic gl;
/**
* A constructor.
* @param boardSize int
*/
public Game(int boardSize) {
this.p1 = new Player('X');
this.p2 = new Player('O');
this.b = new Board(boardSize);
this.gl = new GameLogic();
}
/**
* The method runs the game. later copied to the gameController.
*/
public void run() {
final Player[] playing = {p1};
System.out.println("Start game:");
System.out.println("player1: " + p1.getSign() + ", player2: " + p2.getSign() + "\n***********************");
//this.b.setOnMouseClicked(e -> {
if (!endGame()) {
boolean isPlayed = this.playOneTurn(gl, b, playing[0]);
if (isPlayed) {
//Controllers.GameController.score1.setText(String.valueOf(getScore(playing[0])));
//Controllers.GameController.score2.setText(String.valueOf(getScore(otherPlayer(playing[0]))));
playing[0] = this.otherPlayer(playing[0]);
}
} else {
// game over
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("OtherGameFiles.Game finished!");
alert.setHeaderText(findWinner());
alert.setContentText("OtherGameFiles.Player 1 score = " + getScore(p1) + "\nOtherGameFiles.Player 2 score = " + getScore(p2));
alert.showAndWait();
this.findWinner();
}
//});
}
/**
* The method plays one turn for a player. returns true if he played and false otherwise.
* @param gl OtherGameFiles.GameLogic
* @param b OtherGameFiles.Board
* @param p OtherGameFiles.Player
* @return isPlayed
*/
public boolean playOneTurn(GameLogic gl, Board b, Player p) {
b.draw();
List<Position> v = gl.optionalMoves(b, p);
// if any of the moves are legal return 0.
if (v.size() == 0) {
this.b.setGridLinesVisible(false);
this.b.setGridLinesVisible(true);
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Error");
alert.setHeaderText("Oops, there is no valid moves for you");
alert.setContentText("Hope your opponent will make a mistake");
alert.showAndWait();
// the player has no moves sp we need to change the playing player. return true,
return true;
}
final Position[] selectedPosition = {this.getPlace()};
final boolean[] isValid = {false};
for (int i = 0; i < v.size(); i++) {
if (selectedPosition[0].isEqual(v.get(i))) {
isValid[0] = true;
//play.
this.putAndTurnOver(gl, b, selectedPosition[0].getRow(), selectedPosition[0].getCol(), p);
b.draw();
b.gridLinesVisibleProperty().set(true);
return true;
}
}
this.b.setGridLinesVisible(false);
this.b.setGridLinesVisible(true);
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Error");
alert.setHeaderText("Oops, the chosen move is not valid");
alert.setContentText("Please choose again");
alert.showAndWait();
return false;
}
// the following methods turn the disks if needed.
public void putAndTurnOver(GameLogic gl,Board b, int r, int c, Player p) {
b.put(r, c, p.getSign());
this.turnDiscsFromLeft(gl, b, r, c, p);
this.turnDiscsFromRight(gl, b, r, c, p);
this.turnDiscsFromUp(gl, b, r, c, p);
this.turnDiscsFromDown(gl, b, r, c, p);
this.turnDiscsFromUpLeft(gl, b, r, c, p);
this.turnDiscsFromUpRight(gl, b, r, c, p);
this.turnDiscsFromDownLeft(gl, b, r, c, p);
this.turnDiscsFromDownRight(gl, b, r, c, p);
}
public void turnDiscsFromLeft(GameLogic gl, Board b, int r, int c, Player p) {
if (gl.checkLeft(b, r, c, p)) {
for (int i = c - 1; i > 0; i--) {
if (b.getSide(r, i) != ' ') {
if (b.getSide(r, i) != b.getSide(r, c)) {
b.put(r, i, p.getSign());
}
}
else {
return;
}
}
}
}
public void turnDiscsFromRight(GameLogic gl, Board b, int r, int c, Player p) {
if (gl.checkRight(b, r, c, p)) {
for (int i = c + 1; i <= b.getSize(); i++) {
if (b.getSide(r, i) != ' ') {
if (b.getSide(r, i) != b.getSide(r, c)) {
b.put(r, i, p.getSign());
}
}
else {
return;
}
}
}
}
public void turnDiscsFromUp(GameLogic gl, Board b, int r, int c, Player p) {
if (gl.checkUp(b, r, c, p)) {
for (int i = r - 1; i > 0; i--) {
if (b.getSide(i, c) != ' ') {
if (b.getSide(i, c) != b.getSide(r, c)) {
b.put(i, c, p.getSign());
}
}
else {
return;
}
}
}
}
public void turnDiscsFromDown(GameLogic gl, Board b, int r, int c, Player p) {
if (gl.checkDown(b, r, c, p)) {
for (int i = r + 1; i <= b.getSize(); i++) {
if (b.getSide(i, c) != ' ') {
if (b.getSide(i, c) != b.getSide(r, c)) {
b.put(i, c, p.getSign());
}
}
else {
return;
}
}
}
}
public void turnDiscsFromUpLeft(GameLogic gl, Board b, int r, int c, Player p) {
if (gl.checkUpLeft(b, r, c, p)) {
for (int i = r - 1, j = c - 1; i > 0 && j > 0; i--, j--) {
if (b.getSide(i, j) != ' ') {
if (b.getSide(i, j) != b.getSide(r, c)) {
b.put(i, j, p.getSign());
}
}
else {
return;
}
}
}
}
public void turnDiscsFromUpRight(GameLogic gl, Board b, int r, int c, Player p) {
if (gl.checkUpRight(b, r, c, p)) {
for (int i = r - 1, j = c + 1; i > 0 && j <= b.getSize(); i--, j++) {
if (b.getSide(i, j) != ' ') {
if (b.getSide(i, j) != b.getSide(r, c)) {
b.put(i, j, p.getSign());
}
}
else {
return;
}
}
}
}
public void turnDiscsFromDownLeft(GameLogic gl, Board b, int r, int c, Player p) {
if (gl.checkDownLeft(b, r, c, p)) {
for (int i = r + 1, j = c - 1; i <= b.getSize() && j > 0; i++, j--) {
if (b.getSide(i, j) != ' ') {
if (b.getSide(i, j) != b.getSide(r, c)) {
b.put(i, j, p.getSign());
}
}
else {
return;
}
}
}
}
public void turnDiscsFromDownRight(GameLogic gl, Board b, int r, int c, Player p) {
if (gl.checkDownRight(b, r, c, p)) {
for (int i = r + 1, j = c + 1; i <= b.getSize() && j <= b.getSize(); i++, j++) {
if (b.getSide(i, j) != ' ') {
if (b.getSide(i, j) != b.getSide(r, c)) {
b.put(i, j, p.getSign());
}
}
else {
return;
}
}
}
}
/**
* The method returns true if the game is over and false otherwise.
* @return isOver
*/
public boolean endGame() {
return ((this.gl.optionalMoves(this.b, this.p1).size() == 0)
&& (this.gl.optionalMoves(this.b, this.p2).size() == 0));
}
/**
* The method gets a player and returns his score.
* @param p OtherGameFiles.Player
* @return scoreP
*/
public int getScore(Player p) {
int count = 0;
for(int i = 1; i <= b.getSize(); i ++) {
for (int j = 1; j <= b.getSize(); j++) {
if (this.b.getSide(i, j) == p.getSign()) {
count++;
}
}
}
return count;
}
/**
* The method returns a string with the winning player. ready to be printed.
* @return winnerMSG
*/
public String findWinner() {
Settings settings = new Settings();
int countP1 = getScore(p1);
int countP2 = getScore(p2);
if (countP1 > countP2) {
return "The " + settings.player_1_color + " player is the winner !!";
} else if (countP1 < countP2) {
return "The " + settings.player_2_color + " player is the winner !!";
} else {
//System.out.println("-------------------------\nIt's a draw !!\n-------------------------");
return "It's a draw !!";
}
}
/**
* The method gets a player and return the other one.
* @param p OtherGameFiles.Player
* @return otherPlayer
*/
public Player otherPlayer(Player p) {
if (p.getSign() == this.p1.getSign()) {
return this.p2;
}
return this.p1;
}
public Position getPlace() {
return this.b.getClicked();
}
// getters
public Board getBoard() {
return this.b;
}
public Player getP1() {
return p1;
}
public Player getP2() {
return p2;
}
public GameLogic getGl() {
return gl;
}
// the next 2 methods worked in the console. not important for this task.
public void consoleRun() {
Player playing = p1;
System.out.println("Start game:");
System.out.println("player1: " + p1.getSign() + ", player2: " + p2.getSign() + "\n***********************");
while (!this.endGame()) {
this.playOneTurn(gl, b, playing);
playing = this.otherPlayer(playing);
}
b.print();
this.findWinner();
}
public void consolePlayOneTurn(GameLogic gl, Board b, Player p) {
System.out.println("Current board:");
b.print();
System.out.println(p.getSign() + ": It's your move.\nYour possible moves: ");
List<Position> v = gl.optionalMoves(b, p);
// if any of the moves are legal return 0.
if (v.size() == 0) {
System.out.println("No possible moves. Play passes back to the other player. Press any key to continue.");
Scanner reader = new Scanner(System.in);
char c = reader.next().charAt(0);
return;
}
// print the options
for (int i = 0; i < v.size(); i++) {
Position pos = v.get(i);
System.out.print("(" + pos.getRow() + "," + pos.getCol() + ")");
if ((i + 1) != v.size()) {
System.out.print(",");
}
}
System.out.println("\nPlease enter your move row,col: ");
int r, c;
Scanner scn = new Scanner(System.in);
r = scn.nextInt();
c = scn.nextInt();
Position selectedPosition = new Position(r, c);
boolean isValid = false;
for (int i = 0; i < v.size(); i++) {
if (selectedPosition.isEqual(v.get(i))) {
isValid = true;
//play.
this.putAndTurnOver(gl, b, r, c, p);
}
}
while (!isValid) {
System.out.print("The selected position is not valid.\nPlease enter your move row,col: ");
scn = new Scanner(System.in);
r = scn.nextInt();
c = scn.nextInt();
selectedPosition = new Position(r, c);
for (int i = 0; i < v.size(); i++) {
if (selectedPosition.isEqual(v.get(i))) {
isValid = true;
//play.
this.putAndTurnOver(gl, b, r, c, p);
break;
}
}
}
}
}
| [
"benhod2@gmail.com"
] | benhod2@gmail.com |
37647cd96ab861d28b7afdb1361de39331bbc3e7 | 267c97db2e97a0601c26a4fd87aaffee8fa29ac7 | /src/main/java/com/mapeamento/Mapeamento1nApplication.java | 7d93e895dd582246dd8102b8dc64680c817a3cf7 | [] | no_license | bryanNNz/mapeamento-1n-java | 2cfc07075371af5696cd9ae518f6615a6eebbc70 | 1636deda81943c10f8a13d6821f4cb51280c44d0 | refs/heads/main | 2023-02-20T15:15:46.033011 | 2021-01-24T21:27:34 | 2021-01-24T21:27:34 | 325,373,138 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,615 | java | package com.mapeamento;
import java.util.Arrays;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.mapeamento.domain.Pessoa;
import com.mapeamento.domain.Telefone;
import com.mapeamento.domain.TipoTelefoneEnum;
import com.mapeamento.repository.PessoaRepository;
import com.mapeamento.repository.TelefoneRepository;
@SpringBootApplication
public class Mapeamento1nApplication implements CommandLineRunner {
@Autowired
private PessoaRepository pessoaRepository;
@Autowired
private TelefoneRepository telefoneRepository;
public static void main(String[] args) {
SpringApplication.run(Mapeamento1nApplication.class, args);
}
@Override
public void run(String... args) throws Exception {
Pessoa p1 = new Pessoa(null, "JOSE", null);
Pessoa p2 = new Pessoa(null, "MARIA", null);
Telefone t1 = new Telefone(null, "988888888", TipoTelefoneEnum.CELULAR, null);
Telefone t2 = new Telefone(null, "977777777", TipoTelefoneEnum.FIXO, null);
Telefone t3 = new Telefone(null, "966666666", TipoTelefoneEnum.CELULAR, null);
Telefone t4 = new Telefone(null, "955555555", TipoTelefoneEnum.FIXO, null);
p1.setContatos(Arrays.asList(t1, t2));
p2.setContatos(Arrays.asList(t3, t4));
pessoaRepository.save(p1);
pessoaRepository.save(p2);
t1.setPessoa(p1);
t2.setPessoa(p1);
t3.setPessoa(p2);
t4.setPessoa(p2);
telefoneRepository.saveAll(Arrays.asList(t1,t2,t3,t4));
}
}
| [
"bryanlukas1997@gmail.com"
] | bryanlukas1997@gmail.com |
7a28321560d3a5cc387e89db6ad22ab078b8ed76 | d27a1e4579bb7c3e63beda78f14f1c472a774fa5 | /simulator/src/main/java/com/hazelcast/simulator/agent/AgentsSshCli.java | 082c8170c023c64926fa943ba638fd2d90952ffa | [
"Apache-2.0"
] | permissive | olukas/hazelcast-simulator | 4cf02102a17d3f3d9287eb968236fc561206bfe4 | 87428a815244997a5b5b58f6857aa34d47258f50 | refs/heads/master | 2020-03-21T17:56:57.084662 | 2019-01-29T13:34:18 | 2019-01-29T14:07:08 | 138,863,682 | 0 | 0 | Apache-2.0 | 2018-06-27T10:00:21 | 2018-06-27T10:00:21 | null | UTF-8 | Java | false | false | 5,451 | java | /*
* Copyright (c) 2008-2016, Hazelcast, Inc. 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.
*/
package com.hazelcast.simulator.agent;
import com.hazelcast.simulator.common.AgentsFile;
import com.hazelcast.simulator.common.SimulatorProperties;
import com.hazelcast.simulator.coordinator.registry.AgentData;
import com.hazelcast.simulator.coordinator.registry.Registry;
import com.hazelcast.simulator.utils.BashCommand;
import com.hazelcast.simulator.utils.CliUtils;
import com.hazelcast.simulator.utils.CommandLineExitException;
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
import org.apache.log4j.Logger;
import java.io.File;
import java.util.List;
import static com.hazelcast.simulator.common.GitInfo.getBuildTime;
import static com.hazelcast.simulator.common.GitInfo.getCommitIdAbbrev;
import static com.hazelcast.simulator.coordinator.registry.AgentData.publicAddressesString;
import static com.hazelcast.simulator.utils.CommonUtils.exitWithError;
import static com.hazelcast.simulator.utils.CommonUtils.getSimulatorVersion;
import static com.hazelcast.simulator.utils.FileUtils.getConfigurationFile;
import static com.hazelcast.simulator.utils.FileUtils.getSimulatorHome;
import static com.hazelcast.simulator.utils.FileUtils.getUserDir;
import static com.hazelcast.simulator.utils.SimulatorUtils.loadComponentRegister;
import static com.hazelcast.simulator.utils.SimulatorUtils.loadSimulatorProperties;
import static java.lang.String.format;
import static java.util.Collections.singletonList;
public final class AgentsSshCli {
private static final Logger LOGGER = Logger.getLogger(AgentsSshCli.class);
private final OptionParser parser = new OptionParser();
private final OptionSpec testSpec = parser.accepts("test",
"Checks if ssh connection to the agents can be made.");
private final File agentsFile = new File(getUserDir(), AgentsFile.NAME);
private final OptionSpec<String> agentSpec = parser.accepts("agent",
"The agent to execute the command on, e.g. A1 or its public or private ip-address.")
.withRequiredArg().ofType(String.class);
private final OptionSet options;
private final SimulatorProperties properties;
private final Registry registry;
private AgentsSshCli(String[] args) {
this.options = CliUtils.initOptionsWithHelp(parser, args);
this.properties = loadSimulatorProperties();
this.registry = loadComponentRegister(agentsFile, false);
if (options.has(testSpec)) {
testConnection();
} else {
executeCommand();
}
}
private void executeCommand() {
List commands = options.nonOptionArguments();
if (commands.size() != 1) {
throw new CommandLineExitException("1 argument expected");
}
String command = (String) commands.get(0);
String sshOptions = properties.get("SSH_OPTIONS");
String simulatorUser = properties.get("SIMULATOR_USER");
for (AgentData agent : findAgents()) {
System.out.println("[" + agent.getPublicAddress() + "]");
new BashCommand("ssh -n -o LogLevel=quiet " + sshOptions + " " + simulatorUser
+ "@" + agent.getPublicAddress() + " '" + command + "'")
.setSystemOut(true)
.addEnvironment(properties.asMap())
.execute();
}
}
private List<AgentData> findAgents() {
List<AgentData> agents = registry.getAgents();
String agentAddress = agentSpec.value(options);
if (agentAddress == null) {
return agents;
}
for (AgentData agent : agents) {
if (agent.getPublicAddress().equals(agentAddress)
|| agent.getPrivateAddress().equals(agentAddress)
|| agent.getAddress().toString().equals(agentAddress)) {
return singletonList(agent);
}
}
throw new CommandLineExitException(format("Could not found agent [%s]", agentAddress));
}
private void testConnection() {
new BashCommand(getConfigurationFile("agent_online_check.sh").getAbsolutePath())
.addParams(publicAddressesString(registry))
.addEnvironment(properties.asMap())
.setSystemOut(true)
.execute();
}
public static void main(String[] args) {
LOGGER.info("Hazelcast Simulator agent-ssh");
LOGGER.info(format("Version: %s, Commit: %s, Build Time: %s",
getSimulatorVersion(), getCommitIdAbbrev(), getBuildTime()));
LOGGER.info(format("SIMULATOR_HOME: %s", getSimulatorHome().getAbsolutePath()));
try {
new AgentsSshCli(args);
} catch (Exception e) {
exitWithError(LOGGER, "Could not start agent-ssh!", e);
}
}
}
| [
"alarmnummer@gmail.com"
] | alarmnummer@gmail.com |
822ba0eb6e5810423755ee0078e03b1c8e74ceea | 25186be4f3f54929b26eeae3141445631f822bca | /app/src/androidTest/java/com/lamps/lamps/ApplicationTest.java | 6f34152b682a5f412b4deea3c8b10279b2b01ae8 | [
"BSD-3-Clause"
] | permissive | Ubhadiyap/Lamp | 407dd1c2e250fad404551a9eedb86c9c25484856 | 0a2a49f11ef0ccf7e8e79f9916e67bcdb0fbffc9 | refs/heads/master | 2021-05-01T14:16:33.962505 | 2017-01-19T15:43:53 | 2017-01-19T15:43:53 | 79,632,322 | 1 | 0 | null | 2017-01-21T07:58:36 | 2017-01-21T07:58:35 | null | UTF-8 | Java | false | false | 346 | java | package com.lamps.lamps;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
} | [
"stew@StewdeMacBook-Pro.local"
] | stew@StewdeMacBook-Pro.local |
424983c6c1527c1a7e1d12c6c3313de3fc2a64c0 | c550c3e5c9ceb889ff958390a81c24620e1a6842 | /app/src/test/java/com/example/constructlayout/ExampleUnitTest.java | 2b7fb0f7060def5970f0ca361e2f4838819e13df | [] | no_license | SebastianValera/ConstructLayout | 40007f37b5477b586c560c5ee2c050e5ac54b04b | f0a80d8048e420acb96221ae0738cd869cc9c257 | refs/heads/master | 2020-11-24T11:36:25.502798 | 2019-12-15T05:58:49 | 2019-12-15T05:58:49 | 228,127,344 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 388 | java | package com.example.constructlayout;
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);
}
} | [
"sebastianvalera99@outlook.com"
] | sebastianvalera99@outlook.com |
b88729aabae8d5f9280c77de58a04ecbec183eec | 731362cd5ca5ddb32afc7a79160a3b6ead410506 | /CJZKW/app/src/main/java/com/android/cjzk/activity/ContactUsActivity.java | 7a3a5f9a7f4de229ea092022b21fef12c13bf9f3 | [] | no_license | X-OneC/android_cjzkw | fb843ebd9791ca6324bb9fa7b303e7d9d32a79a2 | 724cbede58b503a5b61f044765d170de35379df5 | refs/heads/master | 2020-06-11T03:50:06.833094 | 2016-12-09T09:13:24 | 2016-12-09T09:13:24 | 76,011,264 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 944 | java | package com.android.cjzk.activity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import com.android.cjzk.R;
import butterknife.BindView;
public class ContactUsActivity extends MyBaseActivity {
@BindView(R.id.toolbar)
Toolbar toolbar;
@Override
protected void onCreateT(Bundle savedInstanceState) {
toolbar.setTitle("");
toolbar.setTitleTextColor(getResources().getColor(R.color.text_color));
setSupportActionBar(toolbar);
toolbar.setNavigationIcon(R.mipmap.back);
}
@Override
protected int getContentViewId() {
return R.layout.activity_contact_us;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
break;
}
return super.onOptionsItemSelected(item);
}
}
| [
"1396649117@qq.com"
] | 1396649117@qq.com |
1d7e5b60c5f5d946347ff2d77d32b35ba770664a | e7369482804871704d137756c2342a53f10979c6 | /app/src/main/java/com/example/snarkportingtest/BigIntegerAffinePoint.java | 8f1f754e2f9cee8ee59e401ca8123042f2c168ac | [] | no_license | AALS7501/Android-CRV | 85dfacc552c0bf280d09890d5e1d362055405110 | 322f7bfdc3b3da70ffae5f8e471a9976f4da5e54 | refs/heads/master | 2023-04-14T17:19:14.649907 | 2021-04-12T08:48:02 | 2021-04-12T08:48:02 | 312,219,094 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 669 | java | package com.example.snarkportingtest;
/*******************************************************************************
* Author: Seongho Park <shparkk95@kookmin.ac.kr>
*******************************************************************************/
import java.math.BigInteger;
public class BigIntegerAffinePoint {
public BigInteger x;
public BigInteger y;
public BigIntegerAffinePoint(BigInteger x) {
this.x = x;
}
public BigIntegerAffinePoint(BigInteger x, BigInteger y) {
this.x = x;
this.y = y;
}
public BigIntegerAffinePoint(BigIntegerAffinePoint p) {
this.x = p.x;
this.y = p.y;
}
}
| [
"shparkk95@kookmin.ac.kr"
] | shparkk95@kookmin.ac.kr |
19a738c4beebc68adb66a2b20ac393b5ed9b124d | 1f5d152b7144b48d0400921fc94de870bced83c3 | /rajkumar/java-application/TenderApplication/src/io/zilker/application/beans/Response.java | 2ce308800916a26b27912462a579a438f8fa72d0 | [] | no_license | sidthesloth92/zilkies-19-fe | 7334fe11da0f3d22d7ea82c53bb5f332940cd489 | 095977cadaf65de0dab31e69a538317e31e0306a | refs/heads/master | 2020-03-26T18:34:17.885585 | 2018-09-19T04:59:12 | 2018-09-19T04:59:12 | 145,219,996 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 489 | java | package io.zilker.application.beans;
public class Response {
private int ID, projectID;
private String responseText;
public int getID() {
return ID;
}
public void setID(int iD) {
ID = iD;
}
public int getProjectID() {
return projectID;
}
public void setProjectID(int projectID) {
this.projectID = projectID;
}
public String getResponseText() {
return responseText;
}
public void setResponseText(String responseText) {
this.responseText = responseText;
}
}
| [
"rajkumar.cind@gmail.com"
] | rajkumar.cind@gmail.com |
df6fd65c457ba07d6d2086d9a8aa632374b4d9ce | 2568d93f238c84cd6f4889be4e561ccec2890e48 | /modules/system/src/main/java/com/nonelonely/modules/system/domain/permission/NBSysResource.java | a2500352724e4b646958d925d00bfd424eba5949 | [
"Apache-2.0"
] | permissive | fangrx/my-blog | 3ea91c0c1af33a54ce30b7dc53b458364121d164 | 85813412fb790f3e90cbce7092ad156a99f7eff1 | refs/heads/master | 2023-07-18T09:37:20.750365 | 2021-09-01T07:00:04 | 2021-09-01T07:00:04 | 401,545,450 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,679 | java | package com.nonelonely.modules.system.domain.permission;
import com.nonelonely.common.enums.StatusEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
* created by Wuwenbin on 2018/7/18 at 14:01
*
* @author wuwenbin
*/
@Entity
@Table(name = "sys_resource")
@Data
@AllArgsConstructor
@Builder
@NoArgsConstructor
@EntityListeners(AuditingEntityListener.class)
public class NBSysResource implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(nullable = false, updatable = false, length = 11)
private Long id;
@Column(nullable = false)
private String url;
@Column(nullable = false, length = 50)
private String name;
@Column(nullable = false, length = 50)
private String permission;
@Enumerated(EnumType.STRING)
private ResType type;
@Column(name = "[group]")
private String group;
private String remark;
// 创建时间
@CreatedDate
private Date createDate;
// 更新时间
@LastModifiedDate
private Date updateDate;
// 数据状态
private Byte status = StatusEnum.OK.getCode();
/**
* url的类型
*/
public enum ResType {
/**
* 可以做菜单栏的导航链接
*/
NAV_LINK,
/**
* 其他类型
*/
OTHER
}
}
| [
"ri-xin.fang@doone.com.cn"
] | ri-xin.fang@doone.com.cn |
224be4059e22efe36c44d2404cc71f0e99592066 | 70f7a06017ece67137586e1567726579206d71c7 | /alimama/src/main/java/kotlin/PreconditionsKt__PreconditionsKt.java | 200a5c60cbc336b7ca5d4cec0a63b32878be875d | [] | no_license | liepeiming/xposed_chatbot | 5a3842bd07250bafaffa9f468562021cfc38ca25 | 0be08fc3e1a95028f8c074f02ca9714dc3c4dc31 | refs/heads/master | 2022-12-20T16:48:21.747036 | 2020-10-14T02:37:49 | 2020-10-14T02:37:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,230 | java | package kotlin;
import kotlin.internal.InlineOnly;
import kotlin.jvm.functions.Function0;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\"\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0005\n\u0002\u0010\u0001\n\u0002\b\u0004\u001a\u001c\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\b\u0002\b\n\u0006\b\u0000\u001a\u0002\u0010\u0001\u001a*\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005H\b\u0002\b\n\u0006\b\u0000\u001a\u0002\u0010\u0001\u001a/\u0010\u0007\u001a\u0002H\b\"\b\b\u0000\u0010\b*\u00020\u00062\b\u0010\u0002\u001a\u0004\u0018\u0001H\bH\b\u0002\n\n\b\b\u0000\u001a\u0004\b\u0003\u0010\u0001¢\u0006\u0002\u0010\t\u001a=\u0010\u0007\u001a\u0002H\b\"\b\b\u0000\u0010\b*\u00020\u00062\b\u0010\u0002\u001a\u0004\u0018\u0001H\b2\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005H\b\u0002\n\n\b\b\u0000\u001a\u0004\b\u0003\u0010\u0001¢\u0006\u0002\u0010\n\u001a\u0011\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\u0006H\b\u001a\u001c\u0010\u000e\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\b\u0002\b\n\u0006\b\u0000\u001a\u0002\u0010\u0001\u001a*\u0010\u000e\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005H\b\u0002\b\n\u0006\b\u0000\u001a\u0002\u0010\u0001\u001a/\u0010\u000f\u001a\u0002H\b\"\b\b\u0000\u0010\b*\u00020\u00062\b\u0010\u0002\u001a\u0004\u0018\u0001H\bH\b\u0002\n\n\b\b\u0000\u001a\u0004\b\u0003\u0010\u0001¢\u0006\u0002\u0010\t\u001a=\u0010\u000f\u001a\u0002H\b\"\b\b\u0000\u0010\b*\u00020\u00062\b\u0010\u0002\u001a\u0004\u0018\u0001H\b2\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005H\b\u0002\n\n\b\b\u0000\u001a\u0004\b\u0003\u0010\u0001¢\u0006\u0002\u0010\n¨\u0006\u0010"}, d2 = {"check", "", "value", "", "lazyMessage", "Lkotlin/Function0;", "", "checkNotNull", "T", "(Ljava/lang/Object;)Ljava/lang/Object;", "(Ljava/lang/Object;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;", "error", "", "message", "require", "requireNotNull", "kotlin-stdlib"}, k = 5, mv = {1, 1, 15}, xi = 1, xs = "kotlin/PreconditionsKt")
/* compiled from: Preconditions.kt */
class PreconditionsKt__PreconditionsKt extends PreconditionsKt__AssertionsJVMKt {
@InlineOnly
private static final void require(boolean z) {
if (!z) {
throw new IllegalArgumentException("Failed requirement.".toString());
}
}
@InlineOnly
private static final void require(boolean z, Function0<? extends Object> function0) {
if (!z) {
throw new IllegalArgumentException(function0.invoke().toString());
}
}
@InlineOnly
private static final <T> T requireNotNull(T t) {
if (t != null) {
return t;
}
throw new IllegalArgumentException("Required value was null.".toString());
}
@InlineOnly
private static final <T> T requireNotNull(T t, Function0<? extends Object> function0) {
if (t != null) {
return t;
}
throw new IllegalArgumentException(function0.invoke().toString());
}
@InlineOnly
private static final void check(boolean z) {
if (!z) {
throw new IllegalStateException("Check failed.".toString());
}
}
@InlineOnly
private static final void check(boolean z, Function0<? extends Object> function0) {
if (!z) {
throw new IllegalStateException(function0.invoke().toString());
}
}
@InlineOnly
private static final <T> T checkNotNull(T t) {
if (t != null) {
return t;
}
throw new IllegalStateException("Required value was null.".toString());
}
@InlineOnly
private static final <T> T checkNotNull(T t, Function0<? extends Object> function0) {
if (t != null) {
return t;
}
throw new IllegalStateException(function0.invoke().toString());
}
@InlineOnly
private static final Void error(Object obj) {
throw new IllegalStateException(obj.toString());
}
}
| [
"zhangquan@snqu.com"
] | zhangquan@snqu.com |
b5f6d3405b6da98697e31e3821f26191dc254565 | e6b8f6d0e54e1db0ec8eb5d948d4913b8163c3f0 | /demosite/cnjokeprovider/src/main/java/org/adapto/core/jokes/JokeService.java | 6dc60ce62676f3fb63cbec01ac53077996f24243 | [] | no_license | DominikSuess/adaptto2017-demo | 43d50ca201a591680f5dd2b1a111767564c0af52 | 281a360c55c0eb0fc2fe70467f2995274a149f93 | refs/heads/master | 2021-07-04T05:43:45.286212 | 2017-09-26T12:17:36 | 2017-09-26T12:17:36 | 104,857,641 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 774 | java | /*
* Copyright 2015 Adobe Systems Incorporated
*
* 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.adapto.core.jokes;
import org.osgi.annotation.versioning.ProviderType;
@ProviderType
public interface JokeService {
String getJoke();
}
| [
"suess@adobe.com"
] | suess@adobe.com |
95f99db4dd77b43c023a05f732319ed492f0eba4 | fa2fd69d9135da6e20d01f78d40f8b6ac58273a1 | /src/main/java/com/zzl/laoban_back/VO/QuestionVO.java | 8ac0dcb03bec476099389f86587e6f3b17c74008 | [] | no_license | amazing-zzl/LaoBanBack | 73763ffb98047570be296cae2ca16ead607fee80 | 8ecb92892baac2e5f87b3d5a0fb124662e143307 | refs/heads/master | 2022-04-18T12:32:00.868286 | 2020-04-10T05:07:15 | 2020-04-10T05:07:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 634 | java | package com.zzl.laoban_back.VO;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import java.util.Date;
@Data
@DynamicUpdate
public class QuestionVO {
@JsonProperty("id")
private Integer questionId;
/*标题*/
@JsonProperty("title")
private String questionTitle;
/*内容*/
@JsonProperty("content")
private String questionContent;
// /*类别*/
// private Integer questionCategory;
/*图片*/
@JsonProperty("picture")
private String questionPicture;
/*更新时间*/
private Date updateTime;
}
| [
"1049081426@qq.com"
] | 1049081426@qq.com |
0cb8f6b28917301453746013bb32456b7236840b | 3b26a0d39305e54c859c80f040170f928f23a644 | /DocumentsUI/src/com/android/documentsui/dirlist/KeyboardEventListener.java | d45885de625f56b1b74bc0b83ced93e5c7258152 | [] | no_license | MyMagma/apps | cfd74d98c7b81d4bc2f4b4946484a7be1b3bb4ef | 128d43ae1aa967328b32225f5eb162fb3b6569d3 | refs/heads/master | 2020-12-27T06:49:24.811808 | 2020-02-02T17:32:35 | 2020-02-02T17:32:35 | 237,800,995 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,330 | java | /*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.documentsui.dirlist;
import android.view.KeyEvent;
import androidx.recyclerview.selection.ItemDetailsLookup.ItemDetails;
/**
* KeyboardListener is implemented by {@link KeyInputHandler}. The handler
* must be called from RecyclerView.Holders in response to keyboard events.
*/
public abstract class KeyboardEventListener<T extends ItemDetails<?>> {
/**
* Handles key events on the view holder.
*
* @param details The target ItemHolder.
* @param keyCode Key code for the event.
* @param event KeyEvent for the event.
*
* @return Whether the event was handled.
*/
public abstract boolean onKey(T details, int keyCode, KeyEvent event);
}
| [
"user@email.edu"
] | user@email.edu |
5c280984a59a318008fb36782672e0a02a6f2146 | aeed727b42e4d96bc600dc90260d4d14c2ba1d63 | /src/classOverride/ComputerExample.java | df76a70535bc22c4ef40c1a94dab3d6a2803601e | [] | no_license | sjy9137/Java_Study | 7a21d97dec3ca35d96e6c218fca5f72c3e326426 | 495fa3a0a6b181a7ccae92837064272a4fac41ec | refs/heads/master | 2021-04-18T19:09:56.973016 | 2018-04-12T07:34:48 | 2018-04-12T07:34:48 | 126,759,522 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 311 | java | package classOverride;
public class ComputerExample {
public static void main(String[] args) {
int r = 10;
Calculator calculator = new Calculator();
System.out.println(calculator.areaCircle(r));
Computer computer = new Computer();
System.out.println(computer.areaCircle(r));
}
}
| [
"sjy9137@naver.com"
] | sjy9137@naver.com |
e1b5c4c62d0ed90a775b5ec8e41b0224c54df391 | 832d1e55c96c033ca011cb719c0dc780ce9edf20 | /gms-core/src/main/java/com/taoyuan/gms/core/proxymanage/controller/CardPwdInventoryController.java | 4cfee3eaf30cb101b7f25fce3d931e72dc9cf92a | [] | no_license | supermanhzc/gms | 327c51f900ccfa74ab838df28b59f95454a51fd2 | 8c3d88ca16d74f9d46b5bc69902f747d3b1d0745 | refs/heads/develop | 2020-04-04T16:29:48.570256 | 2019-01-04T14:54:07 | 2019-01-04T14:54:07 | 156,080,492 | 0 | 0 | null | 2019-01-07T01:02:56 | 2018-11-04T12:36:49 | Java | UTF-8 | Java | false | false | 4,515 | java | package com.taoyuan.gms.core.proxymanage.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.taoyuan.framework.bs.aspect.OperControllerLog;
import com.taoyuan.framework.common.exception.ValidateException;
import com.taoyuan.framework.common.http.TyResponse;
import com.taoyuan.framework.common.http.TySuccessResponse;
import com.taoyuan.framework.common.util.TyRandomUtil;
import com.taoyuan.gms.api.proxy.CardPwdInventoryApi;
import com.taoyuan.gms.common.util.CardUtil;
import com.taoyuan.gms.core.adminmanage.dao.CardPasswordMapper;
import com.taoyuan.gms.core.adminmanage.service.ICardPasswordService;
import com.taoyuan.gms.model.dto.admin.card.CardPwdInventoryResquest;
import com.taoyuan.gms.model.entity.admin.card.CardPasswordEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
public class CardPwdInventoryController extends BaseGmsProxyController implements CardPwdInventoryApi {
@Autowired
private ICardPasswordService service;
@Autowired
private CardPasswordMapper mapper;
@Override
@OperControllerLog(module = "代理卡密库存管理", type = "查询代理卡密库存")
public TyResponse retrieve(@RequestBody CardPwdInventoryResquest resquest) {
log.info("input:{}", resquest);
Page page = getPage(resquest);
QueryWrapper<CardPasswordEntity> wrapper = new QueryWrapper<CardPasswordEntity>();
if (null != resquest.getKeyword()) {
String keyword = (String) resquest.getKeyword();
wrapper.lambda().eq(CardPasswordEntity::getCardId, keyword).or().eq(CardPasswordEntity::getCardPassword,
keyword);
}
if (0 != resquest.getCardType()) {
wrapper.lambda().eq(CardPasswordEntity::getCardType, resquest.getCardType());
}
wrapper.lambda().eq(CardPasswordEntity::getStatus, 1).or().eq(CardPasswordEntity::getStatus, 2).eq(CardPasswordEntity::getOwner, getCurrentUserName()).orderByDesc(CardPasswordEntity::getCreateTime);
return new TySuccessResponse(mapper.selectPage(page, wrapper));
}
@Override
@OperControllerLog(module = "代理卡密库存管理", type = "创建代理卡密")
public TyResponse create(@RequestBody Map<String, Object> map) {
if (!map.containsKey("cardType")) {
throw new ValidateException("卡类型不能为空。");
}
int cardType = (int) map.get("cardType");
String cardHead = CardUtil.getCardHead(cardType);
if (!map.containsKey("number")) {
throw new ValidateException("数量不能为空。");
}
int number = (int) map.get("number");
BigDecimal total = CardUtil.getMoney(cardType).multiply(BigDecimal.valueOf(number));
if (total.compareTo(getBalance(getCurrentUserId())) > 0) {
throw new ValidateException("生成卡密总额大于用户余额。");
}
BigDecimal moneyChanged = BigDecimal.ZERO;
List<CardPasswordEntity> entityList = new ArrayList<CardPasswordEntity>();
for (int i = 0; i < number; i++) {
//默认生成随机8位id和密码
String id = TyRandomUtil.getRandomNum(8);
log.info("generate id is {}", id);
String pwd = TyRandomUtil.getRandomStr(8);
log.info("generate password is {}", pwd);
CardPasswordEntity entity = new CardPasswordEntity();
entity.setCardType(cardType);
entity.setCardId(cardHead + id);
entity.setStatus(1);
entity.setCardPassword(pwd);
entity.setCreateTime(new Date());
entity.setCreateUser(getCurrentUserId());
entity.setOwner(getCurrentUserName());
entity.setStartTime(new Date());
entityList.add(entity);
moneyChanged = moneyChanged.add(entity.getMoney());
}
service.saveBatch(entityList);
log.info("moneychanged is {}",moneyChanged);
//记录日志
recordOperation(7, "创建卡密", moneyChanged);
return new TySuccessResponse(entityList);
}
}
| [
"supermanhzc@163.com"
] | supermanhzc@163.com |
26bdde4be5a61361060c8ae988347db8f5982122 | 1871f3d13165cc462b602c8cd329af7072aec2d8 | /src/net/stegr/testplugin/chest/ChestLockType.java | 2aff19ca772501d8fa3ff5d48a4e2dc21ed59444 | [] | no_license | Dragon9815/TestPlugin | f22a4f32c6005b8cd70e22def01a35e2a0817bf6 | 7983b085676f9d14bf50ff7e7b3eca6a449ccf05 | refs/heads/master | 2021-01-15T12:25:34.081271 | 2015-06-03T13:26:16 | 2015-06-03T13:26:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 90 | java | package net.stegr.testplugin.chest;
public enum ChestLockType
{
Public,
Locked
}
| [
"gruenzinger.stefan@gmail.com"
] | gruenzinger.stefan@gmail.com |
d0494f44162d32943c335a0c3ceb088ab9f865fe | dc2c83c1a70427087bddb734bd5ac0acb6d29799 | /CFJProteseNovo/JavaSource/com/mb/OrdemServicoMB.java | b4884bc826fa7c9dbfea61c6f7a069a1cafa0367 | [] | no_license | jferreirab/projeto_laboratoio | 4a82ab99dae4abb3080f2f7d0704ea80f67a9b1e | b33eaf3cea2dc974e96e237165260a0be9892aef | refs/heads/master | 2016-09-12T08:48:43.878092 | 2016-04-28T01:47:02 | 2016-04-28T01:47:02 | 57,260,875 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 33,947 | java | package com.mb;
import java.io.IOException;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import org.primefaces.event.RowEditEvent;
import org.primefaces.event.SelectEvent;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.JasperRunManager;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.engine.util.JRLoader;
import com.facade.ClienteFacade;
import com.facade.CorFacade;
import com.facade.DenteFacade;
import com.facade.DentistaFacade;
import com.facade.HistoricoItemOrdemServicoFacade;
import com.facade.HistoricoOrdemServicoFacade;
import com.facade.ItemOrdemServicoFacade;
import com.facade.OrdemServicoFacade;
import com.facade.RelatorioOrdemServicoFacade;
import com.facade.ServicoFacade;
import com.model.Cliente;
import com.model.Cor;
import com.model.Dente;
import com.model.Dentista;
import com.model.HistoricoItemOrdemServico;
import com.model.HistoricoOrdemServico;
import com.model.ItemOrdemServico;
import com.model.OrdemServico;
import com.model.RelatorioOrdemServico;
import com.model.Servico;
import com.model.Situacao;
import com.model.User;
import com.util.Sistema;
@ViewScoped
@ManagedBean
public class OrdemServicoMB extends AbstractMB implements Serializable {
private static final long serialVersionUID = 1L;
private OrdemServico ordemServico;
private OrdemServico filtro;
private List<OrdemServico> ordemServicos;
private OrdemServicoFacade ordemServicoFacade;
private ClienteFacade clienteFacade;
private DentistaFacade dentistaFacade;
private Cliente cliente;
private Cliente clienteFiltro;
private Dentista dentistaFiltro;
private List<Cliente> allClientes;
private Situacao situacao;
private Situacao situacaoFiltro;
private List<Dentista> allDentistas;
private Dentista dentista;
private HistoricoOrdemServico historicoOrdemServico;
private HistoricoOrdemServicoFacade historicoOrdemServicoFacade;
private ItemOrdemServico itemOrdemServico;
private ItemOrdemServicoFacade itemOrdemServicoFacade;
private User user;
private RelatorioOrdemServicoFacade relatorioOrdemServicoFacade;
private Servico servico;
private ServicoFacade servicoFacade;
private List<Servico> allServicos;
private List<ItemOrdemServico> itemOrdemServicos;
private Cor cor;
private List<Cor> allCors;
private CorFacade corFacade;
private Dente dente;
private Map<String, Dente> dentes;
private List<String> selectedDentes;
private DenteFacade denteFacade;
private List<ItemOrdemServico> itemOrdemServicosDelete;
private HistoricoItemOrdemServico historicoItemOrdemServico;
private HistoricoItemOrdemServicoFacade historicoItemOrdemServicoFacade;
public OrdemServicoFacade getOrdemServicoFacade() {
if (ordemServicoFacade == null) {
ordemServicoFacade = new OrdemServicoFacade();
}
return ordemServicoFacade;
}
public DentistaFacade getDentistaFacade() {
if (dentistaFacade == null) {
dentistaFacade = new DentistaFacade();
}
return dentistaFacade;
}
public RelatorioOrdemServicoFacade getRelatorioOrdemServicoFacade() {
if (relatorioOrdemServicoFacade == null) {
relatorioOrdemServicoFacade = new RelatorioOrdemServicoFacade();
}
return relatorioOrdemServicoFacade;
}
public ClienteFacade getClienteFacade() {
if (clienteFacade == null) {
clienteFacade = new ClienteFacade();
}
return clienteFacade;
}
public ServicoFacade getServicoFacade() {
if (servicoFacade == null) {
servicoFacade = new ServicoFacade();
}
return servicoFacade;
}
public HistoricoOrdemServicoFacade getHistoricoOrdemServicoFacade() {
if (historicoOrdemServicoFacade == null) {
historicoOrdemServicoFacade = new HistoricoOrdemServicoFacade();
}
dentes = new HashMap<String,Dente>();
List<Dente> listDentes = getDenteFacade().listAll();
for(Dente den :listDentes){
dentes.put(den.getNome(),den) ;
}
return historicoOrdemServicoFacade;
}
public ItemOrdemServicoFacade getItemOrdemServicoFacade(){
if (itemOrdemServicoFacade == null){
itemOrdemServicoFacade = new ItemOrdemServicoFacade();
}
return itemOrdemServicoFacade;
}
public HistoricoItemOrdemServicoFacade getHistoricoItemOrdemServicoFacade() {
if(historicoItemOrdemServicoFacade == null){
historicoItemOrdemServicoFacade = new HistoricoItemOrdemServicoFacade();
}
return historicoItemOrdemServicoFacade;
}
public OrdemServico getOrdemServico() {
if (ordemServico == null) {
ordemServico = new OrdemServico();
}
return ordemServico;
}
public void setOrdemServico(OrdemServico ordemServico) {
List<HistoricoOrdemServico> hOS = getHistoricoOrdemServicoFacade().listAll(ordemServico);
if(hOS != null){
ordemServico.setHistoricoOrdemServico(hOS);
}
this.ordemServico = ordemServico;
historicoOrdemServicoAtual();
}
public void createOrdemServico() {
try {
user = (User) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("user");
/*if (situacao != null){
ordemServico.setSituacao(situacao);
}
if(cliente != null){
ordemServico.setCliente(cliente);
}*/
/*if(servico != null){
ordemServico.setServico(servico);
}*/
if(user != null){
ordemServico.setIdUser(user.getId());
ordemServico.setDtCadastro(new Date());
}
if(getItemOrdemServicoFacade().verificaAlteracao(ordemServico)){
getOrdemServicoFacade().createOrdemServico(ordemServico);
for(ItemOrdemServico item : ordemServico.getItemOrdemServico()){
item.setOrdemServico(ordemServico);
item.setIdUser(user.getId());
item.setDtCadastro(new Date());
getItemOrdemServicoFacade().createItemOrdemServico(item);
}
//ordemServico.setItemOrdemServico(itemOrdemServicos);
if (ordemServicos == null){
ordemServicos = getOrdemServicoFacade().recuperaOrdemServico(ordemServico);
}
else{
ordemServicos.add(ordemServico);
}
closeDialog();
displayInfoMessageToUser("Ordem Gravada com Sucesso!");
resetOrdemServico();
}
/*else{
new Exception("Não foi Informado Item para a OS!");
displayErrorMessageToUser("Não foi Informado Item para a OS. Favor Verificar!");
}*/
} catch (Exception e) {
keepDialogOpen();
displayErrorMessageToUser("Ops, não é possivel criar a OS. Tente novamente mais tarde! "+e.getMessage());
e.printStackTrace();
}
}
public void updateOrdemServico() {
try {
user = (User) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("user");
if(user != null){
ordemServico.setIdUserAlteracao(user.getId());
}
if (situacao != null){
ordemServico.setSituacao(situacao);
}
if(getItemOrdemServicoFacade().verificaAlteracao(ordemServico)){
historicoOrdemServico.setIdUserAlteracao(user.getId());
historicoOrdemServico.setDtAlteracao(new Date());
getHistoricoOrdemServicoFacade().createHistoricoOrdemServico(historicoOrdemServico);
for(HistoricoItemOrdemServico itemhist : historicoOrdemServico.getHistoricoItemOrdemServicos()){
getHistoricoItemOrdemServicoFacade().createHistoricoItemOrdemServico(itemhist);
}
List<HistoricoOrdemServico> hist /*= ordemServico.getHistoricoOrdemServico()*/;
hist = getHistoricoOrdemServicoFacade().listAll(ordemServico);
//hist.add(historicoOrdemServico);
ordemServico.setHistoricoOrdemServico(hist);
getOrdemServicoFacade().updateOrdemServico(ordemServico);
for(ItemOrdemServico item : ordemServico.getItemOrdemServico()){
item.setOrdemServico(ordemServico);
if(item.getId() == 0){
item.setIdUser(user.getId());
item.setDtCadastro(new Date());
getItemOrdemServicoFacade().createItemOrdemServico(item);
}
else{
item.setIdUserAlteracao(user.getId());
item.setDtAlteracao(new Date());
getItemOrdemServicoFacade().updateItemOrdemServico(item);
}
}
closeDialog();
displayInfoMessageToUser("Dados Gravados com Sucesso!");
//loadOrdemServicos();
resetOrdemServico();
}
/*else{
Exception e = new Exception("Não foi Informado Item para a OS!");
displayErrorMessageToUser("Não foi Informado Item para a OS. Favor Verificar!");
e.printStackTrace();
}*/
} catch (Exception e) {
keepDialogOpen();
displayErrorMessageToUser("Ops, Erro ao atualizar Dados. Tente novamente mais tarde!"+e.getMessage());
e.printStackTrace();
}
}
public void deleteOrdemServico() {
try {
getOrdemServicoFacade().deleteOrdemServico(ordemServico);
closeDialog();
displayInfoMessageToUser("Deleted With Sucess");
loadOrdemServicos();
resetOrdemServico();
} catch (Exception e) {
keepDialogOpen();
displayErrorMessageToUser("Ops, we could not create. Try again later");
e.printStackTrace();
}
}
public List<OrdemServico> getAllOrdemServicos() {
if (ordemServicos == null) {
//loadOrdemServicos();
}
if (clienteFiltro == null){
clienteFiltro = new Cliente();
}
if (dentistaFiltro == null){
dentistaFiltro = new Dentista();
}
if (filtro == null){
filtro = new OrdemServico();
}
return ordemServicos;
}
private void loadOrdemServicos() {
ordemServicos = getOrdemServicoFacade().listAll();
}
public void resetOrdemServico() {
ordemServico = new OrdemServico();
cliente = new Cliente();
filtro = new OrdemServico();
situacao = null;
servico = new Servico();
itemOrdemServico = new ItemOrdemServico();
itemOrdemServicos = new ArrayList<ItemOrdemServico>();
dente = new Dente();
dentes = new LinkedHashMap<String,Dente>();
selectedDentes = new ArrayList<String>();
List<Dente> listDentes = getDenteFacade().listAll();
for(Dente den :listDentes){
dentes.put(den.getNome(),den) ;
}
dentista = new Dentista();
}
public void resetItemOrdemServico(){
itemOrdemServico = new ItemOrdemServico();
}
public void carregaFiltro(){
if (clienteFiltro != null && clienteFiltro.getId() != 0 ){
if (filtro ==null){
filtro = new OrdemServico();
}
filtro.setCliente(clienteFiltro);
}
if (dentistaFiltro != null && dentistaFiltro.getId() != 0 ){
if (filtro ==null){
filtro = new OrdemServico();
}
filtro.setDentista(dentistaFiltro);
}
if(situacaoFiltro != null ){
if (filtro ==null){
filtro = new OrdemServico();
}
filtro.setSituacao(situacaoFiltro);
}
}
public void localizarOrdemServico() {
carregaFiltro();
ordemServicos = getOrdemServicoFacade().recuperaOrdemServico(filtro);
for(OrdemServico ordem :ordemServicos){
List<ItemOrdemServico> items = ordem.getItemOrdemServico();
for(ItemOrdemServico item : items){
if(item.getDentes() != null){
item.setListadentes(getItemOrdemServicoFacade().dentesListaString(item.getDentes()));
item.setDentesLista(getItemOrdemServicoFacade().deteString(item.getDentes()));
}
}
}
}
public Cliente getCliente() {
return cliente;
}
public void setCliente(Cliente cliente) {
this.cliente = cliente;
}
public List<Cliente> complete(String name) {
List<Cliente> queryResult = new ArrayList<Cliente>();
//if (allClientes == null) {
allClientes = getClienteFacade().listAll();
//}
//allClientes.remove(ordemServico.getCliente());
for (Cliente cliente : allClientes) {
if (cliente.getName().toLowerCase().contains(name.toLowerCase())) {
queryResult.add(cliente);
}
}
return queryResult;
}
public List<Cliente> completeFiltro(String name) {
List<Cliente> queryResult = new ArrayList<Cliente>();
//if (allClientes == null) {
allClientes = getClienteFacade().listAll();
//}
//allClientes.remove(ordemServico.getCliente());
for (Cliente cliente : allClientes) {
if (cliente.getName().toLowerCase().contains(name.toLowerCase())) {
queryResult.add(cliente);
}
}
return queryResult;
}
public Situacao getSituacao() {
return situacao;
}
public void setSituacao(Situacao situacao) {
this.situacao = situacao;
}
public List<Situacao> completeSituacao(String name) {
List<Situacao> queryResult = new ArrayList<Situacao>();
for (Situacao situacao : Situacao.values()) {
queryResult.add(situacao);
}
return queryResult;
}
public OrdemServico getAllHistoricoOrdemServicos() {
List<HistoricoOrdemServico> hist = getHistoricoOrdemServicoFacade().listAll(ordemServico);
ordemServico.setHistoricoOrdemServico(hist);
return ordemServico;
}
public HistoricoOrdemServico getHistoricoOrdemServico() {
if (historicoOrdemServico == null){
historicoOrdemServico = new HistoricoOrdemServico();
}
return historicoOrdemServico;
}
public void setHistoricoOrdemServico(HistoricoOrdemServico historicoOrdemServico) {
this.historicoOrdemServico = historicoOrdemServico;
}
public HistoricoItemOrdemServico getHistoricoItemOrdemServico() {
return historicoItemOrdemServico;
}
public void setHistoricoItemOrdemServico(
HistoricoItemOrdemServico historicoItemOrdemServico) {
this.historicoItemOrdemServico = historicoItemOrdemServico;
}
public void historicoOrdemServicoAtual() {
try {
if(ordemServico != null){
historicoOrdemServico = new HistoricoOrdemServico();
historicoOrdemServico.setDtEntrada(ordemServico.getDtEntrada());
historicoOrdemServico.setDtSaida(ordemServico.getDtSaida());
//historicoOrdemServico.setIdOS(ordemServico.getId());
historicoOrdemServico.setOrdemServico(ordemServico);
historicoOrdemServico.setPreco(ordemServico.getPreco());
historicoOrdemServico.setSituacao(ordemServico.getSituacao());
historicoOrdemServico.setCliente(ordemServico.getCliente());
historicoOrdemServico.setDentista(ordemServico.getDentista());
historicoOrdemServico.setDsDescricao(ordemServico.getDsDescricao());
//historicoOrdemServico.setServico(ordemServico.getServico());
historicoOrdemServico.setPaciente(ordemServico.getPaciente());
itemOrdemServico =new ItemOrdemServico();
//historicoOrdemServico.setHistoricoItemOrdemServicos(new ArrayList<HistoricoItemOrdemServico>());
if(ordemServico.getItemOrdemServico()!= null){
List<HistoricoItemOrdemServico> listaItemHistorico = new ArrayList<HistoricoItemOrdemServico>();
for(ItemOrdemServico item : ordemServico.getItemOrdemServico()){
historicoItemOrdemServico = new HistoricoItemOrdemServico();
historicoItemOrdemServico.setCor(item.getCor());
historicoItemOrdemServico.setDentes(item.getDentesLista());
historicoItemOrdemServico.setDtAlteracao(item.getDtAlteracao());
historicoItemOrdemServico.setDtCadastro(item.getDtCadastro());
historicoItemOrdemServico.setHistoricoOrdemServico(historicoOrdemServico);
historicoItemOrdemServico.setIdItemOS(item.getId());
historicoItemOrdemServico.setIdOS(item.getOrdemServico().getId());
historicoItemOrdemServico.setIdUser(item.getIdUser());
historicoItemOrdemServico.setIdUserAlteracao(item.getIdUserAlteracao());
historicoItemOrdemServico.setObservacao(item.getObservacao());
historicoItemOrdemServico.setPrecoTotal(item.getPrecoTotal());
historicoItemOrdemServico.setPrecoUnitario(item.getPrecoUnitario());
historicoItemOrdemServico.setQuantidade(item.getQuantidade());
historicoItemOrdemServico.setServico(item.getServico());
//historicoOrdemServico.setHistoricoItemOrdemServicos(historicoItemOrdemServico);
listaItemHistorico.add(historicoItemOrdemServico);
}
historicoOrdemServico.setHistoricoItemOrdemServicos(listaItemHistorico);
}
}
} catch (Exception e) {
keepDialogOpen();
displayErrorMessageToUser("Ops, we could not create. Try again later");
e.printStackTrace();
}
}
public OrdemServico getFiltro() {
return filtro == null ? new OrdemServico() : filtro ;
}
public void setFiltro(OrdemServico filtro) {
this.filtro = filtro;
}
public Cliente getClienteFiltro() {
return clienteFiltro;
}
public void setClienteFiltro(Cliente clienteFiltro) {
this.clienteFiltro = clienteFiltro;
}
public Situacao getSituacaoFiltro() {
return situacaoFiltro;
}
public void setSituacaoFiltro(Situacao situacaoFiltro) {
this.situacaoFiltro = situacaoFiltro;
}
public void limpaCodigo(){
filtro.setId(0);
}
public void limpaCliente(){
clienteFiltro = new Cliente();
filtro.setCliente(clienteFiltro);
}
public void limpaDentista(){
dentistaFiltro = new Dentista();
filtro.setDentista(dentistaFiltro);
}
public void limpaPaciente(){
filtro.setPaciente("");
}
public void limpaPeriodo(){
Date data = null ;
filtro.setDtEntrada(data);
filtro.setDtSaida(data);
}
public void limpaSituacao(){
situacaoFiltro = null;
filtro.setSituacao(situacaoFiltro);
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
//gerar relatorio pdf
private byte[] relatorioOrdemServico(
String path,
String slash,
Collection< RelatorioOrdemServico > lista,
String nomeRelatorio
) throws JRException,Exception {
if ( nomeRelatorio == null ) {
displayErrorMessageToUser("Ops,Nome do relatário não informado");
}
if ( lista == null || lista.size() == 0 ) {
throw new Exception( "Não há informação disponível para imprimir "
);
}
Map< String, Object > parametros = new HashMap< String, Object >();
parametros.put( "SUBREPORT_DIR", path + slash );
GregorianCalendar g = new GregorianCalendar();
g.set( GregorianCalendar.getInstance().get( GregorianCalendar.YEAR ), GregorianCalendar.getInstance().get(
GregorianCalendar.MONDAY ), GregorianCalendar.getInstance().get( GregorianCalendar.DATE ) );
parametros.put( "dataAtual", g.getTime() );
@SuppressWarnings("deprecation")
JasperReport relatorio = (JasperReport) JRLoader.loadObject( path + slash + nomeRelatorio );
byte[] bytes1 = JasperRunManager
.runReportToPdf( relatorio, parametros, new JRBeanCollectionDataSource( lista ) );
return bytes1;
}
/*
* identifica qual relatorio pdf deve ser executado e retorna os bytes para
* sua construcao
*/
private Object[] verificaRelatorioPDF( ) throws Exception {
// Localização do arquivo de propriedades lcalizado no servidor
// String configPath = "\\opt\\javaapp\\config\\compras-config.properties";
// É a propriedade relativa ao caminho onde está o relatório
// compilado.
Properties configSistema = Sistema.configSistema();
String path = configSistema.getProperty( "report.path" );
String slash = configSistema.getProperty( "system.slash" );
byte[] bytes = null;
String nomeArquivoDownload = null;
bytes = relatorioOrdemServico(path, slash);
nomeArquivoDownload = "Relatorio_Final_".concat( new Date().toString() );
Object[] relatorio = { bytes, nomeArquivoDownload };
return relatorio;
}
private byte[] relatorioOrdemServico(
String path,
String slash
) throws JRException, Exception {
String nomeRelatorio = "relatoria_fechamento_mensal_novo.jasper";
carregaFiltro();
Collection<RelatorioOrdemServico> lista =getRelatorioOrdemServicoFacade().recuperaOrdemServico(filtro);
return relatorioOrdemServico(path, slash, lista, nomeRelatorio);
}
/* identifica e constroi um relatorio pdf */
public void actionListenerImprimir( ) {
FacesContext fc = FacesContext.getCurrentInstance();
try {
Object[] relatorio = verificaRelatorioPDF( );
byte[] bytes = (byte[]) relatorio[ 0 ];
String nomeArquivoDownload = (String) relatorio[ 1 ];
if ( bytes != null && bytes.length > 0 ) {
HttpServletResponse response = (HttpServletResponse) fc.getExternalContext().getResponse();
response.setHeader( "Content-disposition", "attachment;filename=\"".concat( nomeArquivoDownload )
.concat( ".pdf\"" ) );
/*
* aqui irá abrir a janela do tipo abrir ou salvar...
*
* caso se queira abrir direto na pagina basta comentar essa
* linha
*/
response.setContentType( "application/pdf" );
response.setContentLength( bytes.length );
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write( bytes, 0, bytes.length );
ouputStream.flush();
ouputStream.close();
fc.renderResponse();
fc.responseComplete();
}
}
catch ( JRException e ) {
displayErrorMessageToUser("Ops,Erro ao gerar relatário."+e.getMessage());
e.printStackTrace();
}
catch ( IOException e ) {
displayErrorMessageToUser("Ops,Erro ao gerar relatário."+e.getMessage());
e.printStackTrace();
}
catch ( Exception e ) {
displayErrorMessageToUser("Ops,Erro ao gerar relatário."+e.getMessage());
e.printStackTrace();
}
}
public Servico getServico() {
return servico;
}
public void setServico(Servico servico) {
this.servico = servico;
}
public List<Servico> completeServico(String dsDescricao) {
List<Servico> queryResult = new ArrayList<Servico>();
allServicos = getServicoFacade().listAll();
for (Servico servico : allServicos) {
if (servico.getDsDescricao().toLowerCase().contains(dsDescricao.toLowerCase())) {
queryResult.add(servico);
}
}
return queryResult;
}
public ItemOrdemServico getItemOrdemServico() {
return itemOrdemServico;
}
public void setItemOrdemServico(ItemOrdemServico itemOrdemServico) {
this.itemOrdemServico = itemOrdemServico;
}
public List<ItemOrdemServico> getItemOrdemServicos() {
return itemOrdemServicos;
}
public void setItemOrdemServicos(List<ItemOrdemServico> itemOrdemServicos) {
this.itemOrdemServicos = itemOrdemServicos;
}
public void createItemOS(){
if(itemOrdemServicos == null){
itemOrdemServicos = new ArrayList<ItemOrdemServico>();
}
itemOrdemServico.setServico(servico);
itemOrdemServico.setCor(cor);
if(selectedDentes.size() > 0 ){
String denteString = null ;
int lista = 1;
List<Dente> listaDente = new ArrayList<Dente>();
for(String den : selectedDentes){
if(lista == 1){
denteString = den;
}
else {
denteString = denteString + " - "+den;
}
lista = 2;
listaDente.add( dentes.get(den));
}
itemOrdemServico.setDentesLista(denteString);
itemOrdemServico.setDentes(listaDente);
itemOrdemServico.setListadentes(selectedDentes);
}
if(ordemServico.getItemOrdemServico() != null){
itemOrdemServicos = ordemServico.getItemOrdemServico();
}
itemOrdemServicos.add(itemOrdemServico);
ordemServico.setItemOrdemServico(itemOrdemServicos);
reCalculaPrecoFinal(ordemServico);
itemOrdemServico = new ItemOrdemServico();
servico = new Servico();
cor = new Cor();
selectedDentes = new ArrayList<String>();
}
public Cor getCor() {
return cor;
}
public void setCor(Cor cor) {
this.cor = cor;
}
public CorFacade getCorFacade() {
if (corFacade == null) {
corFacade = new CorFacade();
}
return corFacade;
}
public List<Cor> completeCor(String dsDescricao) {
List<Cor> queryResult = new ArrayList<Cor>();
allCors = getCorFacade().listAll();
for (Cor cor : allCors) {
if (cor.getNome().toLowerCase().contains(dsDescricao.toLowerCase())) {
queryResult.add(cor);
}
}
return queryResult;
}
public DenteFacade getDenteFacade(){
if (denteFacade == null){
denteFacade = new DenteFacade();
}
return denteFacade;
}
public Dente getDente() {
return dente;
}
public void setDente(Dente dente) {
this.dente = dente;
}
public Map<String,Dente> getDentes() {
return dentes;
}
public void setDentes(Map<String,Dente> dentes) {
this.dentes = dentes;
}
public List<String> getSelectedDentes() {
return selectedDentes;
}
public void setSelectedDentes(List<String> selectedDentes) {
this.selectedDentes = selectedDentes;
}
public void onEdit(RowEditEvent event) {
FacesMessage msg = new FacesMessage("Item Editado", ((ItemOrdemServico) event.getObject()).getServico().getDsDescricao());
FacesContext.getCurrentInstance().addMessage(null, msg);
for(ItemOrdemServico item : ordemServico.getItemOrdemServico()){
if(item.getListadentes().size() > 0 ){
String denteString = null ;
int lista = 1;
List<Dente> listaDente = new ArrayList<Dente>();
for(String den : item.getListadentes()){
if(lista == 1){
denteString = den;
}
else {
denteString = denteString + " - "+den;
}
lista = 2;
listaDente.add( dentes.get(den));
}
item.setDentesLista(denteString);
item.setDentes(listaDente);
}
else{
item.setDentesLista("");
item.setDentes(null);
}
}
}
public void onCancel(RowEditEvent event) {
FacesMessage msg = new FacesMessage("Item Cancelado", ((ItemOrdemServico) event.getObject()).getServico().getDsDescricao());
FacesContext.getCurrentInstance().addMessage(null, msg);
}
public void calculaPreco() {
if(itemOrdemServico != null){
if(itemOrdemServico.getQuantidade() != null && itemOrdemServico.getQuantidade() > 0 ){
if(itemOrdemServico.getPrecoUnitario() != null && itemOrdemServico.getPrecoUnitario().compareTo(BigDecimal.ZERO) > 0 ){
//System.out.println("Valor maior que zero");
itemOrdemServico.setPrecoTotal(itemOrdemServico.getPrecoUnitario().multiply(new BigDecimal( itemOrdemServico.getQuantidade())));
}
}
}
}
public void calculaPrecoFinal(ItemOrdemServico itemOrdemServico) {
if(itemOrdemServico != null){
if(itemOrdemServico.getQuantidade() != null && itemOrdemServico.getQuantidade() > 0 ){
if(itemOrdemServico.getPrecoUnitario() != null && itemOrdemServico.getPrecoUnitario().compareTo(BigDecimal.ZERO) > 0 ){
itemOrdemServico.setPrecoTotal(itemOrdemServico.getPrecoUnitario().multiply(new BigDecimal( itemOrdemServico.getQuantidade())));
BigDecimal precoTotalOS = BigDecimal.ZERO;
for(ItemOrdemServico item : ordemServico.getItemOrdemServico()){
precoTotalOS = precoTotalOS.add(item.getPrecoTotal().setScale(2,BigDecimal.ROUND_HALF_EVEN)).setScale(2,BigDecimal.ROUND_HALF_EVEN);
}
ordemServico.setPreco(precoTotalOS);
}
}
}
}
public List<ItemOrdemServico> getItemOrdemServicosDelete() {
return itemOrdemServicosDelete;
}
public void setItemOrdemServicosDelete(
List<ItemOrdemServico> itemOrdemServicosDelete) {
this.itemOrdemServicosDelete = itemOrdemServicosDelete;
}
public void deleteItemOS(ItemOrdemServico item){
if(ordemServico.getItemOrdemServico().size() > 1){
if(item.getId() == 0){
ordemServico.getItemOrdemServico().remove(item);
reCalculaPrecoFinal(ordemServico);
}
else{
int idOS = ordemServico.getId();
getItemOrdemServicoFacade().deleteItemOrdemServico(item);
ordemServico.getItemOrdemServico().remove(item);
reCalculaPrecoFinal(ordemServico);
updateOrdemServico();
ordemServico = getOrdemServicoFacade().findOrdemServico(idOS);
historicoOrdemServicoAtual();
}
}
else{
FacesMessage msg = new FacesMessage("Existe somente Um item na OS, Não é Possivel Excluir! Favor Verificar!" );
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}
public void reCalculaPrecoFinal(OrdemServico ordemServico) {
BigDecimal precoTotalOS = BigDecimal.ZERO;
for(ItemOrdemServico item : ordemServico.getItemOrdemServico()){
precoTotalOS = precoTotalOS.add(item.getPrecoTotal().setScale(2,BigDecimal.ROUND_HALF_EVEN)).setScale(2,BigDecimal.ROUND_HALF_EVEN);
}
ordemServico.setPreco(precoTotalOS);
}
public List<Dentista> dentistaClinica(String name) {
List<Dentista> queryResult = new ArrayList<Dentista>();
if(ordemServico.getCliente() != null && ordemServico.getCliente().getId() > 0 ){
allDentistas = getDentistaFacade().recuperaDesntistasClinica(ordemServico.getCliente());
for (Dentista dentista : allDentistas) {
if (dentista.getNome().toLowerCase().contains(name.toLowerCase())) {
queryResult.add(dentista);
}
}
}
else{
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Favor informar o cliente! ", null);
FacesContext.getCurrentInstance().addMessage(null, message);
return null;
}
return queryResult;
}
public Dentista getDentista() {
return dentista;
}
public void setDentista(Dentista dentista) {
this.dentista = dentista;
}
public void clienteBusca(SelectEvent event){
int idCliente = Integer.parseInt(event.getObject().toString());
ordemServico.setCliente( clienteFacade.findCliente(idCliente));
}
public Dentista getDentistaFiltro() {
return dentistaFiltro;
}
public void setDentistaFiltro(Dentista dentistaFiltro) {
this.dentistaFiltro = dentistaFiltro;
}
public List<Dentista> completeFiltroDentista(String name) {
List<Dentista> queryResult = new ArrayList<Dentista>();
if(ordemServico.getCliente() != null && ordemServico.getCliente().getId() > 0 ){
allDentistas = getDentistaFacade().recuperaDesntistasClinica(ordemServico.getCliente());
for (Dentista dentista : allDentistas) {
if (dentista.getNome().toLowerCase().contains(name.toLowerCase())) {
queryResult.add(dentista);
}
}
}
else{
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Favor informar o cliente! ", null);
FacesContext.getCurrentInstance().addMessage(null, message);
return null;
}
return queryResult;
}
public void listaDentesString(){
if(selectedDentes.size() > 0 ){
String denteString = null ;
int lista = 1;
long quantidade = 0;
List<Dente> listaDente = new ArrayList<Dente>();
for(String den : selectedDentes){
quantidade++;
if(lista == 1){
denteString = den;
}
else {
denteString = denteString + " - "+den;
}
lista = 2;
listaDente.add( dentes.get(den));
}
itemOrdemServico.setDentesLista(denteString);
itemOrdemServico.setQuantidade(quantidade);
//itemOrdemServico.setDentes(listaDente);
}
else {
itemOrdemServico.setDentesLista("");
itemOrdemServico.setQuantidade(1l);
}
}
public void listaDentesString2(ItemOrdemServico item){
if(item.getListadentes().size() > 0 ){
long quantidade = item.getListadentes().size();
item.setQuantidade(quantidade);
calculaPrecoFinal(item);
String denteString = null ;
int lista = 1;
List<Dente> listaDente = new ArrayList<Dente>();
for(String den : item.getListadentes()){
quantidade++;
if(lista == 1){
denteString = den;
}
else {
denteString = denteString + " - "+den;
}
lista = 2;
listaDente.add( dentes.get(den));
}
item.setDentesLista(denteString);
}
else {
item.setQuantidade(1l);
calculaPrecoFinal(item);
item.setDentesLista("");
}
}
}
| [
"jferr@192.168.0.107"
] | jferr@192.168.0.107 |
6a19e8e40e8cf0043ca8852d2c1cbcdf032d3c8a | f466b5539f7497d3862783f11416790b63762c22 | /mvp/src/main/java/com/vv/mvp/mvp/BasePresenter.java | 01def4812ea72b4dc6224089e88c0d1572bb0a39 | [] | no_license | loveuu715/RxJavaDemo | 27e3fe8880e6e97d5968af0cb0e2f480b19c41fa | e4f72b72633f383826ee8cb47477325d8d847a0a | refs/heads/master | 2020-04-17T08:12:20.716612 | 2016-08-25T03:26:48 | 2016-08-25T03:26:48 | 66,520,743 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 290 | java | package com.vv.mvp.mvp;
/**
* Created by VV on 2016/8/21.
*/
public abstract class BasePresenter<T> {
public BaseModel MODEL = new DefaultModel();
public BaseView VIEW = null;
public BasePresenter(BaseView<T> view) {
VIEW = view;
}
abstract void fetch();
}
| [
"huangchunwei715@163.com"
] | huangchunwei715@163.com |
6df0906779c28b25651197987d5ac528d5c28061 | ca011ebfbae7bf89aad4c65ca7a4915d71e41b91 | /src/com/internalaudit/client/view/UserPackages.java | d6d59db3d4fac25a38143dcfc38748e7a06bdf58 | [] | no_license | junaidp/InternalAudit1.1 | 746f32e72000127a076738a358b59f697191f27d | c0c3c3848812eb2da71000f775d397692387a45b | refs/heads/master | 2021-06-07T18:28:12.512429 | 2021-04-07T06:26:49 | 2021-04-07T06:26:49 | 139,792,576 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 602 | java | package com.internalaudit.client.view;
public enum UserPackages {
TRIAL(0, "Trial",
"15 days trial for premium services"),
BASIC(1, "Basic",
"Basic Service, No Libraries "),
GOLD(2, "Gold",
"Gold Pacakge having limited Services"),
PLATINUM(3, "Platinum",
"Platinum Pacakge having full Services");
int id;
String name;
String description ;
UserPackages( int id,String name, String description ){
this.name = name;
this.id = id;
this.description = description;
}
}
| [
"Administrator@hyphen"
] | Administrator@hyphen |
10c8bc820dea06f74e6da91a7f7eeef771f06b69 | 97cb077684c9b48c55fbd38dc2d6f427d09cfc84 | /inception-external-search-pubannotation/src/main/java/de/tudarmstadt/ukp/inception/externalsearch/pubannotation/PubAnnotationProvider.java | 1f2a7f2efe252c584d552e1908de5e9470f8feb3 | [
"Apache-2.0"
] | permissive | munterkalmsteiner/inception | a1ea9bdcf4b767c23545e28b22314b539226816c | e926d618b41bda3ac913b14226d41d856ec8ff53 | refs/heads/master | 2021-08-23T09:49:50.272515 | 2019-11-07T16:09:59 | 2019-11-07T16:09:59 | 187,865,137 | 1 | 44 | Apache-2.0 | 2020-03-15T19:19:16 | 2019-05-21T15:26:20 | Java | UTF-8 | Java | false | false | 6,761 | java | /*
* Copyright 2019
* Ubiquitous Knowledge Processing (UKP) Lab
* Technische Universität Darmstadt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.tudarmstadt.ukp.inception.externalsearch.pubannotation;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Arrays.asList;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import de.tudarmstadt.ukp.clarin.webanno.support.JSONUtil;
import de.tudarmstadt.ukp.inception.externalsearch.ExternalSearchHighlight;
import de.tudarmstadt.ukp.inception.externalsearch.ExternalSearchProvider;
import de.tudarmstadt.ukp.inception.externalsearch.ExternalSearchResult;
import de.tudarmstadt.ukp.inception.externalsearch.model.DocumentRepository;
import de.tudarmstadt.ukp.inception.externalsearch.pubannotation.format.PubAnnotationSectionsFormatSupport;
import de.tudarmstadt.ukp.inception.externalsearch.pubannotation.model.PubAnnotationDocumentHandle;
import de.tudarmstadt.ukp.inception.externalsearch.pubannotation.model.PubAnnotationDocumentSection;
import de.tudarmstadt.ukp.inception.externalsearch.pubannotation.traits.PubAnnotationProviderTraits;
public class PubAnnotationProvider
implements ExternalSearchProvider<PubAnnotationProviderTraits>
{
private static final Logger LOG = LoggerFactory.getLogger(PubAnnotationProvider.class);
public List<PubAnnotationDocumentHandle> query(PubAnnotationProviderTraits aTraits,
String aQuery)
{
Map<String, String> variables = new HashMap<>();
variables.put("keywords", aQuery);
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<List<PubAnnotationDocumentHandle>> response = restTemplate.exchange(
aTraits.getUrl() + "/docs.json?keywords={keywords}", HttpMethod.GET, null,
new DocumentHandleList(), variables);
return response.getBody();
}
@Override
public List<ExternalSearchResult> executeQuery(DocumentRepository aDocumentRepository,
PubAnnotationProviderTraits aTraits, String aQuery)
{
List<PubAnnotationDocumentHandle> response = query(aTraits, aQuery);
List<ExternalSearchResult> results = new ArrayList<>();
for (PubAnnotationDocumentHandle handle : response) {
ExternalSearchResult result = new ExternalSearchResult(aDocumentRepository,
handle.getSourceDb(), handle.getSourceId() + ".json");
result.setOriginalSource(handle.getSourceDb());
result.setDocumentTitle(handle.getUrl());
result.setHighlights(handle.getHighlights().stream()
.map(ExternalSearchHighlight::new)
.collect(Collectors.toList()));
results.add(result);
}
return results;
}
@Override
public ExternalSearchResult getDocumentResult(DocumentRepository aRepository,
PubAnnotationProviderTraits aTraits, String aCollectionId, String aDocumentId)
throws IOException
{
ExternalSearchResult result = new ExternalSearchResult(aRepository, aCollectionId,
aDocumentId);
return result;
}
@Override
public String getDocumentText(DocumentRepository aDocumentRepository,
PubAnnotationProviderTraits aTraits, String aCollectionId, String aDocumentId)
{
return getSections(aDocumentRepository, aTraits, aCollectionId, aDocumentId).stream()
.map(PubAnnotationDocumentSection::getText)
.collect(Collectors.joining("\n\n"));
}
@Override
public InputStream getDocumentAsStream(DocumentRepository aDocumentRepository,
PubAnnotationProviderTraits aTraits, String aCollectionId, String aDocumentId)
throws IOException
{
String json = JSONUtil.toJsonString(
getSections(aDocumentRepository, aTraits, aCollectionId, aDocumentId));
return IOUtils.toInputStream(json, UTF_8);
}
private List<PubAnnotationDocumentSection> getSections(DocumentRepository aDocumentRepository,
PubAnnotationProviderTraits aTraits, String aCollectionId, String aDocumentId)
{
Map<String, String> variables = new HashMap<>();
variables.put("collectionId", aCollectionId);
variables.put("documentId", aDocumentId);
RestTemplate restTemplate = new RestTemplate();
try {
// If the document has multiple sections, a list is returned...
ResponseEntity<List<PubAnnotationDocumentSection>> response = restTemplate.exchange(
aTraits.getUrl() + "/docs/sourcedb/{collectionId}/sourceid/{documentId}",
HttpMethod.GET, null, PubAnnotationDocumentSection.SPRING_LIST_TYPE_REF,
variables);
return response.getBody();
}
catch (RestClientException e) {
// If the document has as single section, an object is returned...
PubAnnotationDocumentSection section = restTemplate.getForObject(
aTraits.getUrl() + "/docs/sourcedb/{collectionId}/sourceid/{documentId}",
PubAnnotationDocumentSection.class, variables);
return asList(section);
}
}
@Override
public String getDocumentFormat(DocumentRepository aRepository,
PubAnnotationProviderTraits aTraits, String aCollectionId, String aDocumentId)
throws IOException
{
return PubAnnotationSectionsFormatSupport.ID;
}
private static class DocumentHandleList
extends ParameterizedTypeReference<List<PubAnnotationDocumentHandle>>
{
// Just a type reference
}
}
| [
"richard.eckart@gmail.com"
] | richard.eckart@gmail.com |
2393e5572bcfada89034e94e17e495a2a0cb47c9 | a9a46bedf7fc80b19363e49d19d77dc48047e5b8 | /src/ShortNumericAndStringArray.java | 882997998e31ac6a1cf07656b3edc9e7a3f47ed5 | [] | no_license | Ciutulin/My_Array_Homework | d454a7b5745a93e07408d3f001fe873235382e51 | 32f309f18204d7b99f2c4cdac53cb2ffdbf50607 | refs/heads/master | 2020-03-21T06:39:08.494697 | 2018-06-21T23:52:02 | 2018-06-21T23:52:02 | 138,233,541 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 752 | java |
import java.util.Arrays;
public class ShortNumericAndStringArray {
public static void main(String args[]){
int[] my_array1 = {10, 15, 14, 11, 19,
12, 20, 21, 24, 29,
31, 34, 39, 36, 40};
String[] my_array2 = {"Mother", "Father", "Children", "Uncle", "Sister", "Brother"};
//System.out.println("Original numeric array: "+Arrays.toString(my_array1));
Arrays.sort(my_array1);
System.out.println("Sort numeric array: "+Arrays.toString(my_array1));
//System.out.println("Original string array:" +Arrays.toString(my_array2));
Arrays.sort(my_array2);
System.out.println("Sort string array: "+ Arrays.toString(my_array2));
}
}
| [
"danielaciutulin@gmail.com"
] | danielaciutulin@gmail.com |
bc05f26c57f0ee70eb91a9bb241172a5e3d3fd02 | f455c8fd1820ebb7abbbef3897ddebabf39e60b2 | /src/info233v2018/labuke4/StackInterface.java | 49d8c3ccbfeb4c7b104aa181d9954c0952d19f3b | [] | no_license | sknutsen/info233v2018 | 3db6682c758c1173a20ff5ba254982afa8fd32fd | a840aeb50d15fa3550f09f9bc54e11494bc92e32 | refs/heads/master | 2021-03-29T08:49:58.894699 | 2021-01-15T22:00:38 | 2021-01-15T22:00:38 | 117,207,702 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 728 | java | package info233v2018.labuke4;
public interface StackInterface {
}
/**
* 5.1
* it will remove the object that was added last first
*
* 5.2
*
*
* 5.3
* nothing
*
* 5.4
* 111
* 222
* 333
*
* 5.5.a
* 6
*
* 5.5.b
* nth triangle number
*
* 5.6
* a { {[ {[( {[ { null
* b { {( { {[ { {) )
* c {])
*
* 5.7
* a ab*cd-/
* b abc * - de * f * g + /
* c ab / c de - + *
* d a^b cd - *
*
* 5.8
* a 15
* b 33
* c 241
*
* 5.9
* a + ab * c - d
* b + / * ab - ca * de
* c - ac + b^d
*
* 5.10
*
*
* 6.1
* idk
*
* 6.2
* a.
* b. no because then you would only have access to the item that was added last
*
* 6.5
* remove(n)
* while n > 0 && !isEmpty()
* pop()
* n--
*
* 6.6
*
*
* 6.7
*/ | [
"sondreknutsen1@gmail.com"
] | sondreknutsen1@gmail.com |
93c33252215fd92413b5927a461f204e8d0367e2 | b1df851fee813939d02510383d08dd6ca98504e6 | /src/api/java/mekanism/api/tier/BaseTier.java | 9e36170202ff9414b4b491c60913639c3342928c | [
"MIT"
] | permissive | MorningSage/Mekanism-Fabric | 0d78b35ca54de30297f31f4b96aacb3e17431d29 | ef1bf9e3d08ead12a9e58372e5985cacc720372a | refs/heads/master | 2022-12-23T18:16:27.042237 | 2020-10-04T01:59:01 | 2020-10-04T01:59:01 | 291,511,422 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,404 | java | package mekanism.api.tier;
import mekanism.api.math.MathUtils;
import mekanism.api.text.EnumColor;
import net.minecraft.util.StringIdentifiable;
import java.util.Locale;
/**
* The default tiers used in Mekanism.
*
* @author aidancbrady
*/
public enum BaseTier implements StringIdentifiable {
BASIC("Basic", EnumColor.BRIGHT_GREEN, EnumColor.BRIGHT_GREEN),
ADVANCED("Advanced", EnumColor.DARK_RED, EnumColor.RED),
ELITE("Elite", EnumColor.INDIGO, EnumColor.INDIGO),
ULTIMATE("Ultimate", EnumColor.PURPLE, EnumColor.PURPLE),
CREATIVE("Creative", EnumColor.BLACK, EnumColor.DARK_GRAY);
private static final BaseTier[] TIERS = values();
private final String name;
private final EnumColor color;
private final EnumColor textColor;
BaseTier(String s, EnumColor c, EnumColor c1) {
name = s;
color = c;
textColor = c1;
}
public String getSimpleName() {
return name;
}
public String getLowerName() {
return getSimpleName().toLowerCase(Locale.ROOT);
}
public EnumColor getColor() {
return color;
}
public EnumColor getTextColor() {
return textColor;
}
@Override
public String asString() {
return name().toLowerCase(Locale.ROOT);
}
public static BaseTier byIndexStatic(int index) {
return MathUtils.getByIndexMod(TIERS, index);
}
} | [
"51978143+MorningSage@users.noreply.github.com"
] | 51978143+MorningSage@users.noreply.github.com |
d294622661545428e3e84ea0d31d526dc75a259b | 183e4126b2fdb9c4276a504ff3ace42f4fbcdb16 | /III семестр/Теорія ймовірності/Лаби/Глушко /Лаби/Лаб1/TV3/src/kpi/teorver/lab_1/GeneratorTests.java | d915c9a693ddff22cb32a39a023ee01aaaed7ab0 | [] | no_license | Computer-engineering-FICT/Computer-engineering-FICT | ab625e2ca421af8bcaff74f0d37ac1f7d363f203 | 80b64b43d2254e15338060aa4a6d946e8bd43424 | refs/heads/master | 2023-08-10T08:02:34.873229 | 2019-06-22T22:06:19 | 2019-06-22T22:06:19 | 193,206,403 | 3 | 0 | null | 2023-07-22T09:01:05 | 2019-06-22T07:41:22 | HTML | WINDOWS-1251 | Java | false | false | 2,782 | java | package kpi.teorver.lab_1;
public class GeneratorTests {
public static void Test1(int[] source) {
int set = 0;
for (int i = 0; i < source.length; i++) {
if (source[i] == 1)
set++;
}
System.out.println("Тест 1: " + set + " '1' в " + source.length
+ " битах");
}
public static void Test2(int[] source) {
int switches = 0;
for (int i = 1; i < source.length; i++) {
if (source[i] != source[i - 1])
switches++;
}
System.out.println("Тест 2: " + switches + " разнобитных пар в " + (source.length - 1)
+ " парах");
}
public static void Test3(int[] source, int wndsize) {
int counters[] = new int[1 << wndsize];
int j, k, idx;
for (j=0; j<source.length - wndsize + 1; j++) {
for (idx=0, k=0; k<wndsize; k++)
idx |= source[j+k] << wndsize-k-1;
counters[idx]++;
}
System.out.format("Тест 3: содержимое окон размера %d\n", wndsize);
for (j=0, k=1<<wndsize; j<k; j++) {
StringBuffer sb = new StringBuffer("\t");
int zeros = 32 - Integer.numberOfLeadingZeros(j);
zeros = wndsize - zeros;
for (int i=0; i<zeros; i++)
sb.append('0');
if (j > 0)
sb.append(Integer.toBinaryString(j));
sb.append(": %d\n");
System.out.format(sb.toString(), counters[j]);
}
}
private static int tmpB[];
private static void CorrectC(int[] C, int[] B, int x, boolean updateB) {
int i, ex;
if (updateB) { // save C in tmpB
for (i=0; i<x; i++)
tmpB[i] = C[i];
}
for (i=x, ex=0; i<C.length; i++) {
if (updateB) // save C in tmpB (continue)
tmpB[i] = C[i];
ex = ex + C[i] & B[i-x];
C[i] = ex & 1;
ex >>= 1;
}
}
public static void Test4(int[] source) {
int x = 1, L = 0, N = 0, d;
int[] C = new int[source.length], B = new int[source.length], t;
tmpB = new int[source.length];
C[0] = 1;
B[0] = 1;
do {
// step 2
d = source[N];
// Calculating formula from step 2
for (int j = 1; j < L; j++)
d ^= C[j] & source[N - j];
if (d == 0) // step 3; on success skip steps 4, 5
x++;
else { // failure on step 3, go through steps 4 or 5
if (2 * L > N) { // step 4: correct C and x:=x+1
CorrectC(C, B, x, false);
x++;
} else { // step 5: correct C, save previous C into B and X:=1
L = N + 1 - L;
CorrectC(C, B, x, true); // tmpB will contain previous C
// swap B and tmpB so B will contain previous C
t = B;
B = tmpB;
tmpB = t;
x = 1;
}
}
N++; // step 6 followed by check for completion
} while (N < source.length);
System.out.format("Тест 4: Линейная сложность последовательности :%d\n", L);
}
}
| [
"mazanyan027@gmail.com"
] | mazanyan027@gmail.com |
8d0d6d962a0425ea2ec7d2e1615bc74e8a6be587 | fe8d4992d2e98129683d874935995ad9aca6a9a7 | /src/com/pattern/practice/factory/inter/impl/AudiFactory.java | a5efaa05d864317280656092cf0febbb8e57c8ce | [] | no_license | johnsonDo/DesignPattern | 32a86f62b4512e17b7ea390d365854113459b516 | 030a4b843684896bf53e05f72733c5ad526e4fb7 | refs/heads/master | 2020-03-15T20:25:14.239609 | 2018-05-06T11:27:57 | 2018-05-06T11:27:57 | 132,332,041 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 420 | java | package com.pattern.practice.factory.inter.impl;
import com.pattern.practice.factory.inter.Car;
import com.pattern.practice.factory.inter.FactoryFunction;
import com.pattern.practice.factory.bean.Audi;
/**
* Created by DEllComputer on 2018/5/6.
* 奥迪工厂,专门制造奥迪
*/
public class AudiFactory implements FactoryFunction {
@Override
public Car createCar() {
return new Audi();
}
}
| [
"565045184@qq.com"
] | 565045184@qq.com |
2c679456122317f2abe69dfeca79d5540a8c69ab | 7bc8fed9a5321f6965975e92b6ad795ce04cfea5 | /java/SpringFundementals/displaydate/src/test/java/com/codingdojo/display/DisplaydateApplicationTests.java | 0f8087a6d7d5c1fec09dba54593560eb7be1ae81 | [] | no_license | Salman-Khatib/All_coding_dojo | 3282a79fb4cc15ea847560b639e2c3d9c91f157c | 9c56697123b024543748584c02a134592192a114 | refs/heads/main | 2023-07-14T12:30:48.144006 | 2021-08-25T10:26:56 | 2021-08-25T10:26:56 | 371,021,362 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 219 | java | package com.codingdojo.display;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class DisplaydateApplicationTests {
@Test
void contextLoads() {
}
}
| [
"salman.malkhatib@gmail.com"
] | salman.malkhatib@gmail.com |
f6391cfefb875a819b1675998acdf862c7bd2a83 | a711d39bb5a362de95dc176e0da6db04eee9adc0 | /gateway/src/main/java/com/gtc/tradinggateway/service/mock/dto/TradeDto.java | fec2dfe054fdddfddfd827f8dd796410e8b17fcf | [
"MIT"
] | permissive | aspineon/GTC-all-repo | 81e458415b0b95c4659263898f805056bc1226db | e4ca91147a9bffd7f5820da413507f532f179085 | refs/heads/master | 2022-04-07T09:52:40.367277 | 2020-01-19T09:47:23 | 2020-01-19T09:47:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 552 | java | package com.gtc.tradinggateway.service.mock.dto;
import com.gtc.tradinggateway.meta.TradingCurrency;
import lombok.Data;
import java.math.BigDecimal;
/**
* Created by Valentyn Berezin on 08.03.18.
*/
@Data
public class TradeDto {
private final String id;
private final TradingPair pair;
private final boolean isSell;
private final BigDecimal amount;
private final BigDecimal price;
@Data
public static class TradingPair {
private final TradingCurrency from;
private final TradingCurrency to;
}
}
| [
"valentyn.berezin@aurea.com"
] | valentyn.berezin@aurea.com |
1511febc5b4d9c5537c2efdbd0ad32f29861c051 | b3d72364ec8f4b2fb7094ca9553bbe3e4aed7b95 | /mscloud-payment/src/main/java/com/life/config/SwaggerConfig.java | 9d4e88467ac6046a5aa508265ec7b669847edbb9 | [] | no_license | YL10000/mscloud | 3981680cc0a05a07d913140b6494d70cfca2f6d5 | d2f7eda34e41878f6fd745d9e118b9e74fbe8c93 | refs/heads/master | 2023-01-30T11:19:28.127534 | 2020-12-15T12:20:32 | 2020-12-15T12:20:32 | 320,576,339 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,745 | java | package com.life.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* @Title: SwaggerConfig
* @Description: swagger配置类
* @Author: yanglin
* @Date: 2020年12月02日 11:39
* @Copyright: 2020 All Rights Reserved.北京西天取经科技有限公司
*/
@Configuration
@EnableSwagger2
public class SwaggerConfig{
@Value("${server.port}")
private Integer port;
@Value("${spring.application.name}")
private String serivceName;
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.life.controller"))
.paths(PathSelectors.any())
.build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title(serivceName+" APIs")
.description("swagger-bootstrap-ui")
.termsOfServiceUrl("http://localhost:"+port+"/")
.contact("yanglinlifeone@163.com")
.version("1.0")
.build();
}
}
| [
"yanglin@viax.org"
] | yanglin@viax.org |
c465af4cdc4bda28ddac02f2d1e67eed0a7117ca | 32518b7f80c972d6244d13cd6fa1451b332a5b98 | /app/src/androidTest/java/com/thwww/gittest/ExampleInstrumentedTest.java | c13814ce20b6952c3778d4a2efbf8cc47cb1b33a | [] | no_license | maikly-m/gittest | 786593a34d5eb30359384f7b8e6d2296a3fea827 | 4ebf20d250e9abd303750201cc96fa7e29b77152 | refs/heads/master | 2020-03-19T10:54:45.839576 | 2018-06-20T05:41:55 | 2018-06-20T05:41:55 | 136,411,690 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 736 | java | package com.thwww.gittest;
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.thwww.gittest", appContext.getPackageName());
}
}
| [
"877482941@qq.com"
] | 877482941@qq.com |
cd29afb443746be4ac53d53254bdae5bddd62473 | 2613c9c2bde0cb3230a11bb04dfe863a612fccbc | /org.tolven.wsclient.example/client/source/org/tolven/client/examples/ws/document/jaxws/QueueMessage.java | a1965399c6b5cd42850538f87c82254ad7007240 | [] | no_license | kedar-s/bugtest | 1d38a8f73419cc8f60ff41553321ca9942ba09b0 | 36e3556973b7320f1f2fcf5ef48af733bcb537c1 | refs/heads/main | 2023-08-22T09:51:25.918449 | 2021-10-14T16:09:29 | 2021-10-14T16:09:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,637 | java |
package org.tolven.client.examples.ws.document.jaxws;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for queueMessage complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="queueMessage">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="payload" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
* <element name="ns" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="accountId" type="{http://www.w3.org/2001/XMLSchema}long"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "queueMessage", propOrder = {
"payload",
"ns",
"accountId"
})
public class QueueMessage {
@XmlElementRef(name = "payload", type = JAXBElement.class, required = false)
protected JAXBElement<byte[]> payload;
protected String ns;
protected long accountId;
/**
* Gets the value of the payload property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link byte[]}{@code >}
*
*/
public JAXBElement<byte[]> getPayload() {
return payload;
}
/**
* Sets the value of the payload property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link byte[]}{@code >}
*
*/
public void setPayload(JAXBElement<byte[]> value) {
this.payload = value;
}
/**
* Gets the value of the ns property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNs() {
return ns;
}
/**
* Sets the value of the ns property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNs(String value) {
this.ns = value;
}
/**
* Gets the value of the accountId property.
*
*/
public long getAccountId() {
return accountId;
}
/**
* Sets the value of the accountId property.
*
*/
public void setAccountId(long value) {
this.accountId = value;
}
}
| [
"kedarsambhus@outlook.com"
] | kedarsambhus@outlook.com |
0fb632519bd49ddb17e9723161585a3fa0bf5258 | 5a323609683ca271594ab824d09be0450f51d477 | /src/main/java/com/training/armstrong/exception/InputOutOfRangeException.java | 039f4093f5dd5f4771b59891b5d5da846eda98dc | [] | no_license | Niveditamohan/basic-java-assignments1 | b5eb6ef478b2e7bf6d3aec6c612955009f361dd5 | 97427c92bf9e93578937a47ed55edd5b1e16dec5 | refs/heads/master | 2021-07-20T13:53:48.159654 | 2019-11-13T10:56:03 | 2019-11-13T10:56:03 | 221,386,372 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 272 | java | package com.training.armstrong.exception;
public class InputOutOfRangeException extends Exception {
public InputOutOfRangeException() {
}
/**
* Passes message to super class Exception
*/
public InputOutOfRangeException(String message) {
super(message);
}
}
| [
"m.nivedita@capgemini.com"
] | m.nivedita@capgemini.com |
f01525cb7cc3b505f01881dba380f770a869b3e2 | f4ffc7fd4bd0a910aa4b174cdfcdad82099df27f | /ProjectBri/app/src/main/java/com/example/ishaqfakhrozi/projectbri/Helper/FileDownloader.java | 737f418d95669575e3fb7d40061a2273da026a01 | [] | no_license | Newtton/BRI | ff0c9ebcfff36c8ee1668c445329b55208ce980d | 19ec8113261cdf4cfd9c8cb91584ab2cab8bf059 | refs/heads/master | 2020-03-26T05:05:45.499595 | 2018-09-03T09:56:39 | 2018-09-03T09:56:39 | 144,537,822 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,448 | java | package com.example.ishaqfakhrozi.projectbri.Helper;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
public class FileDownloader {
private static final int MEGABYTE = 1024 * 1024;
public static void downloadFile(String fileUrl, File directory){
try {
URL url = new URL(fileUrl);
HttpURLConnection urlConnection = (HttpURLConnection)url.openConnection();
//urlConnection.setRequestMethod("GET");
//urlConnection.setDoOutput(true);
urlConnection.connect();
InputStream inputStream = urlConnection.getInputStream();
FileOutputStream fileOutputStream = new FileOutputStream(directory);
int totalSize = urlConnection.getContentLength();
byte[] buffer = new byte[MEGABYTE];
int bufferLength = 0;
while((bufferLength = inputStream.read(buffer))>0 ){
fileOutputStream.write(buffer, 0, bufferLength);
}
fileOutputStream.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
} | [
"37141145+Newtton@users.noreply.github.com"
] | 37141145+Newtton@users.noreply.github.com |
fb9af7e227fbd03566966734f7c8116a1c370f15 | c6ff5aa2d91ca8ddfe22bc45bb80bff4fbfbd16e | /EX10-ALARM/EX10ALARM/app/src/test/java/com/example/ex10_alarm/ExampleUnitTest.java | 79a713ce5cdb4d5713eef32575f0f747aad4e53a | [] | no_license | Gayathri-Mahendran2/MADLAB | a83b706c39c61800b9641b3bfbcddfced118fb47 | e258e107c127f3375ebfaa4b8dc336508d6ca0e2 | refs/heads/main | 2023-08-26T08:56:34.030839 | 2021-11-07T08:44:22 | 2021-11-07T08:44:22 | 425,275,512 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 383 | java | package com.example.ex10_alarm;
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);
}
} | [
"noreply@github.com"
] | Gayathri-Mahendran2.noreply@github.com |
142f0baec1f91f0c0bdbc7fbaf49bc350034f8be | 13061f33f1a0fce669d20422d198d01da5f57435 | /src/main/java/sportsbot/model/QuestionResponse.java | b2034ff031a47ad47f41c2c5c3dfe40f983baa55 | [] | no_license | djdapz/EecsSportsBotWithTests | 654a853a73e17fa36084fe7d40e6d044edf89b08 | 636d0e7a98fe1dffa75edb89550bb3acdb3db0c0 | refs/heads/master | 2020-12-30T15:20:50.257702 | 2017-05-31T23:20:07 | 2017-05-31T23:20:07 | 91,123,776 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,779 | java | package sportsbot.model;
import sportsbot.enums.Sport;
import sportsbot.enums.TemporalContext;
import javax.persistence.criteria.CriteriaBuilder;
/**
* Created by devondapuzzo on 4/25/17.
*/
public class QuestionResponse {
private String question;
private String response;
private TemporalContext temporalContext;
private Sport sport;
private int gameID;
private String teamAbbr;
private boolean error = false;
private String errorMessage;
private int conversationId;
private String source;
public QuestionResponse(QuestionContext questionContext) {
this.question = questionContext.getQuestion();
this.response = questionContext.getResponse();
this.temporalContext = questionContext.getTemporalContext();
this.sport = questionContext.getSport();
this.conversationId = questionContext.getId();
this.source = questionContext.getSource();
if(questionContext.getGame() !=null){
this.gameID = questionContext.getGame().getId();
}
if(questionContext.getTeam() !=null){
this.teamAbbr = questionContext.getTeam().getAbbreviation();
}
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public int getConversationId() {
return conversationId;
}
public void setConversationId(int conversationId) {
this.conversationId = conversationId;
}
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question;
}
public String getResponse() {
return response;
}
public void setResponse(String response) {
this.response = response;
}
public TemporalContext getTemporalContext() {
return temporalContext;
}
public void setTemporalContext(TemporalContext temporalContext) {
this.temporalContext = temporalContext;
}
public Sport getSport() {
return sport;
}
public void setSport(Sport sport) {
this.sport = sport;
}
public int getGameID() {
return gameID;
}
public void setGameID(int gameID) {
this.gameID = gameID;
}
public String getTeamAbbr() {
return teamAbbr;
}
public void setTeamAbbr(String teamAbbr) {
this.teamAbbr = teamAbbr;
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public boolean isError() {
return error;
}
public void setError(boolean error) {
this.error = error;
}
}
| [
"djdapz@aol.com"
] | djdapz@aol.com |
5d15e1529f9c8174a1f3772d22564ebdd27d8117 | c7ec96771c20bdc3c683ec8a7f3ae213a71da732 | /accountsclient/src/main/java/com/accountclient/accountsclient/AccountController.java | b3f1a01104eb685d75ec0c58590a6907ac72bbe8 | [] | no_license | sawaisinghrajadhok/microservicesdemo | 164adf497afc588f4ad61350bd9a86fa48cb6bcf | 3911b101cf98089e43becc755e39e1280da1d35a | refs/heads/master | 2021-01-25T08:18:31.003452 | 2017-06-12T10:32:40 | 2017-06-12T10:32:40 | 93,744,038 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 821 | java | package com.accountclient.accountsclient;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class AccountController {
@Autowired
private Service service;
@RequestMapping(value ="/accountList")
public List<Account> getAll() {
return service.getAll();
}
/*@RequestMapping(value = "/accountDetails/{number}", method = RequestMethod.GET)
public Account create(@PathVariable("number") String number) {
return service.get(number);
}*/
}
| [
"singhs@opallios.com"
] | singhs@opallios.com |
4b9fc5211c75cb73bd0bd4c55e0df47279f9e347 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/Alluxio--alluxio/ff2c0e7b4cef6c026fd42cafb371a3d51a363e68/before/LocalTachyonClusterMultiMaster.java | 370e71a63146f904f8b2a9ff54186cdc28899d70 | [] | 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 | 8,694 | java | /*
* Licensed to the University of California, Berkeley 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 tachyon.master;
import java.io.File;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.List;
import org.apache.curator.test.TestingServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.base.Supplier;
import com.google.common.base.Throwables;
import tachyon.Constants;
import tachyon.UnderFileSystem;
import tachyon.client.TachyonFS;
import tachyon.conf.TachyonConf;
import tachyon.util.CommonUtils;
import tachyon.util.NetworkUtils;
import tachyon.worker.TachyonWorker;
/**
* A local Tachyon cluster with Multiple masters
*/
public class LocalTachyonClusterMultiMaster {
private static final Logger LOG = LoggerFactory.getLogger(Constants.LOGGER_TYPE);
public static void main(String[] args) throws Exception {
LocalTachyonCluster cluster = new LocalTachyonCluster(100, 8 * Constants.MB, Constants.GB);
cluster.start();
CommonUtils.sleepMs(null, Constants.SECOND_MS);
cluster.stop();
CommonUtils.sleepMs(null, Constants.SECOND_MS);
cluster = new LocalTachyonCluster(100, 8 * Constants.MB, Constants.GB);
cluster.start();
CommonUtils.sleepMs(null, Constants.SECOND_MS);
cluster.stop();
CommonUtils.sleepMs(null, Constants.SECOND_MS);
}
private TestingServer mCuratorServer = null;
private int mNumOfMasters = 0;
private TachyonWorker mWorker = null;
private long mWorkerCapacityBytes;
private int mUserBlockSize;
private String mTachyonHome;
private String mWorkerDataFolder;
private Thread mWorkerThread = null;
private String mLocalhostName = null;
private final List<LocalTachyonMaster> mMasters = new ArrayList<LocalTachyonMaster>();
private final Supplier<String> mClientSuppliers = new Supplier<String>() {
@Override
public String get() {
return getUri();
}
};
private final ClientPool mClientPool = new ClientPool(mClientSuppliers);
private TachyonConf mMasterConf;
private TachyonConf mWorkerConf;
public LocalTachyonClusterMultiMaster(long workerCapacityBytes, int masters, int userBlockSize) {
mNumOfMasters = masters;
mWorkerCapacityBytes = workerCapacityBytes;
mUserBlockSize = userBlockSize;
try {
mCuratorServer = new TestingServer();
} catch (Exception e) {
throw Throwables.propagate(e);
}
}
public synchronized TachyonFS getClient() throws IOException {
return mClientPool.getClient(mMasterConf);
}
public String getUri() {
return Constants.HEADER_FT + mCuratorServer.getConnectString();
}
public boolean killLeader() {
for (int k = 0; k < mNumOfMasters; k ++) {
if (mMasters.get(k).isStarted()) {
try {
mMasters.get(k).stop();
} catch (Exception e) {
LOG.error(e.getMessage(), e);
return false;
}
return true;
}
}
return false;
}
private void deleteDir(String path) throws IOException {
UnderFileSystem ufs = UnderFileSystem.get(path, mMasterConf);
if (ufs.exists(path) && !ufs.delete(path, true)) {
throw new IOException("Folder " + path + " already exists but can not be deleted.");
}
}
private void mkdir(String path) throws IOException {
UnderFileSystem ufs = UnderFileSystem.get(path, mMasterConf);
if (ufs.exists(path)) {
ufs.delete(path, true);
}
if (!ufs.mkdirs(path, true)) {
throw new IOException("Failed to make folder: " + path);
}
}
public void start() throws IOException {
int maxLevel = 1;
mTachyonHome =
File.createTempFile("Tachyon", "U" + System.currentTimeMillis()).getAbsolutePath();
mWorkerDataFolder = "/datastore";
String masterDataFolder = mTachyonHome + "/data";
String masterLogFolder = mTachyonHome + "/logs";
mLocalhostName = NetworkUtils.getLocalHostName();
mMasterConf = new TachyonConf();
mMasterConf.set(Constants.IN_TEST_MODE, "true");
mMasterConf.set(Constants.TACHYON_HOME, mTachyonHome);
mMasterConf.set(Constants.USE_ZOOKEEPER, "true");
mMasterConf.set(Constants.ZOOKEEPER_ADDRESS, mCuratorServer.getConnectString());
mMasterConf.set(Constants.ZOOKEEPER_ELECTION_PATH, "/election");
mMasterConf.set(Constants.ZOOKEEPER_LEADER_PATH, "/leader");
mMasterConf.set(Constants.USER_QUOTA_UNIT_BYTES, "10000");
mMasterConf.set(Constants.USER_DEFAULT_BLOCK_SIZE_BYTE, Integer.toString(mUserBlockSize));
// re-build the dir to set permission to 777
deleteDir(mTachyonHome);
mkdir(mTachyonHome);
mkdir(masterDataFolder);
mkdir(masterLogFolder);
mkdir(mMasterConf.get(Constants.UNDERFS_DATA_FOLDER, "/tachyon/data"));
mkdir(mMasterConf.get(Constants.UNDERFS_WORKERS_FOLDER, "/tachyon/workers"));
for (int k = 0; k < mNumOfMasters; k ++) {
final LocalTachyonMaster master = LocalTachyonMaster.create(mTachyonHome, mMasterConf);
master.start();
mMasters.add(master);
}
CommonUtils.sleepMs(null, 10);
mWorkerConf = new TachyonConf(mMasterConf);
mWorkerConf.set(Constants.WORKER_DATA_FOLDER, mWorkerDataFolder);
mWorkerConf.set(Constants.WORKER_MEMORY_SIZE, mWorkerCapacityBytes + "");
mWorkerConf.set(Constants.WORKER_TO_MASTER_HEARTBEAT_INTERVAL_MS, 15 + "");
// Setup conf for worker
mWorkerConf.set(Constants.WORKER_MAX_HIERARCHY_STORAGE_LEVEL, Integer.toString(maxLevel));
mWorkerConf.set("tachyon.worker.hierarchystore.level0.alias", "MEM");
mWorkerConf.set("tachyon.worker.hierarchystore.level0.dirs.path", mTachyonHome + "/ramdisk");
mWorkerConf.set("tachyon.worker.hierarchystore.level0.dirs.quota", mWorkerCapacityBytes + "");
for (int level = 1; level < maxLevel; level ++) {
String tierLevelDirPath = "tachyon.worker.hierarchystore.level" + level + ".dirs.path";
String[] dirPaths = mWorkerConf.get(tierLevelDirPath, "/mnt/ramdisk").split(",");
String newPath = "";
for (int i = 0; i < dirPaths.length; i ++) {
newPath += mTachyonHome + dirPaths[i] + ",";
}
mWorkerConf.set("tachyon.worker.hierarchystore.level" + level + ".dirs.path",
newPath.substring(0, newPath.length() - 1));
}
mWorker =
TachyonWorker.createWorker(
CommonUtils.parseInetSocketAddress(mCuratorServer.getConnectString()),
new InetSocketAddress(mLocalhostName, 0), 0, 1, 100, mWorkerConf);
Runnable runWorker = new Runnable() {
@Override
public void run() {
try {
mWorker.start();
} catch (Exception e) {
throw new RuntimeException(e + " \n Start Master Error \n" + e.getMessage(), e);
}
}
};
mWorkerThread = new Thread(runWorker);
mWorkerThread.start();
mWorkerConf.set(Constants.WORKER_PORT, mWorker.getMetaPort() + "");
mWorkerConf.set(Constants.WORKER_DATA_PORT, mWorker.getDataPort() + "");
}
public void stop() throws Exception {
stopTFS();
stopUFS();
}
public void stopTFS() throws Exception {
mClientPool.close();
mWorker.stop();
for (int k = 0; k < mNumOfMasters; k ++) {
mMasters.get(k).stop();
}
mCuratorServer.stop();
System.clearProperty("tachyon.home");
System.clearProperty("tachyon.usezookeeper");
System.clearProperty("tachyon.zookeeper.address");
System.clearProperty("tachyon.zookeeper.election.path");
System.clearProperty("tachyon.zookeeper.leader.path");
System.clearProperty("tachyon.worker.port");
System.clearProperty("tachyon.worker.data.port");
System.clearProperty("tachyon.worker.data.folder");
System.clearProperty("tachyon.worker.memory.size");
System.clearProperty("tachyon.worker.to.master.heartbeat.interval.ms");
}
public void stopUFS() throws Exception {
// masters share underfs, so only need to call on the first master
mMasters.get(0).cleanupUnderfs();
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
afe78f8dbba07e605d1bc9abda732ae38f970695 | 31b2713bb8310888d1bce3af7434e658330027a9 | /src/in/pelligent/Array.java | 3b68fc9a0643fc9f280c98b5ba68c321c9b0b727 | [] | no_license | vishal1201/CustomArrays | 67087598cbbcb327c5a3ebf8b95bb175a13b9144 | a8304a2835f2fd6c75aed89a1fd286c028b3af9c | refs/heads/master | 2023-08-25T20:56:44.989092 | 2021-10-29T14:22:13 | 2021-10-29T14:39:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 855 | java | package in.pelligent;
public abstract class Array {
protected Object[] array;
protected int lastInsertedIndex;
public Array(int size) {
array = new Object[size];
lastInsertedIndex = -1;
}
public int capacity() {
return array.length;
}
public int size() {
return lastInsertedIndex + 1;
}
public abstract boolean update(int index, Object value);
public abstract void add(Object value);
public abstract int find(Object value);
public Object get(int index) {
return array[index];
}
public abstract boolean contains(Object value);
public abstract void reverse();
public abstract Array reversed();
public abstract void sort(boolean order);
public abstract Array sorted(boolean order);
public abstract Array copyOf(Array array);
}
| [
"vishalzambare5@gmail.com"
] | vishalzambare5@gmail.com |
510e311767cc8e84c8196a55f97a67f798eea010 | 7effb2f1faebc3c5d55afee3d15c859c5b28e67b | /core/example/helloworld.java/src/main/java/mb/pie/example/helloworld/java/Main.java | d6b846d10fb9e451575dfb46049fed08f19330d3 | [
"Apache-2.0"
] | permissive | metaborg/pie | ac421ebf4e5265245137908b0c3c061848581db4 | ecf896f11a4fbc11b8aef8a8fb831663baa0d188 | refs/heads/develop | 2022-06-20T03:09:11.729080 | 2022-06-15T09:46:10 | 2022-06-15T09:46:10 | 102,454,792 | 8 | 4 | Apache-2.0 | 2022-06-15T09:46:11 | 2017-09-05T08:23:07 | Java | UTF-8 | Java | false | false | 5,599 | java | package mb.pie.example.helloworld.java;
import mb.log.stream.StreamLoggerFactory;
import mb.pie.api.ExecContext;
import mb.pie.api.MapTaskDefs;
import mb.pie.api.MixedSession;
import mb.pie.api.None;
import mb.pie.api.Pie;
import mb.pie.api.PieBuilder;
import mb.pie.api.Task;
import mb.pie.api.TaskDef;
import mb.pie.runtime.PieBuilderImpl;
import mb.pie.runtime.store.SerializingStoreBuilder;
import mb.resource.ResourceKeyString;
import mb.resource.WritableResource;
import mb.resource.fs.FSResource;
import mb.resource.hierarchical.ResourcePath;
import java.io.OutputStream;
/**
* This example demonstrates how to write a PIE build script in Kotlin with the PIE API, and how to incrementally
* execute that build script with the PIE runtime.
* <p>
* The goal of the build script is to write "Hello, world!" to a file.
*/
public class Main {
/**
* The {@link WriteHelloWorld} {@link TaskDef task definition} takes as input a {@link ResourcePath path} to a file,
* and then writes "Hello, world!" to it. This task does not return a value, so we use {@link None} as output type.
*/
public static class WriteHelloWorld implements TaskDef<ResourcePath, None> {
/**
* The {@link TaskDef#getId} method must be overridden to provide a unique identifier for this task definition.
* In this case, we use reflection to create a unique identifier.
*/
@Override public String getId() {
return getClass().getSimpleName();
}
/**
* The {@link TaskDef#exec} method must be overridden to implement the logic of this task definition. This
* function is executed with an {@link ExecContext execution context} object, which is used to tell PIE about
* dynamic task or file dependencies.
*/
@Override public None exec(ExecContext context, ResourcePath input) throws Exception {
// We write "Hello, world!" to the file.
final WritableResource file = context.getWritableResource(input);
try(final OutputStream outputStream = file.openWrite()) {
outputStream.write("Hello, world!".getBytes());
outputStream.flush();
}
// Since we have written to or created a file, we need to tell PIE about this dynamic dependency, by calling `provide` on the context.
context.provide(file);
// Since this task does not generate a value, and we use the `None` type to indicate that, we need to return the singleton instance of `None`.
return None.instance;
}
}
public static void main(String[] args) throws Exception {
// We expect one optional argument: the file to write hello world to.
final FSResource file;
if(args.length > 0) {
file = new FSResource(args[0]);
} else {
file = new FSResource("build/run/helloworld.txt");
}
file.createParents();
// Now we instantiate the task definitions.
final WriteHelloWorld writeHelloWorld = new WriteHelloWorld();
// Then, we add them to a TaskDefs object, which tells PIE about which task definitions are available.
final MapTaskDefs taskDefs = new MapTaskDefs();
taskDefs.add(writeHelloWorld);
// We need to create the PIE runtime, using a PieBuilderImpl.
final PieBuilder pieBuilder = new PieBuilderImpl();
// We pass in the TaskDefs object we created.
pieBuilder.withTaskDefs(taskDefs);
// For storing build results and the dependency graph, we will serialize the in-memory store on exit at build/store.
pieBuilder.withStoreFactory((serde, resourceService, loggerFactory) -> SerializingStoreBuilder.ofInMemoryStore(serde)
.withResourceStorage(resourceService.getHierarchicalResource(ResourceKeyString.of("build/store")))
.withLoggingDeserializeFailHandler(loggerFactory)
.build()
);
// For example purposes, we use very verbose logging which will output to stdout.
pieBuilder.withLoggerFactory(StreamLoggerFactory.stdOutVeryVerbose());
// Then we build the PIE runtime.
try(final Pie pie = pieBuilder.build()) {
// Now we create concrete task instances from the task definitions.
final Task<None> writeHelloWorldTask = writeHelloWorld.createTask(file.getPath());
// We create a new session to perform an incremental build.
try(final MixedSession session = pie.newSession()) {
// We incrementally execute the hello world task by requiring it in a top-down fashion.
// The first incremental execution will execute the task, since it is new. When no changes to the written-to file are made, the task is
// not executed since nothing has changed. When the written-to file is changed or deleted, the task is executed to re-generate the file.
session.require(writeHelloWorldTask);
// We print the text of the file to confirm that "Hello, world!" was indeed written to it.
System.out.println("File contents: " + file.readString());
// The PIE session is closed to free its resources. Using a try-with-resources block as is done here is
// the best way to ensure that.
}
}
// Finally, the PIE instance is closed to ensure the store has been fully serialized. Using a try-with-resources
// block as is done here is the best way to ensure that.
}
}
| [
"gabrielkonat@gmail.com"
] | gabrielkonat@gmail.com |
20c4147173c7b1a5b60c5f5694eb2567a8aac00e | f08256664e46e5ac1466f5c67dadce9e19b4e173 | /sources/com/bamtechmedia/dominguez/core/framework/C5733a.java | c1d2b9c8dc1cdb0678abb03b91b6576cd8991d3d | [] | no_license | IOIIIO/DisneyPlusSource | 5f981420df36bfbc3313756ffc7872d84246488d | 658947960bd71c0582324f045a400ae6c3147cc3 | refs/heads/master | 2020-09-30T22:33:43.011489 | 2019-12-11T22:27:58 | 2019-12-11T22:27:58 | 227,382,471 | 6 | 3 | null | null | null | null | UTF-8 | Java | false | false | 2,281 | java | package com.bamtechmedia.dominguez.core.framework;
import androidx.lifecycle.C0741y;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import p163g.p503n.p504a.C11790c0;
import p520io.reactivex.subjects.C11978b;
@Metadata(mo31005bv = {1, 0, 3}, mo31006d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\b\u0016\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\t\u001a\u00020\nH\u0014R\u000e\u0010\u0003\u001a\u00020\u0004X\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\b¨\u0006\u000b"}, mo31007d2 = {"Lcom/bamtechmedia/dominguez/core/framework/AutoDisposeViewModel;", "Landroidx/lifecycle/ViewModel;", "()V", "scopeSubject", "Lio/reactivex/subjects/CompletableSubject;", "viewModelScope", "Lcom/uber/autodispose/ScopeProvider;", "getViewModelScope", "()Lcom/uber/autodispose/ScopeProvider;", "onCleared", "", "core-ui-framework_release"}, mo31008k = 1, mo31009mv = {1, 1, 15})
/* renamed from: com.bamtechmedia.dominguez.core.framework.a */
/* compiled from: AutoDisposeViewModel.kt */
public class C5733a extends C0741y {
/* access modifiers changed from: private */
public final C11978b scopeSubject;
private final C11790c0 viewModelScope = new C5734a(this);
/* renamed from: com.bamtechmedia.dominguez.core.framework.a$a */
/* compiled from: AutoDisposeViewModel.kt */
static final class C5734a implements C11790c0 {
/* renamed from: a */
final /* synthetic */ C5733a f13497a;
C5734a(C5733a aVar) {
this.f13497a = aVar;
}
/* renamed from: d */
public final C11978b m18665d() {
return this.f13497a.scopeSubject;
}
}
public C5733a() {
C11978b j = C11978b.m38573j();
Intrinsics.checkReturnedValueIsNotNull((Object) j, "CompletableSubject.create()");
this.scopeSubject = j;
}
public final C11790c0 getViewModelScope() {
return this.viewModelScope;
}
/* access modifiers changed from: protected */
public void onCleared() {
this.scopeSubject.onComplete();
super.onCleared();
}
}
| [
"101110@vivaldi.net"
] | 101110@vivaldi.net |
8a8b3ea2988dd743edf0a30c5450898e4cc26f3e | f513e85fc0aeaf832d41776dacdb69e76a6875fb | /ruoyi-admin/src/main/java/com/ruoyi/item/domain/VtrSubscribe.java | d0dd3a2f2add68fdb333100ee6f9d5b142c2edc4 | [
"MIT"
] | permissive | wanghai498123/faceAttendace | 0a6b3925ce2532337afd7173e85e413b1f440da1 | 369a989329ae11bcc13f95db33df88e77acc3e6b | refs/heads/master | 2022-08-16T17:02:08.792470 | 2020-03-12T02:09:46 | 2020-03-12T02:09:46 | 246,716,236 | 0 | 0 | MIT | 2022-06-17T02:59:34 | 2020-03-12T01:27:12 | HTML | UTF-8 | Java | false | false | 7,324 | java | package com.ruoyi.item.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 访客预约对象 vtr_subscribe
*
* @author wanghai
* @date 2020-02-28
*/
public class VtrSubscribe extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 标识 */
private Long subscribeId;
/** 机构 */
@Excel(name = "机构")
private Long deptId;
/** 姓名 */
@Excel(name = "姓名")
private String visitorName;
/** 识别卡号 */
@Excel(name = "识别卡号")
private String cardNumber;
/** 身份证号 */
@Excel(name = "身份证号")
private String idNumber;
/** 出生日期 */
@Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date birthday;
/** 用户性别(0男 1女 2未知) */
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;
/** 联系方式 */
@Excel(name = "联系方式")
private String contact;
/** 省 */
@Excel(name = "省")
private String province;
/** 市 */
@Excel(name = "市")
private String city;
/** 区 */
@Excel(name = "区")
private String region;
/** 详细地址 */
@Excel(name = "详细地址")
private String fullAddress;
/** 人员类型 */
@Excel(name = "人员类型")
private String personnelType;
/** 在岗时间 */
@Excel(name = "在岗时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date dutyTime;
/** 进场时间 */
@Excel(name = "进场时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date approachTime;
/** 有效期 */
@Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
private Date validity;
/** 数据下发 */
@Excel(name = "数据下发")
private String dataDissemination;
/** 人脸 */
@Excel(name = "人脸")
private String facePath;
/** 证件 */
@Excel(name = "证件")
private String certificatePath;
/** 数据状态 */
@Excel(name = "数据状态")
private String dataState;
/** 头像路径 */
@Excel(name = "头像路径")
private String avatar;
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
/** 机构名称 */
@Excel(name = "机构名称")
private String deptName;
public void setSubscribeId(Long subscribeId)
{
this.subscribeId = subscribeId;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getSubscribeId()
{
return subscribeId;
}
public Long getDeptId()
{
return deptId;
}
public void setVisitorName(String visitorName)
{
this.visitorName = visitorName;
}
public String getVisitorName()
{
return visitorName;
}
public void setCardNumber(String cardNumber)
{
this.cardNumber = cardNumber;
}
public String getCardNumber()
{
return cardNumber;
}
public void setIdNumber(String idNumber)
{
this.idNumber = idNumber;
}
public String getIdNumber()
{
return idNumber;
}
public void setBirthday(Date birthday)
{
this.birthday = birthday;
}
public Date getBirthday()
{
return birthday;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setContact(String contact)
{
this.contact = contact;
}
public String getContact()
{
return contact;
}
public void setProvince(String province)
{
this.province = province;
}
public String getProvince()
{
return province;
}
public void setCity(String city)
{
this.city = city;
}
public String getCity()
{
return city;
}
public void setRegion(String region)
{
this.region = region;
}
public String getRegion()
{
return region;
}
public void setFullAddress(String fullAddress)
{
this.fullAddress = fullAddress;
}
public String getFullAddress()
{
return fullAddress;
}
public void setPersonnelType(String personnelType)
{
this.personnelType = personnelType;
}
public String getPersonnelType()
{
return personnelType;
}
public void setDutyTime(Date dutyTime)
{
this.dutyTime = dutyTime;
}
public Date getDutyTime()
{
return dutyTime;
}
public void setApproachTime(Date approachTime)
{
this.approachTime = approachTime;
}
public Date getApproachTime()
{
return approachTime;
}
public void setValidity(Date validity)
{
this.validity = validity;
}
public Date getValidity()
{
return validity;
}
public void setDataDissemination(String dataDissemination)
{
this.dataDissemination = dataDissemination;
}
public String getDataDissemination()
{
return dataDissemination;
}
public void setFacePath(String facePath)
{
this.facePath = facePath;
}
public String getFacePath()
{
return facePath;
}
public void setCertificatePath(String certificatePath)
{
this.certificatePath = certificatePath;
}
public String getCertificatePath()
{
return certificatePath;
}
public void setDataState(String dataState)
{
this.dataState = dataState;
}
public String getDataState()
{
return dataState;
}
public void setAvatar(String avatar)
{
this.avatar = avatar;
}
public String getAvatar()
{
return avatar;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("subscribeId", getSubscribeId())
.append("deptId", getDeptId())
.append("visitorName", getVisitorName())
.append("cardNumber", getCardNumber())
.append("idNumber", getIdNumber())
.append("birthday", getBirthday())
.append("sex", getSex())
.append("contact", getContact())
.append("province", getProvince())
.append("city", getCity())
.append("region", getRegion())
.append("fullAddress", getFullAddress())
.append("personnelType", getPersonnelType())
.append("dutyTime", getDutyTime())
.append("approachTime", getApproachTime())
.append("validity", getValidity())
.append("dataDissemination", getDataDissemination())
.append("facePath", getFacePath())
.append("certificatePath", getCertificatePath())
.append("dataState", getDataState())
.append("avatar", getAvatar())
.toString();
}
}
| [
"wanghai_498123@163.com"
] | wanghai_498123@163.com |
9f47572c6097995869b1602a900dd11cf7f3a19e | 411f5af436691ef112ca66e28e2e3acd13f5942d | /samples/client/petstore/java/okhttp4-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java | a918f753168dfc9b3ac56a7c951baacaa6fea124 | [
"Apache-2.0"
] | permissive | swagger-api/swagger-codegen | 3e8326c45ba5cb5a73806150b3e1e6fe598e119a | 0ba698d52d19e0cb79332bc13f20e02e00cedab7 | refs/heads/master | 2023-09-03T17:14:24.367082 | 2023-08-15T14:03:02 | 2023-08-15T14:03:02 | 2,006,876 | 16,415 | 7,319 | Apache-2.0 | 2023-09-14T14:06:09 | 2011-07-06T14:26:48 | Mustache | UTF-8 | Java | false | false | 48,365 | java | /*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.api;
import io.swagger.client.ApiCallback;
import io.swagger.client.ApiClient;
import io.swagger.client.ApiException;
import io.swagger.client.ApiResponse;
import io.swagger.client.Configuration;
import io.swagger.client.Pair;
import io.swagger.client.ProgressRequestBody;
import io.swagger.client.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.io.File;
import io.swagger.client.model.ModelApiResponse;
import io.swagger.client.model.Pet;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PetApi {
private ApiClient apiClient;
public PetApi() {
this(Configuration.getDefaultApiClient());
}
public PetApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Build call for addPet
* @param body Pet object that needs to be added to the store (required)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public okhttp3.Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/pet";
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json", "application/xml"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call addPetValidateBeforeCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling addPet(Async)");
}
okhttp3.Call call = addPetCall(body, progressListener, progressRequestListener);
return call;
}
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void addPet(Pet body) throws ApiException {
addPetWithHttpInfo(body);
}
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
okhttp3.Call call = addPetValidateBeforeCall(body, null, null);
return apiClient.execute(call);
}
/**
* Add a new pet to the store (asynchronously)
*
* @param body Pet object that needs to be added to the store (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public okhttp3.Call addPetAsync(Pet body, final ApiCallback<Void> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
okhttp3.Call call = addPetValidateBeforeCall(body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
/**
* Build call for deletePet
* @param petId Pet id to delete (required)
* @param apiKey (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public okhttp3.Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/pet/{petId}"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
if (apiKey != null)
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)");
}
okhttp3.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener);
return call;
}
/**
* Deletes a pet
*
* @param petId Pet id to delete (required)
* @param apiKey (optional)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void deletePet(Long petId, String apiKey) throws ApiException {
deletePetWithHttpInfo(petId, apiKey);
}
/**
* Deletes a pet
*
* @param petId Pet id to delete (required)
* @param apiKey (optional)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
okhttp3.Call call = deletePetValidateBeforeCall(petId, apiKey, null, null);
return apiClient.execute(call);
}
/**
* Deletes a pet (asynchronously)
*
* @param petId Pet id to delete (required)
* @param apiKey (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public okhttp3.Call deletePetAsync(Long petId, String apiKey, final ApiCallback<Void> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
okhttp3.Call call = deletePetValidateBeforeCall(petId, apiKey, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
/**
* Build call for findPetsByStatus
* @param status Status values that need to be considered for filter (required)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public okhttp3.Call findPetsByStatusCall(List<String> status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/pet/findByStatus";
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
if (status != null)
localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call findPetsByStatusValidateBeforeCall(List<String> status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'status' is set
if (status == null) {
throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)");
}
okhttp3.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener);
return call;
}
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter (required)
* @return List<Pet>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
ApiResponse<List<Pet>> resp = findPetsByStatusWithHttpInfo(status);
return resp.getData();
}
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter (required)
* @return ApiResponse<List<Pet>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
okhttp3.Call call = findPetsByStatusValidateBeforeCall(status, null, null);
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Finds Pets by status (asynchronously)
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public okhttp3.Call findPetsByStatusAsync(List<String> status, final ApiCallback<List<Pet>> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
okhttp3.Call call = findPetsByStatusValidateBeforeCall(status, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for findPetsByTags
* @param tags Tags to filter by (required)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @deprecated
*/
@Deprecated
public okhttp3.Call findPetsByTagsCall(List<String> tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/pet/findByTags";
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
if (tags != null)
localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@Deprecated
@SuppressWarnings("rawtypes")
private okhttp3.Call findPetsByTagsValidateBeforeCall(List<String> tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'tags' is set
if (tags == null) {
throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)");
}
okhttp3.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener);
return call;
}
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @return List<Pet>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @deprecated
*/
@Deprecated
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
ApiResponse<List<Pet>> resp = findPetsByTagsWithHttpInfo(tags);
return resp.getData();
}
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @return ApiResponse<List<Pet>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @deprecated
*/
@Deprecated
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
okhttp3.Call call = findPetsByTagsValidateBeforeCall(tags, null, null);
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Finds Pets by tags (asynchronously)
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @deprecated
*/
@Deprecated
public okhttp3.Call findPetsByTagsAsync(List<String> tags, final ApiCallback<List<Pet>> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
okhttp3.Call call = findPetsByTagsValidateBeforeCall(tags, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for getPetById
* @param petId ID of pet to return (required)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public okhttp3.Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/pet/{petId}"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "api_key" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)");
}
okhttp3.Call call = getPetByIdCall(petId, progressListener, progressRequestListener);
return call;
}
/**
* Find pet by ID
* Returns a single pet
* @param petId ID of pet to return (required)
* @return Pet
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public Pet getPetById(Long petId) throws ApiException {
ApiResponse<Pet> resp = getPetByIdWithHttpInfo(petId);
return resp.getData();
}
/**
* Find pet by ID
* Returns a single pet
* @param petId ID of pet to return (required)
* @return ApiResponse<Pet>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
okhttp3.Call call = getPetByIdValidateBeforeCall(petId, null, null);
Type localVarReturnType = new TypeToken<Pet>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Find pet by ID (asynchronously)
* Returns a single pet
* @param petId ID of pet to return (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback<Pet> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
okhttp3.Call call = getPetByIdValidateBeforeCall(petId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<Pet>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for updatePet
* @param body Pet object that needs to be added to the store (required)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public okhttp3.Call updatePetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/pet";
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json", "application/xml"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updatePetValidateBeforeCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling updatePet(Async)");
}
okhttp3.Call call = updatePetCall(body, progressListener, progressRequestListener);
return call;
}
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void updatePet(Pet body) throws ApiException {
updatePetWithHttpInfo(body);
}
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
okhttp3.Call call = updatePetValidateBeforeCall(body, null, null);
return apiClient.execute(call);
}
/**
* Update an existing pet (asynchronously)
*
* @param body Pet object that needs to be added to the store (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public okhttp3.Call updatePetAsync(Pet body, final ApiCallback<Void> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
okhttp3.Call call = updatePetValidateBeforeCall(body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
/**
* Build call for updatePetWithForm
* @param petId ID of pet that needs to be updated (required)
* @param name Updated name of the pet (optional)
* @param status Updated status of the pet (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/pet/{petId}"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (name != null)
localVarFormParams.put("name", name);
if (status != null)
localVarFormParams.put("status", status);
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/x-www-form-urlencoded"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)");
}
okhttp3.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener);
return call;
}
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated (required)
* @param name Updated name of the pet (optional)
* @param status Updated status of the pet (optional)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void updatePetWithForm(Long petId, String name, String status) throws ApiException {
updatePetWithFormWithHttpInfo(petId, name, status);
}
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated (required)
* @param name Updated name of the pet (optional)
* @param status Updated status of the pet (optional)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
okhttp3.Call call = updatePetWithFormValidateBeforeCall(petId, name, status, null, null);
return apiClient.execute(call);
}
/**
* Updates a pet in the store with form data (asynchronously)
*
* @param petId ID of pet that needs to be updated (required)
* @param name Updated name of the pet (optional)
* @param status Updated status of the pet (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public okhttp3.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback<Void> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
okhttp3.Call call = updatePetWithFormValidateBeforeCall(petId, name, status, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
/**
* Build call for uploadFile
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/pet/{petId}/uploadImage"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata);
if (file != null)
localVarFormParams.put("file", file);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"multipart/form-data"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)");
}
okhttp3.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
return call;
}
/**
* uploads an image
*
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return ModelApiResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
ApiResponse<ModelApiResponse> resp = uploadFileWithHttpInfo(petId, additionalMetadata, file);
return resp.getData();
}
/**
* uploads an image
*
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return ApiResponse<ModelApiResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
okhttp3.Call call = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null, null);
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* uploads an image (asynchronously)
*
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public okhttp3.Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback<ModelApiResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
okhttp3.Call call = uploadFileValidateBeforeCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
}
| [
"sareddy@vmware.com"
] | sareddy@vmware.com |
c662cc4c847ee20d3b49dd1e6cff44bb32a802a1 | 2b9b1c4604516d62cffb199245b11e2bfe15f849 | /HandlerThreadExample2/app/src/test/java/com/qburst/lekha/handlerthreadexample2/ExampleUnitTest.java | f1ebe971111ae40c481bdcbb0ae9e6c07c682c37 | [] | no_license | LekhaKP/Android | 2f489df95afe6504e0439f3634c154aadd01c6b5 | 3ee6bb78639001ae98790b412c31cbd85b419c28 | refs/heads/master | 2020-06-16T22:47:22.683189 | 2016-11-29T12:27:01 | 2016-11-29T12:27:01 | 75,061,488 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 416 | java | package com.qburst.lekha.handlerthreadexample2;
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() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"lekha@qburst.com"
] | lekha@qburst.com |
650d2f84420163ec1fdd126f166a300baf9f6351 | 91040ad558ea2edcc2f3931b1079aa905052e974 | /app/src/main/java/no/nordicsemi/android/nrftoolbox/ToolboxApplication.java | 4726754a433e86f789c46300ad410017cf14c8e7 | [
"Apache-2.0"
] | permissive | lystyp/Android-nRF-Toolbox | 2bbb6904df10f3f729716873ad58fd701642b14a | ee8a2f3e501a79d4c030f4ff77026a84796c729a | refs/heads/master | 2022-12-18T11:37:37.855268 | 2020-09-24T06:39:38 | 2020-09-24T06:39:38 | 298,158,607 | 0 | 0 | BSD-3-Clause | 2020-09-24T03:25:32 | 2020-09-24T03:25:31 | null | UTF-8 | Java | false | false | 3,767 | java | /*
* Copyright (c) 2017, Nordic Semiconductor
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER 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 no.nordicsemi.android.nrftoolbox;
import android.app.Application;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.os.Build;
import no.nordicsemi.android.dfu.DfuServiceInitiator;
public class ToolboxApplication extends Application {
public static final String CONNECTED_DEVICE_CHANNEL = "connected_device_channel";
public static final String FILE_SAVED_CHANNEL = "file_saved_channel";
public static final String PROXIMITY_WARNINGS_CHANNEL = "proximity_warnings_channel";
@Override
public void onCreate() {
super.onCreate();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
DfuServiceInitiator.createDfuNotificationChannel(this);
final NotificationChannel channel = new NotificationChannel(CONNECTED_DEVICE_CHANNEL, getString(R.string.channel_connected_devices_title), NotificationManager.IMPORTANCE_LOW);
channel.setDescription(getString(R.string.channel_connected_devices_description));
channel.setShowBadge(false);
channel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
final NotificationChannel fileChannel = new NotificationChannel(FILE_SAVED_CHANNEL, getString(R.string.channel_files_title), NotificationManager.IMPORTANCE_LOW);
fileChannel.setDescription(getString(R.string.channel_files_description));
fileChannel.setShowBadge(false);
fileChannel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
final NotificationChannel proximityChannel = new NotificationChannel(PROXIMITY_WARNINGS_CHANNEL, getString(R.string.channel_proximity_warnings_title), NotificationManager.IMPORTANCE_LOW);
proximityChannel.setDescription(getString(R.string.channel_proximity_warnings_description));
proximityChannel.setShowBadge(false);
proximityChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
final NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.createNotificationChannel(channel);
notificationManager.createNotificationChannel(fileChannel);
notificationManager.createNotificationChannel(proximityChannel);
}
}
}
| [
"a.f.nowakowski@gmail.com"
] | a.f.nowakowski@gmail.com |
c866b0bf5b139732fcee7e9dbea387149db54926 | 36628a72882945395ced62bfbec63c4d38d2457c | /src/main/java/com/vsm/devcase/regra/Regra.java | c26db33f00b3e8d24f9575c78f1f177b848d79fb | [] | no_license | alansep/devcase-backend | 8c9536fd5fcada85d6225b9199ffc849e3e92f5f | 4657409468b91c9a237c22984ae08c4b15ef8d38 | refs/heads/master | 2020-07-09T04:45:53.856786 | 2019-08-28T09:08:39 | 2019-08-28T09:08:39 | 203,882,417 | 0 | 0 | null | 2019-08-22T22:27:08 | 2019-08-22T22:27:07 | null | UTF-8 | Java | false | false | 2,132 | java | package com.vsm.devcase.regra;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
/**
* Classe de Modelo de Regra
* @author Gabriel Alan
*
*/
@Entity
@Table(name = "regra")
public class Regra {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "reg_codigo")
private Integer codigo;
@Column(name = "reg_valor_max")
@NotNull
private Integer valorMaximo;
@Column(name = "reg_valor_min")
@NotNull
private Integer valorMinimo;
@Column(name = "reg_pontos")
@NotNull
private Integer pontos;
public Regra() {
}
public Regra(Integer codigo, Integer valorMaximo, Integer valorMinimo, Integer pontos) {
this.codigo = codigo;
this.valorMaximo = valorMaximo;
this.valorMinimo = valorMinimo;
this.pontos = pontos;
}
public Integer getCodigo() {
return codigo;
}
public void setCodigo(Integer codigo) {
this.codigo = codigo;
}
public Integer getValorMaximo() {
return valorMaximo;
}
public void setValorMaximo(Integer valorMaximo) {
this.valorMaximo = valorMaximo;
}
public Integer getValorMinimo() {
return valorMinimo;
}
public void setValorMinimo(Integer valorMinimo) {
this.valorMinimo = valorMinimo;
}
public Integer getPontos() {
return pontos;
}
public void setPontos(Integer pontos) {
this.pontos = pontos;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((codigo == null) ? 0 : codigo.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Regra other = (Regra) obj;
if (codigo == null) {
if (other.codigo != null)
return false;
} else if (!codigo.equals(other.codigo))
return false;
return true;
}
}
| [
"alang.von@gmail.com"
] | alang.von@gmail.com |
f9e602bab3cb78594a24c57889013e16c48d054b | 228df8bef953c2658330650512fa3a60f71310f0 | /src/yzh/dataByte/MyWorld.java | 0f97f0a4b638e448cb10624b83371849c9ce2b91 | [] | no_license | yanzehao19/testwork | feaf093d3642a95d05c055836d0d47116bbac903 | 3d23f513d4f2d9f64d44da68259dab364748c4cd | refs/heads/master | 2021-01-12T07:09:09.180222 | 2018-08-18T03:09:50 | 2018-08-18T03:09:50 | 76,917,900 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,784 | java | package yzh.dataByte;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Vector;
class House implements Serializable {
}
class Animal implements Serializable {
String name;
House preferredHouse;
Animal(String nm, House h) {
name = nm;
preferredHouse = h;
}
public String toString() {
return name + "[" + super.toString() + "]," + preferredHouse + "\n";
}
}
public class MyWorld {
public static void main(String[] args) {
House house = new House();
Vector animals = new Vector();
animals.addElement(new Animal("Bosco the dog", house));
animals.addElement(new Animal("Ralph the hamster", house));
animals.addElement(new Animal("Fronk the cat", house));
System.out.println("animal:" + animals);
try {
ByteArrayOutputStream buf1 = new ByteArrayOutputStream();
ObjectOutputStream o1 = new ObjectOutputStream(buf1);
o1.writeObject(animals);
o1.writeObject(animals);
ByteArrayOutputStream buf2 = new ByteArrayOutputStream();
ObjectOutputStream o2 = new ObjectOutputStream(buf2);
o2.writeObject(animals);
ObjectInputStream in1 = new ObjectInputStream(new ByteArrayInputStream(buf1.toByteArray()));
ObjectInputStream in2 = new ObjectInputStream(new ByteArrayInputStream(buf2.toByteArray()));
Vector animals1 = (Vector) in1.readObject();
Vector animals2 = (Vector) in1.readObject();
Vector animals3 = (Vector) in2.readObject();
System.out.println("animals1" + animals1);
System.out.println("animals2" + animals2);
System.out.println("animals3" + animals3);
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"zhyan5726@fiberhome.com"
] | zhyan5726@fiberhome.com |
39f953d899dcaa74cd080d472c975e3590e46901 | 4adefcd80cdd994c563c43620f4c9a39b384be33 | /src/net/hncu/city/service/TransactionService.java | 7c02ac6f5bc1b4a4780f0c829bcb147d8d1fd3be | [] | no_license | AMX-50B/city2.0 | 462da0592b576e18e57742ae74eb03e38b460565 | ab8b7a635ae5bd92e759e394e12415cb24972735 | refs/heads/master | 2020-12-30T16:58:15.620826 | 2017-05-13T06:13:26 | 2017-05-13T06:13:26 | 91,036,832 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,099 | java | package net.hncu.city.service;
import net.hncu.city.dao.TransactionDao;
import net.hncu.city.domian.Transaction;
import net.hncu.city.exception.TransactionExcetion;
import java.sql.SQLException;
import java.util.List;
import java.util.UUID;
/**
* Created by LY on 2017/5/8.
*/
public class TransactionService {
TransactionDao td = new TransactionDao();
public String addTransaction(String id, int i,String j) throws TransactionExcetion {
Transaction t = new Transaction();
t.setId(UUID.randomUUID().toString());
t.setType(j);
t.setIntegral(i+"");
t.setUser_id(id);
t.setMoney((i*0.1)+"");
try {
td.addTransaction(t);
return t.getId();
} catch (SQLException e) {
e.printStackTrace();
throw new TransactionExcetion("Failed to add transaction!");
}
}
public void changeState(String id,int i) throws TransactionExcetion {
try {
td.updateTransactionStateById(id,i);
} catch (SQLException e) {
e.printStackTrace();
throw new TransactionExcetion("Failed to update state!");
}
}
public Transaction findTransactionById(String id) throws TransactionExcetion {
try {
return td.getTransactionById(id);
} catch (SQLException e) {
e.printStackTrace();
throw new TransactionExcetion("Failed to get transaction!");
}
}
public List<Transaction> findTransactionByUserId(String id) throws TransactionExcetion {
try {
return td.getTransactionByUserId(id);
} catch (SQLException e) {
e.printStackTrace();
throw new TransactionExcetion("Failed to get transaction!");
}
}
public List<Transaction> findAllTransaction() throws TransactionExcetion {
try {
return td.getTransactionAll();
} catch (SQLException e) {
e.printStackTrace();
throw new TransactionExcetion("Failed to get transaction list!");
}
}
}
| [
"291922883@qq.com"
] | 291922883@qq.com |
f7e9e198c0e68c16a3eba58d478090244f51aa61 | 1791bd45b000e35a3f457c1ffd9291467c22f649 | /app/src/main/java/com/sixin/filemvc/MiddleLayerAdapter.java | 45a2ab583d1b6b00c2aae0daefbaaff5b7dd7246 | [] | no_license | cutylifestyle/FileMVC | d082243dee7f56f4d951ba86d840b571818b136b | e02fdb1acda07f6cd5da2273eff1fec0f5c4875e | refs/heads/master | 2020-04-13T22:49:34.459856 | 2019-01-07T08:57:00 | 2019-01-07T08:57:00 | 163,489,166 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,221 | java | package com.sixin.filemvc;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import java.util.List;
public abstract class MiddleLayerAdapter<T> extends BaseQuickAdapter<T,BaseViewHolder>{
public MiddleLayerAdapter(int layoutResId, @Nullable List<T> data) {
super(layoutResId, data);
}
public MiddleLayerAdapter(@Nullable List<T> data) {
super(data);
}
public MiddleLayerAdapter(int layoutResId) {
super(layoutResId);
}
/**
* @param code 1: 暂无文件名称 2: 暂无文件大小
* */
protected String getContent(String content,int code) {
String result = null;
if (!TextUtils.isEmpty(content)) {
result = content;
return result;
}
switch (code) {
case 1:
result = "暂无文件名称";
break;
case 2:
result = "暂无文件大小";
break;
default:
result = "暂无信息";
break;
}
return result;
}
}
| [
"2055305346@qq.com"
] | 2055305346@qq.com |
4fde3e992f997f85778bc1c4e3448b540e0266e1 | c8a6b4f54fa846bc75c6034df147fd9dca8fcfef | /src/main/java/com/jiaty/demo/design/patterns/strategy/Strategy.java | 48dddc1f569255b519543485de5acc46dd8d8de2 | [] | no_license | hengdii/practice | 2ed2c4dfa91cf9d20957f892cdcc6e0fdcc0b8c3 | 8f1d194029cc8a73e91f781b814e61b84e885bfd | refs/heads/master | 2023-06-28T10:24:46.474202 | 2022-06-29T07:29:14 | 2022-06-29T07:29:14 | 103,345,637 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 238 | java | package com.jiaty.demo.design.patterns.strategy;
/**
* @program: Practice
* @description: 算法策略
* @author: Jiaty
* @create: 2020-07-23 11:26
**/
public abstract class Strategy {
public abstract void arithmInterface();
} | [
"hengdi6266@163.com"
] | hengdi6266@163.com |
01eeca42f08120b1935c1f0b7f04b90396f012c1 | 2c67d313362241f8aef71ea0de19672b65070e21 | /src/main/java/com/project/bootcamp/exceptions/ExceptionsHandle.java | 3add34198a3d5fbaaee1935b5b279031ab4774bd | [] | no_license | brendosilva/santander-dev-week | 37a4b074c3d636dbd36b2c7bab8a9218ca175372 | 29775a18f9c88f9050c88c733f3c72481b8c2550 | refs/heads/main | 2023-05-14T18:31:22.725887 | 2021-05-28T17:01:41 | 2021-05-28T17:01:41 | 371,386,195 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 946 | java | package com.project.bootcamp.exceptions;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
@ControllerAdvice
public class ExceptionsHandle extends ResponseEntityExceptionHandler {
@ExceptionHandler(BusinessException.class)
protected ResponseEntity<ExceptionResponse> handleSecurity(BusinessException e){
return ResponseEntity.status(HttpStatus.UNPROCESSABLE_ENTITY).body(new ExceptionResponse(e.getMessage()));
}
@ExceptionHandler(NotFoundException.class)
protected ResponseEntity<ExceptionResponse> handleSecurity(NotFoundException e){
return ResponseEntity.status(HttpStatus.NOT_FOUND).body(new ExceptionResponse(e.getMessage()));
}
}
| [
"breendo.01@gmail.com"
] | breendo.01@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.