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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f4e9529cedee449d48853080588614c47571f764 | 07b0c7c3f1a50a88bb32c8eef624d05f1c3bc9c4 | /SpringDataJPAPracticeExampleOfRD/src/main/java/com/rd/FlightController.java | 781720aa85254c478812638264b219c68a7efc75 | []
| no_license | gholaprd/spring-data-jpa | 8f7749fea60ab6a3432013161c4a005554f945cb | 76a83b950b41e343cb0a09387657fa122bf04955 | refs/heads/master | 2022-12-29T04:42:55.206274 | 2020-10-20T18:37:24 | 2020-10-20T18:37:24 | 305,648,995 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,440 | java | package com.rd;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import lombok.extern.slf4j.Slf4j;
@RestController
@Slf4j
//@RequestMapping("/flight")
public class FlightController {
@Autowired
private FlightRepository flightRepository;
@PostMapping(value = "/createFlight", produces = { MediaType.APPLICATION_JSON_VALUE })
public ResponseEntity<FlightDetails> createFlight(@RequestBody FlightDetails flightDetails) {
FlightDetails save = flightRepository.save(flightDetails);
return new ResponseEntity<FlightDetails>(save, HttpStatus.CREATED);
}
@GetMapping("getAllFlightDetails")
public ResponseEntity<List<FlightDetails>> findAll() {
List<FlightDetails> findAll = flightRepository.findAll();
return new ResponseEntity<List<FlightDetails>>(findAll, HttpStatus.OK);
}
@GetMapping(value = "findFlightByMasterId")
public ResponseEntity<FlightDetails> getFlightByFlightMasterId(@RequestParam("flightMasterId") int flightMasterId) {
Optional<FlightDetails> findbyId = flightRepository.findById(flightMasterId);
return new ResponseEntity<FlightDetails>(findbyId.get(), HttpStatus.OK);
}
@GetMapping(value = "/getAllFlightDetailsByDate", produces = {
MediaType.APPLICATION_JSON_VALUE })
public ResponseEntity<List<FlightDetails>> findFlightByDate(@RequestParam Map<String, String> queryParam) {
Date date1;
try {
date1 = new SimpleDateFormat("yyyy-MM-dd hh:mm").parse(queryParam.get("flightDate"));
List<FlightDetails> findAll = flightRepository.findByFlightDate(date1);
return new ResponseEntity<List<FlightDetails>>(findAll, HttpStatus.OK);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return new ResponseEntity<List<FlightDetails>>(HttpStatus.OK);
}
}
| [
"[email protected]"
]
| |
c66745ee1ef543f6fcc59ce5ce72c19cd4417555 | 7b2d3c3d2e3bd1cb68ef7204e8e46a4aee1c0ead | /.svn/pristine/78/78eda93de95ce05fa6ec1045d8fd29c733a1e815.svn-base | 6369c8c5cf6b544cfe611204a4710d055fb3d512 | []
| no_license | ywswen/myApp | 9809c4583d076219d2e311544b4cfe1c68b7d0b9 | 8433273ed62d9f79afdde7381a215b9a2593ba2b | refs/heads/master | 2021-01-19T10:38:53.583495 | 2019-05-02T23:33:21 | 2019-05-02T23:33:21 | 59,978,241 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,838 | package com.yyy.dailycode.wyp.HTML;
/**
* @author win young
*
* @创建时间:2012-7-26 下午02:32:47
*
* @version 1
*
* @类说明:
*/
/**
*
*/
import java.io.File;
import java.io.FileOutputStream;
import java.io.StringReader;
import java.util.List;
import com.lowagie.text.Document;
import com.lowagie.text.Element;
import com.lowagie.text.HeaderFooter;
import com.lowagie.text.PageSize;
import com.lowagie.text.Paragraph;
import com.lowagie.text.Phrase;
import com.lowagie.text.Rectangle;
import com.lowagie.text.html.simpleparser.HTMLWorker;
import com.lowagie.text.html.simpleparser.StyleSheet;
//import com.lowagie.text.rtf.RtfWriter2;
import com.lowagie.text.rtf.RtfWriter2;
/**
* @author w397090770
* Create Data: 2012-7-18
* Email: [email protected]
*
* 版权所有,翻版不究,但是在修改本程序的时候务必加上这些注释。谢谢
* 仅用于学习交流之用
*/
public class SaveAsDOC {
@SuppressWarnings("unchecked")
public void getDoc(File file, String contents, String title) throws Exception {
//file是保存文件的文件夹路径,contests是前面处理好的网页源码,title是帖子的标题,用于标记生成的文件名
File saveFileName = new File(file.getAbsoluteFile() + File.separator + title + ".doc");
if(!saveFileName.exists()){
saveFileName.createNewFile();
}else{ //和以前处理txt文件一样,如果先前这个文件已经存在,我们就不打算再去生成doc文件了,直接返回
return;
}
// 设置纸张大小
Document document = new Document(PageSize.A4);
// 建立一个书写器(Writer)与document对象关联,通过书写器(Writer)可以将文档写入到磁盘中
RtfWriter2.getInstance(document,new FileOutputStream(saveFileName));
document.open();
// 设置中文字体
//BaseFont bfChinese = BaseFont.createFont("STSongStd-Light","UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
// 正文字体风格
//Font contextFont = new Font(bfChinese, 12, Font.NORMAL);
// 添加页眉
HeaderFooter header = new HeaderFooter(new Phrase(title), false);
header.setAlignment(Rectangle.ALIGN_CENTER);
document.setHeader(header);
// 添加页脚
/*HeaderFooter footer = new HeaderFooter(new Phrase(), false);
footer.setAlignment(Rectangle.ALIGN_CENTER);
document.setFooter(footer);*/
Paragraph paragraph = new Paragraph();
paragraph.setAlignment(Element.ALIGN_LEFT);
paragraph.setFirstLineIndent(20);
StyleSheet ss = new StyleSheet();
// 添加网页里面的东西
List<Element>htmlList = HTMLWorker.parseToList(new StringReader(contents),ss);
for (int i = 0; i < htmlList.size(); i++) {
Element e = htmlList.get(i);
paragraph.add(e);
}
document.add(paragraph);
document.close();
}
}
| [
"[email protected]"
]
| ||
c1e81c70a30e701c098a1115e60f77de18f4dd77 | 3e33ea74b627af388755ad878192a69532e6c053 | /lcz-meta/src/main/java/cn/lcz/meta/kafka/TestKafkaEntity.java | febc02396c521722fabb309505d3e4c46cb91a8a | []
| no_license | liucz880415/lcz | 94fcce3aacb396e13c4fa99b72325f12ebb4cb57 | 32650aac51ceac98caa7bb88038ce076bce30b43 | refs/heads/master | 2021-01-24T18:27:41.373218 | 2017-05-18T02:14:05 | 2017-05-18T02:14:05 | 84,424,619 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 701 | java | package cn.lcz.meta.kafka;
import cn.lcz.meta.annotation.Key;
import java.io.Serializable;
/**
* Created by liuchuanzhu on 2017/3/13.
*/
public class TestKafkaEntity implements Serializable {
@Key
private String name;
private String message;
public TestKafkaEntity() {
}
public TestKafkaEntity(String name, String message) {
this.name = name;
this.message = message;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
| [
"[email protected]"
]
| |
914f7b739bd6af39e59ca3f2836c151230bf39d6 | 55fbedbc06c813a717c09c4416dfb0f7f9909955 | /Chapt4/src/coin/CountFlips.java | 0ce6ee45beba13a32b2a9edc36d84a9c63bd5639 | []
| no_license | tklg/CompSci | d8002c94f9abcbbe7d0166f3dca1ed81737bd193 | 7848d2e43499eb8f6369119a4fb6a5fc18824817 | refs/heads/master | 2022-10-04T21:23:14.785642 | 2015-03-06T18:45:51 | 2015-03-06T18:45:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 587 | java | package coin;
import villa7.Print;
public class CountFlips {
private static Print p = new Print();
private static Coin c = new Coin();
private static BiasedCoin bc = new BiasedCoin();
public static void main(String[] args) {
final int NUM_FLIPS = 1000;
int heads = 0,
tails = 0;
for (int co = 1; co <= NUM_FLIPS; co++) {
c.flip();
if(c.isHeads()) {
heads++;
} else {
tails++;
}
}
p.nl("The number of flips: " + NUM_FLIPS);
p.nl("The number of heads: " + heads);
p.nl("The number of tails: " + tails);
}
}
| [
"[email protected]"
]
| |
877737bd8fed5eb01d261706dd4906d55f7ef926 | b56c20af6bfd7adae0f4387f4d52ec065829b2ba | /Selenium/src/Basics/ActionsEx.java | 29a051a9f386e5b7311e88da09eaae3e2c9c62c6 | []
| no_license | OnlineTestingHelp/SeleniumAllPrograms | 2758939bffd75849528a6230c7e434e3f1714e24 | 7e63e145d4658dda7cff833a35ad2b93b25a3bfb | refs/heads/master | 2023-04-06T15:52:20.568297 | 2021-04-13T03:24:18 | 2021-04-13T03:24:18 | 357,409,261 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,681 | java | package Basics;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
import org.testng.annotations.Test;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.remote.RemoteWebDriver;
import Reusable.ReusableMethods;
public class ActionsEx extends ReusableMethods{
@Test(enabled=false)
public void Actions() throws InterruptedException {
launch("https://the-internet.herokuapp.com/hovers",10);
By user3 = By.xpath("(//div[@id='content']//img)[3]");
By username = By.xpath("//h5[text()='name: user3']");
WebElement user3ele = driver.findElement(user3);
WebElement user3name = driver.findElement(username);
Actions a = new Actions(driver);
a.moveToElement(user3ele).build().perform();
Thread.sleep(5000);
//Get the user name
String text = user3name.getText();
System.out.println("text is "+ text);
}
@Test(enabled=false)
public void ActionsInnerMenus() throws InterruptedException {
launch("https://the-internet.herokuapp.com/jqueryui/menu",10);
WebElement enabled = driver.findElement(By.xpath("//a[text()='Enabled']"));
WebElement downloads = driver.findElement(By.xpath("//a[text()='Downloads']"));
WebElement Excel = driver.findElement(By.xpath("//a[text()='Excel']"));
Actions a =new Actions(driver);
a.moveToElement(enabled).pause(2000).moveToElement(downloads).pause(2000).moveToElement(Excel).click().build().perform();
// a.moveToElement(enabled).build().perform();
// a.moveToElement(downloads).build().perform();
// a.moveToElement(Excel).build().perform();
driver.close();
}
@Test(enabled=false)
public void ActionsDragAndDrop() throws InterruptedException {
launch("https://jqueryui.com/droppable/",10);
driver.switchTo().frame(0);
WebElement itemtodrop = driver.findElement(By.xpath("//div[@id='draggable']"));
WebElement wheretodrop = driver.findElement(By.xpath("//div[@id='droppable']"));
Actions a =new Actions(driver);
a.dragAndDrop(itemtodrop, wheretodrop).build().perform();
}
@Test(enabled=false)
public void ActionsDragAndDropBy() {
launch("https://jqueryui.com/slider/",10);
driver.switchTo().frame(0);
WebElement slider = driver.findElement(By.xpath("//div[@id='slider']/span"));
Actions a =new Actions(driver);
a.dragAndDropBy(slider, 300, 0).build().perform();
}
@Test(enabled=false)
public void ActionsKeysEx() throws InterruptedException {
launch("https://www.google.com/",10);
WebElement searchbox = driver.findElement(By.xpath("//input[@name='q']"));
Actions a =new Actions(driver);
a.sendKeys(searchbox, "Selenium Automation").build().perform();
Thread.sleep(3000);
a.sendKeys(Keys.DOWN,Keys.DOWN,Keys.DOWN,Keys.DOWN,Keys.ENTER).build().perform();
Thread.sleep(5000);
driver.findElement(By.xpath("//input[@name='q']")).click();
a.keyDown(Keys.CONTROL).sendKeys("a").pause(3000).keyUp(Keys.CONTROL).sendKeys(Keys.DELETE).build().perform();
}
@Test
public void ActionsClickAndHold() throws InterruptedException {
launch("https://jqueryui.com/selectable/",10);
((RemoteWebDriver)driver).executeScript("window.scrollBy(0,200)", "");
driver.switchTo().frame(0);
List<WebElement> allitems = driver.findElements(By.xpath("//ol[@id='selectable']/li"));
Actions a =new Actions(driver);
Thread.sleep(3000);
a.clickAndHold(allitems.get(0)).pause(2000).moveToElement(allitems.get(5)).release().build().perform();
}
}
| [
"[email protected]"
]
| |
e3e152e879c1cf2c426a42d8a88a1ee9d2f967a9 | ff48ba7aac052e20e755ef0417c1b4e3a2d22c21 | /tianmao-web-common/src/main/java/com/tianmao/app/interceptor/WebMvcSupportConfigurer.java | 5f113984039b0ce54b0aa1c748bb4aea108fe2b3 | []
| no_license | designreuse/tianmao | 9b305fe7458b0d0302bfedb1c20729d308081b26 | 78ec32ce6cb27f2cc378ae7537f356010930a9d4 | refs/heads/master | 2020-04-07T23:35:31.764601 | 2018-08-20T03:43:17 | 2018-08-20T03:43:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,590 | java | package com.tianmao.app.interceptor;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.tianmao.app.config.AppContext;
import com.tianmao.app.converter.*;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.web.servlet.ErrorPage;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.TimeZone;
/**
* WebMvc全局配置
* Created by roach on 2017/6/2.
*/
@Configuration
public class WebMvcSupportConfigurer extends WebMvcConfigurerAdapter {
@Bean
public AppContext appContext() {
return new AppContext();
}
/**
* 配置项目404路径
* @return
*/
@Bean
public EmbeddedServletContainerCustomizer containerCustomizer() {
return container -> {
container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/404"));
};
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/favicon.ico").addResourceLocations("classpath:/favicon.ico");
registry.addResourceHandler("/MP_verify_0jYoJ6H0rNDTioIx.txt").addResourceLocations("classpath:/MP_verify_0jYoJ6H0rNDTioIx.txt");
registry.addResourceHandler("/robots.txt").addResourceLocations("classpath:/robots.txt");
registry.addResourceHandler("/js/**").addResourceLocations("classpath:/static/js/");
registry.addResourceHandler("/css/**").addResourceLocations("classpath:/static/css/");
registry.addResourceHandler("/fonts/**").addResourceLocations("classpath:/static/fonts/");
registry.addResourceHandler("/images/**").addResourceLocations("classpath:/static/images/");
registry.addResourceHandler("/assets/**").addResourceLocations("classpath:/static/assets/");
registry.addResourceHandler("/plugins/**").addResourceLocations("classpath:/static/plugins/");
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
registry.addResourceHandler("/js/plugins/**").addResourceLocations("classpath:/static/plugins/");
}
/**
* 类型转换器
*
* @param registry
*/
@Override
public void addFormatters(FormatterRegistry registry) {
registry.addConverterFactory(new IndexToEnumConverter());
registry.addConverter(new StringToDateConverter());
registry.addConverter(new StringToTimeConverter());
}
/**
* 转换器
*
* @param converters
*/
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
super.configureMessageConverters(converters);
MappingJackson2HttpMessageConverter jackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter();
ObjectMapper objectMapper = new ObjectMapper();
//序列化日期时以timestamps输出,默认true
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, true);
//忽略json字符串中不识别的属性
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
//没有匹配的属性名称时不作失败处理
objectMapper.enable(MapperFeature.AUTO_DETECT_FIELDS);
//序列化枚举是以ordinal()来输出,默认false
objectMapper.configure(SerializationFeature.WRITE_ENUMS_USING_INDEX, true);
// 忽略无法转换的对象
objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
objectMapper.setTimeZone(TimeZone.getTimeZone("GMT+8"));
//将null转换化""
objectMapper.getSerializerProvider().setNullValueSerializer(new JsonSerializer<Object>() {
@Override
public void serialize(Object value, JsonGenerator jsonGenerator, SerializerProvider sp) throws IOException {
jsonGenerator.writeObject("");
}
});
SimpleModule module = new SimpleModule();
module.addSerializer(new NumericBooleanSerializer(Boolean.class));
//判断是否app应用
if (!AppContext.webApp) {
//json返回枚举对象
module.addSerializer(new EnumSerializer(Enum.class));
//为null的属性值不映射
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
}
objectMapper.registerModule(module);
List<MediaType> fastMediaTypes = new ArrayList<>();
fastMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
jackson2HttpMessageConverter.setSupportedMediaTypes(fastMediaTypes);
jackson2HttpMessageConverter.setObjectMapper(objectMapper);
jackson2HttpMessageConverter.setDefaultCharset(Charset.forName("UTF-8"));
converters.add(jackson2HttpMessageConverter);
}
}
| [
"171375063"
]
| 171375063 |
a0a89ffe2f60a8651f44013d8dfea214d2723f96 | 9373fe952c96922d53468edbd844519b038d2c28 | /Java/Loon-Neo/src/loon/action/map/ArrayInt2DAStar.java | 82dd70efa0398360ef959d58e1ec7be78f5b326a | [
"Apache-2.0"
]
| permissive | dc6273632/LGame | 58f2820db7baf76099e565f75ce7edd0eb600b7c | eccae858c2f40f8f5a5da9b9a62613ccb68d66fc | refs/heads/master | 2020-04-29T18:02:40.009966 | 2019-03-18T08:59:43 | 2019-03-18T08:59:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,185 | java | /**
* Copyright 2014
*
* 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.
*
* @project loon
* @author cping
* @email [email protected]
* @version 0.4.2
*/
package loon.action.map;
import loon.utils.CollectionUtils;
import loon.utils.SortedList;
import loon.utils.TArray;
public class ArrayInt2DAStar {
public static interface TileFactory<T> {
public T create(int m, int n);
}
public static interface Map {
public int[][] adjacent(int[] position);
public boolean reachable(int[] position);
public int roughness(int[] position);
public int baseRoughness();
public int distance(int[] start, int[] end);
}
protected static class Node implements Comparable<Node> {
int[] position;
int f, g, h;
Node parent;
public Node(int[] position) {
this.position = CollectionUtils.copyOf(position);
}
public boolean equals(int[] position) {
return this.position[0] == position[0]
&& this.position[1] == position[1];
}
@Override
public int compareTo(Node another) {
int result = this.f - another.f;
if (result == 0) {
result = this.h - another.h;
}
return result;
}
}
protected static class NodeList extends TArray<Node> {
public Node find(int[] position) {
for (int i = size - 1; i >= 0; i--) {
Node node = get(i);
if (node.equals(position)) {
return node;
}
}
return null;
}
public void insert(Node node) {
for (int i = size; i > 0; i--) {
Node n = get(i - 1);
if (node.compareTo(n) >= 0) {
insert(i, node);
return;
}
}
insert(0, node);
}
public void sort(Node node) {
for (int i = size - 1; i >= 0; i--) {
Node n = get(i);
if (n == node) {
for (; i > 0; i--) {
n = get(i - 1);
if (node.compareTo(n) >= 0) {
return;
} else {
set(i, n);
set(i - 1, node);
}
}
}
}
}
}
public static class Path {
public SortedList<int[]> positions;
public int cost;
}
public static Path findPath(ArrayInt2DAStar.Map map, int[] start, int[] end) {
return findPath(map, start, end, 0);
}
public static Path findPath(ArrayInt2DAStar.Map map, int[] start,
int[] end, int endRadius) {
NodeList openNodes = new NodeList();
NodeList closedNodes = new NodeList();
openNodes.add(new Node(start));
Node found = null;
for (;;) {
if (openNodes.size == 0) {
return null;
}
Node node = openNodes.removeIndex(0);
int distance = map.distance(node.position, end);
if (distance <= endRadius) {
found = node;
break;
}
closedNodes.add(node);
int[][] positions = map.adjacent(node.position);
for (int[] position : positions) {
if (!map.reachable(position)) {
continue;
}
if (closedNodes.find(position) != null) {
continue;
}
Node openNode = openNodes.find(position);
if (openNode == null) {
Node newNode = new Node(position);
newNode.g = node.g + map.roughness(position);
newNode.h = map.distance(position, end)
* map.baseRoughness();
newNode.f = newNode.g + newNode.h;
newNode.parent = node;
openNodes.insert(newNode);
} else {
int g = node.g + map.roughness(position);
if (openNode.g > g) {
openNode.g = g;
openNode.f = openNode.g + openNode.h;
openNode.parent = node;
openNodes.sort(openNode);
}
}
}
}
if (found == null) {
return null;
}
Path path = new Path();
path.cost = found.g;
SortedList<int[]> positions = new SortedList<int[]>();
while (found != null) {
positions.addFirst(found.position.clone());
found = found.parent;
}
path.positions = positions;
return path;
}
}
| [
"[email protected]"
]
| |
66d534a1ce6749216ea2d544b3da1397562f009c | 3148d2594a58d088c79580919ddf6be214adfe82 | /Performer.java | fe5fcb0ba53c2cae9b67fe719f913b94e114be96 | []
| no_license | GoodLuckJack/DesignPattern | 199dcd5a82e44de9197afe598e22f0551744c75f | 1e1cef5d0507b08ee07a7b3d54a969aa48c76d08 | refs/heads/master | 2021-09-06T11:56:34.493878 | 2018-02-06T08:49:51 | 2018-02-06T08:49:51 | 119,942,642 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 100 | java | package com.gtja.pattern;
public abstract class Performer {
public abstract void perform();
}
| [
"[email protected]"
]
| |
055ebf79eef2465f05572dc0d8a41ee0e71a6826 | c944bb6aebc2f241dd16dd2c1d20115cd39bc9e7 | /src/sicherheit/authentifizierung/ClientMitAnmeldung.java | af1926d2ce5a711c1838fc985649a3cdebef8f2b | []
| no_license | wern/EnterpriseJavaBeans3.1_Beispiele | 76a0f41966499b7875f86e2ded9d2cbec9ed8d39 | 5d61b9b64020918342e7cc102bc0233f551facde | refs/heads/master | 2021-01-19T15:40:23.828785 | 2012-04-19T13:54:39 | 2012-04-19T13:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,189 | java | /**********************************************************
* Begleitmaterial zum Buch "Enterprise JavaBeans 3.1"
* Das EJB-Praxisbuch fuer Ein- und Umsteiger
* Von Werner Eberling und Jan Lessner
* Hanser Fachbuchverlag Muenchen, 2011
* http://www.hanser.de/buch.asp?isbn=3-446-42259-5
* Feedback an [email protected]
**********************************************************/
package sicherheit.authentifizierung;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
public class ClientMitAnmeldung {
public static void main(String[] args) throws Exception {
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jboss.security.jndi.JndiLoginInitialContextFactory");
properties.put(Context.PROVIDER_URL, "jnp://localhost:1099");
System.out.println("Anmeldung am Server als Jan.");
properties.put(Context.SECURITY_PRINCIPAL, "Jan");
properties.put(Context.SECURITY_CREDENTIALS, "werner");
Tor tor = (Tor) new InitialContext(properties).lookup("Tor/remote");
tor.klopfen();
System.out.println("Die Ausgabe steht im Server-Log.");
}
}
| [
"[email protected]"
]
| |
647a768531f7d1c838375fd9fbd54d2be803e7a9 | 535d14a51b2d6088761508d288bd7f2ce50243c4 | /src/main/java/com/kgcorner/chess/Game.java | 2e0c3c0ecf4b7da000b420dfdc486766d77d863f | [
"Apache-2.0"
]
| permissive | kgcorner/Jchess | df0eec6c394a18eda6dba449138b8270baf2f57e | b558a734552fe9e41586c388de8839338a58ee64 | refs/heads/master | 2020-05-25T17:38:17.673924 | 2019-05-21T21:04:02 | 2019-05-21T21:04:02 | 187,912,832 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 313 | java | package com.kgcorner.chess;
/*
Description : <Write is class Description>
Author: kumar
Created on : 21/5/19
*/
public class Game {
public static void main(String[] args) {
Board board = new Board();
board.initialize();
board.printBoard();
GameGuide.startGame(board);
}
} | [
"[email protected]"
]
| |
67b9010a7863dcc791a0b1bead0fbe569bd74a0f | a653d3893db2059575f958baac65d843cd984148 | /src/main/java/com/mycompany/sf/TradeCounter.java | b7a27e720a6716605a47607512f3d466acde1063 | []
| no_license | jwymah/sf | dcde8db76dd38517767945bbc66d1d2a47c14698 | 3bae674ec51388210d84398afafdd4903727b712 | refs/heads/master | 2022-08-01T11:22:28.562029 | 2019-09-14T00:57:40 | 2019-09-14T00:57:40 | 208,369,597 | 0 | 0 | null | 2022-05-20T21:09:51 | 2019-09-14T00:55:25 | Java | UTF-8 | Java | false | false | 942 | java | package com.mycompany.sf;
import java.util.concurrent.atomic.AtomicInteger;
class TradeCounter {
private final String ticker;
private final AtomicInteger counter;
public TradeCounter(String ticker) {
this.ticker = ticker;
counter = new AtomicInteger();
}
public void adjustCount(int i) {
this.counter.addAndGet(i);
}
public String getTicker() {
return ticker;
}
public int getCount() {
return counter.get();
}
@Override
public String toString() {
if (counter.intValue() > 0) {
return String.format("%d,%s,%s", getCount(), TradeType.BUY.name(), ticker);
}
else if (counter.intValue() < 0) {
return String.format("%d,%s,%s", -getCount(), TradeType.SELL.name(), ticker);
}
return String.format("%d,%s,%s this should not be shown", getCount(), TradeType.SELL.name(), ticker);
}
} | [
"[email protected]"
]
| |
9094473ce312ba3a45a8fe76ce3dc45035fa16ba | 618ebea47550cfb24838be4bb0bf139f3c7a36da | /src/myinterface/Vehicle.java | b886bdd457684b5e7633ae4dbee083667db4ead8 | []
| no_license | ysyha2/git2.javastudy | c032739c1efb4f7956e5a146f89e8bdac025e652 | bcfb70990d1dc1595d9c276c50d405a0f61251a1 | refs/heads/main | 2023-06-10T13:55:17.672144 | 2021-07-01T12:00:08 | 2021-07-01T12:00:08 | 382,016,390 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 124 | java | package myinterface;
public interface Vehicle {
int acceleration();
int deceleration();
boolean ride();
}
| [
"[email protected]"
]
| |
e291704b92a45e7b0df4a44b9e9d2468581b57b8 | cc328476eba0f9dcbac108688cf1b97d1d06c189 | /src/main/java/com/cisco/policyconversiontool/dto/wsa/asyncos806/ProxAclCustomCategoryForService.java | a858e60ec7704c43e9dc77a98df40155c94a1042 | []
| no_license | SecurView/cws-wsa | b9278caee8d52afd9f71b925516bc18380b5c331 | c3e9c245722f89d9a3189bf7bc9700e8b4c7f1d6 | refs/heads/master | 2016-09-06T21:35:20.674191 | 2014-12-19T14:45:23 | 2014-12-19T14:45:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,896 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.11.26 at 05:46:49 PM IST
//
package com.cisco.policyconversiontool.dto.wsa.asyncos806;
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;
/**
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"service",
"option"
})
@XmlRootElement(name = "prox_acl_custom_category_for_service")
public class ProxAclCustomCategoryForService {
@XmlElement(required = true)
protected String service;
@XmlElement(required = true)
protected String option;
/**
* Gets the value of the service property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getService() {
return service;
}
/**
* Sets the value of the service property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setService(String value) {
this.service = value;
}
/**
* Gets the value of the option property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOption() {
return option;
}
/**
* Sets the value of the option property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOption(String value) {
this.option = value;
}
}
| [
"[email protected]"
]
| |
1a1be78bc49c6138387e945326b3ffb4d48dde4c | 1556b1bad7ff19b6811e353d66fa5946a3c4e5b1 | /src/main/java/com/ioc/beanannotation/multibean/BeanTwo.java | 81763f913facdb92c19309858121a3ce0fe3554e | []
| no_license | xianglingchuan/java-learn-record-project | 8e104ba8bc48b51ba66213d31a200372805359ac | 92a193b0adde8773d8d3a2f843a8f7606d528ca0 | refs/heads/master | 2021-01-19T08:03:59.145502 | 2018-01-17T09:57:02 | 2018-01-17T09:57:02 | 82,068,808 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 234 | java | package com.ioc.beanannotation.multibean;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@Order(1) //list列表排序
@Component
public class BeanTwo implements BeanInterface {
}
| [
"[email protected]"
]
| |
189e8b9f94d7d50f23f5a0b3cfc0814bf60f5d05 | b27f51151822a6097840f11b07d964e9ad3f7232 | /camlibrary/src/main/java/com/library/camlibrary/videoTrimmer/utils/FileUtils.java | 5baeb8735d4ae2ab5a04c926f4b69e450b8b057a | []
| no_license | osamaaftab/Camlib | c8adc642de12c10739ccf307046ca675449e67d2 | 9037700cdb68cba839e0d0bd66ad562d233c2249 | refs/heads/master | 2020-05-23T13:15:21.051734 | 2019-05-15T07:30:41 | 2019-05-15T07:30:41 | 186,772,870 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,843 | java | /*
* MIT License
*
* Copyright (c) 2016 Knowledge, education for life.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.library.camlibrary.videoTrimmer.utils;
import android.annotation.SuppressLint;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
import android.support.annotation.NonNull;
public class FileUtils {
/**
* Get a file path from a Uri. This will get the the path for Storage Access
* Framework Documents, as well as the _data field for the MediaStore and
* other file-based ContentProviders.<br>
* <br>
* Callers should check whether the path is local before assuming it
* represents a local file.
*
* @param context The context.
* @param uri The Uri to query.
* @author paulburke
*/
@SuppressLint("NewApi")
public static String getPath(final Context context, final Uri uri) {
final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
// DocumentProvider
if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) {
if (isExternalStorageDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];
if ("primary".equalsIgnoreCase(type)) {
return Environment.getExternalStorageDirectory() + "/" + split[1];
}
// TODO handle non-primary volumes
}
// DownloadsProvider
else if (isDownloadsDocument(uri)) {
final String id = DocumentsContract.getDocumentId(uri);
final Uri contentUri = ContentUris.withAppendedId(
Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
return getDataColumn(context, contentUri, null, null);
}
// MediaProvider
else if (isMediaDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];
Uri contentUri = null;
if ("image".equals(type)) {
contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
} else if ("video".equals(type)) {
contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
} else if ("audio".equals(type)) {
contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
}
final String selection = "_id=?";
final String[] selectionArgs = new String[]{
split[1]
};
return getDataColumn(context, contentUri, selection, selectionArgs);
}
}
// MediaStore (and general)
else if ("content".equalsIgnoreCase(uri.getScheme())) {
// Return the remote address
if (isGooglePhotosUri(uri))
return uri.getLastPathSegment();
return getDataColumn(context, uri, null, null);
}
// File
else if ("file".equalsIgnoreCase(uri.getScheme())) {
return uri.getPath();
}
return null;
}
/**
* Get the value of the data column for this Uri. This is useful for
* MediaStore Uris, and other file-based ContentProviders.
*
* @param context The context.
* @param uri The Uri to query.
* @param selection (Optional) Filter used in the query.
* @param selectionArgs (Optional) Selection arguments used in the query.
* @return The value of the _data column, which is typically a file path.
* @author paulburke
*/
private static String getDataColumn(@NonNull Context context, Uri uri, String selection, String[] selectionArgs) {
Cursor cursor = null;
final String column = "_data";
final String[] projection = {column};
try {
cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null);
if (cursor != null && cursor.moveToFirst()) {
final int column_index = cursor.getColumnIndexOrThrow(column);
return cursor.getString(column_index);
}
} finally {
if (cursor != null)
cursor.close();
}
return null;
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is Google Photos.
*/
private static boolean isGooglePhotosUri(Uri uri) {
return "com.google.android.apps.photos.content".equals(uri.getAuthority());
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is ExternalStorageProvider.
*/
private static boolean isExternalStorageDocument(@NonNull Uri uri) {
return "com.android.externalstorage.documents".equals(uri.getAuthority());
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is DownloadsProvider.
*/
private static boolean isDownloadsDocument(@NonNull Uri uri) {
return "com.android.providers.downloads.documents".equals(uri.getAuthority());
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is MediaProvider.
*/
private static boolean isMediaDocument(@NonNull Uri uri) {
return "com.android.providers.media.documents".equals(uri.getAuthority());
}
}
| [
"[email protected]"
]
| |
3d71fde471d841f3854505920656ff562c7e0f0c | cf640f33002ac72aab78f1ee75e04f2104b83934 | /phoenix-inventory-service/src/main/java/com/virtusa/poc/phoenixinventoryservice/controller/TestConroller.java | 83797acb29b4a2ba030ae8d8f84b19c99d1df1dc | []
| no_license | rsr725/microservices-example | 3e42e8fd8f009de9a25b97d974533ab693a43900 | 5d2d585afdb2375be95d9adaf0689adcb688c6ee | refs/heads/master | 2023-01-22T12:50:34.213736 | 2019-09-11T12:53:50 | 2019-09-11T12:53:50 | 203,576,083 | 1 | 0 | null | 2023-01-07T09:13:49 | 2019-08-21T12:07:14 | Java | UTF-8 | Java | false | false | 334 | java | package com.virtusa.poc.phoenixinventoryservice.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class TestConroller {
@GetMapping("/test")
public String test() {
return "phoenix-inventory-service is running...";
}
}
| [
"[email protected]"
]
| |
f5cdaa3cd415b18a3abbcaa8c3c975dae53ee1c9 | 22b1f967750c313d8a2e6fc255fd3bca9f13c290 | /AdvancedAlgorithm(LintCode)/FollowUpsII/401_KthSmallestNumberInSortedMatrix.java | bbfc1e02f43e8dae767aa66f9726e5d59411a88a | [
"MIT"
]
| permissive | robin-qu/Leetcode | 333e997f1779fe41cbd4b0e057631454c1f37d13 | 9178287a7cc8fac7adb0e9bfd8d4771cd151d4a6 | refs/heads/master | 2021-06-24T18:49:25.879307 | 2021-01-21T05:28:20 | 2021-01-21T05:28:20 | 178,751,405 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,594 | java | public class Solution {
/**
* @param matrix: a matrix of integers
* @param k: An integer
* @return: the kth smallest number in the matrix
*/
class Pair implements Comparable<Pair> {
public int x;
public int y;
public int val;
public Pair(int x, int y, int val) {
this.x = x;
this.y = y;
this.val = val;
}
@Override
public int compareTo(Pair other) {
return this.val - other.val;
}
}
public int kthSmallest(int[][] matrix, int k) {
if (matrix == null || matrix.length == 0 ||
matrix[0] == null || matrix[0].length == 0) {
return 0;
}
int m = matrix.length;
int n = matrix[0].length;
boolean[][] visited = new boolean[m][n];
PriorityQueue<Pair> pq = new PriorityQueue<>();
pq.offer(new Pair(0, 0, matrix[0][0]));
visited[0][0] = true;
for (int i = 0; i < k - 1; i++) {
Pair curr = pq.poll();
int x = curr.x;
int y = curr.y;
int nx = x + 1;
int ny = y + 1;
if (nx < m && !visited[nx][y]) {
pq.offer(new Pair(nx, y, matrix[nx][y]));
visited[nx][y] = true;
}
if (ny < n && !visited[x][ny]) {
pq.offer(new Pair(x, ny, matrix[x][ny]));
visited[x][ny] = true;
}
}
return pq.peek().val;
}
}
| [
"[email protected]"
]
| |
f534daee138cc8060fd3d6f81fdf88ae7f0e9efc | 039c02f94ca8cfa4dd59589f68a89f1800e039e3 | /Pelotas/src/pelotas/MainFrame.java | 93b6050a48bc76f1a423e93dbe865e7ca12abdb1 | []
| no_license | iratierana/ProgramacionAvanzada | d8fb1bb96bc095378d67b2758db7b550059a96a9 | 2ecdc4c4866146f2c7f0cf2382edafa02d7ea00b | refs/heads/master | 2021-01-04T02:37:06.919472 | 2016-01-21T19:10:11 | 2016-01-21T19:10:11 | 42,407,031 | 0 | 1 | null | 2015-11-23T20:46:20 | 2015-09-13T18:13:28 | Java | UTF-8 | Java | false | false | 2,738 | java | package pelotas;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class MainFrame implements ActionListener {
JFrame ventana;
ArrayList<Bola> listaBolas;
MiPanelPintura panelPintura;
public MainFrame() {
listaBolas = new ArrayList<Bola>();
ventana = new JFrame("Dale a 'mas..' para mas bolas");
ventana.setSize(800, 500);
ventana.setLocation(250, 100);
ventana.setContentPane(crearPanelPrincipal());
ventana.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ventana.setVisible(true);
}
private Container crearPanelPrincipal() {
JPanel panelPrincipal = new JPanel(new BorderLayout());
panelPrincipal.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
panelPrincipal.add(crearPanelCentral(), BorderLayout.CENTER);
panelPrincipal.add(crearBotonSur(), BorderLayout.SOUTH);
return panelPrincipal;
}
private Component crearBotonSur() {
JPanel panel = new JPanel(new FlowLayout());
JButton botonPelotas = new JButton("Mas...");
botonPelotas.addActionListener(this);
botonPelotas.setActionCommand("masBolas");
panel.add(botonPelotas);
return panel;
}
private Component crearPanelCentral() {
panelPintura = new MiPanelPintura();
return panelPintura;
}
private class MiPanelPintura extends JPanel {
@Override
public void paint(Graphics g) {
Bola e;
super.paint(g);
g.setColor(Color.WHITE);
g.fillRect(0, 0, this.getWidth(), this.getHeight());
for (int i = 0; i < listaBolas.size(); i++) {
e = listaBolas.get(i);
e.paint(g);
}
}
}
private void dibujar() {
ventana.repaint();
}
private void fisicas() {
Bola b;
int dt = 1;
for (int i = 0; i < listaBolas.size(); i++) {
b = listaBolas.get(i);
b.x += b.vx * dt;
b.y += b.vy * dt;
if (b.vx < 0 && b.x <= 0 || b.vx > 0 && b.x + 20 >= panelPintura.getWidth())
b.vx = -b.vx;
if (b.vy < 0 && b.y < 0 || b.vy > 0 && b.y + 20 >= panelPintura.getHeight())
b.vy = -b.vy;
}
}
public static void main(String[] args) {
MainFrame mainF = new MainFrame();
while (true) {
try {
Thread.sleep(10);
mainF.fisicas();
mainF.dibujar();
} catch (InterruptedException e) {
}
}
}
@Override
public void actionPerformed(ActionEvent arg0) {
if (arg0.getActionCommand().toLowerCase().equals("masbolas")) {
listaBolas.add(new Bola(10, 10, 20));
}
}
}
| [
"[email protected]"
]
| |
3f0e90c9bf990f1095f6b0cbeb3d3e86d63b3c94 | 42bc1750c0d5b0d613b7f24188f6d9cefa895f2f | /micro-di/src/test/java/com/github/di/factory/fortest/MyCustomBeanRepository.java | d972fb68db29a38f7b121ecf773105e7f48b8745 | []
| no_license | vitargo/servlet-chat-gh | cb37d4ac32aee74c87f679241a79926588153906 | ce720fb7147926a7b60c7d931503985d7b6ade13 | refs/heads/master | 2023-05-07T14:36:36.640776 | 2021-05-31T07:56:28 | 2021-05-31T07:56:28 | 353,624,393 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 340 | java | package com.github.di.factory.fortest;
import com.github.di.annotations.CustomRepository;
import com.github.di.annotations.InjectValue;
@CustomRepository
public class MyCustomBeanRepository {
@InjectValue(name = "my.value")
private String myValue;
public String getMyValue() {
return myValue;
}
}
| [
"[email protected]"
]
| |
d5518867961d5ca067464f36defd536002f4c38c | c69e45df70a6e4c515b6edaae13c1e29b8c93219 | /src/main/java/com/jiang/common/ExceptionHandle.java | d9bfb5a40ec91d78aa1897c08867ea43d27903a5 | []
| no_license | jzggit/demo | 221a25f9cb7983ca3b0b670ae7b27c21e57e6e77 | 8f42aa3d4da3df573493a2d8e001785679ad51b8 | refs/heads/master | 2022-06-27T01:50:44.024978 | 2020-04-03T17:13:19 | 2020-04-03T17:13:19 | 247,219,380 | 0 | 0 | null | 2022-06-21T02:58:59 | 2020-03-14T05:43:53 | Java | UTF-8 | Java | false | false | 1,568 | java | package com.jiang.common;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Slf4j
@ControllerAdvice
public class ExceptionHandle {
@ExceptionHandler(value = Exception.class)
@ResponseBody
public Result handle(HttpServletRequest request, HttpServletResponse resp, Exception e) {
log.info("进入异常处理,{},{}",request.getRequestURI(),resp.getStatus());
//是否属于自定义异常
if(e instanceof BaseException){
BaseException e1 = (BaseException) e;
return Result.fail(e1.getCode(), e1.getMessage());
}else{
return Result.fail(ErrorType.SYSTEM_ERROR, request.getRequestURI(),e.getMessage());
}
}
@ExceptionHandler(value = NullPointerException.class)
@ResponseBody
public Result nullExceptionHandle(HttpServletRequest request, HttpServletResponse resp, Exception e) {
log.info("进入异常处理,{},{}",request.getRequestURI(),resp.getStatus());
//是否属于自定义异常
if(e instanceof NullPointerException){
BaseException e1 = (BaseException) e;
return Result.fail(e1.getCode(), e1.getMessage());
}else{
return Result.fail(ErrorType.SYSTEM_ERROR, request.getRequestURI(),e.getMessage());
}
}
}
| [
"[email protected]"
]
| |
472b65e43ce1ceb4fc7d0aa3a48c328cbe076c91 | fda393677839bffdd0229d6b48ad0bc9aef66f24 | /routes/spin.java | f212058e90d4843fb599cc3e540ffa603dfb4e98 | []
| no_license | houssemkaroui/Node-js-multer-files | 47f520d3990ea04b557e22db13857a7a3b6e863e | 38dbbc5437348ec48bdfeb99cd65b4be99036e65 | refs/heads/master | 2020-08-07T13:44:03.286490 | 2019-10-07T20:23:28 | 2019-10-07T20:23:28 | 213,474,438 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 963 | java | package io.codementor.gtommee.rest_tutorial.models;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
public class Pets {
@Id
public ObjectId _id;
public String name;
public String species;
public String breed;
// Constructors
public Pets() {}
public Pets(ObjectId _id, String name, String species, String breed) {
this._id = _id;
this.name = name;
this.species = species;
this.breed = breed;
}
// ObjectId needs to be converted to string
public String get_id() { return _id.toHexString(); }
public void set_id(ObjectId _id) { this._id = _id; }
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public String getSpecies() { return species; }
public void setSpecies(String species) { this.species = species; }
public String getBreed() { return breed; }
public void setBreed(String breed) { this.breed = breed; }
}
| [
"[email protected]"
]
| |
db6fcffbf8370272dfa785811c062199345a1eed | c8d6cc87fdb79ddb1bbd7783b5e40c3e14abdf2a | /src/main/java/com/kenzie/library/Genre.java | 08b25fee75e995dd57f8c39ae94122a132d9e512 | []
| no_license | KenzieAcademy/java-fundamentals-assessment-bsspencer42 | 86515a6ac592c0e872625cfafc8a2443853aa091 | fac2a5d8df2d2da50b25dbab6a6fc46578648be0 | refs/heads/main | 2023-06-07T02:43:19.160624 | 2021-07-06T14:57:47 | 2021-07-06T14:57:47 | 379,755,116 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 130 | java | package com.kenzie.library;
public enum Genre {
FANTASY,
SCIENCE_FICTION,
MYSTERY,
ROMANCE,
CHILDRENS,
NONFICTION;
}
| [
"[email protected]"
]
| |
4be9cb1646dfc7ebf9dd280b936a91d1a3454d9b | 58fd9b572abf68be8a25263ade34998a23737548 | /src/main/java/com/driver/GraphMigrator.java | 0392656be4e2c79c64c53031089e3b5fc2c1fb8b | []
| no_license | prosenjit-mondal/Test-Analytics | 18693f3500711616723f0747ab3c44ef0015c1ea | 81de27ac980bdd2ff9f34bccaf4110f543ab2755 | refs/heads/master | 2021-01-13T02:31:47.400999 | 2015-06-15T09:28:57 | 2015-06-15T09:28:57 | 37,449,925 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,208 | java | package com.driver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
//import com.common.Logger;
import com.model.BookVO;
import com.service.spec.IConnectService;
import com.service.spec.IGraphService;
@Service(value="gm")
public class GraphMigrator {
private org.slf4j.Logger logger = LoggerFactory.getLogger(Logger.class);
@Autowired
private IConnectService cs;
@Autowired
private IGraphService gs;
public void migrateToGraph(int noThreads, int option) {
//read from Oracle
Iterable<BookVO> books = cs.getAllBooks();
logger.debug("Reading of book is done...");
int i = 0;
//now write to neo4j each book wise
for (BookVO book : books) {
cs.populateContentWithAssignment(book);
logger.debug("Now started writing...");
gs.migrateBook(book);
i++;
}
}
public void setRealationalService(IConnectService realationalService) {
this.cs = realationalService;
}
public void setGraphService(IGraphService graphService) {
this.gs = graphService;
}
}
| [
"[email protected]"
]
| |
aa8177098ed03d8a80edf9151930d84505f64bac | acb13fa7f0b8e0ec98641a7b8858c6f04ad98421 | /app/src/main/java/com/example/android/phase2/ReviewAdapter.java | 1bb79ec4223a227a5ffaab824bc367ba993b1bfb | []
| no_license | Ibrahemshoaib/phase2 | 81f3b68fe83a2b6a6ccf44b55667a70ff1c5e4a6 | 77c8363c45e09e57721ead4daac198fcd47293e6 | refs/heads/master | 2021-01-01T05:18:35.579051 | 2016-04-29T17:39:46 | 2016-04-29T17:39:46 | 57,347,778 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,315 | java | package com.example.android.phase2;
import android.content.Context;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.example.android.phase2.Review;
import com.example.android.phase2.R;
import java.util.List;
public class ReviewAdapter extends BaseAdapter {
private final Context mContext;
private final LayoutInflater mInflater;
private final Review mLock = new Review();
private List<Review> mObjects;
public ReviewAdapter(Context context, List<Review> objects) {
mContext = context;
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mObjects = objects;
}
public void add(Review object) {
synchronized (mLock) {
mObjects.add(object);
}
notifyDataSetChanged();
}
public void clear() {
synchronized (mLock) {
mObjects.clear();
}
notifyDataSetChanged();
}
@Override
public int getCount() {
return mObjects.size();
}
@Override
public Review getItem(int position) {
return mObjects.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = convertView;
ViewHolder viewHolder;
if (view == null) {
view = mInflater.inflate(R.layout.item_movie_review, parent, false);
viewHolder = new ViewHolder(view);
view.setTag(viewHolder);
}
final Review review = getItem(position);
viewHolder = (ViewHolder) view.getTag();
viewHolder.authorView.setText(review.getAuthor());
viewHolder.contentView.setText(Html.fromHtml(review.getContent()));
return view;
}
public static class ViewHolder {
public final TextView authorView;
public final TextView contentView;
public ViewHolder(View view) {
authorView = (TextView) view.findViewById(R.id.review_author);
contentView = (TextView) view.findViewById(R.id.review_content);
}
}
}
| [
"[email protected]"
]
| |
2b42a7607268b9532a8f33fb2ffd16895c4cd12c | 0643fc1d290445abfeabd2db4c20a2a3ba4c5550 | /google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePath.java | f960f0d1c175dc626cfb4c2248c647a2be09ad99 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
]
| permissive | SanowerTamjit/google-cloud-java | 98d507530e2e0cf6f5b277d1b8d93e05ebb8eec2 | 28fab80ed42dcdf56bac22f67b6e262e3ad54cd2 | refs/heads/master | 2020-04-05T04:08:53.424185 | 2018-11-07T00:38:35 | 2018-11-07T00:38:35 | 156,539,437 | 1 | 0 | Apache-2.0 | 2018-11-07T11:55:22 | 2018-11-07T11:55:22 | null | UTF-8 | Java | false | true | 19,335 | java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/privacy/dlp/v2/storage.proto
package com.google.privacy.dlp.v2;
/**
* <pre>
* Message representing a single file or path in Cloud Storage.
* </pre>
*
* Protobuf type {@code google.privacy.dlp.v2.CloudStoragePath}
*/
public final class CloudStoragePath extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStoragePath)
CloudStoragePathOrBuilder {
private static final long serialVersionUID = 0L;
// Use CloudStoragePath.newBuilder() to construct.
private CloudStoragePath(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private CloudStoragePath() {
path_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CloudStoragePath(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
path_ = s;
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.privacy.dlp.v2.CloudStoragePath.class, com.google.privacy.dlp.v2.CloudStoragePath.Builder.class);
}
public static final int PATH_FIELD_NUMBER = 1;
private volatile java.lang.Object path_;
/**
* <pre>
* A url representing a file or path (no wildcards) in Cloud Storage.
* Example: gs://[BUCKET_NAME]/dictionary.txt
* </pre>
*
* <code>string path = 1;</code>
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
}
}
/**
* <pre>
* A url representing a file or path (no wildcards) in Cloud Storage.
* Example: gs://[BUCKET_NAME]/dictionary.txt
* </pre>
*
* <code>string path = 1;</code>
*/
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getPathBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getPathBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.privacy.dlp.v2.CloudStoragePath)) {
return super.equals(obj);
}
com.google.privacy.dlp.v2.CloudStoragePath other = (com.google.privacy.dlp.v2.CloudStoragePath) obj;
boolean result = true;
result = result && getPath()
.equals(other.getPath());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PATH_FIELD_NUMBER;
hash = (53 * hash) + getPath().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStoragePath prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* Message representing a single file or path in Cloud Storage.
* </pre>
*
* Protobuf type {@code google.privacy.dlp.v2.CloudStoragePath}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStoragePath)
com.google.privacy.dlp.v2.CloudStoragePathOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.privacy.dlp.v2.CloudStoragePath.class, com.google.privacy.dlp.v2.CloudStoragePath.Builder.class);
}
// Construct using com.google.privacy.dlp.v2.CloudStoragePath.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
path_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor;
}
@java.lang.Override
public com.google.privacy.dlp.v2.CloudStoragePath getDefaultInstanceForType() {
return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
}
@java.lang.Override
public com.google.privacy.dlp.v2.CloudStoragePath build() {
com.google.privacy.dlp.v2.CloudStoragePath result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.privacy.dlp.v2.CloudStoragePath buildPartial() {
com.google.privacy.dlp.v2.CloudStoragePath result = new com.google.privacy.dlp.v2.CloudStoragePath(this);
result.path_ = path_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.privacy.dlp.v2.CloudStoragePath) {
return mergeFrom((com.google.privacy.dlp.v2.CloudStoragePath)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStoragePath other) {
if (other == com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance()) return this;
if (!other.getPath().isEmpty()) {
path_ = other.path_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.privacy.dlp.v2.CloudStoragePath parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.privacy.dlp.v2.CloudStoragePath) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object path_ = "";
/**
* <pre>
* A url representing a file or path (no wildcards) in Cloud Storage.
* Example: gs://[BUCKET_NAME]/dictionary.txt
* </pre>
*
* <code>string path = 1;</code>
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* A url representing a file or path (no wildcards) in Cloud Storage.
* Example: gs://[BUCKET_NAME]/dictionary.txt
* </pre>
*
* <code>string path = 1;</code>
*/
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* A url representing a file or path (no wildcards) in Cloud Storage.
* Example: gs://[BUCKET_NAME]/dictionary.txt
* </pre>
*
* <code>string path = 1;</code>
*/
public Builder setPath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
path_ = value;
onChanged();
return this;
}
/**
* <pre>
* A url representing a file or path (no wildcards) in Cloud Storage.
* Example: gs://[BUCKET_NAME]/dictionary.txt
* </pre>
*
* <code>string path = 1;</code>
*/
public Builder clearPath() {
path_ = getDefaultInstance().getPath();
onChanged();
return this;
}
/**
* <pre>
* A url representing a file or path (no wildcards) in Cloud Storage.
* Example: gs://[BUCKET_NAME]/dictionary.txt
* </pre>
*
* <code>string path = 1;</code>
*/
public Builder setPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
path_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStoragePath)
}
// @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStoragePath)
private static final com.google.privacy.dlp.v2.CloudStoragePath DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStoragePath();
}
public static com.google.privacy.dlp.v2.CloudStoragePath getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<CloudStoragePath>
PARSER = new com.google.protobuf.AbstractParser<CloudStoragePath>() {
@java.lang.Override
public CloudStoragePath parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CloudStoragePath(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<CloudStoragePath> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<CloudStoragePath> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.privacy.dlp.v2.CloudStoragePath getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
| [
"[email protected]"
]
| |
0b06f5091c784ebabfb94c996895fdce542c073f | a9ed54e9ccfbaab7c3000805e72e32e4165081d5 | /src/main/java/com/dz/o2o/util/HttpServletRequestUtil.java | 4aaf4c77f2cf311ad675a519e656f68e0bcf088a | []
| no_license | dzz5201314/O2O | 0d722e119eafe2b950c3bc969f376ffa5c0b121f | 93675bdda1e3851180c51aa6cee37af37f985a32 | refs/heads/master | 2023-06-18T11:30:07.954278 | 2021-07-19T14:47:58 | 2021-07-19T14:47:58 | 387,398,087 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,148 | java | package com.dz.o2o.util;
import javax.servlet.http.HttpServletRequest;
public class HttpServletRequestUtil {
public static int getInt(HttpServletRequest request, String key) {
try {
return Integer.decode(request.getParameter(key));
} catch (Exception e) {
return -1;
}
}
public static long getLong(HttpServletRequest request, String key) {
try {
return Long.valueOf(request.getParameter(key));
} catch (Exception e) {
return -1;
}
}
public static Double getDouble(HttpServletRequest request, String key) {
try {
return Double.valueOf(request.getParameter(key));
} catch (Exception e) {
return -1d;
}
}
public static boolean getBoolean(HttpServletRequest request, String key) {
try {
return Boolean.valueOf(request.getParameter(key));
} catch (Exception e) {
return false;
}
}
public static String getString(HttpServletRequest request, String key) {
try {
String result = request.getParameter(key);
if (result != null) {
result = result.trim();
}
if ("".equals(result)) {
result = null;
}
return result;
} catch (Exception e) {
return null;
}
}
}
| [
"[email protected]"
]
| |
ed7b96eade829563ac02a1b410292e8fa6ea6c7b | ec53f3c61ad5bc7cb8fc7c6f03d63753a63208b6 | /src/main/java/info/sandroalmeida/springrecipeapp/domain/Ingredient.java | 25664ba4df976242b13bfa544f9c41593fd0d2ff | []
| no_license | sandroalmeida/spring-recipe-app | 4fce2690e04b40594a70f074bed69bc61d4af6a1 | 628ce0ea110d186193884f8ee5ea93bafad93411 | refs/heads/master | 2020-04-17T02:18:56.931565 | 2019-05-10T23:25:48 | 2019-05-10T23:25:48 | 166,128,557 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,031 | java | package info.sandroalmeida.springrecipeapp.domain;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.math.BigDecimal;
/**
* Created by sandro on 22/01/19
*/
@Getter
@Setter
@EqualsAndHashCode(exclude = {"recipe"})
@Entity
public class Ingredient {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String description;
private BigDecimal amount;
@OneToOne(fetch = FetchType.EAGER)
private UnitOfMeasure uom;
@ManyToOne
private Recipe recipe;
public Ingredient() {
}
public Ingredient(String description, BigDecimal amount, UnitOfMeasure uom) {
this.description = description;
this.amount = amount;
this.uom = uom;
}
public Ingredient(String description, BigDecimal amount, UnitOfMeasure uom, Recipe recipe) {
this.description = description;
this.amount = amount;
this.uom = uom;
this.recipe = recipe;
}
}
| [
"[email protected]"
]
| |
c2b736a6bb9e3dc6d3a87de9fd35568816ba1389 | 25a492a0098e3457cd60683027175421852f7c21 | /src/main/java/com/vincentlaurens/insa/ClientUDP.java | 6db036d365bae1cfdad80752832ac6fb48de6cec | []
| no_license | vincentlaurens/chat_simple | 8db3259343de8bc4ceb08619706e13e850febe89 | 3eef9cded9b657e0505ee680da2c1bdaf49047bf | refs/heads/master | 2021-05-06T18:26:03.204333 | 2017-11-24T15:51:12 | 2017-11-24T15:51:12 | 111,921,476 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 701 | java | package com.vincentlaurens.insa;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
public class ClientUDP {
public ClientUDP(String adresse, int port) throws IOException {
byte[] data;
String chainetest = "Tentative De Connexion";
data = chainetest.getBytes();
DatagramSocket datagramSocket = new DatagramSocket();
DatagramPacket datagramPacket = new DatagramPacket(data, data.length);
datagramPacket.setAddress(InetAddress.getByName(adresse));
datagramPacket.setPort(port);
datagramSocket.send(datagramPacket);
datagramSocket.close();
}
}
| [
"[email protected]"
]
| |
b1f2abccea00a8cf9d375289bec7e09d5d0ea188 | bed14bf5d9845666c9c73837611e0dc24bd9a030 | /src/com/dts/core/action/ChekUserAction.java | 3f2c525d329226ac957cd97d9f951bceffa53b9c | [
"Apache-2.0"
]
| permissive | sudir319/TPO_STRUTS_HB_SPRJDBC_REST | 71ddc6df4fce3851ca6101b7a92fa081569a3f3c | 4d8f53d9e483eabcb391e60e4deb8e64dcb61573 | refs/heads/master | 2021-01-12T05:19:04.578895 | 2019-12-13T18:28:14 | 2019-12-13T18:28:14 | 77,909,104 | 0 | 0 | null | 2017-01-07T07:28:52 | 2017-01-03T11:00:00 | Java | UTF-8 | Java | false | false | 1,644 | java | package com.dts.core.action;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.dts.dae.dao.SecurityDAO;
/**
*
* @author PRANEETH
*
*/
public class ChekUserAction extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* The doPost method of the servlet
* This method is called when a form has its tag value method equals to post.
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException
{
final String username = request.getParameter("userName");
String target ;
try
{
final String user = new SecurityDAO().checkUser(username);
if (user == null)
{
target = "Registerform.jsp?status1=<font color=green>_/Available</font>";
}
else
{
target = "Registerform.jsp?status1=<font color=red>Alreadyexist</font>&userName=" + username;
}
}
catch (Error e)
{
target = "Registerform.jsp?status1=<font color=green>_/<b>Available</b></font>&userName=" + username;
}
final RequestDispatcher requestDispatcher = request.getRequestDispatcher(target);
requestDispatcher.forward(request, response);
}
}
| [
"[email protected]"
]
| |
6a6deaa15dc82f1a6516307b929a922a3f838072 | e8b4562ac7540ea07e3921dedaf469cefab52c28 | /wxBook_server/src/main/java/pengming/xu/wxBook/dao/UserDAO.java | be318d24cd642e7b9148c634dca6c6e558dbb0e0 | []
| no_license | xpmxq/wxBook | b4b5307ed5c242bdc0379c6b31737fa830ea41a4 | 699456813bb1c240981a17c9af68a8e2267f9013 | refs/heads/master | 2020-06-05T04:09:42.151961 | 2019-06-25T00:31:34 | 2019-06-25T00:31:34 | 192,308,514 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 513 | java | package pengming.xu.wxBook.dao;
import org.apache.ibatis.annotations.Param;
import pengming.xu.wxBook.bean.UserBean;
/**
* @ClassName UserDAO
* @Description 用户对象持久化类
* @Author xupm
* @Date 2019/6/20 002022:24
* @Since V1.0
*/
public interface UserDAO {
/**
* @Author xupm
* @Description 通过userID查询用户对象
* @Date 2019/6/20 0020 22:28
* @throws
* @return ${return_type}
*/
UserBean selectUserById(@Param("userId") String userId);
}
| [
"[email protected]"
]
| |
b6b9ce7ab761514653c1039d1a4d570ecfa5232c | 55f831197e7f662410d3ec86e472de5fe3f1b7df | /Application/EcoDora/app/src/main/java/com/example/ecodora/CarInfoActivity.java | d96a15ed8f65ed0dc6c83150fac6badc023eb44f | []
| no_license | chan1220/IoTDrivingAssistance | a6915098cc82350336286bb1d6c09815c6b7cb12 | 52eb01060f57d1ef8ded5ddfdd8c0c30347f1d81 | refs/heads/master | 2022-11-16T06:21:33.156691 | 2019-09-09T14:17:39 | 2019-09-09T14:17:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,615 | java | package com.example.ecodora;
import android.os.Bundle;
import android.util.Log;
import android.widget.EditText;
import androidx.appcompat.app.AppCompatActivity;
import com.example.ecodora.utills.DBRequester;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class CarInfoActivity extends AppCompatActivity implements DBRequester.Listener{
private String usr_id;
EditText edt_name,edt_carname,edt_volume,edt_fuel,edt_fuel_efi,edt_carid;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_car_info);
setTitle("차량 정보");
edt_carid = findViewById(R.id.editText_carid);
edt_carname = findViewById(R.id.editText_carname);
edt_fuel = findViewById(R.id.editText_fuel);
edt_fuel_efi = findViewById(R.id.editText_fuel_efi);
edt_name = findViewById(R.id.editText_username);
edt_volume = findViewById(R.id.editText_volum);
edt_name.setText(getIntent().getStringExtra("name"));
usr_id = getIntent().getStringExtra("id");
// 실행!
try {
JSONObject car = new JSONObject();
car.put("usr_id", usr_id);
new DBRequester.Builder(this, getString(R.string.server_ip_port), this)
.attach("request/car")
.streamPost(car)
.request("request car");
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onResponse(String id, JSONObject json, Object... params) {
try {
if(json.getBoolean("success") == false)
return;
switch(id) {
case "request car":
JSONArray jsonArray = json.getJSONArray("data");
JSONObject data = jsonArray.getJSONObject(0);
edt_carid.setText(data.getString("car_id"));
edt_carname.setText(data.getString("car_name"));
edt_volume.setText(data.getString("volume"));
edt_fuel.setText(data.getString("fuel"));
edt_fuel_efi.setText(data.getString("fuel_efi"));
break;
}
} catch (Exception e) {
Log.d("on response", e.getMessage());
}
}
@Override
public void onResponse(String id, JSONArray json, Object... params) {
}
@Override
public void onError(String id, String message, Object... params) {
}
}
| [
"[email protected]"
]
| |
7058fd3dd3bfea41feffcb7ccbac173a6cbae927 | de56494ef97d548f17c07783948bdee8e1741724 | /Applications/MagicOracle/MagicOracle/magic/effects/.svn/text-base/RemoveFlyingEffect.java.svn-base | 969a4c5e0d7b6c1e49fdfa89b929fb4c355f1e82 | []
| no_license | DerekParks/ML1050 | ea524c54482afe776a86c6fc465a32633c139927 | 10af279d5c797e3c3de90caef39769deb5b1958f | refs/heads/master | 2021-01-10T18:04:53.115436 | 2015-05-22T19:44:03 | 2015-05-22T19:44:03 | 36,093,151 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 560 | package magic.effects;
import cards.creatures.CreatureCard;
/**
* This class has a requirement that the card that is passed in is a creature
* card, since we're going to remove flying to it.
*
*/
public class RemoveFlyingEffect extends Effect{
// It doesn't matter which of these executeEffects is called, but more than
// likely it will be the parameter-less one.
public void executeEffect() {
executeEffect(myCard);
}
public void executeEffect(Object theObject) {
((CreatureCard)theObject).setFlying(false);
}
}
| [
"[email protected]"
]
| ||
f9c88b60741c9b9043dbbda136527b84b7e745b8 | 93aa36a67b30b2608cb3dbf741aca70012ed215a | /src/be/ephec/utilities/Validator.java | 4f8160c2bea837dccb4d80b2b87d472fb1b55027 | [
"MIT"
]
| permissive | rsilvestre/tweetr | 2eff44591fb004d5755f2aac7813b8df9c74a044 | 7392ac1e49ca39bef5082416c833ffa0acf48389 | refs/heads/master | 2020-03-29T09:24:15.864224 | 2014-12-16T09:18:03 | 2014-12-16T09:18:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,444 | java | package be.ephec.utilities;
import be.ephec.exceptions.ValidatorException;
public class Validator {
private static final int TWEET_SIZE_MIN = 3;
private static final int TWEET_SIZE_MAX = 140;
public static void emailValidation(String email) throws ValidatorException {
if (email != null && email.trim().length() != 0) {
if (!email.matches("([^.@]+)(\\.[^.@]+)*@([^.@]+\\.)+([^.@]+)")) {
throw new ValidatorException("Please enter a valide email.");
}
} else {
throw new ValidatorException("Please enter your email.");
}
}
public static void passwordValidation(String password, String confirmation) throws ValidatorException {
if (password != null && password.trim().length() != 0 && confirmation != null && confirmation.trim().length() != 0) {
if (!password.equals(confirmation)) {
throw new ValidatorException("Password doesn't match confirmation.");
} else if (password.trim().length() < 3) {
throw new ValidatorException("Passwords must contain at least 3 characters.");
}
} else {
throw new ValidatorException("Please enter and confirm your password.");
}
}
public static void userNameValidation(String userName) throws ValidatorException {
if (userName != null && userName.trim().length() < 3) {
throw new ValidatorException("The username must contain at least 3 characters.");
}
}
public static void firstNameValidation(String firstName) throws ValidatorException {
if (firstName != null && firstName.trim().length() < 3) {
throw new ValidatorException("The username must contain at least 3 characters.");
}
}
public static void lastNameValidation(String lastName) throws ValidatorException {
if (lastName != null && lastName.trim().length() < 3) {
throw new ValidatorException("The username must contain at least 3 characters.");
}
}
public static void bodyValidation(String body) throws ValidatorException {
if (body == null || body.trim().length() < TWEET_SIZE_MIN) {
throw new ValidatorException("The tweet must contain at least 3 characters.");
}
if (body.length() > TWEET_SIZE_MAX) {
throw new ValidatorException("The tweet is too long.");
}
}
}
| [
"[email protected]"
]
| |
65e4d7c6045d33d5f0aba5b298a4a103ab32521e | 4c87ba61330b95325185ccb31a43908aaf987791 | /displayjokelib/src/main/java/com/example/kacyn/displayjokelib/DisplayJokeActivity.java | 8483485c3d67c14a1026431bb227deb6c76cef0e | []
| no_license | kacyn/BuildItBigger | 11b1f924484434be469bdc540947bf9d071bc192 | 54d521eeef3756cfd524c233062f1949a1689e6e | refs/heads/master | 2021-01-10T09:34:45.894983 | 2015-11-14T19:13:13 | 2015-11-14T19:13:13 | 45,617,918 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,517 | java | package com.example.kacyn.displayjokelib;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
public class DisplayJokeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.display_activity_main);
if(savedInstanceState == null) {
DisplayJokeActivityFragment fragment = new DisplayJokeActivityFragment();
fragment.setArguments(getIntent().getExtras());
getSupportFragmentManager().beginTransaction().add(
android.R.id.content, fragment).commit();
}
}
@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_main, 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]"
]
| |
3a475c0b63c06eec62a9076c22fa2d26f664da40 | abb08deb5937a9c37808ad0e82d0bc4f2f78580d | /inclassassignment1genericclasses/src/Generics/AClass.java | bce208ec7b3b994f41adf009f7cd1fd2c1feb17f | []
| no_license | TallStack/myPortfolio | a95f9f8155c199389ed77188cb38e544dae74136 | ccb334d997a95b50e6190ffddea0f4f5a5d41e1b | refs/heads/master | 2020-07-18T23:27:27.763531 | 2013-04-21T15:32:05 | 2013-04-21T15:32:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 424 | java | package Generics;
public class AClass<T>{
private T data;
public AClass(T inA){ data=inA; }
public T getA() { return data; }
public void setA(T inA) { data=inA; }
public String toString() { return "data " + data; }
public static void main(String[] args) {
AClass<Integer> myData = new AClass<Integer>(100);
AClass myAClass = new AClass(myData);
System.out.println(myAClass);
}
}
| [
"[email protected]"
]
| |
6933517164cd6d67314eb4c5e74e6ce50556e07d | 5ad40e546a1a498913da6968cf0200687e958b71 | /src/main/java/HelloWorld.java | 54a5b2ecea6768dd958826eba112d8a82f892dd0 | []
| no_license | ActuallyFro/AsciiDoctorJ_Build-PDF_IntelleJ | 4cdcfbcdcccbfcab94cc81da59942e959805520f | aad25a87435a73cf10d6ea54f2470efb24e8d861 | refs/heads/master | 2023-04-29T17:53:40.241433 | 2021-05-20T04:44:53 | 2021-05-20T04:44:53 | 368,397,537 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,678 | java | import static org.asciidoctor.Asciidoctor.Factory.create;
import org.asciidoctor.Asciidoctor;
import org.asciidoctor.Attributes;
import org.asciidoctor.Options;
import org.asciidoctor.jruby.AsciiDocDirectoryWalker;
import java.io.File;
import java.text.DecimalFormat;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
class HelloWorld {
public static void main(String[] args) {
long startTime = System.currentTimeMillis();
long stopTime;
String directory=".";
if(args.length > 0){
directory = args[0];
Path path = Paths.get(directory);
if (!Files.isDirectory(path)){
path = Paths.get(".");
}
directory = path.toString();
}
String backendStr = "pdf";
if(args.length > 1) {
backendStr = args[1];
}
System.out.println("Generating "+backendStr+"(s) from an .adoc File(s)!");
Asciidoctor asciidoctor = create();
//File Settings/Options
Attributes attributes = Attributes.builder().icons("font").build(); //No idea what this does...
Options options = Options.builder().inPlace(true).backend(backendStr).attributes(attributes).build(); //TRY-CATCH!?!?!
// String[] result = asciidoctor.convertDirectory(new AsciiDocDirectoryWalker(directory), options);
//https://www.codota.com/code/java/methods/org.asciidoctor.Asciidoctor/convertDirectory
// public String[] convertDirectory(String baseDir) {
// final AsciiDocDirectoryWalker directoryWalker = new AsciiDocDirectoryWalker(baseDir);
// return asciidoctor.convertDirectory(directoryWalker, options);
// }
asciidoctor.convertDirectory(new AsciiDocDirectoryWalker(directory), options); //ALL files within a directory
//asciidoctor.convertFile(new File("basic-example.adoc"), options); //single file
stopTime = System.currentTimeMillis();
long timeElapsed = stopTime - startTime;
Float timeSecs = new Float ((float)timeElapsed/1000.0);
System.out.println("Generating an example PDF from an .adoc File! (elapsed time: " + DecimalFormat.getNumberInstance().format(timeSecs) + " secs )");
}
}
//References:
//-----------
// https://www.programiz.com/java-programming/hello-world
// Merged with: https://www.baeldung.com/asciidoctor
// Other example -- https://github.com/asciidoctor/asciidoctorj#running-asciidoctorj-on-wildfly-as
// Import: https://www.geeksforgeeks.org/file-class-in-java/
// File: https://raw.githubusercontent.com/asciidoctor/asciidoctor-pdf/main/examples/basic-example.adoc
| [
"[email protected]"
]
| |
0a5fa050a3ec29882abb8d5ba2c28d6029432238 | 2fc1e0070e576fd45ae13ed80daad3a4834fc444 | /src/main/java/com/cloudera/cdp/iam/model/DeleteSshPublicKeyResponse.java | a2f9cc6270645ca1b75c3c672e24f22e47d8e582 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
]
| permissive | isabella232/cdp-sdk-java | 832c47e119e8399a782848c04815612e35acad0d | f6fb9f121065f1c3759a9c3fd777c32ad25ac118 | refs/heads/master | 2023-01-19T08:18:20.758968 | 2020-11-24T15:36:52 | 2020-11-24T15:36:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,069 | java | /*
* Copyright (c) 2018 Cloudera, Inc. All Rights Reserved.
*
* Portions Copyright (c) Copyright 2013-2018 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.
* 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.cloudera.cdp.iam.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.cloudera.cdp.client.CdpResponse;
/**
* Response object for delete SSH public key.
**/
@javax.annotation.Generated(value = "com.cloudera.cdp.client.codegen.CdpSDKJavaCodegen", date = "2020-11-24T07:35:53.146-08:00")
public class DeleteSshPublicKeyResponse extends CdpResponse {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash( super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeleteSshPublicKeyResponse {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line except the first indented by 4 spaces.
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"[email protected]"
]
| |
b0c686df55aa834cc4527e36f2cab6306c2bd2bb | 34b79178dfcf846ad1ac3063f06092cddc3b7ba1 | /Mac_Facility/src/MAC_Facility/data/LoginDAO.java | 30c64217691df4315554f17a6203e65cbef37ee9 | []
| no_license | pujaredij17/Facility-Management-System | 1d47011f71cc0be117fb46aafe4d73bfcc2eac54 | 16c61acb0a4cb0bdc41b42e58b7f41ba919f42fb | refs/heads/master | 2020-11-30T15:05:02.751795 | 2019-12-27T11:04:29 | 2019-12-27T11:04:29 | 230,425,857 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,810 | java | package MAC_Facility.data;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import MAC_Facility.model.Login;
import MAC_Facility.util.SQLConnection;
public class LoginDAO {
static SQLConnection DBMgr = SQLConnection.getInstance();
static Connection conn = SQLConnection.getDBConnection();
public static String[] UserLogin(Login login) {
Statement stmt = null;
// Connection conn = SQLConnection.getDBConnection();
String role = "";
String uname = login.getUsername();
String pwd = login.getPassword();
// System.out.println(uname);
// System.out.println(pwd);
String[] ans = new String[2];
String login_query = "SELECT * FROM mac_facility.all_users WHERE username='"+uname+"' and password='"+pwd+"'";
// String register = "SELECT * FROM mac_facility.all_users";
try {
// conn = SQLConnection.getDBConnection();
conn.setAutoCommit(false);
stmt = conn.createStatement();
// stmt = conn.createStatement();
ResultSet results = stmt.executeQuery(login_query);
conn.commit();
// System.out.println(results);
if(results.next()) {
// System.out.println("login successful");
ans[0] = results.getString(12);
ans[1] = results.getString(9);
}
else {
System.out.println("login failed");
}
System.out.println("Connection Successful");
} catch (SQLException e) {
// System.err.println(e);
}
return ans;
}
//unique employeeID
//list employees
// public static Boolean uniqueUsername(String username) {
// Statement stmt = null;
// Connection conn = null;
// conn = SQLConnection.getDBConnection();
// ArrayList<Registration> registerListInDB = new ArrayList<Registration>();
// try {
// stmt = conn.createStatement();
// String searchEmployee = " SELECT * from EMPLOYEE WHERE IDEMPLOYEE = '"+idEmp+"' ORDER BY surname";
// ResultSet employeeList = stmt.executeQuery(searchEmployee);
// while (employeeList.next()) {
// Employee employee = new Employee();
// String idemployee = employeeList.getString("idemployee");
// String name = employeeList.getString("name");
// String surname = employeeList.getString("surname");
// String badge = employeeList.getString("badge");
// employee.setIdemployee(idemployee);
// employee.setName(name);
// employee.setSurname(surname);
// employee.setBadge(badge);
// employeeListInDB.add(employee);
// }
// } catch (SQLException e) {}
// return employeeListInDB.isEmpty();
// }
//list employees
// public static ArrayList<Employee> listEmployees(String idComp) {
// Statement stmt = null;
// Connection conn = null;
// ArrayList<Registration> registerListInDB = new ArrayList<Registration>();
// conn = SQLConnection.getDBConnection();
// try {
// stmt = conn.createStatement();
// String searchEmployee = " SELECT * from EMPLOYEE WHERE FK_COMPANY = '"+idComp+"' ORDER BY surname";
//
// ResultSet employeeList = stmt.executeQuery(searchEmployee);
//
// while (employeeList.next()) {
// Employee employee = new Employee();
// String idemployee = employeeList.getString("idemployee");
// String name = employeeList.getString("name");
// String surname = employeeList.getString("surname");
// String badge = employeeList.getString("badge");
// employee.setIdemployee(idemployee);
// employee.setName(name);
// employee.setSurname(surname);
// employee.setBadge(badge);
// employeeListInDB.add(employee);
// }
// } catch (SQLException e) {}
// return employeeListInDB;
// }
} | [
"[email protected]"
]
| |
6ff71d3c398156bebb6c36465a5e4543f884a5ee | b76c4ebd709a8d2f3363b8ac811c5d2969843a6e | /src/LinkedIn/Interview/ValidTriangle.java | e22c01f9192d928798c39f01c83fddd95c31a271 | []
| no_license | maheshhg13/lintcode | 0344ae12aa45f19ce8eb43223ed79f88311f0b75 | 088e1adbbe25dfdd4cf99283e38763020248675c | refs/heads/master | 2021-01-20T19:57:03.001405 | 2016-10-12T15:50:40 | 2016-10-12T15:50:40 | 60,110,064 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 521 | java | package LinkedIn.Interview;
import java.util.Arrays;
public class ValidTriangle {
public boolean existTriangle(int[] edges) {
if(edges==null || edges.length==0){
return false;
}
Arrays.sort(edges);
for(int i=0;i<=edges.length-3;i++){
if(i!=0 && edges[i]==edges[i-1]){
continue;
}
for(int j=i+1;j<=edges.length-2;j++){
if(j!=i+1 && edges[j]==edges[i-1]){
continue;
}
int sum = edges[i]+edges[j];
if(sum>edges[j+1]){
return true;
}
}
}
return true;
}
}
| [
"[email protected]"
]
| |
5af3ece1c4f8bd53692e7f00dd15486e83178366 | 3a1fb8fe16d04952145996edd01cdc3a7762f761 | /spring/src/main/java/com/xiaoqiang/mvc/listen/ContextLoaderListener.java | b8860b90348cfd48f0c33a36107b81e6b52adb04 | []
| no_license | aisnia/framework | 26ec1b0c59073e2bb99ce3f2d5da8ba711c1527a | c71ced623afc5999904269e00a784184700db91c | refs/heads/master | 2022-06-23T08:43:44.879355 | 2020-03-11T08:50:11 | 2020-03-11T08:50:11 | 246,518,015 | 0 | 0 | null | 2022-06-17T03:00:00 | 2020-03-11T08:41:54 | Java | UTF-8 | Java | false | false | 1,814 | java | package com.xiaoqiang.mvc.listen;
import com.xiaoqiang.ioc.factory.ApplicationContext;
import com.xiaoqiang.ioc.utils.Constant;
import com.xiaoqiang.mvc.bean.Request;
import com.xiaoqiang.mvc.bean.RequestHandler;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletRegistration;
import java.util.Map;
/**
* @author xiaoqiang
* @date 2019/10/7-21:36
*/
public class ContextLoaderListener implements ServletContextListener {
public static final String LOCATION = "contextConfigLocation";
@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {
ServletContext servletContext = servletContextEvent.getServletContext();
String contextConfig = servletContext.getInitParameter(LOCATION);
// System.out.println(contextConfig);
// System.out.println(contextConfig.split(":")[1]);
ApplicationContext applicationContext = new ApplicationContext(contextConfig.split(":")[1]);
Map<Request, RequestHandler> mappingMap = applicationContext.getMappingMap();
servletContext.setAttribute("mappingMap", mappingMap);
//注册处理jsp的servlet
ServletRegistration jspServlet = servletContext.getServletRegistration("jsp");
jspServlet.addMapping("/index.jsp");
String jspUrl = applicationContext.getProperties().getProperty(Constant.JSP_PATH);
jspServlet.addMapping(jspUrl+"*");
// ServletRegistration defaultServlet = servletContext.getServletRegistration("default");
// defaultServlet.addMapping(applicationContext.getProperties().getProperty(Constant.ASSET_PATH));
}
@Override
public void contextDestroyed(ServletContextEvent servletContextEvent) {
}
}
| [
"[email protected]"
]
| |
ef2f59bac08434c55d09b78186f3b8b20059127b | 1e974356d529c1e11eb8e66e41f4b12bb81caa38 | /src/main/java/com/practice/juc/SpinLock.java | 45c77bd23d6813ea103817ce366d90288777d7d0 | []
| no_license | JustCodding/practice | b1b8bdca99136814f5ebe5f2135bdb741bb6d298 | 257fd08ec10b010153e3c39159a91f9d21b6db03 | refs/heads/master | 2023-01-05T11:25:25.471215 | 2019-09-24T09:11:49 | 2019-09-24T09:11:49 | 198,187,445 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,160 | java | package com.practice.juc;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
public class SpinLock {
//new AtomicInteger()的初始值是0,原子引用初始值则是null
AtomicReference<Thread> atomicReference = new AtomicReference<>();
public void Lock(){
Thread thread = Thread.currentThread();
System.out.println(thread.getName()+" 开始获取自旋锁");
/*
如果atomicReference中的值期待值不为null,则线程在此循环判断期待值是否为null
相当于没有获取到锁,线程"阻塞",但是相比于java提供的锁,这里并不是真正的线程阻塞,
而是在循环的普安段,直到期待值为null,则线程可以跳出循环,继续往下执行,相当于获得了锁
*/
while(!atomicReference.compareAndSet(null,thread)){
}
System.out.println(thread.getName()+" 获取到了自旋锁");
}
//执行Lock()之后,必须执行unLock()进行释放锁,否则其他线程没法获取到锁该锁了
public void unLock(){
Thread thread = Thread.currentThread();
atomicReference.compareAndSet(thread,null);
System.out.println(thread.getName()+" 释放了自旋锁");
}
public static void main(String[] args) {
final SpinLock spinLock = new SpinLock();
new Thread("AA"){
@Override
public void run() {
//同步代码块
spinLock.Lock();
System.out.println(Thread.currentThread().getName()+"线程 同步代码块执行");
spinLock.unLock();
}
}.start();
new Thread("BB"){
@Override
public void run() {
//同步代码块
spinLock.Lock();
System.out.println(Thread.currentThread().getName()+"线程 同步代码块执行");
spinLock.unLock();
}
}.start();
}
}
| [
"[email protected]"
]
| |
cf7310f256a8381e05bf0343fd1dd6a8a30c176e | 388c2a44fe5de5c6524d407c1dddfe43db754c5b | /src/gui/org/deidentifier/arx/gui/view/def/IEditor.java | d4373101aa4cd0327a9283e6e7df06e2970c8dc5 | [
"Apache-2.0"
]
| permissive | arx-deidentifier/arx | d51f751acac017d39e18213cce18d42887dcdb22 | c8c26c95e42465908cdc1e07f6211121374600af | refs/heads/master | 2023-08-16T08:07:47.794373 | 2023-04-06T18:34:16 | 2023-04-06T18:34:16 | 9,751,165 | 567 | 243 | Apache-2.0 | 2023-05-23T20:17:59 | 2013-04-29T15:23:18 | Java | UTF-8 | Java | false | false | 1,782 | java | /*
* ARX Data Anonymization Tool
* Copyright 2012 - 2023 Fabian Prasser and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.deidentifier.arx.gui.view.def;
import org.eclipse.swt.widgets.Composite;
/**
* Interface for an editor for a given data type.
*
* @author Fabian Prasser
* @param <T>
*/
public interface IEditor<T> {
/**
* Does the editor accept the value.
*
* @param t
* @return
*/
public boolean accepts(T t);
/**
* Creates an according control.
*
* @param parent
*/
public void createControl(Composite parent);
/**
* Returns the category.
*
* @return
*/
public String getCategory();
/**
* Returns the label.
*
* @return
*/
public String getLabel();
/**
* Returns the current value.
*
* @return
*/
public T getValue();
/**
* Sets the value.
*
* @param t
*/
public void setValue(T t);
/**
* Checks whether the two values are different
* @param value1
* @param value2
* @return
*/
public boolean isDifferent(T value1, T value2);
}
| [
"[email protected]"
]
| |
62c535f6f456ea1cdc05cd3154054f8f52372ac1 | f04ccca27723e1bf0714839344de390fb8e531d3 | /src/com/michaelzanussi/genalyze/genesys/attributes/AttributeReferenceID.java | cb25411c6fb8c2005f39a183c9c33e3b43c633a3 | []
| no_license | idavehuwei/Genalyze | d8865409dc6066136a1c6d8edb85a92103c10ba1 | c8c574ef3cf715494c3a1e47e3595cb982909612 | refs/heads/master | 2021-12-08T17:09:52.288094 | 2016-03-27T19:36:17 | 2016-03-27T19:36:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 747 | java | package com.michaelzanussi.genalyze.genesys.attributes;
/**
* AttributeReferenceID
*
* @author <a href="mailto:[email protected]">Michael Zanussi</a>
* @version 1.0 (28 September 2006)
*/
public class AttributeReferenceID extends AbstractAttribute {
private Long value;
/**
* Single-arg constructor.
*
* @param value attribute value.
*/
public AttributeReferenceID(String value) {
this.value = stringToLong(value);
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
public String toString() {
return value.toString();
}
/* (non-Javadoc)
* @see com.michaelzanussi.genalyze.genesys.attributes.Attribute#value()
*/
public Object value() {
return value;
}
}
| [
"[email protected]"
]
| |
80aa9dfc54dac23114a932d863358e97d2668abb | 5db6808f19b405eb02f7e1affcb34d3caa605618 | /src/java/controle/BebidaControle.java | 35bd212b2a5ca21ce94507ec3f899dfc82d4a658 | []
| no_license | lucioconsul/PI321 | 0be243b476b4de314696b460b6bde90f9c73bd36 | e36d511126743f2888d53d2bedc9d3635686e064 | refs/heads/master | 2016-09-06T10:28:46.509310 | 2013-02-26T02:08:04 | 2013-02-26T02:08:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,912 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package controle;
import dao.BebidaDAO;
import dao.BebidaDAOImp;
import dao.EstoqueBebidaDAOImp;
import dao.EstoqueDAO;
import entidade.Bebida;
import entidade.EstoqueBebida;
import java.util.List;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
/**
*
* @author Lucio
*/
@ManagedBean(name = "bebC")
@SessionScoped
public class BebidaControle {
private Bebida bebida;
private BebidaDAO bDAO;
private EstoqueBebida estoq;
private DataModel model;
private String combo;
private String atuali;
//#####################################################################################################################################
public Bebida getBebida() {
if (bebida == null) {
bebida = new Bebida();
}
return bebida;
}
public void setBebida(Bebida Bebida) {
this.bebida = Bebida;
}
public DataModel getModel() {
return model;
}
public void setModel(DataModel model) {
this.model = model;
}
public EstoqueBebida getEstoq() {
if (estoq == null) {
estoq = new EstoqueBebida();
}
return estoq;
}
public void setEstoq(EstoqueBebida estoq) {
this.estoq = estoq;
}
public String getCombo() {
return combo;
}
public void setCombo(String combo) {
this.combo = combo;
}
public String getAtuali() {
return atuali;
}
public void setAtuali(String atuali) {
this.atuali = atuali;
}
//#####################################################################################################################################
public String salvar() {
bDAO = new BebidaDAOImp();
FacesContext context = FacesContext.getCurrentInstance();
if (bebida.getId() == null) {
try {
bDAO.salva(bebida);
context.addMessage(null, new FacesMessage("Sapore", "Bebida salva com sucesso!"));
} catch (Exception e) {
context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Sapore", "Erro ao tentar salvar!"));
}
} else {
try {
bDAO.altera(bebida);
context.addMessage(null, new FacesMessage("Sapore", "Bebida alterada com sucesso!"));
} catch (Exception e) {
context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Sapore", "Erro ao tentar alterar!"));
}
}
limpar();
return "cad_bebida.faces";
}
//#####################################################################################################################################
public String alterar() {
bebida = (Bebida) model.getRowData();
setBebida(bebida);
return "cad_bebida";
}
//#####################################################################################################################################
public String excluir() {
FacesContext context = FacesContext.getCurrentInstance();
String nome = bebida.getNome();
try {
bDAO = new BebidaDAOImp();
bebida = (Bebida) model.getRowData();
bDAO.remove(bebida);
model = new ListDataModel(bDAO.pesquisaLikeBebida(nome));
context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Bebida excluída com sucesso!", ""));
} catch (Exception e) {
context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Não foi possivel exclusão!", ""));
}
limpar();
return "";
}
//#####################################################################################################################################
private void limpar() {
bebida = null;
estoq = null;
}
//#####################################################################################################################################
public String limpaPesquisa() {
bebida = null;
return "pesqBebida";
}
//#####################################################################################################################################
public String novaBebida() {
limpar();
bebida = new Bebida();
return "cad_bebida";
}
//#####################################################################################################################################
public void pesquisaLikeNome() {
FacesContext context = FacesContext.getCurrentInstance();
try {
bDAO = new BebidaDAOImp();
List<Bebida> bebidas = bDAO.pesquisaLikeBebida(bebida.getNome());
model = new ListDataModel(bebidas);
} catch (Exception e) {
context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Sapore", "Erro ao tentar pesquisar!"));
}
}
//#####################################################################################################################################
public String estoque() {
FacesContext context = FacesContext.getCurrentInstance();
bebida = (Bebida) model.getRowData();
setBebida(bebida);
try {
EstoqueDAO eDAO = new EstoqueBebidaDAOImp();
estoq = eDAO.pesquisaByBebida(bebida);
} catch (Exception e) {
context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Sapore", "Erro ao tentar pesquisar estoque!"));
}
return "bebida_estoque";
}
//#####################################################################################################################################
public String atualizaEstoque() {
FacesContext context = FacesContext.getCurrentInstance();
int n = estoq.getQtd() + Integer.parseInt(atuali);
estoq.setQtd(n);
estoq.setBebida(bebida);
EstoqueDAO eDAO = new EstoqueBebidaDAOImp();
try {
if (estoq.getId() == null) {
eDAO.salva(estoq);
context.addMessage(null, new FacesMessage("Sapore", "Estoque atualizado com sucesso!"));
} else {
eDAO.altera(estoq);
context.addMessage(null, new FacesMessage("Sapore", "Estoque atualizado com sucesso!"));
}
} catch (Exception e) {
context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Sapore", "Erro ao tentar atualizar estoque!"));
}
limpar();
setAtuali("");
return "";
}
}
| [
"[email protected]"
]
| |
504b4890013497570e0d783afe4e5dfb3b43e3e4 | 12f3908a6e31372f991dd3f0b5569c1eba7dcb5c | /libCommon/src/main/java/com/cenco/lib/common/core/CommonLib.java | 8e2b016f01578c0b1c146f39037fffd20a8d3ea1 | []
| no_license | fangliangv587/lib-common | f611dd938ca4c4fce2fcda572ae0f14c164c6ef8 | d6a10fef80ae232059b2c143311864e313b035ec | refs/heads/master | 2021-01-24T03:48:42.424684 | 2019-01-02T07:10:45 | 2019-01-02T07:10:45 | 122,905,511 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 245 | java | package com.cenco.lib.common.core;
import android.app.Application;
import com.cenco.lib.common.http.HttpUtil;
/**
* Created by Administrator on 2018/8/28.
*/
public class CommonLib {
public static void init(Application app){
}
}
| [
"[email protected]"
]
| |
1d85409cbb1ed17c6f25b5385f92aafc48989e9b | a3c475673ab82cb0e3828222c2e36ffe0e4003fe | /src/gamepieces/Fruit.java | fa9d5815514bc9e59bdce540f116a5398d955231 | []
| no_license | BenjaminRichardson/CommandLineSnake | 4ed692348fd713790fcf68b3887c6b6fe8d0e4c4 | b90910f6bf09f9ecbe2dadf0fb67f81276cc487a | refs/heads/master | 2021-08-28T15:22:37.418476 | 2017-12-12T15:51:18 | 2017-12-12T15:51:18 | 114,008,759 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 356 | java | package gamepieces;
import board.Location;
public abstract class Fruit extends MovablePiece {
protected int growAmount;
public Fruit(Location location, int growAmount) {
this.setLocation(location);
this.growAmount = growAmount;
}
public abstract void move();
public int getGrowAmount() {
return this.growAmount;
}
}
| [
"[email protected]"
]
| |
756b6a54ded96b0255750b065e27e08ea01059a5 | ae8acd1208069e51fe805c706eb7a93e5d4dfc48 | /workBook/011 practice String equals method/base code/base code/starter.java | 5538f58a74ff90e136e4a7c66faca4e59db0497d | []
| no_license | Kevinloritsch/Buffet-Dr.-Neato | f6d4357e9718499bacd61bf5d7e72e9b010635c6 | 6841b6b9a6e15492121c7b989035c658aebed68b | refs/heads/master | 2020-08-10T04:02:41.105536 | 2020-03-09T19:41:53 | 2020-03-09T19:41:53 | 214,249,677 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 529 | java | import pkg.*;
public class starter implements InputKeyControl {
static Rectangle r;
public static void main(String args[])
{
KeyController mC = new KeyController(Canvas.getInstance(),new starter());
r = new Rectangle (20,20,20,20);
r.draw();
}
public void keyPress(String key)
{
if(key.equals("d"))
{
System.out.println("I love food");
r.translate(20,0);
}
if(key.equals("a"))
{
System.out.println("I do not love food");
r.translate(-20,0);
}
}
}
| [
"[email protected]"
]
| |
6f60e2420f7a6eb23dd0665e9696b2c8a59f534a | 92c1674aacda6c550402a52a96281ff17cfe5cff | /module07/module26/src/main/java/com/android/example/module07_module26/ClassAAJ.java | fdfba8cb6e554d6a1ff24aa75ace5b680a0f2550 | []
| no_license | bingranl/android-benchmark-project | 2815c926df6a377895bd02ad894455c8b8c6d4d5 | 28738e2a94406bd212c5f74a79179424dd72722a | refs/heads/main | 2023-03-18T20:29:59.335650 | 2021-03-12T11:47:03 | 2021-03-12T11:47:03 | 336,009,838 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,371 | java | package com.android.example.module07_module26;
public class ClassAAJ {
private dagger.internal.DelegateFactory<Object> instance_var_1_0 = new dagger.internal.DelegateFactory();
private dagger.internal.DelegateFactory<Object> instance_var_1_1 = new dagger.internal.DelegateFactory();
private dagger.internal.DelegateFactory<Object> instance_var_1_2 = new dagger.internal.DelegateFactory();
private dagger.internal.DelegateFactory<Object> instance_var_1_3 = new dagger.internal.DelegateFactory();
public void method0(
dagger.internal.DelegateFactory<Object> param0,
dagger.internal.DelegateFactory<Object> param1,
dagger.internal.DelegateFactory<Object> param2,
dagger.internal.DelegateFactory<Object> param3) throws Throwable {
for (int iAb = 0; iAb < 2; iAb++) {
if (new java.lang.Object().equals(new java.lang.Object())) {
dagger.internal.DelegateFactory<Object> local_var_4_0 = new dagger.internal.DelegateFactory();
local_var_4_0.get();
}
param0.get();
}
}
public void method1(
dagger.internal.DelegateFactory<Object> param0) throws Throwable {
param0.get();
dagger.internal.DelegateFactory<Object> local_var_2_1 = new dagger.internal.DelegateFactory();
local_var_2_1.get();
dagger.internal.DelegateFactory<Object> local_var_2_2 = new dagger.internal.DelegateFactory();
local_var_2_2.get();
dagger.internal.DelegateFactory<Object> local_var_2_3 = new dagger.internal.DelegateFactory();
local_var_2_3.get();
}
public void method2(
dagger.internal.DelegateFactory<Object> param0,
dagger.internal.DelegateFactory<Object> param1,
dagger.internal.DelegateFactory<Object> param2) throws Throwable {
dagger.internal.DelegateFactory<Object> local_var_2_3 = new dagger.internal.DelegateFactory();
local_var_2_3.get();
dagger.internal.DelegateFactory<Object> local_var_2_4 = new dagger.internal.DelegateFactory();
local_var_2_4.get();
dagger.internal.DelegateFactory<Object> local_var_2_5 = new dagger.internal.DelegateFactory();
local_var_2_5.get();
}
public void method3(
dagger.internal.DelegateFactory<Object> param0,
dagger.internal.DelegateFactory<Object> param1,
dagger.internal.DelegateFactory<Object> param2) throws Throwable {
param0.get();
dagger.internal.DelegateFactory<Object> local_var_2_3 = new dagger.internal.DelegateFactory();
local_var_2_3.get();
}
}
| [
"[email protected]"
]
| |
bbe22154d212da130a6e344207b80a31955b6d50 | 6844aa516fa53b9993db11380ed8603e89401309 | /FitApp/app/src/main/java/cz/lumination/fitapp/activity/workout/ItemAdapter.java | 3366f4061c5da6ff588b3d5ba1e5564b8e2e9bec | [
"Apache-2.0"
]
| permissive | suplik10/LuMination | a98708e7a54571f8cb16564a94724ed0c73421e5 | 4a9ec461974951afa89763df196d39e39f547312 | refs/heads/master | 2021-01-18T17:52:28.418710 | 2017-04-05T09:14:05 | 2017-04-05T09:14:05 | 86,819,623 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,688 | java | /*
* Copyright 2014 Magnus Woxblom
*
* 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 cz.lumination.fitapp.activity.workout;
import android.support.v4.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import com.woxthebox.draglistview.DragItemAdapter;
import java.util.ArrayList;
import cz.lumination.fitapp.R;
class ItemAdapter extends DragItemAdapter<Pair<Long, String>, ItemAdapter.ViewHolder> {
private int mLayoutId;
private int mGrabHandleId;
private boolean mDragOnLongPress;
ItemAdapter(ArrayList<Pair<Long, String>> list, int layoutId, int grabHandleId, boolean dragOnLongPress) {
mLayoutId = layoutId;
mGrabHandleId = grabHandleId;
mDragOnLongPress = dragOnLongPress;
setHasStableIds(true);
setItemList(list);
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(mLayoutId, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
super.onBindViewHolder(holder, position);
String text = mItemList.get(position).second;
holder.mText.setText(text);
holder.itemView.setTag(mItemList.get(position));
}
@Override
public long getItemId(int position) {
return mItemList.get(position).first;
}
class ViewHolder extends DragItemAdapter.ViewHolder {
TextView mText;
ViewHolder(final View itemView) {
super(itemView, mGrabHandleId, mDragOnLongPress);
mText = (TextView) itemView.findViewById(R.id.text);
}
@Override
public void onItemClicked(View view) {
Toast.makeText(view.getContext(), "Item clicked", Toast.LENGTH_SHORT).show();
}
@Override
public boolean onItemLongClicked(View view) {
Toast.makeText(view.getContext(), "Item long clicked", Toast.LENGTH_SHORT).show();
return true;
}
}
}
| [
"[email protected]"
]
| |
0688b5f010ee66b16303c96891c6d681875aedfb | 7c9f13f1674f37ba4c94fcab8591cc0a9575a153 | /src/test/java/com/epam/java/rt/museco/model/company/staff/RootStaffTest.java | f939023e7ca9adbbf3da57e7805fcf53868edcac | []
| no_license | p1a-7ck/museco | e33433502337a421886e821645e8c749bb013d09 | cb4f4d3514a8e58adebb14fb664480f98e8053ae | refs/heads/master | 2021-01-16T20:38:30.768357 | 2016-07-15T19:14:55 | 2016-07-15T19:14:55 | 63,053,218 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,958 | java | package com.epam.java.rt.museco.model.company.staff;
import com.epam.java.rt.museco.Main;
import org.joda.money.CurrencyUnit;
import org.joda.money.Money;
import org.junit.Test;
/**
* Municipal Service Company
*/
public class RootStaffTest {
/**
* (1) Create new root staff and setId
* (2) Set name to 'BI-GROUP' and detail to 'Astana'
* (3) Add new position and setId
* (4) Set position's name to 'manager'
* (5) Set salary to KZT 100.000
* (6) Set hourCost to KZT 1.000
* (7) Set createDate to now()
* (8) Add new employee and setId
* (9) Set first, last and middle name
* (10) Set createDate to now()
* (11) Set position 'manager' for employer 'Ivanov I.I.'
*/
@Test
public void simpleCreateAllEntitiesTest() {
RootStaff rootStaff = new RootStaff(); // (1)
rootStaff.setId(); // (1)
rootStaff.setName("BI-GROUP"); // (2)
rootStaff.setDetail("Astana"); // (2)
Position position = rootStaff.addNewPosition(); // (3)
position.setName("manager"); // (4)
position.setSalary(Money.of
(CurrencyUnit.of("KZT"), 100000)); // (5)
position.setHourCost(Money.of
(CurrencyUnit.of("KZT"), 1000)); // (6)
// position.setCreateDateNow(); // (7)
Employee employee = rootStaff.addNewEmployee(); // (8)
employee.setFirstName("Ivan"); // (9)
employee.setLastName("Ivanov"); // (9)
employee.setMiddleName("Ivanovich"); // (9)
employee.setCreateDateNow(); // (10)
Main.LOGGER.trace("position = {}", position.toInDetail());
employee.setPosition(position); // (11)
Main.LOGGER.trace("rootStaff = {}", rootStaff.toInDetail());
}
} | [
"[email protected]"
]
| |
2ded0457285a45aa1a3407914c3b7eea4e5fb354 | 7b1441bd90792cb33b20151839b89c6477e2fa0a | /src/powercrystals/minefactoryreloaded/farmables/plantables/PlantableCocoa.java | 779ca788708ef624b8ff5ee8cc2cef177d37f762 | []
| no_license | NATOcm/MineFactoryReloaded | 737d109e178d0c8cb8b77e28a53806eb545bfcc3 | 3c8412dbd20fda85640b37369f0c72d876dcf440 | refs/heads/master | 2021-01-18T04:36:11.383148 | 2013-05-01T22:33:46 | 2013-05-01T22:33:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,942 | java | package powercrystals.minefactoryreloaded.farmables.plantables;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLog;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.world.World;
import powercrystals.minefactoryreloaded.api.IFactoryPlantable;
public class PlantableCocoa implements IFactoryPlantable
{
@Override
public int getSeedId()
{
return Item.dyePowder.itemID;
}
@Override
public int getPlantedBlockId(World world, int x, int y, int z, ItemStack stack)
{
return Block.cocoaPlant.blockID;
}
@Override
public int getPlantedBlockMetadata(World world, int x, int y, int z, ItemStack stack)
{
return 0;
}
@Override
public boolean canBePlantedHere(World world, int x, int y, int z, ItemStack stack)
{
return world.isAirBlock(x, y, z) && isNextToJungleLog(world, x, y, z);
}
private boolean isNextToJungleLog(World world, int x, int y, int z)
{
if (isJungleLog(world, x+1, y, z)
|| isJungleLog(world, x-1, y, z)
|| isJungleLog(world, x, y, z+1)
|| isJungleLog(world, x, y, z-1))
{
return true;
}
return false;
}
private boolean isJungleLog(World world, int x, int y, int z)
{
return world.getBlockId(x, y, z) == Block.wood.blockID && BlockLog.limitToValidMetadata(world.getBlockMetadata(x, y, z)) == 3;
}
@Override
public void prePlant(World world, int x, int y, int z, ItemStack stack)
{
}
@Override
public void postPlant(World world, int x, int y, int z, ItemStack stack)
{
int blockDirection = 4; // NORTH
if (isJungleLog(world, x-1, y, z))
{
blockDirection = 5; // SOUTH
}
else if (isJungleLog(world, x, y, z+1))
{
blockDirection = 2; // EAST
}
else if (isJungleLog(world, x, y, z-1))
{
blockDirection = 3; // WEST
}
world.setBlockMetadataWithNotify(x, y, z, Direction.rotateOpposite[Direction.facingToDirection[blockDirection]], 2);
}
}
| [
"[email protected]"
]
| |
d235a827cb5f9c499b6deff8065ad2c1d4fc5f42 | cc51072e081ce2a0f606310e289cafd4635211f6 | /src/main/java/kr/or/dgit/book_project/dto/MemberLend.java | 2f5c07e8ac0978141ac091dce505be23de4d40d5 | []
| no_license | rksym343/book_project | 414272b2f6ca3c26dcba8f59f22d22b0e5bdd930 | cf16576dbd07d02450286231a87acdbef01d0e4e | refs/heads/master | 2021-01-18T19:53:49.262309 | 2017-04-02T22:44:27 | 2017-04-02T22:44:27 | 86,920,320 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,700 | java | package kr.or.dgit.book_project.dto;
import java.util.Date;
public class MemberLend {
private MemberInfo mCode; // 회원코드
private boolean isPosbl; // 대여가능여부
private int delayCount; // 연체 횟수
private int mLendCount; // 총 대여 횟수
private int mNowCount; // 현재 대여 권수
private Date blackDate; // 대여금지일
public MemberLend() { }
public MemberLend(MemberInfo mCode, boolean isPosbl, int delayCount, int mLendCount, int mNowCount, Date blackDate) {
this.mCode = mCode;
this.isPosbl = isPosbl;
this.delayCount = delayCount;
this.mLendCount = mLendCount;
this.mNowCount = mNowCount;
this.blackDate = blackDate;
}
public MemberInfo getmCode() {
return mCode;
}
public void setmCode(MemberInfo mCode) {
this.mCode = mCode;
}
public boolean isPosbl() {
return isPosbl;
}
public void setPosbl(boolean isPosbl) {
this.isPosbl = isPosbl;
}
public int getDelayCount() {
return delayCount;
}
public void setDelayCount(int delayCount) {
this.delayCount = delayCount;
}
public int getmLendCount() {
return mLendCount;
}
public void setmLendCount(int mLendCount) {
this.mLendCount = mLendCount;
}
public int getmNowCount() {
return mNowCount;
}
public void setmNowCount(int mNowCount) {
this.mNowCount = mNowCount;
}
public Date getBlackDate() {
return blackDate;
}
public void setBlackDate(Date blackDate) {
this.blackDate = blackDate;
}
@Override
public String toString() {
return String.format("%s, %s, %s, %s, %s, %s", mCode, isPosbl, delayCount, mLendCount, mNowCount, blackDate);
}
}
| [
"[email protected]"
]
| |
eb409f50241d056d076630b136bea18d2ee6cbe3 | 305e64233c32670c3b8522854142d59fe9c80167 | /programmers/입국심사.java | 765c6f1e5fc718a371420c38a3fd521841552dc3 | []
| no_license | Kastori1206/algo | 144f7708ecd653c01a2c98d83d0406a90390ace8 | ea937ae3e4def01f7949c11254035a33f6aae6bb | refs/heads/master | 2023-01-08T11:11:24.155073 | 2022-12-28T04:41:45 | 2022-12-28T04:41:45 | 239,990,626 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 811 | java | package programmers;
import java.util.*;
/*
* 입국심사
* https://programmers.co.kr/learn/courses/30/lessons/43238
* 이분탐색
*/
public class 입국심사 {
class Solution {
public long solution(int n, int[] times) {
Arrays.sort(times);
long left =1, right = (long)times[times.length-1] * n;
long answer = right;
while(left <= right){
long people =0;
long mid = (left+right)/2;
for (int time : times) {
people += (mid / time);
}
if(people<n){
left = mid + 1;
}else{
right = mid-1;
answer = mid;
}
}
return answer;
}
}
}
| [
"[email protected]"
]
| |
938846556f64c8ebd629a01ed3733ba798dc2bc0 | 6f8678b9db1666f0510768aabc66d9397da62db7 | /src/main/java/com/pcschool/ocp/d15_thread/case1/Account.java | a6d4d51ed07f632c1777a3d5aa3b1e9ba346cbda | []
| no_license | RichardChienn/Java0811 | 4c07f34f704f4a43005af2a6d7d341b4e3866c1b | 6717410ffaa72e39c8ed50ee9c8c139c527e4705 | refs/heads/master | 2022-12-15T01:19:00.185785 | 2020-08-27T07:56:07 | 2020-08-27T07:56:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,174 | java |
package com.pcschool.ocp.d15_thread.case1;
public class Account {
private int balance ; //物件變數 (帳戶餘額) 與執行緒共享
public Account(int balance) {
this.balance = balance;
}
// 提款方法
public synchronized void withdraw(int money) { // money 是一個方法區域變數(每一個執行緒自己會擁有一個)
String tName = Thread.currentThread().getName();
System.out.printf("%s 進行提款\n", tName);
// 檢查目前的帳戶餘額
int current_balance = balance;
// 模擬系統運行時間
for(int i=0;i<Integer.MAX_VALUE;i++);
// 進行假提領
current_balance = current_balance - money;
// 進行提款程序
if(current_balance >=0) { // 餘額充足, 可以提領...
balance = current_balance; // 將最新餘額寫入 balance
System.out.printf("%s 提款: %d 成功, 帳戶餘額: %d\n", tName, money, balance);
} else {
System.out.printf("%s 提款: %d 失敗, 帳戶餘額: %d\n", tName, money, balance);
}
}
}
| [
"[email protected]"
]
| |
eb171892bdab2b049aa363d29c5a3b930d6f7bc2 | 0d3fa744f559f1047e0a114119d88ed8d350db84 | /src/main/com/davidlopez/simpleperceptron/utilities/Entry.java | 3db65cae9133799a839e8e5f32eec38d82d82399 | [
"MIT"
]
| permissive | dloez/SimplePerceptron-AND | 7c14abee7ce9066907860b58c8ec1922da93aa6f | e89425eda41fbb8948e89779065ca36155b632e0 | refs/heads/master | 2022-02-18T09:21:06.489897 | 2019-10-03T08:32:34 | 2019-10-03T08:32:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 139 | java | package main.com.davidlopez.simpleperceptron.utilities;
public class Entry extends Utility {
public Entry(){
super();
}
}
| [
"[email protected]"
]
| |
5d9d7031871f2ec3e9f24df511c3a9320a8a7298 | f9736f249c7bd3765277ba2e38edb8af983ffaf7 | /chapter4/datasets/jadx-decompile/infected/com/umeng/analytics/social/a.java | f64960382e3251b931ffc7e2a86e739bbebc8b70 | []
| no_license | m-kashani/book-resources | bb1be07add07cf4cf6df77a8949b1bffddfe98d2 | a9df54954423b81391f9f729c41fff456b2493cb | refs/heads/master | 2020-09-22T15:44:06.825446 | 2019-12-03T04:47:19 | 2019-12-03T04:47:19 | 225,263,101 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 633 | java | package com.umeng.analytics.social;
import u.aly.bs;
/* compiled from: UMException */
public class a extends RuntimeException {
private static final long b = -4656673116019167471L;
protected int a = 5000;
private String c = bs.b;
public int a() {
return this.a;
}
public a(int i, String str) {
super(str);
this.a = i;
this.c = str;
}
public a(String str, Throwable th) {
super(str, th);
this.c = str;
}
public a(String str) {
super(str);
this.c = str;
}
public String getMessage() {
return this.c;
}
}
| [
"[email protected]"
]
| |
ff341d5c01a1d9c43ec8e348aa09a1d3534f7b43 | 7e714b10afae5f4c8b745e93f09234f726aee274 | /sample/src/main/java/com/quickdevandroid/sample/sample/FileApiFragment.java | 8de16bc8722e4aa4be6d69884ecdd0d6fa793dd1 | [
"MIT"
]
| permissive | RichCodersAndMe/QuickDevAndroid | a8fb5617a82460fb2713eebcc0e18bb79e2eb504 | 42fb2a4aac7f80683c03cbf1cc082d357626bfdb | refs/heads/master | 2021-06-22T07:54:54.597286 | 2017-08-16T15:32:05 | 2017-08-16T15:32:05 | 100,441,302 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,847 | java | package com.quickdevandroid.sample.sample;
import android.Manifest;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import com.quickdevandroid.framework.dialog.AlertDialogManager;
import com.quickdevandroid.framework.file.FileCountListener;
import com.quickdevandroid.framework.file.FileManager;
import com.quickdevandroid.framework.file.FileSizeListener;
import com.quickdevandroid.framework.fragment.BaseFragment;
import com.quickdevandroid.framework.permission.PermissionManager;
import com.quickdevandroid.framework.permission.RequestPermissionCallback;
import com.quickdevandroid.sample.R;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class FileApiFragment extends BaseFragment {
private String totalFilePath = FileManager.getExternalStorageRoot() + File.separator + "QuickDevFramework";
@BindView(R.id.tvTotalSize)
TextView tvTotalSize;
@BindView(R.id.tvCurrentSize)
TextView tvCurrentSize;
@BindView(R.id.tvTotalSum)
TextView tvTotalSum;
@BindView(R.id.tvCurrentSum)
TextView tvCurrentSum;
@BindView(R.id.tvHasSDCard)
TextView tvHasSDCard;
@BindView(R.id.tvHasPermission)
TextView tvHasPermission;
@Override
protected void onCreateContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
setContentView(R.layout.fragment_file_api, container);
ButterKnife.bind(this, getContentView());
PermissionManager.performWithPermission(
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE)
.perform(getActivity(), new RequestPermissionCallback() {
@Override
public void onGranted() {
try {
FileManager.pathStringToFile(totalFilePath).mkdir();
File txtFile = FileManager.pathStringToFile(totalFilePath + File.separator + "text.txt");
txtFile.createNewFile();
FileOutputStream outputStream = new FileOutputStream(txtFile);
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream);
byte[] buff = new byte[1024000];
for (int i = 0; i < 1024000; i++) {
buff[i] = 1;
}
bufferedOutputStream.write(buff, 0, 1024000);
bufferedOutputStream.close();
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public void onDenied() {
AlertDialogManager.showAlertDialog("请授予文件管理权限");
}
});
}
@OnClick(R.id.btnCopyFileSimple)
public void OnCopyFileSimple() {
FileManager.pathStringToFile(totalFilePath + File.separator + "Copy").mkdir();
FileManager.copyFileOperate(FileManager.pathStringToFile(totalFilePath + File.separator + "text.txt"),
totalFilePath + File.separator + "Copy").setFileSizeListener(new FileSizeListener() {
@Override
public void onStart() {}
@Override
public void onProgressUpdate(final double count, final double current) {
tvCurrentSize.setText("currentSize:" + current + "KB");
tvTotalSize.setText("totalSize:" + count + "KB");
}
@Override
public void onSuccess() {
Toast.makeText(getActivity(), "copy success", Toast.LENGTH_SHORT).show();
}
@Override
public void onFail(String failMsg) {}
}).setFileCountListener(new FileCountListener() {
@Override
public void onStart() {}
@Override
public void onProgressUpdate(final long count, final long current) {
tvCurrentSum.setText("currentSum:" + current + "");
tvTotalSum.setText("totalSum:" + count + "");
}
@Override
public void onSuccess() {}
@Override
public void onFail(String failMsg) {}
}).execute();
}
@OnClick(R.id.btnCopyFolderSimple)
public void OnCopyFolderSimple() {
try {
FileManager.pathStringToFile(totalFilePath + File.separator + "FolderExample").mkdir();
FileManager.pathStringToFile(totalFilePath + File.separator + "FolderExample"+ File.separator + "1").mkdir();
FileManager.pathStringToFile(totalFilePath + File.separator + "FolderExample"+ File.separator + "2").mkdir();
FileManager.pathStringToFile(totalFilePath + File.separator + "CopyFolder").mkdir();
FileManager.pathStringToFile(totalFilePath).mkdir();
File txtFile = FileManager.pathStringToFile(totalFilePath + File.separator + "FolderExample"+
File.separator + "2" + File.separator + "text.txt");
File txtFile_ = FileManager.pathStringToFile(totalFilePath + File.separator + "FolderExample"+
File.separator + "text.txt");
txtFile.createNewFile();
txtFile.createNewFile();
FileOutputStream outputStream = new FileOutputStream(txtFile);
FileOutputStream outputStream_ = new FileOutputStream(txtFile_);
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream);
BufferedOutputStream bufferedOutputStream_ = new BufferedOutputStream(outputStream_);
byte[] buff = new byte[1024000];
for (int i = 0; i < 1024000; i++) {
buff[i] = 1;
}
bufferedOutputStream.write(buff, 0, 1024000);
bufferedOutputStream_.write(buff, 0, 1024000);
bufferedOutputStream.close();
outputStream.close();
bufferedOutputStream_.close();
outputStream_.close();
} catch (IOException e) {
e.printStackTrace();
}
FileManager.copyFileOperate(
FileManager.pathStringToFile(
totalFilePath + File.separator + "FolderExample"),
totalFilePath + File.separator + "CopyFolder"
).setFileSizeListener(new FileSizeListener() {
@Override
public void onStart() {}
@Override
public void onProgressUpdate(final double count, final double current) {
tvCurrentSize.setText("currentSize:" + current + "KB");
tvTotalSize.setText("totalSize:" + count + "KB");
}
@Override
public void onSuccess() {
Toast.makeText(getActivity(), "copy success", Toast.LENGTH_SHORT).show();
}
@Override
public void onFail(String failMsg) {}
}).setFileCountListener(new FileCountListener() {
@Override
public void onStart() {}
@Override
public void onProgressUpdate(final long count, final long current) {
tvCurrentSum.setText("currentSum:" + current + "");
tvTotalSum.setText("totalSum:" + count + "");
}
@Override
public void onSuccess() {}
@Override
public void onFail(String failMsg) {}
}).execute();
}
@OnClick(R.id.btnDeleteFolderSimple)
public void OnDeleteFolderSimple() {
FileManager.deleteFileOperate(FileManager.pathStringToFile(totalFilePath + File.separator +
"FolderExample")).setFileCountListener(new FileCountListener() {
@Override
public void onStart() {}
@Override
public void onProgressUpdate(final long count, final long current) {
tvCurrentSum.setText("currentSum:" + current + "");
tvTotalSum.setText("totalSum:" + count + "");
}
@Override
public void onSuccess() {
}
@Override
public void onFail(String failMsg) {
Toast.makeText(getActivity(), failMsg, Toast.LENGTH_SHORT).show();
}
}).execute();
tvHasSDCard.setText(getString(R.string.is_exist_sd_card) + ": " + FileManager.existExternalStorage());
tvHasPermission.setText(getString(R.string.has_file_permission) + ": " + FileManager.hasFileOperatePermission());
}
}
| [
"[email protected]"
]
| |
7fc7ae58ed3549ef56144cfff6fadee7b40a5f58 | 898228de7ac1ef7f6d523f8929c91d74db9d3578 | /src/main/java/com/finalproject/bank/BankApplication.java | e1c8dcbc857dd2c576978b9336d599b166045a7f | []
| no_license | I355960/Simple-Bank-Application | 79a9c4d6783ecf058cb4f415823bb37f56bdab6d | 02edddacbfcf463504613396f03129c62074c39b | refs/heads/master | 2023-06-15T06:26:55.011909 | 2021-07-14T10:50:05 | 2021-07-14T10:50:05 | 381,740,946 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 310 | java | package com.finalproject.bank;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class BankApplication {
public static void main(String[] args) {
SpringApplication.run(BankApplication.class, args);
}
}
| [
"[email protected]"
]
| |
bd4523acb5641645fb08311f03ab4b2905a20bc9 | 2bbef284ff5b2fb4a2d6f4d520c4d9e3114d8941 | /Core/Colloection/src/com/collection/map/HashMap.java | d7ee6472025c5b6710530f43a8a4963ac8f73b5f | []
| no_license | dhirajhargode/java-practice | 97deac4384a5070825ec1527bc128caa69d5b780 | 8aba94153eb23033a00da9b38d0e4186461cc724 | refs/heads/master | 2023-06-09T08:59:13.871686 | 2023-05-26T13:30:54 | 2023-05-26T13:30:54 | 220,675,609 | 0 | 0 | null | 2020-10-16T15:12:16 | 2019-11-09T17:09:31 | JavaScript | UTF-8 | Java | false | false | 766 | java | package com.collection.map;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
class HashMapDemo {
public static void main(String[] args) {
HashMap m = new HashMap();
m.put("A", 1000);
m.put("B", 500);
m.put("C", 200);
m.put("D", 700);
System.out.println(m);
System.out.println(m.put("A", 100));
/*
Collection c = m.values();
System.out.println(c);
Set s1 = m.entrySet();
System.out.println(s1);
Iterator itr = s1.iterator();
while (itr.hasNext()) {
Map.Entry m1 = (Map.Entry) itr.next();
System.out.println(m1.getKey() + "........." + m1.getValue());
if (m1.getKey().equals("C")) {
m1.setValue(2000);
}
System.out.println(m);
}
*/}
} | [
"[email protected]"
]
| |
d305c8a975520db98135549fe6999d1efa6f7005 | bbfb8272e01831b53a7243b770105880c0999fb5 | /src/pokemon/view/PokemonPanel.java | dda6302101f4f707068bb8c609d3e7638c99734a | []
| no_license | ZachYlst/PokemonProject | 334014baf775a4bc7863ab23a5748f6967462132 | 552b210983db3d7a09fc7da9bf38ec620c2b10fe | refs/heads/master | 2021-05-06T11:40:01.310988 | 2018-01-12T16:09:51 | 2018-01-12T16:09:51 | 114,269,181 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,075 | java | package pokemon.view;
import pokemon.controller.PokemonController;
import javax.swing.*;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Font;
public class PokemonPanel extends JPanel
{
private PokemonController appController;
private SpringLayout appLayout;
private JLabel iconLabel;
private JLabel healthLabel;
private JLabel nameLabel;
private JLabel numberLabel;
private JLabel evolvableLabel;
private JLabel modifierLabel;
private JLabel attackLabel;
private JCheckBox evolvableBox;
private JTextField nameField;
private JTextField numberField;
private JTextField attackField;
private JTextField healthField;
private JTextField modifierField;
private JTextArea descriptionArea;
private JTextArea typeArea;
private JButton saveButton;
private JButton clearButton;
private JComboBox pokedexDropdown;
private JPanel firstType;
private JPanel secondType;
private JPanel thirdType;
private void updatePokedexInfo(int index)
{
nameField.setText(appController.getPokedex().get(index).getName());
evolvableBox.setSelected(appController.getPokedex().get(index).isCanEvolve());
numberField.setText(appController.getPokedex().get(index).getNumber() + "");
attackField.setText(appController.getPokedex().get(index).getAttackPoints() + "");
healthField.setText(appController.getPokedex().get(index).getHealthPoints() + "");
modifierField.setText(appController.getPokedex().get(index).getEnhancementModifier() + "");
descriptionArea.setText(appController.getPokedex().get(index).toString());
typeArea.setText("");
for (String current : appController.getPokedex().get(index).getPokemonTypes())
{
typeArea.append(current + "\n");
}
}
public PokemonPanel(PokemonController appController)
{
super();
this.appController = appController;
appLayout = new SpringLayout();
iconLabel = new JLabel("POKEDEX", new ImageIcon(getClass().getResource("/pokemon/view/images/pokeball.png")), JLabel.CENTER);
iconLabel.setFont(new Font("OCR A Std", Font.PLAIN, 13));
appLayout.putConstraint(SpringLayout.WEST, iconLabel, 10, SpringLayout.WEST, this);
appLayout.putConstraint(SpringLayout.EAST, iconLabel, 158, SpringLayout.WEST, this);
healthLabel = new JLabel("health");
nameLabel = new JLabel("name");
appLayout.putConstraint(SpringLayout.NORTH, iconLabel, -32, SpringLayout.NORTH, nameLabel);
appLayout.putConstraint(SpringLayout.SOUTH, iconLabel, 55, SpringLayout.NORTH, nameLabel);
appLayout.putConstraint(SpringLayout.EAST, healthLabel, 0, SpringLayout.EAST, nameLabel);
numberLabel = new JLabel("number");
appLayout.putConstraint(SpringLayout.NORTH, nameLabel, 11, SpringLayout.SOUTH, numberLabel);
appLayout.putConstraint(SpringLayout.EAST, nameLabel, 0, SpringLayout.EAST, numberLabel);
appLayout.putConstraint(SpringLayout.NORTH, numberLabel, 15, SpringLayout.NORTH, this);
evolvableLabel = new JLabel("evolvable");
modifierLabel = new JLabel("modifier");
appLayout.putConstraint(SpringLayout.SOUTH, modifierLabel, -127, SpringLayout.SOUTH, this);
appLayout.putConstraint(SpringLayout.NORTH, evolvableLabel, 12, SpringLayout.SOUTH, modifierLabel);
attackLabel = new JLabel("attack");
appLayout.putConstraint(SpringLayout.SOUTH, healthLabel, -13, SpringLayout.NORTH, attackLabel);
appLayout.putConstraint(SpringLayout.SOUTH, attackLabel, -11, SpringLayout.NORTH, modifierLabel);
evolvableBox = new JCheckBox();
appLayout.putConstraint(SpringLayout.EAST, evolvableLabel, -38, SpringLayout.WEST, evolvableBox);
appLayout.putConstraint(SpringLayout.NORTH, evolvableBox, 0, SpringLayout.NORTH, evolvableLabel);
nameField = new JTextField("name");
appLayout.putConstraint(SpringLayout.NORTH, nameField, -5, SpringLayout.NORTH, nameLabel);
appLayout.putConstraint(SpringLayout.EAST, nameField, -11, SpringLayout.EAST, this);
numberField = new JTextField("##");
appLayout.putConstraint(SpringLayout.EAST, evolvableBox, 0, SpringLayout.EAST, numberField);
appLayout.putConstraint(SpringLayout.EAST, numberField, -25, SpringLayout.EAST, this);
appLayout.putConstraint(SpringLayout.EAST, numberLabel, -40, SpringLayout.WEST, numberField);
appLayout.putConstraint(SpringLayout.NORTH, numberField, -5, SpringLayout.NORTH, numberLabel);
attackField = new JTextField("ap");
appLayout.putConstraint(SpringLayout.EAST, attackLabel, -41, SpringLayout.WEST, attackField);
appLayout.putConstraint(SpringLayout.NORTH, attackField, -5, SpringLayout.NORTH, attackLabel);
appLayout.putConstraint(SpringLayout.EAST, attackField, 0, SpringLayout.EAST, evolvableBox);
healthField = new JTextField("hp");
appLayout.putConstraint(SpringLayout.NORTH, healthField, -5, SpringLayout.NORTH, healthLabel);
appLayout.putConstraint(SpringLayout.EAST, healthField, 0, SpringLayout.EAST, evolvableBox);
modifierField = new JTextField("mod");
appLayout.putConstraint(SpringLayout.EAST, modifierLabel, -38, SpringLayout.WEST, modifierField);
appLayout.putConstraint(SpringLayout.NORTH, modifierField, -5, SpringLayout.NORTH, modifierLabel);
appLayout.putConstraint(SpringLayout.WEST, modifierField, 0, SpringLayout.WEST, evolvableBox);
descriptionArea = new JTextArea(5, 10);
appLayout.putConstraint(SpringLayout.EAST, descriptionArea, 0, SpringLayout.EAST, nameField);
typeArea = new JTextArea(4, 15);
appLayout.putConstraint(SpringLayout.NORTH, descriptionArea, 0, SpringLayout.NORTH, typeArea);
appLayout.putConstraint(SpringLayout.WEST, descriptionArea, 13, SpringLayout.EAST, typeArea);
appLayout.putConstraint(SpringLayout.NORTH, typeArea, 129, SpringLayout.SOUTH, iconLabel);
appLayout.putConstraint(SpringLayout.SOUTH, typeArea, -48, SpringLayout.SOUTH, this);
appLayout.putConstraint(SpringLayout.WEST, typeArea, 10, SpringLayout.WEST, this);
appLayout.putConstraint(SpringLayout.EAST, typeArea, -130, SpringLayout.WEST, healthLabel);
saveButton = new JButton("save");
appLayout.putConstraint(SpringLayout.SOUTH, descriptionArea, 0, SpringLayout.SOUTH, saveButton);
appLayout.putConstraint(SpringLayout.NORTH, saveButton, 6, SpringLayout.SOUTH, typeArea);
appLayout.putConstraint(SpringLayout.WEST, saveButton, 10, SpringLayout.WEST, this);
saveButton.setFont(new Font("OCR A Std", Font.PLAIN, 13));
clearButton = new JButton("clear");
appLayout.putConstraint(SpringLayout.NORTH, clearButton, 0, SpringLayout.NORTH, saveButton);
appLayout.putConstraint(SpringLayout.EAST, clearButton, 0, SpringLayout.EAST, typeArea);
clearButton.setFont(new Font("OCR A Std", Font.PLAIN, 13));
pokedexDropdown = new JComboBox();
appLayout.putConstraint(SpringLayout.NORTH, pokedexDropdown, 10, SpringLayout.NORTH, this);
appLayout.putConstraint(SpringLayout.WEST, pokedexDropdown, 32, SpringLayout.EAST, iconLabel);
appLayout.putConstraint(SpringLayout.EAST, pokedexDropdown, -31, SpringLayout.WEST, numberLabel);
firstType = new JPanel();
appLayout.putConstraint(SpringLayout.NORTH, firstType, 0, SpringLayout.NORTH, nameLabel);
appLayout.putConstraint(SpringLayout.WEST, firstType, 0, SpringLayout.WEST, pokedexDropdown);
appLayout.putConstraint(SpringLayout.SOUTH, firstType, 0, SpringLayout.SOUTH, nameLabel);
appLayout.putConstraint(SpringLayout.EAST, firstType, 17, SpringLayout.WEST, pokedexDropdown);
secondType = new JPanel();
appLayout.putConstraint(SpringLayout.NORTH, secondType, 0, SpringLayout.NORTH, nameLabel);
appLayout.putConstraint(SpringLayout.WEST, secondType, 20, SpringLayout.EAST, firstType);
appLayout.putConstraint(SpringLayout.SOUTH, secondType, 0, SpringLayout.SOUTH, nameLabel);
thirdType = new JPanel();
appLayout.putConstraint(SpringLayout.EAST, secondType, -19, SpringLayout.WEST, thirdType);
appLayout.putConstraint(SpringLayout.NORTH, thirdType, 0, SpringLayout.NORTH, nameLabel);
appLayout.putConstraint(SpringLayout.WEST, thirdType, -17, SpringLayout.EAST, pokedexDropdown);
appLayout.putConstraint(SpringLayout.SOUTH, thirdType, 0, SpringLayout.SOUTH, nameLabel);
appLayout.putConstraint(SpringLayout.EAST, thirdType, 0, SpringLayout.EAST, pokedexDropdown);
setupPanel();
setupLayout();
setupListeners();
setupComboBox();
// setupBackgroundColor();
}
private void setupPanel()
{
this.setLayout(appLayout);
this.setBackground(Color.LIGHT_GRAY);
this.add(iconLabel);
this.add(healthLabel);
this.add(nameLabel);
this.add(numberLabel);
this.add(evolvableLabel);
this.add(modifierLabel);
this.add(attackLabel);
this.add(evolvableBox);
this.add(nameField);
this.add(numberField);
this.add(attackField);
this.add(healthField);
this.add(modifierField);
this.add(descriptionArea);
this.add(typeArea);
this.add(saveButton);
this.add(clearButton);
this.add(pokedexDropdown);
this.add(firstType);
this.add(secondType);
this.add(thirdType);
}
private void setupComboBox()
{
DefaultComboBoxModel pokemonModel = new DefaultComboBoxModel(appController.convertPokedex());
pokedexDropdown.setModel(pokemonModel);
}
private void updateTypePanel()
{
String [] types = appController.getPokedex().get(pokedexDropdown.getSelectedIndex()).getPokemonTypes();
if (types[0].equals("Fire"))
{
firstType.setBackground(Color.RED);
}
else if (types[0].equals("Electric"))
{
firstType.setBackground(Color.YELLOW);
}
else if (types[0].equals("Grass"))
{
firstType.setBackground(Color.GREEN);
}
else
{
firstType.setBackground(Color.WHITE);
}
if (types.length > 1)
{
if (types[1].contentEquals("Fire"))
{
secondType.setBackground(Color.RED);
}
else if (types[1].contentEquals("Electric"))
{
secondType.setBackground(Color.YELLOW);
}
else if (types[1].contentEquals("Grass"))
{
secondType.setBackground(Color.GREEN);
}
else
{
secondType.setBackground(Color.WHITE);
}
}
}
private void updateImage()
{
String path = "/pokemon/view/images/";
String defaultName = "pokeball";
String name = pokedexDropdown.getSelectedItem().toString();
String extension = ".png";
ImageIcon pokemonIcon;
try
{
pokemonIcon = new ImageIcon(getClass().getResource(path + name + extension));
}
catch (NullPointerException missingImageFile)
{
pokemonIcon = new ImageIcon(getClass().getResource(path + defaultName + extension));
}
iconLabel.setIcon(pokemonIcon);
}
private void updateTypePanels()
{
}
private void setupLayout()
{
}
private void setupListeners()
{
pokedexDropdown.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent selection)
{
int selectedPokemonIndex = pokedexDropdown.getSelectedIndex();
updatePokedexInfo(selectedPokemonIndex);
updateImage();
updateTypePanels();
repaint();
}
});
}
// private void setupBackgroundColor()
// {
// int blue = (int) (Math.random() * 256);
// int red = (int) (Math.random() * 256);
// int green = (int) (Math.random() * 256);
//
// this.setBackground(new Color(red, green, blue));
// }
}
| [
"[email protected]"
]
| |
3c2fd8ade40d18dfa4b4b47ab6d15b449465c938 | 31365b420bf0ed6dc7a5a9cbd1859350853b2f51 | /src/src/Mancala.java | ac5173ce9019c93408bc1339857353e2168fe81a | []
| no_license | kguo20/Mancala | e180f3184c5f25701e24c94d2e5ce09ca37d2ef1 | 86d605bacb8d419739d6db2d59f56d09b3382557 | refs/heads/master | 2020-05-26T03:02:47.481032 | 2019-06-03T17:34:45 | 2019-06-03T17:34:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,540 | java | import java.awt.CardLayout;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
public class Mancala extends JFrame{
private int numTurns;
private int redPoints;
private int bluePoints;
public Mancala() {
setTitle("Mancala");
numTurns = 0;
setBounds(300, 300, 300, 200);
setLayout(new GridBagLayout());
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
GridBagConstraints gbc = new GridBagConstraints();
CardLayout cL = new CardLayout();
JPanel overall = new JPanel();
overall.setLayout(cL);
JPanel homePanel = new JPanel();
JLabel mancalaLabel = new JLabel("Mancala");
mancalaLabel.setFont(new Font("TimesRoman", Font.BOLD | Font.ITALIC, 40));
JButton start = new JButton("Start");
homePanel.add(mancalaLabel);
homePanel.add(start);
start.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
cL.show(overall, "panel 2");
}
});
JPanel instrPanel = new JPanel();
JButton play = new JButton("Play");
instrPanel.add(play);
play.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
cL.show(overall, "panel 3");
}
});
JPanel boardPanel = new JPanel();
JButton home = new JButton("Home");
boardPanel.add(home);
home.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
cL.show(overall, "panel 1");
}
});
ImageIcon image = new ImageIcon(getClass().getResource("Mancala board.jfif"));
JButton button = new JButton(image);
button.setBorder(BorderFactory.createEmptyBorder());
button.setContentAreaFilled(false);
button.setPreferredSize(new Dimension(100, 100));
boardPanel.add(button);
JPanel langPanel = new JPanel();
JLabel langLabel = new JLabel("Choose your language:");
JComboBox<String> languages = new JComboBox<String>();
langPanel.add(langLabel);
languages.addItem("Select your language");
languages.addItem("English");
languages.addItem("German");
languages.addItem("Spanish");
languages.addItem("Chinese");
languages.addItem("Japanese");
languages.addItem("Korean");
languages.addItem("Latin");
languages.addItem("French");
langPanel.add(languages);
JButton ok = new JButton("Ok");
ok.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
if (languages.getSelectedItem().equals("")) {
} else {
JOptionPane.showMessageDialog(langPanel, "Please select a language.");
}
cL.show(overall, "panel 3");
}
});
overall.add(homePanel, "panel 1");
overall.add(instrPanel, "panel 2");
overall.add(boardPanel, "panel 3");
cL.show(overall, "panel1");
add(overall);
}
public void resetBoard() {
}
public void moveGem() {
}
public void getNumGems() {
}
public static void main (String[] args) {
new Mancala();
}
}
| [
"[email protected]"
]
| |
24c362424ff93d6fa43fba12b905cb94e7de49c5 | 3f0003a5625994f0f86224ef911eaa58c402c5ca | /app/src/main/java/com/example/shantanu/opus/sysAdminLoginActivity.java | 406aa4bf7563ce483f57c9a70c03e9408b7afd35 | []
| no_license | TheTipsyTurtle/OPUS-1 | d8bff60d3a22996e27dbd2c81d5e5296534a63c3 | ee4d84b65bf22832e3619c2fd7457cd85e184f12 | refs/heads/master | 2020-03-17T23:56:09.072673 | 2018-05-19T15:23:04 | 2018-05-19T15:23:04 | 134,068,885 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 358 | java | package com.example.shantanu.opus;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class sysAdminLoginActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sys_admin_login);
}
}
| [
"[email protected]"
]
| |
044b268abeeea8bf6efbfa8d942322ea486f3c81 | 566b9772ee8f5cccb43308cc371aa56b6891b670 | /src/com/logbook/view/ManageLifeActivity.java | 94b767a9572d6f3712680494544e615c3a39a33c | []
| no_license | longwind09/Logbook | e8e94e0ddfa36de2d1eab9a8c73aa49fbd2c4ead | 3b6df62f447609db79d62eb8f5d817d94689991a | refs/heads/master | 2021-06-02T18:27:52.774694 | 2017-10-25T12:18:27 | 2017-10-25T12:18:27 | 39,249,977 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,425 | java | package com.logbook.view;
import android.os.Bundle;
import android.app.ActionBar;
import android.app.Activity;
import android.content.ContentValues;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
public class ManageLifeActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_manage_life);
ActionBar actionbar = getActionBar();
actionbar.setDisplayHomeAsUpEnabled(true);
intent = getIntent();
bundle = intent.getExtras();
}
private void feedBack()
{
ContentValues values = new ContentValues();
//boolean updateResult = designController.updateById(values, id);
bundle.putInt("result", R.id.tv_life);
intent.putExtras(bundle);
ManageLifeActivity.this.setResult(RESULT_OK, intent);
ManageLifeActivity.this.finish();
}
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.manage_life, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
{
case android.R.id.home:
this.finish();
break;
case R.id.action_ok:
feedBack();
break;
}
return super.onOptionsItemSelected(item);
}
private Intent intent;
private Bundle bundle;
}
| [
"[email protected]"
]
| |
45e722746639f0ab04239dbb8ebd2b19016a47d4 | 2befcb05cde499c8a6f4fa73235f71ee7d1ffce6 | /jmsfundamentals/src/main/java/com/bharath/jms/messagestructure/MessageExpirationDemo.java | 311811c16a5941d8d4998601977a58fed4a39c78 | []
| no_license | rbhavsar/JMS-ActiveMQ-Java | 5ea661fdd8be36dd90704ddf568694ba34f98e68 | e8619da28baf98050c537c2a9870f049d65f76ed | refs/heads/master | 2022-11-24T01:10:47.158893 | 2020-08-03T05:59:04 | 2020-08-03T05:59:04 | 284,609,892 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,393 | java | package com.bharath.jms.messagestructure;
import javax.jms.JMSContext;
import javax.jms.JMSException;
import javax.jms.JMSProducer;
import javax.jms.Message;
import javax.jms.Queue;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
public class MessageExpirationDemo {
public static void main(String[] args) throws NamingException, InterruptedException, JMSException {
InitialContext context = new InitialContext();
Queue queue = (Queue) context.lookup("queue/myQueue");
Queue expiryQueue = (Queue) context.lookup("queue/expiryQueue");
try (ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory();
JMSContext jmsContext = cf.createContext()) {
JMSProducer producer = jmsContext.createProducer();
producer.setTimeToLive(2000);
producer.send(queue, "Arise Awake and stop not till the goal is reached"); //message send to queue and will expire after 2 secs
Thread.sleep(1000);// if we wait here more than 2 seconds then consumer won't receive any message
Message messageReceived = jmsContext.createConsumer(queue).receive(5000); // consumer will wait for 5 sec , if it does not receive message then stop there..
System.out.println(messageReceived);
System.out.println(jmsContext.createConsumer(expiryQueue).receiveBody(String.class));
}
}
}
| [
"[email protected]"
]
| |
95556ff976dca0d7e2af043233be0ea94f27d296 | dfc3f79bbb8db53a3b12a6be47d2f5bb5230c43d | /src/main/java/Dao/DBUtil.java | a016252796a5d2784be7ea75edfcffc899876780 | []
| no_license | iwscream/pushservices | a7e2faea46f37258bd0b4e9e2b1736fb781c2b2b | dd22c47437dbd737e7de3b5a91aa3ce98287fe7a | refs/heads/master | 2020-04-12T23:32:33.073028 | 2018-12-22T15:42:39 | 2018-12-22T15:42:39 | 162,822,988 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,501 | java | package Dao;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import push.PushContent;
import java.io.PrintWriter;
import java.sql.*;
import java.util.AbstractList;
import java.util.ArrayList;
public class DBUtil {
public static Connection getConnection(){
Connection connection = null;
String driver = "com.mysql.jdbc.Driver";
String url = "jdbc:mysql://localhost:3306/master";
String user = "root";
String password = "123456";
try {
Class.forName(driver);
connection = DriverManager.getConnection(url,user,password);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
return connection;
}
public static AbstractList<ArrayList<String>> select(String sql) throws Exception{
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
AbstractList<ArrayList<String>> list = new ArrayList<ArrayList<String>>();
try {
connection = getConnection();
statement = connection.createStatement();
rs = statement.executeQuery(sql);
ResultSetMetaData resultSetMetaData = rs.getMetaData();
int columns = resultSetMetaData.getColumnCount();
int i;
while (rs.next()){
ArrayList<String> row = new ArrayList<String>();
for (i = 1; i <= columns; ++i){
if (rs.getString(i) == null){
row.add("");
}else {
row.add(rs.getString(i));
}
}
list.add(row);
}
}catch (SQLException e){
throw new Exception(e.getMessage());
}catch (Exception e){
throw new Exception(e.getMessage());
}finally {
try {
if (rs != null){
rs.close();
}
}catch (Exception e){
throw new Exception(e.getMessage());
}
try {
if (statement != null){
statement.close();
}
}catch (Exception e){
throw new Exception(e.getMessage());
}
try {
if (connection != null){
connection.close();
}
}catch (Exception e){
throw new Exception(e.getMessage());
}
}
return list;
}
public static void insert(String sql) throws Exception{
Connection connection = null;
PreparedStatement ps = null;
try {
connection = getConnection();
ps = (PreparedStatement) connection.prepareStatement(sql);
ps.executeUpdate();
}catch (SQLException e){
throw new Exception(e.getMessage());
}finally {
try {
if (ps != null){
ps.close();
}
}catch (Exception e){
throw new Exception(e.getMessage());
}
try {
if (connection != null){
connection.close();
}
}catch (Exception e){
throw new Exception(e.getMessage());
}
}
}
public static void Update(String sql)throws Exception{
Connection connection = null;
PreparedStatement ps = null;
try {
connection = getConnection();
ps = (PreparedStatement) connection.prepareStatement(sql);
ps.executeUpdate();
}catch (SQLException e){
throw new Exception(e.getMessage());
}finally {
try {
if (ps != null) {
ps.close();
}
} catch (Exception e) {
throw new Exception(e.getMessage());
}
try {
if (connection != null) {
connection.close();
}
} catch (Exception e) {
throw new Exception(e.getMessage());
}
}
}
public static void delete(String sql)throws Exception{
Connection connection = null;
PreparedStatement ps = null;
try {
connection = getConnection();
ps = (PreparedStatement) connection.prepareStatement(sql);
ps.executeUpdate();
}catch (SQLException e){
throw new Exception(e.getMessage());
}finally {
try {
if (ps != null) {
ps.close();
}
} catch (Exception e) {
throw new Exception(e.getMessage());
}
try {
if (connection != null) {
connection.close();
}
} catch (Exception e) {
throw new Exception(e.getMessage());
}
}
}
public static void getJSONObject(PrintWriter out, int code, boolean status, Object obj){
JSONObject jsonObject = new JSONObject();
jsonObject.put("code",code);
if (status) jsonObject.put("status","success");
else jsonObject.put("status","fail");
jsonObject.put("obj",obj);
out.println(jsonObject);
}
public static JSONObject getJSONObject(int id) throws Exception {
JSONObject jsonObject = new JSONObject();
PushServicesDao pushServicesDao = new PushServicesDao();
PushContent pushContent = pushServicesDao.getArticleById(id);
jsonObject.put("id",pushContent.getId());
jsonObject.put("password",pushContent.getPassword());
jsonObject.put("content",pushContent.getContent());
jsonObject.put("img",pushContent.getImgURL());
return jsonObject;
}
public static JSONArray getJSONArray(int id) throws Exception {
JSONArray jsonArray = new JSONArray();
PushServicesDao pushServicesDao = new PushServicesDao();
PushContent pushContent = pushServicesDao.getArticleById(id);
jsonArray.add(0,pushContent.getId());
jsonArray.add(1,pushContent.getPassword());
jsonArray.add(2,pushContent.getContent());
jsonArray.add(3,pushContent.getImgURL());
return jsonArray;
}
}
| [
"[email protected]"
]
| |
f6245ce19c7fdae129d576f0c98fb4b8adaf3748 | 87208554a96b920d0ef401bea4190c25a2374c8d | /src/main/java/service/response/PagedResponse.java | c21f5e4d5ea36593fb8ce0f976e1390e38624492 | []
| no_license | shiozawt/Mock-Twitter-App-Server | 76bd23142f2bdb583cd88ef1da7947eff4727d15 | 31078b158c57e0b939a58fe612f3c9abb11ddcf6 | refs/heads/master | 2023-07-29T08:59:21.148268 | 2021-09-09T22:05:56 | 2021-09-09T22:05:56 | 404,881,796 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 891 | java | package service.response;
/**
* A response that can indicate whether there is more data available from the server.
*/
public class PagedResponse extends Response {
private final boolean hasMorePages;
PagedResponse(boolean success, boolean hasMorePages) {
super(success);
this.hasMorePages = hasMorePages;
}
PagedResponse(boolean success, String message, boolean hasMorePages) {
super(success, message);
this.hasMorePages = hasMorePages;
}
/**
* An indicator of whether more data is available from the server. A value of true indicates
* that the result was limited by a maximum value in the request and an additional request
* would return additional data.
*
* @return true if more data is available; otherwise, false.
*/
public boolean getHasMorePages() {
return hasMorePages;
}
}
| [
"[email protected]"
]
| |
317691523b8205991d0d2ef78fda7ef853c7d917 | 38c3180624ffa0ab5ae90ffb8ccdaea70734295d | /scm-finance/src/main/java/com/winway/scm/model/ScmCwAnnualFee.java | ae70e9727fef35b642e73e3ee3e4e6536cf35817 | []
| no_license | cwy329233832/scm_code | e88fe0296638202443643941fbfca58dc1abf3f0 | fbd3e56af615ce39bca96ce12d71dc5487c51515 | refs/heads/master | 2021-04-17T16:02:51.463958 | 2019-09-05T08:22:39 | 2019-09-05T08:22:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,867 | java | package com.winway.scm.model;
import org.apache.commons.lang.builder.ToStringBuilder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.hotent.base.model.BaseModel;
/**
* 年费信息管理费详情
* <pre>
* 描述:年费信息管理费详情 实体对象
* 构建组:x7
* 作者:原浩
* 邮箱:[email protected]
* 日期:2019-04-28 09:38:33
* 版权:美达开发小组
* </pre>
*/
@ApiModel(value = "ScmCwAnnualFee",description = "年费信息管理费详情")
public class ScmCwAnnualFee extends BaseModel<String>{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value="id")
protected String id;
@ApiModelProperty(value="主表ID")
protected String masterId;
@ApiModelProperty(value="商业名称")
protected String commerceName;
@ApiModelProperty(value="商业ID")
protected String commerceId;
@ApiModelProperty(value="商业编号")
protected String commerceCode;
@ApiModelProperty(value="协议签订类型")
protected String commerceType;
@ApiModelProperty(value="商业类别")
protected String commerceClasses;
@ApiModelProperty(value="信息直连费")
protected Double messagePrice;
@ApiModelProperty(value="流向折扣费")
protected Double flowDirection;
@ApiModelProperty(value="备注")
protected String memo;
public void setId(String id) {
this.id = id;
}
/**
* 返回 id
* @return
*/
public String getId() {
return this.id;
}
public void setMasterId(String masterId) {
this.masterId = masterId;
}
/**
* 返回 主表ID
* @return
*/
public String getMasterId() {
return this.masterId;
}
public void setCommerceName(String commerceName) {
this.commerceName = commerceName;
}
/**
* 返回 商业名称
* @return
*/
public String getCommerceName() {
return this.commerceName;
}
public void setCommerceId(String commerceId) {
this.commerceId = commerceId;
}
/**
* 返回 商业ID
* @return
*/
public String getCommerceId() {
return this.commerceId;
}
public void setCommerceCode(String commerceCode) {
this.commerceCode = commerceCode;
}
/**
* 返回 商业编号
* @return
*/
public String getCommerceCode() {
return this.commerceCode;
}
public void setCommerceType(String commerceType) {
this.commerceType = commerceType;
}
/**
* 返回 协议签订类型
* @return
*/
public String getCommerceType() {
return this.commerceType;
}
public void setCommerceClasses(String commerceClasses) {
this.commerceClasses = commerceClasses;
}
/**
* 返回 商业类别
* @return
*/
public String getCommerceClasses() {
return this.commerceClasses;
}
public void setMessagePrice(Double messagePrice) {
this.messagePrice = messagePrice;
}
/**
* 返回 信息直连费
* @return
*/
public Double getMessagePrice() {
return this.messagePrice;
}
public void setFlowDirection(Double flowDirection) {
this.flowDirection = flowDirection;
}
/**
* 返回 流向折扣费
* @return
*/
public Double getFlowDirection() {
return this.flowDirection;
}
public void setMemo(String memo) {
this.memo = memo;
}
/**
* 返回 备注
* @return
*/
public String getMemo() {
return this.memo;
}
/**
* @see java.lang.Object#toString()
*/
public String toString() {
return new ToStringBuilder(this)
.append("id", this.id)
.append("masterId", this.masterId)
.append("commerceName", this.commerceName)
.append("commerceId", this.commerceId)
.append("commerceCode", this.commerceCode)
.append("commerceType", this.commerceType)
.append("commerceClasses", this.commerceClasses)
.append("messagePrice", this.messagePrice)
.append("flowDirection", this.flowDirection)
.append("memo", this.memo)
.toString();
}
} | [
"[email protected]"
]
| |
20cf4eb8f2b010a3e13df6d97dc29dbda5fef64c | 0ab1a7a81f238b22f52bed1e4ae02acbe1daeda1 | /pay_android/app/src/main/java/com/example/epay/activity/TransferDetailActivity.java | d4e6289fb02dd0f08dfe186a5269f537672de1bf | []
| no_license | 1521zxc/Mke | 844e32319bc73d49d2c17af3a3bee27db8aefea1 | 9aa2ec69b79e3000300d3c6e3617b314a4bd64b3 | refs/heads/master | 2022-12-09T15:08:04.844050 | 2019-09-25T09:54:46 | 2019-09-25T09:54:46 | 194,998,805 | 0 | 0 | null | 2022-12-08T02:06:53 | 2019-07-03T07:07:08 | Java | UTF-8 | Java | false | false | 6,923 | java | package com.example.epay.activity;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import com.example.epay.R;
import com.example.epay.adapter.TransferDetailListAdapter;
import com.example.epay.base.BaseActivity;
import com.example.epay.bean.TransferDetailBean;
import com.example.epay.bean.TransferList;
import com.example.epay.doHttp.CuncResponse;
import com.example.epay.doHttp.HttpCallBack;
import com.example.epay.doHttp.ReturnResquest;
import com.example.epay.doHttp.Server;
import com.alibaba.fastjson.JSONObject;
import com.example.epay.util.DateUtil;
import com.umeng.analytics.MobclickAgent;
import java.util.ArrayList;
import butterknife.ButterKnife;
import butterknife.Bind;
public class TransferDetailActivity extends BaseActivity {
@Bind(R.id.transfer_detail_all)
TextView all;
@Bind(R.id.transfer_detail_money)
TextView money;
@Bind(R.id.transfer_detail_state)
TextView state;
@Bind(R.id.transfer_detail_bank_state)
TextView bankState;
@Bind(R.id.transfer_detail_allmoney)
TextView allMoney;
@Bind(R.id.transfer_detail_fee)
TextView fee;
@Bind(R.id.transfer_detail_rb)
CheckBox checkBox;
@Bind(R.id.transfer_detail_layout)
LinearLayout layout;
@Bind(R.id.transfer_detail_wx)
Button wx;
@Bind(R.id.transfer_detail_zfb)
Button zfb;
@Bind(R.id.transfer_detail_qq)
Button qq;
@Bind(R.id.transfer_detail_all_title)
TextView title;
@Bind(R.id.transfer_detail_list)
ListView listView;
private String datas;
TransferDetailBean detailBean;
ArrayList<TransferList> arrayList;
TransferDetailListAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_transfer_detail);
ButterKnife.bind(this);
initView();
}
@Override
public void initView() {
super.initView();
detailBean=new TransferDetailBean();
arrayList=new ArrayList<TransferList>();
adapter=new TransferDetailListAdapter(this,arrayList);
listView.setAdapter(adapter);
long time= getIntent().getLongExtra("gainedDate",0);
JSONObject data=new JSONObject();
data.put("gainedDate",time);
datas = data.toString();
doDetail(datas);
Drawable drawable=TransferDetailActivity.this.getResources().getDrawable(R.drawable.transfer_detail_btn);
//第一是距左边距离,第二是距上边距离,第三第四分别是长宽
drawable.setBounds(0,0,(int)(0.05*width),(int)(0.035*width));
//drawable 第一个是文字TOP
checkBox.setCompoundDrawables(null,null,drawable,null);
Drawable drawable1=TransferDetailActivity.this.getResources().getDrawable(R.drawable.icon_weixin_pay);
//第一是距左边距离,第二是距上边距离,第三第四分别是长宽
drawable1.setBounds(0,0,(int)(0.08*width),(int)(0.08*width));
//drawable 第一个是文字TOP
wx.setCompoundDrawables(drawable1,null,null,null);
Drawable drawable2=TransferDetailActivity.this.getResources().getDrawable(R.drawable.icon_alipay_pay);
//第一是距左边距离,第二是距上边距离,第三第四分别是长宽
drawable2.setBounds(0,0,(int)(0.08*width),(int)(0.08*width));
//drawable 第一个是文字TOP
zfb.setCompoundDrawables(drawable2,null,null,null);
Drawable drawable3=TransferDetailActivity.this.getResources().getDrawable(R.drawable.qq);
//第一是距左边距离,第二是距上边距离,第三第四分别是长宽
drawable3.setBounds(0,0,(int)(0.08*width),(int)(0.08*width));
//drawable 第一个是文字TOP
qq.setCompoundDrawables(drawable3,null,null,null);
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
if(b)
{
layout.setVisibility(View.VISIBLE);
}else{
layout.setVisibility(View.GONE);
}
}
});
}
//登录
private void doDetail(final String data) {
httpUtil.HttpServer(this, data, 85, true, new HttpCallBack() {
@Override
public void back(String data1) {
detailBean=gson.fromJson(data1, TransferDetailBean.class);
if(detailBean!=null) {
all.setText(DateUtil.format2(detailBean.getGainedDate(), "yyyy-MM-dd") + " 共" + detailBean.getDetails().size() + "笔");
money.setText(detailBean.getTotalSum());
state.setText("(已划款)");
bankState.setText("银行正在处理中。正常18:00之前到帐,如未到账请咨询发卡行");
allMoney.setText("交易总金额:¥" + detailBean.getTotalTransfer());
fee.setText("手续费:¥" + detailBean.getServiceFee());
wx.setText("¥" + detailBean.getWeixinRatio() + "%");
zfb.setText("¥" + detailBean.getAliRatio() + "%");
qq.setText("¥" + detailBean.getQqRatio() + "%");
title.setText(DateUtil.format2(detailBean.getGainedDate(), "yyyy-MM-dd") + " 共" + detailBean.getDetails().size() + "笔");
arrayList = detailBean.getDetails();
adapter.setList(arrayList);
all.setFocusable(true);
all.setFocusableInTouchMode(true);
all.requestFocus();
}else{
showMessage("没有数据");
}
}
@Override
public void fail(String Message, int code,String data) {
showMessage(Message);
}
});
}
public void onResume() {
super.onResume();
MobclickAgent.onPageStart("划款详情"); //统计页面(仅有Activity的应用中SDK自动调用,不需要单独写。"SplashScreen"为页面名称,可自定义)
MobclickAgent.onResume(this); //统计时长
}
public void onPause() {
super.onPause();
MobclickAgent.onPageEnd("划款详情"); // (仅有Activity的应用中SDK自动调用,不需要单独写)保证 onPageEnd 在onPause 之前调用,因为 onPause 中会保存信息。"SplashScreen"为页面名称,可自定义
MobclickAgent.onPause(this);
}
}
| [
"[email protected]"
]
| |
5118ac48142a3b5ccedee0eac588e2b477f3462a | 999a5e33d8f4ac263b796c135e463bfa8c96fda2 | /src/me/kernelfreeze/uhc/listeners/Listeners.java | b513c29aea6ab05229e5c2bd3f3d549b71387bec | []
| no_license | foxkdev/UHC | f29e26ec854b04ac5f703497cc0d3a91aab3db7d | 0c11e2985a48efd0cf2104c2b92b2c2cee55c448 | refs/heads/master | 2021-06-16T03:45:47.464804 | 2017-05-03T01:51:54 | 2017-05-03T01:52:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 28,357 | java | package me.kernelfreeze.uhc.listeners;
import me.kernelfreeze.uhc.UHC;
import me.kernelfreeze.uhc.configs.ConfigBooleans;
import me.kernelfreeze.uhc.game.GameManager;
import me.kernelfreeze.uhc.player.PlayerManager;
import me.kernelfreeze.uhc.player.UHCPlayer;
import me.kernelfreeze.uhc.scenarios.ScenarioManager;
import me.kernelfreeze.uhc.teams.Team;
import me.kernelfreeze.uhc.teams.TeamManager;
import java.text.*;
import org.bukkit.entity.*;
import org.spigotmc.event.entity.*;
import org.bukkit.event.vehicle.*;
import org.bukkit.event.inventory.*;
import org.bukkit.*;
import org.bukkit.inventory.*;
import org.bukkit.event.block.*;
import org.bukkit.potion.*;
import org.bukkit.scheduler.*;
import org.bukkit.plugin.*;
import org.bukkit.event.player.*;
import org.bukkit.event.*;
import java.util.*;
import org.bukkit.event.weather.*;
import org.bukkit.event.world.*;
import org.bukkit.event.entity.*;
public class Listeners implements Listener
{
private final GameManager gameManager;
private final Inventory alive;
public Listeners() {
this.gameManager = GameManager.getGameManager();
this.alive = Bukkit.createInventory((InventoryHolder)null, 54, "§aPlayers Alive:");
}
@EventHandler
public void onPlayerPortalEvent(final PlayerPortalEvent playerPortalEvent) {
if (!ConfigBooleans.NETHER.isEnabled()) {
playerPortalEvent.setCancelled(true);
playerPortalEvent.getPlayer().sendMessage("§cThe nether is currently disabled!");
}
if (this.gameManager.getCurrentBorder() <= 500) {
playerPortalEvent.setCancelled(true);
playerPortalEvent.getPlayer().sendMessage("§cYou can only go to the nether before the 500 border shrink!");
}
final UHCPlayer uhcPlayer = PlayerManager.getPlayerManager().getUHCPlayer(playerPortalEvent.getPlayer().getUniqueId());
if (this.gameManager.isStatsEnabled() && uhcPlayer != null && uhcPlayer.isPlayerAlive()) {
uhcPlayer.addNetherE();
}
if (!playerPortalEvent.isCancelled() && playerPortalEvent.getCause() == PlayerTeleportEvent.TeleportCause.NETHER_PORTAL) {
if (playerPortalEvent.getFrom().getWorld().getName().equalsIgnoreCase(this.gameManager.getUhcWorldName())) {
final Player player = playerPortalEvent.getPlayer();
playerPortalEvent.setTo(playerPortalEvent.getPortalTravelAgent().findOrCreate(new Location(Bukkit.getServer().getWorld(this.gameManager.getUhcWorldName() + "_nether"), player.getLocation().getX() / 8.0, player.getLocation().getY(), player.getLocation().getZ() / 8.0)));
}
else if (playerPortalEvent.getFrom().getWorld().getName().equalsIgnoreCase(this.gameManager.getUhcWorldName() + "_nether")) {
final Player player2 = playerPortalEvent.getPlayer();
playerPortalEvent.setTo(playerPortalEvent.getPortalTravelAgent().findOrCreate(new Location(Bukkit.getServer().getWorld(this.gameManager.getUhcWorldName()), player2.getLocation().getX() * 8.0, player2.getLocation().getY(), player2.getLocation().getZ() * 8.0)));
}
}
}
@EventHandler
public void onEntityDamageEvent(final EntityDamageEvent entityDamageEvent) {
if (entityDamageEvent.getEntity().getWorld().equals(this.gameManager.getSpawnLocation().getWorld()) || this.gameManager.isScattering()) {
entityDamageEvent.setCancelled(true);
}
if (entityDamageEvent.getEntity() instanceof Player) {
if (ScenarioManager.getInstance().getScenarioExact("Fireless").isEnabled() && (entityDamageEvent.getCause().equals((Object)EntityDamageEvent.DamageCause.LAVA) || entityDamageEvent.getCause().equals((Object)EntityDamageEvent.DamageCause.FIRE) || entityDamageEvent.getCause().equals((Object)EntityDamageEvent.DamageCause.FIRE_TICK))) {
entityDamageEvent.setCancelled(true);
}
if (PlayerManager.getPlayerManager().getUHCPlayer(entityDamageEvent.getEntity().getUniqueId()).isSpectating()) {
entityDamageEvent.setCancelled(true);
}
if (entityDamageEvent.getCause().equals((Object)EntityDamageEvent.DamageCause.FALL) && ScenarioManager.getInstance().getScenarioExact("NoFallDamage").isEnabled()) {
entityDamageEvent.setCancelled(true);
}
}
}
@EventHandler
public void onPlayerInteractEntityEvent(final PlayerInteractEntityEvent playerInteractEntityEvent) {
if (PlayerManager.getPlayerManager().getUHCPlayer(playerInteractEntityEvent.getPlayer().getUniqueId()).isSpectating()) {
playerInteractEntityEvent.setCancelled(true);
if (playerInteractEntityEvent.getRightClicked() instanceof Player && this.gameManager.openInvOnRightClick()) {
playerInteractEntityEvent.getPlayer().openInventory((Inventory)((Player)playerInteractEntityEvent.getRightClicked()).getInventory());
}
}
}
@EventHandler
public void onPlayerLevelChangeEvent(final PlayerLevelChangeEvent playerLevelChangeEvent) {
final UHCPlayer uhcPlayer = PlayerManager.getPlayerManager().getUHCPlayer(playerLevelChangeEvent.getPlayer().getUniqueId());
if (playerLevelChangeEvent.getNewLevel() > playerLevelChangeEvent.getOldLevel() && this.gameManager.isStatsEnabled() && uhcPlayer != null && uhcPlayer.isPlayerAlive()) {
uhcPlayer.addXPLevel();
}
}
@EventHandler
public void onPlayerDropItemEvent(final PlayerDropItemEvent playerDropItemEvent) {
final Player player = playerDropItemEvent.getPlayer();
if (player.getWorld().equals(this.gameManager.getSpawnLocation().getWorld()) && !player.hasPermission("uhc.spawnprotection.bypass")) {
playerDropItemEvent.setCancelled(true);
}
if (PlayerManager.getPlayerManager().getUHCPlayer(player.getUniqueId()).isSpectating()) {
playerDropItemEvent.setCancelled(true);
}
}
@EventHandler
public void onEntityShootBowEvent(final EntityShootBowEvent entityShootBowEvent) {
if (entityShootBowEvent.getEntity() instanceof Player) {
final UHCPlayer uhcPlayer = PlayerManager.getPlayerManager().getUHCPlayer(((Player)entityShootBowEvent.getEntity()).getUniqueId());
if (this.gameManager.isStatsEnabled() && uhcPlayer != null && !entityShootBowEvent.isCancelled() && uhcPlayer.isPlayerAlive()) {
uhcPlayer.addArrowShot();
}
}
}
@EventHandler
public void onPlayerPickupItemEvent(final PlayerPickupItemEvent playerPickupItemEvent) {
final Player player = playerPickupItemEvent.getPlayer();
if (player.getWorld().equals(this.gameManager.getSpawnLocation().getWorld()) && !player.hasPermission("uhc.spawnprotection.bypass")) {
playerPickupItemEvent.setCancelled(true);
}
if (PlayerManager.getPlayerManager().getUHCPlayer(player.getUniqueId()).isSpectating()) {
playerPickupItemEvent.setCancelled(true);
}
}
@EventHandler
public void onEntityRegainHealthEvent(final EntityRegainHealthEvent entityRegainHealthEvent) {
if (!ConfigBooleans.NATURALREGENERATION.isEnabled() && entityRegainHealthEvent.getEntity().getType() == EntityType.PLAYER && entityRegainHealthEvent.getRegainReason() == EntityRegainHealthEvent.RegainReason.SATIATED) {
entityRegainHealthEvent.setCancelled(true);
}
if (!ConfigBooleans.HORSEHEALING.isEnabled() && entityRegainHealthEvent.getEntity().getType() == EntityType.HORSE) {
entityRegainHealthEvent.setCancelled(true);
}
}
@EventHandler
public void onEntityDamageByEntityEvent(final EntityDamageByEntityEvent entityDamageByEntityEvent) {
if (!ConfigBooleans.ENDERPEARLDAMAGE.isEnabled() && entityDamageByEntityEvent.getDamager().getType().equals((Object)EntityType.ENDER_PEARL)) {
entityDamageByEntityEvent.setCancelled(true);
}
if (entityDamageByEntityEvent.getDamager() instanceof Player && PlayerManager.getPlayerManager().getUHCPlayer(entityDamageByEntityEvent.getDamager().getUniqueId()).isSpectating()) {
entityDamageByEntityEvent.setCancelled(true);
}
if (!TeamManager.getInstance().canDamageTeamMembers() && entityDamageByEntityEvent.getDamager() instanceof Player && entityDamageByEntityEvent.getEntity() instanceof Player && TeamManager.getInstance().isTeamsEnabled() && TeamManager.getInstance().getTeam((OfflinePlayer)entityDamageByEntityEvent.getDamager()).getPlayers().contains(entityDamageByEntityEvent.getEntity().getUniqueId())) {
entityDamageByEntityEvent.setCancelled(true);
}
if (!entityDamageByEntityEvent.isCancelled() && entityDamageByEntityEvent.getDamager() instanceof Arrow && entityDamageByEntityEvent.getEntity() instanceof Player && ((Arrow)entityDamageByEntityEvent.getDamager()).getShooter() instanceof Player) {
final Player player = (Player)entityDamageByEntityEvent.getEntity();
final Player player2 = (Player)((Arrow)entityDamageByEntityEvent.getDamager()).getShooter();
player2.sendMessage(this.gameManager.getMainColor() + player.getName() + "'s Health: §a" + new DecimalFormat("#.#").format(player.getHealth() / 2.0) + "§4 \u2764");
if (ScenarioManager.getInstance().getScenarioExact("Switcheroo").isEnabled()) {
final Location location = player2.getLocation();
player2.teleport(player.getLocation());
player.teleport(location);
player2.sendMessage("§aSwitched locations!");
player.sendMessage("§aSwitched locations!");
}
final UHCPlayer uhcPlayer = PlayerManager.getPlayerManager().getUHCPlayer(player2.getUniqueId());
if (this.gameManager.isStatsEnabled() && uhcPlayer != null && !entityDamageByEntityEvent.isCancelled() && uhcPlayer.isPlayerAlive()) {
uhcPlayer.addArrowHit();
}
}
}
@EventHandler
public void onEntityTameEvent(final EntityTameEvent entityTameEvent) {
if (entityTameEvent.getEntity() instanceof Horse) {
final UHCPlayer uhcPlayer = PlayerManager.getPlayerManager().getUHCPlayer(((Player)entityTameEvent.getOwner()).getUniqueId());
if (this.gameManager.isStatsEnabled() && uhcPlayer != null && !entityTameEvent.isCancelled() && uhcPlayer.isPlayerAlive()) {
uhcPlayer.addHorsesTamed();
}
}
}
@EventHandler
public void onEntityMountEvent(final EntityMountEvent entityMountEvent) {
if (!ConfigBooleans.HORSES.isEnabled() && entityMountEvent.getMount().getType() == EntityType.HORSE) {
entityMountEvent.setCancelled(true);
}
if (entityMountEvent.getEntity().getPassenger() instanceof Player) {
final UHCPlayer uhcPlayer = PlayerManager.getPlayerManager().getUHCPlayer(entityMountEvent.getEntity().getPassenger().getUniqueId());
if (uhcPlayer.isSpectating() || !uhcPlayer.isPlayerAlive()) {
entityMountEvent.setCancelled(true);
}
}
}
@EventHandler
public void onVehicleEnterEvent(final VehicleEnterEvent vehicleEnterEvent) {
if (vehicleEnterEvent.getEntered() instanceof Player) {
final UHCPlayer uhcPlayer = PlayerManager.getPlayerManager().getUHCPlayer(vehicleEnterEvent.getEntered().getUniqueId());
if (uhcPlayer.isSpectating() || !uhcPlayer.isPlayerAlive()) {
vehicleEnterEvent.setCancelled(true);
}
}
}
@EventHandler
public void onGameStopEvent(final GameStopEvent gameStopEvent) {
this.gameManager.setRestarted(false);
this.gameManager.setWorldWasUsed(true);
}
@EventHandler
public void onCraftItemEvent(final CraftItemEvent craftItemEvent) {
if (craftItemEvent.getWhoClicked() instanceof Player) {
final Player player = (Player)craftItemEvent.getWhoClicked();
if (!ConfigBooleans.GODAPPLES.isEnabled() && craftItemEvent.getCurrentItem().getType().equals((Object)Material.GOLDEN_APPLE) && craftItemEvent.getCurrentItem().getDurability() == 1) {
craftItemEvent.setCancelled(true);
player.sendMessage("§cGod Apples are currently disabled!");
}
if (!ConfigBooleans.GOLDENHEADS.isEnabled() && craftItemEvent.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6Golden Head")) {
craftItemEvent.setCancelled(true);
player.sendMessage("§cGolden Heads are currently disabled!");
}
if (!ConfigBooleans.STRENGTH1.isEnabled() && craftItemEvent.getCurrentItem().getType().equals((Object)Material.BLAZE_POWDER)) {
craftItemEvent.setCancelled(true);
player.sendMessage("§cStrength 1 potions are currently disabled!");
}
if (ScenarioManager.getInstance().getScenarioExact("Bowless").isEnabled() && craftItemEvent.getCurrentItem().getType().equals((Object)Material.BOW)) {
craftItemEvent.setCancelled(true);
player.sendMessage("§cBows are currently disabled!");
}
if (ScenarioManager.getInstance().getScenarioExact("Rodless").isEnabled() && craftItemEvent.getCurrentItem().getType().equals((Object)Material.FISHING_ROD)) {
craftItemEvent.setCancelled(true);
player.sendMessage("§cFishing rods are currently disabled!");
}
if (ScenarioManager.getInstance().getScenarioExact("GoneFishing").isEnabled() && craftItemEvent.getCurrentItem().getType().equals((Object)Material.ENCHANTMENT_TABLE)) {
craftItemEvent.setCancelled(true);
player.sendMessage("§cEnchantment tables are currently disabled!");
}
if (ScenarioManager.getInstance().getScenarioExact("BareBones").isEnabled()) {
if (craftItemEvent.getCurrentItem().getType().equals((Object)Material.ENCHANTMENT_TABLE)) {
craftItemEvent.setCancelled(true);
player.sendMessage("§cEnchantment tables are currently disabled!");
}
if (craftItemEvent.getCurrentItem().getType().equals((Object)Material.ANVIL)) {
craftItemEvent.setCancelled(true);
player.sendMessage("§cAnvils are currently disabled!");
}
if (craftItemEvent.getCurrentItem().getType().equals((Object)Material.GOLDEN_APPLE)) {
craftItemEvent.setCancelled(true);
player.sendMessage("§cGolden Apples are currently disabled!");
}
}
}
}
@EventHandler
public void onPlayerInteractEvent(final PlayerInteractEvent playerInteractEvent) {
final Player player = playerInteractEvent.getPlayer();
final ItemStack itemInHand = player.getItemInHand();
if (PlayerManager.getPlayerManager().getUHCPlayer(player.getUniqueId()).isSpectating()) {
playerInteractEvent.setCancelled(true);
if (itemInHand != null) {
if (itemInHand.getType().equals((Object)Material.DIAMOND)) {
player.openInventory(this.getAlive());
}
else if (itemInHand.getType().equals((Object)Material.SKULL_ITEM)) {
this.randomPlayer(player);
}
}
}
if (itemInHand != null) {
if (ScenarioManager.getInstance().getScenarioExact("Bowless").isEnabled() && itemInHand.getType() == Material.BOW) {
playerInteractEvent.setCancelled(true);
player.sendMessage("§cBows are currently disabled!");
}
if (ScenarioManager.getInstance().getScenarioExact("Soup").isEnabled() && playerInteractEvent.getItem().getType() == Material.MUSHROOM_SOUP && (playerInteractEvent.getAction() == Action.RIGHT_CLICK_AIR || playerInteractEvent.getAction() == Action.RIGHT_CLICK_BLOCK)) {
playerInteractEvent.setCancelled(true);
player.getItemInHand().setType(Material.BOWL);
if (player.getHealth() > 16.0 && player.getHealth() <= 20.0) {
player.setHealth(20);
}
else {
player.setHealth(player.getHealth() + 4.0);
}
}
if (itemInHand.getType() == Material.POTION) {
if (!ConfigBooleans.INVISIBILITYPOTIONS.isEnabled()) {
switch (itemInHand.getDurability()) {
case 8238:
case 8270:
case 16430:
case 16462: {
playerInteractEvent.setCancelled(true);
player.sendMessage("§cInvisibility potions are currently disabled!");
itemInHand.setDurability((short)0);
break;
}
}
}
if (!ConfigBooleans.STRENGTH2.isEnabled()) {
switch (itemInHand.getDurability()) {
case 8233:
case 16425: {
playerInteractEvent.setCancelled(true);
player.sendMessage("§cStrength 2 potions are currently disabled!");
itemInHand.setDurability((short)0);
break;
}
}
}
}
}
}
@EventHandler
public void onLeavesDecayEvent(final LeavesDecayEvent leavesDecayEvent) {
if (ScenarioManager.getInstance().getScenarioExact("TripleOres").isEnabled() || ((ScenarioManager.getInstance().getScenarioExact("Vanilla+").isEnabled() || ScenarioManager.getInstance().getScenarioExact("CutClean").isEnabled()) && Math.random() * 100.0 <= 1.0)) {
leavesDecayEvent.getBlock().getWorld().dropItemNaturally(leavesDecayEvent.getBlock().getLocation(), new ItemStack(Material.APPLE));
}
if (this.gameManager.getAppleRates() > 1.0 && Math.random() * 100.0 <= this.gameManager.getAppleRates()) {
leavesDecayEvent.getBlock().getWorld().dropItemNaturally(leavesDecayEvent.getBlock().getLocation(), new ItemStack(Material.APPLE));
}
if (ScenarioManager.getInstance().getScenarioExact("LuckyLeaves").isEnabled() && Math.random() * 100.0 <= 0.25) {
leavesDecayEvent.getBlock().getWorld().dropItemNaturally(leavesDecayEvent.getBlock().getLocation(), new ItemStack(Material.GOLDEN_APPLE));
}
}
@EventHandler
public void onPlayerItemConsumeEvent(final PlayerItemConsumeEvent playerItemConsumeEvent) {
if (playerItemConsumeEvent.getItem() != null && playerItemConsumeEvent.getItem().getType().equals((Object)Material.GOLDEN_APPLE)) {
final UHCPlayer uhcPlayer = PlayerManager.getPlayerManager().getUHCPlayer(playerItemConsumeEvent.getPlayer().getUniqueId());
if (!playerItemConsumeEvent.isCancelled() && this.gameManager.isStatsEnabled() && uhcPlayer != null && uhcPlayer.isPlayerAlive()) {
if (playerItemConsumeEvent.getItem().getItemMeta() != null && playerItemConsumeEvent.getItem().getItemMeta().hasDisplayName() && playerItemConsumeEvent.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6Golden Head")) {
uhcPlayer.addGoldenHeadsEaten();
uhcPlayer.addHeartsHealed(4);
}
else {
uhcPlayer.addGoldenApplesEaten();
uhcPlayer.addHeartsHealed(2);
}
}
if (playerItemConsumeEvent.getItem().getItemMeta() != null && playerItemConsumeEvent.getItem().getItemMeta().hasDisplayName() && playerItemConsumeEvent.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6Golden Head")) {
playerItemConsumeEvent.getPlayer().removePotionEffect(PotionEffectType.REGENERATION);
playerItemConsumeEvent.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 200, 1));
}
if (!ConfigBooleans.ABSORPTION.isEnabled()) {
new BukkitRunnable() {
public void run() {
playerItemConsumeEvent.getPlayer().removePotionEffect(PotionEffectType.ABSORPTION);
}
}.runTaskLaterAsynchronously((Plugin) UHC.getInstance(), 3L);
}
}
}
@EventHandler
public void onGameWinEvent(final GameWinListener gameWinListener) {
Bukkit.getServer().broadcastMessage(this.gameManager.getPrefix() + this.gameManager.getMainColor() + "Congratulations to " + gameWinListener.getWinner() + " for winning the UHC!");
if (GameManager.getGameManager().isStatsEnabled()) {
gameWinListener.getUHCPlayer().addWin();
Bukkit.broadcastMessage(this.gameManager.getMainColor() + "Saving stats to database...");
new BukkitRunnable() {
public void run() {
final Iterator<UHCPlayer> iterator = PlayerManager.getPlayerManager().getUHCPlayers().values().iterator();
while (iterator.hasNext()) {
iterator.next().saveData();
}
Bukkit.broadcastMessage("§aSuccessfully saved stats!");
}
}.runTaskAsynchronously((Plugin) UHC.getInstance());
}
}
@EventHandler
public void onGameWinTeamEvent(final GameWinTeamListener gameWinTeamListener) {
String string = "";
final Iterator<UUID> iterator = gameWinTeamListener.getUUIDs().iterator();
while (iterator.hasNext()) {
string = string + Bukkit.getOfflinePlayer((UUID)iterator.next()).getName() + ", ";
}
Bukkit.getServer().broadcastMessage(this.gameManager.getPrefix() + this.gameManager.getMainColor() + "Congratulations to " + string + " for winning the UHC!");
if (this.gameManager.isStatsEnabled()) {
final Iterator<UHCPlayer> iterator2 = PlayerManager.getPlayerManager().uhcPlayersSet(gameWinTeamListener.getUUIDs()).iterator();
while (iterator2.hasNext()) {
iterator2.next().addWin();
}
Bukkit.broadcastMessage(this.gameManager.getMainColor() + "Saving stats to database...");
new BukkitRunnable() {
public void run() {
final Iterator<UHCPlayer> iterator = PlayerManager.getPlayerManager().getUHCPlayers().values().iterator();
while (iterator.hasNext()) {
iterator.next().saveData();
}
Bukkit.broadcastMessage("§aSuccessfully saved stats!");
}
}.runTaskAsynchronously((Plugin) UHC.getInstance());
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onAsyncPlayerChatEventHIGH(final AsyncPlayerChatEvent asyncPlayerChatEvent) {
final UHCPlayer uhcPlayer = PlayerManager.getPlayerManager().getUHCPlayer(asyncPlayerChatEvent.getPlayer().getUniqueId());
if (uhcPlayer.isSpectating() && uhcPlayer.didUseCommand()) {
asyncPlayerChatEvent.setCancelled(true);
this.sendSpecMessage(asyncPlayerChatEvent.getFormat().replace("%1$s", this.gameManager.getSpectatorPrefix() + asyncPlayerChatEvent.getPlayer().getName()).replace("%2$s", asyncPlayerChatEvent.getMessage()));
uhcPlayer.setUsedCommand(false);
}
else if (uhcPlayer.hasTeamChatToggled()) {
final Team team = TeamManager.getInstance().getTeam((OfflinePlayer)asyncPlayerChatEvent.getPlayer());
asyncPlayerChatEvent.setCancelled(true);
team.sendMessage(TeamManager.getInstance().getTeamsPrefix() + GameManager.getGameManager().getSecondaryColor() + uhcPlayer.getName() + ": " + GameManager.getGameManager().getMainColor() + asyncPlayerChatEvent.getMessage());
}
else if (this.gameManager.getHostName().equalsIgnoreCase(asyncPlayerChatEvent.getPlayer().getName())) {
asyncPlayerChatEvent.setFormat(asyncPlayerChatEvent.getFormat().replace("%1$s", this.gameManager.getHostPrefix() + asyncPlayerChatEvent.getPlayer().getName()));
}
else if (this.gameManager.getModerators().contains(asyncPlayerChatEvent.getPlayer())) {
asyncPlayerChatEvent.setFormat(asyncPlayerChatEvent.getFormat().replace("%1$s", this.gameManager.getModeratorPrefix() + asyncPlayerChatEvent.getPlayer().getName()));
}
else if (uhcPlayer.isSpectating()) {
asyncPlayerChatEvent.setCancelled(true);
this.sendSpecMessage(asyncPlayerChatEvent.getFormat().replace("%1$s", this.gameManager.getSpectatorPrefix() + asyncPlayerChatEvent.getPlayer().getName()).replace("%2$s", asyncPlayerChatEvent.getMessage()));
}
}
private void sendSpecMessage(final String s) {
for (final UHCPlayer uhcPlayer : PlayerManager.getPlayerManager().getUHCPlayers().values()) {
if (uhcPlayer.isSpectating()) {
final Player player = Bukkit.getServer().getPlayer(uhcPlayer.getName());
if (player == null) {
continue;
}
player.sendMessage(s);
}
}
}
private Inventory getAlive() {
this.alive.clear();
for (final UHCPlayer uhcPlayer : PlayerManager.getPlayerManager().getUHCPlayers().values()) {
if (uhcPlayer.isPlayerAlive()) {
final Player player = Bukkit.getServer().getPlayer(uhcPlayer.getName());
if (player == null) {
continue;
}
this.alive.addItem(new ItemStack[] { this.gameManager.newItem(Material.SKULL_ITEM, "§a" + player.getName(), 3) });
}
}
return this.alive;
}
private void randomPlayer(final Player player) {
if (this.gameManager.isGameRunning()) {
final ArrayList<Object> list = new ArrayList<Object>();
for (final UHCPlayer uhcPlayer : PlayerManager.getPlayerManager().getUHCPlayers().values()) {
if (uhcPlayer.isPlayerAlive()) {
list.add(uhcPlayer.getName());
}
}
if (list.size() == 0) {
return;
}
final Player player2 = Bukkit.getServer().getPlayer((String)list.get(new Random().nextInt(list.size() - 1)));
if (player2 != null) {
player.teleport(player2.getLocation());
}
else {
player.sendMessage("§cCould not find a random player to teleport to!");
}
}
else {
player.sendMessage("§cThe game hasn't started yet!");
}
}
@EventHandler
public void onWeatherChangeEvent(final WeatherChangeEvent weatherChangeEvent) {
if (weatherChangeEvent.toWeatherState()) {
weatherChangeEvent.setCancelled(true);
}
}
@EventHandler
public void onChunkUnloadEvent(final ChunkUnloadEvent chunkUnloadEvent) {
if (this.gameManager.getChunks().contains(chunkUnloadEvent.getChunk())) {
chunkUnloadEvent.setCancelled(true);
}
}
@EventHandler
public void onFoodLevelChangeEvent(final FoodLevelChangeEvent foodLevelChangeEvent) {
if (foodLevelChangeEvent.getEntity() instanceof Player) {
if (foodLevelChangeEvent.getEntity().getWorld().equals(this.gameManager.getSpawnWorld())) {
foodLevelChangeEvent.setCancelled(true);
}
final Player player = (Player)foodLevelChangeEvent.getEntity();
player.setSaturation(player.getSaturation() * 10.0f);
}
}
}
| [
"[email protected]"
]
| |
4ee1161a6232b41c281fb829d8489bfb144aeb50 | a6b5ad1d3a7f206f97147823f70ee2176cb32be0 | /src/com/ipeer/ytua/engine/Utils.java | bb3a792b07cb4fac66d5ca4f7db4fa7b5f026221 | []
| no_license | iPeer/YTUA | 7a6066f350a29f4a2a01bcd69cf6436bc7c90f06 | 4b984bdd4a57ca032f32768118502d1c8da7946d | refs/heads/master | 2020-05-01T19:28:32.446659 | 2012-04-23T21:04:05 | 2012-04-23T21:04:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 470 | java | package com.ipeer.ytua.engine;
public class Utils {
protected Engine engine;
public Utils(Engine e) {
this.engine = e;
}
public boolean addressesEqual(Channel c, String n) {
String mynick = engine.MY_NICK;
String a1 = c.getUserList().get(n).getAddress();
String a2 = c.getUserList().get(mynick).getAddress();
return a1.equals(a2);
}
public boolean isAdmin(Channel c, String n) {
return c.getUserList().get(n).isOp() && addressesEqual(c, n);
}
}
| [
"[email protected]"
]
| |
94ccf99ab5cc7392424cb5094c79473623bc3610 | 1ae8a90f7fd4f2d1d5b5b80756cb93e06c5e87d9 | /CombinedProject/Prime_FEB/app/build/generated/source/r/debug/android/support/design/R.java | de5f317aa369b795741ff7bf6f1757bf1b833652 | []
| no_license | kevloanda/PPLA07 | 373274038318bdb3858dc8c646a8a6d0845a5577 | 3082fb50b82baa24b813f32c12af6cf843f13591 | refs/heads/master | 2021-01-21T13:52:45.985838 | 2016-05-29T02:19:14 | 2016-05-29T02:19:14 | 51,969,761 | 2 | 1 | null | 2016-05-04T16:37:31 | 2016-02-18T01:44:32 | Java | UTF-8 | Java | false | false | 108,723 | 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 android.support.design;
public final class R {
public static final class anim {
public static final int abc_fade_in = 0x7f050000;
public static final int abc_fade_out = 0x7f050001;
public static final int abc_grow_fade_in_from_bottom = 0x7f050002;
public static final int abc_popup_enter = 0x7f050003;
public static final int abc_popup_exit = 0x7f050004;
public static final int abc_shrink_fade_out_from_bottom = 0x7f050005;
public static final int abc_slide_in_bottom = 0x7f050006;
public static final int abc_slide_in_top = 0x7f050007;
public static final int abc_slide_out_bottom = 0x7f050008;
public static final int abc_slide_out_top = 0x7f050009;
public static final int design_bottom_sheet_slide_in = 0x7f05000a;
public static final int design_bottom_sheet_slide_out = 0x7f05000b;
public static final int design_fab_in = 0x7f05000c;
public static final int design_fab_out = 0x7f05000d;
public static final int design_snackbar_in = 0x7f05000e;
public static final int design_snackbar_out = 0x7f05000f;
}
public static final class attr {
public static final int actionBarDivider = 0x7f01003e;
public static final int actionBarItemBackground = 0x7f01003f;
public static final int actionBarPopupTheme = 0x7f010038;
public static final int actionBarSize = 0x7f01003d;
public static final int actionBarSplitStyle = 0x7f01003a;
public static final int actionBarStyle = 0x7f010039;
public static final int actionBarTabBarStyle = 0x7f010034;
public static final int actionBarTabStyle = 0x7f010033;
public static final int actionBarTabTextStyle = 0x7f010035;
public static final int actionBarTheme = 0x7f01003b;
public static final int actionBarWidgetTheme = 0x7f01003c;
public static final int actionButtonStyle = 0x7f010058;
public static final int actionDropDownStyle = 0x7f010054;
public static final int actionLayout = 0x7f0100c6;
public static final int actionMenuTextAppearance = 0x7f010040;
public static final int actionMenuTextColor = 0x7f010041;
public static final int actionModeBackground = 0x7f010044;
public static final int actionModeCloseButtonStyle = 0x7f010043;
public static final int actionModeCloseDrawable = 0x7f010046;
public static final int actionModeCopyDrawable = 0x7f010048;
public static final int actionModeCutDrawable = 0x7f010047;
public static final int actionModeFindDrawable = 0x7f01004c;
public static final int actionModePasteDrawable = 0x7f010049;
public static final int actionModePopupWindowStyle = 0x7f01004e;
public static final int actionModeSelectAllDrawable = 0x7f01004a;
public static final int actionModeShareDrawable = 0x7f01004b;
public static final int actionModeSplitBackground = 0x7f010045;
public static final int actionModeStyle = 0x7f010042;
public static final int actionModeWebSearchDrawable = 0x7f01004d;
public static final int actionOverflowButtonStyle = 0x7f010036;
public static final int actionOverflowMenuStyle = 0x7f010037;
public static final int actionProviderClass = 0x7f0100c8;
public static final int actionViewClass = 0x7f0100c7;
public static final int activityChooserViewStyle = 0x7f010060;
public static final int alertDialogButtonGroupStyle = 0x7f010083;
public static final int alertDialogCenterButtons = 0x7f010084;
public static final int alertDialogStyle = 0x7f010082;
public static final int alertDialogTheme = 0x7f010085;
public static final int allowStacking = 0x7f010099;
public static final int arrowHeadLength = 0x7f0100b8;
public static final int arrowShaftLength = 0x7f0100b9;
public static final int autoCompleteTextViewStyle = 0x7f01008a;
public static final int background = 0x7f01000c;
public static final int backgroundSplit = 0x7f01000e;
public static final int backgroundStacked = 0x7f01000d;
public static final int backgroundTint = 0x7f010118;
public static final int backgroundTintMode = 0x7f010119;
public static final int barLength = 0x7f0100ba;
public static final int behavior_hideable = 0x7f010098;
public static final int behavior_overlapTop = 0x7f0100d7;
public static final int behavior_peekHeight = 0x7f010097;
public static final int borderWidth = 0x7f0100bf;
public static final int borderlessButtonStyle = 0x7f01005d;
public static final int bottomSheetDialogTheme = 0x7f0100b1;
public static final int bottomSheetStyle = 0x7f0100b2;
public static final int buttonBarButtonStyle = 0x7f01005a;
public static final int buttonBarNegativeButtonStyle = 0x7f010088;
public static final int buttonBarNeutralButtonStyle = 0x7f010089;
public static final int buttonBarPositiveButtonStyle = 0x7f010087;
public static final int buttonBarStyle = 0x7f010059;
public static final int buttonPanelSideLayout = 0x7f01001f;
public static final int buttonStyle = 0x7f01008b;
public static final int buttonStyleSmall = 0x7f01008c;
public static final int buttonTint = 0x7f0100a9;
public static final int buttonTintMode = 0x7f0100aa;
public static final int checkboxStyle = 0x7f01008d;
public static final int checkedTextViewStyle = 0x7f01008e;
public static final int closeIcon = 0x7f0100dc;
public static final int closeItemLayout = 0x7f01001c;
public static final int collapseContentDescription = 0x7f01010f;
public static final int collapseIcon = 0x7f01010e;
public static final int collapsedTitleGravity = 0x7f0100a6;
public static final int collapsedTitleTextAppearance = 0x7f0100a2;
public static final int color = 0x7f0100b4;
public static final int colorAccent = 0x7f01007b;
public static final int colorButtonNormal = 0x7f01007f;
public static final int colorControlActivated = 0x7f01007d;
public static final int colorControlHighlight = 0x7f01007e;
public static final int colorControlNormal = 0x7f01007c;
public static final int colorPrimary = 0x7f010079;
public static final int colorPrimaryDark = 0x7f01007a;
public static final int colorSwitchThumbNormal = 0x7f010080;
public static final int commitIcon = 0x7f0100e1;
public static final int contentInsetEnd = 0x7f010017;
public static final int contentInsetLeft = 0x7f010018;
public static final int contentInsetRight = 0x7f010019;
public static final int contentInsetStart = 0x7f010016;
public static final int contentScrim = 0x7f0100a3;
public static final int controlBackground = 0x7f010081;
public static final int counterEnabled = 0x7f010101;
public static final int counterMaxLength = 0x7f010102;
public static final int counterOverflowTextAppearance = 0x7f010104;
public static final int counterTextAppearance = 0x7f010103;
public static final int customNavigationLayout = 0x7f01000f;
public static final int defaultQueryHint = 0x7f0100db;
public static final int dialogPreferredPadding = 0x7f010052;
public static final int dialogTheme = 0x7f010051;
public static final int displayOptions = 0x7f010005;
public static final int divider = 0x7f01000b;
public static final int dividerHorizontal = 0x7f01005f;
public static final int dividerPadding = 0x7f0100c4;
public static final int dividerVertical = 0x7f01005e;
public static final int drawableSize = 0x7f0100b6;
public static final int drawerArrowStyle = 0x7f010000;
public static final int dropDownListViewStyle = 0x7f010071;
public static final int dropdownListPreferredItemHeight = 0x7f010055;
public static final int editTextBackground = 0x7f010066;
public static final int editTextColor = 0x7f010065;
public static final int editTextStyle = 0x7f01008f;
public static final int elevation = 0x7f01001a;
public static final int errorEnabled = 0x7f0100ff;
public static final int errorTextAppearance = 0x7f010100;
public static final int expandActivityOverflowButtonDrawable = 0x7f01001e;
public static final int expanded = 0x7f010024;
public static final int expandedTitleGravity = 0x7f0100a7;
public static final int expandedTitleMargin = 0x7f01009c;
public static final int expandedTitleMarginBottom = 0x7f0100a0;
public static final int expandedTitleMarginEnd = 0x7f01009f;
public static final int expandedTitleMarginStart = 0x7f01009d;
public static final int expandedTitleMarginTop = 0x7f01009e;
public static final int expandedTitleTextAppearance = 0x7f0100a1;
public static final int fabSize = 0x7f0100bd;
public static final int foregroundInsidePadding = 0x7f0100c1;
public static final int gapBetweenBars = 0x7f0100b7;
public static final int goIcon = 0x7f0100dd;
public static final int headerLayout = 0x7f0100cf;
public static final int height = 0x7f010001;
public static final int hideOnContentScroll = 0x7f010015;
public static final int hintAnimationEnabled = 0x7f010105;
public static final int hintEnabled = 0x7f0100fe;
public static final int hintTextAppearance = 0x7f0100fd;
public static final int homeAsUpIndicator = 0x7f010057;
public static final int homeLayout = 0x7f010010;
public static final int icon = 0x7f010009;
public static final int iconifiedByDefault = 0x7f0100d9;
public static final int imageButtonStyle = 0x7f010067;
public static final int indeterminateProgressStyle = 0x7f010012;
public static final int initialActivityCount = 0x7f01001d;
public static final int insetForeground = 0x7f0100d6;
public static final int isLightTheme = 0x7f010002;
public static final int itemBackground = 0x7f0100cd;
public static final int itemIconTint = 0x7f0100cb;
public static final int itemPadding = 0x7f010014;
public static final int itemTextAppearance = 0x7f0100ce;
public static final int itemTextColor = 0x7f0100cc;
public static final int keylines = 0x7f0100ab;
public static final int layout = 0x7f0100d8;
public static final int layoutManager = 0x7f0100d2;
public static final int layout_anchor = 0x7f0100ae;
public static final int layout_anchorGravity = 0x7f0100b0;
public static final int layout_behavior = 0x7f0100ad;
public static final int layout_collapseMode = 0x7f01009a;
public static final int layout_collapseParallaxMultiplier = 0x7f01009b;
public static final int layout_keyline = 0x7f0100af;
public static final int layout_scrollFlags = 0x7f010025;
public static final int layout_scrollInterpolator = 0x7f010026;
public static final int listChoiceBackgroundIndicator = 0x7f010078;
public static final int listDividerAlertDialog = 0x7f010053;
public static final int listItemLayout = 0x7f010023;
public static final int listLayout = 0x7f010020;
public static final int listPopupWindowStyle = 0x7f010072;
public static final int listPreferredItemHeight = 0x7f01006c;
public static final int listPreferredItemHeightLarge = 0x7f01006e;
public static final int listPreferredItemHeightSmall = 0x7f01006d;
public static final int listPreferredItemPaddingLeft = 0x7f01006f;
public static final int listPreferredItemPaddingRight = 0x7f010070;
public static final int logo = 0x7f01000a;
public static final int logoDescription = 0x7f010112;
public static final int maxActionInlineWidth = 0x7f0100e5;
public static final int maxButtonHeight = 0x7f01010d;
public static final int measureWithLargestChild = 0x7f0100c2;
public static final int menu = 0x7f0100ca;
public static final int multiChoiceItemLayout = 0x7f010021;
public static final int navigationContentDescription = 0x7f010111;
public static final int navigationIcon = 0x7f010110;
public static final int navigationMode = 0x7f010004;
public static final int overlapAnchor = 0x7f0100d0;
public static final int paddingEnd = 0x7f010116;
public static final int paddingStart = 0x7f010115;
public static final int panelBackground = 0x7f010075;
public static final int panelMenuListTheme = 0x7f010077;
public static final int panelMenuListWidth = 0x7f010076;
public static final int popupMenuStyle = 0x7f010063;
public static final int popupTheme = 0x7f01001b;
public static final int popupWindowStyle = 0x7f010064;
public static final int preserveIconSpacing = 0x7f0100c9;
public static final int pressedTranslationZ = 0x7f0100be;
public static final int progressBarPadding = 0x7f010013;
public static final int progressBarStyle = 0x7f010011;
public static final int queryBackground = 0x7f0100e3;
public static final int queryHint = 0x7f0100da;
public static final int radioButtonStyle = 0x7f010090;
public static final int ratingBarStyle = 0x7f010091;
public static final int ratingBarStyleIndicator = 0x7f010092;
public static final int ratingBarStyleSmall = 0x7f010093;
public static final int reverseLayout = 0x7f0100d4;
public static final int rippleColor = 0x7f0100bc;
public static final int searchHintIcon = 0x7f0100df;
public static final int searchIcon = 0x7f0100de;
public static final int searchViewStyle = 0x7f01006b;
public static final int seekBarStyle = 0x7f010094;
public static final int selectableItemBackground = 0x7f01005b;
public static final int selectableItemBackgroundBorderless = 0x7f01005c;
public static final int showAsAction = 0x7f0100c5;
public static final int showDividers = 0x7f0100c3;
public static final int showText = 0x7f0100ec;
public static final int singleChoiceItemLayout = 0x7f010022;
public static final int spanCount = 0x7f0100d3;
public static final int spinBars = 0x7f0100b5;
public static final int spinnerDropDownItemStyle = 0x7f010056;
public static final int spinnerStyle = 0x7f010095;
public static final int splitTrack = 0x7f0100eb;
public static final int srcCompat = 0x7f010027;
public static final int stackFromEnd = 0x7f0100d5;
public static final int state_above_anchor = 0x7f0100d1;
public static final int statusBarBackground = 0x7f0100ac;
public static final int statusBarScrim = 0x7f0100a4;
public static final int submitBackground = 0x7f0100e4;
public static final int subtitle = 0x7f010006;
public static final int subtitleTextAppearance = 0x7f010107;
public static final int subtitleTextColor = 0x7f010114;
public static final int subtitleTextStyle = 0x7f010008;
public static final int suggestionRowLayout = 0x7f0100e2;
public static final int switchMinWidth = 0x7f0100e9;
public static final int switchPadding = 0x7f0100ea;
public static final int switchStyle = 0x7f010096;
public static final int switchTextAppearance = 0x7f0100e8;
public static final int tabBackground = 0x7f0100f0;
public static final int tabContentStart = 0x7f0100ef;
public static final int tabGravity = 0x7f0100f2;
public static final int tabIndicatorColor = 0x7f0100ed;
public static final int tabIndicatorHeight = 0x7f0100ee;
public static final int tabMaxWidth = 0x7f0100f4;
public static final int tabMinWidth = 0x7f0100f3;
public static final int tabMode = 0x7f0100f1;
public static final int tabPadding = 0x7f0100fc;
public static final int tabPaddingBottom = 0x7f0100fb;
public static final int tabPaddingEnd = 0x7f0100fa;
public static final int tabPaddingStart = 0x7f0100f8;
public static final int tabPaddingTop = 0x7f0100f9;
public static final int tabSelectedTextColor = 0x7f0100f7;
public static final int tabTextAppearance = 0x7f0100f5;
public static final int tabTextColor = 0x7f0100f6;
public static final int textAllCaps = 0x7f010028;
public static final int textAppearanceLargePopupMenu = 0x7f01004f;
public static final int textAppearanceListItem = 0x7f010073;
public static final int textAppearanceListItemSmall = 0x7f010074;
public static final int textAppearanceSearchResultSubtitle = 0x7f010069;
public static final int textAppearanceSearchResultTitle = 0x7f010068;
public static final int textAppearanceSmallPopupMenu = 0x7f010050;
public static final int textColorAlertDialogListItem = 0x7f010086;
public static final int textColorError = 0x7f0100b3;
public static final int textColorSearchUrl = 0x7f01006a;
public static final int theme = 0x7f010117;
public static final int thickness = 0x7f0100bb;
public static final int thumbTextPadding = 0x7f0100e7;
public static final int title = 0x7f010003;
public static final int titleEnabled = 0x7f0100a8;
public static final int titleMarginBottom = 0x7f01010c;
public static final int titleMarginEnd = 0x7f01010a;
public static final int titleMarginStart = 0x7f010109;
public static final int titleMarginTop = 0x7f01010b;
public static final int titleMargins = 0x7f010108;
public static final int titleTextAppearance = 0x7f010106;
public static final int titleTextColor = 0x7f010113;
public static final int titleTextStyle = 0x7f010007;
public static final int toolbarId = 0x7f0100a5;
public static final int toolbarNavigationButtonStyle = 0x7f010062;
public static final int toolbarStyle = 0x7f010061;
public static final int track = 0x7f0100e6;
public static final int useCompatPadding = 0x7f0100c0;
public static final int voiceIcon = 0x7f0100e0;
public static final int windowActionBar = 0x7f010029;
public static final int windowActionBarOverlay = 0x7f01002b;
public static final int windowActionModeOverlay = 0x7f01002c;
public static final int windowFixedHeightMajor = 0x7f010030;
public static final int windowFixedHeightMinor = 0x7f01002e;
public static final int windowFixedWidthMajor = 0x7f01002d;
public static final int windowFixedWidthMinor = 0x7f01002f;
public static final int windowMinWidthMajor = 0x7f010031;
public static final int windowMinWidthMinor = 0x7f010032;
public static final int windowNoTitle = 0x7f01002a;
}
public static final class bool {
public static final int abc_action_bar_embed_tabs = 0x7f090003;
public static final int abc_action_bar_embed_tabs_pre_jb = 0x7f090001;
public static final int abc_action_bar_expanded_action_views_exclusive = 0x7f090004;
public static final int abc_allow_stacked_button_bar = 0x7f090000;
public static final int abc_config_actionMenuItemAllCaps = 0x7f090005;
public static final int abc_config_allowActionMenuItemTextWithIcon = 0x7f090002;
public static final int abc_config_closeDialogWhenTouchOutside = 0x7f090006;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f090007;
}
public static final class color {
public static final int abc_background_cache_hint_selector_material_dark = 0x7f0e0052;
public static final int abc_background_cache_hint_selector_material_light = 0x7f0e0053;
public static final int abc_color_highlight_material = 0x7f0e0054;
public static final int abc_input_method_navigation_guard = 0x7f0e0000;
public static final int abc_primary_text_disable_only_material_dark = 0x7f0e0055;
public static final int abc_primary_text_disable_only_material_light = 0x7f0e0056;
public static final int abc_primary_text_material_dark = 0x7f0e0057;
public static final int abc_primary_text_material_light = 0x7f0e0058;
public static final int abc_search_url_text = 0x7f0e0059;
public static final int abc_search_url_text_normal = 0x7f0e0001;
public static final int abc_search_url_text_pressed = 0x7f0e0002;
public static final int abc_search_url_text_selected = 0x7f0e0003;
public static final int abc_secondary_text_material_dark = 0x7f0e005a;
public static final int abc_secondary_text_material_light = 0x7f0e005b;
public static final int accent_material_dark = 0x7f0e0004;
public static final int accent_material_light = 0x7f0e0005;
public static final int background_floating_material_dark = 0x7f0e0006;
public static final int background_floating_material_light = 0x7f0e0007;
public static final int background_material_dark = 0x7f0e0008;
public static final int background_material_light = 0x7f0e0009;
public static final int bright_foreground_disabled_material_dark = 0x7f0e000d;
public static final int bright_foreground_disabled_material_light = 0x7f0e000e;
public static final int bright_foreground_inverse_material_dark = 0x7f0e000f;
public static final int bright_foreground_inverse_material_light = 0x7f0e0010;
public static final int bright_foreground_material_dark = 0x7f0e0011;
public static final int bright_foreground_material_light = 0x7f0e0012;
public static final int button_material_dark = 0x7f0e0017;
public static final int button_material_light = 0x7f0e0018;
public static final int design_fab_shadow_end_color = 0x7f0e0019;
public static final int design_fab_shadow_mid_color = 0x7f0e001a;
public static final int design_fab_shadow_start_color = 0x7f0e001b;
public static final int design_fab_stroke_end_inner_color = 0x7f0e001c;
public static final int design_fab_stroke_end_outer_color = 0x7f0e001d;
public static final int design_fab_stroke_top_inner_color = 0x7f0e001e;
public static final int design_fab_stroke_top_outer_color = 0x7f0e001f;
public static final int design_snackbar_background_color = 0x7f0e0020;
public static final int design_textinput_error_color_dark = 0x7f0e0021;
public static final int design_textinput_error_color_light = 0x7f0e0022;
public static final int dim_foreground_disabled_material_dark = 0x7f0e0023;
public static final int dim_foreground_disabled_material_light = 0x7f0e0024;
public static final int dim_foreground_material_dark = 0x7f0e0025;
public static final int dim_foreground_material_light = 0x7f0e0026;
public static final int foreground_material_dark = 0x7f0e0027;
public static final int foreground_material_light = 0x7f0e0028;
public static final int highlighted_text_material_dark = 0x7f0e0029;
public static final int highlighted_text_material_light = 0x7f0e002a;
public static final int hint_foreground_material_dark = 0x7f0e002b;
public static final int hint_foreground_material_light = 0x7f0e002c;
public static final int material_blue_grey_800 = 0x7f0e0033;
public static final int material_blue_grey_900 = 0x7f0e0034;
public static final int material_blue_grey_950 = 0x7f0e0035;
public static final int material_deep_teal_200 = 0x7f0e0036;
public static final int material_deep_teal_500 = 0x7f0e0037;
public static final int material_grey_100 = 0x7f0e0038;
public static final int material_grey_300 = 0x7f0e0039;
public static final int material_grey_50 = 0x7f0e003a;
public static final int material_grey_600 = 0x7f0e003b;
public static final int material_grey_800 = 0x7f0e003c;
public static final int material_grey_850 = 0x7f0e003d;
public static final int material_grey_900 = 0x7f0e003e;
public static final int primary_dark_material_dark = 0x7f0e003f;
public static final int primary_dark_material_light = 0x7f0e0040;
public static final int primary_material_dark = 0x7f0e0041;
public static final int primary_material_light = 0x7f0e0042;
public static final int primary_text_default_material_dark = 0x7f0e0043;
public static final int primary_text_default_material_light = 0x7f0e0044;
public static final int primary_text_disabled_material_dark = 0x7f0e0045;
public static final int primary_text_disabled_material_light = 0x7f0e0046;
public static final int ripple_material_dark = 0x7f0e0047;
public static final int ripple_material_light = 0x7f0e0048;
public static final int secondary_text_default_material_dark = 0x7f0e0049;
public static final int secondary_text_default_material_light = 0x7f0e004a;
public static final int secondary_text_disabled_material_dark = 0x7f0e004b;
public static final int secondary_text_disabled_material_light = 0x7f0e004c;
public static final int switch_thumb_disabled_material_dark = 0x7f0e004d;
public static final int switch_thumb_disabled_material_light = 0x7f0e004e;
public static final int switch_thumb_material_dark = 0x7f0e005c;
public static final int switch_thumb_material_light = 0x7f0e005d;
public static final int switch_thumb_normal_material_dark = 0x7f0e004f;
public static final int switch_thumb_normal_material_light = 0x7f0e0050;
}
public static final class dimen {
public static final int abc_action_bar_content_inset_material = 0x7f0a000d;
public static final int abc_action_bar_default_height_material = 0x7f0a0001;
public static final int abc_action_bar_default_padding_end_material = 0x7f0a000e;
public static final int abc_action_bar_default_padding_start_material = 0x7f0a000f;
public static final int abc_action_bar_icon_vertical_padding_material = 0x7f0a001a;
public static final int abc_action_bar_overflow_padding_end_material = 0x7f0a001b;
public static final int abc_action_bar_overflow_padding_start_material = 0x7f0a001c;
public static final int abc_action_bar_progress_bar_size = 0x7f0a0002;
public static final int abc_action_bar_stacked_max_height = 0x7f0a001d;
public static final int abc_action_bar_stacked_tab_max_width = 0x7f0a001e;
public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f0a001f;
public static final int abc_action_bar_subtitle_top_margin_material = 0x7f0a0020;
public static final int abc_action_button_min_height_material = 0x7f0a0021;
public static final int abc_action_button_min_width_material = 0x7f0a0022;
public static final int abc_action_button_min_width_overflow_material = 0x7f0a0023;
public static final int abc_alert_dialog_button_bar_height = 0x7f0a0000;
public static final int abc_button_inset_horizontal_material = 0x7f0a0024;
public static final int abc_button_inset_vertical_material = 0x7f0a0025;
public static final int abc_button_padding_horizontal_material = 0x7f0a0026;
public static final int abc_button_padding_vertical_material = 0x7f0a0027;
public static final int abc_config_prefDialogWidth = 0x7f0a0005;
public static final int abc_control_corner_material = 0x7f0a0028;
public static final int abc_control_inset_material = 0x7f0a0029;
public static final int abc_control_padding_material = 0x7f0a002a;
public static final int abc_dialog_fixed_height_major = 0x7f0a0006;
public static final int abc_dialog_fixed_height_minor = 0x7f0a0007;
public static final int abc_dialog_fixed_width_major = 0x7f0a0008;
public static final int abc_dialog_fixed_width_minor = 0x7f0a0009;
public static final int abc_dialog_list_padding_vertical_material = 0x7f0a002b;
public static final int abc_dialog_min_width_major = 0x7f0a000a;
public static final int abc_dialog_min_width_minor = 0x7f0a000b;
public static final int abc_dialog_padding_material = 0x7f0a002c;
public static final int abc_dialog_padding_top_material = 0x7f0a002d;
public static final int abc_disabled_alpha_material_dark = 0x7f0a002e;
public static final int abc_disabled_alpha_material_light = 0x7f0a002f;
public static final int abc_dropdownitem_icon_width = 0x7f0a0030;
public static final int abc_dropdownitem_text_padding_left = 0x7f0a0031;
public static final int abc_dropdownitem_text_padding_right = 0x7f0a0032;
public static final int abc_edit_text_inset_bottom_material = 0x7f0a0033;
public static final int abc_edit_text_inset_horizontal_material = 0x7f0a0034;
public static final int abc_edit_text_inset_top_material = 0x7f0a0035;
public static final int abc_floating_window_z = 0x7f0a0036;
public static final int abc_list_item_padding_horizontal_material = 0x7f0a0037;
public static final int abc_panel_menu_list_width = 0x7f0a0038;
public static final int abc_search_view_preferred_width = 0x7f0a0039;
public static final int abc_search_view_text_min_width = 0x7f0a000c;
public static final int abc_seekbar_track_background_height_material = 0x7f0a003a;
public static final int abc_seekbar_track_progress_height_material = 0x7f0a003b;
public static final int abc_select_dialog_padding_start_material = 0x7f0a003c;
public static final int abc_switch_padding = 0x7f0a0018;
public static final int abc_text_size_body_1_material = 0x7f0a003d;
public static final int abc_text_size_body_2_material = 0x7f0a003e;
public static final int abc_text_size_button_material = 0x7f0a003f;
public static final int abc_text_size_caption_material = 0x7f0a0040;
public static final int abc_text_size_display_1_material = 0x7f0a0041;
public static final int abc_text_size_display_2_material = 0x7f0a0042;
public static final int abc_text_size_display_3_material = 0x7f0a0043;
public static final int abc_text_size_display_4_material = 0x7f0a0044;
public static final int abc_text_size_headline_material = 0x7f0a0045;
public static final int abc_text_size_large_material = 0x7f0a0046;
public static final int abc_text_size_medium_material = 0x7f0a0047;
public static final int abc_text_size_menu_material = 0x7f0a0048;
public static final int abc_text_size_small_material = 0x7f0a0049;
public static final int abc_text_size_subhead_material = 0x7f0a004a;
public static final int abc_text_size_subtitle_material_toolbar = 0x7f0a0003;
public static final int abc_text_size_title_material = 0x7f0a004b;
public static final int abc_text_size_title_material_toolbar = 0x7f0a0004;
public static final int design_appbar_elevation = 0x7f0a004d;
public static final int design_bottom_sheet_modal_elevation = 0x7f0a004e;
public static final int design_bottom_sheet_modal_peek_height = 0x7f0a004f;
public static final int design_fab_border_width = 0x7f0a0050;
public static final int design_fab_elevation = 0x7f0a0051;
public static final int design_fab_image_size = 0x7f0a0052;
public static final int design_fab_size_mini = 0x7f0a0053;
public static final int design_fab_size_normal = 0x7f0a0054;
public static final int design_fab_translation_z_pressed = 0x7f0a0055;
public static final int design_navigation_elevation = 0x7f0a0056;
public static final int design_navigation_icon_padding = 0x7f0a0057;
public static final int design_navigation_icon_size = 0x7f0a0058;
public static final int design_navigation_max_width = 0x7f0a0010;
public static final int design_navigation_padding_bottom = 0x7f0a0059;
public static final int design_navigation_separator_vertical_padding = 0x7f0a005a;
public static final int design_snackbar_action_inline_max_width = 0x7f0a0011;
public static final int design_snackbar_background_corner_radius = 0x7f0a0012;
public static final int design_snackbar_elevation = 0x7f0a005b;
public static final int design_snackbar_extra_spacing_horizontal = 0x7f0a0013;
public static final int design_snackbar_max_width = 0x7f0a0014;
public static final int design_snackbar_min_width = 0x7f0a0015;
public static final int design_snackbar_padding_horizontal = 0x7f0a005c;
public static final int design_snackbar_padding_vertical = 0x7f0a005d;
public static final int design_snackbar_padding_vertical_2lines = 0x7f0a0016;
public static final int design_snackbar_text_size = 0x7f0a005e;
public static final int design_tab_max_width = 0x7f0a005f;
public static final int design_tab_scrollable_min_width = 0x7f0a0017;
public static final int design_tab_text_size = 0x7f0a0060;
public static final int design_tab_text_size_2line = 0x7f0a0061;
public static final int disabled_alpha_material_dark = 0x7f0a0062;
public static final int disabled_alpha_material_light = 0x7f0a0063;
public static final int highlight_alpha_material_colored = 0x7f0a0064;
public static final int highlight_alpha_material_dark = 0x7f0a0065;
public static final int highlight_alpha_material_light = 0x7f0a0066;
public static final int item_touch_helper_max_drag_scroll_per_frame = 0x7f0a0067;
public static final int item_touch_helper_swipe_escape_max_velocity = 0x7f0a0068;
public static final int item_touch_helper_swipe_escape_velocity = 0x7f0a0069;
public static final int notification_large_icon_height = 0x7f0a006b;
public static final int notification_large_icon_width = 0x7f0a006c;
public static final int notification_subtext_size = 0x7f0a006d;
}
public static final class drawable {
public static final int abc_ab_share_pack_mtrl_alpha = 0x7f020000;
public static final int abc_action_bar_item_background_material = 0x7f020001;
public static final int abc_btn_borderless_material = 0x7f020002;
public static final int abc_btn_check_material = 0x7f020003;
public static final int abc_btn_check_to_on_mtrl_000 = 0x7f020004;
public static final int abc_btn_check_to_on_mtrl_015 = 0x7f020005;
public static final int abc_btn_colored_material = 0x7f020006;
public static final int abc_btn_default_mtrl_shape = 0x7f020007;
public static final int abc_btn_radio_material = 0x7f020008;
public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f020009;
public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f02000a;
public static final int abc_btn_rating_star_off_mtrl_alpha = 0x7f02000b;
public static final int abc_btn_rating_star_on_mtrl_alpha = 0x7f02000c;
public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f02000d;
public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f02000e;
public static final int abc_cab_background_internal_bg = 0x7f02000f;
public static final int abc_cab_background_top_material = 0x7f020010;
public static final int abc_cab_background_top_mtrl_alpha = 0x7f020011;
public static final int abc_control_background_material = 0x7f020012;
public static final int abc_dialog_material_background_dark = 0x7f020013;
public static final int abc_dialog_material_background_light = 0x7f020014;
public static final int abc_edit_text_material = 0x7f020015;
public static final int abc_ic_ab_back_mtrl_am_alpha = 0x7f020016;
public static final int abc_ic_clear_mtrl_alpha = 0x7f020017;
public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f020018;
public static final int abc_ic_go_search_api_mtrl_alpha = 0x7f020019;
public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f02001a;
public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f02001b;
public static final int abc_ic_menu_moreoverflow_mtrl_alpha = 0x7f02001c;
public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f02001d;
public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f02001e;
public static final int abc_ic_menu_share_mtrl_alpha = 0x7f02001f;
public static final int abc_ic_search_api_mtrl_alpha = 0x7f020020;
public static final int abc_ic_star_black_16dp = 0x7f020021;
public static final int abc_ic_star_black_36dp = 0x7f020022;
public static final int abc_ic_star_half_black_16dp = 0x7f020023;
public static final int abc_ic_star_half_black_36dp = 0x7f020024;
public static final int abc_ic_voice_search_api_mtrl_alpha = 0x7f020025;
public static final int abc_item_background_holo_dark = 0x7f020026;
public static final int abc_item_background_holo_light = 0x7f020027;
public static final int abc_list_divider_mtrl_alpha = 0x7f020028;
public static final int abc_list_focused_holo = 0x7f020029;
public static final int abc_list_longpressed_holo = 0x7f02002a;
public static final int abc_list_pressed_holo_dark = 0x7f02002b;
public static final int abc_list_pressed_holo_light = 0x7f02002c;
public static final int abc_list_selector_background_transition_holo_dark = 0x7f02002d;
public static final int abc_list_selector_background_transition_holo_light = 0x7f02002e;
public static final int abc_list_selector_disabled_holo_dark = 0x7f02002f;
public static final int abc_list_selector_disabled_holo_light = 0x7f020030;
public static final int abc_list_selector_holo_dark = 0x7f020031;
public static final int abc_list_selector_holo_light = 0x7f020032;
public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f020033;
public static final int abc_popup_background_mtrl_mult = 0x7f020034;
public static final int abc_ratingbar_full_material = 0x7f020035;
public static final int abc_ratingbar_indicator_material = 0x7f020036;
public static final int abc_ratingbar_small_material = 0x7f020037;
public static final int abc_scrubber_control_off_mtrl_alpha = 0x7f020038;
public static final int abc_scrubber_control_to_pressed_mtrl_000 = 0x7f020039;
public static final int abc_scrubber_control_to_pressed_mtrl_005 = 0x7f02003a;
public static final int abc_scrubber_primary_mtrl_alpha = 0x7f02003b;
public static final int abc_scrubber_track_mtrl_alpha = 0x7f02003c;
public static final int abc_seekbar_thumb_material = 0x7f02003d;
public static final int abc_seekbar_track_material = 0x7f02003e;
public static final int abc_spinner_mtrl_am_alpha = 0x7f02003f;
public static final int abc_spinner_textfield_background_material = 0x7f020040;
public static final int abc_switch_thumb_material = 0x7f020041;
public static final int abc_switch_track_mtrl_alpha = 0x7f020042;
public static final int abc_tab_indicator_material = 0x7f020043;
public static final int abc_tab_indicator_mtrl_alpha = 0x7f020044;
public static final int abc_text_cursor_material = 0x7f020045;
public static final int abc_textfield_activated_mtrl_alpha = 0x7f020046;
public static final int abc_textfield_default_mtrl_alpha = 0x7f020047;
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f020048;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f020049;
public static final int abc_textfield_search_material = 0x7f02004a;
public static final int design_fab_background = 0x7f02004d;
public static final int design_snackbar_background = 0x7f02004e;
public static final int notification_template_icon_bg = 0x7f02005b;
}
public static final class id {
public static final int action0 = 0x7f0f009f;
public static final int action_bar = 0x7f0f005a;
public static final int action_bar_activity_content = 0x7f0f0000;
public static final int action_bar_container = 0x7f0f0059;
public static final int action_bar_root = 0x7f0f0055;
public static final int action_bar_spinner = 0x7f0f0001;
public static final int action_bar_subtitle = 0x7f0f003b;
public static final int action_bar_title = 0x7f0f003a;
public static final int action_context_bar = 0x7f0f005b;
public static final int action_divider = 0x7f0f00a3;
public static final int action_menu_divider = 0x7f0f0002;
public static final int action_menu_presenter = 0x7f0f0003;
public static final int action_mode_bar = 0x7f0f0057;
public static final int action_mode_bar_stub = 0x7f0f0056;
public static final int action_mode_close_button = 0x7f0f003c;
public static final int activity_chooser_view_content = 0x7f0f003d;
public static final int alertTitle = 0x7f0f0049;
public static final int always = 0x7f0f0033;
public static final int beginning = 0x7f0f0031;
public static final int bottom = 0x7f0f001d;
public static final int buttonPanel = 0x7f0f0044;
public static final int cancel_action = 0x7f0f00a0;
public static final int center = 0x7f0f001e;
public static final int center_horizontal = 0x7f0f001f;
public static final int center_vertical = 0x7f0f0020;
public static final int checkbox = 0x7f0f0052;
public static final int chronometer = 0x7f0f00a6;
public static final int clip_horizontal = 0x7f0f002c;
public static final int clip_vertical = 0x7f0f002d;
public static final int collapseActionView = 0x7f0f0034;
public static final int contentPanel = 0x7f0f004a;
public static final int custom = 0x7f0f0050;
public static final int customPanel = 0x7f0f004f;
public static final int decor_content_parent = 0x7f0f0058;
public static final int default_activity_button = 0x7f0f0040;
public static final int design_bottom_sheet = 0x7f0f0096;
public static final int design_menu_item_action_area = 0x7f0f009d;
public static final int design_menu_item_action_area_stub = 0x7f0f009c;
public static final int design_menu_item_text = 0x7f0f009b;
public static final int design_navigation_view = 0x7f0f009a;
public static final int disableHome = 0x7f0f000e;
public static final int edit_query = 0x7f0f005c;
public static final int end = 0x7f0f0021;
public static final int end_padder = 0x7f0f00ab;
public static final int enterAlways = 0x7f0f0015;
public static final int enterAlwaysCollapsed = 0x7f0f0016;
public static final int exitUntilCollapsed = 0x7f0f0017;
public static final int expand_activities_button = 0x7f0f003e;
public static final int expanded_menu = 0x7f0f0051;
public static final int fill = 0x7f0f002e;
public static final int fill_horizontal = 0x7f0f002f;
public static final int fill_vertical = 0x7f0f0022;
public static final int fixed = 0x7f0f0038;
public static final int home = 0x7f0f0004;
public static final int homeAsUp = 0x7f0f000f;
public static final int icon = 0x7f0f0042;
public static final int ifRoom = 0x7f0f0035;
public static final int image = 0x7f0f003f;
public static final int info = 0x7f0f00aa;
public static final int item_touch_helper_previous_elevation = 0x7f0f0005;
public static final int left = 0x7f0f0023;
public static final int line1 = 0x7f0f00a4;
public static final int line3 = 0x7f0f00a8;
public static final int listMode = 0x7f0f000b;
public static final int list_item = 0x7f0f0041;
public static final int media_actions = 0x7f0f00a2;
public static final int middle = 0x7f0f0032;
public static final int mini = 0x7f0f0030;
public static final int multiply = 0x7f0f0027;
public static final int navigation_header_container = 0x7f0f0099;
public static final int never = 0x7f0f0036;
public static final int none = 0x7f0f0010;
public static final int normal = 0x7f0f000c;
public static final int parallax = 0x7f0f001b;
public static final int parentPanel = 0x7f0f0046;
public static final int pin = 0x7f0f001c;
public static final int progress_circular = 0x7f0f0006;
public static final int progress_horizontal = 0x7f0f0007;
public static final int radio = 0x7f0f0054;
public static final int right = 0x7f0f0024;
public static final int screen = 0x7f0f0028;
public static final int scroll = 0x7f0f0018;
public static final int scrollIndicatorDown = 0x7f0f004e;
public static final int scrollIndicatorUp = 0x7f0f004b;
public static final int scrollView = 0x7f0f004c;
public static final int scrollable = 0x7f0f0039;
public static final int search_badge = 0x7f0f005e;
public static final int search_bar = 0x7f0f005d;
public static final int search_button = 0x7f0f005f;
public static final int search_close_btn = 0x7f0f0064;
public static final int search_edit_frame = 0x7f0f0060;
public static final int search_go_btn = 0x7f0f0066;
public static final int search_mag_icon = 0x7f0f0061;
public static final int search_plate = 0x7f0f0062;
public static final int search_src_text = 0x7f0f0063;
public static final int search_voice_btn = 0x7f0f0067;
public static final int select_dialog_listview = 0x7f0f0068;
public static final int shortcut = 0x7f0f0053;
public static final int showCustom = 0x7f0f0011;
public static final int showHome = 0x7f0f0012;
public static final int showTitle = 0x7f0f0013;
public static final int snackbar_action = 0x7f0f0098;
public static final int snackbar_text = 0x7f0f0097;
public static final int snap = 0x7f0f0019;
public static final int spacer = 0x7f0f0045;
public static final int split_action_bar = 0x7f0f0008;
public static final int src_atop = 0x7f0f0029;
public static final int src_in = 0x7f0f002a;
public static final int src_over = 0x7f0f002b;
public static final int start = 0x7f0f0025;
public static final int status_bar_latest_event_content = 0x7f0f00a1;
public static final int submit_area = 0x7f0f0065;
public static final int tabMode = 0x7f0f000d;
public static final int text = 0x7f0f00a9;
public static final int text2 = 0x7f0f00a7;
public static final int textSpacerNoButtons = 0x7f0f004d;
public static final int time = 0x7f0f00a5;
public static final int title = 0x7f0f0043;
public static final int title_template = 0x7f0f0048;
public static final int top = 0x7f0f0026;
public static final int topPanel = 0x7f0f0047;
public static final int touch_outside = 0x7f0f0095;
public static final int up = 0x7f0f0009;
public static final int useLogo = 0x7f0f0014;
public static final int view_offset_helper = 0x7f0f000a;
public static final int withText = 0x7f0f0037;
public static final int wrap_content = 0x7f0f001a;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f0c0002;
public static final int abc_config_activityShortDur = 0x7f0c0003;
public static final int abc_max_action_buttons = 0x7f0c0000;
public static final int bottom_sheet_slide_duration = 0x7f0c0004;
public static final int cancel_button_image_alpha = 0x7f0c0005;
public static final int design_snackbar_text_max_lines = 0x7f0c0001;
public static final int status_bar_notification_info_maxnum = 0x7f0c0006;
}
public static final class layout {
public static final int abc_action_bar_title_item = 0x7f040000;
public static final int abc_action_bar_up_container = 0x7f040001;
public static final int abc_action_bar_view_list_nav_layout = 0x7f040002;
public static final int abc_action_menu_item_layout = 0x7f040003;
public static final int abc_action_menu_layout = 0x7f040004;
public static final int abc_action_mode_bar = 0x7f040005;
public static final int abc_action_mode_close_item_material = 0x7f040006;
public static final int abc_activity_chooser_view = 0x7f040007;
public static final int abc_activity_chooser_view_list_item = 0x7f040008;
public static final int abc_alert_dialog_button_bar_material = 0x7f040009;
public static final int abc_alert_dialog_material = 0x7f04000a;
public static final int abc_dialog_title_material = 0x7f04000b;
public static final int abc_expanded_menu_layout = 0x7f04000c;
public static final int abc_list_menu_item_checkbox = 0x7f04000d;
public static final int abc_list_menu_item_icon = 0x7f04000e;
public static final int abc_list_menu_item_layout = 0x7f04000f;
public static final int abc_list_menu_item_radio = 0x7f040010;
public static final int abc_popup_menu_item_layout = 0x7f040011;
public static final int abc_screen_content_include = 0x7f040012;
public static final int abc_screen_simple = 0x7f040013;
public static final int abc_screen_simple_overlay_action_mode = 0x7f040014;
public static final int abc_screen_toolbar = 0x7f040015;
public static final int abc_search_dropdown_item_icons_2line = 0x7f040016;
public static final int abc_search_view = 0x7f040017;
public static final int abc_select_dialog_material = 0x7f040018;
public static final int design_bottom_sheet_dialog = 0x7f040028;
public static final int design_layout_snackbar = 0x7f040029;
public static final int design_layout_snackbar_include = 0x7f04002a;
public static final int design_layout_tab_icon = 0x7f04002b;
public static final int design_layout_tab_text = 0x7f04002c;
public static final int design_menu_item_action_area = 0x7f04002d;
public static final int design_navigation_item = 0x7f04002e;
public static final int design_navigation_item_header = 0x7f04002f;
public static final int design_navigation_item_separator = 0x7f040030;
public static final int design_navigation_item_subheader = 0x7f040031;
public static final int design_navigation_menu = 0x7f040032;
public static final int design_navigation_menu_item = 0x7f040033;
public static final int notification_media_action = 0x7f040036;
public static final int notification_media_cancel_action = 0x7f040037;
public static final int notification_template_big_media = 0x7f040038;
public static final int notification_template_big_media_narrow = 0x7f040039;
public static final int notification_template_lines = 0x7f04003a;
public static final int notification_template_media = 0x7f04003b;
public static final int notification_template_part_chronometer = 0x7f04003c;
public static final int notification_template_part_time = 0x7f04003d;
public static final int select_dialog_item_material = 0x7f04003e;
public static final int select_dialog_multichoice_material = 0x7f04003f;
public static final int select_dialog_singlechoice_material = 0x7f040040;
public static final int support_simple_spinner_dropdown_item = 0x7f040043;
}
public static final class string {
public static final int abc_action_bar_home_description = 0x7f080000;
public static final int abc_action_bar_home_description_format = 0x7f080001;
public static final int abc_action_bar_home_subtitle_description_format = 0x7f080002;
public static final int abc_action_bar_up_description = 0x7f080003;
public static final int abc_action_menu_overflow_description = 0x7f080004;
public static final int abc_action_mode_done = 0x7f080005;
public static final int abc_activity_chooser_view_see_all = 0x7f080006;
public static final int abc_activitychooserview_choose_application = 0x7f080007;
public static final int abc_capital_off = 0x7f080008;
public static final int abc_capital_on = 0x7f080009;
public static final int abc_search_hint = 0x7f08000a;
public static final int abc_searchview_description_clear = 0x7f08000b;
public static final int abc_searchview_description_query = 0x7f08000c;
public static final int abc_searchview_description_search = 0x7f08000d;
public static final int abc_searchview_description_submit = 0x7f08000e;
public static final int abc_searchview_description_voice = 0x7f08000f;
public static final int abc_shareactionprovider_share_with = 0x7f080010;
public static final int abc_shareactionprovider_share_with_application = 0x7f080011;
public static final int abc_toolbar_collapse_description = 0x7f080012;
public static final int appbar_scrolling_view_behavior = 0x7f080018;
public static final int bottom_sheet_behavior = 0x7f080019;
public static final int character_counter_pattern = 0x7f080020;
public static final int status_bar_notification_info_overflow = 0x7f080013;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f0b0088;
public static final int AlertDialog_AppCompat_Light = 0x7f0b0089;
public static final int Animation_AppCompat_Dialog = 0x7f0b008a;
public static final int Animation_AppCompat_DropDownUp = 0x7f0b008b;
public static final int Animation_Design_BottomSheetDialog = 0x7f0b008c;
public static final int Base_AlertDialog_AppCompat = 0x7f0b008e;
public static final int Base_AlertDialog_AppCompat_Light = 0x7f0b008f;
public static final int Base_Animation_AppCompat_Dialog = 0x7f0b0090;
public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0b0091;
public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0b0093;
public static final int Base_DialogWindowTitle_AppCompat = 0x7f0b0092;
public static final int Base_TextAppearance_AppCompat = 0x7f0b0038;
public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0b0039;
public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0b003a;
public static final int Base_TextAppearance_AppCompat_Button = 0x7f0b0022;
public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0b003b;
public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0b003c;
public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0b003d;
public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0b003e;
public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0b003f;
public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0b0040;
public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0b000d;
public static final int Base_TextAppearance_AppCompat_Large = 0x7f0b0041;
public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0b000e;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0b0042;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0b0043;
public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0b0044;
public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0b000f;
public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0b0045;
public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0b0094;
public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0b0046;
public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0b0047;
public static final int Base_TextAppearance_AppCompat_Small = 0x7f0b0048;
public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0b0010;
public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0b0049;
public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0b0011;
public static final int Base_TextAppearance_AppCompat_Title = 0x7f0b004a;
public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0b0012;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0b0081;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0b004b;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0b004c;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0b004d;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0b004e;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0b004f;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0b0050;
public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0b0051;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0b0082;
public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0b0095;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0b0052;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0b0053;
public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0b0054;
public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0b0055;
public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0b0096;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0b0056;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0b0057;
public static final int Base_ThemeOverlay_AppCompat = 0x7f0b009f;
public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0b00a0;
public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0b00a1;
public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0b00a2;
public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0b00a3;
public static final int Base_Theme_AppCompat = 0x7f0b0058;
public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0b0097;
public static final int Base_Theme_AppCompat_Dialog = 0x7f0b0013;
public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0b0002;
public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0b0098;
public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0b0099;
public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0b009a;
public static final int Base_Theme_AppCompat_Light = 0x7f0b0059;
public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0b009b;
public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0b0014;
public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0b0003;
public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0b009c;
public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0b009d;
public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0b009e;
public static final int Base_V11_Theme_AppCompat_Dialog = 0x7f0b0015;
public static final int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f0b0016;
public static final int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f0b001e;
public static final int Base_V12_Widget_AppCompat_EditText = 0x7f0b001f;
public static final int Base_V21_Theme_AppCompat = 0x7f0b005a;
public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0b005b;
public static final int Base_V21_Theme_AppCompat_Light = 0x7f0b005c;
public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0b005d;
public static final int Base_V22_Theme_AppCompat = 0x7f0b007f;
public static final int Base_V22_Theme_AppCompat_Light = 0x7f0b0080;
public static final int Base_V23_Theme_AppCompat = 0x7f0b0083;
public static final int Base_V23_Theme_AppCompat_Light = 0x7f0b0084;
public static final int Base_V7_Theme_AppCompat = 0x7f0b00a4;
public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0b00a5;
public static final int Base_V7_Theme_AppCompat_Light = 0x7f0b00a6;
public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0b00a7;
public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0b00a8;
public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0b00a9;
public static final int Base_Widget_AppCompat_ActionBar = 0x7f0b00aa;
public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0b00ab;
public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0b00ac;
public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0b005e;
public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0b005f;
public static final int Base_Widget_AppCompat_ActionButton = 0x7f0b0060;
public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0b0061;
public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0b0062;
public static final int Base_Widget_AppCompat_ActionMode = 0x7f0b00ad;
public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0b00ae;
public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0b0020;
public static final int Base_Widget_AppCompat_Button = 0x7f0b0063;
public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0b0067;
public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0b00b0;
public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0b0064;
public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0b0065;
public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0b00af;
public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0b0085;
public static final int Base_Widget_AppCompat_Button_Small = 0x7f0b0066;
public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0b0068;
public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0b0069;
public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0b00b1;
public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0b0000;
public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0b00b2;
public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0b006a;
public static final int Base_Widget_AppCompat_EditText = 0x7f0b0021;
public static final int Base_Widget_AppCompat_ImageButton = 0x7f0b006b;
public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0b00b3;
public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0b00b4;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0b00b5;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0b006c;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0b006d;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0b006e;
public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0b006f;
public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0b0070;
public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0b0071;
public static final int Base_Widget_AppCompat_ListView = 0x7f0b0072;
public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0b0073;
public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0b0074;
public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0b0075;
public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0b0076;
public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0b00b6;
public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0b0017;
public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0b0018;
public static final int Base_Widget_AppCompat_RatingBar = 0x7f0b0077;
public static final int Base_Widget_AppCompat_RatingBar_Indicator = 0x7f0b0086;
public static final int Base_Widget_AppCompat_RatingBar_Small = 0x7f0b0087;
public static final int Base_Widget_AppCompat_SearchView = 0x7f0b00b7;
public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0b00b8;
public static final int Base_Widget_AppCompat_SeekBar = 0x7f0b0078;
public static final int Base_Widget_AppCompat_Spinner = 0x7f0b0079;
public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0b0004;
public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0b007a;
public static final int Base_Widget_AppCompat_Toolbar = 0x7f0b00b9;
public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0b007b;
public static final int Base_Widget_Design_TabLayout = 0x7f0b00ba;
public static final int Platform_AppCompat = 0x7f0b0019;
public static final int Platform_AppCompat_Light = 0x7f0b001a;
public static final int Platform_ThemeOverlay_AppCompat = 0x7f0b007c;
public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0b007d;
public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0b007e;
public static final int Platform_V11_AppCompat = 0x7f0b001b;
public static final int Platform_V11_AppCompat_Light = 0x7f0b001c;
public static final int Platform_V14_AppCompat = 0x7f0b0023;
public static final int Platform_V14_AppCompat_Light = 0x7f0b0024;
public static final int Platform_Widget_AppCompat_Spinner = 0x7f0b001d;
public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0b002a;
public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0b002b;
public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0b002c;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0b002d;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0b002e;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0b002f;
public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0b0035;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0b0030;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0b0031;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0b0032;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0b0033;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0b0034;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f0b0036;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f0b0037;
public static final int TextAppearance_AppCompat = 0x7f0b00bb;
public static final int TextAppearance_AppCompat_Body1 = 0x7f0b00bc;
public static final int TextAppearance_AppCompat_Body2 = 0x7f0b00bd;
public static final int TextAppearance_AppCompat_Button = 0x7f0b00be;
public static final int TextAppearance_AppCompat_Caption = 0x7f0b00bf;
public static final int TextAppearance_AppCompat_Display1 = 0x7f0b00c0;
public static final int TextAppearance_AppCompat_Display2 = 0x7f0b00c1;
public static final int TextAppearance_AppCompat_Display3 = 0x7f0b00c2;
public static final int TextAppearance_AppCompat_Display4 = 0x7f0b00c3;
public static final int TextAppearance_AppCompat_Headline = 0x7f0b00c4;
public static final int TextAppearance_AppCompat_Inverse = 0x7f0b00c5;
public static final int TextAppearance_AppCompat_Large = 0x7f0b00c6;
public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0b00c7;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0b00c8;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0b00c9;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0b00ca;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0b00cb;
public static final int TextAppearance_AppCompat_Medium = 0x7f0b00cc;
public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0b00cd;
public static final int TextAppearance_AppCompat_Menu = 0x7f0b00ce;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0b00cf;
public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0b00d0;
public static final int TextAppearance_AppCompat_Small = 0x7f0b00d1;
public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0b00d2;
public static final int TextAppearance_AppCompat_Subhead = 0x7f0b00d3;
public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0b00d4;
public static final int TextAppearance_AppCompat_Title = 0x7f0b00d5;
public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0b00d6;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0b00d7;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0b00d8;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0b00d9;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0b00da;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0b00db;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0b00dc;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0b00dd;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0b00de;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0b00df;
public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0b00e0;
public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0b00e1;
public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0b00e2;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0b00e3;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0b00e4;
public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0b00e5;
public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0b00e6;
public static final int TextAppearance_Design_CollapsingToolbar_Expanded = 0x7f0b00e7;
public static final int TextAppearance_Design_Counter = 0x7f0b00e8;
public static final int TextAppearance_Design_Counter_Overflow = 0x7f0b00e9;
public static final int TextAppearance_Design_Error = 0x7f0b00ea;
public static final int TextAppearance_Design_Hint = 0x7f0b00eb;
public static final int TextAppearance_Design_Snackbar_Message = 0x7f0b00ec;
public static final int TextAppearance_Design_Tab = 0x7f0b00ed;
public static final int TextAppearance_StatusBar_EventContent = 0x7f0b0025;
public static final int TextAppearance_StatusBar_EventContent_Info = 0x7f0b0026;
public static final int TextAppearance_StatusBar_EventContent_Line2 = 0x7f0b0027;
public static final int TextAppearance_StatusBar_EventContent_Time = 0x7f0b0028;
public static final int TextAppearance_StatusBar_EventContent_Title = 0x7f0b0029;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0b00ee;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0b00ef;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0b00f0;
public static final int ThemeOverlay_AppCompat = 0x7f0b0105;
public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0b0106;
public static final int ThemeOverlay_AppCompat_Dark = 0x7f0b0107;
public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0b0108;
public static final int ThemeOverlay_AppCompat_Light = 0x7f0b0109;
public static final int Theme_AppCompat = 0x7f0b00f1;
public static final int Theme_AppCompat_CompactMenu = 0x7f0b00f2;
public static final int Theme_AppCompat_DayNight = 0x7f0b0005;
public static final int Theme_AppCompat_DayNight_DarkActionBar = 0x7f0b0006;
public static final int Theme_AppCompat_DayNight_Dialog = 0x7f0b0007;
public static final int Theme_AppCompat_DayNight_DialogWhenLarge = 0x7f0b000a;
public static final int Theme_AppCompat_DayNight_Dialog_Alert = 0x7f0b0008;
public static final int Theme_AppCompat_DayNight_Dialog_MinWidth = 0x7f0b0009;
public static final int Theme_AppCompat_DayNight_NoActionBar = 0x7f0b000b;
public static final int Theme_AppCompat_Dialog = 0x7f0b00f3;
public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0b00f6;
public static final int Theme_AppCompat_Dialog_Alert = 0x7f0b00f4;
public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0b00f5;
public static final int Theme_AppCompat_Light = 0x7f0b00f7;
public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0b00f8;
public static final int Theme_AppCompat_Light_Dialog = 0x7f0b00f9;
public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0b00fc;
public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0b00fa;
public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0b00fb;
public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0b00fd;
public static final int Theme_AppCompat_NoActionBar = 0x7f0b00fe;
public static final int Theme_Design = 0x7f0b00ff;
public static final int Theme_Design_BottomSheetDialog = 0x7f0b0100;
public static final int Theme_Design_Light = 0x7f0b0101;
public static final int Theme_Design_Light_BottomSheetDialog = 0x7f0b0102;
public static final int Theme_Design_Light_NoActionBar = 0x7f0b0103;
public static final int Theme_Design_NoActionBar = 0x7f0b0104;
public static final int Widget_AppCompat_ActionBar = 0x7f0b010a;
public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0b010b;
public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0b010c;
public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0b010d;
public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0b010e;
public static final int Widget_AppCompat_ActionButton = 0x7f0b010f;
public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0b0110;
public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0b0111;
public static final int Widget_AppCompat_ActionMode = 0x7f0b0112;
public static final int Widget_AppCompat_ActivityChooserView = 0x7f0b0113;
public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0b0114;
public static final int Widget_AppCompat_Button = 0x7f0b0115;
public static final int Widget_AppCompat_ButtonBar = 0x7f0b011b;
public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0b011c;
public static final int Widget_AppCompat_Button_Borderless = 0x7f0b0116;
public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0b0117;
public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0b0118;
public static final int Widget_AppCompat_Button_Colored = 0x7f0b0119;
public static final int Widget_AppCompat_Button_Small = 0x7f0b011a;
public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0b011d;
public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0b011e;
public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0b011f;
public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0b0120;
public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0b0121;
public static final int Widget_AppCompat_EditText = 0x7f0b0122;
public static final int Widget_AppCompat_ImageButton = 0x7f0b0123;
public static final int Widget_AppCompat_Light_ActionBar = 0x7f0b0124;
public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0b0125;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0b0126;
public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0b0127;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0b0128;
public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0b0129;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0b012a;
public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0b012b;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0b012c;
public static final int Widget_AppCompat_Light_ActionButton = 0x7f0b012d;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0b012e;
public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0b012f;
public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0b0130;
public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0b0131;
public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0b0132;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0b0133;
public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0b0134;
public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0b0135;
public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0b0136;
public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0b0137;
public static final int Widget_AppCompat_Light_SearchView = 0x7f0b0138;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0b0139;
public static final int Widget_AppCompat_ListPopupWindow = 0x7f0b013a;
public static final int Widget_AppCompat_ListView = 0x7f0b013b;
public static final int Widget_AppCompat_ListView_DropDown = 0x7f0b013c;
public static final int Widget_AppCompat_ListView_Menu = 0x7f0b013d;
public static final int Widget_AppCompat_PopupMenu = 0x7f0b013e;
public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0b013f;
public static final int Widget_AppCompat_PopupWindow = 0x7f0b0140;
public static final int Widget_AppCompat_ProgressBar = 0x7f0b0141;
public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0b0142;
public static final int Widget_AppCompat_RatingBar = 0x7f0b0143;
public static final int Widget_AppCompat_RatingBar_Indicator = 0x7f0b0144;
public static final int Widget_AppCompat_RatingBar_Small = 0x7f0b0145;
public static final int Widget_AppCompat_SearchView = 0x7f0b0146;
public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0b0147;
public static final int Widget_AppCompat_SeekBar = 0x7f0b0148;
public static final int Widget_AppCompat_Spinner = 0x7f0b0149;
public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0b014a;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0b014b;
public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0b014c;
public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0b014d;
public static final int Widget_AppCompat_Toolbar = 0x7f0b014e;
public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0b014f;
public static final int Widget_Design_AppBarLayout = 0x7f0b0150;
public static final int Widget_Design_BottomSheet_Modal = 0x7f0b0151;
public static final int Widget_Design_CollapsingToolbar = 0x7f0b0152;
public static final int Widget_Design_CoordinatorLayout = 0x7f0b0153;
public static final int Widget_Design_FloatingActionButton = 0x7f0b0154;
public static final int Widget_Design_NavigationView = 0x7f0b0155;
public static final int Widget_Design_ScrimInsetsFrameLayout = 0x7f0b0156;
public static final int Widget_Design_Snackbar = 0x7f0b0157;
public static final int Widget_Design_TabLayout = 0x7f0b0001;
public static final int Widget_Design_TextInputLayout = 0x7f0b0158;
}
public static final class styleable {
public static final int[] ActionBar = { 0x7f010001, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012, 0x7f010013, 0x7f010014, 0x7f010015, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001a, 0x7f01001b, 0x7f010057 };
public static final int[] ActionBarLayout = { 0x010100b3 };
public static final int ActionBarLayout_android_layout_gravity = 0;
public static final int ActionBar_background = 10;
public static final int ActionBar_backgroundSplit = 12;
public static final int ActionBar_backgroundStacked = 11;
public static final int ActionBar_contentInsetEnd = 21;
public static final int ActionBar_contentInsetLeft = 22;
public static final int ActionBar_contentInsetRight = 23;
public static final int ActionBar_contentInsetStart = 20;
public static final int ActionBar_customNavigationLayout = 13;
public static final int ActionBar_displayOptions = 3;
public static final int ActionBar_divider = 9;
public static final int ActionBar_elevation = 24;
public static final int ActionBar_height = 0;
public static final int ActionBar_hideOnContentScroll = 19;
public static final int ActionBar_homeAsUpIndicator = 26;
public static final int ActionBar_homeLayout = 14;
public static final int ActionBar_icon = 7;
public static final int ActionBar_indeterminateProgressStyle = 16;
public static final int ActionBar_itemPadding = 18;
public static final int ActionBar_logo = 8;
public static final int ActionBar_navigationMode = 2;
public static final int ActionBar_popupTheme = 25;
public static final int ActionBar_progressBarPadding = 17;
public static final int ActionBar_progressBarStyle = 15;
public static final int ActionBar_subtitle = 4;
public static final int ActionBar_subtitleTextStyle = 6;
public static final int ActionBar_title = 1;
public static final int ActionBar_titleTextStyle = 5;
public static final int[] ActionMenuItemView = { 0x0101013f };
public static final int ActionMenuItemView_android_minWidth = 0;
public static final int[] ActionMenuView = { };
public static final int[] ActionMode = { 0x7f010001, 0x7f010007, 0x7f010008, 0x7f01000c, 0x7f01000e, 0x7f01001c };
public static final int ActionMode_background = 3;
public static final int ActionMode_backgroundSplit = 4;
public static final int ActionMode_closeItemLayout = 5;
public static final int ActionMode_height = 0;
public static final int ActionMode_subtitleTextStyle = 2;
public static final int ActionMode_titleTextStyle = 1;
public static final int[] ActivityChooserView = { 0x7f01001d, 0x7f01001e };
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
public static final int ActivityChooserView_initialActivityCount = 0;
public static final int[] AlertDialog = { 0x010100f2, 0x7f01001f, 0x7f010020, 0x7f010021, 0x7f010022, 0x7f010023 };
public static final int AlertDialog_android_layout = 0;
public static final int AlertDialog_buttonPanelSideLayout = 1;
public static final int AlertDialog_listItemLayout = 5;
public static final int AlertDialog_listLayout = 2;
public static final int AlertDialog_multiChoiceItemLayout = 3;
public static final int AlertDialog_singleChoiceItemLayout = 4;
public static final int[] AppBarLayout = { 0x010100d4, 0x7f01001a, 0x7f010024 };
public static final int[] AppBarLayout_LayoutParams = { 0x7f010025, 0x7f010026 };
public static final int AppBarLayout_LayoutParams_layout_scrollFlags = 0;
public static final int AppBarLayout_LayoutParams_layout_scrollInterpolator = 1;
public static final int AppBarLayout_android_background = 0;
public static final int AppBarLayout_elevation = 1;
public static final int AppBarLayout_expanded = 2;
public static final int[] AppCompatImageView = { 0x01010119, 0x7f010027 };
public static final int AppCompatImageView_android_src = 0;
public static final int AppCompatImageView_srcCompat = 1;
public static final int[] AppCompatTextView = { 0x01010034, 0x7f010028 };
public static final int AppCompatTextView_android_textAppearance = 0;
public static final int AppCompatTextView_textAllCaps = 1;
public static final int[] AppCompatTheme = { 0x01010057, 0x010100ae, 0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033, 0x7f010034, 0x7f010035, 0x7f010036, 0x7f010037, 0x7f010038, 0x7f010039, 0x7f01003a, 0x7f01003b, 0x7f01003c, 0x7f01003d, 0x7f01003e, 0x7f01003f, 0x7f010040, 0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050, 0x7f010051, 0x7f010052, 0x7f010053, 0x7f010054, 0x7f010055, 0x7f010056, 0x7f010057, 0x7f010058, 0x7f010059, 0x7f01005a, 0x7f01005b, 0x7f01005c, 0x7f01005d, 0x7f01005e, 0x7f01005f, 0x7f010060, 0x7f010061, 0x7f010062, 0x7f010063, 0x7f010064, 0x7f010065, 0x7f010066, 0x7f010067, 0x7f010068, 0x7f010069, 0x7f01006a, 0x7f01006b, 0x7f01006c, 0x7f01006d, 0x7f01006e, 0x7f01006f, 0x7f010070, 0x7f010071, 0x7f010072, 0x7f010073, 0x7f010074, 0x7f010075, 0x7f010076, 0x7f010077, 0x7f010078, 0x7f010079, 0x7f01007a, 0x7f01007b, 0x7f01007c, 0x7f01007d, 0x7f01007e, 0x7f01007f, 0x7f010080, 0x7f010081, 0x7f010082, 0x7f010083, 0x7f010084, 0x7f010085, 0x7f010086, 0x7f010087, 0x7f010088, 0x7f010089, 0x7f01008a, 0x7f01008b, 0x7f01008c, 0x7f01008d, 0x7f01008e, 0x7f01008f, 0x7f010090, 0x7f010091, 0x7f010092, 0x7f010093, 0x7f010094, 0x7f010095, 0x7f010096 };
public static final int AppCompatTheme_actionBarDivider = 23;
public static final int AppCompatTheme_actionBarItemBackground = 24;
public static final int AppCompatTheme_actionBarPopupTheme = 17;
public static final int AppCompatTheme_actionBarSize = 22;
public static final int AppCompatTheme_actionBarSplitStyle = 19;
public static final int AppCompatTheme_actionBarStyle = 18;
public static final int AppCompatTheme_actionBarTabBarStyle = 13;
public static final int AppCompatTheme_actionBarTabStyle = 12;
public static final int AppCompatTheme_actionBarTabTextStyle = 14;
public static final int AppCompatTheme_actionBarTheme = 20;
public static final int AppCompatTheme_actionBarWidgetTheme = 21;
public static final int AppCompatTheme_actionButtonStyle = 49;
public static final int AppCompatTheme_actionDropDownStyle = 45;
public static final int AppCompatTheme_actionMenuTextAppearance = 25;
public static final int AppCompatTheme_actionMenuTextColor = 26;
public static final int AppCompatTheme_actionModeBackground = 29;
public static final int AppCompatTheme_actionModeCloseButtonStyle = 28;
public static final int AppCompatTheme_actionModeCloseDrawable = 31;
public static final int AppCompatTheme_actionModeCopyDrawable = 33;
public static final int AppCompatTheme_actionModeCutDrawable = 32;
public static final int AppCompatTheme_actionModeFindDrawable = 37;
public static final int AppCompatTheme_actionModePasteDrawable = 34;
public static final int AppCompatTheme_actionModePopupWindowStyle = 39;
public static final int AppCompatTheme_actionModeSelectAllDrawable = 35;
public static final int AppCompatTheme_actionModeShareDrawable = 36;
public static final int AppCompatTheme_actionModeSplitBackground = 30;
public static final int AppCompatTheme_actionModeStyle = 27;
public static final int AppCompatTheme_actionModeWebSearchDrawable = 38;
public static final int AppCompatTheme_actionOverflowButtonStyle = 15;
public static final int AppCompatTheme_actionOverflowMenuStyle = 16;
public static final int AppCompatTheme_activityChooserViewStyle = 57;
public static final int AppCompatTheme_alertDialogButtonGroupStyle = 92;
public static final int AppCompatTheme_alertDialogCenterButtons = 93;
public static final int AppCompatTheme_alertDialogStyle = 91;
public static final int AppCompatTheme_alertDialogTheme = 94;
public static final int AppCompatTheme_android_windowAnimationStyle = 1;
public static final int AppCompatTheme_android_windowIsFloating = 0;
public static final int AppCompatTheme_autoCompleteTextViewStyle = 99;
public static final int AppCompatTheme_borderlessButtonStyle = 54;
public static final int AppCompatTheme_buttonBarButtonStyle = 51;
public static final int AppCompatTheme_buttonBarNegativeButtonStyle = 97;
public static final int AppCompatTheme_buttonBarNeutralButtonStyle = 98;
public static final int AppCompatTheme_buttonBarPositiveButtonStyle = 96;
public static final int AppCompatTheme_buttonBarStyle = 50;
public static final int AppCompatTheme_buttonStyle = 100;
public static final int AppCompatTheme_buttonStyleSmall = 101;
public static final int AppCompatTheme_checkboxStyle = 102;
public static final int AppCompatTheme_checkedTextViewStyle = 103;
public static final int AppCompatTheme_colorAccent = 84;
public static final int AppCompatTheme_colorButtonNormal = 88;
public static final int AppCompatTheme_colorControlActivated = 86;
public static final int AppCompatTheme_colorControlHighlight = 87;
public static final int AppCompatTheme_colorControlNormal = 85;
public static final int AppCompatTheme_colorPrimary = 82;
public static final int AppCompatTheme_colorPrimaryDark = 83;
public static final int AppCompatTheme_colorSwitchThumbNormal = 89;
public static final int AppCompatTheme_controlBackground = 90;
public static final int AppCompatTheme_dialogPreferredPadding = 43;
public static final int AppCompatTheme_dialogTheme = 42;
public static final int AppCompatTheme_dividerHorizontal = 56;
public static final int AppCompatTheme_dividerVertical = 55;
public static final int AppCompatTheme_dropDownListViewStyle = 74;
public static final int AppCompatTheme_dropdownListPreferredItemHeight = 46;
public static final int AppCompatTheme_editTextBackground = 63;
public static final int AppCompatTheme_editTextColor = 62;
public static final int AppCompatTheme_editTextStyle = 104;
public static final int AppCompatTheme_homeAsUpIndicator = 48;
public static final int AppCompatTheme_imageButtonStyle = 64;
public static final int AppCompatTheme_listChoiceBackgroundIndicator = 81;
public static final int AppCompatTheme_listDividerAlertDialog = 44;
public static final int AppCompatTheme_listPopupWindowStyle = 75;
public static final int AppCompatTheme_listPreferredItemHeight = 69;
public static final int AppCompatTheme_listPreferredItemHeightLarge = 71;
public static final int AppCompatTheme_listPreferredItemHeightSmall = 70;
public static final int AppCompatTheme_listPreferredItemPaddingLeft = 72;
public static final int AppCompatTheme_listPreferredItemPaddingRight = 73;
public static final int AppCompatTheme_panelBackground = 78;
public static final int AppCompatTheme_panelMenuListTheme = 80;
public static final int AppCompatTheme_panelMenuListWidth = 79;
public static final int AppCompatTheme_popupMenuStyle = 60;
public static final int AppCompatTheme_popupWindowStyle = 61;
public static final int AppCompatTheme_radioButtonStyle = 105;
public static final int AppCompatTheme_ratingBarStyle = 106;
public static final int AppCompatTheme_ratingBarStyleIndicator = 107;
public static final int AppCompatTheme_ratingBarStyleSmall = 108;
public static final int AppCompatTheme_searchViewStyle = 68;
public static final int AppCompatTheme_seekBarStyle = 109;
public static final int AppCompatTheme_selectableItemBackground = 52;
public static final int AppCompatTheme_selectableItemBackgroundBorderless = 53;
public static final int AppCompatTheme_spinnerDropDownItemStyle = 47;
public static final int AppCompatTheme_spinnerStyle = 110;
public static final int AppCompatTheme_switchStyle = 111;
public static final int AppCompatTheme_textAppearanceLargePopupMenu = 40;
public static final int AppCompatTheme_textAppearanceListItem = 76;
public static final int AppCompatTheme_textAppearanceListItemSmall = 77;
public static final int AppCompatTheme_textAppearanceSearchResultSubtitle = 66;
public static final int AppCompatTheme_textAppearanceSearchResultTitle = 65;
public static final int AppCompatTheme_textAppearanceSmallPopupMenu = 41;
public static final int AppCompatTheme_textColorAlertDialogListItem = 95;
public static final int AppCompatTheme_textColorSearchUrl = 67;
public static final int AppCompatTheme_toolbarNavigationButtonStyle = 59;
public static final int AppCompatTheme_toolbarStyle = 58;
public static final int AppCompatTheme_windowActionBar = 2;
public static final int AppCompatTheme_windowActionBarOverlay = 4;
public static final int AppCompatTheme_windowActionModeOverlay = 5;
public static final int AppCompatTheme_windowFixedHeightMajor = 9;
public static final int AppCompatTheme_windowFixedHeightMinor = 7;
public static final int AppCompatTheme_windowFixedWidthMajor = 6;
public static final int AppCompatTheme_windowFixedWidthMinor = 8;
public static final int AppCompatTheme_windowMinWidthMajor = 10;
public static final int AppCompatTheme_windowMinWidthMinor = 11;
public static final int AppCompatTheme_windowNoTitle = 3;
public static final int[] BottomSheetBehavior_Params = { 0x7f010097, 0x7f010098 };
public static final int BottomSheetBehavior_Params_behavior_hideable = 1;
public static final int BottomSheetBehavior_Params_behavior_peekHeight = 0;
public static final int[] ButtonBarLayout = { 0x7f010099 };
public static final int ButtonBarLayout_allowStacking = 0;
public static final int[] CollapsingAppBarLayout_LayoutParams = { 0x7f01009a, 0x7f01009b };
public static final int CollapsingAppBarLayout_LayoutParams_layout_collapseMode = 0;
public static final int CollapsingAppBarLayout_LayoutParams_layout_collapseParallaxMultiplier = 1;
public static final int[] CollapsingToolbarLayout = { 0x7f010003, 0x7f01009c, 0x7f01009d, 0x7f01009e, 0x7f01009f, 0x7f0100a0, 0x7f0100a1, 0x7f0100a2, 0x7f0100a3, 0x7f0100a4, 0x7f0100a5, 0x7f0100a6, 0x7f0100a7, 0x7f0100a8 };
public static final int CollapsingToolbarLayout_collapsedTitleGravity = 11;
public static final int CollapsingToolbarLayout_collapsedTitleTextAppearance = 7;
public static final int CollapsingToolbarLayout_contentScrim = 8;
public static final int CollapsingToolbarLayout_expandedTitleGravity = 12;
public static final int CollapsingToolbarLayout_expandedTitleMargin = 1;
public static final int CollapsingToolbarLayout_expandedTitleMarginBottom = 5;
public static final int CollapsingToolbarLayout_expandedTitleMarginEnd = 4;
public static final int CollapsingToolbarLayout_expandedTitleMarginStart = 2;
public static final int CollapsingToolbarLayout_expandedTitleMarginTop = 3;
public static final int CollapsingToolbarLayout_expandedTitleTextAppearance = 6;
public static final int CollapsingToolbarLayout_statusBarScrim = 9;
public static final int CollapsingToolbarLayout_title = 0;
public static final int CollapsingToolbarLayout_titleEnabled = 13;
public static final int CollapsingToolbarLayout_toolbarId = 10;
public static final int[] CompoundButton = { 0x01010107, 0x7f0100a9, 0x7f0100aa };
public static final int CompoundButton_android_button = 0;
public static final int CompoundButton_buttonTint = 1;
public static final int CompoundButton_buttonTintMode = 2;
public static final int[] CoordinatorLayout = { 0x7f0100ab, 0x7f0100ac };
public static final int[] CoordinatorLayout_LayoutParams = { 0x010100b3, 0x7f0100ad, 0x7f0100ae, 0x7f0100af, 0x7f0100b0 };
public static final int CoordinatorLayout_LayoutParams_android_layout_gravity = 0;
public static final int CoordinatorLayout_LayoutParams_layout_anchor = 2;
public static final int CoordinatorLayout_LayoutParams_layout_anchorGravity = 4;
public static final int CoordinatorLayout_LayoutParams_layout_behavior = 1;
public static final int CoordinatorLayout_LayoutParams_layout_keyline = 3;
public static final int CoordinatorLayout_keylines = 0;
public static final int CoordinatorLayout_statusBarBackground = 1;
public static final int[] DesignTheme = { 0x7f0100b1, 0x7f0100b2, 0x7f0100b3 };
public static final int DesignTheme_bottomSheetDialogTheme = 0;
public static final int DesignTheme_bottomSheetStyle = 1;
public static final int DesignTheme_textColorError = 2;
public static final int[] DrawerArrowToggle = { 0x7f0100b4, 0x7f0100b5, 0x7f0100b6, 0x7f0100b7, 0x7f0100b8, 0x7f0100b9, 0x7f0100ba, 0x7f0100bb };
public static final int DrawerArrowToggle_arrowHeadLength = 4;
public static final int DrawerArrowToggle_arrowShaftLength = 5;
public static final int DrawerArrowToggle_barLength = 6;
public static final int DrawerArrowToggle_color = 0;
public static final int DrawerArrowToggle_drawableSize = 2;
public static final int DrawerArrowToggle_gapBetweenBars = 3;
public static final int DrawerArrowToggle_spinBars = 1;
public static final int DrawerArrowToggle_thickness = 7;
public static final int[] FloatingActionButton = { 0x7f01001a, 0x7f0100bc, 0x7f0100bd, 0x7f0100be, 0x7f0100bf, 0x7f0100c0, 0x7f010118, 0x7f010119 };
public static final int FloatingActionButton_backgroundTint = 6;
public static final int FloatingActionButton_backgroundTintMode = 7;
public static final int FloatingActionButton_borderWidth = 4;
public static final int FloatingActionButton_elevation = 0;
public static final int FloatingActionButton_fabSize = 2;
public static final int FloatingActionButton_pressedTranslationZ = 3;
public static final int FloatingActionButton_rippleColor = 1;
public static final int FloatingActionButton_useCompatPadding = 5;
public static final int[] ForegroundLinearLayout = { 0x01010109, 0x01010200, 0x7f0100c1 };
public static final int ForegroundLinearLayout_android_foreground = 0;
public static final int ForegroundLinearLayout_android_foregroundGravity = 1;
public static final int ForegroundLinearLayout_foregroundInsidePadding = 2;
public static final int[] LinearLayoutCompat = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f01000b, 0x7f0100c2, 0x7f0100c3, 0x7f0100c4 };
public static final int[] LinearLayoutCompat_Layout = { 0x010100b3, 0x010100f4, 0x010100f5, 0x01010181 };
public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static final int LinearLayoutCompat_Layout_android_layout_height = 2;
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
public static final int LinearLayoutCompat_android_baselineAligned = 2;
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static final int LinearLayoutCompat_android_gravity = 0;
public static final int LinearLayoutCompat_android_orientation = 1;
public static final int LinearLayoutCompat_android_weightSum = 4;
public static final int LinearLayoutCompat_divider = 5;
public static final int LinearLayoutCompat_dividerPadding = 8;
public static final int LinearLayoutCompat_measureWithLargestChild = 6;
public static final int LinearLayoutCompat_showDividers = 7;
public static final int[] ListPopupWindow = { 0x010102ac, 0x010102ad };
public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static final int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 };
public static final int MenuGroup_android_checkableBehavior = 5;
public static final int MenuGroup_android_enabled = 0;
public static final int MenuGroup_android_id = 1;
public static final int MenuGroup_android_menuCategory = 3;
public static final int MenuGroup_android_orderInCategory = 4;
public static final int MenuGroup_android_visible = 2;
public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f0100c5, 0x7f0100c6, 0x7f0100c7, 0x7f0100c8 };
public static final int MenuItem_actionLayout = 14;
public static final int MenuItem_actionProviderClass = 16;
public static final int MenuItem_actionViewClass = 15;
public static final int MenuItem_android_alphabeticShortcut = 9;
public static final int MenuItem_android_checkable = 11;
public static final int MenuItem_android_checked = 3;
public static final int MenuItem_android_enabled = 1;
public static final int MenuItem_android_icon = 0;
public static final int MenuItem_android_id = 2;
public static final int MenuItem_android_menuCategory = 5;
public static final int MenuItem_android_numericShortcut = 10;
public static final int MenuItem_android_onClick = 12;
public static final int MenuItem_android_orderInCategory = 6;
public static final int MenuItem_android_title = 7;
public static final int MenuItem_android_titleCondensed = 8;
public static final int MenuItem_android_visible = 4;
public static final int MenuItem_showAsAction = 13;
public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f0100c9 };
public static final int MenuView_android_headerBackground = 4;
public static final int MenuView_android_horizontalDivider = 2;
public static final int MenuView_android_itemBackground = 5;
public static final int MenuView_android_itemIconDisabledAlpha = 6;
public static final int MenuView_android_itemTextAppearance = 1;
public static final int MenuView_android_verticalDivider = 3;
public static final int MenuView_android_windowAnimationStyle = 0;
public static final int MenuView_preserveIconSpacing = 7;
public static final int[] NavigationView = { 0x010100d4, 0x010100dd, 0x0101011f, 0x7f01001a, 0x7f0100ca, 0x7f0100cb, 0x7f0100cc, 0x7f0100cd, 0x7f0100ce, 0x7f0100cf };
public static final int NavigationView_android_background = 0;
public static final int NavigationView_android_fitsSystemWindows = 1;
public static final int NavigationView_android_maxWidth = 2;
public static final int NavigationView_elevation = 3;
public static final int NavigationView_headerLayout = 9;
public static final int NavigationView_itemBackground = 7;
public static final int NavigationView_itemIconTint = 5;
public static final int NavigationView_itemTextAppearance = 8;
public static final int NavigationView_itemTextColor = 6;
public static final int NavigationView_menu = 4;
public static final int[] PopupWindow = { 0x01010176, 0x7f0100d0 };
public static final int[] PopupWindowBackgroundState = { 0x7f0100d1 };
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
public static final int PopupWindow_android_popupBackground = 0;
public static final int PopupWindow_overlapAnchor = 1;
public static final int[] RecyclerView = { 0x010100c4, 0x7f0100d2, 0x7f0100d3, 0x7f0100d4, 0x7f0100d5 };
public static final int RecyclerView_android_orientation = 0;
public static final int RecyclerView_layoutManager = 1;
public static final int RecyclerView_reverseLayout = 3;
public static final int RecyclerView_spanCount = 2;
public static final int RecyclerView_stackFromEnd = 4;
public static final int[] ScrimInsetsFrameLayout = { 0x7f0100d6 };
public static final int ScrimInsetsFrameLayout_insetForeground = 0;
public static final int[] ScrollingViewBehavior_Params = { 0x7f0100d7 };
public static final int ScrollingViewBehavior_Params_behavior_overlapTop = 0;
public static final int[] SearchView = { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f0100d8, 0x7f0100d9, 0x7f0100da, 0x7f0100db, 0x7f0100dc, 0x7f0100dd, 0x7f0100de, 0x7f0100df, 0x7f0100e0, 0x7f0100e1, 0x7f0100e2, 0x7f0100e3, 0x7f0100e4 };
public static final int SearchView_android_focusable = 0;
public static final int SearchView_android_imeOptions = 3;
public static final int SearchView_android_inputType = 2;
public static final int SearchView_android_maxWidth = 1;
public static final int SearchView_closeIcon = 8;
public static final int SearchView_commitIcon = 13;
public static final int SearchView_defaultQueryHint = 7;
public static final int SearchView_goIcon = 9;
public static final int SearchView_iconifiedByDefault = 5;
public static final int SearchView_layout = 4;
public static final int SearchView_queryBackground = 15;
public static final int SearchView_queryHint = 6;
public static final int SearchView_searchHintIcon = 11;
public static final int SearchView_searchIcon = 10;
public static final int SearchView_submitBackground = 16;
public static final int SearchView_suggestionRowLayout = 14;
public static final int SearchView_voiceIcon = 12;
public static final int[] SnackbarLayout = { 0x0101011f, 0x7f01001a, 0x7f0100e5 };
public static final int SnackbarLayout_android_maxWidth = 0;
public static final int SnackbarLayout_elevation = 1;
public static final int SnackbarLayout_maxActionInlineWidth = 2;
public static final int[] Spinner = { 0x010100b2, 0x01010176, 0x0101017b, 0x01010262, 0x7f01001b };
public static final int Spinner_android_dropDownWidth = 3;
public static final int Spinner_android_entries = 0;
public static final int Spinner_android_popupBackground = 1;
public static final int Spinner_android_prompt = 2;
public static final int Spinner_popupTheme = 4;
public static final int[] SwitchCompat = { 0x01010124, 0x01010125, 0x01010142, 0x7f0100e6, 0x7f0100e7, 0x7f0100e8, 0x7f0100e9, 0x7f0100ea, 0x7f0100eb, 0x7f0100ec };
public static final int SwitchCompat_android_textOff = 1;
public static final int SwitchCompat_android_textOn = 0;
public static final int SwitchCompat_android_thumb = 2;
public static final int SwitchCompat_showText = 9;
public static final int SwitchCompat_splitTrack = 8;
public static final int SwitchCompat_switchMinWidth = 6;
public static final int SwitchCompat_switchPadding = 7;
public static final int SwitchCompat_switchTextAppearance = 5;
public static final int SwitchCompat_thumbTextPadding = 4;
public static final int SwitchCompat_track = 3;
public static final int[] TabItem = { 0x01010002, 0x010100f2, 0x0101014f };
public static final int TabItem_android_icon = 0;
public static final int TabItem_android_layout = 1;
public static final int TabItem_android_text = 2;
public static final int[] TabLayout = { 0x7f0100ed, 0x7f0100ee, 0x7f0100ef, 0x7f0100f0, 0x7f0100f1, 0x7f0100f2, 0x7f0100f3, 0x7f0100f4, 0x7f0100f5, 0x7f0100f6, 0x7f0100f7, 0x7f0100f8, 0x7f0100f9, 0x7f0100fa, 0x7f0100fb, 0x7f0100fc };
public static final int TabLayout_tabBackground = 3;
public static final int TabLayout_tabContentStart = 2;
public static final int TabLayout_tabGravity = 5;
public static final int TabLayout_tabIndicatorColor = 0;
public static final int TabLayout_tabIndicatorHeight = 1;
public static final int TabLayout_tabMaxWidth = 7;
public static final int TabLayout_tabMinWidth = 6;
public static final int TabLayout_tabMode = 4;
public static final int TabLayout_tabPadding = 15;
public static final int TabLayout_tabPaddingBottom = 14;
public static final int TabLayout_tabPaddingEnd = 13;
public static final int TabLayout_tabPaddingStart = 11;
public static final int TabLayout_tabPaddingTop = 12;
public static final int TabLayout_tabSelectedTextColor = 10;
public static final int TabLayout_tabTextAppearance = 8;
public static final int TabLayout_tabTextColor = 9;
public static final int[] TextAppearance = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x7f010028 };
public static final int TextAppearance_android_shadowColor = 4;
public static final int TextAppearance_android_shadowDx = 5;
public static final int TextAppearance_android_shadowDy = 6;
public static final int TextAppearance_android_shadowRadius = 7;
public static final int TextAppearance_android_textColor = 3;
public static final int TextAppearance_android_textSize = 0;
public static final int TextAppearance_android_textStyle = 2;
public static final int TextAppearance_android_typeface = 1;
public static final int TextAppearance_textAllCaps = 8;
public static final int[] TextInputLayout = { 0x0101009a, 0x01010150, 0x7f0100fd, 0x7f0100fe, 0x7f0100ff, 0x7f010100, 0x7f010101, 0x7f010102, 0x7f010103, 0x7f010104, 0x7f010105 };
public static final int TextInputLayout_android_hint = 1;
public static final int TextInputLayout_android_textColorHint = 0;
public static final int TextInputLayout_counterEnabled = 6;
public static final int TextInputLayout_counterMaxLength = 7;
public static final int TextInputLayout_counterOverflowTextAppearance = 9;
public static final int TextInputLayout_counterTextAppearance = 8;
public static final int TextInputLayout_errorEnabled = 4;
public static final int TextInputLayout_errorTextAppearance = 5;
public static final int TextInputLayout_hintAnimationEnabled = 10;
public static final int TextInputLayout_hintEnabled = 3;
public static final int TextInputLayout_hintTextAppearance = 2;
public static final int[] Toolbar = { 0x010100af, 0x01010140, 0x7f010003, 0x7f010006, 0x7f01000a, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001b, 0x7f010106, 0x7f010107, 0x7f010108, 0x7f010109, 0x7f01010a, 0x7f01010b, 0x7f01010c, 0x7f01010d, 0x7f01010e, 0x7f01010f, 0x7f010110, 0x7f010111, 0x7f010112, 0x7f010113, 0x7f010114 };
public static final int Toolbar_android_gravity = 0;
public static final int Toolbar_android_minHeight = 1;
public static final int Toolbar_collapseContentDescription = 19;
public static final int Toolbar_collapseIcon = 18;
public static final int Toolbar_contentInsetEnd = 6;
public static final int Toolbar_contentInsetLeft = 7;
public static final int Toolbar_contentInsetRight = 8;
public static final int Toolbar_contentInsetStart = 5;
public static final int Toolbar_logo = 4;
public static final int Toolbar_logoDescription = 22;
public static final int Toolbar_maxButtonHeight = 17;
public static final int Toolbar_navigationContentDescription = 21;
public static final int Toolbar_navigationIcon = 20;
public static final int Toolbar_popupTheme = 9;
public static final int Toolbar_subtitle = 3;
public static final int Toolbar_subtitleTextAppearance = 11;
public static final int Toolbar_subtitleTextColor = 24;
public static final int Toolbar_title = 2;
public static final int Toolbar_titleMarginBottom = 16;
public static final int Toolbar_titleMarginEnd = 14;
public static final int Toolbar_titleMarginStart = 13;
public static final int Toolbar_titleMarginTop = 15;
public static final int Toolbar_titleMargins = 12;
public static final int Toolbar_titleTextAppearance = 10;
public static final int Toolbar_titleTextColor = 23;
public static final int[] View = { 0x01010000, 0x010100da, 0x7f010115, 0x7f010116, 0x7f010117 };
public static final int[] ViewBackgroundHelper = { 0x010100d4, 0x7f010118, 0x7f010119 };
public static final int ViewBackgroundHelper_android_background = 0;
public static final int ViewBackgroundHelper_backgroundTint = 1;
public static final int ViewBackgroundHelper_backgroundTintMode = 2;
public static final int[] ViewStubCompat = { 0x010100d0, 0x010100f2, 0x010100f3 };
public static final int ViewStubCompat_android_id = 0;
public static final int ViewStubCompat_android_inflatedId = 2;
public static final int ViewStubCompat_android_layout = 1;
public static final int View_android_focusable = 1;
public static final int View_android_theme = 0;
public static final int View_paddingEnd = 3;
public static final int View_paddingStart = 2;
public static final int View_theme = 4;
}
}
| [
"[email protected]"
]
| |
97dd58cf4f8062e647fcabf15dbde216edbe4d2f | 1ef617e559e5681c85f3299380fce521214288c3 | /01_watches/src/main/java/Watches/BaseWatch.java | 9c40c281cafe3032e6b0e8ee4b62c72ff63933b6 | [
"MIT"
]
| permissive | vla5924-practice/network-applications | 2092669ce256b55ebfdba62304da9b907e27ea74 | d580641162f395f2f6689bd9366576d41fc94704 | refs/heads/main | 2023-04-16T05:03:44.679258 | 2021-04-24T18:34:24 | 2021-04-24T18:34:24 | 339,354,547 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 489 | java | package Watches;
public abstract class BaseWatch {
private String name;
private double price;
public BaseWatch(String name, double price) {
this.price = price;
this.name = name;
}
public abstract void setTime(int h, int m, int s) throws Exception;
public abstract void addTime(int h, int m, int s) throws Exception;
public double getPrice() {
return this.price;
}
public String getName() {
return this.name;
}
}
| [
"[email protected]"
]
| |
9edc4fe83f72dd9a53aa625b7b95319c47755192 | cf1c7cd146b381cb83c4e5910c35fef936a5ec14 | /dsl-project/ashigel-compiler/src/test/java/com/asakusafw/compiler/batch/JoinBatch.java | a9d4c67e49818ff9f5ec74bc715a9b9737e2b2b5 | [
"Apache-2.0"
]
| permissive | claymodel/asakusafw | b0df814b608ccf2446a0a2cf4f8503dcc065e92b | d86fd41add8c32e0b8a3b83d367ed0bd2754f00a | refs/heads/master | 2021-01-18T01:59:06.648773 | 2013-07-26T12:18:20 | 2013-07-26T12:18:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,190 | java | /**
* Copyright 2011-2013 Asakusa Framework Team.
*
* 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.asakusafw.compiler.batch;
import com.asakusafw.vocabulary.batch.Batch;
import com.asakusafw.vocabulary.batch.BatchDescription;
import com.asakusafw.vocabulary.batch.Work;
/**
* 合流付きののバッチ。
*/
@Batch(name = "join")
public class JoinBatch extends BatchDescription {
@Override
protected void describe() {
Work first = run(FirstJobFlow.class).soon();
Work second = run(SecondJobFlow.class).after(first);
Work side = run(SideJobFlow.class).after(first);
run(JoinJobFlow.class).after(second, side);
}
}
| [
"[email protected]"
]
| |
0e6a12a088e2aaaa1cfceab851781cbefa802eb2 | ef0c1514e9af6de3ba4a20e0d01de7cc3a915188 | /sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/utils/HttpPipelineProvider.java | b6b563da4d27c914c0543d118bfa9afffe06b5d1 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later",
"CC0-1.0",
"BSD-3-Clause",
"UPL-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-generic-cla"
]
| permissive | Azure/azure-sdk-for-java | 0902d584b42d3654b4ce65b1dad8409f18ddf4bc | 789bdc6c065dc44ce9b8b630e2f2e5896b2a7616 | refs/heads/main | 2023-09-04T09:36:35.821969 | 2023-09-02T01:53:56 | 2023-09-02T01:53:56 | 2,928,948 | 2,027 | 2,084 | MIT | 2023-09-14T21:37:15 | 2011-12-06T23:33:56 | Java | UTF-8 | Java | false | false | 4,630 | java | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.resourcemanager.resources.fluentcore.utils;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogDetailLevel;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.resourcemanager.resources.fluentcore.policy.AuthenticationPolicy;
import com.azure.resourcemanager.resources.fluentcore.policy.ProviderRegistrationPolicy;
import com.azure.resourcemanager.resources.fluentcore.policy.ReturnRequestIdHeaderPolicy;
import com.azure.resourcemanager.resources.fluentcore.policy.UserAgentPolicy;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* This class provides common patterns on building {@link HttpPipeline}.
*/
public final class HttpPipelineProvider {
private HttpPipelineProvider() {
}
/**
* Creates http pipeline with token credential and profile
*
* @param credential the token credential
* @param profile the profile
* @return the http pipeline
*/
public static HttpPipeline buildHttpPipeline(TokenCredential credential, AzureProfile profile) {
return buildHttpPipeline(credential, profile, null, new HttpLogOptions().setLogLevel(HttpLogDetailLevel.NONE),
null, null, null, null);
}
/**
* Creates http pipeline with token credential and profile
*
* @param credential the token credential
* @param profile the profile
* @param scopes the credential scopes
* @param httpLogOptions the http log options
* @param configuration the configuration value
* @param retryPolicy the retry policy
* @param additionalPolicies the additional policies
* @param httpClient the http client
* @return the http pipeline
*/
public static HttpPipeline buildHttpPipeline(
TokenCredential credential, AzureProfile profile, String[] scopes, HttpLogOptions httpLogOptions,
Configuration configuration, RetryPolicy retryPolicy, List<HttpPipelinePolicy> additionalPolicies,
HttpClient httpClient) {
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies.add(new UserAgentPolicy(httpLogOptions, configuration));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies.add(new ReturnRequestIdHeaderPolicy(ReturnRequestIdHeaderPolicy.Option.COPY_CLIENT_REQUEST_ID));
if (!CoreUtils.isNullOrEmpty(additionalPolicies)) {
policies.addAll(
additionalPolicies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList())
);
}
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
if (credential != null) {
policies.add(new AuthenticationPolicy(credential, profile.getEnvironment(), scopes));
}
policies.add(new ProviderRegistrationPolicy());
if (!CoreUtils.isNullOrEmpty(additionalPolicies)) {
policies.addAll(
additionalPolicies
.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList())
);
}
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
return new HttpPipelineBuilder()
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.httpClient(httpClient)
.build();
}
}
| [
"[email protected]"
]
| |
d972e2c8a1ad52756ca6231631a0b8cf525de5df | 9b8f336e09ae61589afedf0923c1e027b8ec81cc | /app/src/main/java/com/malmstein/yahnac/data/DataRepository.java | 42df3521983b2d97c2983092e8a86a2adbd4ba13 | [
"Apache-2.0"
]
| permissive | myalban/yahnac | 0ad7be2a3040e058381ae61f422a8c6dd14103a1 | 264f3086a61b7ec024b620a187434b4ddacb3f58 | refs/heads/master | 2021-01-23T20:00:28.946575 | 2015-04-01T07:05:12 | 2015-04-01T07:05:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,303 | java | package com.malmstein.yahnac.data;
import android.content.ContentValues;
import com.malmstein.yahnac.model.StoriesJsoup;
import com.malmstein.yahnac.model.Story;
import com.malmstein.yahnac.updater.RefreshSharedPreferences;
import com.malmstein.yahnac.updater.RefreshTimestamp;
import java.util.List;
import java.util.Vector;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Func1;
public class DataRepository {
private static final long MILLIS_IN_AMINUTE = TimeUnit.MINUTES.toMillis(1);
private static final long maxMillisWithoutUpgrade = 60 * MILLIS_IN_AMINUTE;
private final HNewsApi api;
private final DataPersister dataPersister;
private final RefreshSharedPreferences refreshPreferences;
public DataRepository(DataPersister dataPersister) {
this.dataPersister = dataPersister;
this.api = new HNewsApi();
this.refreshPreferences = RefreshSharedPreferences.newInstance();
}
public boolean shouldUpdateContent(Story.TYPE type) {
if (type == Story.TYPE.new_story || type == Story.TYPE.best_story) {
return false;
}
RefreshTimestamp lastUpdate = refreshPreferences.getLastRefresh(type);
RefreshTimestamp now = RefreshTimestamp.now();
long elapsedTime = now.getMillis() - lastUpdate.getMillis();
return elapsedTime > maxMillisWithoutUpgrade;
}
public Observable<Integer> getStories(final Story.TYPE type) {
return api.getStories(type)
.flatMap(new Func1<List<ContentValues>, Observable<Integer>>() {
@Override
public Observable<Integer> call(final List<ContentValues> stories) {
return Observable.create(new Observable.OnSubscribe<Integer>() {
@Override
public void call(Subscriber<? super Integer> subscriber) {
refreshPreferences.saveRefreshTick(type);
dataPersister.persistStories(stories);
subscriber.onNext(stories.size());
subscriber.onCompleted();
}
});
}
});
}
public Observable<String> observeStories(Story.TYPE type, String nextUrl) {
return getStories(type, nextUrl);
}
private Observable<String> getStories(final Story.TYPE type, final String nextUrl) {
return api.getStories(type, nextUrl)
.flatMap(new Func1<StoriesJsoup, Observable<String>>() {
@Override
public Observable<String> call(final StoriesJsoup stories) {
return Observable.create(new Observable.OnSubscribe<String>() {
@Override
public void call(Subscriber<? super String> subscriber) {
refreshPreferences.saveRefreshTick(type);
dataPersister.persistStories(stories.getStories());
subscriber.onNext(stories.getNextUrl());
subscriber.onCompleted();
}
});
}
});
}
public Observable<Integer> observeComments(final Long storyId) {
return getComments(storyId);
}
private Observable<Integer> getComments(final Long storyId) {
return api.getCommentsFromStory(storyId)
.flatMap(new Func1<Vector<ContentValues>, Observable<Integer>>() {
@Override
public Observable<Integer> call(final Vector<ContentValues> commentsJsoup) {
return Observable.create(new Observable.OnSubscribe<Integer>() {
@Override
public void call(Subscriber<? super Integer> subscriber) {
subscriber.onNext(dataPersister.persistComments(commentsJsoup, storyId));
subscriber.onCompleted();
}
});
}
});
}
}
| [
"[email protected]"
]
| |
0ee0155fcce14f8aaa9e1b646bbeccf2edfdd54b | 488f41de2b5fce4081c87feb547ef853ea69a5f6 | /materials/2019-2020/11v/2020-04-29-lambda-functions/src/org/elsys/duzunov/Person.java | 9749e85f2bc18230e47988fd186e263ce4ff970f | []
| no_license | elsys/oop | 5c17e8f2c72aba775f4d895499782b6cad5816d1 | a5be4adb767cdde7d9f904024880382509f53498 | refs/heads/master | 2023-06-14T06:21:30.570095 | 2023-06-05T19:04:14 | 2023-06-05T19:04:14 | 211,560,844 | 11 | 32 | null | 2023-02-22T09:24:13 | 2019-09-28T20:57:51 | PostScript | UTF-8 | Java | false | false | 1,838 | java | package org.elsys.duzunov;
import java.time.LocalDate;
public class Person {
public enum Gender {
MALE("male"),
FEMALE("female");
private final String shortName;
Gender(String shortName) {
this.shortName = shortName;
}
public String getShortName() {
return shortName;
}
}
private final String name;
private final LocalDate birthday;
private final Gender gender;
private final String emailAddress;
public Person(String name,
LocalDate birthday,
Gender gender,
String emailAddress) {
this.name = name;
this.birthday = birthday;
this.gender = gender;
this.emailAddress = emailAddress;
}
public String getName() {
return name;
}
public LocalDate getBirthday() {
return birthday;
}
public Gender getGender() {
return gender;
}
public String getEmailAddress() {
return emailAddress;
}
public int getAge() {
LocalDate today = LocalDate.now();
LocalDate birthday = getBirthday();
int age = today.getYear() - birthday.getYear();
int monthDifference = today.getMonthValue() - birthday.getMonthValue();
if (monthDifference < 0 ||
(monthDifference == 0 &&
today.getDayOfMonth() < birthday.getDayOfMonth())) {
--age;
}
return age;
}
public void print() {
System.out.println(
String.format(
"%s, %d, %s, %s",
getName(),
getAge(),
getGender().getShortName(),
getEmailAddress()
)
);
}
}
| [
"[email protected]"
]
| |
1e56a263536d5fdae9906aee21587b727c63fce2 | 985b30ade6bb55358b925df6a2b7855ff5c3ae0d | /zenodot-tests/test/dd/kms/zenodot/tests/classesForTest/moreDummies/MyDummy2.java | 9df1e638f5ad93b0e460568ea4c58ca4071dac3d | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"MIT"
]
| permissive | tbrunsch/Zenodot | cc38f2793a9b3f761fab5ffa9607a7ab596fae44 | 2036f311e2e548f77f9ad56ae8cf44bdc2e5c74f | refs/heads/master | 2023-06-27T14:51:22.227490 | 2023-06-21T21:21:54 | 2023-06-21T21:30:12 | 227,767,280 | 0 | 0 | MIT | 2023-06-21T21:05:56 | 2019-12-13T05:57:29 | Java | UTF-8 | Java | false | false | 120 | java | package dd.kms.zenodot.tests.classesForTest.moreDummies;
class MyDummy2
{
static final boolean FIRST_DUMMY = false;
}
| [
"[email protected]"
]
| |
5dcca21b51ce281acccf89d62eaadd9177e2636e | 046da477a4ff3bec99fb7871117d78e0f18167d7 | /src/main/java/co/zync/vertx/managers/StorageManager.java | e7de3cc7a79f03ce78c9919c72558a10a0bb06c4 | []
| no_license | Zyncco/Java-Vertx-Server | ff1f67961c584b9c18b59f8b87c6d4dd7bacf888 | 99dd0921e905442366aee68992be9eb3cfefea14 | refs/heads/master | 2021-01-18T20:22:53.420123 | 2017-08-26T23:32:26 | 2017-08-26T23:32:26 | 86,959,976 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 983 | java | package co.zync.vertx.managers;
import com.google.cloud.storage.Bucket;
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.StorageOptions;
public class StorageManager {
private static StorageManager ourInstance = new StorageManager();
public static StorageManager getInstance(){
return ourInstance;
}
private final Storage storage;
private final Bucket bucket;
private StorageManager(){
this.storage = StorageOptions.newBuilder()
.setProjectId(CredentialsManager.getInstance().getProjectId())
.setCredentials(CredentialsManager.getInstance().getGoogleCredentials())
.build()
.getService();
this.bucket = this.storage.get(CredentialsManager.getInstance().getBucketName());
}
public Storage getStorage(){
return storage;
}
public Bucket getBucket(){
return bucket;
}
}
| [
"[email protected]"
]
| |
5e053d306e8e458ab218ee98b96a630a1818ddc0 | 5ef65946d32a389413680cf8e15726ca81b689cd | /propertyRental/src/main/java/ee/rental/app/core/model/PropertyFacility.java | e66cc338b23baccde505e785e53c42863f34114b | []
| no_license | techierishi/Property-rental-system | 7a1f4ca0362b73cc2f8a3a8a50bf7dbacb7b3713 | 4c3fb9e2745a10e020889393c49cb50bd741e80b | refs/heads/master | 2020-06-10T22:01:45.632750 | 2015-07-05T19:28:37 | 2015-07-05T19:28:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 358 | java | package ee.rental.app.core.model;
import javax.persistence.Entity;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
@Entity
@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class,property="atpropertyFacilityId")
public class PropertyFacility extends BaseLookup{
}
| [
"[email protected]"
]
| |
a5843b327bcddd01bac401ede41275b311ca7b73 | cfc69c65f351465df3c85aa7360005faf9e199e1 | /me/askingg/altcontrol/utils/Message.java | bbf8cdabc291dd9dc7ae155ca93b41a8ac363d3b | []
| no_license | Askingg/AltManager | b82eb31c6a18a6013ed51cf31652d5cc8ee77eeb | 135f7440a28db83ee6620e0963d4d8871ffd6af1 | refs/heads/master | 2020-05-01T04:27:55.568968 | 2019-03-23T10:26:57 | 2019-03-23T10:26:57 | 177,274,997 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 591 | java | package me.askingg.altcontrol.utils;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Message {
public static void console(String msg) {
Bukkit.getConsoleSender().sendMessage(msg.replace("%prefix%", Format.prefix));
}
public static void player(String msg, Player player) {
player.sendMessage(Format.color(msg.replace("%prefix%", Format.prefix)));
}
public static void sender(String msg, CommandSender sender) {
sender.sendMessage(Format.color(msg.replace("%prefix%", Format.prefix)));
}
}
| [
"[email protected]"
]
| |
bdbf56e3bc8ed4cc8fb562cba2069028633ffcb8 | 8a0c4bdedd90f9afec6b61f64c183b01caece958 | /BaiTapOOP/Bai1/Node.java | 9374acd53eac7953f6b47d0778a8ea69e76d19f8 | []
| no_license | Lucastaa/OOP | e030be225ecf22c2deebc669eec2b0e65326a4f1 | 867c8eb8c7eaaab01f93f8567bd66947ca98f205 | refs/heads/main | 2023-04-07T04:23:40.407450 | 2021-03-30T06:52:48 | 2021-03-30T06:52:48 | 352,898,234 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 560 | java | package BaiTapOOP.Bai1;
public class Node {
private String tenToaDo;
private float x;
private float y;
public Node() {
tenToaDo = "null";
x = 0.0f;
y = 0.0f;
}
public Node(String tenToaDo, float x, float y) {
this.tenToaDo = tenToaDo;
this.x = x;
this.y = y;
}
@Override
public String toString() {
return "Tên tọa độ là: " + tenToaDo + "\'" +
", x= " + x +
", y= " + y +
'}';
}
}
| [
"[email protected]"
]
| |
dc5483762ab7704e4ab3e707854bad3db78857d3 | a9c09d5236d476c295da095f32614da2dc05918a | /xpocket-jline/src/main/java/org/jline/utils/DiffHelper.java | 650c774f63fbf39dc4680f22c2d7055f1051b031 | [
"Apache-2.0"
]
| permissive | DearZh/xpocket | a4d260da8b88c56840656149878d85355eab7ede | 0326239b712a75cfc532604c6137de43ed5b5fcb | refs/heads/main | 2023-03-08T20:12:19.327589 | 2023-03-06T07:27:16 | 2023-03-06T07:27:16 | 332,637,216 | 0 | 0 | Apache-2.0 | 2021-01-25T05:10:43 | 2021-01-25T05:10:43 | null | UTF-8 | Java | false | false | 4,800 | java | /*
* Copyright (c) 2002-2016, the original author or authors.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
* https://opensource.org/licenses/BSD-3-Clause
*/
package org.jline.utils;
import java.util.LinkedList;
import java.util.List;
/**
* Class containing the diff method.
* This diff is ANSI aware and will correctly handle text attributes
* so that any text in a Diff object is a valid ansi string.
*/
public class DiffHelper {
/**
* The data structure representing a diff is a Linked list of Diff objects:
* {Diff(Operation.DELETE, "Hello"), Diff(Operation.INSERT, "Goodbye"),
* Diff(Operation.EQUAL, " world.")}
* which means: delete "Hello", add "Goodbye" and keep " world."
*/
public enum Operation {
DELETE, INSERT, EQUAL
}
/**
* Class representing one diff operation.
*/
public static class Diff {
/**
* One of: INSERT, DELETE or EQUAL.
*/
public final Operation operation;
/**
* The text associated with this diff operation.
*/
public final AttributedString text;
/**
* Constructor. Initializes the diff with the provided values.
* @param operation One of INSERT, DELETE or EQUAL.
* @param text The text being applied.
*/
public Diff(Operation operation, AttributedString text) {
// Construct a diff with the specified operation and text.
this.operation = operation;
this.text = text;
}
/**
* Display a human-readable version of this Diff.
* @return text version.
*/
public String toString() {
return "Diff(" + this.operation + ",\"" + this.text + "\")";
}
}
/**
* Compute a list of difference between two lines.
* The result will contain at most 4 Diff objects, as the method
* aims to return the common prefix, inserted text, deleted text and
* common suffix.
* The computation is done on characters and their attributes expressed
* as ansi sequences.
*
* @param text1 the old line
* @param text2 the new line
* @return a list of Diff
*/
public static List<Diff> diff(AttributedString text1, AttributedString text2) {
int l1 = text1.length();
int l2 = text2.length();
int n = Math.min(l1, l2);
int commonStart = 0;
// Given a run of contiguous "hidden" characters (which are
// sequences of uninterrupted escape sequences) we always want to
// print either the entire run or none of it - never a part of it.
int startHiddenRange = -1;
while (commonStart < n
&& text1.charAt(commonStart) == text2.charAt(commonStart)
&& text1.styleAt(commonStart).equals(text2.styleAt(commonStart))) {
if (text1.isHidden(commonStart)) {
if (startHiddenRange < 0)
startHiddenRange = commonStart;
} else
startHiddenRange = -1;
commonStart++;
}
if (startHiddenRange >= 0
&& ((l1 > commonStart && text1.isHidden(commonStart))
|| (l2 > commonStart && text2.isHidden(commonStart))))
commonStart = startHiddenRange;
startHiddenRange = -1;
int commonEnd = 0;
while (commonEnd < n - commonStart
&& text1.charAt(l1 - commonEnd - 1) == text2.charAt(l2 - commonEnd - 1)
&& text1.styleAt(l1 - commonEnd - 1).equals(text2.styleAt(l2 - commonEnd - 1))) {
if (text1.isHidden(l1 - commonEnd - 1)) {
if (startHiddenRange < 0)
startHiddenRange = commonEnd;
} else
startHiddenRange = -1;
commonEnd++;
}
if (startHiddenRange >= 0)
commonEnd = startHiddenRange;
LinkedList<Diff> diffs = new LinkedList<>();
if (commonStart > 0) {
diffs.add(new Diff(DiffHelper.Operation.EQUAL,
text1.subSequence(0, commonStart)));
}
if (l2 > commonStart + commonEnd) {
diffs.add(new Diff(DiffHelper.Operation.INSERT,
text2.subSequence(commonStart, l2 - commonEnd)));
}
if (l1 > commonStart + commonEnd) {
diffs.add(new Diff(DiffHelper.Operation.DELETE,
text1.subSequence(commonStart, l1 - commonEnd)));
}
if (commonEnd > 0) {
diffs.add(new Diff(DiffHelper.Operation.EQUAL,
text1.subSequence(l1 - commonEnd, l1)));
}
return diffs;
}
}
| [
"[email protected]"
]
| |
34f5bcd535786725a4e1fd8f491845e6340af19a | ceb3ac084cba0c07a522777c952ef16b5da0355b | /app/src/androidTest/java/com/angelmasxyz/speedometer/ExampleInstrumentedTest.java | b12707e57c9ce24318fe88d2c662971d861cefe8 | []
| no_license | absabbath/get-speed-android | 37be2e11cfddc6878be78c349a7ac1a9a1111bf1 | 713bff7b13ee86856cca9dda42c71454c397b703 | refs/heads/master | 2020-05-07T16:47:10.047617 | 2019-04-11T02:38:47 | 2019-04-11T02:38:47 | 180,698,041 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 738 | java | package com.angelmasxyz.speedometer;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.angelmasxyz.speedometer", appContext.getPackageName());
}
}
| [
"[email protected]"
]
| |
ca63a619df5c45eee54daff78e263f023efa35ae | a06f6fa977c013049dd6530641d220bd030d2fa6 | /src/main/java/io/kunalk/springaws/dynamoDBweb/controller/BookSearchController.java | 58283a33b2faaadade5b1414273b8abc7d82680a | []
| no_license | Kunalk/springboot-aws-dynamoDB | 2725e47123ad6a21ee05461fa6131c53d102afde | 38b6ce32a0e459eb9aa6f8fbd8429f0e3f38c6f5 | refs/heads/master | 2020-04-13T01:19:14.769293 | 2019-05-29T04:42:05 | 2019-05-29T04:42:05 | 162,871,038 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,729 | java | /** \file
*
* May 14, 2018
*
* Copyright Ian Kaplan 2018
*
* @author Ian Kaplan, www.bearcave.com, [email protected]
*/
package io.kunalk.springaws.dynamoDBweb.controller;
import java.util.List;
import io.kunalk.springaws.dynamoDBweb.model.BookInfo;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
/**
* <h4>
* BookSearchController
* </h4>
* <p>
* This controller handles database search for books.
* </p>
* <p>
* Note that the List<BookInfo> object is passed in the redirect via a flash attribute. Flash attributes are not limited
* to strings, as are attributes. See https://stackoverflow.com/a/24302616
* </p>
* <p>
* For a reference on Spring controllers, see http://www.codejava.net/frameworks/spring/14-tips-for-writing-spring-mvc-controller
* </p>
*
*/
@Controller
public class BookSearchController extends BookControllerBase {
private static final Log logger = LogFactory.getLog(BookSearchController.class);
/**
* <p>
* Search by the book title and author.
* </p>
* @param title Book title
* @param author Book author
* @param redirect Spring redirect attribute used to return the search result (as a flash attribute).
* @return the redirect page.
*/
@RequestMapping(value = "/title-author-search", method = RequestMethod.POST)
public String searchByTitleAuthor(@RequestParam("title") String title,
@RequestParam("author") String author,
RedirectAttributes redirect) {
if (title != null && title.length() > 0) {
if (author != null && author.length() > 0) {
logger.info("searchByTitleAuthor: title = " + title + ", author = " + author);
List<BookInfo> bookInfoList = getBookTableService().findBookByTitleAuthor(author, title);
if (bookInfoList != null && bookInfoList.size() > 0) {
redirect.addFlashAttribute(BOOK_LIST, bookInfoList);
}
} else {
redirect.addFlashAttribute("title_author_author_error", "Author must be specified");
}
} else {
redirect.addFlashAttribute("title_author_title_error", "Title must be specified");
}
return "redirect:/";
}
/**
* <p>
* Search by the book author.
* </p>
* @param author book author
* @param redirect Spring redirect object used to return the search result.
* @return the redirect page.
*/
@RequestMapping(value = "/author-search", method = RequestMethod.POST)
public String searchByAuthor(@RequestParam("author") String author, RedirectAttributes redirect) {
if (author != null && author.length() > 0) {
List<BookInfo> bookInfoList = getBookTableService().findBookByAuthor(author);
if (bookInfoList != null && bookInfoList.size() > 0) {
redirect.addFlashAttribute(BOOK_LIST, bookInfoList);
}
}
return "redirect:/";
}
/**
* <p>
* Search the book database by title (or title substring).
* </p>
*
* @param title The title substring to search book titles for
* @param redirect the RedirectAttributes object used to return the search result
* @return the redirect page
*/
@RequestMapping(value = "/title-search", method = RequestMethod.POST)
public String searchByTitle(@RequestParam("title") String title, RedirectAttributes redirect) {
if (title != null && title.length() > 0) {
List<BookInfo> bookInfoList = getBookTableService().findBookByTitle(title);
if (bookInfoList != null && bookInfoList.size() > 0) {
redirect.addFlashAttribute(BOOK_LIST, bookInfoList);
}
}
return "redirect:/";
}
/**
* <p>
* Return all books in the database
* </p>
*
* @param redirect
* @return
*/
@RequestMapping(value = "/list-all-books", method = RequestMethod.POST)
public String getAllBooks( RedirectAttributes redirect ) {
List<BookInfo> bookInfoList = getBookTableService().getBooks();
if (bookInfoList != null && bookInfoList.size() > 0) {
redirect.addFlashAttribute(BOOK_LIST, bookInfoList);
}
return "redirect:/";
}
}
| [
"[email protected]"
]
| |
39cbf574955c8eead5f073ada3698b9ae640d5c5 | 50dab21a8f30f5bb2e3fe8f08689c03dc7b3aa4e | /design/src/main/java/com/dxpzk/design/structure/Adapter/ObjectAdapter/Target.java | 3c4937a64974fd8d6a8fa121c02d77a78b56c356 | []
| no_license | dxpzk/familyPortrait | ede480dd596eaa879e967869050e70b1999bb285 | c70e3fbd1944bdf220c1a16224b818b5a29ee7ed | refs/heads/master | 2022-12-24T04:38:46.965650 | 2020-09-24T06:21:01 | 2020-09-24T06:21:01 | 298,185,183 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 171 | java | package com.dxpzk.design.structure.Adapter.ObjectAdapter;
/**
* @author zk
* @since 2020-08-24
*/
public interface Target {
void method1();
void method2();
}
| [
"[email protected]"
]
| |
74789d334667e8447a0367f0a8e1ab700becdf20 | 0a6773e906928f83969cf609a49e55bb472f4e21 | /web/personal/src/main/java/com/netfinworks/site/web/common/util/LogUtil.java | 8b8a6837eb4fa455ec6e3d8470d2aba06f92e925 | []
| no_license | tasfe/site-platform-root | ec078effb6509e5d2d2b2cd9722f986dd0d939dd | c366916d96289beb624b633283880b8bb94452b4 | refs/heads/master | 2021-01-15T08:19:19.176225 | 2017-02-28T05:37:11 | 2017-02-28T05:37:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 688 | java | package com.netfinworks.site.web.common.util;
import java.text.MessageFormat;
import com.netfinworks.common.domain.OperationEnvironment;
import com.netfinworks.site.domain.domain.member.BaseMember;
public class LogUtil {
/**
*
* @param type 操作类型
* @param member 会员信息
* @param env
* @return
*/
public static String appLog(String type,BaseMember member,OperationEnvironment env) {
String context="操作类型-{0},用户ID-{1},账号-{2},名称-{3},操作员-{4},IP-{5},MAC-{6}";
return MessageFormat.format(context,type,member.getMemberId(),member.getLoginName(),member.getMemberName(),"",env.getClientIp(),env.getClientMac());
}
}
| [
"[email protected]"
]
| |
88609746d6fd5f21ace3765c845be741ac632c72 | 87dbb80c2c3720c02f6587ffcd989a36a9e5c65f | /spring-vaadin-test/src/main/java/org/vaadin/spring/test/VaadinAppConfiguration.java | 8a330998ad27fc9f3aa9222a2ca5f37afa16831f | [
"Apache-2.0"
]
| permissive | Charles-AndreMartin/vaadin4spring | 37777339141a24392e6d8cd530974f3483bae94f | 14d6b72ea5eb28758ddf6edc6dd74cec4d3dcb04 | refs/heads/master | 2020-02-26T17:13:02.426435 | 2014-12-05T10:48:19 | 2014-12-05T10:48:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,657 | java | /*
* Copyright 2014 The original authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.vaadin.spring.test;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
import org.springframework.test.context.support.DirtiesContextTestExecutionListener;
import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
import org.springframework.test.context.web.WebAppConfiguration;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Place this annotation on test classes that:
* <ul>
* <li>are run with the {@link org.springframework.test.context.junit4.SpringJUnit4ClassRunner},</li>
* <li>use autowiring to inject managed beans into the actual test, and</li>
* <li>perform tests on beans that are {@link org.vaadin.spring.UIScope}d or {@link org.vaadin.spring.VaadinSessionScope}d</li>
* </ul>
* With this annotation in place, all beans that are UI-scoped or VaadinSession-scoped will work as expected. The indented use case for this approach is
* to test non-visual components like presenters or controllers. It is not usable for testing Vaadin components or
* actual {@link com.vaadin.ui.UI} instances.
* <p/>
* Example of usage:
* <pre>
* @RunWith(SpringJUnit4ClassRunner.class)
* @VaadinAppConfiguration
* @ContextConfiguration(classes = ExampleIntegrationTest.Config.class)
* public class MyTest {
*
* @Autowired MyUIScopedController myController;
*
* ...
* }
* </pre>
*
* @author Petter Holmström ([email protected])
* @see org.vaadin.spring.test.VaadinScopes
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@WebAppConfiguration
@TestExecutionListeners({
VaadinTestExecutionListener.class,
DependencyInjectionTestExecutionListener.class,
DirtiesContextTestExecutionListener.class,
TransactionalTestExecutionListener.class
})
public @interface VaadinAppConfiguration {
}
| [
"[email protected]"
]
| |
27cc5796d44ae16edb14e45299d500f3f88ae20e | 63dc812fd86bdacd432172c73953821ed28256ef | /Inventory_System/src/Inventory.java | 2b0c3790c0ec33d179ddd4eabe1b92a29958121d | []
| no_license | GarthS1/Software-Devolpment-Course | db2c526905eda43372f320a10ed226ce7191be76 | 9fbfdc54ec9bfeacd288a467711583d8846529c3 | refs/heads/master | 2022-04-22T17:35:53.757286 | 2020-04-20T21:19:29 | 2020-04-20T21:19:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,232 | java | import java.util.ArrayList;
/**
* Keeps track of all the items and allows for items to be ordered
* @author Garth Slaney
*
*/
public class Inventory {
/**
* List of all items
*/
private ArrayList<Item> items;
/**
* Object which orders part
*/
private Order myOrder;
/**
* Constructor to initialize array of items
* @param Items to be set to
*/
public Inventory(ArrayList<Item> items) {
setItems(items);
myOrder = new Order();
}
/**
* Decrease the item and see if an order needs to be placed
* @param s Item name
*/
public void manageItem(String s) {
Item manage = null;
for(int i = 0; i < items.size(); i++) {
if(s.equalsIgnoreCase(items.get(i).getName())) {
manage = items.get(i);
break;
}
}
if(manage != null) {
manage.decreaseItem();
if(manage.needToOrder())
myOrder.placeOrder(manage);
}
else
System.out.println("No item found");
}
/**
* Gets the items list
* @return Items list
*/
public ArrayList<Item> getItems() {
return items;
}
/**
* Sets the item list
* @param items The item list
*/
public void setItems(ArrayList<Item> items) {
this.items = items;
}
/**
* Makes a string for printing.
*/
@Override
public String toString() {
String s = "The items in the Inventory are: \n";
for(int i = 0; i < items.size(); i++) {
s += items.get(i);
}
s += "\n";
return s;
}
/**
* Search for an item by it's name
* @param s The name of the item
* @return Return error if can't find display information if found
*/
public String searchName(String s) {
String ret = "No item found.\n";
for(int i = 0; i < items.size(); i++) {
if(s.equalsIgnoreCase(items.get(i).getName())) {
ret = items.get(i).toString();
break;
}
}
return ret;
}
/**
* Search for an item by ID
* @param id The ID of the item
* @return Return String of Item
*/
public String searchID(int id) {
String ret = "No item found. \n";
for(int i = 0; i < items.size(); i++) {
if(id == items.get(i).getToolId()) {
ret = items.get(i).toString();
break;
}
}
return ret;
}
/**
* Calls the print order function from order
*/
public void printOrder() {
myOrder.print();
}
}
| [
"[email protected]"
]
| |
65d0c333e2cef2f60192f9516aa6c9c23a4bc1a2 | 4d7b6062f25072a784597c8afe44794518773692 | /cloud-worker/src/main/java/org/cloud/storage/worker/providers/dropbox/constants/DropboxEndpointConstants.java | 7e8c0c4053a7281242071e054b54f353750993d5 | []
| no_license | cloud-storage-solutions/cloud-storage | ff082afe5e140fe5383c745d510e96c35701b22a | 40046bce898e5c3686c9130048bde2e564605432 | refs/heads/master | 2020-03-08T00:16:47.678628 | 2018-05-15T20:38:03 | 2018-05-15T20:38:03 | 127,188,562 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 410 | java | package org.cloud.storage.worker.providers.dropbox.constants;
public final class DropboxEndpointConstants {
public static final String UPLOAD_ENDPOINT = "https://content.dropboxapi.com/2/files/upload";
public static final String SPACE_QUOTA_ENDPOINT = "https://api.dropboxapi.com/2/users/get_space_usage";
public static final String DOWNLOAD_ENDPOINT = "https://content.dropboxapi.com/2/files/download";
}
| [
"[email protected]"
]
| |
90c1000335103c9624d2adb88b67ccf54dcb350a | 648140c37af354b05d6dbc52e48cd3de89c9ba92 | /notification-microservice/src/main/java/com/codefinity/microcontinuum/notification/PropertiesTestController.java | f293894998c7f4a63ce7cd69151f7c356909a3b7 | [
"MIT"
]
| permissive | codefinity/micro-continuum | 242b530d8f08c1a7d3a745012450cffb122b2e71 | 59f0b426faaf6faa551f2bda1c305040e2a8d31d | refs/heads/master | 2021-03-30T21:20:01.295883 | 2018-07-22T10:18:06 | 2018-07-22T10:18:06 | 124,922,490 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 562 | java | package com.codefinity.microcontinuum.notification;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RefreshScope
public class PropertiesTestController {
@Value("${x-microservice.config-test-value}")
private String testProperty;
@RequestMapping(value = "/testproperty")
public String greeting( ) {
return testProperty;
}
}
| [
"[email protected]"
]
| |
285457def2108c9a90642cbae834bbb9b7dd840b | c870e7b9d224311226ff2f278a8ebfc6823dfd68 | /src/main/java/me/machadolucas/avanto/view/BlogBean.java | b26a7480f27ccbb214cb8d01cc44dda371c40027 | [
"MIT"
]
| permissive | machadolucas/avanto | 6d4c6576424291d8ff0531107b6165f24a2d5c83 | 08d6b2d2c64dc05e0b88730c34d84dddd13cc529 | refs/heads/master | 2020-12-24T17:45:00.801587 | 2014-03-22T20:15:12 | 2014-03-22T20:15:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,703 | java | package me.machadolucas.avanto.view;
import java.util.List;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
import me.machadolucas.avanto.db.MorphiaDatastore;
import me.machadolucas.avanto.db.dao.AuthorDAO;
import me.machadolucas.avanto.db.dao.PostDAO;
import me.machadolucas.avanto.entities.Author;
import me.machadolucas.avanto.entities.Post;
@ManagedBean
@ApplicationScoped
public class BlogBean extends AbstractView {
private static final int NUMBER_OF_LAST_POSTS = 6;
private static final long serialVersionUID = -7583636043378780666L;
public List<Post> filteredPostsList;
public static List<Author> authorsList;
public static List<Post> postsList;
public static List<Post> lastPosts;
PostDAO postDAO;
AuthorDAO authorDAO;
@Override
void doInit() {
postDAO = new PostDAO(Post.class, MorphiaDatastore.getDatabaseObject());
authorDAO = new AuthorDAO(Author.class,
MorphiaDatastore.getDatabaseObject());
lastPosts = postDAO.findLastPosts(NUMBER_OF_LAST_POSTS);
postsList = postDAO.findAllPublishedPosts();
authorsList = authorDAO.find().asList();
}
public void reloadBean() {
lastPosts = postDAO.findLastPosts(NUMBER_OF_LAST_POSTS);
postsList = postDAO.findAllPublishedPosts();
authorsList = authorDAO.find().asList();
}
/**
* @return the postsList
*/
public List<Post> getPostsList() {
return postsList;
}
/**
* @param postsList
* the postsList to set
*/
public void setPostsList(List<Post> postsList) {
BlogBean.postsList = postsList;
}
/**
* @return the lastPosts
*/
public List<Post> getLastPosts() {
return lastPosts;
}
/**
* @param lastPosts
* the lastPosts to set
*/
public void setLastPosts(List<Post> lastPosts) {
BlogBean.lastPosts = lastPosts;
}
/**
* @return the authorsList
*/
public static List<Author> getAuthorsList() {
return authorsList;
}
/**
* @param authorsList
* the authorsList to set
*/
public static void setAuthorsList(List<Author> authorsList) {
BlogBean.authorsList = authorsList;
}
/**
* @return the authorsList
*/
public List<Author> getAuthorsListNonStatic() {
return authorsList;
}
/**
* @param authorsList
* the authorsList to set
*/
public void setAuthorsListNonStatic(List<Author> authorsList) {
BlogBean.authorsList = authorsList;
}
/**
* @return the filteredPostsList
*/
public List<Post> getFilteredPostsList() {
return filteredPostsList;
}
/**
* @param filteredPostsList
* the filteredPostsList to set
*/
public void setFilteredPostsList(List<Post> filteredPostsList) {
this.filteredPostsList = filteredPostsList;
}
}
| [
"[email protected]"
]
| |
29926fb6be15a58d9fa7794bb39b46416974d696 | 43b25882a5e2f4cb8b6afd2ed6c56a7a8e5178e7 | /src/main/java/com/github/damiox/ecommerce/dao/UserRepository.java | 293b72f3c2492f8d64bbdc301b6b79f7f546794a | [
"MIT"
]
| permissive | DeveloperRafael1996/ecommerce-rest-spring-jpa | 750ba1a01e8caec8034bd55ae1f02f1e345c2831 | 14b7395ecc26e8c4c5eea1dcba9565aa021ee9af | refs/heads/master | 2021-09-15T00:09:27.583471 | 2018-05-22T15:14:58 | 2018-05-22T15:14:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 620 | java | package com.github.damiox.ecommerce.dao;
import com.github.damiox.ecommerce.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.Optional;
/**
* Spring Data JPA Repository for {@link User} entity
*
* @author dnardelli
*/
@Repository
public interface UserRepository extends JpaRepository<User, Long> {
/**
* Finds a User through the given username.
*
* @param username the username to look for
* @return the User that was found (if any)
*/
Optional<User> findByUsername(String username);
}
| [
"[email protected]"
]
| |
4432a8df43a941fc0c41decc6b6ea98b95d87e67 | 5a51f8840d20627af64c15d6ee9e0d44ed1c6fbb | /src/service/MgrLoginAction.java | 11ca0eea27c2e7b39f9049f373b0bccd9f66f5f5 | []
| no_license | ijkang/uploadtest | fe11e776a3395a58912b269503116576790e0ac5 | fd325062254e8ee0fb59bdb8658180ea2b01ac1b | refs/heads/master | 2020-04-04T18:35:12.567825 | 2018-11-05T05:40:26 | 2018-11-05T06:22:03 | 156,169,673 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 910 | java | package service;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import dao.ManagerDao;
import model.Manager;
public class MgrLoginAction implements CommandProcess {
@Override
public String requestPro(HttpServletRequest request, HttpServletResponse response) {
String id = request.getParameter("id");
String password = request.getParameter("password");
System.out.print(id+""+password);
ManagerDao md = ManagerDao.getInstance();
String DBpass = md.selectPass(id);
int idCheck = md.confirmId(id);
if(idCheck==0){
String msg= "ID 가 존재하지 않습니다.";
request.setAttribute("msg", msg);
return "check/returnPage.jsp";
}
if(!password.equals(DBpass)){
String msg= "비밀번호가 틀렸습니다.";
request.setAttribute("msg", msg);
return "check/returnPage.jsp";
}else{
return "mgr/mgrHomego.jsp";
}
}
}
| [
"[email protected]"
]
| |
191499b3c403fcb1f8b61a6979a92b6559b1fefe | e42578fe3d9634895c175cef93db9824d7c54180 | /mockito/src/main/java/org/vardhantrainings/testdoubles/dummy/Book.java | 496b38290055373ab293d694202ac7f90ac08fd9 | []
| no_license | rajzz9/mockito | 9d10f9b5d90664ded3fe46a707ac3e976db7a000 | 47779127991ca5ee74556264155c89bfcf2377a5 | refs/heads/master | 2023-06-20T17:05:55.189413 | 2021-08-02T07:01:00 | 2021-08-02T07:01:00 | 391,514,285 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,031 | java | package org.vardhantrainings.testdoubles.dummy;
import java.time.LocalDate;
public class Book {
private String bookId;
private String title;
private int price;
private LocalDate publishedDate;
public Book(String bookId, String title, int price, LocalDate publishedDate) {
this.bookId = bookId;
this.title = title;
this.price = price;
this.publishedDate = publishedDate;
}
public String getBookId() {
return bookId;
}
public void setBookId(String bookId) {
this.bookId = bookId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
public LocalDate getPublishedDate() {
return publishedDate;
}
public void setPublishedDate(LocalDate publishedDate) {
this.publishedDate = publishedDate;
}
}
| [
"[email protected]"
]
| |
85c8779725d99cb1d72f5949d313a32d02d3d114 | c292d9d00f9a2d23d7d54ab4ea6febb788cd5df6 | /src/main/java/org/omg/PortableInterceptor/IORInterceptor.java | e8f3f01522e9dba388315cd49342abcde51dca28 | []
| no_license | yangsongbai/jdk-source-read | cf4126318f4a1f93a6150b07599ffe77a20fa6e3 | 851e0895be24d2724c12174ed0f60bc483258cae | refs/heads/master | 2020-07-16T07:04:20.841964 | 2019-09-02T02:52:12 | 2019-09-02T02:52:12 | 205,744,217 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,022 | java | package org.omg.PortableInterceptor;
/**
* org/omg/PortableInterceptor/IORInterceptor.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u201/12322/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
* Saturday, December 15, 2018 6:38:38 PM PST
*/
/**
* Interceptor used to establish tagged components in the profiles within
* an IOR.
* <p>
* In some cases, a portable ORB service implementation may need to add
* information describing the server's or object's ORB service related
* capabilities to object references in order to enable the ORB service
* implementation in the client to function properly.
* <p>
* This is supported through the <code>IORInterceptor</code> and
* <code>IORInfo</code> interfaces.
*
* @see IORInfo
*/
public interface IORInterceptor extends IORInterceptorOperations, Interceptor, org.omg.CORBA.portable.IDLEntity
{
} // interface IORInterceptor
| [
"“[email protected]"
]
| |
15f5eefcfd926ecd9604070afa0050c47eb15b7b | 674b10a0a3e2628e177f676d297799e585fe0eb6 | /src/main/java/androidx/coordinatorlayout/R$drawable.java | f15854eda970480189386ffac30fc4f1fcc486a1 | []
| no_license | Rune-Status/open-osrs-osrs-android | 091792f375f1ea118da4ad341c07cb73f76b3e03 | 551b86ab331af94f66fe0dcb3adc8242bf3f472f | refs/heads/master | 2020-08-08T03:32:10.802605 | 2019-10-08T15:50:18 | 2019-10-08T15:50:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 943 | java | package androidx.coordinatorlayout;
public final class R$drawable {
public static final int notification_action_background = 0x7F07007F;
public static final int notification_bg = 0x7F070080;
public static final int notification_bg_low = 0x7F070081;
public static final int notification_bg_low_normal = 0x7F070082;
public static final int notification_bg_low_pressed = 0x7F070083;
public static final int notification_bg_normal = 0x7F070084;
public static final int notification_bg_normal_pressed = 0x7F070085;
public static final int notification_icon_background = 0x7F070086;
public static final int notification_template_icon_bg = 0x7F070087;
public static final int notification_template_icon_low_bg = 0x7F070088;
public static final int notification_tile_bg = 0x7F070089;
public static final int notify_panel_notification_icon_bg = 0x7F07008A;
R$drawable() {
super();
}
}
| [
"[email protected]"
]
| |
4bb5165104d99b431fc0ec9839dd6cb1c34be47f | 1af3f64f2a35376f3e3f09199724063bbc81ef13 | /src/main/java/the/floow/challenge/dao/FileBlockDao.java | 11ad953f5a98c904c96cbe8158b1b0da9798e5e0 | []
| no_license | wajidhanif/challenge | 4716a87323f20ae511115e0db5ee7a5e73beb46f | 00817ba9e4be11b0e76b676f2619e67d49569b31 | refs/heads/master | 2021-07-09T02:15:18.673571 | 2017-10-09T18:35:28 | 2017-10-09T18:35:28 | 105,997,459 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,621 | java | package the.floow.challenge.dao;
import static com.mongodb.client.model.Filters.and;
import static com.mongodb.client.model.Filters.eq;
import static com.mongodb.client.model.Filters.in;
import static com.mongodb.client.model.Filters.ne;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.bson.Document;
import org.bson.types.ObjectId;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoCursor;
import com.mongodb.client.MongoDatabase;
import the.floow.challenge.entity.BlockQueue;
import the.floow.challenge.entity.DataSource;
import the.floow.challenge.enums.BlockStatus;
public class FileBlockDao extends GenericDao {
public FileBlockDao(DataSource dataSouce) {
super(dataSouce);
}
private MongoCollection<Document> getFileBlockCollection(){
MongoDatabase database = this.getMongoDatabase();
return database.getCollection("files_blocks");
}
public void createFileBlocks(ObjectId fileID, long blockSize, long fileSize){
MongoCollection<Document> collection = this.getFileBlockCollection();
List<Document> blockList = new ArrayList<Document>();
long numSplits = fileSize / blockSize;
if (fileSize % blockSize == 1) {
numSplits++;
}
for (int i = 0; i < numSplits; i++) {
Document block = new Document("name", "FILE_BLOCK_"+(i+1))
.append("fileID", fileID)
.append("blockNo", i+1)
.append("executorID", "")
.append("status", BlockStatus.AVAILABLE.getValue())
.append("createdTimestamp", new Date())
.append("updatedTimestamp", new Date());
blockList.add(block);
}
collection.insertMany(blockList);
}
public List<BlockQueue> getAllBlocks(){
MongoCollection<Document> collection = this.getFileBlockCollection();
MongoCursor<Document> docsCursor = collection.find().iterator();
List<BlockQueue> queue = new ArrayList<>();
try {
while (docsCursor.hasNext()) {
Document doc = docsCursor.next();
queue.add(new BlockQueue(doc.getInteger("name"), doc.getString("status")));
}
} finally {
docsCursor.close();
}
return queue;
}
public long getAllBlockCount(ObjectId fileID){
return this.getFileBlockCollection().count(and(eq("fileID", fileID)));
}
public long getFileAvailableBlockCount(ObjectId fileID){
return this.getFileBlockCollection().count(and(eq("fileID", fileID), eq("status", BlockStatus.AVAILABLE.getValue())));
}
public List<Integer> getFileAvailableBlocks(ObjectId fileID){
MongoCollection<Document> collection = this.getFileBlockCollection();
MongoCursor<Document> docsCursor = collection.find(and(eq("fileID", fileID), eq("status", BlockStatus.AVAILABLE.getValue()))).iterator();
List<Integer> blockNos = new ArrayList<>();
try {
while (docsCursor.hasNext()) {
Document doc = docsCursor.next();
Integer blockNo= doc.getInteger("blockNo");
blockNos.add(blockNo);
}
} finally {
docsCursor.close();
}
return blockNos;
}
public List<Integer> getFileBlocksByStatus(ObjectId fileID, BlockStatus status){
MongoCollection<Document> collection = this.getFileBlockCollection();
MongoCursor<Document> docsCursor = collection.find(and(eq("fileID", fileID), eq("status", status))).iterator();
List<Integer> blockNos = new ArrayList<>();
try {
while (docsCursor.hasNext()) {
Document doc = docsCursor.next();
Integer blockNo= doc.getInteger("blockNo");
blockNos.add(blockNo);
}
} finally {
docsCursor.close();
}
return blockNos;
}
public long getBlockCountByStatus(ObjectId fileID, BlockStatus status){
return this.getFileBlockCollection().count((and(eq("fileID", fileID), eq("status", status.getValue()))));
}
public long getBlockCountNotWritten(ObjectId fileID){
return this.getFileBlockCollection().count((and(eq("fileID", fileID), ne("status", BlockStatus.WRITTEN.getValue()))));
}
public void updateBlockStatus(ObjectId fileID, ObjectId executorID, int blockNo, BlockStatus status){
MongoCollection<Document> collection = this.getFileBlockCollection();
Document setParams = new Document("$set",
new Document("status", status.getValue())
.append("executorID", executorID)
.append("updatedTimestamp", new Date()));
collection.updateOne(and(eq("fileID", fileID), eq("blockNo", blockNo)), setParams);
}
public void updateBlockStatus(ObjectId fileID, List<Integer> blockNos, BlockStatus status){
MongoCollection<Document> collection = this.getFileBlockCollection();
collection.updateMany(and(eq("fileID", fileID), in("blockNo", blockNos)),new Document("$set", new Document("status", status.getValue()).append("updatedTimestamp", new Date())));
}
public void updateBlockStatus(ObjectId fileID, ObjectId executorID, BlockStatus status){
MongoCollection<Document> collection = this.getFileBlockCollection();
Document setParams = new Document("$set",
new Document("status", status.getValue())
.append("executorID", "")
.append("updatedTimestamp", new Date()));
collection.updateMany(and(eq("fileID", fileID), eq("executorID", executorID)),setParams);
}
public void updateBlockStatusToAvailable(ObjectId fileID, ObjectId executorID){
MongoCollection<Document> collection = this.getFileBlockCollection();
Document setParams = new Document("$set",
new Document("status", BlockStatus.AVAILABLE.getValue())
.append("executorID", "")
.append("updatedTimestamp", new Date()));
collection.updateMany(and(eq("fileID", fileID), eq("executorID", executorID), ne("status",BlockStatus.WRITTEN.getValue())),setParams);
}
}
| [
"[email protected]"
]
| |
8865e80bbe827128cd1fd57109473e6e0cc5e7a6 | a9e4e22b593df408e2c54fe6d2f48c2a8884f526 | /lqzxc/src/com/lqzxc/widget/RefreshScrollView.java | 5f875d104744ba4789cfaee48f485429b2603dfb | []
| no_license | 472950043/lqzxc | 6b8763019feb4fcf6c8f63dcdae92f2442ad8217 | 8b71090e8fde4720dd4f38155209bda124ea9e28 | refs/heads/master | 2021-01-22T08:59:10.472027 | 2015-08-11T06:45:51 | 2015-08-11T06:45:51 | 16,632,173 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 12,633 | java | package com.lqzxc.widget;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import com.lqzxc.R;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.ScrollView;
import android.widget.TextView;
/**
* 下拉刷新ScrollView
* @author QQ472950043
*/
public class RefreshScrollView extends ScrollView{
//状态变量组
private final static int PULL_To_REFRESH = 0;// 下拉刷新标志
private final static int RELEASE_To_REFRESH = 1;// 松开刷新标志
private final static int REFRESHING = 2;// 正在刷新标志
private final static int DONE = 3;// 刷新完成标志
//布局文件
private LayoutInflater inflater;
//内部布局,ScrollView只能有一个child
private LinearLayout innerLayout;
private LinearLayout headView;
//头部列表
private TextView tipsTextview;
private TextView lastUpdatedTextView;
private ImageView arrowImageView;
private ProgressBar progressBar;
// 用来设置箭头图标动画效果
private RotateAnimation animation;
private RotateAnimation reverseAnimation;
// 用于保证startY的值在一个完整的touch事件中只被记录一次
private boolean isRecored;
//头部view的长宽
// private int headContentWidth;
private int headContentHeight;
// 实际的padding的距离与界面上偏移距离
private int headContentOriginalTopPadding;
private int startY;
private int state;
private boolean isBack;
//刷新时间
public OnRefreshListener refreshListener;
public RefreshScrollView(Context context) {
super(context);
init(context);
}
public RefreshScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
init(context);
}
public RefreshScrollView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init(context);
}
private void init(Context context) {
if (isInEditMode()) return;
//向上的滑动动画
animation = new RotateAnimation(0, -180,RotateAnimation.RELATIVE_TO_SELF, 0.5f,RotateAnimation.RELATIVE_TO_SELF, 0.5f);
animation.setInterpolator(new LinearInterpolator());
animation.setDuration(100);
animation.setFillAfter(true);
//回弹的滑动动画
reverseAnimation = new RotateAnimation(-180, 0,RotateAnimation.RELATIVE_TO_SELF, 0.5f,RotateAnimation.RELATIVE_TO_SELF, 0.5f);
reverseAnimation.setInterpolator(new LinearInterpolator());
reverseAnimation.setDuration(100);
reverseAnimation.setFillAfter(true);
inflater = LayoutInflater.from(context);
//创建innerLayout
innerLayout = new LinearLayout(context);
innerLayout.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
innerLayout.setOrientation(LinearLayout.VERTICAL);
//创建headerView
headView = (LinearLayout) inflater.inflate(R.layout.widget_listview_head, null);
arrowImageView = (ImageView) headView.findViewById(R.id.imageview_head_arrow);
// arrowImageView.setMinimumWidth(35);
// arrowImageView.setMinimumHeight(25);
progressBar = (ProgressBar) headView.findViewById(R.id.progressbar_head);
tipsTextview = (TextView) headView.findViewById(R.id.textview_head_tips);
lastUpdatedTextView = (TextView) headView.findViewById(R.id.textview_head_lastUpdated);
//测量headView高度、宽度
measureView(headView);
headContentHeight = headView.getMeasuredHeight();
// headContentWidth = headView.getMeasuredWidth();
//设置headView间距
headView.setPadding(headView.getPaddingLeft(), -1 * headContentHeight, headView.getPaddingRight(), headView.getPaddingBottom());
headView.invalidate();
// headContentOriginalTopPadding = headView.getPaddingTop();
// System.out.println("初始高度:"+headContentHeight);
// System.out.println("初始TopPad:"+headContentOriginalTopPadding);
//增加HeaderView至innerLayout顶部、设置监听
innerLayout.addView(headView);
addView(innerLayout);
}
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
if (getScrollY() == 0 && !isRecored) {
startY = (int) event.getY();
isRecored = true;
System.out.println("当前-按下高度-ACTION_DOWN-Y:"+startY);
}
break;
case MotionEvent.ACTION_CANCEL:// 失去焦点&取消动作
case MotionEvent.ACTION_UP:
if (state != REFRESHING && state != REFRESHING) {
if (state == DONE) {
System.out.println("当前-抬起-ACTION_UP:DONE什么都不做");
} else if (state == PULL_To_REFRESH) {
state = DONE;
changeHeaderViewByState();
System.out.println("当前-抬起-ACTION_UP:PULL_To_REFRESH-->DONE-由下拉刷新状态到刷新完成状态");
} else if (state == RELEASE_To_REFRESH) {
state = REFRESHING;
changeHeaderViewByState();
onRefresh();
System.out.println("当前-抬起-ACTION_UP:RELEASE_To_REFRESH-->REFRESHING-由松开刷新状态,到刷新完成状态");
}
}
isRecored = false;
isBack = false;
break;
case MotionEvent.ACTION_MOVE:
int tempY = (int) event.getY();
System.out.println("当前-滑动-ACTION_MOVE Y:"+tempY);
if (!isRecored && getScrollY() == 0) {
isRecored = true;
startY = tempY;
System.out.println("当前-滑动-记录拖拽时的位置 Y:"+tempY);
}
if (state != REFRESHING && isRecored && state != REFRESHING) {
// 保证在设置padding的过程中,当前的位置一直是在head,否则如果当列表超出屏幕的话,当在上推的时候,列表会同时进行滚动
// 可以松开刷新了
if (state == RELEASE_To_REFRESH) {
// 往上推,推到屏幕足够掩盖head的程度,但还没有全部掩盖
if ((tempY - startY < headContentHeight + 20) && (tempY - startY) > 0) {
state = PULL_To_REFRESH;
changeHeaderViewByState();
System.out.println("当前-滑动-ACTION_MOVE:RELEASE_To_REFRESH--》PULL_To_REFRESH-由松开刷新状态转变到下拉刷新状态");
}
// 一下子推到顶
else if (tempY - startY <= 0) {
state = DONE;
changeHeaderViewByState();
System.out.println("当前-滑动-ACTION_MOVE:RELEASE_To_REFRESH--》DONE-由松开刷新状态转变到done状态");
}
// 往下拉,或者还没有上推到屏幕顶部掩盖head
else {
// 不用进行特别的操作,只用更新paddingTop的值就行了
}
}
// 还没有到达显示松开刷新的时候,DONE或者是PULL_To_REFRESH状态
else if (state == PULL_To_REFRESH) {
// 下拉到可以进入RELEASE_TO_REFRESH的状态
if (tempY - startY >= headContentHeight + 20) {
state = RELEASE_To_REFRESH;
isBack = true;
changeHeaderViewByState();
System.out.println("当前-滑动-PULL_To_REFRESH--》RELEASE_To_REFRESH-由done或者下拉刷新状态转变到松开刷新");
}
// 上推到顶了
else if (tempY - startY <= 0) {
state = DONE;
changeHeaderViewByState();
System.out.println("当前-滑动-PULL_To_REFRESH--》DONE-由Done或者下拉刷新状态转变到done状态");
}
}
// done状态下
else if (state == DONE) {
if (tempY - startY > 0) {
state = PULL_To_REFRESH;
changeHeaderViewByState();
System.out.println("当前-滑动-DONE--》PULL_To_REFRESH-由done状态转变到下拉刷新状态");
}
}
// 更新headView的size
if (state == PULL_To_REFRESH) {
int topPadding = (int) ((-1 * headContentHeight + (tempY - startY)));
headView.setPadding(headView.getPaddingLeft(), topPadding,headView.getPaddingRight(), headView.getPaddingBottom());
headView.invalidate();
System.out.println("当前-下拉刷新PULL_To_REFRESH-TopPad:"+topPadding);
}
// 更新headView的paddingTop
if (state == RELEASE_To_REFRESH) {
int topPadding = (int) ((tempY - startY - headContentHeight));
headView.setPadding(headView.getPaddingLeft(), topPadding, headView.getPaddingRight(),headView.getPaddingBottom());
headView.invalidate();
System.out.println("当前-释放刷新RELEASE_To_REFRESH-TopPad:"+topPadding);
}
}
break;
}
return super.onTouchEvent(event);
}
// 当状态改变时候,调用该方法,以更新界面
private void changeHeaderViewByState() {
switch (state) {
case RELEASE_To_REFRESH:
arrowImageView.setVisibility(View.VISIBLE);
progressBar.setVisibility(View.GONE);
tipsTextview.setVisibility(View.VISIBLE);
lastUpdatedTextView.setVisibility(View.VISIBLE);
arrowImageView.clearAnimation();
arrowImageView.startAnimation(animation);
tipsTextview.setText("松开可以刷新");
// Log.v(TAG, "当前状态,松开刷新");
break;
case PULL_To_REFRESH:
progressBar.setVisibility(View.GONE);
tipsTextview.setVisibility(View.VISIBLE);
lastUpdatedTextView.setVisibility(View.VISIBLE);
arrowImageView.clearAnimation();
arrowImageView.setVisibility(View.VISIBLE);
if (isBack) {
isBack = false;
arrowImageView.clearAnimation();
arrowImageView.startAnimation(reverseAnimation);
}
tipsTextview.setText("下拉可以刷新");
// Log.v(TAG, "当前状态,下拉刷新");
break;
case REFRESHING:
System.out.println("刷新REFRESHING-TopPad:"+headContentOriginalTopPadding);
headView.setPadding(headView.getPaddingLeft(),
headContentOriginalTopPadding, headView.getPaddingRight(),
headView.getPaddingBottom());
headView.invalidate();
progressBar.setVisibility(View.VISIBLE);
arrowImageView.clearAnimation();
arrowImageView.setVisibility(View.GONE);
tipsTextview.setText("正在刷新...");
lastUpdatedTextView.setVisibility(View.GONE);
// Log.v(TAG, "当前状态,正在刷新...");
break;
case DONE:
System.out.println("完成DONE-TopPad:"+(-1 * headContentHeight));
headView.setPadding(headView.getPaddingLeft(), -1 * headContentHeight, headView.getPaddingRight(), headView.getPaddingBottom());
headView.invalidate();
progressBar.setVisibility(View.GONE);
arrowImageView.clearAnimation();
// 此处更换图标
arrowImageView.setImageResource(R.drawable.icon_head_arrow);
tipsTextview.setText("下拉可以刷新");
lastUpdatedTextView.setVisibility(View.VISIBLE);
// Log.v(TAG, "当前状态,done");
break;
}
}
public void addChild(View child, int position) {
innerLayout.addView(child, position);
}
// 点击刷新
public void clickRefresh() {
state = REFRESHING;
changeHeaderViewByState();
onRefresh();
}
public void setOnRefreshListener(OnRefreshListener refreshListener) {
this.refreshListener = refreshListener;
}
public interface OnRefreshListener {
public void onRefresh();
}
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());//年月日 时分秒 格式
public String getTime(String time) {
return df.format(new Date(Long.parseLong(time)));
}
public void onRefreshComplete(String update) {
lastUpdatedTextView.setText("最近更新:" + getTime(update));
onRefreshComplete();
}
public void onRefreshComplete() {
state = DONE;
changeHeaderViewByState();
}
private void onRefresh() {
if (refreshListener != null) {
refreshListener.onRefresh();
}
}
// 计算headView的width及height值
private void measureView(View child) {
ViewGroup.LayoutParams p = child.getLayoutParams();
if (p == null) {
p = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
int childWidthSpec = ViewGroup.getChildMeasureSpec(0, 0 + 0, p.width);
int lpHeight = p.height;
int childHeightSpec;
if (lpHeight > 0) {
childHeightSpec = MeasureSpec.makeMeasureSpec(lpHeight, MeasureSpec.EXACTLY);
} else {
childHeightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
}
child.measure(childWidthSpec, childHeightSpec);
}
} | [
"[email protected]"
]
| |
efe287c0bb2bfde16b40702d72131ac8cc12e4f9 | 77e80aaf6c9e2cb4a961a9bb186e7262a435be9b | /shard-core/src/main/java/com/codecrate/shard/character/Initiative.java | 58b6d63841c3158e4290256ab7a68ef3f4e2a4f8 | []
| no_license | wireframe/shard | 748051103a1a29d4d53b73b09e77f185d897e9ab | 7d915fe7edc44b5d6ff68aff1d24e5f6b1cb063d | refs/heads/master | 2021-07-03T14:46:45.490147 | 2008-08-19T19:50:26 | 2008-08-19T19:50:26 | 25,412 | 1 | 1 | null | 2020-10-13T10:00:19 | 2008-06-15T04:10:17 | Java | UTF-8 | Java | false | false | 2,050 | java | /*
* Copyright 2004 codecrate consulting
*
* 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.codecrate.shard.character;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.codecrate.shard.ability.Ability;
import com.codecrate.shard.ability.AbilityScore;
import com.codecrate.shard.ability.AbilityScoreContainer;
import com.codecrate.shard.modifier.Modifiable;
import com.codecrate.shard.modifier.ModifiableObject;
import com.codecrate.shard.modifier.Modifier;
import com.codecrate.shard.modifier.ModifierListener;
/**
* Initiative is used for determining when the character enters battle.
*
* @author <a href="mailto:[email protected]">Ryan Sonnek</a>
*/
public class Initiative extends ModifiableObject implements Modifiable, ModifierListener {
private static final Log LOG = LogFactory.getLog(Initiative.class);
private AbilityScore abilityScore;
private Modifier modifier;
public Initiative(AbilityScoreContainer abilities) {
super();
if (abilities.hasAbilityScore(Ability.DEXTERITY)) {
abilityScore = abilities.getAbilityScore(Ability.DEXTERITY);
abilityScore.addListener(this);
}
onModify();
}
public void onModify() {
if (null != abilityScore) {
LOG.debug("Updating dexterity initiative modifier.");
if (null != modifier) {
removeModifier(modifier);
}
addModifier(abilityScore);
}
}
}
| [
"wireframe"
]
| wireframe |
ce9bd73815e6e145da4a748f9af53a305eb5b014 | 99401ddf6da8e9e05438a9198b41d660dc4760c8 | /app/src/main/java/google/zxing/camera/CameraManager.java | fb1ac1d3cc4445227d59db89fc519bae2550430a | []
| no_license | clearb/Test | e336dfcec511fafed44b57ce14259a8ed1fbb818 | 9c98db7c5d09120373be46d845be9fbce811672e | refs/heads/master | 2021-01-20T23:09:16.627042 | 2017-08-30T05:58:37 | 2017-08-30T05:58:37 | 101,840,150 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,253 | java | /*
* Copyright (C) 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package google.zxing.camera;
import android.content.Context;
import android.graphics.PixelFormat;
import android.graphics.Point;
import android.graphics.Rect;
import android.hardware.Camera;
import android.os.Build;
import android.os.Handler;
import android.view.SurfaceHolder;
import java.io.IOException;
/**
* This object wraps the Camera service object and expects to be the only one talking to it. The
* implementation encapsulates the steps needed to take preview-sized images, which are used for
* both preview and decoding.
*
*/
public final class CameraManager {
private static final String TAG = CameraManager.class.getSimpleName();
private static final int MIN_FRAME_WIDTH = 240;
private static final int MIN_FRAME_HEIGHT = 240;
private static final int MAX_FRAME_WIDTH = 480;
private static final int MAX_FRAME_HEIGHT = 360;
private static CameraManager cameraManager;
static final int SDK_INT; // Later we can use Build.VERSION.SDK_INT
static {
int sdkInt;
try {
sdkInt = Integer.parseInt(Build.VERSION.SDK);
} catch (NumberFormatException nfe) {
// Just to be safe
sdkInt = 10000;
}
SDK_INT = sdkInt;
}
private final Context context;
private final CameraConfigurationManager configManager;
private Camera camera;
private Rect framingRect;
private Rect framingRectInPreview;
private boolean initialized;
private boolean previewing;
private final boolean useOneShotPreviewCallback;
/**
* Preview frames are delivered here, which we pass on to the registered handler. Make sure to
* clear the handler so it will only receive one message.
*/
private final PreviewCallback previewCallback;
/** Autofocus callbacks arrive here, and are dispatched to the Handler which requested them. */
private final AutoFocusCallback autoFocusCallback;
/**
* Initializes this static object with the Context of the calling Activity.
*
* @param context The Activity which wants to use the camera.
*/
public static void init(Context context) {
if (cameraManager == null) {
cameraManager = new CameraManager(context);
}
}
/**
* Gets the CameraManager singleton instance.
*
* @return A reference to the CameraManager singleton.
*/
public static CameraManager get() {
return cameraManager;
}
private CameraManager(Context context) {
this.context = context;
this.configManager = new CameraConfigurationManager(context);
// Camera.setOneShotPreviewCallback() has a race condition in Cupcake, so we use the older
// Camera.setPreviewCallback() on 1.5 and earlier. For Donut and later, we need to use
// the more efficient one shot callback, as the older one can swamp the system and cause it
// to run out of memory. We can't use SDK_INT because it was introduced in the Donut SDK.
//useOneShotPreviewCallback = Integer.parseInt(Build.VERSION.SDK) > Build.VERSION_CODES.CUPCAKE;
useOneShotPreviewCallback = Integer.parseInt(Build.VERSION.SDK) > 3; // 3 = Cupcake
previewCallback = new PreviewCallback(configManager, useOneShotPreviewCallback);
autoFocusCallback = new AutoFocusCallback();
}
/**
* Opens the camera driver and initializes the hardware parameters.
*
* @param holder The surface object which the camera will draw preview frames into.
* @throws IOException Indicates the camera driver failed to open.
*/
public void openDriver(SurfaceHolder holder) throws IOException {
if (camera == null) {
camera = Camera.open();
if (camera == null) {
throw new IOException();
}
camera.setPreviewDisplay(holder);
if (!initialized) {
initialized = true;
configManager.initFromCameraParameters(camera);
}
configManager.setDesiredCameraParameters(camera);
//FIXME
// SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
//�Ƿ�ʹ��ǰ��
// if (prefs.getBoolean(PreferencesActivity.KEY_FRONT_LIGHT, false)) {
// FlashlightManager.enableFlashlight();
// }
FlashlightManager.enableFlashlight();
}
}
/**
* Closes the camera driver if still in use.
*/
public void closeDriver() {
if (camera != null) {
FlashlightManager.disableFlashlight();
camera.release();
camera = null;
}
}
/**
* Asks the camera hardware to begin drawing preview frames to the screen.
*/
public void startPreview() {
if (camera != null && !previewing) {
camera.startPreview();
previewing = true;
}
}
/**
* Tells the camera to stop drawing preview frames.
*/
public void stopPreview() {
if (camera != null && previewing) {
if (!useOneShotPreviewCallback) {
camera.setPreviewCallback(null);
}
camera.stopPreview();
previewCallback.setHandler(null, 0);
autoFocusCallback.setHandler(null, 0);
previewing = false;
}
}
/**
* A single preview frame will be returned to the handler supplied. The data will arrive as byte[]
* in the message.obj field, with width and height encoded as message.arg1 and message.arg2,
* respectively.
*
* @param handler The handler to send the message to.
* @param message The what field of the message to be sent.
*/
public void requestPreviewFrame(Handler handler, int message) {
if (camera != null && previewing) {
previewCallback.setHandler(handler, message);
if (useOneShotPreviewCallback) {
camera.setOneShotPreviewCallback(previewCallback);
} else {
camera.setPreviewCallback(previewCallback);
}
}
}
/**
* Asks the camera hardware to perform an autofocus.
*
* @param handler The Handler to notify when the autofocus completes.
* @param message The message to deliver.
*/
public void requestAutoFocus(Handler handler, int message) {
if (camera != null && previewing) {
autoFocusCallback.setHandler(handler, message);
//Log.d(TAG, "Requesting auto-focus callback");
camera.autoFocus(autoFocusCallback);
}
}
/**
* Calculates the framing rect which the UI should draw to show the user where to place the
* barcode. This target helps with alignment as well as forces the user to hold the device
* far enough away to ensure the image will be in focus.
*
* @return The rectangle to draw on screen in window coordinates.
*/
public Rect getFramingRect() {
Point screenResolution = configManager.getScreenResolution();
if(screenResolution == null)
return null;
if (framingRect == null) {
if (camera == null) {
return null;
}
//修改之后
int width = screenResolution.x * 7 / 10;
int height = screenResolution.y * 7 / 10;
if(height >= width) { //竖屏
height = width;
} else { //黑屏
width = height;
}
int leftOffset = (screenResolution.x - width) / 2;
int topOffset = (screenResolution.y - height) / 2;
framingRect = new Rect(leftOffset, topOffset, leftOffset + width, topOffset + height);
}
return framingRect;
}
// public Rect getFramingRect() {
// Point screenResolution = configManager.getScreenResolution();
// if (framingRect == null) {
// if (camera == null) {
// return null;
// }
// int width = screenResolution.x * 3 / 4;
// if (width < MIN_FRAME_WIDTH) {
// width = MIN_FRAME_WIDTH;
// } else if (width > MAX_FRAME_WIDTH) {
// width = MAX_FRAME_WIDTH;
// }
// int height = screenResolution.y * 3 / 4;
// if (height < MIN_FRAME_HEIGHT) {
// height = MIN_FRAME_HEIGHT;
// } else if (height > MAX_FRAME_HEIGHT) {
// height = MAX_FRAME_HEIGHT;
// }
// int leftOffset = (screenResolution.x - width) / 2;
// int topOffset = (screenResolution.y - height) / 2;
// framingRect = new Rect(leftOffset, topOffset, leftOffset + width, topOffset + height);
// Log.d(TAG, "Calculated framing rect: " + framingRect);
// }
// return framingRect;
// }
/**
* Like {@link #getFramingRect} but coordinates are in terms of the preview frame,
* not UI / screen.
*/
public Rect getFramingRectInPreview() {
if (framingRectInPreview == null) {
Rect rect = new Rect(getFramingRect());
Point cameraResolution = configManager.getCameraResolution();
Point screenResolution = configManager.getScreenResolution();
//modify here
// rect.left = rect.left * cameraResolution.x / screenResolution.x;
// rect.right = rect.right * cameraResolution.x / screenResolution.x;
// rect.top = rect.top * cameraResolution.y / screenResolution.y;
// rect.bottom = rect.bottom * cameraResolution.y / screenResolution.y;
rect.left = rect.left * cameraResolution.y / screenResolution.x;
rect.right = rect.right * cameraResolution.y / screenResolution.x;
rect.top = rect.top * cameraResolution.x / screenResolution.y;
rect.bottom = rect.bottom * cameraResolution.x / screenResolution.y;
framingRectInPreview = rect;
}
return framingRectInPreview;
}
/**
* Converts the result points from still resolution coordinates to screen coordinates.
*
* @param points The points returned by the Reader subclass through Result.getResultPoints().
* @return An array of Points scaled to the size of the framing rect and offset appropriately
* so they can be drawn in screen coordinates.
*/
/*
public Point[] convertResultPoints(ResultPoint[] points) {
Rect frame = getFramingRectInPreview();
int count = points.length;
Point[] output = new Point[count];
for (int x = 0; x < count; x++) {
output[x] = new Point();
output[x].x = frame.left + (int) (points[x].getX() + 0.5f);
output[x].y = frame.top + (int) (points[x].getY() + 0.5f);
}
return output;
}
*/
/**
* A factory method to build the appropriate LuminanceSource object based on the format
* of the preview buffers, as described by Camera.Parameters.
*
* @param data A preview frame.
* @param width The width of the image.
* @param height The height of the image.
* @return A PlanarYUVLuminanceSource instance.
*/
public PlanarYUVLuminanceSource buildLuminanceSource(byte[] data, int width, int height) {
Rect rect = getFramingRectInPreview();
int previewFormat = configManager.getPreviewFormat();
String previewFormatString = configManager.getPreviewFormatString();
switch (previewFormat) {
// This is the standard Android format which all devices are REQUIRED to support.
// In theory, it's the only one we should ever care about.
case PixelFormat.YCbCr_420_SP:
// This format has never been seen in the wild, but is compatible as we only care
// about the Y channel, so allow it.
case PixelFormat.YCbCr_422_SP:
return new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top,
rect.width(), rect.height());
default:
// The Samsung Moment incorrectly uses this variant instead of the 'sp' version.
// Fortunately, it too has all the Y data up front, so we can read it.
if ("yuv420p".equals(previewFormatString)) {
return new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top,
rect.width(), rect.height());
}
}
throw new IllegalArgumentException("Unsupported picture format: " +
previewFormat + '/' + previewFormatString);
}
public Context getContext() {
return context;
}
}
| [
"[email protected]"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.