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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11441decb224d0663403128eadb6aa339a26bbb5 | ec9fbee3cd6fc119c1d15f5649aa30ef36280460 | /src/main/java/com/vnext/w22designpattern/d14bridge/eg1/Car.java | b562a870bb3c7ae91b574ddd29b0eec68afc3041 | [] | no_license | leochn/javaBase | 3e6709ea6520801ac8385de96678657c51ea222d | 458a37a28886166145c257c755e26ca4b676bad9 | refs/heads/master | 2023-07-27T03:43:28.758274 | 2020-09-18T02:48:40 | 2020-09-18T02:48:40 | 120,416,776 | 1 | 0 | null | 2023-07-16T14:52:43 | 2018-02-06T07:18:39 | Java | UTF-8 | Java | false | false | 251 | java | package com.vnext.w22designpattern.d14bridge.eg1;
/**
* 汽车
*
* @author leo
* @version 1.0.0
* @date 2018-06-18 09:55:16
*/
public interface Car {
void install2000Engine();
void install2200Engine();
void install2300Engine();
}
| [
"[email protected]"
] | |
c7449558690d1f5eca7637fc5d611d370c1c3b0c | a2a012f743f138e816e580b59b01f3817b471269 | /baselibrary/src/main/java/com/wdk/baselibrary/network/NetWorkObserver.java | 11327fc664935032969adb7e0a9d452019853e9f | [] | no_license | zhiweinitingliu/androidMVVM | cd7a96cb3bb6124a9b051fc01b6912e7550c4dff | 9cdf458ac12c09ccf34f6b8f339a1923dc896820 | refs/heads/master | 2022-12-21T12:11:12.827516 | 2020-09-25T02:33:51 | 2020-09-25T02:33:51 | 298,462,391 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,324 | java | package com.wdk.baselibrary.network;
import com.wdk.baselibrary.data.bean.ServiceDataBean;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import okhttp3.ResponseBody;
/**
* Description :
*
* @Author : wdk
* @CreateTiem : 2020/9/21 10:16 PM
* @LaseModify(最终修改人): wdk
* @LastModityTime(最终修改时间): 2020/9/21 10:16 PM
* @LastCheckBy: wdk
*/
public class NetWorkObserver<T> implements Observer<T> {
private RequestData requestData;
private NetWorkCallBackListener<T> netWorkCallBackListener;
public NetWorkObserver(RequestData requestData, NetWorkCallBackListener<T> netWorkCallBackListener) {
this.requestData = requestData;
this.netWorkCallBackListener = netWorkCallBackListener;
}
@Override
public void onSubscribe(@NonNull Disposable d) {
if (requestData != null) {
requestData.requestStart();
}
}
@Override
public void onNext(@NonNull T t) {
netWorkCallBackListener.onSuccess(t);
}
@Override
public void onError(@NonNull Throwable e) {
netWorkCallBackListener.onFailed(e.toString());
}
@Override
public void onComplete() {
requestData.requestComplete();
}
}
| [
"[email protected]"
] | |
9fc21ac7ed2a758baab951170a274c4567bd715b | 5f3e2a56be6e6a5d0b7800af835f74a669a23bbb | /JavaDay02/src/com/demo/Test5.java | d6761905615e9f7b2859dce4e7dd1696b1b6ad2f | [] | no_license | GimoMeng/Java | 4c61bc90fbc0af649ef77f8c73db850a071a63e9 | 0360047b1b6868244d2905892a17cc3c5895e2ca | refs/heads/master | 2021-01-12T10:03:49.648160 | 2017-03-05T12:32:55 | 2017-03-05T12:32:55 | 76,247,989 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 441 | java | package com.demo;
public class Test5 {
public static void main(String[] args) {
//平时我们总会去做一些重复的事情
//比如各位平时在玩游戏的时候,游戏中有一种任务叫循环任务
//所谓循环指的是多次执行同一重复操作
//Java中也对循环有其独有的表示方法
//第一种for循环
for(int i=1;i<=10;i++){
System.out.println("这是第"+i+"次执行任务!");
}
}
}
| [
"[email protected]"
] | |
8f0abd43624c2b17f2faf6f146cc469a0eff1c77 | 903d3846794eadc027717c9f541fad7bff8a8acb | /src/br/com/ederleite/codekata/conversaoNumerica/service/impl/ConversorNumericoServiceMateusImpl.java | 2b5ade7603a743d31c4007ada042f040940b0fb0 | [] | no_license | edermfl/codekata | a4c36271f8365739842e7f04491d5d7c0b5a8aac | 89194fc281fff8b976feca5d623866f92ed1d028 | refs/heads/master | 2021-01-21T04:41:12.636536 | 2016-07-18T16:38:50 | 2016-07-18T16:38:50 | 50,683,802 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,208 | java | package br.com.ederleite.codekata.conversaoNumerica.service.impl;
import br.com.ederleite.codekata.conversaoNumerica.service.IConversorNumericoService;
/**
* Created by mateus marquezini on 24-06-2016.
*/
public class ConversorNumericoServiceMateusImpl implements IConversorNumericoService {
public static int calculaValoresDecimais(int pDecimalAtual, int pUltimoNumero, int pUltimoDecimal) {
if (pUltimoNumero > pDecimalAtual) {
return pUltimoDecimal - pDecimalAtual;
} else {
return pUltimoDecimal + pDecimalAtual;
}
}
public String converterParaIndoArabico(String pNumeroRomano) throws IllegalArgumentException {
int decimalAtualNoContexto = 0;
int ultimoValorDecimal = 0;
String numeroRomano = pNumeroRomano.toUpperCase();
for (int i = numeroRomano.length() - 1; i >= 0; i--) {
char charNumRomano = numeroRomano.charAt(i);
switch (charNumRomano) {
case 'M':
decimalAtualNoContexto = calculaValoresDecimais(1000, ultimoValorDecimal, decimalAtualNoContexto);
ultimoValorDecimal = 1000;
break;
case 'D':
decimalAtualNoContexto = calculaValoresDecimais(500, ultimoValorDecimal, decimalAtualNoContexto);
ultimoValorDecimal = 500;
break;
case 'C':
decimalAtualNoContexto = calculaValoresDecimais(100, ultimoValorDecimal, decimalAtualNoContexto);
ultimoValorDecimal = 100;
break;
case 'L':
decimalAtualNoContexto = calculaValoresDecimais(50, ultimoValorDecimal, decimalAtualNoContexto);
ultimoValorDecimal = 50;
break;
case 'X':
decimalAtualNoContexto = calculaValoresDecimais(10, ultimoValorDecimal, decimalAtualNoContexto);
ultimoValorDecimal = 10;
break;
case 'V':
decimalAtualNoContexto = calculaValoresDecimais(5, ultimoValorDecimal, decimalAtualNoContexto);
ultimoValorDecimal = 5;
break;
case 'I':
decimalAtualNoContexto = calculaValoresDecimais(1, ultimoValorDecimal, decimalAtualNoContexto);
ultimoValorDecimal = 1;
break;
}
}
return String.valueOf(decimalAtualNoContexto);
}
public String converterParaRomano(final String pIndoArabico) throws IllegalArgumentException {
Integer numeroIndoArabico = Integer.valueOf(pIndoArabico);
String numeroRomano = "";
if (numeroIndoArabico <= 0) {
throw new IllegalArgumentException();
}
if (numeroIndoArabico <= 15000) {
while (numeroIndoArabico >= 15000) {
numeroRomano += "(X)(V)";
numeroIndoArabico -= 15000;
}
while (numeroIndoArabico >= 14000) {
numeroRomano += "(X)(I)(V)";
numeroIndoArabico -= 14000;
}
while (numeroIndoArabico >= 13000) {
numeroRomano += "(X)MMM";
numeroIndoArabico -= 13000;
}
while (numeroIndoArabico >= 12000) {
numeroRomano += "(X)MM";
numeroIndoArabico -= 12000;
}
while (numeroIndoArabico >= 11000) {
numeroRomano += "(X)M";
numeroIndoArabico -= 11000;
}
while (numeroIndoArabico >= 10000) {
numeroRomano += "(X)";
numeroIndoArabico -= 10000;
}
while (numeroIndoArabico >= 9000) {
numeroRomano += "(I)(X)";
numeroIndoArabico -= 9000;
}
while (numeroIndoArabico >= 8000) {
numeroRomano += "(V)(I)(I)(I)";
numeroIndoArabico -= 8000;
}
while (numeroIndoArabico >= 7000) {
numeroRomano += "(V)(I)(I)";
numeroIndoArabico -= 7000;
}
while (numeroIndoArabico >= 6000) {
numeroRomano += "(V)(I)";
numeroIndoArabico -= 6000;
}
while (numeroIndoArabico >= 5000) {
numeroRomano += "(V)";
numeroIndoArabico -= 5000;
}
while (numeroIndoArabico >= 4000) {
numeroRomano += "(I)(V)";
numeroIndoArabico -= 4000;
}
while (numeroIndoArabico >= 3000) {
numeroRomano += "MMM";
numeroIndoArabico -= 3000;
}
while (numeroIndoArabico >= 2000) {
numeroRomano += "MM";
numeroIndoArabico -= 2000;
}
while (numeroIndoArabico >= 1000) {
numeroRomano += "M";
numeroIndoArabico -= 1000;
}
while (numeroIndoArabico >= 900) {
numeroRomano += "CM";
numeroIndoArabico -= 900;
}
while (numeroIndoArabico >= 500) {
numeroRomano += "D";
numeroIndoArabico -= 500;
}
while (numeroIndoArabico >= 400) {
numeroRomano += "CD";
numeroIndoArabico -= 400;
}
while (numeroIndoArabico >= 100) {
numeroRomano += "C";
numeroIndoArabico -= 100;
}
while (numeroIndoArabico >= 90) {
numeroRomano += "XC";
numeroIndoArabico -= 90;
}
while (numeroIndoArabico >= 50) {
numeroRomano += "L";
numeroIndoArabico -= 50;
}
while (numeroIndoArabico >= 40) {
numeroRomano += "XL";
numeroIndoArabico -= 40;
}
while (numeroIndoArabico >= 10) {
numeroRomano += "X";
numeroIndoArabico -= 10;
}
while (numeroIndoArabico >= 9) {
numeroRomano += "IX";
numeroIndoArabico -= 9;
}
while (numeroIndoArabico >= 5) {
numeroRomano += "V";
numeroIndoArabico -= 5;
}
while (numeroIndoArabico >= 4) {
numeroRomano += "IV";
numeroIndoArabico -= 4;
}
while (numeroIndoArabico >= 1) {
numeroRomano += "I";
numeroIndoArabico -= 1;
}
} else {
throw new IllegalArgumentException();
}
return numeroRomano;
}
} | [
"[email protected]"
] | |
eab1854fcdb22251ce25bf7b42925cd11e3cffc8 | 2f9ff0ac540985d89010e13c315d8455aa57e278 | /src/PageRanker.java | b666c1eadcb195332c5f0599654e70bbb73b13a1 | [] | no_license | Matchatta/IR_P3_Improvement | 6b21d0ce264c4b84517294fbfd1c90c690593bf8 | dbb1d92809b970c94d63b8970179a8ce9b371f8f | refs/heads/master | 2020-09-13T20:52:56.381781 | 2019-11-28T09:13:09 | 2019-11-28T09:13:09 | 222,899,598 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,089 | java | //Name(s):Kamonwan Tangamornphiboon, Patakorn Jearat, Matchatta Toyaem
//ID: 6088034, 6088065, 6088169
//Section: 2
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* This class implements PageRank algorithm on simple graph structure.
* Put your name(s), ID(s), and section here.
*
*/
public class PageRanker {
/**
* This class reads the direct graph stored in the file "inputLinkFilename" into memory.
* Each line in the input file should have the following format:
* <pid_1> <pid_2> <pid_3> .. <pid_n>
*
* Where pid_1, pid_2, ..., pid_n are the page IDs of the page having links to page pid_1.
* You can assume that a page ID is an integer.
*/
String inputContent;
TreeSet<Integer> P = new TreeSet<>();
TreeSet<Integer> S;
HashMap<Integer, TreeSet<Integer>> M = new HashMap<>();
HashMap<Integer, Long> L = new HashMap<>();
HashMap<Integer, Double> PR = new HashMap<>();
Double d;
List<Double> perplexity = new ArrayList<>();
public void loadData(String inputLinkFilename){
try {
inputContent = new String(Files.readAllBytes(Paths.get(inputLinkFilename)));
}
catch (IOException e) {
e.printStackTrace();
}
}
/**
* This method will be called after the graph is loaded into the memory.
* This method initialize the parameters for the PageRank algorithm including
* setting an initial weight to each page.
*/
public void initialize(){
d =0.85;
List<String> splitString = Arrays.asList(inputContent.split("\r?\n+"));
List<Integer> out_link = new ArrayList<>();
for(String line : splitString){
List<Integer> pages = Arrays.stream(line.split(" ")).map(Integer::valueOf).collect(Collectors.toList());
P.addAll(pages);
int id = pages.remove(0);
if(!L.containsKey(id)){
L.put(id, (long) 0.0);
}
TreeSet<Integer> m = new TreeSet<>(pages);
out_link.addAll(m);
M.put(id, m);
}
Map<Integer, Long> l = out_link.stream().collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
L.putAll(l);
S = new TreeSet<>(P);
S.removeAll(new TreeSet(out_link));
double value = 1.0/P.size();
for(int p : P){
PR.put(p, value);
}
}
/**
* Computes the perplexity of the current state of the graph. The definition
* of perplexity is given in the project specs.
*/
public double getPerplexity(){
double power =0;
for(int p : P){
power += PR.get(p)*(Math.log(PR.get(p))/Math.log(2.0));
}
return Math.pow(2, -power);
}
/**
* Returns true if the perplexity converges (hence, terminate the PageRank algorithm).
* Returns false otherwise (and PageRank algorithm continue to update the page scores).
*/
int round =0;
public boolean isConverge(){
perplexity.add(getPerplexity());
double unit = 1;
if(perplexity.size()>1){
unit = Math.floor(perplexity.get(perplexity.size()-1))-Math.floor(perplexity.get(perplexity.size()-2));
}
if(round>=2){
return true;
}
else if(unit == 0) {
round++;
return false;
}
else{
round=0;
return false;
}
}
/**
* The main method of PageRank algorithm.
* Can assume that initialize() has been called before this method is invoked.
* While the algorithm is being run, this method should keep track of the perplexity
* after each iteration.
*
* Once the algorithm terminates, the method generates two output files.
* [1] "perplexityOutFilename" lists the perplexity after each iteration on each line.
* The output should look something like:
*
* 183811
* 79669.9
* 86267.7
* 72260.4
* 75132.4
*
* Where, for example,the 183811 is the perplexity after the first iteration.
*
* [2] "prOutFilename" prints out the score for each page after the algorithm terminate.
* The output should look something like:
*
* 1 0.1235
* 2 0.3542
* 3 0.236
*
* Where, for example, 0.1235 is the PageRank score of page 1.
*
*/
public void runPageRank(String perplexityOutFilename, String prOutFilename){
try{
FileWriter perplexityFile = new FileWriter(perplexityOutFilename);
PrintWriter writePerplexity = new PrintWriter(perplexityFile);
FileWriter prFile = new FileWriter(prOutFilename);
PrintWriter writePR = new PrintWriter(prFile);
while(!isConverge()){
double sinkPR=0;
HashMap<Integer, Double> newPR = new HashMap<>();
for(int p : S){
sinkPR+=PR.get(p);
}
for(int p : P){
double newPR_value = (1-d)/P.size();
newPR_value+= d*sinkPR/P.size();
if(M.containsKey(p)){
for(int q : M.get(p)){
newPR_value+=d*PR.get(q)/L.get(q).doubleValue();
}
}
newPR.put(p, newPR_value);
}
PR.putAll(newPR);
}
for(int p : P){
writePR.println(p+" "+PR.get(p));
}
for(double per : perplexity.subList(1, perplexity.size())){
writePerplexity.println(per);
}
writePerplexity.close();
writePR.close();
}
catch (Exception e){
e.printStackTrace();
}
}
/**
* Return the top K page IDs, whose scores are highest.
*/
public Integer[] getRankedPages(int K){
Map<Integer, Double> r = PR.entrySet()
.stream()
.sorted(Map.Entry.<Integer, Double>comparingByValue().reversed())
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1,e2) -> e1, LinkedHashMap::new));
Integer[] result = new Integer[K];
for(int i=0; i< K; i++){
result[i] = (Integer) r.keySet().toArray()[i];
}
return result;
}
public static void main(String args[])
{
long startTime = System.currentTimeMillis();
PageRanker pageRanker = new PageRanker();
pageRanker.loadData("citeseer.dat");
pageRanker.initialize();
pageRanker.runPageRank("perplexity.out", "pr_scores.out");
Integer[] rankedPages = pageRanker.getRankedPages(100);
double estimatedTime = (double)(System.currentTimeMillis() - startTime)/1000.0;
System.out.println("Top 100 Pages are:\n"+Arrays.toString(rankedPages));
System.out.println("Proccessing time: "+estimatedTime+" seconds");
}
}
| [
"[email protected]"
] | |
b1c2baa6b1e6f0d616ed5a44333156c8537bb126 | 8c5289f518522bbf7e348e88def9b74db1a5089e | /SpringPracticeNow/src/main/java/com/otp/testing/repo/EmployeeRepo.java | 7c3bc2c76a723e23e19b89af47a93611a3e90c0a | [] | no_license | egar-learner/Spring_Boot_Self | 5b62f0d1f4576e83776f1a84a27717f7361cecfa | 129d4d3e61e12cd34facd4766a3b0b679c64e773 | refs/heads/main | 2023-05-04T12:19:41.211738 | 2021-05-23T14:18:30 | 2021-05-23T14:18:30 | 337,191,400 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 305 | java | package com.otp.testing.repo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.otp.testing.model.Employee;
@Repository
public interface EmployeeRepo extends JpaRepository<Employee, Long> {
void deleteEmployeeById(Long id);
}
| [
"[email protected]"
] | |
19c99cbc748368fc9a3ed62679950c5ab8898baf | b1fe09139e77f820fdd20e63a09b7beed5440ebb | /src/main/java/netty/echo/EchoClientHandler.java | 4b294fea91797cac9c473d0d89ec46c88dda8214 | [] | no_license | yutuer/javatools | ca22ffcd6aa11b6d8ace17f1032dd815d65ddb6f | d6820df9d456206a3eb66dad808e07045a2545e5 | refs/heads/master | 2021-09-03T02:03:00.976110 | 2018-01-04T19:00:39 | 2018-01-04T19:00:39 | 30,295,314 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,190 | java | package netty.echo;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandler.Sharable;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.util.CharsetUtil;
@Sharable
public class EchoClientHandler extends SimpleChannelInboundHandler<ByteBuf> {
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
ctx.writeAndFlush(Unpooled.copiedBuffer("Netty rocks", CharsetUtil.UTF_8));
}
@Override
protected void channelRead0(ChannelHandlerContext ctx, ByteBuf msg) throws Exception {
System.out.println("Client received: " + msg.toString(CharsetUtil.UTF_8));
}
@Override
public void channelUnregistered(ChannelHandlerContext ctx) throws Exception {
System.out.println("channelUnregistered");
super.channelUnregistered(ctx);
}
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
System.out.println("channelInactive");
super.channelInactive(ctx);
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
cause.printStackTrace();
ctx.close();
}
}
| [
"[email protected]"
] | |
e68883298309b790ea8cb078b51fdd1a6e11a8c1 | 04bd4dd17868813e903e7be10cdce94d06c0b34c | /src/main/java/com/kone/mxl/controller/UserController.java | 8c9781a63f44cd5cdcc29ab0292f8a5b7d53dbbe | [] | no_license | kone2129/Springboot_s | 66d2abd7d20f2858f442e8ebccff383e95a8906f | a63ddc3c482218ca15533a0e4957df82e0497f63 | refs/heads/master | 2022-07-16T10:35:07.323890 | 2020-05-21T03:08:23 | 2020-05-21T03:08:23 | 262,534,151 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,149 | java | package com.kone.mxl.controller;
import com.kone.mxl.entity.BPSUsers;
import com.kone.mxl.utils.ResultVO;
import com.sun.org.glassfish.gmbal.ParameterNames;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
/**
* @author Kone.wang
* @date 2020-05-09 14:57
*/
@RestController
@RequestMapping("/user")
public class UserController {
@PostMapping("")
public String addUser(@RequestBody @Valid BPSUsers users){
return "OKOKOK!";
}
@GetMapping("/{ids}")
public ResultVO<BPSUsers> getUser(@PathVariable("ids") int ids){
BPSUsers user=new BPSUsers();
user.setId(ids);
user.setAccount("kone.wang");
user.setPassword("xjbxdmm");
user.setEmail("[email protected]");
return new ResultVO(user);
}
@GetMapping("getUser/{ids}")
public BPSUsers getUser2(@PathVariable("ids") int ids){
BPSUsers user=new BPSUsers();
user.setId(ids);
user.setAccount("kone.wang");
user.setPassword("xjbxdmm");
user.setEmail("[email protected]");
return user;
}
}
| [
"[email protected]"
] | |
7de6e8b131a7246f350dbec79b13162acbc9befb | 30feed24d39c673201faaccf9a2db0707d38adee | /springrain/src/main/java/org/springrain/cms/entity/CmsPropertyvalue.java | bbdba3b8d9ba37859696e21ab4593e297b8e8fd7 | [] | no_license | 994401266/mir | a62d31d2bf08898b7e01330cb0facace5cbc1bda | 9b6fe1038263994c017dbca430ed9e16c73f58ff | refs/heads/master | 2020-03-17T14:27:01.650047 | 2018-06-03T16:27:11 | 2018-06-03T16:27:11 | 133,672,593 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,584 | java | package org.springrain.cms.entity;
import javax.persistence.Id;
import javax.persistence.Table;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.springrain.frame.annotation.WhereSQL;
import org.springrain.frame.entity.BaseEntity;
/**
* TODO 在此加入类描述
* @copyright {@link weicms.net}
* @author springrain<Auto generate>
* @version 2016-11-12 10:44:58
* @see org.springrain.cms.entity.demo.entity.CmsPropertyvalue
*/
@Table(name="cms_propertyvalue")
public class CmsPropertyvalue extends BaseEntity {
private static final long serialVersionUID = 1L;
//alias
/*
public static final String TABLE_ALIAS = "自定义属性对应值表";
public static final String ALIAS_ID = "id";
public static final String ALIAS_PROPERTYID = "propertyId";
public static final String ALIAS_PVALUE = "pvalue";
public static final String ALIAS_SITEID = "siteId";
public static final String ALIAS_BUSINESSID = "业务Id";
public static final String ALIAS_SORTNO = "排序";
public static final String ALIAS_ACTIVE = "状态 0不可用,1可用";
*/
//date formats
//columns START
/**
* id
*/
private java.lang.String id;
/**
* propertyId
*/
private java.lang.Integer propertyId;
/**
* pvalue
*/
private java.lang.String pvalue;
/**
* siteId
*/
private java.lang.String siteId;
/**
* 业务Id
*/
private java.lang.String businessId;
/**
* 排序
*/
private java.lang.Integer sortno;
/**
* 状态 0不可用,1可用
*/
private java.lang.Integer active;
//columns END 数据库字段结束
//concstructor
public CmsPropertyvalue(){
}
public CmsPropertyvalue(
java.lang.String id
){
this.id = id;
}
//get and set
public void setId(java.lang.String value) {
if(StringUtils.isNotBlank(value)){
value=value.trim();
}
this.id = value;
}
@Id
@WhereSQL(sql="id=:CmsPropertyvalue_id")
public java.lang.String getId() {
return this.id;
}
public void setPropertyId(java.lang.Integer value) {
this.propertyId = value;
}
@WhereSQL(sql="propertyId=:CmsPropertyvalue_propertyId")
public java.lang.Integer getPropertyId() {
return this.propertyId;
}
public void setPvalue(java.lang.String value) {
if(StringUtils.isNotBlank(value)){
value=value.trim();
}
this.pvalue = value;
}
@WhereSQL(sql="pvalue=:CmsPropertyvalue_pvalue")
public java.lang.String getPvalue() {
return this.pvalue;
}
public void setSiteId(java.lang.String value) {
if(StringUtils.isNotBlank(value)){
value=value.trim();
}
this.siteId = value;
}
@WhereSQL(sql="siteId=:CmsPropertyvalue_siteId")
public java.lang.String getSiteId() {
return this.siteId;
}
public void setBusinessId(java.lang.String value) {
if(StringUtils.isNotBlank(value)){
value=value.trim();
}
this.businessId = value;
}
@WhereSQL(sql="businessId=:CmsPropertyvalue_businessId")
public java.lang.String getBusinessId() {
return this.businessId;
}
public void setSortno(java.lang.Integer value) {
this.sortno = value;
}
@WhereSQL(sql="sortno=:CmsPropertyvalue_sortno")
public java.lang.Integer getSortno() {
return this.sortno;
}
public void setActive(java.lang.Integer value) {
this.active = value;
}
@WhereSQL(sql="active=:CmsPropertyvalue_active")
public java.lang.Integer getActive() {
return this.active;
}
@Override
public String toString() {
return new StringBuilder()
.append("id[").append(getId()).append("],")
.append("propertyId[").append(getPropertyId()).append("],")
.append("pvalue[").append(getPvalue()).append("],")
.append("siteId[").append(getSiteId()).append("],")
.append("业务Id[").append(getBusinessId()).append("],")
.append("排序[").append(getSortno()).append("],")
.append("状态 0不可用,1可用[").append(getActive()).append("],")
.toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder()
.append(getId())
.toHashCode();
}
@Override
public boolean equals(Object obj) {
if(obj instanceof CmsPropertyvalue == false){
return false;
}
if(this == obj){
return true;
}
CmsPropertyvalue other = (CmsPropertyvalue)obj;
return new EqualsBuilder()
.append(getId(),other.getId())
.isEquals();
}
}
| [
"[email protected]"
] | |
4f8b89686e5352335d538294cde6ba8b9066abdc | 0c7f2c43b8ae3f0ef5683e792ba307895d51244a | /app/src/main/java/com/example/nice/geeknews/view/SelectView.java | 2237d1c6287443225d0e92f99423551cce283236 | [] | no_license | SupanWang/MyGeekNews | e92c5549288b4822ff8532aeb8bb1205fc0b6425 | ab5a7b49bc95671ff9f37f8c1cb6b17359c9920e | refs/heads/master | 2020-05-15T22:09:19.776758 | 2019-05-06T02:23:33 | 2019-05-06T02:23:33 | 182,519,975 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 207 | java | package com.example.nice.geeknews.view;
import com.example.nice.geeknews.bean.SelectionBean;
public interface SelectView {
void onSuccess(SelectionBean selectionBean);
void onFailed(String str);
}
| [
"[email protected]"
] | |
c5629c65ad8661fa60e955f3e637942d9e9f2f85 | 119ac25712822c80d8a525ef952c8fbe5bf1aecc | /wanhaohui2/src/main/java/com/wishland/www/wanhaohui2/view/customlayout/LineScrollView.java | 82310a7ab6866e7d158138776313337079b56523 | [] | no_license | RightManCode/wishland | 7c1a3b4a1c545441b6a20b1ab4920122cc79bc98 | 3b673e5a0e7ca33b91466e86ee418a8e88918073 | refs/heads/master | 2021-05-09T22:52:11.454551 | 2018-01-24T12:54:39 | 2018-01-24T12:54:39 | 118,765,146 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,483 | java | package com.wishland.www.wanhaohui2.view.customlayout;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
import android.widget.ScrollView;
/**
* Created by admin on 2017/10/20.
*/
public class LineScrollView extends ScrollView{
private int downX;
private int downY;
private int mTouchSlop;
public LineScrollView(Context context) {
super(context);
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
}
public LineScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
}
public LineScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
}
@Override
public boolean onInterceptTouchEvent(MotionEvent e) {
int action = e.getAction();
switch (action) {
case MotionEvent.ACTION_DOWN:
downX = (int) e.getRawX();
downY = (int) e.getRawY();
break;
case MotionEvent.ACTION_MOVE:
int moveY = (int) e.getRawY();
if (Math.abs(moveY - downY) > mTouchSlop) {
return true;
}
}
return super.onInterceptTouchEvent(e);
}
}
| [
"[email protected]"
] | |
a6922dd1998a532f095e4b438d2c99c116a91910 | 20883bb5a2591b92866abd9e30a7092c1054437c | /src/main/java/fr/diginamic/daos/jdbc/CategorieDaoJdbc.java | 1d82093d38dd09b3df0e8a94c665498f77df7a68 | [] | no_license | jeremy-e-f/traitement-fichier-jpa-off | 403d19887186e4ea16dbf74cd479d71436f82ed3 | 689b90cef526056d58ddb17f739544b846e9d4c3 | refs/heads/master | 2021-07-03T10:04:05.405614 | 2019-12-21T14:23:37 | 2019-12-21T14:23:37 | 229,023,921 | 0 | 0 | null | 2021-04-26T19:48:31 | 2019-12-19T09:48:17 | Java | ISO-8859-1 | Java | false | false | 5,254 | java | package fr.diginamic.daos.jdbc;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.diginamic.daos.CategorieDao;
import fr.diginamic.entities.Categorie;
import fr.diginamic.exceptions.FunctionalException;
import fr.diginamic.jdbc.ConnectionJDBC;
public class CategorieDaoJdbc implements CategorieDao {
/**
* Connexion nous permettant d'accéder à la base de données
*/
private Connection connection;
private PreparedStatement preReqSelectId= null;
private PreparedStatement preReqSelectName= null;
private PreparedStatement preReqInsert= null;
private PreparedStatement preReqUpdate= null;
private PreparedStatement preReqDelete= null;
private static final Logger LOG = LoggerFactory.getLogger("");
public CategorieDaoJdbc(){
this.connection= ConnectionJDBC.getInstance();
initPreRequete();
}
public CategorieDaoJdbc(Connection connection){
this.connection= connection;
initPreRequete();
}
/**
* On prépare les prérequêtes pour accélérer les insertions et les mises à jours
*/
private void initPreRequete(){
try {
String generatedColumns[] = { "ID" };
preReqSelectId = connection.prepareStatement("SELECT ID, LIBELLE FROM CATEGORIE WHERE ID = ?;");
preReqSelectName = connection.prepareStatement("SELECT ID, LIBELLE FROM CATEGORIE WHERE LIBELLE = ?;");
preReqInsert = connection.prepareStatement("INSERT INTO CATEGORIE(LIBELLE) VALUES(?);", generatedColumns);
preReqUpdate = connection.prepareStatement("UPDATE CATEGORIE SET LIBELLE = ? WHERE ID = ?;");
preReqDelete = connection.prepareStatement("DELETE FROM CATEGORIE WHERE ID = ?;");
} catch (SQLException e) {
LOG.error(e.getMessage());
}
}
/**
* On ferme les prestatements
*/
public void finalize(){
try {
this.preReqSelectId.close();
this.preReqSelectName.close();
this.preReqInsert.close();
this.preReqUpdate.close();
this.preReqDelete.close();
} catch (SQLException e) {
LOG.error(e.getMessage());
}
}
@Override
public List<Categorie> extraire() throws SQLException {
Statement monStatement= null;
ResultSet rs= null;
List<Categorie> listeCategories= new ArrayList<Categorie>();
monStatement = connection.createStatement();
rs= monStatement.executeQuery("SELECT * FROM CATEGORIE;");
while(rs.next()){
int idCat= rs.getInt("ID");
String libelleCat= rs.getString("LIBELLE");
listeCategories.add(new Categorie(idCat, libelleCat));
}
rs.close();
return listeCategories;
}
@Override
public Categorie getById(int id) throws SQLException {
Categorie categorie= null;
preReqSelectId.setInt(1, id);
ResultSet rs= preReqSelectId.executeQuery();
if(rs.next()){
categorie= new Categorie(rs.getInt("ID"), rs.getString("LIBELLE"));
}
rs.close();
return categorie;
}
@Override
public Categorie getByName(String name) throws SQLException {
Categorie categorie= null;
preReqSelectName.setString(1, name);
ResultSet rs= preReqSelectName.executeQuery();
if(rs.next()){
categorie= new Categorie(rs.getInt("ID"), rs.getString("LIBELLE"));
}
rs.close();
return categorie;
}
@Override
public int insert(Categorie categorie) throws SQLException, FunctionalException {
if(categorie== null){
throw new FunctionalException("Valeur nulle!");
}
/** Si l'index dans la base de données n'a pas été initialisé */
if(categorie.getId()== 0){
/** On vérifie si l'objet n'existe pas déjà dans la base de données */
Categorie objExistant= this.getByName(categorie.getLibelle());
if(objExistant!= null){
/** On le met à jour */
categorie.setId(objExistant.getId());
return objExistant.getId();
}else{
/** Sinon on l'insère dans la base de données */
preReqInsert.setString(1, categorie.getLibelle());
preReqInsert.executeUpdate();
/** Et récupère son Id */
ResultSet rs= preReqInsert.getGeneratedKeys();
int id= 0;
if(rs.next()){
id= rs.getInt(1);
/** On le met à jour */
categorie.setId(id);
}
rs.close();
return id;
}
}else{
return categorie.getId();
}
}
@Override
public int update(Categorie categorie) throws SQLException, FunctionalException {
int retour= 0;
if(categorie== null){
throw new FunctionalException("Valeur nulle!");
}
int i= 1;
preReqUpdate.setString(i++, categorie.getLibelle());
preReqUpdate.setInt(i++, categorie.getId());
retour= preReqUpdate.executeUpdate();
return retour;
}
@Override
public boolean delete(Categorie categorie) throws SQLException, FunctionalException {
int retour= 0;
if(categorie== null){
throw new FunctionalException("Valeur nulle!");
}
preReqDelete.setInt(1, categorie.getId());
retour= preReqDelete.executeUpdate();
return retour!=0;
}
}
| [
"[email protected]"
] | |
6ee7d46cc65c11020365c663d33c32987e9dc7bf | 2cb571da0f58c4dd10af844333c120ae4a207386 | /Client/app/src/main/java/com/client/CustomAdapter/CustomOutcomeGroup.java | 172a808c54a2fff15cb2736dba87d891ad20b81f | [] | no_license | thongbn/TLUWallet | e3a7e17ca75b9cf90b419cce8df1ffba37fd28fe | ed8622a6159566e3d47eedd8ebc7dbd2f4a93e4c | refs/heads/master | 2021-01-21T13:08:30.864246 | 2016-04-26T17:10:54 | 2016-04-26T17:10:54 | 43,284,726 | 0 | 2 | null | 2015-09-28T08:02:29 | 2015-09-28T06:50:33 | Java | UTF-8 | Java | false | false | 2,129 | java | package com.client.CustomAdapter;
import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.client.R;
/**
* Created by ToanNguyen on 07/03/2016.
*/
public class CustomOutcomeGroup extends BaseAdapter{
private String [] outcome_categories;
private int [] outcome_categories_img;
private Context context;
public CustomOutcomeGroup (Context context, String [] outcome_text, int [] outcome_img){
super();
this.context = context;
outcome_categories = outcome_text;
outcome_categories_img = outcome_img;
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return outcome_categories.length;
}
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return position;
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
public class ViewHolder
{
TextView tv;
ImageView img;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if(convertView == null){
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.custom_pick_group, parent,false);
holder = new ViewHolder();
holder.tv = (TextView) convertView.findViewById(R.id.textView1);
holder.img = (ImageView) convertView.findViewById(R.id.imageView1);
convertView.setTag(holder);
}else {
holder = (ViewHolder) convertView.getTag();
}
holder.tv.setText(outcome_categories[position]);
holder.img.setImageResource(outcome_categories_img[position]);
return convertView;
}
}
| [
"[email protected]"
] | |
9ddfd649d98adc65acd137eaf2e0482494c13578 | 3bfefcf570e8c806277364db9b4cebe697557881 | /src/test/java/soundsystem/CDPlayerTest.java | 1929f87ae9ffffa484c40ad318e93585b32843a7 | [] | no_license | lixiao156/chap2 | 78e0531db9b682ee60a1db421ebd1fcef06b6707 | 11a96fae705dd0f8d85fc9bbd3acec06125369fa | refs/heads/master | 2022-12-20T13:25:27.211646 | 2020-04-08T03:51:00 | 2020-04-08T03:51:00 | 253,979,505 | 0 | 0 | null | 2022-12-16T15:33:53 | 2020-04-08T03:50:50 | Java | UTF-8 | Java | false | false | 1,042 | java | package soundsystem;
import static org.junit.Assert.*;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.StandardOutputStreamLog;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:META-INF/spring/soundsystem.xml")
public class CDPlayerTest {
@Rule
public final StandardOutputStreamLog log = new StandardOutputStreamLog();
@Autowired
@Qualifier("pc")
private MediaPlayer player;
@Autowired
private CompactDisc cd;
@Test
public void cdShouldNotBeNull() {
assertNotNull(cd);
}
@Test
public void play() {
player.play();
// assertEquals(
// "Playing Sgt. Pepper's Lonely Hearts Club Band by The Beatles\n",
// log.getLog());
}
}
| [
"[email protected]"
] | |
8f4f798772640d1dd82505a643f70423a8a2e168 | 8c0362a10fbe77ab0c8c2a0894e341f61350c632 | /PullLoadMoreRecyclerView_Text/app/src/main/java/com/example/administrator/pullloadmorerecyclerview_text/RVAdapter_Main.java | e34480bb05f0dc8687859d0e69eb93fed5aad6ec | [] | no_license | shuoshuoran/cangku | 4a8d1299958975133ada112e10f9850322fcfc84 | b0c31a449f08f9a1cdeb033c641fedf8330b3ffd | refs/heads/master | 2021-07-09T12:44:51.601466 | 2017-10-10T01:21:51 | 2017-10-10T01:21:51 | 106,267,885 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 853 | java | package com.example.administrator.pullloadmorerecyclerview_text;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.ViewGroup;
import java.util.ArrayList;
/**
* Created by Administrator on 2017/9/29.
*/
public class RVAdapter_Main extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
private Context context;
private ArrayList<String> strings;
public RVAdapter_Main(Context context, ArrayList<String> list) {
this.context = context;
this.strings = strings;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return null;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
}
@Override
public int getItemCount() {
return 0;
}
}
| [
"[email protected]"
] | |
5a6a2f4e9b53583d778c64d35d23e11ff9a93a96 | f3ca9b6dddc85ee8cf72af92996a82c9266bb0fa | /spring-boot-data-jpa-easyui-edatagrid/src/main/java/com/jege/spring/boot/controller/InitApplicationListener.java | b4d552d69d7dbd5f3297f860a1b8e5be18852845 | [] | no_license | je-ge/spring-boot | 66362ad6f1225948ccff854895c8665ff2ba30c2 | a57d40d44b6f31323524dc5f422dbff1748cd2ea | refs/heads/master | 2020-06-23T11:18:10.037362 | 2017-08-06T14:35:07 | 2017-08-06T14:35:07 | 74,650,489 | 378 | 300 | null | 2018-05-31T07:14:15 | 2016-11-24T07:55:44 | Java | UTF-8 | Java | false | false | 1,010 | java | package com.jege.spring.boot.controller;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
import com.jege.spring.boot.data.jpa.entity.User;
import com.jege.spring.boot.data.jpa.repository.UserRepository;
/**
* @author JE哥
* @email [email protected]
* @description:spring的事件监听器的处理机制:在启动服务器的时候,插入默认数据
*/
@Component
public class InitApplicationListener implements ApplicationListener<ContextRefreshedEvent> {
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
ApplicationContext context = event.getApplicationContext();
UserRepository userRepository = context.getBean("userRepository", UserRepository.class);
for (int i = 1; i < 21; i++) {
User user = new User("je-ge" + i, 25 + i);
userRepository.save(user);
}
}
}
| [
"[email protected]"
] | |
edcfedb2d7a37ae9bcc3b561ed3dcb77991d3d1a | d26c3e9a017400237ac264098c16971ffbef4387 | /app/src/main/java/landz/fdy/com/p1_landz/freamwork/base/BaseBean/SearchResultBean.java | eacc6607c6ff02112c936fc2ff41d2c802265ce2 | [] | no_license | fudiyang/P1_landz | 91e271e6f6e443877f01df7df84029d64afa7d11 | 45c954aad3486bdd4602785d80d17a15cb769c69 | refs/heads/master | 2021-01-17T19:57:45.041990 | 2016-08-12T12:31:53 | 2016-08-12T12:31:53 | 65,551,392 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 553 | java | package landz.fdy.com.p1_landz.freamwork.base.BaseBean;
import java.util.List;
/**
* Created by fudiyang on 2016/7/25.
* Author fudiyang
* Description :
*/
public class SearchResultBean {
public String resultStatus;
public String resultMsg;
public List<SearchBean> result;
@Override
public String toString() {
return "SearchResultBean{" +
"resultStatus='" + resultStatus + '\'' +
", resultMsg='" + resultMsg + '\'' +
", result=" + result +
'}';
}
}
| [
"[email protected]"
] | |
b7cf0a8275b954c5d13173357da783ae60d86cac | 4b3a20817a90124c754aebd57418b5213c49d02f | /src/liu/eastcom/Control/WorkWithDFT.java | 609651af7ec4a18bd075089651e0f94b8ddcf2b9 | [] | no_license | feisuo/updateFiles | 6be8e0d6f8e2339f4e839782ff9d385f1141b1f4 | 9b14a7456dc3391d0cc8676360b37b830d9a09bc | refs/heads/master | 2021-01-10T11:28:10.433839 | 2015-11-05T09:49:03 | 2015-11-05T09:49:03 | 45,014,001 | 2 | 1 | null | null | null | null | GB18030 | Java | false | false | 2,585 | java | package liu.eastcom.Control;
import java.io.File;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Stack;
import java.util.StringTokenizer;
import liu.eastcom.util.IOUtil;
public class WorkWithDFT extends Work{
//资源 上下文信息
private ResourceManager rs;
//更新时间点
private Calendar now;
//更新文件存放容器
private ArrayList<File> updated;
public WorkWithDFT(ResourceManager rs) {
this.rs =rs;
updated= new ArrayList<File>();
if(rs.getUpPoint()!=null){
Calendar upPoint = Calendar.getInstance();
upPoint.setTime(rs.getUpPoint());
this.now= upPoint;
}else{
this.now= setTimePoint();
}
}
public int SearchFile() {
int num=0;
File projectF= new File(rs.getUpdatePath());
File temp;
Stack<File> fS= new Stack<File>();
fS.push(projectF);
while(!fS.empty()){
//弹出栈顶
temp=fS.pop();
if(temp.isFile()){
if(isUpdateFile(temp)){
updated.add(temp);
}
}else if(temp.isDirectory()){
File [] content= temp.listFiles();
for(int i=0;i<content.length;i++){
// System.out.println("push: " + content[i]);
fS.push(content[i]);
}
}
}
num= updated==null?0:updated.size();
return num;
}
public void CopyFile() {
IOUtil.getInstance().WriteAndCopyFile(this.updated, rs.getUpdatePath(), rs.getOutputPath());
}
/**
*判断是否是要更新的文件
**/
public boolean isUpdateFile(File f){
// 默认从上次更新时间开始
long time=f.lastModified();
Calendar cal= Calendar.getInstance();
cal.setTimeInMillis(time);
if(cal.after(now)){
System.out.println("file: "+f.getName()+" |\t"+cal.getTimeInMillis()+" |\t"+ cal.getTime());
return true;
}
return false;
}
/**
*设置时间点
***/
@SuppressWarnings("deprecation")
Calendar setTimePoint(){
//获取当前系统时间
Calendar now= Calendar.getInstance();
//起始时间为当天00:00:00
int year = now.get(Calendar.YEAR);
int month = now.get(Calendar.MONTH);
int day = now.get(Calendar.DATE);
now.set(year, month, day-1);
return now;
}
}
| [
"[email protected]"
] | |
e316b457e2b38a4e69d7a68be59efc256754de57 | fa4889c579cdfe6e643c9494d7577b37ff514004 | /spring-https/src/main/java/ir/wikichera/spring/https/HelloResource.java | 5b2c5ccc7e6567c51a5c5a2c5942971bb3257fe8 | [] | no_license | patzu/spring-boot | 875ad5952117aa4de00db17123ca3f740bc2a383 | 1e32d335c7955785a3de5308731ef3c7d9ea689b | refs/heads/master | 2020-11-26T05:08:10.716679 | 2020-02-06T16:43:42 | 2020-02-06T16:43:42 | 228,965,581 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 412 | java | package ir.wikichera.spring.https;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/hello")
public class HelloResource {
@GetMapping()
public String getHelloResource(){
return "Hello resource";
}
}
| [
"[email protected]"
] | |
96374b21e4f67988781fbf6dff81cf6ab3cdbcd2 | 062081a2edfe042b7e3b6455f9d6b151ac8a6a64 | /Binary Search Tree/13. Ceil in BST.java | a4bb28a99d7f634c7c8cc9f330408f3a949b73b1 | [] | no_license | AkshayAnil1080/DSA-Self-pace-GFG | c14d840e8ddc9bf2535e3ead7cd6e658d3acdbca | 7acc091f5c99efb4dcc4d7d7ba0ebea84d2d2685 | refs/heads/main | 2023-06-30T23:29:31.438683 | 2021-07-31T07:41:04 | 2021-07-31T07:41:04 | 352,404,899 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 906 | java | https://practice.geeksforgeeks.org/viewSol.php?subId=f71791e3807fe774158a3cab8ef48577&pid=701135&user=akshayanil
https://practice.geeksforgeeks.org/problems/implementing-ceil-in-bst/1/?track=DSASP-BST&batchId=154
TC : O(ht of BST)
SC: O(1)
class Tree
{
//Function to return the ceil of given number in BST.
int findCeil(Node root, int key)
{
if (root == null)
return -1;
// Code here
int res=-1;
if(root==null) return -1;
while(root!=null)
{
if(root.data>key)
{
res=root.data;
root=root.left;
}
else if(root.data < key)
{
root=root.right;
}
else return root.data;
}
return res;
}
}
Input:
5
/ \
1 7
\
2
\
3
X = 3
Output: 3
Explanation: We find 3 in BST, so ceil
of 3 is 3
| [
"[email protected]"
] | |
c33c4b09d77e1d5f3bd0dd7caa41e7b9aab1b408 | 300751b336aee50705215a4c84a4969d94530735 | /src/main/java/com/advertise/in/repository/AdvertiseRepository.java | 5ec1a051b444aef094d9352723270585f92b5476 | [] | no_license | swapnil288/AdManagement2 | 8f215cac28a6bdf9ebde03979b55dee1e2701522 | 1a8b0b789b72b9248d387b1a4d5ccdc73e0743e8 | refs/heads/main | 2023-04-13T14:46:48.730207 | 2021-04-28T07:14:52 | 2021-04-28T07:14:52 | 362,373,687 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 319 | java | package com.advertise.in.repository;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.advertise.in.model.Advertise;
@Repository
public interface AdvertiseRepository extends JpaRepository<Advertise, Integer> {
}
| [
"[email protected]"
] | |
b36655aa9f870c41348cee995a0eb3cb4edb9e54 | db0b06255a47a96748a38ea714369298c506ade6 | /modules/web/src/com/company/spmu/web/screens/ExtMainScreen.java | fda1cedce92040d2ae1ea0b71c340ef3f3c95b4a | [] | no_license | stfoxfox/spmu | 5987a95c3b252bec653a1e35211234aa35601a7a | 8b77746df5a4bb56a9b0707f20211b221428960c | refs/heads/master | 2020-11-30T10:25:55.928209 | 2019-12-27T05:11:40 | 2019-12-27T05:11:40 | 230,376,711 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,824 | java | package com.company.spmu.web.screens;
import com.company.spmu.entity.*;
import com.company.spmu.entity.Target;
import com.haulmont.cuba.core.global.DatatypeFormatter;
import com.haulmont.cuba.core.global.TimeSource;
import com.haulmont.cuba.core.global.UserSessionSource;
import com.haulmont.cuba.gui.ScreenBuilders;
import com.haulmont.cuba.gui.Screens;
import com.haulmont.cuba.gui.UiComponents;
import com.haulmont.cuba.gui.components.HBoxLayout;
import com.haulmont.cuba.gui.components.Label;
import com.haulmont.cuba.gui.components.Timer;
import com.haulmont.cuba.gui.components.mainwindow.*;
import com.haulmont.cuba.gui.icons.CubaIcon;
import com.haulmont.cuba.gui.screen.*;
import com.haulmont.cuba.security.entity.User;
import com.haulmont.cuba.web.app.main.MainScreen;
import com.haulmont.cuba.web.gui.components.mainwindow.WebUserIndicator;
import javax.inject.Inject;
import java.util.Optional;
@UiController("topMenuMainScreen")
@UiDescriptor("ext-main-screen.xml")
public class ExtMainScreen extends MainScreen {
private static final String BRANDING_CIRCLE_PNG = "branding/circle.png";
@Inject
private UiComponents uiComponents;
@Inject
private ScreenBuilders screenBuilders;
@Inject
private UserSessionSource userSessionSource;
@Inject
private Screens screens;
@Inject
private AppWorkArea workArea;
@Inject
private AppMenu mainMenu;
@Inject
private SideMenu sideMenu;
@Inject
private TimeSource timeSource;
@Inject
protected DatatypeFormatter formatter;
@Override
protected void initUserIndicator() {
super.initUserIndicator();
WebUserIndicator userIndicator = (WebUserIndicator) getUserIndicator();
userIndicator.getComponent().addLayoutClickListener(event -> screenBuilders.editor(User.class, this)
.editEntity(this.userSessionSource.getUserSession().getUser())
.build()
.show());
}
@Install(to = "userIndicator", subject = "userNameFormatter")
private String userIndicatorUserNameFormatter(User user) {
Employee employee = ((SpmuUser) user).getEmployee();
return employee.getFirstname().substring(0, 1) + "." + employee.getLastname().substring(0, 1) + "." + employee.getSecondname();
}
@Override
protected void initComponents(InitEvent e) {
super.initComponents(e);
initTimeZoneIndicator();
}
public void refreshTime(Timer source) {
Label currentDateTime = getCurrentDateTime();
currentDateTime.setValue(formatter.formatDateTime(timeSource.currentTimestamp()));
}
private void initTimeZoneIndicator() {
Label currentDateTime = getCurrentDateTime();
currentDateTime.setValue(formatter.formatDateTime(timeSource.currentTimestamp()));
}
public Label getCurrentDateTime() {
return (Label) getWindow().getComponent("currentDateTime");
}
/**
* Добавить пункт меню в боковое меню
* @param index
* @param screenId
* @param caption
* @param icon
*/
private void addSideMenu(int index, String screenId, String caption, String icon)
{
SideMenu.MenuItem item = this.sideMenu.createMenuItem("menu_item" + index, caption, icon, menuItem -> activateScreen(screenId));
this.sideMenu.addMenuItem(item, index);
}
/**
* Добавить пункт меню в боковое меню (экран браузера)
*/
private void addSideMenuItemBrowser(int index, Class entityClass, String screenId, String caption, String icon)
{
SideMenu.MenuItem item = this.sideMenu.createMenuItem("menu_item" + index, caption, icon, menuItem -> activateScreenBrowser(entityClass, screenId));
this.sideMenu.addMenuItem(item, index);
}
private void activateScreenBrowser(Class entityClass, String screenId) {
if (screenId.isEmpty()){
return;
}
Optional<Screen> first = screens.getOpenedScreens().getAll().stream().
filter(x -> screenId.equals(x.getId())).findFirst();
if (first.isPresent()) {
screens.showFromNavigation(first.get());
} else {
this.screenBuilders.lookup(entityClass, this)
.withLaunchMode(OpenMode.NEW_WINDOW)
.build()
.show();
}
}
/**
* Устанавливает активный экран.
* Если экран уже открыт, то делает его активным. Если не открыт, то создает новый и открывает в новом окне.
*
* @param screenId {@link String}
*/
private void activateScreen(String screenId) {
if (screenId.isEmpty()){
return;
}
Optional<Screen> first = screens.getOpenedScreens().getAll().stream().
filter(x -> screenId.equals(x.getId())).findFirst();
if (first.isPresent()) {
screens.showFromNavigation(first.get());
} else {
screens.create(screenId, OpenMode.NEW_TAB).show();
}
}
/**
* Создаём боковое меню
*/
private void initSideMenu()
{
this.sideMenu.removeAllMenuItems();
// Добавляем в боковое меню пункты >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
int index = 0;
int index2 = 0;
// Заголовок
SideMenu.MenuItem item = this.sideMenu.createMenuItem("menu_topheader");
SpmuUser user = (SpmuUser) this.userSessionSource.getUserSession().getUser();
if (user != null) {
Affilate aff = user.getAffiliate();
if (aff != null) {
item.setCaption(aff.getName());
}
}
item.addStyleName("topheader");
this.sideMenu.addMenuItem(item, index++);
SideMenu.MenuItem item2 = this.addMenuItemWithChilds(index++, "Мои заявки", BRANDING_CIRCLE_PNG);
this.addChildItem(item2, index, index2++, "", "Проекты", BRANDING_CIRCLE_PNG);
this.addChildItem(item2, index, index2++, "", "На согласовании", BRANDING_CIRCLE_PNG);
this.addChildItem(item2, index, index2++, "", "Утверждены", BRANDING_CIRCLE_PNG);
this.addChildItem(item2, index, index2++, "", "В плане", BRANDING_CIRCLE_PNG);
index2 = 0;
item2 = this.addMenuItemWithChilds(index++, "Заявки и мероприятия", BRANDING_CIRCLE_PNG);
this.addChildMenuItemBrowser(item2, index, index2++, ApplicationIncome.class, "spmu_ApplicationIncome.browse", "Заявки на доходы", BRANDING_CIRCLE_PNG);
this.addChildMenuItemBrowser(item2, index, index2++, ApplicationExpense.class, "spmu_ApplicationExpense.browse", "Текущие расходы", BRANDING_CIRCLE_PNG);
this.addChildMenuItemBrowser(item2, index, index2++, ApplicationEvent.class, "spmu_ApplicationEvent.browse", "Заявки на мероприятия", BRANDING_CIRCLE_PNG);
index2 = 0;
item2 = this.addMenuItemWithChilds(index++, "Планы филиалов (ПДФ)", BRANDING_CIRCLE_PNG);
this.addChildMenuItemBrowser(item2, index, index2++, PlanVariant.class, "spmu_PlanVariant.browse", "Все планы", BRANDING_CIRCLE_PNG);
index2 = 0;
item2 = this.addMenuItemWithChilds(index++, "Планы предприятия (ПДП)", BRANDING_CIRCLE_PNG);
this.addChildItem(item2, index, index2++, "", "Централизованные планы мероприятий", BRANDING_CIRCLE_PNG);
// Добавляем в боковое меню пункты <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
}
/**
* Инициализация верхнего меню
*/
private void initMainMenu()
{
AppMenu.MenuItem item = mainMenu.createMenuItem("mainwm", "АИС СПМУФЦП");
item.setCommand(menuItem -> {
//showNotification("Экран", NotificationType.HUMANIZED);
});
mainMenu.addMenuItem(item, 0);
item = mainMenu.createMenuItem("sidemenu_hide", "");
item.setIcon(CubaIcon.ALIGN_JUSTIFY.source());
item.setCommand(menuItem -> {
this.sideMenu.setVisible(!this.sideMenu.isVisible());
});
mainMenu.addMenuItem(item, 1);
}
private SideMenu.MenuItem addMenuItemWithChilds(int index, String caption, String icon) {
SideMenu.MenuItem item = this.sideMenu.createMenuItem("menu_item" + index, caption, icon, menuItem -> {});
this.sideMenu.addMenuItem(item, index);
return item;
}
private void addChildItem(SideMenu.MenuItem parent, int indexParent, int index, String screenId, String caption, String icon) {
SideMenu.MenuItem item = this.sideMenu.createMenuItem("menu_item" + indexParent + index, caption, icon, menuItem -> activateScreen(screenId));
parent.addChildItem(item);
}
/**
* Добавить пункт меню в боковое меню (экран браузера)
*/
private void addChildMenuItemBrowser(SideMenu.MenuItem parent, int indexParent, int index, Class entityClass, String screenId, String caption, String icon)
{
SideMenu.MenuItem item = this.sideMenu.createMenuItem("menu_item" + indexParent + index, caption, icon, menuItem -> activateScreenBrowser(entityClass, screenId));
parent.addChildItem(item);
}
@Override
protected void initMenu() {
super.initMenu();
this.initMainMenu();
this.initSideMenu();
}
}
| [
"[email protected]"
] | |
adab54c2c0e570e8e2a2de7707cd7324cc5bf181 | 982753e0b19b2f826930b79addfd77ed4d70c0c5 | /src/main/java/com/taxisurfr/servlet/StatServlet.java | 9d894ecf12794b6bfbc73842c106a16423f8d09e | [
"Apache-2.0"
] | permissive | peterredmondhall/taxisurfr | df67b5cd5c5e04535219bb5c2bd391ffe5c0807f | c17de4dbdbbd7bcb93c6646d0da75c0e3b73c3f2 | refs/heads/master | 2021-01-17T13:21:03.990871 | 2016-07-11T19:20:48 | 2016-07-11T19:20:48 | 39,792,323 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,392 | java | package com.taxisurfr.servlet;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.appengine.repackaged.com.google.api.client.util.Strings;
import com.google.common.collect.ImmutableMap;
import com.googlecode.objectify.ObjectifyService;
import com.taxisurfr.client.service.BookingService;
import com.taxisurfr.server.BookingServiceManager;
import com.taxisurfr.server.CurrencyManager;
import com.taxisurfr.server.StatManager;
import com.taxisurfr.server.entity.Profil;
import com.taxisurfr.shared.Currency;
import com.taxisurfr.shared.CurrencyRequest;
import com.taxisurfr.shared.model.StatInfo;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Date;
import java.util.Map;
import java.util.logging.Logger;
public class StatServlet extends HttpServlet
{
private static final long serialVersionUID = 1L;
public static final Logger log = Logger.getLogger(StatServlet.class.getName());
BookingServiceManager bookingServiceManager = new BookingServiceManager();
private static final Map<String, Currency> currencyMap = new ImmutableMap.Builder()
.put("GB", Currency.GBP)
.put("CZ", Currency.EUR)
.put("AU", Currency.AUD)
.put("AS", Currency.EUR)
.put("AD", Currency.EUR)
.put("AT", Currency.EUR)
.put("BE", Currency.EUR)
.put("FI", Currency.EUR)
.put("FR", Currency.EUR)
.put("GF", Currency.EUR)
.put("DE", Currency.EUR)
.put("GR", Currency.EUR)
.put("GP", Currency.EUR)
.put("IE", Currency.EUR)
.put("IT", Currency.EUR)
.put("LU", Currency.EUR)
.put("MQ", Currency.EUR)
.put("YT", Currency.EUR)
.put("MC", Currency.EUR)
.put("NL", Currency.EUR)
.put("PT", Currency.EUR)
.put("RE", Currency.EUR)
.put("WS", Currency.EUR)
.put("SM", Currency.EUR)
.put("SI", Currency.EUR)
.put("ES", Currency.EUR)
.build();
StatManager statManager = new StatManager();
CurrencyManager currencyManager = new CurrencyManager();
private final ObjectMapper mapper = new ObjectMapper();
@Override
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws IOException
{
ObjectifyService.begin();
String country = req.getHeader("X-AppEngine-Country");
String cityLatLong = req.getHeader("X-AppEngine-CityLatLong");
String region = req.getHeader("X-AppEngine-Region");
String city = req.getHeader("X-AppEngine-City");
if (country == null || country.trim().length() == 0)
{
country = "XXX";
}
log.info("country:" + country);
log.info("cityLatLong:" + cityLatLong);
log.info("region:" + region);
log.info("city:" + city);
final String ip = req.getRemoteAddr();
final String referrer = req.getRequestURL().toString();
CurrencyRequest currencyRequest = mapper.readValue(req.getInputStream(), CurrencyRequest.class);
StatInfo statInfo = new StatInfo();
statInfo.setReferer(referrer);
statInfo.setTime(new Date());
statInfo.setDetail("country");
statInfo.setSrc(currencyRequest.getSrc());
statInfo.setCountry(country + ":" + city);
statInfo.setIp(ip);
statInfo.setStripePublishable(bookingServiceManager.getProfil().getStripePublishable());
// Deserialize the request
String currency = currencyRequest.getCurrency();
if (Strings.isNullOrEmpty(currency) || currency.equals("null"))
{
currency = currencyMap.get(country) != null ? currencyMap.get(country).name() : "USD";
}
Currency curr = Currency.valueOf(currency);
Float rate = currencyMap.get(country) != null ? currencyManager.getRate(curr): 1.0f;
statInfo.setCurrency(curr);
statInfo.setCurrencyRate(rate);
log.info("currency:" + curr);
statInfo = statManager.createSessionStatFromInfo(statInfo);
// Serialize the response into the servlet output
mapper.writeValue(resp.getOutputStream(), statInfo);
}
}
| [
"[email protected]"
] | |
b276424eb99b10d387bee9e414c6e03a6519a1f5 | a0d234e188555f4bca4818eb62323a7e1a082046 | /src/pl/chemik77/utils/queries/ReadRecord.java | 0ca5284b8c7bcd1342979042e7ffcad3c72d6995 | [] | no_license | chemik77/Customer_Database | 2d30ad077f487437138638747cdb4fae974a0abb | 819205c20465bc30baec56918622dfeb72451d6d | refs/heads/master | 2021-01-02T09:40:24.910552 | 2017-08-29T14:41:54 | 2017-08-29T14:41:54 | 99,273,448 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,472 | java | package pl.chemik77.utils.queries;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import pl.chemik77.model.Address;
import pl.chemik77.model.Customer;
import pl.chemik77.utils.DbManager;
public class ReadRecord {
private Connection connection;
private ResultSet result_customer;
private ResultSet result_address;
private Customer customer;
private Address address;
private int customer_id;
public ReadRecord(int customer_id) {
this.customer_id = customer_id;
this.connection = DbManager.getConnection();
}
public void doRead() throws SQLException {
String sql = "SELECT * FROM customer WHERE customer_id=?";
PreparedStatement preparedStatement = connection.prepareStatement(sql);
preparedStatement.setInt(1, customer_id);
result_customer = preparedStatement.executeQuery();
result_customer.next();
this.customer = new Customer();
this.customer.setCustomer_id(result_customer.getInt("customer_id"));
this.customer.setStore_id(result_customer.getInt("store_id"));
this.customer.setFirstName(result_customer.getString("first_name"));
this.customer.setLastName(result_customer.getString("last_name"));
this.customer.setEmail(result_customer.getString("email"));
this.customer.setAddress_id(result_customer.getInt("address_id"));
this.customer.setActive(result_customer.getInt("active"));
this.customer.setCreateDate(result_customer.getDate("create_date").toLocalDate());
this.customer.setLastUpdate(result_customer.getTimestamp("last_update").toLocalDateTime());
String sql2 = "SELECT * FROM address WHERE address_id=?";
PreparedStatement preparedStatement2 = connection.prepareStatement(sql2);
preparedStatement2.setInt(1, customer.getAddress_id());
result_address = preparedStatement2.executeQuery();
result_address.next();
this.address = new Address();
this.address.setAddress_id(result_address.getInt("address_id"));
this.address.setStreet(result_address.getString("street"));
this.address.setHouseNo(result_address.getString("house_no"));
this.address.setPostalCode(result_address.getString("postal_code"));
this.address.setCity(result_address.getString("city"));
this.address.setCountry(result_address.getString("country"));
}
public Customer getCustomer() {
return this.customer;
}
public Address getAddress() {
return this.address;
}
}
| [
"[email protected]"
] | |
bdf77165d57d3df3bc03459d738b7e6206c94593 | 5bb1700644952009c21705346f2fcef65698c50a | /sc-provider/sc-xzsd-pc/src/main/java/com/xzsd/pc/menu/service/MenuService.java | 8c8baa27c13fd4ab9b1259164cd5bac06d50e75d | [] | no_license | kylenkyrie/walkStore | 8ae4cd9cc95af8082dbd8897603b2d216ea615f1 | 544a729df6680860cb261cc331686b6d99b29ded | refs/heads/master | 2022-04-24T01:24:53.642937 | 2020-04-19T00:06:34 | 2020-04-19T00:06:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,312 | java | package com.xzsd.pc.menu.service;
import com.xzsd.pc.menu.dao.MenuDao;
import com.xzsd.pc.menu.entity.MenuInfo;
import com.xzsd.pc.util.AppResponse;
import com.xzsd.pc.util.StringUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
@Service
public class MenuService {
@Resource
private MenuDao menuDao;
/**
* 新增菜单
*
* @param menuInfo
* @return
* @author xiekai
* @time 2020-3-25
*/
@Transactional(rollbackFor = Exception.class)
public AppResponse addMenu(MenuInfo menuInfo) {
menuInfo.setMenuId(StringUtil.getCommonCode(2));
// 新增菜单
int count = menuDao.addMenu(menuInfo);
if (0 == count) {
return AppResponse.versionError("新增失败,请重试!");
}
return AppResponse.success("新增成功!");
}
/**
* demo 查询菜单列表(分页)
*
* @param menuInfo
* @return
* @Author xiekai
* @Date 2020-04-09
*/
public AppResponse listMenu(MenuInfo menuInfo) {
List<MenuInfo> menuInfoList = menuDao.listMenu(menuInfo);
return AppResponse.success("查询成功!", menuInfoList);
}
/**
* 查询菜单详情
*
* @param menuId
* @return
* @Author xiekai
* @Date 2020-03-25
*/
public AppResponse getMenu(String menuId) {
MenuInfo menuInfo = menuDao.getMenu(menuId);
return AppResponse.success("查询成功!", menuInfo);
}
/**
* demo 修改菜单
*
* @param menuInfo
* @return
* @Author xiekai
* @Date 2020-4-9
*/
@Transactional(rollbackFor = Exception.class)
public AppResponse updateMenu(MenuInfo menuInfo) {
AppResponse appResponse = AppResponse.success("修改成功");
// 修改菜单信息
int count = menuDao.updateMenu(menuInfo);
if (0 == count) {
appResponse = AppResponse.versionError("数据有变化,请刷新!");
return appResponse;
}
return appResponse;
}
/**
* 删除菜单
*
* @param menuId
* @return
* @Author xiekai
* @Date 2020-4-9
*/
@Transactional(rollbackFor = Exception.class)
public AppResponse deleteMenu(String menuId, String updateUser) {
AppResponse appResponse = AppResponse.success("删除成功!");
// 删除菜单
int count = menuDao.deleteMenu(menuId, updateUser);
if (0 == count) {
appResponse = AppResponse.notFound("删除失败,请重试!");
}
return appResponse;
}
/**
* 角色菜单列表
*
* @param menuInfo
* @return
* @Author xiekai
* @Date 2020-04-13
*/
public AppResponse listMenuHome(MenuInfo menuInfo) {
if( menuInfo.getRole() == 0 || menuInfo.getRole() == 1){
List<MenuInfo> menuList = menuDao.listMenuHomeAdmin(menuInfo);
return AppResponse.success("查询成功!",menuList);
}else{
List<MenuInfo> menuList = menuDao.listMenuHome(menuInfo);
return AppResponse.success("查询成功!",menuList);
}
}
}
| [
"[email protected]"
] | |
27b44c2a72cd040d24c2387466999f61252e893f | 5cf8544c53ae9affa15601d69c0ac61a74413491 | /crud-web/src/br/edu/devmedia/crud/util/ConexaoUtil.java | b41161fd355a5d11ca2f92d6e2c6dad456943a6f | [] | no_license | GeorgeSalu/Servlet-JSP-JSTL-e-Tags | de23a271efc12df69630047575f344ea0c0d59c0 | a329a84e768e53de37bcdfd1c795353758779bbb | refs/heads/master | 2021-01-10T17:31:43.992463 | 2016-04-28T20:04:09 | 2016-04-28T20:04:09 | 49,839,210 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 719 | java | package br.edu.devmedia.crud.util;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.ResourceBundle;
/**
* Classe de geração de novas conexões
*
* @author George
*/
public class ConexaoUtil {
private static ResourceBundle configDB = ResourceBundle.getBundle(Constantes.CONEXAO_BD_PROPERTIES);
public static Connection getConexao() throws ClassNotFoundException, SQLException {
Class.forName(configDB.getString(Constantes.CONEXAO_BD_DRIVER));
return DriverManager.getConnection(configDB.getString(Constantes.CONEXAO_BD_URL),
configDB.getString(Constantes.CONEXAO_BD_USER),
configDB.getString(Constantes.CONEXAO_BD_PASSWORD));
}
}
| [
"[email protected]"
] | |
f36906a31dd86bc18808486135dc3c978b6d4b15 | 5553216ec12dfb8515e74a18c9d5c6449fe15f03 | /src/main/java/Controllers/SessionController.java | 1c51283d88bd269b6930c123b7c9876f47007223 | [] | no_license | cameron87423/Coursework | b1f519680eeca40d91cd8df25c6a3cf76a453b79 | 75c013db2ec1461f95112e82424763364b9e3917 | refs/heads/master | 2022-07-28T14:55:30.579550 | 2020-01-27T11:21:28 | 2020-01-27T11:21:28 | 191,376,020 | 0 | 0 | null | 2022-07-07T22:10:30 | 2019-06-11T13:21:03 | JavaScript | UTF-8 | Java | false | false | 7,902 | java | package Controllers;
import Server.Main;
import org.glassfish.jersey.media.multipart.FormDataParam;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@Path("Sessions/")
public class SessionController {//
@GET
@Path("StudentSessions/{id}")
@Produces(MediaType.APPLICATION_JSON)
public String StudentSessions(@PathParam("id") Integer id) {
System.out.println("Sessions/StudentSessions/" + id);
JSONArray list = new JSONArray();
try {
PreparedStatement ps = Main.db.prepareStatement("SELECT SessionID,TutorID, Hours, Pay, Grade, Review FROM Sessions WHERE StudentID = ?");
ps.setInt(1,id);
ResultSet results = ps.executeQuery();
while (results.next()) {
JSONObject item = new JSONObject();
item.put("StudentID",id);
item.put("SessionID",results.getInt(1));
item.put("TutorID",results.getInt(2));
item.put("Hours",results.getInt(3));
item.put("Pay",results.getDouble(4));
item.put("Grade",results.getString(5));
item.put("Review",results.getDouble(6));
list.add(item);
}
return list.toString();
} catch (Exception e) {
System.out.println("Database error: " + e.getMessage());
return "{\"error\": \"Unable to list items, please see server console for more info.\"}";
}
}
@GET
@Path("TutorSessions/{id}")
@Produces(MediaType.APPLICATION_JSON)
public String TutorSessions(@PathParam("id") Integer id) {
System.out.println("Sessions/TutorSessions/" + id);
JSONArray list = new JSONArray();
try {
PreparedStatement ps = Main.db.prepareStatement("SELECT SessionID,StudentID, Hours, Pay, Grade, Review FROM Sessions WHERE TutorID = ?");
ps.setInt(1,id);
ResultSet results = ps.executeQuery();
while (results.next()) {
JSONObject item = new JSONObject();
item.put("TutorID",id);
item.put("SessionID",results.getInt(1));
item.put("StudentID",results.getInt(2));
item.put("Hours",results.getInt(3));
item.put("Pay",results.getDouble(4));
item.put("Grade",results.getString(5));
item.put("Review",results.getDouble(6));
list.add(item);
}
return list.toString();
} catch (Exception e) {
System.out.println("Database error: " + e.getMessage());
return "{\"error\": \"Unable to list items, please see server console for more info.\"}";
}
}
@GET
@Path("ListSessions/{StudentID}/{TutorID}")
@Produces(MediaType.APPLICATION_JSON)
public String ListSessions(@PathParam("StudentID") Integer StudentID, @PathParam("TutorID") Integer TutorID) {
System.out.println("Sessions/TutorSessions/" + StudentID + " " + TutorID);
JSONArray list = new JSONArray();
try {
PreparedStatement ps = Main.db.prepareStatement("SELECT Hours, Pay, Grade, Review FROM Sessions WHERE TutorID = ? AND StudentID = ?");
ps.setInt(1,TutorID);
ps.setInt(2,StudentID);
ResultSet results = ps.executeQuery();
while (results.next()) {
JSONObject item = new JSONObject();
item.put("TutorID",TutorID);
item.put("StudentID",StudentID);
item.put("Hours",results.getInt(1));
item.put("Pay",results.getDouble(2));
item.put("Grade",results.getString(3));
item.put("Review",results.getDouble(4));
list.add(item);
}
return list.toString();
} catch (Exception e) {
System.out.println("Database error: " + e.getMessage());
return "{\"error\": \"Unable to list items, please see server console for more info.\"}";
}
}
@POST
@Path("new")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
public String Seinsert(@FormDataParam("studentID") Integer studentID, @FormDataParam("tutorID") Integer tutorID, @FormDataParam("review") Double review,
@FormDataParam("hours") Integer hours, @FormDataParam("pay") Double pay, @FormDataParam("grade") String grade){
try{
if (studentID == null || tutorID == null || review == null || hours == null || pay == null || grade == null){
throw new Exception("One or more form data parameters are missing in the HTTP request.");
}
System.out.println("sessions/new");
PreparedStatement ps = Main.db.prepareStatement("INSERT INTO Sessions (StudentID, TutorID, Review, Hours, Pay, Grade) VALUES(?,?,?,?,?,?)");
//SQL for inserting a new record into a table
ps.setInt(1,studentID);
ps.setInt(2,tutorID);
ps.setDouble(3,review);
ps.setInt(4,hours);
ps.setDouble(5,pay);
ps.setString(6,grade);
ps.execute();
return "{\"status\": \"OK\"}";
}catch (Exception e) {
System.out.println("Database error: " + e.getMessage());
return "{\"error\": \"Unable to insert items, please see server console for more info.\"}";
}
}
@POST
@Path("change")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
public String Seupdate(@FormDataParam("sessionID") Integer sessionID,@FormDataParam("studentID") Integer studentID,@FormDataParam("tutorID") Integer tutorID,
@FormDataParam("review") Double review, @FormDataParam("hours") Integer hours, @FormDataParam("pay") Double pay, @FormDataParam("grade") String grade){
try{
if (studentID == null || tutorID == null || review == null || hours == null || pay == null || grade == null){
throw new Exception("One or more form data parameters are missing in the HTTP request.");
}
System.out.println("session/update");
PreparedStatement ps = Main.db.prepareStatement("UPDATE Sessions SET StudentID = ?, TutorID = ?, Review = ?, Hours = ?, Pay = ?, Grade = ? WHERE SessionID = ?");
ps.setInt(1, studentID);
ps.setInt(2, tutorID);
ps.setDouble(3, review);
ps.setInt(4,hours);
ps.setDouble(5, pay);
ps.setString(6, grade);
ps.setInt(7, sessionID);
ps.execute();
return "{\"status\": \"OK\"}";
} catch (Exception e) {
System.out.println("Database error: " + e.getMessage());
return "{\"error\": \"Unable to update item, please see server console for more info.\"}";
}
}
@POST
@Path("delete")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
public String Sedelete(@FormDataParam("id") Integer id) {
try {
if (id == null) {
throw new Exception("One or more form data parameters are missing in the HTTP request.");
}
System.out.println("Session/delete");
PreparedStatement ps = Main.db.prepareStatement("DELETE FROM Sessions WHERE SessionID = ?");
ps.setInt(1,id);
ps.execute();
return "{\"status\": \"OK\"}";
} catch (Exception e) {
System.out.println("Database error: " + e.getMessage());
return "{\"error\": \"Unable to delete item, please see server console for more info.\"}";
}
}
}
| [
"[email protected]"
] | |
54067001003bb561521bab3973b2e1e3ee931258 | 17a836e535db35c19f2db09eded9ec9e19174834 | /loanapplication/src/main/java/com/kocfinans/loanapplication/repository/UserRepository.java | 0e2e4fcf837bb87f95d6d2ab61f8a9c613eb90a5 | [] | no_license | yyusufaslan/loan-limit-query-application | d26219ec6b8738e64639a9c3283f524e2efe1c81 | 111c8fff66d33b62f1780c15c4ea4b6b521b9baa | refs/heads/master | 2022-12-15T13:53:13.270422 | 2020-09-06T21:42:57 | 2020-09-06T21:42:57 | 293,326,474 | 0 | 0 | null | 2020-09-06T17:34:02 | 2020-09-06T17:21:20 | null | UTF-8 | Java | false | false | 322 | java | package com.kocfinans.loanapplication.repository;
import com.kocfinans.loanapplication.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.UUID;
public interface UserRepository extends JpaRepository<User, UUID> {
User findByNationalIdentityId(String nationalIdentityId);
}
| [
"[email protected]"
] | |
f1fbb0bc9f85ce0a0f5410b7f9de25b1ece1ebaa | 70f7a06017ece67137586e1567726579206d71c7 | /alimama/src/main/java/com/taobao/onlinemonitor/DynamicCloseGuard.java | 6927351e21b106fc5c173fa82b7b98b7790311a1 | [] | 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 | 2,752 | java | package com.taobao.onlinemonitor;
import android.text.TextUtils;
import android.util.Log;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
public class DynamicCloseGuard extends BaseDynamicProxy {
public DynamicCloseGuard(OnLineMonitor onLineMonitor) {
super(onLineMonitor);
}
public void doProxy() {
try {
Class<?> cls = Class.forName("dalvik.system.CloseGuard");
Field declaredField = cls.getDeclaredField("REPORTER");
Field declaredField2 = cls.getDeclaredField("ENABLED");
declaredField.setAccessible(true);
declaredField2.setAccessible(true);
declaredField2.setBoolean(cls, true);
declaredField.set(cls, newProxyInstance(declaredField.get(cls)));
} catch (Throwable th) {
th.printStackTrace();
}
}
public Object invoke(Object obj, Method method, Object[] objArr) throws Throwable {
String str;
try {
if (this.mOnLineMonitor == null) {
return null;
}
if (objArr[1] != null) {
OnLineMonitor onLineMonitor = this.mOnLineMonitor;
str = OnLineMonitor.getStackTraceElement(objArr[1].getStackTrace(), 2, 15);
} else {
str = null;
}
if (this.mOnLineMonitor.mOnlineStatistics != null) {
int size = this.mOnLineMonitor.mOnlineStatistics.size();
for (int i = 0; i < size; i++) {
OnlineStatistics onlineStatistics = this.mOnLineMonitor.mOnlineStatistics.get(i);
if (onlineStatistics != null) {
onlineStatistics.onBlockOrCloseGuard(this.mOnLineMonitor.mOnLineStat, 1, "Close", this.mOnLineMonitor.mActivityName, Thread.currentThread().getName(), str, 0);
}
}
}
if (OnLineMonitor.sIsTraceDetail && str != null) {
Log.e("OnLineMonitor", "未及时关闭的句柄:\n" + str.replace("</br>", "\n"));
}
if (OnLineMonitor.sIsTraceDetail && this.mOnLineMonitor.mTraceDetail.mCloseGuardInfo != null && !TextUtils.isEmpty(str)) {
Integer num = this.mOnLineMonitor.mTraceDetail.mCloseGuardInfo.get(str);
if (num != null) {
this.mOnLineMonitor.mTraceDetail.mCloseGuardInfo.put(str, Integer.valueOf(num.intValue() + 1));
} else {
this.mOnLineMonitor.mTraceDetail.mCloseGuardInfo.put(str, 1);
}
}
return method.invoke(this.mTargetObject, objArr);
} catch (Throwable unused) {
return null;
}
}
}
| [
"[email protected]"
] | |
1ed91a82aff178ae9b4619912b543b3bdba4e791 | 4fd8b48006d6e98ceed49538d8ae5fbeb1ad0d70 | /ProjectPengubinan/src/projectpengubinan/PersegiPanjang.java | f2623dd9961c90e572495af309a50b7adc57d836 | [] | no_license | muhammadhardiansyah/PBO_03_Method | 5dd6fd87bb41c0aec5417dc4d4fd00a2fbf1daf4 | 1f1de1f36b6bd77666a1edd1f89807e5e24df592 | refs/heads/main | 2023-08-07T11:50:54.498865 | 2021-10-08T10:22:52 | 2021-10-08T10:22:52 | 414,941,679 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 553 | 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 projectpengubinan;
/**
*
* @author asus
*/
public class PersegiPanjang {
//method untuk mengalikan dua bilangan a dan b
static int perkalian (int a, int b){
int hasil = a * b;
return hasil;
}
//method
int hitungLuas(int panjang, int lebar){
int luas = perkalian(panjang,lebar);
return luas;
}
}
| [
"[email protected]"
] | |
a9dec2e08434161aee57c62c4b2ddac4f6df77c4 | 902c50fab6a1af1cb69e69afa4171637129b888e | /app/src/main/java/com/example/appvendas/Entity/ProductGroup.java | 0c3610c1f3c67432a1ed0d79d0180f3db799faf4 | [] | no_license | JoseDeAssis/AppVendas | 0c23fb964c0ff20f85c8313ac870b28759a17081 | 6ea2157f0bd5407f94b1986c41b2f1565e963481 | refs/heads/master | 2020-08-15T14:01:04.853323 | 2020-02-13T20:53:57 | 2020-02-13T20:53:57 | 215,354,387 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 840 | java | package com.example.appvendas.Entity;
import android.widget.ImageView;
public class ProductGroup {
private String groupName;
private int groupImg;
private boolean selected;
public ProductGroup(String groupName, int groupImg, boolean selected) {
this.groupName = groupName;
this.groupImg = groupImg;
this.selected = selected;
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
public int getGroupImg() {
return groupImg;
}
public void setGroupImg(int groupImg) {
this.groupImg = groupImg;
}
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
this.selected = selected;
}
}
| [
"[email protected]"
] | |
7525a1dccf9713d7bfe0c9552fbbe33e663caf16 | 60d72d45de3900971558b6ebef3c6abb2cad570f | /concurrent/src/pervious/SleepUtils.java | c8d0563b0a3e35e32edce47dfca6565cef91dbf0 | [] | no_license | qianbudiao6/Java-Concurrent-Notes | b1965623e7046195cec7954db1a0a96a09ca1194 | 91b980485a3b8166fbaa71b115191c9e77cef368 | refs/heads/master | 2020-04-07T05:12:41.070533 | 2018-03-14T02:16:15 | 2018-03-14T02:16:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 331 | java | package pervious;
import java.util.concurrent.TimeUnit;
/**
* Created by walmt on 2017/8/24.
*/
public class SleepUtils {
public static final void second(long seconds) {
try {
TimeUnit.SECONDS.sleep(seconds);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
| [
"[email protected]"
] | |
48518a4da5ba7afead1d88895645950e99313034 | a3acab4bb2fa6f5c39dd88968ab6a37d8cbb6f0a | /2AppDemoServiceProviderA/src/org/demo/ServiceProvider2.java | 6e8fd7e1669ea4ffdb09dc8ed3a18d5f68aa50ed | [] | no_license | jalbertomr/simpleLookupAPI | add06bddee9078779d7c5a89351dc9800131e7ee | 1f36d579a51ab9655f240eee25f824a4c349758d | refs/heads/master | 2021-07-06T19:25:07.468525 | 2017-09-27T23:54:17 | 2017-09-27T23:54:17 | 104,812,714 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 299 | java | package org.demo;
import org.demo.services.ServiceInterface;
public class ServiceProvider2 implements ServiceInterface{
@Override
public String getName() {
return "returns ServiceProvider2 from 2AppDemoService which implements ServiceInterface from 1AppDemoService";
}
}
| [
"[email protected]"
] | |
6753f55a380aa04fd7ce66e2b78e3f276193dec4 | 92e79f38a66d0875d2b611a6b518ecfcc167dc94 | /app/src/main/java/eu/uk/ncl/pet5o/esper/epl/enummethod/eval/EnumAverageScalarLambdaForge.java | 4b40e194d296011b10fd138aa55a634b66c2b4aa | [] | no_license | PetoMichalak/EsperOn | f8f23d24db21269070e302c0a6c329312491388b | 688012d2a92217f4b24bf072dac04ed8902a313d | refs/heads/master | 2020-03-24T01:06:17.446804 | 2018-07-25T15:53:50 | 2018-07-25T15:53:50 | 142,322,329 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,940 | java | /*
***************************************************************************************
* Copyright (C) 2006 EsperTech, Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
***************************************************************************************
*/
package eu.uk.ncl.pet5o.esper.epl.enummethod.eval;
import eu.uk.ncl.pet5o.esper.codegen.base.CodegenClassScope;
import eu.uk.ncl.pet5o.esper.codegen.base.CodegenMethodScope;
import eu.uk.ncl.pet5o.esper.codegen.model.expression.CodegenExpression;
import eu.uk.ncl.pet5o.esper.epl.enummethod.codegen.EnumForgeCodegenParams;
import eu.uk.ncl.pet5o.esper.epl.expression.core.ExprForge;
import eu.uk.ncl.pet5o.esper.event.arr.ObjectArrayEventType;
public class EnumAverageScalarLambdaForge extends EnumForgeBase {
protected final ObjectArrayEventType resultEventType;
public EnumAverageScalarLambdaForge(ExprForge innerExpression, int streamCountIncoming, ObjectArrayEventType resultEventType) {
super(innerExpression, streamCountIncoming);
this.resultEventType = resultEventType;
}
public EnumEval getEnumEvaluator() {
return new EnumAverageScalarLambdaForgeEval(this, innerExpression.getExprEvaluator());
}
public CodegenExpression codegen(EnumForgeCodegenParams premade, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) {
return EnumAverageScalarLambdaForgeEval.codegen(this, premade, codegenMethodScope, codegenClassScope);
}
}
| [
"[email protected]"
] | |
43a7d09bfd737a8781238a521da733a34dc3e4a5 | cb2879765d641ab6f949714f9bb4d38b3bc6fe8a | /DataAnalystics/JUnit/citi/serviceImpl/DateTransferServiceImplTest.java | 87266a2b97cab09b78f63de4ce516cad4bfc1d0b | [] | no_license | dongbruno/DataAnalystics | d00fe7220407cf733cba88278f965a10bf0a7368 | ae85f3474e93697930e831f24bc86a0001827932 | refs/heads/master | 2021-06-21T01:53:07.820396 | 2017-08-11T06:08:37 | 2017-08-11T06:08:37 | 99,395,069 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,863 | java | package citi.serviceImpl;
import static org.junit.Assert.assertTrue;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
public class DateTransferServiceImplTest {
@Before
public void setUp() throws Exception {
}
@Test
public void testToDateFromString() {
DateTransferServiceImpl dateTransferServiceImpl = new DateTransferServiceImpl();
String string1 = dateTransferServiceImpl.toDateFromString("20160104", "903");
String string2 = dateTransferServiceImpl.toDateFromString("20160114", "930");
String string3 = dateTransferServiceImpl.toDateFromString("20160104", "1503");
String string4 = dateTransferServiceImpl.toDateFromString("20160104", "0");
assertTrue("2016-01-04 09:03".equals(string1));
assertTrue("2016-01-14 09:30".equals(string2));
assertTrue("2016-01-04 15:03".equals(string3));
assertTrue("2016-01-04".equals(string4));
}
@Test
public void testToListFromDate() {
DateTransferServiceImpl dateTransferServiceImpl = new DateTransferServiceImpl();
List<String> dates1 = dateTransferServiceImpl.toListFromDate("2016-01-04 09:03");
List<String> dates2 = dateTransferServiceImpl.toListFromDate("2016-01-14 09:30");
List<String> dates3 = dateTransferServiceImpl.toListFromDate("2016-01-04 15:03");
List<String> dates4 = dateTransferServiceImpl.toListFromDate("2016-01-04");
assertTrue(dates1.get(0).equals("20160104"));
assertTrue(dates1.get(1).equals("903"));
assertTrue(dates2.get(0).equals("20160114"));
assertTrue(dates2.get(1).equals("930"));
assertTrue(dates3.get(0).equals("20160104"));
assertTrue(dates3.get(1).equals("1503"));
assertTrue(dates4.get(0).equals("20160104"));
assertTrue(dates4.get(1).equals("0"));
}
@Test
public void testTurnLastDay() {
String dateNow1 = "20160201";
String dateNow2 = "20160305";
String dateNow3 = "20160215";
String dateNow4 = "20160301";
String dateNow5 = "20160401";
String dateNow6 = "20160430";
String dateNow7 = "20160531";
DateTransferServiceImpl dateTransferServiceImpl = new DateTransferServiceImpl();
String date1 = dateTransferServiceImpl.turnLastDay(dateNow1);
String date2 = dateTransferServiceImpl.turnLastDay(dateNow2);
String date3 = dateTransferServiceImpl.turnLastDay(dateNow3);
String date4 = dateTransferServiceImpl.turnLastDay(dateNow4);
String date5 = dateTransferServiceImpl.turnLastDay(dateNow5);
String date6 = dateTransferServiceImpl.turnLastDay(dateNow6);
String date7 = dateTransferServiceImpl.turnLastDay(dateNow7);
assertTrue(date1.equals("20160131"));
assertTrue(date2.equals("20160304"));
assertTrue(date3.equals("20160214"));
assertTrue(date4.equals("20160229"));
assertTrue(date5.equals("20160331"));
assertTrue(date6.equals("20160429"));
assertTrue(date7.equals("20160530"));
}
}
| [
"[email protected]"
] | |
eb018a41f2ac01bce9dcd7b7e88097c0f9cd716f | a27d1aeaebf8fef1ba0985e8ed59a089f57bab61 | /jyyBlog-web/src/main/java/com/baidu/ueditor/ConfigManager.java | f848adc09a8c6aa35c906bedd7d301c047a39cf7 | [] | no_license | matrix-jyy/jyyBlog | c1678379e3f11582a214a4263f7d5cd0749b536a | 8640f8e1022412481fe4dc74a6afc1a100933f2c | refs/heads/master | 2021-01-23T06:39:34.037788 | 2017-06-01T08:08:27 | 2017-06-01T08:08:27 | 93,032,570 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,432 | java | package com.baidu.ueditor;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;
import java.util.ResourceBundle;
import org.json.JSONArray;
import org.json.JSONObject;
import com.baidu.ueditor.define.ActionMap;
/**
* 配置管理器
*
* @author [email protected]
*
*/
public final class ConfigManager {
private final String rootPath;
private final String originalPath;
private final String contextPath;
private static final String configFileName = "config.json";
private String parentPath = null;
private JSONObject jsonConfig = null;
// 涂鸦上传filename定义
private final static String SCRAWL_FILE_NAME = "scrawl";
// 远程图片抓取filename定义
private final static String REMOTE_FILE_NAME = "remote";
/*
* 通过一个给定的路径构建一个配置管理器, 该管理器要求地址路径所在目录下必须存在config.properties文件
*/
private ConfigManager(String rootPath, String contextPath, String uri) throws FileNotFoundException, IOException {
rootPath = rootPath.replace("\\", "/");
this.rootPath = rootPath;
this.contextPath = contextPath;
if (contextPath.length() > 0) {
this.originalPath = this.rootPath + uri.substring(contextPath.length());
} else {
this.originalPath = this.rootPath + uri;
}
this.initEnv();
}
/**
* 配置管理器构造工厂
*
* @param rootPath
* 服务器根路径
* @param contextPath
* 服务器所在项目路径
* @param uri
* 当前访问的uri
* @return 配置管理器实例或者null
*/
public static ConfigManager getInstance(String rootPath, String contextPath, String uri) {
try {
return new ConfigManager(rootPath, contextPath, uri);
} catch (Exception e) {
return null;
}
}
// 验证配置文件加载是否正确
public boolean valid() {
return this.jsonConfig != null;
}
public JSONObject getAllConfig() {
return this.jsonConfig;
}
public Map<String, Object> getConfig(int type) {
Map<String, Object> conf = new HashMap<String, Object>();
String savePath = null;
switch (type) {
case ActionMap.UPLOAD_FILE:
conf.put("isBase64", "false");
conf.put("maxSize", this.jsonConfig.getLong("fileMaxSize"));
conf.put("allowFiles", this.getArray("fileAllowFiles"));
conf.put("fieldName", this.jsonConfig.getString("fileFieldName"));
savePath = this.jsonConfig.getString("filePathFormat");
break;
case ActionMap.UPLOAD_IMAGE:
conf.put("isBase64", "false");
conf.put("maxSize", this.jsonConfig.getLong("imageMaxSize"));
conf.put("allowFiles", this.getArray("imageAllowFiles"));
conf.put("fieldName", this.jsonConfig.getString("imageFieldName"));
savePath = this.jsonConfig.getString("imagePathFormat");
break;
case ActionMap.UPLOAD_VIDEO:
conf.put("maxSize", this.jsonConfig.getLong("videoMaxSize"));
conf.put("allowFiles", this.getArray("videoAllowFiles"));
conf.put("fieldName", this.jsonConfig.getString("videoFieldName"));
savePath = this.jsonConfig.getString("videoPathFormat");
break;
case ActionMap.UPLOAD_SCRAWL:
conf.put("filename", ConfigManager.SCRAWL_FILE_NAME);
conf.put("maxSize", this.jsonConfig.getLong("scrawlMaxSize"));
conf.put("fieldName", this.jsonConfig.getString("scrawlFieldName"));
conf.put("isBase64", "true");
savePath = this.jsonConfig.getString("scrawlPathFormat");
break;
case ActionMap.CATCH_IMAGE:
conf.put("filename", ConfigManager.REMOTE_FILE_NAME);
conf.put("filter", this.getArray("catcherLocalDomain"));
conf.put("maxSize", this.jsonConfig.getLong("catcherMaxSize"));
conf.put("allowFiles", this.getArray("catcherAllowFiles"));
conf.put("fieldName", this.jsonConfig.getString("catcherFieldName") + "[]");
savePath = this.jsonConfig.getString("catcherPathFormat");
break;
case ActionMap.LIST_IMAGE:
conf.put("allowFiles", this.getArray("imageManagerAllowFiles"));
conf.put("dir", this.jsonConfig.getString("imageManagerListPath"));
conf.put("count", this.jsonConfig.getInt("imageManagerListSize"));
break;
case ActionMap.LIST_FILE:
conf.put("allowFiles", this.getArray("fileManagerAllowFiles"));
conf.put("dir", this.jsonConfig.getString("fileManagerListPath"));
conf.put("count", this.jsonConfig.getInt("fileManagerListSize"));
break;
}
conf.put("savePath", savePath);
// 修改文件保存路径为system中设置的文件存储路径
// conf.put( "rootPath", this.rootPath );
ResourceBundle res = ResourceBundle.getBundle("config/system");
String rootPath = res.getString("file_storage_path"); // 数据库用户名
conf.put("rootPath", rootPath);
return conf;
}
private void initEnv() throws FileNotFoundException, IOException {
File file = new File(this.originalPath);
if (!file.isAbsolute()) {
file = new File(file.getAbsolutePath());
}
this.parentPath = file.getParent();
String configContent = this.readFile(this.getConfigPath());
try {
JSONObject jsonConfig = new JSONObject(configContent);
this.jsonConfig = jsonConfig;
} catch (Exception e) {
this.jsonConfig = null;
}
}
private String getConfigPath() {
return this.parentPath + File.separator + ConfigManager.configFileName;
}
private String[] getArray(String key) {
JSONArray jsonArray = this.jsonConfig.getJSONArray(key);
String[] result = new String[jsonArray.length()];
for (int i = 0, len = jsonArray.length(); i < len; i++) {
result[i] = jsonArray.getString(i);
}
return result;
}
private String readFile(String path) throws IOException {
StringBuilder builder = new StringBuilder();
try {
InputStreamReader reader = new InputStreamReader(new FileInputStream(path), "UTF-8");
BufferedReader bfReader = new BufferedReader(reader);
String tmpContent = null;
while ((tmpContent = bfReader.readLine()) != null) {
builder.append(tmpContent);
}
bfReader.close();
} catch (UnsupportedEncodingException e) {
// 忽略
}
return this.filter(builder.toString());
}
// 过滤输入字符串, 剔除多行注释以及替换掉反斜杠
private String filter(String input) {
return input.replaceAll("/\\*[\\s\\S]*?\\*/", "");
}
}
| [
"[email protected]"
] | |
04b39752f2955e07d943e4be69f6a5d77c1e3c89 | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /newEvaluatedBugs/Jsoup_31_buggy/mutated/2705/HtmlTreeBuilderState.java | b7e7af34791a11b8125d02d060453af5911cc6e9 | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 68,486 | java | package org.jsoup.parser;
import org.jsoup.helper.DescendableLinkedList;
import org.jsoup.helper.StringUtil;
import org.jsoup.nodes.*;
import java.util.Iterator;
import java.util.LinkedList;
/**
* The Tree Builder's current state. Each state embodies the processing for the state, and transitions to other states.
*/
enum HtmlTreeBuilderState {
Initial {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
return true; // ignore whitespace
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
// todo: parse error check on expected doctypes
// todo: quirk state check on doctype ids
Token.Doctype d = t.asDoctype();
DocumentType doctype = new DocumentType(d.getName(), d.getPublicIdentifier(), d.getSystemIdentifier(), tb.getBaseUri());
tb.getDocument().appendChild(doctype);
if (d.isForceQuirks())
tb.getDocument().quirksMode(Document.QuirksMode.quirks);
tb.transition(BeforeHtml);
} else {
// todo: check not iframe srcdoc
tb.transition(BeforeHtml);
return tb.process(t); // re-process token
}
return true;
}
},
BeforeHtml {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (isWhitespace(t)) {
return true; // ignore whitespace
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
tb.insert(t.asStartTag());
tb.transition(BeforeHead);
} else if (t.isEndTag() && (StringUtil.in(t.asEndTag().name(), "head", "body", "html", "br"))) {
return anythingElse(t, tb);
} else if (t.isEndTag()) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.insert("html");
tb.transition(BeforeHead);
return tb.process(t);
}
},
BeforeHead {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
return true;
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return InBody.process(t, tb); // does not transition
} else if (t.isStartTag() && t.asStartTag().name().equals("head")) {
Element head = tb.insert(t.asStartTag());
tb.setHeadElement(head);
tb.transition(InHead);
} else if (t.isEndTag() && (StringUtil.in(t.asEndTag().name(), "head", "body", "html", "br"))) {
tb.process(new Token.StartTag("head"));
return tb.process(t);
} else if (t.isEndTag()) {
tb.error(this);
return false;
} else {
tb.process(new Token.StartTag("head"));
return tb.process(t);
}
return true;
}
},
InHead {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
return true;
}
switch (t.type) {
case Comment:
tb.insert(t.asComment());
break;
case Doctype:
tb.error(this);
return false;
case StartTag:
Token.StartTag start = t.asStartTag();
String name = start.name();
if (name.equals("html")) {
return InBody.process(t, tb);
} else if (StringUtil.in(name, "base", "basefont", "bgsound", "command", "link")) {
Element el = tb.insertEmpty(start);
// jsoup special: update base the frist time it is seen
if (name.equals("base") && el.hasAttr("href"))
tb.maybeSetBaseUri(el);
} else if (name.equals("meta")) {
Element meta = tb.insertEmpty(start);
// todo: charset switches
} else if (name.equals("title")) {
handleRcData(start, tb);
} else if (StringUtil.in(name, "noframes", "style")) {
handleRawtext(start, tb);
} else if (name.equals("noscript")) {
// else if noscript && scripting flag = true: rawtext (jsoup doesn't run script, to handle as noscript)
tb.insert(start);
tb.transition(InHeadNoscript);
} else if (name.equals("script")) {
// skips some script rules as won't execute them
tb.tokeniser.transition(TokeniserState.ScriptData);
tb.markInsertionMode();
tb.transition(Text);
tb.insert(start);
} else if (name.equals("head")) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
break;
case EndTag:
Token.EndTag end = t.asEndTag();
name = end.name();
if (name.equals("head")) {
tb.pop();
tb.transition(AfterHead);
} else if (StringUtil.in(name, "body", "html", "br")) {
return anythingElse(t, tb);
} else {
tb.error(this);
return false;
}
break;
default:
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, TreeBuilder tb) {
tb.process(new Token.EndTag("head"));
return tb.process(t);
}
},
InHeadNoscript {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isDoctype()) {
tb.error(this);
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return tb.process(t, InBody);
} else if (t.isEndTag() && t.asEndTag().name().equals("noscript")) {
tb.pop();
tb.transition(InHead);
} else if (isWhitespace(t) || t.isComment() || (t.isStartTag() && StringUtil.in(t.asStartTag().name(),
"basefont", "bgsound", "link", "meta", "noframes", "style"))) {
return tb.process(t, InHead);
} else if (t.isEndTag() && t.asEndTag().name().equals("br")) {
return anythingElse(t, tb);
} else if ((t.isStartTag() && StringUtil.in(t.asStartTag().name(), "head", "noscript")) || t.isEndTag()) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.error(this);
tb.process(new Token.EndTag("noscript"));
return tb.process(t);
}
},
AfterHead {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
} else if (t.isStartTag()) {
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("html")) {
return tb.process(t, InBody);
} else if (name.equals("body")) {
tb.insert(startTag);
tb.framesetOk(false);
tb.transition(InBody);
} else if (name.equals("frameset")) {
tb.insert(startTag);
tb.transition(InFrameset);
} else if (StringUtil.in(name, "base", "basefont", "bgsound", "link", "meta", "noframes", "script", "style", "title")) {
tb.error(this);
Element head = tb.getHeadElement();
tb.push(head);
tb.process(t, InHead);
tb.removeFromStack(head);
} else if (name.equals("head")) {
tb.error(this);
return false;
} else {
anythingElse(t, tb);
}
} else if (t.isEndTag()) {
if (StringUtil.in(t.asEndTag().name(), "body", "html")) {
anythingElse(t, tb);
} else {
tb.error(this);
return false;
}
} else {
anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.process(new Token.StartTag("body"));
tb.framesetOk(true);
return tb.process(t);
}
},
InBody {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case Character: {
Token.Character c = t.asCharacter();
if (c.getData().equals(nullString)) {
// todo confirm that check
tb.error(this);
return false;
} else if (isWhitespace(c)) {
tb.reconstructFormattingElements();
tb.insert(c);
} else {
tb.reconstructFormattingElements();
tb.insert(c);
tb.framesetOk(false);
}
break;
}
case Comment: {
tb.insert(t.asComment());
break;
}
case Doctype: {
tb.error(this);
return false;
}
case StartTag:
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("html")) {
tb.error(this);
// merge attributes onto real html
Element html = tb.getStack().getFirst();
for (Attribute attribute : startTag.getAttributes()) {
if (!html.hasAttr(attribute.getKey()))
html.attributes().put(attribute);
}
} else if (StringUtil.in(name, "base", "basefont", "bgsound", "command", "link", "meta", "noframes", "script", "style", "title")) {
return tb.process(t, InHead);
} else if (name.equals("body")) {
tb.error(this);
LinkedList<Element> stack = tb.getStack();
if (stack.size() == 1 || (stack.size() > 2 && !stack.get(1).nodeName().equals("body"))) {
// only in fragment case
return false; // ignore
} else {
tb.framesetOk(false);
Element body = stack.get(1);
for (Attribute attribute : startTag.getAttributes()) {
if (!body.hasAttr(attribute.getKey()))
body.attributes().put(attribute);
}
}
} else if (name.equals("frameset")) {
tb.error(this);
LinkedList<Element> stack = tb.getStack();
if (stack.size() == 1 || (stack.size() > 2 && !stack.get(1).nodeName().equals("body"))) {
// only in fragment case
return false; // ignore
} else if (!tb.framesetOk()) {
return false; // ignore frameset
} else {
Element second = stack.get(1);
if (second.parent() != null)
second.remove();
// pop up to html element
while (stack.size() > 1)
stack.removeLast();
tb.insert(startTag);
tb.transition(InFrameset);
}
} else if (StringUtil.in(name,
"address", "article", "aside", "blockquote", "center", "details", "dir", "div", "dl",
"fieldset", "figcaption", "figure", "footer", "header", "hgroup", "menu", "nav", "ol",
"p", "section", "summary", "ul")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
} else if (StringUtil.in(name, "h1", "h2", "h3", "h4", "h5", "h6")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
if (StringUtil.in(tb.currentElement().nodeName(), "h1", "h2", "h3", "h4", "h5", "h6")) {
tb.error(this);
tb.pop();
}
tb.insert(startTag);
} else if (StringUtil.in(name, "pre", "listing")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
// todo: ignore LF if next token
tb.framesetOk(false);
} else if (name.equals("form")) {
if (tb.getFormElement() != null) {
tb.error(this);
return false;
}
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insertForm(startTag, true);
} else if (name.equals("li")) {
tb.framesetOk(false);
LinkedList<Element> stack = tb.getStack();
for (int i = stack.size() - 1; i > 0; i--) {
Element el = stack.get(i);
if (el.nodeName().equals("li")) {
tb.process(new Token.EndTag("li"));
break;
}
if (tb.isSpecial(el) && !StringUtil.in(el.nodeName(), "address", "div", "p"))
break;
}
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
} else if (StringUtil.in(name, "dd", "dt")) {
tb.framesetOk(false);
LinkedList<Element> stack = tb.getStack();
for (int i = stack.size() - 1; i > 0; i--) {
Element el = stack.get(i);
if (StringUtil.in(el.nodeName(), "dd", "dt")) {
tb.process(new Token.EndTag(el.nodeName()));
break;
}
if (tb.isSpecial(el) && !StringUtil.in(el.nodeName(), "address", "div", "p"))
break;
}
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
} else if (name.equals("plaintext")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
tb.tokeniser.transition(TokeniserState.PLAINTEXT); // once in, never gets out
} else if (name.equals("button")) {
if (tb.inButtonScope("button")) {
// close and reprocess
tb.error(this);
tb.process(new Token.EndTag("button"));
tb.process(startTag);
} else {
tb.reconstructFormattingElements();
tb.insert(startTag);
tb.framesetOk(false);
}
} else if (name.equals("a")) {
if (tb.getActiveFormattingElement("a") != null) {
tb.error(this);
tb.process(new Token.EndTag("a"));
// still on stack?
Element remainingA = tb.getFromStack("a");
if (remainingA != null) {
tb.removeFromActiveFormattingElements(remainingA);
tb.removeFromStack(remainingA);
}
}
tb.reconstructFormattingElements();
Element a = tb.insert(startTag);
tb.pushActiveFormattingElements(a);
} else if (StringUtil.in(name,
"b", "big", "code", "em", "font", "i", "s", "small", "strike", "strong", "tt", "u")) {
tb.reconstructFormattingElements();
Element el = tb.insert(startTag);
tb.pushActiveFormattingElements(el);
} else if (name.equals("nobr")) {
tb.reconstructFormattingElements();
if (tb.inScope("nobr")) {
tb.error(this);
tb.process(new Token.EndTag("nobr"));
tb.reconstructFormattingElements();
}
Element el = tb.insert(startTag);
tb.pushActiveFormattingElements(el);
} else if (StringUtil.in(name, "applet", "marquee", "object")) {
tb.reconstructFormattingElements();
tb.insert(startTag);
tb.insertMarkerToFormattingElements();
tb.framesetOk(false);
} else if (name.equals("table")) {
if (tb.getDocument().quirksMode() != Document.QuirksMode.quirks && tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
tb.framesetOk(false);
tb.transition(InTable);
} else if (StringUtil.in(name, "area", "br", "embed", "img", "keygen", "wbr")) {
tb.reconstructFormattingElements();
tb.insertEmpty(startTag);
tb.framesetOk(false);
} else if (name.equals("input")) {
tb.reconstructFormattingElements();
Element el = tb.insertEmpty(startTag);
if (!el.attr("type").equalsIgnoreCase("hidden"))
tb.framesetOk(false);
} else if (StringUtil.in(name, "param", "source", "track")) {
tb.insertEmpty(startTag);
} else if (name.equals("hr")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insertEmpty(startTag);
tb.framesetOk(false);
} else if (name.equals("image")) {
// we're not supposed to ask.
startTag.name("img");
return tb.process(startTag);
} else if (name.equals("isindex")) {
// how much do we care about the early 90s?
tb.error(this);
if (tb.getFormElement() != null)
return false;
tb.tokeniser.acknowledgeSelfClosingFlag();
tb.process(new Token.StartTag("form"));
if (startTag.attributes.hasKey("action")) {
Element form = tb.getFormElement();
form.attr("action", startTag.attributes.get("action"));
}
tb.process(new Token.StartTag("hr"));
tb.process(new Token.StartTag("label"));
// hope you like english.
String prompt = startTag.attributes.hasKey("prompt") ?
startTag.attributes.get("prompt") :
"This is a searchable index. Enter search keywords: ";
tb.process(new Token.Character(prompt));
// input
Attributes inputAttribs = new Attributes();
for (Attribute attr : startTag.attributes) {
if (!StringUtil.in(attr.getKey(), "name", "action", "prompt"))
inputAttribs.put(attr);
}
inputAttribs.put("name", "isindex");
tb.process(new Token.StartTag("input", inputAttribs));
tb.process(new Token.EndTag("label"));
tb.process(new Token.StartTag("hr"));
tb.process(new Token.EndTag("form"));
} else if (name.equals("textarea")) {
tb.insert(startTag);
// todo: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.)
tb.tokeniser.transition(TokeniserState.Rcdata);
tb.markInsertionMode();
tb.framesetOk(false);
tb.transition(Text);
} else if (name.equals("xmp")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.reconstructFormattingElements();
tb.framesetOk(false);
handleRawtext(startTag, tb);
} else if (name.equals("iframe")) {
tb.framesetOk(false);
handleRawtext(startTag, tb);
} else if (name.equals("noembed")) {
// also handle noscript if script enabled
handleRawtext(startTag, tb);
} else if (name.equals("select")) {
tb.reconstructFormattingElements();
tb.insert(startTag);
tb.framesetOk(false);
HtmlTreeBuilderState state = tb.state();
if (state.equals(InTable) || state.equals(InCaption) || state.equals(InTableBody) || state.equals(InRow) || state.equals(InCell))
tb.transition(InSelectInTable);
else
tb.transition(InSelect);
} else if (StringUtil.in("optgroup", "option")) {
if (tb.currentElement().nodeName().equals("option"))
tb.process(new Token.EndTag("option"));
tb.reconstructFormattingElements();
tb.insert(startTag);
} else if (StringUtil.in("rp", "rt")) {
if (tb.inScope("ruby")) {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals("ruby")) {
tb.error(this);
tb.popStackToBefore("ruby"); // i.e. close up to but not include name
}
tb.insert(startTag);
}
} else if (name.equals("math")) {
tb.reconstructFormattingElements();
// todo: handle A start tag whose tag name is "math" (i.e. foreign, mathml)
tb.insert(startTag);
tb.tokeniser.acknowledgeSelfClosingFlag();
} else if (name.equals("svg")) {
tb.reconstructFormattingElements();
// todo: handle A start tag whose tag name is "svg" (xlink, svg)
tb.insert(startTag);
tb.tokeniser.acknowledgeSelfClosingFlag();
} else if (StringUtil.in(name,
"caption", "col", "colgroup", "frame", "head", "tbody", "td", "tfoot", "th", "thead", "tr")) {
tb.error(this);
return false;
} else {
tb.reconstructFormattingElements();
tb.insert(startTag);
}
break;
case EndTag:
Token.EndTag endTag = t.asEndTag();
name = endTag.name();
if (name.equals("body")) {
if (!tb.inScope("body")) {
tb.error(this);
return false;
} else {
// todo: error if stack contains something not dd, dt, li, optgroup, option, p, rp, rt, tbody, td, tfoot, th, thead, tr, body, html
tb.transition(AfterBody);
}
} else if (name.equals("html")) {
boolean notIgnored = tb.process(new Token.EndTag("body"));
if (notIgnored)
return tb.process(endTag);
} else if (StringUtil.in(name,
"address", "article", "aside", "blockquote", "button", "center", "details", "dir", "div",
"dl", "fieldset", "figcaption", "figure", "footer", "header", "hgroup", "listing", "menu",
"nav", "ol", "pre", "section", "summary", "ul")) {
// todo: refactor these lookups
if (!tb.inScope(name)) {
// nothing to close
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (name.equals("form")) {
Element currentForm = tb.getFormElement();
tb.setFormElement(null);
if (currentForm == null || !tb.inScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
// remove currentForm from stack. will shift anything under up.
tb.removeFromStack(currentForm);
}
} else if (name.equals("p")) {
if (!tb.inButtonScope(name)) {
tb.error(this);
tb.process(new Token.StartTag(name)); // if no p to close, creates an empty <p></p>
return tb.process(endTag);
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (name.equals("li")) {
if (!tb.inListItemScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (StringUtil.in(name, "dd", "dt")) {
if (!tb.inScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (StringUtil.in(name, "h1", "h2", "h3", "h4", "h5", "h6")) {
if (!tb.inScope(new String[]{"h1", "h2", "h3", "h4", "h5", "h6"})) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose("h1", "h2", "h3", "h4", "h5", "h6");
}
} else if (name.equals("sarcasm")) {
// *sigh*
return anyOtherEndTag(t, tb);
} else if (StringUtil.in(name,
"a", "b", "big", "code", "em", "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u")) {
// Adoption Agency Algorithm.
OUTER:
for (int i = 0; i < 8; i++) {
Element formatEl = tb.getActiveFormattingElement(name);
if (formatEl == null)
return anyOtherEndTag(t, tb);
else if (!tb.onStack(formatEl)) {
tb.error(this);
tb.removeFromActiveFormattingElements(formatEl);
return true;
} else if (!tb.inScope(formatEl.nodeName())) {
tb.error(this);
return false;
} else if (tb.currentElement() != formatEl)
tb.error(this);
Element furthestBlock = null;
Element commonAncestor = null;
boolean seenFormattingElement = false;
LinkedList<Element> stack = tb.getStack();
// the spec doesn't limit to < 64, but in degenerate cases (9000+ stack depth) this prevents
// run-aways
for (int si = 0; si < stack.size() && si < 64; si++) {
Element el = stack.get(si);
if (el == formatEl) {
commonAncestor = stack.get(si - 1);
seenFormattingElement = true;
} else if (seenFormattingElement && tb.isSpecial(el)) {
furthestBlock = el;
break;
}
}
if (furthestBlock == null) {
tb.popStackToClose(formatEl.nodeName());
tb.removeFromActiveFormattingElements(formatEl);
return true;
}
// todo: Let a bookmark note the position of the formatting element in the list of active formatting elements relative to the elements on either side of it in the list.
// does that mean: int pos of format el in list?
Element node = furthestBlock;
Element lastNode = furthestBlock;
INNER:
for (int j = 0; j < 3; j++) {
if (tb.onStack(node))
node = tb.aboveOnStack(node);
if (!tb.isInActiveFormattingElements(node)) { // note no bookmark check
tb.removeFromStack(node);
continue INNER;
} else if (node == formatEl)
break INNER;
Element replacement = new Element(Tag.valueOf(node.nodeName()), tb.getBaseUri());
tb.replaceActiveFormattingElement(node, replacement);
tb.replaceOnStack(node, replacement);
node = replacement;
if (lastNode == furthestBlock) {
// todo: move the aforementioned bookmark to be immediately after the new node in the list of active formatting elements.
// not getting how this bookmark both straddles the element above, but is inbetween here...
}
if (lastNode.parent() != null)
lastNode.remove();
node.appendChild(lastNode);
lastNode = node;
}
if (StringUtil.in(commonAncestor.nodeName(), "table", "tbody", "tfoot", "thead", "tr")) {
if (lastNode.parent() != null)
lastNode.remove();
tb.insertInFosterParent(lastNode);
} else {
if (lastNode.parent() != null)
lastNode.remove();
commonAncestor.appendChild(lastNode);
}
Element adopter = new Element(Tag.valueOf(name), tb.getBaseUri());
Node[] childNodes = furthestBlock.childNodes().toArray(new Node[furthestBlock.childNodeSize()]);
for (Node childNode : childNodes) {
adopter.appendChild(childNode); // append will reparent. thus the clone to avoid concurrent mod.
}
furthestBlock.appendChild(adopter);
tb.removeFromActiveFormattingElements(formatEl);
// todo: insert the new element into the list of active formatting elements at the position of the aforementioned bookmark.
tb.removeFromStack(formatEl);
tb.insertOnStackAfter(furthestBlock, adopter);
}
} else if (StringUtil.in(name, "applet", "marquee", "object")) {
if (!tb.inScope("name")) {
if (!tb.inScope(name)) {
tb.error(this);
return false;
}
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
tb.clearFormattingElementsToLastMarker();
}
} else if (name.equals("br")) {
tb.error(this);
tb.process(new Token.StartTag("br"));
return false;
} else {
return anyOtherEndTag(t, tb);
}
break;
case EOF:
// todo: error if stack contains something not dd, dt, li, p, tbody, td, tfoot, th, thead, tr, body, html
// stop parsing
break;
}
return true;
}
boolean anyOtherEndTag(Token t, HtmlTreeBuilder tb) {
String name = t.asEndTag().name();
DescendableLinkedList<Element> stack = tb.getStack();
Iterator<Element> it = stack.descendingIterator();
while (it.hasNext()) {
Element node = it.next();
if (node.nodeName().equals(name)) {
tb.generateImpliedEndTags(name);
if (!"tt".equals(tb.currentElement().nodeName()))
tb.error(this);
tb.popStackToClose(name);
break;
} else {
if (tb.isSpecial(node)) {
tb.error(this);
return false;
}
}
}
return true;
}
},
Text {
// in script, style etc. normally treated as data tags
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isCharacter()) {
tb.insert(t.asCharacter());
} else if (t.isEOF()) {
tb.error(this);
// if current node is script: already started
tb.pop();
tb.transition(tb.originalState());
return tb.process(t);
} else if (t.isEndTag()) {
// if: An end tag whose tag name is "script" -- scripting nesting level, if evaluating scripts
tb.pop();
tb.transition(tb.originalState());
}
return true;
}
},
InTable {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isCharacter()) {
tb.newPendingTableCharacters();
tb.markInsertionMode();
tb.transition(InTableText);
return tb.process(t);
} else if (t.isComment()) {
tb.insert(t.asComment());
return true;
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag()) {
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("caption")) {
tb.clearStackToTableContext();
tb.insertMarkerToFormattingElements();
tb.insert(startTag);
tb.transition(InCaption);
} else if (name.equals("colgroup")) {
tb.clearStackToTableContext();
tb.insert(startTag);
tb.transition(InColumnGroup);
} else if (name.equals("col")) {
tb.process(new Token.StartTag("colgroup"));
return tb.process(t);
} else if (StringUtil.in(name, "tbody", "tfoot", "thead")) {
tb.clearStackToTableContext();
tb.insert(startTag);
tb.transition(InTableBody);
} else if (StringUtil.in(name, "td", "th", "tr")) {
tb.process(new Token.StartTag("tbody"));
return tb.process(t);
} else if (name.equals("table")) {
tb.error(this);
boolean processed = tb.process(new Token.EndTag("table"));
if (processed) // only ignored if in fragment
return tb.process(t);
} else if (StringUtil.in(name, "style", "script")) {
return tb.process(t, InHead);
} else if (name.equals("input")) {
if (!startTag.attributes.get("type").equalsIgnoreCase("hidden")) {
return anythingElse(t, tb);
} else {
tb.insertEmpty(startTag);
}
} else if (name.equals("form")) {
tb.error(this);
if (tb.getFormElement() != null)
return false;
else {
tb.insertForm(startTag, false);
}
} else {
return anythingElse(t, tb);
}
return true; // todo: check if should return processed http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#parsing-main-intable
} else if (t.isEndTag()) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (name.equals("table")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
} else {
tb.popStackToClose("table");
}
tb.resetInsertionMode();
} else if (StringUtil.in(name,
"body", "caption", "col", "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr")) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
return true; // todo: as above todo
} else if (t.isEOF()) {
if (tb.currentElement().nodeName().equals("html"))
tb.error(this);
return true; // stops parsing
}
return anythingElse(t, tb);
}
boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.error(this);
boolean processed = true;
if (StringUtil.in(tb.currentElement().nodeName(), "table", "tbody", "tfoot", "thead", "tr")) {
tb.setFosterInserts(true);
processed = tb.process(t, InBody);
tb.setFosterInserts(false);
} else {
processed = tb.process(t, InBody);
}
return processed;
}
},
InTableText {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case Character:
Token.Character c = t.asCharacter();
if (c.getData().equals(nullString)) {
tb.error(this);
return false;
} else {
tb.getPendingTableCharacters().add(c);
}
break;
default:
if (tb.getPendingTableCharacters().size() > 0) {
for (Token.Character character : tb.getPendingTableCharacters()) {
if (!isWhitespace(character)) {
// InTable anything else section:
tb.error(this);
if (StringUtil.in(tb.currentElement().nodeName(), "table", "tbody", "tfoot", "thead", "tr")) {
tb.setFosterInserts(true);
tb.process(character, InBody);
tb.setFosterInserts(false);
} else {
tb.process(character, InBody);
}
} else
tb.insert(character);
}
tb.newPendingTableCharacters();
}
tb.transition(tb.originalState());
return tb.process(t);
}
return true;
}
},
InCaption {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isEndTag() && t.asEndTag().name().equals("caption")) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals("caption"))
tb.error(this);
tb.popStackToClose("caption");
tb.clearFormattingElementsToLastMarker();
tb.transition(InTable);
}
} else if ((
t.isStartTag() && StringUtil.in(t.asStartTag().name(),
"caption", "col", "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr") ||
t.isEndTag() && t.asEndTag().name().equals("table"))
) {
tb.error(this);
boolean processed = tb.process(new Token.EndTag("caption"));
if (processed)
return tb.process(t);
} else if (t.isEndTag() && StringUtil.in(t.asEndTag().name(),
"body", "col", "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr")) {
tb.error(this);
return false;
} else {
return tb.process(t, InBody);
}
return true;
}
},
InColumnGroup {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
return true;
}
switch (t.type) {
case Comment:
tb.insert(t.asComment());
break;
case Doctype:
tb.error(this);
break;
case StartTag:
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("html"))
return tb.process(t, InBody);
else if (name.equals("col"))
tb.insertEmpty(startTag);
else
return anythingElse(t, tb);
break;
case EndTag:
Token.EndTag endTag = t.asEndTag();
name = endTag.name();
if (name.equals("colgroup")) {
if (tb.currentElement().nodeName().equals("html")) { // frag case
tb.error(this);
return false;
} else {
tb.pop();
tb.transition(InTable);
}
} else
return anythingElse(t, tb);
break;
case EOF:
if (tb.currentElement().nodeName().equals("html"))
return true; // stop parsing; frag case
else
return anythingElse(t, tb);
default:
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, TreeBuilder tb) {
boolean processed = tb.process(new Token.EndTag("colgroup"));
if (processed) // only ignored in frag case
return tb.process(t);
return true;
}
},
InTableBody {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case StartTag:
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("tr")) {
tb.clearStackToTableBodyContext();
tb.insert(startTag);
tb.transition(InRow);
} else if (StringUtil.in(name, "th", "td")) {
tb.error(this);
tb.process(new Token.StartTag("tr"));
return tb.process(startTag);
} else if (StringUtil.in(name, "caption", "col", "colgroup", "tbody", "tfoot", "thead")) {
return exitTableBody(t, tb);
} else
return anythingElse(t, tb);
break;
case EndTag:
Token.EndTag endTag = t.asEndTag();
name = endTag.name();
if (StringUtil.in(name, "tbody", "tfoot", "thead")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
} else {
tb.clearStackToTableBodyContext();
tb.pop();
tb.transition(InTable);
}
} else if (name.equals("table")) {
return exitTableBody(t, tb);
} else if (StringUtil.in(name, "body", "caption", "col", "colgroup", "html", "td", "th", "tr")) {
tb.error(this);
return false;
} else
return anythingElse(t, tb);
break;
default:
return anythingElse(t, tb);
}
return true;
}
private boolean exitTableBody(Token t, HtmlTreeBuilder tb) {
if (!(tb.inTableScope("tbody") || tb.inTableScope("thead") || tb.inScope("tfoot"))) {
// frag case
tb.error(this);
return false;
}
tb.clearStackToTableBodyContext();
tb.process(new Token.EndTag(tb.currentElement().nodeName())); // tbody, tfoot, thead
return tb.process(t);
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
return tb.process(t, InTable);
}
},
InRow {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isStartTag()) {
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (StringUtil.in(name, "th", "td")) {
tb.clearStackToTableRowContext();
tb.insert(startTag);
tb.transition(InCell);
tb.insertMarkerToFormattingElements();
} else if (StringUtil.in(name, "caption", "col", "colgroup", "tbody", "tfoot", "thead", "tr")) {
return handleMissingTr(t, tb);
} else {
return anythingElse(t, tb);
}
} else if (t.isEndTag()) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (name.equals("tr")) {
if (!tb.inTableScope(name)) {
tb.error(this); // frag
return false;
}
tb.clearStackToTableRowContext();
tb.pop(); // tr
tb.transition(InTableBody);
} else if (name.equals("table")) {
return handleMissingTr(t, tb);
} else if (StringUtil.in(name, "tbody", "tfoot", "thead")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
}
tb.process(new Token.EndTag("tr"));
return tb.process(t);
} else if (StringUtil.in(name, "body", "caption", "col", "colgroup", "html", "td", "th")) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
return tb.process(t, InTable);
}
private boolean handleMissingTr(Token t, TreeBuilder tb) {
boolean processed = tb.process(new Token.EndTag("tr"));
if (processed)
return tb.process(t);
else
return false;
}
},
InCell {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isEndTag()) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (StringUtil.in(name, "td", "th")) {
if (!tb.inTableScope(name)) {
tb.error(this);
tb.transition(InRow); // might not be in scope if empty: <td /> and processing fake end tag
return false;
}
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
tb.clearFormattingElementsToLastMarker();
tb.transition(InRow);
} else if (StringUtil.in(name, "body", "caption", "col", "colgroup", "html")) {
tb.error(this);
return false;
} else if (StringUtil.in(name, "table", "tbody", "tfoot", "thead", "tr")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
}
closeCell(tb);
return tb.process(t);
} else {
return anythingElse(t, tb);
}
} else if (t.isStartTag() &&
StringUtil.in(t.asStartTag().name(),
"caption", "col", "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr")) {
if (!(tb.inTableScope("td") || tb.inTableScope("th"))) {
tb.error(this);
return false;
}
closeCell(tb);
return tb.process(t);
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
return tb.process(t, InBody);
}
private void closeCell(HtmlTreeBuilder tb) {
if (tb.inTableScope("td"))
tb.process(new Token.EndTag("td"));
else
tb.process(new Token.EndTag("th")); // only here if th or td in scope
}
},
InSelect {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case Character:
Token.Character c = t.asCharacter();
if (c.getData().equals(nullString)) {
tb.error(this);
return false;
} else {
tb.insert(c);
}
break;
case Comment:
tb.insert(t.asComment());
break;
case Doctype:
tb.error(this);
return false;
case StartTag:
Token.StartTag start = t.asStartTag();
String name = start.name();
if (name.equals("html"))
return tb.process(start, InBody);
else if (name.equals("option")) {
tb.process(new Token.EndTag("option"));
tb.insert(start);
} else if (name.equals("optgroup")) {
if (tb.currentElement().nodeName().equals("option"))
tb.process(new Token.EndTag("option"));
else if (tb.currentElement().nodeName().equals("optgroup"))
tb.process(new Token.EndTag("optgroup"));
tb.insert(start);
} else if (name.equals("select")) {
tb.error(this);
return tb.process(new Token.EndTag("select"));
} else if (StringUtil.in(name, "input", "keygen", "textarea")) {
tb.error(this);
if (!tb.inSelectScope("select"))
return false; // frag
tb.process(new Token.EndTag("select"));
return tb.process(start);
} else if (name.equals("script")) {
return tb.process(t, InHead);
} else {
return anythingElse(t, tb);
}
break;
case EndTag:
Token.EndTag end = t.asEndTag();
name = end.name();
if (name.equals("optgroup")) {
if (tb.currentElement().nodeName().equals("option") && tb.aboveOnStack(tb.currentElement()) != null && tb.aboveOnStack(tb.currentElement()).nodeName().equals("optgroup"))
tb.process(new Token.EndTag("option"));
if (tb.currentElement().nodeName().equals("optgroup"))
tb.pop();
else
tb.error(this);
} else if (name.equals("option")) {
if (tb.currentElement().nodeName().equals("option"))
tb.pop();
else
tb.error(this);
} else if (name.equals("select")) {
if (!tb.inSelectScope(name)) {
tb.error(this);
return false;
} else {
tb.popStackToClose(name);
tb.resetInsertionMode();
}
} else
return anythingElse(t, tb);
break;
case EOF:
if (!tb.currentElement().nodeName().equals("html"))
tb.error(this);
break;
default:
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.error(this);
return false;
}
},
InSelectInTable {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isStartTag() && StringUtil.in(t.asStartTag().name(), "caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th")) {
tb.error(this);
tb.process(new Token.EndTag("select"));
return tb.process(t);
} else if (t.isEndTag() && StringUtil.in(t.asEndTag().name(), "caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th")) {
tb.error(this);
if (tb.inTableScope(t.asEndTag().name())) {
tb.process(new Token.EndTag("select"));
return (tb.process(t));
} else
return false;
} else {
return tb.process(t, InSelect);
}
}
},
AfterBody {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
return tb.process(t, InBody);
} else if (t.isComment()) {
tb.insert(t.asComment()); // into html node
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return tb.process(t, InBody);
} else if (t.isEndTag() && t.asEndTag().name().equals("html")) {
if (tb.isFragmentParsing()) {
tb.error(this);
return false;
} else {
tb.transition(AfterAfterBody);
}
} else if (t.isEOF()) {
// chillax! we're done
} else {
tb.error(this);
tb.transition(InBody);
return tb.process(t);
}
return true;
}
},
InFrameset {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag()) {
Token.StartTag start = t.asStartTag();
String name = start.name();
if (name.equals("html")) {
return tb.process(start, InBody);
} else if (name.equals("frameset")) {
tb.insert(start);
} else if (name.equals("frame")) {
tb.insertEmpty(start);
} else if (name.equals("noframes")) {
return tb.process(start, InHead);
} else {
tb.error(this);
return false;
}
} else if (t.isEndTag() && t.asEndTag().name().equals("frameset")) {
if (tb.currentElement().nodeName().equals("html")) { // frag
tb.error(this);
return false;
} else {
tb.pop();
if (!tb.isFragmentParsing() && !tb.currentElement().nodeName().equals("frameset")) {
tb.transition(AfterFrameset);
}
}
} else if (t.isEOF()) {
if (!tb.currentElement().nodeName().equals("html")) {
tb.error(this);
return true;
}
} else {
tb.error(this);
return false;
}
return true;
}
},
AfterFrameset {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return tb.process(t, InBody);
} else if (t.isEndTag() && t.asEndTag().name().equals("html")) {
tb.transition(AfterAfterFrameset);
} else if (t.isStartTag() && t.asStartTag().name().equals("noframes")) {
return tb.process(t, InHead);
} else if (t.isEOF()) {
// cool your heels, we're complete
} else {
tb.error(this);
return false;
}
return true;
}
},
AfterAfterBody {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype() || isWhitespace(t) || (t.isStartTag() && t.asStartTag().name().equals("html"))) {
return tb.process(t, InBody);
} else if (t.isEOF()) {
// nice work chuck
} else {
tb.error(this);
tb.transition(InBody);
return tb.process(t);
}
return true;
}
},
AfterAfterFrameset {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype() || isWhitespace(t) || (t.isStartTag() && t.asStartTag().name().equals("html"))) {
return tb.process(t, InBody);
} else if (t.isEOF()) {
// nice work chuck
} else if (t.isStartTag() && t.asStartTag().name().equals("noframes")) {
return tb.process(t, InHead);
} else {
tb.error(this);
return false;
}
return true;
}
},
ForeignContent {
boolean process(Token t, HtmlTreeBuilder tb) {
return true;
// todo: implement. Also; how do we get here?
}
};
private static String nullString = String.valueOf('\u0000');
abstract boolean process(Token t, HtmlTreeBuilder tb);
private static boolean isWhitespace(Token t) {
if (t.isCharacter()) {
String data = t.asCharacter().getData();
// todo: this checks more than spec - "\t", "\n", "\f", "\r", " "
for (int i = 0; i < data.length(); i++) {
char c = data.charAt(i);
if (!StringUtil.isWhitespace(c))
return false;
}
return true;
}
return false;
}
private static void handleRcData(Token.StartTag startTag, HtmlTreeBuilder tb) {
tb.insert(startTag);
tb.tokeniser.transition(TokeniserState.Rcdata);
tb.markInsertionMode();
tb.transition(Text);
}
private static void handleRawtext(Token.StartTag startTag, HtmlTreeBuilder tb) {
tb.insert(startTag);
tb.tokeniser.transition(TokeniserState.Rawtext);
tb.markInsertionMode();
tb.transition(Text);
}
}
| [
"[email protected]"
] | |
055ea845be372e745288875abc6295e24ec08b0b | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/13/13_28cd1394777ecf4d18bc72a5f9268f5c6f6a4a17/JCanvas/13_28cd1394777ecf4d18bc72a5f9268f5c6f6a4a17_JCanvas_t.java | 6384815e88f0b14be6d544c983c8c278bdfa8848 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 1,959 | java | package com.graphics.java.Model;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import javax.swing.JPanel;
import com.graphics.java.Interfaces.IDrawable;
public class JCanvas extends JPanel{
private static final long serialVersionUID = 1L;
/**
*
*/
private List<IDrawable> drawables = new LinkedList<IDrawable>();
@Override
public void paint(Graphics g) {
g.setColor(Color.white);
g.fillRect(0, 0, this.getWidth(), this.getHeight());
for(Iterator<IDrawable> iter = drawables.iterator(); iter.hasNext();){
IDrawable d = (IDrawable) iter.next();
d.draw(g);
}
}
public void addDrawable(IDrawable d){
drawables.add(d);
repaint();
}
public void removeDrawable(IDrawable d){
drawables.remove(d);
repaint();
}
public void clear(){
drawables.clear();
repaint();
}
public List<IDrawable> findDrawables(Point p){
List<IDrawable> l = new ArrayList<IDrawable>();
for(Iterator<IDrawable> iter = drawables.iterator(); iter.hasNext();){
IDrawable element = (IDrawable) iter.next();
if(element.getRectangle().contains(p)){
l.add(element);
}
}
return l;
}
public boolean isFree(Rectangle rect){
for(Iterator<IDrawable> iter = drawables.iterator(); iter.hasNext();){
IDrawable element = (IDrawable) iter.next();
if(element.getRectangle().intersects(rect)){
return false;
}
}
return true;
}
public boolean isAlone(IDrawable drawable){
Rectangle rect = drawable.getRectangle();
for(Iterator<IDrawable> iter = drawables.iterator(); iter.hasNext();){
IDrawable element = (IDrawable) iter.next();
if(!element.equals(drawable) && element.getRectangle().intersects(rect)){
return false;
}
}
return true;
}
}
| [
"[email protected]"
] | |
fdb7972a3ceef7c52b91a8012a2d50c2721abfbe | a074d33e243289005b06ea6e46b7ac456fbfe8d3 | /java/WEERVICES/soapwebservocedemo/src/com/hcl/demo/Calculator.java | b539c1776969909d3191b895c8afb90752316f02 | [] | no_license | vinodkumarr269/mode2-anubu-sir | 4ffc448933a06bc105825f72a6a3578c321f13e1 | b6a63dc9d4f9233793589c0b53d653340f5b1fcf | refs/heads/master | 2022-12-28T23:38:56.138431 | 2019-10-21T13:12:49 | 2019-10-21T13:12:49 | 216,739,019 | 0 | 0 | null | 2022-12-16T05:24:38 | 2019-10-22T06:27:58 | JavaScript | UTF-8 | Java | false | false | 164 | java | package com.hcl.demo;
public class Calculator {
public int add(int num1,int num2)
{
return num1+num2;
}
public int mul(int num1,int num2){
return num1*num2;
}
}
| [
"[email protected]"
] | |
7056801079679f4ca862013f05bcdb3d74947dde | a061eac0a02e0e323a462b9d44bd7f7b8106d7b7 | /kodilla-stream/src/main/java/com/kodilla/stream/world/World.java | 22e722e9297a8eb686be0a010cc41b62eb00a488 | [] | no_license | RobertWojtaszczyk/robert-wojtaszczyk-kodilla-java | 68ebc0e8aef54ed0bac6d020a7dd4b20e035781f | 2f0aeb7535e8209a22b366867982eb8fcbf18dc1 | refs/heads/master | 2018-10-01T00:22:24.911214 | 2018-06-08T08:43:53 | 2018-06-08T08:43:53 | 119,090,612 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 600 | java | package com.kodilla.stream.world;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
public final class World {
private final Set<Continent> continents = new HashSet<>();
public void addContinent(Continent continent) {
continents.add(continent);
}
public BigDecimal getPeopleQuantity() {
return continents.stream()
.flatMap(continent -> continent.getCountries().stream())
.map(country -> country.getPeopleQuantity())
.reduce(BigDecimal.ZERO, (sum, current) -> sum = sum.add(current));
}
}
| [
"[email protected]"
] | |
ba286923e394b5480ff99034e57c948a54c66b11 | 740a33db1e3dd19b2646c92762a81bdff97b8916 | /app/src/main/java/edu/nyu/scps/jaxon/jul11/JaxonActivity.java | a0e443c61b90aa1b63b6478e0494bc4b8ee0a1f8 | [] | no_license | jaxonian/Jul11_V2 | e564823a9eaeac5cb205118fb84f9bb273980988 | dbe5fa6708767f2b7e56ef7e5c18c096cd04eb2b | refs/heads/master | 2021-01-19T09:02:14.739448 | 2015-07-18T13:35:08 | 2015-07-18T13:35:08 | 39,299,296 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,447 | java | package edu.nyu.scps.jaxon.jul11;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.Toast;
public class JaxonActivity extends AppCompatActivity {
private int[] sample = {
R.drawable.joey_l_0,
R.drawable.abdoulaye_l_1,
R.drawable.asa_l_2,
R.drawable.keenen_l_3,
R.drawable.mark_l_4,
R.drawable.alrick_l_5,
R.drawable.david_l_6,
R.drawable.deepali_l_7,
R.drawable.jaxon_l_8,
R.drawable.jeffrey_l_9
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_jaxon);
GridView gridView = (GridView)findViewById(R.id.gridView);
gridView.setAdapter(new ImageAdapter(this));
gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//Create an ImageView containing a Drawable from the above array.
ImageView imageView = new ImageView(JaxonActivity.this);
imageView.setImageResource(JaxonActivity.this.sample[position % sample.length]);
//Insert the ImageView into a Toast.
Toast toast = new Toast(JaxonActivity.this);
toast.setView(imageView);
toast.show();
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_jaxon, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"[email protected]"
] | |
f9c7b81668358a71eb5351d9376a4d8a70acf670 | f2321f639fd14920aeb43d635126cc7956214f14 | /Ellipse.java | 48e2ed13d4e8638ed438bc1611ef52e91f3a8a3f | [] | no_license | SahabutdinovAR/stc_21_07_repository | 06b02b885978d12754dd72d87a27b01ed72a43b9 | c8b8b5205100db795e5bfed6ed78c23d7b363989 | refs/heads/master | 2023-05-27T03:35:19.471207 | 2021-06-12T20:34:45 | 2021-06-12T20:34:45 | 376,369,623 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 982 | java | package com.company;
import com.company.Figure;
public class Ellipse extends Figure {
private double semiMajorAxis;
private double semiMinorAxis;
public Ellipse(double a, double b) {
super(a, b);
semiMajorAxis = Math.max(a, b) / 2;
semiMinorAxis = Math.min(a, b) / 2;
}
public double getArea() {
return 0;
}
public double getSemiMajorAxis() {
return semiMajorAxis;
}
public void setSemiMajorAxis(double semiMajorAxis) {
this.semiMajorAxis = semiMajorAxis;
}
public double getSemiMinorAxis() {
return semiMinorAxis;
}
public void setSemiMinorAxis(double semiMinorAxis) {
this.semiMinorAxis = semiMinorAxis;
}
public String getName() {
return "Ellipse";
}
public double getSquare() {
return Math.PI * semiMajorAxis * semiMinorAxis;
}
public double getAxisSum() {
return semiMajorAxis + semiMinorAxis;
}
}
| [
"Qwerty12!!"
] | Qwerty12!! |
ba1e00ebd415ef1dcd5d305def3114b9fc0ac0e0 | 2a9e5ec3d7aad14dbf7f15a1509841866c1a87eb | /033SearchinRotatedSortedArray.java | 8e63cea447bfad698fdd6eb102174b041193551b | [] | no_license | ZoroSpace/LeetCode | e3fb98687dd3bff886d1923d353c4f545aacf148 | 071dd2432c807bb12575f8f9dc51e72306c1b70b | refs/heads/master | 2021-10-23T13:00:11.872364 | 2019-03-17T13:57:35 | 2019-03-17T13:57:35 | 107,949,805 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 823 | java | class Solution {
public int search(int[] nums, int target) {
if(nums.length == 0) return -1;
int lo = 0, hi = nums.length-1;
int mid;
while(lo < hi-1) {
mid = (lo+hi)/2;
if(nums[0] > nums[mid]) hi = mid;
if(nums[mid] > nums[0]) lo = mid;
}
int highest = (nums[lo] > nums[hi])?lo:hi;
if(nums[0] <= target) {
lo = 0;
hi = highest;
} else {
lo = (highest+1) % nums.length;
hi = nums.length-1;
}
while(lo < hi) {
mid = (lo+hi)/2;
if(nums[mid] < target) lo = mid+1;
else if(nums[mid] > target) hi = mid;
else return mid;
}
if(nums[lo]==target) return lo;
else return -1;
}
}
| [
"[email protected]"
] | |
0049d8398d61b63b0032717233d0d9d2b684af12 | 1bcbb45ac8aa03f43a4c137a3ea9cf666f858426 | /javacommon/src/main/java/com/codefactory/utils/Util_Dat.java | 7e064594931e625ace69e24f49c85317a92cc0c9 | [] | no_license | srxffcc1/Codefactory | 592865f34632d61e73c3789ed9c293c526099802 | 8f605766224513ad78e93dc240f1f0be7edea5d3 | refs/heads/master | 2022-11-01T07:17:25.246189 | 2022-10-17T09:12:08 | 2022-10-17T09:12:08 | 169,352,794 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,044 | java | package com.codefactory.utils;
import com.codefactory.abstracts.ParseBase;
import utils.Util_String;
import java.util.List;
import java.util.Random;
public class Util_Dat {
/**
* 封装一个设置guid的方法
* @param orgparent
* @return
*/
public static ParseBase setRandomuid(ParseBase orgparent){
orgparent.addProperty("\t<STRING>UNIT_GUID", Util_String.getRandomGuid());
return orgparent;
}
/**
* 封装一个设置guid的方法
* @param orgparent
* @return
*/
public static ParseBase moveEffectHold(ParseBase orgparent,int holdint){
List<ParseBase> listeffect=orgparent.getNodeInThisLevel("EFFECT");
if(listeffect.size()>holdint){
for (int i = 2; i < listeffect.size(); i++) {
String hashcode=listeffect.get(i).getHashCode();
orgparent.removeNode("EFFECT", hashcode);
}
}
return orgparent;
}
/**
* 名字批量生成
* @param orgparent
* @param nameorg
* @param index
* @return
*/
public static ParseBase setNameArray(ParseBase orgparent,String nameorg,int index){
index=index+1;
orgparent.addProperty("\t<STRING>NAME", nameorg+"_"+index);
return orgparent;
}
/**
* 设置等级 掉落区间
* @param orgparent
* @param index
* @return
*/
public static ParseBase setLevel(ParseBase orgparent,int index){
index=index+1;
Random random = new Random();
int indexfinal=index*10;
int indexfinal1=index*10-5;
int indexfinal2=index*10+10+1;
orgparent.addProperty("\t<INTEGER>LEVEL", ""+(indexfinal+(-random.nextInt(6)+3)));
orgparent.addProperty("\t<INTEGER>MINLEVEL", ""+(indexfinal1+(-random.nextInt(6)+3)));
orgparent.addProperty("\t<INTEGER>MAXLEVEL", ""+(indexfinal2+(-random.nextInt(6)+3)));
return orgparent;
}
/**
* 随机4+1种基础属性
* @param orgparent
* @param index
* @return
*/
public static ParseBase setRandomEffectBase(ParseBase orgparent){
Random random=new Random();
orgparent.addProperty("\t<INTEGER>DAMAGE_PHYSICAL", ""+(random.nextInt(23)));
orgparent.addProperty("\t<INTEGER>DAMAGE_ELECTRIC", ""+(random.nextInt(30)));
orgparent.addProperty("\t<INTEGER>DAMAGE_POISON", ""+(random.nextInt(30)));
orgparent.addProperty("\t<INTEGER>DAMAGE_ICE", ""+(random.nextInt(30)));
orgparent.addProperty("\t<INTEGER>DAMAGE_FIRE", ""+(random.nextInt(30)));
return orgparent;
}
/**
* 随机属性需求
* @param orgparent
* @param index
* @return
*/
public static ParseBase setRandomRequire(ParseBase orgparent){
Random random=new Random();
orgparent.addProperty("\t<INTEGER>STRENGTH_REQUIRED", ""+(random.nextInt(50)+1));
orgparent.addProperty("\t<INTEGER>MAGIC_REQUIRED", ""+(random.nextInt(50)+1));
orgparent.addProperty("\t<INTEGER>DEFENSE_REQUIRED", ""+(random.nextInt(50)+1));
orgparent.addProperty("\t<INTEGER>DEXTERITY_REQUIRED", ""+(random.nextInt(50)+1));
return orgparent;
}
/**
* 随机稀有度
* @param orgparent
* @param index
* @return
*/
public static ParseBase setRandomRarity(ParseBase orgparent){
Random random=new Random();
orgparent.addProperty("\t<INTEGER>RARITY", ""+(random.nextInt(100)+10));
return orgparent;
}
}
| [
"[email protected]"
] | |
da78befbf1b545daa18d1bb38603a5043b30ee32 | dcd6ed36476f3f862490f87d8d9dfef1303b7843 | /src/main/java/com/example/springmvcboot/SpringMvcBootApplication.java | e741c15fe3cb4c407b36367e34a15e06f1402725 | [] | no_license | 6opuc-dev/crud-mvc-springboot3.1.1 | cd3f20a5c06a9268354c1ad9a2c389d96f1e40c3 | 42f18a5e5c19c5cb113e0f34ffd1de4fa2e313ca | refs/heads/main | 2023-04-20T12:35:32.996503 | 2021-05-09T07:33:50 | 2021-05-09T07:33:50 | 365,694,076 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 573 | java | package com.example.springmvcboot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.filter.HiddenHttpMethodFilter;
@SpringBootApplication
public class SpringMvcBootApplication {
public static void main(String[] args) {
SpringApplication.run(SpringMvcBootApplication.class, args);
}
@Bean
HiddenHttpMethodFilter hiddenHttpMethodFilter() {
return new HiddenHttpMethodFilter();
}
}
| [
"[email protected]"
] | |
916b6940f0961e071c83396575a9a6c78253158c | 600b22adaa1c95c7e3c4ffc26d01cfe589f8ce8d | /src/main/java/com/adalbertosn/domain/exception/EntidadeNaoEncontradaException.java | b085bf70436efb45ddd61033926c290d8b4260d8 | [] | no_license | silveiraSoft/gazin-api-v2 | f54b86ca62e9ffb96a194a95bfa3946d53957969 | cfabad09aec35c525ac22e22b11cdb765d19eaae | refs/heads/main | 2023-04-14T13:22:39.987758 | 2021-04-21T02:50:03 | 2021-04-21T02:50:03 | 359,749,271 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 246 | java | package com.adalbertosn.domain.exception;
public class EntidadeNaoEncontradaException extends RuntimeException{
private static final long serialVersionUID = 1L;
public EntidadeNaoEncontradaException(String mensagem) {
super(mensagem);
}
}
| [
"[email protected]"
] | |
c45c8caa8c92741f1939db959c953ebf9b4d6ceb | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13546-1-11-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/model/reference/EntityReference_ESTest_scaffolding.java | aff6880683feac1c2089b2418ae211059c3e3c80 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,334 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 15:32:26 UTC 2020
*/
package org.xwiki.model.reference;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class EntityReference_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.xwiki.model.reference.EntityReference";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(EntityReference_ESTest_scaffolding.class.getClassLoader() ,
"org.xwiki.model.internal.reference.LocalizedStringEntityReferenceSerializer",
"org.xwiki.model.internal.reference.DefaultStringEntityReferenceSerializer",
"org.xwiki.model.internal.reference.AbstractStringEntityReferenceSerializer",
"org.xwiki.model.reference.EntityReference",
"org.xwiki.model.EntityType",
"org.xwiki.model.reference.EntityReferenceSerializer",
"org.apache.commons.lang3.StringUtils"
);
}
}
| [
"[email protected]"
] | |
5333c368b1ff346b595b91b8327fb9275ab16516 | 939c9882f06ba3d3a1938571d8fd14403d873031 | /Question19-Collection/src/PTra19_02.java | 3d867771e47348fa93fc20c2effdf90238a7d622 | [] | no_license | Mori-Chan/Java-Study- | 710144e621141577509fcf7d7f0037d9b50863ec | 536e51161dfb0d80455abf30348104ce06c5214e | refs/heads/master | 2022-11-08T19:50:21.640766 | 2020-06-26T21:13:34 | 2020-06-26T21:13:34 | 275,248,356 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,899 | java | import java.util.ArrayList;
import common.Player;
/*
* PTra19_02.java
* 作成 Rhizome
*------------------------------------------------------------
* Copyright(c) Rhizome Inc. All Rights Reserved.
*/
public class PTra19_02 {
public static void main(String[] args) {
// TODO Player型を格納するArraylistを変数名 playserList で作成してください。
ArrayList<Player> playserList = new ArrayList<Player>();
/*
* TODO 以下の情報を持つインスンタンスを3つ作成してください
*
* -------1人目---------
* ポジション:MF
* 名前 :佐川真司
* 国 :日本
* 所属チーム:ドルトムント
*
* -------2人目---------
* ポジション:DF
* 名前 :永元佑都
* 国 :日本
* 所属チーム:インテル
*
* -------3人目---------
* ポジション:MF
* 名前 :本田健佑
* 国 :日本
* 所属チーム:ACミラン
*/
Player player1 = new Player("MF", "佐川真司", "日本", "ドルトムント");
Player player2 = new Player("DF", "永元佑都", "日本", "インテル");
Player player3 = new Player("MF", "本田健佑", "日本", "ACミラン");
// TODO 作成したインスタンスを全てplayserListに追加してください
playserList.add(player1);
playserList.add(player2);
playserList.add(player3);
/*
* TODO playserListの情報を全て出力してください。(拡張for文を使用する事)
*
* ※ 以下のように標示されれば正解
* MF,佐川真司,日本,ドルトムント
* DF,永元佑都,日本,インテル
* MF,本田健佑,日本,ACミラン
*/
for(Player player : playserList) {
System.out.println(player);
}
}
} | [
"[email protected]"
] | |
d121d2496f344c631b5bd12a3ef7b02b2effdb17 | 238104e454d4a95e3d4382ec8963435fa807398e | /src/main/java/com/paotui/entity/userCoupon.java | b86b498c4023ab52595ea7e5affca230575c5161 | [] | no_license | xiaokecxy/xiaoke | 9513f741bce5fc615b640dd6a41c9dc2aab6a3b4 | 26af2bc8a7fe964d1d7c8217f46a7a2ec8361ee1 | refs/heads/master | 2020-04-15T16:17:28.032700 | 2019-01-13T10:59:27 | 2019-01-13T10:59:27 | 164,082,081 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 503 | java | package com.paotui.entity;
public class userCoupon {
private Integer id;
private Integer uid;
private Integer cid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUid() {
return uid;
}
public void setUid(Integer uid) {
this.uid = uid;
}
public Integer getCid() {
return cid;
}
public void setCid(Integer cid) {
this.cid = cid;
}
} | [
"[email protected]"
] | |
9ef2f5486f39f9afff5c3b27dc6ced2dc6968b4c | 0e3436f9bda9d4c6eb6019027cc0fd90665d1692 | /com.lanxiang.alijson/src/main/java/com/lanxiang/alijson/SpeedTest.java | dfbe6623555d76d06614b32f276d7399778c115c | [] | no_license | w64852908/spring-mybatis | a25876075a44b6592dbf9c91fde5b62c0432e2fe | 52edc6de8f900ffe1d1cc1a77ab1a663a7c26b82 | refs/heads/master | 2021-01-23T03:04:56.199567 | 2018-12-20T03:39:08 | 2018-12-20T03:39:08 | 86,044,282 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,707 | java | package com.lanxiang.alijson;
import org.junit.Test;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
/**
* Created by lanxiang on 2017/8/4.
*/
public class SpeedTest {
private static final String orderJson = "{\"beginTime\":1501833463540,\"channelId\":1,\"cinemaId\":980,\"createDate\":0,\"createTime\":0,\"endTime\":1501833463596,\"ip\":168048330,\"mobile\":\"18630829418\",\"movieId\":344264,\"orderId\":1416299121,\"outCinemaId\":\"12130901\",\"outMovieId\":\"001204512017\",\"outOrderId\":\"20170804155703893380244398952448\",\"outShowId\":\"25458\",\"request\":\"POST http://tspapi.dadicinema.com:8000/trade/confirmorder?callbackUrl=callbackUrl&seatDetail=%5B%7B%22priceId%22%3A%222774%22%2C%22seatCode%22%3A%2212130901%2305%2305%22%2C%22serviceFee%22%3A200%2C%22ticketMoney%22%3A3400%7D%2C%7B%22priceId%22%3A%222774%22%2C%22seatCode%22%3A%2212130901%2305%2304%22%2C%22serviceFee%22%3A200%2C%22ticketMoney%22%3A3400%7D%5D&orderId=20170804155703893380244398952448 HTTP/1.1\",\"response\":\"{\\\"data\\\":\\\"OK\\\"}\",\"serverFlag\":0,\"showDate\":20170804,\"showId\":102668,\"source\":40,\"type\":\"FIX_ORDER\",\"userId\":0}";
private static final int transTime = 5000000;
@Test
public void run() {
// transToJSONObject();
// transToObject();
long a = 10000000L;
trans(a);
}
private void transToJSONObject() {
long start = System.currentTimeMillis();
for (int i = 0; i < transTime; i++) {
JSONObject jsonObject = JSON.parseObject(orderJson);
}
long end = System.currentTimeMillis();
System.out.println("transToJSONObject : " + (end - start));
}
private void transToObject() {
long start = System.currentTimeMillis();
for (int i = 0; i < transTime; i++) {
Order order = JSON.parseObject(orderJson, Order.class);
}
long end = System.currentTimeMillis();
System.out.println("transToObject : " + (end - start));
}
private void trans(double a) {
System.out.println(a);
System.out.println((long) a);
}
static class Order {
public int source; // required
public int serverFlag; // required
public int userId; // required
public String mobile; // required
public int cinemaId; // required
public int movieId; // required
public int showDate; // required
public int showId; // required
public int orderId; // required
public String outCinemaId; // required
public String outMovieId; // required
public String outShowId; // required
public String outOrderId; // required
public String request; // required
public String response; // required
public long createDate; // required
public long createTime; // required
public int ip; // required
public long beginTime; // required
public long endTime; // required
public int channelId; // required
public long getBeginTime() {
return beginTime;
}
public void setBeginTime(long beginTime) {
this.beginTime = beginTime;
}
public int getChannelId() {
return channelId;
}
public void setChannelId(int channelId) {
this.channelId = channelId;
}
public int getCinemaId() {
return cinemaId;
}
public void setCinemaId(int cinemaId) {
this.cinemaId = cinemaId;
}
public long getCreateDate() {
return createDate;
}
public void setCreateDate(long createDate) {
this.createDate = createDate;
}
public long getCreateTime() {
return createTime;
}
public void setCreateTime(long createTime) {
this.createTime = createTime;
}
public long getEndTime() {
return endTime;
}
public void setEndTime(long endTime) {
this.endTime = endTime;
}
public int getIp() {
return ip;
}
public void setIp(int ip) {
this.ip = ip;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public int getMovieId() {
return movieId;
}
public void setMovieId(int movieId) {
this.movieId = movieId;
}
public int getOrderId() {
return orderId;
}
public void setOrderId(int orderId) {
this.orderId = orderId;
}
public String getOutCinemaId() {
return outCinemaId;
}
public void setOutCinemaId(String outCinemaId) {
this.outCinemaId = outCinemaId;
}
public String getOutMovieId() {
return outMovieId;
}
public void setOutMovieId(String outMovieId) {
this.outMovieId = outMovieId;
}
public String getOutOrderId() {
return outOrderId;
}
public void setOutOrderId(String outOrderId) {
this.outOrderId = outOrderId;
}
public String getOutShowId() {
return outShowId;
}
public void setOutShowId(String outShowId) {
this.outShowId = outShowId;
}
public String getRequest() {
return request;
}
public void setRequest(String request) {
this.request = request;
}
public String getResponse() {
return response;
}
public void setResponse(String response) {
this.response = response;
}
public int getServerFlag() {
return serverFlag;
}
public void setServerFlag(int serverFlag) {
this.serverFlag = serverFlag;
}
public int getShowDate() {
return showDate;
}
public void setShowDate(int showDate) {
this.showDate = showDate;
}
public int getShowId() {
return showId;
}
public void setShowId(int showId) {
this.showId = showId;
}
public int getSource() {
return source;
}
public void setSource(int source) {
this.source = source;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
}
}
| [
"[email protected]"
] | |
eb75390872b6001734561c91c27f04e001783984 | c6dd4da97647320c3bf8a9b4fc97ecaa76be7f14 | /src/blokus/game/Algorithm.java | 9e0032983fe271379de04590480d9537a972b2e2 | [] | no_license | dard12/Blokus | 2c0112ccfd7f8bc458bf1ccaf0fd16a69ad60407 | aeaa04cae1be57b08b88db29951d5efc43ae5771 | refs/heads/master | 2021-01-25T04:02:41.154639 | 2014-02-13T06:32:56 | 2014-02-13T06:32:56 | 16,794,297 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,291 | java | package blokus.game;
/**
* Algorithm class from which all decision making algorithms inherit.
* Holds all generic functions that are necessary for
* decision making.
* @author Hsing
*
*/
public abstract class Algorithm {
/**
* Make a move in the current state of the
* game.
* @param currState current game state
* @return
*/
abstract public boolean move(Board currState, int player);
/**
* Evaluation function for the current state of the game.
* @param currState current game state
* @param playerId of the player calling evaluate
* @return the value of the state
*/
public int evaluate(Board currState, int playerId) {
int height = currState.getHeight();
int width = currState.getWidth();
int[] colorCount = new int[4];
for (int x = 0; x < width; x++)
{
for (int y = 0; y < height; y++)
{
int color = currState.getColor(x, y);
if (color == Board.EMPTY)
continue;
colorCount[color]++;
}
}
// Estimate by summing my squares as positive and others'
// squares as negative.
int stateEstimate = 0;
for (int i = 0; i < 4; i++)
{
int currCount = colorCount[i];
if (i == playerId)
stateEstimate += currCount;
else
stateEstimate -= currCount;
}
return stateEstimate;
}
}
| [
"[email protected]"
] | |
bf96bcc376e7f5d9023e1af92628e879174ef2e0 | da6fc3b4534ae940d7565099d642c027893ed786 | /backend/src/main/java/com/example/library/model/form/EditBookForm.java | 286828814f10768ad07ed13a8eb61bbb7749200a | [] | no_license | otkrivashkin/library | 5a04173af6e1e00d164ec35b809edee095933592 | 2ef5492b5b734dd672e0cd9681ac6c5ba3bd1eba | refs/heads/master | 2021-05-09T18:08:59.835002 | 2018-01-31T11:41:19 | 2018-01-31T11:41:19 | 118,776,985 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 591 | java | package com.example.library.model.form;
import com.example.library.model.Book;
import com.example.library.model.view.ExistingEntityView;
import lombok.Getter;
import lombok.Setter;
import java.util.Date;
@Getter
@Setter
public class EditBookForm implements ExistingEntityView<Book> {
private Long id;
private String title;
private String genre;
private Date publicationDate;
@Override
public void update(Book book) {
book.setId(id);
book.setTitle(title);
book.setGenre(genre);
book.setPublicationDate(publicationDate);
}
}
| [
"[email protected]"
] | |
780166115faea5c15b19c71b5a2ea5dbb5ae9fd0 | 12899e0391276db4bf43254406689bd529bb0714 | /samplecodes/src/main/java/com/bhavik/competitive/hacker_rank/tutorials/crackingTheCodingInterview/TimeComplexityPrimality/Solution.java | 59eb370d94382aeb1935233f9ddabebc51d4e74a | [] | no_license | bhavikambani/samplecodes | 0146ee317ae20617e0aa69aee821f28307d0be9c | 981efa8e4ccb740c7efda869b7cbd401be2cb1bc | refs/heads/master | 2020-05-21T21:00:31.684357 | 2017-07-04T11:26:19 | 2017-07-04T11:26:19 | 62,214,042 | 5 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,995 | java | package com.bhavik.competitive.hacker_rank.tutorials.crackingTheCodingInterview.TimeComplexityPrimality;
import java.math.BigInteger;
import java.util.Random;
import java.util.Scanner;
/**
* The Class Solution implementation to find whether number provided is prime or
* not.
*
* Ref# https://www.hackerrank.com/challenges/ctci-big-o
*
* @author Bhavik Aniruddh Ambani
*/
public class Solution {
/**
* The main method.
*
* @param args
* the arguments
*/
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int p = in.nextInt();
BigInteger bi = null;
for (int a0 = 0; a0 < p; a0++) {
int n = in.nextInt();
bi = new BigInteger(String.valueOf(n));
System.out.println(bi.isProbablePrime(1) ? "Prime" : "Not Prime");
}
in.close();
}
}
/** Class MillerRabin **/
class MillerRabin {
/** Function to check if prime or not **/
public boolean isPrime(long n, int iteration) {
/** base case **/
if (n == 0 || n == 1)
return false;
/** base case - 2 is prime **/
if (n == 2)
return true;
/** an even number other than 2 is composite **/
if (n % 2 == 0)
return false;
long s = n - 1;
while (s % 2 == 0)
s /= 2;
Random rand = new Random();
for (int i = 0; i < iteration; i++) {
long r = Math.abs(rand.nextLong());
long a = r % (n - 1) + 1, temp = s;
long mod = modPow(a, temp, n);
while (temp != n - 1 && mod != 1 && mod != n - 1) {
mod = mulMod(mod, mod, n);
temp *= 2;
}
if (mod != n - 1 && temp % 2 == 0)
return false;
}
return true;
}
/** Function to calculate (a ^ b) % c **/
public long modPow(long a, long b, long c) {
long res = 1;
for (int i = 0; i < b; i++) {
res *= a;
res %= c;
}
return res % c;
}
/** Function to calculate (a * b) % c **/
public long mulMod(long a, long b, long mod) {
return BigInteger.valueOf(a).multiply(BigInteger.valueOf(b)).mod(BigInteger.valueOf(mod)).longValue();
}
/** Main function **/
} | [
"Bhavik Aniruddh [email protected]"
] | Bhavik Aniruddh [email protected] |
7cd7f105611e72da03ddeb1c149a7a4d303e37c8 | 178cd2e98bd93c53c57a03dcdd02b371c9a623fe | /android/jixianxueyuan/app/src/main/java/com/jixianxueyuan/activity/CreateNewsActivity.java | f8c969b2c1a41676cee4aff893bb2fccec8af40f | [] | no_license | pengchao1989/ExtremeWorld | fa94066ecc0cc1116110d6322835a2c965457895 | 34d34542fdf0cebb306a29a55ec81913de62352a | refs/heads/master | 2021-06-03T18:54:16.380282 | 2017-05-05T08:54:21 | 2017-05-05T08:54:21 | 26,759,942 | 6 | 3 | null | null | null | null | UTF-8 | Java | false | false | 4,729 | java | package com.jixianxueyuan.activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.jixianxueyuan.R;
import com.jixianxueyuan.app.MyApplication;
import com.jixianxueyuan.config.HobbyType;
import com.jixianxueyuan.config.TopicType;
import com.jixianxueyuan.dto.HobbyDTO;
import com.jixianxueyuan.dto.MyResponse;
import com.jixianxueyuan.dto.TaxonomyDTO;
import com.jixianxueyuan.dto.TopicDTO;
import com.jixianxueyuan.dto.UserMinDTO;
import com.jixianxueyuan.dto.request.WeiXinWebPage;
import com.jixianxueyuan.http.MyRequest;
import com.jixianxueyuan.http.MyVolleyErrorHelper;
import com.jixianxueyuan.server.ServerMethod;
import com.jixianxueyuan.widget.MyActionBar;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import dmax.dialog.SpotsDialog;
/**
* Created by pengchao on 3/24/16.
*/
public class CreateNewsActivity extends BaseActivity {
@BindView(R.id.create_news_actionbar)
MyActionBar myActionBar;
@BindView(R.id.create_news_url)
EditText urlEditText;
@BindView(R.id.submit_btn)
Button mSubmitButton;
private AlertDialog progressDialog;
private WeiXinWebPage mWeiXinWebPage;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.create_news_activity);
ButterKnife.bind(this);
urlEditText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (s.length() > 0){
mSubmitButton.setEnabled(true);
}else {
mSubmitButton.setEnabled(false);
}
}
@Override
public void afterTextChanged(Editable s) {
}
});
}
@OnClick(R.id.submit_btn)void onSubmitClick(){
if (checkParams()){
submitContent();
}
}
private boolean checkParams(){
if(TextUtils.isEmpty(urlEditText.getText().toString())){
Toast.makeText(this, R.string.url_is_empty, Toast.LENGTH_LONG).show();
return false;
}
return true;
}
private void buildTopicParam(){
mWeiXinWebPage = new WeiXinWebPage();
mWeiXinWebPage.setUrl(urlEditText.getText().toString());
}
private void submitContent() {
showProgress();
String url = ServerMethod.topic_submit_weixin_page();
buildTopicParam();
MyRequest<TopicDTO> myRequest = new MyRequest(Request.Method.POST,url,TopicDTO.class, mWeiXinWebPage,
new Response.Listener<MyResponse<TopicDTO>>() {
@Override
public void onResponse(MyResponse<TopicDTO> response) {
if(response.getStatus() == MyResponse.status_ok) {
hideProgress();
Toast.makeText(CreateNewsActivity.this, R.string.add_topic_success, Toast.LENGTH_LONG).show();
finish();
}
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
MyVolleyErrorHelper.showError(CreateNewsActivity.this, error);
hideProgress();
}
});
MyApplication.getContext().getRequestQueue().add(myRequest);
}
private void showProgress(){
if (progressDialog == null){
progressDialog = new SpotsDialog(this,R.style.ProgressDialogWait);
}
progressDialog.show();
}
private void hideProgress(){
if (progressDialog != null){
progressDialog.dismiss();
}
}
public static void startActivity(Context context, long taxonomyId){
Intent intent = new Intent(context, CreateNewsActivity.class);
intent.putExtra(TopicType.TOPIC_TAXONOMY_ID, taxonomyId);
context.startActivity(intent);
}
}
| [
"[email protected]"
] | |
e63347c1481b8a10bb324f9dea23f8757999aa6b | bc569d15bcd6959d9689769b1fdebbf5dd205222 | /ITE1802/Karakter1/app/src/main/java/com/shadyshrimp/karakter1/Program/ProgramAdapter.java | 7d681e951269c254252ed8d65ea679ee76134dc3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | Unicron2k/dte_bsc | 85b6dfc355c6c6d4245168e438091b6d0c86da6e | 1703c6e57e9ceec2dcce3ec6b1b363bf7147536d | refs/heads/master | 2023-05-28T13:00:45.536037 | 2021-06-08T09:00:40 | 2021-06-08T09:00:40 | 368,521,341 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,184 | java | package com.shadyshrimp.karakter1.Program;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.shadyshrimp.karakter1.R;
import java.util.ArrayList;
public class ProgramAdapter extends ArrayAdapter<Program> {
public ProgramAdapter(@NonNull Context context, ArrayList<Program> userList) {
super(context, 0, userList);
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
Program program = getItem(position);
if(convertView==null){
convertView = LayoutInflater.from(getContext()).inflate(R.layout.listview_item_single_textview, parent, false);
}
TextView tvExerciseName = convertView.findViewById(R.id.item_name);
assert program != null;
tvExerciseName.setText(program.getName()+"");
tvExerciseName.setBackgroundColor(Color.LTGRAY);
return convertView;
}
} | [
"[email protected]"
] | |
78b92aec419762f0b888b3aa3f90a9598ea82b22 | 1e5c3d34d4d03d9cc12ed104de165291db10aa32 | /test/src/main/java/object_Pages/Cardreports.java | 47b5f8e4315ba8fb3c4faff35b5a83379ae28d74 | [] | no_license | dharmtomar/testp | 898a7a7d629956e41a88f33ec67076b2fc1da731 | 6d90d3cc9e94fa5a1026882f15329bbd3783b017 | refs/heads/master | 2021-06-16T14:12:01.138781 | 2019-06-28T09:46:39 | 2019-06-28T09:46:39 | 194,249,400 | 0 | 0 | null | 2021-04-26T19:17:36 | 2019-06-28T09:47:23 | HTML | UTF-8 | Java | false | false | 629 | java | package object_Pages;
import java.io.IOException;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import utils.Common_Methods;
public class Cardreports extends Common_Methods{
public WebDriver odriver;
public Cardreports(WebDriver odriver) {
this.odriver=odriver;
}
public void downloadcardreports() throws IOException {
custom_Click(odriver, By.xpath(getlocvalue("cardtxnlink")), 15);
custom_Click(odriver, By.xpath(getlocvalue("mdrreport")), 15);
custom_Click(odriver, By.xpath(getlocvalue("cardfromdatefilter")), 15);
custom_Click(odriver, By.xpath(getlocvalue("cfromdate")), 15);
}
}
| [
"[email protected]"
] | |
e1a86ef291691712748e9e6f718c4e985b69d5b8 | 57e57f2634944d0595258a14af5e20b6df59185d | /bitcamp-java-application4-server/v58_3/src/main/java/com/eomcs/lms/controller/MemberAddController.java | 45adcbe2726189b312dc55078019219684e8bf83 | [] | no_license | Soo77/bitcamp-java-20190527 | f169431aafde5bf97c69484694560af14c246b97 | 655fc4fb5aedcac805da715def70bab1ed616d96 | refs/heads/master | 2020-06-13T20:16:02.844148 | 2019-10-02T11:29:06 | 2019-10-02T11:29:06 | 194,775,332 | 1 | 0 | null | 2020-04-30T11:49:50 | 2019-07-02T02:41:01 | Java | UTF-8 | Java | false | false | 1,461 | java | package com.eomcs.lms.controller;
import java.util.UUID;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import com.eomcs.lms.dao.MemberDao;
import com.eomcs.lms.domain.Member;
@Component("/member/add")
public class MemberAddController {
@Resource
private MemberDao memberDao;
@RequestMapping
public String execute(HttpServletRequest request, HttpServletResponse response)
throws Exception {
if (request.getMethod().equalsIgnoreCase("GET")) {
return "/jsp/member/form.jsp";
}
String uploadDir = request.getServletContext().getRealPath("/upload/member");
Member member = new Member();
member.setName(request.getParameter("name"));
member.setEmail(request.getParameter("email"));
member.setPassword(request.getParameter("password"));
member.setTel(request.getParameter("tel"));
// 업로드 된 사진 파일 처리
Part photoPart = request.getPart("photo");
if (photoPart != null && photoPart.getSize() > 0) {
String filename = UUID.randomUUID().toString();
member.setPhoto(filename);
photoPart.write(uploadDir + "/" + filename);
}
memberDao.insert(member);
return "redirect:list";
}
}
| [
"[email protected]"
] | |
4705d387fce3c50d86221ad3b609ce744af8d61e | 00c14569ae1edccaf48716637747e9d15e1f379c | /impl/offer/src/main/java/car/OfferRepository.java | 3c207d889132c2e472bca737b29bc14c220f1466 | [] | no_license | xrodrigo1982x/microservices-car-rental | 51be55194672fd9f56f336e4e520b4a07f251e82 | 21502eeb6865ccdac5b31cd53c107b9e3c7cc801 | refs/heads/master | 2020-06-22T09:36:12.710468 | 2016-11-25T19:30:35 | 2016-11-25T19:30:35 | 74,597,006 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 173 | java | package car;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface OfferRepository extends PagingAndSortingRepository<Offer, String> {
}
| [
"[email protected]"
] | |
21429cbc98f4448b6a9b58803493903444dc2a1c | 369e55759c3871035addac23912d09e74731af05 | /android/app/src/main/java/com/notesapp/MainApplication.java | 07a546bbfad071d7f0314ed9a6dde4bad20f99c8 | [] | no_license | jordyvandomselaar/NotesApp | 3887e2630afad90257fd71bb608d2cbf0d2aece9 | b18f148e5500b72191b76d22b2501f7b76fe0339 | refs/heads/master | 2023-01-05T15:06:06.823722 | 2019-06-17T15:12:16 | 2019-06-17T15:12:16 | 192,370,039 | 1 | 0 | null | 2023-01-04T00:45:18 | 2019-06-17T15:11:55 | Objective-C | UTF-8 | Java | false | false | 1,044 | java | package com.notesapp;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
);
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
| [
"[email protected]"
] | |
06be37e506b7c52f9566a1f58bffe3be37c1d868 | e7382beb6fb7fce38929612d5643390499cb2966 | /src/main/java/org/supermarketdiscount/dao/CommodityDtoMapper.java | 4c30ffa3412b1e6ae18280684bc2fb5d22f6ddd9 | [] | no_license | supermkrecommend/supermkrecommend | 8ec4a5391eb0ec007c36e1569f06d688c790e0d7 | 1e0eb61cdf91501becc8930f774e1e88861edea7 | refs/heads/master | 2021-01-19T05:07:50.246100 | 2015-07-22T06:49:48 | 2015-07-22T06:49:48 | 39,484,171 | 0 | 0 | null | 2015-07-22T03:45:27 | 2015-07-22T03:45:27 | null | UTF-8 | Java | false | false | 416 | java | package org.supermarketdiscount.dao;
import org.supermarketdiscount.dto.DetailCommodityDto;
import org.supermarketdiscount.dto.SimpleCommodityDto;
import java.util.List;
import java.util.Map;
/**
* Created by Administrator on 2015/4/25.
*/
public interface CommodityDtoMapper {
List<DetailCommodityDto> getDetailCommodityDtoList(Map map);
List<SimpleCommodityDto> getSimpleCommodityDtoList(Map map);
}
| [
"[email protected]"
] | |
7ea754b3dca6c274364c272aebcb5bc0c18ac343 | 4d7dda3000855368162106af336434451bbea945 | /app/src/main/java/news/factory/com/base/view_holder/top_block/TopBlockViewHolder.java | c750623ef7be0a52c4b7502348e186c12c3a456a | [] | no_license | Vedranivic/News | 2c011efcc7d8ee1b215def225c833723e363be70 | 66b494f85f0e8c46b41400e76397d6b06915276e | refs/heads/master | 2020-03-30T09:49:50.945747 | 2018-11-05T10:57:35 | 2018-11-05T10:57:35 | 151,094,308 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,350 | java | package news.factory.com.base.view_holder.top_block;
import android.support.v4.view.ViewPager;
import android.view.View;
import com.rd.PageIndicatorView;
import java.util.List;
import butterknife.BindView;
import butterknife.OnPageChange;
import news.factory.com.R;
import news.factory.com.base.adapter.TopBlockPagerAdapter;
import news.factory.com.base.BaseItemViewHolder;
import news.factory.com.base.ObjectWrapper;
import news.factory.com.base.RecyclerItemsWrapper;
public class TopBlockViewHolder extends BaseItemViewHolder {
@BindView(R.id.vpTopBlock)
ViewPager vpTopBlock;
@BindView(R.id.pivTopBlock)
PageIndicatorView pivTopBlock;
private Object pagerAdapter;
private int mCurrentPosition;
public TopBlockViewHolder(View itemView, List<RecyclerItemsWrapper> items, ObjectWrapper objectWrapper) {
super(itemView, items, objectWrapper);
this.pagerAdapter = objectWrapper.getPagerAdapter();
setupAdapter();
}
private void setupAdapter() {
pivTopBlock.setViewPager(vpTopBlock);
pivTopBlock.setAnimationDuration(200);
vpTopBlock.setAdapter((TopBlockPagerAdapter) pagerAdapter);
vpTopBlock.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
mCurrentPosition = position;
}
@Override
public void onPageScrollStateChanged(int state) {
int lastPageIndex = ((TopBlockPagerAdapter) pagerAdapter).getCount()-1;
if (mCurrentPosition == 0)
vpTopBlock.setCurrentItem(lastPageIndex - 1, false);
if (mCurrentPosition == lastPageIndex)
vpTopBlock.setCurrentItem(1, false);
}
});
}
@SuppressWarnings("unchecked")
@Override
public void bind(int position) {
if(items.get(position).getViewType() == R.layout.item_top_block) {
((TopBlockPagerAdapter) pagerAdapter).setItems(
((TopBlockDataClass) items.get(position).getItem()).getArticles()
);
vpTopBlock.setCurrentItem(1);
}
}
}
| [
"[email protected]"
] | |
c6eff0c12b5547c9937788bb630402676fef423d | cea41bdf74a52fd46515681f33e1af689d1478c2 | /src/com/senati/clase01/ejercicio3.java | e930e5c1aa46b0b54ed660776b2f2822f0974e1f | [] | no_license | unolasco/java01 | 52c18ba3c2b707677ec9644a7978cb886ab86915 | 31532135fe0ad7b8cbc29c542d9f7cfbe0e152c5 | refs/heads/master | 2020-11-25T01:02:49.221975 | 2019-12-16T16:00:22 | 2019-12-16T16:00:22 | 228,421,251 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 494 | java | package com.senati.clase01;
public class ejercicio3 {
public static void main(String[] args) {
// TODO Auto-generated method stub
/*
Evalúe el siguiente bloque de código y diga qué valor contendrá al final la variable solución
int x=5;
int y=8;
int z=6;
int solucion= x+y-3*z;
*/
int x=5;
int y=8;
int z=6;
int solucion;
solucion= x+y-3*z;
System.out.println("El resultado es = " + solucion);
}
}
| [
"Alumno@DESKTOP-QK63PLK"
] | Alumno@DESKTOP-QK63PLK |
176d483ad5b0fc1f02a0b2330f7e08712403bab7 | 2cf9b1cca3287944ce6791226a50f461675be232 | /src/main/java/exp/delivery/DemoDeliveryService.java | f26abd7b9fc073c66b0c31cf61e47a1031753522 | [] | no_license | 2LAI/DeliveryService | 4c66d759a2faeca782de2a2bfaaf90ac433c7c9d | 3c8f1b476fc0a312ecbffae5db386faa36df28e4 | refs/heads/main | 2023-06-07T18:40:06.610786 | 2021-06-28T11:13:58 | 2021-06-28T11:13:58 | 379,052,830 | 0 | 0 | null | 2021-06-26T21:58:28 | 2021-06-21T20:18:52 | Java | UTF-8 | Java | false | false | 4,176 | java | package exp.delivery;
import exp.delivery.utils.exceptions.IncorrectInputException;
import exp.delivery.courier.repository.CourierRepository;
import exp.delivery.customer.repository.CustomerRepository;
import exp.delivery.product.repository.ProductRepository;
import exp.delivery.store.repository.StoreRepository;
import exp.delivery.customer.service.impl.CustomerServiceImpl;
import exp.delivery.order.service.impl.OrderServiceImpl;
import exp.delivery.product.service.impl.ProductServiceImpl;
import exp.delivery.store.service.impl.StoreServiceImpl;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import static exp.delivery.utils.BufferConsole.*;
import static exp.delivery.utils.Constants.*;
public class DemoDeliveryService {
private static final Logger logger = LogManager.getLogger(CustomerServiceImpl.class);
public static void main(String[] args) {
initRepository();
showMenu();
}
public static void showMenu() {
CustomerServiceImpl customerService = new CustomerServiceImpl();
StoreServiceImpl storeService = new StoreServiceImpl();
ProductServiceImpl productService = new ProductServiceImpl();
OrderServiceImpl orderService = new OrderServiceImpl();
logger.info("\n1 - Create new customer\n" +
"2 - Update customer information\n" +
"3 - Show all customers\n" +
"4 - Delete customer\n" +
"\n5 - Create new store\n" +
"6 - Update store\n" +
"7 - Show all stores\n" +
"8 - Remove store\n" +
"\n9 - Create new product\n" +
"10 - Update product\n" +
"11 - Show all products\n" +
"12 - Remove product\n" +
"13 - Find product by category\n" +
"14 - Sort product by price\n" +
"\n15 - Create order\n" +
"16 - Show orders\n" +
"17 - Delete order\n" +
"Enter number of operation:");
var menuItem = readline();
switch (menuItem) {
case ONE:
customerService.createNewCustomer();
break;
case TWO:
customerService.updateCustomer();
break;
case THREE:
customerService.showCustomers();
break;
case FOUR:
customerService.removeCustomer();
break;
case FIVE:
storeService.createNewStore();
break;
case SIX:
storeService.updateStore();
break;
case SEVEN:
storeService.showStores();
break;
case EIGHT:
storeService.removeStore();
break;
case NINE:
productService.createNewProduct();
break;
case TEN:
productService.updateProduct();
break;
case ELEVEN:
productService.showProducts();
break;
case TWELVE:
productService.removeProduct();
break;
case THIRTEEN:
logger.info(productService.searchProductByCategory());
break;
case FOURTEEN:
productService.sortProductByPrice();
break;
case FIFTEEN:
orderService.createOrder();
break;
case SIXTEEN:
orderService.showOrders();
break;
case SEVENTEEN:
orderService.deleteOrder();
break;
default:
throw new IncorrectInputException("Incorrect choice");
}
showMenu();
}
private static void initRepository() {
ProductRepository.initializeProductRepository();
StoreRepository.initializeStoreRepository();
CustomerRepository.initializeCustomerRepository();
CourierRepository.initializeCourierRepository();
}
}
| [
"[email protected]"
] | |
3534bf9defdb0439e8b66a2cdd98f7027ceec3cb | 5df86f3a0480d4cc8386df98cb0c5558b2cf4274 | /data_structures/src/data_structures_app/linkedList.java | 6b0b96b5f2c37812d6b29f3119cbca8ec33b34cc | [] | no_license | sujitkumar06/SujitCodes | 4c914cefdcb893c515f5a092f07147ac913c3f99 | 1b85f69e042314263a7ec5f5856c96ffa68a2673 | refs/heads/master | 2023-06-20T14:12:57.896025 | 2021-07-25T17:15:24 | 2021-07-25T17:15:24 | 374,138,091 | 0 | 0 | null | 2021-07-24T13:11:54 | 2021-06-05T14:43:06 | Java | UTF-8 | Java | false | false | 3,199 | java | package data_structures_app;
import java.util.Scanner;
// Class linkedList
class linkedList
{
protected node start;
protected node end;
public int size;
public linkedList()
{
start = null;
end = null;
size = 0;
}
// Function to check if list is empty
public boolean isEmpty()
{
return start == null;
}
// Function to get size of list
public int getSize()
{
return size;
}
// Function to insert an element at begining
public void insertAtStart(int val)
{
node nptr = new node(val, null);
size++;
if (start == null)
{
start = nptr;
end = start;
}
else
{
nptr.setLink(start);
start = nptr;
}
}
// Function to insert an element at end
public void insertAtEnd(int val)
{
node nptr = new node(val, null);
size++;
if (start == null)
{
start = nptr;
end = start;
}
else
{
end.setLink(nptr);
end = nptr;
}
}
// Function to insert an element at position
public void insertAtPos(int val, int pos)
{
node nptr = new node(val, null);
node ptr = start;
pos = pos - 1;
for (int i = 1; i < size; i++)
{
if (i == pos)
{
node tmp = ptr.getLink();
ptr.setLink(nptr);
nptr.setLink(tmp);
break;
}
ptr = ptr.getLink();
}
size++;
}
// Function to delete an element at position
public void deleteAtPos(int pos)
{
if (pos == 1)
{
start = start.getLink();
size--;
return;
}
if (pos == size)
{
node s = start;
node t = start;
while (s != end)
{
t = s;
s = s.getLink();
}
end = t;
end.setLink(null);
size--;
return;
}
node ptr = start;
pos = pos - 1;
for (int i = 1; i < size - 1; i++)
{
if (i == pos)
{
node tmp = ptr.getLink();
tmp = tmp.getLink();
ptr.setLink(tmp);
break;
}
ptr = ptr.getLink();
}
size--;
}
// Function to display elements
public void display()
{
System.out.print("\nSingly Linked List = ");
if (size == 0)
{
System.out.print("empty\n");
return;
}
if (start.getLink() == null)
{
System.out.println(start.getData());
return;
}
node ptr = start;
System.out.print(start.getData() + "->");
ptr = start.getLink();
while (ptr.getLink() != null)
{
System.out.print(ptr.getData() + "->");
ptr = ptr.getLink();
}
System.out.print(ptr.getData() + "\n");
}
}
| [
"[email protected]"
] | |
260fe4451e9566de1b4f809e493fa7fe7352ce99 | cc2927e0dc06503b17d769a83784163db618d54c | /learn/src/main/java/com/xphwv/io/demo/CharsetHelper.java | a2b1a449270204b8d68bc715216bc63068c1f438 | [] | no_license | xphwv/demo | fcb8c02561a1f45de6de57fa0d2350adcb55c4b9 | accb596f993414c2211ecf8c7de729aa516793d2 | refs/heads/master | 2022-07-10T17:36:35.717757 | 2020-07-31T12:06:46 | 2020-07-31T12:06:46 | 75,372,975 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 747 | java | package com.xphwv.io.demo;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
public class CharsetHelper {
private static final String UTF_8 = "UTF-8";
private static CharsetEncoder encoder = Charset.forName(UTF_8).newEncoder();
private static CharsetDecoder decoder = Charset.forName(UTF_8).newDecoder();
public static ByteBuffer encode(CharBuffer in) throws CharacterCodingException{
return encoder.encode(in);
}
public static CharBuffer decode(ByteBuffer in) throws CharacterCodingException{
return decoder.decode(in);
}
} | [
"[email protected]"
] | |
9027b9d33e676fcfde03f9c232ee45569f20449f | fcd9501f555711d2718abae3e5f7dc51ce3af133 | /aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/MultiZone.java | b016eac6ced107e31bdc7953ccb85f0edfc2b3d7 | [] | no_license | kazuyabr/Project-One | 232625927fa2fdd240e9cf6f63cc58f4251260eb | 46218f12d92420aa8ce61b4104f0e34ef0d33f92 | refs/heads/master | 2020-11-29T16:49:18.024934 | 2019-12-19T15:55:28 | 2019-12-19T15:55:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,052 | java | package net.sf.l2j.gameserver.model.zone.type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import net.sf.l2j.commons.concurrent.ThreadPool;
import net.sf.l2j.gameserver.enums.ZoneId;
import net.sf.l2j.gameserver.model.actor.Creature;
import net.sf.l2j.gameserver.model.actor.Player;
import net.sf.l2j.gameserver.model.actor.Summon;
import net.sf.l2j.gameserver.model.actor.instance.Pet;
import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
import net.sf.l2j.gameserver.model.zone.SpawnZoneType;
import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate;
import net.sf.l2j.gameserver.taskmanager.ZoneTaskManager;
/**
* @author Williams
*
*/
public class MultiZone extends SpawnZoneType
{
private String _zoneName;
private boolean _isNoStore;
private boolean _isNoSummonFriend;
private boolean _isFlagEnabled;
private boolean _isHealEnabled;
private int _duration;
private int _reviveDelay;
private static List<Integer> _restrictedItems = new ArrayList<>();
public MultiZone(int id)
{
super(id);
}
@Override
public void setParameter(String name, String value)
{
if (name.equals("name"))
_zoneName = value;
else if (name.equals("isNoStore"))
_isNoStore = Boolean.parseBoolean(value);
else if (name.equals("isNoSummonFriend"))
_isNoSummonFriend = Boolean.parseBoolean(value);
else if (name.equals("isFlagEnabled"))
_isFlagEnabled = Boolean.parseBoolean(value);
else if (name.equals("isHealEnabled"))
_isHealEnabled = Boolean.parseBoolean(value);
else if (name.equals("duration"))
_duration = Integer.parseInt(value);
else if (name.equals("reviveDelay"))
_reviveDelay = Integer.parseInt(value);
else if (name.equals("restrictedItems"))
_restrictedItems = parseIntegers(value);
else
super.setParameter(name, value);
}
@Override
protected void onEnter(Creature character)
{
character.setInsideZone(ZoneId.MULTI, true);
if (_isNoStore)
character.setInsideZone(ZoneId.NO_STORE, true);
if (_isNoSummonFriend)
character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
if (character instanceof Player || character instanceof Pet)
{
final Player player = (Player) character;
player.sendPacket(new ExShowScreenMessage("You have entered a multi zone.", 5000));
if (_isFlagEnabled)
player.updatePvPFlag(1);
checkItemRestriction(player);
}
}
@Override
protected void onExit(Creature character)
{
character.setInsideZone(ZoneId.MULTI, false);
if (_isNoStore)
character.setInsideZone(ZoneId.NO_STORE, false);
if (_isNoSummonFriend)
character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
if (character instanceof Player)
{
final Player player = (Player) character;
player.sendPacket(new ExShowScreenMessage("You have left a multi zone.", 5000));
if (_isFlagEnabled)
player.updatePvPFlag(0);
}
}
public void onDie(Creature character)
{
if (character instanceof Player && _reviveDelay > 0)
{
ThreadPool.schedule(() -> respawnCharacter(((Player) character)), _reviveDelay * 1000);
character.sendPacket(new ExShowScreenMessage("You will be revived in " + _reviveDelay + " second(s).", 5000));
}
}
private final void respawnCharacter(Player player)
{
if (player == null || !player.isDead())
return;
player.doRevive();
player.teleToLocation(getRandomLoc());
}
public void onRevive(Creature character)
{
if (character instanceof Player && _isHealEnabled)
{
final Summon pet = character.getSummon();
if (pet != null)
pet.setCurrentHpMp(pet.getMaxHp(), pet.getMaxMp());
character.setCurrentCp(character.getMaxCp());
character.setCurrentHpMp(character.getMaxHp(), character.getMaxMp());
}
}
private final static void checkItemRestriction(Player player)
{
for (ItemInstance item : player.getInventory().getPaperdollItems())
{
if (item == null || !isRestrictedItem(item.getItemId()))
continue;
player.getInventory().unEquipItemInSlot(item.getLocationSlot());
InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(item);
player.sendPacket(iu);
}
}
public List<Integer> parseIntegers(String line)
{
final List<Integer> value = new ArrayList<>();
Arrays.asList(line.split(";")).forEach(id -> value.add(Integer.parseInt(id)));
return value;
}
public boolean isActive()
{
return ZoneTaskManager.getInstance().getCurrentZoneId() == getId();
}
public String getZoneName()
{
return _zoneName;
}
public int getTime()
{
return _duration;
}
public int getRevive()
{
return _reviveDelay;
}
public boolean isFlagEnabled()
{
return _isFlagEnabled;
}
public static boolean isRestrictedItem(int itemId)
{
return _restrictedItems.contains(itemId);
}
} | [
"Williams@e8047e30-8a91-4656-bd74-d42a5a4e59b5"
] | Williams@e8047e30-8a91-4656-bd74-d42a5a4e59b5 |
d13489e7570b5e4955e1f85959c93720569668ed | d601bb805e96d3970e85d2c54bff280d7de5ae0f | /java/AULAS/src/introducao/OiMundo.java | 9d2b36bce976380516f0e71df4639d81847bf455 | [] | no_license | LUANwesDEV/turma27java | 11e0d21851d0b20651392f1a73457eb461ec37b8 | 643139227299b8032c47608f96bab8a7d064d49e | refs/heads/main | 2023-06-28T20:43:23.315404 | 2021-08-09T14:46:53 | 2021-08-09T14:46:53 | 379,587,335 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 155 | java | package introducao;
public class OiMundo {
public static void main(String[] args) {
System.out.println( "Oi Mundo eu sou Wesley");
}
}
| [
"[email protected]"
] | |
7312aba0b15db0d76894877baa37155dcee3b0a0 | e47823f99752ec2da083ac5881f526d4add98d66 | /src/org.gravity.hulk/gen/org/gravity/hulk/detection/metrics/sourcemeter/impl/HIncommingInvocationsCalculatorImpl.java | 9577a74c5a052e3e4325594ad359b408abb64be7 | [] | no_license | Echtzeitsysteme/hulk-ase-2016 | 1dee8aca80e2425ab6acab18c8166542dace25cd | fbfb7aee1b9f29355a20e365f03bdf095afe9475 | refs/heads/master | 2020-12-24T05:31:49.671785 | 2017-05-04T08:18:32 | 2017-05-04T08:18:32 | 56,681,308 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,573 | java | /**
*/
package org.gravity.hulk.detection.metrics.sourcemeter.impl;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.gravity.hulk.antipatterngraph.HMetric;
import org.gravity.hulk.antipatterngraph.metrics.HNumberOfIncommingInvocationsMetric;
import org.gravity.hulk.antipatterngraph.metrics.MetricsFactory;
import org.gravity.hulk.detection.metrics.sourcemeter.HIncommingInvocationsCalculator;
import org.gravity.hulk.detection.metrics.sourcemeter.HSourceMeterMetricTypes;
import org.gravity.hulk.detection.metrics.sourcemeter.HSoureMeterMetricType;
import org.gravity.hulk.detection.metrics.sourcemeter.SourcemeterFactory;
import org.gravity.hulk.detection.metrics.sourcemeter.SourcemeterPackage;
// <-- [user defined imports]
// [user defined imports] -->
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>HIncomming Invocations Calculator</b></em>'.
* <!-- end-user-doc -->
* <p>
* </p>
*
* @generated
*/
public class HIncommingInvocationsCalculatorImpl extends HSourcemeterMetricCalculatorImpl
implements HIncommingInvocationsCalculator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected HIncommingInvocationsCalculatorImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SourcemeterPackage.Literals.HINCOMMING_INVOCATIONS_CALCULATOR;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public HSoureMeterMetricType whichMetric() {
// ActivityNode6
Object[] result1_green = HIncommingInvocationsCalculatorImpl
.pattern_HIncommingInvocationsCalculator_0_1_ActivityNode6_greenF();
if (result1_green == null) {
throw new RuntimeException("Pattern matching in node [ActivityNode6] failed.");
}
HSoureMeterMetricType type = (HSoureMeterMetricType) result1_green[0];
return HIncommingInvocationsCalculatorImpl.pattern_HIncommingInvocationsCalculator_0_2_expressionFB(type);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public HMetric createMetric(double value) {
// ActivityNode12
Object[] result1_green = HIncommingInvocationsCalculatorImpl
.pattern_HIncommingInvocationsCalculator_1_1_ActivityNode12_greenFB(value);
if (result1_green == null) {
throw new RuntimeException(
"Pattern matching in node [ActivityNode12] failed." + " Variables: " + "[value] = " + value + ".");
}
HNumberOfIncommingInvocationsMetric nii = (HNumberOfIncommingInvocationsMetric) result1_green[0];
return HIncommingInvocationsCalculatorImpl.pattern_HIncommingInvocationsCalculator_1_2_expressionFB(nii);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
switch (operationID) {
case SourcemeterPackage.HINCOMMING_INVOCATIONS_CALCULATOR___WHICH_METRIC:
return whichMetric();
case SourcemeterPackage.HINCOMMING_INVOCATIONS_CALCULATOR___CREATE_METRIC__DOUBLE:
return createMetric((Double) arguments.get(0));
}
return super.eInvoke(operationID, arguments);
}
public static final Object[] pattern_HIncommingInvocationsCalculator_0_1_ActivityNode6_greenF() {
HSoureMeterMetricType type = SourcemeterFactory.eINSTANCE.createHSoureMeterMetricType();
HSourceMeterMetricTypes type_type_prime = HSourceMeterMetricTypes.NII;
type.setType(type_type_prime);
return new Object[] { type };
}
public static final HSoureMeterMetricType pattern_HIncommingInvocationsCalculator_0_2_expressionFB(
HSoureMeterMetricType type) {
HSoureMeterMetricType _result = type;
return _result;
}
public static final Object[] pattern_HIncommingInvocationsCalculator_1_1_ActivityNode12_greenFB(double value) {
HNumberOfIncommingInvocationsMetric nii = MetricsFactory.eINSTANCE.createHNumberOfIncommingInvocationsMetric();
double nii_value_prime = Double.valueOf(value);
nii.setValue(Double.valueOf(nii_value_prime));
return new Object[] { nii, value };
}
public static final HMetric pattern_HIncommingInvocationsCalculator_1_2_expressionFB(
HNumberOfIncommingInvocationsMetric nii) {
HMetric _result = nii;
return _result;
}
// <-- [user code injected with eMoflon]
@Override
public String getGuiName() {
return "Number of Incomming Invocations";
}
// [user code injected with eMoflon] -->
} //HIncommingInvocationsCalculatorImpl
| [
"[email protected]"
] | |
80b57e4199c89b6d600d82a1b03e2124a0c1e6f0 | a233aa7abe5d3b41f578c0b5b102e5f2ab496f40 | /Projeto_novo/src/VIEW/DashBoard.java | 906532ce412757621578cad0f4af17d26d7704b5 | [] | no_license | ThiagoBonette/ProjetoATUALIZADO | 0c53f3609d491c79f3f4416e73084128eeab7a8f | dbdbd22fd6c9f813461c06eb219a2d5f62dbe7bc | refs/heads/main | 2023-01-14T05:09:10.519752 | 2020-11-23T22:50:21 | 2020-11-23T22:50:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,446 | 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 VIEW;
//import DTO.Teste;
import DTO.UsuarioDTO;
import javax.swing.JOptionPane;
/**
*
* @author Igor
*/
public class DashBoard extends javax.swing.JFrame {
/*
* Creates new form DashBoard
*
*/
public DashBoard() {
initComponents();
}
/*INICIALIZEI A VARIÁVEL FORA DO CONSTRUTOR PORQUE NÃO ESTAVA CONSEGUINDO PASSAR ELA COMO PARÂMETRO
NO CONSTRUTOR DA CLASSE SEGUINTE E NISSO TIVE QUE CRIÁ-LA GLOBALMENTE.*/
int id;
public DashBoard(int userId ) {
initComponents();
jLabel1.setText(Integer.toString(userId));
id = Integer.parseInt(jLabel1.getText());
}
//UsuarioDTO objusuarioDTO = new UsuarioDTO();
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
panel1 = new java.awt.Panel();
btnMusicasRecomendadas = new javax.swing.JToggleButton();
btnGenerosFavoritos = new javax.swing.JToggleButton();
btnAvaliarMusicas1 = new javax.swing.JToggleButton();
panel2 = new java.awt.Panel();
jLabel2 = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
btnSelecionarGeneros = new javax.swing.JToggleButton();
btnCadMusicas = new javax.swing.JToggleButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
panel1.setBackground(new java.awt.Color(0, 204, 51));
javax.swing.GroupLayout panel1Layout = new javax.swing.GroupLayout(panel1);
panel1.setLayout(panel1Layout);
panel1Layout.setHorizontalGroup(
panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
);
panel1Layout.setVerticalGroup(
panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 74, Short.MAX_VALUE)
);
btnMusicasRecomendadas.setBackground(new java.awt.Color(51, 102, 255));
btnMusicasRecomendadas.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
btnMusicasRecomendadas.setForeground(new java.awt.Color(255, 255, 255));
btnMusicasRecomendadas.setText("MÚSICAS RECOMENDADAS");
btnMusicasRecomendadas.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnMusicasRecomendadasActionPerformed(evt);
}
});
btnGenerosFavoritos.setBackground(new java.awt.Color(51, 102, 255));
btnGenerosFavoritos.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
btnGenerosFavoritos.setForeground(new java.awt.Color(255, 255, 255));
btnGenerosFavoritos.setText("MEUS GÊNEROS FAVORITOS");
btnGenerosFavoritos.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnGenerosFavoritosActionPerformed(evt);
}
});
btnAvaliarMusicas1.setBackground(new java.awt.Color(51, 102, 255));
btnAvaliarMusicas1.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
btnAvaliarMusicas1.setForeground(new java.awt.Color(255, 255, 255));
btnAvaliarMusicas1.setText("AVALIAR MÚSICAS");
btnAvaliarMusicas1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAvaliarMusicas1ActionPerformed(evt);
}
});
panel2.setBackground(new java.awt.Color(0, 204, 51));
jLabel2.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
jLabel2.setText("@CopyRight 2020");
javax.swing.GroupLayout panel2Layout = new javax.swing.GroupLayout(panel2);
panel2.setLayout(panel2Layout);
panel2Layout.setHorizontalGroup(
panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel2)
.addGap(235, 235, 235))
);
panel2Layout.setVerticalGroup(
panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel2Layout.createSequentialGroup()
.addGap(15, 15, 15)
.addComponent(jLabel2)
.addContainerGap(14, Short.MAX_VALUE))
);
jLabel1.setText("USUARIO");
btnSelecionarGeneros.setBackground(new java.awt.Color(0, 153, 51));
btnSelecionarGeneros.setForeground(new java.awt.Color(255, 255, 255));
btnSelecionarGeneros.setText("Selecionar Gêneros");
btnSelecionarGeneros.setMaximumSize(new java.awt.Dimension(140, 32));
btnSelecionarGeneros.setMinimumSize(new java.awt.Dimension(140, 32));
btnCadMusicas.setBackground(new java.awt.Color(0, 153, 51));
btnCadMusicas.setForeground(new java.awt.Color(255, 255, 255));
btnCadMusicas.setText("Cadastrar Músicas");
btnCadMusicas.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCadMusicasActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(panel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(jLabel1)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(20, 157, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(btnMusicasRecomendadas, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnAvaliarMusicas1, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(btnCadMusicas)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnSelecionarGeneros, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(142, 142, 142))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(btnGenerosFavoritos, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(143, 143, 143)))))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(panel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnGenerosFavoritos, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnAvaliarMusicas1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnMusicasRecomendadas, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnSelecionarGeneros, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnCadMusicas, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(panel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void btnMusicasRecomendadasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMusicasRecomendadasActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_btnMusicasRecomendadasActionPerformed
private void btnGenerosFavoritosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGenerosFavoritosActionPerformed
/*INSTÂNCIA A CLASSE SEGUINTE E PASSA O ID DO USUÁRIO VIA CONSTRUTOR DA CLASSE SEGUINTE.*/
GenerosFavoritos form3 = new GenerosFavoritos(id);
form3.setVisible(true);
}//GEN-LAST:event_btnGenerosFavoritosActionPerformed
private void btnAvaliarMusicas1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAvaliarMusicas1ActionPerformed
AvaliarMusicas formAvaliarMuscias = new AvaliarMusicas(id);
formAvaliarMuscias.setVisible(true);
}//GEN-LAST:event_btnAvaliarMusicas1ActionPerformed
private void btnCadMusicasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCadMusicasActionPerformed
/*INSTÃNCIA A CLASSE SEGUINTE E PASSA O ID DO USUÁRIO VIA CONSTRUTOR DA CLASSE SEGUINTE*/
CadastrarMusica form4 = new CadastrarMusica();
form4.setVisible(true);
}//GEN-LAST:event_btnCadMusicasActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(DashBoard.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(DashBoard.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(DashBoard.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(DashBoard.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new DashBoard().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JToggleButton btnAvaliarMusicas1;
private javax.swing.JToggleButton btnCadMusicas;
private javax.swing.JToggleButton btnGenerosFavoritos;
private javax.swing.JToggleButton btnMusicasRecomendadas;
private javax.swing.JToggleButton btnSelecionarGeneros;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private java.awt.Panel panel1;
private java.awt.Panel panel2;
// End of variables declaration//GEN-END:variables
}
| [
"[email protected]"
] | |
a62cf9e2b1ac8e142729f01f0bfaac1a34ee7a63 | 396c6c930b41433862646cc35932842738556ee3 | /src/com/finedroid/components/BlockQueue.java | 5f8055fc8d03f3d9a75cb664e3e06d2d15a20436 | [] | no_license | fineDroid/ThreadGo | 7d0813bb5f0e62d796a6844c6003bd339bfbdefb | 73ccb925855bae9c58fd684c3eb3be40c4011e54 | refs/heads/master | 2020-04-06T09:13:30.867842 | 2018-11-13T07:57:37 | 2018-11-13T07:57:37 | 157,333,640 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 63 | java | package com.finedroid.components;
public class BlockQueue {
}
| [
"[email protected]"
] | |
ef34f7d5908621fa74f011602215dd9ae69ebaea | 129f58086770fc74c171e9c1edfd63b4257210f3 | /src/testcases/CWE369_Divide_by_Zero/CWE369_Divide_by_Zero__float_database_modulo_06.java | f841d6f972e5f7fe63fd4ab3cacf70766441169b | [] | no_license | glopezGitHub/Android23 | 1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba | 6215d0684c4fbdc7217ccfbedfccfca69824cc5e | refs/heads/master | 2023-03-07T15:14:59.447795 | 2023-02-06T13:59:49 | 2023-02-06T13:59:49 | 6,856,387 | 0 | 3 | null | 2023-02-06T18:38:17 | 2012-11-25T22:04:23 | Java | UTF-8 | Java | false | false | 20,540 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__float_database_modulo_06.java
Label Definition File: CWE369_Divide_by_Zero__float.label.xml
Template File: sources-sinks-06.tmpl.java
*/
/*
* @description
* CWE: 369 Divide by zero
* BadSource: database Read data from a database
* GoodSource: A hardcoded non-zero number (two)
* Sinks: modulo
* GoodSink: Check for zero before modulo
* BadSink : Modulo by a value that may be zero
* Flow Variant: 06 Control flow: if(private_final_five==5) and if(private_final_five!=5)
*
* */
package testcases.CWE369_Divide_by_Zero;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.security.SecureRandom;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE369_Divide_by_Zero__float_database_modulo_06 extends AbstractTestCase
{
/* The variable below is declared "final", so a tool should be able
to identify that reads of this will always give its initialized
value. */
private final int private_final_five = 5;
public void bad() throws Throwable
{
float data;
/* INCIDENTAL: CWE 571 Statement is Always True */
if(private_final_five==5)
{
data = -1.0f; /* Initialize data */
/* Read data from a database */
{
Connection conn = null;
PreparedStatement statement = null;
ResultSet rs = null;
try
{
/* setup the connection */
conn = IO.getDBConnection();
/* prepare and execute a (hardcoded) query */
statement = conn.prepareStatement("select name from users where id=0");
rs = statement.executeQuery();
/* POTENTIAL FLAW: Read data from a database query resultset */
String s_data = rs.getString(1);
if (s_data != null)
{
try
{
data = Float.parseFloat(s_data.trim());
}
catch(NumberFormatException nfe)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", nfe);
}
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error with SQL statement", se);
}
finally
{
/* Close database objects */
try {
if( rs != null )
{
rs.close();
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", se);
}
try {
if( statement != null )
{
statement.close();
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error closing Statement", se);
}
try {
if( conn != null )
{
conn.close();
}
}
catch( SQLException se)
{
IO.logger.log(Level.WARNING, "Error closing Connection", se);
}
}
}
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: Use a hardcoded number that won't a divide by zero */
data = 2.0f;
}
/* INCIDENTAL: CWE 571 Statement is Always True */
if(private_final_five==5)
{
/* POTENTIAL FLAW: Possibly modulo by zero */
int result = (int)(100.0 % data);
IO.writeLine(result);
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: Check for value of or near zero before modulo */
if( Math.abs(data) > 0.000001 )
{
int result = (int)(100.0 % data);
IO.writeLine(result);
}
else
{
IO.writeLine("This would result in a modulo by zero");
}
}
}
/* goodG2B1() - use goodsource and badsink by changing first private_final_five==5 to private_final_five!=5 */
private void goodG2B1() throws Throwable
{
float data;
/* INCIDENTAL: CWE 570 Statement is Always False */
if(private_final_five!=5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
data = -1.0f; /* Initialize data */
/* Read data from a database */
{
Connection conn = null;
PreparedStatement statement = null;
ResultSet rs = null;
try
{
/* setup the connection */
conn = IO.getDBConnection();
/* prepare and execute a (hardcoded) query */
statement = conn.prepareStatement("select name from users where id=0");
rs = statement.executeQuery();
/* POTENTIAL FLAW: Read data from a database query resultset */
String s_data = rs.getString(1);
if (s_data != null)
{
try
{
data = Float.parseFloat(s_data.trim());
}
catch(NumberFormatException nfe)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", nfe);
}
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error with SQL statement", se);
}
finally
{
/* Close database objects */
try {
if( rs != null )
{
rs.close();
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", se);
}
try {
if( statement != null )
{
statement.close();
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error closing Statement", se);
}
try {
if( conn != null )
{
conn.close();
}
}
catch( SQLException se)
{
IO.logger.log(Level.WARNING, "Error closing Connection", se);
}
}
}
}
else {
/* FIX: Use a hardcoded number that won't a divide by zero */
data = 2.0f;
}
/* INCIDENTAL: CWE 571 Statement is Always True */
if(private_final_five==5)
{
/* POTENTIAL FLAW: Possibly modulo by zero */
int result = (int)(100.0 % data);
IO.writeLine(result);
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: Check for value of or near zero before modulo */
if( Math.abs(data) > 0.000001 )
{
int result = (int)(100.0 % data);
IO.writeLine(result);
}
else
{
IO.writeLine("This would result in a modulo by zero");
}
}
}
/* goodG2B2() - use goodsource and badsink by reversing statements in first if */
private void goodG2B2() throws Throwable
{
float data;
/* INCIDENTAL: CWE 571 Statement is Always True */
if(private_final_five==5)
{
/* FIX: Use a hardcoded number that won't a divide by zero */
data = 2.0f;
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
data = -1.0f; /* Initialize data */
/* Read data from a database */
{
Connection conn = null;
PreparedStatement statement = null;
ResultSet rs = null;
try {
/* setup the connection */
conn = IO.getDBConnection();
/* prepare and execute a (hardcoded) query */
statement = conn.prepareStatement("select name from users where id=0");
rs = statement.executeQuery();
/* POTENTIAL FLAW: Read data from a database query resultset */
String s_data = rs.getString(1);
if (s_data != null)
{
try
{
data = Float.parseFloat(s_data.trim());
}
catch(NumberFormatException nfe)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", nfe);
}
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error with SQL statement", se);
}
finally {
/* Close database objects */
try {
if( rs != null )
{
rs.close();
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", se);
}
try {
if( statement != null )
{
statement.close();
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error closing Statement", se);
}
try {
if( conn != null )
{
conn.close();
}
}
catch( SQLException se)
{
IO.logger.log(Level.WARNING, "Error closing Connection", se);
}
}
}
}
/* INCIDENTAL: CWE 571 Statement is Always True */
if(private_final_five==5)
{
/* POTENTIAL FLAW: Possibly modulo by zero */
int result = (int)(100.0 % data);
IO.writeLine(result);
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: Check for value of or near zero before modulo */
if( Math.abs(data) > 0.000001 )
{
int result = (int)(100.0 % data);
IO.writeLine(result);
}
else
{
IO.writeLine("This would result in a modulo by zero");
}
}
}
/* goodB2G1() - use badsource and goodsink by changing second private_final_five==5 to private_final_five!=5 */
private void goodB2G1() throws Throwable
{
float data;
/* INCIDENTAL: CWE 571 Statement is Always True */
if(private_final_five==5)
{
data = -1.0f; /* Initialize data */
/* Read data from a database */
{
Connection conn = null;
PreparedStatement statement = null;
ResultSet rs = null;
try
{
/* setup the connection */
conn = IO.getDBConnection();
/* prepare and execute a (hardcoded) query */
statement = conn.prepareStatement("select name from users where id=0");
rs = statement.executeQuery();
/* POTENTIAL FLAW: Read data from a database query resultset */
String s_data = rs.getString(1);
if (s_data != null)
{
try
{
data = Float.parseFloat(s_data.trim());
}
catch(NumberFormatException nfe)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", nfe);
}
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error with SQL statement", se);
}
finally
{
/* Close database objects */
try {
if( rs != null )
{
rs.close();
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", se);
}
try {
if( statement != null )
{
statement.close();
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error closing Statement", se);
}
try {
if( conn != null )
{
conn.close();
}
}
catch( SQLException se)
{
IO.logger.log(Level.WARNING, "Error closing Connection", se);
}
}
}
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: Use a hardcoded number that won't a divide by zero */
data = 2.0f;
}
/* INCIDENTAL: CWE 570 Statement is Always False */
if(private_final_five!=5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* POTENTIAL FLAW: Possibly modulo by zero */
int result = (int)(100.0 % data);
IO.writeLine(result);
}
else {
/* FIX: Check for value of or near zero before modulo */
if( Math.abs(data) > 0.000001 )
{
int result = (int)(100.0 % data);
IO.writeLine(result);
}
else
{
IO.writeLine("This would result in a modulo by zero");
}
}
}
/* goodB2G2() - use badsource and goodsink by reversing statements in second if */
private void goodB2G2() throws Throwable
{
float data;
/* INCIDENTAL: CWE 571 Statement is Always True */
if(private_final_five==5)
{
data = -1.0f; /* Initialize data */
/* Read data from a database */
{
Connection conn = null;
PreparedStatement statement = null;
ResultSet rs = null;
try
{
/* setup the connection */
conn = IO.getDBConnection();
/* prepare and execute a (hardcoded) query */
statement = conn.prepareStatement("select name from users where id=0");
rs = statement.executeQuery();
/* POTENTIAL FLAW: Read data from a database query resultset */
String s_data = rs.getString(1);
if (s_data != null)
{
try
{
data = Float.parseFloat(s_data.trim());
}
catch(NumberFormatException nfe)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", nfe);
}
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error with SQL statement", se);
}
finally
{
/* Close database objects */
try {
if( rs != null )
{
rs.close();
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", se);
}
try {
if( statement != null )
{
statement.close();
}
}
catch( SQLException se )
{
IO.logger.log(Level.WARNING, "Error closing Statement", se);
}
try {
if( conn != null )
{
conn.close();
}
}
catch( SQLException se)
{
IO.logger.log(Level.WARNING, "Error closing Connection", se);
}
}
}
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: Use a hardcoded number that won't a divide by zero */
data = 2.0f;
}
/* INCIDENTAL: CWE 571 Statement is Always True */
if(private_final_five==5)
{
/* FIX: Check for value of or near zero before modulo */
if( Math.abs(data) > 0.000001 )
{
int result = (int)(100.0 % data);
IO.writeLine(result);
}
else
{
IO.writeLine("This would result in a modulo by zero");
}
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* POTENTIAL FLAW: Possibly modulo by zero */
int result = (int)(100.0 % data);
IO.writeLine(result);
}
}
public void good() throws Throwable
{
goodG2B1();
goodG2B2();
goodB2G1();
goodB2G2();
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"[email protected]"
] | |
9df83c9e6358779962f41e2f3f428ca2d599cc1b | 9dfe1e8e03cfc43e8200f41e36d71c6a30b73e4b | /src/main/java/com/kobin/singleton/SingletonApplication.java | b3ba2e3cdce7a7c5309354e53a2b37f0b002fb52 | [] | no_license | binbinshi/singleton | bd8f1bc8cee1bae24bda8135e4f76500b93e0a43 | 988c5da60cb4f5cd0eac6b90812e78c5396fa52c | refs/heads/master | 2021-09-03T13:20:41.804389 | 2018-01-09T10:14:17 | 2018-01-09T10:14:17 | 113,559,210 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 317 | java | package com.kobin.singleton;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SingletonApplication {
public static void main(String[] args) {
SpringApplication.run(SingletonApplication.class, args);
}
}
| [
"[email protected]"
] | |
8eed92714dbe42ddc40d31199fca2208fbb94f7b | fd3cc32a1151b011d43265faca9ea9593e81eff4 | /src/Movie.java | baaa20096c94555acd1f13ee132719b0f3f1f937 | [] | no_license | antlukeliu/Lab10 | d8f0ddad991912cfecd46dbe3072f648745514aa | bee46ec55612c73465195565b7c2573bbc97ea07 | refs/heads/master | 2021-01-13T13:15:49.909903 | 2016-11-10T22:39:55 | 2016-11-10T22:39:55 | 72,684,112 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 278 | java |
public class Movie {
private String title;
private String category;
public Movie(String title, String category){
this.title = title;
this.category = category;
}
public String getTitle() {
return title;
}
public String getCategory() {
return category;
}
}
| [
"[email protected]"
] | |
e46a485044c790a6883aa40cc49d41bb9eaea03d | 7edbdf0c58aaa0ba79defbbc384536884dead496 | /app/src/main/java/com/devilthrone/jkchart/PieChartItem.java | f3f3cd919100a87aee8900814debed94efdd170d | [] | no_license | devilthrone/JKChart | 450cff237fb02a3ea97e3e5b2be6bb17684655ff | 9ec132df5139308c45872d330d46b99b3533637d | refs/heads/master | 2021-01-10T12:00:51.973631 | 2016-01-24T17:47:35 | 2016-01-24T17:47:35 | 50,297,763 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 390 | java | package com.devilthrone.jkchart;
/**
* Created by jikun on 16/1/16.
* 饼状图中的一个数据模型
* 包括文字 颜色 值
*/
public class PieChartItem {
public int color;
public int value;
public String title;
public PieChartItem(String title, int value, int color) {
this.color = color;
this.value = value;
this.title = title;
}
}
| [
"[email protected]"
] | |
7945d8cee0642b4376ef29a19a0381952f5e83cd | 0022512cc02ba2e0d94fc4633a7ddc9404f38df9 | /src/jsoup/JsoupTwit.java | fca9f6c22505164a55a22a3bf2fbf8f6ec5cc5da | [] | no_license | hyunlove12/socketPlusCrawlByJava | 8e8c62653ce07f16212506ff158699e5f35fda2b | cd299b0341aab400d399041132ec68a4c0d55ac2 | refs/heads/master | 2020-11-25T18:46:41.879324 | 2019-12-25T23:43:10 | 2019-12-25T23:43:10 | 228,799,200 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,164 | java | package jsoup;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;;
public class JsoupTwit {
public static void main(String[] args) {
Document doc;
Document childDoc;
try {
//tweet-text
doc = Jsoup.connect("https://twitter.com/search?q=맛집&src=typd&lang=ko").get();
System.out.println(doc.title());
// System.out.println(doc.getAllElements().toString());
// System.out.println(doc.getAllElements().html());
//class=tit3가 여러개
Elements newsHeadlines = doc.select("p[class*=tweet-text]");
OutputStream output = new FileOutputStream("D:/Output.txt");
String str = newsHeadlines.toString();
byte[] by=str.getBytes();
output.write(by);
System.out.println(newsHeadlines.text());
for (Element headline : newsHeadlines) {
System.out.println(headline.toString());
Element temp = headline.child(0);
System.out.println(temp.toString());
//System.out.println(temp.attr("title"));
//href태그 들어가서 데이터 가져오기
//System.out.println(temp.absUrl("href"));
//childDoc = Jsoup.connect(temp.absUrl("href")).get();
//System.out.println(temp.absUrl("href").toString());
//System.out.println(childDoc);
//Elements temp1 = childDoc.select("p[class=count]");
// System.out.println(temp1);
// for (Element count : temp1) {
//System.out.println("----------------결과---------------");
//System.out.println(count.attr("p[class=count]"));
//System.out.println("----------------결과---------------");
// }
//temp1.attr("span[class=count]");
//Element temp2 = childDoc.attr("class", "count");
//System.out.println(temp2.toString() + "++++++");
// .attr("span[class=count]");
// temp2.attr
//System.out.println(headline.attr("title") + ", " + headline.absUrl("href"));
}
System.out.println("성공!");
} catch (IOException e) {
e.printStackTrace();
} finally {
System.out.println("끝!");
}
}
}
| [
"[email protected]"
] | |
3e583e8445579421fe9c5c82428c5a97dfd7f796 | b8eba0c7ab763e61455d10c21e4e85d2b90b9afe | /CSS390 - Android/BrandanHaertelMP1/gen/uwb/css390/BrandanHaertelMP1/R.java | 1533e969b6fa1e82ef8cc85d847cbbf0607f22b7 | [] | no_license | brandann/school_uw | 6a1da8c6a97c1d2221c626d305578f248367845e | cdf337fd2bf0b35783933fb03a1573da24a05994 | refs/heads/master | 2021-01-19T14:56:18.693735 | 2015-07-08T22:27:35 | 2015-07-08T22:27:35 | 17,028,009 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 179,028 | 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 uwb.css390.BrandanHaertelMP1;
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;
/** 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 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 activity_chooser_view_content=0x7f050025;
public static final int always=0x7f05000b;
public static final int analogClock1=0x7f05003e;
public static final int beginning=0x7f050011;
public static final int buttonDec=0x7f050044;
public static final int buttonInc=0x7f050041;
public static final int buttonQuit=0x7f05003c;
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 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 progressTime=0x7f050042;
public static final int progress_circular=0x7f050018;
public static final int progress_horizontal=0x7f050019;
public static final int radio=0x7f05002f;
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 seekSpeed=0x7f05003d;
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 textCount=0x7f050045;
public static final int textSpeed=0x7f05003f;
public static final int textTime=0x7f050040;
public static final int textView1=0x7f050043;
public static final int title=0x7f05002b;
public static final int top_action_bar=0x7f050020;
public static final int up=0x7f050021;
public static final int useLogo=0x7f050003;
public static final int withText=0x7f05000c;
}
public static final class integer {
public static final int MAX_SPEED=0x7f090001;
/** 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 support_simple_spinner_dropdown_item=0x7f030019;
}
public static final class string {
public static final int Dec=0x7f0a0012;
public static final int Inc=0x7f0a0011;
public static final int NULLSTRING=0x7f0a0013;
/** 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 app_name=0x7f0a000d;
public static final int bCoolTimer=0x7f0a000f;
public static final int hello_world=0x7f0a000e;
public static final int quit=0x7f0a0010;
}
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 uwb.css390.BrandanHaertelMP1:background}</code></td><td> Specifies a background drawable for the action bar.</td></tr>
<tr><td><code>{@link #ActionBar_backgroundSplit uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:customNavigationLayout}</code></td><td> Specifies a layout for custom navigation.</td></tr>
<tr><td><code>{@link #ActionBar_displayOptions uwb.css390.BrandanHaertelMP1:displayOptions}</code></td><td> Options affecting how the action bar is displayed.</td></tr>
<tr><td><code>{@link #ActionBar_divider uwb.css390.BrandanHaertelMP1:divider}</code></td><td> Specifies the drawable used for item dividers.</td></tr>
<tr><td><code>{@link #ActionBar_height uwb.css390.BrandanHaertelMP1:height}</code></td><td> Specifies a fixed height.</td></tr>
<tr><td><code>{@link #ActionBar_homeLayout uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:icon}</code></td><td> Specifies the drawable used for the application icon.</td></tr>
<tr><td><code>{@link #ActionBar_indeterminateProgressStyle uwb.css390.BrandanHaertelMP1:indeterminateProgressStyle}</code></td><td> Specifies a style resource to use for an indeterminate progress spinner.</td></tr>
<tr><td><code>{@link #ActionBar_itemPadding uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:logo}</code></td><td> Specifies the drawable used for the application logo.</td></tr>
<tr><td><code>{@link #ActionBar_navigationMode uwb.css390.BrandanHaertelMP1:navigationMode}</code></td><td> The type of navigation to use.</td></tr>
<tr><td><code>{@link #ActionBar_progressBarPadding uwb.css390.BrandanHaertelMP1:progressBarPadding}</code></td><td> Specifies the horizontal padding on either end for an embedded progress bar.</td></tr>
<tr><td><code>{@link #ActionBar_progressBarStyle uwb.css390.BrandanHaertelMP1:progressBarStyle}</code></td><td> Specifies a style resource to use for an embedded progress bar.</td></tr>
<tr><td><code>{@link #ActionBar_subtitle uwb.css390.BrandanHaertelMP1:subtitle}</code></td><td> Specifies subtitle text used for navigationMode="normal" </td></tr>
<tr><td><code>{@link #ActionBar_subtitleTextStyle uwb.css390.BrandanHaertelMP1:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr>
<tr><td><code>{@link #ActionBar_title uwb.css390.BrandanHaertelMP1:title}</code></td><td> Specifies title text used for navigationMode="normal" </td></tr>
<tr><td><code>{@link #ActionBar_titleTextStyle uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:windowActionBar}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBarWindow_windowActionBarOverlay uwb.css390.BrandanHaertelMP1:windowActionBarOverlay}</code></td><td></td></tr>
<tr><td><code>{@link #ActionBarWindow_windowFixedHeightMajor uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1.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 uwb.css390.BrandanHaertelMP1:windowActionBar
*/
public static final int ActionBarWindow_windowActionBar = 0;
/**
<p>This symbol is the offset where the {@link uwb.css390.BrandanHaertelMP1.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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:windowFixedWidthMinor
*/
public static final int ActionBarWindow_windowFixedWidthMinor = 5;
/**
<p>This symbol is the offset where the {@link uwb.css390.BrandanHaertelMP1.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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:background}</code></td><td> Specifies a background for the action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_backgroundSplit uwb.css390.BrandanHaertelMP1:backgroundSplit}</code></td><td> Specifies a background for the split action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_height uwb.css390.BrandanHaertelMP1:height}</code></td><td> Specifies a fixed height for the action mode bar.</td></tr>
<tr><td><code>{@link #ActionMode_subtitleTextStyle uwb.css390.BrandanHaertelMP1:subtitleTextStyle}</code></td><td> Specifies a style to use for subtitle text.</td></tr>
<tr><td><code>{@link #ActionMode_titleTextStyle uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:divider}</code></td><td> Drawable to use as a vertical divider between buttons.</td></tr>
<tr><td><code>{@link #LinearLayoutICS_dividerPadding uwb.css390.BrandanHaertelMP1:dividerPadding}</code></td><td> Size of padding on either end of a divider.</td></tr>
<tr><td><code>{@link #LinearLayoutICS_showDividers uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:actionLayout}</code></td><td> An optional layout to be used as an action view.</td></tr>
<tr><td><code>{@link #MenuItem_actionProviderClass uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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, 0x010103f8
};
/**
<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 uwb.css390.BrandanHaertelMP1:iconifiedByDefault}</code></td><td> The default state of the SearchView.</td></tr>
<tr><td><code>{@link #SearchView_queryHint uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:prompt}</code></td><td> The prompt to display when the spinner's dialog is shown.</td></tr>
<tr><td><code>{@link #Spinner_spinnerMode uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:actionDropDownStyle}</code></td><td> Default ActionBar dropdown style.</td></tr>
<tr><td><code>{@link #Theme_dropdownListPreferredItemHeight uwb.css390.BrandanHaertelMP1:dropdownListPreferredItemHeight}</code></td><td> The preferred item height for dropdown lists.</td></tr>
<tr><td><code>{@link #Theme_listChoiceBackgroundIndicator uwb.css390.BrandanHaertelMP1:listChoiceBackgroundIndicator}</code></td><td> Drawable used as a background for selected list items.</td></tr>
<tr><td><code>{@link #Theme_panelMenuListTheme uwb.css390.BrandanHaertelMP1:panelMenuListTheme}</code></td><td> Default Panel Menu style.</td></tr>
<tr><td><code>{@link #Theme_panelMenuListWidth uwb.css390.BrandanHaertelMP1:panelMenuListWidth}</code></td><td> Default Panel Menu width.</td></tr>
<tr><td><code>{@link #Theme_popupMenuStyle uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1: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 uwb.css390.BrandanHaertelMP1:paddingStart
*/
public static final int View_paddingStart = 1;
};
}
| [
"[email protected]"
] | |
757146270671a918b2c18b44c8a1d31a5b4aa266 | 1bcc404b3ae31a1225f9f08c5395791ac0c9dc9c | /src/edu/tcnj/documentretrival/InvertedIndex.java | 7a7540e8ffa63d3c427f20efa60a92740cec2f5b | [] | no_license | JenY1/ResumeSearch | 2f1cacdcafd4d529ff165d4a115e1a97b5ee9572 | 0500609dc483df93facbe7dca31cca974b6b42b8 | refs/heads/master | 2020-05-17T00:48:53.947960 | 2012-10-12T22:55:35 | 2012-10-12T22:55:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,335 | java | /**
* Source from: http://www.tcnj.edu/~mmmartin/keith/InvertedIndex.java
*/
package edu.tcnj.documentretrival;
import java.io.*;
import java.util.*;
/** InvertedIndex represents an inverted index.
*
* It contains methods for creating, storing/loading, and using
* an inverted index.
*/
public class InvertedIndex implements Index {
/** The data structure for the inverted index.
* <P>It is a hashtable of hashtables. The index for the outer
* hashtable (this structure) is the term (stemmed word). The index for
* the inner hashtable (the structure returned) is the document ID.
*/
private HashMap index;
/** Initialize the Hashtable */
public InvertedIndex() {
index = new HashMap();
}
/** Build an inverted index based on a colllection of statistics about documents. */
public void build(DatabaseStatistics s)
{
// define an Iterator over the collection of documents
Iterator e = s.getDocumentList();
// temporary variables
String docid;
HashMap currentFL;
DocumentStatistics current;
Iterator f;
String word;
// for performance stats
long totalKeywords = 0;
int documents = 0;
// BUILD THE INDEX
// while there are more documents
while (e.hasNext())
{
// load the unique identifier
docid = (String)e.next();
// load doc stats
current = s.getDocumentStatistics(docid);
// decide how to pull out the terms for this document
if (BuildSettings.useAP)
{
currentFL = current.destructiveAdaptiveMostOccurring(BuildSettings.mostSignificantTerms);
}
else
{
if (BuildSettings.useProbCutoff)
currentFL = current.mostOccurring(BuildSettings.probabilityCutoff);
else
currentFL = current.destructiveMostOccurring(BuildSettings.mostSignificantTerms);
}
// get an Iterator over the terms
f = currentFL.keySet().iterator();
//while there are more terms
while (f.hasNext())
{
word = (String)f.next();
// count the occurrance of this word in the internal data structure
register(docid, word, ((int[])currentFL.get(word))[0]);
totalKeywords++;
}
documents++;
}
// print statistics
if (BuildSettings.printAverageKeywords)
{
System.out.println("Average number of keywords: " + (totalKeywords / (double)documents));
}
}
/** Register a frequency of a term within a document into this
* index. This method is synchronized to allow for multiple threads
* to build the same index concurrently without needing a synchronized
* data structure.
* @param docid The document ID
* @param word The stemmed word
* @param frequency The number of times word occurred in the document
*/
public synchronized void register(String docid, String word, int frequency)
{
// load the hashtable for this term
Object val = index.get(word);
// define a new int[1] to store the frequency
int[] fArray = new int[1];
fArray[0] = frequency;
if (val == null)
{
// if this term isn't in the index, create a new hashtable and store it
HashMap newList = new HashMap();
newList.put(docid, fArray);
index.put(word, newList);
}
else
{
// if the term exists, simply store appropriately
((HashMap)val).put(docid, fArray);
}
}
/** Store the index in the specified filename in the class' internal format.
* @param filename The filename where this index will be stored
*/
public void store(String filename) throws IOException
{
// open the file
// the false part means that the buffer won't be automatically flushed
// we flush after every term
PrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream(filename)), false);
// STORE THE INDEX
// an iterator over all terms
Iterator i = index.keySet().iterator();
// temporary variables
Iterator docs;
HashMap docList;
String doc;
int[] t;
// the first line is the number of terms
out.println(index.size());
String word;
// loop through each term
while (i.hasNext())
{
word = (String)i.next();
// print the term
out.println(word);
// get variables to loop through documents containing the term
docList = (HashMap)index.get(word);
docs = docList.keySet().iterator();
// loop through documents containing the term
while (docs.hasNext())
{
// get the document and frequency
doc = (String)docs.next();
t = (int[])docList.get(doc);
// store the document and frequency
out.println(doc);
out.println(t[0]);
}
// put another newline on there and flush the buffer
out.println();
out.flush();
}
// close the file
out.close();
}
/** Load the index from the specified filename in the class' internal format.
* @param filename The filename where this index is stored.
*/
public void load(String filename) throws IOException
{
// open the file
BufferedReader r = new BufferedReader(new FileReader(filename));
// load the number of terms
int size = Integer.parseInt(r.readLine());
// must divide by load factor (0.75) to not need to rehash
index = new HashMap((int)(size / .75) + 1);
// temporary variables
String line;
StringTokenizer tokens;
String word;
HashMap docList;
String docid;
int[] fArray;
int lineNumber = 1;
// while there are more lines in the document
while ((line = r.readLine()) != null)
{
// increment the line number
lineNumber++;
// the word is the only thing on the line
word = line;
// load all documents containign this term
docList = new HashMap();
index.put(word, docList);
line = r.readLine();
while (line != null && !line.equals(""))
{
fArray = new int[1];
docid = line;
fArray[0] = Integer.parseInt(r.readLine());
docList.put(docid, fArray);
line = r.readLine();
}
}
// close the file
r.close();
}
/**
* the number of documents containing the word
* @return The number of documents containing this word
*/
public HashMap documentsContaining(String word)
{
return (HashMap)index.get(word);
}
/**
* get an Iterator to loop through all words
* @return An Iterator over the words in the index
*/
public Iterator words()
{
return index.keySet().iterator();
}
/**
* the size of the index
* @return The size of the index
*/
public int size()
{
return index.size();
}
} | [
"[email protected]"
] | |
2afac09f2a7668ae27f3bbe43ab15c807c1cf7e2 | acdfc66bfa228bb8e53efa0de2b2c8854bf94844 | /Backend/src/main/java/modul/backend/model/web/UnitRequest.java | b908c770f8d63edb8569b7d53ea416560f1b16bc | [] | no_license | Vekisa/kraj | 823d549f7c23949a618f47a195770b30c8ef1e15 | d73073c4674ce825502fda007fd32f68f07185e3 | refs/heads/master | 2023-01-22T08:55:10.550822 | 2019-08-16T15:31:52 | 2019-08-16T15:31:52 | 174,338,222 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,311 | java |
package modul.backend.model.web;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}long"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"id"
})
@XmlRootElement(name = "UnitRequest", namespace = "http://www.megatravell.com/unit")
public class UnitRequest {
@XmlElement(namespace = "http://www.megatravell.com/unit")
protected long id;
/**
* Gets the value of the id property.
*
*/
public long getId() {
return id;
}
/**
* Sets the value of the id property.
*
*/
public void setId(long value) {
this.id = value;
}
}
| [
"Mac"
] | Mac |
068b41b48d4bb88a7b183a3fdf9dbf4cf0b14946 | 8317b3b67a44b711ba8a849346507ff6d5f67227 | /app/src/main/java/com/ma/blue2thchat/customview/AutoResizeTextView.java | 5221d8a483e91df69e1e50a95f370f7177f1aedd | [] | no_license | muhammedaydogan/Blue2thChat | 01455dc7e41bd5d7366c920648fa24533355b89b | 78ff9b2e711cf4d16ac9d3d1130fbddd6d78b778 | refs/heads/master | 2023-02-10T23:34:11.453811 | 2020-12-14T22:43:07 | 2020-12-14T22:43:07 | 313,221,767 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,881 | java | package com.ma.blue2thchat.customview;
/**
* DO WHAT YOU WANT TO PUBLIC LICENSE
* Version 2, December 2004
* <p>
* Copyright (C) 2004 Sam Hocevar <[email protected]>
* <p>
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
* <p>
* DO WHAT YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
* <p>
* 0. You just DO WHAT YOU WANT TO.
*/
import android.content.Context;
import android.text.Layout.Alignment;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.TextView;
/**
* Text view that auto adjusts text size to fit within the view.
* If the text size equals the minimum text size and still does not
* fit, append with an ellipsis.
*
* @author Chase Colburn
* @since Apr 4, 2011
*/
public class AutoResizeTextView extends TextView {
// Minimum text size for this text view
public static final float MIN_TEXT_SIZE = 20;
// Interface for resize notifications
public interface OnTextResizeListener {
public void onTextResize(TextView textView, float oldSize, float newSize);
}
// Our ellipse string
private static final String mEllipsis = "...";
// Registered resize listener
private OnTextResizeListener mTextResizeListener;
// Flag for text and/or size changes to force a resize
private boolean mNeedsResize = false;
// Text size that is set from code. This acts as a starting point for resizing
private float mTextSize;
// Temporary upper bounds on the starting text size
private float mMaxTextSize = 0;
// Lower bounds for text size
private float mMinTextSize = MIN_TEXT_SIZE;
// Text view line spacing multiplier
private float mSpacingMult = 1.0f;
// Text view additional line spacing
private float mSpacingAdd = 0.0f;
// Add ellipsis to text that overflows at the smallest text size
private boolean mAddEllipsis = true;
// Default constructor override
public AutoResizeTextView(Context context) {
this(context, null);
}
// Default constructor when inflating from XML file
public AutoResizeTextView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
// Default constructor override
public AutoResizeTextView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
mTextSize = getTextSize();
}
/**
* When text changes, set the force resize flag to true and reset the text size.
*/
@Override
protected void onTextChanged(final CharSequence text, final int start, final int before, final int after) {
mNeedsResize = true;
// Since this view may be reused, it is good to reset the text size
resetTextSize();
}
/**
* If the text view size changed, set the force resize flag to true
*/
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
if (w != oldw || h != oldh) {
mNeedsResize = true;
}
}
/**
* Register listener to receive resize notifications
* @param listener
*/
public void setOnResizeListener(OnTextResizeListener listener) {
mTextResizeListener = listener;
}
/**
* Override the set text size to update our internal reference values
*/
@Override
public void setTextSize(float size) {
super.setTextSize(size);
mTextSize = getTextSize();
}
/**
* Override the set text size to update our internal reference values
*/
@Override
public void setTextSize(int unit, float size) {
super.setTextSize(unit, size);
mTextSize = getTextSize();
}
/**
* Override the set line spacing to update our internal reference values
*/
@Override
public void setLineSpacing(float add, float mult) {
super.setLineSpacing(add, mult);
mSpacingMult = mult;
mSpacingAdd = add;
}
/**
* Set the upper text size limit and invalidate the view
* @param maxTextSize
*/
public void setMaxTextSize(float maxTextSize) {
mMaxTextSize = maxTextSize;
requestLayout();
invalidate();
}
/**
* Return upper text size limit
* @return
*/
public float getMaxTextSize() {
return mMaxTextSize;
}
/**
* Set the lower text size limit and invalidate the view
* @param minTextSize
*/
public void setMinTextSize(float minTextSize) {
mMinTextSize = minTextSize;
requestLayout();
invalidate();
}
/**
* Return lower text size limit
* @return
*/
public float getMinTextSize() {
return mMinTextSize;
}
/**
* Set flag to add ellipsis to text that overflows at the smallest text size
* @param addEllipsis
*/
public void setAddEllipsis(boolean addEllipsis) {
mAddEllipsis = addEllipsis;
}
/**
* Return flag to add ellipsis to text that overflows at the smallest text size
* @return
*/
public boolean getAddEllipsis() {
return mAddEllipsis;
}
/**
* Reset the text to the original size
*/
public void resetTextSize() {
if (mTextSize > 0) {
super.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);
mMaxTextSize = mTextSize;
}
}
/**
* Resize text after measuring
*/
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
if (changed || mNeedsResize) {
int widthLimit = (right - left) - getCompoundPaddingLeft() - getCompoundPaddingRight();
int heightLimit = (bottom - top) - getCompoundPaddingBottom() - getCompoundPaddingTop();
resizeText(widthLimit, heightLimit);
}
super.onLayout(changed, left, top, right, bottom);
}
/**
* Resize the text size with default width and height
*/
public void resizeText() {
int heightLimit = getHeight() - getPaddingBottom() - getPaddingTop();
int widthLimit = getWidth() - getPaddingLeft() - getPaddingRight();
resizeText(widthLimit, heightLimit);
}
/**
* Resize the text size with specified width and height
* @param width
* @param height
*/
public void resizeText(int width, int height) {
CharSequence text = getText();
// Do not resize if the view does not have dimensions or there is no text
if (text == null || text.length() == 0 || height <= 0 || width <= 0 || mTextSize == 0) {
return;
}
if (getTransformationMethod() != null) {
text = getTransformationMethod().getTransformation(text, this);
}
// Get the text view's paint object
TextPaint textPaint = getPaint();
// Store the current text size
float oldTextSize = textPaint.getTextSize();
// If there is a max text size set, use the lesser of that and the default text size
float targetTextSize = mMaxTextSize > 0 ? Math.min(mTextSize, mMaxTextSize) : mTextSize;
// Get the required text height
int textHeight = getTextHeight(text, textPaint, width, targetTextSize);
// Until we either fit within our text view or we had reached our min text size, incrementally try smaller sizes
while (textHeight > height && targetTextSize > mMinTextSize) {
targetTextSize = Math.max(targetTextSize - 2, mMinTextSize);
textHeight = getTextHeight(text, textPaint, width, targetTextSize);
}
// If we had reached our minimum text size and still don't fit, append an ellipsis
if (mAddEllipsis && targetTextSize == mMinTextSize && textHeight > height) {
// Draw using a static layout
// modified: use a copy of TextPaint for measuring
TextPaint paint = new TextPaint(textPaint);
// Draw using a static layout
StaticLayout layout = new StaticLayout(text, paint, width, Alignment.ALIGN_NORMAL, mSpacingMult, mSpacingAdd, false);
// Check that we have a least one line of rendered text
if (layout.getLineCount() > 0) {
// Since the line at the specific vertical position would be cut off,
// we must trim up to the previous line
int lastLine = layout.getLineForVertical(height) - 1;
// If the text would not even fit on a single line, clear it
if (lastLine < 0) {
setText("");
}
// Otherwise, trim to the previous line and add an ellipsis
else {
int start = layout.getLineStart(lastLine);
int end = layout.getLineEnd(lastLine);
float lineWidth = layout.getLineWidth(lastLine);
float ellipseWidth = textPaint.measureText(mEllipsis);
// Trim characters off until we have enough room to draw the ellipsis
while (width < lineWidth + ellipseWidth) {
lineWidth = textPaint.measureText(text.subSequence(start, --end + 1).toString());
}
setText(text.subSequence(0, end) + mEllipsis);
}
}
}
// Some devices try to auto adjust line spacing, so force default line spacing
// and invalidate the layout as a side effect
setTextSize(TypedValue.COMPLEX_UNIT_PX, targetTextSize);
setLineSpacing(mSpacingAdd, mSpacingMult);
// Notify the listener if registered
if (mTextResizeListener != null) {
mTextResizeListener.onTextResize(this, oldTextSize, targetTextSize);
}
// Reset force resize flag
mNeedsResize = false;
}
// Set the text size of the text paint object and use a static layout to render text off screen before measuring
private int getTextHeight(CharSequence source, TextPaint paint, int width, float textSize) {
// modified: make a copy of the original TextPaint object for measuring
// (apparently the object gets modified while measuring, see also the
// docs for TextView.getPaint() (which states to access it read-only)
TextPaint paintCopy = new TextPaint(paint);
// Update the text paint object
paintCopy.setTextSize(textSize);
// Measure using a static layout
StaticLayout layout = new StaticLayout(source, paintCopy, width, Alignment.ALIGN_NORMAL, mSpacingMult, mSpacingAdd, true);
return layout.getHeight();
}
} | [
"[email protected]"
] | |
95baf87f13fc6c4f382d95336ea442289caa24f2 | 8c109977126082d5d7bf0d75fa99211e8274627a | /src/main/java/com/joi/api/eureka/EurekaServiceApplication.java | 9dd61180664a095e1dc9184436f0d09742a7b7ea | [] | no_license | RamyAshour/api-gatway | e94f0ac9901a3723ae8b93a48f158df4fb93bc24 | 8ce0320fbf5824c672474c688de3f7ad334078e1 | refs/heads/master | 2020-03-26T21:55:49.211356 | 2018-08-20T13:05:38 | 2018-08-20T13:05:38 | 145,418,624 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 511 | java | package com.joi.api.eureka;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
@EnableZuulProxy
@EnableEurekaServer
@SpringBootApplication
public class EurekaServiceApplication {
public static void main(String[] args) {
SpringApplication.run(EurekaServiceApplication.class, args);
}
}
| [
"Ramy@Ramy-Ashour"
] | Ramy@Ramy-Ashour |
c48f5912551e41ac97242d775b8bd9e6bf14207f | 2cdfef27af1483d3c59ce1b434bad29f01e2f28e | /JavaServer/JavaAPIServer/HttpParser.java | d47125ea9d7c100665485246ab01c34d3575e4ab | [] | no_license | MagnusCardell/Java | 0425078166f06740d5238fd1997bf570d362d950 | 18b9eaab9f936b98c3be187e900aa25fa92fe494 | refs/heads/master | 2021-05-03T10:21:12.837918 | 2018-02-08T01:22:17 | 2018-02-08T01:22:17 | 120,533,006 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 17,408 | java | /***
Copyright (C) 2004 Juho Vh-Herttua
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
import java.io.*;
import java.util.*;
import java.text.*;
import java.net.URLDecoder;
import java.nio.charset.*;
/** Class to parse an incoming HTTP request at a server */
public class HttpParser {
/** array of all HTTP reply codes and titles */
private static final String[][] HttpReplies =
{{"100", "Continue"},
{"101", "Switching Protocols"},
{"200", "OK"},
{"201", "Created"},
{"202", "Accepted"},
{"203", "Non-Authoritative Information"},
{"204", "No Content"},
{"205", "Reset Content"},
{"206", "Partial Content"},
{"300", "Multiple Choices"},
{"301", "Moved Permanently"},
{"302", "Found"},
{"303", "See Other"},
{"304", "Not Modified"},
{"305", "Use Proxy"},
{"306", "(Unused)"},
{"307", "Temporary Redirect"},
{"400", "Bad Request"},
{"401", "Unauthorized"},
{"402", "Payment Required"},
{"403", "Forbidden"},
{"404", "Not Found"},
{"405", "Method Not Allowed"},
{"406", "Not Acceptable"},
{"407", "Proxy Authentication Required"},
{"408", "Request Timeout"},
{"409", "Conflict"},
{"410", "Gone"},
{"411", "Length Required"},
{"412", "Precondition Failed"},
{"413", "Request Entity Too Large"},
{"414", "Request-URI Too Long"},
{"415", "Unsupported Media Type"},
{"416", "Requested Range Not Satisfiable"},
{"417", "Expectation Failed"},
{"500", "Internal Server Error"},
{"501", "Not Implemented"},
{"502", "Bad Gateway"},
{"503", "Service Unavailable"},
{"504", "Gateway Timeout"},
{"505", "HTTP Version Not Supported"}};
/** Default headers for HTTP replies, after first line */
public static final String [][] defaultReplyHeaders = {
{"X-Powered-By", "St Olaf MCA"},
{"Content-Type", "text/plain; charset=utf-8"},
{"Content-Length", "0"},
{"Date", ""},
{"Connection", "close"},
};
/** content type for JSON HTTP replies */
public static final String jsonContentType = "application/json; charset=utf-8";
/** Reader used for parsing an incoming request */
private BufferedReader reader;
/** HTTP method, such as GET, POST, etc., from line 1 of HTTP request */
private String method = "";
/** URL indicated in line 1 of HTTP request, with GET parameters removed */
private String url = "";
/** base component of URL indicated in line 1 of HTTP request */
private String urlBase = "";
/** final id component of URL indicated in line 1 of HTTP request */
private String urlId = "";
/** Filled with header label/value pairs during parsing.
Current implementation assumes only single-line headers */
private Hashtable<String,String> headers = new Hashtable<String,String>();
/** Filled with parameter key/value pairs during parsing */
private Hashtable<String,String> params = new Hashtable<String,String>();
/** Major and minor HTTP version numbers, from line 1 of HTTP request */
private int[] ver = new int[2];
/** Byte-array constructor
@param buff Contains an entire HTTP request
@param offset First byte of HTTP request
@param len Length of HTTP request
@sc Initializes state variables including <code>reader</code>, after
removing any extraneous whitespace from lines of the raw HTTP request */
public HttpParser(byte [] buff, int offset, int len) {
// remove any whitespace garbage from ends of lines
String str = new String(buff, offset, len, StandardCharsets.UTF_8);
//System.out.println("str: " + str);
String [] strs = str.split("\n");
str = "";
for (int i = 0; i < strs.length; i++)
str += strs[i].trim() + "\n";
//System.out.println("str: " + str);
reader = new BufferedReader(
new InputStreamReader(
new ByteArrayInputStream(str.getBytes())));
}
/** Stream constructor. Intended for use with InputStream from a Socket, but
doesn't behave well sometimes if whitespace appears before newlines.
@param is For reading input directly from a Socket. */
public HttpParser(InputStream is) {
reader = new BufferedReader(new InputStreamReader(is));
}
/** Perform parsing on a constructed object.
@return An HTTP reply code. Value 200 indicates that parsing succeeded,
other values indicate the nature of a parse failure. */
public int parseRequest() throws IOException {
String initial, cmd[], temp[];
int ret, idx, i;
ret = 200; // default is OK now
initial = reader.readLine();
if (initial == null || initial.length() == 0) return 0;
if (Character.isWhitespace(initial.charAt(0))) {
// starting whitespace, return bad request
return 400;
}
cmd = initial.split("\\s");
if (cmd.length != 3) {
return 400;
}
if (cmd[2].indexOf("HTTP/") == 0 && cmd[2].indexOf('.') > 5) {
temp = cmd[2].substring(5).split("\\.");
try {
ver[0] = Integer.parseInt(temp[0]);
ver[1] = Integer.parseInt(temp[1]);
} catch (NumberFormatException nfe) {
ret = 400;
}
}
else ret = 400;
//System.out.println("DEBUG: cmd[0]=" + cmd[0]);
if (cmd[0].equals("GET") || cmd[0].equals("HEAD")) {
method = cmd[0];
idx = cmd[1].indexOf('?');
if (idx < 0)
setUrl(cmd[1]);
else {
setUrl(URLDecoder.decode(cmd[1].substring(0, idx), "ISO-8859-1"));
//parseParams(cmd[1].substring(idx+1));
}
parseHeaders();
if (headers == null)
ret = 400;
if (!parsePOSTParams())
ret = 400;
} else if (cmd[0].equals("POST")) {
method = cmd[0];
setUrl(cmd[1]);
parseHeaders();
if (headers == null)
ret = 400;
if (!parsePOSTParams()){
System.out.println("No Params error POST");
ret = 400;
}
} else if (ver[0] == 1 && ver[1] >= 1) {
if (cmd[0].equals("PATCH")) {
method = cmd[0];
setUrl(cmd[1]);
parseHeaders();
if (headers == null)
ret = 400;
if (!parsePOSTParams())
ret = 400;
} else if (cmd[0].equals("DELETE")) {
method = cmd[0];
setUrl(cmd[1]);
parseHeaders();
if (headers == null)
ret = 400;
if (!parsePOSTParams())
ret = 400;
} else if (cmd[0].equals("OPTIONS") ||
cmd[0].equals("PUT") ||
cmd[0].equals("TRACE") ||
cmd[0].equals("CONNECT")) {
ret = 501; // not implemented
}
}
else {
// meh not understand, bad request
ret = 400;
}
if (ver[0] == 1 && ver[1] >= 1 && getHeader("Host") == null) {
ret = 400;
}
return ret;
}
/** Helper method for parseRequest(), to perform parsing of headers in
an HTTP request. */
private void parseHeaders() throws IOException {
String line;
int idx;
// rfc822 allows multiple lines, but that's not implemented here
line = reader.readLine();
while (!line.trim().equals("")) {
idx = line.indexOf(':');
if (idx < 0) {
headers = null;
break;
}
else {
headers.put(line.substring(0, idx).toLowerCase(), line.substring(idx+1).trim());
}
line = reader.readLine();
}
}
/** Helper method for parseRequest(), to perform parsing of GET-style
parameters in URL portion of an HTTP request.
@return True on success, false if string contains a parameter element
that contains no <code>=</code>. */
private boolean parseGETParams(String paramString)
throws UnsupportedEncodingException {
String [] prms = paramString.split("&");
int i;
//params = new Hashtable<String,String>(); // RAB note - why another?
for (i=0; i<prms.length; i++) {
String [] temp = prms[i].split("=");
if (temp.length == 2) {
// we use ISO-8859-1 as temporary charset and then
// String.getBytes("ISO-8859-1") to get the data
params.put(URLDecoder.decode(temp[0], "ISO-8859-1"),
URLDecoder.decode(temp[1], "ISO-8859-1"));
}
else if(temp.length == 1 && prms[i].indexOf('=') == prms[i].length()-1) {
// handle empty string separately
params.put(URLDecoder.decode(temp[0], "ISO-8859-1"), "");
}
}
return true;
}
/** Helper method for parseRequest(), to perform parsing of POST-style
parameters in content portion of an HTTP request.
@return True on success, false if <code>reader</code> encounters a line
that contains no <code>=</code>.*/
private boolean parsePOSTParams() throws IOException {
String line;
int idx;
line = reader.readLine();
while (line != null) {
System.out.println("DEBUG: " + line);
idx = line.indexOf('=');
if (idx < 0) {
return false;
} else {
params.put(line.substring(0, idx).toLowerCase(),
line.substring(idx+1).trim());
}
line = reader.readLine();
}
return true;
}
/** retrieve HTTP method from a parsed HTTP request */
public String getMethod() {
return method;
}
/** retrieve value of one header from a parsed HTTP request
@param label Label identifying a header line in that HTTP request
@return Value for header <code>label</code>, or null if no such header. */
public String getHeader(String label) {
if (headers != null)
return (String) headers.get(label.toLowerCase());
else return null;
}
/** retrieve all headers from a parsed HTTP request
@return Holds all label/value header pairs from that parsed HTTP request */
public Hashtable<String,String> getHeaders() {
return headers;
}
/** retrieve target URL from a parsed HTTP request
@return URL indicated in first line of that HTTP request */
public String getRequestURL() {
return url;
}
/** retrieve base URL for a REST API request.
@return Initial portion of the original request <code>url</code> that
indicates an API action to be performed. This portion of <code>url</code>
<ul>
<li>begins with <code>/</code>,</li>
<li>excludes a final path component if that component parses to an integer (see <code>getURLId()</code> to retrieve that component if present), and</li>
<li>does not end in <code>/</code> <em>except when</em> <code>urlId</code> = <code>/</code>.</li>
</ul>
*/
public String getURLBase() {
return urlBase;
}
/** retrieve final integer component of URL for a REST API request, if present.
@return If the final component of the request <code>url</code> parses
to an integer, return that component (with no <code>/</code> characters).
Otherwise, return empty string. */
public String getURLId() {
return urlId;
}
/** retrieve value of one parameter from a parsed HTTP request
@param key Key identifying a (GET or POST-style) parameter
in that HTTP request
@return Value for that parameter <code>key</code>, or null if no such
parameter. */
public String getParam(String key) {
return params.get(key);
}
/** retrieve all parameters from a parsed HTTP request
@return Holds all key/value parameter pairs from that parsed HTTP
request */
public Hashtable<String,String> getParams() {
return params;
}
/** Retrieve HTTP version for a parsed HTTP request
@return HTTP version as it appears in first line of that HTTP request */
public String getVersion() {
return ver[0] + "." + ver[1];
}
/** Compare HTTP version in a parsed HTTP request to alternative major/minor
version numbers
@param major An HTTP major version number
@param minor An HTTP minor version number
@return Negative if that request's HTTP version precedes
<code>major</code>.<code>minor</code>;
positive if that request's version comes after
<code>major</code>.<code>minor</code>; and
zero if the the version levels are the same. */
public int compareVersion(int major, int minor) {
if (major < ver[0]) return -1;
else if (major > ver[0]) return 1;
else if (minor < ver[1]) return -1;
else if (minor > ver[1]) return 1;
else return 0;
}
/** helper for parseRequest that assigns to URL-related state variables
@param origURL URL obtained from first line of HTTP request after
breaking off any GET-style parameters.
@sc Assigns <code>origURL</code> to state variable <code>url</code>,
assigns a normalized version (see getUrlBase() documentation)
of <code>origURL</code> after removing final integer path component
(if any) to <code>urlBase</code>, and assigns final integer path
component (or "" if none) to <code>urlId</code>.
*/
private void setUrl(String origURL) {
url = origURL;
urlBase = url;
// normalize urlBase to start with a slash, and not finish with one
// except in the root case urlBase = "/"
if (urlBase.charAt(0) != '/')
urlBase = "/" + urlBase;
int lastSlash = urlBase.lastIndexOf('/');
while (lastSlash != 0 && lastSlash == urlBase.length() - 1) {
urlBase = urlBase.substring(0,lastSlash);
lastSlash = urlBase.lastIndexOf('/');
}
// urlBase normalized, and lastSlash is index of / before final component
try {
String last = urlBase.substring(lastSlash+1); // final component
//Integer.parseInt(last);
urlId = last;
urlBase = urlBase.substring(0, lastSlash);
} catch (NumberFormatException e) {
System.out.println("Error in setURL(): " + e);
};
}
/** generate an HTTP reply message
@param code HTTP reply code
@param hdrs Headers to supplement/override <code>defaultReplyHeaders</code>
@param body Content of HTTP reply
@return Complete HTTP reply message
*/
public static String makeReply(int code, String [][] moreHdrs, String body) {
String ret = new String("HTTP/1.1 " + getHttpReply(code) + "\n");
Hashtable<String,String> hdrVals = new Hashtable<String,String>();
/* It's not necessary for (single-line) headers to appear in a consistent
order, but it's useful for writing code tests, so we implement it */
String hdrKeys0 = " "; // records header keys in order of appearance
int i;
for (i = 0; i < defaultReplyHeaders.length; i++) {
hdrVals.put(defaultReplyHeaders[i][0], defaultReplyHeaders[i][1]);
hdrKeys0 += defaultReplyHeaders[i][0] + " ";
}
hdrVals.put("Date", getDateHeaderValue());
hdrVals.put("Content-Length", Integer.toString(body.length()));
for (i = 0; i < moreHdrs.length; i++) {
hdrVals.put(moreHdrs[i][0], moreHdrs[i][1]);
if (hdrKeys0.indexOf(" " + moreHdrs[i][0] + " ") == -1)
hdrKeys0 += moreHdrs[i][0] + " ";
}
String [] hdrKeys = hdrKeys0.split(" ");
for (i = 1; i < hdrKeys.length; i++) {
ret += hdrKeys[i] + ": " + hdrVals.get(hdrKeys[i]) + "\n";
}
ret += "\n";
ret += body;
return ret;
}
/** generate an HTTP reply message
@param code HTTP reply code
@param body Content of HTTP reply
@return Complete HTTP reply message
*/
public static String makeReply(int code, String body) {
return makeReply(code, new String[][] {}, body);
}
/** generate an HTTP reply message with an empty content
@param code HTTP reply code
@return Complete HTTP reply message
*/
public static String makeReply(int code) {
return makeReply(code, "");
}
/** generate an HTTP reply message with JSON content
@param code HTTP reply code
@param body Content of HTTP reply
@return Complete HTTP reply message
*/
public static String makeJsonReply(int code, String body) {
return makeReply(code, new String[][] {
{"Content-Type", HttpParser.jsonContentType}
}, body);
}
/** Retrieve title for a given HTTP reply code
@param HTTP reply code
@return Title for that HTTP reply code <code>codevalue</code> */
public static String getHttpReply(int codevalue) {
String key, ret;
int i;
ret = null;
key = "" + codevalue;
for (i=0; i<HttpReplies.length; i++) {
if (HttpReplies[i][0].equals(key)) {
ret = codevalue + " " + HttpReplies[i][1];
break;
}
}
return ret;
}
/** generate value for a <code>Date:</code> header for an HTTP reply message
@return Properly formatted <code>Date:</code> header value for the current
time. */
public static String getDateHeaderValue() {
SimpleDateFormat format;
String ret;
format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss", Locale.US);
format.setTimeZone(TimeZone.getTimeZone("GMT"));
ret = format.format(new Date()) + " GMT";
return ret;
}
}
| [
"[email protected]"
] | |
3e18b0c39806449749218fd0ec77a983a5f5c7d8 | 9a42a6e340bb23a45beabb03d3de155f7af24c99 | /app/src/androidTest/java/com/mc/chi/mc_androidgps/ExampleInstrumentedTest.java | bd444779edea5c4936344ee1d01304c3c0ad3b72 | [] | no_license | ccTam/MC-GPS- | c5fb9fd130a1a1c76cd99238d5982d1ef86d3be6 | 39542ddc12e790e9fb20c27b4b7d2511a9d9f23c | refs/heads/master | 2021-06-24T19:46:42.549440 | 2017-09-08T01:32:51 | 2017-09-08T01:32:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 752 | java | package com.mc.chi.mc_androidgps;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.mc.chi.mc_androidgps", appContext.getPackageName());
}
}
| [
"[email protected]"
] | |
59dd575ea2403d7d506528aa43e504198cdbfc1e | 19293f6fd0ff81fbcffa32db40d62ad5889032a6 | /src/main/java/leetcode/LongestPalindromicString.java | dc78416927768d4cc610a975abd6c49055534568 | [] | no_license | Califax/InterviewPractice | ae68cedae8986944172e7700fdd13d3027afd8d9 | c520b7debd032cb4cd8e1367daea225e8a307182 | refs/heads/master | 2021-01-23T01:46:38.179431 | 2017-07-04T07:02:16 | 2017-07-04T07:02:16 | 92,892,311 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 854 | java | package leetcode;
// https://leetcode.com/problems/longest-palindromic-substring/#/description
// Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
//
// Example:
//
// Input: "babad"
//
// Output: "bab"
//
// Note: "aba" is also a valid answer.
// Example:
//
// Input: "cbbd"
//
// Output: "bb"
public class LongestPalindromicString {
public String longestPalindrome(String s) {
return null;
}
private boolean isPalindrome(String str) {
int start = 0;
int end = str.length() - 1;
while (start <= end) {
if (str.charAt(start) != str.charAt(end)) {
return false;
}
start++;
end--;
}
return true;
}
}
| [
"[email protected]"
] | |
8f92d02f9e77be0186536afa9dad987b158a9451 | 1c515ca703f455f123b99c514713028265c0bfd4 | /prac-prac/src/main/java/com/huxl/eshore/fileserver/server/ServerMain.java | aabc955f203f8c5a0cdda0ed71a367b922354e91 | [] | no_license | myk4727633/prac | e02280a7e342abc5eb3940e1b432eae60ec6b0b0 | 879aee9582597e4d9ad35f5931df6eee902df397 | refs/heads/master | 2022-06-14T21:24:44.347082 | 2020-04-30T13:23:26 | 2020-04-30T13:23:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 377 | java | package com.huxl.eshore.fileserver.server;
/**
*
* @author huxl
* @since 2019/12/20-14:16
*/
public class ServerMain {
public static void main(String[] args) {
int port = 8899;
String dirPath = "G:\\FTPService\\";
if (args.length == 2) {
port = Integer.parseInt(args[1]);
}
new Server(port,dirPath).run();
}
}
| [
"[email protected]"
] | |
a6cdcacf5d7cb343c4c18101b96f7053df5e3d63 | ed0092db9d11cf2a6db78a23cc6563aec1cfbf26 | /src/test/java/pages/AuthorizationPage.java | e84014863a8dc106d49eb056eab61d3c8831c33b | [
"Apache-2.0"
] | permissive | Dmitriy9210/projectTricolor | 8134ab433fea50e92846b26356240e9233fe626f | 2bef61a46395948b97f9cf66f78e7c0111d45bc8 | refs/heads/master | 2022-07-17T07:05:33.094276 | 2020-05-24T07:17:34 | 2020-05-24T07:17:34 | 266,043,092 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 748 | java | package pages;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import org.openqa.selenium.By;
import static org.openqa.selenium.By.id;
public class AuthorizationPage extends AbstractPage{
public AuthorizationPage(AppiumDriver<MobileElement> driver) {
super(driver);
}
private By fieldLogin = id("com.gsgroup.tricoloronline.mobile:id/authLogin");
private By fieldPassword = id("com.gsgroup.tricoloronline.mobile:id/authPass");
private By btnStartAuth = id("com.gsgroup.tricoloronline.mobile:id/startAuth");
public void authUser(String login, String password){
sendValue(fieldLogin, 5, login);
sendValue(fieldPassword, 5, password);
clickButton(btnStartAuth,5);
}
}
| [
"[email protected]"
] | |
9b0bcd4bc15141ee1539ebad74a4055ce3d195be | 4e3a22c61573e38dd1092b7009c2b886f74d0cb8 | /src/test/java/com/google/resting/vo/Result.java | 1c65382e70c918212023f796700653eda2008b72 | [] | no_license | CharkeyQK/resting | 84121cfbee84879b89e51cda0110a44239ab4e33 | cbbdd002fccbc7c3f57cc09738302311552486dc | refs/heads/master | 2021-01-12T05:50:05.503094 | 2016-12-24T08:52:11 | 2016-12-24T08:52:11 | 77,213,696 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,592 | java | /*
* Copyright (C) 2010 Google Code.
*
* 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.google.resting.vo;
public class Result {
private int quality;
private float latitude;
private float longitude;
private float offsetlat;
private float offsetlon;
private float radius;
private String name;
private String line1;
private String line2;
private String line3;
private String line4;
private String house;
private String street;
private String xstreet;
private String unittype;
private String unit;
private String postal;
private String neighborhood;
private String city;
private String county;
private String state;
private String country;
private String countrycode;
private String statecode;
private String countycode;
private String hash;
private int woeid;
private int woetype;
private int uzip;
public String toString() {
return "Latitude: " + latitude + ", Longitude: " + longitude + ", Postal code: " + postal;
}
}
| [
"[email protected]"
] | |
9e78c5d004bc7339d7f529ec58ddb10b92ac6fbc | 6b7713a66fecedf43e30d381112e6ab7a1ee3d64 | /3.JavaMultithreading/src/com/javarush/task/task22/task2202/Solution.java | 90a788cafb355897f024c82262382dd507bd8ed0 | [] | no_license | skobelkinvitaly/JavaRushTasksLevel19 | 3cfc885bbbe6dc5905fef5872e43d856ab01945a | b422ae36385194459294e06d6c25c3d4177732f1 | refs/heads/master | 2023-06-04T19:42:26.973467 | 2021-06-28T20:21:17 | 2021-06-28T20:21:17 | 283,007,112 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 984 | java | package com.javarush.task.task22.task2202;
/*
Найти подстроку
*/
public class Solution {
public static void main(String[] args) {
System.out.println(getPartOfString("JavaRush - лучший сервис обучения Java."));
}
public static String getPartOfString(String string) {
if (string == null) throw new TooShortStringException();
String formattedString = "";
String[] array = string.split(" ");
try {
for (int i = 0; i < 5; i++) {
if (i != 0) {
if (i == 1) {
formattedString = formattedString + array[i];
} else formattedString = formattedString + " " + array[i];
}
}
} catch (Exception e) {
throw new TooShortStringException();
}
return formattedString;
}
public static class TooShortStringException extends RuntimeException {
}
}
| [
"[email protected]"
] | |
e632de1ce776b84076c38a8ebe7700b16d5031d9 | c207acad24495afffeff597cd0415213a873755d | /app/src/main/java/com/eldereach/eldereach/client/hotline/HotlineListAdapter.java | ea7c51c3ca1aa0b55048a1a2e8658e32aeebdc46 | [
"MIT"
] | permissive | teo-jun-xiong/eldereach | 95a32a6773c168362eed1039fde90ec6518a6f10 | d52510381d1c9b160ab20339cd80d47705b72c51 | refs/heads/master | 2022-11-05T05:54:08.118407 | 2020-06-26T13:32:11 | 2020-06-26T13:32:11 | 261,681,188 | 0 | 0 | null | 2020-06-26T08:50:55 | 2020-05-06T07:16:41 | Java | UTF-8 | Java | false | false | 3,622 | java | package com.eldereach.eldereach.client.hotline;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.eldereach.eldereach.R;
import com.eldereach.eldereach.util.EldereachHotline;
import java.util.ArrayList;
import java.util.List;
public class HotlineListAdapter extends RecyclerView.Adapter {
private ArrayList<EldereachHotline> items;
private Context context;
HotlineListAdapter(ArrayList<EldereachHotline> hotlines, Context context) {
items = hotlines;
this.context = context;
}
// Inner class for a single RecyclerViewItem
private class ListViewHolder extends RecyclerView.ViewHolder {
private ImageView imageLogo;
private Dialog dialog;
ListViewHolder(@NonNull View itemView) {
super(itemView);
imageLogo = itemView.findViewById(R.id.imageHotline);
}
void bindView(int position) {
final EldereachHotline hotline = items.get(position);
imageLogo.setImageResource(hotline.getImage());
imageLogo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dialog = new Dialog(context);
dialog.setContentView(R.layout.dialog_hotline_client);
ImageView imagePopup = dialog.findViewById(R.id.imagePopup);
TextView textName = dialog.findViewById(R.id.textNamePopup);
TextView textDesc = dialog.findViewById(R.id.textDescriptionPopup);
TextView textHotline = dialog.findViewById(R.id.textHotlinePopup);
Button buttonCall = dialog.findViewById(R.id.buttonCall);
imagePopup.setImageResource(hotline.getImage());
textName.setText(hotline.getName());
textDesc.setText(hotline.getDescription());
textHotline.setText(hotline.getHotline());
buttonCall.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent callIntent = new Intent(Intent.ACTION_DIAL);
callIntent.setData(Uri.parse("tel:" + hotline.getHotline()));
context.startActivity(callIntent);
}
});
dialog.show();
}
});
}
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_hotline_client, parent, false);
return new ListViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
((ListViewHolder) holder).bindView(position);
}
@Override
public int getItemCount() {
return items.size();
}
// Replaces the list of items with another one - to be used for refreshing the view
public void addAll(List<EldereachHotline> list) {
items.clear();
items.addAll(list);
notifyDataSetChanged();
}
}
| [
"[email protected]"
] | |
fd900519449d9c32e985beb032eb153b022982ec | 28439267a6fa7c3b6f568e9b482be2df2032b2f3 | /kodilla-exception/src/main/java/com/kodilla/exception/test/Flight.java | 0303352818cd758254750b4c22d45bfd33eaa363 | [] | no_license | bartosz-kedziora/bartosz-kedziora-kodilla-java | ee31f8b13bcd187b689f3cd90baedda7976d2989 | 623fac2a1c6ce337fadb262a42f150d568d38ebd | refs/heads/master | 2023-06-11T23:37:36.277487 | 2021-07-07T16:35:46 | 2021-07-07T16:35:46 | 308,262,488 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 488 | java | package com.kodilla.exception.test;
public class Flight
{
private final String departureAirport;
private final String arrivalAirport;
public String getDepartureAirport()
{
return departureAirport;
}
public String getArrivalAirport()
{
return arrivalAirport;
}
public Flight(String departureAirport, String arrivalAirport)
{
this.departureAirport = departureAirport;
this.arrivalAirport = arrivalAirport;
}
}
| [
"[email protected]"
] | |
988f748260f5a130773d180aefe6fcad4f623116 | 1caf423dc5eeb40df34e0b75c08900562f881d66 | /stratosphere-java/src/main/java/eu/stratosphere/api/java/operators/translation/WrappingFunction.java | 4fed53025a9ad7c46bd705f2e083de57d166ccdc | [] | no_license | tuantrieu/stratosphere-1 | 50e3ccee0f3dcd568e57b2ad2a03609e0de31aa7 | 58c7babd2a120ce9cb7d410a9dfe1d2ff4ee831d | refs/heads/master | 2021-01-22T19:14:38.365217 | 2014-03-18T15:26:07 | 2014-03-18T15:26:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,853 | java | /***********************************************************************************************************************
*
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
**********************************************************************************************************************/
package eu.stratosphere.api.java.operators.translation;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import eu.stratosphere.api.common.accumulators.Accumulator;
import eu.stratosphere.api.common.accumulators.DoubleCounter;
import eu.stratosphere.api.common.accumulators.Histogram;
import eu.stratosphere.api.common.accumulators.IntCounter;
import eu.stratosphere.api.common.accumulators.LongCounter;
import eu.stratosphere.api.common.aggregators.Aggregator;
import eu.stratosphere.api.common.functions.AbstractFunction;
import eu.stratosphere.api.common.functions.IterationRuntimeContext;
import eu.stratosphere.api.common.functions.RuntimeContext;
import eu.stratosphere.configuration.Configuration;
import eu.stratosphere.types.Value;
import eu.stratosphere.util.Reference;
public abstract class WrappingFunction<T extends AbstractFunction> extends AbstractFunction {
private static final long serialVersionUID = 1L;
protected final T wrappedFunction;
protected WrappingFunction(T wrappedFunction) {
this.wrappedFunction = wrappedFunction;
}
@Override
public void open(Configuration parameters) throws Exception {
this.wrappedFunction.open(parameters);
}
@Override
public void close() throws Exception {
this.wrappedFunction.close();
}
@Override
public void setRuntimeContext(RuntimeContext t) {
super.setRuntimeContext(t);
if (t instanceof IterationRuntimeContext) {
this.wrappedFunction.setRuntimeContext(new WrappingIterationRuntimeContext(t));
}
else{
this.wrappedFunction.setRuntimeContext(new WrappingRuntimeContext(t));
}
}
private static class WrappingRuntimeContext implements RuntimeContext {
protected final RuntimeContext context;
protected WrappingRuntimeContext(RuntimeContext context) {
this.context = context;
}
@Override
public String getTaskName() {
return context.getTaskName();
}
@Override
public int getNumberOfParallelSubtasks() {
return context.getNumberOfParallelSubtasks();
}
@Override
public int getIndexOfThisSubtask() {
return context.getIndexOfThisSubtask();
}
@Override
public <V, A> void addAccumulator(String name, Accumulator<V, A> accumulator) {
context.<V, A>addAccumulator(name, accumulator);
}
@Override
public <V, A> Accumulator<V, A> getAccumulator(String name) {
return context.<V, A>getAccumulator(name);
}
@Override
public HashMap<String, Accumulator<?, ?>> getAllAccumulators() {
return context.getAllAccumulators();
}
@Override
public IntCounter getIntCounter(String name) {
return context.getIntCounter(name);
}
@Override
public LongCounter getLongCounter(String name) {
return context.getLongCounter(name);
}
@Override
public DoubleCounter getDoubleCounter(String name) {
return context.getDoubleCounter(name);
}
@Override
public Histogram getHistogram(String name) {
return context.getHistogram(name);
}
@Override
public <RT> Collection<RT> getBroadcastVariable(String name) {
Collection<Reference<RT>> refColl = context.getBroadcastVariable(name);
ArrayList<RT> list = new ArrayList<RT>(refColl.size());
for (Reference<RT> e : refColl) {
list.add(e.ref);
}
return list;
}
}
private static class WrappingIterationRuntimeContext extends WrappingRuntimeContext implements IterationRuntimeContext {
protected WrappingIterationRuntimeContext(RuntimeContext context) {
super(context);
}
@Override
public int getSuperstepNumber() {
return ((IterationRuntimeContext) context).getSuperstepNumber();
}
@Override
public <T extends Value> Aggregator<T> getIterationAggregator(String name) {
return ((IterationRuntimeContext) context).<T>getIterationAggregator(name);
}
@Override
public <T extends Value> T getPreviousIterationAggregate(String name) {
return ((IterationRuntimeContext) context).<T>getPreviousIterationAggregate(name);
}
}
}
| [
"[email protected]"
] | |
13c6542dd2858cde3ed8481520603d2c39792055 | f6b492b1231150119376154ff7b8cc0e180b307f | /api/src/main/java/com/pjp/bandmanapi/controller/FeedController.java | 2b3592f9d258d679406d7b2b9b6fc28a8608c68b | [] | no_license | ashleyperera1990/bandman | 5ecbbab2c17163209760eeeade86cccca1a52840 | 67f632a7b41941f866bf2df3f75c68cce504333f | refs/heads/master | 2020-03-25T18:53:36.461830 | 2018-08-08T18:43:02 | 2018-08-08T18:43:03 | 144,054,321 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,257 | java | package com.pjp.bandmanapi.controller;
import com.pjp.bandmanapi.model.Feed;
import com.pjp.bandmanapi.service.FeedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
public class FeedController {
@Autowired
private FeedService feedService;
@RequestMapping(value = "/feed", method = RequestMethod.POST)
public Feed createFeed(@RequestBody Feed feed) {
return feedService.create(feed);
}
@RequestMapping(value = "/feed", method = RequestMethod.PUT)
public Feed updateFeed(@RequestBody Feed feed) {
return feedService.update(feed);
}
@RequestMapping(value = "/feed", method = RequestMethod.GET)
public List<Feed> getFeed() {
return feedService.findAll();
}
@RequestMapping(value = "/feed/{id}", method = RequestMethod.GET)
public Feed getFeed(@PathVariable("id") Long id) {
return feedService.findById(id);
}
@RequestMapping(value = "band/feed/{id}", method = RequestMethod.GET)
public List<Feed> getBandFeeds(@PathVariable("id") Long bandId) {
return feedService.findByBandId(bandId);
}
@RequestMapping(value = "/feed", method = RequestMethod.DELETE)
public void deleteFeed() {
feedService.delete(1L);
}
}
| [
"Penelope01"
] | Penelope01 |
f7606f0f8125ea56aa5ee089b38b89c594d27e41 | 3e5649c0c35c409167be11a7abd27b8471e9da46 | /src/main/java/com/chen/account/service/IAccountService.java | c3379ae2a618c7a0a87d547b9bc0c6be1c3af507 | [] | no_license | StoneKings/spring-boot-stock | 54d64857c6c5ea0966778da9d21cdc8a3025ebb5 | a832b25477697729aa500032ac9e6fe924636618 | refs/heads/master | 2021-01-23T16:20:29.642251 | 2017-09-07T12:51:51 | 2017-09-07T12:51:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 357 | java | package com.chen.account.service;
import com.chen.common.http.entity.Response;
/**
* author long
* <p>
* date 17-9-4
* <p>
* desc
*/
public interface IAccountService {
Response getVerifyCode(String phone);
Response register(String phoneNumber, String password, String randomStr);
Response login(String phoneNumber, String password);
}
| [
"[email protected]"
] | |
6aa6dcfa3a9277049b722f686d26411bd26be529 | 92e304151e2d84791615ff023962a8b61f7e99f0 | /gameBoom_start/src/uet/oop/bomberman/graphics/SpriteSheet.java | d85307836b8a852c65d417db3ab612550e084846 | [] | no_license | minhcongnguyen1508/boomber_game_UET | 8efb78de77f1fde676775dc462d45d252e960b67 | 766b49fd8a8426dfbce520a22fadc87a99fba378 | refs/heads/master | 2020-06-09T00:06:40.414225 | 2019-06-23T14:13:34 | 2019-06-23T14:13:34 | 193,331,608 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,050 | java | package uet.oop.bomberman.graphics;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
/**
* Tất cả sprite (hình ảnh game) được lưu trữ vào một ảnh duy nhất
* Class này giúp lấy ra các sprite riêng từ 1 ảnh chung duy nhất đó
*/
public class SpriteSheet {
private String _path;
public final int SIZE;
public int[] _pixels;
// cắt từ hình classic
public static SpriteSheet tiles = new SpriteSheet("/textures/classic.png", 256);
// public static SpriteSheet tiles = new SpriteSheet("/textures/b.png", 256);
public SpriteSheet(String path, int size) {
_path = path;
SIZE = size;
_pixels = new int[SIZE * SIZE];
load();
}
private void load() {
try {
URL a = SpriteSheet.class.getResource(_path);
BufferedImage image = ImageIO.read(a);
int w = image.getWidth();
int h = image.getHeight();
image.getRGB(0, 0, w, h, _pixels, 0, w);
} catch (IOException e) {
e.printStackTrace();
System.exit(0);
}
}
}
| [
"[email protected]"
] | |
f5243118370dd7485c76344ddca825b91fd5e70c | e9affefd4e89b3c7e2064fee8833d7838c0e0abc | /aws-java-sdk-voiceid/src/main/java/com/amazonaws/services/voiceid/model/transform/InputDataConfigMarshaller.java | 027a778b5da9c638bd0063ef25c93f46f44e0a2a | [
"Apache-2.0"
] | permissive | aws/aws-sdk-java | 2c6199b12b47345b5d3c50e425dabba56e279190 | bab987ab604575f41a76864f755f49386e3264b4 | refs/heads/master | 2023-08-29T10:49:07.379135 | 2023-08-28T21:05:55 | 2023-08-28T21:05:55 | 574,877 | 3,695 | 3,092 | Apache-2.0 | 2023-09-13T23:35:28 | 2010-03-22T23:34:58 | null | UTF-8 | Java | false | false | 1,940 | java | /*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.voiceid.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.voiceid.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* InputDataConfigMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class InputDataConfigMarshaller {
private static final MarshallingInfo<String> S3URI_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("S3Uri").build();
private static final InputDataConfigMarshaller instance = new InputDataConfigMarshaller();
public static InputDataConfigMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(InputDataConfig inputDataConfig, ProtocolMarshaller protocolMarshaller) {
if (inputDataConfig == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(inputDataConfig.getS3Uri(), S3URI_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
| [
""
] | |
44382b3b366a020921181d88ce336425ae9c9681 | 69dc11b1d2a6a7c3b6d1302edf634cb53f36238a | /battleSystemPrototype3/Enemy.java | 0da2443b88f858a731570edc9e6dfae3af126bad | [] | no_license | Pixel-Biscuit-Devs/game-repository | e7902b312fd1cc6c78b60db9d534d134fd1b4d5d | f64dc9485ec488bb85a86f40fab9039fc4a891e0 | refs/heads/master | 2020-03-30T18:35:24.101540 | 2018-10-04T02:32:00 | 2018-10-04T02:32:00 | 151,506,576 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,723 | java | package main.battleSystemPrototype3;
import java.awt.Image;
public class Enemy {
String name;
private int healthPoints;
private int maxHealth;
private int pacifistPoints;
private int reqPacifPoints;
private int xpValue;
private int baseDamage;
public int cursor = (int) (Math.random() * 780 - 390);
public int[] ATKx;
private String[] actOptions;
private Image sprite;
public Enemy(String name, int healthPoints, int pacifistPoints, int xpValue, int baseDamage, int baseAccuracy, String[] actOptions, Image sprite) {
this.name = name;
this.setHealthPoints(healthPoints);
this.maxHealth = healthPoints;
this.setPacifistPoints(0);
this.reqPacifPoints = pacifistPoints;
this.xpValue = xpValue;
this.setBaseDamage(baseDamage);
this.actOptions = actOptions;
this.sprite = sprite;
}
public int getHealthPoints() {
return healthPoints;
}
public void setHealthPoints(int healthPoints) {
this.healthPoints = healthPoints;
}
public int getMaxHealth() {
return maxHealth;
}
public int getPacifistPoints() {
return pacifistPoints;
}
public void setPacifistPoints(int pacifistPoints) {
this.pacifistPoints = pacifistPoints;
}
public int getReqPacifPoints() {
return reqPacifPoints;
}
public int getXpValue() {
return xpValue;
}
public int getBaseDamage() {
return baseDamage;
}
public void setBaseDamage(int baseDamage) {
this.baseDamage = baseDamage;
}
public Image getSprite() {
return sprite;
}
// Use anonymous class to set these
public void doTurn() {
}
public void actOn(int index) {
}
public String[] getActOptions() {
return actOptions;
}
}
| [
"[email protected]"
] | |
7fffd7403abc532b556e2c91b673fde4fdf42ba7 | 647eef4da03aaaac9872c8b210e4fc24485e49dc | /TestMemory/wandoujia/src/main/java/com/unionpay/mpay/widgets/ac.java | f2fa294b3d5a22c5779f2c57f02da1b390ff393f | [] | no_license | AlbertSnow/git_workspace | f2d3c68a7b6e62f41c1edcd7744f110e2bf7f021 | a0b2cd83cfa6576182f440a44d957a9b9a6bda2e | refs/heads/master | 2021-01-22T17:57:16.169136 | 2016-12-05T15:59:46 | 2016-12-05T15:59:46 | 28,154,580 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,127 | java | package com.unionpay.mpay.widgets;
import android.content.Context;
import android.graphics.Shader.TileMode;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import com.unionpay.mpay.a.a;
import com.unionpay.mpay.c.c;
public final class ac extends LinearLayout
{
private c a = null;
private ImageView b = null;
private ImageView c = null;
public ac(Context paramContext)
{
this(paramContext, true);
}
public ac(Context paramContext, boolean paramBoolean)
{
super(paramContext);
this.a = c.a(paramContext);
setBackgroundColor(0);
setOrientation(1);
if (paramBoolean)
{
this.b = new ImageView(paramContext);
LinearLayout.LayoutParams localLayoutParams2 = new LinearLayout.LayoutParams(a.y, a.y);
localLayoutParams2.gravity = 21;
localLayoutParams2.rightMargin = a.a;
addView(this.b, localLayoutParams2);
}
this.c = new ImageView(paramContext);
ImageView localImageView = this.c;
Object localObject = this.a.a(1035, -1, -1);
if ((localObject != null) && ((localObject instanceof BitmapDrawable)))
{
localObject = (BitmapDrawable)localObject;
((BitmapDrawable)localObject).setTileModeXY(Shader.TileMode.REPEAT, Shader.TileMode.MIRROR);
((BitmapDrawable)localObject).setDither(true);
}
localImageView.setBackgroundDrawable((Drawable)localObject);
LinearLayout.LayoutParams localLayoutParams1 = new LinearLayout.LayoutParams(-1, a.u);
localLayoutParams1.gravity = 80;
addView(this.c, localLayoutParams1);
a(true);
}
public final void a(boolean paramBoolean)
{
Drawable localDrawable = this.a.a(1000, -1, -1);
if (!paramBoolean)
localDrawable = this.a.a(1002, -1, -1);
if (this.b != null)
this.b.setBackgroundDrawable(localDrawable);
}
}
/* Location: C:\WorkSpace\WandDouJiaNotificationBar\WanDou1.jar
* Qualified Name: com.unionpay.mpay.widgets.ac
* JD-Core Version: 0.6.0
*/ | [
"[email protected]"
] | |
0c0257ec96e7708e551ba553ba49ca5a516289ce | 0266e185afc31055a5b4c51bffe3a4850fa78cd7 | /src/com/ow/module/event/view/FunctionViewDetailEvent.java | a306073c03b1fec4a222885f1dec1099bee93aa0 | [] | no_license | mapleKirito/dmNew | acea5c10b874a517742ce4bfc399c766905fc03f | e1bd5243f316008d14fda9a09381fc09a851208a | refs/heads/master | 2020-04-27T16:31:18.375591 | 2019-04-03T06:30:17 | 2019-04-03T06:30:17 | 174,484,730 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,300 | java | package com.ow.module.event.view;
import java.util.HashMap;
import org.apache.log4j.Logger;
import com.ow.framework.common.Constant;
import com.ow.framework.data.po.ResultData;
import com.ow.framework.exception.DetailException;
import com.ow.framework.listener.event.EventExecutor;
import com.ow.framework.listener.event.EventListener;
public class FunctionViewDetailEvent implements EventListener{
static Logger log = Logger.getLogger(Constant.FRAMEWORK);
private ResultData resultData;
public FunctionViewDetailEvent()
{
resultData = new ResultData();
}
public ResultData event(EventExecutor eventExecutor) throws Exception {
try
{
String selectSqlId = eventExecutor.getSqlidByIndex(0);
String selectCNameSqlId = eventExecutor.getSqlidByIndex(1);
Object obj = eventExecutor.getSqlSession().selectOne(selectSqlId, eventExecutor.getBaseAction().getParamMap());
resultData.setOne(obj);
String path = eventExecutor.getBaseAction().getPath() == null ? "" : eventExecutor.getBaseAction().getPath();
String arrPath [] = path.split(",");
String bname = "";
for (int i=0; i<arrPath.length; i++){
if (arrPath[i] != null && !arrPath[i].equals("")){
eventExecutor.getBaseAction().getParamMap().put("cateID", arrPath[i]);
Object one = eventExecutor.getSqlSession().selectOne(selectCNameSqlId, eventExecutor.getBaseAction().getParamMap());
if (one != null){
String name = ((HashMap)one).get("cateName") == null?"" : ((HashMap)one).get("cateName").toString();
if (bname.equals("")){
bname = name;
}
else{
bname +=" > " + name;
}
}
}
}
String erName = "",erID = "";
if (obj != null){
erName = ((HashMap)obj).get("erName") == null ? "":((HashMap)obj).get("erName").toString();
erID = ((HashMap)obj).get("erID") == null ? "":((HashMap)obj).get("erID").toString();
}
if (!erName.equals(""))
bname += " > " + erName;
eventExecutor.getBaseAction().setBussessNavigation(bname);
return resultData;
}
catch (Exception e)
{
resultData.setIntResult(0);
String error = DetailException.expDetail(e, FunctionViewDetailEvent.class);
log.error(error);
}
return resultData;
}
}
| [
"[email protected]"
] | |
3ff2a61ec439c7cdc35dace74a5c13cb2aa4460d | cfe8c05c953e2f72f82ebb545a0527ba5b3f647d | /app/src/test/java/com/xancl/apptempl/ExampleUnitTest.java | b36d061b194cfebc608a1bffd39cdb7806439936 | [] | no_license | liuxk99/AppTempl | 31de81baadde6413e74f9710fb74ef7f0f6eae34 | 4d24dbd98d0760b6c50603f965ec64f61d5bd6fa | refs/heads/master | 2022-07-13T02:40:28.343850 | 2022-06-29T09:46:42 | 2022-06-29T09:46:42 | 101,262,729 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 396 | java | package com.xancl.apptempl;
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);
}
} | [
"[email protected]"
] | |
b7b9b31fe2ca7e6b335dd41cff0bb2aed52a3aaa | 668584d63f6ed8f48c8609c3a142f8bdf1ba1a40 | /prj/coherence-core/src/main/java/com/tangosol/net/topic/BinaryElementCalculator.java | 3fb6748f1b45ac9de7c5494d6d0094992c0b5a5b | [
"EPL-1.0",
"Classpath-exception-2.0",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-protobuf",
"CDDL-1.1",
"W3C",
"APSL-1.0",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"SAX-PD",
"MPL-2.0",
"MPL-1.1",
"CC-PDDC",
"BSD-2-Clause",
"Plexus",
"EPL-2.0",
"CDDL-1.0",
"LicenseRef-scancode-proprietary-license",
"MIT",
"CC0-1.0",
"APSL-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-only",
"LGPL-2.1-or-later",
"UPL-1.0"
] | permissive | oracle/coherence | 34c48d36674e69974a693925c18f097175052c5f | b1a009a406e37fdc5479366035d8c459165324e1 | refs/heads/main | 2023-08-31T14:53:40.437690 | 2023-08-31T02:04:15 | 2023-08-31T02:04:15 | 242,776,849 | 416 | 96 | UPL-1.0 | 2023-08-07T04:27:39 | 2020-02-24T15:51:04 | Java | UTF-8 | Java | false | false | 932 | java | /*
* Copyright (c) 2000, 2021, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.net.topic;
import com.tangosol.util.Binary;
/**
* A {@link NamedTopic.ElementCalculator} that calculates size of an element based on the
* size of the serialized binary value.
*
* @author Jonathan Knight 2021.05.17
* @since 21.06
*/
public class BinaryElementCalculator
implements NamedTopic.ElementCalculator
{
@Override
public int calculateUnits(Binary binElement)
{
return binElement != null ? binElement.length() : 0;
}
// ----- constants ------------------------------------------------------
/**
* A singleton instance of {@link BinaryElementCalculator}.
*/
public static final BinaryElementCalculator INSTANCE = new BinaryElementCalculator();
}
| [
"[email protected]"
] | |
db1f77042bf52d2a17716331d71da82fa294f6b0 | dea3ba99bb48a5d0841cd99c325ee26b7d1a0207 | /jiyin/app/src/main/java/com/qutu/talk/bean/dashen/MiLiIncomeBean.java | d37a648a0f3fb2474a1cd2acbc1c31d4579e6517 | [] | no_license | liukai0305/shop | f854394b8564b54fd7e31b710ba3efd21e927802 | 2f37659a7c5112251ad907ce5b66f0525c3975d8 | refs/heads/master | 2022-07-30T04:37:11.544146 | 2020-09-21T11:47:07 | 2020-09-21T11:47:07 | 297,322,383 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,033 | java | package com.qutu.talk.bean.dashen;
import java.util.List;
public class MiLiIncomeBean {
/**
* code : 1
* message : 请求成功
* data : {"totalPrice":0,"history":[{"count_date":"2019.11.17","total_price":"13.50"}]}
*/
private int code;
private String message;
private DataBean data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public static class DataBean {
/**
* totalPrice : 0
* history : [{"count_date":"2019.11.17","total_price":"13.50"}]
*/
private String totalPrice;
private List<HistoryBean> history;
public String getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(String totalPrice) {
this.totalPrice = totalPrice;
}
public List<HistoryBean> getHistory() {
return history;
}
public void setHistory(List<HistoryBean> history) {
this.history = history;
}
public static class HistoryBean {
/**
* count_date : 2019.11.17
* total_price : 13.50
*/
private String count_date;
private String total_price;
public String getCount_date() {
return count_date;
}
public void setCount_date(String count_date) {
this.count_date = count_date;
}
public String getTotal_price() {
return total_price;
}
public void setTotal_price(String total_price) {
this.total_price = total_price;
}
}
}
}
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.